Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save biesbjerg/5e1beb80b77e9f582998b9d1dede84d7 to your computer and use it in GitHub Desktop.
Save biesbjerg/5e1beb80b77e9f582998b9d1dede84d7 to your computer and use it in GitHub Desktop.
function UploadManager(t){var e=this;e.dropContainer=t.dropContainer,e.inputField=t.inputField,e.cancelContainer=t.cancelContainer,e.uploadsQueue=[],e._xhrs=[],e.activeUploads=0,e.data=t.data,e.key=t.key,e.maxSimultaneousUploads=t.maxSimultaneousUploads||-1,e.onFileAdded=t.onFileAdded||noop,e.uploadUrl=t.uploadUrl,e.onFileAddedProxy=function(t){console.log("Event: onFileAdded, file: "+t.fileName),e.onFileAdded(t)},e.initialize()}function FileUpload(t){var e=this;e.file=t,e.fileName=t.name,e.fileSize=t.size,e.uploadSize=t.size,e.uploadedBytes=0,e.eventHandlers={},e.events={onProgress:function(t,n){var i=n/t*100;console.log("Event: upload onProgress, progress = "+i+", fileSize = "+t+", uploadedBytes = "+n),(e.eventHandlers.onProgress||noop)(i,t,n)},onStart:function(){console.log("Event: upload onStart"),(e.eventHandlers.onStart||noop)()},onAborted:function(){console.log("Event: upload onAborted"),(e.eventHandlers.onAborted||noop)()},onCompleted:function(n){console.log("Event: upload onCompleted, data = "+n),t=null,(e.eventHandlers.onCompleted||noop)(n)}}}function escapeRegExp(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function difference(t,e){var n={};for(var i in t)if(i in e)if(_.isObject(e[i])&&!_.isArray(e[i])){var s=difference(t[i],e[i]);_.isEmpty(s)||(n[i]=s)}else _.isEqual(t[i],e[i])||(n[i]=e[i]);return n}function byteLength(t){for(var e=t.length,n=t.length-1;n>=0;n--){var i=t.charCodeAt(n);i>127&&i<=2047?e++:i>2047&&i<=65535&&(e+=2),i>=56320&&i<=57343&&n--}return e}function clone(t,e){if(!t)return t;var n=t.constructor.name;n===undefined&&(_.isArray(t)?n="Array":_.isNumber(t)?n="Number":_.isString(t)?n="String":_.isBoolean(t)?n="Boolean":_.isFunction(t)?n="Function":_.isObject(t)&&(n="Object"));var i=["Object","Number","String","Boolean","Array"];if(e&&i.push("Function"),n&&!_.contains(i,n))return console.log("no acceptedInstances",n,t),void console.trace();var s;if("Array"==n)s=[],t.forEach(function(t,n){s[n]=clone(t,e)});else if("Function"==n)s=t.bind({});else if("Object"==n){s={};for(var r in t)t.hasOwnProperty(r)&&(s[r]=clone(t[r],e))}else s=t;return s}function underscored(t){return t.trim().replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()}function toCamelCase(t){return t.replace(/\s(.)/g,function(t){return t.toUpperCase()}).replace(/\s/g,"").replace(/^(.)/,function(t){return t.toUpperCase()})}function isRetina(){if(window.matchMedia){var t=window.matchMedia("only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 1.3dppx)");return t&&t.matches||window.devicePixelRatio>1}}!function(t,e){"object"!=typeof module||"object"!=typeof module.exports||window.process&&window.process.version&&window.process.versions.electron?e(t):module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}}("undefined"!=typeof window?window:this,function(t,e){function n(t){var e=!!t&&"length"in t&&t.length,n=rt.type(t);return"function"!==n&&!rt.isWindow(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function i(t,e,n){if(rt.isFunction(e))return rt.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return rt.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(gt.test(e))return rt.filter(e,t,n);e=rt.filter(e,t)}return rt.grep(t,function(t){return Q.call(e,t)>-1!==n})}function s(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function r(t){var e={};return rt.each(t.match(_t)||[],function(t,n){e[n]=!0}),e}function o(){Y.removeEventListener("DOMContentLoaded",o),t.removeEventListener("load",o),rt.ready()}function a(){this.expando=rt.expando+a.uid++}function l(t,e,n){var i;if(n===undefined&&1===t.nodeType)if(i="data-"+e.replace(xt,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:At.test(n)?rt.parseJSON(n):n)}catch(t){}Ct.set(t,e,n)}else n=undefined;return n}function c(t,e,n,i){var s,r=1,o=20,a=i?function(){return i.cur()}:function(){return rt.css(t,e,"")},l=a(),c=n&&n[3]||(rt.cssNumber[e]?"":"px"),u=(rt.cssNumber[e]||"px"!==c&&+l)&&It.exec(rt.css(t,e));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+l||1;do{r=r||".5",u/=r,rt.style(t,e,u+c)}while(r!==(r=a()/l)&&1!==r&&--o)}return n&&(u=+u||+l||0,s=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=s)),s}function u(t,e){var n="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):[];return e===undefined||e&&rt.nodeName(t,e)?rt.merge([t],n):n}function p(t,e){for(var n=0,i=t.length;n<i;n++)St.set(t[n],"globalEval",!e||St.get(e[n],"globalEval"))}function h(t,e,n,i,s){for(var r,o,a,l,c,h,d=e.createDocumentFragment(),f=[],g=0,m=t.length;g<m;g++)if((r=t[g])||0===r)if("object"===rt.type(r))rt.merge(f,r.nodeType?[r]:r);else if(Mt.test(r)){for(o=o||d.appendChild(e.createElement("div")),a=(Ot.exec(r)||["",""])[1].toLowerCase(),l=Rt[a]||Rt._default,o.innerHTML=l[1]+rt.htmlPrefilter(r)+l[2],h=l[0];h--;)o=o.lastChild;rt.merge(f,o.childNodes),o=d.firstChild,o.textContent=""}else f.push(e.createTextNode(r));for(d.textContent="",g=0;r=f[g++];)if(i&&rt.inArray(r,i)>-1)s&&s.push(r);else if(c=rt.contains(r.ownerDocument,r),o=u(d.appendChild(r),"script"),c&&p(o),n)for(h=0;r=o[h++];)Nt.test(r.type||"")&&n.push(r);return d}function d(){return!0}function f(){return!1}function g(){try{return Y.activeElement}catch(t){}}function m(t,e,n,i,s,r){var o,a;if("object"==typeof e){"string"!=typeof n&&(i=i||n,n=undefined);for(a in e)m(t,a,n,i,e[a],r);return t}if(null==i&&null==s?(s=n,i=n=undefined):null==s&&("string"==typeof n?(s=i,i=undefined):(s=i,i=n,n=undefined)),!1===s)s=f;else if(!s)return t;return 1===r&&(o=s,s=function(t){return rt().off(t),o.apply(this,arguments)},s.guid=o.guid||(o.guid=rt.guid++)),t.each(function(){rt.event.add(this,e,s,i,n)})}function v(t,e){return rt.nodeName(t,"table")&&rt.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function y(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function b(t){var e=Bt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function _(t,e){var n,i,s,r,o,a,l,c;if(1===e.nodeType){if(St.hasData(t)&&(r=St.access(t),o=St.set(e,r),c=r.events)){delete o.handle,o.events={};for(s in c)for(n=0,i=c[s].length;n<i;n++)rt.event.add(e,s,c[s][n])}Ct.hasData(t)&&(a=Ct.access(t),l=rt.extend({},a),Ct.set(e,l))}}function w(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Et.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function k(t,e,n,i){e=X.apply([],e);var s,r,o,a,l,c,p=0,d=t.length,f=d-1,g=e[0],m=rt.isFunction(g);if(m||d>1&&"string"==typeof g&&!it.checkClone&&Ft.test(g))return t.each(function(s){var r=t.eq(s);m&&(e[0]=g.call(this,s,r.html())),k(r,e,n,i)});if(d&&(s=h(e,t[0].ownerDocument,!1,t,i),r=s.firstChild,1===s.childNodes.length&&(s=r),r||i)){for(o=rt.map(u(s,"script"),y),a=o.length;p<d;p++)l=s,p!==f&&(l=rt.clone(l,!0,!0),a&&rt.merge(o,u(l,"script"))),n.call(t[p],l,p);if(a)for(c=o[o.length-1].ownerDocument,rt.map(o,b),p=0;p<a;p++)l=o[p],Nt.test(l.type||"")&&!St.access(l,"globalEval")&&rt.contains(c,l)&&(l.src?rt._evalUrl&&rt._evalUrl(l.src):rt.globalEval(l.textContent.replace(Jt,"")))}return t}function T(t,e,n){for(var i,s=e?rt.filter(e,t):t,r=0;null!=(i=s[r]);r++)n||1!==i.nodeType||rt.cleanData(u(i)),i.parentNode&&(n&&rt.contains(i.ownerDocument,i)&&p(u(i,"script")),i.parentNode.removeChild(i));return t}function S(t,e){var n=rt(e.createElement(t)).appendTo(e.body),i=rt.css(n[0],"display");return n.detach(),i}function C(t){var e=Y,n=Ht[t];return n||(n=S(t,e),"none"!==n&&n||(Wt=(Wt||rt("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=Wt[0].contentDocument,e.write(),e.close(),n=S(t,e),Wt.detach()),Ht[t]=n),n}function A(t,e,n){var i,s,r,o,a=t.style;return n=n||Yt(t),o=n?n.getPropertyValue(e)||n[e]:undefined,""!==o&&o!==undefined||rt.contains(t.ownerDocument,t)||(o=rt.style(t,e)),n&&!it.pixelMarginRight()&&Vt.test(o)&&Gt.test(e)&&(i=a.width,s=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=o,o=n.width,a.width=i,a.minWidth=s,a.maxWidth=r),o!==undefined?o+"":o}function x(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function j(t){if(t in ne)return t;for(var e=t[0].toUpperCase()+t.slice(1),n=ee.length;n--;)if((t=ee[n]+e)in ne)return t}function I(t,e,n){var i=It.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function D(t,e,n,i,s){for(var r=n===(i?"border":"content")?4:"width"===e?1:0,o=0;r<4;r+=2)"margin"===n&&(o+=rt.css(t,n+Dt[r],!0,s)),i?("content"===n&&(o-=rt.css(t,"padding"+Dt[r],!0,s)),"margin"!==n&&(o-=rt.css(t,"border"+Dt[r]+"Width",!0,s))):(o+=rt.css(t,"padding"+Dt[r],!0,s),"padding"!==n&&(o+=rt.css(t,"border"+Dt[r]+"Width",!0,s)));return o}function P(e,n,i){var s=!0,r="width"===n?e.offsetWidth:e.offsetHeight,o=Yt(e),a="border-box"===rt.css(e,"boxSizing",!1,o);if(Y.msFullscreenElement&&t.top!==t&&e.getClientRects().length&&(r=Math.round(100*e.getBoundingClientRect()[n])),r<=0||null==r){if(r=A(e,n,o),(r<0||null==r)&&(r=e.style[n]),Vt.test(r))return r;s=a&&(it.boxSizingReliable()||r===e.style[n]),r=parseFloat(r)||0}return r+D(e,n,i||(a?"border":"content"),s,o)+"px"}function E(t,e){for(var n,i,s,r=[],o=0,a=t.length;o<a;o++)i=t[o],i.style&&(r[o]=St.get(i,"olddisplay"),n=i.style.display,e?(r[o]||"none"!==n||(i.style.display=""),""===i.style.display&&Pt(i)&&(r[o]=St.access(i,"olddisplay",C(i.nodeName)))):(s=Pt(i),"none"===n&&s||St.set(i,"olddisplay",s?n:rt.css(i,"display"))));for(o=0;o<a;o++)i=t[o],i.style&&(e&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=e?r[o]||"":"none"));return t}function O(t,e,n,i,s){return new O.prototype.init(t,e,n,i,s)}function N(){return t.setTimeout(function(){ie=undefined}),ie=rt.now()}function R(t,e){var n,i=0,s={height:t};for(e=e?1:0;i<4;i+=2-e)n=Dt[i],s["margin"+n]=s["padding"+n]=t;return e&&(s.opacity=s.width=t),s}function M(t,e,n){for(var i,s=(L.tweeners[e]||[]).concat(L.tweeners["*"]),r=0,o=s.length;r<o;r++)if(i=s[r].call(n,e,t))return i}function $(t,e,n){var i,s,r,o,a,l,c,u=this,p={},h=t.style,d=t.nodeType&&Pt(t),f=St.get(t,"fxshow");n.queue||(a=rt._queueHooks(t,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,u.always(function(){u.always(function(){a.unqueued--,rt.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],c=rt.css(t,"display"),"inline"===("none"===c?St.get(t,"olddisplay")||C(t.nodeName):c)&&"none"===rt.css(t,"float")&&(h.display="inline-block")),n.overflow&&(h.overflow="hidden",u.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}));for(i in e)if(s=e[i],re.exec(s)){if(delete e[i],r=r||"toggle"===s,s===(d?"hide":"show")){if("show"!==s||!f||f[i]===undefined)continue;d=!0}p[i]=f&&f[i]||rt.style(t,i)}else c=undefined;if(rt.isEmptyObject(p))"inline"===("none"===c?C(t.nodeName):c)&&(h.display=c);else{f?"hidden"in f&&(d=f.hidden):f=St.access(t,"fxshow",{}),r&&(f.hidden=!d),d?rt(t).show():u.done(function(){rt(t).hide()}),u.done(function(){var e;St.remove(t,"fxshow");for(e in p)rt.style(t,e,p[e])});for(i in p)o=M(d?f[i]:0,i,u),i in f||(f[i]=o.start,d&&(o.end=o.start,o.start="width"===i||"height"===i?1:0))}}function z(t,e){var n,i,s,r,o;for(n in t)if(i=rt.camelCase(n),s=e[i],r=t[n],rt.isArray(r)&&(s=r[1],r=t[n]=r[0]),n!==i&&(t[i]=r,delete t[n]),(o=rt.cssHooks[i])&&"expand"in o){r=o.expand(r),delete t[i];for(n in r)n in t||(t[n]=r[n],e[n]=s)}else e[i]=s}function L(t,e,n){var i,s,r=0,o=L.prefilters.length,a=rt.Deferred().always(function(){delete l.elem}),l=function(){if(s)return!1;for(var e=ie||N(),n=Math.max(0,c.startTime+c.duration-e),i=n/c.duration||0,r=1-i,o=0,l=c.tweens.length;o<l;o++)c.tweens[o].run(r);return a.notifyWith(t,[c,r,n]),r<1&&l?n:(a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:rt.extend({},e),opts:rt.extend(!0,{specialEasing:{},easing:rt.easing._default},n),originalProperties:e,originalOptions:n,startTime:ie||N(),duration:n.duration,tweens:[],createTween:function(e,n){var i=rt.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(i),i},stop:function(e){var n=0,i=e?c.tweens.length:0;if(s)return this;for(s=!0;n<i;n++)c.tweens[n].run(1);return e?(a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c,e])):a.rejectWith(t,[c,e]),this}}),u=c.props;for(z(u,c.opts.specialEasing);r<o;r++)if(i=L.prefilters[r].call(c,t,u,c.opts))return rt.isFunction(i.stop)&&(rt._queueHooks(c.elem,c.opts.queue).stop=rt.proxy(i.stop,i)),i;return rt.map(u,M,c),rt.isFunction(c.opts.start)&&c.opts.start.call(t,c),rt.fx.timer(rt.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function U(t){return t.getAttribute&&t.getAttribute("class")||""}function q(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,s=0,r=e.toLowerCase().match(_t)||[];if(rt.isFunction(n))for(;i=r[s++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function F(t,e,n,i){function s(a){var l;return r[a]=!0,rt.each(t[a]||[],function(t,a){var c=a(e,n,i);return"string"!=typeof c||o||r[c]?o?!(l=c):void 0:(e.dataTypes.unshift(c),s(c),!1)}),l}var r={},o=t===Se;return s(e.dataTypes[0])||!r["*"]&&s("*")}function B(t,e){var n,i,s=rt.ajaxSettings.flatOptions||{};for(n in e)e[n]!==undefined&&((s[n]?t:i||(i={}))[n]=e[n]);return i&&rt.extend(!0,t,i),t}function J(t,e,n){for(var i,s,r,o,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),i===undefined&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){l.unshift(s);break}if(l[0]in n)r=l[0];else{for(s in n){if(!l[0]||t.converters[s+" "+l[0]]){r=s;break}o||(o=s)}r=r||o}if(r)return r!==l[0]&&l.unshift(r),n[r]}function W(t,e,n,i){var s,r,o,a,l,c={},u=t.dataTypes.slice();if(u[1])for(o in t.converters)c[o.toLowerCase()]=t.converters[o];for(r=u.shift();r;)if(t.responseFields[r]&&(n[t.responseFields[r]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=r,r=u.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(o=c[l+" "+r]||c["* "+r]))for(s in c)if(a=s.split(" "),a[1]===r&&(o=c[l+" "+a[0]]||c["* "+a[0]])){!0===o?o=c[s]:!0!==c[s]&&(r=a[0],u.unshift(a[1]));break}if(!0!==o)if(o&&t["throws"])e=o(e);else try{e=o(e)}catch(t){return{state:"parsererror",error:o?t:"No conversion from "+l+" to "+r}}}return{state:"success",data:e}}function H(t,e,n,i){var s;if(rt.isArray(e))rt.each(e,function(e,s){n||je.test(t)?i(t,s):H(t+"["+("object"==typeof s&&null!=s?e:"")+"]",s,n,i)});else if(n||"object"!==rt.type(e))i(t,e);else for(s in e)H(t+"["+s+"]",e[s],n,i)}function G(t){return rt.isWindow(t)?t:9===t.nodeType&&t.defaultView}var V=[],Y=t.document,K=V.slice,X=V.concat,Z=V.push,Q=V.indexOf,tt={},et=tt.toString,nt=tt.hasOwnProperty,it={},st="2.2.1",rt=function(t,e){return new rt.fn.init(t,e)},ot=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,at=/^-ms-/,lt=/-([\da-z])/gi,ct=function(t,e){return e.toUpperCase()};rt.fn=rt.prototype={jquery:st,constructor:rt,selector:"",length:0,toArray:function(){return K.call(this)},get:function(t){return null!=t?t<0?this[t+this.length]:this[t]:K.call(this)},pushStack:function(t){var e=rt.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t){return rt.each(this,t)},map:function(t){return this.pushStack(rt.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(K.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:Z,sort:V.sort,splice:V.splice},rt.extend=rt.fn.extend=function(){var t,e,n,i,s,r,o=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof o&&(c=o,o=arguments[a]||{},a++),"object"==typeof o||rt.isFunction(o)||(o={}),a===l&&(o=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)n=o[e],i=t[e],o!==i&&(c&&i&&(rt.isPlainObject(i)||(s=rt.isArray(i)))?(s?(s=!1,r=n&&rt.isArray(n)?n:[]):r=n&&rt.isPlainObject(n)?n:{},o[e]=rt.extend(c,r,i)):i!==undefined&&(o[e]=i));return o},rt.extend({expando:"jQuery"+(st+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===rt.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){var e=t&&t.toString();return!rt.isArray(t)&&e-parseFloat(e)+1>=0},isPlainObject:function(t){return"object"===rt.type(t)&&!t.nodeType&&!rt.isWindow(t)&&!(t.constructor&&!nt.call(t.constructor.prototype,"isPrototypeOf"))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?tt[et.call(t)]||"object":typeof t},globalEval:function(t){var e,n=eval;(t=rt.trim(t))&&(1===t.indexOf("use strict")?(e=Y.createElement("script"),e.text=t,Y.head.appendChild(e).parentNode.removeChild(e)):n(t))},camelCase:function(t){return t.replace(at,"ms-").replace(lt,ct)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var i,s=0;if(n(t))for(i=t.length;s<i&&!1!==e.call(t[s],s,t[s]);s++);else for(s in t)if(!1===e.call(t[s],s,t[s]))break;return t},trim:function(t){return null==t?"":(t+"").replace(ot,"")},makeArray:function(t,e){var i=e||[];return null!=t&&(n(Object(t))?rt.merge(i,"string"==typeof t?[t]:t):Z.call(i,t)),i},inArray:function(t,e,n){return null==e?-1:Q.call(e,t,n)},merge:function(t,e){for(var n=+e.length,i=0,s=t.length;i<n;i++)t[s++]=e[i];return t.length=s,t},grep:function(t,e,n){for(var i=[],s=0,r=t.length,o=!n;s<r;s++)!e(t[s],s)!==o&&i.push(t[s]);return i},map:function(t,e,i){var s,r,o=0,a=[];if(n(t))for(s=t.length;o<s;o++)null!=(r=e(t[o],o,i))&&a.push(r);else for(o in t)null!=(r=e(t[o],o,i))&&a.push(r);return X.apply([],a)},guid:1,proxy:function(t,e){var n,i,s;return"string"==typeof e&&(n=t[e],e=t,t=n),rt.isFunction(t)?(i=K.call(arguments,2),s=function(){return t.apply(e||this,i.concat(K.call(arguments)))},s.guid=t.guid=t.guid||rt.guid++,s):undefined},now:Date.now,support:it}),"function"==typeof Symbol&&(rt.fn[Symbol.iterator]=V[Symbol.iterator]),rt.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){tt["[object "+e+"]"]=e.toLowerCase()});var ut=function(t){function e(t,e,n,i){var s,r,o,a,l,c,p,d,f=e&&e.ownerDocument,g=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==g&&9!==g&&11!==g)return n;if(!i&&((e?e.ownerDocument||e:U)!==E&&P(e),e=e||E,N)){if(11!==g&&(c=vt.exec(t)))if(s=c[1]){if(9===g){if(!(o=e.getElementById(s)))return n;if(o.id===s)return n.push(o),n}else if(f&&(o=f.getElementById(s))&&z(e,o)&&o.id===s)return n.push(o),n}else{if(c[2])return Z.apply(n,e.getElementsByTagName(t)),n;if((s=c[3])&&w.getElementsByClassName&&e.getElementsByClassName)return Z.apply(n,e.getElementsByClassName(s)),n}if(w.qsa&&!W[t+" "]&&(!R||!R.test(t))){if(1!==g)f=e,d=t;else if("object"!==e.nodeName.toLowerCase()){for((a=e.getAttribute("id"))?a=a.replace(bt,"\\$&"):e.setAttribute("id",a=L),p=C(t),r=p.length,l=ht.test(a)?"#"+a:"[id='"+a+"']";r--;)p[r]=l+" "+h(p[r]);d=p.join(","),f=yt.test(t)&&u(e.parentNode)||e}if(d)try{return Z.apply(n,f.querySelectorAll(d)),n}catch(t){}finally{a===L&&e.removeAttribute("id")}}}return x(t.replace(at,"$1"),e,n,i)}function n(){function t(n,i){return e.push(n+" ")>k.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[L]=!0,t}function s(t){var e=E.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function r(t,e){for(var n=t.split("|"),i=n.length;i--;)k.attrHandle[n[i]]=e}function o(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||G)-(~t.sourceIndex||G);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function a(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function l(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function c(t){return i(function(e){return e=+e,i(function(n,i){for(var s,r=t([],n.length,e),o=r.length;o--;)n[s=r[o]]&&(n[s]=!(i[s]=n[s]))})})}function u(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function p(){}function h(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function d(t,e,n){var i=e.dir,s=n&&"parentNode"===i,r=F++;return e.first?function(e,n,r){for(;e=e[i];)if(1===e.nodeType||s)return t(e,n,r)}:function(e,n,o){var a,l,c,u=[q,r];if(o){for(;e=e[i];)if((1===e.nodeType||s)&&t(e,n,o))return!0}else for(;e=e[i];)if(1===e.nodeType||s){if(c=e[L]||(e[L]={}),l=c[e.uniqueID]||(c[e.uniqueID]={}),(a=l[i])&&a[0]===q&&a[1]===r)return u[2]=a[2];if(l[i]=u,u[2]=t(e,n,o))return!0}}}function f(t){return t.length>1?function(e,n,i){for(var s=t.length;s--;)if(!t[s](e,n,i))return!1;return!0}:t[0]}function g(t,n,i){for(var s=0,r=n.length;s<r;s++)e(t,n[s],i);return i}function m(t,e,n,i,s){for(var r,o=[],a=0,l=t.length,c=null!=e;a<l;a++)(r=t[a])&&(n&&!n(r,i,s)||(o.push(r),c&&e.push(a)));return o}function v(t,e,n,s,r,o){return s&&!s[L]&&(s=v(s)),r&&!r[L]&&(r=v(r,o)),i(function(i,o,a,l){var c,u,p,h=[],d=[],f=o.length,v=i||g(e||"*",a.nodeType?[a]:a,[]),y=!t||!i&&e?v:m(v,h,t,a,l),b=n?r||(i?t:f||s)?[]:o:y;if(n&&n(y,b,a,l),s)for(c=m(b,d),s(c,[],a,l),u=c.length;u--;)(p=c[u])&&(b[d[u]]=!(y[d[u]]=p));if(i){if(r||t){if(r){for(c=[],u=b.length;u--;)(p=b[u])&&c.push(y[u]=p);r(null,b=[],c,l)}for(u=b.length;u--;)(p=b[u])&&(c=r?tt(i,p):h[u])>-1&&(i[c]=!(o[c]=p))}}else b=m(b===o?b.splice(f,b.length):b),r?r(null,o,b,l):Z.apply(o,b)})}function y(t){for(var e,n,i,s=t.length,r=k.relative[t[0].type],o=r||k.relative[" "],a=r?1:0,l=d(function(t){return t===e},o,!0),c=d(function(t){return tt(e,t)>-1},o,!0),u=[function(t,n,i){var s=!r&&(i||n!==j)||((e=n).nodeType?l(t,n,i):c(t,n,i));return e=null,s}];a<s;a++)if(n=k.relative[t[a].type])u=[d(f(u),n)];else{if(n=k.filter[t[a].type].apply(null,t[a].matches),n[L]){for(i=++a;i<s&&!k.relative[t[i].type];i++);return v(a>1&&f(u),a>1&&h(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(at,"$1"),n,a<i&&y(t.slice(a,i)),i<s&&y(t=t.slice(i)),i<s&&h(t))}u.push(n)}return f(u)}function b(t,n){var s=n.length>0,r=t.length>0,o=function(i,o,a,l,c){var u,p,h,d=0,f="0",g=i&&[],v=[],y=j,b=i||r&&k.find.TAG("*",c),_=q+=null==y?1:Math.random()||.1,w=b.length;for(c&&(j=o===E||o||c);f!==w&&null!=(u=b[f]);f++){if(r&&u){for(p=0,o||u.ownerDocument===E||(P(u),a=!N);h=t[p++];)if(h(u,o||E,a)){l.push(u);break}c&&(q=_)}s&&((u=!h&&u)&&d--,i&&g.push(u))}if(d+=f,s&&f!==d){for(p=0;h=n[p++];)h(g,v,o,a);if(i){if(d>0)for(;f--;)g[f]||v[f]||(v[f]=K.call(l));v=m(v)}Z.apply(l,v),c&&!i&&v.length>0&&d+n.length>1&&e.uniqueSort(l)}return c&&(q=_,j=y),g};return s?i(o):o}var _,w,k,T,S,C,A,x,j,I,D,P,E,O,N,R,M,$,z,L="sizzle"+1*new Date,U=t.document,q=0,F=0,B=n(),J=n(),W=n(),H=function(t,e){return t===e&&(D=!0),0},G=1<<31,V={}.hasOwnProperty,Y=[],K=Y.pop,X=Y.push,Z=Y.push,Q=Y.slice,tt=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},et="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",nt="[\\x20\\t\\r\\n\\f]",it="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",st="\\["+nt+"*("+it+")(?:"+nt+"*([*^$|!~]?=)"+nt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+it+"))|)"+nt+"*\\]",rt=":("+it+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+st+")*)|.*)\\)|)",ot=new RegExp(nt+"+","g"),at=new RegExp("^"+nt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nt+"+$","g"),lt=new RegExp("^"+nt+"*,"+nt+"*"),ct=new RegExp("^"+nt+"*([>+~]|"+nt+")"+nt+"*"),ut=new RegExp("="+nt+"*([^\\]'\"]*?)"+nt+"*\\]","g"),pt=new RegExp(rt),ht=new RegExp("^"+it+"$"),dt={ID:new RegExp("^#("+it+")"),CLASS:new RegExp("^\\.("+it+")"),TAG:new RegExp("^("+it+"|[*])"),ATTR:new RegExp("^"+st),PSEUDO:new RegExp("^"+rt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},ft=/^(?:input|select|textarea|button)$/i,gt=/^h\d$/i,mt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,bt=/'|\\/g,_t=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),wt=function(t,e,n){var i="0x"+e-65536;return i!==i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},kt=function(){P()};try{Z.apply(Y=Q.call(U.childNodes),U.childNodes),Y[U.childNodes.length].nodeType}catch(t){Z={apply:Y.length?function(t,e){X.apply(t,Q.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}w=e.support={},S=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},P=e.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:U;return i!==E&&9===i.nodeType&&i.documentElement?(E=i,O=E.documentElement,N=!S(E),(n=E.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",kt,!1):n.attachEvent&&n.attachEvent("onunload",kt)),w.attributes=s(function(t){return t.className="i",!t.getAttribute("className")}),w.getElementsByTagName=s(function(t){return t.appendChild(E.createComment("")),!t.getElementsByTagName("*").length}),w.getElementsByClassName=mt.test(E.getElementsByClassName),w.getById=s(function(t){return O.appendChild(t).id=L,!E.getElementsByName||!E.getElementsByName(L).length}),w.getById?(k.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&N){var n=e.getElementById(t);return n?[n]:[]}},k.filter.ID=function(t){var e=t.replace(_t,wt);return function(t){return t.getAttribute("id")===e}}):(delete k.find.ID,k.filter.ID=function(t){var e=t.replace(_t,wt);return function(t){var n="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}}),k.find.TAG=w.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):w.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],s=0,r=e.getElementsByTagName(t);if("*"===t){for(;n=r[s++];)1===n.nodeType&&i.push(n);return i}return r},k.find.CLASS=w.getElementsByClassName&&function(t,e){if("undefined"!=typeof e.getElementsByClassName&&N)return e.getElementsByClassName(t)},M=[],R=[],(w.qsa=mt.test(E.querySelectorAll))&&(s(function(t){O.appendChild(t).innerHTML="<a id='"+L+"'></a><select id='"+L+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&R.push("[*^$]="+nt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||R.push("\\["+nt+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+L+"-]").length||R.push("~="),t.querySelectorAll(":checked").length||R.push(":checked"),t.querySelectorAll("a#"+L+"+*").length||R.push(".#.+[+~]")}),s(function(t){var e=E.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&R.push("name"+nt+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||R.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),R.push(",.*:")})),(w.matchesSelector=mt.test($=O.matches||O.webkitMatchesSelector||O.mozMatchesSelector||O.oMatchesSelector||O.msMatchesSelector))&&s(function(t){w.disconnectedMatch=$.call(t,"div"),$.call(t,"[s!='']:x"),M.push("!=",rt)}),R=R.length&&new RegExp(R.join("|")),M=M.length&&new RegExp(M.join("|")),e=mt.test(O.compareDocumentPosition),z=e||mt.test(O.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},H=e?function(t,e){if(t===e)return D=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!w.sortDetached&&e.compareDocumentPosition(t)===n?t===E||t.ownerDocument===U&&z(U,t)?-1:e===E||e.ownerDocument===U&&z(U,e)?1:I?tt(I,t)-tt(I,e):0:4&n?-1:1)}:function(t,e){if(t===e)return D=!0,0;var n,i=0,s=t.parentNode,r=e.parentNode,a=[t],l=[e];if(!s||!r)return t===E?-1:e===E?1:s?-1:r?1:I?tt(I,t)-tt(I,e):0;if(s===r)return o(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)l.unshift(n);for(;a[i]===l[i];)i++;return i?o(a[i],l[i]):a[i]===U?-1:l[i]===U?1:0},E):E},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==E&&P(t),n=n.replace(ut,"='$1']"),w.matchesSelector&&N&&!W[n+" "]&&(!M||!M.test(n))&&(!R||!R.test(n)))try{var i=$.call(t,n);if(i||w.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return e(n,E,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==E&&P(t),z(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==E&&P(t);var n=k.attrHandle[e.toLowerCase()],i=n&&V.call(k.attrHandle,e.toLowerCase())?n(t,e,!N):undefined;return i!==undefined?i:w.attributes||!N?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,s=0;if(D=!w.detectDuplicates,I=!w.sortStable&&t.slice(0),t.sort(H),D){for(;e=t[s++];)e===t[s]&&(i=n.push(s));for(;i--;)t.splice(n[i],1)}return I=null,t},T=e.getText=function(t){var e,n="",i=0,s=t.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=T(t)}else if(3===s||4===s)return t.nodeValue}else for(;e=t[i++];)n+=T(e);return n},k=e.selectors={cacheLength:50,createPseudo:i,match:dt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(_t,wt),t[3]=(t[3]||t[4]||t[5]||"").replace(_t,wt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return dt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&pt.test(n)&&(e=C(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(_t,wt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=B[t+" "];return e||(e=new RegExp("(^|"+nt+")"+t+"("+nt+"|$)"))&&B(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(s){var r=e.attr(s,t);return null==r?"!="===n:!n||(r+="","="===n?r===i:"!="===n?r!==i:"^="===n?i&&0===r.indexOf(i):"*="===n?i&&r.indexOf(i)>-1:"$="===n?i&&r.slice(-i.length)===i:"~="===n?(" "+r.replace(ot," ")+" ").indexOf(i)>-1:"|="===n&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,n,i,s){var r="nth"!==t.slice(0,3),o="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===s?function(t){return!!t.parentNode}:function(e,n,l){var c,u,p,h,d,f,g=r!==o?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(r){for(;g;){for(h=e;h=h[g];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[o?m.firstChild:m.lastChild],o&&y){for(h=m,p=h[L]||(h[L]={}),u=p[h.uniqueID]||(p[h.uniqueID]={}),c=u[t]||[],d=c[0]===q&&c[1],b=d&&c[2],h=d&&m.childNodes[d];h=++d&&h&&h[g]||(b=d=0)||f.pop();)if(1===h.nodeType&&++b&&h===e){u[t]=[q,d,b];break}}else if(y&&(h=e,p=h[L]||(h[L]={}),u=p[h.uniqueID]||(p[h.uniqueID]={}),c=u[t]||[],d=c[0]===q&&c[1],b=d),!1===b)for(;(h=++d&&h&&h[g]||(b=d=0)||f.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++b||(y&&(p=h[L]||(h[L]={}),u=p[h.uniqueID]||(p[h.uniqueID]={}),u[t]=[q,b]),h!==e)););return(b-=s)===i||b%i==0&&b/i>=0}}},PSEUDO:function(t,n){
var s,r=k.pseudos[t]||k.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return r[L]?r(n):r.length>1?(s=[t,t,"",n],k.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,s=r(t,n),o=s.length;o--;)i=tt(t,s[o]),t[i]=!(e[i]=s[o])}):function(t){return r(t,0,s)}):r}},pseudos:{not:i(function(t){var e=[],n=[],s=A(t.replace(at,"$1"));return s[L]?i(function(t,e,n,i){for(var r,o=s(t,null,i,[]),a=t.length;a--;)(r=o[a])&&(t[a]=!(e[a]=r))}):function(t,i,r){return e[0]=t,s(e,null,r,n),e[0]=null,!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(t){return t=t.replace(_t,wt),function(e){return(e.textContent||e.innerText||T(e)).indexOf(t)>-1}}),lang:i(function(t){return ht.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(_t,wt).toLowerCase(),function(e){var n;do{if(n=N?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===O},focus:function(t){return t===E.activeElement&&(!E.hasFocus||E.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!k.pseudos.empty(t)},header:function(t){return gt.test(t.nodeName)},input:function(t){return ft.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:c(function(){return[0]}),last:c(function(t,e){return[e-1]}),eq:c(function(t,e,n){return[n<0?n+e:n]}),even:c(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:c(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:c(function(t,e,n){for(var i=n<0?n+e:n;--i>=0;)t.push(i);return t}),gt:c(function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t})}},k.pseudos.nth=k.pseudos.eq;for(_ in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})k.pseudos[_]=a(_);for(_ in{submit:!0,reset:!0})k.pseudos[_]=l(_);return p.prototype=k.filters=k.pseudos,k.setFilters=new p,C=e.tokenize=function(t,n){var i,s,r,o,a,l,c,u=J[t+" "];if(u)return n?0:u.slice(0);for(a=t,l=[],c=k.preFilter;a;){i&&!(s=lt.exec(a))||(s&&(a=a.slice(s[0].length)||a),l.push(r=[])),i=!1,(s=ct.exec(a))&&(i=s.shift(),r.push({value:i,type:s[0].replace(at," ")}),a=a.slice(i.length));for(o in k.filter)!(s=dt[o].exec(a))||c[o]&&!(s=c[o](s))||(i=s.shift(),r.push({value:i,type:o,matches:s}),a=a.slice(i.length));if(!i)break}return n?a.length:a?e.error(t):J(t,l).slice(0)},A=e.compile=function(t,e){var n,i=[],s=[],r=W[t+" "];if(!r){for(e||(e=C(t)),n=e.length;n--;)r=y(e[n]),r[L]?i.push(r):s.push(r);r=W(t,b(s,i)),r.selector=t}return r},x=e.select=function(t,e,n,i){var s,r,o,a,l,c="function"==typeof t&&t,p=!i&&C(t=c.selector||t);if(n=n||[],1===p.length){if(r=p[0]=p[0].slice(0),r.length>2&&"ID"===(o=r[0]).type&&w.getById&&9===e.nodeType&&N&&k.relative[r[1].type]){if(!(e=(k.find.ID(o.matches[0].replace(_t,wt),e)||[])[0]))return n;c&&(e=e.parentNode),t=t.slice(r.shift().value.length)}for(s=dt.needsContext.test(t)?0:r.length;s--&&(o=r[s],!k.relative[a=o.type]);)if((l=k.find[a])&&(i=l(o.matches[0].replace(_t,wt),yt.test(r[0].type)&&u(e.parentNode)||e))){if(r.splice(s,1),!(t=i.length&&h(r)))return Z.apply(n,i),n;break}}return(c||A(t,p))(i,e,!N,n,!e||yt.test(t)&&u(e.parentNode)||e),n},w.sortStable=L.split("").sort(H).join("")===L,w.detectDuplicates=!!D,P(),w.sortDetached=s(function(t){return 1&t.compareDocumentPosition(E.createElement("div"))}),s(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||r("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),w.attributes&&s(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||r("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),s(function(t){return null==t.getAttribute("disabled")})||r(et,function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(t);rt.find=ut,rt.expr=ut.selectors,rt.expr[":"]=rt.expr.pseudos,rt.uniqueSort=rt.unique=ut.uniqueSort,rt.text=ut.getText,rt.isXMLDoc=ut.isXML,rt.contains=ut.contains;var pt=function(t,e,n){for(var i=[],s=n!==undefined;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(s&&rt(t).is(n))break;i.push(t)}return i},ht=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},dt=rt.expr.match.needsContext,ft=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,gt=/^.[^:#\[\.,]*$/;rt.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?rt.find.matchesSelector(i,t)?[i]:[]:rt.find.matches(t,rt.grep(e,function(t){return 1===t.nodeType}))},rt.fn.extend({find:function(t){var e,n=this.length,i=[],s=this;if("string"!=typeof t)return this.pushStack(rt(t).filter(function(){for(e=0;e<n;e++)if(rt.contains(s[e],this))return!0}));for(e=0;e<n;e++)rt.find(t,s[e],i);return i=this.pushStack(n>1?rt.unique(i):i),i.selector=this.selector?this.selector+" "+t:t,i},filter:function(t){return this.pushStack(i(this,t||[],!1))},not:function(t){return this.pushStack(i(this,t||[],!0))},is:function(t){return!!i(this,"string"==typeof t&&dt.test(t)?rt(t):t||[],!1).length}});var mt,vt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(rt.fn.init=function(t,e,n){var i,s;if(!t)return this;if(n=n||mt,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:vt.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof rt?e[0]:e,rt.merge(this,rt.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:Y,!0)),ft.test(i[1])&&rt.isPlainObject(e))for(i in e)rt.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return s=Y.getElementById(i[2]),s&&s.parentNode&&(this.length=1,this[0]=s),this.context=Y,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):rt.isFunction(t)?n.ready!==undefined?n.ready(t):t(rt):(t.selector!==undefined&&(this.selector=t.selector,this.context=t.context),rt.makeArray(t,this))}).prototype=rt.fn,mt=rt(Y);var yt=/^(?:parents|prev(?:Until|All))/,bt={children:!0,contents:!0,next:!0,prev:!0};rt.fn.extend({has:function(t){var e=rt(t,this),n=e.length;return this.filter(function(){for(var t=0;t<n;t++)if(rt.contains(this,e[t]))return!0})},closest:function(t,e){for(var n,i=0,s=this.length,r=[],o=dt.test(t)||"string"!=typeof t?rt(t,e||this.context):0;i<s;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:1===n.nodeType&&rt.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(r.length>1?rt.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?Q.call(rt(t),this[0]):Q.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(rt.uniqueSort(rt.merge(this.get(),rt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),rt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return pt(t,"parentNode")},parentsUntil:function(t,e,n){return pt(t,"parentNode",n)},next:function(t){return s(t,"nextSibling")},prev:function(t){return s(t,"previousSibling")},nextAll:function(t){return pt(t,"nextSibling")},prevAll:function(t){return pt(t,"previousSibling")},nextUntil:function(t,e,n){return pt(t,"nextSibling",n)},prevUntil:function(t,e,n){return pt(t,"previousSibling",n)},siblings:function(t){return ht((t.parentNode||{}).firstChild,t)},children:function(t){return ht(t.firstChild)},contents:function(t){return t.contentDocument||rt.merge([],t.childNodes)}},function(t,e){rt.fn[t]=function(n,i){var s=rt.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(s=rt.filter(i,s)),this.length>1&&(bt[t]||rt.uniqueSort(s),yt.test(t)&&s.reverse()),this.pushStack(s)}});var _t=/\S+/g;rt.Callbacks=function(t){t="string"==typeof t?r(t):rt.extend({},t);var e,n,i,s,o=[],a=[],l=-1,c=function(){for(s=t.once,i=e=!0;a.length;l=-1)for(n=a.shift();++l<o.length;)!1===o[l].apply(n[0],n[1])&&t.stopOnFalse&&(l=o.length,n=!1);t.memory||(n=!1),e=!1,s&&(o=n?[]:"")},u={add:function(){return o&&(n&&!e&&(l=o.length-1,a.push(n)),function e(n){rt.each(n,function(n,i){rt.isFunction(i)?t.unique&&u.has(i)||o.push(i):i&&i.length&&"string"!==rt.type(i)&&e(i)})}(arguments),n&&!e&&c()),this},remove:function(){return rt.each(arguments,function(t,e){for(var n;(n=rt.inArray(e,o,n))>-1;)o.splice(n,1),n<=l&&l--}),this},has:function(t){return t?rt.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return s=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return s=a=[],n||(o=n=""),this},locked:function(){return!!s},fireWith:function(t,n){return s||(n=n||[],n=[t,n.slice?n.slice():n],a.push(n),e||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},rt.extend({Deferred:function(t){var e=[["resolve","done",rt.Callbacks("once memory"),"resolved"],["reject","fail",rt.Callbacks("once memory"),"rejected"],["notify","progress",rt.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var t=arguments;return rt.Deferred(function(n){rt.each(e,function(e,r){var o=rt.isFunction(t[e])&&t[e];s[r[1]](function(){var t=o&&o.apply(this,arguments);t&&rt.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this===i?n.promise():this,o?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?rt.extend(t,i):i}},s={};return i.pipe=i.then,rt.each(e,function(t,r){var o=r[2],a=r[3];i[r[1]]=o.add,a&&o.add(function(){n=a},e[1^t][2].disable,e[2][2].lock),s[r[0]]=function(){return s[r[0]+"With"](this===s?i:this,arguments),this},s[r[0]+"With"]=o.fireWith}),i.promise(s),t&&t.call(s,s),s},when:function(t){var e,n,i,s=0,r=K.call(arguments),o=r.length,a=1!==o||t&&rt.isFunction(t.promise)?o:0,l=1===a?t:rt.Deferred(),c=function(t,n,i){return function(s){n[t]=this,i[t]=arguments.length>1?K.call(arguments):s,i===e?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(o>1)for(e=new Array(o),n=new Array(o),i=new Array(o);s<o;s++)r[s]&&rt.isFunction(r[s].promise)?r[s].promise().progress(c(s,n,e)).done(c(s,i,r)).fail(l.reject):--a;return a||l.resolveWith(i,r),l.promise()}});var wt;rt.fn.ready=function(t){return rt.ready.promise().done(t),this},rt.extend({isReady:!1,readyWait:1,holdReady:function(t){t?rt.readyWait++:rt.ready(!0)},ready:function(t){(!0===t?--rt.readyWait:rt.isReady)||(rt.isReady=!0,!0!==t&&--rt.readyWait>0||(wt.resolveWith(Y,[rt]),rt.fn.triggerHandler&&(rt(Y).triggerHandler("ready"),rt(Y).off("ready"))))}}),rt.ready.promise=function(e){return wt||(wt=rt.Deferred(),"complete"===Y.readyState||"loading"!==Y.readyState&&!Y.documentElement.doScroll?t.setTimeout(rt.ready):(Y.addEventListener("DOMContentLoaded",o),t.addEventListener("load",o))),wt.promise(e)},rt.ready.promise();var kt=function(t,e,n,i,s,r,o){var a=0,l=t.length,c=null==n;if("object"===rt.type(n)){s=!0;for(a in n)kt(t,e,a,n[a],!0,r,o)}else if(i!==undefined&&(s=!0,rt.isFunction(i)||(o=!0),c&&(o?(e.call(t,i),e=null):(c=e,e=function(t,e,n){return c.call(rt(t),n)})),e))for(;a<l;a++)e(t[a],n,o?i:i.call(t[a],a,e(t[a],n)));return s?t:c?e.call(t):l?e(t[0],n):r},Tt=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};a.uid=1,a.prototype={register:function(t,e){var n=e||{};return t.nodeType?t[this.expando]=n:Object.defineProperty(t,this.expando,{value:n,writable:!0,configurable:!0}),t[this.expando]},cache:function(t){if(!Tt(t))return{};var e=t[this.expando];return e||(e={},Tt(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,s=this.cache(t);if("string"==typeof e)s[e]=n;else for(i in e)s[i]=e[i];return s},get:function(t,e){return e===undefined?this.cache(t):t[this.expando]&&t[this.expando][e]},access:function(t,e,n){var i;return e===undefined||e&&"string"==typeof e&&n===undefined?(i=this.get(t,e),i!==undefined?i:this.get(t,rt.camelCase(e))):(this.set(t,e,n),n!==undefined?n:e)},remove:function(t,e){var n,i,s,r=t[this.expando];if(r!==undefined){if(e===undefined)this.register(t);else{rt.isArray(e)?i=e.concat(e.map(rt.camelCase)):(s=rt.camelCase(e),e in r?i=[e,s]:(i=s,i=i in r?[i]:i.match(_t)||[])),n=i.length;for(;n--;)delete r[i[n]]}(e===undefined||rt.isEmptyObject(r))&&(t.nodeType?t[this.expando]=undefined:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return e!==undefined&&!rt.isEmptyObject(e)}};var St=new a,Ct=new a,At=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,xt=/[A-Z]/g;rt.extend({hasData:function(t){return Ct.hasData(t)||St.hasData(t)},data:function(t,e,n){return Ct.access(t,e,n)},removeData:function(t,e){Ct.remove(t,e)},_data:function(t,e,n){return St.access(t,e,n)},_removeData:function(t,e){St.remove(t,e)}}),rt.fn.extend({data:function(t,e){var n,i,s,r=this[0],o=r&&r.attributes;if(t===undefined){if(this.length&&(s=Ct.get(r),1===r.nodeType&&!St.get(r,"hasDataAttrs"))){for(n=o.length;n--;)o[n]&&(i=o[n].name,0===i.indexOf("data-")&&(i=rt.camelCase(i.slice(5)),l(r,i,s[i])));St.set(r,"hasDataAttrs",!0)}return s}return"object"==typeof t?this.each(function(){Ct.set(this,t)}):kt(this,function(e){var n,i;if(r&&e===undefined){if((n=Ct.get(r,t)||Ct.get(r,t.replace(xt,"-$&").toLowerCase()))!==undefined)return n;if(i=rt.camelCase(t),(n=Ct.get(r,i))!==undefined)return n;if((n=l(r,i,undefined))!==undefined)return n}else i=rt.camelCase(t),this.each(function(){var n=Ct.get(this,i);Ct.set(this,i,e),t.indexOf("-")>-1&&n!==undefined&&Ct.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){Ct.remove(this,t)})}}),rt.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=St.get(t,e),n&&(!i||rt.isArray(n)?i=St.access(t,e,rt.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=rt.queue(t,e),i=n.length,s=n.shift(),r=rt._queueHooks(t,e),o=function(){rt.dequeue(t,e)};"inprogress"===s&&(s=n.shift(),i--),s&&("fx"===e&&n.unshift("inprogress"),delete r.stop,s.call(t,o,r)),!i&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return St.get(t,n)||St.access(t,n,{empty:rt.Callbacks("once memory").add(function(){St.remove(t,[e+"queue",n])})})}}),rt.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?rt.queue(this[0],t):e===undefined?this:this.each(function(){var n=rt.queue(this,t,e);rt._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&rt.dequeue(this,t)})},dequeue:function(t){return this.each(function(){rt.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,s=rt.Deferred(),r=this,o=this.length,a=function(){--i||s.resolveWith(r,[r])};for("string"!=typeof t&&(e=t,t=undefined),t=t||"fx";o--;)(n=St.get(r[o],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),s.promise(e)}});var jt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,It=new RegExp("^(?:([+-])=|)("+jt+")([a-z%]*)$","i"),Dt=["Top","Right","Bottom","Left"],Pt=function(t,e){return t=e||t,"none"===rt.css(t,"display")||!rt.contains(t.ownerDocument,t)},Et=/^(?:checkbox|radio)$/i,Ot=/<([\w:-]+)/,Nt=/^$|\/(?:java|ecma)script/i,Rt={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Rt.optgroup=Rt.option,Rt.tbody=Rt.tfoot=Rt.colgroup=Rt.caption=Rt.thead,Rt.th=Rt.td;var Mt=/<|&#?\w+;/;!function(){var t=Y.createDocumentFragment(),e=t.appendChild(Y.createElement("div")),n=Y.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),it.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",it.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var $t=/^key/,zt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Lt=/^([^.]*)(?:\.(.+)|)/;rt.event={global:{},add:function(t,e,n,i,s){var r,o,a,l,c,u,p,h,d,f,g,m=St.get(t);if(m)for(n.handler&&(r=n,n=r.handler,s=r.selector),n.guid||(n.guid=rt.guid++),(l=m.events)||(l=m.events={}),(o=m.handle)||(o=m.handle=function(e){return void 0!==rt&&rt.event.triggered!==e.type?rt.event.dispatch.apply(t,arguments):undefined}),e=(e||"").match(_t)||[""],c=e.length;c--;)a=Lt.exec(e[c])||[],d=g=a[1],f=(a[2]||"").split(".").sort(),d&&(p=rt.event.special[d]||{},d=(s?p.delegateType:p.bindType)||d,p=rt.event.special[d]||{},u=rt.extend({type:d,origType:g,data:i,handler:n,guid:n.guid,selector:s,needsContext:s&&rt.expr.match.needsContext.test(s),namespace:f.join(".")},r),(h=l[d])||(h=l[d]=[],h.delegateCount=0,p.setup&&!1!==p.setup.call(t,i,f,o)||t.addEventListener&&t.addEventListener(d,o)),p.add&&(p.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),s?h.splice(h.delegateCount++,0,u):h.push(u),rt.event.global[d]=!0)},remove:function(t,e,n,i,s){var r,o,a,l,c,u,p,h,d,f,g,m=St.hasData(t)&&St.get(t);if(m&&(l=m.events)){for(e=(e||"").match(_t)||[""],c=e.length;c--;)if(a=Lt.exec(e[c])||[],d=g=a[1],f=(a[2]||"").split(".").sort(),d){for(p=rt.event.special[d]||{},d=(i?p.delegateType:p.bindType)||d,h=l[d]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=r=h.length;r--;)u=h[r],!s&&g!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(r,1),u.selector&&h.delegateCount--,p.remove&&p.remove.call(t,u));o&&!h.length&&(p.teardown&&!1!==p.teardown.call(t,f,m.handle)||rt.removeEvent(t,d,m.handle),delete l[d])}else for(d in l)rt.event.remove(t,d+e[c],n,i,!0);rt.isEmptyObject(l)&&St.remove(t,"handle events")}},dispatch:function(t){t=rt.event.fix(t);var e,n,i,s,r,o=[],a=K.call(arguments),l=(St.get(this,"events")||{})[t.type]||[],c=rt.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,t)){for(o=rt.event.handlers.call(this,t,l),e=0;(s=o[e++])&&!t.isPropagationStopped();)for(t.currentTarget=s.elem,n=0;(r=s.handlers[n++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(r.namespace)||(t.handleObj=r,t.data=r.data,(i=((rt.event.special[r.origType]||{}).handle||r.handler).apply(s.elem,a))!==undefined&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,i,s,r,o=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==t.type)){for(i=[],n=0;n<a;n++)r=e[n],s=r.selector+" ",i[s]===undefined&&(i[s]=r.needsContext?rt(s,this).index(l)>-1:rt.find(s,this,null,[l]).length),i[s]&&i.push(r);i.length&&o.push({elem:l,handlers:i})}return a<e.length&&o.push({elem:this,handlers:e.slice(a)}),o},props:"altKey bubbles cancelable ctrlKey currentTarget detail 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 offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var n,i,s,r=e.button;return null==t.pageX&&null!=e.clientX&&(n=t.target.ownerDocument||Y,i=n.documentElement,s=n.body,t.pageX=e.clientX+(i&&i.scrollLeft||s&&s.scrollLeft||0)-(i&&i.clientLeft||s&&s.clientLeft||0),t.pageY=e.clientY+(i&&i.scrollTop||s&&s.scrollTop||0)-(i&&i.clientTop||s&&s.clientTop||0)),t.which||r===undefined||(t.which=1&r?1:2&r?3:4&r?2:0),t}},fix:function(t){if(t[rt.expando])return t;var e,n,i,s=t.type,r=t,o=this.fixHooks[s];for(o||(this.fixHooks[s]=o=zt.test(s)?this.mouseHooks:$t.test(s)?this.keyHooks:{}),i=o.props?this.props.concat(o.props):this.props,t=new rt.Event(r),e=i.length;e--;)n=i[e],t[n]=r[n];return t.target||(t.target=Y),3===t.target.nodeType&&(t.target=t.target.parentNode),o.filter?o.filter(t,r):t},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==g()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===g()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&rt.nodeName(this,"input"))return this.click(),!1},_default:function(t){return rt.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){t.result!==undefined&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},rt.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},rt.Event=function(t,e){if(!(this instanceof rt.Event))return new rt.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||t.defaultPrevented===undefined&&!1===t.returnValue?d:f):this.type=t,e&&rt.extend(this,e),this.timeStamp=t&&t.timeStamp||rt.now(),this[rt.expando]=!0},rt.Event.prototype={constructor:rt.Event,isDefaultPrevented:f,isPropagationStopped:f,isImmediatePropagationStopped:f,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=d,t&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=d,t&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=d,t&&t.stopImmediatePropagation(),this.stopPropagation()}},rt.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){rt.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,s=t.relatedTarget,r=t.handleObj;return s&&(s===i||rt.contains(i,s))||(t.type=r.origType,n=r.handler.apply(this,arguments),t.type=e),n}}}),rt.fn.extend({on:function(t,e,n,i){return m(this,t,e,n,i)},one:function(t,e,n,i){return m(this,t,e,n,i,1)},off:function(t,e,n){var i,s;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,rt(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(s in t)this.off(s,e,t[s]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=undefined),!1===n&&(n=f),this.each(function(){rt.event.remove(this,t,n,e)})}});var Ut=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,qt=/<script|<style|<link/i,Ft=/checked\s*(?:[^=]|=\s*.checked.)/i,Bt=/^true\/(.*)/,Jt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;rt.extend({htmlPrefilter:function(t){return t.replace(Ut,"<$1></$2>")},clone:function(t,e,n){var i,s,r,o,a=t.cloneNode(!0),l=rt.contains(t.ownerDocument,t);if(!(it.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||rt.isXMLDoc(t)))for(o=u(a),r=u(t),i=0,s=r.length;i<s;i++)w(r[i],o[i]);if(e)if(n)for(r=r||u(t),o=o||u(a),i=0,s=r.length;i<s;i++)_(r[i],o[i]);else _(t,a);return o=u(a,"script"),o.length>0&&p(o,!l&&u(t,"script")),a},cleanData:function(t){for(var e,n,i,s=rt.event.special,r=0;(n=t[r])!==undefined;r++)if(Tt(n)){if(e=n[St.expando]){if(e.events)for(i in e.events)s[i]?rt.event.remove(n,i):rt.removeEvent(n,i,e.handle);n[St.expando]=undefined}n[Ct.expando]&&(n[Ct.expando]=undefined)}}}),rt.fn.extend({domManip:k,detach:function(t){return T(this,t,!0)},remove:function(t){return T(this,t)},text:function(t){return kt(this,function(t){return t===undefined?rt.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return k(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){v(this,t).appendChild(t)}})},prepend:function(){return k(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=v(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return k(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return k(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(rt.cleanData(u(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return rt.clone(this,t,e)})},html:function(t){return kt(this,function(t){var e=this[0]||{},n=0,i=this.length;if(t===undefined&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!qt.test(t)&&!Rt[(Ot.exec(t)||["",""])[1].toLowerCase()]){t=rt.htmlPrefilter(t);try{for(;n<i;n++)e=this[n]||{},1===e.nodeType&&(rt.cleanData(u(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return k(this,arguments,function(e){var n=this.parentNode;rt.inArray(this,t)<0&&(rt.cleanData(u(this)),n&&n.replaceChild(e,this))},t)}}),rt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){rt.fn[t]=function(t){for(var n,i=[],s=rt(t),r=s.length-1,o=0;o<=r;o++)n=o===r?this:this.clone(!0),rt(s[o])[e](n),Z.apply(i,n.get());return this.pushStack(i)}});var Wt,Ht={HTML:"block",BODY:"block"},Gt=/^margin/,Vt=new RegExp("^("+jt+")(?!px)[a-z%]+$","i"),Yt=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)},Kt=function(t,e,n,i){var s,r,o={};for(r in e)o[r]=t.style[r],t.style[r]=e[r];s=n.apply(t,i||[]);for(r in e)t.style[r]=o[r];return s},Xt=Y.documentElement;!function(){function e(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",Xt.appendChild(o);var e=t.getComputedStyle(a);n="1%"!==e.top,r="2px"===e.marginLeft,i="4px"===e.width,a.style.marginRight="50%",s="4px"===e.marginRight,Xt.removeChild(o)}var n,i,s,r,o=Y.createElement("div"),a=Y.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",it.clearCloneStyle="content-box"===a.style.backgroundClip,o.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",o.appendChild(a),rt.extend(it,{pixelPosition:function(){return e(),n},boxSizingReliable:function(){return null==i&&e(),i},pixelMarginRight:function(){return null==i&&e(),s},reliableMarginLeft:function(){return null==i&&e(),r},reliableMarginRight:function(){var e,n=a.appendChild(Y.createElement("div"));return n.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",a.style.width="1px",Xt.appendChild(o),e=!parseFloat(t.getComputedStyle(n).marginRight),Xt.removeChild(o),a.removeChild(n),e}}))}();var Zt=/^(none|table(?!-c[ea]).+)/,Qt={position:"absolute",visibility:"hidden",display:"block"},te={letterSpacing:"0",fontWeight:"400"},ee=["Webkit","O","Moz","ms"],ne=Y.createElement("div").style;rt.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=A(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var s,r,o,a=rt.camelCase(e),l=t.style;if(e=rt.cssProps[a]||(rt.cssProps[a]=j(a)||a),o=rt.cssHooks[e]||rt.cssHooks[a],n===undefined)return o&&"get"in o&&(s=o.get(t,!1,i))!==undefined?s:l[e];r=typeof n,"string"===r&&(s=It.exec(n))&&s[1]&&(n=c(t,e,s),r="number"),null!=n&&n===n&&("number"===r&&(n+=s&&s[3]||(rt.cssNumber[a]?"":"px")),it.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),o&&"set"in o&&(n=o.set(t,n,i))===undefined||(l[e]=n))}},css:function(t,e,n,i){var s,r,o,a=rt.camelCase(e);return e=rt.cssProps[a]||(rt.cssProps[a]=j(a)||a),o=rt.cssHooks[e]||rt.cssHooks[a],o&&"get"in o&&(s=o.get(t,!0,n)),s===undefined&&(s=A(t,e,i)),"normal"===s&&e in te&&(s=te[e]),""===n||n?(r=parseFloat(s),!0===n||isFinite(r)?r||0:s):s}}),rt.each(["height","width"],function(t,e){rt.cssHooks[e]={get:function(t,n,i){if(n)return Zt.test(rt.css(t,"display"))&&0===t.offsetWidth?Kt(t,Qt,function(){return P(t,e,i)}):P(t,e,i)},set:function(t,n,i){var s,r=i&&Yt(t),o=i&&D(t,e,i,"border-box"===rt.css(t,"boxSizing",!1,r),r);return o&&(s=It.exec(n))&&"px"!==(s[3]||"px")&&(t.style[e]=n,n=rt.css(t,e)),I(t,n,o)}}}),rt.cssHooks.marginLeft=x(it.reliableMarginLeft,function(t,e){if(e)return(parseFloat(A(t,"marginLeft"))||t.getBoundingClientRect().left-Kt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),rt.cssHooks.marginRight=x(it.reliableMarginRight,function(t,e){if(e)return Kt(t,{display:"inline-block"},A,[t,"marginRight"])}),rt.each({margin:"",padding:"",border:"Width"},function(t,e){rt.cssHooks[t+e]={expand:function(n){for(var i=0,s={},r="string"==typeof n?n.split(" "):[n];i<4;i++)s[t+Dt[i]+e]=r[i]||r[i-2]||r[0];return s}},Gt.test(t)||(rt.cssHooks[t+e].set=I)}),rt.fn.extend({css:function(t,e){return kt(this,function(t,e,n){var i,s,r={},o=0;if(rt.isArray(e)){for(i=Yt(t),s=e.length;o<s;o++)r[e[o]]=rt.css(t,e[o],!1,i);return r}return n!==undefined?rt.style(t,e,n):rt.css(t,e)},t,e,arguments.length>1)},show:function(){return E(this,!0)},hide:function(){return E(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Pt(this)?rt(this).show():rt(this).hide()})}}),rt.Tween=O,O.prototype={constructor:O,init:function(t,e,n,i,s,r){this.elem=t,this.prop=n,this.easing=s||rt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=r||(rt.cssNumber[n]?"":"px")},cur:function(){var t=O.propHooks[this.prop];return t&&t.get?t.get(this):O.propHooks._default.get(this)},run:function(t){var e,n=O.propHooks[this.prop];return this.options.duration?this.pos=e=rt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=rt.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){rt.fx.step[t.prop]?rt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[rt.cssProps[t.prop]]&&!rt.cssHooks[t.prop]?t.elem[t.prop]=t.now:rt.style(t.elem,t.prop,t.now+t.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},rt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},rt.fx=O.prototype.init,rt.fx.step={};var ie,se,re=/^(?:toggle|show|hide)$/,oe=/queueHooks$/;rt.Animation=rt.extend(L,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return c(n.elem,t,It.exec(e),n),n}]},tweener:function(t,e){rt.isFunction(t)?(e=t,t=["*"]):t=t.match(_t);for(var n,i=0,s=t.length;i<s;i++)n=t[i],L.tweeners[n]=L.tweeners[n]||[],L.tweeners[n].unshift(e)},prefilters:[$],prefilter:function(t,e){e?L.prefilters.unshift(t):L.prefilters.push(t)}}),rt.speed=function(t,e,n){var i=t&&"object"==typeof t?rt.extend({},t):{complete:n||!n&&e||rt.isFunction(t)&&t,duration:t,easing:n&&e||e&&!rt.isFunction(e)&&e};return i.duration=rt.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in rt.fx.speeds?rt.fx.speeds[i.duration]:rt.fx.speeds._default,null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){rt.isFunction(i.old)&&i.old.call(this),i.queue&&rt.dequeue(this,i.queue)},i},rt.fn.extend({fadeTo:function(t,e,n,i){return this.filter(Pt).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var s=rt.isEmptyObject(t),r=rt.speed(e,n,i),o=function(){var e=L(this,rt.extend({},t),r);(s||St.get(this,"finish"))&&e.stop(!0)};return o.finish=o,
s||!1===r.queue?this.each(o):this.queue(r.queue,o)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=undefined),e&&!1!==t&&this.queue(t||"fx",[]),this.each(function(){var e=!0,s=null!=t&&t+"queueHooks",r=rt.timers,o=St.get(this);if(s)o[s]&&o[s].stop&&i(o[s]);else for(s in o)o[s]&&o[s].stop&&oe.test(s)&&i(o[s]);for(s=r.length;s--;)r[s].elem!==this||null!=t&&r[s].queue!==t||(r[s].anim.stop(n),e=!1,r.splice(s,1));!e&&n||rt.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,n=St.get(this),i=n[t+"queue"],s=n[t+"queueHooks"],r=rt.timers,o=i?i.length:0;for(n.finish=!0,rt.queue(this,t,[]),s&&s.stop&&s.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===t&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<o;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish})}}),rt.each(["toggle","show","hide"],function(t,e){var n=rt.fn[e];rt.fn[e]=function(t,i,s){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(R(e,!0),t,i,s)}}),rt.each({slideDown:R("show"),slideUp:R("hide"),slideToggle:R("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){rt.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}}),rt.timers=[],rt.fx.tick=function(){var t,e=0,n=rt.timers;for(ie=rt.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||rt.fx.stop(),ie=undefined},rt.fx.timer=function(t){rt.timers.push(t),t()?rt.fx.start():rt.timers.pop()},rt.fx.interval=13,rt.fx.start=function(){se||(se=t.setInterval(rt.fx.tick,rt.fx.interval))},rt.fx.stop=function(){t.clearInterval(se),se=null},rt.fx.speeds={slow:600,fast:200,_default:400},rt.fn.delay=function(e,n){return e=rt.fx?rt.fx.speeds[e]||e:e,n=n||"fx",this.queue(n,function(n,i){var s=t.setTimeout(n,e);i.stop=function(){t.clearTimeout(s)}})},function(){var t=Y.createElement("input"),e=Y.createElement("select"),n=e.appendChild(Y.createElement("option"));t.type="checkbox",it.checkOn=""!==t.value,it.optSelected=n.selected,e.disabled=!0,it.optDisabled=!n.disabled,t=Y.createElement("input"),t.value="t",t.type="radio",it.radioValue="t"===t.value}();var ae,le=rt.expr.attrHandle;rt.fn.extend({attr:function(t,e){return kt(this,rt.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){rt.removeAttr(this,t)})}}),rt.extend({attr:function(t,e,n){var i,s,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return"undefined"==typeof t.getAttribute?rt.prop(t,e,n):(1===r&&rt.isXMLDoc(t)||(e=e.toLowerCase(),s=rt.attrHooks[e]||(rt.expr.match.bool.test(e)?ae:undefined)),n!==undefined?null===n?void rt.removeAttr(t,e):s&&"set"in s&&(i=s.set(t,n,e))!==undefined?i:(t.setAttribute(e,n+""),n):s&&"get"in s&&null!==(i=s.get(t,e))?i:(i=rt.find.attr(t,e),null==i?undefined:i))},attrHooks:{type:{set:function(t,e){if(!it.radioValue&&"radio"===e&&rt.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i,s=0,r=e&&e.match(_t);if(r&&1===t.nodeType)for(;n=r[s++];)i=rt.propFix[n]||n,rt.expr.match.bool.test(n)&&(t[i]=!1),t.removeAttribute(n)}}),ae={set:function(t,e,n){return!1===e?rt.removeAttr(t,n):t.setAttribute(n,n),n}},rt.each(rt.expr.match.bool.source.match(/\w+/g),function(t,e){var n=le[e]||rt.find.attr;le[e]=function(t,e,i){var s,r;return i||(r=le[e],le[e]=s,s=null!=n(t,e,i)?e.toLowerCase():null,le[e]=r),s}});var ce=/^(?:input|select|textarea|button)$/i,ue=/^(?:a|area)$/i;rt.fn.extend({prop:function(t,e){return kt(this,rt.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[rt.propFix[t]||t]})}}),rt.extend({prop:function(t,e,n){var i,s,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&rt.isXMLDoc(t)||(e=rt.propFix[e]||e,s=rt.propHooks[e]),n!==undefined?s&&"set"in s&&(i=s.set(t,n,e))!==undefined?i:t[e]=n:s&&"get"in s&&null!==(i=s.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=rt.find.attr(t,"tabindex");return e?parseInt(e,10):ce.test(t.nodeName)||ue.test(t.nodeName)&&t.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),it.optSelected||(rt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null}}),rt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){rt.propFix[this.toLowerCase()]=this});var pe=/[\t\r\n\f]/g;rt.fn.extend({addClass:function(t){var e,n,i,s,r,o,a,l=0;if(rt.isFunction(t))return this.each(function(e){rt(this).addClass(t.call(this,e,U(this)))});if("string"==typeof t&&t)for(e=t.match(_t)||[];n=this[l++];)if(s=U(n),i=1===n.nodeType&&(" "+s+" ").replace(pe," ")){for(o=0;r=e[o++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");a=rt.trim(i),s!==a&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,i,s,r,o,a,l=0;if(rt.isFunction(t))return this.each(function(e){rt(this).removeClass(t.call(this,e,U(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(_t)||[];n=this[l++];)if(s=U(n),i=1===n.nodeType&&(" "+s+" ").replace(pe," ")){for(o=0;r=e[o++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");a=rt.trim(i),s!==a&&n.setAttribute("class",a)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):rt.isFunction(t)?this.each(function(n){rt(this).toggleClass(t.call(this,n,U(this),e),e)}):this.each(function(){var e,i,s,r;if("string"===n)for(i=0,s=rt(this),r=t.match(_t)||[];e=r[i++];)s.hasClass(e)?s.removeClass(e):s.addClass(e);else t!==undefined&&"boolean"!==n||(e=U(this),e&&St.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":St.get(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+U(n)+" ").replace(pe," ").indexOf(e)>-1)return!0;return!1}});var he=/\r/g;rt.fn.extend({val:function(t){var e,n,i,s=this[0];{if(arguments.length)return i=rt.isFunction(t),this.each(function(n){var s;1===this.nodeType&&(s=i?t.call(this,n,rt(this).val()):t,null==s?s="":"number"==typeof s?s+="":rt.isArray(s)&&(s=rt.map(s,function(t){return null==t?"":t+""})),(e=rt.valHooks[this.type]||rt.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&e.set(this,s,"value")!==undefined||(this.value=s))});if(s)return(e=rt.valHooks[s.type]||rt.valHooks[s.nodeName.toLowerCase()])&&"get"in e&&(n=e.get(s,"value"))!==undefined?n:(n=s.value,"string"==typeof n?n.replace(he,""):null==n?"":n)}}}),rt.extend({valHooks:{option:{get:function(t){return rt.trim(t.value)}},select:{get:function(t){for(var e,n,i=t.options,s=t.selectedIndex,r="select-one"===t.type||s<0,o=r?null:[],a=r?s+1:i.length,l=s<0?a:r?s:0;l<a;l++)if(n=i[l],(n.selected||l===s)&&(it.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!rt.nodeName(n.parentNode,"optgroup"))){if(e=rt(n).val(),r)return e;o.push(e)}return o},set:function(t,e){for(var n,i,s=t.options,r=rt.makeArray(e),o=s.length;o--;)i=s[o],(i.selected=rt.inArray(rt.valHooks.option.get(i),r)>-1)&&(n=!0);return n||(t.selectedIndex=-1),r}}}}),rt.each(["radio","checkbox"],function(){rt.valHooks[this]={set:function(t,e){if(rt.isArray(e))return t.checked=rt.inArray(rt(t).val(),e)>-1}},it.checkOn||(rt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var de=/^(?:focusinfocus|focusoutblur)$/;rt.extend(rt.event,{trigger:function(e,n,i,s){var r,o,a,l,c,u,p,h=[i||Y],d=nt.call(e,"type")?e.type:e,f=nt.call(e,"namespace")?e.namespace.split("."):[];if(o=a=i=i||Y,3!==i.nodeType&&8!==i.nodeType&&!de.test(d+rt.event.triggered)&&(d.indexOf(".")>-1&&(f=d.split("."),d=f.shift(),f.sort()),c=d.indexOf(":")<0&&"on"+d,e=e[rt.expando]?e:new rt.Event(d,"object"==typeof e&&e),e.isTrigger=s?2:3,e.namespace=f.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=undefined,e.target||(e.target=i),n=null==n?[e]:rt.makeArray(n,[e]),p=rt.event.special[d]||{},s||!p.trigger||!1!==p.trigger.apply(i,n))){if(!s&&!p.noBubble&&!rt.isWindow(i)){for(l=p.delegateType||d,de.test(l+d)||(o=o.parentNode);o;o=o.parentNode)h.push(o),a=o;a===(i.ownerDocument||Y)&&h.push(a.defaultView||a.parentWindow||t)}for(r=0;(o=h[r++])&&!e.isPropagationStopped();)e.type=r>1?l:p.bindType||d,u=(St.get(o,"events")||{})[e.type]&&St.get(o,"handle"),u&&u.apply(o,n),(u=c&&o[c])&&u.apply&&Tt(o)&&(e.result=u.apply(o,n),!1===e.result&&e.preventDefault());return e.type=d,s||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(h.pop(),n)||!Tt(i)||c&&rt.isFunction(i[d])&&!rt.isWindow(i)&&(a=i[c],a&&(i[c]=null),rt.event.triggered=d,i[d](),rt.event.triggered=undefined,a&&(i[c]=a)),e.result}},simulate:function(t,e,n){var i=rt.extend(new rt.Event,n,{type:t,isSimulated:!0});rt.event.trigger(i,null,e),i.isDefaultPrevented()&&n.preventDefault()}}),rt.fn.extend({trigger:function(t,e){return this.each(function(){rt.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return rt.event.trigger(t,e,n,!0)}}),rt.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){rt.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),rt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),it.focusin="onfocusin"in t,it.focusin||rt.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){rt.event.simulate(e,t.target,rt.event.fix(t))};rt.event.special[e]={setup:function(){var i=this.ownerDocument||this,s=St.access(i,e);s||i.addEventListener(t,n,!0),St.access(i,e,(s||0)+1)},teardown:function(){var i=this.ownerDocument||this,s=St.access(i,e)-1;s?St.access(i,e,s):(i.removeEventListener(t,n,!0),St.remove(i,e))}}});var fe=t.location,ge=rt.now(),me=/\?/;rt.parseJSON=function(t){return JSON.parse(t+"")},rt.parseXML=function(e){var n;if(!e||"string"!=typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(t){n=undefined}return n&&!n.getElementsByTagName("parsererror").length||rt.error("Invalid XML: "+e),n};var ve=/#.*$/,ye=/([?&])_=[^&]*/,be=/^(.*?):[ \t]*([^\r\n]*)$/gm,_e=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,we=/^(?:GET|HEAD)$/,ke=/^\/\//,Te={},Se={},Ce="*/".concat("*"),Ae=Y.createElement("a");Ae.href=fe.href,rt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fe.href,type:"GET",isLocal:_e.test(fe.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ce,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":rt.parseJSON,"text xml":rt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?B(B(t,rt.ajaxSettings),e):B(rt.ajaxSettings,t)},ajaxPrefilter:q(Te),ajaxTransport:q(Se),ajax:function(e,n){function i(e,n,i,a){var c,p,y,b,w,T=n;2!==_&&(_=2,l&&t.clearTimeout(l),s=undefined,o=a||"",k.readyState=e>0?4:0,c=e>=200&&e<300||304===e,i&&(b=J(h,k,i)),b=W(h,b,k,c),c?(h.ifModified&&(w=k.getResponseHeader("Last-Modified"),w&&(rt.lastModified[r]=w),(w=k.getResponseHeader("etag"))&&(rt.etag[r]=w)),204===e||"HEAD"===h.type?T="nocontent":304===e?T="notmodified":(T=b.state,p=b.data,y=b.error,c=!y)):(y=T,!e&&T||(T="error",e<0&&(e=0))),k.status=e,k.statusText=(n||T)+"",c?g.resolveWith(d,[p,T,k]):g.rejectWith(d,[k,T,y]),k.statusCode(v),v=undefined,u&&f.trigger(c?"ajaxSuccess":"ajaxError",[k,h,c?p:y]),m.fireWith(d,[k,T]),u&&(f.trigger("ajaxComplete",[k,h]),--rt.active||rt.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=undefined),n=n||{};var s,r,o,a,l,c,u,p,h=rt.ajaxSetup({},n),d=h.context||h,f=h.context&&(d.nodeType||d.jquery)?rt(d):rt.event,g=rt.Deferred(),m=rt.Callbacks("once memory"),v=h.statusCode||{},y={},b={},_=0,w="canceled",k={readyState:0,getResponseHeader:function(t){var e;if(2===_){if(!a)for(a={};e=be.exec(o);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===_?o:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return _||(t=b[n]=b[n]||t,y[t]=e),this},overrideMimeType:function(t){return _||(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(_<2)for(e in t)v[e]=[v[e],t[e]];else k.always(t[k.status]);return this},abort:function(t){var e=t||w;return s&&s.abort(e),i(0,e),this}};if(g.promise(k).complete=m.add,k.success=k.done,k.error=k.fail,h.url=((e||h.url||fe.href)+"").replace(ve,"").replace(ke,fe.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=rt.trim(h.dataType||"*").toLowerCase().match(_t)||[""],null==h.crossDomain){c=Y.createElement("a");try{c.href=h.url,c.href=c.href,h.crossDomain=Ae.protocol+"//"+Ae.host!=c.protocol+"//"+c.host}catch(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=rt.param(h.data,h.traditional)),F(Te,h,n,k),2===_)return k;u=rt.event&&h.global,u&&0==rt.active++&&rt.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!we.test(h.type),r=h.url,h.hasContent||(h.data&&(r=h.url+=(me.test(r)?"&":"?")+h.data,delete h.data),!1===h.cache&&(h.url=ye.test(r)?r.replace(ye,"$1_="+ge++):r+(me.test(r)?"&":"?")+"_="+ge++)),h.ifModified&&(rt.lastModified[r]&&k.setRequestHeader("If-Modified-Since",rt.lastModified[r]),rt.etag[r]&&k.setRequestHeader("If-None-Match",rt.etag[r])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&k.setRequestHeader("Content-Type",h.contentType),k.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Ce+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)k.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(d,k,h)||2===_))return k.abort();w="abort";for(p in{success:1,error:1,complete:1})k[p](h[p]);if(s=F(Se,h,n,k)){if(k.readyState=1,u&&f.trigger("ajaxSend",[k,h]),2===_)return k;h.async&&h.timeout>0&&(l=t.setTimeout(function(){k.abort("timeout")},h.timeout));try{_=1,s.send(y,i)}catch(t){if(!(_<2))throw t;i(-1,t)}}else i(-1,"No Transport");return k},getJSON:function(t,e,n){return rt.get(t,e,n,"json")},getScript:function(t,e){return rt.get(t,undefined,e,"script")}}),rt.each(["get","post"],function(t,e){rt[e]=function(t,n,i,s){return rt.isFunction(n)&&(s=s||i,i=n,n=undefined),rt.ajax(rt.extend({url:t,type:e,dataType:s,data:n,success:i},rt.isPlainObject(t)&&t))}}),rt._evalUrl=function(t){return rt.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},rt.fn.extend({wrapAll:function(t){var e;return rt.isFunction(t)?this.each(function(e){rt(this).wrapAll(t.call(this,e))}):(this[0]&&(e=rt(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return rt.isFunction(t)?this.each(function(e){rt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=rt(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=rt.isFunction(t);return this.each(function(n){rt(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){rt.nodeName(this,"body")||rt(this).replaceWith(this.childNodes)}).end()}}),rt.expr.filters.hidden=function(t){return!rt.expr.filters.visible(t)},rt.expr.filters.visible=function(t){return t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0};var xe=/%20/g,je=/\[\]$/,Ie=/\r?\n/g,De=/^(?:submit|button|image|reset|file)$/i,Pe=/^(?:input|select|textarea|keygen)/i;rt.param=function(t,e){var n,i=[],s=function(t,e){e=rt.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(e===undefined&&(e=rt.ajaxSettings&&rt.ajaxSettings.traditional),rt.isArray(t)||t.jquery&&!rt.isPlainObject(t))rt.each(t,function(){s(this.name,this.value)});else for(n in t)H(n,t[n],e,s);return i.join("&").replace(xe,"+")},rt.fn.extend({serialize:function(){return rt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=rt.prop(this,"elements");return t?rt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!rt(this).is(":disabled")&&Pe.test(this.nodeName)&&!De.test(t)&&(this.checked||!Et.test(t))}).map(function(t,e){var n=rt(this).val();return null==n?null:rt.isArray(n)?rt.map(n,function(t){return{name:e.name,value:t.replace(Ie,"\r\n")}}):{name:e.name,value:n.replace(Ie,"\r\n")}}).get()}}),rt.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(t){}};var Ee={0:200,1223:204},Oe=rt.ajaxSettings.xhr();it.cors=!!Oe&&"withCredentials"in Oe,it.ajax=Oe=!!Oe,rt.ajaxTransport(function(e){var n,i;if(it.cors||Oe&&!e.crossDomain)return{send:function(s,r){var o,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)a[o]=e.xhrFields[o];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||s["X-Requested-With"]||(s["X-Requested-With"]="XMLHttpRequest");for(o in s)a.setRequestHeader(o,s[o]);n=function(t){return function(){n&&(n=i=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?r(0,"error"):r(a.status,a.statusText):r(Ee[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),i=a.onerror=n("error"),a.onabort!==undefined?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout(function(){n&&i()})},n=n("abort");try{a.send(e.hasContent&&e.data||null)}catch(t){if(n)throw t}},abort:function(){n&&n()}}}),rt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return rt.globalEval(t),t}}}),rt.ajaxPrefilter("script",function(t){t.cache===undefined&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),rt.ajaxTransport("script",function(t){if(t.crossDomain){var e,n;return{send:function(i,s){e=rt("<script>").prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&s("error"===t.type?404:200,t.type)}),Y.head.appendChild(e[0])},abort:function(){n&&n()}}}});var Ne=[],Re=/(=)\?(?=&|$)|\?\?/;rt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ne.pop()||rt.expando+"_"+ge++;return this[t]=!0,t}}),rt.ajaxPrefilter("json jsonp",function(e,n,i){var s,r,o,a=!1!==e.jsonp&&(Re.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Re.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return s=e.jsonpCallback=rt.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Re,"$1"+s):!1!==e.jsonp&&(e.url+=(me.test(e.url)?"&":"?")+e.jsonp+"="+s),e.converters["script json"]=function(){return o||rt.error(s+" was not called"),o[0]},e.dataTypes[0]="json",r=t[s],t[s]=function(){o=arguments},i.always(function(){r===undefined?rt(t).removeProp(s):t[s]=r,e[s]&&(e.jsonpCallback=n.jsonpCallback,Ne.push(s)),o&&rt.isFunction(r)&&r(o[0]),o=r=undefined}),"script"}),it.createHTMLDocument=function(){var t=Y.implementation.createHTMLDocument("").body;return t.innerHTML="<form></form><form></form>",2===t.childNodes.length}(),rt.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||(it.createHTMLDocument?Y.implementation.createHTMLDocument(""):Y);var i=ft.exec(t),s=!n&&[];return i?[e.createElement(i[1])]:(i=h([t],e,s),s&&s.length&&rt(s).remove(),rt.merge([],i.childNodes))};var Me=rt.fn.load;rt.fn.load=function(t,e,n){if("string"!=typeof t&&Me)return Me.apply(this,arguments);var i,s,r,o=this,a=t.indexOf(" ");return a>-1&&(i=rt.trim(t.slice(a)),t=t.slice(0,a)),rt.isFunction(e)?(n=e,e=undefined):e&&"object"==typeof e&&(s="POST"),o.length>0&&rt.ajax({url:t,type:s||"GET",dataType:"html",data:e}).done(function(t){r=arguments,o.html(i?rt("<div>").append(rt.parseHTML(t)).find(i):t)}).always(n&&function(t,e){o.each(function(){n.apply(o,r||[t.responseText,e,t])})}),this},rt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){rt.fn[e]=function(t){return this.on(e,t)}}),rt.expr.filters.animated=function(t){return rt.grep(rt.timers,function(e){return t===e.elem}).length},rt.offset={setOffset:function(t,e,n){var i,s,r,o,a,l,c,u=rt.css(t,"position"),p=rt(t),h={};"static"===u&&(t.style.position="relative"),a=p.offset(),r=rt.css(t,"top"),l=rt.css(t,"left"),c=("absolute"===u||"fixed"===u)&&(r+l).indexOf("auto")>-1,c?(i=p.position(),o=i.top,s=i.left):(o=parseFloat(r)||0,s=parseFloat(l)||0),rt.isFunction(e)&&(e=e.call(t,n,rt.extend({},a))),null!=e.top&&(h.top=e.top-a.top+o),null!=e.left&&(h.left=e.left-a.left+s),"using"in e?e.using.call(t,h):p.css(h)}},rt.fn.extend({offset:function(t){if(arguments.length)return t===undefined?this:this.each(function(e){rt.offset.setOffset(this,t,e)});var e,n,i=this[0],s={top:0,left:0},r=i&&i.ownerDocument;if(r)return e=r.documentElement,rt.contains(e,i)?(s=i.getBoundingClientRect(),n=G(r),{top:s.top+n.pageYOffset-e.clientTop,left:s.left+n.pageXOffset-e.clientLeft}):s},position:function(){if(this[0]){var t,e,n=this[0],i={top:0,left:0};return"fixed"===rt.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),rt.nodeName(t[0],"html")||(i=t.offset()),i.top+=rt.css(t[0],"borderTopWidth",!0),i.left+=rt.css(t[0],"borderLeftWidth",!0)),{top:e.top-i.top-rt.css(n,"marginTop",!0),left:e.left-i.left-rt.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===rt.css(t,"position");)t=t.offsetParent;return t||Xt})}}),rt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n="pageYOffset"===e;rt.fn[t]=function(i){return kt(this,function(t,i,s){var r=G(t);if(s===undefined)return r?r[e]:t[i];r?r.scrollTo(n?r.pageXOffset:s,n?s:r.pageYOffset):t[i]=s},t,i,arguments.length)}}),rt.each(["top","left"],function(t,e){rt.cssHooks[e]=x(it.pixelPosition,function(t,n){if(n)return n=A(t,e),Vt.test(n)?rt(t).position()[e]+"px":n})}),rt.each({Height:"height",Width:"width"},function(t,e){rt.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){rt.fn[i]=function(i,s){var r=arguments.length&&(n||"boolean"!=typeof i),o=n||(!0===i||!0===s?"margin":"border");return kt(this,function(e,n,i){var s;return rt.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(s=e.documentElement,Math.max(e.body["scroll"+t],s["scroll"+t],e.body["offset"+t],s["offset"+t],s["client"+t])):i===undefined?rt.css(e,n,o):rt.style(e,n,i,o)},e,r?i:undefined,r,null)}})}),rt.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},size:function(){return this.length}}),rt.fn.andSelf=rt.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return rt});var $e=t.jQuery,ze=t.$;return rt.noConflict=function(e){return t.$===rt&&(t.$=ze),e&&t.jQuery===rt&&(t.jQuery=$e),rt},e||(t.jQuery=t.$=rt),rt}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(e,i){var s,r,o,a=e.nodeName.toLowerCase();return"area"===a?(s=e.parentNode,r=s.name,!(!e.href||!r||"map"!==s.nodeName.toLowerCase())&&(!!(o=t("img[usemap='#"+r+"']")[0])&&n(o))):(/^(input|select|textarea|button|object)$/.test(a)?!e.disabled:"a"===a?e.href||i:i)&&n(e)}function n(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}t.ui=t.ui||{},t.extend(t.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({scrollParent:function(e){var n=this.css("position"),i="absolute"===n,s=e?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var e=t(this);return(!i||"static"!==e.css("position"))&&s.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==n&&r.length?r:t(this[0].ownerDocument||document)},uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(n){return!!t.data(n,e)}}):function(e,n,i){return!!t.data(e,i[3])},focusable:function(n){return e(n,!isNaN(t.attr(n,"tabindex")))},tabbable:function(n){var i=t.attr(n,"tabindex"),s=isNaN(i);return(s||i>=0)&&e(n,!s)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(e,n){function i(e,n,i,r){return t.each(s,function(){n-=parseFloat(t.css(e,"padding"+this))||0,i&&(n-=parseFloat(t.css(e,"border"+this+"Width"))||0),r&&(n-=parseFloat(t.css(e,"margin"+this))||0)}),n}var s="Width"===n?["Left","Right"]:["Top","Bottom"],r=n.toLowerCase(),o={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+n]=function(e){return e===undefined?o["inner"+n].call(this):this.each(function(){t(this).css(r,i(this,e)+"px")})},t.fn["outer"+n]=function(e,s){return"number"!=typeof e?o["outer"+n].call(this,e):this.each(function(){t(this).css(r,i(this,e,!0,s)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(n){return arguments.length?e.call(this,t.camelCase(n)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.fn.extend({focus:function(e){return function(n,i){return"number"==typeof n?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),i&&i.call(e)},n)}):e.apply(this,arguments)}}(t.fn.focus),disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(e){if(e!==undefined)return this.css("zIndex",e);if(this.length)for(var n,i,s=t(this[0]);s.length&&s[0]!==document;){if(("absolute"===(n=s.css("position"))||"relative"===n||"fixed"===n)&&(i=parseInt(s.css("zIndex"),10),!isNaN(i)&&0!==i))return i;s=s.parent()}return 0}}),t.ui.plugin={add:function(e,n,i){var s,r=t.ui[e].prototype;for(s in i)r.plugins[s]=r.plugins[s]||[],r.plugins[s].push([n,i[s]])},call:function(t,e,n,i){var s,r=t.plugins[e];if(r&&(i||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(s=0;s<r.length;s++)t.options[r[s][0]]&&r[s][1].apply(t.element,n)}};var i=0,s=Array.prototype.slice;t.cleanData=function(e){return function(n){var i,s,r;for(r=0;null!=(s=n[r]);r++)try{i=t._data(s,"events"),i&&i.remove&&t(s).triggerHandler("remove")}catch(t){}e(n)}}(t.cleanData),t.widget=function(e,n,i){var s,r,o,a,l={},c=e.split(".")[0];return e=e.split(".")[1],s=c+"-"+e,i||(i=n,n=t.Widget),t.expr[":"][s.toLowerCase()]=function(e){return!!t.data(e,s)},t[c]=t[c]||{},r=t[c][e],o=t[c][e]=function(t,e){if(!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},t.extend(o,r,{version:i.version,_proto:t.extend({},i),_childConstructors:[]}),a=new n,a.options=t.widget.extend({},a.options),t.each(i,function(e,i){if(!t.isFunction(i))return void(l[e]=i);l[e]=function(){var t=function(){return n.prototype[e].apply(this,arguments)},s=function(t){return n.prototype[e].apply(this,t)};return function(){var e,n=this._super,r=this._superApply;return this._super=t,this._superApply=s,e=i.apply(this,arguments),this._super=n,this._superApply=r,e}}()}),o.prototype=t.widget.extend(a,{widgetEventPrefix:r?a.widgetEventPrefix||e:e},l,{constructor:o,namespace:c,widgetName:e,widgetFullName:s}),r?(t.each(r._childConstructors,function(e,n){var i=n.prototype;t.widget(i.namespace+"."+i.widgetName,o,n._proto)}),delete r._childConstructors):n._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var n,i,r=s.call(arguments,1),o=0,a=r.length;o<a;o++)for(n in r[o])i=r[o][n],r[o].hasOwnProperty(n)&&i!==undefined&&(t.isPlainObject(i)?e[n]=t.isPlainObject(e[n])?t.widget.extend({},e[n],i):t.widget.extend({},i):e[n]=i);return e},t.widget.bridge=function(e,n){var i=n.prototype.widgetFullName||e;t.fn[e]=function(r){var o="string"==typeof r,a=s.call(arguments,1),l=this;return o?this.each(function(){var n,s=t.data(this,i);return"instance"===r?(l=s,!1):s?t.isFunction(s[r])&&"_"!==r.charAt(0)?(n=s[r].apply(s,a),n!==s&&n!==undefined?(l=n&&n.jquery?l.pushStack(n.get()):n,!1):void 0):t.error("no such method '"+r+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+r+"'")}):(a.length&&(r=t.widget.extend.apply(null,[r].concat(a))),this.each(function(){var e=t.data(this,i);e?(e.option(r||{}),e._init&&e._init()):t.data(this,i,new n(r,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),n!==this&&(t.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(e,n){var i,s,r,o=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(o={},i=e.split("."),e=i.shift(),i.length){for(s=o[e]=t.widget.extend({},this.options[e]),r=0;r<i.length-1;r++)s[i[r]]=s[i[r]]||{},s=s[i[r]];if(e=i.pop(),1===arguments.length)return s[e]===undefined?null:s[e];s[e]=n}else{if(1===arguments.length)return this.options[e]===undefined?null:this.options[e];o[e]=n}return this._setOptions(o),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!e),e&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(e,n,i){var s,r=this;"boolean"!=typeof e&&(i=n,n=e,e=!1),i?(n=s=t(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,s=this.widget()),t.each(i,function(i,o){function a(){if(e||!0!==r.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof o?r[o]:o).apply(r,arguments)}"string"!=typeof o&&(a.guid=o.guid=o.guid||a.guid||t.guid++);var l=i.match(/^([\w:-]*)\s*(.*)$/),c=l[1]+r.eventNamespace,u=l[2];u?s.delegate(u,c,a):n.bind(c,a)})},_off:function(e,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(n).undelegate(n),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function n(){return("string"==typeof t?i[t]:t).apply(i,arguments)}var i=this;return setTimeout(n,e||0)},_hoverable:function(e){
this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,n,i){var s,r,o=this.options[e];if(i=i||{},n=t.Event(n),n.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),n.target=this.element[0],r=n.originalEvent)for(s in r)s in n||(n[s]=r[s]);return this.element.trigger(n,i),!(t.isFunction(o)&&!1===o.apply(this.element[0],[n].concat(i))||n.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,n){t.Widget.prototype["_"+e]=function(i,s,r){"string"==typeof s&&(s={effect:s});var o,a=s?!0===s||"number"==typeof s?n:s.effect||n:e;s=s||{},"number"==typeof s&&(s={duration:s}),o=!t.isEmptyObject(s),s.complete=r,s.delay&&i.delay(s.delay),o&&t.effects&&t.effects.effect[a]?i[e](s):a!==e&&i[a]?i[a](s.duration,s.easing,r):i.queue(function(n){t(this)[e](),r&&r.call(i[0]),n()})}});var r=(t.widget,!1);t(document).mouseup(function(){r=!1});t.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(n){if(!0===t.data(n.target,e.widgetName+".preventClickEvent"))return t.removeData(n.target,e.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!r){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var n=this,i=1===e.which,s=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(i&&!s&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return n._mouseMove(t)},this._mouseUpDelegate=function(t){return n._mouseUp(t)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),r=!0,!0))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),r=!1,!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}});!function(){function e(t,e,n){return[parseFloat(t[0])*(d.test(t[0])?e/100:1),parseFloat(t[1])*(d.test(t[1])?n/100:1)]}function n(e,n){return parseInt(t.css(e,n),10)||0}function i(e){var n=e[0];return 9===n.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(n)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var s,r,o=Math.max,a=Math.abs,l=Math.round,c=/left|center|right/,u=/top|center|bottom/,p=/[\+\-]\d+(\.[\d]+)?%?/,h=/^\w+/,d=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(s!==undefined)return s;var e,n,i=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=i.children()[0];return t("body").append(i),e=r.offsetWidth,i.css("overflow","scroll"),n=r.offsetWidth,e===n&&(n=i[0].clientWidth),i.remove(),s=e-n},getScrollInfo:function(e){var n=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),i=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),s="scroll"===n||"auto"===n&&e.width<e.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&e.height<e.element[0].scrollHeight?t.position.scrollbarWidth():0,height:s?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var n=t(e||window),i=t.isWindow(n[0]),s=!!n[0]&&9===n[0].nodeType;return{element:n,isWindow:i,isDocument:s,offset:n.offset()||{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:i||s?n.width():n.outerWidth(),height:i||s?n.height():n.outerHeight()}}},t.fn.position=function(s){if(!s||!s.of)return f.apply(this,arguments);s=t.extend({},s);var d,g,m,v,y,b,_=t(s.of),w=t.position.getWithinInfo(s.within),k=t.position.getScrollInfo(w),T=(s.collision||"flip").split(" "),S={};return b=i(_),_[0].preventDefault&&(s.at="left top"),g=b.width,m=b.height,v=b.offset,y=t.extend({},v),t.each(["my","at"],function(){var t,e,n=(s[this]||"").split(" ");1===n.length&&(n=c.test(n[0])?n.concat(["center"]):u.test(n[0])?["center"].concat(n):["center","center"]),n[0]=c.test(n[0])?n[0]:"center",n[1]=u.test(n[1])?n[1]:"center",t=p.exec(n[0]),e=p.exec(n[1]),S[this]=[t?t[0]:0,e?e[0]:0],s[this]=[h.exec(n[0])[0],h.exec(n[1])[0]]}),1===T.length&&(T[1]=T[0]),"right"===s.at[0]?y.left+=g:"center"===s.at[0]&&(y.left+=g/2),"bottom"===s.at[1]?y.top+=m:"center"===s.at[1]&&(y.top+=m/2),d=e(S.at,g,m),y.left+=d[0],y.top+=d[1],this.each(function(){var i,c,u=t(this),p=u.outerWidth(),h=u.outerHeight(),f=n(this,"marginLeft"),b=n(this,"marginTop"),C=p+f+n(this,"marginRight")+k.width,A=h+b+n(this,"marginBottom")+k.height,x=t.extend({},y),j=e(S.my,u.outerWidth(),u.outerHeight());"right"===s.my[0]?x.left-=p:"center"===s.my[0]&&(x.left-=p/2),"bottom"===s.my[1]?x.top-=h:"center"===s.my[1]&&(x.top-=h/2),x.left+=j[0],x.top+=j[1],r||(x.left=l(x.left),x.top=l(x.top)),i={marginLeft:f,marginTop:b},t.each(["left","top"],function(e,n){t.ui.position[T[e]]&&t.ui.position[T[e]][n](x,{targetWidth:g,targetHeight:m,elemWidth:p,elemHeight:h,collisionPosition:i,collisionWidth:C,collisionHeight:A,offset:[d[0]+j[0],d[1]+j[1]],my:s.my,at:s.at,within:w,elem:u})}),s.using&&(c=function(t){var e=v.left-x.left,n=e+g-p,i=v.top-x.top,r=i+m-h,l={target:{element:_,left:v.left,top:v.top,width:g,height:m},element:{element:u,left:x.left,top:x.top,width:p,height:h},horizontal:n<0?"left":e>0?"right":"center",vertical:r<0?"top":i>0?"bottom":"middle"};g<p&&a(e+n)<g&&(l.horizontal="center"),m<h&&a(i+r)<m&&(l.vertical="middle"),o(a(e),a(n))>o(a(i),a(r))?l.important="horizontal":l.important="vertical",s.using.call(this,t,l)}),u.offset(t.extend(x,{using:c}))})},t.ui.position={fit:{left:function(t,e){var n,i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,r=i.width,a=t.left-e.collisionPosition.marginLeft,l=s-a,c=a+e.collisionWidth-r-s;e.collisionWidth>r?l>0&&c<=0?(n=t.left+l+e.collisionWidth-r-s,t.left+=l-n):t.left=c>0&&l<=0?s:l>c?s+r-e.collisionWidth:s:l>0?t.left+=l:c>0?t.left-=c:t.left=o(t.left-a,t.left)},top:function(t,e){var n,i=e.within,s=i.isWindow?i.scrollTop:i.offset.top,r=e.within.height,a=t.top-e.collisionPosition.marginTop,l=s-a,c=a+e.collisionHeight-r-s;e.collisionHeight>r?l>0&&c<=0?(n=t.top+l+e.collisionHeight-r-s,t.top+=l-n):t.top=c>0&&l<=0?s:l>c?s+r-e.collisionHeight:s:l>0?t.top+=l:c>0?t.top-=c:t.top=o(t.top-a,t.top)}},flip:{left:function(t,e){var n,i,s=e.within,r=s.offset.left+s.scrollLeft,o=s.width,l=s.isWindow?s.scrollLeft:s.offset.left,c=t.left-e.collisionPosition.marginLeft,u=c-l,p=c+e.collisionWidth-o-l,h="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,d="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];u<0?((n=t.left+h+d+f+e.collisionWidth-o-r)<0||n<a(u))&&(t.left+=h+d+f):p>0&&((i=t.left-e.collisionPosition.marginLeft+h+d+f-l)>0||a(i)<p)&&(t.left+=h+d+f)},top:function(t,e){var n,i,s=e.within,r=s.offset.top+s.scrollTop,o=s.height,l=s.isWindow?s.scrollTop:s.offset.top,c=t.top-e.collisionPosition.marginTop,u=c-l,p=c+e.collisionHeight-o-l,h="top"===e.my[1],d=h?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];u<0?((i=t.top+d+f+g+e.collisionHeight-o-r)<0||i<a(u))&&(t.top+=d+f+g):p>0&&((n=t.top-e.collisionPosition.marginTop+d+f+g-l)>0||a(n)<p)&&(t.top+=d+f+g)}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,n,i,s,o,a=document.getElementsByTagName("body")[0],l=document.createElement("div");e=document.createElement(a?"div":"body"),i={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&t.extend(i,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in i)e.style[o]=i[o];e.appendChild(l),n=a||document.documentElement,n.insertBefore(e,n.firstChild),l.style.cssText="position: absolute; left: 10.7432222px;",s=t(l).offset().left,r=s>10&&s<11,e.innerHTML="",n.removeChild(e)}()}();t.ui.position,t.widget("ui.sortable",t.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,n){return t>=e&&t<e+n},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),t.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,n){var i=null,s=!1,r=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each(function(){if(t.data(this,r.widgetName+"-item")===r)return i=t(this),!1}),t.data(e.target,r.widgetName+"-item")===r&&(i=t(e.target)),!!i&&(!(this.options.handle&&!n&&(t(this.options.handle,i).find("*").addBack().each(function(){this===e.target&&(s=!0)}),!s))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,n,i){var s,r,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(r=this.document.find("body"),this.storedCursor=r.css("cursor"),r.css("cursor",o.cursor),this.storedStylesheet=t("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(r)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;s>=0;s--)this.containers[s]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var n,i,s,r,o=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+o.scrollSpeed:e.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+o.scrollSpeed:e.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(e.pageY-this.document.scrollTop()<o.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-o.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<o.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+o.scrollSpeed)),e.pageX-this.document.scrollLeft()<o.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-o.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<o.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+o.scrollSpeed))),!1!==a&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),n=this.items.length-1;n>=0;n--)if(i=this.items[n],s=i.item[0],(r=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===r?"next":"prev"]()[0]===s||t.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&t.contains(this.element[0],s))){if(this.direction=1===r?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(e,i),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,n){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var i=this,s=this.placeholder.offset(),r=this.options.axis,o={};r&&"x"!==r||(o.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),r&&"y"!==r||(o.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){i._clear(e)})}else this._clear(e,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var n=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},t(n).each(function(){var n=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);n&&i.push((e.key||n[1]+"[]")+"="+(e.key&&e.expression?n[1]:n[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(e){var n=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},n.each(function(){i.push(t(e.item||this).attr(e.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,n=e+this.helperProportions.width,i=this.positionAbs.top,s=i+this.helperProportions.height,r=t.left,o=r+t.width,a=t.top,l=a+t.height,c=this.offset.click.top,u=this.offset.click.left,p="x"===this.options.axis||i+c>a&&i+c<l,h="y"===this.options.axis||e+u>r&&e+u<o,d=p&&h;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?d:r<e+this.helperProportions.width/2&&n-this.helperProportions.width/2<o&&a<i+this.helperProportions.height/2&&s-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),i=e&&n,s=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return!!i&&(this.floating?r&&"right"===r||"down"===s?2:1:s&&("down"===s?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),i=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return this.floating&&s?"right"===s&&n||"left"===s&&!n:i&&("down"===i&&e||"up"===i&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function n(){a.push(this)}var i,s,r,o,a=[],l=[],c=this._connectWith();if(c&&e)for(i=c.length-1;i>=0;i--)for(r=t(c[i],this.document[0]),s=r.length-1;s>=0;s--)(o=t.data(r[s],this.widgetFullName))&&o!==this&&!o.options.disabled&&l.push([t.isFunction(o.options.items)?o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(l.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=l.length-1;i>=0;i--)l[i][0].each(n);return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var n=0;n<e.length;n++)if(e[n]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var n,i,s,r,o,a,l,c,u=this.items,p=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],h=this._connectWith();if(h&&this.ready)for(n=h.length-1;n>=0;n--)for(s=t(h[n],this.document[0]),i=s.length-1;i>=0;i--)(r=t.data(s[i],this.widgetFullName))&&r!==this&&!r.options.disabled&&(p.push([t.isFunction(r.options.items)?r.options.items.call(r.element[0],e,{item:this.currentItem}):t(r.options.items,r.element),r]),this.containers.push(r));for(n=p.length-1;n>=0;n--)for(o=p[n][1],a=p[n][0],i=0,c=a.length;i<c;i++)l=t(a[i]),l.data(this.widgetName+"-item",o),u.push({item:l,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var n,i,s,r;for(n=this.items.length-1;n>=0;n--)i=this.items[n],i.instance!==this.currentContainer&&this.currentContainer&&i.item[0]!==this.currentItem[0]||(s=this.options.toleranceElement?t(this.options.toleranceElement,i.item):i.item,e||(i.width=s.outerWidth(),i.height=s.outerHeight()),r=s.offset(),i.left=r.left,i.top=r.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--)r=this.containers[n].element.offset(),this.containers[n].containerCache.left=r.left,this.containers[n].containerCache.top=r.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var n,i=e.options;i.placeholder&&i.placeholder.constructor!==String||(n=i.placeholder,i.placeholder={element:function(){var i=e.currentItem[0].nodeName.toLowerCase(),s=t("<"+i+">",e.document[0]).addClass(n||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===i?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(s)):"tr"===i?e._createTrPlaceholder(e.currentItem,s):"img"===i&&s.attr("src",e.currentItem.attr("src")),n||s.css("visibility","hidden"),s},update:function(t,s){n&&!i.forcePlaceholderSize||(s.height()||s.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),s.width()||s.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(i.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),i.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,n){var i=this;e.children().each(function(){t("<td>&#160;</td>",i.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)})},_contactContainers:function(e){var n,i,s,r,o,a,l,c,u,p,h=null,d=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(h&&t.contains(this.containers[n].element[0],h.element[0]))continue;h=this.containers[n],d=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",e,this._uiHash(this)),this.containers[n].containerCache.over=0);if(h)if(1===this.containers.length)this.containers[d].containerCache.over||(this.containers[d]._trigger("over",e,this._uiHash(this)),this.containers[d].containerCache.over=1);else{for(s=1e4,r=null,u=h.floating||this._isFloating(this.currentItem),o=u?"left":"top",a=u?"width":"height",p=u?"clientX":"clientY",i=this.items.length-1;i>=0;i--)t.contains(this.containers[d].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(l=this.items[i].item.offset()[o],c=!1,e[p]-l>this.items[i][a]/2&&(c=!0),Math.abs(e[p]-l)<s&&(s=Math.abs(e[p]-l),r=this.items[i],this.direction=c?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[d])return void(this.currentContainer.containerCache.over||(this.containers[d]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));r?this._rearrange(e,r,null,!0):this._rearrange(e,null,this.containers[d].element,!0),this._trigger("change",e,this._uiHash()),this.containers[d]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[d],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",e,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(e){var n=this.options,i=t.isFunction(n.helper)?t(n.helper.apply(this.element[0],[e,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||t("parent"!==n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),i[0].style.width&&!n.forceHelperSize||i.width(this.currentItem.width()),i[0].style.height&&!n.forceHelperSize||i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,n,i,s=this.options;"parent"===s.containment&&(s.containment=this.helper[0].parentNode),"document"!==s.containment&&"window"!==s.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===s.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===s.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(s.containment)||(e=t(s.containment)[0],n=t(s.containment).offset(),i="hidden"!==t(e).css("overflow"),this.containment=[n.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,n.left+(i?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(i?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,n){n||(n=this.position);var i="absolute"===e?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=/(html|body)/i.test(s[0].tagName);return{top:n.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():r?0:s.scrollTop())*i,left:n.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():r?0:s.scrollLeft())*i}},_generatePosition:function(e){var n,i,s=this.options,r=e.pageX,o=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(r=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(r=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),s.grid&&(n=this.originalPageY+Math.round((o-this.originalPageY)/s.grid[1])*s.grid[1],o=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-s.grid[1]:n+s.grid[1]:n,i=this.originalPageX+Math.round((r-this.originalPageX)/s.grid[0])*s.grid[0],r=this.containment?i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-s.grid[0]:i+s.grid[0]:i)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:r-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(t,e,n,i){n?n[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var s=this.counter;this._delay(function(){s===this.counter&&this.refreshPositions(!i)})},_clear:function(t,e){function n(t,e,n){return function(i){n._trigger(t,i,e._uiHash(e))}}this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){
for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===t.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var n=e||this;return{helper:n.helper,placeholder:n.placeholder||t([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:e?e.element:null}}}),t.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){if("active"===t)return void this._activate(e);"event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),"disabled"===t&&(this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e))},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var n=t.ui.keyCode,i=this.headers.length,s=this.headers.index(e.target),r=!1;switch(e.keyCode){case n.RIGHT:case n.DOWN:r=this.headers[(s+1)%i];break;case n.LEFT:case n.UP:r=this.headers[(s-1+i)%i];break;case n.SPACE:case n.ENTER:this._eventHandler(e);break;case n.HOME:r=this.headers[0];break;case n.END:r=this.headers[i-1]}r&&(t(e.target).attr("tabIndex",-1),t(r).attr("tabIndex",0),r.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=t()):!1===e.active?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,n=this.options,i=n.heightStyle,s=this.element.parent();this.active=this._findActive(n.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var e=t(this),n=e.uniqueId().attr("id"),i=e.next(),s=i.uniqueId().attr("id");e.attr("aria-controls",s),i.attr("aria-labelledby",n)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(n.event),"fill"===i?(e=s.height(),this.element.siblings(":visible").each(function(){var n=t(this),i=n.css("position");"absolute"!==i&&"fixed"!==i&&(e-=n.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===i&&(e=0,this.headers.next().each(function(){e=Math.max(e,t(this).css("height","").height())}).height(e))},_activate:function(e){var n=this._findActive(e)[0];n!==this.active[0]&&(n=n||this.active[0],this._eventHandler({target:n,currentTarget:n,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var n={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){n[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,n),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var n=this.options,i=this.active,s=t(e.currentTarget),r=s[0]===i[0],o=r&&n.collapsible,a=o?t():s.next(),l=i.next(),c={oldHeader:i,oldPanel:l,newHeader:o?t():s,newPanel:a};e.preventDefault(),r&&!n.collapsible||!1===this._trigger("beforeActivate",e,c)||(n.active=!o&&this.headers.index(s),this.active=r?t():s,this._toggle(c),i.removeClass("ui-accordion-header-active ui-state-active"),n.icons&&i.children(".ui-accordion-header-icon").removeClass(n.icons.activeHeader).addClass(n.icons.header),r||(s.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),n.icons&&s.children(".ui-accordion-header-icon").removeClass(n.icons.header).addClass(n.icons.activeHeader),s.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var n=e.newPanel,i=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=n,this.prevHide=i,this.options.animate?this._animate(n,i,e):(i.hide(),n.show(),this._toggleComplete(e)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),n.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):n.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),n.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,n){var i,s,r,o=this,a=0,l=t.css("box-sizing"),c=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},p=c&&u.down||u,h=function(){o._toggleComplete(n)};return"number"==typeof p&&(r=p),"string"==typeof p&&(s=p),s=s||p.easing||u.easing,r=r||p.duration||u.duration,e.length?t.length?(i=t.show().outerHeight(),e.animate(this.hideProps,{duration:r,easing:s,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:r,easing:s,complete:h,step:function(t,n){n.now=Math.round(t),"height"!==n.prop?"content-box"===l&&(a+=n.now):"content"!==o.options.heightStyle&&(n.now=Math.round(i-e.outerHeight()-a),a=0)}})):e.animate(this.hideProps,r,s,h):t.animate(this.showProps,r,s,h)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var n=t(e.target);!this.mouseHandled&&n.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),n.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var n=t(e.currentTarget);n.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(e,n)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var n=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,n)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){var n,i,s,r,o=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:o=!1,i=this.previousFilter||"",s=String.fromCharCode(e.keyCode),r=!1,clearTimeout(this.filterTimer),s===i?r=!0:s=i+s,n=this._filterMenuItems(s),n=r&&-1!==n.index(this.active.next())?this.active.nextAll(".ui-menu-item"):n,n.length||(s=String.fromCharCode(e.keyCode),n=this._filterMenuItems(s)),n.length?(this.focus(e,n),this.previousFilter=s,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}o&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(t):this.select(t))},refresh:function(){var e,n,i=this,s=this.options.icons.submenu,r=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),r.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),n=e.parent(),i=t("<span>").addClass("ui-menu-icon ui-icon "+s).data("ui-menu-submenu-carat",!0);n.attr("aria-haspopup","true").prepend(i),e.attr("aria-labelledby",n.attr("id"))}),e=r.add(this.element),n=e.find(this.options.items),n.not(".ui-menu-item").each(function(){var e=t(this);i._isDivider(e)&&e.addClass("ui-widget-content ui-menu-divider")}),n.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),n.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this._super(t,e)},focus:function(t,e){var n,i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),n=e.children(".ui-menu"),n.length&&t&&/^mouse/.test(t.type)&&this._startOpening(n),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var n,i,s,r,o,a;this._hasScroll()&&(n=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,s=e.offset().top-this.activeMenu.offset().top-n-i,r=this.activeMenu.scrollTop(),o=this.activeMenu.height(),a=e.outerHeight(),s<0?this.activeMenu.scrollTop(r+s):s+a>o&&this.activeMenu.scrollTop(r+s-o+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var n=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(e,n){clearTimeout(this.timer),this.timer=this._delay(function(){var i=n?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));i.length||(i=this.element),this._close(i),this.blur(e),this.activeMenu=i},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,n){var i;this.active&&(i="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),i&&i.length&&this.active||(i=this.activeMenu.find(this.options.items)[e]()),this.focus(n,i)},nextPage:function(e){var n,i,s;if(!this.active)return void this.next(e);this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return n=t(this),n.offset().top-i-s<0}),this.focus(e,n)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))},previousPage:function(e){var n,i,s;if(!this.active)return void this.next(e);this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return n=t(this),n.offset().top-i+s>0}),this.focus(e,n)):this.focus(e,this.activeMenu.find(this.options.items).first()))},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var n={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,n)},_filterMenuItems:function(e){var n=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),i=new RegExp("^"+n,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return i.test(t.trim(t(this).text()))})}});t.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,n,i,s=this.element[0].nodeName.toLowerCase(),r="textarea"===s,o="input"===s;this.isMultiLine=!!r||!o&&this.element.prop("isContentEditable"),this.valueMethod=this.element[r||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(s){if(this.element.prop("readOnly"))return e=!0,i=!0,void(n=!0);e=!1,i=!1,n=!1;var r=t.ui.keyCode;switch(s.keyCode){case r.PAGE_UP:e=!0,this._move("previousPage",s);break;case r.PAGE_DOWN:e=!0,this._move("nextPage",s);break;case r.UP:e=!0,this._keyEvent("previous",s);break;case r.DOWN:e=!0,this._keyEvent("next",s);break;case r.ENTER:this.menu.active&&(e=!0,s.preventDefault(),this.menu.select(s));break;case r.TAB:this.menu.active&&this.menu.select(s);break;case r.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(s),s.preventDefault());break;default:n=!0,this._searchTimeout(s)}},keypress:function(i){if(e)return e=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||i.preventDefault());if(!n){var s=t.ui.keyCode;switch(i.keyCode){case s.PAGE_UP:this._move("previousPage",i);break;case s.PAGE_DOWN:this._move("nextPage",i);break;case s.UP:this._keyEvent("previous",i);break;case s.DOWN:this._keyEvent("next",i)}}},input:function(t){if(i)return i=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){if(this.cancelBlur)return void delete this.cancelBlur;clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var n=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(i){i.target===e.element[0]||i.target===n||t.contains(n,i.target)||e.close()})})},menufocus:function(e,n){var i,s;if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)});s=n.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:s})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value),(i=n.item.attr("aria-label")||s.value)&&t.trim(i).length&&(this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))},menuselect:function(t,e){var n=e.item.data("ui-autocomplete-item"),i=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=i,this._delay(function(){this.previous=i,this.selectedItem=n})),!1!==this._trigger("select",t,{item:n})&&this._value(n.value),this.term=this._value(),this.close(t),this.selectedItem=n}}),this.liveRegion=t("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,n,i=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(n,i){i(t.ui.autocomplete.filter(e,n.term))}):"string"==typeof this.options.source?(n=this.options.source,this.source=function(e,s){i.xhr&&i.xhr.abort(),i.xhr=t.ajax({url:n,data:e,dataType:"json",success:function(t){s(t)},error:function(){s([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),n=this.menu.element.is(":visible"),i=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;e&&(!e||n||i)||(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),--this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var n=this.menu.element.empty();this._renderMenu(n,e),this.isNewMenu=!0,this.menu.refresh(),n.show(),this._resizeMenu(),n.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,n){var i=this;t.each(n,function(t,n){i._renderItemData(e,n)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,n){return t("<li>").text(n.label).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e):void this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,n){var i=new RegExp(t.ui.autocomplete.escapeRegex(n),"i");return t.grep(e,function(t){return i.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var n;this._superApply(arguments),this.options.disabled||this.cancelSearch||(n=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(n).appendTo(this.liveRegion))}});t.ui.autocomplete}),function(){function t(t){function e(e,n,i,s,r,o){for(;r>=0&&r<o;r+=t){var a=s?s[r]:r;i=n(i,e[a],a,e)}return i}return function(n,i,s,r){i=b(i,r,4);var o=!A(n)&&y.keys(n),a=(o||n).length,l=t>0?0:a-1;return arguments.length<3&&(s=n[o?o[l]:l],l+=t),e(n,i,s,o,l,a)}}function e(t){return function(e,n,i){n=_(n,i);for(var s=C(e),r=t>0?0:s-1;r>=0&&r<s;r+=t)if(n(e[r],r,e))return r;return-1}}function n(t,e,n){return function(i,s,r){var o=0,a=C(i);if("number"==typeof r)t>0?o=r>=0?r:Math.max(r+a,o):a=r>=0?Math.min(r+1,a):r+a+1;else if(n&&r&&a)return r=n(i,s),i[r]===s?r:-1;if(s!==s)return r=e(u.call(i,o,a),y.isNaN),r>=0?r+o:-1;for(r=t>0?o:a-1;r>=0&&r<a;r+=t)if(i[r]===s)return r;return-1}}function i(t,e){var n=P.length,i=t.constructor,s=y.isFunction(i)&&i.prototype||a,r="constructor";for(y.has(t,r)&&!y.contains(e,r)&&e.push(r);n--;)(r=P[n])in t&&t[r]!==s[r]&&!y.contains(e,r)&&e.push(r)}var s=this,r=s._,o=Array.prototype,a=Object.prototype,l=Function.prototype,c=o.push,u=o.slice,p=a.toString,h=a.hasOwnProperty,d=Array.isArray,f=Object.keys,g=l.bind,m=Object.create,v=function(){},y=function(t){return t instanceof y?t:this instanceof y?void(this._wrapped=t):new y(t)};"undefined"!=typeof exports?(void 0!==module&&module.exports&&(exports=module.exports=y),exports._=y):s._=y,y.VERSION="1.8.3";var b=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,s){return t.call(e,n,i,s)};case 4:return function(n,i,s,r){return t.call(e,n,i,s,r)}}return function(){return t.apply(e,arguments)}},_=function(t,e,n){return null==t?y.identity:y.isFunction(t)?b(t,e,n):y.isObject(t)?y.matcher(t):y.property(t)};y.iteratee=function(t,e){return _(t,e,Infinity)};var w=function(t,e){return function(n){var i=arguments.length;if(i<2||null==n)return n;for(var s=1;s<i;s++)for(var r=arguments[s],o=t(r),a=o.length,l=0;l<a;l++){var c=o[l];e&&void 0!==n[c]||(n[c]=r[c])}return n}},k=function(t){if(!y.isObject(t))return{};if(m)return m(t);v.prototype=t;var e=new v;return v.prototype=null,e},T=function(t){return function(e){return null==e?void 0:e[t]}},S=Math.pow(2,53)-1,C=T("length"),A=function(t){var e=C(t);return"number"==typeof e&&e>=0&&e<=S};y.each=y.forEach=function(t,e,n){e=b(e,n);var i,s;if(A(t))for(i=0,s=t.length;i<s;i++)e(t[i],i,t);else{var r=y.keys(t);for(i=0,s=r.length;i<s;i++)e(t[r[i]],r[i],t)}return t},y.map=y.collect=function(t,e,n){e=_(e,n);for(var i=!A(t)&&y.keys(t),s=(i||t).length,r=Array(s),o=0;o<s;o++){var a=i?i[o]:o;r[o]=e(t[a],a,t)}return r},y.reduce=y.foldl=y.inject=t(1),y.reduceRight=y.foldr=t(-1),y.find=y.detect=function(t,e,n){var i;if(void 0!==(i=A(t)?y.findIndex(t,e,n):y.findKey(t,e,n))&&-1!==i)return t[i]},y.filter=y.select=function(t,e,n){var i=[];return e=_(e,n),y.each(t,function(t,n,s){e(t,n,s)&&i.push(t)}),i},y.reject=function(t,e,n){return y.filter(t,y.negate(_(e)),n)},y.every=y.all=function(t,e,n){e=_(e,n);for(var i=!A(t)&&y.keys(t),s=(i||t).length,r=0;r<s;r++){var o=i?i[r]:r;if(!e(t[o],o,t))return!1}return!0},y.some=y.any=function(t,e,n){e=_(e,n);for(var i=!A(t)&&y.keys(t),s=(i||t).length,r=0;r<s;r++){var o=i?i[r]:r;if(e(t[o],o,t))return!0}return!1},y.contains=y.includes=y.include=function(t,e,n,i){return A(t)||(t=y.values(t)),("number"!=typeof n||i)&&(n=0),y.indexOf(t,e,n)>=0},y.invoke=function(t,e){var n=u.call(arguments,2),i=y.isFunction(e);return y.map(t,function(t){var s=i?e:t[e];return null==s?s:s.apply(t,n)})},y.pluck=function(t,e){return y.map(t,y.property(e))},y.where=function(t,e){return y.filter(t,y.matcher(e))},y.findWhere=function(t,e){return y.find(t,y.matcher(e))},y.max=function(t,e,n){var i,s,r=-Infinity,o=-Infinity;if(null==e&&null!=t){t=A(t)?t:y.values(t);for(var a=0,l=t.length;a<l;a++)(i=t[a])>r&&(r=i)}else e=_(e,n),y.each(t,function(t,n,i){((s=e(t,n,i))>o||s===-Infinity&&r===-Infinity)&&(r=t,o=s)});return r},y.min=function(t,e,n){var i,s,r=Infinity,o=Infinity;if(null==e&&null!=t){t=A(t)?t:y.values(t);for(var a=0,l=t.length;a<l;a++)(i=t[a])<r&&(r=i)}else e=_(e,n),y.each(t,function(t,n,i){((s=e(t,n,i))<o||s===Infinity&&r===Infinity)&&(r=t,o=s)});return r},y.shuffle=function(t){for(var e,n=A(t)?t:y.values(t),i=n.length,s=Array(i),r=0;r<i;r++)e=y.random(0,r),e!==r&&(s[r]=s[e]),s[e]=n[r];return s},y.sample=function(t,e,n){return null==e||n?(A(t)||(t=y.values(t)),t[y.random(t.length-1)]):y.shuffle(t).slice(0,Math.max(0,e))},y.sortBy=function(t,e,n){return e=_(e,n),y.pluck(y.map(t,function(t,n,i){return{value:t,index:n,criteria:e(t,n,i)}}).sort(function(t,e){var n=t.criteria,i=e.criteria;if(n!==i){if(n>i||void 0===n)return 1;if(n<i||void 0===i)return-1}return t.index-e.index}),"value")};var x=function(t){return function(e,n,i){var s={};return n=_(n,i),y.each(e,function(i,r){var o=n(i,r,e);t(s,i,o)}),s}};y.groupBy=x(function(t,e,n){y.has(t,n)?t[n].push(e):t[n]=[e]}),y.indexBy=x(function(t,e,n){t[n]=e}),y.countBy=x(function(t,e,n){y.has(t,n)?t[n]++:t[n]=1}),y.toArray=function(t){return t?y.isArray(t)?u.call(t):A(t)?y.map(t,y.identity):y.values(t):[]},y.size=function(t){return null==t?0:A(t)?t.length:y.keys(t).length},y.partition=function(t,e,n){e=_(e,n);var i=[],s=[];return y.each(t,function(t,n,r){(e(t,n,r)?i:s).push(t)}),[i,s]},y.first=y.head=y.take=function(t,e,n){if(null!=t)return null==e||n?t[0]:y.initial(t,t.length-e)},y.initial=function(t,e,n){
return u.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},y.last=function(t,e,n){if(null!=t)return null==e||n?t[t.length-1]:y.rest(t,Math.max(0,t.length-e))},y.rest=y.tail=y.drop=function(t,e,n){return u.call(t,null==e||n?1:e)},y.compact=function(t){return y.filter(t,y.identity)};var j=function(t,e,n,i){for(var s=[],r=0,o=i||0,a=C(t);o<a;o++){var l=t[o];if(A(l)&&(y.isArray(l)||y.isArguments(l))){e||(l=j(l,e,n));var c=0,u=l.length;for(s.length+=u;c<u;)s[r++]=l[c++]}else n||(s[r++]=l)}return s};y.flatten=function(t,e){return j(t,e,!1)},y.without=function(t){return y.difference(t,u.call(arguments,1))},y.uniq=y.unique=function(t,e,n,i){y.isBoolean(e)||(i=n,n=e,e=!1),null!=n&&(n=_(n,i));for(var s=[],r=[],o=0,a=C(t);o<a;o++){var l=t[o],c=n?n(l,o,t):l;e?(o&&r===c||s.push(l),r=c):n?y.contains(r,c)||(r.push(c),s.push(l)):y.contains(s,l)||s.push(l)}return s},y.union=function(){return y.uniq(j(arguments,!0,!0))},y.intersection=function(t){for(var e=[],n=arguments.length,i=0,s=C(t);i<s;i++){var r=t[i];if(!y.contains(e,r)){for(var o=1;o<n&&y.contains(arguments[o],r);o++);o===n&&e.push(r)}}return e},y.difference=function(t){var e=j(arguments,!0,!0,1);return y.filter(t,function(t){return!y.contains(e,t)})},y.zip=function(){return y.unzip(arguments)},y.unzip=function(t){for(var e=t&&y.max(t,C).length||0,n=Array(e),i=0;i<e;i++)n[i]=y.pluck(t,i);return n},y.object=function(t,e){for(var n={},i=0,s=C(t);i<s;i++)e?n[t[i]]=e[i]:n[t[i][0]]=t[i][1];return n},y.findIndex=e(1),y.findLastIndex=e(-1),y.sortedIndex=function(t,e,n,i){n=_(n,i,1);for(var s=n(e),r=0,o=C(t);r<o;){var a=Math.floor((r+o)/2);n(t[a])<s?r=a+1:o=a}return r},y.indexOf=n(1,y.findIndex,y.sortedIndex),y.lastIndexOf=n(-1,y.findLastIndex),y.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var i=Math.max(Math.ceil((e-t)/n),0),s=Array(i),r=0;r<i;r++,t+=n)s[r]=t;return s};var I=function(t,e,n,i,s){if(!(i instanceof e))return t.apply(n,s);var r=k(t.prototype),o=t.apply(r,s);return y.isObject(o)?o:r};y.bind=function(t,e){if(g&&t.bind===g)return g.apply(t,u.call(arguments,1));if(!y.isFunction(t))throw new TypeError("Bind must be called on a function");var n=u.call(arguments,2),i=function(){return I(t,i,e,this,n.concat(u.call(arguments)))};return i},y.partial=function(t){var e=u.call(arguments,1),n=function(){for(var i=0,s=e.length,r=Array(s),o=0;o<s;o++)r[o]=e[o]===y?arguments[i++]:e[o];for(;i<arguments.length;)r.push(arguments[i++]);return I(t,n,this,this,r)};return n},y.bindAll=function(t){var e,n,i=arguments.length;if(i<=1)throw new Error("bindAll must be passed function names");for(e=1;e<i;e++)n=arguments[e],t[n]=y.bind(t[n],t);return t},y.memoize=function(t,e){var n=function(i){var s=n.cache,r=""+(e?e.apply(this,arguments):i);return y.has(s,r)||(s[r]=t.apply(this,arguments)),s[r]};return n.cache={},n},y.delay=function(t,e){var n=u.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},y.defer=y.partial(y.delay,y,1),y.throttle=function(t,e,n){var i,s,r,o=null,a=0;n||(n={});var l=function(){a=!1===n.leading?0:y.now(),o=null,r=t.apply(i,s),o||(i=s=null)};return function(){var c=y.now();a||!1!==n.leading||(a=c);var u=e-(c-a);return i=this,s=arguments,u<=0||u>e?(o&&(clearTimeout(o),o=null),a=c,r=t.apply(i,s),o||(i=s=null)):o||!1===n.trailing||(o=setTimeout(l,u)),r}},y.debounce=function(t,e,n){var i,s,r,o,a,l=function(){var c=y.now()-o;c<e&&c>=0?i=setTimeout(l,e-c):(i=null,n||(a=t.apply(r,s),i||(r=s=null)))};return function(){r=this,s=arguments,o=y.now();var c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(r,s),r=s=null),a}},y.wrap=function(t,e){return y.partial(e,t)},y.negate=function(t){return function(){return!t.apply(this,arguments)}},y.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,i=t[e].apply(this,arguments);n--;)i=t[n].call(this,i);return i}},y.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},y.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},y.once=y.partial(y.before,2);var D=!{toString:null}.propertyIsEnumerable("toString"),P=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];y.keys=function(t){if(!y.isObject(t))return[];if(f)return f(t);var e=[];for(var n in t)y.has(t,n)&&e.push(n);return D&&i(t,e),e},y.allKeys=function(t){if(!y.isObject(t))return[];var e=[];for(var n in t)e.push(n);return D&&i(t,e),e},y.values=function(t){for(var e=y.keys(t),n=e.length,i=Array(n),s=0;s<n;s++)i[s]=t[e[s]];return i},y.mapObject=function(t,e,n){e=_(e,n);for(var i,s=y.keys(t),r=s.length,o={},a=0;a<r;a++)i=s[a],o[i]=e(t[i],i,t);return o},y.pairs=function(t){for(var e=y.keys(t),n=e.length,i=Array(n),s=0;s<n;s++)i[s]=[e[s],t[e[s]]];return i},y.invert=function(t){for(var e={},n=y.keys(t),i=0,s=n.length;i<s;i++)e[t[n[i]]]=n[i];return e},y.functions=y.methods=function(t){var e=[];for(var n in t)y.isFunction(t[n])&&e.push(n);return e.sort()},y.extend=w(y.allKeys),y.extendOwn=y.assign=w(y.keys),y.findKey=function(t,e,n){e=_(e,n);for(var i,s=y.keys(t),r=0,o=s.length;r<o;r++)if(i=s[r],e(t[i],i,t))return i},y.pick=function(t,e,n){var i,s,r={},o=t;if(null==o)return r;y.isFunction(e)?(s=y.allKeys(o),i=b(e,n)):(s=j(arguments,!1,!1,1),i=function(t,e,n){return e in n},o=Object(o));for(var a=0,l=s.length;a<l;a++){var c=s[a],u=o[c];i(u,c,o)&&(r[c]=u)}return r},y.omit=function(t,e,n){if(y.isFunction(e))e=y.negate(e);else{var i=y.map(j(arguments,!1,!1,1),String);e=function(t,e){return!y.contains(i,e)}}return y.pick(t,e,n)},y.defaults=w(y.allKeys,!0),y.create=function(t,e){var n=k(t);return e&&y.extendOwn(n,e),n},y.clone=function(t){return y.isObject(t)?y.isArray(t)?t.slice():y.extend({},t):t},y.tap=function(t,e){return e(t),t},y.isMatch=function(t,e){var n=y.keys(e),i=n.length;if(null==t)return!i;for(var s=Object(t),r=0;r<i;r++){var o=n[r];if(e[o]!==s[o]||!(o in s))return!1}return!0};var E=function(t,e,n,i){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return t===e;t instanceof y&&(t=t._wrapped),e instanceof y&&(e=e._wrapped);var s=p.call(t);if(s!==p.call(e))return!1;switch(s){case"[object RegExp]":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}var r="[object Array]"===s;if(!r){if("object"!=typeof t||"object"!=typeof e)return!1;var o=t.constructor,a=e.constructor;if(o!==a&&!(y.isFunction(o)&&o instanceof o&&y.isFunction(a)&&a instanceof a)&&"constructor"in t&&"constructor"in e)return!1}n=n||[],i=i||[];for(var l=n.length;l--;)if(n[l]===t)return i[l]===e;if(n.push(t),i.push(e),r){if((l=t.length)!==e.length)return!1;for(;l--;)if(!E(t[l],e[l],n,i))return!1}else{var c,u=y.keys(t);if(l=u.length,y.keys(e).length!==l)return!1;for(;l--;)if(c=u[l],!y.has(e,c)||!E(t[c],e[c],n,i))return!1}return n.pop(),i.pop(),!0};y.isEqual=function(t,e){return E(t,e)},y.isEmpty=function(t){return null==t||(A(t)&&(y.isArray(t)||y.isString(t)||y.isArguments(t))?0===t.length:0===y.keys(t).length)},y.isElement=function(t){return!(!t||1!==t.nodeType)},y.isArray=d||function(t){return"[object Array]"===p.call(t)},y.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},y.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){y["is"+t]=function(e){return p.call(e)==="[object "+t+"]"}}),y.isArguments(arguments)||(y.isArguments=function(t){return y.has(t,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(y.isFunction=function(t){return"function"==typeof t||!1}),y.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},y.isNaN=function(t){return y.isNumber(t)&&t!==+t},y.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===p.call(t)},y.isNull=function(t){return null===t},y.isUndefined=function(t){return void 0===t},y.has=function(t,e){return null!=t&&h.call(t,e)},y.noConflict=function(){return s._=r,this},y.identity=function(t){return t},y.constant=function(t){return function(){return t}},y.noop=function(){},y.property=T,y.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},y.matcher=y.matches=function(t){return t=y.extendOwn({},t),function(e){return y.isMatch(e,t)}},y.times=function(t,e,n){var i=Array(Math.max(0,t));e=b(e,n,1);for(var s=0;s<t;s++)i[s]=e(s);return i},y.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},y.now=Date.now||function(){return(new Date).getTime()};var O={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},N=y.invert(O),R=function(t){var e=function(e){return t[e]},n="(?:"+y.keys(t).join("|")+")",i=RegExp(n),s=RegExp(n,"g");return function(t){return t=null==t?"":""+t,i.test(t)?t.replace(s,e):t}};y.escape=R(O),y.unescape=R(N),y.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),y.isFunction(i)?i.call(t):i};var M=0;y.uniqueId=function(t){var e=++M+"";return t?t+e:e},y.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var $=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},L=/\\|'|\r|\n|\u2028|\u2029/g,U=function(t){return"\\"+z[t]};y.template=function(t,e,n){!e&&n&&(e=n),e=y.defaults({},e,y.templateSettings);var i=RegExp([(e.escape||$).source,(e.interpolate||$).source,(e.evaluate||$).source].join("|")+"|$","g"),s=0,r="__p+='";t.replace(i,function(e,n,i,o,a){return r+=t.slice(s,a).replace(L,U),s=a+e.length,n?r+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?r+="'+\n((__t=("+i+"))==null?'':__t)+\n'":o&&(r+="';\n"+o+"\n__p+='"),e}),r+="';\n",e.variable||(r="with(obj||{}){\n"+r+"}\n"),r="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+r+"return __p;\n";try{var o=new Function(e.variable||"obj","_",r)}catch(t){throw t.source=r,t}var a=function(t){return o.call(this,t,y)},l=e.variable||"obj";return a.source="function("+l+"){\n"+r+"}",a},y.chain=function(t){var e=y(t);return e._chain=!0,e};var q=function(t,e){return t._chain?y(e).chain():e};y.mixin=function(t){y.each(y.functions(t),function(e){var n=y[e]=t[e];y.prototype[e]=function(){var t=[this._wrapped];return c.apply(t,arguments),q(this,n.apply(y,t))}})},y.mixin(y),y.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=o[t];y.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],q(this,n)}}),y.each(["concat","join","slice"],function(t){var e=o[t];y.prototype[t]=function(){return q(this,e.apply(this._wrapped,arguments))}}),y.prototype.value=function(){return this._wrapped},y.prototype.valueOf=y.prototype.toJSON=y.prototype.value,y.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return y})}.call(this),function(t){function e(t){var e=t.length,i=n.type(t);return"function"!==i&&!n.isWindow(t)&&(!(1!==t.nodeType||!e)||("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t))}if(!t.jQuery){var n=function(t,e){return new n.fn.init(t,e)};n.isWindow=function(t){return null!=t&&t==t.window},n.type=function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?s[o.call(t)]||"object":typeof t},n.isArray=Array.isArray||function(t){return"array"===n.type(t)},n.isPlainObject=function(t){var e;if(!t||"object"!==n.type(t)||t.nodeType||n.isWindow(t))return!1;try{if(t.constructor&&!r.call(t,"constructor")&&!r.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}for(e in t);return void 0===e||r.call(t,e)},n.each=function(t,n,i){var s=0,r=t.length,o=e(t);if(i){if(o)for(;r>s&&!1!==n.apply(t[s],i);s++);else for(s in t)if(!1===n.apply(t[s],i))break}else if(o)for(;r>s&&!1!==n.call(t[s],s,t[s]);s++);else for(s in t)if(!1===n.call(t[s],s,t[s]))break;return t},n.data=function(t,e,s){if(void 0===s){var r=t[n.expando],o=r&&i[r];if(void 0===e)return o;if(o&&e in o)return o[e]}else if(void 0!==e){var r=t[n.expando]||(t[n.expando]=++n.uuid);return i[r]=i[r]||{},i[r][e]=s,s}},n.removeData=function(t,e){var s=t[n.expando],r=s&&i[s];r&&n.each(e,function(t,e){delete r[e]})},n.extend=function(){var t,e,i,s,r,o,a=arguments[0]||{},l=1,c=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[l]||{},l++),"object"!=typeof a&&"function"!==n.type(a)&&(a={}),l===c&&(a=this,l--);c>l;l++)if(null!=(r=arguments[l]))for(s in r)t=a[s],i=r[s],a!==i&&(u&&i&&(n.isPlainObject(i)||(e=n.isArray(i)))?(e?(e=!1,o=t&&n.isArray(t)?t:[]):o=t&&n.isPlainObject(t)?t:{},a[s]=n.extend(u,o,i)):void 0!==i&&(a[s]=i));return a},n.queue=function(t,i,s){function r(t,n){var i=n||[];return null!=t&&(e(Object(t))?function(t,e){for(var n=+e.length,i=0,s=t.length;n>i;)t[s++]=e[i++];if(n!==n)for(;void 0!==e[i];)t[s++]=e[i++];t.length=s}(i,"string"==typeof t?[t]:t):[].push.call(i,t)),i}if(t){i=(i||"fx")+"queue";var o=n.data(t,i);return s?(!o||n.isArray(s)?o=n.data(t,i,r(s)):o.push(s),o):o||[]}},n.dequeue=function(t,e){n.each(t.nodeType?[t]:t,function(t,i){e=e||"fx";var s=n.queue(i,e),r=s.shift();"inprogress"===r&&(r=s.shift()),r&&("fx"===e&&s.unshift("inprogress"),r.call(i,function(){n.dequeue(i,e)}))})},n.fn=n.prototype={init:function(t){if(t.nodeType)return this[0]=t,this;throw new Error("Not a DOM node.")},offset:function(){var e=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:e.top+(t.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:e.left+(t.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){function t(){for(var t=this.offsetParent||document;t&&"html"===!t.nodeType.toLowerCase&&"static"===t.style.position;)t=t.offsetParent;return t||document}var e=this[0],t=t.apply(e),i=this.offset(),s=/^(?:body|html)$/i.test(t.nodeName)?{top:0,left:0}:n(t).offset();return i.top-=parseFloat(e.style.marginTop)||0,i.left-=parseFloat(e.style.marginLeft)||0,t.style&&(s.top+=parseFloat(t.style.borderTopWidth)||0,s.left+=parseFloat(t.style.borderLeftWidth)||0),{top:i.top-s.top,left:i.left-s.left}}};var i={};n.expando="velocity"+(new Date).getTime(),n.uuid=0;for(var s={},r=s.hasOwnProperty,o=s.toString,a="Boolean Number String Function Array Date RegExp Object Error".split(" "),l=0;l<a.length;l++)s["[object "+a[l]+"]"]=a[l].toLowerCase();n.fn.init.prototype=n.fn,t.Velocity={Utilities:n}}}(window),function(t){"object"==typeof module&&"object"==typeof module.exports?module.exports=t():"function"==typeof define&&define.amd?define(t):t()}(function(){return function(t,e,n,i){function s(t){for(var e=-1,n=t?t.length:0,i=[];++e<n;){var s=t[e];s&&i.push(s)}return i}function r(t){return g.isWrapped(t)?t=[].slice.call(t):g.isNode(t)&&(t=[t]),t}function o(t){var e=h.data(t,"velocity");return null===e?i:e}function a(t){return function(e){return Math.round(e*t)*(1/t)}}function l(t,n,i,s){function r(t,e){return 1-3*e+3*t}function o(t,e){return 3*e-6*t}function a(t){return 3*t}function l(t,e,n){return((r(e,n)*t+o(e,n))*t+a(e))*t}function c(t,e,n){return 3*r(e,n)*t*t+2*o(e,n)*t+a(e)}function u(e,n){for(var s=0;g>s;++s){var r=c(n,t,i);if(0===r)return n;n-=(l(n,t,i)-e)/r}return n}function p(){for(var e=0;b>e;++e)T[e]=l(e*_,t,i)}function h(e,n,s){var r,o,a=0;do{o=n+(s-n)/2,r=l(o,t,i)-e,r>0?s=o:n=o}while(Math.abs(r)>v&&++a<y);return o}function d(e){for(var n=0,s=1,r=b-1;s!=r&&T[s]<=e;++s)n+=_;--s;var o=(e-T[s])/(T[s+1]-T[s]),a=n+o*_,l=c(a,t,i);return l>=m?u(e,a):0==l?a:h(e,n,n+_)}function f(){S=!0,(t!=n||i!=s)&&p()}var g=4,m=.001,v=1e-7,y=10,b=11,_=1/(b-1),w="Float32Array"in e;if(4!==arguments.length)return!1;for(var k=0;4>k;++k)if("number"!=typeof arguments[k]||isNaN(arguments[k])||!isFinite(arguments[k]))return!1;t=Math.min(t,1),i=Math.min(i,1),t=Math.max(t,0),i=Math.max(i,0);var T=w?new Float32Array(b):new Array(b),S=!1,C=function(e){return S||f(),t===n&&i===s?e:0===e?0:1===e?1:l(d(e),n,s)};C.getControlPoints=function(){return[{x:t,y:n},{x:i,y:s}]};var A="generateBezier("+[t,n,i,s]+")";return C.toString=function(){return A},C}function c(t,e){var n=t;return g.isString(t)?b.Easings[t]||(n=!1):n=g.isArray(t)&&1===t.length?a.apply(null,t):g.isArray(t)&&2===t.length?_.apply(null,t.concat([e])):!(!g.isArray(t)||4!==t.length)&&l.apply(null,t),!1===n&&(n=b.Easings[b.defaults.easing]?b.defaults.easing:y),n}function u(t){if(t){var e=(new Date).getTime(),n=b.State.calls.length;n>1e4&&(b.State.calls=s(b.State.calls));for(var r=0;n>r;r++)if(b.State.calls[r]){var a=b.State.calls[r],l=a[0],c=a[2],d=a[3],f=!!d,m=null;d||(d=b.State.calls[r][3]=e-16);for(var v=Math.min((e-d)/c.duration,1),y=0,_=l.length;_>y;y++){var k=l[y],S=k.element;if(o(S)){var C=!1;if(c.display!==i&&null!==c.display&&"none"!==c.display){if("flex"===c.display){var A=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];h.each(A,function(t,e){w.setPropertyValue(S,"display",e)})}w.setPropertyValue(S,"display",c.display)}c.visibility!==i&&"hidden"!==c.visibility&&w.setPropertyValue(S,"visibility",c.visibility);for(var x in k)if("element"!==x){var j,I=k[x],D=g.isString(I.easing)?b.Easings[I.easing]:I.easing;if(1===v)j=I.endValue;else{var P=I.endValue-I.startValue;if(j=I.startValue+P*D(v,c,P),!f&&j===I.currentValue)continue}if(I.currentValue=j,"tween"===x)m=j;else{if(w.Hooks.registered[x]){var E=w.Hooks.getRoot(x),O=o(S).rootPropertyValueCache[E];O&&(I.rootPropertyValue=O)}var N=w.setPropertyValue(S,x,I.currentValue+(0===parseFloat(j)?"":I.unitType),I.rootPropertyValue,I.scrollData);w.Hooks.registered[x]&&(o(S).rootPropertyValueCache[E]=w.Normalizations.registered[E]?w.Normalizations.registered[E]("extract",null,N[1]):N[1]),"transform"===N[0]&&(C=!0)}}c.mobileHA&&o(S).transformCache.translate3d===i&&(o(S).transformCache.translate3d="(0px, 0px, 0px)",C=!0),C&&w.flushTransformCache(S)}}c.display!==i&&"none"!==c.display&&(b.State.calls[r][2].display=!1),c.visibility!==i&&"hidden"!==c.visibility&&(b.State.calls[r][2].visibility=!1),c.progress&&c.progress.call(a[1],a[1],v,Math.max(0,d+c.duration-e),d,m),1===v&&p(r)}}b.State.isTicking&&T(u)}function p(t,e){if(!b.State.calls[t])return!1;for(var n=b.State.calls[t][0],s=b.State.calls[t][1],r=b.State.calls[t][2],a=b.State.calls[t][4],l=!1,c=0,u=n.length;u>c;c++){var p=n[c].element;if(e||r.loop||("none"===r.display&&w.setPropertyValue(p,"display",r.display),"hidden"===r.visibility&&w.setPropertyValue(p,"visibility",r.visibility)),!0!==r.loop&&(h.queue(p)[1]===i||!/\.velocityQueueEntryFlag/i.test(h.queue(p)[1]))&&o(p)){o(p).isAnimating=!1,o(p).rootPropertyValueCache={};var d=!1;h.each(w.Lists.transforms3D,function(t,e){var n=/^scale/.test(e)?1:0,s=o(p).transformCache[e];o(p).transformCache[e]!==i&&new RegExp("^\\("+n+"[^.]").test(s)&&(d=!0,delete o(p).transformCache[e])}),r.mobileHA&&(d=!0,delete o(p).transformCache.translate3d),d&&w.flushTransformCache(p),w.Values.removeClass(p,"velocity-animating")}if(!e&&r.complete&&!r.loop&&c===u-1)try{r.complete.call(s,s)}catch(t){setTimeout(function(){throw t},1)}a&&!0!==r.loop&&a(s),!0!==r.loop||e||(h.each(o(p).tweensContainer,function(t,e){/^rotate/.test(t)&&360===parseFloat(e.endValue)&&(e.endValue=0,e.startValue=360),/^backgroundPosition/.test(t)&&100===parseFloat(e.endValue)&&"%"===e.unitType&&(e.endValue=0,e.startValue=100)}),b(p,"reverse",{loop:!0,delay:r.delay})),!1!==r.queue&&h.dequeue(p,r.queue)}b.State.calls[t]=!1;for(var f=0,g=b.State.calls.length;g>f;f++)if(!1!==b.State.calls[f]){l=!0;break}!1===l&&(b.State.isTicking=!1,delete b.State.calls,b.State.calls=[])}var h,d=function(){if(n.documentMode)return n.documentMode;for(var t=7;t>4;t--){var e=n.createElement("div");if(e.innerHTML="<!--[if IE "+t+"]><span></span><![endif]-->",e.getElementsByTagName("span").length)return e=null,t}return i}(),f=function(){var t=0;return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||function(e){var n,i=(new Date).getTime();return n=Math.max(0,16-(i-t)),t=i+n,setTimeout(function(){e(i+n)},n)}}(),g={isString:function(t){return"string"==typeof t},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},isFunction:function(t){return"[object Function]"===Object.prototype.toString.call(t)},isNode:function(t){return t&&t.nodeType},isNodeList:function(t){return"object"==typeof t&&/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(t))&&t.length!==i&&(0===t.length||"object"==typeof t[0]&&t[0].nodeType>0)},isWrapped:function(t){return t&&(t.jquery||e.Zepto&&e.Zepto.zepto.isZ(t))},isSVG:function(t){return e.SVGElement&&t instanceof e.SVGElement},isEmptyObject:function(t){for(var e in t)return!1;return!0}},m=!1;if(t.fn&&t.fn.jquery?(h=t,m=!0):h=e.Velocity.Utilities,8>=d&&!m)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(7>=d)return void(jQuery.fn.velocity=jQuery.fn.animate);var v=400,y="swing",b={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isAndroid:/Android/i.test(navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(navigator.userAgent),isChrome:e.chrome,isFirefox:/Firefox/i.test(navigator.userAgent),prefixElement:n.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[]},CSS:{},Utilities:h,Redirects:{},Easings:{},Promise:e.Promise,defaults:{queue:"",duration:v,easing:y,begin:i,complete:i,progress:i,display:i,visibility:i,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0},init:function(t){h.data(t,"velocity",{isSVG:g.isSVG(t),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:2,patch:1},debug:!1};e.pageYOffset!==i?(b.State.scrollAnchor=e,b.State.scrollPropertyLeft="pageXOffset",b.State.scrollPropertyTop="pageYOffset"):(b.State.scrollAnchor=n.documentElement||n.body.parentNode||n.body,b.State.scrollPropertyLeft="scrollLeft",b.State.scrollPropertyTop="scrollTop");var _=function(){function t(t){return-t.tension*t.x-t.friction*t.v}function e(e,n,i){var s={x:e.x+i.dx*n,v:e.v+i.dv*n,tension:e.tension,friction:e.friction};return{dx:s.v,dv:t(s)}}function n(n,i){var s={dx:n.v,dv:t(n)},r=e(n,.5*i,s),o=e(n,.5*i,r),a=e(n,i,o),l=1/6*(s.dx+2*(r.dx+o.dx)+a.dx),c=1/6*(s.dv+2*(r.dv+o.dv)+a.dv);return n.x=n.x+l*i,n.v=n.v+c*i,n}return function t(e,i,s){var r,o,a,l={x:-1,v:0,tension:null,friction:null},c=[0],u=0,p=1e-4,h=.016;for(e=parseFloat(e)||500,i=parseFloat(i)||20,s=s||null,l.tension=e,l.friction=i,r=null!==s,r?(u=t(e,i),o=u/s*h):o=h;a=n(a||l,o),c.push(1+a.x),u+=16,Math.abs(a.x)>p&&Math.abs(a.v)>p;);return r?function(t){return c[t*(c.length-1)|0]}:u}}();b.Easings={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},spring:function(t){return 1-Math.cos(4.5*t*Math.PI)*Math.exp(6*-t)}},h.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(t,e){b.Easings[e[0]]=l.apply(null,e[1])});var w=b.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"]},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var t=0;t<w.Lists.colors.length;t++){var e="color"===w.Lists.colors[t]?"0 0 0 1":"255 255 255 1";w.Hooks.templates[w.Lists.colors[t]]=["Red Green Blue Alpha",e]}var n,i,s;if(d)for(n in w.Hooks.templates){i=w.Hooks.templates[n],s=i[0].split(" ");var r=i[1].match(w.RegEx.valueSplit);"Color"===s[0]&&(s.push(s.shift()),r.push(r.shift()),w.Hooks.templates[n]=[s.join(" "),r.join(" ")])}for(n in w.Hooks.templates){i=w.Hooks.templates[n],s=i[0].split(" ");for(var t in s){var o=n+s[t],a=t;w.Hooks.registered[o]=[n,a]}}},getRoot:function(t){var e=w.Hooks.registered[t];return e?e[0]:t},cleanRootPropertyValue:function(t,e){return w.RegEx.valueUnwrap.test(e)&&(e=e.match(w.RegEx.valueUnwrap)[1]),w.Values.isCSSNullValue(e)&&(e=w.Hooks.templates[t][1]),e},extractValue:function(t,e){var n=w.Hooks.registered[t];if(n){var i=n[0],s=n[1];return e=w.Hooks.cleanRootPropertyValue(i,e),e.toString().match(w.RegEx.valueSplit)[s]}return e},injectValue:function(t,e,n){var i=w.Hooks.registered[t];if(i){var s,r=i[0],o=i[1];return n=w.Hooks.cleanRootPropertyValue(r,n),s=n.toString().match(w.RegEx.valueSplit),s[o]=e,s.join(" ")}return n}},Normalizations:{registered:{clip:function(t,e,n){switch(t){case"name":return"clip";case"extract":var i;return w.RegEx.wrappedValueAlreadyExtracted.test(n)?i=n:(i=n.toString().match(w.RegEx.valueUnwrap),i=i?i[1].replace(/,(\s+)?/g," "):n),i;case"inject":return"rect("+n+")"}},blur:function(t,e,n){switch(t){case"name":return b.State.isFirefox?"filter":"-webkit-filter";case"extract":var i=parseFloat(n);if(!i&&0!==i){var s=n.toString().match(/blur\(([0-9]+[A-z]+)\)/i);i=s?s[1]:0}return i;case"inject":return parseFloat(n)?"blur("+n+")":"none"}},opacity:function(t,e,n){if(8>=d)switch(t){case"name":return"filter";case"extract":var i=n.toString().match(/alpha\(opacity=(.*)\)/i);return n=i?i[1]/100:1;case"inject":return e.style.zoom=1,parseFloat(n)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(n),10)+")"}else switch(t){case"name":return"opacity";case"extract":case"inject":return n}}},register:function(){9>=d||b.State.isGingerbread||(w.Lists.transformsBase=w.Lists.transformsBase.concat(w.Lists.transforms3D));for(var t=0;t<w.Lists.transformsBase.length;t++)!function(){var e=w.Lists.transformsBase[t];w.Normalizations.registered[e]=function(t,n,s){switch(t){case"name":return"transform";case"extract":return o(n)===i||o(n).transformCache[e]===i?/^scale/i.test(e)?1:0:o(n).transformCache[e].replace(/[()]/g,"");case"inject":var r=!1;switch(e.substr(0,e.length-1)){case"translate":r=!/(%|px|em|rem|vw|vh|\d)$/i.test(s);break;case"scal":case"scale":b.State.isAndroid&&o(n).transformCache[e]===i&&1>s&&(s=1),r=!/(\d)$/i.test(s);break;case"skew":r=!/(deg|\d)$/i.test(s);break;case"rotate":r=!/(deg|\d)$/i.test(s)}return r||(o(n).transformCache[e]="("+s+")"),o(n).transformCache[e]}}}();for(var t=0;t<w.Lists.colors.length;t++)!function(){var e=w.Lists.colors[t];w.Normalizations.registered[e]=function(t,n,s){switch(t){case"name":return e;case"extract":var r;if(w.RegEx.wrappedValueAlreadyExtracted.test(s))r=s;else{var o,a={black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",red:"rgb(255, 0, 0)",white:"rgb(255, 255, 255)"};/^[A-z]+$/i.test(s)?o=a[s]!==i?a[s]:a.black:w.RegEx.isHex.test(s)?o="rgb("+w.Values.hexToRgb(s).join(" ")+")":/^rgba?\(/i.test(s)||(o=a.black),r=(o||s).toString().match(w.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")}return 8>=d||3!==r.split(" ").length||(r+=" 1"),r;case"inject":return 8>=d?4===s.split(" ").length&&(s=s.split(/\s+/).slice(0,3).join(" ")):3===s.split(" ").length&&(s+=" 1"),(8>=d?"rgb":"rgba")+"("+s.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")"}}}()}},Names:{camelCase:function(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})},SVGAttribute:function(t){var e="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(d||b.State.isAndroid&&!b.State.isChrome)&&(e+="|transform"),new RegExp("^("+e+")$","i").test(t)},prefixCheck:function(t){if(b.State.prefixMatches[t])return[b.State.prefixMatches[t],!0];for(var e=["","Webkit","Moz","ms","O"],n=0,i=e.length;i>n;n++){var s;if(s=0===n?t:e[n]+t.replace(/^\w/,function(t){return t.toUpperCase()}),g.isString(b.State.prefixElement.style[s]))return b.State.prefixMatches[t]=s,[s,!0]}return[t,!1]}},Values:{hexToRgb:function(t){var e,n=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return t=t.replace(n,function(t,e,n,i){return e+e+n+n+i+i}),e=i.exec(t),e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:[0,0,0]},isCSSNullValue:function(t){return 0==t||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(t)},getUnitType:function(t){return/^(rotate|skew)/i.test(t)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(t)?"":"px"},getDisplayType:function(t){var e=t&&t.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(e)?"inline":/^(li)$/i.test(e)?"list-item":/^(tr)$/i.test(e)?"table-row":/^(table)$/i.test(e)?"table":/^(tbody)$/i.test(e)?"table-row-group":"block"},addClass:function(t,e){t.classList?t.classList.add(e):t.className+=(t.className.length?" ":"")+e},removeClass:function(t,e){t.classList?t.classList.remove(e):t.className=t.className.toString().replace(new RegExp("(^|\\s)"+e.split(" ").join("|")+"(\\s|$)","gi")," ")}},getPropertyValue:function(t,n,s,r){function a(t,n){function s(){c&&w.setPropertyValue(t,"display","none")}var l=0;if(8>=d)l=h.css(t,n);else{var c=!1;if(/^(width|height)$/.test(n)&&0===w.getPropertyValue(t,"display")&&(c=!0,w.setPropertyValue(t,"display",w.Values.getDisplayType(t))),!r){if("height"===n&&"border-box"!==w.getPropertyValue(t,"boxSizing").toString().toLowerCase()){var u=t.offsetHeight-(parseFloat(w.getPropertyValue(t,"borderTopWidth"))||0)-(parseFloat(w.getPropertyValue(t,"borderBottomWidth"))||0)-(parseFloat(w.getPropertyValue(t,"paddingTop"))||0)-(parseFloat(w.getPropertyValue(t,"paddingBottom"))||0);return s(),u}if("width"===n&&"border-box"!==w.getPropertyValue(t,"boxSizing").toString().toLowerCase()){var p=t.offsetWidth-(parseFloat(w.getPropertyValue(t,"borderLeftWidth"))||0)-(parseFloat(w.getPropertyValue(t,"borderRightWidth"))||0)-(parseFloat(w.getPropertyValue(t,"paddingLeft"))||0)-(parseFloat(w.getPropertyValue(t,"paddingRight"))||0);return s(),p}}var f;f=o(t)===i?e.getComputedStyle(t,null):o(t).computedStyle?o(t).computedStyle:o(t).computedStyle=e.getComputedStyle(t,null),"borderColor"===n&&(n="borderTopColor"),l=9===d&&"filter"===n?f.getPropertyValue(n):f[n],(""===l||null===l)&&(l=t.style[n]),s()}if("auto"===l&&/^(top|right|bottom|left)$/i.test(n)){var g=a(t,"position");("fixed"===g||"absolute"===g&&/top|left/i.test(n))&&(l=h(t).position()[n]+"px")}return l}var l;if(w.Hooks.registered[n]){var c=n,u=w.Hooks.getRoot(c);s===i&&(s=w.getPropertyValue(t,w.Names.prefixCheck(u)[0])),w.Normalizations.registered[u]&&(s=w.Normalizations.registered[u]("extract",t,s)),l=w.Hooks.extractValue(c,s)}else if(w.Normalizations.registered[n]){var p,f;p=w.Normalizations.registered[n]("name",t),"transform"!==p&&(f=a(t,w.Names.prefixCheck(p)[0]),w.Values.isCSSNullValue(f)&&w.Hooks.templates[n]&&(f=w.Hooks.templates[n][1])),l=w.Normalizations.registered[n]("extract",t,f)}if(!/^[\d-]/.test(l))if(o(t)&&o(t).isSVG&&w.Names.SVGAttribute(n))if(/^(height|width)$/i.test(n))try{l=t.getBBox()[n]}catch(t){l=0}else l=t.getAttribute(n);else l=a(t,w.Names.prefixCheck(n)[0]);return w.Values.isCSSNullValue(l)&&(l=0),b.debug>=2&&console.log("Get "+n+": "+l),l},setPropertyValue:function(t,n,i,s,r){var a=n;if("scroll"===n)r.container?r.container["scroll"+r.direction]=i:"Left"===r.direction?e.scrollTo(i,r.alternateValue):e.scrollTo(r.alternateValue,i);else if(w.Normalizations.registered[n]&&"transform"===w.Normalizations.registered[n]("name",t))w.Normalizations.registered[n]("inject",t,i),a="transform",i=o(t).transformCache[n];else{if(w.Hooks.registered[n]){var l=n,c=w.Hooks.getRoot(n);s=s||w.getPropertyValue(t,c),i=w.Hooks.injectValue(l,i,s),n=c}if(w.Normalizations.registered[n]&&(i=w.Normalizations.registered[n]("inject",t,i),n=w.Normalizations.registered[n]("name",t)),
a=w.Names.prefixCheck(n)[0],8>=d)try{t.style[a]=i}catch(t){b.debug&&console.log("Browser does not support ["+i+"] for ["+a+"]")}else o(t)&&o(t).isSVG&&w.Names.SVGAttribute(n)?t.setAttribute(n,i):t.style[a]=i;b.debug>=2&&console.log("Set "+n+" ("+a+"): "+i)}return[a,i]},flushTransformCache:function(t){function e(e){return parseFloat(w.getPropertyValue(t,e))}var n="";if((d||b.State.isAndroid&&!b.State.isChrome)&&o(t).isSVG){var i={translate:[e("translateX"),e("translateY")],skewX:[e("skewX")],skewY:[e("skewY")],scale:1!==e("scale")?[e("scale"),e("scale")]:[e("scaleX"),e("scaleY")],rotate:[e("rotateZ"),0,0]};h.each(o(t).transformCache,function(t){/^translate/i.test(t)?t="translate":/^scale/i.test(t)?t="scale":/^rotate/i.test(t)&&(t="rotate"),i[t]&&(n+=t+"("+i[t].join(" ")+") ",delete i[t])})}else{var s,r;h.each(o(t).transformCache,function(e){return s=o(t).transformCache[e],"transformPerspective"===e?(r=s,!0):(9===d&&"rotateZ"===e&&(e="rotate"),void(n+=e+s+" "))}),r&&(n="perspective"+r+" "+n)}w.setPropertyValue(t,"transform",n)}};w.Hooks.register(),w.Normalizations.register(),b.hook=function(t,e,n){var s=i;return t=r(t),h.each(t,function(t,r){if(o(r)===i&&b.init(r),n===i)s===i&&(s=b.CSS.getPropertyValue(r,e));else{var a=b.CSS.setPropertyValue(r,e,n);"transform"===a[0]&&b.CSS.flushTransformCache(r),s=a}}),s};var k=function(){function t(){return a?x.promise||null:l}function s(){function t(){function t(t,e){var n=i,s=i,o=i;return g.isArray(t)?(n=t[0],!g.isArray(t[1])&&/^[\d-]/.test(t[1])||g.isFunction(t[1])||w.RegEx.isHex.test(t[1])?o=t[1]:(g.isString(t[1])&&!w.RegEx.isHex.test(t[1])||g.isArray(t[1]))&&(s=e?t[1]:c(t[1],a.duration),t[2]!==i&&(o=t[2]))):n=t,e||(s=s||a.easing),g.isFunction(n)&&(n=n.call(r,S,T)),g.isFunction(o)&&(o=o.call(r,S,T)),[n||0,s,o]}function p(t,e){var n,i;return i=(e||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(t){return n=t,""}),n||(n=w.Values.getUnitType(t)),[i,n]}function d(){var t={myParent:r.parentNode||n.body,position:w.getPropertyValue(r,"position"),fontSize:w.getPropertyValue(r,"fontSize")},i=t.position===N.lastPosition&&t.myParent===N.lastParent,s=t.fontSize===N.lastFontSize;N.lastParent=t.myParent,N.lastPosition=t.position,N.lastFontSize=t.fontSize;var a=100,l={};if(s&&i)l.emToPx=N.lastEmToPx,l.percentToPxWidth=N.lastPercentToPxWidth,l.percentToPxHeight=N.lastPercentToPxHeight;else{var c=o(r).isSVG?n.createElementNS("http://www.w3.org/2000/svg","rect"):n.createElement("div");b.init(c),t.myParent.appendChild(c),h.each(["overflow","overflowX","overflowY"],function(t,e){b.CSS.setPropertyValue(c,e,"hidden")}),b.CSS.setPropertyValue(c,"position",t.position),b.CSS.setPropertyValue(c,"fontSize",t.fontSize),b.CSS.setPropertyValue(c,"boxSizing","content-box"),h.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(t,e){b.CSS.setPropertyValue(c,e,a+"%")}),b.CSS.setPropertyValue(c,"paddingLeft",a+"em"),l.percentToPxWidth=N.lastPercentToPxWidth=(parseFloat(w.getPropertyValue(c,"width",null,!0))||1)/a,l.percentToPxHeight=N.lastPercentToPxHeight=(parseFloat(w.getPropertyValue(c,"height",null,!0))||1)/a,l.emToPx=N.lastEmToPx=(parseFloat(w.getPropertyValue(c,"paddingLeft"))||1)/a,t.myParent.removeChild(c)}return null===N.remToPx&&(N.remToPx=parseFloat(w.getPropertyValue(n.body,"fontSize"))||16),null===N.vwToPx&&(N.vwToPx=parseFloat(e.innerWidth)/100,N.vhToPx=parseFloat(e.innerHeight)/100),l.remToPx=N.remToPx,l.vwToPx=N.vwToPx,l.vhToPx=N.vhToPx,b.debug>=1&&console.log("Unit ratios: "+JSON.stringify(l),r),l}if(a.begin&&0===S)try{a.begin.call(f,f)}catch(t){setTimeout(function(){throw t},1)}if("scroll"===j){var v,_,k,C=/^x$/i.test(a.axis)?"Left":"Top",A=parseFloat(a.offset)||0;a.container?g.isWrapped(a.container)||g.isNode(a.container)?(a.container=a.container[0]||a.container,v=a.container["scroll"+C],k=v+h(r).position()[C.toLowerCase()]+A):a.container=null:(v=b.State.scrollAnchor[b.State["scrollProperty"+C]],_=b.State.scrollAnchor[b.State["scrollProperty"+("Left"===C?"Top":"Left")]],k=h(r).offset()[C.toLowerCase()]+A),l={scroll:{rootPropertyValue:!1,startValue:v,currentValue:v,endValue:k,unitType:"",easing:a.easing,scrollData:{container:a.container,direction:C,alternateValue:_}},element:r},b.debug&&console.log("tweensContainer (scroll): ",l.scroll,r)}else if("reverse"===j){if(!o(r).tweensContainer)return void h.dequeue(r,a.queue);"none"===o(r).opts.display&&(o(r).opts.display="auto"),"hidden"===o(r).opts.visibility&&(o(r).opts.visibility="visible"),o(r).opts.loop=!1,o(r).opts.begin=null,o(r).opts.complete=null,y.easing||delete a.easing,y.duration||delete a.duration,a=h.extend({},o(r).opts,a);var I=h.extend(!0,{},o(r).tweensContainer);for(var D in I)if("element"!==D){var P=I[D].startValue;I[D].startValue=I[D].currentValue=I[D].endValue,I[D].endValue=P,g.isEmptyObject(y)||(I[D].easing=a.easing),b.debug&&console.log("reverse tweensContainer ("+D+"): "+JSON.stringify(I[D]),r)}l=I}else if("start"===j){var I;o(r).tweensContainer&&!0===o(r).isAnimating&&(I=o(r).tweensContainer),h.each(m,function(e,n){if(RegExp("^"+w.Lists.colors.join("$|^")+"$").test(e)){var s=t(n,!0),r=s[0],o=s[1],a=s[2];if(w.RegEx.isHex.test(r)){for(var l=["Red","Green","Blue"],c=w.Values.hexToRgb(r),u=a?w.Values.hexToRgb(a):i,p=0;p<l.length;p++){var h=[c[p]];o&&h.push(o),u!==i&&h.push(u[p]),m[e+l[p]]=h}delete m[e]}}});for(var E in m){var O=t(m[E]),M=O[0],$=O[1],z=O[2];E=w.Names.camelCase(E);var L=w.Hooks.getRoot(E),U=!1;if(o(r).isSVG||"tween"===L||!1!==w.Names.prefixCheck(L)[1]||w.Normalizations.registered[L]!==i){(a.display!==i&&null!==a.display&&"none"!==a.display||a.visibility!==i&&"hidden"!==a.visibility)&&/opacity|filter/.test(E)&&!z&&0!==M&&(z=0),a._cacheValues&&I&&I[E]?(z===i&&(z=I[E].endValue+I[E].unitType),U=o(r).rootPropertyValueCache[L]):w.Hooks.registered[E]?z===i?(U=w.getPropertyValue(r,L),z=w.getPropertyValue(r,E,U)):U=w.Hooks.templates[L][1]:z===i&&(z=w.getPropertyValue(r,E));var q,F,B,J=!1;if(q=p(E,z),z=q[0],B=q[1],q=p(E,M),M=q[0].replace(/^([+-\/*])=/,function(t,e){return J=e,""}),F=q[1],z=parseFloat(z)||0,M=parseFloat(M)||0,"%"===F&&(/^(fontSize|lineHeight)$/.test(E)?(M/=100,F="em"):/^scale/.test(E)?(M/=100,F=""):/(Red|Green|Blue)$/i.test(E)&&(M=M/100*255,F="")),/[\/*]/.test(J))F=B;else if(B!==F&&0!==z)if(0===M)F=B;else{s=s||d();var W=/margin|padding|left|right|width|text|word|letter/i.test(E)||/X$/.test(E)||"x"===E?"x":"y";switch(B){case"%":z*="x"===W?s.percentToPxWidth:s.percentToPxHeight;break;case"px":break;default:z*=s[B+"ToPx"]}switch(F){case"%":z*=1/("x"===W?s.percentToPxWidth:s.percentToPxHeight);break;case"px":break;default:z*=1/s[F+"ToPx"]}}switch(J){case"+":M=z+M;break;case"-":M=z-M;break;case"*":M*=z;break;case"/":M=z/M}l[E]={rootPropertyValue:U,startValue:z,currentValue:z,endValue:M,unitType:F,easing:$},b.debug&&console.log("tweensContainer ("+E+"): "+JSON.stringify(l[E]),r)}else b.debug&&console.log("Skipping ["+L+"] due to a lack of browser support.")}l.element=r}l.element&&(w.Values.addClass(r,"velocity-animating"),R.push(l),""===a.queue&&(o(r).tweensContainer=l,o(r).opts=a),o(r).isAnimating=!0,S===T-1?(b.State.calls.push([R,f,a,null,x.resolver]),!1===b.State.isTicking&&(b.State.isTicking=!0,u())):S++)}var s,r=this,a=h.extend({},b.defaults,y),l={};switch(o(r)===i&&b.init(r),parseFloat(a.delay)&&!1!==a.queue&&h.queue(r,a.queue,function(t){b.velocityQueueEntryFlag=!0,o(r).delayTimer={setTimeout:setTimeout(t,parseFloat(a.delay)),next:t}}),a.duration.toString().toLowerCase()){case"fast":a.duration=200;break;case"normal":a.duration=v;break;case"slow":a.duration=600;break;default:a.duration=parseFloat(a.duration)||1}!1!==b.mock&&(!0===b.mock?a.duration=a.delay=1:(a.duration*=parseFloat(b.mock)||1,a.delay*=parseFloat(b.mock)||1)),a.easing=c(a.easing,a.duration),a.begin&&!g.isFunction(a.begin)&&(a.begin=null),a.progress&&!g.isFunction(a.progress)&&(a.progress=null),a.complete&&!g.isFunction(a.complete)&&(a.complete=null),a.display!==i&&null!==a.display&&(a.display=a.display.toString().toLowerCase(),"auto"===a.display&&(a.display=b.CSS.Values.getDisplayType(r))),a.visibility!==i&&null!==a.visibility&&(a.visibility=a.visibility.toString().toLowerCase()),a.mobileHA=a.mobileHA&&b.State.isMobile&&!b.State.isGingerbread,!1===a.queue?a.delay?setTimeout(t,a.delay):t():h.queue(r,a.queue,function(e,n){return!0===n?(x.promise&&x.resolver(f),!0):(b.velocityQueueEntryFlag=!0,void t(e))}),""!==a.queue&&"fx"!==a.queue||"inprogress"===h.queue(r)[0]||h.dequeue(r)}var a,l,d,f,m,y,_=arguments[0]&&(arguments[0].p||h.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||g.isString(arguments[0].properties));if(g.isWrapped(this)?(a=!1,d=0,f=this,l=this):(a=!0,d=1,f=_?arguments[0].elements||arguments[0].e:arguments[0]),f=r(f)){_?(m=arguments[0].properties||arguments[0].p,y=arguments[0].options||arguments[0].o):(m=arguments[d],y=arguments[d+1]);var T=f.length,S=0;if(!/^(stop|finish)$/i.test(m)&&!h.isPlainObject(y)){var C=d+1;y={};for(var A=C;A<arguments.length;A++)g.isArray(arguments[A])||!/^(fast|normal|slow)$/i.test(arguments[A])&&!/^\d/.test(arguments[A])?g.isString(arguments[A])||g.isArray(arguments[A])?y.easing=arguments[A]:g.isFunction(arguments[A])&&(y.complete=arguments[A]):y.duration=arguments[A]}var x={promise:null,resolver:null,rejecter:null};a&&b.Promise&&(x.promise=new b.Promise(function(t,e){x.resolver=t,x.rejecter=e}));var j;switch(m){case"scroll":j="scroll";break;case"reverse":j="reverse";break;case"finish":case"stop":h.each(f,function(t,e){o(e)&&o(e).delayTimer&&(clearTimeout(o(e).delayTimer.setTimeout),o(e).delayTimer.next&&o(e).delayTimer.next(),delete o(e).delayTimer)});var I=[];return h.each(b.State.calls,function(t,e){e&&h.each(e[1],function(n,s){var r=y===i?"":y;return!0!==r&&e[2].queue!==r&&(y!==i||!1!==e[2].queue)||void h.each(f,function(n,i){i===s&&((!0===y||g.isString(y))&&(h.each(h.queue(i,g.isString(y)?y:""),function(t,e){g.isFunction(e)&&e(null,!0)}),h.queue(i,g.isString(y)?y:"",[])),"stop"===m?(o(i)&&o(i).tweensContainer&&!1!==r&&h.each(o(i).tweensContainer,function(t,e){e.endValue=e.currentValue}),I.push(t)):"finish"===m&&(e[2].duration=1))})})}),"stop"===m&&(h.each(I,function(t,e){p(e,!0)}),x.promise&&x.resolver(f)),t();default:if(!h.isPlainObject(m)||g.isEmptyObject(m)){if(g.isString(m)&&b.Redirects[m]){var D=h.extend({},y),P=D.duration,E=D.delay||0;return!0===D.backwards&&(f=h.extend(!0,[],f).reverse()),h.each(f,function(t,e){parseFloat(D.stagger)?D.delay=E+parseFloat(D.stagger)*t:g.isFunction(D.stagger)&&(D.delay=E+D.stagger.call(e,t,T)),D.drag&&(D.duration=parseFloat(P)||(/^(callout|transition)/.test(m)?1e3:v),D.duration=Math.max(D.duration*(D.backwards?1-t/T:(t+1)/T),.75*D.duration,200)),b.Redirects[m].call(e,e,D||{},t,T,f,x.promise?x:i)}),t()}var O="Velocity: First argument ("+m+") was not a property map, a known action, or a registered redirect. Aborting.";return x.promise?x.rejecter(new Error(O)):console.log(O),t()}j="start"}var N={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},R=[];h.each(f,function(t,e){g.isNode(e)&&s.call(e)});var M,D=h.extend({},b.defaults,y);if(D.loop=parseInt(D.loop),M=2*D.loop-1,D.loop)for(var $=0;M>$;$++){var z={delay:D.delay,progress:D.progress};$===M-1&&(z.display=D.display,z.visibility=D.visibility,z.complete=D.complete),k(f,"reverse",z)}return t()}};b=h.extend(k,b),b.animate=k;var T=e.requestAnimationFrame||f;return b.State.isMobile||n.hidden===i||n.addEventListener("visibilitychange",function(){n.hidden?(T=function(t){return setTimeout(function(){t(!0)},16)},u()):T=e.requestAnimationFrame||f}),t.Velocity=b,t!==e&&(t.fn.velocity=k,t.fn.velocity.defaults=b.defaults),h.each(["Down","Up"],function(t,e){b.Redirects["slide"+e]=function(t,n,s,r,o,a){var l=h.extend({},n),c=l.begin,u=l.complete,p={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""},d={};l.display===i&&(l.display="Down"===e?"inline"===b.CSS.Values.getDisplayType(t)?"inline-block":"block":"none"),l.begin=function(){c&&c.call(o,o);for(var n in p){d[n]=t.style[n];var i=b.CSS.getPropertyValue(t,n);p[n]="Down"===e?[i,0]:[0,i]}d.overflow=t.style.overflow,t.style.overflow="hidden"},l.complete=function(){for(var e in d)t.style[e]=d[e];u&&u.call(o,o),a&&a.resolver(o)},b(t,p,l)}}),h.each(["In","Out"],function(t,e){b.Redirects["fade"+e]=function(t,n,s,r,o,a){var l=h.extend({},n),c={opacity:"In"===e?1:0},u=l.complete;l.complete=s!==r-1?l.begin=null:function(){u&&u.call(o,o),a&&a.resolver(o)},l.display===i&&(l.display="In"===e?"auto":"none"),b(this,c,l)}}),b}(window.jQuery||window.Zepto||window,window,document)}),function(t){"function"==typeof require&&"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(["velocity"],t):t()}(function(){return function(t,e,n,i){function s(t,e){var n=[];return!(!t||!e)&&(o.each([t,e],function(t,e){var i=[];o.each(e,function(t,e){for(;e.toString().length<5;)e="0"+e;i.push(e)}),n.push(i.join(""))}),parseFloat(n[0])>parseFloat(n[1]))}if(!t.Velocity||!t.Velocity.Utilities)return void(e.console&&console.log("Velocity UI Pack: Velocity must be loaded first. Aborting."));var r=t.Velocity,o=r.Utilities;if(s({major:1,minor:1,patch:0},r.version)){var a="Velocity UI Pack: You need to update Velocity (jquery.velocity.js) to a newer version. Visit http://github.com/julianshapiro/velocity.";throw alert(a),new Error(a)}r.RegisterEffect=r.RegisterUI=function(t,e){function n(t,e,n,i){var s,a=0;o.each(t.nodeType?[t]:t,function(t,e){i&&(n+=t*i),s=e.parentNode,o.each(["height","paddingTop","paddingBottom","marginTop","marginBottom"],function(t,n){a+=parseFloat(r.CSS.getPropertyValue(e,n))})}),r.animate(s,{height:("In"===e?"+":"-")+"="+a},{queue:!1,easing:"ease-in-out",duration:n*("In"===e?.6:1)})}return r.Redirects[t]=function(s,a,l,c,u,p){function h(){a.display!==i&&"none"!==a.display||!/Out$/.test(t)||o.each(u.nodeType?[u]:u,function(t,e){r.CSS.setPropertyValue(e,"display","none")}),a.complete&&a.complete.call(u,u),p&&p.resolver(u||s)}var d=l===c-1;"function"==typeof e.defaultDuration?e.defaultDuration=e.defaultDuration.call(u,u):e.defaultDuration=parseFloat(e.defaultDuration);for(var f=0;f<e.calls.length;f++){var g=e.calls[f],m=g[0],v=a.duration||e.defaultDuration||1e3,y=g[1],b=g[2]||{},_={};if(_.duration=v*(y||1),_.queue=a.queue||"",_.easing=b.easing||"ease",_.delay=parseFloat(b.delay)||0,_._cacheValues=b._cacheValues||!0,0===f){if(_.delay+=parseFloat(a.delay)||0,0===l&&(_.begin=function(){a.begin&&a.begin.call(u,u);var e=t.match(/(In|Out)$/);e&&"In"===e[0]&&m.opacity!==i&&o.each(u.nodeType?[u]:u,function(t,e){r.CSS.setPropertyValue(e,"opacity",0)}),a.animateParentHeight&&e&&n(u,e[0],v+_.delay,a.stagger)}),null!==a.display)if(a.display!==i&&"none"!==a.display)_.display=a.display;else if(/In$/.test(t)){var w=r.CSS.Values.getDisplayType(s);_.display="inline"===w?"inline-block":w}a.visibility&&"hidden"!==a.visibility&&(_.visibility=a.visibility)}f===e.calls.length-1&&(_.complete=function(){if(e.reset){for(var t in e.reset){var n=e.reset[t];r.CSS.Hooks.registered[t]!==i||"string"!=typeof n&&"number"!=typeof n||(e.reset[t]=[e.reset[t],e.reset[t]])}var o={duration:0,queue:!1};d&&(o.complete=h),r.animate(s,e.reset,o)}else d&&h()},"hidden"===a.visibility&&(_.visibility=a.visibility)),r.animate(s,m,_)}},r},r.RegisterEffect.packagedEffects={"callout.bounce":{defaultDuration:550,calls:[[{translateY:-30},.25],[{translateY:0},.125],[{translateY:-15},.125],[{translateY:0},.25]]},"callout.shake":{defaultDuration:800,calls:[[{translateX:-11},.125],[{translateX:11},.125],[{translateX:-11},.125],[{translateX:11},.125],[{translateX:-11},.125],[{translateX:11},.125],[{translateX:-11},.125],[{translateX:0},.125]]},"callout.flash":{defaultDuration:1100,calls:[[{opacity:[0,"easeInOutQuad",1]},.25],[{opacity:[1,"easeInOutQuad"]},.25],[{opacity:[0,"easeInOutQuad"]},.25],[{opacity:[1,"easeInOutQuad"]},.25]]},"callout.pulse":{defaultDuration:825,calls:[[{scaleX:1.1,scaleY:1.1},.5,{easing:"easeInExpo"}],[{scaleX:1,scaleY:1},.5]]},"callout.swing":{defaultDuration:950,calls:[[{rotateZ:15},.2],[{rotateZ:-10},.2],[{rotateZ:5},.2],[{rotateZ:-5},.2],[{rotateZ:0},.2]]},"callout.tada":{defaultDuration:1e3,calls:[[{scaleX:.9,scaleY:.9,rotateZ:-3},.1],[{scaleX:1.1,scaleY:1.1,rotateZ:3},.1],[{scaleX:1.1,scaleY:1.1,rotateZ:-3},.1],["reverse",.125],["reverse",.125],["reverse",.125],["reverse",.125],["reverse",.125],[{scaleX:1,scaleY:1,rotateZ:0},.2]]},"transition.fadeIn":{defaultDuration:500,calls:[[{opacity:[1,0]}]]},"transition.fadeOut":{defaultDuration:500,calls:[[{opacity:[0,1]}]]},"transition.flipXIn":{defaultDuration:700,calls:[[{opacity:[1,0],transformPerspective:[800,800],rotateY:[0,-55]}]],reset:{transformPerspective:0}},"transition.flipXOut":{defaultDuration:700,calls:[[{opacity:[0,1],transformPerspective:[800,800],rotateY:55}]],reset:{transformPerspective:0,rotateY:0}},"transition.flipYIn":{defaultDuration:800,calls:[[{opacity:[1,0],transformPerspective:[800,800],rotateX:[0,-45]}]],reset:{transformPerspective:0}},"transition.flipYOut":{defaultDuration:800,calls:[[{opacity:[0,1],transformPerspective:[800,800],rotateX:25}]],reset:{transformPerspective:0,rotateX:0}},"transition.flipBounceXIn":{defaultDuration:900,calls:[[{opacity:[.725,0],transformPerspective:[400,400],rotateY:[-10,90]},.5],[{opacity:.8,rotateY:10},.25],[{opacity:1,rotateY:0},.25]],reset:{transformPerspective:0}},"transition.flipBounceXOut":{defaultDuration:800,calls:[[{opacity:[.9,1],transformPerspective:[400,400],rotateY:-10},.5],[{opacity:0,rotateY:90},.5]],reset:{transformPerspective:0,rotateY:0}},"transition.flipBounceYIn":{defaultDuration:850,calls:[[{opacity:[.725,0],transformPerspective:[400,400],rotateX:[-10,90]},.5],[{opacity:.8,rotateX:10},.25],[{opacity:1,rotateX:0},.25]],reset:{transformPerspective:0}},"transition.flipBounceYOut":{defaultDuration:800,calls:[[{opacity:[.9,1],transformPerspective:[400,400],rotateX:-15},.5],[{opacity:0,rotateX:90},.5]],reset:{transformPerspective:0,rotateX:0}},"transition.swoopIn":{defaultDuration:850,calls:[[{opacity:[1,0],transformOriginX:["100%","50%"],transformOriginY:["100%","100%"],scaleX:[1,0],scaleY:[1,0],translateX:[0,-700],translateZ:0}]],reset:{transformOriginX:"50%",transformOriginY:"50%"}},"transition.swoopOut":{defaultDuration:850,calls:[[{opacity:[0,1],transformOriginX:["50%","100%"],transformOriginY:["100%","100%"],scaleX:0,scaleY:0,translateX:-700,translateZ:0}]],reset:{transformOriginX:"50%",transformOriginY:"50%",scaleX:1,scaleY:1,translateX:0}},"transition.whirlIn":{defaultDuration:850,calls:[[{opacity:[1,0],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:[1,0],scaleY:[1,0],rotateY:[0,160]},1,{easing:"easeInOutSine"}]]},"transition.whirlOut":{defaultDuration:750,calls:[[{opacity:[0,"easeInOutQuint",1],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:0,scaleY:0,rotateY:160},1,{easing:"swing"}]],reset:{scaleX:1,scaleY:1,rotateY:0}},"transition.shrinkIn":{defaultDuration:750,calls:[[{opacity:[1,0],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:[1,1.5],scaleY:[1,1.5],translateZ:0}]]},"transition.shrinkOut":{defaultDuration:600,calls:[[{opacity:[0,1],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:1.3,scaleY:1.3,translateZ:0}]],reset:{scaleX:1,scaleY:1}},"transition.expandIn":{defaultDuration:700,calls:[[{opacity:[1,0],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:[1,.625],scaleY:[1,.625],translateZ:0}]]},"transition.expandOut":{defaultDuration:700,calls:[[{opacity:[0,1],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:.5,scaleY:.5,translateZ:0}]],reset:{scaleX:1,scaleY:1}},"transition.bounceIn":{defaultDuration:800,calls:[[{opacity:[1,0],scaleX:[1.05,.3],scaleY:[1.05,.3]},.4],[{scaleX:.9,scaleY:.9,translateZ:0},.2],[{scaleX:1,scaleY:1},.5]]},"transition.bounceOut":{defaultDuration:800,calls:[[{scaleX:.95,scaleY:.95},.35],[{scaleX:1.1,scaleY:1.1,translateZ:0},.35],[{opacity:[0,1],scaleX:.3,scaleY:.3},.3]],reset:{scaleX:1,scaleY:1}},"transition.bounceUpIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateY:[-30,1e3]},.6,{easing:"easeOutCirc"}],[{translateY:10},.2],[{translateY:0},.2]]},"transition.bounceUpOut":{defaultDuration:1e3,calls:[[{translateY:20},.2],[{opacity:[0,"easeInCirc",1],translateY:-1e3},.8]],reset:{translateY:0}},"transition.bounceDownIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateY:[30,-1e3]},.6,{easing:"easeOutCirc"}],[{translateY:-10},.2],[{translateY:0},.2]]},"transition.bounceDownOut":{defaultDuration:1e3,calls:[[{translateY:-20},.2],[{opacity:[0,"easeInCirc",1],translateY:1e3},.8]],reset:{translateY:0}},"transition.bounceLeftIn":{defaultDuration:750,calls:[[{opacity:[1,0],translateX:[30,-1250]},.6,{easing:"easeOutCirc"}],[{translateX:-10},.2],[{translateX:0},.2]]},"transition.bounceLeftOut":{defaultDuration:750,calls:[[{translateX:30},.2],[{opacity:[0,"easeInCirc",1],translateX:-1250},.8]],reset:{translateX:0}},"transition.bounceRightIn":{defaultDuration:750,calls:[[{opacity:[1,0],translateX:[-30,1250]},.6,{easing:"easeOutCirc"}],[{translateX:10},.2],[{translateX:0},.2]]},"transition.bounceRightOut":{defaultDuration:750,calls:[[{translateX:-30},.2],[{opacity:[0,"easeInCirc",1],translateX:1250},.8]],reset:{translateX:0}},"transition.slideUpIn":{defaultDuration:900,calls:[[{opacity:[1,0],translateY:[0,20],translateZ:0}]]},"transition.slideUpOut":{defaultDuration:900,calls:[[{opacity:[0,1],translateY:-20,translateZ:0}]],reset:{translateY:0}},"transition.slideDownIn":{defaultDuration:900,calls:[[{opacity:[1,0],translateY:[0,-20],translateZ:0}]]},"transition.slideDownOut":{defaultDuration:900,calls:[[{opacity:[0,1],translateY:20,translateZ:0}]],reset:{translateY:0}},"transition.slideLeftIn":{defaultDuration:1e3,calls:[[{opacity:[1,0],translateX:[0,-20],translateZ:0}]]},"transition.slideLeftOut":{defaultDuration:1050,calls:[[{opacity:[0,1],translateX:-20,translateZ:0}]],reset:{translateX:0}},"transition.slideRightIn":{defaultDuration:1e3,calls:[[{opacity:[1,0],translateX:[0,20],translateZ:0}]]},"transition.slideRightOut":{defaultDuration:1050,calls:[[{opacity:[0,1],translateX:20,translateZ:0}]],reset:{translateX:0}},"transition.slideUpBigIn":{defaultDuration:850,calls:[[{opacity:[1,0],translateY:[0,75],translateZ:0}]]},"transition.slideUpBigOut":{defaultDuration:800,calls:[[{opacity:[0,1],translateY:-75,translateZ:0}]],reset:{translateY:0}},"transition.slideDownBigIn":{defaultDuration:850,calls:[[{opacity:[1,0],translateY:[0,-75],translateZ:0}]]},"transition.slideDownBigOut":{defaultDuration:800,calls:[[{opacity:[0,1],translateY:75,translateZ:0}]],reset:{translateY:0}},"transition.slideLeftBigIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateX:[0,-75],translateZ:0}]]},"transition.slideLeftBigOut":{defaultDuration:750,calls:[[{opacity:[0,1],translateX:-75,translateZ:0}]],reset:{translateX:0}},"transition.slideRightBigIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateX:[0,75],translateZ:0}]]},"transition.slideRightBigOut":{defaultDuration:750,calls:[[{opacity:[0,1],translateX:75,translateZ:0}]],reset:{translateX:0}},"transition.perspectiveUpIn":{defaultDuration:800,calls:[[{opacity:[1,0],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:["100%","100%"],rotateX:[0,-180]}]]},"transition.perspectiveUpOut":{defaultDuration:850,calls:[[{opacity:[0,1],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:["100%","100%"],rotateX:-180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateX:0}},"transition.perspectiveDownIn":{defaultDuration:800,calls:[[{opacity:[1,0],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:[0,0],rotateX:[0,180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveDownOut":{defaultDuration:850,calls:[[{opacity:[0,1],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:[0,0],rotateX:180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateX:0}},"transition.perspectiveLeftIn":{defaultDuration:950,calls:[[{opacity:[1,0],transformPerspective:[2e3,2e3],transformOriginX:[0,0],transformOriginY:[0,0],rotateY:[0,-180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveLeftOut":{defaultDuration:950,calls:[[{opacity:[0,1],transformPerspective:[2e3,2e3],transformOriginX:[0,0],transformOriginY:[0,0],rotateY:-180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateY:0}},"transition.perspectiveRightIn":{defaultDuration:950,calls:[[{opacity:[1,0],transformPerspective:[2e3,2e3],transformOriginX:["100%","100%"],transformOriginY:[0,0],rotateY:[0,180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveRightOut":{defaultDuration:950,calls:[[{opacity:[0,1],transformPerspective:[2e3,2e3],transformOriginX:["100%","100%"],transformOriginY:[0,0],rotateY:180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateY:0}}};for(var l in r.RegisterEffect.packagedEffects)r.RegisterEffect(l,r.RegisterEffect.packagedEffects[l]);r.RunSequence=function(t){var e=o.extend(!0,[],t);e.length>1&&(o.each(e.reverse(),function(t,n){var i=e[t+1];if(i){var s=n.options&&!1===n.options.sequenceQueue?"begin":"complete",a=i.options&&i.options[s],l={};l[s]=function(){var t=i.elements||i.e,e=t.nodeType?[t]:t;a&&a.call(e,e),r(n)},i.options=o.extend({},i.options,l)}}),e.reverse()),r(e[0])}}(window.jQuery||window.Zepto||window,window,document)}),function(){var t,e,n,i,s,r,o,a,l,c,u=[].slice,p=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},h=function(t,e){function n(){this.constructor=t}for(var i in e)d.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},d={}.hasOwnProperty,f=function(t,e){return function(){return t.apply(e,arguments)}};n={bind:function(t,e){var n,i,s,r,o;for(i=t.split(" "),this.hasOwnProperty("_callbacks")||this._callbacks||(this._callbacks={}),s=0,r=i.length;s<r;s++)o=i[s],(n=this._callbacks)[o]||(n[o]=[]),this._callbacks[o].push(e);return this},one:function(t,e){var n;return this.bind(t,n=function(){return this.unbind(t,n),e.apply(this,arguments)})},trigger:function(){var t,e,n,i,s,r,o;if(t=1<=arguments.length?u.call(arguments,0):[],n=t.shift(),r=null!=(o=this._callbacks)?o[n]:void 0){for(i=0,s=r.length;i<s&&(e=r[i],!1!==e.apply(this,t));i++);return!0}},listenTo:function(t,e,n){return t.bind(e,n),this.listeningTo||(this.listeningTo=[]),this.listeningTo.push({obj:t,ev:e,callback:n}),this},listenToOnce:function(t,e,n){var i,s;return s=this.listeningToOnce||(this.listeningToOnce=[]),t.bind(e,i=function(){var r,o,a,l,c;for(o=-1,r=a=0,l=s.length;a<l;r=++a)c=s[r],c.obj===t&&c.ev===e&&c.callback===i&&(o=r);return t.unbind(e,i),-1!==o&&s.splice(o,1),n.apply(this,arguments)}),s.push({obj:t,ev:e,callback:i}),this},stopListening:function(e,n,i){var s,r,o,a,l,c,u,h,d,f,g,m,v,y,b,_,w,k;if(0===arguments.length){for(_=[this.listeningTo,this.listeningToOnce],l=0,h=_.length;l<h;l++)if(m=_[l],null!=m?m.length:void 0)for(c=0,d=m.length;c<d;c++)v=m[c],v.obj.unbind(v.ev,v.callback);this.listeningTo=void 0,this.listeningToOnce=void 0}else if(e)for(n=n?n.split(" "):[void 0],w=[this.listeningTo,this.listeningToOnce],u=0,f=w.length;u<f;u++)if(m=w[u])for(y=0,g=n.length;y<g;y++)for(r=n[y],a=b=k=m.length-1;k<=0?b<=0:b>=0;a=k<=0?++b:--b)v=m[a],v.obj===e&&(i&&v.callback!==i||(r&&r!==v.ev?r&&(o=v.ev.split(" "),p.call(o,r)>=0&&(o=function(){var t,e,n;for(n=[],e=0,t=o.length;e<t;e++)(s=o[e])!==r&&n.push(s);return n}(),v.ev=t.trim(o.join(" ")),v.obj.unbind(r,v.callback))):(v.obj.unbind(v.ev,v.callback),-1!==a&&m.splice(a,1))));return this},unbind:function(t,e){var n,i,s,r,o,a,l,c,u;if(0===arguments.length)return this._callbacks={},this;if(!t)return this;for(n=t.split(" "),s=0,o=n.length;s<o;s++)if(c=n[s],l=null!=(u=this._callbacks)?u[c]:void 0)if(e){for(i=r=0,a=l.length;r<a;i=++r)if(l[i]===e){l=l.slice(),l.splice(i,1),this._callbacks[c]=l;break}}else delete this._callbacks[c];return this}},n.on=n.bind,n.off=n.unbind,i={trace:!0,logPrefix:"(App)",log:function(){var t;if(t=1<=arguments.length?u.call(arguments,0):[],this.trace)return this.logPrefix&&t.unshift(this.logPrefix),void 0!==console&&null!==console&&"function"==typeof console.log&&console.log.apply(console,t),this}},c=["included","extended"],r=function(){function t(){"function"==typeof this.init&&this.init.apply(this,arguments)}return t.include=function(t){var e,n,i;if(!t)throw new Error("include(obj) requires obj");for(e in t)i=t[e],p.call(c,e)<0&&(this.prototype[e]=i);return null!=(n=t.included)&&n.apply(this),this},t.extend=function(t){var e,n,i;if(!t)throw new Error("extend(obj) requires obj");for(e in t)i=t[e],p.call(c,e)<0&&(this[e]=i);return null!=(n=t.extended)&&n.apply(this),this},t.proxy=function(t){return function(e){return function(){return t.apply(e,arguments)}}(this)},t.prototype.proxy=function(t){return function(e){return function(){return t.apply(e,arguments)}}(this)},t}(),s=function(e){function i(t){i.__super__.constructor.apply(this,arguments),null!=this.constructor.uuid&&"function"==typeof this.constructor.uuid?(this.cid=this.constructor.uuid(),this.id||(this.id=this.cid)):this.cid=(null!=t?t.cid:void 0)||this.constructor.uid("c-"),t&&this.load(t)}return h(i,e),i.extend(n),i.include(n),i.records=[],i.irecords={},i.attributes=[],i.configure=function(){var t,e;return e=arguments[0],t=2<=arguments.length?u.call(arguments,1):[],this.className=e,this.deleteAll(),t.length&&(this.attributes=t),this.attributes&&(this.attributes=l(this.attributes)),this.attributes||(this.attributes=[]),this.unbind(),this},i.toString=function(){return this.className+"("+this.attributes.join(", ")+")"},i.find=function(t,e){var n;return null==e&&(e=this.notFound),(null!=(n=this.irecords[t])?n.clone():void 0)||("function"==typeof e?e(t):void 0)},i.findAll=function(t,e){var n,i,s,r;for(r=[],i=0,s=t.length;i<s;i++)n=t[i],this.find(n,e)&&r.push(this.find(n));return r},i.notFound=function(){return null},i.exists=function(t){return Boolean(this.irecords[t])},i.addRecord=function(t,e){var n;return(n=this.irecords[t.id||t.cid])?n.refresh(t):(t.id||(t.id=t.cid),this.irecords[t.id]=this.irecords[t.cid]=t,void 0!==e?this.records.splice(e,0,t):this.records.push(t)),t},i.refresh=function(t,e){var n,i,s,r,o;for(null==e&&(e={}),e.clear&&this.deleteAll(),r=this.fromJSON(t),Array.isArray(r)||(r=[r]),n=0,i=r.length;n<i;n++)s=r[n],this.addRecord(s);return this.sort(),o=this.cloneArray(r),this.trigger("refresh",o,e),o},i.select=function(t){var e,n,i,s,r;for(s=this.records,r=[],e=0,n=s.length;e<n;e++)i=s[e],t(i)&&r.push(i.clone());return r},i.findByAttribute=function(t,e){var n,i,s,r;for(r=this.records,n=0,i=r.length;n<i;n++)if(s=r[n],s[t]===e)return s.clone();return null},i.findAllByAttribute=function(t,e){return this.select(function(n){return n[t]===e})},i.each=function(t){var e,n,i,s,r;for(s=this.records,r=[],e=0,n=s.length;e<n;e++)i=s[e],r.push(t(i.clone()));return r},i.all=function(){return this.cloneArray(this.records)},i.slice=function(t,e){return null==t&&(t=0),this.cloneArray(this.records.slice(t,e))},i.first=function(t){var e;return null==t&&(t=1),t>1?this.cloneArray(this.records.slice(0,t)):null!=(e=this.records[0])?e.clone():void 0},i.last=function(t){var e;return"number"==typeof t?this.cloneArray(this.records.slice(-t)):null!=(e=this.records[this.records.length-1])?e.clone():void 0},i.count=function(){return this.records.length},i.deleteAll=function(){return this.records=[],this.irecords={}},i.destroyAll=function(t){var e,n,i,s,r;for(s=this.records,r=[],e=0,n=s.length;e<n;e++)i=s[e],r.push(i.destroy(t));return r},i.update=function(t,e,n){return this.find(t).updateAttributes(e,n)},i.create=function(t,e){var n;return n=new this(t),n.save(e)},i.destroy=function(t,e){var n;return null!=(n=this.find(t))?n.destroy(e):void 0},i.change=function(t){return"function"==typeof t?this.bind("change",t):this.trigger.apply(this,["change"].concat(u.call(arguments)))},i.fetch=function(t){return"function"==typeof t?this.bind("fetch",t):this.trigger.apply(this,["fetch"].concat(u.call(arguments)))},i.toJSON=function(){return this.records},i.beforeFromJSON=function(t){return t},i.fromJSON=function(t){var e,n,i,s;if(t){if("string"==typeof t&&(t=JSON.parse(t)),t=this.beforeFromJSON(t),Array.isArray(t)){for(i=[],e=0,n=t.length;e<n;e++)s=t[e],s instanceof this?i.push(s):i.push(new this(s));return i}return t instanceof this?t:new this(t)}},i.fromForm=function(){var t;return(t=new this).fromForm.apply(t,arguments)},i.sort=function(){
return this.comparator&&this.records.sort(this.comparator),this},i.cloneArray=function(t){var e,n,i,s;for(i=[],e=0,n=t.length;e<n;e++)s=t[e],i.push(s.clone());return i},i.idCounter=0,i.uid=function(t){var e;return null==t&&(t=""),e=t+this.idCounter++,this.exists(e)&&(e=this.uid(t)),e},i.prototype.isNew=function(){return!this.exists()},i.prototype.isValid=function(){return!this.validate()},i.prototype.validate=function(){},i.prototype.load=function(t){var e,n;t.id&&(this.id=t.id);for(e in t)if(n=t[e],"function"==typeof this[e]){if("function"==typeof n)continue;this[e](n)}else this[e]=n;return this},i.prototype.attributes=function(){var t,e,n,i,s;for(s={},i=this.constructor.attributes,t=0,n=i.length;t<n;t++)(e=i[t])in this&&("function"==typeof this[e]?s[e]=this[e]():s[e]=this[e]);return this.id&&(s.id=this.id),s},i.prototype.eql=function(t){return t&&t.constructor===this.constructor&&(t.cid===this.cid||t.id&&t.id===this.id)},i.prototype.save=function(t){var e,n;return null==t&&(t={}),!1!==t.validate&&(e=this.validate())?(this.trigger("error",this,e),!1):(this.trigger("beforeSave",this,t),n=this.isNew()?this.create(t):this.update(t),this.stripCloneAttrs(),this.trigger("save",n,t),n)},i.prototype.stripCloneAttrs=function(){var t,e;if(!this.hasOwnProperty("cid")){e=this;for(t in e)d.call(e,t)&&(e[t],p.call(this.constructor.attributes,t)>=0&&delete this[t]);return this}},i.prototype.updateAttribute=function(t,e,n){var i;return i={},i[t]=e,this.updateAttributes(i,n)},i.prototype.updateAttributes=function(t,e){return this.load(t),this.save(e)},i.prototype.changeID=function(t){var e;if(t!==this.id)return e=this.constructor.irecords,e[t]=e[this.id],this.cid!==this.id&&delete e[this.id],this.id=t},i.prototype.remove=function(t){var e,n,i,s,r;for(null==t&&(t={}),r=this.constructor.records.slice(0),e=n=0,i=r.length;n<i;e=++n)if(s=r[e],this.eql(s)){r.splice(e,1);break}if(this.constructor.records=r,t.clear)return delete this.constructor.irecords[this.id],delete this.constructor.irecords[this.cid]},i.prototype.destroy=function(t){return null==t&&(t={}),null==t.clear&&(t.clear=!0),this.trigger("beforeDestroy",this,t),this.remove(t),this.destroyed=!0,this.trigger("destroy",this,t),this.trigger("change",this,"destroy",t),this.listeningTo&&this.stopListening(),this.unbind(),this},i.prototype.dup=function(t){var e,n;return null==t&&(t=!0),e=this.attributes(),t?delete e.id:e.cid=this.cid,n=new this.constructor(e),t||this._callbacks&&(n._callbacks=this._callbacks),n},i.prototype.clone=function(){return a(this)},i.prototype.reload=function(){var t;return this.isNew()?this:(t=this.constructor.find(this.id),this.load(t.attributes()),t)},i.prototype.refresh=function(t){var e,n;return t=this.constructor.fromJSON(t),t.id&&this.id!==t.id&&this.changeID(t.id),this.constructor.irecords[this.id]?(this.constructor.irecords[this.id].load(t),this.trigger("refresh",this),this):(n=this.constructor.className,e=JSON.stringify(t),void console.log("Can't refresh not existing %s instance with ID %s and attributes %s. Possible race condition?",n,this.id,e))},i.prototype.toJSON=function(){return this.attributes()},i.prototype.toString=function(){return"<"+this.constructor.className+" ("+JSON.stringify(this)+")>"},i.prototype.fromForm=function(e){var n,i,s,r,o,a,l,c,u,p,h,d,f,g;for(g={},h=t(e).find("[type=checkbox]:not([value])"),i=0,a=h.length;i<a;i++)n=h[i],g[n.name]=t(n).prop("checked");for(d=t(e).find('[type=checkbox][name$="[]"]'),s=0,l=d.length;s<l;s++)n=d[s],u=n.name.replace(/\[\]$/,""),g[u]||(g[u]=[]),t(n).prop("checked")&&g[u].push(n.value);for(f=t(e).serializeArray(),o=0,c=f.length;o<c;o++)r=f[o],g[p=r.name]||(g[p]=r.value);return this.load(g)},i.prototype.exists=function(){return this.constructor.exists(this.id)},i.prototype.update=function(t){var e,n;return this.trigger("beforeUpdate",this,t),n=this.constructor.irecords,n[this.id].load(this.attributes()),this.constructor.sort(),e=n[this.id].clone(),e.trigger("update",e,t),e.trigger("change",e,"update",t),e},i.prototype.create=function(t){var e,n;return this.trigger("beforeCreate",this,t),this.id||(this.id=this.cid),n=this.dup(!1),this.constructor.addRecord(n,t.idx),this.constructor.sort(),e=n.clone(),e.trigger("create",e,t),e.trigger("change",e,"create",t),e},i.prototype.bind=function(){var t;return t=this.constructor.irecords[this.id]||this,n.bind.apply(t,arguments)},i.prototype.one=function(){var t;return t=this.constructor.irecords[this.id]||this,n.one.apply(t,arguments)},i.prototype.unbind=function(){var t;return t=this.constructor.irecords[this.id]||this,n.unbind.apply(t,arguments)},i.prototype.trigger=function(){var t;return n.trigger.apply(this,arguments),(t=this.constructor).trigger.apply(t,arguments)},i}(r),s.prototype.on=s.prototype.bind,s.prototype.off=s.prototype.unbind,e=function(e){function s(e){this.release=f(this.release,this);var n,i,r,o,a;this.options=e,o=this.options;for(i in o)a=o[i],this[i]=a;for(this.el||(this.el=document.createElement(this.tag)),this.el=t(this.el),this.className&&this.el.addClass(this.className),this.attributes&&this.el.attr(this.attributes),this.events||(this.events=this.constructor.events),this.elements||(this.elements=this.constructor.elements),n=this;r=n.constructor.__super__;)r.events&&(this.events=t.extend({},r.events,this.events)),r.elements&&(this.elements=t.extend({},r.elements,this.elements)),n=r;this.events&&this.delegateEvents(this.events),this.elements&&this.refreshElements(),s.__super__.constructor.apply(this,arguments)}return h(s,e),s.include(n),s.include(i),s.prototype.eventSplitter=/^(\S+)\s*(.*)$/,s.prototype.tag="div",s.prototype.release=function(){return this.trigger("release",this),this.el.remove(),this.unbind(),this.stopListening()},s.prototype.$=function(t){return this.el.find(t)},s.prototype.delegateEvents=function(t){var e,n,i,s,r,o;r=[];for(n in t){if("function"==typeof(s=t[n]))s=function(t){return function(e){return function(){return e.apply(t,arguments),!0}}}(this)(s);else{if(!this[s])throw new Error(s+" doesn't exist");s=function(t){return function(e){return function(){return t[e].apply(t,arguments),!0}}}(this)(s)}i=n.match(this.eventSplitter),e=i[1],o=i[2],""===o?r.push(this.el.bind(e,s)):r.push(this.el.on(e,o,s))}return r},s.prototype.refreshElements=function(){var t,e,n,i;e=this.elements,n=[];for(t in e)i=e[t],n.push(this[i]=this.$(t));return n},s.prototype.delay=function(t,e){return setTimeout(this.proxy(t),e||0)},s.prototype.html=function(t){return this.el.html(t.el||t),this.refreshElements(),this.el},s.prototype.append=function(){var t,e,n;return e=1<=arguments.length?u.call(arguments,0):[],e=function(){var n,i,s;for(s=[],n=0,i=e.length;n<i;n++)t=e[n],s.push(t.el||t);return s}(),(n=this.el).append.apply(n,e),this.refreshElements(),this.el},s.prototype.appendTo=function(t){return this.el.appendTo(t.el||t),this.refreshElements(),this.el},s.prototype.prepend=function(){var t,e,n;return e=1<=arguments.length?u.call(arguments,0):[],e=function(){var n,i,s;for(s=[],n=0,i=e.length;n<i;n++)t=e[n],s.push(t.el||t);return s}(),(n=this.el).prepend.apply(n,e),this.refreshElements(),this.el},s.prototype.replace=function(e){var n,i,s;return e=e.el||e,"string"==typeof e&&(e=t.trim(e)),s=[this.el,t((null!=(i=t.parseHTML(e))?i[0]:void 0)||e)],n=s[0],this.el=s[1],n.replaceWith(this.el),this.delegateEvents(this.events),this.refreshElements(),this.el},s}(r),t=("undefined"!=typeof window&&null!==window?window.jQuery:void 0)||("undefined"!=typeof window&&null!==window?window.Zepto:void 0)||function(t){return t},a=Object.create||function(t){var e;return e=function(){},e.prototype=t,new e},l=function(t){return Array.prototype.slice.call(t,0)},o=this.Spine={},void 0!==module&&null!==module&&(module.exports=o),o.version="1.6.1",o.$=t,o.Events=n,o.Log=i,o.Module=r,o.Controller=e,o.Model=s,r.extend.call(o,n),r.create=r.sub=e.create=e.sub=s.sub=function(t,e){var n;return n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e}(this),t&&n.include(t),e&&n.extend(e),"function"==typeof n.unbind&&n.unbind(),n},s.setup=function(t,e){var n;return null==e&&(e=[]),n=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e}(this),n.configure.apply(n,[t].concat(u.call(e))),n},o.Class=r}.call(this),function(){var t,e,n,i,s,r,o,a,l,c,u,p=[].slice,h=function(t,e){return function(){return t.apply(e,arguments)}},d=function(t,e){function n(){this.constructor=t}for(var i in e)f.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},f={}.hasOwnProperty;u=this.Spine||require("spine"),t=u.$,a=u.Model,l=t({}),e={getURL:function(t){return null!=t.className?this.generateURL(t):this.generateURL(t,encodeURIComponent(t.id))},getCollectionURL:function(t){return this.generateURL(t)},getScope:function(t){return("function"==typeof t.scope?t.scope():void 0)||t.scope},getCollection:function(t){return t.url!==t.generateURL?"function"==typeof t.url?t.url():t.url:null!=t.className?t.className.toLowerCase()+"s":void 0},generateURL:function(){var t,n,i,s,r;return i=arguments[0],t=2<=arguments.length?p.call(arguments,1):[],n=e.getCollection(i)||e.getCollection(i.constructor),r=e.getScope(i)||e.getScope(i.constructor),t.unshift(n),t.unshift(r),s=t.join("/"),s=s.replace(/(\/\/)/g,"/"),s=s.replace(/^\/|\/$/g,""),0!==s.indexOf("../")?a.host+"/"+s:s},enabled:!0,disable:function(t){if(!this.enabled)return t();this.enabled=!1;try{return t()}catch(t){throw t}finally{this.enabled=!0}},queue:function(t){return t?l.queue(t):l.queue()},clearQueue:function(){return this.queue([])},config:{loadMethod:"GET",updateMethod:"PUT",createMethod:"POST",destroyMethod:"DELETE"}},n=function(){function n(){}return n.prototype.defaults={dataType:"json",processData:!1,headers:{"X-Requested-With":"XMLHttpRequest"}},n.prototype.queue=e.queue,n.prototype.ajax=function(e,n){return t.ajax(this.ajaxSettings(e,n))},n.prototype.ajaxQueue=function(n,i,s){var r,o,a,c,u,h;return o=null,r=t.Deferred(),c=r.promise(),e.enabled?(h=this.ajaxSettings(n,i),a=void 0!==h.parallel?h.parallel:"GET"===h.type,u=function(n){var i,c,u;if(null!=(null!=s?s.id:void 0)&&(null==h.url&&(h.url=e.getURL(s)),null!=(i=h.data)&&(i.id=s.id)),"string"!=typeof h.data&&!0!==h.processData&&(h.data=JSON.stringify(h.data)),u=function(){return r.resolve.apply(this,p.call(arguments).concat([h]))},c=function(){return r.reject.apply(this,p.call(arguments).concat([h]))},o=t.ajax(h),o.done(u),o.fail(c),o.then(n,n),a)return l.dequeue()},c.abort=function(e){var n;return o?o.abort(e):(n=t.inArray(u,this.queue()),n>-1&&this.queue().splice(n,1),r.rejectWith(h.context||h,[c,e,""]),c)},this.queue(u),c):c},n.prototype.ajaxSettings=function(e,n){return t.extend({},this.defaults,n,e)},n}(),i=function(t){function n(t){this.model=t,this.failResponse=h(this.failResponse,this),this.recordsResponse=h(this.recordsResponse,this)}return d(n,t),n.prototype.find=function(t,n,i){var s;return null==i&&(i={}),s=new this.model({id:t}),this.ajaxQueue(n,{type:i.method||e.config.loadMethod,url:i.url||e.getURL(s),parallel:i.parallel}).done(this.recordsResponse(i)).fail(this.failResponse(i))},n.prototype.all=function(t,n){return null==n&&(n={}),this.ajaxQueue(t,{type:n.method||e.config.loadMethod,url:n.url||e.getURL(this.model),parallel:n.parallel}).done(this.recordsResponse(n)).fail(this.failResponse(n))},n.prototype.fetch=function(t,e){var n;return null==t&&(t={}),null==e&&(e={}),(n=t.id)?(delete t.id,this.find(n,t,e).done(function(t){return function(n){return t.model.refresh(n,e)}}(this))):this.all(t,e).done(function(t){return function(n){return t.model.refresh(n,e)}}(this))},n.prototype.recordsResponse=function(t){return function(e){return function(n,i,s,r){var o;return e.model.trigger("ajaxSuccess",null,i,s,r),null!=(o=t.done)?o.call(e.model,r):void 0}}(this)},n.prototype.failResponse=function(t){return function(e){return function(n,i,s,r){var o,a,l;return e.model.trigger("ajaxError",null,n,i,s,r),e.record.trigger("ajaxError",e.record,n,i,s,r),a=n.responseText,_.isEmpty(a)||(o=JSON.parse(a)),null!=(l=t.fail)?l.call(e.record,r,o):void 0}}(this)},n}(n),c=function(t){function n(t){this.record=t,this.failResponse=h(this.failResponse,this),this.recordResponse=h(this.recordResponse,this),this.model=this.record.constructor}return d(n,t),n.prototype.reload=function(t,n){return null==n&&(n={}),this.ajaxQueue(t,{type:n.method||e.config.loadMethod,url:n.url,parallel:n.parallel},this.record).done(this.recordResponse(n)).fail(this.failResponse(n))},n.prototype.create=function(t,n){return null==n&&(n={}),this.ajaxQueue(t,{type:n.method||e.config.createMethod,contentType:"application/json",data:this.record.toJSON(),url:n.url||e.getCollectionURL(this.record),parallel:n.parallel}).done(this.recordResponse(n)).fail(this.failResponse(n))},n.prototype.update=function(t,n){return null==n&&(n={}),this.ajaxQueue(t,{type:n.method||e.config.updateMethod,contentType:"application/json",data:this.record.toJSON(),url:n.url,parallel:n.parallel},this.record).done(this.recordResponse(n)).fail(this.failResponse(n))},n.prototype.destroy=function(t,n){return null==n&&(n={}),this.ajaxQueue(t,{type:n.method||e.config.destroyMethod,url:n.url,parallel:n.parallel},this.record).done(this.recordResponse(n)).fail(this.failResponse(n))},n.prototype.recordResponse=function(t){return function(e){return function(n,i,s,r){var o;return null!=n&&Object.getOwnPropertyNames(n).length&&!e.record.destroyed&&e.record.refresh(n,{ajax:!1}),e.record.trigger("ajaxSuccess",e.record,e.model.fromJSON(n),i,s,r),null!=(o=t.done)?o.call(e.record,r):void 0}}(this)},n.prototype.failResponse=function(t){return function(e){return function(n,i,s,r){var o,a,l;switch(r.type){case"POST":e.createFailed();break;case"DELETE":e.destroyFailed()}return e.record.trigger("ajaxError",e.record,n,i,s,r),a=n.responseText,_.isEmpty(a)||(o=JSON.parse(a)),null!=(l=t.fail)&&l.call(e.record,r,o),e.record.trigger("destroy",e.record)}}(this)},n.prototype.createFailed=function(){return this.record.remove({clear:!0})},n.prototype.destroyFailed=function(){return this.record.destroyed=!1,this.record.constructor.refresh(this.record)},n}(n),a.host="",r={include:function(){var t;return t=1<=arguments.length?p.call(arguments,0):[],t.unshift(encodeURIComponent(this.id)),e.generateURL.apply(e,[this].concat(p.call(t)))},extend:function(){var t;return t=1<=arguments.length?p.call(arguments,0):[],e.generateURL.apply(e,[this].concat(p.call(t)))}},o={ajax:function(){return new c(this)},generateURL:r.include,url:r.include},s={ajax:function(){return new i(this)},generateURL:r.extend,url:r.extend},a.Ajax={extended:function(){return this.fetch(this.ajaxFetch),this.change(this.ajaxChange),this.extend(s),this.include(o)},ajaxFetch:function(){var t;return(t=this.ajax()).fetch.apply(t,arguments)},ajaxChange:function(t,e,n){var i;if(null==n&&(n={}),!1!==n.ajax)return"function"==typeof(i=t.ajax())[e]?i[e](n.ajax,n):void 0}},a.Ajax.Methods={extended:function(){return this.extend(s),this.include(o)}},e.defaults=n.prototype.defaults,e.Base=n,e.Singleton=c,e.Collection=i,u.Ajax=e,void 0!==module&&null!==module&&(module.exports=e)}.call(this),function(){var t;t=this.Spine||require("spine"),t.Model.Local={extended:function(){var t;t="spine"+(new Date).getTime();try{localStorage.setItem(t,t),localStorage.removeItem(t)}catch(t){return void t}return this.change(this.saveLocal),this.fetch(this.loadLocal)},saveLocal:function(){var t;return t=JSON.stringify(this),localStorage[this.className]=t},loadLocal:function(t){var e;return null==t&&(t={}),t.hasOwnProperty("clear")||(t.clear=!0),e=localStorage[this.className],this.refresh(e||[],t)}},void 0!==module&&null!==module&&(module.exports=t.Model.Local)}.call(this),function(){var t,e,n,i,s,r,o,a,l=function(t,e){function n(){this.constructor=t}for(var i in e)c.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty,u=[].slice;i=this.Spine||require("spine"),t=i.$,r=/^#*/,o=/:([\w\d]+)/g,a=/\*([\w\d]+)/g,s=/[-[\]{}()+?.,\\^$|#\s]/g,e=function(t){function e(t,e){var n;if(this.names=[],this.path=t,this.callback=e,"string"==typeof t){for(o.lastIndex=0;null!==(n=o.exec(t));)this.names.push(n[1]);for(a.lastIndex=0;null!==(n=a.exec(t));)this.names.push(n[1]);t=t.replace(s,"\\$&").replace(o,"([^/]*)").replace(a,"(.*?)"),this.route=new RegExp("^"+t+"$")}else this.route=t}return l(e,t),e.prototype.match=function(t,e){var i,s,r,o,a,l;if(null==e&&(e={}),!(o=this.route.exec(t)))return!1;if(e.match=o,l=o.slice(1),this.names.length)for(i=s=0,r=l.length;s<r;i=++s)a=l[i],e[this.names[i]]=a;return n.trigger("before",this),!1!==this.callback.call(null,e)},e}(i.Module),n=function(n){function s(){this.routes=[]}var o;return l(s,n),s.extend(i.Events),s.historySupport=null!=(null!=(o=window.history)?o.pushState:void 0),s.options={trigger:!0,history:!1,shim:!1,replace:!1,redirect:!1},s.routers=[],s.setup=function(e){if(null==e&&(e={}),this.options=t.extend({},this.options,e),this.options.history&&(this.history=this.historySupport&&this.options.history),!this.options.shim)return this.history?t(window).bind("popstate",this.change):t(window).bind("hashchange",this.change),this.change()},s.unbind=function(){var e;return e=i.Events.unbind.apply(this,arguments),arguments.length>0?e:this.options.shim?void 0:this.history?t(window).unbind("popstate",this.change):t(window).unbind("hashchange",this.change)},s.navigate=function(){var e,n,i,s,r;if(e=1<=arguments.length?u.call(arguments,0):[],i={},n=e[e.length-1],"object"==typeof n?i=e.pop():"boolean"==typeof n&&(i.trigger=e.pop()),i=t.extend({},this.options,i),s=e.join("/"),this.path!==s){if(this.path=s,i.trigger&&(this.trigger("navigate",this.path),r=this.matchRoutes(this.path,i),!r.length)){if("function"==typeof i.redirect)return i.redirect.apply(this,[this.path,i]);!0===i.redirect&&this.redirect(this.path)}return!!i.shim||(this.history&&i.replace?history.replaceState({},document.title,this.path):this.history?history.pushState({},document.title,this.path):window.location.hash=this.path)}},s.create=function(){var t;return t=new this,this.routers.push(t),t},s.add=function(t,e){return this.router.add(t,e)},s.prototype.add=function(t,n){var i,s,r;if("object"!=typeof t||t instanceof RegExp)return this.routes.push(new e(t,n));s=[];for(i in t)r=t[i],s.push(this.add(i,r));return s},s.prototype.destroy=function(){var t;return this.routes.length=0,this.constructor.routers=function(){var e,n,i,s;for(i=this.constructor.routers,s=[],e=0,n=i.length;e<n;e++)(t=i[e])!==this&&s.push(t);return s}.call(this)},s.getPath=function(){var t;return this.history?(t=window.location.pathname,"/"!==t.substr(0,1)&&(t="/"+t)):(t=window.location.hash,t=t.replace(r,"")),t},s.getHost=function(){return window.location.protocol+"//"+window.location.host},s.change=function(){var t;if((t=s.getPath())!==s.path)return s.path=t,s.matchRoutes(s.path)},s.matchRoutes=function(t,e){var n,i,s,r,o,a;for(r=[],o=this.routers.concat([this.router]),n=0,i=o.length;n<i;n++)a=o[n],(s=a.matchRoute(t,e))&&r.push(s);return r.length&&this.trigger("change",r,t),r},s.redirect=function(t){return window.location=t},s.prototype.matchRoute=function(t,e){var n,i,s,r;for(s=this.routes,n=0,i=s.length;n<i;n++)if(r=s[n],r.match(t,e))return r},s.prototype.trigger=function(){var t,e;return t=1<=arguments.length?u.call(arguments,0):[],t.splice(1,0,this),(e=this.constructor).trigger.apply(e,t)},s}(i.Module),n.router=new n,i.Controller.include({route:function(t,e){return this.router instanceof i.Route?this.router.add(t,this.proxy(e)):i.Route.add(t,this.proxy(e))},routes:function(t){var e,n,i;n=[];for(e in t)i=t[e],n.push(this.route(e,i));return n},navigate:function(){return i.Route.navigate.apply(i.Route,arguments)}}),n.Path=e,i.Route=n,void 0!==module&&null!==module&&(module.exports=n)}.call(this),function(t){t.color={},t.color.make=function(e,n,i,s){var r={};return r.r=e||0,r.g=n||0,r.b=i||0,r.a=null!=s?s:1,r.add=function(t,e){for(var n=0;n<t.length;++n)r[t.charAt(n)]+=e;return r.normalize()},r.scale=function(t,e){for(var n=0;n<t.length;++n)r[t.charAt(n)]*=e;return r.normalize()},r.toString=function(){return r.a>=1?"rgb("+[r.r,r.g,r.b].join(",")+")":"rgba("+[r.r,r.g,r.b,r.a].join(",")+")"},r.normalize=function(){function t(t,e,n){return e<t?t:e>n?n:e}return r.r=t(0,parseInt(r.r),255),r.g=t(0,parseInt(r.g),255),r.b=t(0,parseInt(r.b),255),r.a=t(0,r.a,1),r},r.clone=function(){return t.color.make(r.r,r.b,r.g,r.a)},r.normalize()},t.color.extract=function(e,n){var i;do{if(""!=(i=e.css(n).toLowerCase())&&"transparent"!=i)break;e=e.parent()}while(!t.nodeName(e.get(0),"body"));return"rgba(0, 0, 0, 0)"==i&&(i="transparent"),t.color.parse(i)},t.color.parse=function(n){var i,s=t.color.make;if(i=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(n))return s(parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10));if(i=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(n))return s(parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10),parseFloat(i[4]));if(i=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(n))return s(2.55*parseFloat(i[1]),2.55*parseFloat(i[2]),2.55*parseFloat(i[3]));if(i=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(n))return s(2.55*parseFloat(i[1]),2.55*parseFloat(i[2]),2.55*parseFloat(i[3]),parseFloat(i[4]));if(i=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(n))return s(parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16));if(i=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(n))return s(parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16));var r=t.trim(n).toLowerCase();return"transparent"==r?s(255,255,255,0):(i=e[r]||[0,0,0],s(i[0],i[1],i[2]))};var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}}(jQuery),function(t){function e(e,s,r,o){function a(t,e){e=[_t].concat(e);for(var n=0;n<t.length;++n)t[n].apply(this,e)}function l(){for(var e=0;e<o.length;++e){var n=o[e];n.init(_t),n.options&&t.extend(!0,ot,n.options)}}function c(e){var n;for(t.extend(!0,ot,e),null==ot.xaxis.color&&(ot.xaxis.color=ot.grid.color),null==ot.yaxis.color&&(ot.yaxis.color=ot.grid.color),null==ot.xaxis.tickColor&&(ot.xaxis.tickColor=ot.grid.tickColor),null==ot.yaxis.tickColor&&(ot.yaxis.tickColor=ot.grid.tickColor),null==ot.grid.borderColor&&(ot.grid.borderColor=ot.grid.color),null==ot.grid.tickColor&&(ot.grid.tickColor=t.color.parse(ot.grid.color).scale("a",.22).toString()),n=0;n<Math.max(1,ot.xaxes.length);++n)ot.xaxes[n]=t.extend(!0,{},ot.xaxis,ot.xaxes[n]);for(n=0;n<Math.max(1,ot.yaxes.length);++n)ot.yaxes[n]=t.extend(!0,{},ot.yaxis,ot.yaxes[n]);for(ot.xaxis.noTicks&&null==ot.xaxis.ticks&&(ot.xaxis.ticks=ot.xaxis.noTicks),ot.yaxis.noTicks&&null==ot.yaxis.ticks&&(ot.yaxis.ticks=ot.yaxis.noTicks),ot.x2axis&&(ot.xaxes[1]=t.extend(!0,{},ot.xaxis,ot.x2axis),ot.xaxes[1].position="top"),ot.y2axis&&(ot.yaxes[1]=t.extend(!0,{},ot.yaxis,ot.y2axis),ot.yaxes[1].position="right"),ot.grid.coloredAreas&&(ot.grid.markings=ot.grid.coloredAreas),ot.grid.coloredAreasColor&&(ot.grid.markingsColor=ot.grid.coloredAreasColor),ot.lines&&t.extend(!0,ot.series.lines,ot.lines),ot.points&&t.extend(!0,ot.series.points,ot.points),ot.bars&&t.extend(!0,ot.series.bars,ot.bars),null!=ot.shadowSize&&(ot.series.shadowSize=ot.shadowSize),n=0;n<ot.xaxes.length;++n)m(ht,n+1).options=ot.xaxes[n];for(n=0;n<ot.yaxes.length;++n)m(dt,n+1).options=ot.yaxes[n];for(var i in bt)ot.hooks[i]&&ot.hooks[i].length&&(bt[i]=bt[i].concat(ot.hooks[i]));a(bt.processOptions,[ot])}function u(t){rt=p(t),v(),y()}function p(e){for(var n=[],i=0;i<e.length;++i){var s=t.extend(!0,{},ot.series);null!=e[i].data?(s.data=e[i].data,delete e[i].data,t.extend(!0,s,e[i]),e[i].data=s.data):s.data=e[i],n.push(s)}return n}function h(t,e){var n=t[e+"axis"];return"object"==typeof n&&(n=n.n),"number"!=typeof n&&(n=1),n}function d(){return t.grep(ht.concat(dt),function(t){return t})}function f(t){var e,n,i={};for(e=0;e<ht.length;++e)(n=ht[e])&&n.used&&(i["x"+n.n]=n.c2p(t.left));for(e=0;e<dt.length;++e)(n=dt[e])&&n.used&&(i["y"+n.n]=n.c2p(t.top));return i.x1!==undefined&&(i.x=i.x1),i.y1!==undefined&&(i.y=i.y1),i}function g(t){var e,n,i,s={};for(e=0;e<ht.length;++e)if((n=ht[e])&&n.used&&(i="x"+n.n,null==t[i]&&1==n.n&&(i="x"),null!=t[i])){s.left=n.p2c(t[i]);break}for(e=0;e<dt.length;++e)if((n=dt[e])&&n.used&&(i="y"+n.n,null==t[i]&&1==n.n&&(i="y"),null!=t[i])){s.top=n.p2c(t[i]);break}return s}function m(e,n){return e[n-1]||(e[n-1]={n:n,direction:e==ht?"x":"y",options:t.extend(!0,{},e==ht?ot.xaxis:ot.yaxis)}),e[n-1]}function v(){var e,n=rt.length,i=[],s=[];for(e=0;e<rt.length;++e){var r=rt[e].color;null!=r&&(--n,"number"==typeof r?s.push(r):i.push(t.color.parse(rt[e].color)))}for(e=0;e<s.length;++e)n=Math.max(n,s[e]+1);var o=[],a=0;for(e=0;o.length<n;){var l;l=ot.colors.length==e?t.color.make(100,100,100):t.color.parse(ot.colors[e]);var c=a%2==1?-1:1;l.scale("rgb",1+c*Math.ceil(a/2)*.2),o.push(l),++e,e>=ot.colors.length&&(e=0,++a)}var u,p=0;for(e=0;e<rt.length;++e){if(u=rt[e],null==u.color?(u.color=o[p].toString(),++p):"number"==typeof u.color&&(u.color=o[u.color].toString()),null==u.lines.show){var d,f=!0;for(d in u)if(u[d]&&u[d].show){f=!1;break}f&&(u.lines.show=!0)}u.xaxis=m(ht,h(u,"x")),u.yaxis=m(dt,h(u,"y"))}}function y(){function e(t,e,n){e<t.datamin&&e!=-m&&(t.datamin=e),n>t.datamax&&n!=m&&(t.datamax=n)}var n,i,s,r,o,l,c,u,p,h,f=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,m=Number.MAX_VALUE;for(t.each(d(),function(t,e){e.datamin=f,e.datamax=g,e.used=!1}),n=0;n<rt.length;++n)o=rt[n],o.datapoints={points:[]},a(bt.processRawData,[o,o.data,o.datapoints]);for(n=0;n<rt.length;++n){o=rt[n];var v=o.data,y=o.datapoints.format;if(y||(y=[],y.push({x:!0,number:!0,required:!0}),y.push({y:!0,number:!0,required:!0}),(o.bars.show||o.lines.show&&o.lines.fill)&&(y.push({y:!0,number:!0,required:!1,defaultValue:0}),o.bars.horizontal&&(delete y[y.length-1].y,y[y.length-1].x=!0)),o.datapoints.format=y),null==o.datapoints.pointsize)for(o.datapoints.pointsize=y.length,c=o.datapoints.pointsize,l=o.datapoints.points,insertSteps=o.lines.show&&o.lines.steps,o.xaxis.used=o.yaxis.used=!0,i=s=0;i<v.length;++i,s+=c){h=v[i];var b=null==h;if(!b)for(r=0;r<c;++r)u=h[r],p=y[r],p&&(p.number&&null!=u&&(u=+u,isNaN(u)?u=null:u==Infinity?u=m:u==-Infinity&&(u=-m)),null==u&&(p.required&&(b=!0),null!=p.defaultValue&&(u=p.defaultValue))),l[s+r]=u;if(b)for(r=0;r<c;++r)u=l[s+r],null!=u&&(p=y[r],p.x&&e(o.xaxis,u,u),p.y&&e(o.yaxis,u,u)),l[s+r]=null;else if(insertSteps&&s>0&&null!=l[s-c]&&l[s-c]!=l[s]&&l[s-c+1]!=l[s+1]){for(r=0;r<c;++r)l[s+c+r]=l[s+r];l[s+1]=l[s-c+1],s+=c}}}for(n=0;n<rt.length;++n)o=rt[n],a(bt.processDatapoints,[o,o.datapoints]);for(n=0;n<rt.length;++n){o=rt[n],l=o.datapoints.points,c=o.datapoints.pointsize;var _=f,w=f,k=g,T=g;for(i=0;i<l.length;i+=c)if(null!=l[i])for(r=0;r<c;++r)u=l[i+r],(p=y[r])&&u!=m&&u!=-m&&(p.x&&(u<_&&(_=u),u>k&&(k=u)),p.y&&(u<w&&(w=u),u>T&&(T=u)));if(o.bars.show){var S="left"==o.bars.align?0:-o.bars.barWidth/2;o.bars.horizontal?(w+=S,T+=S+o.bars.barWidth):(_+=S,k+=S+o.bars.barWidth)}e(o.xaxis,_,k),e(o.yaxis,w,T)}t.each(d(),function(t,e){e.datamin==f&&(e.datamin=null),e.datamax==g&&(e.datamax=null)})}function b(n,i){var s=document.createElement("canvas");return s.className=i,s.width=gt,s.height=mt,n||t(s).css({position:"absolute",left:0,top:0}),t(s).appendTo(e),s.getContext||(s=window.G_vmlCanvasManager.initElement(s)),s.getContext("2d").save(),s}function _(){if(gt=e.width(),mt=e.height(),gt<=0||mt<=0)throw"Invalid dimensions for plot, width = "+gt+", height = "+mt}function w(t){t.width!=gt&&(t.width=gt),t.height!=mt&&(t.height=mt);var e=t.getContext("2d");e.restore(),e.save()}function k(){var n,i=e.children("canvas.base"),s=e.children("canvas.overlay");0==i.length||0==s?(e.html(""),e.css({padding:0}),"static"==e.css("position")&&e.css("position","relative"),_(),at=b(!0,"base"),lt=b(!1,"overlay"),n=!1):(at=i.get(0),lt=s.get(0),n=!0),ut=at.getContext("2d"),pt=lt.getContext("2d"),ct=t([lt,at]),n&&(e.data("plot").shutdown(),_t.resize(),pt.clearRect(0,0,gt,mt),ct.unbind(),e.children().not([at,lt]).remove()),e.data("plot",_t)}function T(){ot.grid.hoverable&&(ct.mousemove(G),ct.mouseleave(V)),ot.grid.clickable&&ct.click(Y),a(bt.bindEvents,[ct])}function S(){kt&&clearTimeout(kt),ct.unbind("mousemove",G),ct.unbind("mouseleave",V),ct.unbind("click",Y),a(bt.shutdown,[ct])}function C(t){function e(t){return t}var n,i,s=t.options.transform||e,r=t.options.inverseTransform;"x"==t.direction?(n=t.scale=vt/Math.abs(s(t.max)-s(t.min)),i=Math.min(s(t.max),s(t.min))):(n=t.scale=yt/Math.abs(s(t.max)-s(t.min)),n=-n,i=Math.max(s(t.max),s(t.min))),t.p2c=s==e?function(t){return(t-i)*n}:function(t){return(s(t)-i)*n},t.c2p=r?function(t){return r(i+t/n)}:function(t){return i+t/n}}function A(n){function i(i,s){return t('<div style="position:absolute;top:-10000px;'+s+'font-size:smaller"><div class="'+n.direction+"Axis "+n.direction+n.n+'Axis">'+i.join("")+"</div></div>").appendTo(e)}var s,r,o,a=n.options,l=n.ticks||[],c=[],u=a.labelWidth,p=a.labelHeight;if("x"==n.direction){if(null==u&&(u=Math.floor(gt/(l.length>0?l.length:1))),null==p){for(c=[],s=0;s<l.length;++s)(r=l[s].label)&&c.push('<div class="tickLabel" style="float:left;width:'+u+'px">'+r+"</div>");c.length>0&&(c.push('<div style="clear:left"></div>'),o=i(c,"width:10000px;"),p=o.height(),o.remove())}}else if(null==u||null==p){for(s=0;s<l.length;++s)(r=l[s].label)&&c.push('<div class="tickLabel">'+r+"</div>");c.length>0&&(o=i(c,""),null==u&&(u=o.children().width()),null==p&&(p=o.find("div.tickLabel").height()),o.remove())}null==u&&(u=0),null==p&&(p=0),n.labelWidth=u,n.labelHeight=p}function x(e){var n=e.labelWidth,i=e.labelHeight,s=e.options.position,r=e.options.tickLength,o=ot.grid.axisMargin,a=ot.grid.labelMargin,l="x"==e.direction?ht:dt,c=t.grep(l,function(t){return t&&t.options.position==s&&t.reserveSpace});t.inArray(e,c)==c.length-1&&(o=0),null==r&&(r="full");var u=t.grep(l,function(t){return t&&t.reserveSpace}),p=0==t.inArray(e,u);p||"full"!=r||(r=5),isNaN(+r)||(a+=+r),"x"==e.direction?(i+=a,"bottom"==s?(ft.bottom+=i+o,e.box={top:mt-ft.bottom,height:i}):(e.box={top:ft.top+o,height:i},ft.top+=i+o)):(n+=a,"left"==s?(e.box={left:ft.left+o,width:n},ft.left+=n+o):(ft.right+=n+o,e.box={left:gt-ft.right,width:n})),e.position=s,e.tickLength=r,e.box.padding=a,e.innermost=p}function j(t){"x"==t.direction?(t.box.left=ft.left,t.box.width=vt):(t.box.top=ft.top,t.box.height=yt)}function I(){var e,n=d();if(t.each(n,function(t,e){e.show=e.options.show,null==e.show&&(e.show=e.used),e.reserveSpace=e.show||e.options.reserveSpace,D(e)}),allocatedAxes=t.grep(n,function(t){return t.reserveSpace}),ft.left=ft.right=ft.top=ft.bottom=0,ot.grid.show){for(t.each(allocatedAxes,function(t,e){P(e),E(e),O(e,e.ticks),A(e)}),e=allocatedAxes.length-1;e>=0;--e)x(allocatedAxes[e]);var i=ot.grid.minBorderMargin;if(null==i)for(i=0,e=0;e<rt.length;++e)i=Math.max(i,rt[e].points.radius+rt[e].points.lineWidth/2);for(var s in ft)ft[s]+=ot.grid.borderWidth,ft[s]=Math.max(i,ft[s])}vt=gt-ft.left-ft.right,yt=mt-ft.bottom-ft.top,t.each(n,function(t,e){C(e)}),ot.grid.show&&(t.each(allocatedAxes,function(t,e){j(e)}),z()),W()}function D(t){var e=t.options,n=+(null!=e.min?e.min:t.datamin),i=+(null!=e.max?e.max:t.datamax),s=i-n;if(0==s){var r=0==i?1:.01;null==e.min&&(n-=r),null!=e.max&&null==e.min||(i+=r)}else{var o=e.autoscaleMargin;null!=o&&(null==e.min&&(n-=s*o)<0&&null!=t.datamin&&t.datamin>=0&&(n=0),null==e.max&&(i+=s*o)>0&&null!=t.datamax&&t.datamax<=0&&(i=0))}t.min=n,t.max=i}function P(e){var i,s=e.options;i="number"==typeof s.ticks&&s.ticks>0?s.ticks:.3*Math.sqrt("x"==e.direction?gt:mt);var r,o,a,l,c,u,p,h=(e.max-e.min)/i;if("time"==s.mode){var d={second:1e3,minute:6e4,hour:36e5,day:864e5,month:2592e6,year:525949.2*60*1e3
},f=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[.25,"month"],[.5,"month"],[1,"month"],[2,"month"],[3,"month"],[6,"month"],[1,"year"]],g=0;null!=s.minTickSize&&(g="number"==typeof s.tickSize?s.tickSize:s.minTickSize[0]*d[s.minTickSize[1]]);for(var c=0;c<f.length-1&&!(h<(f[c][0]*d[f[c][1]]+f[c+1][0]*d[f[c+1][1]])/2&&f[c][0]*d[f[c][1]]>=g);++c);r=f[c][0],a=f[c][1],"year"==a&&(u=Math.pow(10,Math.floor(Math.log(h/d.year)/Math.LN10)),p=h/d.year/u,r=p<1.5?1:p<3?2:p<7.5?5:10,r*=u),e.tickSize=s.tickSize||[r,a],o=function(t){var e=[],i=t.tickSize[0],s=t.tickSize[1],r=new Date(t.min),o=i*d[s];"second"==s&&r.setUTCSeconds(n(r.getUTCSeconds(),i)),"minute"==s&&r.setUTCMinutes(n(r.getUTCMinutes(),i)),"hour"==s&&r.setUTCHours(n(r.getUTCHours(),i)),"month"==s&&r.setUTCMonth(n(r.getUTCMonth(),i)),"year"==s&&r.setUTCFullYear(n(r.getUTCFullYear(),i)),r.setUTCMilliseconds(0),o>=d.minute&&r.setUTCSeconds(0),o>=d.hour&&r.setUTCMinutes(0),o>=d.day&&r.setUTCHours(0),o>=4*d.day&&r.setUTCDate(1),o>=d.year&&r.setUTCMonth(0);var a,l=0,c=Number.NaN;do{if(a=c,c=r.getTime(),e.push(c),"month"==s)if(i<1){r.setUTCDate(1);var u=r.getTime();r.setUTCMonth(r.getUTCMonth()+1);var p=r.getTime();r.setTime(c+l*d.hour+(p-u)*i),l=r.getUTCHours(),r.setUTCHours(0)}else r.setUTCMonth(r.getUTCMonth()+i);else"year"==s?r.setUTCFullYear(r.getUTCFullYear()+i):r.setTime(c+o)}while(c<t.max&&c!=a);return e},l=function(e,n){var i=new Date(e);if(null!=s.timeformat)return t.plot.formatDate(i,s.timeformat,s.monthNames);var r=n.tickSize[0]*d[n.tickSize[1]],o=n.max-n.min,a=s.twelveHourClock?" %p":"";return r<d.minute?fmt="%h:%M:%S"+a:r<d.day?o<2*d.day?fmt="%h:%M"+a:fmt="%b %d %h:%M"+a:r<d.month?fmt="%b %d":r<d.year?o<d.year?fmt="%b":fmt="%b %y":fmt="%y",t.plot.formatDate(i,fmt,s.monthNames)}}else{var m=s.tickDecimals,v=-Math.floor(Math.log(h)/Math.LN10);null!=m&&v>m&&(v=m),u=Math.pow(10,-v),p=h/u,p<1.5?r=1:p<3?(r=2,p>2.25&&(null==m||v+1<=m)&&(r=2.5,++v)):r=p<7.5?5:10,r*=u,null!=s.minTickSize&&r<s.minTickSize&&(r=s.minTickSize),e.tickDecimals=Math.max(0,null!=m?m:v),e.tickSize=s.tickSize||r,o=function(t){var e,i=[],s=n(t.min,t.tickSize),r=0,o=Number.NaN;do{e=o,o=s+r*t.tickSize,i.push(o),++r}while(o<t.max&&o!=e);return i},l=function(t,e){return t.toFixed(e.tickDecimals)}}if(null!=s.alignTicksWithAxis){var y=("x"==e.direction?ht:dt)[s.alignTicksWithAxis-1];if(y&&y.used&&y!=e){var b=o(e);if(b.length>0&&(null==s.min&&(e.min=Math.min(e.min,b[0])),null==s.max&&b.length>1&&(e.max=Math.max(e.max,b[b.length-1]))),o=function(t){var e,n,i=[];for(n=0;n<y.ticks.length;++n)e=(y.ticks[n].v-y.min)/(y.max-y.min),e=t.min+e*(t.max-t.min),i.push(e);return i},"time"!=e.mode&&null==s.tickDecimals){var _=Math.max(0,1-Math.floor(Math.log(h)/Math.LN10)),w=o(e);w.length>1&&/\..*0$/.test((w[1]-w[0]).toFixed(_))||(e.tickDecimals=_)}}}e.tickGenerator=o,t.isFunction(s.tickFormatter)?e.tickFormatter=function(t,e){return""+s.tickFormatter(t,e)}:e.tickFormatter=l}function E(e){var n=e.options.ticks,i=[];null==n||"number"==typeof n&&n>0?i=e.tickGenerator(e):n&&(i=t.isFunction(n)?n({min:e.min,max:e.max}):n);var s,r;for(e.ticks=[],s=0;s<i.length;++s){var o=null,a=i[s];"object"==typeof a?(r=+a[0],a.length>1&&(o=a[1])):r=+a,null==o&&(o=e.tickFormatter(r,e)),isNaN(r)||e.ticks.push({v:r,label:o})}}function O(t,e){t.options.autoscaleMargin&&e.length>0&&(null==t.options.min&&(t.min=Math.min(t.min,e[0].v)),null==t.options.max&&e.length>1&&(t.max=Math.max(t.max,e[e.length-1].v)))}function N(){ut.clearRect(0,0,gt,mt);var t=ot.grid;t.show&&t.backgroundColor&&M(),t.show&&!t.aboveData&&$();for(var e=0;e<rt.length;++e)a(bt.drawSeries,[ut,rt[e]]),L(rt[e]);a(bt.draw,[ut]),t.show&&t.aboveData&&$()}function R(t,e){var n,s,r,o,a=d();for(i=0;i<a.length;++i)if(n=a[i],n.direction==e&&(o=e+n.n+"axis",t[o]||1!=n.n||(o=e+"axis"),t[o])){s=t[o].from,r=t[o].to;break}if(t[o]||(n="x"==e?ht[0]:dt[0],s=t[e+"1"],r=t[e+"2"]),null!=s&&null!=r&&s>r){var l=s;s=r,r=l}return{from:s,to:r,axis:n}}function M(){ut.save(),ut.translate(ft.left,ft.top),ut.fillStyle=st(ot.grid.backgroundColor,yt,0,"rgba(255, 255, 255, 0)"),ut.fillRect(0,0,vt,yt),ut.restore()}function $(){var e;ut.save(),ut.translate(ft.left,ft.top);var n=ot.grid.markings;if(n){if(t.isFunction(n)){var i=_t.getAxes();i.xmin=i.xaxis.min,i.xmax=i.xaxis.max,i.ymin=i.yaxis.min,i.ymax=i.yaxis.max,n=n(i)}for(e=0;e<n.length;++e){var s=n[e],r=R(s,"x"),o=R(s,"y");null==r.from&&(r.from=r.axis.min),null==r.to&&(r.to=r.axis.max),null==o.from&&(o.from=o.axis.min),null==o.to&&(o.to=o.axis.max),r.to<r.axis.min||r.from>r.axis.max||o.to<o.axis.min||o.from>o.axis.max||(r.from=Math.max(r.from,r.axis.min),r.to=Math.min(r.to,r.axis.max),o.from=Math.max(o.from,o.axis.min),o.to=Math.min(o.to,o.axis.max),r.from==r.to&&o.from==o.to||(r.from=r.axis.p2c(r.from),r.to=r.axis.p2c(r.to),o.from=o.axis.p2c(o.from),o.to=o.axis.p2c(o.to),r.from==r.to||o.from==o.to?(ut.beginPath(),ut.strokeStyle=s.color||ot.grid.markingsColor,ut.lineWidth=s.lineWidth||ot.grid.markingsLineWidth,ut.moveTo(r.from,o.from),ut.lineTo(r.to,o.to),ut.stroke()):(ut.fillStyle=s.color||ot.grid.markingsColor,ut.fillRect(r.from,o.to,r.to-r.from,o.from-o.to))))}}for(var i=d(),a=ot.grid.borderWidth,l=0;l<i.length;++l){var c,u,p,h,f=i[l],g=f.box,m=f.tickLength;if(f.show&&0!=f.ticks.length){for(ut.strokeStyle=f.options.tickColor||t.color.parse(f.options.color).scale("a",.22).toString(),ut.lineWidth=1,"x"==f.direction?(c=0,u="full"==m?"top"==f.position?0:yt:g.top-ft.top+("top"==f.position?g.height:0)):(u=0,c="full"==m?"left"==f.position?0:vt:g.left-ft.left+("left"==f.position?g.width:0)),f.innermost||(ut.beginPath(),p=h=0,"x"==f.direction?p=vt:h=yt,1==ut.lineWidth&&(c=Math.floor(c)+.5,u=Math.floor(u)+.5),ut.moveTo(c,u),ut.lineTo(c+p,u+h),ut.stroke()),ut.beginPath(),e=0;e<f.ticks.length;++e){var v=f.ticks[e].v;p=h=0,v<f.min||v>f.max||"full"==m&&a>0&&(v==f.min||v==f.max)||("x"==f.direction?(c=f.p2c(v),h="full"==m?-yt:m,"top"==f.position&&(h=-h)):(u=f.p2c(v),p="full"==m?-vt:m,"left"==f.position&&(p=-p)),1==ut.lineWidth&&("x"==f.direction?c=Math.floor(c)+.5:u=Math.floor(u)+.5),ut.moveTo(c,u),ut.lineTo(c+p,u+h))}ut.stroke()}}a&&(ut.lineWidth=a,ut.strokeStyle=ot.grid.borderColor,ut.strokeRect(-a/2,-a/2,vt+a,yt+a)),ut.restore()}function z(){e.find(".tickLabels").remove();for(var t=['<div class="tickLabels" style="font-size:smaller">'],n=d(),i=0;i<n.length;++i){var s=n[i],r=s.box;if(s.show){t.push('<div class="'+s.direction+"Axis "+s.direction+s.n+'Axis" style="color:'+s.options.color+'">');for(var o=0;o<s.ticks.length;++o){var a=s.ticks[o];if(!(!a.label||a.v<s.min||a.v>s.max)){var l,c={};"x"==s.direction?(l="center",c.left=Math.round(ft.left+s.p2c(a.v)-s.labelWidth/2),"bottom"==s.position?c.top=r.top+r.padding:c.bottom=mt-(r.top+r.height-r.padding)):(c.top=Math.round(ft.top+s.p2c(a.v)-s.labelHeight/2),"left"==s.position?(c.right=gt-(r.left+r.width-r.padding),l="right"):(c.left=r.left+r.padding,l="left")),c.width=s.labelWidth;var u=["position:absolute","white-space:nowrap","text-align:"+l];for(var p in c)u.push(p+":"+c[p]+"px");t.push('<div class="tickLabel" style="'+u.join(";")+'">'+a.label+"</div>")}}t.push("</div>")}}t.push("</div>"),e.append(t.join(""))}function L(t){t.lines.show&&U(t),t.bars.show&&B(t),t.points.show&&q(t)}function U(t){function e(t,e,n,i,s){var r=t.points,o=t.pointsize,a=null,l=null;ut.beginPath();for(var c=o;c<r.length;c+=o){var u=r[c-o],p=r[c-o+1],h=r[c],d=r[c+1];if(null!=u&&null!=h){if(p<=d&&p<s.min){if(d<s.min)continue;u=(s.min-p)/(d-p)*(h-u)+u,p=s.min}else if(d<=p&&d<s.min){if(p<s.min)continue;h=(s.min-p)/(d-p)*(h-u)+u,d=s.min}if(p>=d&&p>s.max){if(d>s.max)continue;u=(s.max-p)/(d-p)*(h-u)+u,p=s.max}else if(d>=p&&d>s.max){if(p>s.max)continue;h=(s.max-p)/(d-p)*(h-u)+u,d=s.max}if(u<=h&&u<i.min){if(h<i.min)continue;p=(i.min-u)/(h-u)*(d-p)+p,u=i.min}else if(h<=u&&h<i.min){if(u<i.min)continue;d=(i.min-u)/(h-u)*(d-p)+p,h=i.min}if(u>=h&&u>i.max){if(h>i.max)continue;p=(i.max-u)/(h-u)*(d-p)+p,u=i.max}else if(h>=u&&h>i.max){if(u>i.max)continue;d=(i.max-u)/(h-u)*(d-p)+p,h=i.max}u==a&&p==l||ut.moveTo(i.p2c(u)+e,s.p2c(p)+n),a=h,l=d,ut.lineTo(i.p2c(h)+e,s.p2c(d)+n)}}ut.stroke()}function n(t,e,n){for(var i=t.points,s=t.pointsize,r=Math.min(Math.max(0,n.min),n.max),o=0,a=!1,l=1,c=0,u=0;;){if(s>0&&o>i.length+s)break;o+=s;var p=i[o-s],h=i[o-s+l],d=i[o],f=i[o+l];if(a){if(s>0&&null!=p&&null==d){u=o,s=-s,l=2;continue}if(s<0&&o==c+s){ut.fill(),a=!1,s=-s,l=1,o=c=u+s;continue}}if(null!=p&&null!=d){if(p<=d&&p<e.min){if(d<e.min)continue;h=(e.min-p)/(d-p)*(f-h)+h,p=e.min}else if(d<=p&&d<e.min){if(p<e.min)continue;f=(e.min-p)/(d-p)*(f-h)+h,d=e.min}if(p>=d&&p>e.max){if(d>e.max)continue;h=(e.max-p)/(d-p)*(f-h)+h,p=e.max}else if(d>=p&&d>e.max){if(p>e.max)continue;f=(e.max-p)/(d-p)*(f-h)+h,d=e.max}if(a||(ut.beginPath(),ut.moveTo(e.p2c(p),n.p2c(r)),a=!0),h>=n.max&&f>=n.max)ut.lineTo(e.p2c(p),n.p2c(n.max)),ut.lineTo(e.p2c(d),n.p2c(n.max));else if(h<=n.min&&f<=n.min)ut.lineTo(e.p2c(p),n.p2c(n.min)),ut.lineTo(e.p2c(d),n.p2c(n.min));else{var g=p,m=d;h<=f&&h<n.min&&f>=n.min?(p=(n.min-h)/(f-h)*(d-p)+p,h=n.min):f<=h&&f<n.min&&h>=n.min&&(d=(n.min-h)/(f-h)*(d-p)+p,f=n.min),h>=f&&h>n.max&&f<=n.max?(p=(n.max-h)/(f-h)*(d-p)+p,h=n.max):f>=h&&f>n.max&&h<=n.max&&(d=(n.max-h)/(f-h)*(d-p)+p,f=n.max),p!=g&&ut.lineTo(e.p2c(g),n.p2c(h)),ut.lineTo(e.p2c(p),n.p2c(h)),ut.lineTo(e.p2c(d),n.p2c(f)),d!=m&&(ut.lineTo(e.p2c(d),n.p2c(f)),ut.lineTo(e.p2c(m),n.p2c(f)))}}}}ut.save(),ut.translate(ft.left,ft.top),ut.lineJoin="round";var i=t.lines.lineWidth,s=t.shadowSize;if(i>0&&s>0){ut.lineWidth=s,ut.strokeStyle="rgba(0,0,0,0.1)";var r=Math.PI/18;e(t.datapoints,Math.sin(r)*(i/2+s/2),Math.cos(r)*(i/2+s/2),t.xaxis,t.yaxis),ut.lineWidth=s/2,e(t.datapoints,Math.sin(r)*(i/2+s/4),Math.cos(r)*(i/2+s/4),t.xaxis,t.yaxis)}ut.lineWidth=i,ut.strokeStyle=t.color;var o=J(t.lines,t.color,0,yt);o&&(ut.fillStyle=o,n(t.datapoints,t.xaxis,t.yaxis)),i>0&&e(t.datapoints,0,0,t.xaxis,t.yaxis),ut.restore()}function q(t){function e(t,e,n,i,s,r,o,a){for(var l=t.points,c=t.pointsize,u=0;u<l.length;u+=c){var p=l[u],h=l[u+1];null==p||p<r.min||p>r.max||h<o.min||h>o.max||(ut.beginPath(),p=r.p2c(p),h=o.p2c(h)+i,"circle"==a?ut.arc(p,h,e,0,s?Math.PI:2*Math.PI,!1):a(ut,p,h,e,s),ut.closePath(),n&&(ut.fillStyle=n,ut.fill()),ut.stroke())}}ut.save(),ut.translate(ft.left,ft.top);var n=t.points.lineWidth,i=t.shadowSize,s=t.points.radius,r=t.points.symbol;if(n>0&&i>0){var o=i/2;ut.lineWidth=o,ut.strokeStyle="rgba(0,0,0,0.1)",e(t.datapoints,s,null,o+o/2,!0,t.xaxis,t.yaxis,r),ut.strokeStyle="rgba(0,0,0,0.2)",e(t.datapoints,s,null,o/2,!0,t.xaxis,t.yaxis,r)}ut.lineWidth=n,ut.strokeStyle=t.color,e(t.datapoints,s,J(t.points,t.color),0,!1,t.xaxis,t.yaxis,r),ut.restore()}function F(t,e,n,i,s,r,o,a,l,c,u,p){var h,d,f,g,m,v,y,b,_;u?(b=v=y=!0,m=!1,h=n,d=t,g=e+i,f=e+s,d<h&&(_=d,d=h,h=_,m=!0,v=!1)):(m=v=y=!0,b=!1,h=t+i,d=t+s,f=n,(g=e)<f&&(_=g,g=f,f=_,b=!0,y=!1)),d<a.min||h>a.max||g<l.min||f>l.max||(h<a.min&&(h=a.min,m=!1),d>a.max&&(d=a.max,v=!1),f<l.min&&(f=l.min,b=!1),g>l.max&&(g=l.max,y=!1),h=a.p2c(h),f=l.p2c(f),d=a.p2c(d),g=l.p2c(g),o&&(c.beginPath(),c.moveTo(h,f),c.lineTo(h,g),c.lineTo(d,g),c.lineTo(d,f),c.fillStyle=o(f,g),c.fill()),p>0&&(m||v||y||b)&&(c.beginPath(),c.moveTo(h,f+r),m?c.lineTo(h,g+r):c.moveTo(h,g+r),y?c.lineTo(d,g+r):c.moveTo(d,g+r),v?c.lineTo(d,f+r):c.moveTo(d,f+r),b?c.lineTo(h,f+r):c.moveTo(h,f+r),c.stroke()))}function B(t){function e(e,n,i,s,r,o,a){for(var l=e.points,c=e.pointsize,u=0;u<l.length;u+=c)null!=l[u]&&F(l[u],l[u+1],l[u+2],n,i,s,r,o,a,ut,t.bars.horizontal,t.bars.lineWidth)}ut.save(),ut.translate(ft.left,ft.top),ut.lineWidth=t.bars.lineWidth,ut.strokeStyle=t.color;var n="left"==t.bars.align?0:-t.bars.barWidth/2,i=t.bars.fill?function(e,n){return J(t.bars,t.color,e,n)}:null;e(t.datapoints,n,n+t.bars.barWidth,0,i,t.xaxis,t.yaxis),ut.restore()}function J(e,n,i,s){var r=e.fill;if(!r)return null;if(e.fillColor)return st(e.fillColor,i,s,n);var o=t.color.parse(n);return o.a="number"==typeof r?r:.4,o.normalize(),o.toString()}function W(){if(e.find(".legend").remove(),ot.legend.show){for(var n,i,s=[],r=!1,o=ot.legend.labelFormatter,a=0;a<rt.length;++a)n=rt[a],(i=n.label)&&(a%ot.legend.noColumns==0&&(r&&s.push("</tr>"),s.push("<tr>"),r=!0),o&&(i=o(i,n)),s.push('<td class="legendColorBox"><div style="border:1px solid '+ot.legend.labelBoxBorderColor+';padding:1px"><div style="width:4px;height:0;border:5px solid '+n.color+';overflow:hidden"></div></div></td><td class="legendLabel">'+i+"</td>"));if(r&&s.push("</tr>"),0!=s.length){var l='<table style="font-size:smaller;color:'+ot.grid.color+'">'+s.join("")+"</table>";if(null!=ot.legend.container)t(ot.legend.container).html(l);else{var c="",u=ot.legend.position,p=ot.legend.margin;null==p[0]&&(p=[p,p]),"n"==u.charAt(0)?c+="top:"+(p[1]+ft.top)+"px;":"s"==u.charAt(0)&&(c+="bottom:"+(p[1]+ft.bottom)+"px;"),"e"==u.charAt(1)?c+="right:"+(p[0]+ft.right)+"px;":"w"==u.charAt(1)&&(c+="left:"+(p[0]+ft.left)+"px;");var h=t('<div class="legend">'+l.replace('style="','style="position:absolute;'+c+";")+"</div>").appendTo(e);if(0!=ot.legend.backgroundOpacity){var d=ot.legend.backgroundColor;null==d&&(d=ot.grid.backgroundColor,d=d&&"string"==typeof d?t.color.parse(d):t.color.extract(h,"background-color"),d.a=1,d=d.toString());var f=h.children();t('<div style="position:absolute;width:'+f.width()+"px;height:"+f.height()+"px;"+c+"background-color:"+d+';"> </div>').prependTo(h).css("opacity",ot.legend.backgroundOpacity)}}}}}function H(t,e,n){var i,s,r=ot.grid.mouseActiveRadius,o=r*r+1,a=null;for(i=rt.length-1;i>=0;--i)if(n(rt[i])){var l=rt[i],c=l.xaxis,u=l.yaxis,p=l.datapoints.points,h=l.datapoints.pointsize,d=c.c2p(t),f=u.c2p(e),g=r/c.scale,m=r/u.scale;if(c.options.inverseTransform&&(g=Number.MAX_VALUE),u.options.inverseTransform&&(m=Number.MAX_VALUE),l.lines.show||l.points.show)for(s=0;s<p.length;s+=h){var v=p[s],y=p[s+1];if(null!=v&&!(v-d>g||v-d<-g||y-f>m||y-f<-m)){var b=Math.abs(c.p2c(v)-t),_=Math.abs(u.p2c(y)-e),w=b*b+_*_;w<o&&(o=w,a=[i,s/h])}}if(l.bars.show&&!a){var k="left"==l.bars.align?0:-l.bars.barWidth/2,T=k+l.bars.barWidth;for(s=0;s<p.length;s+=h){var v=p[s],y=p[s+1],S=p[s+2];null!=v&&((rt[i].bars.horizontal?d<=Math.max(S,v)&&d>=Math.min(S,v)&&f>=y+k&&f<=y+T:d>=v+k&&d<=v+T&&f>=Math.min(S,y)&&f<=Math.max(S,y))&&(a=[i,s/h]))}}}return a?(i=a[0],s=a[1],h=rt[i].datapoints.pointsize,{datapoint:rt[i].datapoints.points.slice(s*h,(s+1)*h),dataIndex:s,series:rt[i],seriesIndex:i}):null}function G(t){ot.grid.hoverable&&K("plothover",t,function(t){return 0!=t.hoverable})}function V(t){ot.grid.hoverable&&K("plothover",t,function(){return!1})}function Y(t){K("plotclick",t,function(t){return 0!=t.clickable})}function K(t,n,i){var s=ct.offset(),r=n.pageX-s.left-ft.left,o=n.pageY-s.top-ft.top,a=f({left:r,top:o});a.pageX=n.pageX,a.pageY=n.pageY;var l=H(r,o,i);if(l&&(l.pageX=parseInt(l.series.xaxis.p2c(l.datapoint[0])+s.left+ft.left),l.pageY=parseInt(l.series.yaxis.p2c(l.datapoint[1])+s.top+ft.top)),ot.grid.autoHighlight){for(var c=0;c<wt.length;++c){var u=wt[c];u.auto!=t||l&&u.series==l.series&&u.point[0]==l.datapoint[0]&&u.point[1]==l.datapoint[1]||tt(u.series,u.point)}l&&Q(l.series,l.datapoint,t)}e.trigger(t,[a,l])}function X(){kt||(kt=setTimeout(Z,30))}function Z(){kt=null,pt.save(),pt.clearRect(0,0,gt,mt),pt.translate(ft.left,ft.top);var t,e;for(t=0;t<wt.length;++t)e=wt[t],e.series.bars.show?it(e.series,e.point):nt(e.series,e.point);pt.restore(),a(bt.drawOverlay,[pt])}function Q(t,e,n){if("number"==typeof t&&(t=rt[t]),"number"==typeof e){var i=t.datapoints.pointsize;e=t.datapoints.points.slice(i*e,i*(e+1))}var s=et(t,e);-1==s?(wt.push({series:t,point:e,auto:n}),X()):n||(wt[s].auto=!1)}function tt(t,e){null==t&&null==e&&(wt=[],X()),"number"==typeof t&&(t=rt[t]),"number"==typeof e&&(e=t.data[e]);var n=et(t,e);-1!=n&&(wt.splice(n,1),X())}function et(t,e){for(var n=0;n<wt.length;++n){var i=wt[n];if(i.series==t&&i.point[0]==e[0]&&i.point[1]==e[1])return n}return-1}function nt(e,n){var i=n[0],s=n[1],r=e.xaxis,o=e.yaxis;if(!(i<r.min||i>r.max||s<o.min||s>o.max)){var a=e.points.radius+e.points.lineWidth/2;pt.lineWidth=a,pt.strokeStyle=t.color.parse(e.color).scale("a",.5).toString();var l=1.5*a,i=r.p2c(i),s=o.p2c(s);pt.beginPath(),"circle"==e.points.symbol?pt.arc(i,s,l,0,2*Math.PI,!1):e.points.symbol(pt,i,s,l,!1),pt.closePath(),pt.stroke()}}function it(e,n){pt.lineWidth=e.bars.lineWidth,pt.strokeStyle=t.color.parse(e.color).scale("a",.5).toString();var i=t.color.parse(e.color).scale("a",.5).toString(),s="left"==e.bars.align?0:-e.bars.barWidth/2;F(n[0],n[1],n[2]||0,s,s+e.bars.barWidth,0,function(){return i},e.xaxis,e.yaxis,pt,e.bars.horizontal,e.bars.lineWidth)}function st(e,n,i,s){if("string"==typeof e)return e;for(var r=ut.createLinearGradient(0,i,0,n),o=0,a=e.colors.length;o<a;++o){var l=e.colors[o];if("string"!=typeof l){var c=t.color.parse(s);null!=l.brightness&&(c=c.scale("rgb",l.brightness)),null!=l.opacity&&(c.a*=l.opacity),l=c.toString()}r.addColorStop(o/(a-1),l)}return r}var rt=[],ot={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:!0,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:.85},xaxis:{show:null,position:"bottom",mode:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null,monthNames:null,timeformat:null,twelveHourClock:!1},yaxis:{autoscaleMargin:.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:!1,fillColor:null,steps:!1},bars:{show:!1,lineWidth:2,barWidth:1,fill:!0,fillColor:null,align:"left",horizontal:!1},shadowSize:3},grid:{show:!0,aboveData:!1,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:!1,hoverable:!1,autoHighlight:!0,mouseActiveRadius:10},hooks:{}},at=null,lt=null,ct=null,ut=null,pt=null,ht=[],dt=[],ft={left:0,right:0,top:0,bottom:0},gt=0,mt=0,vt=0,yt=0,bt={processOptions:[],processRawData:[],processDatapoints:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},_t=this;_t.setData=u,_t.setupGrid=I,_t.draw=N,_t.getPlaceholder=function(){return e},_t.getCanvas=function(){return at},_t.getPlotOffset=function(){return ft},_t.width=function(){return vt},_t.height=function(){return yt},_t.offset=function(){var t=ct.offset();return t.left+=ft.left,t.top+=ft.top,t},_t.getData=function(){return rt},_t.getAxes=function(){var e={};return t.each(ht.concat(dt),function(t,n){n&&(e[n.direction+(1!=n.n?n.n:"")+"axis"]=n)}),e},_t.getXAxes=function(){return ht},_t.getYAxes=function(){return dt},_t.c2p=f,_t.p2c=g,_t.getOptions=function(){return ot},_t.highlight=Q,_t.unhighlight=tt,_t.triggerRedrawOverlay=X,_t.pointOffset=function(t){return{left:parseInt(ht[h(t,"x")-1].p2c(+t.x)+ft.left),top:parseInt(dt[h(t,"y")-1].p2c(+t.y)+ft.top)}},_t.shutdown=S,_t.resize=function(){_(),w(at),w(lt)},_t.hooks=bt,l(_t),c(r),k(),u(s),I(),N(),T();var wt=[],kt=null}function n(t,e){return e*Math.floor(t/e)}t.plot=function(n,i,s){return new e(t(n),i,s,t.plot.plugins)},t.plot.version="0.7",t.plot.plugins=[],t.plot.formatDate=function(t,e,n){var i=function(t){return t=""+t,1==t.length?"0"+t:t},s=[],r=!1,o=!1,a=t.getUTCHours(),l=a<12;null==n&&(n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),-1!=e.search(/%p|%P/)&&(a>12?a-=12:0==a&&(a=12));for(var c=0;c<e.length;++c){var u=e.charAt(c);if(r){switch(u){case"h":u=""+a;break;case"H":u=i(a);break;case"M":u=i(t.getUTCMinutes());break;case"S":u=i(t.getUTCSeconds());break;case"d":u=""+t.getUTCDate();break;case"m":u=""+(t.getUTCMonth()+1);break;case"y":u=""+t.getUTCFullYear();break;case"b":u=""+n[t.getUTCMonth()];break;case"p":u=l?"am":"pm";break;case"P":u=l?"AM":"PM";break;case"0":u="",o=!0}u&&o&&(u=i(u),o=!1),s.push(u),o||(r=!1)}else"%"==u?r=!0:s.push(u)}return s.join("")}}(jQuery),function(t){function e(e){function n(t){f.active&&(c(t),e.getPlaceholder().trigger("plotselecting",[r()]))}function i(e){1==e.which&&(document.body.focus(),document.onselectstart!==undefined&&null==g.onselectstart&&(g.onselectstart=document.onselectstart,document.onselectstart=function(){return!1}),document.ondrag!==undefined&&null==g.ondrag&&(g.ondrag=document.ondrag,document.ondrag=function(){return!1}),l(f.first,e),f.active=!0,m=function(t){s(t)},t(document).one("mouseup",m))}function s(t){return m=null,document.onselectstart!==undefined&&(document.onselectstart=g.onselectstart),document.ondrag!==undefined&&(document.ondrag=g.ondrag),f.active=!1,c(t),d()?o():(e.getPlaceholder().trigger("plotunselected",[]),e.getPlaceholder().trigger("plotselecting",[null])),!1}function r(){if(!d())return null;var n={},i=f.first,s=f.second;return t.each(e.getAxes(),function(t,e){if(e.used){var r=e.c2p(i[e.direction]),o=e.c2p(s[e.direction]);n[t]={from:Math.min(r,o),to:Math.max(r,o)}}}),n}function o(){var t=r();e.getPlaceholder().trigger("plotselected",[t]),t.xaxis&&t.yaxis&&e.getPlaceholder().trigger("selected",[{x1:t.xaxis.from,y1:t.yaxis.from,x2:t.xaxis.to,y2:t.yaxis.to}])}function a(t,e,n){return e<t?t:e>n?n:e}function l(t,n){var i=e.getOptions(),s=e.getPlaceholder().offset(),r=e.getPlotOffset();t.x=a(0,n.pageX-s.left-r.left,e.width()),t.y=a(0,n.pageY-s.top-r.top,e.height()),"y"==i.selection.mode&&(t.x=t==f.first?0:e.width()),"x"==i.selection.mode&&(t.y=t==f.first?0:e.height())}function c(t){null!=t.pageX&&(l(f.second,t),d()?(f.show=!0,e.triggerRedrawOverlay()):u(!0))}function u(t){f.show&&(f.show=!1,e.triggerRedrawOverlay(),t||e.getPlaceholder().trigger("plotunselected",[]))}function p(t,n){var i,s,r,o,a=e.getAxes();for(var l in a)if(i=a[l],i.direction==n&&(o=n+i.n+"axis",t[o]||1!=i.n||(o=n+"axis"),t[o])){s=t[o].from,r=t[o].to;break}if(t[o]||(i="x"==n?e.getXAxes()[0]:e.getYAxes()[0],s=t[n+"1"],r=t[n+"2"]),null!=s&&null!=r&&s>r){var c=s;s=r,r=c}return{from:s,to:r,axis:i}}function h(t,n){var i,s=e.getOptions();"y"==s.selection.mode?(f.first.x=0,f.second.x=e.width()):(i=p(t,"x"),f.first.x=i.axis.p2c(i.from),f.second.x=i.axis.p2c(i.to)),"x"==s.selection.mode?(f.first.y=0,f.second.y=e.height()):(i=p(t,"y"),f.first.y=i.axis.p2c(i.from),f.second.y=i.axis.p2c(i.to)),f.show=!0,e.triggerRedrawOverlay(),!n&&d()&&o()}function d(){var t=5;return Math.abs(f.second.x-f.first.x)>=t&&Math.abs(f.second.y-f.first.y)>=t}var f={first:{x:-1,y:-1},second:{x:-1,y:-1},show:!1,active:!1},g={},m=null;e.clearSelection=u,e.setSelection=h,e.getSelection=r,e.hooks.bindEvents.push(function(t,e){null!=t.getOptions().selection.mode&&(e.mousemove(n),e.mousedown(i))}),e.hooks.drawOverlay.push(function(e,n){if(f.show&&d()){var i=e.getPlotOffset(),s=e.getOptions();n.save(),n.translate(i.left,i.top);var r=t.color.parse(s.selection.color);n.strokeStyle=r.scale("a",.8).toString(),n.lineWidth=1,n.lineJoin="round",n.fillStyle=r.scale("a",.4).toString();var o=Math.min(f.first.x,f.second.x),a=Math.min(f.first.y,f.second.y),l=Math.abs(f.second.x-f.first.x),c=Math.abs(f.second.y-f.first.y);n.fillRect(o,a,l,c),n.strokeRect(o,a,l,c),n.restore()}}),e.hooks.shutdown.push(function(e,s){s.unbind("mousemove",n),s.unbind("mousedown",i),m&&t(document).unbind("mouseup",m)})}t.plot.plugins.push({init:e,options:{selection:{mode:null,color:"#e8cfac"}},name:"selection",version:"1.1"})}(jQuery),function(t){"use strict";function e(e){e&&3===e.which||(t(s).remove(),t(r).each(function(){var i=t(this),s=n(i),r={relatedTarget:this};s.hasClass("open")&&(s.trigger(e=t.Event("hide.bs.dropdown",r)),e.isDefaultPrevented()||(i.attr("aria-expanded","false"),s.removeClass("open").trigger("hidden.bs.dropdown",r)))}))}function n(e){var n=e.attr("data-target");n||(n=e.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&t(n);return i&&i.length?i:e.parent()}function i(e){return this.each(function(){var n=t(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new o(this)),"string"==typeof e&&i[e].call(n)})}var s=".dropdown-backdrop",r='[data-toggle="dropdown"]',o=function(e){t(e).on("click.bs.dropdown",this.toggle)};o.VERSION="3.3.1",o.prototype.toggle=function(i){var s=t(this);if(!s.is(".disabled, :disabled")){var r=n(s),o=r.hasClass("open");if(e(),!o){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t('<div class="dropdown-backdrop"/>').insertAfter(t(this)).on("click",e);var a={relatedTarget:this};if(r.trigger(i=t.Event("show.bs.dropdown",a)),i.isDefaultPrevented())return;s.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger("shown.bs.dropdown",a)}return!1}},o.prototype.keydown=function(e){if(/(38|40|27|32)/.test(e.which)&&!/input|textarea/i.test(e.target.tagName)){var i=t(this);if(e.preventDefault(),e.stopPropagation(),!i.is(".disabled, :disabled")){var s=n(i),o=s.hasClass("open");if(!o&&27!=e.which||o&&27==e.which)return 27==e.which&&s.find(r).trigger("focus"),i.trigger("click");var a=" li:not(.divider):visible a",l=s.find('[role="menu"]'+a+', [role="listbox"]'+a);if(l.length){var c=l.index(e.target);38==e.which&&c>0&&c--,40==e.which&&c<l.length-1&&c++,~c||(c=0),l.eq(c).trigger("focus")}}}};var a=t.fn.dropdown;t.fn.dropdown=i,t.fn.dropdown.Constructor=o,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=a,this},t(document).on("click.bs.dropdown.data-api",e).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",r,o.prototype.toggle).on("keydown.bs.dropdown.data-api",r,o.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="menu"]',o.prototype.keydown).on("keydown.bs.dropdown.data-api",'[role="listbox"]',o.prototype.keydown)}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),s=i.data("bs.tooltip"),r="object"==typeof e&&e,o=r&&r.selector;(s||"destroy"!=e)&&(o?(s||i.data("bs.tooltip",s={}),s[o]||(s[o]=new n(this,r))):s||i.data("bs.tooltip",s=new n(this,r)),"string"==typeof e&&s[e]())})}var n=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};n.VERSION="3.3.1",n.TRANSITION_DURATION=150,n.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(e,n,i){this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(this.options.viewport.selector||this.options.viewport);for(var s=this.options.trigger.split(" "),r=s.length;r--;){var o=s[r];if("click"==o)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=o){var a="hover"==o?"mouseenter":"focusin",l="hover"==o?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},n.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,i){n[t]!=i&&(e[t]=i)}),e},n.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n&&n.$tip&&n.$tip.is(":visible")?void(n.hoverState="in"):(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)},n.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var s=this,r=this.tip(),o=this.getUID(this.type);this.setContent(),r.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,c=l.test(a);c&&(a=a.replace(l,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element);var u=this.getPosition(),p=r[0].offsetWidth,h=r[0].offsetHeight;if(c){var d=a,f=this.options.container?t(this.options.container):this.$element.parent(),g=this.getPosition(f);a="bottom"==a&&u.bottom+h>g.bottom?"top":"top"==a&&u.top-h<g.top?"bottom":"right"==a&&u.right+p>g.width?"left":"left"==a&&u.left-p<g.left?"right":a,r.removeClass(d).addClass(a)}var m=this.getCalculatedOffset(a,u,p,h);this.applyPlacement(m,a);var v=function(){var t=s.hoverState;s.$element.trigger("shown.bs."+s.type),s.hoverState=null,"out"==t&&s.leave(s)};t.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",v).emulateTransitionEnd(n.TRANSITION_DURATION):v()}},n.prototype.applyPlacement=function(e,n){var i=this.tip(),s=i[0].offsetWidth,r=i[0].offsetHeight,o=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(o)&&(o=0),isNaN(a)&&(a=0),e.top=e.top+o,e.left=e.left+a,t.offset.setOffset(i[0],t.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),i.addClass("in");var l=i[0].offsetWidth,c=i[0].offsetHeight;"top"==n&&c!=r&&(e.top=e.top+r-c);var u=this.getViewportAdjustedDelta(n,e,l,c);u.left?e.left+=u.left:e.top+=u.top;var p=/top|bottom/.test(n),h=p?2*u.left-s+l:2*u.top-r+c,d=p?"offsetWidth":"offsetHeight";i.offset(e),this.replaceArrow(h,i[0][d],p)},n.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},n.prototype.hide=function(e){function i(){"in"!=s.hoverState&&r.detach(),s.$element.removeAttr("aria-describedby").trigger("hidden.bs."+s.type),e&&e()}var s=this,r=this.tip(),o=t.Event("hide.bs."+this.type);if(this.$element.trigger(o),!o.isDefaultPrevented())return r.removeClass("in"),t.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i(),this.hoverState=null,this},n.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},n.prototype.hasContent=function(){return this.getTitle()},n.prototype.getPosition=function(e){e=e||this.$element;var n=e[0],i="BODY"==n.tagName,s=n.getBoundingClientRect();null==s.width&&(s=t.extend({},s,{width:s.right-s.left,height:s.bottom-s.top}));var r=i?{top:0,left:0}:e.offset(),o={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},a=i?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},s,o,a,r)},n.prototype.getCalculatedOffset=function(t,e,n,i){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-i,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-i/2,left:e.left-n}:{top:e.top+e.height/2-i/2,left:e.left+e.width}},n.prototype.getViewportAdjustedDelta=function(t,e,n,i){var s={top:0,left:0};if(!this.$viewport)return s;var r=this.options.viewport&&this.options.viewport.padding||0,o=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-r-o.scroll,l=e.top+r-o.scroll+i
;a<o.top?s.top=o.top-a:l>o.top+o.height&&(s.top=o.top+o.height-l)}else{var c=e.left-r,u=e.left+r+n;c<o.left?s.left=o.left-c:u>o.width&&(s.left=o.left+o.width-u)}return s},n.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},n.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},n.prototype.tip=function(){return this.$tip=this.$tip||t(this.options.template)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(e){var n=this;e&&((n=t(e.currentTarget).data("bs."+this.type))||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type)})};var i=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=n,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),s=i.data("bs.popover"),r="object"==typeof e&&e,o=r&&r.selector;(s||"destroy"!=e)&&(o?(s||i.data("bs.popover",s={}),s[o]||(s[o]=new n(this,r))):s||i.data("bs.popover",s=new n(this,r)),"string"==typeof e&&s[e]())})}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.1",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h2 class="popover-title"></h2><div class="popover-content"></div></div>'}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},n.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var i=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(jQuery);var originalLeave=$.fn.popover.Constructor.prototype.leave;$.fn.popover.Constructor.prototype.leave=function(t){var e,n,i=t instanceof this.constructor?t:$(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);originalLeave.call(this,t),t.currentTarget&&(e=$("body .popover"),n=i.timeout,e.one("mouseenter",function(){clearTimeout(n),e.one("mouseleave",function(){$.fn.popover.Constructor.prototype.leave.call(i,i)})}))},$.fn.popover.Constructor.DEFAULTS.viewport.padding=10,$.fn.popover.Constructor.DEFAULTS.template='<div class="popover" role="tooltip"><div class="arrow"></div><div class="popover-body"><h2 class="popover-title"></h2><div class="popover-content"></div></div></div>';var originalShow=$.fn.popover.Constructor.prototype.show;$.fn.popover.Constructor.prototype.show=function(){if(originalShow.call(this),this.$tip){var t=$(this.options.viewport.selector).height()-2*this.options.viewport.padding;this.$tip.find(".popover-body").css("maxHeight",t)}},function(t){"use strict";function e(e,i){return this.each(function(){var s=t(this),r=s.data("bs.modal"),o=t.extend({},n.DEFAULTS,s.data(),"object"==typeof e&&e);r||s.data("bs.modal",r=new n(this,o)),"string"==typeof e?r[e](i):o.show&&r.show(i)})}var n=function(e,n){this.options=n,this.$body=t(n.container||document.body),this.$element=t(e),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.3.1",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},n.prototype.show=function(e){var i=this,s=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(s),this.isShown||s.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.backdrop(function(){var s=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.options.backdrop&&i.adjustBackdrop(),i.adjustDialog(),s&&i.$element[0].offsetWidth,i.$element.addClass("in").attr("aria-hidden",!1),i.enforceFocus();var r=t.Event("shown.bs.modal",{relatedTarget:e});s?i.$element.find(".modal-dialog").one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(n.TRANSITION_DURATION):i.$element.trigger("focus").trigger(r)}))},n.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(n.TRANSITION_DURATION):this.hideModal())},n.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?t(window).on("keydown.dismiss.bs.modal",t.proxy(function(e){27==e.which&&this.hide(),27==e.which&&(e=t.Event("dismiss.bs.modal"),this.$element.trigger(e))},this)):this.isShown||t(window).off("keydown.dismiss.bs.modal")},n.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},n.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},n.prototype.remove=function(){this.$element.remove()},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(e){var i=this,s=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=t.support.transition&&s;if(this.$backdrop=t('<div class="modal-backdrop '+s+'" />').prependTo(this.$element).on("click.dismiss.bs.modal",t.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;r?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var o=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",o).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):o()}else e&&e()},n.prototype.handleUpdate=function(){this.options.backdrop&&this.adjustBackdrop(),this.adjustDialog()},n.prototype.adjustBackdrop=function(){this.$backdrop.css("left",this.$body.offset().left).css("top",this.$body.offset().top).css("width",this.$body.width()).css("height",0).css("height",this.$element[0].scrollHeight),"rtl"==App.i18n.dir()&&this.$backdrop.css("right","auto"),this.scrollbarWidth&&this.$backdrop.css("width",this.$body.width()-this.scrollbarWidth)},n.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight,e={left:this.$body.offset().left,top:this.$body.offset().top,width:this.$body.width(),paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""};if("rtl"==App.i18n.dir()){e.right="auto";var n=e.paddingLeft;e.paddingLeft=e.paddingRight,e.paddingRight=n}this.$element.css(e)},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){this.bodyIsOverflowing=document.body.scrollHeight>document.documentElement.clientHeight,this.scrollbarWidth=this.measureScrollbar()},n.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},n.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var i=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=n,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var i=t(this),s=i.attr("href"),r=t(i.attr("data-target")||s&&s.replace(/.*(?=#[^\s]+$)/,"")),o=r.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(s)&&s},r.data(),i.data());i.is("a")&&n.preventDefault(),r.one("show.bs.modal",function(t){t.isDefaultPrevented()||r.one("hidden.bs.modal",function(){i.is(":visible")&&i.trigger("focus")})}),e.call(r,o,this)})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),s=i.data("bs.tab");s||i.data("bs.tab",s=new n(this)),"string"==typeof e&&s[e]()})}var n=function(e){this.element=t(e)};n.VERSION="3.3.1",n.TRANSITION_DURATION=150,n.prototype.show=function(){var e=this.element,n=e.closest("ul:not(.dropdown-menu)"),i=e.data("target");if(i||(i=e.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var s=n.find(".active:last a"),r=t.Event("hide.bs.tab",{relatedTarget:e[0]}),o=t.Event("show.bs.tab",{relatedTarget:s[0]});if(s.trigger(r),e.trigger(o),!o.isDefaultPrevented()&&!r.isDefaultPrevented()){var a=t(i);this.activate(e.closest("li"),n),this.activate(a,a.parent(),function(){s.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:s[0]})})}}},n.prototype.activate=function(e,i,s){function r(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),s&&s()}var o=i.find("> .active"),a=s&&t.support.transition&&(o.length&&o.hasClass("fade")||!!i.find("> .fade").length);o.length&&a?o.one("bsTransitionEnd",r).emulateTransitionEnd(n.TRANSITION_DURATION):r(),o.removeClass("in")};var i=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,this};var s=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',s).on("click.bs.tab.data-api",'[data-toggle="pill"]',s)}(jQuery),function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(t.style[n]!==undefined)return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",function(){n=!0});var s=function(){n||t(i).trigger(t.support.transition.end)};return setTimeout(s,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),s=i.data("bs.button"),r="object"==typeof e&&e;s||i.data("bs.button",s=new n(this,r)),"toggle"==e?s.toggle():e&&s.setState(e)})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.1",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",i=this.$element,s=i.is("input")?"val":"html",r=i.data();e+="Text",null==r.resetText&&i.data("resetText",i[s]()),setTimeout(t.proxy(function(){i[s](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")&&(n.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&n.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));t&&this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=t(n.target);i.hasClass("btn")||(i=i.closest(".btn")),e.call(i,"toggle"),n.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),function(t){"use strict";function e(e){var n,i=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(i)}function n(e){return this.each(function(){var n=t(this),s=n.data("bs.collapse"),r=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);!s&&r.toggle&&"show"==e&&(r.toggle=!1),s||n.data("bs.collapse",s=new i(this,r)),"string"==typeof e&&s[e]()})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.$trigger=t(this.options.trigger).filter('[href="#'+e.id+'"], [data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.3.1",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0,trigger:'[data-toggle="collapse"]'},i.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,s=this.$parent&&this.$parent.find("> .panel").children(".in, .collapsing");if(!(s&&s.length&&(e=s.data("bs.collapse"))&&e.transitioning)){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){s&&s.length&&(n.call(s,"hide"),e||s.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[o](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$
@lilnate4557
Copy link

ihhghdhg rtg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment