!function(e){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}(function(e){function t(t){return!t||void 0!==t.allowPageScroll||void 0===t.swipe&&void 0===t.swipeStatus||(t.allowPageScroll=c),void 0!==t.click&&void 0===t.tap&&(t.tap=t.click),t||(t={}),t=e.extend({},e.fn.swipe.defaults,t),this.each(function(){var n=e(this),i=n.data(I);i||(i=new a(this,t),n.data(I,i))})}function a(t,a){function M(t){if(!(ce()||e(t.target).closest(a.excludedElements,Ke).length>0)){var n,i=t.originalEvent?t.originalEvent:t,r=S?i.touches[0]:i;return qe=_,S?ze=i.touches.length:t.preventDefault(),je=0,Fe=null,Re=null,Le=0,Pe=0,Ue=0,Ye=1,Be=0,Qe=fe(),We=me(),oe(),!S||ze===a.fingers||a.fingers===y||W()?(de(0,r),Je=Ce(),2==ze&&(de(1,i.touches[1]),Pe=Ue=_e(Qe[0].start,Qe[1].start)),(a.swipeStatus||a.pinchStatus)&&(n=j(i,qe))):n=!1,n===!1?(qe=D,j(i,qe),n):(a.hold&&(et=setTimeout(e.proxy(function(){Ke.trigger("hold",[i.target]),a.hold&&(n=a.hold.call(Ke,i,i.target))},this),a.longTapThreshold)),le(!0),null)}}function T(e){var t=e.originalEvent?e.originalEvent:e;if(qe!==w&&qe!==D&&!ue()){var n,i=S?t.touches[0]:t,r=he(i);if(Ve=Ce(),S&&(ze=t.touches.length),a.hold&&clearTimeout(et),qe=k,2==ze&&(0==Pe?(de(1,t.touches[1]),Pe=Ue=_e(Qe[0].start,Qe[1].start)):(he(t.touches[1]),Ue=_e(Qe[0].end,Qe[1].end),Re=we(Qe[0].end,Qe[1].end)),Ye=ke(Pe,Ue),Be=Math.abs(Pe-Ue)),ze===a.fingers||a.fingers===y||!S||W()){if(Fe=xe(r.start,r.end),B(e,Fe),je=De(r.start,r.end),Le=be(),ge(Fe,je),(a.swipeStatus||a.pinchStatus)&&(n=j(t,qe)),!a.triggerOnTouchEnd||a.triggerOnTouchLeave){var s=!0;if(a.triggerOnTouchLeave){var o=Ie(this);s=Me(r.end,o)}!a.triggerOnTouchEnd&&s?qe=O(k):a.triggerOnTouchLeave&&!s&&(qe=O(w)),qe!=D&&qe!=w||j(t,qe)}}else qe=D,j(t,qe);n===!1&&(qe=D,j(t,qe))}}function H(e){var t=e.originalEvent;return S&&t.touches.length>0?(se(),!0):(ue()&&(ze=Xe),Ve=Ce(),Le=be(),P()||!L()?(qe=D,j(t,qe)):a.triggerOnTouchEnd||0==a.triggerOnTouchEnd&&qe===k?(e.preventDefault(),qe=w,j(t,qe)):!a.triggerOnTouchEnd&&$()?(qe=w,F(t,qe,p)):qe===k&&(qe=D,j(t,qe)),le(!1),null)}function A(){ze=0,Ve=0,Je=0,Pe=0,Ue=0,Ye=1,oe(),le(!1)}function N(e){var t=e.originalEvent;a.triggerOnTouchLeave&&(qe=O(w),j(t,qe))}function E(){Ke.unbind(He,M),Ke.unbind(Oe,A),Ke.unbind(Ae,T),Ke.unbind(Ne,H),Ee&&Ke.unbind(Ee,N),le(!1)}function O(e){var t=e,n=Y(),i=L(),r=P();return!n||r?t=D:!i||e!=k||a.triggerOnTouchEnd&&!a.triggerOnTouchLeave?!i&&e==w&&a.triggerOnTouchLeave&&(t=D):t=w,t}function j(e,t){var a=void 0;return Q()||z()?a=F(e,t,d):(K()||W())&&a!==!1&&(a=F(e,t,h)),ie()&&a!==!1?a=F(e,t,f):re()&&a!==!1?a=F(e,t,g):ne()&&a!==!1&&(a=F(e,t,p)),t===D&&A(e),t===w&&(S?0==e.touches.length&&A(e):A(e)),a}function F(t,c,l){var v=void 0;if(l==d){if(Ke.trigger("swipeStatus",[c,Fe||null,je||0,Le||0,ze,Qe]),a.swipeStatus&&(v=a.swipeStatus.call(Ke,t,c,Fe||null,je||0,Le||0,ze,Qe),v===!1))return!1;if(c==w&&q()){if(Ke.trigger("swipe",[Fe,je,Le,ze,Qe]),a.swipe&&(v=a.swipe.call(Ke,t,Fe,je,Le,ze,Qe),v===!1))return!1;switch(Fe){case n:Ke.trigger("swipeLeft",[Fe,je,Le,ze,Qe]),a.swipeLeft&&(v=a.swipeLeft.call(Ke,t,Fe,je,Le,ze,Qe));break;case i:Ke.trigger("swipeRight",[Fe,je,Le,ze,Qe]),a.swipeRight&&(v=a.swipeRight.call(Ke,t,Fe,je,Le,ze,Qe));break;case r:Ke.trigger("swipeUp",[Fe,je,Le,ze,Qe]),a.swipeUp&&(v=a.swipeUp.call(Ke,t,Fe,je,Le,ze,Qe));break;case s:Ke.trigger("swipeDown",[Fe,je,Le,ze,Qe]),a.swipeDown&&(v=a.swipeDown.call(Ke,t,Fe,je,Le,ze,Qe))}}}if(l==h){if(Ke.trigger("pinchStatus",[c,Re||null,Be||0,Le||0,ze,Ye,Qe]),a.pinchStatus&&(v=a.pinchStatus.call(Ke,t,c,Re||null,Be||0,Le||0,ze,Ye,Qe),v===!1))return!1;if(c==w&&R())switch(Re){case o:Ke.trigger("pinchIn",[Re||null,Be||0,Le||0,ze,Ye,Qe]),a.pinchIn&&(v=a.pinchIn.call(Ke,t,Re||null,Be||0,Le||0,ze,Ye,Qe));break;case u:Ke.trigger("pinchOut",[Re||null,Be||0,Le||0,ze,Ye,Qe]),a.pinchOut&&(v=a.pinchOut.call(Ke,t,Re||null,Be||0,Le||0,ze,Ye,Qe))}}return l==p?c!==D&&c!==w||(clearTimeout(Ze),clearTimeout(et),X()&&!ee()?(Ge=Ce(),Ze=setTimeout(e.proxy(function(){Ge=null,Ke.trigger("tap",[t.target]),a.tap&&(v=a.tap.call(Ke,t,t.target))},this),a.doubleTapThreshold)):(Ge=null,Ke.trigger("tap",[t.target]),a.tap&&(v=a.tap.call(Ke,t,t.target)))):l==f?c!==D&&c!==w||(clearTimeout(Ze),Ge=null,Ke.trigger("doubletap",[t.target]),a.doubleTap&&(v=a.doubleTap.call(Ke,t,t.target))):l==g&&(c!==D&&c!==w||(clearTimeout(Ze),Ge=null,Ke.trigger("longtap",[t.target]),a.longTap&&(v=a.longTap.call(Ke,t,t.target)))),v}function L(){var e=!0;return null!==a.threshold&&(e=je>=a.threshold),e}function P(){var e=!1;return null!==a.cancelThreshold&&null!==Fe&&(e=ve(Fe)-je>=a.cancelThreshold),e}function U(){return null!==a.pinchThreshold?Be>=a.pinchThreshold:!0}function Y(){var e;return e=a.maxTimeThreshold?!(Le>=a.maxTimeThreshold):!0}function B(e,t){if(a.allowPageScroll===c||W())e.preventDefault();else{var o=a.allowPageScroll===l;switch(t){case n:(a.swipeLeft&&o||!o&&a.allowPageScroll!=v)&&e.preventDefault();break;case i:(a.swipeRight&&o||!o&&a.allowPageScroll!=v)&&e.preventDefault();break;case r:(a.swipeUp&&o||!o&&a.allowPageScroll!=m)&&e.preventDefault();break;case s:(a.swipeDown&&o||!o&&a.allowPageScroll!=m)&&e.preventDefault()}}}function R(){var e=J(),t=V(),a=U();return e&&t&&a}function W(){return!!(a.pinchStatus||a.pinchIn||a.pinchOut)}function K(){return!(!R()||!W())}function q(){var e=Y(),t=L(),a=J(),n=V(),i=P(),r=!i&&n&&a&&t&&e;return r}function z(){return!!(a.swipe||a.swipeStatus||a.swipeLeft||a.swipeRight||a.swipeUp||a.swipeDown)}function Q(){return!(!q()||!z())}function J(){return ze===a.fingers||a.fingers===y||!S}function V(){return 0!==Qe[0].end.x}function $(){return!!a.tap}function X(){return!!a.doubleTap}function G(){return!!a.longTap}function Z(){if(null==Ge)return!1;var e=Ce();return X()&&e-Ge<=a.doubleTapThreshold}function ee(){return Z()}function te(){return(1===ze||!S)&&(isNaN(je)||jea.longTapThreshold&&b>je}function ne(){return!(!te()||!$())}function ie(){return!(!Z()||!X())}function re(){return!(!ae()||!G())}function se(){$e=Ce(),Xe=event.touches.length+1}function oe(){$e=0,Xe=0}function ue(){var e=!1;if($e){var t=Ce()-$e;t<=a.fingerReleaseThreshold&&(e=!0)}return e}function ce(){return!(Ke.data(I+"_intouch")!==!0)}function le(e){e===!0?(Ke.bind(Ae,T),Ke.bind(Ne,H),Ee&&Ke.bind(Ee,N)):(Ke.unbind(Ae,T,!1),Ke.unbind(Ne,H,!1),Ee&&Ke.unbind(Ee,N,!1)),Ke.data(I+"_intouch",e===!0)}function de(e,t){var a=void 0!==t.identifier?t.identifier:0;return Qe[e].identifier=a,Qe[e].start.x=Qe[e].end.x=t.pageX||t.clientX,Qe[e].start.y=Qe[e].end.y=t.pageY||t.clientY,Qe[e]}function he(e){var t=void 0!==e.identifier?e.identifier:0,a=pe(t);return a.end.x=e.pageX||e.clientX,a.end.y=e.pageY||e.clientY,a}function pe(e){for(var t=0;t=t;t++)e.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return e}function ge(e,t){t=Math.max(t,ve(e)),We[e].distance=t}function ve(e){return We[e]?We[e].distance:void 0}function me(){var e={};return e[n]=ye(n),e[i]=ye(i),e[r]=ye(r),e[s]=ye(s),e}function ye(e){return{direction:e,distance:0}}function be(){return Ve-Je}function _e(e,t){var a=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);return Math.round(Math.sqrt(a*a+n*n))}function ke(e,t){var a=t/e*1;return a.toFixed(2)}function we(){return 1>Ye?u:o}function De(e,t){return Math.round(Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)))}function Se(e,t){var a=e.x-t.x,n=t.y-e.y,i=Math.atan2(n,a),r=Math.round(180*i/Math.PI);return 0>r&&(r=360-Math.abs(r)),r}function xe(e,t){var a=Se(e,t);return 45>=a&&a>=0?n:360>=a&&a>=315?n:a>=135&&225>=a?i:a>45&&135>a?s:r}function Ce(){var e=new Date;return e.getTime()}function Ie(t){t=e(t);var a=t.offset(),n={left:a.left,right:a.left+t.outerWidth(),top:a.top,bottom:a.top+t.outerHeight()};return n}function Me(e,t){return e.x>t.left&&e.xt.top&&e.y"))}function r(t){var a="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(a,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(a,"mouseover",s)}function s(){e.datepicker._isDisabledDatepicker(l.inline?l.dpDiv.parent()[0]:l.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function o(t,a){e.extend(t,a);for(var n in a)null==a[n]&&(t[n]=a[n]);return t}e.ui=e.ui||{},e.extend(e.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}}),e.fn.extend({scrollParent:function(t){var a=this.css("position"),n="absolute"===a,i=t?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var t=e(this);return n&&"static"===t.css("position")?!1:i.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==a&&r.length?r:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(a){return!!e.data(a,t)}}):function(t,a,n){return!!e.data(t,n[3])},focusable:function(a){return t(a,!isNaN(e.attr(a,"tabindex")))},tabbable:function(a){var n=e.attr(a,"tabindex"),i=isNaN(n);return(i||n>=0)&&t(a,!i)}}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(t,a){function n(t,a,n,r){return e.each(i,function(){a-=parseFloat(e.css(t,"padding"+this))||0,n&&(a-=parseFloat(e.css(t,"border"+this+"Width"))||0),r&&(a-=parseFloat(e.css(t,"margin"+this))||0)}),a}var i="Width"===a?["Left","Right"]:["Top","Bottom"],r=a.toLowerCase(),s={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+a]=function(t){return void 0===t?s["inner"+a].call(this):this.each(function(){e(this).css(r,n(this,t)+"px")})},e.fn["outer"+a]=function(t,i){return"number"!=typeof t?s["outer"+a].call(this,t):this.each(function(){e(this).css(r,n(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(a){return arguments.length?t.call(this,e.camelCase(a)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(a,n){return"number"==typeof a?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},a)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var a,n,i=e(this[0]);i.length&&i[0]!==document;){if(a=i.css("position"),("absolute"===a||"relative"===a||"fixed"===a)&&(n=parseInt(i.css("zIndex"),10),!isNaN(n)&&0!==n))return n;i=i.parent()}return 0}}),e.ui.plugin={add:function(t,a,n){var i,r=e.ui[t].prototype;for(i in n)r.plugins[i]=r.plugins[i]||[],r.plugins[i].push([a,n[i]])},call:function(e,t,a,n){var i,r=e.plugins[t];if(r&&(n||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(i=0;r.length>i;i++)e.options[r[i][0]]&&r[i][1].apply(e.element,a)}};var u=0,c=Array.prototype.slice;e.cleanData=function(t){return function(a){var n,i,r;for(r=0;null!=(i=a[r]);r++)try{n=e._data(i,"events"),n&&n.remove&&e(i).triggerHandler("remove")}catch(s){}t(a)}}(e.cleanData),e.widget=function(t,a,n){var i,r,s,o,u={},c=t.split(".")[0];return t=t.split(".")[1],i=c+"-"+t,n||(n=a,a=e.Widget),e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)},e[c]=e[c]||{},r=e[c][t],s=e[c][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new s(e,t)},e.extend(s,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),o=new a,o.options=e.widget.extend({},o.options),e.each(n,function(t,n){return e.isFunction(n)?void(u[t]=function(){var e=function(){return a.prototype[t].apply(this,arguments)},i=function(e){return a.prototype[t].apply(this,e)};return function(){var t,a=this._super,r=this._superApply;return this._super=e,this._superApply=i,t=n.apply(this,arguments),this._super=a,this._superApply=r,t}}()):void(u[t]=n)}),s.prototype=e.widget.extend(o,{widgetEventPrefix:r?o.widgetEventPrefix||t:t},u,{constructor:s,namespace:c,widgetName:t,widgetFullName:i}),r?(e.each(r._childConstructors,function(t,a){var n=a.prototype;e.widget(n.namespace+"."+n.widgetName,s,a._proto)}),delete r._childConstructors):a._childConstructors.push(s),e.widget.bridge(t,s),s},e.widget.extend=function(t){for(var a,n,i=c.call(arguments,1),r=0,s=i.length;s>r;r++)for(a in i[r])n=i[r][a],i[r].hasOwnProperty(a)&&void 0!==n&&(t[a]=e.isPlainObject(n)?e.isPlainObject(t[a])?e.widget.extend({},t[a],n):e.widget.extend({},n):n);return t},e.widget.bridge=function(t,a){var n=a.prototype.widgetFullName||t;e.fn[t]=function(i){var r="string"==typeof i,s=c.call(arguments,1),o=this;return r?this.each(function(){var a,r=e.data(this,n);return"instance"===i?(o=r,!1):r?e.isFunction(r[i])&&"_"!==i.charAt(0)?(a=r[i].apply(r,s),a!==r&&void 0!==a?(o=a&&a.jquery?o.pushStack(a.get()):a,!1):void 0):e.error("no such method '"+i+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+i+"'")}):(s.length&&(i=e.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=e.data(this,n);t?(t.option(i||{}),t._init&&t._init()):e.data(this,n,new a(i,this))})),o}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{disabled:!1,create:null},_createWidget:function(t,a){a=e(a||this.defaultElement||this)[0],this.element=e(a),this.uuid=u++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),a!==this&&(e.data(a,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===a&&this.destroy()}}),this.document=e(a.style?a.ownerDocument:a.document||a),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.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:e.noop,widget:function(){return this.element},option:function(t,a){var n,i,r,s=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(s={},n=t.split("."),t=n.shift(),n.length){for(i=s[t]=e.widget.extend({},this.options[t]),r=0;n.length-1>r;r++)i[n[r]]=i[n[r]]||{},i=i[n[r]];if(t=n.pop(),1===arguments.length)return void 0===i[t]?null:i[t];i[t]=a}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=a}return this._setOptions(s),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(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(t,a,n){var i,r=this;"boolean"!=typeof t&&(n=a,a=t,t=!1),n?(a=i=e(a),this.bindings=this.bindings.add(a)):(n=a,a=this.element,i=this.widget()),e.each(n,function(n,s){function o(){return t||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof s?r[s]:s).apply(r,arguments):void 0}"string"!=typeof s&&(o.guid=s.guid=s.guid||o.guid||e.guid++);var u=n.match(/^([\w:-]*)\s*(.*)$/),c=u[1]+r.eventNamespace,l=u[2];l?i.delegate(l,c,o):a.bind(c,o)})},_off:function(t,a){a=(a||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(a).undelegate(a),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function a(){return("string"==typeof e?n[e]:e).apply(n,arguments)}var n=this;return setTimeout(a,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,a,n){var i,r,s=this.options[t];if(n=n||{},a=e.Event(a),a.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),a.target=this.element[0],r=a.originalEvent)for(i in r)i in a||(a[i]=r[i]);return this.element.trigger(a,n),!(e.isFunction(s)&&s.apply(this.element[0],[a].concat(n))===!1||a.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,a){e.Widget.prototype["_"+t]=function(n,i,r){"string"==typeof i&&(i={effect:i});var s,o=i?i===!0||"number"==typeof i?a:i.effect||a:t;i=i||{},"number"==typeof i&&(i={duration:i}),s=!e.isEmptyObject(i),i.complete=r,i.delay&&n.delay(i.delay),s&&e.effects&&e.effects.effect[o]?n[t](i):o!==t&&n[o]?n[o](i.duration,i.easing,r):n.queue(function(a){e(this)[t](),r&&r.call(n[0]),a()})}}),e.widget,e.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 t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;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(),e=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&&e.css("height","")},_setOption:function(e,t){return"active"===e?void this._activate(t):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),void("disabled"===e&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t))))},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var a=e.ui.keyCode,n=this.headers.length,i=this.headers.index(t.target),r=!1;switch(t.keyCode){case a.RIGHT:case a.DOWN:r=this.headers[(i+1)%n];break;case a.LEFT:case a.UP:r=this.headers[(i-1+n)%n];break;case a.SPACE:case a.ENTER:this._eventHandler(t);break;case a.HOME:r=this.headers[0];break;case a.END:r=this.headers[n-1]}r&&(e(t.target).attr("tabIndex",-1),e(r).attr("tabIndex",0),r.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=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(),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var t,a=this.options,n=a.heightStyle,i=this.element.parent();this.active=this._findActive(a.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 t=e(this),a=t.uniqueId().attr("id"),n=t.next(),i=n.uniqueId().attr("id");t.attr("aria-controls",i),n.attr("aria-labelledby",a)}).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(a.event),"fill"===n?(t=i.height(),this.element.siblings(":visible").each(function(){var a=e(this),n=a.css("position");"absolute"!==n&&"fixed"!==n&&(t-=a.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===n&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var a=this._findActive(t)[0];a!==this.active[0]&&(a=a||this.active[0],this._eventHandler({target:a,currentTarget:a,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var a={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){a[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,a),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var a=this.options,n=this.active,i=e(t.currentTarget),r=i[0]===n[0],s=r&&a.collapsible,o=s?e():i.next(),u=n.next(),c={oldHeader:n,oldPanel:u,newHeader:s?e():i,newPanel:o};t.preventDefault(),r&&!a.collapsible||this._trigger("beforeActivate",t,c)===!1||(a.active=s?!1:this.headers.index(i),this.active=r?e():i,this._toggle(c),n.removeClass("ui-accordion-header-active ui-state-active"),a.icons&&n.children(".ui-accordion-header-icon").removeClass(a.icons.activeHeader).addClass(a.icons.header),r||(i.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),a.icons&&i.children(".ui-accordion-header-icon").removeClass(a.icons.header).addClass(a.icons.activeHeader),i.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var a=t.newPanel,n=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=a,this.prevHide=n,this.options.animate?this._animate(a,n,t):(n.hide(),a.show(),this._toggleComplete(t)),n.attr({"aria-hidden":"true"}),n.prev().attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):a.length&&this.headers.filter(function(){return 0===parseInt(e(this).attr("tabIndex"),10)}).attr("tabIndex",-1),a.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,t,a){var n,i,r,s=this,o=0,u=e.css("box-sizing"),c=e.length&&(!t.length||e.index()
")):this.dpDiv}},_connectDatepicker:function(t,a){var n=e(t);a.append=e([]),a.trigger=e([]),n.hasClass(this.markerClassName)||(this._attachments(n,a),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(a),e.data(t,"datepicker",a),a.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,a){var n,i,r,s=this._get(a,"appendText"),o=this._get(a,"isRTL");a.append&&a.append.remove(),s&&(a.append=e(""+s+""),t[o?"before":"after"](a.append)),t.unbind("focus",this._showDatepicker),a.trigger&&a.trigger.remove(),n=this._get(a,"showOn"),("focus"===n||"both"===n)&&t.focus(this._showDatepicker),("button"===n||"both"===n)&&(i=this._get(a,"buttonText"),r=this._get(a,"buttonImage"),a.trigger=e(this._get(a,"buttonImageOnly")?e("").addClass(this._triggerClass).attr({src:r,alt:i,title:i}):e("").addClass(this._triggerClass).html(r?e("").attr({src:r,alt:i,title:i}):i)),t[o?"before":"after"](a.trigger),a.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,a,n,i,r=new Date(2009,11,20),s=this._get(e,"dateFormat");s.match(/[DM]/)&&(t=function(e){for(a=0,n=0,i=0;e.length>i;i++)e[i].length>a&&(a=e[i].length,n=i);return n},r.setMonth(t(this._get(e,s.match(/MM/)?"monthNames":"monthNamesShort"))),r.setDate(t(this._get(e,s.match(/DD/)?"dayNames":"dayNamesShort"))+20-r.getDay())),e.input.attr("size",this._formatDate(e,r).length)}},_inlineDatepicker:function(t,a){var n=e(t);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(a.dpDiv),e.data(t,"datepicker",a),this._setDate(a,this._getDefaultDate(a),!0),this._updateDatepicker(a),this._updateAlternate(a),a.settings.disabled&&this._disableDatepicker(t),a.dpDiv.css("display","block"))},_dialogDatepicker:function(t,a,n,i,r){var s,u,c,l,d,h=this._dialogInst;return h||(this.uuid+=1,s="dp"+this.uuid,this._dialogInput=e(""),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),h=this._dialogInst=this._newInst(this._dialogInput,!1),h.settings={},e.data(this._dialogInput[0],"datepicker",h)),o(h.settings,i||{}),a=a&&a.constructor===Date?this._formatDate(h,a):a,this._dialogInput.val(a),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(u=document.documentElement.clientWidth,c=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[u/2-100+l,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),h.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",h),this},_destroyDatepicker:function(t){var a,n=e(t),i=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(a=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===a?(i.append.remove(),i.trigger.remove(),n.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===a||"span"===a)&&n.removeClass(this.markerClassName).empty(),l===i&&(l=null))},_enableDatepicker:function(t){var a,n,i=e(t),r=e.data(t,"datepicker");i.hasClass(this.markerClassName)&&(a=t.nodeName.toLowerCase(),"input"===a?(t.disabled=!1,r.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===a||"span"===a)&&(n=i.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var a,n,i=e(t),r=e.data(t,"datepicker");i.hasClass(this.markerClassName)&&(a=t.nodeName.toLowerCase(),"input"===a?(t.disabled=!0,r.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===a||"span"===a)&&(n=i.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(a){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,a,n){var i,r,s,u,c=this._getInst(t);return 2===arguments.length&&"string"==typeof a?"defaults"===a?e.extend({},e.datepicker._defaults):c?"all"===a?e.extend({},c.settings):this._get(c,a):null:(i=a||{},"string"==typeof a&&(i={},i[a]=n),void(c&&(this._curInst===c&&this._hideDatepicker(),r=this._getDateDatepicker(t,!0),s=this._getMinMaxDate(c,"min"),u=this._getMinMaxDate(c,"max"),o(c.settings,i),null!==s&&void 0!==i.dateFormat&&void 0===i.minDate&&(c.settings.minDate=this._formatDate(c,s)),null!==u&&void 0!==i.dateFormat&&void 0===i.maxDate&&(c.settings.maxDate=this._formatDate(c,u)),"disabled"in i&&(i.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),c),this._autoSize(c),this._setDate(c,r),this._updateAlternate(c),this._updateDatepicker(c))))},_changeDatepicker:function(e,t,a){this._optionDatepicker(e,t,a)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var a=this._getInst(e);a&&(this._setDate(a,t),this._updateDatepicker(a),this._updateAlternate(a))},_getDateDatepicker:function(e,t){var a=this._getInst(e);return a&&!a.inline&&this._setDateFromField(a,t),a?this._getDate(a):null},_doKeyDown:function(t){var a,n,i,r=e.datepicker._getInst(t.target),s=!0,o=r.dpDiv.is(".ui-datepicker-rtl");if(r._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),s=!1;break;case 13:return i=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",r.dpDiv),i[0]&&e.datepicker._selectDay(t.target,r.selectedMonth,r.selectedYear,i[0]),a=e.datepicker._get(r,"onSelect"),a?(n=e.datepicker._formatDate(r),a.apply(r.input?r.input[0]:null,[n,r])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(r,"stepBigMonths"):-e.datepicker._get(r,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(r,"stepBigMonths"):+e.datepicker._get(r,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),s=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),s=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?1:-1,"D"),s=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(r,"stepBigMonths"):-e.datepicker._get(r,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),s=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?-1:1,"D"),s=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(r,"stepBigMonths"):+e.datepicker._get(r,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),s=t.ctrlKey||t.metaKey;break;default:s=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):s=!1;s&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var a,n,i=e.datepicker._getInst(t.target);return e.datepicker._get(i,"constrainInput")?(a=e.datepicker._possibleChars(e.datepicker._get(i,"dateFormat")),n=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">n||!a||a.indexOf(n)>-1):void 0},_doKeyUp:function(t){var a,n=e.datepicker._getInst(t.target);if(n.input.val()!==n.lastVal)try{a=e.datepicker.parseDate(e.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,e.datepicker._getFormatConfig(n)),a&&(e.datepicker._setDateFromField(n),e.datepicker._updateAlternate(n),e.datepicker._updateDatepicker(n))}catch(i){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var a,i,r,s,u,c,l;a=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==a&&(e.datepicker._curInst.dpDiv.stop(!0,!0),a&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),i=e.datepicker._get(a,"beforeShow"),r=i?i.apply(t,[t,a]):{},r!==!1&&(o(a.settings,r),a.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(a),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),s=!1,e(t).parents().each(function(){return s|="fixed"===e(this).css("position"),!s}),u={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,a.dpDiv.empty(),a.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(a),u=e.datepicker._checkOffset(a,u,s),a.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":s?"fixed":"absolute",display:"none",left:u.left+"px",top:u.top+"px"}),a.inline||(c=e.datepicker._get(a,"showAnim"),l=e.datepicker._get(a,"duration"),a.dpDiv.css("z-index",n(e(t))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[c]?a.dpDiv.show(c,e.datepicker._get(a,"showOptions"),l):a.dpDiv[c||"show"](c?l:null),e.datepicker._shouldFocusInput(a)&&a.input.focus(),e.datepicker._curInst=a))}},_updateDatepicker:function(t){this.maxRows=4,l=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var a,n=this._getNumberOfMonths(t),i=n[1],r=17,o=t.dpDiv.find("."+this._dayOverClass+" a");o.length>0&&s.apply(o.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),i>1&&t.dpDiv.addClass("ui-datepicker-multi-"+i).css("width",r*i+"em"),t.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(a=t.yearshtml,setTimeout(function(){a===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),a=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,a,n){var i=t.dpDiv.outerWidth(),r=t.dpDiv.outerHeight(),s=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,u=document.documentElement.clientWidth+(n?0:e(document).scrollLeft()),c=document.documentElement.clientHeight+(n?0:e(document).scrollTop());return a.left-=this._get(t,"isRTL")?i-s:0,a.left-=n&&a.left===t.input.offset().left?e(document).scrollLeft():0,a.top-=n&&a.top===t.input.offset().top+o?e(document).scrollTop():0,a.left-=Math.min(a.left,a.left+i>u&&u>i?Math.abs(a.left+i-u):0),a.top-=Math.min(a.top,a.top+r>c&&c>r?Math.abs(r+o):0),a},_findPos:function(t){for(var a,n=this._getInst(t),i=this._get(n,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[i?"previousSibling":"nextSibling"];return a=e(t).offset(),[a.left,a.top]},_hideDatepicker:function(t){var a,n,i,r,s=this._curInst;!s||t&&s!==e.data(t,"datepicker")||this._datepickerShowing&&(a=this._get(s,"showAnim"),n=this._get(s,"duration"),i=function(){e.datepicker._tidyDialog(s)},e.effects&&(e.effects.effect[a]||e.effects[a])?s.dpDiv.hide(a,e.datepicker._get(s,"showOptions"),n,i):s.dpDiv["slideDown"===a?"slideUp":"fadeIn"===a?"fadeOut":"hide"](a?n:null,i),a||i(),this._datepickerShowing=!1,r=this._get(s,"onClose"),r&&r.apply(s.input?s.input[0]:null,[s.input?s.input.val():"",s]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var a=e(t.target),n=e.datepicker._getInst(a[0]);(a[0].id!==e.datepicker._mainDivId&&0===a.parents("#"+e.datepicker._mainDivId).length&&!a.hasClass(e.datepicker.markerClassName)&&!a.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||a.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==n)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,a,n){var i=e(t),r=this._getInst(i[0]);this._isDisabledDatepicker(i[0])||(this._adjustInstDate(r,a+("M"===n?this._get(r,"showCurrentAtPos"):0),n),this._updateDatepicker(r))},_gotoToday:function(t){var a,n=e(t),i=this._getInst(n[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(a=new Date,i.selectedDay=a.getDate(),i.drawMonth=i.selectedMonth=a.getMonth(),i.drawYear=i.selectedYear=a.getFullYear()),this._notifyChange(i),this._adjustDate(n)},_selectMonthYear:function(t,a,n){var i=e(t),r=this._getInst(i[0]);r["selected"+("M"===n?"Month":"Year")]=r["draw"+("M"===n?"Month":"Year")]=parseInt(a.options[a.selectedIndex].value,10),this._notifyChange(r),this._adjustDate(i)},_selectDay:function(t,a,n,i){var r,s=e(t);e(i).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||(r=this._getInst(s[0]),r.selectedDay=r.currentDay=e("a",i).html(),r.selectedMonth=r.currentMonth=a,r.selectedYear=r.currentYear=n,this._selectDate(t,this._formatDate(r,r.currentDay,r.currentMonth,r.currentYear)))},_clearDate:function(t){var a=e(t);this._selectDate(a,"")},_selectDate:function(t,a){var n,i=e(t),r=this._getInst(i[0]);a=null!=a?a:this._formatDate(r),r.input&&r.input.val(a),this._updateAlternate(r),n=this._get(r,"onSelect"),n?n.apply(r.input?r.input[0]:null,[a,r]):r.input&&r.input.trigger("change"),r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],"object"!=typeof r.input[0]&&r.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var a,n,i,r=this._get(t,"altField");r&&(a=this._get(t,"altFormat")||this._get(t,"dateFormat"),n=this._getDate(t),i=this.formatDate(a,n,this._getFormatConfig(t)),e(r).each(function(){e(this).val(i)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,a=new Date(e.getTime());return a.setDate(a.getDate()+4-(a.getDay()||7)),t=a.getTime(),a.setMonth(0),a.setDate(1),Math.floor(Math.round((t-a)/864e5)/7)+1},parseDate:function(t,a,n){if(null==t||null==a)throw"Invalid arguments";if(a="object"==typeof a?""+a:a+"",""===a)return null;var i,r,s,o,u=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,l="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,h=(n?n.dayNames:null)||this._defaults.dayNames,p=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,f=(n?n.monthNames:null)||this._defaults.monthNames,g=-1,v=-1,m=-1,y=-1,b=!1,_=function(e){var a=t.length>i+1&&t.charAt(i+1)===e;return a&&i++,a},k=function(e){var t=_(e),n="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,i="y"===e?n:1,r=RegExp("^\\d{"+i+","+n+"}"),s=a.substring(u).match(r);if(!s)throw"Missing number at position "+u;return u+=s[0].length,parseInt(s[0],10)},w=function(t,n,i){var r=-1,s=e.map(_(t)?i:n,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(s,function(e,t){var n=t[1];return a.substr(u,n.length).toLowerCase()===n.toLowerCase()?(r=t[0],u+=n.length,!1):void 0}),-1!==r)return r+1;throw"Unknown name at position "+u},D=function(){if(a.charAt(u)!==t.charAt(i))throw"Unexpected literal at position "+u;u++};for(i=0;t.length>i;i++)if(b)"'"!==t.charAt(i)||_("'")?D():b=!1;else switch(t.charAt(i)){case"d":m=k("d");break;case"D":w("D",d,h);break;case"o":y=k("o");break;case"m":v=k("m");break;case"M":v=w("M",p,f);break;case"y":g=k("y");break;case"@":o=new Date(k("@")),g=o.getFullYear(),v=o.getMonth()+1,m=o.getDate();break;case"!":o=new Date((k("!")-this._ticksTo1970)/1e4),g=o.getFullYear(),v=o.getMonth()+1,m=o.getDate();break;case"'":_("'")?D():b=!0;break;default:D()}if(a.length>u&&(s=a.substr(u),!/^\s+/.test(s)))throw"Extra/unparsed characters found in date: "+s;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(l>=g?0:-100)),y>-1)for(v=1,m=y;r=this._getDaysInMonth(g,v-1),!(r>=m);)v++,m-=r;if(o=this._daylightSavingAdjust(new Date(g,v-1,m)),o.getFullYear()!==g||o.getMonth()+1!==v||o.getDate()!==m)throw"Invalid date";return o},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:864e9*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,a){if(!t)return"";var n,i=(a?a.dayNamesShort:null)||this._defaults.dayNamesShort,r=(a?a.dayNames:null)||this._defaults.dayNames,s=(a?a.monthNamesShort:null)||this._defaults.monthNamesShort,o=(a?a.monthNames:null)||this._defaults.monthNames,u=function(t){var a=e.length>n+1&&e.charAt(n+1)===t;return a&&n++,a},c=function(e,t,a){var n=""+t;if(u(e))for(;a>n.length;)n="0"+n;return n},l=function(e,t,a,n){return u(e)?n[t]:a[t]},d="",h=!1;if(t)for(n=0;e.length>n;n++)if(h)"'"!==e.charAt(n)||u("'")?d+=e.charAt(n):h=!1;else switch(e.charAt(n)){case"d":d+=c("d",t.getDate(),2);break;case"D":d+=l("D",t.getDay(),i,r);break;case"o":d+=c("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":d+=c("m",t.getMonth()+1,2);break;case"M":d+=l("M",t.getMonth(),s,o);break;case"y":d+=u("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":d+=t.getTime();break;case"!":d+=1e4*t.getTime()+this._ticksTo1970;break;case"'":u("'")?d+="'":h=!0;break;default:d+=e.charAt(n)}return d},_possibleChars:function(e){var t,a="",n=!1,i=function(a){var n=e.length>t+1&&e.charAt(t+1)===a;return n&&t++,n};for(t=0;e.length>t;t++)if(n)"'"!==e.charAt(t)||i("'")?a+=e.charAt(t):n=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":a+="0123456789";break;case"D":case"M":return null;case"'":i("'")?a+="'":n=!0;break;default:a+=e.charAt(t)}return a},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var a=this._get(e,"dateFormat"),n=e.lastVal=e.input?e.input.val():null,i=this._getDefaultDate(e),r=i,s=this._getFormatConfig(e);try{r=this.parseDate(a,n,s)||i}catch(o){n=t?"":n}e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),e.currentDay=n?r.getDate():0,e.currentMonth=n?r.getMonth():0,e.currentYear=n?r.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,a,n){var i=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},r=function(a){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),a,e.datepicker._getFormatConfig(t))}catch(n){}for(var i=(a.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,r=i.getFullYear(),s=i.getMonth(),o=i.getDate(),u=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,c=u.exec(a);c;){switch(c[2]||"d"){case"d":case"D":o+=parseInt(c[1],10);break;case"w":case"W":o+=7*parseInt(c[1],10);break;case"m":case"M":s+=parseInt(c[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(r,s));break;case"y":case"Y":r+=parseInt(c[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(r,s))}c=u.exec(a)}return new Date(r,s,o)},s=null==a||""===a?n:"string"==typeof a?r(a):"number"==typeof a?isNaN(a)?n:i(a):new Date(a.getTime());return s=s&&"Invalid Date"==""+s?n:s,s&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,a){var n=!t,i=e.selectedMonth,r=e.selectedYear,s=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=s.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=s.getMonth(),e.drawYear=e.selectedYear=e.currentYear=s.getFullYear(),i===e.selectedMonth&&r===e.selectedYear||a||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(n?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var a=this._get(t,"stepMonths"),n="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(n,-a,"M")},next:function(){e.datepicker._adjustDate(n,+a,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(n)},selectDay:function(){return e.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(n,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,a,n,i,r,s,o,u,c,l,d,h,p,f,g,v,m,y,b,_,k,w,D,S,x,C,I,M,T,H,A,N,E,O,j,F,L,P,U,Y=new Date,B=this._daylightSavingAdjust(new Date(Y.getFullYear(),Y.getMonth(),Y.getDate())),R=this._get(e,"isRTL"),W=this._get(e,"showButtonPanel"),K=this._get(e,"hideIfNoPrevNext"),q=this._get(e,"navigationAsDateFormat"),z=this._getNumberOfMonths(e),Q=this._get(e,"showCurrentAtPos"),J=this._get(e,"stepMonths"),V=1!==z[0]||1!==z[1],$=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),X=this._getMinMaxDate(e,"min"),G=this._getMinMaxDate(e,"max"),Z=e.drawMonth-Q,ee=e.drawYear;if(0>Z&&(Z+=12,ee--),G)for(t=this._daylightSavingAdjust(new Date(G.getFullYear(),G.getMonth()-z[0]*z[1]+1,G.getDate())),t=X&&X>t?X:t;this._daylightSavingAdjust(new Date(ee,Z,1))>t;)Z--,0>Z&&(Z=11,ee--);for(e.drawMonth=Z,e.drawYear=ee,a=this._get(e,"prevText"),a=q?this.formatDate(a,this._daylightSavingAdjust(new Date(ee,Z-J,1)),this._getFormatConfig(e)):a,n=this._canAdjustMonth(e,-1,ee,Z)?"
"+a+"":K?"":""+a+"",i=this._get(e,"nextText"),i=q?this.formatDate(i,this._daylightSavingAdjust(new Date(ee,Z+J,1)),this._getFormatConfig(e)):i,r=this._canAdjustMonth(e,1,ee,Z)?""+i+"":K?"":""+i+"",s=this._get(e,"currentText"),o=this._get(e,"gotoCurrent")&&e.currentDay?$:B,s=q?this.formatDate(s,o,this._getFormatConfig(e)):s,u=e.inline?"":"",c=W?"
"+(R?u:"")+(this._isInRange(e,o)?"":"")+(R?"":u)+"
":"",l=parseInt(this._get(e,"firstDay"),10),l=isNaN(l)?0:l,d=this._get(e,"showWeek"),h=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),f=this._get(e,"monthNames"),g=this._get(e,"monthNamesShort"),v=this._get(e,"beforeShowDay"),m=this._get(e,"showOtherMonths"),y=this._get(e,"selectOtherMonths"),b=this._getDefaultDate(e),_="",w=0;z[0]>w;w++){for(D="",this.maxRows=4,S=0;z[1]>S;S++){if(x=this._daylightSavingAdjust(new Date(ee,Z,e.selectedDay)),C=" ui-corner-all",I="",V){if(I+="
"}for(I+="
"+(/all|left/.test(C)&&0===w?R?r:n:"")+(/all|right/.test(C)&&0===w?R?n:r:"")+this._generateMonthYearHeader(e,Z,ee,X,G,w>0||S>0,f,g)+"
",M=d?"":"",k=0;7>k;k++)T=(k+l)%7,M+="";for(I+=M+"",H=this._getDaysInMonth(ee,Z),ee===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,H)),A=(this._getFirstDayOfMonth(ee,Z)-l+7)%7,N=Math.ceil((A+H)/7),E=V&&this.maxRows>N?this.maxRows:N,this.maxRows=E,O=this._daylightSavingAdjust(new Date(ee,Z,1-A)),j=0;E>j;j++){for(I+="",F=d?"":"",k=0;7>k;k++)L=v?v.apply(e.input?e.input[0]:null,[O]):[!0,""],P=O.getMonth()!==Z,U=P&&!y||!L[0]||X&&X>O||G&&O>G,F+="",O.setDate(O.getDate()+1),O=this._daylightSavingAdjust(O);I+=F+""}Z++,Z>11&&(Z=0,ee++),I+="
"+this._get(e,"weekHeader")+"=5?" class='ui-datepicker-week-end'":"")+">"+p[T]+"
"+this._get(e,"calculateWeek")(O)+""+(P&&!m?" ":U?""+O.getDate()+"":""+O.getDate()+"")+"
"+(V?"
"+(z[0]>0&&S===z[1]-1?"
":""):""),D+=I}_+=D}return _+=c,e._keyEvent=!1,_},_generateMonthYearHeader:function(e,t,a,n,i,r,s,o){var u,c,l,d,h,p,f,g,v=this._get(e,"changeMonth"),m=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),b="
",_="";if(r||!v)_+=""+s[t]+"";else{for(u=n&&n.getFullYear()===a,c=i&&i.getFullYear()===a,_+=""}if(y||(b+=_+(!r&&v&&m?"":" ")),!e.yearshtml)if(e.yearshtml="",r||!m)b+=""+a+"";else{for(d=this._get(e,"yearRange").split(":"),h=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?a+parseInt(e.substring(1),10):e.match(/[+\-].*/)?h+parseInt(e,10):parseInt(e,10);return isNaN(t)?h:t},f=p(d[0]),g=Math.max(f,p(d[1]||"")),f=n?Math.max(f,n.getFullYear()):f,g=i?Math.min(g,i.getFullYear()):g,e.yearshtml+="",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,"yearSuffix"),y&&(b+=(!r&&v&&m?"":" ")+_),b+="
"},_adjustInstDate:function(e,t,a){var n=e.drawYear+("Y"===a?t:0),i=e.drawMonth+("M"===a?t:0),r=Math.min(e.selectedDay,this._getDaysInMonth(n,i))+("D"===a?t:0),s=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(n,i,r)));e.selectedDay=s.getDate(),e.drawMonth=e.selectedMonth=s.getMonth(),e.drawYear=e.selectedYear=s.getFullYear(),("M"===a||"Y"===a)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var a=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),i=a&&a>t?a:t;return n&&i>n?n:i},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,a,n){var i=this._getNumberOfMonths(e),r=this._daylightSavingAdjust(new Date(a,n+(0>t?t:i[0]*i[1]),1));return 0>t&&r.setDate(this._getDaysInMonth(r.getFullYear(),r.getMonth())),this._isInRange(e,r)},_isInRange:function(e,t){var a,n,i=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max"),s=null,o=null,u=this._get(e,"yearRange");return u&&(a=u.split(":"),n=(new Date).getFullYear(),s=parseInt(a[0],10),o=parseInt(a[1],10),a[0].match(/[+\-].*/)&&(s+=n),a[1].match(/[+\-].*/)&&(o+=n)),(!i||t.getTime()>=i.getTime())&&(!r||t.getTime()<=r.getTime())&&(!s||t.getFullYear()>=s)&&(!o||o>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,a,n){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var i=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(n,a,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),i,this._getFormatConfig(e)); }}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var a=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(a)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(a)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(a))},e.datepicker=new i,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.11.4",e.datepicker;var d="ui-effects-",h=e;e.effects={effect:{}},function(e,t){function a(e,t,a){var n=d[t.type]||{};return null==e?a||!t.def?null:t.def:(e=n.floor?~~e:parseFloat(e),isNaN(e)?t.def:n.mod?(e+n.mod)%n.mod:0>e?0:e>n.max?n.max:e)}function n(a){var n=c(),i=n._rgba=[];return a=a.toLowerCase(),f(u,function(e,r){var s,o=r.re.exec(a),u=o&&r.parse(o),c=r.space||"rgba";return u?(s=n[c](u),n[l[c].cache]=s[l[c].cache],i=n._rgba=s._rgba,!1):t}),i.length?("0,0,0,0"===i.join()&&e.extend(i,r.transparent),n):r[a]}function i(e,t,a){return a=(a+1)%1,1>6*a?e+6*(t-e)*a:1>2*a?t:2>3*a?e+6*(t-e)*(2/3-a):e}var r,s="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",o=/^([\-+])=\s*(\d+\.?\d*)/,u=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],c=e.Color=function(t,a,n,i){return new e.Color.fn.parse(t,a,n,i)},l={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},d={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},h=c.support={},p=e("

")[0],f=e.each;p.style.cssText="background-color:rgba(1,1,1,.5)",h.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(l,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),c.fn=e.extend(c.prototype,{parse:function(i,s,o,u){if(i===t)return this._rgba=[null,null,null,null],this;(i.jquery||i.nodeType)&&(i=e(i).css(s),s=t);var d=this,h=e.type(i),p=this._rgba=[];return s!==t&&(i=[i,s,o,u],h="array"),"string"===h?this.parse(n(i)||r._default):"array"===h?(f(l.rgba.props,function(e,t){p[t.idx]=a(i[t.idx],t)}),this):"object"===h?(i instanceof c?f(l,function(e,t){i[t.cache]&&(d[t.cache]=i[t.cache].slice())}):f(l,function(t,n){var r=n.cache;f(n.props,function(e,t){if(!d[r]&&n.to){if("alpha"===e||null==i[e])return;d[r]=n.to(d._rgba)}d[r][t.idx]=a(i[e],t,!0)}),d[r]&&0>e.inArray(null,d[r].slice(0,3))&&(d[r][3]=1,n.from&&(d._rgba=n.from(d[r])))}),this):t},is:function(e){var a=c(e),n=!0,i=this;return f(l,function(e,r){var s,o=a[r.cache];return o&&(s=i[r.cache]||r.to&&r.to(i._rgba)||[],f(r.props,function(e,a){return null!=o[a.idx]?n=o[a.idx]===s[a.idx]:t})),n}),n},_space:function(){var e=[],t=this;return f(l,function(a,n){t[n.cache]&&e.push(a)}),e.pop()},transition:function(e,t){var n=c(e),i=n._space(),r=l[i],s=0===this.alpha()?c("transparent"):this,o=s[r.cache]||r.to(s._rgba),u=o.slice();return n=n[r.cache],f(r.props,function(e,i){var r=i.idx,s=o[r],c=n[r],l=d[i.type]||{};null!==c&&(null===s?u[r]=c:(l.mod&&(c-s>l.mod/2?s+=l.mod:s-c>l.mod/2&&(s-=l.mod)),u[r]=a((c-s)*t+s,i)))}),this[i](u)},blend:function(t){if(1===this._rgba[3])return this;var a=this._rgba.slice(),n=a.pop(),i=c(t)._rgba;return c(e.map(a,function(e,t){return(1-n)*i[t]+n*e}))},toRgbaString:function(){var t="rgba(",a=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===a[3]&&(a.pop(),t="rgb("),t+a.join()+")"},toHslaString:function(){var t="hsla(",a=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&3>t&&(e=Math.round(100*e)+"%"),e});return 1===a[3]&&(a.pop(),t="hsl("),t+a.join()+")"},toHexString:function(t){var a=this._rgba.slice(),n=a.pop();return t&&a.push(~~(255*n)),"#"+e.map(a,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),c.fn.parse.prototype=c.fn,l.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,a,n=e[0]/255,i=e[1]/255,r=e[2]/255,s=e[3],o=Math.max(n,i,r),u=Math.min(n,i,r),c=o-u,l=o+u,d=.5*l;return t=u===o?0:n===o?60*(i-r)/c+360:i===o?60*(r-n)/c+120:60*(n-i)/c+240,a=0===c?0:.5>=d?c/l:c/(2-l),[Math.round(t)%360,a,d,null==s?1:s]},l.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,a=e[1],n=e[2],r=e[3],s=.5>=n?n*(1+a):n+a-n*a,o=2*n-s;return[Math.round(255*i(o,s,t+1/3)),Math.round(255*i(o,s,t)),Math.round(255*i(o,s,t-1/3)),r]},f(l,function(n,i){var r=i.props,s=i.cache,u=i.to,l=i.from;c.fn[n]=function(n){if(u&&!this[s]&&(this[s]=u(this._rgba)),n===t)return this[s].slice();var i,o=e.type(n),d="array"===o||"object"===o?n:arguments,h=this[s].slice();return f(r,function(e,t){var n=d["object"===o?e:t.idx];null==n&&(n=h[t.idx]),h[t.idx]=a(n,t)}),l?(i=c(l(h)),i[s]=h,i):c(h)},f(r,function(t,a){c.fn[t]||(c.fn[t]=function(i){var r,s=e.type(i),u="alpha"===t?this._hsla?"hsla":"rgba":n,c=this[u](),l=c[a.idx];return"undefined"===s?l:("function"===s&&(i=i.call(this,l),s=e.type(i)),null==i&&a.empty?this:("string"===s&&(r=o.exec(i),r&&(i=l+parseFloat(r[2])*("+"===r[1]?1:-1))),c[a.idx]=i,this[u](c)))})})}),c.hook=function(t){var a=t.split(" ");f(a,function(t,a){e.cssHooks[a]={set:function(t,i){var r,s,o="";if("transparent"!==i&&("string"!==e.type(i)||(r=n(i)))){if(i=c(r||i),!h.rgba&&1!==i._rgba[3]){for(s="backgroundColor"===a?t.parentNode:t;(""===o||"transparent"===o)&&s&&s.style;)try{o=e.css(s,"backgroundColor"),s=s.parentNode}catch(u){}i=i.blend(o&&"transparent"!==o?o:"_default")}i=i.toRgbaString()}try{t.style[a]=i}catch(u){}}},e.fx.step[a]=function(t){t.colorInit||(t.start=c(t.elem,a),t.end=c(t.end),t.colorInit=!0),e.cssHooks[a].set(t.elem,t.start.transition(t.end,t.pos))}})},c.hook(s),e.cssHooks.borderColor={expand:function(e){var t={};return f(["Top","Right","Bottom","Left"],function(a,n){t["border"+n+"Color"]=e}),t}},r=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(h),function(){function t(t){var a,n,i=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,r={};if(i&&i.length&&i[0]&&i[i[0]])for(n=i.length;n--;)a=i[n],"string"==typeof i[a]&&(r[e.camelCase(a)]=i[a]);else for(a in i)"string"==typeof i[a]&&(r[a]=i[a]);return r}function a(t,a){var n,r,s={};for(n in a)r=a[n],t[n]!==r&&(i[n]||(e.fx.step[n]||!isNaN(parseFloat(r)))&&(s[n]=r));return s}var n=["add","remove","toggle"],i={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,a){e.fx.step[a]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(h.style(e.elem,a,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(i,r,s,o){var u=e.speed(r,s,o);return this.queue(function(){var r,s=e(this),o=s.attr("class")||"",c=u.children?s.find("*").addBack():s;c=c.map(function(){var a=e(this);return{el:a,start:t(this)}}),r=function(){e.each(n,function(e,t){i[t]&&s[t+"Class"](i[t])})},r(),c=c.map(function(){return this.end=t(this.el[0]),this.diff=a(this.start,this.end),this}),s.attr("class",o),c=c.map(function(){var t=this,a=e.Deferred(),n=e.extend({},u,{queue:!1,complete:function(){a.resolve(t)}});return this.el.animate(this.diff,n),a.promise()}),e.when.apply(e,c.get()).done(function(){r(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),u.complete.call(s[0])})})},e.fn.extend({addClass:function(t){return function(a,n,i,r){return n?e.effects.animateClass.call(this,{add:a},n,i,r):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(a,n,i,r){return arguments.length>1?e.effects.animateClass.call(this,{remove:a},n,i,r):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(a,n,i,r,s){return"boolean"==typeof n||void 0===n?i?e.effects.animateClass.call(this,n?{add:a}:{remove:a},i,r,s):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:a},n,i,r)}}(e.fn.toggleClass),switchClass:function(t,a,n,i,r){return e.effects.animateClass.call(this,{add:a,remove:t},n,i,r)}})}(),function(){function t(t,a,n,i){return e.isPlainObject(t)&&(a=t,t=t.effect),t={effect:t},null==a&&(a={}),e.isFunction(a)&&(i=a,n=null,a={}),("number"==typeof a||e.fx.speeds[a])&&(i=n,n=a,a={}),e.isFunction(n)&&(i=n,n=null),a&&e.extend(t,a),n=n||a.duration,t.duration=e.fx.off?0:"number"==typeof n?n:n in e.fx.speeds?e.fx.speeds[n]:e.fx.speeds._default,t.complete=i||a.complete,t}function a(t){return!t||"number"==typeof t||e.fx.speeds[t]?!0:"string"!=typeof t||e.effects.effect[t]?e.isFunction(t)?!0:"object"==typeof t&&!t.effect:!0}e.extend(e.effects,{version:"1.11.4",save:function(e,t){for(var a=0;t.length>a;a++)null!==t[a]&&e.data(d+t[a],e[0].style[t[a]])},restore:function(e,t){var a,n;for(n=0;t.length>n;n++)null!==t[n]&&(a=e.data(d+t[n]),void 0===a&&(a=""),e.css(t[n],a))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var a,n;switch(e[0]){case"top":a=0;break;case"middle":a=.5;break;case"bottom":a=1;break;default:a=e[0]/t.height}switch(e[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=e[1]/t.width}return{x:n,y:a}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var a={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},n=e("

").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),i={width:t.width(),height:t.height()},r=document.activeElement;try{r.id}catch(s){r=document.body}return t.wrap(n),(t[0]===r||e.contains(t[0],r))&&e(r).focus(),n=t.parent(),"static"===t.css("position")?(n.css({position:"relative"}),t.css({position:"relative"})):(e.extend(a,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,n){a[n]=t.css(n),isNaN(parseInt(a[n],10))&&(a[n]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(i),n.css(a).show()},removeWrapper:function(t){var a=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===a||e.contains(t[0],a))&&e(a).focus()),t},setTransition:function(t,a,n,i){return i=i||{},e.each(a,function(e,a){var r=t.cssUnit(a);r[0]>0&&(i[a]=r[0]*n+r[1])}),i}}),e.fn.extend({effect:function(){function a(t){function a(){e.isFunction(r)&&r.call(i[0]),e.isFunction(t)&&t()}var i=e(this),r=n.complete,o=n.mode;(i.is(":hidden")?"hide"===o:"show"===o)?(i[o](),a()):s.call(i[0],n,a)}var n=t.apply(this,arguments),i=n.mode,r=n.queue,s=e.effects.effect[n.effect];return e.fx.off||!s?i?this[i](n.duration,n.complete):this.each(function(){n.complete&&n.complete.call(this)}):r===!1?this.each(a):this.queue(r||"fx",a)},show:function(e){return function(n){if(a(n))return e.apply(this,arguments);var i=t.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(e.fn.show),hide:function(e){return function(n){if(a(n))return e.apply(this,arguments);var i=t.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(e.fn.hide),toggle:function(e){return function(n){if(a(n)||"boolean"==typeof n)return e.apply(this,arguments);var i=t.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(e.fn.toggle),cssUnit:function(t){var a=this.css(t),n=[];return e.each(["em","px","%","pt"],function(e,t){a.indexOf(t)>0&&(n=[parseFloat(a),t])}),n}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,a){t[a]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,a=4;((t=Math.pow(2,--a))-1)/11>e;);return 1/Math.pow(4,3-a)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,a){e.easing["easeIn"+t]=a,e.easing["easeOut"+t]=function(e){return 1-a(1-e)},e.easing["easeInOut"+t]=function(e){return.5>e?a(2*e)/2:1-a(-2*e+2)/2}})}(),e.effects}),"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(e){return 10>e?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var a,n,i,r,s,o=gap,u=t[e];switch(u&&"object"==typeof u&&"function"==typeof u.toJSON&&(u=u.toJSON(e)),"function"==typeof rep&&(u=rep.call(t,e,u)),typeof u){case"string":return quote(u);case"number":return isFinite(u)?String(u):"null";case"boolean":case"null":return String(u);case"object":if(!u)return"null";if(gap+=indent,s=[],"[object Array]"===Object.prototype.toString.apply(u)){for(r=u.length,a=0;r>a;a+=1)s[a]=str(a,u)||"null";return i=0===s.length?"[]":gap?"[\n"+gap+s.join(",\n"+gap)+"\n"+o+"]":"["+s.join(",")+"]",gap=o,i}if(rep&&"object"==typeof rep)for(r=rep.length,a=0;r>a;a+=1)"string"==typeof rep[a]&&(n=rep[a],i=str(n,u),i&&s.push(quote(n)+(gap?": ":":")+i));else for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(i=str(n,u),i&&s.push(quote(n)+(gap?": ":":")+i));return i=0===s.length?"{}":gap?"{\n"+gap+s.join(",\n"+gap)+"\n"+o+"}":"{"+s.join(",")+"}",gap=o,i}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(e){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(e,t,a){var n;if(gap="",indent="","number"==typeof a)for(n=0;a>n;n+=1)indent+=" ";else"string"==typeof a&&(indent=a);if(rep=t,!t||"function"==typeof t||"object"==typeof t&&"number"==typeof t.length)return str("",{"":e});throw new Error("JSON.stringify")}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(e,t){var a,n,i=e[t];if(i&&"object"==typeof i)for(a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n=walk(i,a),void 0!==n?i[a]=n:delete i[a]);return reviver.call(e,t,i)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),function(e,t){"use strict";var a=e.History=e.History||{},n=e.jQuery;if("undefined"!=typeof a.Adapter)throw new Error("History.js Adapter has already been loaded...");a.Adapter={bind:function(e,t,a){n(e).bind(t,a)},trigger:function(e,t,a){n(e).trigger(t,a)},extractEventData:function(e,a,n){var i=a&&a.originalEvent&&a.originalEvent[e]||n&&n[e]||t;return i},onDomLoad:function(e){n(e)}},"undefined"!=typeof a.init&&a.init()}(window),function(e,t){"use strict";var a=e.document,n=e.setTimeout||n,i=e.clearTimeout||i,r=e.setInterval||r,s=e.History=e.History||{};if("undefined"!=typeof s.initHtml4)throw new Error("History.js HTML4 Support has already been loaded...");s.initHtml4=function(){return"undefined"!=typeof s.initHtml4.initialized?!1:(s.initHtml4.initialized=!0,s.enabled=!0,s.savedHashes=[],s.isLastHash=function(e){var t,a=s.getHashByIndex();return t=e===a},s.isHashEqual=function(e,t){return e=encodeURIComponent(e).replace(/%25/g,"%"),t=encodeURIComponent(t).replace(/%25/g,"%"),e===t},s.saveHash=function(e){return s.isLastHash(e)?!1:(s.savedHashes.push(e),!0)},s.getHashByIndex=function(e){var t=null;return t="undefined"==typeof e?s.savedHashes[s.savedHashes.length-1]:0>e?s.savedHashes[s.savedHashes.length+e]:s.savedHashes[e]},s.discardedHashes={},s.discardedStates={},s.discardState=function(e,t,a){var n,i=s.getHashByState(e);return n={discardedState:e,backState:a,forwardState:t},s.discardedStates[i]=n,!0},s.discardHash=function(e,t,a){var n={discardedHash:e,backState:a,forwardState:t};return s.discardedHashes[e]=n,!0},s.discardedState=function(e){var t,a=s.getHashByState(e);return t=s.discardedStates[a]||!1},s.discardedHash=function(e){var t=s.discardedHashes[e]||!1;return t},s.recycleState=function(e){var t=s.getHashByState(e);return s.discardedState(e)&&delete s.discardedStates[t],!0},s.emulated.hashChange&&(s.hashChangeInit=function(){s.checkerFunction=null;var t,n,i,o,u="",c=Boolean(s.getHash());return s.isInternetExplorer()?(t="historyjs-iframe",n=a.createElement("iframe"),n.setAttribute("id",t),n.setAttribute("src","#"),n.style.display="none",a.body.appendChild(n),n.contentWindow.document.open(),n.contentWindow.document.close(),i="",o=!1,s.checkerFunction=function(){if(o)return!1;o=!0;var t=s.getHash(),a=s.getHash(n.contentWindow.document);return t!==u?(u=t,a!==t&&(i=a=t,n.contentWindow.document.open(),n.contentWindow.document.close(),n.contentWindow.document.location.hash=s.escapeHash(t)),s.Adapter.trigger(e,"hashchange")):a!==i&&(i=a,c&&""===a?s.back():s.setHash(a,!1)),o=!1,!0}):s.checkerFunction=function(){var t=s.getHash()||"";return t!==u&&(u=t,s.Adapter.trigger(e,"hashchange")),!0},s.intervalList.push(r(s.checkerFunction,s.options.hashChangeInterval)),!0},s.Adapter.onDomLoad(s.hashChangeInit)),s.emulated.pushState&&(s.onHashChange=function(t){var a,n=t&&t.newURL||s.getLocationHref(),i=s.getHashByUrl(n),r=null,o=null;return s.isLastHash(i)?(s.busy(!1),!1):(s.doubleCheckComplete(),s.saveHash(i),i&&s.isTraditionalAnchor(i)?(s.Adapter.trigger(e,"anchorchange"),s.busy(!1),!1):(r=s.extractState(s.getFullUrl(i||s.getLocationHref()),!0),s.isLastSavedState(r)?(s.busy(!1),!1):(o=s.getHashByState(r),a=s.discardedState(r),a?(s.getHashByIndex(-2)===s.getHashByState(a.forwardState)?s.back(!1):s.forward(!1),!1):(s.pushState(r.data,r.title,encodeURI(r.url),!1),!0))))},s.Adapter.bind(e,"hashchange",s.onHashChange),s.pushState=function(t,a,n,i){if(n=encodeURI(n).replace(/%25/g,"%"),s.getHashByUrl(n))throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).");if(i!==!1&&s.busy())return s.pushQueue({scope:s,callback:s.pushState,args:arguments,queue:i}),!1;s.busy(!0);var r=s.createStateObject(t,a,n),o=s.getHashByState(r),u=s.getState(!1),c=s.getHashByState(u),l=s.getHash(),d=s.expectedStateId==r.id;return s.storeState(r),s.expectedStateId=r.id,s.recycleState(r),s.setTitle(r),o===c?(s.busy(!1),!1):(s.saveState(r),d||s.Adapter.trigger(e,"statechange"),!s.isHashEqual(o,l)&&!s.isHashEqual(o,s.getShortUrl(s.getLocationHref()))&&s.setHash(o,!1),s.busy(!1),!0)},s.replaceState=function(t,a,n,i){if(n=encodeURI(n).replace(/%25/g,"%"),s.getHashByUrl(n))throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).");if(i!==!1&&s.busy())return s.pushQueue({scope:s,callback:s.replaceState,args:arguments,queue:i}),!1;s.busy(!0);var r=s.createStateObject(t,a,n),o=s.getHashByState(r),u=s.getState(!1),c=s.getHashByState(u),l=s.getStateByIndex(-2);return s.discardState(u,r,l),o===c?(s.storeState(r),s.expectedStateId=r.id,s.recycleState(r),s.setTitle(r),s.saveState(r),s.Adapter.trigger(e,"statechange"),s.busy(!1)):s.pushState(r.data,r.title,r.url,!1),!0}),s.emulated.pushState&&s.getHash()&&!s.emulated.hashChange&&s.Adapter.onDomLoad(function(){s.Adapter.trigger(e,"hashchange")}),void 0)},"undefined"!=typeof s.init&&s.init()}(window),function(e,t){"use strict";var a=e.console||t,n=e.document,i=e.navigator,r=!1,s=e.setTimeout,o=e.clearTimeout,u=e.setInterval,c=e.clearInterval,l=e.JSON,d=e.alert,h=e.History=e.History||{},p=e.history;try{r=e.sessionStorage,r.setItem("TEST","1"),r.removeItem("TEST")}catch(f){r=!1}if(l.stringify=l.stringify||l.encode,l.parse=l.parse||l.decode,"undefined"!=typeof h.init)throw new Error("History.js Core has already been loaded...");h.init=function(e){return"undefined"==typeof h.Adapter?!1:("undefined"!=typeof h.initCore&&h.initCore(),"undefined"!=typeof h.initHtml4&&h.initHtml4(),!0)},h.initCore=function(f){if("undefined"!=typeof h.initCore.initialized)return!1;if(h.initCore.initialized=!0,h.options=h.options||{},h.options.hashChangeInterval=h.options.hashChangeInterval||100,h.options.safariPollInterval=h.options.safariPollInterval||500,h.options.doubleCheckInterval=h.options.doubleCheckInterval||500,h.options.disableSuid=h.options.disableSuid||!1,h.options.storeInterval=h.options.storeInterval||1e3,h.options.busyDelay=h.options.busyDelay||250,h.options.debug=h.options.debug||!1,h.options.initialTitle=h.options.initialTitle||n.title,h.options.html4Mode=h.options.html4Mode||!1,h.options.delayInit=h.options.delayInit||!1,h.intervalList=[],h.clearAllIntervals=function(){var e,t=h.intervalList;if("undefined"!=typeof t&&null!==t){for(e=0;et;++t){if(s=arguments[t],"object"==typeof s&&"undefined"!=typeof l)try{s=l.stringify(s)}catch(c){}e+="\n"+s+"\n"}return u?(u.value+=e+"\n-----\n",u.scrollTop=u.scrollHeight-u.clientHeight):o||d(e),!0},h.getInternetExplorerMajorVersion=function(){var e=h.getInternetExplorerMajorVersion.cached="undefined"!=typeof h.getInternetExplorerMajorVersion.cached?h.getInternetExplorerMajorVersion.cached:function(){for(var e=3,t=n.createElement("div"),a=t.getElementsByTagName("i");(t.innerHTML="")&&a[0];);return e>4?e:!1}();return e},h.isInternetExplorer=function(){var e=h.isInternetExplorer.cached="undefined"!=typeof h.isInternetExplorer.cached?h.isInternetExplorer.cached:Boolean(h.getInternetExplorerMajorVersion());return e},h.options.html4Mode?h.emulated={pushState:!0,hashChange:!0}:h.emulated={pushState:!Boolean(e.history&&e.history.pushState&&e.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(i.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(i.userAgent)),hashChange:Boolean(!("onhashchange"in e||"onhashchange"in n)||h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8)},h.enabled=!h.emulated.pushState,h.bugs={setHash:Boolean(!h.emulated.pushState&&"Apple Computer, Inc."===i.vendor&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),safariPoll:Boolean(!h.emulated.pushState&&"Apple Computer, Inc."===i.vendor&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),ieDoubleCheck:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<7)},h.isEmptyObject=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},h.cloneObject=function(e){var t,a;return e?(t=l.stringify(e),a=l.parse(t)):a={},a},h.getRootUrl=function(){var e=n.location.protocol+"//"+(n.location.hostname||n.location.host);return n.location.port&&(e+=":"+n.location.port),e+="/"},h.getBaseHref=function(){var e=n.getElementsByTagName("base"),t=null,a="";return 1===e.length&&(t=e[0],a=t.href.replace(/[^\/]+$/,"")),a=a.replace(/\/+$/,""),a&&(a+="/"),a},h.getBaseUrl=function(){var e=h.getBaseHref()||h.getBasePageUrl()||h.getRootUrl();return e},h.getPageUrl=function(){var e,t=h.getState(!1,!1),a=(t||{}).url||h.getLocationHref();return e=a.replace(/\/+$/,"").replace(/[^\/]+$/,function(e,t,a){return/\./.test(e)?e:e+"/"})},h.getBasePageUrl=function(){var e=h.getLocationHref().replace(/[#\?].*/,"").replace(/[^\/]+$/,function(e,t,a){return/[^\/]$/.test(e)?"":e}).replace(/\/+$/,"")+"/";return e},h.getFullUrl=function(e,t){var a=e,n=e.substring(0,1);return t="undefined"==typeof t?!0:t,/[a-z]+\:\/\//.test(e)||(a="/"===n?h.getRootUrl()+e.replace(/^\/+/,""):"#"===n?h.getPageUrl().replace(/#.*/,"")+e:"?"===n?h.getPageUrl().replace(/[\?#].*/,"")+e:t?h.getBaseUrl()+e.replace(/^(\.\/)+/,""):h.getBasePageUrl()+e.replace(/^(\.\/)+/,"")),a.replace(/\#$/,"")},h.getShortUrl=function(e){var t=e,a=h.getBaseUrl(),n=h.getRootUrl();return h.emulated.pushState&&(t=t.replace(a,"")),t=t.replace(n,"/"),h.isTraditionalAnchor(t)&&(t="./"+t),t=t.replace(/^(\.\/)+/g,"./").replace(/\#$/,"")},h.getLocationHref=function(e){return e=e||n,e.URL===e.location.href?e.location.href:e.location.href===decodeURIComponent(e.URL)?e.URL:e.location.hash&&decodeURIComponent(e.location.href.replace(/^[^#]+/,""))===e.location.hash?e.location.href:-1==e.URL.indexOf("#")&&-1!=e.location.href.indexOf("#")?e.location.href:e.URL||e.location.href},h.store={},h.idToState=h.idToState||{},h.stateToId=h.stateToId||{},h.urlToId=h.urlToId||{},h.storedStates=h.storedStates||[],h.savedStates=h.savedStates||[],h.normalizeStore=function(){h.store.idToState=h.store.idToState||{},h.store.urlToId=h.store.urlToId||{},h.store.stateToId=h.store.stateToId||{}},h.getState=function(e,t){"undefined"==typeof e&&(e=!0),"undefined"==typeof t&&(t=!0);var a=h.getLastSavedState();return!a&&t&&(a=h.createStateObject()),e&&(a=h.cloneObject(a),a.url=a.cleanUrl||a.url),a},h.getIdByState=function(e){var t,a=h.extractId(e.url);if(!a)if(t=h.getStateString(e),"undefined"!=typeof h.stateToId[t])a=h.stateToId[t];else if("undefined"!=typeof h.store.stateToId[t])a=h.store.stateToId[t];else{for(;a=(new Date).getTime()+String(Math.random()).replace(/\D/g,""),"undefined"!=typeof h.idToState[a]||"undefined"!=typeof h.store.idToState[a];);h.stateToId[t]=a,h.idToState[a]=e}return a},h.normalizeState=function(e){var t,a;return e&&"object"==typeof e||(e={}),"undefined"!=typeof e.normalized?e:(e.data&&"object"==typeof e.data||(e.data={}),t={},t.normalized=!0,t.title=e.title||"",t.url=h.getFullUrl(e.url?e.url:h.getLocationHref()),t.hash=h.getShortUrl(t.url),t.data=h.cloneObject(e.data),t.id=h.getIdByState(t),t.cleanUrl=t.url.replace(/\??\&_suid.*/,""),t.url=t.cleanUrl,a=!h.isEmptyObject(t.data),(t.title||a)&&h.options.disableSuid!==!0&&(t.hash=h.getShortUrl(t.url).replace(/\??\&_suid.*/,""),/\?/.test(t.hash)||(t.hash+="?"),t.hash+="&_suid="+t.id),t.hashedUrl=h.getFullUrl(t.hash),(h.emulated.pushState||h.bugs.safariPoll)&&h.hasUrlDuplicate(t)&&(t.url=t.hashedUrl),t)},h.createStateObject=function(e,t,a){var n={data:e,title:t,url:a};return n=h.normalizeState(n)},h.getStateById=function(e){e=String(e);var a=h.idToState[e]||h.store.idToState[e]||t;return a},h.getStateString=function(e){var t,a,n;return t=h.normalizeState(e),a={data:t.data,title:e.title,url:e.url},n=l.stringify(a)},h.getStateId=function(e){var t,a;return t=h.normalizeState(e),a=t.id},h.getHashByState=function(e){var t,a;return t=h.normalizeState(e),a=t.hash},h.extractId=function(e){var t,a,n,i;return i=-1!=e.indexOf("#")?e.split("#")[0]:e,a=/(.*)\&_suid=([0-9]+)$/.exec(i),n=a?a[1]||e:e,t=a?String(a[2]||""):"",t||!1},h.isTraditionalAnchor=function(e){var t=!/[\/\?\.]/.test(e);return t},h.extractState=function(e,t){var a,n,i=null;return t=t||!1,a=h.extractId(e),a&&(i=h.getStateById(a)),i||(n=h.getFullUrl(e),a=h.getIdByUrl(n)||!1,a&&(i=h.getStateById(a)),!i&&t&&!h.isTraditionalAnchor(e)&&(i=h.createStateObject(null,null,n))),i},h.getIdByUrl=function(e){var a=h.urlToId[e]||h.store.urlToId[e]||t;return a},h.getLastSavedState=function(){return h.savedStates[h.savedStates.length-1]||t},h.getLastStoredState=function(){return h.storedStates[h.storedStates.length-1]||t},h.hasUrlDuplicate=function(e){var t,a=!1;return t=h.extractState(e.url),a=t&&t.id!==e.id},h.storeState=function(e){return h.urlToId[e.url]=e.id,h.storedStates.push(h.cloneObject(e)),e},h.isLastSavedState=function(e){var t,a,n,i=!1;return h.savedStates.length&&(t=e.id,a=h.getLastSavedState(),n=a.id,i=t===n),i},h.saveState=function(e){return h.isLastSavedState(e)?!1:(h.savedStates.push(h.cloneObject(e)),!0)},h.getStateByIndex=function(e){var t=null;return t="undefined"==typeof e?h.savedStates[h.savedStates.length-1]:0>e?h.savedStates[h.savedStates.length+e]:h.savedStates[e]},h.getCurrentIndex=function(){var e=null;return e=h.savedStates.length<1?0:h.savedStates.length-1},h.getHash=function(e){var t,a=h.getLocationHref(e);return t=h.getHashByUrl(a)},h.unescapeHash=function(e){var t=h.normalizeHash(e);return t=decodeURIComponent(t)},h.normalizeHash=function(e){var t=e.replace(/[^#]*#/,"").replace(/#.*/,"");return t},h.setHash=function(e,t){var a,i;return t!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.setHash,args:arguments,queue:t}),!1):(h.busy(!0),a=h.extractState(e,!0),a&&!h.emulated.pushState?h.pushState(a.data,a.title,a.url,!1):h.getHash()!==e&&(h.bugs.setHash?(i=h.getPageUrl(),h.pushState(null,null,i+"#"+e,!1)):n.location.hash=e),h)},h.escapeHash=function(t){var a=h.normalizeHash(t);return a=e.encodeURIComponent(a),h.bugs.hashEscape||(a=a.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),a},h.getHashByUrl=function(e){var t=String(e).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return t=h.unescapeHash(t)},h.setTitle=function(e){var t,a=e.title;a||(t=h.getStateByIndex(0),t&&t.url===e.url&&(a=t.title||h.options.initialTitle));try{n.getElementsByTagName("title")[0].innerHTML=a.replace("<","<").replace(">",">").replace(" & "," & ")}catch(i){}return n.title=a,h},h.queues=[],h.busy=function(e){if("undefined"!=typeof e?h.busy.flag=e:"undefined"==typeof h.busy.flag&&(h.busy.flag=!1),!h.busy.flag){o(h.busy.timeout);var t=function(){var e,a,n;if(!h.busy.flag)for(e=h.queues.length-1;e>=0;--e)a=h.queues[e],0!==a.length&&(n=a.shift(),h.fireQueueItem(n),h.busy.timeout=s(t,h.options.busyDelay))};h.busy.timeout=s(t,h.options.busyDelay)}return h.busy.flag},h.busy.flag=!1,h.fireQueueItem=function(e){return e.callback.apply(e.scope||h,e.args||[])},h.pushQueue=function(e){return h.queues[e.queue||0]=h.queues[e.queue||0]||[],h.queues[e.queue||0].push(e),h},h.queue=function(e,t){return"function"==typeof e&&(e={ callback:e}),"undefined"!=typeof t&&(e.queue=t),h.busy()?h.pushQueue(e):h.fireQueueItem(e),h},h.clearQueue=function(){return h.busy.flag=!1,h.queues=[],h},h.stateChanged=!1,h.doubleChecker=!1,h.doubleCheckComplete=function(){return h.stateChanged=!0,h.doubleCheckClear(),h},h.doubleCheckClear=function(){return h.doubleChecker&&(o(h.doubleChecker),h.doubleChecker=!1),h},h.doubleCheck=function(e){return h.stateChanged=!1,h.doubleCheckClear(),h.bugs.ieDoubleCheck&&(h.doubleChecker=s(function(){return h.doubleCheckClear(),h.stateChanged||e(),!0},h.options.doubleCheckInterval)),h},h.safariStatePoll=function(){var t,a=h.extractState(h.getLocationHref());return h.isLastSavedState(a)?void 0:(t=a,t||(t=h.createStateObject()),h.Adapter.trigger(e,"popstate"),h)},h.back=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.back,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.back(!1)}),p.go(-1),!0)},h.forward=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.forward,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.forward(!1)}),p.go(1),!0)},h.go=function(e,t){var a;if(e>0)for(a=1;e>=a;++a)h.forward(t);else{if(!(0>e))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(a=-1;a>=e;--a)h.back(t)}return h},h.emulated.pushState){var g=function(){};h.pushState=h.pushState||g,h.replaceState=h.replaceState||g}else h.onPopState=function(t,a){var n,i,r=!1,s=!1;return h.doubleCheckComplete(),n=h.getHash(),n?(i=h.extractState(n||h.getLocationHref(),!0),i?h.replaceState(i.data,i.title,i.url,!1):(h.Adapter.trigger(e,"anchorchange"),h.busy(!1)),h.expectedStateId=!1,!1):(r=h.Adapter.extractEventData("state",t,a)||!1,s=r?h.getStateById(r):h.expectedStateId?h.getStateById(h.expectedStateId):h.extractState(h.getLocationHref()),s||(s=h.createStateObject(null,null,h.getLocationHref())),h.expectedStateId=!1,h.isLastSavedState(s)?(h.busy(!1),!1):(h.storeState(s),h.saveState(s),h.setTitle(s),h.Adapter.trigger(e,"statechange"),h.busy(!1),!0))},h.Adapter.bind(e,"popstate",h.onPopState),h.pushState=function(t,a,n,i){if(h.getHashByUrl(n)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.pushState,args:arguments,queue:i}),!1;h.busy(!0);var r=h.createStateObject(t,a,n);return h.isLastSavedState(r)?h.busy(!1):(h.storeState(r),h.expectedStateId=r.id,p.pushState(r.id,r.title,r.url),h.Adapter.trigger(e,"popstate")),!0},h.replaceState=function(t,a,n,i){if(h.getHashByUrl(n)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.replaceState,args:arguments,queue:i}),!1;h.busy(!0);var r=h.createStateObject(t,a,n);return h.isLastSavedState(r)?h.busy(!1):(h.storeState(r),h.expectedStateId=r.id,p.replaceState(r.id,r.title,r.url),h.Adapter.trigger(e,"popstate")),!0};if(r){try{h.store=l.parse(r.getItem("History.store"))||{}}catch(v){h.store={}}h.normalizeStore()}else h.store={},h.normalizeStore();h.Adapter.bind(e,"unload",h.clearAllIntervals),h.saveState(h.storeState(h.extractState(h.getLocationHref(),!0))),r&&(h.onUnload=function(){var e,t,a;try{e=l.parse(r.getItem("History.store"))||{}}catch(n){e={}}e.idToState=e.idToState||{},e.urlToId=e.urlToId||{},e.stateToId=e.stateToId||{};for(t in h.idToState)h.idToState.hasOwnProperty(t)&&(e.idToState[t]=h.idToState[t]);for(t in h.urlToId)h.urlToId.hasOwnProperty(t)&&(e.urlToId[t]=h.urlToId[t]);for(t in h.stateToId)h.stateToId.hasOwnProperty(t)&&(e.stateToId[t]=h.stateToId[t]);h.store=e,h.normalizeStore(),a=l.stringify(e);try{r.setItem("History.store",a)}catch(i){if(i.code!==DOMException.QUOTA_EXCEEDED_ERR)throw i;r.length&&(r.removeItem("History.store"),r.setItem("History.store",a))}},h.intervalList.push(u(h.onUnload,h.options.storeInterval)),h.Adapter.bind(e,"beforeunload",h.onUnload),h.Adapter.bind(e,"unload",h.onUnload)),h.emulated.pushState||(h.bugs.safariPoll&&h.intervalList.push(u(h.safariStatePoll,h.options.safariPollInterval)),"Apple Computer, Inc."!==i.vendor&&"Mozilla"!==(i.appCodeName||"")||(h.Adapter.bind(e,"hashchange",function(){h.Adapter.trigger(e,"popstate")}),h.getHash()&&h.Adapter.onDomLoad(function(){h.Adapter.trigger(e,"hashchange")})))},(!h.options||!h.options.delayInit)&&h.init()}(window);