-
-
-
+
+
Get Started
+
If you are ready to build your Internet of Things, <%= link_to t(:signup), new_user_registration_path, :class => 'btn btn-primary btn-sm' %> for a free developer account.
+
+ Learn More
+ <%= t(:contact_us) %>
+
+
+ <%= render :partial => 'pages/contact_form' %>
+
+
+
+
+
+
+
<% cache("blog-posts-on-homepage", :expires_in => 10.minutes) do %>
<%= raw blog_entries %>
<% end %>
-
+
+
+
diff --git a/config/locales/en.yml b/config/locales/en.yml
index d337ec3..f90ac2f 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -111,6 +111,10 @@ en:
confirm_thinghttp_delete: "Are you sure you want to delete this ThingHTTP?"
confirm_tweetcontrol_delete: "Are you sure you want to delete this TweetControl?"
confirm_twitter_delete: "Are you sure you want to unlink this Twitter account?"
+ contact_us: "Contact Us"
+ contact_us_no_email: "You must provide a valid email address."
+ contact_us_no_message: "Please add a message to the Contact Us form."
+ contact_us_success: "Your message has been sent successfully."
create_account: "Create Account"
created: "Created"
data: "Data"
@@ -147,6 +151,7 @@ en:
elevation: "Elevation"
entries: "Entries"
email: "Email"
+ email_address: 'email address'
email_form_add: "Add Email"
export: "Export"
featured_channels: "Featured Channels"
@@ -158,16 +163,20 @@ en:
forum: "Forum"
for_more_information: "More Information"
generate_thingtweet_arduino_code: "Generate ThingTweet Arduino Code"
+ get_started: "Get Started Now"
height: "Height"
home: "Home"
homepage: "ThingSpeak is an Open Internet of Things project by ioBridge."
homepage_logged_in: "Homepage for logged in user!"
+ home_motto: "Billions and Billions."
+ home_tagline: "The open data platform for the Internet of Things."
import: "Import"
import_data: "Import Data"
latitude: "Latitude"
longitude: "Longitude"
median: "Median"
member_since: "Member since"
+ message: 'message'
message_field: "Message Field"
myaccount: "My Account"
mychannels: "My Channels"
diff --git a/config/routes.rb b/config/routes.rb
index b9d56b0..d42872c 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -28,6 +28,7 @@ Thingspeak::Application.routes.draw do
get :about
get :headers
get :social_home
+ post :contact_us
end
end
diff --git a/public/assets/GitHub_ThingSpeak_API-a41e9e99ff1a6214dc391017c1b331a9.jpg b/public/assets/GitHub_ThingSpeak_API-a41e9e99ff1a6214dc391017c1b331a9.jpg
new file mode 100644
index 0000000..5d77b0a
Binary files /dev/null and b/public/assets/GitHub_ThingSpeak_API-a41e9e99ff1a6214dc391017c1b331a9.jpg differ
diff --git a/public/assets/active_admin-daf1d88b3b2d591e19aa91972d495192.js b/public/assets/active_admin-daf1d88b3b2d591e19aa91972d495192.js
new file mode 100644
index 0000000..7444511
--- /dev/null
+++ b/public/assets/active_admin-daf1d88b3b2d591e19aa91972d495192.js
@@ -0,0 +1,8 @@
+!function(t,e){function i(t){var e=t.length,i=ce.type(t);return ce.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===i||"function"!==i&&(0===e||"number"==typeof e&&e>0&&e-1 in t)}function n(t){var e=Ce[t]={};return ce.each(t.match(pe)||[],function(t,i){e[i]=!0}),e}function s(t,i,n,s){if(ce.acceptData(t)){var o,r,a=ce.expando,l=t.nodeType,h=l?ce.cache:t,c=l?t[a]:t[a]&&a;if(c&&h[c]&&(s||h[c].data)||n!==e||"string"!=typeof i)return c||(c=l?t[a]=ee.pop()||ce.guid++:a),h[c]||(h[c]=l?{}:{toJSON:ce.noop}),("object"==typeof i||"function"==typeof i)&&(s?h[c]=ce.extend(h[c],i):h[c].data=ce.extend(h[c].data,i)),r=h[c],s||(r.data||(r.data={}),r=r.data),n!==e&&(r[ce.camelCase(i)]=n),"string"==typeof i?(o=r[i],null==o&&(o=r[ce.camelCase(i)])):o=r,o}}function o(t,e,i){if(ce.acceptData(t)){var n,s,o=t.nodeType,r=o?ce.cache:t,l=o?t[ce.expando]:ce.expando;if(r[l]){if(e&&(n=i?r[l]:r[l].data)){ce.isArray(e)?e=e.concat(ce.map(e,ce.camelCase)):e in n?e=[e]:(e=ce.camelCase(e),e=e in n?[e]:e.split(" ")),s=e.length;for(;s--;)delete n[e[s]];if(i?!a(n):!ce.isEmptyObject(n))return}(i||(delete r[l].data,a(r[l])))&&(o?ce.cleanData([t],!0):ce.support.deleteExpando||r!=r.window?delete r[l]:r[l]=null)}}}function r(t,i,n){if(n===e&&1===t.nodeType){var s="data-"+i.replace(Se,"-$1").toLowerCase();if(n=t.getAttribute(s),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Te.test(n)?ce.parseJSON(n):n}catch(o){}ce.data(t,i,n)}else n=e}return n}function a(t){var e;for(e in t)if(("data"!==e||!ce.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function l(){return!0}function h(){return!1}function c(){try{return Q.activeElement}catch(t){}}function u(t,e){do t=t[e];while(t&&1!==t.nodeType);return t}function p(t,e,i){if(ce.isFunction(e))return ce.grep(t,function(t,n){return!!e.call(t,n,t)!==i});if(e.nodeType)return ce.grep(t,function(t){return t===e!==i});if("string"==typeof e){if(Re.test(e))return ce.filter(e,t,i);e=ce.filter(e,t)}return ce.grep(t,function(t){return ce.inArray(t,e)>=0!==i})}function d(t){var e=Xe.split("|"),i=t.createDocumentFragment();if(i.createElement)for(;e.length;)i.createElement(e.pop());return i}function f(t,e){return ce.nodeName(t,"table")&&ce.nodeName(1===e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function g(t){return t.type=(null!==ce.find.attr(t,"type"))+"/"+t.type,t}function m(t){var e=si.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function v(t,e){for(var i,n=0;null!=(i=t[n]);n++)ce._data(i,"globalEval",!e||ce._data(e[n],"globalEval"))}function y(t,e){if(1===e.nodeType&&ce.hasData(t)){var i,n,s,o=ce._data(t),r=ce._data(e,o),a=o.events;if(a){delete r.handle,r.events={};for(i in a)for(n=0,s=a[i].length;s>n;n++)ce.event.add(e,i,a[i][n])}r.data&&(r.data=ce.extend({},r.data))}}function b(t,e){var i,n,s;if(1===e.nodeType){if(i=e.nodeName.toLowerCase(),!ce.support.noCloneEvent&&e[ce.expando]){s=ce._data(e);for(n in s.events)ce.removeEvent(e,n,s.handle);e.removeAttribute(ce.expando)}"script"===i&&e.text!==t.text?(g(e).text=t.text,m(e)):"object"===i?(e.parentNode&&(e.outerHTML=t.outerHTML),ce.support.html5Clone&&t.innerHTML&&!ce.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===i&&ei.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===i?e.defaultSelected=e.selected=t.defaultSelected:("input"===i||"textarea"===i)&&(e.defaultValue=t.defaultValue)}}function _(t,i){var n,s,o=0,r=typeof t.getElementsByTagName!==U?t.getElementsByTagName(i||"*"):typeof t.querySelectorAll!==U?t.querySelectorAll(i||"*"):e;if(!r)for(r=[],n=t.childNodes||t;null!=(s=n[o]);o++)!i||ce.nodeName(s,i)?r.push(s):ce.merge(r,_(s,i));return i===e||i&&ce.nodeName(t,i)?ce.merge([t],r):r}function w(t){ei.test(t.type)&&(t.defaultChecked=t.checked)}function x(t,e){if(e in t)return e;for(var i=e.charAt(0).toUpperCase()+e.slice(1),n=e,s=Di.length;s--;)if(e=Di[s]+i,e in t)return e;return n}function k(t,e){return t=e||t,"none"===ce.css(t,"display")||!ce.contains(t.ownerDocument,t)}function D(t,e){for(var i,n,s,o=[],r=0,a=t.length;a>r;r++)n=t[r],n.style&&(o[r]=ce._data(n,"olddisplay"),i=n.style.display,e?(o[r]||"none"!==i||(n.style.display=""),""===n.style.display&&k(n)&&(o[r]=ce._data(n,"olddisplay",N(n.nodeName)))):o[r]||(s=k(n),(i&&"none"!==i||!s)&&ce._data(n,"olddisplay",s?i:ce.css(n,"display"))));for(r=0;a>r;r++)n=t[r],n.style&&(e&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=e?o[r]||"":"none"));return t}function C(t,e,i){var n=vi.exec(e);return n?Math.max(0,n[1]-(i||0))+(n[2]||"px"):e}function T(t,e,i,n,s){for(var o=i===(n?"border":"content")?4:"width"===e?1:0,r=0;4>o;o+=2)"margin"===i&&(r+=ce.css(t,i+ki[o],!0,s)),n?("content"===i&&(r-=ce.css(t,"padding"+ki[o],!0,s)),"margin"!==i&&(r-=ce.css(t,"border"+ki[o]+"Width",!0,s))):(r+=ce.css(t,"padding"+ki[o],!0,s),"padding"!==i&&(r+=ce.css(t,"border"+ki[o]+"Width",!0,s)));return r}function S(t,e,i){var n=!0,s="width"===e?t.offsetWidth:t.offsetHeight,o=ci(t),r=ce.support.boxSizing&&"border-box"===ce.css(t,"boxSizing",!1,o);if(0>=s||null==s){if(s=ui(t,e,o),(0>s||null==s)&&(s=t.style[e]),yi.test(s))return s;n=r&&(ce.support.boxSizingReliable||s===t.style[e]),s=parseFloat(s)||0}return s+T(t,e,i||(r?"border":"content"),n,o)+"px"}function N(t){var e=Q,i=_i[t];return i||(i=P(t,e),"none"!==i&&i||(hi=(hi||ce("
").css("cssText","display:block !important")).appendTo(e.documentElement),e=(hi[0].contentWindow||hi[0].contentDocument).document,e.write(""),e.close(),i=P(t,e),hi.detach()),_i[t]=i),i}function P(t,e){var i=ce(e.createElement(t)).appendTo(e.body),n=ce.css(i[0],"display");return i.remove(),n}function E(t,e,i,n){var s;if(ce.isArray(e))ce.each(e,function(e,s){i||Ti.test(t)?n(t,s):E(t+"["+("object"==typeof s?e:"")+"]",s,i,n)});else if(i||"object"!==ce.type(e))n(t,e);else for(s in e)E(t+"["+s+"]",e[s],i,n)}function I(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,s=0,o=e.toLowerCase().match(pe)||[];if(ce.isFunction(i))for(;n=o[s++];)"+"===n[0]?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function M(t,e,i,n){function s(a){var l;return o[a]=!0,ce.each(t[a]||[],function(t,a){var h=a(e,i,n);return"string"!=typeof h||r||o[h]?r?!(l=h):void 0:(e.dataTypes.unshift(h),s(h),!1)}),l}var o={},r=t===Bi;return s(e.dataTypes[0])||!o["*"]&&s("*")}function A(t,i){var n,s,o=ce.ajaxSettings.flatOptions||{};for(s in i)i[s]!==e&&((o[s]?t:n||(n={}))[s]=i[s]);return n&&ce.extend(!0,t,n),t}function z(t,i,n){for(var s,o,r,a,l=t.contents,h=t.dataTypes;"*"===h[0];)h.shift(),o===e&&(o=t.mimeType||i.getResponseHeader("Content-Type"));if(o)for(a in l)if(l[a]&&l[a].test(o)){h.unshift(a);break}if(h[0]in n)r=h[0];else{for(a in n){if(!h[0]||t.converters[a+" "+h[0]]){r=a;break}s||(s=a)}r=r||s}return r?(r!==h[0]&&h.unshift(r),n[r]):void 0}function H(t,e,i,n){var s,o,r,a,l,h={},c=t.dataTypes.slice();if(c[1])for(r in t.converters)h[r.toLowerCase()]=t.converters[r];for(o=c.shift();o;)if(t.responseFields[o]&&(i[t.responseFields[o]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(r=h[l+" "+o]||h["* "+o],!r)for(s in h)if(a=s.split(" "),a[1]===o&&(r=h[l+" "+a[0]]||h["* "+a[0]])){r===!0?r=h[s]:h[s]!==!0&&(o=a[0],c.unshift(a[1]));break}if(r!==!0)if(r&&t["throws"])e=r(e);else try{e=r(e)}catch(u){return{state:"parsererror",error:r?u:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}function j(){try{return new t.XMLHttpRequest}catch(e){}}function L(){try{return new t.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function W(){return setTimeout(function(){Gi=e}),Gi=ce.now()}function O(t,e,i){for(var n,s=(on[e]||[]).concat(on["*"]),o=0,r=s.length;r>o;o++)if(n=s[o].call(i,e,t))return n}function F(t,e,i){var n,s,o=0,r=sn.length,a=ce.Deferred().always(function(){delete l.elem}),l=function(){if(s)return!1;for(var e=Gi||W(),i=Math.max(0,h.startTime+h.duration-e),n=i/h.duration||0,o=1-n,r=0,l=h.tweens.length;l>r;r++)h.tweens[r].run(o);return a.notifyWith(t,[h,o,i]),1>o&&l?i:(a.resolveWith(t,[h]),!1)},h=a.promise({elem:t,props:ce.extend({},e),opts:ce.extend(!0,{specialEasing:{}},i),originalProperties:e,originalOptions:i,startTime:Gi||W(),duration:i.duration,tweens:[],createTween:function(e,i){var n=ce.Tween(t,h.opts,e,i,h.opts.specialEasing[e]||h.opts.easing);return h.tweens.push(n),n},stop:function(e){var i=0,n=e?h.tweens.length:0;if(s)return this;for(s=!0;n>i;i++)h.tweens[i].run(1);return e?a.resolveWith(t,[h,e]):a.rejectWith(t,[h,e]),this}}),c=h.props;for($(c,h.opts.specialEasing);r>o;o++)if(n=sn[o].call(h,t,c,h.opts))return n;return ce.map(c,O,h),ce.isFunction(h.opts.start)&&h.opts.start.call(t,h),ce.fx.timer(ce.extend(l,{elem:t,anim:h,queue:h.opts.queue})),h.progress(h.opts.progress).done(h.opts.done,h.opts.complete).fail(h.opts.fail).always(h.opts.always)}function $(t,e){var i,n,s,o,r;for(i in t)if(n=ce.camelCase(i),s=e[n],o=t[i],ce.isArray(o)&&(s=o[1],o=t[i]=o[0]),i!==n&&(t[n]=o,delete t[i]),r=ce.cssHooks[n],r&&"expand"in r){o=r.expand(o),delete t[n];for(i in o)i in t||(t[i]=o[i],e[i]=s)}else e[n]=s}function R(t,e,i){var n,s,o,r,a,l,h=this,c={},u=t.style,p=t.nodeType&&k(t),d=ce._data(t,"fxshow");i.queue||(a=ce._queueHooks(t,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,h.always(function(){h.always(function(){a.unqueued--,ce.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(i.overflow=[u.overflow,u.overflowX,u.overflowY],"inline"===ce.css(t,"display")&&"none"===ce.css(t,"float")&&(ce.support.inlineBlockNeedsLayout&&"inline"!==N(t.nodeName)?u.zoom=1:u.display="inline-block")),i.overflow&&(u.overflow="hidden",ce.support.shrinkWrapBlocks||h.always(function(){u.overflow=i.overflow[0],u.overflowX=i.overflow[1],u.overflowY=i.overflow[2]}));for(n in e)if(s=e[n],tn.exec(s)){if(delete e[n],o=o||"toggle"===s,s===(p?"hide":"show"))continue;c[n]=d&&d[n]||ce.style(t,n)}if(!ce.isEmptyObject(c)){d?"hidden"in d&&(p=d.hidden):d=ce._data(t,"fxshow",{}),o&&(d.hidden=!p),p?ce(t).show():h.done(function(){ce(t).hide()}),h.done(function(){var e;ce._removeData(t,"fxshow");for(e in c)ce.style(t,e,c[e])});for(n in c)r=O(p?d[n]:0,n,h),n in d||(d[n]=r.start,p&&(r.end=r.start,r.start="width"===n||"height"===n?1:0))}}function B(t,e,i,n,s){return new B.prototype.init(t,e,i,n,s)}function Y(t,e){var i,n={height:t},s=0;for(e=e?1:0;4>s;s+=2-e)i=ki[s],n["margin"+i]=n["padding"+i]=t;return e&&(n.opacity=n.width=t),n}function q(t){return ce.isWindow(t)?t:9===t.nodeType?t.defaultView||t.parentWindow:!1}var X,K,U=typeof e,V=t.location,Q=t.document,J=Q.documentElement,G=t.jQuery,Z=t.$,te={},ee=[],ie="1.10.2",ne=ee.concat,se=ee.push,oe=ee.slice,re=ee.indexOf,ae=te.toString,le=te.hasOwnProperty,he=ie.trim,ce=function(t,e){return new ce.fn.init(t,e,K)},ue=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,pe=/\S+/g,de=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,fe=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ge=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,me=/^[\],:{}\s]*$/,ve=/(?:^|:|,)(?:\s*\[)+/g,ye=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,be=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,_e=/^-ms-/,we=/-([\da-z])/gi,xe=function(t,e){return e.toUpperCase()},ke=function(t){(Q.addEventListener||"load"===t.type||"complete"===Q.readyState)&&(De(),ce.ready())},De=function(){Q.addEventListener?(Q.removeEventListener("DOMContentLoaded",ke,!1),t.removeEventListener("load",ke,!1)):(Q.detachEvent("onreadystatechange",ke),t.detachEvent("onload",ke))};ce.fn=ce.prototype={jquery:ie,constructor:ce,init:function(t,i,n){var s,o;if(!t)return this;if("string"==typeof t){if(s="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:fe.exec(t),!s||!s[1]&&i)return!i||i.jquery?(i||n).find(t):this.constructor(i).find(t);if(s[1]){if(i=i instanceof ce?i[0]:i,ce.merge(this,ce.parseHTML(s[1],i&&i.nodeType?i.ownerDocument||i:Q,!0)),ge.test(s[1])&&ce.isPlainObject(i))for(s in i)ce.isFunction(this[s])?this[s](i[s]):this.attr(s,i[s]);return this}if(o=Q.getElementById(s[2]),o&&o.parentNode){if(o.id!==s[2])return n.find(t);this.length=1,this[0]=o}return this.context=Q,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):ce.isFunction(t)?n.ready(t):(t.selector!==e&&(this.selector=t.selector,this.context=t.context),ce.makeArray(t,this))},selector:"",length:0,toArray:function(){return oe.call(this)},get:function(t){return null==t?this.toArray():0>t?this[this.length+t]:this[t]},pushStack:function(t){var e=ce.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return ce.each(this,t,e)},ready:function(t){return ce.ready.promise().done(t),this},slice:function(){return this.pushStack(oe.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(0>t?e:0);return this.pushStack(i>=0&&e>i?[this[i]]:[])},map:function(t){return this.pushStack(ce.map(this,function(e,i){return t.call(e,i,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:se,sort:[].sort,splice:[].splice},ce.fn.init.prototype=ce.fn,ce.extend=ce.fn.extend=function(){var t,i,n,s,o,r,a=arguments[0]||{},l=1,h=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[1]||{},l=2),"object"==typeof a||ce.isFunction(a)||(a={}),h===l&&(a=this,--l);h>l;l++)if(null!=(o=arguments[l]))for(s in o)t=a[s],n=o[s],a!==n&&(c&&n&&(ce.isPlainObject(n)||(i=ce.isArray(n)))?(i?(i=!1,r=t&&ce.isArray(t)?t:[]):r=t&&ce.isPlainObject(t)?t:{},a[s]=ce.extend(c,r,n)):n!==e&&(a[s]=n));return a},ce.extend({expando:"jQuery"+(ie+Math.random()).replace(/\D/g,""),noConflict:function(e){return t.$===ce&&(t.$=Z),e&&t.jQuery===ce&&(t.jQuery=G),ce},isReady:!1,readyWait:1,holdReady:function(t){t?ce.readyWait++:ce.ready(!0)},ready:function(t){if(t===!0?!--ce.readyWait:!ce.isReady){if(!Q.body)return setTimeout(ce.ready);ce.isReady=!0,t!==!0&&--ce.readyWait>0||(X.resolveWith(Q,[ce]),ce.fn.trigger&&ce(Q).trigger("ready").off("ready"))}},isFunction:function(t){return"function"===ce.type(t)},isArray:Array.isArray||function(t){return"array"===ce.type(t)},isWindow:function(t){return null!=t&&t==t.window},isNumeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},type:function(t){return null==t?String(t):"object"==typeof t||"function"==typeof t?te[ae.call(t)]||"object":typeof t},isPlainObject:function(t){var i;if(!t||"object"!==ce.type(t)||t.nodeType||ce.isWindow(t))return!1;try{if(t.constructor&&!le.call(t,"constructor")&&!le.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(ce.support.ownLast)for(i in t)return le.call(t,i);for(i in t);return i===e||le.call(t,i)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},error:function(t){throw new Error(t)},parseHTML:function(t,e,i){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(i=e,e=!1),e=e||Q;var n=ge.exec(t),s=!i&&[];return n?[e.createElement(n[1])]:(n=ce.buildFragment([t],e,s),s&&ce(s).remove(),ce.merge([],n.childNodes))},parseJSON:function(e){return t.JSON&&t.JSON.parse?t.JSON.parse(e):null===e?e:"string"==typeof e&&(e=ce.trim(e),e&&me.test(e.replace(ye,"@").replace(be,"]").replace(ve,"")))?new Function("return "+e)():(ce.error("Invalid JSON: "+e),void 0)},parseXML:function(i){var n,s;if(!i||"string"!=typeof i)return null;try{t.DOMParser?(s=new DOMParser,n=s.parseFromString(i,"text/xml")):(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(i))}catch(o){n=e}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||ce.error("Invalid XML: "+i),n},noop:function(){},globalEval:function(e){e&&ce.trim(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(t){return t.replace(_e,"ms-").replace(we,xe)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,n){var s,o=0,r=t.length,a=i(t);if(n){if(a)for(;r>o&&(s=e.apply(t[o],n),s!==!1);o++);else for(o in t)if(s=e.apply(t[o],n),s===!1)break}else if(a)for(;r>o&&(s=e.call(t[o],o,t[o]),s!==!1);o++);else for(o in t)if(s=e.call(t[o],o,t[o]),s===!1)break;return t},trim:he&&!he.call(" ")?function(t){return null==t?"":he.call(t)}:function(t){return null==t?"":(t+"").replace(de,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(i(Object(t))?ce.merge(n,"string"==typeof t?[t]:t):se.call(n,t)),n},inArray:function(t,e,i){var n;if(e){if(re)return re.call(e,t,i);for(n=e.length,i=i?0>i?Math.max(0,n+i):i:0;n>i;i++)if(i in e&&e[i]===t)return i}return-1},merge:function(t,i){var n=i.length,s=t.length,o=0;if("number"==typeof n)for(;n>o;o++)t[s++]=i[o];else for(;i[o]!==e;)t[s++]=i[o++];return t.length=s,t},grep:function(t,e,i){var n,s=[],o=0,r=t.length;for(i=!!i;r>o;o++)n=!!e(t[o],o),i!==n&&s.push(t[o]);return s},map:function(t,e,n){var s,o=0,r=t.length,a=i(t),l=[];if(a)for(;r>o;o++)s=e(t[o],o,n),null!=s&&(l[l.length]=s);else for(o in t)s=e(t[o],o,n),null!=s&&(l[l.length]=s);return ne.apply([],l)},guid:1,proxy:function(t,i){var n,s,o;return"string"==typeof i&&(o=t[i],i=t,t=o),ce.isFunction(t)?(n=oe.call(arguments,2),s=function(){return t.apply(i||this,n.concat(oe.call(arguments)))},s.guid=t.guid=t.guid||ce.guid++,s):e},access:function(t,i,n,s,o,r,a){var l=0,h=t.length,c=null==n;if("object"===ce.type(n)){o=!0;for(l in n)ce.access(t,i,l,n[l],!0,r,a)}else if(s!==e&&(o=!0,ce.isFunction(s)||(a=!0),c&&(a?(i.call(t,s),i=null):(c=i,i=function(t,e,i){return c.call(ce(t),i)})),i))for(;h>l;l++)i(t[l],n,a?s:s.call(t[l],l,i(t[l],n)));return o?t:c?i.call(t):h?i(t[0],n):r},now:function(){return(new Date).getTime()},swap:function(t,e,i,n){var s,o,r={};for(o in e)r[o]=t.style[o],t.style[o]=e[o];s=i.apply(t,n||[]);for(o in e)t.style[o]=r[o];return s}}),ce.ready.promise=function(e){if(!X)if(X=ce.Deferred(),"complete"===Q.readyState)setTimeout(ce.ready);else if(Q.addEventListener)Q.addEventListener("DOMContentLoaded",ke,!1),t.addEventListener("load",ke,!1);else{Q.attachEvent("onreadystatechange",ke),t.attachEvent("onload",ke);var i=!1;try{i=null==t.frameElement&&Q.documentElement}catch(n){}i&&i.doScroll&&!function s(){if(!ce.isReady){try{i.doScroll("left")}catch(t){return setTimeout(s,50)}De(),ce.ready()}}()}return X.promise(e)},ce.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){te["[object "+e+"]"]=e.toLowerCase()}),K=ce(Q),function(t,e){function i(t,e,i,n){var s,o,r,a,l,h,c,u,f,g;if((e?e.ownerDocument||e:F)!==M&&I(e),e=e||M,i=i||[],!t||"string"!=typeof t)return i;if(1!==(a=e.nodeType)&&9!==a)return[];if(z&&!n){if(s=be.exec(t))if(r=s[1]){if(9===a){if(o=e.getElementById(r),!o||!o.parentNode)return i;if(o.id===r)return i.push(o),i}else if(e.ownerDocument&&(o=e.ownerDocument.getElementById(r))&&W(e,o)&&o.id===r)return i.push(o),i}else{if(s[2])return te.apply(i,e.getElementsByTagName(t)),i;if((r=s[3])&&k.getElementsByClassName&&e.getElementsByClassName)return te.apply(i,e.getElementsByClassName(r)),i}if(k.qsa&&(!H||!H.test(t))){if(u=c=O,f=e,g=9===a&&t,1===a&&"object"!==e.nodeName.toLowerCase()){for(h=p(t),(c=e.getAttribute("id"))?u=c.replace(xe,"\\$&"):e.setAttribute("id",u),u="[id='"+u+"'] ",l=h.length;l--;)h[l]=u+d(h[l]);f=de.test(t)&&e.parentNode||e,g=h.join(",")}if(g)try{return te.apply(i,f.querySelectorAll(g)),i}catch(m){}finally{c||e.removeAttribute("id")}}}return w(t.replace(he,"$1"),e,i,n)}function n(){function t(i,n){return e.push(i+=" ")>C.cacheLength&&delete t[e.shift()],t[i]=n}var e=[];return t}function s(t){return t[O]=!0,t}function o(t){var e=M.createElement("div");try{return!!t(e)}catch(i){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function r(t,e){for(var i=t.split("|"),n=t.length;n--;)C.attrHandle[i[n]]=e}function a(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||V)-(~t.sourceIndex||V);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function l(t){return function(e){var i=e.nodeName.toLowerCase();return"input"===i&&e.type===t}}function h(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function c(t){return s(function(e){return e=+e,s(function(i,n){for(var s,o=t([],i.length,e),r=o.length;r--;)i[s=o[r]]&&(i[s]=!(n[s]=i[s]))})})}function u(){}function p(t,e){var n,s,o,r,a,l,h,c=Y[t+" "];if(c)return e?0:c.slice(0);for(a=t,l=[],h=C.preFilter;a;){(!n||(s=ue.exec(a)))&&(s&&(a=a.slice(s[0].length)||a),l.push(o=[])),n=!1,(s=pe.exec(a))&&(n=s.shift(),o.push({value:n,type:s[0].replace(he," ")}),a=a.slice(n.length));for(r in C.filter)!(s=ve[r].exec(a))||h[r]&&!(s=h[r](s))||(n=s.shift(),o.push({value:n,type:r,matches:s}),a=a.slice(n.length));if(!n)break}return e?a.length:a?i.error(t):Y(t,l).slice(0)}function d(t){for(var e=0,i=t.length,n="";i>e;e++)n+=t[e].value;return n}function f(t,e,i){var n=e.dir,s=i&&"parentNode"===n,o=R++;return e.first?function(e,i,o){for(;e=e[n];)if(1===e.nodeType||s)return t(e,i,o)}:function(e,i,r){var a,l,h,c=$+" "+o;if(r){for(;e=e[n];)if((1===e.nodeType||s)&&t(e,i,r))return!0}else for(;e=e[n];)if(1===e.nodeType||s)if(h=e[O]||(e[O]={}),(l=h[n])&&l[0]===c){if((a=l[1])===!0||a===D)return a===!0}else if(l=h[n]=[c],l[1]=t(e,i,r)||D,l[1]===!0)return!0}}function g(t){return t.length>1?function(e,i,n){for(var s=t.length;s--;)if(!t[s](e,i,n))return!1;return!0}:t[0]}function m(t,e,i,n,s){for(var o,r=[],a=0,l=t.length,h=null!=e;l>a;a++)(o=t[a])&&(!i||i(o,n,s))&&(r.push(o),h&&e.push(a));return r}function v(t,e,i,n,o,r){return n&&!n[O]&&(n=v(n)),o&&!o[O]&&(o=v(o,r)),s(function(s,r,a,l){var h,c,u,p=[],d=[],f=r.length,g=s||_(e||"*",a.nodeType?[a]:a,[]),v=!t||!s&&e?g:m(g,p,t,a,l),y=i?o||(s?t:f||n)?[]:r:v;if(i&&i(v,y,a,l),n)for(h=m(y,d),n(h,[],a,l),c=h.length;c--;)(u=h[c])&&(y[d[c]]=!(v[d[c]]=u));if(s){if(o||t){if(o){for(h=[],c=y.length;c--;)(u=y[c])&&h.push(v[c]=u);o(null,y=[],h,l)}for(c=y.length;c--;)(u=y[c])&&(h=o?ie.call(s,u):p[c])>-1&&(s[h]=!(r[h]=u))}}else y=m(y===r?y.splice(f,y.length):y),o?o(null,r,y,l):te.apply(r,y)})}function y(t){for(var e,i,n,s=t.length,o=C.relative[t[0].type],r=o||C.relative[" "],a=o?1:0,l=f(function(t){return t===e},r,!0),h=f(function(t){return ie.call(e,t)>-1},r,!0),c=[function(t,i,n){return!o&&(n||i!==P)||((e=i).nodeType?l(t,i,n):h(t,i,n))}];s>a;a++)if(i=C.relative[t[a].type])c=[f(g(c),i)];else{if(i=C.filter[t[a].type].apply(null,t[a].matches),i[O]){for(n=++a;s>n&&!C.relative[t[n].type];n++);return v(a>1&&g(c),a>1&&d(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(he,"$1"),i,n>a&&y(t.slice(a,n)),s>n&&y(t=t.slice(n)),s>n&&d(t))}c.push(i)}return g(c)}function b(t,e){var n=0,o=e.length>0,r=t.length>0,a=function(s,a,l,h,c){var u,p,d,f=[],g=0,v="0",y=s&&[],b=null!=c,_=P,w=s||r&&C.find.TAG("*",c&&a.parentNode||a),x=$+=null==_?1:Math.random()||.1;for(b&&(P=a!==M&&a,D=n);null!=(u=w[v]);v++){if(r&&u){for(p=0;d=t[p++];)if(d(u,a,l)){h.push(u);break}b&&($=x,D=++n)}o&&((u=!d&&u)&&g--,s&&y.push(u))}if(g+=v,o&&v!==g){for(p=0;d=e[p++];)d(y,f,a,l);if(s){if(g>0)for(;v--;)y[v]||f[v]||(f[v]=G.call(h));f=m(f)}te.apply(h,f),b&&!s&&f.length>0&&g+e.length>1&&i.uniqueSort(h)}return b&&($=x,P=_),y};return o?s(a):a}function _(t,e,n){for(var s=0,o=e.length;o>s;s++)i(t,e[s],n);return n}function w(t,e,i,n){var s,o,r,a,l,h=p(t);if(!n&&1===h.length){if(o=h[0]=h[0].slice(0),o.length>2&&"ID"===(r=o[0]).type&&k.getById&&9===e.nodeType&&z&&C.relative[o[1].type]){if(e=(C.find.ID(r.matches[0].replace(ke,De),e)||[])[0],!e)return i;t=t.slice(o.shift().value.length)}for(s=ve.needsContext.test(t)?0:o.length;s--&&(r=o[s],!C.relative[a=r.type]);)if((l=C.find[a])&&(n=l(r.matches[0].replace(ke,De),de.test(o[0].type)&&e.parentNode||e))){if(o.splice(s,1),t=n.length&&d(o),!t)return te.apply(i,n),i;break}}return N(t,h)(n,e,!z,i,de.test(t)),i}var x,k,D,C,T,S,N,P,E,I,M,A,z,H,j,L,W,O="sizzle"+-new Date,F=t.document,$=0,R=0,B=n(),Y=n(),q=n(),X=!1,K=function(t,e){return t===e?(X=!0,0):0},U=typeof e,V=1<<31,Q={}.hasOwnProperty,J=[],G=J.pop,Z=J.push,te=J.push,ee=J.slice,ie=J.indexOf||function(t){for(var e=0,i=this.length;i>e;e++)if(this[e]===t)return e;return-1},ne="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",se="[\\x20\\t\\r\\n\\f]",oe="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",re=oe.replace("w","w#"),ae="\\["+se+"*("+oe+")"+se+"*(?:([*^$|!~]?=)"+se+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+re+")|)|)"+se+"*\\]",le=":("+oe+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+ae.replace(3,8)+")*)|.*)\\)|)",he=new RegExp("^"+se+"+|((?:^|[^\\\\])(?:\\\\.)*)"+se+"+$","g"),ue=new RegExp("^"+se+"*,"+se+"*"),pe=new RegExp("^"+se+"*([>+~]|"+se+")"+se+"*"),de=new RegExp(se+"*[+~]"),fe=new RegExp("="+se+"*([^\\]'\"]*)"+se+"*\\]","g"),ge=new RegExp(le),me=new RegExp("^"+re+"$"),ve={ID:new RegExp("^#("+oe+")"),CLASS:new RegExp("^\\.("+oe+")"),TAG:new RegExp("^("+oe.replace("w","w*")+")"),ATTR:new RegExp("^"+ae),PSEUDO:new RegExp("^"+le),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+se+"*(even|odd|(([+-]|)(\\d*)n|)"+se+"*(?:([+-]|)"+se+"*(\\d+)|))"+se+"*\\)|)","i"),bool:new RegExp("^(?:"+ne+")$","i"),needsContext:new RegExp("^"+se+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+se+"*((?:-\\d)?\\d*)"+se+"*\\)|)(?=[^-]|$)","i")},ye=/^[^{]+\{\s*\[native \w/,be=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_e=/^(?:input|select|textarea|button)$/i,we=/^h\d$/i,xe=/'|\\/g,ke=new RegExp("\\\\([\\da-f]{1,6}"+se+"?|("+se+")|.)","ig"),De=function(t,e,i){var n="0x"+e-65536;return n!==n||i?e:0>n?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)};try{te.apply(J=ee.call(F.childNodes),F.childNodes),J[F.childNodes.length].nodeType}catch(Ce){te={apply:J.length?function(t,e){Z.apply(t,ee.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}S=i.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return e?"HTML"!==e.nodeName:!1},k=i.support={},I=i.setDocument=function(t){var e=t?t.ownerDocument||t:F,i=e.defaultView;return e!==M&&9===e.nodeType&&e.documentElement?(M=e,A=e.documentElement,z=!S(e),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){I()}),k.attributes=o(function(t){return t.className="i",!t.getAttribute("className")}),k.getElementsByTagName=o(function(t){return t.appendChild(e.createComment("")),!t.getElementsByTagName("*").length}),k.getElementsByClassName=o(function(t){return t.innerHTML="
",t.firstChild.className="i",2===t.getElementsByClassName("i").length}),k.getById=o(function(t){return A.appendChild(t).id=O,!e.getElementsByName||!e.getElementsByName(O).length}),k.getById?(C.find.ID=function(t,e){if(typeof e.getElementById!==U&&z){var i=e.getElementById(t);return i&&i.parentNode?[i]:[]}},C.filter.ID=function(t){var e=t.replace(ke,De);return function(t){return t.getAttribute("id")===e}}):(delete C.find.ID,C.filter.ID=function(t){var e=t.replace(ke,De);return function(t){var i=typeof t.getAttributeNode!==U&&t.getAttributeNode("id");return i&&i.value===e}}),C.find.TAG=k.getElementsByTagName?function(t,e){return typeof e.getElementsByTagName!==U?e.getElementsByTagName(t):void 0}:function(t,e){var i,n=[],s=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[s++];)1===i.nodeType&&n.push(i);return n}return o},C.find.CLASS=k.getElementsByClassName&&function(t,e){return typeof e.getElementsByClassName!==U&&z?e.getElementsByClassName(t):void 0},j=[],H=[],(k.qsa=ye.test(e.querySelectorAll))&&(o(function(t){t.innerHTML="
",t.querySelectorAll("[selected]").length||H.push("\\["+se+"*(?:value|"+ne+")"),t.querySelectorAll(":checked").length||H.push(":checked")}),o(function(t){var i=e.createElement("input");i.setAttribute("type","hidden"),t.appendChild(i).setAttribute("t",""),t.querySelectorAll("[t^='']").length&&H.push("[*^$]="+se+"*(?:''|\"\")"),t.querySelectorAll(":enabled").length||H.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),H.push(",.*:")})),(k.matchesSelector=ye.test(L=A.webkitMatchesSelector||A.mozMatchesSelector||A.oMatchesSelector||A.msMatchesSelector))&&o(function(t){k.disconnectedMatch=L.call(t,"div"),L.call(t,"[s!='']:x"),j.push("!=",le)}),H=H.length&&new RegExp(H.join("|")),j=j.length&&new RegExp(j.join("|")),W=ye.test(A.contains)||A.compareDocumentPosition?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},K=A.compareDocumentPosition?function(t,i){if(t===i)return X=!0,0;var n=i.compareDocumentPosition&&t.compareDocumentPosition&&t.compareDocumentPosition(i);return n?1&n||!k.sortDetached&&i.compareDocumentPosition(t)===n?t===e||W(F,t)?-1:i===e||W(F,i)?1:E?ie.call(E,t)-ie.call(E,i):0:4&n?-1:1:t.compareDocumentPosition?-1:1}:function(t,i){var n,s=0,o=t.parentNode,r=i.parentNode,l=[t],h=[i];if(t===i)return X=!0,0;if(!o||!r)return t===e?-1:i===e?1:o?-1:r?1:E?ie.call(E,t)-ie.call(E,i):0;if(o===r)return a(t,i);for(n=t;n=n.parentNode;)l.unshift(n);for(n=i;n=n.parentNode;)h.unshift(n);for(;l[s]===h[s];)s++;return s?a(l[s],h[s]):l[s]===F?-1:h[s]===F?1:0},e):M},i.matches=function(t,e){return i(t,null,null,e)},i.matchesSelector=function(t,e){if((t.ownerDocument||t)!==M&&I(t),e=e.replace(fe,"='$1']"),!(!k.matchesSelector||!z||j&&j.test(e)||H&&H.test(e)))try{var n=L.call(t,e);if(n||k.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(s){}return i(e,M,null,[t]).length>0},i.contains=function(t,e){return(t.ownerDocument||t)!==M&&I(t),W(t,e)},i.attr=function(t,i){(t.ownerDocument||t)!==M&&I(t);var n=C.attrHandle[i.toLowerCase()],s=n&&Q.call(C.attrHandle,i.toLowerCase())?n(t,i,!z):e;return s===e?k.attributes||!z?t.getAttribute(i):(s=t.getAttributeNode(i))&&s.specified?s.value:null:s},i.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},i.uniqueSort=function(t){var e,i=[],n=0,s=0;if(X=!k.detectDuplicates,E=!k.sortStable&&t.slice(0),t.sort(K),X){for(;e=t[s++];)e===t[s]&&(n=i.push(s));for(;n--;)t.splice(i[n],1)}return t},T=i.getText=function(t){var e,i="",n=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)i+=T(t)}else if(3===s||4===s)return t.nodeValue}else for(;e=t[n];n++)i+=T(e);return i},C=i.selectors={cacheLength:50,createPseudo:s,match:ve,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(ke,De),t[3]=(t[4]||t[5]||"").replace(ke,De),"~="===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]||i.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]&&i.error(t[0]),t},PSEUDO:function(t){var i,n=!t[5]&&t[2];return ve.CHILD.test(t[0])?null:(t[3]&&t[4]!==e?t[2]=t[4]:n&&ge.test(n)&&(i=p(n,!0))&&(i=n.indexOf(")",n.length-i)-n.length)&&(t[0]=t[0].slice(0,i),t[2]=n.slice(0,i)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(ke,De).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("(^|"+se+")"+t+"("+se+"|$)"))&&B(t,function(t){return e.test("string"==typeof t.className&&t.className||typeof t.getAttribute!==U&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(s){var o=i.attr(s,t);return null==o?"!="===e:e?(o+="","="===e?o===n:"!="===e?o!==n:"^="===e?n&&0===o.indexOf(n):"*="===e?n&&o.indexOf(n)>-1:"$="===e?n&&o.slice(-n.length)===n:"~="===e?(" "+o+" ").indexOf(n)>-1:"|="===e?o===n||o.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(t,e,i,n,s){var o="nth"!==t.slice(0,3),r="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===s?function(t){return!!t.parentNode}:function(e,i,l){var h,c,u,p,d,f,g=o!==r?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a;if(m){if(o){for(;g;){for(u=e;u=u[g];)if(a?u.nodeName.toLowerCase()===v:1===u.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[r?m.firstChild:m.lastChild],r&&y){for(c=m[O]||(m[O]={}),h=c[t]||[],d=h[0]===$&&h[1],p=h[0]===$&&h[2],u=d&&m.childNodes[d];u=++d&&u&&u[g]||(p=d=0)||f.pop();)if(1===u.nodeType&&++p&&u===e){c[t]=[$,d,p];break}}else if(y&&(h=(e[O]||(e[O]={}))[t])&&h[0]===$)p=h[1];else for(;(u=++d&&u&&u[g]||(p=d=0)||f.pop())&&((a?u.nodeName.toLowerCase()!==v:1!==u.nodeType)||!++p||(y&&((u[O]||(u[O]={}))[t]=[$,p]),u!==e)););return p-=s,p===n||p%n===0&&p/n>=0
+}}},PSEUDO:function(t,e){var n,o=C.pseudos[t]||C.setFilters[t.toLowerCase()]||i.error("unsupported pseudo: "+t);return o[O]?o(e):o.length>1?(n=[t,t,"",e],C.setFilters.hasOwnProperty(t.toLowerCase())?s(function(t,i){for(var n,s=o(t,e),r=s.length;r--;)n=ie.call(t,s[r]),t[n]=!(i[n]=s[r])}):function(t){return o(t,0,n)}):o}},pseudos:{not:s(function(t){var e=[],i=[],n=N(t.replace(he,"$1"));return n[O]?s(function(t,e,i,s){for(var o,r=n(t,null,s,[]),a=t.length;a--;)(o=r[a])&&(t[a]=!(e[a]=o))}):function(t,s,o){return e[0]=t,n(e,null,o,i),!i.pop()}}),has:s(function(t){return function(e){return i(t,e).length>0}}),contains:s(function(t){return function(e){return(e.textContent||e.innerText||T(e)).indexOf(t)>-1}}),lang:s(function(t){return me.test(t||"")||i.error("unsupported lang: "+t),t=t.replace(ke,De).toLowerCase(),function(e){var i;do if(i=z?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return i=i.toLowerCase(),i===t||0===i.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===A},focus:function(t){return t===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},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,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeName>"@"||3===t.nodeType||4===t.nodeType)return!1;return!0},parent:function(t){return!C.pseudos.empty(t)},header:function(t){return we.test(t.nodeName)},input:function(t){return _e.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"))||e.toLowerCase()===t.type)},first:c(function(){return[0]}),last:c(function(t,e){return[e-1]}),eq:c(function(t,e,i){return[0>i?i+e:i]}),even:c(function(t,e){for(var i=0;e>i;i+=2)t.push(i);return t}),odd:c(function(t,e){for(var i=1;e>i;i+=2)t.push(i);return t}),lt:c(function(t,e,i){for(var n=0>i?i+e:i;--n>=0;)t.push(n);return t}),gt:c(function(t,e,i){for(var n=0>i?i+e:i;++n
a;a++)if(h[a].apply(e[0],e[1])===!1&&t.stopOnFalse){s=!1;break}i=!1,h&&(c?c.length&&u(c.shift()):s?h=[]:p.disable())},p={add:function(){if(h){var e=h.length;!function n(e){ce.each(e,function(e,i){var s=ce.type(i);"function"===s?t.unique&&p.has(i)||h.push(i):i&&i.length&&"string"!==s&&n(i)})}(arguments),i?r=h.length:s&&(l=e,u(s))}return this},remove:function(){return h&&ce.each(arguments,function(t,e){for(var n;(n=ce.inArray(e,h,n))>-1;)h.splice(n,1),i&&(r>=n&&r--,a>=n&&a--)}),this},has:function(t){return t?ce.inArray(t,h)>-1:!(!h||!h.length)},empty:function(){return h=[],r=0,this},disable:function(){return h=c=s=e,this},disabled:function(){return!h},lock:function(){return c=e,s||p.disable(),this},locked:function(){return!c},fireWith:function(t,e){return!h||o&&!c||(e=e||[],e=[t,e.slice?e.slice():e],i?c.push(e):u(e)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!o}};return p},ce.extend({Deferred:function(t){var e=[["resolve","done",ce.Callbacks("once memory"),"resolved"],["reject","fail",ce.Callbacks("once memory"),"rejected"],["notify","progress",ce.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var t=arguments;return ce.Deferred(function(i){ce.each(e,function(e,o){var r=o[0],a=ce.isFunction(t[e])&&t[e];s[o[1]](function(){var t=a&&a.apply(this,arguments);t&&ce.isFunction(t.promise)?t.promise().done(i.resolve).fail(i.reject).progress(i.notify):i[r+"With"](this===n?i.promise():this,a?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?ce.extend(t,n):n}},s={};return n.pipe=n.then,ce.each(e,function(t,o){var r=o[2],a=o[3];n[o[1]]=r.add,a&&r.add(function(){i=a},e[1^t][2].disable,e[2][2].lock),s[o[0]]=function(){return s[o[0]+"With"](this===s?n:this,arguments),this},s[o[0]+"With"]=r.fireWith}),n.promise(s),t&&t.call(s,s),s},when:function(t){var e,i,n,s=0,o=oe.call(arguments),r=o.length,a=1!==r||t&&ce.isFunction(t.promise)?r:0,l=1===a?t:ce.Deferred(),h=function(t,i,n){return function(s){i[t]=this,n[t]=arguments.length>1?oe.call(arguments):s,n===e?l.notifyWith(i,n):--a||l.resolveWith(i,n)}};if(r>1)for(e=new Array(r),i=new Array(r),n=new Array(r);r>s;s++)o[s]&&ce.isFunction(o[s].promise)?o[s].promise().done(h(s,n,o)).fail(l.reject).progress(h(s,i,e)):--a;return a||l.resolveWith(n,o),l.promise()}}),ce.support=function(e){var i,n,s,o,r,a,l,h,c,u=Q.createElement("div");if(u.setAttribute("className","t"),u.innerHTML=" a ",i=u.getElementsByTagName("*")||[],n=u.getElementsByTagName("a")[0],!n||!n.style||!i.length)return e;o=Q.createElement("select"),a=o.appendChild(Q.createElement("option")),s=u.getElementsByTagName("input")[0],n.style.cssText="top:1px;float:left;opacity:.5",e.getSetAttribute="t"!==u.className,e.leadingWhitespace=3===u.firstChild.nodeType,e.tbody=!u.getElementsByTagName("tbody").length,e.htmlSerialize=!!u.getElementsByTagName("link").length,e.style=/top/.test(n.getAttribute("style")),e.hrefNormalized="/a"===n.getAttribute("href"),e.opacity=/^0.5/.test(n.style.opacity),e.cssFloat=!!n.style.cssFloat,e.checkOn=!!s.value,e.optSelected=a.selected,e.enctype=!!Q.createElement("form").enctype,e.html5Clone="<:nav>"!==Q.createElement("nav").cloneNode(!0).outerHTML,e.inlineBlockNeedsLayout=!1,e.shrinkWrapBlocks=!1,e.pixelPosition=!1,e.deleteExpando=!0,e.noCloneEvent=!0,e.reliableMarginRight=!0,e.boxSizingReliable=!0,s.checked=!0,e.noCloneChecked=s.cloneNode(!0).checked,o.disabled=!0,e.optDisabled=!a.disabled;try{delete u.test}catch(p){e.deleteExpando=!1}s=Q.createElement("input"),s.setAttribute("value",""),e.input=""===s.getAttribute("value"),s.value="t",s.setAttribute("type","radio"),e.radioValue="t"===s.value,s.setAttribute("checked","t"),s.setAttribute("name","t"),r=Q.createDocumentFragment(),r.appendChild(s),e.appendChecked=s.checked,e.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,u.attachEvent&&(u.attachEvent("onclick",function(){e.noCloneEvent=!1}),u.cloneNode(!0).click());for(c in{submit:!0,change:!0,focusin:!0})u.setAttribute(l="on"+c,"t"),e[c+"Bubbles"]=l in t||u.attributes[l].expando===!1;u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",e.clearCloneStyle="content-box"===u.style.backgroundClip;for(c in ce(e))break;return e.ownLast="0"!==c,ce(function(){var i,n,s,o="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",r=Q.getElementsByTagName("body")[0];r&&(i=Q.createElement("div"),i.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",r.appendChild(i).appendChild(u),u.innerHTML="",s=u.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",h=0===s[0].offsetHeight,s[0].style.display="",s[1].style.display="none",e.reliableHiddenOffsets=h&&0===s[0].offsetHeight,u.innerHTML="",u.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",ce.swap(r,null!=r.style.zoom?{zoom:1}:{},function(){e.boxSizing=4===u.offsetWidth}),t.getComputedStyle&&(e.pixelPosition="1%"!==(t.getComputedStyle(u,null)||{}).top,e.boxSizingReliable="4px"===(t.getComputedStyle(u,null)||{width:"4px"}).width,n=u.appendChild(Q.createElement("div")),n.style.cssText=u.style.cssText=o,n.style.marginRight=n.style.width="0",u.style.width="1px",e.reliableMarginRight=!parseFloat((t.getComputedStyle(n,null)||{}).marginRight)),typeof u.style.zoom!==U&&(u.innerHTML="",u.style.cssText=o+"width:1px;padding:1px;display:inline;zoom:1",e.inlineBlockNeedsLayout=3===u.offsetWidth,u.style.display="block",u.innerHTML="
",u.firstChild.style.width="5px",e.shrinkWrapBlocks=3!==u.offsetWidth,e.inlineBlockNeedsLayout&&(r.style.zoom=1)),r.removeChild(i),i=u=s=n=null)}),i=o=r=a=n=s=null,e}({});var Te=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Se=/([A-Z])/g;ce.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return t=t.nodeType?ce.cache[t[ce.expando]]:t[ce.expando],!!t&&!a(t)},data:function(t,e,i){return s(t,e,i)},removeData:function(t,e){return o(t,e)},_data:function(t,e,i){return s(t,e,i,!0)},_removeData:function(t,e){return o(t,e,!0)},acceptData:function(t){if(t.nodeType&&1!==t.nodeType&&9!==t.nodeType)return!1;var e=t.nodeName&&ce.noData[t.nodeName.toLowerCase()];return!e||e!==!0&&t.getAttribute("classid")===e}}),ce.fn.extend({data:function(t,i){var n,s,o=null,a=0,l=this[0];if(t===e){if(this.length&&(o=ce.data(l),1===l.nodeType&&!ce._data(l,"parsedAttrs"))){for(n=l.attributes;a1?this.each(function(){ce.data(this,t,i)}):l?r(l,t,ce.data(l,t)):null},removeData:function(t){return this.each(function(){ce.removeData(this,t)})}}),ce.extend({queue:function(t,e,i){var n;return t?(e=(e||"fx")+"queue",n=ce._data(t,e),i&&(!n||ce.isArray(i)?n=ce._data(t,e,ce.makeArray(i)):n.push(i)),n||[]):void 0},dequeue:function(t,e){e=e||"fx";var i=ce.queue(t,e),n=i.length,s=i.shift(),o=ce._queueHooks(t,e),r=function(){ce.dequeue(t,e)};"inprogress"===s&&(s=i.shift(),n--),s&&("fx"===e&&i.unshift("inprogress"),delete o.stop,s.call(t,r,o)),!n&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return ce._data(t,i)||ce._data(t,i,{empty:ce.Callbacks("once memory").add(function(){ce._removeData(t,e+"queue"),ce._removeData(t,i)})})}}),ce.fn.extend({queue:function(t,i){var n=2;return"string"!=typeof t&&(i=t,t="fx",n--),arguments.length1)},removeAttr:function(t){return this.each(function(){ce.removeAttr(this,t)})},prop:function(t,e){return ce.access(this,ce.prop,t,e,arguments.length>1)},removeProp:function(t){return t=ce.propFix[t]||t,this.each(function(){try{this[t]=e,delete this[t]}catch(i){}})},addClass:function(t){var e,i,n,s,o,r=0,a=this.length,l="string"==typeof t&&t;if(ce.isFunction(t))return this.each(function(e){ce(this).addClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(pe)||[];a>r;r++)if(i=this[r],n=1===i.nodeType&&(i.className?(" "+i.className+" ").replace(Ee," "):" ")){for(o=0;s=e[o++];)n.indexOf(" "+s+" ")<0&&(n+=s+" ");i.className=ce.trim(n)}return this},removeClass:function(t){var e,i,n,s,o,r=0,a=this.length,l=0===arguments.length||"string"==typeof t&&t;if(ce.isFunction(t))return this.each(function(e){ce(this).removeClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(pe)||[];a>r;r++)if(i=this[r],n=1===i.nodeType&&(i.className?(" "+i.className+" ").replace(Ee," "):"")){for(o=0;s=e[o++];)for(;n.indexOf(" "+s+" ")>=0;)n=n.replace(" "+s+" "," ");i.className=t?ce.trim(n):""}return this},toggleClass:function(t,e){var i=typeof t;return"boolean"==typeof e&&"string"===i?e?this.addClass(t):this.removeClass(t):ce.isFunction(t)?this.each(function(i){ce(this).toggleClass(t.call(this,i,this.className,e),e)}):this.each(function(){if("string"===i)for(var e,n=0,s=ce(this),o=t.match(pe)||[];e=o[n++];)s.hasClass(e)?s.removeClass(e):s.addClass(e);else(i===U||"boolean"===i)&&(this.className&&ce._data(this,"__className__",this.className),this.className=this.className||t===!1?"":ce._data(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",i=0,n=this.length;n>i;i++)if(1===this[i].nodeType&&(" "+this[i].className+" ").replace(Ee," ").indexOf(e)>=0)return!0;return!1},val:function(t){var i,n,s,o=this[0];{if(arguments.length)return s=ce.isFunction(t),this.each(function(i){var o;1===this.nodeType&&(o=s?t.call(this,i,ce(this).val()):t,null==o?o="":"number"==typeof o?o+="":ce.isArray(o)&&(o=ce.map(o,function(t){return null==t?"":t+""})),n=ce.valHooks[this.type]||ce.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&n.set(this,o,"value")!==e||(this.value=o))});if(o)return n=ce.valHooks[o.type]||ce.valHooks[o.nodeName.toLowerCase()],n&&"get"in n&&(i=n.get(o,"value"))!==e?i:(i=o.value,"string"==typeof i?i.replace(Ie,""):null==i?"":i)}}}),ce.extend({valHooks:{option:{get:function(t){var e=ce.find.attr(t,"value");return null!=e?e:t.text}},select:{get:function(t){for(var e,i,n=t.options,s=t.selectedIndex,o="select-one"===t.type||0>s,r=o?null:[],a=o?s+1:n.length,l=0>s?a:o?s:0;a>l;l++)if(i=n[l],!(!i.selected&&l!==s||(ce.support.optDisabled?i.disabled:null!==i.getAttribute("disabled"))||i.parentNode.disabled&&ce.nodeName(i.parentNode,"optgroup"))){if(e=ce(i).val(),o)return e;r.push(e)}return r},set:function(t,e){for(var i,n,s=t.options,o=ce.makeArray(e),r=s.length;r--;)n=s[r],(n.selected=ce.inArray(ce(n).val(),o)>=0)&&(i=!0);return i||(t.selectedIndex=-1),o}}},attr:function(t,i,n){var s,o,r=t.nodeType;if(t&&3!==r&&8!==r&&2!==r)return typeof t.getAttribute===U?ce.prop(t,i,n):(1===r&&ce.isXMLDoc(t)||(i=i.toLowerCase(),s=ce.attrHooks[i]||(ce.expr.match.bool.test(i)?Pe:Ne)),n===e?s&&"get"in s&&null!==(o=s.get(t,i))?o:(o=ce.find.attr(t,i),null==o?e:o):null!==n?s&&"set"in s&&(o=s.set(t,n,i))!==e?o:(t.setAttribute(i,n+""),n):(ce.removeAttr(t,i),void 0))},removeAttr:function(t,e){var i,n,s=0,o=e&&e.match(pe);if(o&&1===t.nodeType)for(;i=o[s++];)n=ce.propFix[i]||i,ce.expr.match.bool.test(i)?je&&He||!ze.test(i)?t[n]=!1:t[ce.camelCase("default-"+i)]=t[n]=!1:ce.attr(t,i,""),t.removeAttribute(He?i:n)},attrHooks:{type:{set:function(t,e){if(!ce.support.radioValue&&"radio"===e&&ce.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(t,i,n){var s,o,r,a=t.nodeType;if(t&&3!==a&&8!==a&&2!==a)return r=1!==a||!ce.isXMLDoc(t),r&&(i=ce.propFix[i]||i,o=ce.propHooks[i]),n!==e?o&&"set"in o&&(s=o.set(t,n,i))!==e?s:t[i]=n:o&&"get"in o&&null!==(s=o.get(t,i))?s:t[i]},propHooks:{tabIndex:{get:function(t){var e=ce.find.attr(t,"tabindex");return e?parseInt(e,10):Me.test(t.nodeName)||Ae.test(t.nodeName)&&t.href?0:-1}}}}),Pe={set:function(t,e,i){return e===!1?ce.removeAttr(t,i):je&&He||!ze.test(i)?t.setAttribute(!He&&ce.propFix[i]||i,i):t[ce.camelCase("default-"+i)]=t[i]=!0,i}},ce.each(ce.expr.match.bool.source.match(/\w+/g),function(t,i){var n=ce.expr.attrHandle[i]||ce.find.attr;ce.expr.attrHandle[i]=je&&He||!ze.test(i)?function(t,i,s){var o=ce.expr.attrHandle[i],r=s?e:(ce.expr.attrHandle[i]=e)!=n(t,i,s)?i.toLowerCase():null;return ce.expr.attrHandle[i]=o,r}:function(t,i,n){return n?e:t[ce.camelCase("default-"+i)]?i.toLowerCase():null}}),je&&He||(ce.attrHooks.value={set:function(t,e,i){return ce.nodeName(t,"input")?(t.defaultValue=e,void 0):Ne&&Ne.set(t,e,i)}}),He||(Ne={set:function(t,i,n){var s=t.getAttributeNode(n);return s||t.setAttributeNode(s=t.ownerDocument.createAttribute(n)),s.value=i+="","value"===n||i===t.getAttribute(n)?i:e}},ce.expr.attrHandle.id=ce.expr.attrHandle.name=ce.expr.attrHandle.coords=function(t,i,n){var s;return n?e:(s=t.getAttributeNode(i))&&""!==s.value?s.value:null},ce.valHooks.button={get:function(t,i){var n=t.getAttributeNode(i);return n&&n.specified?n.value:e},set:Ne.set},ce.attrHooks.contenteditable={set:function(t,e,i){Ne.set(t,""===e?!1:e,i)}},ce.each(["width","height"],function(t,e){ce.attrHooks[e]={set:function(t,i){return""===i?(t.setAttribute(e,"auto"),i):void 0}}})),ce.support.hrefNormalized||ce.each(["href","src"],function(t,e){ce.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),ce.support.style||(ce.attrHooks.style={get:function(t){return t.style.cssText||e},set:function(t,e){return t.style.cssText=e+""}}),ce.support.optSelected||(ce.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}}),ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ce.propFix[this.toLowerCase()]=this}),ce.support.enctype||(ce.propFix.enctype="encoding"),ce.each(["radio","checkbox"],function(){ce.valHooks[this]={set:function(t,e){return ce.isArray(e)?t.checked=ce.inArray(ce(t).val(),e)>=0:void 0}},ce.support.checkOn||(ce.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Le=/^(?:input|select|textarea)$/i,We=/^key/,Oe=/^(?:mouse|contextmenu)|click/,Fe=/^(?:focusinfocus|focusoutblur)$/,$e=/^([^.]*)(?:\.(.+)|)$/;ce.event={global:{},add:function(t,i,n,s,o){var r,a,l,h,c,u,p,d,f,g,m,v=ce._data(t);if(v){for(n.handler&&(h=n,n=h.handler,o=h.selector),n.guid||(n.guid=ce.guid++),(a=v.events)||(a=v.events={}),(u=v.handle)||(u=v.handle=function(t){return typeof ce===U||t&&ce.event.triggered===t.type?e:ce.event.dispatch.apply(u.elem,arguments)},u.elem=t),i=(i||"").match(pe)||[""],l=i.length;l--;)r=$e.exec(i[l])||[],f=m=r[1],g=(r[2]||"").split(".").sort(),f&&(c=ce.event.special[f]||{},f=(o?c.delegateType:c.bindType)||f,c=ce.event.special[f]||{},p=ce.extend({type:f,origType:m,data:s,handler:n,guid:n.guid,selector:o,needsContext:o&&ce.expr.match.needsContext.test(o),namespace:g.join(".")},h),(d=a[f])||(d=a[f]=[],d.delegateCount=0,c.setup&&c.setup.call(t,s,g,u)!==!1||(t.addEventListener?t.addEventListener(f,u,!1):t.attachEvent&&t.attachEvent("on"+f,u))),c.add&&(c.add.call(t,p),p.handler.guid||(p.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,p):d.push(p),ce.event.global[f]=!0);t=null}},remove:function(t,e,i,n,s){var o,r,a,l,h,c,u,p,d,f,g,m=ce.hasData(t)&&ce._data(t);if(m&&(c=m.events)){for(e=(e||"").match(pe)||[""],h=e.length;h--;)if(a=$e.exec(e[h])||[],d=g=a[1],f=(a[2]||"").split(".").sort(),d){for(u=ce.event.special[d]||{},d=(n?u.delegateType:u.bindType)||d,p=c[d]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=p.length;o--;)r=p[o],!s&&g!==r.origType||i&&i.guid!==r.guid||a&&!a.test(r.namespace)||n&&n!==r.selector&&("**"!==n||!r.selector)||(p.splice(o,1),r.selector&&p.delegateCount--,u.remove&&u.remove.call(t,r));l&&!p.length&&(u.teardown&&u.teardown.call(t,f,m.handle)!==!1||ce.removeEvent(t,d,m.handle),delete c[d])}else for(d in c)ce.event.remove(t,d+e[h],i,n,!0);ce.isEmptyObject(c)&&(delete m.handle,ce._removeData(t,"events"))}},trigger:function(i,n,s,o){var r,a,l,h,c,u,p,d=[s||Q],f=le.call(i,"type")?i.type:i,g=le.call(i,"namespace")?i.namespace.split("."):[];if(l=u=s=s||Q,3!==s.nodeType&&8!==s.nodeType&&!Fe.test(f+ce.event.triggered)&&(f.indexOf(".")>=0&&(g=f.split("."),f=g.shift(),g.sort()),a=f.indexOf(":")<0&&"on"+f,i=i[ce.expando]?i:new ce.Event(f,"object"==typeof i&&i),i.isTrigger=o?2:3,i.namespace=g.join("."),i.namespace_re=i.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,i.result=e,i.target||(i.target=s),n=null==n?[i]:ce.makeArray(n,[i]),c=ce.event.special[f]||{},o||!c.trigger||c.trigger.apply(s,n)!==!1)){if(!o&&!c.noBubble&&!ce.isWindow(s)){for(h=c.delegateType||f,Fe.test(h+f)||(l=l.parentNode);l;l=l.parentNode)d.push(l),u=l;u===(s.ownerDocument||Q)&&d.push(u.defaultView||u.parentWindow||t)}for(p=0;(l=d[p++])&&!i.isPropagationStopped();)i.type=p>1?h:c.bindType||f,r=(ce._data(l,"events")||{})[i.type]&&ce._data(l,"handle"),r&&r.apply(l,n),r=a&&l[a],r&&ce.acceptData(l)&&r.apply&&r.apply(l,n)===!1&&i.preventDefault();if(i.type=f,!o&&!i.isDefaultPrevented()&&(!c._default||c._default.apply(d.pop(),n)===!1)&&ce.acceptData(s)&&a&&s[f]&&!ce.isWindow(s)){u=s[a],u&&(s[a]=null),ce.event.triggered=f;try{s[f]()}catch(m){}ce.event.triggered=e,u&&(s[a]=u)}return i.result}},dispatch:function(t){t=ce.event.fix(t);var i,n,s,o,r,a=[],l=oe.call(arguments),h=(ce._data(this,"events")||{})[t.type]||[],c=ce.event.special[t.type]||{};if(l[0]=t,t.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,t)!==!1){for(a=ce.event.handlers.call(this,t,h),i=0;(o=a[i++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,r=0;(s=o.handlers[r++])&&!t.isImmediatePropagationStopped();)(!t.namespace_re||t.namespace_re.test(s.namespace))&&(t.handleObj=s,t.data=s.data,n=((ce.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,l),n!==e&&(t.result=n)===!1&&(t.preventDefault(),t.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(t,i){var n,s,o,r,a=[],l=i.delegateCount,h=t.target;if(l&&h.nodeType&&(!t.button||"click"!==t.type))for(;h!=this;h=h.parentNode||this)if(1===h.nodeType&&(h.disabled!==!0||"click"!==t.type)){for(o=[],r=0;l>r;r++)s=i[r],n=s.selector+" ",o[n]===e&&(o[n]=s.needsContext?ce(n,this).index(h)>=0:ce.find(n,this,null,[h]).length),o[n]&&o.push(s);o.length&&a.push({elem:h,handlers:o})}return le;e++)if(ce.contains(n[e],this))return!0}));for(e=0;s>e;e++)ce.find(t,n[e],i);return i=this.pushStack(s>1?ce.unique(i):i),i.selector=this.selector?this.selector+" "+t:t,i},has:function(t){var e,i=ce(t,this),n=i.length;return this.filter(function(){for(e=0;n>e;e++)if(ce.contains(this,i[e]))return!0})},not:function(t){return this.pushStack(p(this,t||[],!0))},filter:function(t){return this.pushStack(p(this,t||[],!1))},is:function(t){return!!p(this,"string"==typeof t&&Ye.test(t)?ce(t):t||[],!1).length},closest:function(t,e){for(var i,n=0,s=this.length,o=[],r=Ye.test(t)||"string"!=typeof t?ce(t,e||this.context):0;s>n;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(r?r.index(i)>-1:1===i.nodeType&&ce.find.matchesSelector(i,t))){i=o.push(i);break}return this.pushStack(o.length>1?ce.unique(o):o)},index:function(t){return t?"string"==typeof t?ce.inArray(this[0],ce(t)):ce.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){var i="string"==typeof t?ce(t,e):ce.makeArray(t&&t.nodeType?[t]:t),n=ce.merge(this.get(),i);return this.pushStack(ce.unique(n))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),ce.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return ce.dir(t,"parentNode")},parentsUntil:function(t,e,i){return ce.dir(t,"parentNode",i)},next:function(t){return u(t,"nextSibling")},prev:function(t){return u(t,"previousSibling")},nextAll:function(t){return ce.dir(t,"nextSibling")},prevAll:function(t){return ce.dir(t,"previousSibling")},nextUntil:function(t,e,i){return ce.dir(t,"nextSibling",i)},prevUntil:function(t,e,i){return ce.dir(t,"previousSibling",i)},siblings:function(t){return ce.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return ce.sibling(t.firstChild)},contents:function(t){return ce.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:ce.merge([],t.childNodes)}},function(t,e){ce.fn[t]=function(i,n){var s=ce.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(s=ce.filter(n,s)),this.length>1&&(qe[t]||(s=ce.unique(s)),Be.test(t)&&(s=s.reverse())),this.pushStack(s)}}),ce.extend({filter:function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?ce.find.matchesSelector(n,t)?[n]:[]:ce.find.matches(t,ce.grep(e,function(t){return 1===t.nodeType}))},dir:function(t,i,n){for(var s=[],o=t[i];o&&9!==o.nodeType&&(n===e||1!==o.nodeType||!ce(o).is(n));)1===o.nodeType&&s.push(o),o=o[i];return s},sibling:function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i}});var Xe="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Ke=/ jQuery\d+="(?:null|\d+)"/g,Ue=new RegExp("<(?:"+Xe+")[\\s/>]","i"),Ve=/^\s+/,Qe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Je=/<([\w:]+)/,Ge=/\s*$/g,ri={option:[1,""," "],legend:[1,""," "],area:[1,""," "],param:[1,""," "],thead:[1,""],tr:[2,""],col:[2,""],td:[3,""],_default:ce.support.htmlSerialize?[0,"",""]:[1,"X","
"]},ai=d(Q),li=ai.appendChild(Q.createElement("div"));
+ri.optgroup=ri.option,ri.tbody=ri.tfoot=ri.colgroup=ri.caption=ri.thead,ri.th=ri.td,ce.fn.extend({text:function(t){return ce.access(this,function(t){return t===e?ce.text(this):this.empty().append((this[0]&&this[0].ownerDocument||Q).createTextNode(t))},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=f(this,t);e.appendChild(t)}})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=f(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var i,n=t?ce.filter(t,this):this,s=0;null!=(i=n[s]);s++)e||1!==i.nodeType||ce.cleanData(_(i)),i.parentNode&&(e&&ce.contains(i.ownerDocument,i)&&v(_(i,"script")),i.parentNode.removeChild(i));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&ce.cleanData(_(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&ce.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return ce.clone(this,t,e)})},html:function(t){return ce.access(this,function(t){var i=this[0]||{},n=0,s=this.length;if(t===e)return 1===i.nodeType?i.innerHTML.replace(Ke,""):e;if(!("string"!=typeof t||ti.test(t)||!ce.support.htmlSerialize&&Ue.test(t)||!ce.support.leadingWhitespace&&Ve.test(t)||ri[(Je.exec(t)||["",""])[1].toLowerCase()])){t=t.replace(Qe,"<$1>$2>");try{for(;s>n;n++)i=this[n]||{},1===i.nodeType&&(ce.cleanData(_(i,!1)),i.innerHTML=t);i=0}catch(o){}}i&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=ce.map(this,function(t){return[t.nextSibling,t.parentNode]}),e=0;return this.domManip(arguments,function(i){var n=t[e++],s=t[e++];s&&(n&&n.parentNode!==s&&(n=this.nextSibling),ce(this).remove(),s.insertBefore(i,n))},!0),e?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(t,e,i){t=ne.apply([],t);var n,s,o,r,a,l,h=0,c=this.length,u=this,p=c-1,d=t[0],f=ce.isFunction(d);if(f||!(1>=c||"string"!=typeof d||ce.support.checkClone)&&ii.test(d))return this.each(function(n){var s=u.eq(n);f&&(t[0]=d.call(this,n,s.html())),s.domManip(t,e,i)});if(c&&(l=ce.buildFragment(t,this[0].ownerDocument,!1,!i&&this),n=l.firstChild,1===l.childNodes.length&&(l=n),n)){for(r=ce.map(_(l,"script"),g),o=r.length;c>h;h++)s=l,h!==p&&(s=ce.clone(s,!0,!0),o&&ce.merge(r,_(s,"script"))),e.call(this[h],s,h);if(o)for(a=r[r.length-1].ownerDocument,ce.map(r,m),h=0;o>h;h++)s=r[h],ni.test(s.type||"")&&!ce._data(s,"globalEval")&&ce.contains(a,s)&&(s.src?ce._evalUrl(s.src):ce.globalEval((s.text||s.textContent||s.innerHTML||"").replace(oi,"")));l=n=null}return this}}),ce.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){ce.fn[t]=function(t){for(var i,n=0,s=[],o=ce(t),r=o.length-1;r>=n;n++)i=n===r?this:this.clone(!0),ce(o[n])[e](i),se.apply(s,i.get());return this.pushStack(s)}}),ce.extend({clone:function(t,e,i){var n,s,o,r,a,l=ce.contains(t.ownerDocument,t);if(ce.support.html5Clone||ce.isXMLDoc(t)||!Ue.test("<"+t.nodeName+">")?o=t.cloneNode(!0):(li.innerHTML=t.outerHTML,li.removeChild(o=li.firstChild)),!(ce.support.noCloneEvent&&ce.support.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||ce.isXMLDoc(t)))for(n=_(o),a=_(t),r=0;null!=(s=a[r]);++r)n[r]&&b(s,n[r]);if(e)if(i)for(a=a||_(t),n=n||_(o),r=0;null!=(s=a[r]);r++)y(s,n[r]);else y(t,o);return n=_(o,"script"),n.length>0&&v(n,!l&&_(t,"script")),n=a=s=null,o},buildFragment:function(t,e,i,n){for(var s,o,r,a,l,h,c,u=t.length,p=d(e),f=[],g=0;u>g;g++)if(o=t[g],o||0===o)if("object"===ce.type(o))ce.merge(f,o.nodeType?[o]:o);else if(Ze.test(o)){for(a=a||p.appendChild(e.createElement("div")),l=(Je.exec(o)||["",""])[1].toLowerCase(),c=ri[l]||ri._default,a.innerHTML=c[1]+o.replace(Qe,"<$1>$2>")+c[2],s=c[0];s--;)a=a.lastChild;if(!ce.support.leadingWhitespace&&Ve.test(o)&&f.push(e.createTextNode(Ve.exec(o)[0])),!ce.support.tbody)for(o="table"!==l||Ge.test(o)?""!==c[1]||Ge.test(o)?0:a:a.firstChild,s=o&&o.childNodes.length;s--;)ce.nodeName(h=o.childNodes[s],"tbody")&&!h.childNodes.length&&o.removeChild(h);for(ce.merge(f,a.childNodes),a.textContent="";a.firstChild;)a.removeChild(a.firstChild);a=p.lastChild}else f.push(e.createTextNode(o));for(a&&p.removeChild(a),ce.support.appendChecked||ce.grep(_(f,"input"),w),g=0;o=f[g++];)if((!n||-1===ce.inArray(o,n))&&(r=ce.contains(o.ownerDocument,o),a=_(p.appendChild(o),"script"),r&&v(a),i))for(s=0;o=a[s++];)ni.test(o.type||"")&&i.push(o);return a=null,p},cleanData:function(t,e){for(var i,n,s,o,r=0,a=ce.expando,l=ce.cache,h=ce.support.deleteExpando,c=ce.event.special;null!=(i=t[r]);r++)if((e||ce.acceptData(i))&&(s=i[a],o=s&&l[s])){if(o.events)for(n in o.events)c[n]?ce.event.remove(i,n):ce.removeEvent(i,n,o.handle);l[s]&&(delete l[s],h?delete i[a]:typeof i.removeAttribute!==U?i.removeAttribute(a):i[a]=null,ee.push(s))}},_evalUrl:function(t){return ce.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),ce.fn.extend({wrapAll:function(t){if(ce.isFunction(t))return this.each(function(e){ce(this).wrapAll(t.call(this,e))});if(this[0]){var e=ce(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(t){return ce.isFunction(t)?this.each(function(e){ce(this).wrapInner(t.call(this,e))}):this.each(function(){var e=ce(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=ce.isFunction(t);return this.each(function(i){ce(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(){return this.parent().each(function(){ce.nodeName(this,"body")||ce(this).replaceWith(this.childNodes)}).end()}});var hi,ci,ui,pi=/alpha\([^)]*\)/i,di=/opacity\s*=\s*([^)]*)/,fi=/^(top|right|bottom|left)$/,gi=/^(none|table(?!-c[ea]).+)/,mi=/^margin/,vi=new RegExp("^("+ue+")(.*)$","i"),yi=new RegExp("^("+ue+")(?!px)[a-z%]+$","i"),bi=new RegExp("^([+-])=("+ue+")","i"),_i={BODY:"block"},wi={position:"absolute",visibility:"hidden",display:"block"},xi={letterSpacing:0,fontWeight:400},ki=["Top","Right","Bottom","Left"],Di=["Webkit","O","Moz","ms"];ce.fn.extend({css:function(t,i){return ce.access(this,function(t,i,n){var s,o,r={},a=0;if(ce.isArray(i)){for(o=ci(t),s=i.length;s>a;a++)r[i[a]]=ce.css(t,i[a],!1,o);return r}return n!==e?ce.style(t,i,n):ce.css(t,i)},t,i,arguments.length>1)},show:function(){return D(this,!0)},hide:function(){return D(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){k(this)?ce(this).show():ce(this).hide()})}}),ce.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=ui(t,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ce.support.cssFloat?"cssFloat":"styleFloat"},style:function(t,i,n,s){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,r,a,l=ce.camelCase(i),h=t.style;if(i=ce.cssProps[l]||(ce.cssProps[l]=x(h,l)),a=ce.cssHooks[i]||ce.cssHooks[l],n===e)return a&&"get"in a&&(o=a.get(t,!1,s))!==e?o:h[i];if(r=typeof n,"string"===r&&(o=bi.exec(n))&&(n=(o[1]+1)*o[2]+parseFloat(ce.css(t,i)),r="number"),!(null==n||"number"===r&&isNaN(n)||("number"!==r||ce.cssNumber[l]||(n+="px"),ce.support.clearCloneStyle||""!==n||0!==i.indexOf("background")||(h[i]="inherit"),a&&"set"in a&&(n=a.set(t,n,s))===e)))try{h[i]=n}catch(c){}}},css:function(t,i,n,s){var o,r,a,l=ce.camelCase(i);return i=ce.cssProps[l]||(ce.cssProps[l]=x(t.style,l)),a=ce.cssHooks[i]||ce.cssHooks[l],a&&"get"in a&&(r=a.get(t,!0,n)),r===e&&(r=ui(t,i,s)),"normal"===r&&i in xi&&(r=xi[i]),""===n||n?(o=parseFloat(r),n===!0||ce.isNumeric(o)?o||0:r):r}}),t.getComputedStyle?(ci=function(e){return t.getComputedStyle(e,null)},ui=function(t,i,n){var s,o,r,a=n||ci(t),l=a?a.getPropertyValue(i)||a[i]:e,h=t.style;return a&&(""!==l||ce.contains(t.ownerDocument,t)||(l=ce.style(t,i)),yi.test(l)&&mi.test(i)&&(s=h.width,o=h.minWidth,r=h.maxWidth,h.minWidth=h.maxWidth=h.width=l,l=a.width,h.width=s,h.minWidth=o,h.maxWidth=r)),l}):Q.documentElement.currentStyle&&(ci=function(t){return t.currentStyle},ui=function(t,i,n){var s,o,r,a=n||ci(t),l=a?a[i]:e,h=t.style;return null==l&&h&&h[i]&&(l=h[i]),yi.test(l)&&!fi.test(i)&&(s=h.left,o=t.runtimeStyle,r=o&&o.left,r&&(o.left=t.currentStyle.left),h.left="fontSize"===i?"1em":l,l=h.pixelLeft+"px",h.left=s,r&&(o.left=r)),""===l?"auto":l}),ce.each(["height","width"],function(t,e){ce.cssHooks[e]={get:function(t,i,n){return i?0===t.offsetWidth&&gi.test(ce.css(t,"display"))?ce.swap(t,wi,function(){return S(t,e,n)}):S(t,e,n):void 0},set:function(t,i,n){var s=n&&ci(t);return C(t,i,n?T(t,e,n,ce.support.boxSizing&&"border-box"===ce.css(t,"boxSizing",!1,s),s):0)}}}),ce.support.opacity||(ce.cssHooks.opacity={get:function(t,e){return di.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var i=t.style,n=t.currentStyle,s=ce.isNumeric(e)?"alpha(opacity="+100*e+")":"",o=n&&n.filter||i.filter||"";i.zoom=1,(e>=1||""===e)&&""===ce.trim(o.replace(pi,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===e||n&&!n.filter)||(i.filter=pi.test(o)?o.replace(pi,s):o+" "+s)}}),ce(function(){ce.support.reliableMarginRight||(ce.cssHooks.marginRight={get:function(t,e){return e?ce.swap(t,{display:"inline-block"},ui,[t,"marginRight"]):void 0}}),!ce.support.pixelPosition&&ce.fn.position&&ce.each(["top","left"],function(t,e){ce.cssHooks[e]={get:function(t,i){return i?(i=ui(t,e),yi.test(i)?ce(t).position()[e]+"px":i):void 0}}})}),ce.expr&&ce.expr.filters&&(ce.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0||!ce.support.reliableHiddenOffsets&&"none"===(t.style&&t.style.display||ce.css(t,"display"))},ce.expr.filters.visible=function(t){return!ce.expr.filters.hidden(t)}),ce.each({margin:"",padding:"",border:"Width"},function(t,e){ce.cssHooks[t+e]={expand:function(i){for(var n=0,s={},o="string"==typeof i?i.split(" "):[i];4>n;n++)s[t+ki[n]+e]=o[n]||o[n-2]||o[0];return s}},mi.test(t)||(ce.cssHooks[t+e].set=C)});var Ci=/%20/g,Ti=/\[\]$/,Si=/\r?\n/g,Ni=/^(?:submit|button|image|reset|file)$/i,Pi=/^(?:input|select|textarea|keygen)/i;ce.fn.extend({serialize:function(){return ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=ce.prop(this,"elements");return t?ce.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!ce(this).is(":disabled")&&Pi.test(this.nodeName)&&!Ni.test(t)&&(this.checked||!ei.test(t))}).map(function(t,e){var i=ce(this).val();return null==i?null:ce.isArray(i)?ce.map(i,function(t){return{name:e.name,value:t.replace(Si,"\r\n")}}):{name:e.name,value:i.replace(Si,"\r\n")}}).get()}}),ce.param=function(t,i){var n,s=[],o=function(t,e){e=ce.isFunction(e)?e():null==e?"":e,s[s.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(i===e&&(i=ce.ajaxSettings&&ce.ajaxSettings.traditional),ce.isArray(t)||t.jquery&&!ce.isPlainObject(t))ce.each(t,function(){o(this.name,this.value)});else for(n in t)E(n,t[n],i,o);return s.join("&").replace(Ci,"+")},ce.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){ce.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}),ce.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)}});var Ei,Ii,Mi=ce.now(),Ai=/\?/,zi=/#.*$/,Hi=/([?&])_=[^&]*/,ji=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Li=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Wi=/^(?:GET|HEAD)$/,Oi=/^\/\//,Fi=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,$i=ce.fn.load,Ri={},Bi={},Yi="*/".concat("*");try{Ii=V.href}catch(qi){Ii=Q.createElement("a"),Ii.href="",Ii=Ii.href}Ei=Fi.exec(Ii.toLowerCase())||[],ce.fn.load=function(t,i,n){if("string"!=typeof t&&$i)return $i.apply(this,arguments);var s,o,r,a=this,l=t.indexOf(" ");return l>=0&&(s=t.slice(l,t.length),t=t.slice(0,l)),ce.isFunction(i)?(n=i,i=e):i&&"object"==typeof i&&(r="POST"),a.length>0&&ce.ajax({url:t,type:r,dataType:"html",data:i}).done(function(t){o=arguments,a.html(s?ce("").append(ce.parseHTML(t)).find(s):t)}).complete(n&&function(t,e){a.each(n,o||[t.responseText,e,t])}),this},ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){ce.fn[e]=function(t){return this.on(e,t)}}),ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ii,type:"GET",isLocal:Li.test(Ei[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Yi,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ce.parseJSON,"text xml":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?A(A(t,ce.ajaxSettings),e):A(ce.ajaxSettings,t)},ajaxPrefilter:I(Ri),ajaxTransport:I(Bi),ajax:function(t,i){function n(t,i,n,s){var o,u,y,b,w,k=i;2!==_&&(_=2,l&&clearTimeout(l),c=e,a=s||"",x.readyState=t>0?4:0,o=t>=200&&300>t||304===t,n&&(b=z(p,x,n)),b=H(p,b,x,o),o?(p.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(ce.lastModified[r]=w),w=x.getResponseHeader("etag"),w&&(ce.etag[r]=w)),204===t||"HEAD"===p.type?k="nocontent":304===t?k="notmodified":(k=b.state,u=b.data,y=b.error,o=!y)):(y=k,(t||!k)&&(k="error",0>t&&(t=0))),x.status=t,x.statusText=(i||k)+"",o?g.resolveWith(d,[u,k,x]):g.rejectWith(d,[x,k,y]),x.statusCode(v),v=e,h&&f.trigger(o?"ajaxSuccess":"ajaxError",[x,p,o?u:y]),m.fireWith(d,[x,k]),h&&(f.trigger("ajaxComplete",[x,p]),--ce.active||ce.event.trigger("ajaxStop")))}"object"==typeof t&&(i=t,t=e),i=i||{};var s,o,r,a,l,h,c,u,p=ce.ajaxSetup({},i),d=p.context||p,f=p.context&&(d.nodeType||d.jquery)?ce(d):ce.event,g=ce.Deferred(),m=ce.Callbacks("once memory"),v=p.statusCode||{},y={},b={},_=0,w="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(2===_){if(!u)for(u={};e=ji.exec(a);)u[e[1].toLowerCase()]=e[2];e=u[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===_?a:null},setRequestHeader:function(t,e){var i=t.toLowerCase();return _||(t=b[i]=b[i]||t,y[t]=e),this},overrideMimeType:function(t){return _||(p.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>_)for(e in t)v[e]=[v[e],t[e]];else x.always(t[x.status]);return this},abort:function(t){var e=t||w;return c&&c.abort(e),n(0,e),this}};if(g.promise(x).complete=m.add,x.success=x.done,x.error=x.fail,p.url=((t||p.url||Ii)+"").replace(zi,"").replace(Oi,Ei[1]+"//"),p.type=i.method||i.type||p.method||p.type,p.dataTypes=ce.trim(p.dataType||"*").toLowerCase().match(pe)||[""],null==p.crossDomain&&(s=Fi.exec(p.url.toLowerCase()),p.crossDomain=!(!s||s[1]===Ei[1]&&s[2]===Ei[2]&&(s[3]||("http:"===s[1]?"80":"443"))===(Ei[3]||("http:"===Ei[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=ce.param(p.data,p.traditional)),M(Ri,p,i,x),2===_)return x;h=p.global,h&&0===ce.active++&&ce.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Wi.test(p.type),r=p.url,p.hasContent||(p.data&&(r=p.url+=(Ai.test(r)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=Hi.test(r)?r.replace(Hi,"$1_="+Mi++):r+(Ai.test(r)?"&":"?")+"_="+Mi++)),p.ifModified&&(ce.lastModified[r]&&x.setRequestHeader("If-Modified-Since",ce.lastModified[r]),ce.etag[r]&&x.setRequestHeader("If-None-Match",ce.etag[r])),(p.data&&p.hasContent&&p.contentType!==!1||i.contentType)&&x.setRequestHeader("Content-Type",p.contentType),x.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Yi+"; q=0.01":""):p.accepts["*"]);for(o in p.headers)x.setRequestHeader(o,p.headers[o]);if(p.beforeSend&&(p.beforeSend.call(d,x,p)===!1||2===_))return x.abort();w="abort";for(o in{success:1,error:1,complete:1})x[o](p[o]);if(c=M(Bi,p,i,x)){x.readyState=1,h&&f.trigger("ajaxSend",[x,p]),p.async&&p.timeout>0&&(l=setTimeout(function(){x.abort("timeout")},p.timeout));try{_=1,c.send(y,n)}catch(k){if(!(2>_))throw k;n(-1,k)}}else n(-1,"No Transport");return x},getJSON:function(t,e,i){return ce.get(t,e,i,"json")},getScript:function(t,i){return ce.get(t,e,i,"script")}}),ce.each(["get","post"],function(t,i){ce[i]=function(t,n,s,o){return ce.isFunction(n)&&(o=o||s,s=n,n=e),ce.ajax({url:t,type:i,dataType:o,data:n,success:s})}}),ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return ce.globalEval(t),t}}}),ce.ajaxPrefilter("script",function(t){t.cache===e&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),ce.ajaxTransport("script",function(t){if(t.crossDomain){var i,n=Q.head||ce("head")[0]||Q.documentElement;return{send:function(e,s){i=Q.createElement("script"),i.async=!0,t.scriptCharset&&(i.charset=t.scriptCharset),i.src=t.url,i.onload=i.onreadystatechange=function(t,e){(e||!i.readyState||/loaded|complete/.test(i.readyState))&&(i.onload=i.onreadystatechange=null,i.parentNode&&i.parentNode.removeChild(i),i=null,e||s(200,"success"))},n.insertBefore(i,n.firstChild)},abort:function(){i&&i.onload(e,!0)}}}});var Xi=[],Ki=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Xi.pop()||ce.expando+"_"+Mi++;return this[t]=!0,t}}),ce.ajaxPrefilter("json jsonp",function(i,n,s){var o,r,a,l=i.jsonp!==!1&&(Ki.test(i.url)?"url":"string"==typeof i.data&&!(i.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ki.test(i.data)&&"data");return l||"jsonp"===i.dataTypes[0]?(o=i.jsonpCallback=ce.isFunction(i.jsonpCallback)?i.jsonpCallback():i.jsonpCallback,l?i[l]=i[l].replace(Ki,"$1"+o):i.jsonp!==!1&&(i.url+=(Ai.test(i.url)?"&":"?")+i.jsonp+"="+o),i.converters["script json"]=function(){return a||ce.error(o+" was not called"),a[0]},i.dataTypes[0]="json",r=t[o],t[o]=function(){a=arguments},s.always(function(){t[o]=r,i[o]&&(i.jsonpCallback=n.jsonpCallback,Xi.push(o)),a&&ce.isFunction(r)&&r(a[0]),a=r=e}),"script"):void 0});var Ui,Vi,Qi=0,Ji=t.ActiveXObject&&function(){var t;for(t in Ui)Ui[t](e,!0)};ce.ajaxSettings.xhr=t.ActiveXObject?function(){return!this.isLocal&&j()||L()}:j,Vi=ce.ajaxSettings.xhr(),ce.support.cors=!!Vi&&"withCredentials"in Vi,Vi=ce.support.ajax=!!Vi,Vi&&ce.ajaxTransport(function(i){if(!i.crossDomain||ce.support.cors){var n;return{send:function(s,o){var r,a,l=i.xhr();if(i.username?l.open(i.type,i.url,i.async,i.username,i.password):l.open(i.type,i.url,i.async),i.xhrFields)for(a in i.xhrFields)l[a]=i.xhrFields[a];i.mimeType&&l.overrideMimeType&&l.overrideMimeType(i.mimeType),i.crossDomain||s["X-Requested-With"]||(s["X-Requested-With"]="XMLHttpRequest");try{for(a in s)l.setRequestHeader(a,s[a])}catch(h){}l.send(i.hasContent&&i.data||null),n=function(t,s){var a,h,c,u;try{if(n&&(s||4===l.readyState))if(n=e,r&&(l.onreadystatechange=ce.noop,Ji&&delete Ui[r]),s)4!==l.readyState&&l.abort();else{u={},a=l.status,h=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(u.text=l.responseText);try{c=l.statusText}catch(p){c=""}a||!i.isLocal||i.crossDomain?1223===a&&(a=204):a=u.text?200:404}}catch(d){s||o(-1,d)}u&&o(a,c,u,h)},i.async?4===l.readyState?setTimeout(n):(r=++Qi,Ji&&(Ui||(Ui={},ce(t).unload(Ji)),Ui[r]=n),l.onreadystatechange=n):n()},abort:function(){n&&n(e,!0)}}}});var Gi,Zi,tn=/^(?:toggle|show|hide)$/,en=new RegExp("^(?:([+-])=|)("+ue+")([a-z%]*)$","i"),nn=/queueHooks$/,sn=[R],on={"*":[function(t,e){var i=this.createTween(t,e),n=i.cur(),s=en.exec(e),o=s&&s[3]||(ce.cssNumber[t]?"":"px"),r=(ce.cssNumber[t]||"px"!==o&&+n)&&en.exec(ce.css(i.elem,t)),a=1,l=20;if(r&&r[3]!==o){o=o||r[3],s=s||[],r=+n||1;do a=a||".5",r/=a,ce.style(i.elem,t,r+o);while(a!==(a=i.cur()/n)&&1!==a&&--l)}return s&&(r=i.start=+r||+n||0,i.unit=o,i.end=s[1]?r+(s[1]+1)*s[2]:+s[2]),i}]};ce.Animation=ce.extend(F,{tweener:function(t,e){ce.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var i,n=0,s=t.length;s>n;n++)i=t[n],on[i]=on[i]||[],on[i].unshift(e)},prefilter:function(t,e){e?sn.unshift(t):sn.push(t)}}),ce.Tween=B,B.prototype={constructor:B,init:function(t,e,i,n,s,o){this.elem=t,this.prop=i,this.easing=s||"swing",this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=o||(ce.cssNumber[i]?"":"px")},cur:function(){var t=B.propHooks[this.prop];return t&&t.get?t.get(this):B.propHooks._default.get(this)},run:function(t){var e,i=B.propHooks[this.prop];return this.pos=e=this.options.duration?ce.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):B.propHooks._default.set(this),this}},B.prototype.init.prototype=B.prototype,B.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=ce.css(t.elem,t.prop,""),e&&"auto"!==e?e:0):t.elem[t.prop]},set:function(t){ce.fx.step[t.prop]?ce.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[ce.cssProps[t.prop]]||ce.cssHooks[t.prop])?ce.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},B.propHooks.scrollTop=B.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},ce.each(["toggle","show","hide"],function(t,e){var i=ce.fn[e];ce.fn[e]=function(t,n,s){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(Y(e,!0),t,n,s)}}),ce.fn.extend({fadeTo:function(t,e,i,n){return this.filter(k).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var s=ce.isEmptyObject(t),o=ce.speed(e,i,n),r=function(){var e=F(this,ce.extend({},t),o);(s||ce._data(this,"finish"))&&e.stop(!0)};return r.finish=r,s||o.queue===!1?this.each(r):this.queue(o.queue,r)},stop:function(t,i,n){var s=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=i,i=t,t=e),i&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,i=null!=t&&t+"queueHooks",o=ce.timers,r=ce._data(this);if(i)r[i]&&r[i].stop&&s(r[i]);else for(i in r)r[i]&&r[i].stop&&nn.test(i)&&s(r[i]);for(i=o.length;i--;)o[i].elem!==this||null!=t&&o[i].queue!==t||(o[i].anim.stop(n),e=!1,o.splice(i,1));(e||!n)&&ce.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,i=ce._data(this),n=i[t+"queue"],s=i[t+"queueHooks"],o=ce.timers,r=n?n.length:0;for(i.finish=!0,ce.queue(this,t,[]),s&&s.stop&&s.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;r>e;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish})}}),ce.each({slideDown:Y("show"),slideUp:Y("hide"),slideToggle:Y("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){ce.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}}),ce.speed=function(t,e,i){var n=t&&"object"==typeof t?ce.extend({},t):{complete:i||!i&&e||ce.isFunction(t)&&t,duration:t,easing:i&&e||e&&!ce.isFunction(e)&&e};return n.duration=ce.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in ce.fx.speeds?ce.fx.speeds[n.duration]:ce.fx.speeds._default,(null==n.queue||n.queue===!0)&&(n.queue="fx"),n.old=n.complete,n.complete=function(){ce.isFunction(n.old)&&n.old.call(this),n.queue&&ce.dequeue(this,n.queue)},n},ce.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},ce.timers=[],ce.fx=B.prototype.init,ce.fx.tick=function(){var t,i=ce.timers,n=0;for(Gi=ce.now();n
-1,u={},p={};c?(p=r.position(),s=p.top,o=p.left):(s=parseFloat(l)||0,o=parseFloat(h)||0),ce.isFunction(e)&&(e=e.call(t,i,a)),null!=e.top&&(u.top=e.top-a.top+s),null!=e.left&&(u.left=e.left-a.left+o),"using"in e?e.using.call(t,u):r.css(u)}},ce.fn.extend({position:function(){if(this[0]){var t,e,i={top:0,left:0},n=this[0];return"fixed"===ce.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),ce.nodeName(t[0],"html")||(i=t.offset()),i.top+=ce.css(t[0],"borderTopWidth",!0),i.left+=ce.css(t[0],"borderLeftWidth",!0)),{top:e.top-i.top-ce.css(n,"marginTop",!0),left:e.left-i.left-ce.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||J;t&&!ce.nodeName(t,"html")&&"static"===ce.css(t,"position");)t=t.offsetParent;return t||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var n=/Y/.test(i);ce.fn[t]=function(s){return ce.access(this,function(t,s,o){var r=q(t);return o===e?r?i in r?r[i]:r.document.documentElement[s]:t[s]:(r?r.scrollTo(n?ce(r).scrollLeft():o,n?o:ce(r).scrollTop()):t[s]=o,void 0)},t,s,arguments.length,null)}}),ce.each({Height:"height",Width:"width"},function(t,i){ce.each({padding:"inner"+t,content:i,"":"outer"+t},function(n,s){ce.fn[s]=function(s,o){var r=arguments.length&&(n||"boolean"!=typeof s),a=n||(s===!0||o===!0?"margin":"border");return ce.access(this,function(i,n,s){var o;return ce.isWindow(i)?i.document.documentElement["client"+t]:9===i.nodeType?(o=i.documentElement,Math.max(i.body["scroll"+t],o["scroll"+t],i.body["offset"+t],o["offset"+t],o["client"+t])):s===e?ce.css(i,n,a):ce.style(i,n,s,a)},i,r?s:e,r,null)}})}),ce.fn.size=function(){return this.length},ce.fn.andSelf=ce.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=ce:(t.jQuery=t.$=ce,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ce}))}(window),function(t,e){function i(e,i){var s,o,r,a=e.nodeName.toLowerCase();return"area"===a?(s=e.parentNode,o=s.name,e.href&&o&&"map"===s.nodeName.toLowerCase()?(r=t("img[usemap=#"+o+"]")[0],!!r&&n(r)):!1):(/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}var s=0,o=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:function(e){return function(i,n){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),n&&n.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var n,s,o=t(this[0]);o.length&&o[0]!==document;){if(n=o.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(o.css("zIndex"),10),!isNaN(s)&&0!==s))return s;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,n){return!!t.data(e,n[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var n=t.attr(e,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(e,!s)}}),t("").outerWidth(1).jquery||t.each(["Width","Height"],function(i,n){function s(e,i,n,s){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),s&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===n?["Left","Right"]:["Top","Bottom"],r=n.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+n]=function(i){return i===e?a["inner"+n].call(this):this.each(function(){t(this).css(r,s(this,i)+"px")})},t.fn["outer"+n]=function(e,i){return"number"!=typeof e?a["outer"+n].call(this,e):this.each(function(){t(this).css(r,s(this,e,!0,i)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t(" ").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,n){var s,o=t.ui[e].prototype;for(s in n)o.plugins[s]=o.plugins[s]||[],o.plugins[s].push([i,n[s]])},call:function(t,e,i){var n,s=t.plugins[e];if(s&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(n=0;n0?!0:(e[n]=1,s=e[n]>0,e[n]=0,s)}})}(jQuery),function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=n(t("
"))
+}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(o.inline?e.parent()[0]:o.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))})}function s(e,i){t.extend(e,i);for(var n in i)null==i[n]&&(e[n]=i[n]);return e}t.extend(t.ui,{datepicker:{version:"1.10.4"}});var o,r="datepicker";t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return s(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var n,s,o;n=e.nodeName.toLowerCase(),s="div"===n||"span"===n,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),s),o.settings=t.extend({},i||{}),"input"===n?this._connectDatepicker(e,o):s&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var s=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("
")):this.dpDiv}},_connectDatepicker:function(e,i){var n=t(e);i.append=t([]),i.trigger=t([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,r,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var n,s,o,r=this._get(i,"appendText"),a=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=t(""+r+" "),e[a?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,"showOn"),("focus"===n||"both"===n)&&e.focus(this._showDatepicker),("button"===n||"both"===n)&&(s=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t(" ").addClass(this._triggerClass).attr({src:o,alt:s,title:s}):t(" ").addClass(this._triggerClass).html(o?t(" ").attr({src:o,alt:s,title:s}):s)),e[a?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,n,s,o=new Date(2009,11,20),r=this._get(t,"dateFormat");r.match(/[DM]/)&&(e=function(t){for(i=0,n=0,s=0;si&&(i=t[s].length,n=s);return n},o.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var n=t(e);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),t.data(e,r,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,n,o,a){var l,h,c,u,p,d=this._dialogInst;return d||(this.uuid+=1,l="dp"+this.uuid,this._dialogInput=t(" "),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],r,d)),s(d.settings,o||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(h=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,p=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+u,c/2-150+p]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],r,d),this},_destroyDatepicker:function(e){var i,n=t(e),s=t.data(e,r);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,r),"input"===i?(s.append.remove(),s.trigger.remove(),n.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&n.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,n,s=t(e),o=t.data(e,r);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(n=s.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,n,s=t(e),o=t.data(e,r);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(n=s.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;en||!i||i.indexOf(n)>-1):void 0},_doKeyUp:function(e){var i,n=t.datepicker._getInst(e.target);if(n.input.val()!==n.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,t.datepicker._getFormatConfig(n)),i&&(t.datepicker._setDateFromField(n),t.datepicker._updateAlternate(n),t.datepicker._updateDatepicker(n))}catch(s){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,n,o,r,a,l,h;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(i,"beforeShow"),o=n?n.apply(e,[e,i]):{},o!==!1&&(s(i.settings,o),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),a={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),a=t.datepicker._checkOffset(i,a,r),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),i.inline||(l=t.datepicker._get(i,"showAnim"),h=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[l]?i.dpDiv.show(l,t.datepicker._get(i,"showOptions"),h):i.dpDiv[l||"show"](l?h:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,o=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,n=this._getNumberOfMonths(e),s=n[1],r=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&e.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",r*s+"em"),e.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,n){var s=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,a=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:t(document).scrollLeft()),h=document.documentElement.clientHeight+(n?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?s-r:0,i.left-=n&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=n&&i.top===e.input.offset().top+a?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>l&&l>s?Math.abs(i.left+s-l):0),i.top-=Math.min(i.top,i.top+o>h&&h>o?Math.abs(o+a):0),i},_findPos:function(e){for(var i,n=this._getInst(e),s=this._get(n,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[s?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,n,s,o,a=this._curInst;!a||e&&a!==t.data(e,r)||this._datepickerShowing&&(i=this._get(a,"showAnim"),n=this._get(a,"duration"),s=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),n,s):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,s),i||s(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),n=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==n)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,n){var s=t(e),o=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(o,i+("M"===n?this._get(o,"showCurrentAtPos"):0),n),this._updateDatepicker(o))},_gotoToday:function(e){var i,n=t(e),s=this._getInst(n[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(i=new Date,s.selectedDay=i.getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(n)},_selectMonthYear:function(e,i,n){var s=t(e),o=this._getInst(s[0]);o["selected"+("M"===n?"Month":"Year")]=o["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(s)},_selectDay:function(e,i,n,s){var o,r=t(e);t(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(o=this._getInst(r[0]),o.selectedDay=o.currentDay=t("a",s).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=n,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var n,s=t(e),o=this._getInst(s[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),n=this._get(o,"onSelect"),n?n.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,n,s,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),n=this._getDate(e),s=this.formatDate(i,n,this._getFormatConfig(e)),t(o).each(function(){t(this).val(s)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,n){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?i.toString():i+"",""===i)return null;var s,o,r,a,l=0,h=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),u=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,p=(n?n.dayNames:null)||this._defaults.dayNames,d=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,f=(n?n.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,v=-1,y=-1,b=!1,_=function(t){var i=s+1g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),y>-1)for(m=1,v=y;;){if(o=this._getDaysInMonth(g,m-1),o>=v)break;m++,v-=o}if(a=this._daylightSavingAdjust(new Date(g,m-1,v)),a.getFullYear()!==g||a.getMonth()+1!==m||a.getDate()!==v)throw"Invalid date";return a},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:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,i){if(!e)return"";var n,s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=n+112?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var n=!e,s=t.selectedMonth,o=t.selectedYear,r=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=r.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=r.getMonth(),t.drawYear=t.selectedYear=t.currentYear=r.getFullYear(),s===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(n?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(n,-i,"M")},next:function(){t.datepicker._adjustDate(n,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(n)},selectDay:function(){return t.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(n,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,n,s,o,r,a,l,h,c,u,p,d,f,g,m,v,y,b,_,w,x,k,D,C,T,S,N,P,E,I,M,A,z,H,j,L,W,O,F=new Date,$=this._daylightSavingAdjust(new Date(F.getFullYear(),F.getMonth(),F.getDate())),R=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),Y=this._get(t,"hideIfNoPrevNext"),q=this._get(t,"navigationAsDateFormat"),X=this._getNumberOfMonths(t),K=this._get(t,"showCurrentAtPos"),U=this._get(t,"stepMonths"),V=1!==X[0]||1!==X[1],Q=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),J=this._getMinMaxDate(t,"min"),G=this._getMinMaxDate(t,"max"),Z=t.drawMonth-K,te=t.drawYear;if(0>Z&&(Z+=12,te--),G)for(e=this._daylightSavingAdjust(new Date(G.getFullYear(),G.getMonth()-X[0]*X[1]+1,G.getDate())),e=J&&J>e?J:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=q?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-U,1)),this._getFormatConfig(t)):i,n=this._canAdjustMonth(t,-1,te,Z)?""+i+" ":Y?"":""+i+" ",s=this._get(t,"nextText"),s=q?this.formatDate(s,this._daylightSavingAdjust(new Date(te,Z+U,1)),this._getFormatConfig(t)):s,o=this._canAdjustMonth(t,1,te,Z)?""+s+" ":Y?"":""+s+" ",r=this._get(t,"currentText"),a=this._get(t,"gotoCurrent")&&t.currentDay?Q:$,r=q?this.formatDate(r,a,this._getFormatConfig(t)):r,l=t.inline?"":""+this._get(t,"closeText")+" ",h=B?""+(R?l:"")+(this._isInRange(t,a)?""+r+" ":"")+(R?"":l)+"
":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),p=this._get(t,"dayNames"),d=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),y=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),_="",x=0;x"}for(S+="",N=u?""+this._get(t,"weekHeader")+" ":"",w=0;7>w;w++)P=(w+c)%7,N+="=5?" class='ui-datepicker-week-end'":"")+">"+d[P]+" ";for(S+=N+" ",E=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,E)),I=(this._getFirstDayOfMonth(te,Z)-c+7)%7,M=Math.ceil((I+E)/7),A=V?this.maxRows>M?this.maxRows:M:M,this.maxRows=A,z=this._daylightSavingAdjust(new Date(te,Z,1-I)),H=0;A>H;H++){for(S+="",j=u?""+this._get(t,"calculateWeek")(z)+" ":"",w=0;7>w;w++)L=m?m.apply(t.input?t.input[0]:null,[z]):[!0,""],W=z.getMonth()!==Z,O=W&&!y||!L[0]||J&&J>z||G&&z>G,j+=""+(W&&!v?" ":O?""+z.getDate()+" ":""+z.getDate()+" ")+" ",z.setDate(z.getDate()+1),z=this._daylightSavingAdjust(z);S+=j+" "}Z++,Z>11&&(Z=0,te++),S+="
"+(V?" "+(X[0]>0&&D===X[1]-1?"
":""):""),k+=S}_+=k}return _+=h,t._keyEvent=!1,_},_generateMonthYearHeader:function(t,e,i,n,s,o,r,a){var l,h,c,u,p,d,f,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),y=this._get(t,"showMonthAfterYear"),b="",_="";if(o||!m)_+=""+r[e]+" ";else{for(l=n&&n.getFullYear()===i,h=s&&s.getFullYear()===i,_+="",c=0;12>c;c++)(!l||c>=n.getMonth())&&(!h||c<=s.getMonth())&&(_+=""+a[c]+" ");_+=" "}if(y||(b+=_+(!o&&m&&v?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!v)b+=""+i+" ";else{for(u=this._get(t,"yearRange").split(":"),p=(new Date).getFullYear(),d=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?p+parseInt(t,10):parseInt(t,10);return isNaN(e)?p:e},f=d(u[0]),g=Math.max(f,d(u[1]||"")),f=n?Math.max(f,n.getFullYear()):f,g=s?Math.min(g,s.getFullYear()):g,t.yearshtml+="";g>=f;f++)t.yearshtml+=""+f+" ";t.yearshtml+=" ",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),y&&(b+=(!o&&m&&v?"":" ")+_),b+="
"},_adjustInstDate:function(t,e,i){var n=t.drawYear+("Y"===i?e:0),s=t.drawMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(n,s))+("D"===i?e:0),r=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(n,s,o)));t.selectedDay=r.getDate(),t.drawMonth=t.selectedMonth=r.getMonth(),t.drawYear=t.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),n=this._getMinMaxDate(t,"max"),s=i&&i>e?i:e;return n&&s>n?n:s},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,n){var s=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,n+(0>e?e:s[0]*s[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,n,s=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),r=null,a=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),r=parseInt(i[0],10),a=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=n),i[1].match(/[+\-].*/)&&(a+=n)),(!s||e.getTime()>=s.getTime())&&(!o||e.getTime()<=o.getTime())&&(!r||e.getFullYear()>=r)&&(!a||e.getFullYear()<=a)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,n){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var s=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(n,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));
+return this.formatDate(this._get(t,"dateFormat"),s,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.4"}(jQuery),function(t,e){var i=0,n=Array.prototype.slice,s=t.cleanData;t.cleanData=function(e){for(var i,n=0;null!=(i=e[n]);n++)try{t(i).triggerHandler("remove")}catch(o){}s(e)},t.widget=function(e,i,n){var s,o,r,a,l={},h=e.split(".")[0];e=e.split(".")[1],s=h+"-"+e,n||(n=i,i=t.Widget),t.expr[":"][s.toLowerCase()]=function(e){return!!t.data(e,s)},t[h]=t[h]||{},o=t[h][e],r=t[h][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new r(t,e)},t.extend(r,o,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(n,function(e,n){return t.isFunction(n)?(l[e]=function(){var t=function(){return i.prototype[e].apply(this,arguments)},s=function(t){return i.prototype[e].apply(this,t)};return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=s,e=n.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(l[e]=n,void 0)}),r.prototype=t.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||e:e},l,{constructor:r,namespace:h,widgetName:e,widgetFullName:s}),o?(t.each(o._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,r,i._proto)}),delete o._childConstructors):i._childConstructors.push(r),t.widget.bridge(e,r)},t.widget.extend=function(i){for(var s,o,r=n.call(arguments,1),a=0,l=r.length;l>a;a++)for(s in r[a])o=r[a][s],r[a].hasOwnProperty(s)&&o!==e&&(i[s]=t.isPlainObject(o)?t.isPlainObject(i[s])?t.widget.extend({},i[s],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,s){var o=s.prototype.widgetFullName||i;t.fn[i]=function(r){var a="string"==typeof r,l=n.call(arguments,1),h=this;return r=!a&&l.length?t.widget.extend.apply(null,[r].concat(l)):r,a?this.each(function(){var n,s=t.data(this,o);return s?t.isFunction(s[r])&&"_"!==r.charAt(0)?(n=s[r].apply(s,l),n!==s&&n!==e?(h=n&&n.jquery?h.pushStack(n.get()):n,!1):void 0):t.error("no such method '"+r+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+r+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(r||{})._init():t.data(this,o,new s(r,this))}),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"",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.options=t.widget.extend({},this.options,this._getCreateOptions(),e),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._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.widgetName).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(i,n){var s,o,r,a=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(a={},s=i.split("."),i=s.shift(),s.length){for(o=a[i]=t.widget.extend({},this.options[i]),r=0;r
",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,s),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var n=this,r=this.options,a="checkbox"===this.type||"radio"===this.type,l=a?"":"ui-state-active";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(i).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||t(this).removeClass(l)}).bind("click"+this.eventNamespace,function(t){r.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),a&&this.element.bind("change"+this.eventNamespace,function(){n.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled)return!1;t(this).addClass("ui-state-active"),n.buttonElement.attr("aria-pressed","true");var e=n.element[0];o(e).not(e).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return r.disabled?!1:(t(this).addClass("ui-state-active"),e=this,n.document.one("mouseup",function(){e=null}),void 0)}).bind("mouseup"+this.eventNamespace,function(){return r.disabled?!1:(t(this).removeClass("ui-state-active"),void 0)}).bind("keydown"+this.eventNamespace,function(e){return r.disabled?!1:((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"),void 0)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(i+" ui-state-active "+n).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(this.element.prop("disabled",!!e),e&&this.buttonElement.removeClass("ui-state-focus"),void 0):(this._resetButton(),void 0)},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?o(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),void 0;var e=this.buttonElement.removeClass(n),i=t(" ",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,o=s.primary&&s.secondary,r=[];s.primary||s.secondary?(this.options.text&&r.push("ui-button-text-icon"+(o?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend(" "),s.secondary&&e.append(" "),this.options.text||(r.push(o?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):r.push("ui-button-text-only"),e.addClass(r.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.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(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var n=this,s=1===i.which,o="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return n._mouseMove(t)},this._mouseUpDelegate=function(t){return n._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(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)),!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}})}(jQuery),function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("
").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(this._trigger("drag",e,n)===!1)return this._mouseUp({}),!1;this.position=n.position}return 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"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,n=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(n=t.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_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(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.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.element.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.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,n,s=this.options;return s.containment?"window"===s.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===s.containment?(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):s.containment.constructor===Array?(this.containment=s.containment,void 0):("parent"===s.containment&&(s.containment=this.helper[0].parentNode),i=t(s.containment),n=i[0],n&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(e,i){i||(i=this.position);var n="absolute"===e?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:s.scrollTop(),left:s.scrollLeft()}),{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*n}},_generatePosition:function(e){var i,n,s,o,r=this.options,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=e.pageX,h=e.pageY;return this.offset.scroll||(this.offset.scroll={top:a.scrollTop(),left:a.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(n=this.relative_container.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,e.pageX-this.offset.click.lefti[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),r.grid&&(s=r.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,h=i?s-this.offset.click.top>=i[1]||s-this.offset.click.top>i[3]?s:s-this.offset.click.top>=i[1]?s-r.grid[1]:s+r.grid[1]:s,o=r.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-r.grid[0]:o+r.grid[0]:o)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,n){return n=n||this._uiHash(),t.ui.plugin.call(this,e,[i,n]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var n=t(this).data("ui-draggable"),s=n.options,o=t.extend({},i,{item:n.element});n.sortables=[],t(s.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(n.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,o))})},stop:function(e,i){var n=t(this).data("ui-draggable"),s=t.extend({},i,{item:n.element});t.each(n.sortables,function(){this.instance.isOver?(this.instance.isOver=0,n.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===n.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,s))})},drag:function(e,i){var n=t(this).data("ui-draggable"),s=this;t.each(n.sortables,function(){var o=!1,r=this;this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,t.each(n.sortables,function(){return this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this!==r&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(r.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(s).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=n.offset.click.top,this.instance.offset.click.left=n.offset.click.left,this.instance.offset.parent.left-=n.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=n.offset.parent.top-this.instance.offset.parent.top,n._trigger("toSortable",e),n.dropped=this.instance.element,n.currentItem=n.element,this.instance.fromOutside=n),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),n._trigger("fromSortable",e),n.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var n=t(i.helper),s=t(this).data("ui-draggable").options;n.css("opacity")&&(s._opacity=n.css("opacity")),n.css("opacity",s.opacity)},stop:function(e,i){var n=t(this).data("ui-draggable").options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),n=i.options,s=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(n.axis&&"x"===n.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY=0;u--)a=d.snapElements[u].left,l=a+d.snapElements[u].width,h=d.snapElements[u].top,c=h+d.snapElements[u].height,a-g>v||m>l+g||h-g>b||y>c+g||!t.contains(d.snapElements[u].item.ownerDocument,d.snapElements[u].item)?(d.snapElements[u].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,e,t.extend(d._uiHash(),{snapItem:d.snapElements[u].item})),d.snapElements[u].snapping=!1):("inner"!==f.snapMode&&(n=Math.abs(h-b)<=g,s=Math.abs(c-y)<=g,o=Math.abs(a-v)<=g,r=Math.abs(l-m)<=g,n&&(i.position.top=d._convertPositionTo("relative",{top:h-d.helperProportions.height,left:0}).top-d.margins.top),s&&(i.position.top=d._convertPositionTo("relative",{top:c,left:0}).top-d.margins.top),o&&(i.position.left=d._convertPositionTo("relative",{top:0,left:a-d.helperProportions.width}).left-d.margins.left),r&&(i.position.left=d._convertPositionTo("relative",{top:0,left:l}).left-d.margins.left)),p=n||s||o||r,"outer"!==f.snapMode&&(n=Math.abs(h-y)<=g,s=Math.abs(c-b)<=g,o=Math.abs(a-m)<=g,r=Math.abs(l-v)<=g,n&&(i.position.top=d._convertPositionTo("relative",{top:h,left:0}).top-d.margins.top),s&&(i.position.top=d._convertPositionTo("relative",{top:c-d.helperProportions.height,left:0}).top-d.margins.top),o&&(i.position.left=d._convertPositionTo("relative",{top:0,left:a}).left-d.margins.left),r&&(i.position.left=d._convertPositionTo("relative",{top:0,left:l-d.helperProportions.width}).left-d.margins.left)),!d.snapElements[u].snapping&&(n||s||o||r||p)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,e,t.extend(d._uiHash(),{snapItem:d.snapElements[u].item})),d.snapElements[u].snapping=n||s||o||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,n=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});n.length&&(e=parseInt(t(n[0]).css("zIndex"),10)||0,t(n).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+n.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var n=t(i.helper),s=t(this).data("ui-draggable").options;n.css("zIndex")&&(s._zIndex=n.css("zIndex")),n.css("zIndex",s.zIndex)},stop:function(e,i){var n=t(this).data("ui-draggable").options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}})}(jQuery),function(t,e){function i(t,e,i){return[parseFloat(t[0])*(d.test(t[0])?e/100:1),parseFloat(t[1])*(d.test(t[1])?i/100:1)]}function n(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var o,r=Math.max,a=Math.abs,l=Math.round,h=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,p=/^\w+/,d=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(o!==e)return o;var i,n,s=t(""),r=s.children()[0];return t("body").append(s),i=r.offsetWidth,s.css("overflow","scroll"),n=r.offsetWidth,i===n&&(n=s[0].clientWidth),s.remove(),o=i-n},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),s="scroll"===i||"auto"===i&&e.widthn?"left":i>0?"right":"center",vertical:0>o?"top":s>0?"bottom":"middle"};u>d&&a(i+n)g&&a(s+o)r(a(s),a(o))?"horizontal":"vertical",e.using.call(this,t,l)}),c.offset(t.extend(T,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollLeft:n.offset.left,o=n.width,a=t.left-e.collisionPosition.marginLeft,l=s-a,h=a+e.collisionWidth-o-s;e.collisionWidth>o?l>0&&0>=h?(i=t.left+l+e.collisionWidth-o-s,t.left+=l-i):t.left=h>0&&0>=l?s:l>h?s+o-e.collisionWidth:s:l>0?t.left+=l:h>0?t.left-=h:t.left=r(t.left-a,t.left)},top:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,a=t.top-e.collisionPosition.marginTop,l=s-a,h=a+e.collisionHeight-o-s;e.collisionHeight>o?l>0&&0>=h?(i=t.top+l+e.collisionHeight-o-s,t.top+=l-i):t.top=h>0&&0>=l?s:l>h?s+o-e.collisionHeight:s:l>0?t.top+=l:h>0?t.top-=h:t.top=r(t.top-a,t.top)}},flip:{left:function(t,e){var i,n,s=e.within,o=s.offset.left+s.scrollLeft,r=s.width,l=s.isWindow?s.scrollLeft:s.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,p="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];0>c?(i=t.left+p+d+f+e.collisionWidth-r-o,(0>i||i0&&(n=t.left-e.collisionPosition.marginLeft+p+d+f-l,(n>0||a(n)c?(n=t.top+d+f+g+e.collisionHeight-r-o,t.top+d+f+g>c&&(0>n||n0&&(i=t.top-e.collisionPosition.marginTop+d+f+g-l,t.top+d+f+g>u&&(i>0||a(i)10&&11>s,e.innerHTML="",i.removeChild(e)}()}(jQuery),function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,n,s,o,r=this,a=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("
").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;i "),s.css({zIndex:a.zIndex}),"se"===n&&s.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[n]=".ui-resizable-"+n,this.element.append(s);this._renderAxis=function(e){var i,n,s,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(n=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),s=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(s,o),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){r.resizing||(this.className&&(s=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=s&&s[1]?s[1]:"se")}),a.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){a.disabled||(t(this).removeClass("ui-resizable-autohide"),r._handles.show())}).mouseleave(function(){a.disabled||r.resizing||(t(this).addClass("ui-resizable-autohide"),r._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,n,s=!1;for(i in this.handles)n=t(this.handles[i])[0],(n===e.target||t.contains(n,e.target))&&(s=!0);return!this.options.disabled&&s},_mouseStart:function(i){var n,s,o,r=this.options,a=this.element.position(),l=this.element;return this.resizing=!0,/absolute/.test(l.css("position"))?l.css({position:"absolute",top:l.css("top"),left:l.css("left")}):l.is(".ui-draggable")&&l.css({position:"absolute",top:a.top,left:a.left}),this._renderProxy(),n=e(this.helper.css("left")),s=e(this.helper.css("top")),r.containment&&(n+=t(r.containment).scrollLeft()||0,s+=t(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:l.width(),height:l.height()},this.originalSize=this._helper?{width:l.outerWidth(),height:l.outerHeight()}:{width:l.width(),height:l.height()},this.originalPosition={left:n,top:s},this.sizeDiff={width:l.outerWidth()-l.width(),height:l.outerHeight()-l.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof r.aspectRatio?r.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),l.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,n=this.helper,s={},o=this.originalMousePosition,r=this.axis,a=this.position.top,l=this.position.left,h=this.size.width,c=this.size.height,u=e.pageX-o.left||0,p=e.pageY-o.top||0,d=this._change[r];return d?(i=d.apply(this,[e,u,p]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==a&&(s.top=this.position.top+"px"),this.position.left!==l&&(s.left=this.position.left+"px"),this.size.width!==h&&(s.width=this.size.width+"px"),this.size.height!==c&&(s.height=this.size.height+"px"),n.css(s),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,n,s,o,r,a,l,h=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,n=i.length&&/textarea/i.test(i[0].nodeName),s=n&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,o=n?0:c.sizeDiff.width,r={width:c.helper.width()-o,height:c.helper.height()-s},a=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,l=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,h.animate||this.element.css(t.extend(r,{top:l,left:a})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!h.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,n,s,o,r,a=this.options;r={minWidth:i(a.minWidth)?a.minWidth:0,maxWidth:i(a.maxWidth)?a.maxWidth:1/0,minHeight:i(a.minHeight)?a.minHeight:0,maxHeight:i(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=r.minHeight*this.aspectRatio,s=r.minWidth/this.aspectRatio,n=r.maxHeight*this.aspectRatio,o=r.maxWidth/this.aspectRatio,e>r.minWidth&&(r.minWidth=e),s>r.minHeight&&(r.minHeight=s),nt.width,a=i(t.height)&&e.minHeight&&e.minHeight>t.height,l=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,c=/sw|nw|w/.test(n),u=/nw|ne|n/.test(n);return r&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),r&&c&&(t.left=l-e.minWidth),s&&c&&(t.left=l-e.maxWidth),a&&u&&(t.top=h-e.minHeight),o&&u&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,n,s,o=this.helper||this.element;for(t=0;t"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,n=this.originalPosition;return{left:n.left+e,width:i.width-e}},n:function(t,e,i){var n=this.originalSize,s=this.originalPosition;return{top:s.top+i,height:n.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},sw:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,n]))},ne:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},nw:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,n]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),n=i.options,s=i._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),r=o&&t.ui.hasScroll(s[0],"left")?0:i.sizeDiff.height,a=o?0:i.sizeDiff.width,l={width:i.size.width-a,height:i.size.height-r},h=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(l,c&&h?{top:c,left:h}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};s&&s.length&&t(s[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,n,s,o,r,a,l,h=t(this).data("ui-resizable"),c=h.options,u=h.element,p=c.containment,d=p instanceof t?p.get(0):/parent/.test(p)?u.parent().get(0):p;d&&(h.containerElement=t(d),/document/.test(p)||p===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(d),n=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){n[t]=e(i.css("padding"+s))}),h.containerOffset=i.offset(),h.containerPosition=i.position(),h.containerSize={height:i.innerHeight()-n[3],width:i.innerWidth()-n[1]},s=h.containerOffset,o=h.containerSize.height,r=h.containerSize.width,a=t.ui.hasScroll(d,"left")?d.scrollWidth:r,l=t.ui.hasScroll(d)?d.scrollHeight:o,h.parentData={element:d,left:s.left,top:s.top,width:a,height:l}))},resize:function(e){var i,n,s,o,r=t(this).data("ui-resizable"),a=r.options,l=r.containerOffset,h=r.position,c=r._aspectRatio||e.shiftKey,u={top:0,left:0},p=r.containerElement;p[0]!==document&&/static/.test(p.css("position"))&&(u=l),h.left<(r._helper?l.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-l.left:r.position.left-u.left),c&&(r.size.height=r.size.width/r.aspectRatio),r.position.left=a.helper?l.left:0),h.top<(r._helper?l.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-l.top:r.position.top),c&&(r.size.width=r.size.height*r.aspectRatio),r.position.top=r._helper?l.top:0),r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top,i=Math.abs((r._helper?r.offset.left-u.left:r.offset.left-u.left)+r.sizeDiff.width),n=Math.abs((r._helper?r.offset.top-u.top:r.offset.top-l.top)+r.sizeDiff.height),s=r.containerElement.get(0)===r.element.parent().get(0),o=/relative|absolute/.test(r.containerElement.css("position")),s&&o&&(i-=Math.abs(r.parentData.left)),i+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-i,c&&(r.size.height=r.size.width/r.aspectRatio)),n+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-n,c&&(r.size.width=r.size.height*r.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,n=e.containerOffset,s=e.containerPosition,o=e.containerElement,r=t(e.helper),a=r.offset(),l=r.outerWidth()-e.sizeDiff.width,h=r.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:a.left-s.left-n.left,width:l,height:h}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:a.left-s.left-n.left,width:l,height:h})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,n=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?n(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],n(i.alsoResize)):t.each(i.alsoResize,function(t){n(t)})},resize:function(e,i){var n=t(this).data("ui-resizable"),s=n.options,o=n.originalSize,r=n.originalPosition,a={height:n.size.height-o.height||0,width:n.size.width-o.width||0,top:n.position.top-r.top||0,left:n.position.left-r.left||0},l=function(e,n){t(e).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),o={},r=n&&n.length?n:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(r,function(t,e){var i=(s[e]||0)+(a[e]||0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})};"object"!=typeof s.alsoResize||s.alsoResize.nodeType?l(s.alsoResize):t.each(s.alsoResize,function(t,e){l(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,n=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,n=e.size,s=e.originalSize,o=e.originalPosition,r=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=a[0]||1,h=a[1]||1,c=Math.round((n.width-s.width)/l)*l,u=Math.round((n.height-s.height)/h)*h,p=s.width+c,d=s.height+u,f=i.maxWidth&&i.maxWidthp,v=i.minHeight&&i.minHeight>d;i.grid=a,m&&(p+=l),v&&(d+=h),f&&(p-=l),g&&(d-=h),/^(se|s|e)$/.test(r)?(e.size.width=p,e.size.height=d):/^(ne)$/.test(r)?(e.size.width=p,e.size.height=d,e.position.top=o.top-u):/^(sw)$/.test(r)?(e.size.width=p,e.size.height=d,e.position.left=o.left-c):(d-h>0?(e.size.height=d,e.position.top=o.top-u):(e.size.height=h,e.position.top=o.top+s.height-h),p-l>0?(e.size.width=p,e.position.left=o.left-c):(e.size.width=l,e.position.left=o.left+s.width-l))}})}(jQuery),function(t){var e={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i,n=this;if(this._isOpen&&this._trigger("beforeClose",e)!==!1){if(this._isOpen=!1,this._destroyOverlay(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&t(i).blur()}catch(s){}this._hide(this.uiDialog,this.options.hide,function(){n._trigger("close",e)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._trigger("open"),void 0)},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("
").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),void 0;if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),n=i.filter(":first"),s=i.filter(":last");e.target!==s[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==n[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(s.focus(1),e.preventDefault()):(n.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("
").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("
").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("
").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html(" "),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("
").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),void 0):(t.each(i,function(i,n){var s,o;n=t.isFunction(n)?{click:n,text:i}:n,n=t.extend({type:"button"},n),s=n.click,n.click=function(){s.apply(e.element[0],arguments)},o={icons:n.icons,text:n.showText},delete n.icons,delete n.showText,t("
",n).button(o).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,s){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",n,e(s))},drag:function(t,n){i._trigger("drag",t,e(n))},stop:function(s,o){n.position=[o.position.left-i.document.scrollLeft(),o.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",s,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,n=this.options,s=n.resizable,o=this.uiDialog.css("position"),r="string"==typeof s?s:"n,e,s,w,se,sw,ne,nw";
+this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:r,start:function(n,s){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",n,e(s))},resize:function(t,n){i._trigger("resize",t,e(n))},stop:function(s,o){n.height=t(this).height(),n.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",s,e(o))}}).css("position",o)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(n){var s=this,o=!1,r={};t.each(n,function(t,n){s._setOption(t,n),t in e&&(o=!0),t in i&&(r[t]=n)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(t,e){var i,n,s=this.uiDialog;"dialogClass"===t&&s.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=s.is(":data(ui-draggable)"),i&&!e&&s.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(n=s.is(":data(ui-resizable)"),n&&!e&&s.resizable("destroy"),n&&"string"==typeof e&&s.resizable("option","handles",e),n||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),e=Math.max(0,n.minHeight-t),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-t):"none","auto"===n.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("
").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(n){e._allowInteraction(n)||(n.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("
").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,n=[],s=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(n=i.split?i.split(" "):[i[0],i[1]],1===n.length&&(n[1]=n[0]),t.each(["left","top"],function(t,e){+n[t]===n[t]&&(s[t]=n[t],n[t]=e)}),i={my:n[0]+(s[0]<0?s[0]:"+"+s[0])+" "+n[1]+(s[1]<0?s[1]:"+"+s[1]),at:n.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.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},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var n=null,s=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(n=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(n=t(e.target)),n?!this.options.handle||i||(t(this.options.handle,n).find("*").addBack().each(function(){this===e.target&&(s=!0)}),s)?(this.currentItem=n,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,n){var s,o,r=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,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",r.cursor),this.storedStylesheet=t("").appendTo(o)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)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&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,n,s,o,r=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]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY
=0;i--)if(n=this.items[i],s=n.item[0],o=this._intersectsWithPointer(n),o&&n.instance===this.currentContainer&&s!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==s&&!t.contains(this.placeholder[0],s)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],s):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(e,n),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,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var n=this,s=this.placeholder.offset(),o=this.options.axis,r={};o&&"x"!==o||(r.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(r.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(r,parseInt(this.options.revert,10)||500,function(){n._clear(e)})}else this._clear(e,i);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 i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&n.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!n.length&&e.key&&n.push(e.key+"="),n.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},i.each(function(){n.push(t(e.item||this).attr(e.attribute||"id")||"")}),n},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,n=this.positionAbs.top,s=n+this.helperProportions.height,o=t.left,r=o+t.width,a=t.top,l=a+t.height,h=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||n+h>a&&l>n+h,p="y"===this.options.axis||e+c>o&&r>e+c,d=u&&p;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?d:o0?"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.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){a.push(this)}var n,s,o,r,a=[],l=[],h=this._connectWith();if(h&&e)for(n=h.length-1;n>=0;n--)for(o=t(h[n]),s=o.length-1;s>=0;s--)r=t.data(o[s],this.widgetFullName),r&&r!==this&&!r.options.disabled&&l.push([t.isFunction(r.options.items)?r.options.items.call(r.element):t(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);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]),n=l.length-1;n>=0;n--)l[n][0].each(i);return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;i=0;i--)for(s=t(p[i]),n=s.length-1;n>=0;n--)o=t.data(s[n],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(r=u[i][1],a=u[i][0],n=0,h=a.length;h>n;n++)l=t(a[n]),l.data(this.widgetName+"-item",r),c.push({item:l,instance:r,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,n,s,o;for(i=this.items.length-1;i>=0;i--)n=this.items[i],n.instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(s=this.options.toleranceElement?t(this.options.toleranceElement,n.item):n.item,e||(n.width=s.outerWidth(),n.height=s.outerHeight()),o=s.offset(),n.left=o.left,n.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,n=e.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=e.currentItem[0].nodeName.toLowerCase(),s=t("<"+n+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===n?e.currentItem.children().each(function(){t(" ",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(s)}):"img"===n&&s.attr("src",e.currentItem.attr("src")),i||s.css("visibility","hidden"),s},update:function(t,s){(!i||n.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(n.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),n.placeholder.update(e,e.placeholder)},_contactContainers:function(n){var s,o,r,a,l,h,c,u,p,d,f=null,g=null;for(s=this.containers.length-1;s>=0;s--)if(!t.contains(this.currentItem[0],this.containers[s].element[0]))if(this._intersectsWith(this.containers[s].containerCache)){if(f&&t.contains(this.containers[s].element[0],f.element[0]))continue;f=this.containers[s],g=s}else this.containers[s].containerCache.over&&(this.containers[s]._trigger("out",n,this._uiHash(this)),this.containers[s].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",n,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(r=1e4,a=null,d=f.floating||i(this.currentItem),l=d?"left":"top",h=d?"width":"height",c=this.positionAbs[l]+this.offset.click[l],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!d||e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[l],p=!1,Math.abs(u-c)>Math.abs(u+this.items[o][h]-c)&&(p=!0,u+=this.items[o][h]),Math.abs(u-c)this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),s.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/s.grid[1])*s.grid[1],r=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-s.grid[1]:i+s.grid[1]:i,n=this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0],o=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-s.grid[0]:n+s.grid[0]:n)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-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,i,n){i?i[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(!n)})},_clear:function(t,e){function i(t,e,i){return function(n){i._trigger(t,n,e._uiHash(e))}}this.reverting=!1;var n,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)("auto"===this._storedCSS[n]||"static"===this._storedCSS[n])&&(this._storedCSS[n]="");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)))),n=this.containers.length-1;n>=0;n--)e||s.push(i("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(s.push(i("out",this,this.containers[n])),this.containers[n].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,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),n=0;n'),c=' ';l!==e&&a!==e&&(c+=' '),r&&h.attr("target",r),h.hide().append(c).appendTo("body"),h.submit()},disableFormElements:function(e){e.find(i.disableSelector).each(function(){var e=t(this),i=e.is("button")?"html":"val";e.data("ujs:enable-with",e[i]()),e[i](e.data("disable-with")),e.prop("disabled",!0)})},enableFormElements:function(e){e.find(i.enableSelector).each(function(){var e=t(this),i=e.is("button")?"html":"val";e.data("ujs:enable-with")&&e[i](e.data("ujs:enable-with")),e.prop("disabled",!1)})},allowAction:function(t){var e,n=t.data("confirm"),s=!1;return n?(i.fire(t,"confirm")&&(s=i.confirm(n),e=i.fire(t,"confirm:complete",[s])),s&&e):!0},blankInputs:function(e,i,n){var s,o,r=t(),a=i||"input,textarea",l=e.find(a);return l.each(function(){if(s=t(this),o=s.is("input[type=checkbox],input[type=radio]")?s.is(":checked"):s.val(),!o==!n){if(s.is("input[type=radio]")&&l.filter('input[type=radio]:checked[name="'+s.attr("name")+'"]').length)return!0;r=r.add(s)}}),r.length?r:!1},nonBlankInputs:function(t,e){return i.blankInputs(t,e,!0)},stopEverything:function(e){return t(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(t){t.data("ujs:enable-with",t.html()),t.html(t.data("disable-with")),t.bind("click.railsDisable",function(t){return i.stopEverything(t)})},enableElement:function(t){t.data("ujs:enable-with")!==e&&(t.html(t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.unbind("click.railsDisable")}},i.fire(n,"rails:attachBindings")&&(t.ajaxPrefilter(function(t,e,n){t.crossDomain||i.CSRFProtection(n)}),n.delegate(i.linkDisableSelector,"ajax:complete",function(){i.enableElement(t(this))}),n.delegate(i.linkClickSelector,"click.rails",function(n){var s=t(this),o=s.data("method"),r=s.data("params");if(!i.allowAction(s))return i.stopEverything(n);if(s.is(i.linkDisableSelector)&&i.disableElement(s),s.data("remote")!==e){if(!(!n.metaKey&&!n.ctrlKey||o&&"GET"!==o||r))return!0;var a=i.handleRemote(s);return a===!1?i.enableElement(s):a.error(function(){i.enableElement(s)
+}),!1}return s.data("method")?(i.handleMethod(s),!1):void 0}),n.delegate(i.buttonClickSelector,"click.rails",function(e){var n=t(this);return i.allowAction(n)?(i.handleRemote(n),!1):i.stopEverything(e)}),n.delegate(i.inputChangeSelector,"change.rails",function(e){var n=t(this);return i.allowAction(n)?(i.handleRemote(n),!1):i.stopEverything(e)}),n.delegate(i.formSubmitSelector,"submit.rails",function(n){var s=t(this),o=s.data("remote")!==e,r=i.blankInputs(s,i.requiredInputSelector),a=i.nonBlankInputs(s,i.fileInputSelector);if(!i.allowAction(s))return i.stopEverything(n);if(r&&s.attr("novalidate")==e&&i.fire(s,"ajax:aborted:required",[r]))return i.stopEverything(n);if(o){if(a){setTimeout(function(){i.disableFormElements(s)},13);var l=i.fire(s,"ajax:aborted:file",[a]);return l||setTimeout(function(){i.enableFormElements(s)},13),l}return i.handleRemote(s),!1}setTimeout(function(){i.disableFormElements(s)},13)}),n.delegate(i.formInputClickSelector,"click.rails",function(e){var n=t(this);if(!i.allowAction(n))return i.stopEverything(e);var s=n.attr("name"),o=s?{name:s,value:n.val()}:null;n.closest("form").data("ujs:submit-button",o)}),n.delegate(i.formSubmitSelector,"ajax:beforeSend.rails",function(e){this==e.target&&i.disableFormElements(t(this))}),n.delegate(i.formSubmitSelector,"ajax:complete.rails",function(e){this==e.target&&i.enableFormElements(t(this))}),t(function(){var e=t("meta[name=csrf-token]").attr("content"),i=t("meta[name=csrf-param]").attr("content");t('form input[name="'+i+'"]').val(e)}))}(jQuery),function(){window.ActiveAdmin={},window.AA||(window.AA=window.ActiveAdmin)}.call(this),function(){$(function(){return $(".batch_actions_selector li a").click(function(t){var e,i=this;return t.stopPropagation(),t.preventDefault(),(e=$(this).data("confirm"))?ActiveAdmin.modal_dialog(e,$(this).data("inputs"),function(t){return $(i).trigger("confirm:complete",t)}):$(this).trigger("confirm:complete")}),$(".batch_actions_selector li a").on("confirm:complete",function(t,e){var i;return(i=JSON.stringify(e))?$("#batch_action_inputs").val(i):$("#batch_action_inputs").attr("disabled","disabled"),$("#batch_action").val($(this).data("action")),$("#collection_selection").submit()}),$(".batch_actions_selector").length&&$(":checkbox.toggle_all").length?($(".paginated_collection table.index_table").length?$(".paginated_collection table.index_table").tableCheckboxToggler():$(".paginated_collection").checkboxToggler(),$(document).on("change",".paginated_collection :checkbox",function(){return $(".paginated_collection :checkbox:checked").length?$(".batch_actions_selector").each(function(){return $(this).aaDropdownMenu("enable")}):$(".batch_actions_selector").each(function(){return $(this).aaDropdownMenu("disable")})})):void 0})}.call(this),function(){ActiveAdmin.CheckboxToggler=function(){function t(t,e){var i;this.options=t,this.container=e,i={},this.options=$.extend(i,t),this._init(),this._bind()}return t.prototype._init=function(){if(!this.container)throw new Error("Container element not found");if(this.$container=$(this.container),!this.$container.find(".toggle_all").length)throw new Error('"toggle all" checkbox not found');return this.toggle_all_checkbox=this.$container.find(".toggle_all"),this.checkboxes=this.$container.find(":checkbox").not(this.toggle_all_checkbox)},t.prototype._bind=function(){var t=this;return this.checkboxes.change(function(e){return t._didChangeCheckbox(e.target)}),this.toggle_all_checkbox.change(function(){return t._didChangeToggleAllCheckbox()})},t.prototype._didChangeCheckbox=function(){switch(this.checkboxes.filter(":checked").length){case this.checkboxes.length-1:return this.toggle_all_checkbox.prop({checked:null});case this.checkboxes.length:return this.toggle_all_checkbox.prop({checked:!0})}},t.prototype._didChangeToggleAllCheckbox=function(){var t,e=this;return t=this.toggle_all_checkbox.prop("checked")?!0:null,this.checkboxes.each(function(i,n){return $(n).prop({checked:t}),e._didChangeCheckbox(n)})},t}(),$.widget.bridge("checkboxToggler",ActiveAdmin.CheckboxToggler)}.call(this),function(){ActiveAdmin.DropdownMenu=function(){function t(t,e){var i;this.options=t,this.element=e,this.$element=$(this.element),i={fadeInDuration:20,fadeOutDuration:100,onClickActionItemCallback:null},this.options=$.extend(i,t),this.isOpen=!1,this.$menuButton=this.$element.find(".dropdown_menu_button"),this.$menuList=this.$element.find(".dropdown_menu_list_wrapper"),this._buildMenuList(),this._bind()}return t.prototype.open=function(){return this.isOpen=!0,this.$menuList.fadeIn(this.options.fadeInDuration),this._position(),this},t.prototype.close=function(){return this.isOpen=!1,this.$menuList.fadeOut(this.options.fadeOutDuration),this},t.prototype.destroy=function(){return this.$element.unbind(),this.$element=null,this},t.prototype.isDisabled=function(){return this.$menuButton.hasClass("disabled")},t.prototype.disable=function(){return this.$menuButton.addClass("disabled")},t.prototype.enable=function(){return this.$menuButton.removeClass("disabled")},t.prototype.option=function(t,e){return $.isPlainObject(t)?this.options=$.extend(!0,this.options,t):null!=t?this.options[t]:this.options[t]=e},t.prototype._buildMenuList=function(){return this.$nipple=$(''),this.$menuList.prepend(this.$nipple),this.$menuList.hide()},t.prototype._bind=function(){var t=this;return $("body").click(function(){return t.isOpen?t.close():void 0}),this.$menuButton.click(function(){return t.isDisabled()||(t.isOpen?t.close():t.open()),!1})},t.prototype._position=function(){var t,e,i,n,s,o,r,a;return this.$menuList.css("top",this.$menuButton.position().top+this.$menuButton.outerHeight()+10),e=this.$menuButton.position().left,t=this.$menuButton.outerWidth()/2,i=e+2*t,o=this.$menuList.outerWidth()/2,r=this.$nipple.outerWidth()/2,a=$(window).width(),n=e+t-o,s=e+t+o,0>n?(this.$menuList.css("left",e),this.$nipple.css("left",t-r)):s>a?(this.$menuList.css("right",a-i),this.$nipple.css("right",t-r)):(this.$menuList.css("left",n),this.$nipple.css("left",o-r))},t}(),$.widget.bridge("aaDropdownMenu",ActiveAdmin.DropdownMenu),$(function(){return $(".dropdown_menu").aaDropdownMenu()})}.call(this),function(){var t,e;$(function(){return $(document).on("click","a.button.has_many_remove",function(t){var i,n;return t.preventDefault(),i=$(this).closest(".has_many_container"),n=$(this).closest("fieldset"),e(i),i.trigger("has_many_remove:before",[n]),n.remove()}),$(document).on("click","a.button.has_many_add",function(t){var i,n,s,o,r,a,l;return t.preventDefault(),n=$(this),a=n.closest(".has_many_container"),a.trigger(i=$.Event("has_many_add:before")),i.isDefaultPrevented()?void 0:(r=a.data("has_many_index")||a.children("fieldset").length-1,a.data({has_many_index:++r}),l=new RegExp(n.data("placeholder"),"g"),o=n.data("html").replace(l,r),s=$(o).insertBefore(this),e(a),a.trigger("has_many_add:after",[s]))}),$(document).on("change",'.has_many_container[data-sortable] :input[name$="[_destroy]"]',function(){return e($(this).closest(".has_many"))}),t(),$(document).on("has_many_add:after",".has_many_container",t)}),t=function(){var t;return t=$(".has_many_container[data-sortable]:not(.ui-sortable)"),t.sortable({items:"> fieldset",handle:"> ol > .handle",stop:e}),t.each(e)},e=function(t){var e,i;return t=t instanceof jQuery?t:$(this),e=t.data("sortable"),i=0,t.children("fieldset").each(function(){var t,n,s;return n=$(this),t=n.find("> ol > .input > :input[name$='[_destroy]']"),s=n.find("> ol > .input > :input[name$='["+e+"]']"),s.length?s.val(t.is(":checked")?"":i++):void 0})}}.call(this),function(){ActiveAdmin.modal_dialog=function(t,e,i){var n,s,o,r,a,l,h,c,u,p;s='",$(s).appendTo("body").dialog({modal:!0,buttons:{OK:function(){return i($(this).serializeObject()),$(this).dialog("close")},Cancel:function(){return $(this).dialog("close").remove()}}})}}.call(this),function(){ActiveAdmin.Popover=function(){function t(t,e){var i;this.options=t,this.element=e,this.$element=$(this.element),i={fadeInDuration:20,fadeOutDuration:100,autoOpen:!0,pageWrapperElement:"#wrapper",onClickActionItemCallback:null},this.options=$.extend(i,t),this.isOpen=!1,(this.$popover=$(this.$element.attr("href"))).length||(this.$popover=this.$element.next(".popover")),this._buildPopover(),this._bind()}return t.prototype.open=function(){return this.isOpen=!0,this.$popover.fadeIn(this.options.fadeInDuration),this._positionPopover(),this._positionNipple(),this},t.prototype.close=function(){return this.isOpen=!1,this.$popover.fadeOut(this.options.fadeOutDuration),this},t.prototype.destroy=function(){return this.$element.removeData("popover"),this.$element.unbind(),this.$element=null,this},t.prototype._buildPopover=function(){return this.$nipple=$('
'),this.$popover.prepend(this.$nipple),this.$popover.hide(),this.$popover.addClass("popover")},t.prototype._bind=function(){var t=this;return $(this.options.pageWrapperElement).click(function(){return t.isOpen?t.close():void 0}),this.options.autoOpen?this.$element.click(function(e){return e.stopPropagation(),t.isOpen?t.close():t.open()}):void 0},t.prototype._positionPopover=function(){var t,e;return t=this.$element.offset().left+this.$element.outerWidth()/2,e=this.$popover.outerWidth()/2,this.$popover.css("left",t-e)},t.prototype._positionNipple=function(){return this.$popover.css("top",this.$element.offset().top+this.$element.outerHeight()+10),this.$nipple.css("left",this.$popover.outerWidth()/2-this.$nipple.outerWidth()/2)},t}(),$.widget.bridge("popover",ActiveAdmin.Popover)}.call(this),function(){var t,e={}.hasOwnProperty,i=function(t,i){function n(){this.constructor=t}for(var s in i)e.call(i,s)&&(t[s]=i[s]);return n.prototype=i.prototype,t.prototype=new n,t.__super__=i.prototype,t};ActiveAdmin.TableCheckboxToggler=function(e){function n(){return t=n.__super__.constructor.apply(this,arguments)}return i(n,e),n.prototype._init=function(){return n.__super__._init.apply(this,arguments)},n.prototype._bind=function(){var t=this;return n.__super__._bind.apply(this,arguments),this.$container.find("tbody td").click(function(e){return"checkbox"!==e.target.type?t._didClickCell(e.target):void 0})},n.prototype._didChangeCheckbox=function(t){var e;return n.__super__._didChangeCheckbox.apply(this,arguments),e=$(t).parents("tr"),t.checked?e.addClass("selected"):e.removeClass("selected")},n.prototype._didClickCell=function(t){return $(t).parent("tr").find(":checkbox").click()},n}(ActiveAdmin.CheckboxToggler),$.widget.bridge("tableCheckboxToggler",ActiveAdmin.TableCheckboxToggler)}.call(this),function(){$.ui.dialog.prototype._focusTabbable=function(){return this.uiDialog.focus()}}.call(this),function(){$.fn.serializeObject=function(){var t,e,i,n,s;for(e={},s=this.serializeArray(),i=0,n=s.length;n>i;i++)t=s[i],e[t.name]=t.value;return e}}.call(this),function(){$(function(){var t;return $(document).on("focus",".datepicker:not(.hasDatepicker)",function(){var t,e;return t={dateFormat:"yy-mm-dd"},e=$(this).data("datepicker-options"),$(this).datepicker($.extend(t,e))}),$(".clear_filters_btn").click(function(){return window.location.search=""}),$(".dropdown_button").popover(),$(".filter_form").submit(function(){return $(this).find(":input").filter(function(){return""===this.value}).prop("disabled",!0)}),$(".filter_form_field.select_and_search select").change(function(){return $(this).siblings("input").prop({name:"q["+this.value+"]"})}),(t=$(".table_tools .batch_actions_selector")).length?t.next().css({width:"calc(100% - 10px - "+t.outerWidth()+"px)","float":"right"}):void 0})}.call(this),function(){}.call(this);
\ No newline at end of file
diff --git a/public/assets/active_admin-daf1d88b3b2d591e19aa91972d495192.js.gz b/public/assets/active_admin-daf1d88b3b2d591e19aa91972d495192.js.gz
new file mode 100644
index 0000000..ad4805d
Binary files /dev/null and b/public/assets/active_admin-daf1d88b3b2d591e19aa91972d495192.js.gz differ
diff --git a/public/assets/active_admin-e2737089875438ec064e9877651c73e3.js b/public/assets/active_admin-e2737089875438ec064e9877651c73e3.js
new file mode 100644
index 0000000..d73dd10
--- /dev/null
+++ b/public/assets/active_admin-e2737089875438ec064e9877651c73e3.js
@@ -0,0 +1,8 @@
+!function(t,e){function i(t){var e=t.length,i=ce.type(t);return ce.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===i||"function"!==i&&(0===e||"number"==typeof e&&e>0&&e-1 in t)}function n(t){var e=Ce[t]={};return ce.each(t.match(pe)||[],function(t,i){e[i]=!0}),e}function s(t,i,n,s){if(ce.acceptData(t)){var o,r,a=ce.expando,l=t.nodeType,h=l?ce.cache:t,c=l?t[a]:t[a]&&a;if(c&&h[c]&&(s||h[c].data)||n!==e||"string"!=typeof i)return c||(c=l?t[a]=ee.pop()||ce.guid++:a),h[c]||(h[c]=l?{}:{toJSON:ce.noop}),("object"==typeof i||"function"==typeof i)&&(s?h[c]=ce.extend(h[c],i):h[c].data=ce.extend(h[c].data,i)),r=h[c],s||(r.data||(r.data={}),r=r.data),n!==e&&(r[ce.camelCase(i)]=n),"string"==typeof i?(o=r[i],null==o&&(o=r[ce.camelCase(i)])):o=r,o}}function o(t,e,i){if(ce.acceptData(t)){var n,s,o=t.nodeType,r=o?ce.cache:t,l=o?t[ce.expando]:ce.expando;if(r[l]){if(e&&(n=i?r[l]:r[l].data)){ce.isArray(e)?e=e.concat(ce.map(e,ce.camelCase)):e in n?e=[e]:(e=ce.camelCase(e),e=e in n?[e]:e.split(" ")),s=e.length;for(;s--;)delete n[e[s]];if(i?!a(n):!ce.isEmptyObject(n))return}(i||(delete r[l].data,a(r[l])))&&(o?ce.cleanData([t],!0):ce.support.deleteExpando||r!=r.window?delete r[l]:r[l]=null)}}}function r(t,i,n){if(n===e&&1===t.nodeType){var s="data-"+i.replace(Se,"-$1").toLowerCase();if(n=t.getAttribute(s),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Te.test(n)?ce.parseJSON(n):n}catch(o){}ce.data(t,i,n)}else n=e}return n}function a(t){var e;for(e in t)if(("data"!==e||!ce.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function l(){return!0}function h(){return!1}function c(){try{return Q.activeElement}catch(t){}}function u(t,e){do t=t[e];while(t&&1!==t.nodeType);return t}function p(t,e,i){if(ce.isFunction(e))return ce.grep(t,function(t,n){return!!e.call(t,n,t)!==i});if(e.nodeType)return ce.grep(t,function(t){return t===e!==i});if("string"==typeof e){if(Re.test(e))return ce.filter(e,t,i);e=ce.filter(e,t)}return ce.grep(t,function(t){return ce.inArray(t,e)>=0!==i})}function d(t){var e=Xe.split("|"),i=t.createDocumentFragment();if(i.createElement)for(;e.length;)i.createElement(e.pop());return i}function f(t,e){return ce.nodeName(t,"table")&&ce.nodeName(1===e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function g(t){return t.type=(null!==ce.find.attr(t,"type"))+"/"+t.type,t}function m(t){var e=si.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function v(t,e){for(var i,n=0;null!=(i=t[n]);n++)ce._data(i,"globalEval",!e||ce._data(e[n],"globalEval"))}function y(t,e){if(1===e.nodeType&&ce.hasData(t)){var i,n,s,o=ce._data(t),r=ce._data(e,o),a=o.events;if(a){delete r.handle,r.events={};for(i in a)for(n=0,s=a[i].length;s>n;n++)ce.event.add(e,i,a[i][n])}r.data&&(r.data=ce.extend({},r.data))}}function b(t,e){var i,n,s;if(1===e.nodeType){if(i=e.nodeName.toLowerCase(),!ce.support.noCloneEvent&&e[ce.expando]){s=ce._data(e);for(n in s.events)ce.removeEvent(e,n,s.handle);e.removeAttribute(ce.expando)}"script"===i&&e.text!==t.text?(g(e).text=t.text,m(e)):"object"===i?(e.parentNode&&(e.outerHTML=t.outerHTML),ce.support.html5Clone&&t.innerHTML&&!ce.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===i&&ei.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===i?e.defaultSelected=e.selected=t.defaultSelected:("input"===i||"textarea"===i)&&(e.defaultValue=t.defaultValue)}}function _(t,i){var n,s,o=0,r=typeof t.getElementsByTagName!==U?t.getElementsByTagName(i||"*"):typeof t.querySelectorAll!==U?t.querySelectorAll(i||"*"):e;if(!r)for(r=[],n=t.childNodes||t;null!=(s=n[o]);o++)!i||ce.nodeName(s,i)?r.push(s):ce.merge(r,_(s,i));return i===e||i&&ce.nodeName(t,i)?ce.merge([t],r):r}function w(t){ei.test(t.type)&&(t.defaultChecked=t.checked)}function x(t,e){if(e in t)return e;for(var i=e.charAt(0).toUpperCase()+e.slice(1),n=e,s=Di.length;s--;)if(e=Di[s]+i,e in t)return e;return n}function k(t,e){return t=e||t,"none"===ce.css(t,"display")||!ce.contains(t.ownerDocument,t)}function D(t,e){for(var i,n,s,o=[],r=0,a=t.length;a>r;r++)n=t[r],n.style&&(o[r]=ce._data(n,"olddisplay"),i=n.style.display,e?(o[r]||"none"!==i||(n.style.display=""),""===n.style.display&&k(n)&&(o[r]=ce._data(n,"olddisplay",N(n.nodeName)))):o[r]||(s=k(n),(i&&"none"!==i||!s)&&ce._data(n,"olddisplay",s?i:ce.css(n,"display"))));for(r=0;a>r;r++)n=t[r],n.style&&(e&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=e?o[r]||"":"none"));return t}function C(t,e,i){var n=vi.exec(e);return n?Math.max(0,n[1]-(i||0))+(n[2]||"px"):e}function T(t,e,i,n,s){for(var o=i===(n?"border":"content")?4:"width"===e?1:0,r=0;4>o;o+=2)"margin"===i&&(r+=ce.css(t,i+ki[o],!0,s)),n?("content"===i&&(r-=ce.css(t,"padding"+ki[o],!0,s)),"margin"!==i&&(r-=ce.css(t,"border"+ki[o]+"Width",!0,s))):(r+=ce.css(t,"padding"+ki[o],!0,s),"padding"!==i&&(r+=ce.css(t,"border"+ki[o]+"Width",!0,s)));return r}function S(t,e,i){var n=!0,s="width"===e?t.offsetWidth:t.offsetHeight,o=ci(t),r=ce.support.boxSizing&&"border-box"===ce.css(t,"boxSizing",!1,o);if(0>=s||null==s){if(s=ui(t,e,o),(0>s||null==s)&&(s=t.style[e]),yi.test(s))return s;n=r&&(ce.support.boxSizingReliable||s===t.style[e]),s=parseFloat(s)||0}return s+T(t,e,i||(r?"border":"content"),n,o)+"px"}function N(t){var e=Q,i=_i[t];return i||(i=P(t,e),"none"!==i&&i||(hi=(hi||ce("").css("cssText","display:block !important")).appendTo(e.documentElement),e=(hi[0].contentWindow||hi[0].contentDocument).document,e.write(""),e.close(),i=P(t,e),hi.detach()),_i[t]=i),i}function P(t,e){var i=ce(e.createElement(t)).appendTo(e.body),n=ce.css(i[0],"display");return i.remove(),n}function E(t,e,i,n){var s;if(ce.isArray(e))ce.each(e,function(e,s){i||Ti.test(t)?n(t,s):E(t+"["+("object"==typeof s?e:"")+"]",s,i,n)});else if(i||"object"!==ce.type(e))n(t,e);else for(s in e)E(t+"["+s+"]",e[s],i,n)}function I(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,s=0,o=e.toLowerCase().match(pe)||[];if(ce.isFunction(i))for(;n=o[s++];)"+"===n[0]?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function M(t,e,i,n){function s(a){var l;return o[a]=!0,ce.each(t[a]||[],function(t,a){var h=a(e,i,n);return"string"!=typeof h||r||o[h]?r?!(l=h):void 0:(e.dataTypes.unshift(h),s(h),!1)}),l}var o={},r=t===Bi;return s(e.dataTypes[0])||!o["*"]&&s("*")}function A(t,i){var n,s,o=ce.ajaxSettings.flatOptions||{};for(s in i)i[s]!==e&&((o[s]?t:n||(n={}))[s]=i[s]);return n&&ce.extend(!0,t,n),t}function H(t,i,n){for(var s,o,r,a,l=t.contents,h=t.dataTypes;"*"===h[0];)h.shift(),o===e&&(o=t.mimeType||i.getResponseHeader("Content-Type"));if(o)for(a in l)if(l[a]&&l[a].test(o)){h.unshift(a);break}if(h[0]in n)r=h[0];else{for(a in n){if(!h[0]||t.converters[a+" "+h[0]]){r=a;break}s||(s=a)}r=r||s}return r?(r!==h[0]&&h.unshift(r),n[r]):void 0}function z(t,e,i,n){var s,o,r,a,l,h={},c=t.dataTypes.slice();if(c[1])for(r in t.converters)h[r.toLowerCase()]=t.converters[r];for(o=c.shift();o;)if(t.responseFields[o]&&(i[t.responseFields[o]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(r=h[l+" "+o]||h["* "+o],!r)for(s in h)if(a=s.split(" "),a[1]===o&&(r=h[l+" "+a[0]]||h["* "+a[0]])){r===!0?r=h[s]:h[s]!==!0&&(o=a[0],c.unshift(a[1]));break}if(r!==!0)if(r&&t["throws"])e=r(e);else try{e=r(e)}catch(u){return{state:"parsererror",error:r?u:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}function j(){try{return new t.XMLHttpRequest}catch(e){}}function L(){try{return new t.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function W(){return setTimeout(function(){Gi=e}),Gi=ce.now()}function O(t,e,i){for(var n,s=(on[e]||[]).concat(on["*"]),o=0,r=s.length;r>o;o++)if(n=s[o].call(i,e,t))return n}function F(t,e,i){var n,s,o=0,r=sn.length,a=ce.Deferred().always(function(){delete l.elem}),l=function(){if(s)return!1;for(var e=Gi||W(),i=Math.max(0,h.startTime+h.duration-e),n=i/h.duration||0,o=1-n,r=0,l=h.tweens.length;l>r;r++)h.tweens[r].run(o);return a.notifyWith(t,[h,o,i]),1>o&&l?i:(a.resolveWith(t,[h]),!1)},h=a.promise({elem:t,props:ce.extend({},e),opts:ce.extend(!0,{specialEasing:{}},i),originalProperties:e,originalOptions:i,startTime:Gi||W(),duration:i.duration,tweens:[],createTween:function(e,i){var n=ce.Tween(t,h.opts,e,i,h.opts.specialEasing[e]||h.opts.easing);return h.tweens.push(n),n},stop:function(e){var i=0,n=e?h.tweens.length:0;if(s)return this;for(s=!0;n>i;i++)h.tweens[i].run(1);return e?a.resolveWith(t,[h,e]):a.rejectWith(t,[h,e]),this}}),c=h.props;for($(c,h.opts.specialEasing);r>o;o++)if(n=sn[o].call(h,t,c,h.opts))return n;return ce.map(c,O,h),ce.isFunction(h.opts.start)&&h.opts.start.call(t,h),ce.fx.timer(ce.extend(l,{elem:t,anim:h,queue:h.opts.queue})),h.progress(h.opts.progress).done(h.opts.done,h.opts.complete).fail(h.opts.fail).always(h.opts.always)}function $(t,e){var i,n,s,o,r;for(i in t)if(n=ce.camelCase(i),s=e[n],o=t[i],ce.isArray(o)&&(s=o[1],o=t[i]=o[0]),i!==n&&(t[n]=o,delete t[i]),r=ce.cssHooks[n],r&&"expand"in r){o=r.expand(o),delete t[n];for(i in o)i in t||(t[i]=o[i],e[i]=s)}else e[n]=s}function R(t,e,i){var n,s,o,r,a,l,h=this,c={},u=t.style,p=t.nodeType&&k(t),d=ce._data(t,"fxshow");i.queue||(a=ce._queueHooks(t,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,h.always(function(){h.always(function(){a.unqueued--,ce.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(i.overflow=[u.overflow,u.overflowX,u.overflowY],"inline"===ce.css(t,"display")&&"none"===ce.css(t,"float")&&(ce.support.inlineBlockNeedsLayout&&"inline"!==N(t.nodeName)?u.zoom=1:u.display="inline-block")),i.overflow&&(u.overflow="hidden",ce.support.shrinkWrapBlocks||h.always(function(){u.overflow=i.overflow[0],u.overflowX=i.overflow[1],u.overflowY=i.overflow[2]}));for(n in e)if(s=e[n],tn.exec(s)){if(delete e[n],o=o||"toggle"===s,s===(p?"hide":"show"))continue;c[n]=d&&d[n]||ce.style(t,n)}if(!ce.isEmptyObject(c)){d?"hidden"in d&&(p=d.hidden):d=ce._data(t,"fxshow",{}),o&&(d.hidden=!p),p?ce(t).show():h.done(function(){ce(t).hide()}),h.done(function(){var e;ce._removeData(t,"fxshow");for(e in c)ce.style(t,e,c[e])});for(n in c)r=O(p?d[n]:0,n,h),n in d||(d[n]=r.start,p&&(r.end=r.start,r.start="width"===n||"height"===n?1:0))}}function B(t,e,i,n,s){return new B.prototype.init(t,e,i,n,s)}function Y(t,e){var i,n={height:t},s=0;for(e=e?1:0;4>s;s+=2-e)i=ki[s],n["margin"+i]=n["padding"+i]=t;return e&&(n.opacity=n.width=t),n}function q(t){return ce.isWindow(t)?t:9===t.nodeType?t.defaultView||t.parentWindow:!1}var X,K,U=typeof e,V=t.location,Q=t.document,J=Q.documentElement,G=t.jQuery,Z=t.$,te={},ee=[],ie="1.10.2",ne=ee.concat,se=ee.push,oe=ee.slice,re=ee.indexOf,ae=te.toString,le=te.hasOwnProperty,he=ie.trim,ce=function(t,e){return new ce.fn.init(t,e,K)},ue=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,pe=/\S+/g,de=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,fe=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ge=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,me=/^[\],:{}\s]*$/,ve=/(?:^|:|,)(?:\s*\[)+/g,ye=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,be=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,_e=/^-ms-/,we=/-([\da-z])/gi,xe=function(t,e){return e.toUpperCase()},ke=function(t){(Q.addEventListener||"load"===t.type||"complete"===Q.readyState)&&(De(),ce.ready())},De=function(){Q.addEventListener?(Q.removeEventListener("DOMContentLoaded",ke,!1),t.removeEventListener("load",ke,!1)):(Q.detachEvent("onreadystatechange",ke),t.detachEvent("onload",ke))};ce.fn=ce.prototype={jquery:ie,constructor:ce,init:function(t,i,n){var s,o;if(!t)return this;if("string"==typeof t){if(s="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:fe.exec(t),!s||!s[1]&&i)return!i||i.jquery?(i||n).find(t):this.constructor(i).find(t);if(s[1]){if(i=i instanceof ce?i[0]:i,ce.merge(this,ce.parseHTML(s[1],i&&i.nodeType?i.ownerDocument||i:Q,!0)),ge.test(s[1])&&ce.isPlainObject(i))for(s in i)ce.isFunction(this[s])?this[s](i[s]):this.attr(s,i[s]);return this}if(o=Q.getElementById(s[2]),o&&o.parentNode){if(o.id!==s[2])return n.find(t);this.length=1,this[0]=o}return this.context=Q,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):ce.isFunction(t)?n.ready(t):(t.selector!==e&&(this.selector=t.selector,this.context=t.context),ce.makeArray(t,this))},selector:"",length:0,toArray:function(){return oe.call(this)},get:function(t){return null==t?this.toArray():0>t?this[this.length+t]:this[t]},pushStack:function(t){var e=ce.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return ce.each(this,t,e)},ready:function(t){return ce.ready.promise().done(t),this},slice:function(){return this.pushStack(oe.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(0>t?e:0);return this.pushStack(i>=0&&e>i?[this[i]]:[])},map:function(t){return this.pushStack(ce.map(this,function(e,i){return t.call(e,i,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:se,sort:[].sort,splice:[].splice},ce.fn.init.prototype=ce.fn,ce.extend=ce.fn.extend=function(){var t,i,n,s,o,r,a=arguments[0]||{},l=1,h=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[1]||{},l=2),"object"==typeof a||ce.isFunction(a)||(a={}),h===l&&(a=this,--l);h>l;l++)if(null!=(o=arguments[l]))for(s in o)t=a[s],n=o[s],a!==n&&(c&&n&&(ce.isPlainObject(n)||(i=ce.isArray(n)))?(i?(i=!1,r=t&&ce.isArray(t)?t:[]):r=t&&ce.isPlainObject(t)?t:{},a[s]=ce.extend(c,r,n)):n!==e&&(a[s]=n));return a},ce.extend({expando:"jQuery"+(ie+Math.random()).replace(/\D/g,""),noConflict:function(e){return t.$===ce&&(t.$=Z),e&&t.jQuery===ce&&(t.jQuery=G),ce},isReady:!1,readyWait:1,holdReady:function(t){t?ce.readyWait++:ce.ready(!0)},ready:function(t){if(t===!0?!--ce.readyWait:!ce.isReady){if(!Q.body)return setTimeout(ce.ready);ce.isReady=!0,t!==!0&&--ce.readyWait>0||(X.resolveWith(Q,[ce]),ce.fn.trigger&&ce(Q).trigger("ready").off("ready"))}},isFunction:function(t){return"function"===ce.type(t)},isArray:Array.isArray||function(t){return"array"===ce.type(t)},isWindow:function(t){return null!=t&&t==t.window},isNumeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},type:function(t){return null==t?String(t):"object"==typeof t||"function"==typeof t?te[ae.call(t)]||"object":typeof t},isPlainObject:function(t){var i;if(!t||"object"!==ce.type(t)||t.nodeType||ce.isWindow(t))return!1;try{if(t.constructor&&!le.call(t,"constructor")&&!le.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(ce.support.ownLast)for(i in t)return le.call(t,i);for(i in t);return i===e||le.call(t,i)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},error:function(t){throw new Error(t)},parseHTML:function(t,e,i){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(i=e,e=!1),e=e||Q;var n=ge.exec(t),s=!i&&[];return n?[e.createElement(n[1])]:(n=ce.buildFragment([t],e,s),s&&ce(s).remove(),ce.merge([],n.childNodes))},parseJSON:function(e){return t.JSON&&t.JSON.parse?t.JSON.parse(e):null===e?e:"string"==typeof e&&(e=ce.trim(e),e&&me.test(e.replace(ye,"@").replace(be,"]").replace(ve,"")))?new Function("return "+e)():(ce.error("Invalid JSON: "+e),void 0)},parseXML:function(i){var n,s;if(!i||"string"!=typeof i)return null;try{t.DOMParser?(s=new DOMParser,n=s.parseFromString(i,"text/xml")):(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(i))}catch(o){n=e}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||ce.error("Invalid XML: "+i),n},noop:function(){},globalEval:function(e){e&&ce.trim(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(t){return t.replace(_e,"ms-").replace(we,xe)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,n){var s,o=0,r=t.length,a=i(t);if(n){if(a)for(;r>o&&(s=e.apply(t[o],n),s!==!1);o++);else for(o in t)if(s=e.apply(t[o],n),s===!1)break}else if(a)for(;r>o&&(s=e.call(t[o],o,t[o]),s!==!1);o++);else for(o in t)if(s=e.call(t[o],o,t[o]),s===!1)break;return t},trim:he&&!he.call(" ")?function(t){return null==t?"":he.call(t)}:function(t){return null==t?"":(t+"").replace(de,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(i(Object(t))?ce.merge(n,"string"==typeof t?[t]:t):se.call(n,t)),n},inArray:function(t,e,i){var n;if(e){if(re)return re.call(e,t,i);for(n=e.length,i=i?0>i?Math.max(0,n+i):i:0;n>i;i++)if(i in e&&e[i]===t)return i}return-1},merge:function(t,i){var n=i.length,s=t.length,o=0;if("number"==typeof n)for(;n>o;o++)t[s++]=i[o];else for(;i[o]!==e;)t[s++]=i[o++];return t.length=s,t},grep:function(t,e,i){var n,s=[],o=0,r=t.length;for(i=!!i;r>o;o++)n=!!e(t[o],o),i!==n&&s.push(t[o]);return s},map:function(t,e,n){var s,o=0,r=t.length,a=i(t),l=[];if(a)for(;r>o;o++)s=e(t[o],o,n),null!=s&&(l[l.length]=s);else for(o in t)s=e(t[o],o,n),null!=s&&(l[l.length]=s);return ne.apply([],l)},guid:1,proxy:function(t,i){var n,s,o;return"string"==typeof i&&(o=t[i],i=t,t=o),ce.isFunction(t)?(n=oe.call(arguments,2),s=function(){return t.apply(i||this,n.concat(oe.call(arguments)))},s.guid=t.guid=t.guid||ce.guid++,s):e},access:function(t,i,n,s,o,r,a){var l=0,h=t.length,c=null==n;if("object"===ce.type(n)){o=!0;for(l in n)ce.access(t,i,l,n[l],!0,r,a)}else if(s!==e&&(o=!0,ce.isFunction(s)||(a=!0),c&&(a?(i.call(t,s),i=null):(c=i,i=function(t,e,i){return c.call(ce(t),i)})),i))for(;h>l;l++)i(t[l],n,a?s:s.call(t[l],l,i(t[l],n)));return o?t:c?i.call(t):h?i(t[0],n):r},now:function(){return(new Date).getTime()},swap:function(t,e,i,n){var s,o,r={};for(o in e)r[o]=t.style[o],t.style[o]=e[o];s=i.apply(t,n||[]);for(o in e)t.style[o]=r[o];return s}}),ce.ready.promise=function(e){if(!X)if(X=ce.Deferred(),"complete"===Q.readyState)setTimeout(ce.ready);else if(Q.addEventListener)Q.addEventListener("DOMContentLoaded",ke,!1),t.addEventListener("load",ke,!1);else{Q.attachEvent("onreadystatechange",ke),t.attachEvent("onload",ke);var i=!1;try{i=null==t.frameElement&&Q.documentElement}catch(n){}i&&i.doScroll&&!function s(){if(!ce.isReady){try{i.doScroll("left")}catch(t){return setTimeout(s,50)}De(),ce.ready()}}()}return X.promise(e)},ce.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){te["[object "+e+"]"]=e.toLowerCase()}),K=ce(Q),function(t,e){function i(t,e,i,n){var s,o,r,a,l,h,c,u,f,g;if((e?e.ownerDocument||e:F)!==M&&I(e),e=e||M,i=i||[],!t||"string"!=typeof t)return i;if(1!==(a=e.nodeType)&&9!==a)return[];if(H&&!n){if(s=be.exec(t))if(r=s[1]){if(9===a){if(o=e.getElementById(r),!o||!o.parentNode)return i;if(o.id===r)return i.push(o),i}else if(e.ownerDocument&&(o=e.ownerDocument.getElementById(r))&&W(e,o)&&o.id===r)return i.push(o),i}else{if(s[2])return te.apply(i,e.getElementsByTagName(t)),i;if((r=s[3])&&k.getElementsByClassName&&e.getElementsByClassName)return te.apply(i,e.getElementsByClassName(r)),i}if(k.qsa&&(!z||!z.test(t))){if(u=c=O,f=e,g=9===a&&t,1===a&&"object"!==e.nodeName.toLowerCase()){for(h=p(t),(c=e.getAttribute("id"))?u=c.replace(xe,"\\$&"):e.setAttribute("id",u),u="[id='"+u+"'] ",l=h.length;l--;)h[l]=u+d(h[l]);f=de.test(t)&&e.parentNode||e,g=h.join(",")}if(g)try{return te.apply(i,f.querySelectorAll(g)),i}catch(m){}finally{c||e.removeAttribute("id")}}}return w(t.replace(he,"$1"),e,i,n)}function n(){function t(i,n){return e.push(i+=" ")>C.cacheLength&&delete t[e.shift()],t[i]=n}var e=[];return t}function s(t){return t[O]=!0,t}function o(t){var e=M.createElement("div");try{return!!t(e)}catch(i){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function r(t,e){for(var i=t.split("|"),n=t.length;n--;)C.attrHandle[i[n]]=e}function a(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||V)-(~t.sourceIndex||V);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function l(t){return function(e){var i=e.nodeName.toLowerCase();return"input"===i&&e.type===t}}function h(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function c(t){return s(function(e){return e=+e,s(function(i,n){for(var s,o=t([],i.length,e),r=o.length;r--;)i[s=o[r]]&&(i[s]=!(n[s]=i[s]))})})}function u(){}function p(t,e){var n,s,o,r,a,l,h,c=Y[t+" "];if(c)return e?0:c.slice(0);for(a=t,l=[],h=C.preFilter;a;){(!n||(s=ue.exec(a)))&&(s&&(a=a.slice(s[0].length)||a),l.push(o=[])),n=!1,(s=pe.exec(a))&&(n=s.shift(),o.push({value:n,type:s[0].replace(he," ")}),a=a.slice(n.length));for(r in C.filter)!(s=ve[r].exec(a))||h[r]&&!(s=h[r](s))||(n=s.shift(),o.push({value:n,type:r,matches:s}),a=a.slice(n.length));if(!n)break}return e?a.length:a?i.error(t):Y(t,l).slice(0)}function d(t){for(var e=0,i=t.length,n="";i>e;e++)n+=t[e].value;return n}function f(t,e,i){var n=e.dir,s=i&&"parentNode"===n,o=R++;return e.first?function(e,i,o){for(;e=e[n];)if(1===e.nodeType||s)return t(e,i,o)}:function(e,i,r){var a,l,h,c=$+" "+o;if(r){for(;e=e[n];)if((1===e.nodeType||s)&&t(e,i,r))return!0}else for(;e=e[n];)if(1===e.nodeType||s)if(h=e[O]||(e[O]={}),(l=h[n])&&l[0]===c){if((a=l[1])===!0||a===D)return a===!0}else if(l=h[n]=[c],l[1]=t(e,i,r)||D,l[1]===!0)return!0}}function g(t){return t.length>1?function(e,i,n){for(var s=t.length;s--;)if(!t[s](e,i,n))return!1;return!0}:t[0]}function m(t,e,i,n,s){for(var o,r=[],a=0,l=t.length,h=null!=e;l>a;a++)(o=t[a])&&(!i||i(o,n,s))&&(r.push(o),h&&e.push(a));return r}function v(t,e,i,n,o,r){return n&&!n[O]&&(n=v(n)),o&&!o[O]&&(o=v(o,r)),s(function(s,r,a,l){var h,c,u,p=[],d=[],f=r.length,g=s||_(e||"*",a.nodeType?[a]:a,[]),v=!t||!s&&e?g:m(g,p,t,a,l),y=i?o||(s?t:f||n)?[]:r:v;if(i&&i(v,y,a,l),n)for(h=m(y,d),n(h,[],a,l),c=h.length;c--;)(u=h[c])&&(y[d[c]]=!(v[d[c]]=u));if(s){if(o||t){if(o){for(h=[],c=y.length;c--;)(u=y[c])&&h.push(v[c]=u);o(null,y=[],h,l)}for(c=y.length;c--;)(u=y[c])&&(h=o?ie.call(s,u):p[c])>-1&&(s[h]=!(r[h]=u))}}else y=m(y===r?y.splice(f,y.length):y),o?o(null,r,y,l):te.apply(r,y)})}function y(t){for(var e,i,n,s=t.length,o=C.relative[t[0].type],r=o||C.relative[" "],a=o?1:0,l=f(function(t){return t===e},r,!0),h=f(function(t){return ie.call(e,t)>-1},r,!0),c=[function(t,i,n){return!o&&(n||i!==P)||((e=i).nodeType?l(t,i,n):h(t,i,n))}];s>a;a++)if(i=C.relative[t[a].type])c=[f(g(c),i)];else{if(i=C.filter[t[a].type].apply(null,t[a].matches),i[O]){for(n=++a;s>n&&!C.relative[t[n].type];n++);return v(a>1&&g(c),a>1&&d(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(he,"$1"),i,n>a&&y(t.slice(a,n)),s>n&&y(t=t.slice(n)),s>n&&d(t))}c.push(i)}return g(c)}function b(t,e){var n=0,o=e.length>0,r=t.length>0,a=function(s,a,l,h,c){var u,p,d,f=[],g=0,v="0",y=s&&[],b=null!=c,_=P,w=s||r&&C.find.TAG("*",c&&a.parentNode||a),x=$+=null==_?1:Math.random()||.1;for(b&&(P=a!==M&&a,D=n);null!=(u=w[v]);v++){if(r&&u){for(p=0;d=t[p++];)if(d(u,a,l)){h.push(u);break}b&&($=x,D=++n)}o&&((u=!d&&u)&&g--,s&&y.push(u))}if(g+=v,o&&v!==g){for(p=0;d=e[p++];)d(y,f,a,l);if(s){if(g>0)for(;v--;)y[v]||f[v]||(f[v]=G.call(h));f=m(f)}te.apply(h,f),b&&!s&&f.length>0&&g+e.length>1&&i.uniqueSort(h)}return b&&($=x,P=_),y};return o?s(a):a}function _(t,e,n){for(var s=0,o=e.length;o>s;s++)i(t,e[s],n);return n}function w(t,e,i,n){var s,o,r,a,l,h=p(t);if(!n&&1===h.length){if(o=h[0]=h[0].slice(0),o.length>2&&"ID"===(r=o[0]).type&&k.getById&&9===e.nodeType&&H&&C.relative[o[1].type]){if(e=(C.find.ID(r.matches[0].replace(ke,De),e)||[])[0],!e)return i;t=t.slice(o.shift().value.length)}for(s=ve.needsContext.test(t)?0:o.length;s--&&(r=o[s],!C.relative[a=r.type]);)if((l=C.find[a])&&(n=l(r.matches[0].replace(ke,De),de.test(o[0].type)&&e.parentNode||e))){if(o.splice(s,1),t=n.length&&d(o),!t)return te.apply(i,n),i;break}}return N(t,h)(n,e,!H,i,de.test(t)),i}var x,k,D,C,T,S,N,P,E,I,M,A,H,z,j,L,W,O="sizzle"+-new Date,F=t.document,$=0,R=0,B=n(),Y=n(),q=n(),X=!1,K=function(t,e){return t===e?(X=!0,0):0},U=typeof e,V=1<<31,Q={}.hasOwnProperty,J=[],G=J.pop,Z=J.push,te=J.push,ee=J.slice,ie=J.indexOf||function(t){for(var e=0,i=this.length;i>e;e++)if(this[e]===t)return e;return-1},ne="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",se="[\\x20\\t\\r\\n\\f]",oe="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",re=oe.replace("w","w#"),ae="\\["+se+"*("+oe+")"+se+"*(?:([*^$|!~]?=)"+se+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+re+")|)|)"+se+"*\\]",le=":("+oe+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+ae.replace(3,8)+")*)|.*)\\)|)",he=new RegExp("^"+se+"+|((?:^|[^\\\\])(?:\\\\.)*)"+se+"+$","g"),ue=new RegExp("^"+se+"*,"+se+"*"),pe=new RegExp("^"+se+"*([>+~]|"+se+")"+se+"*"),de=new RegExp(se+"*[+~]"),fe=new RegExp("="+se+"*([^\\]'\"]*)"+se+"*\\]","g"),ge=new RegExp(le),me=new RegExp("^"+re+"$"),ve={ID:new RegExp("^#("+oe+")"),CLASS:new RegExp("^\\.("+oe+")"),TAG:new RegExp("^("+oe.replace("w","w*")+")"),ATTR:new RegExp("^"+ae),PSEUDO:new RegExp("^"+le),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+se+"*(even|odd|(([+-]|)(\\d*)n|)"+se+"*(?:([+-]|)"+se+"*(\\d+)|))"+se+"*\\)|)","i"),bool:new RegExp("^(?:"+ne+")$","i"),needsContext:new RegExp("^"+se+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+se+"*((?:-\\d)?\\d*)"+se+"*\\)|)(?=[^-]|$)","i")},ye=/^[^{]+\{\s*\[native \w/,be=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_e=/^(?:input|select|textarea|button)$/i,we=/^h\d$/i,xe=/'|\\/g,ke=new RegExp("\\\\([\\da-f]{1,6}"+se+"?|("+se+")|.)","ig"),De=function(t,e,i){var n="0x"+e-65536;return n!==n||i?e:0>n?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)};try{te.apply(J=ee.call(F.childNodes),F.childNodes),J[F.childNodes.length].nodeType}catch(Ce){te={apply:J.length?function(t,e){Z.apply(t,ee.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}S=i.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return e?"HTML"!==e.nodeName:!1},k=i.support={},I=i.setDocument=function(t){var e=t?t.ownerDocument||t:F,i=e.defaultView;return e!==M&&9===e.nodeType&&e.documentElement?(M=e,A=e.documentElement,H=!S(e),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){I()}),k.attributes=o(function(t){return t.className="i",!t.getAttribute("className")}),k.getElementsByTagName=o(function(t){return t.appendChild(e.createComment("")),!t.getElementsByTagName("*").length}),k.getElementsByClassName=o(function(t){return t.innerHTML="
",t.firstChild.className="i",2===t.getElementsByClassName("i").length}),k.getById=o(function(t){return A.appendChild(t).id=O,!e.getElementsByName||!e.getElementsByName(O).length}),k.getById?(C.find.ID=function(t,e){if(typeof e.getElementById!==U&&H){var i=e.getElementById(t);return i&&i.parentNode?[i]:[]}},C.filter.ID=function(t){var e=t.replace(ke,De);return function(t){return t.getAttribute("id")===e}}):(delete C.find.ID,C.filter.ID=function(t){var e=t.replace(ke,De);return function(t){var i=typeof t.getAttributeNode!==U&&t.getAttributeNode("id");return i&&i.value===e}}),C.find.TAG=k.getElementsByTagName?function(t,e){return typeof e.getElementsByTagName!==U?e.getElementsByTagName(t):void 0}:function(t,e){var i,n=[],s=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[s++];)1===i.nodeType&&n.push(i);return n}return o},C.find.CLASS=k.getElementsByClassName&&function(t,e){return typeof e.getElementsByClassName!==U&&H?e.getElementsByClassName(t):void 0},j=[],z=[],(k.qsa=ye.test(e.querySelectorAll))&&(o(function(t){t.innerHTML=" ",t.querySelectorAll("[selected]").length||z.push("\\["+se+"*(?:value|"+ne+")"),t.querySelectorAll(":checked").length||z.push(":checked")}),o(function(t){var i=e.createElement("input");i.setAttribute("type","hidden"),t.appendChild(i).setAttribute("t",""),t.querySelectorAll("[t^='']").length&&z.push("[*^$]="+se+"*(?:''|\"\")"),t.querySelectorAll(":enabled").length||z.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),z.push(",.*:")})),(k.matchesSelector=ye.test(L=A.webkitMatchesSelector||A.mozMatchesSelector||A.oMatchesSelector||A.msMatchesSelector))&&o(function(t){k.disconnectedMatch=L.call(t,"div"),L.call(t,"[s!='']:x"),j.push("!=",le)}),z=z.length&&new RegExp(z.join("|")),j=j.length&&new RegExp(j.join("|")),W=ye.test(A.contains)||A.compareDocumentPosition?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},K=A.compareDocumentPosition?function(t,i){if(t===i)return X=!0,0;var n=i.compareDocumentPosition&&t.compareDocumentPosition&&t.compareDocumentPosition(i);return n?1&n||!k.sortDetached&&i.compareDocumentPosition(t)===n?t===e||W(F,t)?-1:i===e||W(F,i)?1:E?ie.call(E,t)-ie.call(E,i):0:4&n?-1:1:t.compareDocumentPosition?-1:1}:function(t,i){var n,s=0,o=t.parentNode,r=i.parentNode,l=[t],h=[i];if(t===i)return X=!0,0;if(!o||!r)return t===e?-1:i===e?1:o?-1:r?1:E?ie.call(E,t)-ie.call(E,i):0;if(o===r)return a(t,i);for(n=t;n=n.parentNode;)l.unshift(n);for(n=i;n=n.parentNode;)h.unshift(n);for(;l[s]===h[s];)s++;return s?a(l[s],h[s]):l[s]===F?-1:h[s]===F?1:0},e):M},i.matches=function(t,e){return i(t,null,null,e)},i.matchesSelector=function(t,e){if((t.ownerDocument||t)!==M&&I(t),e=e.replace(fe,"='$1']"),!(!k.matchesSelector||!H||j&&j.test(e)||z&&z.test(e)))try{var n=L.call(t,e);if(n||k.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(s){}return i(e,M,null,[t]).length>0},i.contains=function(t,e){return(t.ownerDocument||t)!==M&&I(t),W(t,e)},i.attr=function(t,i){(t.ownerDocument||t)!==M&&I(t);var n=C.attrHandle[i.toLowerCase()],s=n&&Q.call(C.attrHandle,i.toLowerCase())?n(t,i,!H):e;return s===e?k.attributes||!H?t.getAttribute(i):(s=t.getAttributeNode(i))&&s.specified?s.value:null:s},i.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},i.uniqueSort=function(t){var e,i=[],n=0,s=0;if(X=!k.detectDuplicates,E=!k.sortStable&&t.slice(0),t.sort(K),X){for(;e=t[s++];)e===t[s]&&(n=i.push(s));for(;n--;)t.splice(i[n],1)}return t},T=i.getText=function(t){var e,i="",n=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)i+=T(t)}else if(3===s||4===s)return t.nodeValue}else for(;e=t[n];n++)i+=T(e);return i},C=i.selectors={cacheLength:50,createPseudo:s,match:ve,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(ke,De),t[3]=(t[4]||t[5]||"").replace(ke,De),"~="===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]||i.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]&&i.error(t[0]),t},PSEUDO:function(t){var i,n=!t[5]&&t[2];return ve.CHILD.test(t[0])?null:(t[3]&&t[4]!==e?t[2]=t[4]:n&&ge.test(n)&&(i=p(n,!0))&&(i=n.indexOf(")",n.length-i)-n.length)&&(t[0]=t[0].slice(0,i),t[2]=n.slice(0,i)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(ke,De).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("(^|"+se+")"+t+"("+se+"|$)"))&&B(t,function(t){return e.test("string"==typeof t.className&&t.className||typeof t.getAttribute!==U&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(s){var o=i.attr(s,t);return null==o?"!="===e:e?(o+="","="===e?o===n:"!="===e?o!==n:"^="===e?n&&0===o.indexOf(n):"*="===e?n&&o.indexOf(n)>-1:"$="===e?n&&o.slice(-n.length)===n:"~="===e?(" "+o+" ").indexOf(n)>-1:"|="===e?o===n||o.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(t,e,i,n,s){var o="nth"!==t.slice(0,3),r="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===s?function(t){return!!t.parentNode}:function(e,i,l){var h,c,u,p,d,f,g=o!==r?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a;if(m){if(o){for(;g;){for(u=e;u=u[g];)if(a?u.nodeName.toLowerCase()===v:1===u.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[r?m.firstChild:m.lastChild],r&&y){for(c=m[O]||(m[O]={}),h=c[t]||[],d=h[0]===$&&h[1],p=h[0]===$&&h[2],u=d&&m.childNodes[d];u=++d&&u&&u[g]||(p=d=0)||f.pop();)if(1===u.nodeType&&++p&&u===e){c[t]=[$,d,p];break}}else if(y&&(h=(e[O]||(e[O]={}))[t])&&h[0]===$)p=h[1];else for(;(u=++d&&u&&u[g]||(p=d=0)||f.pop())&&((a?u.nodeName.toLowerCase()!==v:1!==u.nodeType)||!++p||(y&&((u[O]||(u[O]={}))[t]=[$,p]),u!==e)););return p-=s,p===n||p%n===0&&p/n>=0
+}}},PSEUDO:function(t,e){var n,o=C.pseudos[t]||C.setFilters[t.toLowerCase()]||i.error("unsupported pseudo: "+t);return o[O]?o(e):o.length>1?(n=[t,t,"",e],C.setFilters.hasOwnProperty(t.toLowerCase())?s(function(t,i){for(var n,s=o(t,e),r=s.length;r--;)n=ie.call(t,s[r]),t[n]=!(i[n]=s[r])}):function(t){return o(t,0,n)}):o}},pseudos:{not:s(function(t){var e=[],i=[],n=N(t.replace(he,"$1"));return n[O]?s(function(t,e,i,s){for(var o,r=n(t,null,s,[]),a=t.length;a--;)(o=r[a])&&(t[a]=!(e[a]=o))}):function(t,s,o){return e[0]=t,n(e,null,o,i),!i.pop()}}),has:s(function(t){return function(e){return i(t,e).length>0}}),contains:s(function(t){return function(e){return(e.textContent||e.innerText||T(e)).indexOf(t)>-1}}),lang:s(function(t){return me.test(t||"")||i.error("unsupported lang: "+t),t=t.replace(ke,De).toLowerCase(),function(e){var i;do if(i=H?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return i=i.toLowerCase(),i===t||0===i.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===A},focus:function(t){return t===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},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,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeName>"@"||3===t.nodeType||4===t.nodeType)return!1;return!0},parent:function(t){return!C.pseudos.empty(t)},header:function(t){return we.test(t.nodeName)},input:function(t){return _e.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"))||e.toLowerCase()===t.type)},first:c(function(){return[0]}),last:c(function(t,e){return[e-1]}),eq:c(function(t,e,i){return[0>i?i+e:i]}),even:c(function(t,e){for(var i=0;e>i;i+=2)t.push(i);return t}),odd:c(function(t,e){for(var i=1;e>i;i+=2)t.push(i);return t}),lt:c(function(t,e,i){for(var n=0>i?i+e:i;--n>=0;)t.push(n);return t}),gt:c(function(t,e,i){for(var n=0>i?i+e:i;++na;a++)if(h[a].apply(e[0],e[1])===!1&&t.stopOnFalse){s=!1;break}i=!1,h&&(c?c.length&&u(c.shift()):s?h=[]:p.disable())},p={add:function(){if(h){var e=h.length;!function n(e){ce.each(e,function(e,i){var s=ce.type(i);"function"===s?t.unique&&p.has(i)||h.push(i):i&&i.length&&"string"!==s&&n(i)})}(arguments),i?r=h.length:s&&(l=e,u(s))}return this},remove:function(){return h&&ce.each(arguments,function(t,e){for(var n;(n=ce.inArray(e,h,n))>-1;)h.splice(n,1),i&&(r>=n&&r--,a>=n&&a--)}),this},has:function(t){return t?ce.inArray(t,h)>-1:!(!h||!h.length)},empty:function(){return h=[],r=0,this},disable:function(){return h=c=s=e,this},disabled:function(){return!h},lock:function(){return c=e,s||p.disable(),this},locked:function(){return!c},fireWith:function(t,e){return!h||o&&!c||(e=e||[],e=[t,e.slice?e.slice():e],i?c.push(e):u(e)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!o}};return p},ce.extend({Deferred:function(t){var e=[["resolve","done",ce.Callbacks("once memory"),"resolved"],["reject","fail",ce.Callbacks("once memory"),"rejected"],["notify","progress",ce.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var t=arguments;return ce.Deferred(function(i){ce.each(e,function(e,o){var r=o[0],a=ce.isFunction(t[e])&&t[e];s[o[1]](function(){var t=a&&a.apply(this,arguments);t&&ce.isFunction(t.promise)?t.promise().done(i.resolve).fail(i.reject).progress(i.notify):i[r+"With"](this===n?i.promise():this,a?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?ce.extend(t,n):n}},s={};return n.pipe=n.then,ce.each(e,function(t,o){var r=o[2],a=o[3];n[o[1]]=r.add,a&&r.add(function(){i=a},e[1^t][2].disable,e[2][2].lock),s[o[0]]=function(){return s[o[0]+"With"](this===s?n:this,arguments),this},s[o[0]+"With"]=r.fireWith}),n.promise(s),t&&t.call(s,s),s},when:function(t){var e,i,n,s=0,o=oe.call(arguments),r=o.length,a=1!==r||t&&ce.isFunction(t.promise)?r:0,l=1===a?t:ce.Deferred(),h=function(t,i,n){return function(s){i[t]=this,n[t]=arguments.length>1?oe.call(arguments):s,n===e?l.notifyWith(i,n):--a||l.resolveWith(i,n)}};if(r>1)for(e=new Array(r),i=new Array(r),n=new Array(r);r>s;s++)o[s]&&ce.isFunction(o[s].promise)?o[s].promise().done(h(s,n,o)).fail(l.reject).progress(h(s,i,e)):--a;return a||l.resolveWith(n,o),l.promise()}}),ce.support=function(e){var i,n,s,o,r,a,l,h,c,u=Q.createElement("div");if(u.setAttribute("className","t"),u.innerHTML=" a ",i=u.getElementsByTagName("*")||[],n=u.getElementsByTagName("a")[0],!n||!n.style||!i.length)return e;o=Q.createElement("select"),a=o.appendChild(Q.createElement("option")),s=u.getElementsByTagName("input")[0],n.style.cssText="top:1px;float:left;opacity:.5",e.getSetAttribute="t"!==u.className,e.leadingWhitespace=3===u.firstChild.nodeType,e.tbody=!u.getElementsByTagName("tbody").length,e.htmlSerialize=!!u.getElementsByTagName("link").length,e.style=/top/.test(n.getAttribute("style")),e.hrefNormalized="/a"===n.getAttribute("href"),e.opacity=/^0.5/.test(n.style.opacity),e.cssFloat=!!n.style.cssFloat,e.checkOn=!!s.value,e.optSelected=a.selected,e.enctype=!!Q.createElement("form").enctype,e.html5Clone="<:nav>"!==Q.createElement("nav").cloneNode(!0).outerHTML,e.inlineBlockNeedsLayout=!1,e.shrinkWrapBlocks=!1,e.pixelPosition=!1,e.deleteExpando=!0,e.noCloneEvent=!0,e.reliableMarginRight=!0,e.boxSizingReliable=!0,s.checked=!0,e.noCloneChecked=s.cloneNode(!0).checked,o.disabled=!0,e.optDisabled=!a.disabled;try{delete u.test}catch(p){e.deleteExpando=!1}s=Q.createElement("input"),s.setAttribute("value",""),e.input=""===s.getAttribute("value"),s.value="t",s.setAttribute("type","radio"),e.radioValue="t"===s.value,s.setAttribute("checked","t"),s.setAttribute("name","t"),r=Q.createDocumentFragment(),r.appendChild(s),e.appendChecked=s.checked,e.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,u.attachEvent&&(u.attachEvent("onclick",function(){e.noCloneEvent=!1}),u.cloneNode(!0).click());for(c in{submit:!0,change:!0,focusin:!0})u.setAttribute(l="on"+c,"t"),e[c+"Bubbles"]=l in t||u.attributes[l].expando===!1;u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",e.clearCloneStyle="content-box"===u.style.backgroundClip;for(c in ce(e))break;return e.ownLast="0"!==c,ce(function(){var i,n,s,o="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",r=Q.getElementsByTagName("body")[0];r&&(i=Q.createElement("div"),i.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",r.appendChild(i).appendChild(u),u.innerHTML="",s=u.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",h=0===s[0].offsetHeight,s[0].style.display="",s[1].style.display="none",e.reliableHiddenOffsets=h&&0===s[0].offsetHeight,u.innerHTML="",u.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",ce.swap(r,null!=r.style.zoom?{zoom:1}:{},function(){e.boxSizing=4===u.offsetWidth}),t.getComputedStyle&&(e.pixelPosition="1%"!==(t.getComputedStyle(u,null)||{}).top,e.boxSizingReliable="4px"===(t.getComputedStyle(u,null)||{width:"4px"}).width,n=u.appendChild(Q.createElement("div")),n.style.cssText=u.style.cssText=o,n.style.marginRight=n.style.width="0",u.style.width="1px",e.reliableMarginRight=!parseFloat((t.getComputedStyle(n,null)||{}).marginRight)),typeof u.style.zoom!==U&&(u.innerHTML="",u.style.cssText=o+"width:1px;padding:1px;display:inline;zoom:1",e.inlineBlockNeedsLayout=3===u.offsetWidth,u.style.display="block",u.innerHTML="
",u.firstChild.style.width="5px",e.shrinkWrapBlocks=3!==u.offsetWidth,e.inlineBlockNeedsLayout&&(r.style.zoom=1)),r.removeChild(i),i=u=s=n=null)}),i=o=r=a=n=s=null,e}({});var Te=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Se=/([A-Z])/g;ce.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return t=t.nodeType?ce.cache[t[ce.expando]]:t[ce.expando],!!t&&!a(t)},data:function(t,e,i){return s(t,e,i)},removeData:function(t,e){return o(t,e)},_data:function(t,e,i){return s(t,e,i,!0)},_removeData:function(t,e){return o(t,e,!0)},acceptData:function(t){if(t.nodeType&&1!==t.nodeType&&9!==t.nodeType)return!1;var e=t.nodeName&&ce.noData[t.nodeName.toLowerCase()];return!e||e!==!0&&t.getAttribute("classid")===e}}),ce.fn.extend({data:function(t,i){var n,s,o=null,a=0,l=this[0];if(t===e){if(this.length&&(o=ce.data(l),1===l.nodeType&&!ce._data(l,"parsedAttrs"))){for(n=l.attributes;a1?this.each(function(){ce.data(this,t,i)}):l?r(l,t,ce.data(l,t)):null},removeData:function(t){return this.each(function(){ce.removeData(this,t)})}}),ce.extend({queue:function(t,e,i){var n;return t?(e=(e||"fx")+"queue",n=ce._data(t,e),i&&(!n||ce.isArray(i)?n=ce._data(t,e,ce.makeArray(i)):n.push(i)),n||[]):void 0},dequeue:function(t,e){e=e||"fx";var i=ce.queue(t,e),n=i.length,s=i.shift(),o=ce._queueHooks(t,e),r=function(){ce.dequeue(t,e)};"inprogress"===s&&(s=i.shift(),n--),s&&("fx"===e&&i.unshift("inprogress"),delete o.stop,s.call(t,r,o)),!n&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return ce._data(t,i)||ce._data(t,i,{empty:ce.Callbacks("once memory").add(function(){ce._removeData(t,e+"queue"),ce._removeData(t,i)})})}}),ce.fn.extend({queue:function(t,i){var n=2;return"string"!=typeof t&&(i=t,t="fx",n--),arguments.length1)},removeAttr:function(t){return this.each(function(){ce.removeAttr(this,t)})},prop:function(t,e){return ce.access(this,ce.prop,t,e,arguments.length>1)},removeProp:function(t){return t=ce.propFix[t]||t,this.each(function(){try{this[t]=e,delete this[t]}catch(i){}})},addClass:function(t){var e,i,n,s,o,r=0,a=this.length,l="string"==typeof t&&t;if(ce.isFunction(t))return this.each(function(e){ce(this).addClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(pe)||[];a>r;r++)if(i=this[r],n=1===i.nodeType&&(i.className?(" "+i.className+" ").replace(Ee," "):" ")){for(o=0;s=e[o++];)n.indexOf(" "+s+" ")<0&&(n+=s+" ");i.className=ce.trim(n)}return this},removeClass:function(t){var e,i,n,s,o,r=0,a=this.length,l=0===arguments.length||"string"==typeof t&&t;if(ce.isFunction(t))return this.each(function(e){ce(this).removeClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(pe)||[];a>r;r++)if(i=this[r],n=1===i.nodeType&&(i.className?(" "+i.className+" ").replace(Ee," "):"")){for(o=0;s=e[o++];)for(;n.indexOf(" "+s+" ")>=0;)n=n.replace(" "+s+" "," ");i.className=t?ce.trim(n):""}return this},toggleClass:function(t,e){var i=typeof t;return"boolean"==typeof e&&"string"===i?e?this.addClass(t):this.removeClass(t):ce.isFunction(t)?this.each(function(i){ce(this).toggleClass(t.call(this,i,this.className,e),e)}):this.each(function(){if("string"===i)for(var e,n=0,s=ce(this),o=t.match(pe)||[];e=o[n++];)s.hasClass(e)?s.removeClass(e):s.addClass(e);else(i===U||"boolean"===i)&&(this.className&&ce._data(this,"__className__",this.className),this.className=this.className||t===!1?"":ce._data(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",i=0,n=this.length;n>i;i++)if(1===this[i].nodeType&&(" "+this[i].className+" ").replace(Ee," ").indexOf(e)>=0)return!0;return!1},val:function(t){var i,n,s,o=this[0];{if(arguments.length)return s=ce.isFunction(t),this.each(function(i){var o;1===this.nodeType&&(o=s?t.call(this,i,ce(this).val()):t,null==o?o="":"number"==typeof o?o+="":ce.isArray(o)&&(o=ce.map(o,function(t){return null==t?"":t+""})),n=ce.valHooks[this.type]||ce.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&n.set(this,o,"value")!==e||(this.value=o))});if(o)return n=ce.valHooks[o.type]||ce.valHooks[o.nodeName.toLowerCase()],n&&"get"in n&&(i=n.get(o,"value"))!==e?i:(i=o.value,"string"==typeof i?i.replace(Ie,""):null==i?"":i)}}}),ce.extend({valHooks:{option:{get:function(t){var e=ce.find.attr(t,"value");return null!=e?e:t.text}},select:{get:function(t){for(var e,i,n=t.options,s=t.selectedIndex,o="select-one"===t.type||0>s,r=o?null:[],a=o?s+1:n.length,l=0>s?a:o?s:0;a>l;l++)if(i=n[l],!(!i.selected&&l!==s||(ce.support.optDisabled?i.disabled:null!==i.getAttribute("disabled"))||i.parentNode.disabled&&ce.nodeName(i.parentNode,"optgroup"))){if(e=ce(i).val(),o)return e;r.push(e)}return r},set:function(t,e){for(var i,n,s=t.options,o=ce.makeArray(e),r=s.length;r--;)n=s[r],(n.selected=ce.inArray(ce(n).val(),o)>=0)&&(i=!0);return i||(t.selectedIndex=-1),o}}},attr:function(t,i,n){var s,o,r=t.nodeType;if(t&&3!==r&&8!==r&&2!==r)return typeof t.getAttribute===U?ce.prop(t,i,n):(1===r&&ce.isXMLDoc(t)||(i=i.toLowerCase(),s=ce.attrHooks[i]||(ce.expr.match.bool.test(i)?Pe:Ne)),n===e?s&&"get"in s&&null!==(o=s.get(t,i))?o:(o=ce.find.attr(t,i),null==o?e:o):null!==n?s&&"set"in s&&(o=s.set(t,n,i))!==e?o:(t.setAttribute(i,n+""),n):(ce.removeAttr(t,i),void 0))},removeAttr:function(t,e){var i,n,s=0,o=e&&e.match(pe);if(o&&1===t.nodeType)for(;i=o[s++];)n=ce.propFix[i]||i,ce.expr.match.bool.test(i)?je&&ze||!He.test(i)?t[n]=!1:t[ce.camelCase("default-"+i)]=t[n]=!1:ce.attr(t,i,""),t.removeAttribute(ze?i:n)},attrHooks:{type:{set:function(t,e){if(!ce.support.radioValue&&"radio"===e&&ce.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(t,i,n){var s,o,r,a=t.nodeType;if(t&&3!==a&&8!==a&&2!==a)return r=1!==a||!ce.isXMLDoc(t),r&&(i=ce.propFix[i]||i,o=ce.propHooks[i]),n!==e?o&&"set"in o&&(s=o.set(t,n,i))!==e?s:t[i]=n:o&&"get"in o&&null!==(s=o.get(t,i))?s:t[i]},propHooks:{tabIndex:{get:function(t){var e=ce.find.attr(t,"tabindex");return e?parseInt(e,10):Me.test(t.nodeName)||Ae.test(t.nodeName)&&t.href?0:-1}}}}),Pe={set:function(t,e,i){return e===!1?ce.removeAttr(t,i):je&&ze||!He.test(i)?t.setAttribute(!ze&&ce.propFix[i]||i,i):t[ce.camelCase("default-"+i)]=t[i]=!0,i}},ce.each(ce.expr.match.bool.source.match(/\w+/g),function(t,i){var n=ce.expr.attrHandle[i]||ce.find.attr;ce.expr.attrHandle[i]=je&&ze||!He.test(i)?function(t,i,s){var o=ce.expr.attrHandle[i],r=s?e:(ce.expr.attrHandle[i]=e)!=n(t,i,s)?i.toLowerCase():null;return ce.expr.attrHandle[i]=o,r}:function(t,i,n){return n?e:t[ce.camelCase("default-"+i)]?i.toLowerCase():null}}),je&&ze||(ce.attrHooks.value={set:function(t,e,i){return ce.nodeName(t,"input")?(t.defaultValue=e,void 0):Ne&&Ne.set(t,e,i)}}),ze||(Ne={set:function(t,i,n){var s=t.getAttributeNode(n);return s||t.setAttributeNode(s=t.ownerDocument.createAttribute(n)),s.value=i+="","value"===n||i===t.getAttribute(n)?i:e}},ce.expr.attrHandle.id=ce.expr.attrHandle.name=ce.expr.attrHandle.coords=function(t,i,n){var s;return n?e:(s=t.getAttributeNode(i))&&""!==s.value?s.value:null},ce.valHooks.button={get:function(t,i){var n=t.getAttributeNode(i);return n&&n.specified?n.value:e},set:Ne.set},ce.attrHooks.contenteditable={set:function(t,e,i){Ne.set(t,""===e?!1:e,i)}},ce.each(["width","height"],function(t,e){ce.attrHooks[e]={set:function(t,i){return""===i?(t.setAttribute(e,"auto"),i):void 0}}})),ce.support.hrefNormalized||ce.each(["href","src"],function(t,e){ce.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),ce.support.style||(ce.attrHooks.style={get:function(t){return t.style.cssText||e},set:function(t,e){return t.style.cssText=e+""}}),ce.support.optSelected||(ce.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}}),ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ce.propFix[this.toLowerCase()]=this}),ce.support.enctype||(ce.propFix.enctype="encoding"),ce.each(["radio","checkbox"],function(){ce.valHooks[this]={set:function(t,e){return ce.isArray(e)?t.checked=ce.inArray(ce(t).val(),e)>=0:void 0}},ce.support.checkOn||(ce.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Le=/^(?:input|select|textarea)$/i,We=/^key/,Oe=/^(?:mouse|contextmenu)|click/,Fe=/^(?:focusinfocus|focusoutblur)$/,$e=/^([^.]*)(?:\.(.+)|)$/;ce.event={global:{},add:function(t,i,n,s,o){var r,a,l,h,c,u,p,d,f,g,m,v=ce._data(t);if(v){for(n.handler&&(h=n,n=h.handler,o=h.selector),n.guid||(n.guid=ce.guid++),(a=v.events)||(a=v.events={}),(u=v.handle)||(u=v.handle=function(t){return typeof ce===U||t&&ce.event.triggered===t.type?e:ce.event.dispatch.apply(u.elem,arguments)},u.elem=t),i=(i||"").match(pe)||[""],l=i.length;l--;)r=$e.exec(i[l])||[],f=m=r[1],g=(r[2]||"").split(".").sort(),f&&(c=ce.event.special[f]||{},f=(o?c.delegateType:c.bindType)||f,c=ce.event.special[f]||{},p=ce.extend({type:f,origType:m,data:s,handler:n,guid:n.guid,selector:o,needsContext:o&&ce.expr.match.needsContext.test(o),namespace:g.join(".")},h),(d=a[f])||(d=a[f]=[],d.delegateCount=0,c.setup&&c.setup.call(t,s,g,u)!==!1||(t.addEventListener?t.addEventListener(f,u,!1):t.attachEvent&&t.attachEvent("on"+f,u))),c.add&&(c.add.call(t,p),p.handler.guid||(p.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,p):d.push(p),ce.event.global[f]=!0);t=null}},remove:function(t,e,i,n,s){var o,r,a,l,h,c,u,p,d,f,g,m=ce.hasData(t)&&ce._data(t);if(m&&(c=m.events)){for(e=(e||"").match(pe)||[""],h=e.length;h--;)if(a=$e.exec(e[h])||[],d=g=a[1],f=(a[2]||"").split(".").sort(),d){for(u=ce.event.special[d]||{},d=(n?u.delegateType:u.bindType)||d,p=c[d]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=p.length;o--;)r=p[o],!s&&g!==r.origType||i&&i.guid!==r.guid||a&&!a.test(r.namespace)||n&&n!==r.selector&&("**"!==n||!r.selector)||(p.splice(o,1),r.selector&&p.delegateCount--,u.remove&&u.remove.call(t,r));l&&!p.length&&(u.teardown&&u.teardown.call(t,f,m.handle)!==!1||ce.removeEvent(t,d,m.handle),delete c[d])}else for(d in c)ce.event.remove(t,d+e[h],i,n,!0);ce.isEmptyObject(c)&&(delete m.handle,ce._removeData(t,"events"))}},trigger:function(i,n,s,o){var r,a,l,h,c,u,p,d=[s||Q],f=le.call(i,"type")?i.type:i,g=le.call(i,"namespace")?i.namespace.split("."):[];if(l=u=s=s||Q,3!==s.nodeType&&8!==s.nodeType&&!Fe.test(f+ce.event.triggered)&&(f.indexOf(".")>=0&&(g=f.split("."),f=g.shift(),g.sort()),a=f.indexOf(":")<0&&"on"+f,i=i[ce.expando]?i:new ce.Event(f,"object"==typeof i&&i),i.isTrigger=o?2:3,i.namespace=g.join("."),i.namespace_re=i.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,i.result=e,i.target||(i.target=s),n=null==n?[i]:ce.makeArray(n,[i]),c=ce.event.special[f]||{},o||!c.trigger||c.trigger.apply(s,n)!==!1)){if(!o&&!c.noBubble&&!ce.isWindow(s)){for(h=c.delegateType||f,Fe.test(h+f)||(l=l.parentNode);l;l=l.parentNode)d.push(l),u=l;u===(s.ownerDocument||Q)&&d.push(u.defaultView||u.parentWindow||t)}for(p=0;(l=d[p++])&&!i.isPropagationStopped();)i.type=p>1?h:c.bindType||f,r=(ce._data(l,"events")||{})[i.type]&&ce._data(l,"handle"),r&&r.apply(l,n),r=a&&l[a],r&&ce.acceptData(l)&&r.apply&&r.apply(l,n)===!1&&i.preventDefault();if(i.type=f,!o&&!i.isDefaultPrevented()&&(!c._default||c._default.apply(d.pop(),n)===!1)&&ce.acceptData(s)&&a&&s[f]&&!ce.isWindow(s)){u=s[a],u&&(s[a]=null),ce.event.triggered=f;try{s[f]()}catch(m){}ce.event.triggered=e,u&&(s[a]=u)}return i.result}},dispatch:function(t){t=ce.event.fix(t);var i,n,s,o,r,a=[],l=oe.call(arguments),h=(ce._data(this,"events")||{})[t.type]||[],c=ce.event.special[t.type]||{};if(l[0]=t,t.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,t)!==!1){for(a=ce.event.handlers.call(this,t,h),i=0;(o=a[i++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,r=0;(s=o.handlers[r++])&&!t.isImmediatePropagationStopped();)(!t.namespace_re||t.namespace_re.test(s.namespace))&&(t.handleObj=s,t.data=s.data,n=((ce.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,l),n!==e&&(t.result=n)===!1&&(t.preventDefault(),t.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(t,i){var n,s,o,r,a=[],l=i.delegateCount,h=t.target;if(l&&h.nodeType&&(!t.button||"click"!==t.type))for(;h!=this;h=h.parentNode||this)if(1===h.nodeType&&(h.disabled!==!0||"click"!==t.type)){for(o=[],r=0;l>r;r++)s=i[r],n=s.selector+" ",o[n]===e&&(o[n]=s.needsContext?ce(n,this).index(h)>=0:ce.find(n,this,null,[h]).length),o[n]&&o.push(s);o.length&&a.push({elem:h,handlers:o})}return le;e++)if(ce.contains(n[e],this))return!0}));for(e=0;s>e;e++)ce.find(t,n[e],i);return i=this.pushStack(s>1?ce.unique(i):i),i.selector=this.selector?this.selector+" "+t:t,i},has:function(t){var e,i=ce(t,this),n=i.length;return this.filter(function(){for(e=0;n>e;e++)if(ce.contains(this,i[e]))return!0})},not:function(t){return this.pushStack(p(this,t||[],!0))},filter:function(t){return this.pushStack(p(this,t||[],!1))},is:function(t){return!!p(this,"string"==typeof t&&Ye.test(t)?ce(t):t||[],!1).length},closest:function(t,e){for(var i,n=0,s=this.length,o=[],r=Ye.test(t)||"string"!=typeof t?ce(t,e||this.context):0;s>n;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(r?r.index(i)>-1:1===i.nodeType&&ce.find.matchesSelector(i,t))){i=o.push(i);break}return this.pushStack(o.length>1?ce.unique(o):o)},index:function(t){return t?"string"==typeof t?ce.inArray(this[0],ce(t)):ce.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){var i="string"==typeof t?ce(t,e):ce.makeArray(t&&t.nodeType?[t]:t),n=ce.merge(this.get(),i);return this.pushStack(ce.unique(n))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),ce.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return ce.dir(t,"parentNode")},parentsUntil:function(t,e,i){return ce.dir(t,"parentNode",i)},next:function(t){return u(t,"nextSibling")},prev:function(t){return u(t,"previousSibling")},nextAll:function(t){return ce.dir(t,"nextSibling")},prevAll:function(t){return ce.dir(t,"previousSibling")},nextUntil:function(t,e,i){return ce.dir(t,"nextSibling",i)},prevUntil:function(t,e,i){return ce.dir(t,"previousSibling",i)},siblings:function(t){return ce.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return ce.sibling(t.firstChild)},contents:function(t){return ce.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:ce.merge([],t.childNodes)}},function(t,e){ce.fn[t]=function(i,n){var s=ce.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(s=ce.filter(n,s)),this.length>1&&(qe[t]||(s=ce.unique(s)),Be.test(t)&&(s=s.reverse())),this.pushStack(s)}}),ce.extend({filter:function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?ce.find.matchesSelector(n,t)?[n]:[]:ce.find.matches(t,ce.grep(e,function(t){return 1===t.nodeType}))},dir:function(t,i,n){for(var s=[],o=t[i];o&&9!==o.nodeType&&(n===e||1!==o.nodeType||!ce(o).is(n));)1===o.nodeType&&s.push(o),o=o[i];return s},sibling:function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i}});var Xe="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Ke=/ jQuery\d+="(?:null|\d+)"/g,Ue=new RegExp("<(?:"+Xe+")[\\s/>]","i"),Ve=/^\s+/,Qe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Je=/<([\w:]+)/,Ge=/\s*$/g,ri={option:[1,""," "],legend:[1,""," "],area:[1,""," "],param:[1,""," "],thead:[1,""],tr:[2,""],col:[2,""],td:[3,""],_default:ce.support.htmlSerialize?[0,"",""]:[1,"X","
"]},ai=d(Q),li=ai.appendChild(Q.createElement("div"));
+ri.optgroup=ri.option,ri.tbody=ri.tfoot=ri.colgroup=ri.caption=ri.thead,ri.th=ri.td,ce.fn.extend({text:function(t){return ce.access(this,function(t){return t===e?ce.text(this):this.empty().append((this[0]&&this[0].ownerDocument||Q).createTextNode(t))},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=f(this,t);e.appendChild(t)}})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=f(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var i,n=t?ce.filter(t,this):this,s=0;null!=(i=n[s]);s++)e||1!==i.nodeType||ce.cleanData(_(i)),i.parentNode&&(e&&ce.contains(i.ownerDocument,i)&&v(_(i,"script")),i.parentNode.removeChild(i));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&ce.cleanData(_(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&ce.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return ce.clone(this,t,e)})},html:function(t){return ce.access(this,function(t){var i=this[0]||{},n=0,s=this.length;if(t===e)return 1===i.nodeType?i.innerHTML.replace(Ke,""):e;if(!("string"!=typeof t||ti.test(t)||!ce.support.htmlSerialize&&Ue.test(t)||!ce.support.leadingWhitespace&&Ve.test(t)||ri[(Je.exec(t)||["",""])[1].toLowerCase()])){t=t.replace(Qe,"<$1>$2>");try{for(;s>n;n++)i=this[n]||{},1===i.nodeType&&(ce.cleanData(_(i,!1)),i.innerHTML=t);i=0}catch(o){}}i&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=ce.map(this,function(t){return[t.nextSibling,t.parentNode]}),e=0;return this.domManip(arguments,function(i){var n=t[e++],s=t[e++];s&&(n&&n.parentNode!==s&&(n=this.nextSibling),ce(this).remove(),s.insertBefore(i,n))},!0),e?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(t,e,i){t=ne.apply([],t);var n,s,o,r,a,l,h=0,c=this.length,u=this,p=c-1,d=t[0],f=ce.isFunction(d);if(f||!(1>=c||"string"!=typeof d||ce.support.checkClone)&&ii.test(d))return this.each(function(n){var s=u.eq(n);f&&(t[0]=d.call(this,n,s.html())),s.domManip(t,e,i)});if(c&&(l=ce.buildFragment(t,this[0].ownerDocument,!1,!i&&this),n=l.firstChild,1===l.childNodes.length&&(l=n),n)){for(r=ce.map(_(l,"script"),g),o=r.length;c>h;h++)s=l,h!==p&&(s=ce.clone(s,!0,!0),o&&ce.merge(r,_(s,"script"))),e.call(this[h],s,h);if(o)for(a=r[r.length-1].ownerDocument,ce.map(r,m),h=0;o>h;h++)s=r[h],ni.test(s.type||"")&&!ce._data(s,"globalEval")&&ce.contains(a,s)&&(s.src?ce._evalUrl(s.src):ce.globalEval((s.text||s.textContent||s.innerHTML||"").replace(oi,"")));l=n=null}return this}}),ce.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){ce.fn[t]=function(t){for(var i,n=0,s=[],o=ce(t),r=o.length-1;r>=n;n++)i=n===r?this:this.clone(!0),ce(o[n])[e](i),se.apply(s,i.get());return this.pushStack(s)}}),ce.extend({clone:function(t,e,i){var n,s,o,r,a,l=ce.contains(t.ownerDocument,t);if(ce.support.html5Clone||ce.isXMLDoc(t)||!Ue.test("<"+t.nodeName+">")?o=t.cloneNode(!0):(li.innerHTML=t.outerHTML,li.removeChild(o=li.firstChild)),!(ce.support.noCloneEvent&&ce.support.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||ce.isXMLDoc(t)))for(n=_(o),a=_(t),r=0;null!=(s=a[r]);++r)n[r]&&b(s,n[r]);if(e)if(i)for(a=a||_(t),n=n||_(o),r=0;null!=(s=a[r]);r++)y(s,n[r]);else y(t,o);return n=_(o,"script"),n.length>0&&v(n,!l&&_(t,"script")),n=a=s=null,o},buildFragment:function(t,e,i,n){for(var s,o,r,a,l,h,c,u=t.length,p=d(e),f=[],g=0;u>g;g++)if(o=t[g],o||0===o)if("object"===ce.type(o))ce.merge(f,o.nodeType?[o]:o);else if(Ze.test(o)){for(a=a||p.appendChild(e.createElement("div")),l=(Je.exec(o)||["",""])[1].toLowerCase(),c=ri[l]||ri._default,a.innerHTML=c[1]+o.replace(Qe,"<$1>$2>")+c[2],s=c[0];s--;)a=a.lastChild;if(!ce.support.leadingWhitespace&&Ve.test(o)&&f.push(e.createTextNode(Ve.exec(o)[0])),!ce.support.tbody)for(o="table"!==l||Ge.test(o)?""!==c[1]||Ge.test(o)?0:a:a.firstChild,s=o&&o.childNodes.length;s--;)ce.nodeName(h=o.childNodes[s],"tbody")&&!h.childNodes.length&&o.removeChild(h);for(ce.merge(f,a.childNodes),a.textContent="";a.firstChild;)a.removeChild(a.firstChild);a=p.lastChild}else f.push(e.createTextNode(o));for(a&&p.removeChild(a),ce.support.appendChecked||ce.grep(_(f,"input"),w),g=0;o=f[g++];)if((!n||-1===ce.inArray(o,n))&&(r=ce.contains(o.ownerDocument,o),a=_(p.appendChild(o),"script"),r&&v(a),i))for(s=0;o=a[s++];)ni.test(o.type||"")&&i.push(o);return a=null,p},cleanData:function(t,e){for(var i,n,s,o,r=0,a=ce.expando,l=ce.cache,h=ce.support.deleteExpando,c=ce.event.special;null!=(i=t[r]);r++)if((e||ce.acceptData(i))&&(s=i[a],o=s&&l[s])){if(o.events)for(n in o.events)c[n]?ce.event.remove(i,n):ce.removeEvent(i,n,o.handle);l[s]&&(delete l[s],h?delete i[a]:typeof i.removeAttribute!==U?i.removeAttribute(a):i[a]=null,ee.push(s))}},_evalUrl:function(t){return ce.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),ce.fn.extend({wrapAll:function(t){if(ce.isFunction(t))return this.each(function(e){ce(this).wrapAll(t.call(this,e))});if(this[0]){var e=ce(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(t){return ce.isFunction(t)?this.each(function(e){ce(this).wrapInner(t.call(this,e))}):this.each(function(){var e=ce(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=ce.isFunction(t);return this.each(function(i){ce(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(){return this.parent().each(function(){ce.nodeName(this,"body")||ce(this).replaceWith(this.childNodes)}).end()}});var hi,ci,ui,pi=/alpha\([^)]*\)/i,di=/opacity\s*=\s*([^)]*)/,fi=/^(top|right|bottom|left)$/,gi=/^(none|table(?!-c[ea]).+)/,mi=/^margin/,vi=new RegExp("^("+ue+")(.*)$","i"),yi=new RegExp("^("+ue+")(?!px)[a-z%]+$","i"),bi=new RegExp("^([+-])=("+ue+")","i"),_i={BODY:"block"},wi={position:"absolute",visibility:"hidden",display:"block"},xi={letterSpacing:0,fontWeight:400},ki=["Top","Right","Bottom","Left"],Di=["Webkit","O","Moz","ms"];ce.fn.extend({css:function(t,i){return ce.access(this,function(t,i,n){var s,o,r={},a=0;if(ce.isArray(i)){for(o=ci(t),s=i.length;s>a;a++)r[i[a]]=ce.css(t,i[a],!1,o);return r}return n!==e?ce.style(t,i,n):ce.css(t,i)},t,i,arguments.length>1)},show:function(){return D(this,!0)},hide:function(){return D(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){k(this)?ce(this).show():ce(this).hide()})}}),ce.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=ui(t,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ce.support.cssFloat?"cssFloat":"styleFloat"},style:function(t,i,n,s){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,r,a,l=ce.camelCase(i),h=t.style;if(i=ce.cssProps[l]||(ce.cssProps[l]=x(h,l)),a=ce.cssHooks[i]||ce.cssHooks[l],n===e)return a&&"get"in a&&(o=a.get(t,!1,s))!==e?o:h[i];if(r=typeof n,"string"===r&&(o=bi.exec(n))&&(n=(o[1]+1)*o[2]+parseFloat(ce.css(t,i)),r="number"),!(null==n||"number"===r&&isNaN(n)||("number"!==r||ce.cssNumber[l]||(n+="px"),ce.support.clearCloneStyle||""!==n||0!==i.indexOf("background")||(h[i]="inherit"),a&&"set"in a&&(n=a.set(t,n,s))===e)))try{h[i]=n}catch(c){}}},css:function(t,i,n,s){var o,r,a,l=ce.camelCase(i);return i=ce.cssProps[l]||(ce.cssProps[l]=x(t.style,l)),a=ce.cssHooks[i]||ce.cssHooks[l],a&&"get"in a&&(r=a.get(t,!0,n)),r===e&&(r=ui(t,i,s)),"normal"===r&&i in xi&&(r=xi[i]),""===n||n?(o=parseFloat(r),n===!0||ce.isNumeric(o)?o||0:r):r}}),t.getComputedStyle?(ci=function(e){return t.getComputedStyle(e,null)},ui=function(t,i,n){var s,o,r,a=n||ci(t),l=a?a.getPropertyValue(i)||a[i]:e,h=t.style;return a&&(""!==l||ce.contains(t.ownerDocument,t)||(l=ce.style(t,i)),yi.test(l)&&mi.test(i)&&(s=h.width,o=h.minWidth,r=h.maxWidth,h.minWidth=h.maxWidth=h.width=l,l=a.width,h.width=s,h.minWidth=o,h.maxWidth=r)),l}):Q.documentElement.currentStyle&&(ci=function(t){return t.currentStyle},ui=function(t,i,n){var s,o,r,a=n||ci(t),l=a?a[i]:e,h=t.style;return null==l&&h&&h[i]&&(l=h[i]),yi.test(l)&&!fi.test(i)&&(s=h.left,o=t.runtimeStyle,r=o&&o.left,r&&(o.left=t.currentStyle.left),h.left="fontSize"===i?"1em":l,l=h.pixelLeft+"px",h.left=s,r&&(o.left=r)),""===l?"auto":l}),ce.each(["height","width"],function(t,e){ce.cssHooks[e]={get:function(t,i,n){return i?0===t.offsetWidth&&gi.test(ce.css(t,"display"))?ce.swap(t,wi,function(){return S(t,e,n)}):S(t,e,n):void 0},set:function(t,i,n){var s=n&&ci(t);return C(t,i,n?T(t,e,n,ce.support.boxSizing&&"border-box"===ce.css(t,"boxSizing",!1,s),s):0)}}}),ce.support.opacity||(ce.cssHooks.opacity={get:function(t,e){return di.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var i=t.style,n=t.currentStyle,s=ce.isNumeric(e)?"alpha(opacity="+100*e+")":"",o=n&&n.filter||i.filter||"";i.zoom=1,(e>=1||""===e)&&""===ce.trim(o.replace(pi,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===e||n&&!n.filter)||(i.filter=pi.test(o)?o.replace(pi,s):o+" "+s)}}),ce(function(){ce.support.reliableMarginRight||(ce.cssHooks.marginRight={get:function(t,e){return e?ce.swap(t,{display:"inline-block"},ui,[t,"marginRight"]):void 0}}),!ce.support.pixelPosition&&ce.fn.position&&ce.each(["top","left"],function(t,e){ce.cssHooks[e]={get:function(t,i){return i?(i=ui(t,e),yi.test(i)?ce(t).position()[e]+"px":i):void 0}}})}),ce.expr&&ce.expr.filters&&(ce.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0||!ce.support.reliableHiddenOffsets&&"none"===(t.style&&t.style.display||ce.css(t,"display"))},ce.expr.filters.visible=function(t){return!ce.expr.filters.hidden(t)}),ce.each({margin:"",padding:"",border:"Width"},function(t,e){ce.cssHooks[t+e]={expand:function(i){for(var n=0,s={},o="string"==typeof i?i.split(" "):[i];4>n;n++)s[t+ki[n]+e]=o[n]||o[n-2]||o[0];return s}},mi.test(t)||(ce.cssHooks[t+e].set=C)});var Ci=/%20/g,Ti=/\[\]$/,Si=/\r?\n/g,Ni=/^(?:submit|button|image|reset|file)$/i,Pi=/^(?:input|select|textarea|keygen)/i;ce.fn.extend({serialize:function(){return ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=ce.prop(this,"elements");return t?ce.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!ce(this).is(":disabled")&&Pi.test(this.nodeName)&&!Ni.test(t)&&(this.checked||!ei.test(t))}).map(function(t,e){var i=ce(this).val();return null==i?null:ce.isArray(i)?ce.map(i,function(t){return{name:e.name,value:t.replace(Si,"\r\n")}}):{name:e.name,value:i.replace(Si,"\r\n")}}).get()}}),ce.param=function(t,i){var n,s=[],o=function(t,e){e=ce.isFunction(e)?e():null==e?"":e,s[s.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(i===e&&(i=ce.ajaxSettings&&ce.ajaxSettings.traditional),ce.isArray(t)||t.jquery&&!ce.isPlainObject(t))ce.each(t,function(){o(this.name,this.value)});else for(n in t)E(n,t[n],i,o);return s.join("&").replace(Ci,"+")},ce.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){ce.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}),ce.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)}});var Ei,Ii,Mi=ce.now(),Ai=/\?/,Hi=/#.*$/,zi=/([?&])_=[^&]*/,ji=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Li=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Wi=/^(?:GET|HEAD)$/,Oi=/^\/\//,Fi=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,$i=ce.fn.load,Ri={},Bi={},Yi="*/".concat("*");try{Ii=V.href}catch(qi){Ii=Q.createElement("a"),Ii.href="",Ii=Ii.href}Ei=Fi.exec(Ii.toLowerCase())||[],ce.fn.load=function(t,i,n){if("string"!=typeof t&&$i)return $i.apply(this,arguments);var s,o,r,a=this,l=t.indexOf(" ");return l>=0&&(s=t.slice(l,t.length),t=t.slice(0,l)),ce.isFunction(i)?(n=i,i=e):i&&"object"==typeof i&&(r="POST"),a.length>0&&ce.ajax({url:t,type:r,dataType:"html",data:i}).done(function(t){o=arguments,a.html(s?ce("").append(ce.parseHTML(t)).find(s):t)}).complete(n&&function(t,e){a.each(n,o||[t.responseText,e,t])}),this},ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){ce.fn[e]=function(t){return this.on(e,t)}}),ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ii,type:"GET",isLocal:Li.test(Ei[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Yi,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ce.parseJSON,"text xml":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?A(A(t,ce.ajaxSettings),e):A(ce.ajaxSettings,t)},ajaxPrefilter:I(Ri),ajaxTransport:I(Bi),ajax:function(t,i){function n(t,i,n,s){var o,u,y,b,w,k=i;2!==_&&(_=2,l&&clearTimeout(l),c=e,a=s||"",x.readyState=t>0?4:0,o=t>=200&&300>t||304===t,n&&(b=H(p,x,n)),b=z(p,b,x,o),o?(p.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(ce.lastModified[r]=w),w=x.getResponseHeader("etag"),w&&(ce.etag[r]=w)),204===t||"HEAD"===p.type?k="nocontent":304===t?k="notmodified":(k=b.state,u=b.data,y=b.error,o=!y)):(y=k,(t||!k)&&(k="error",0>t&&(t=0))),x.status=t,x.statusText=(i||k)+"",o?g.resolveWith(d,[u,k,x]):g.rejectWith(d,[x,k,y]),x.statusCode(v),v=e,h&&f.trigger(o?"ajaxSuccess":"ajaxError",[x,p,o?u:y]),m.fireWith(d,[x,k]),h&&(f.trigger("ajaxComplete",[x,p]),--ce.active||ce.event.trigger("ajaxStop")))}"object"==typeof t&&(i=t,t=e),i=i||{};var s,o,r,a,l,h,c,u,p=ce.ajaxSetup({},i),d=p.context||p,f=p.context&&(d.nodeType||d.jquery)?ce(d):ce.event,g=ce.Deferred(),m=ce.Callbacks("once memory"),v=p.statusCode||{},y={},b={},_=0,w="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(2===_){if(!u)for(u={};e=ji.exec(a);)u[e[1].toLowerCase()]=e[2];e=u[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===_?a:null},setRequestHeader:function(t,e){var i=t.toLowerCase();return _||(t=b[i]=b[i]||t,y[t]=e),this},overrideMimeType:function(t){return _||(p.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>_)for(e in t)v[e]=[v[e],t[e]];else x.always(t[x.status]);return this},abort:function(t){var e=t||w;return c&&c.abort(e),n(0,e),this}};if(g.promise(x).complete=m.add,x.success=x.done,x.error=x.fail,p.url=((t||p.url||Ii)+"").replace(Hi,"").replace(Oi,Ei[1]+"//"),p.type=i.method||i.type||p.method||p.type,p.dataTypes=ce.trim(p.dataType||"*").toLowerCase().match(pe)||[""],null==p.crossDomain&&(s=Fi.exec(p.url.toLowerCase()),p.crossDomain=!(!s||s[1]===Ei[1]&&s[2]===Ei[2]&&(s[3]||("http:"===s[1]?"80":"443"))===(Ei[3]||("http:"===Ei[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=ce.param(p.data,p.traditional)),M(Ri,p,i,x),2===_)return x;h=p.global,h&&0===ce.active++&&ce.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Wi.test(p.type),r=p.url,p.hasContent||(p.data&&(r=p.url+=(Ai.test(r)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=zi.test(r)?r.replace(zi,"$1_="+Mi++):r+(Ai.test(r)?"&":"?")+"_="+Mi++)),p.ifModified&&(ce.lastModified[r]&&x.setRequestHeader("If-Modified-Since",ce.lastModified[r]),ce.etag[r]&&x.setRequestHeader("If-None-Match",ce.etag[r])),(p.data&&p.hasContent&&p.contentType!==!1||i.contentType)&&x.setRequestHeader("Content-Type",p.contentType),x.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Yi+"; q=0.01":""):p.accepts["*"]);for(o in p.headers)x.setRequestHeader(o,p.headers[o]);if(p.beforeSend&&(p.beforeSend.call(d,x,p)===!1||2===_))return x.abort();w="abort";for(o in{success:1,error:1,complete:1})x[o](p[o]);if(c=M(Bi,p,i,x)){x.readyState=1,h&&f.trigger("ajaxSend",[x,p]),p.async&&p.timeout>0&&(l=setTimeout(function(){x.abort("timeout")},p.timeout));try{_=1,c.send(y,n)}catch(k){if(!(2>_))throw k;n(-1,k)}}else n(-1,"No Transport");return x},getJSON:function(t,e,i){return ce.get(t,e,i,"json")},getScript:function(t,i){return ce.get(t,e,i,"script")}}),ce.each(["get","post"],function(t,i){ce[i]=function(t,n,s,o){return ce.isFunction(n)&&(o=o||s,s=n,n=e),ce.ajax({url:t,type:i,dataType:o,data:n,success:s})}}),ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return ce.globalEval(t),t}}}),ce.ajaxPrefilter("script",function(t){t.cache===e&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),ce.ajaxTransport("script",function(t){if(t.crossDomain){var i,n=Q.head||ce("head")[0]||Q.documentElement;return{send:function(e,s){i=Q.createElement("script"),i.async=!0,t.scriptCharset&&(i.charset=t.scriptCharset),i.src=t.url,i.onload=i.onreadystatechange=function(t,e){(e||!i.readyState||/loaded|complete/.test(i.readyState))&&(i.onload=i.onreadystatechange=null,i.parentNode&&i.parentNode.removeChild(i),i=null,e||s(200,"success"))},n.insertBefore(i,n.firstChild)},abort:function(){i&&i.onload(e,!0)}}}});var Xi=[],Ki=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Xi.pop()||ce.expando+"_"+Mi++;return this[t]=!0,t}}),ce.ajaxPrefilter("json jsonp",function(i,n,s){var o,r,a,l=i.jsonp!==!1&&(Ki.test(i.url)?"url":"string"==typeof i.data&&!(i.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ki.test(i.data)&&"data");return l||"jsonp"===i.dataTypes[0]?(o=i.jsonpCallback=ce.isFunction(i.jsonpCallback)?i.jsonpCallback():i.jsonpCallback,l?i[l]=i[l].replace(Ki,"$1"+o):i.jsonp!==!1&&(i.url+=(Ai.test(i.url)?"&":"?")+i.jsonp+"="+o),i.converters["script json"]=function(){return a||ce.error(o+" was not called"),a[0]},i.dataTypes[0]="json",r=t[o],t[o]=function(){a=arguments},s.always(function(){t[o]=r,i[o]&&(i.jsonpCallback=n.jsonpCallback,Xi.push(o)),a&&ce.isFunction(r)&&r(a[0]),a=r=e}),"script"):void 0});var Ui,Vi,Qi=0,Ji=t.ActiveXObject&&function(){var t;for(t in Ui)Ui[t](e,!0)};ce.ajaxSettings.xhr=t.ActiveXObject?function(){return!this.isLocal&&j()||L()}:j,Vi=ce.ajaxSettings.xhr(),ce.support.cors=!!Vi&&"withCredentials"in Vi,Vi=ce.support.ajax=!!Vi,Vi&&ce.ajaxTransport(function(i){if(!i.crossDomain||ce.support.cors){var n;return{send:function(s,o){var r,a,l=i.xhr();if(i.username?l.open(i.type,i.url,i.async,i.username,i.password):l.open(i.type,i.url,i.async),i.xhrFields)for(a in i.xhrFields)l[a]=i.xhrFields[a];i.mimeType&&l.overrideMimeType&&l.overrideMimeType(i.mimeType),i.crossDomain||s["X-Requested-With"]||(s["X-Requested-With"]="XMLHttpRequest");try{for(a in s)l.setRequestHeader(a,s[a])}catch(h){}l.send(i.hasContent&&i.data||null),n=function(t,s){var a,h,c,u;try{if(n&&(s||4===l.readyState))if(n=e,r&&(l.onreadystatechange=ce.noop,Ji&&delete Ui[r]),s)4!==l.readyState&&l.abort();else{u={},a=l.status,h=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(u.text=l.responseText);try{c=l.statusText}catch(p){c=""}a||!i.isLocal||i.crossDomain?1223===a&&(a=204):a=u.text?200:404}}catch(d){s||o(-1,d)}u&&o(a,c,u,h)},i.async?4===l.readyState?setTimeout(n):(r=++Qi,Ji&&(Ui||(Ui={},ce(t).unload(Ji)),Ui[r]=n),l.onreadystatechange=n):n()},abort:function(){n&&n(e,!0)}}}});var Gi,Zi,tn=/^(?:toggle|show|hide)$/,en=new RegExp("^(?:([+-])=|)("+ue+")([a-z%]*)$","i"),nn=/queueHooks$/,sn=[R],on={"*":[function(t,e){var i=this.createTween(t,e),n=i.cur(),s=en.exec(e),o=s&&s[3]||(ce.cssNumber[t]?"":"px"),r=(ce.cssNumber[t]||"px"!==o&&+n)&&en.exec(ce.css(i.elem,t)),a=1,l=20;if(r&&r[3]!==o){o=o||r[3],s=s||[],r=+n||1;do a=a||".5",r/=a,ce.style(i.elem,t,r+o);while(a!==(a=i.cur()/n)&&1!==a&&--l)}return s&&(r=i.start=+r||+n||0,i.unit=o,i.end=s[1]?r+(s[1]+1)*s[2]:+s[2]),i}]};ce.Animation=ce.extend(F,{tweener:function(t,e){ce.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var i,n=0,s=t.length;s>n;n++)i=t[n],on[i]=on[i]||[],on[i].unshift(e)},prefilter:function(t,e){e?sn.unshift(t):sn.push(t)}}),ce.Tween=B,B.prototype={constructor:B,init:function(t,e,i,n,s,o){this.elem=t,this.prop=i,this.easing=s||"swing",this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=o||(ce.cssNumber[i]?"":"px")},cur:function(){var t=B.propHooks[this.prop];return t&&t.get?t.get(this):B.propHooks._default.get(this)},run:function(t){var e,i=B.propHooks[this.prop];return this.pos=e=this.options.duration?ce.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):B.propHooks._default.set(this),this}},B.prototype.init.prototype=B.prototype,B.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=ce.css(t.elem,t.prop,""),e&&"auto"!==e?e:0):t.elem[t.prop]},set:function(t){ce.fx.step[t.prop]?ce.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[ce.cssProps[t.prop]]||ce.cssHooks[t.prop])?ce.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},B.propHooks.scrollTop=B.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},ce.each(["toggle","show","hide"],function(t,e){var i=ce.fn[e];ce.fn[e]=function(t,n,s){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(Y(e,!0),t,n,s)}}),ce.fn.extend({fadeTo:function(t,e,i,n){return this.filter(k).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var s=ce.isEmptyObject(t),o=ce.speed(e,i,n),r=function(){var e=F(this,ce.extend({},t),o);(s||ce._data(this,"finish"))&&e.stop(!0)};return r.finish=r,s||o.queue===!1?this.each(r):this.queue(o.queue,r)},stop:function(t,i,n){var s=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=i,i=t,t=e),i&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,i=null!=t&&t+"queueHooks",o=ce.timers,r=ce._data(this);if(i)r[i]&&r[i].stop&&s(r[i]);else for(i in r)r[i]&&r[i].stop&&nn.test(i)&&s(r[i]);for(i=o.length;i--;)o[i].elem!==this||null!=t&&o[i].queue!==t||(o[i].anim.stop(n),e=!1,o.splice(i,1));(e||!n)&&ce.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,i=ce._data(this),n=i[t+"queue"],s=i[t+"queueHooks"],o=ce.timers,r=n?n.length:0;for(i.finish=!0,ce.queue(this,t,[]),s&&s.stop&&s.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;r>e;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish})}}),ce.each({slideDown:Y("show"),slideUp:Y("hide"),slideToggle:Y("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){ce.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}}),ce.speed=function(t,e,i){var n=t&&"object"==typeof t?ce.extend({},t):{complete:i||!i&&e||ce.isFunction(t)&&t,duration:t,easing:i&&e||e&&!ce.isFunction(e)&&e};return n.duration=ce.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in ce.fx.speeds?ce.fx.speeds[n.duration]:ce.fx.speeds._default,(null==n.queue||n.queue===!0)&&(n.queue="fx"),n.old=n.complete,n.complete=function(){ce.isFunction(n.old)&&n.old.call(this),n.queue&&ce.dequeue(this,n.queue)},n},ce.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},ce.timers=[],ce.fx=B.prototype.init,ce.fx.tick=function(){var t,i=ce.timers,n=0;for(Gi=ce.now();n
-1,u={},p={};c?(p=r.position(),s=p.top,o=p.left):(s=parseFloat(l)||0,o=parseFloat(h)||0),ce.isFunction(e)&&(e=e.call(t,i,a)),null!=e.top&&(u.top=e.top-a.top+s),null!=e.left&&(u.left=e.left-a.left+o),"using"in e?e.using.call(t,u):r.css(u)}},ce.fn.extend({position:function(){if(this[0]){var t,e,i={top:0,left:0},n=this[0];return"fixed"===ce.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),ce.nodeName(t[0],"html")||(i=t.offset()),i.top+=ce.css(t[0],"borderTopWidth",!0),i.left+=ce.css(t[0],"borderLeftWidth",!0)),{top:e.top-i.top-ce.css(n,"marginTop",!0),left:e.left-i.left-ce.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||J;t&&!ce.nodeName(t,"html")&&"static"===ce.css(t,"position");)t=t.offsetParent;return t||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var n=/Y/.test(i);ce.fn[t]=function(s){return ce.access(this,function(t,s,o){var r=q(t);return o===e?r?i in r?r[i]:r.document.documentElement[s]:t[s]:(r?r.scrollTo(n?ce(r).scrollLeft():o,n?o:ce(r).scrollTop()):t[s]=o,void 0)},t,s,arguments.length,null)}}),ce.each({Height:"height",Width:"width"},function(t,i){ce.each({padding:"inner"+t,content:i,"":"outer"+t},function(n,s){ce.fn[s]=function(s,o){var r=arguments.length&&(n||"boolean"!=typeof s),a=n||(s===!0||o===!0?"margin":"border");return ce.access(this,function(i,n,s){var o;return ce.isWindow(i)?i.document.documentElement["client"+t]:9===i.nodeType?(o=i.documentElement,Math.max(i.body["scroll"+t],o["scroll"+t],i.body["offset"+t],o["offset"+t],o["client"+t])):s===e?ce.css(i,n,a):ce.style(i,n,s,a)},i,r?s:e,r,null)}})}),ce.fn.size=function(){return this.length},ce.fn.andSelf=ce.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=ce:(t.jQuery=t.$=ce,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ce}))}(window),function(t,e){function i(e,i){var s,o,r,a=e.nodeName.toLowerCase();return"area"===a?(s=e.parentNode,o=s.name,e.href&&o&&"map"===s.nodeName.toLowerCase()?(r=t("img[usemap=#"+o+"]")[0],!!r&&n(r)):!1):(/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}var s=0,o=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:function(e){return function(i,n){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),n&&n.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var n,s,o=t(this[0]);o.length&&o[0]!==document;){if(n=o.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(o.css("zIndex"),10),!isNaN(s)&&0!==s))return s;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,n){return!!t.data(e,n[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var n=t.attr(e,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(e,!s)}}),t("").outerWidth(1).jquery||t.each(["Width","Height"],function(i,n){function s(e,i,n,s){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,n&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),s&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===n?["Left","Right"]:["Top","Bottom"],r=n.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+n]=function(i){return i===e?a["inner"+n].call(this):this.each(function(){t(this).css(r,s(this,i)+"px")})},t.fn["outer"+n]=function(e,i){return"number"!=typeof e?a["outer"+n].call(this,e):this.each(function(){t(this).css(r,s(this,e,!0,i)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t(" ").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,n){var s,o=t.ui[e].prototype;for(s in n)o.plugins[s]=o.plugins[s]||[],o.plugins[s].push([i,n[s]])},call:function(t,e,i){var n,s=t.plugins[e];if(s&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(n=0;n0?!0:(e[n]=1,s=e[n]>0,e[n]=0,s)}})}(jQuery),function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=n(t("
"))
+}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(o.inline?e.parent()[0]:o.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))})}function s(e,i){t.extend(e,i);for(var n in i)null==i[n]&&(e[n]=i[n]);return e}t.extend(t.ui,{datepicker:{version:"1.10.3"}});var o,r="datepicker";t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return s(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var n,s,o;n=e.nodeName.toLowerCase(),s="div"===n||"span"===n,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),s),o.settings=t.extend({},i||{}),"input"===n?this._connectDatepicker(e,o):s&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var s=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("
")):this.dpDiv}},_connectDatepicker:function(e,i){var n=t(e);i.append=t([]),i.trigger=t([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,r,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var n,s,o,r=this._get(i,"appendText"),a=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=t(""+r+" "),e[a?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,"showOn"),("focus"===n||"both"===n)&&e.focus(this._showDatepicker),("button"===n||"both"===n)&&(s=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t(" ").addClass(this._triggerClass).attr({src:o,alt:s,title:s}):t(" ").addClass(this._triggerClass).html(o?t(" ").attr({src:o,alt:s,title:s}):s)),e[a?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,n,s,o=new Date(2009,11,20),r=this._get(t,"dateFormat");r.match(/[DM]/)&&(e=function(t){for(i=0,n=0,s=0;si&&(i=t[s].length,n=s);return n},o.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var n=t(e);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),t.data(e,r,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,n,o,a){var l,h,c,u,p,d=this._dialogInst;return d||(this.uuid+=1,l="dp"+this.uuid,this._dialogInput=t(" "),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],r,d)),s(d.settings,o||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(h=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,p=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+u,c/2-150+p]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],r,d),this},_destroyDatepicker:function(e){var i,n=t(e),s=t.data(e,r);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,r),"input"===i?(s.append.remove(),s.trigger.remove(),n.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&n.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,n,s=t(e),o=t.data(e,r);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(n=s.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,n,s=t(e),o=t.data(e,r);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(n=s.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;en||!i||i.indexOf(n)>-1):void 0},_doKeyUp:function(e){var i,n=t.datepicker._getInst(e.target);if(n.input.val()!==n.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,t.datepicker._getFormatConfig(n)),i&&(t.datepicker._setDateFromField(n),t.datepicker._updateAlternate(n),t.datepicker._updateDatepicker(n))}catch(s){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,n,o,r,a,l,h;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(i,"beforeShow"),o=n?n.apply(e,[e,i]):{},o!==!1&&(s(i.settings,o),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),a={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),a=t.datepicker._checkOffset(i,a,r),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),i.inline||(l=t.datepicker._get(i,"showAnim"),h=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[l]?i.dpDiv.show(l,t.datepicker._get(i,"showOptions"),h):i.dpDiv[l||"show"](l?h:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,o=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,n=this._getNumberOfMonths(e),s=n[1],r=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&e.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",r*s+"em"),e.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,n){var s=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,a=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:t(document).scrollLeft()),h=document.documentElement.clientHeight+(n?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?s-r:0,i.left-=n&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=n&&i.top===e.input.offset().top+a?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>l&&l>s?Math.abs(i.left+s-l):0),i.top-=Math.min(i.top,i.top+o>h&&h>o?Math.abs(o+a):0),i},_findPos:function(e){for(var i,n=this._getInst(e),s=this._get(n,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[s?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,n,s,o,a=this._curInst;!a||e&&a!==t.data(e,r)||this._datepickerShowing&&(i=this._get(a,"showAnim"),n=this._get(a,"duration"),s=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),n,s):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,s),i||s(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),n=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==n)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,n){var s=t(e),o=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(o,i+("M"===n?this._get(o,"showCurrentAtPos"):0),n),this._updateDatepicker(o))},_gotoToday:function(e){var i,n=t(e),s=this._getInst(n[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(i=new Date,s.selectedDay=i.getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(n)},_selectMonthYear:function(e,i,n){var s=t(e),o=this._getInst(s[0]);o["selected"+("M"===n?"Month":"Year")]=o["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(s)},_selectDay:function(e,i,n,s){var o,r=t(e);t(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(o=this._getInst(r[0]),o.selectedDay=o.currentDay=t("a",s).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=n,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var n,s=t(e),o=this._getInst(s[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),n=this._get(o,"onSelect"),n?n.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,n,s,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),n=this._getDate(e),s=this.formatDate(i,n,this._getFormatConfig(e)),t(o).each(function(){t(this).val(s)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,n){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?i.toString():i+"",""===i)return null;var s,o,r,a,l=0,h=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),u=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,p=(n?n.dayNames:null)||this._defaults.dayNames,d=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,f=(n?n.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,v=-1,y=-1,b=!1,_=function(t){var i=s+1g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),y>-1)for(m=1,v=y;;){if(o=this._getDaysInMonth(g,m-1),o>=v)break;m++,v-=o}if(a=this._daylightSavingAdjust(new Date(g,m-1,v)),a.getFullYear()!==g||a.getMonth()+1!==m||a.getDate()!==v)throw"Invalid date";return a},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:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,i){if(!e)return"";var n,s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=n+112?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var n=!e,s=t.selectedMonth,o=t.selectedYear,r=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=r.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=r.getMonth(),t.drawYear=t.selectedYear=t.currentYear=r.getFullYear(),s===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(n?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(n,-i,"M")},next:function(){t.datepicker._adjustDate(n,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(n)},selectDay:function(){return t.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(n,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,n,s,o,r,a,l,h,c,u,p,d,f,g,m,v,y,b,_,w,x,k,D,C,T,S,N,P,E,I,M,A,H,z,j,L,W,O,F=new Date,$=this._daylightSavingAdjust(new Date(F.getFullYear(),F.getMonth(),F.getDate())),R=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),Y=this._get(t,"hideIfNoPrevNext"),q=this._get(t,"navigationAsDateFormat"),X=this._getNumberOfMonths(t),K=this._get(t,"showCurrentAtPos"),U=this._get(t,"stepMonths"),V=1!==X[0]||1!==X[1],Q=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),J=this._getMinMaxDate(t,"min"),G=this._getMinMaxDate(t,"max"),Z=t.drawMonth-K,te=t.drawYear;if(0>Z&&(Z+=12,te--),G)for(e=this._daylightSavingAdjust(new Date(G.getFullYear(),G.getMonth()-X[0]*X[1]+1,G.getDate())),e=J&&J>e?J:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=q?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-U,1)),this._getFormatConfig(t)):i,n=this._canAdjustMonth(t,-1,te,Z)?""+i+" ":Y?"":""+i+" ",s=this._get(t,"nextText"),s=q?this.formatDate(s,this._daylightSavingAdjust(new Date(te,Z+U,1)),this._getFormatConfig(t)):s,o=this._canAdjustMonth(t,1,te,Z)?""+s+" ":Y?"":""+s+" ",r=this._get(t,"currentText"),a=this._get(t,"gotoCurrent")&&t.currentDay?Q:$,r=q?this.formatDate(r,a,this._getFormatConfig(t)):r,l=t.inline?"":""+this._get(t,"closeText")+" ",h=B?""+(R?l:"")+(this._isInRange(t,a)?""+r+" ":"")+(R?"":l)+"
":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),p=this._get(t,"dayNames"),d=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),y=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),_="",x=0;x"}for(S+="",N=u?""+this._get(t,"weekHeader")+" ":"",w=0;7>w;w++)P=(w+c)%7,N+="=5?" class='ui-datepicker-week-end'":"")+">"+d[P]+" ";for(S+=N+" ",E=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,E)),I=(this._getFirstDayOfMonth(te,Z)-c+7)%7,M=Math.ceil((I+E)/7),A=V?this.maxRows>M?this.maxRows:M:M,this.maxRows=A,H=this._daylightSavingAdjust(new Date(te,Z,1-I)),z=0;A>z;z++){for(S+="",j=u?""+this._get(t,"calculateWeek")(H)+" ":"",w=0;7>w;w++)L=m?m.apply(t.input?t.input[0]:null,[H]):[!0,""],W=H.getMonth()!==Z,O=W&&!y||!L[0]||J&&J>H||G&&H>G,j+=""+(W&&!v?" ":O?""+H.getDate()+" ":""+H.getDate()+" ")+" ",H.setDate(H.getDate()+1),H=this._daylightSavingAdjust(H);S+=j+" "}Z++,Z>11&&(Z=0,te++),S+="
"+(V?" "+(X[0]>0&&D===X[1]-1?"
":""):""),k+=S}_+=k}return _+=h,t._keyEvent=!1,_},_generateMonthYearHeader:function(t,e,i,n,s,o,r,a){var l,h,c,u,p,d,f,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),y=this._get(t,"showMonthAfterYear"),b="",_="";if(o||!m)_+=""+r[e]+" ";else{for(l=n&&n.getFullYear()===i,h=s&&s.getFullYear()===i,_+="",c=0;12>c;c++)(!l||c>=n.getMonth())&&(!h||c<=s.getMonth())&&(_+=""+a[c]+" ");_+=" "}if(y||(b+=_+(!o&&m&&v?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!v)b+=""+i+" ";else{for(u=this._get(t,"yearRange").split(":"),p=(new Date).getFullYear(),d=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?p+parseInt(t,10):parseInt(t,10);return isNaN(e)?p:e},f=d(u[0]),g=Math.max(f,d(u[1]||"")),f=n?Math.max(f,n.getFullYear()):f,g=s?Math.min(g,s.getFullYear()):g,t.yearshtml+="";g>=f;f++)t.yearshtml+=""+f+" ";t.yearshtml+=" ",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),y&&(b+=(!o&&m&&v?"":" ")+_),b+="
"},_adjustInstDate:function(t,e,i){var n=t.drawYear+("Y"===i?e:0),s=t.drawMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(n,s))+("D"===i?e:0),r=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(n,s,o)));t.selectedDay=r.getDate(),t.drawMonth=t.selectedMonth=r.getMonth(),t.drawYear=t.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),n=this._getMinMaxDate(t,"max"),s=i&&i>e?i:e;return n&&s>n?n:s},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,n){var s=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,n+(0>e?e:s[0]*s[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,n,s=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),r=null,a=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),r=parseInt(i[0],10),a=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=n),i[1].match(/[+\-].*/)&&(a+=n)),(!s||e.getTime()>=s.getTime())&&(!o||e.getTime()<=o.getTime())&&(!r||e.getFullYear()>=r)&&(!a||e.getFullYear()<=a)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,n){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var s=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(n,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));
+return this.formatDate(this._get(t,"dateFormat"),s,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.3"}(jQuery),function(t,e){var i=0,n=Array.prototype.slice,s=t.cleanData;t.cleanData=function(e){for(var i,n=0;null!=(i=e[n]);n++)try{t(i).triggerHandler("remove")}catch(o){}s(e)},t.widget=function(e,i,n){var s,o,r,a,l={},h=e.split(".")[0];e=e.split(".")[1],s=h+"-"+e,n||(n=i,i=t.Widget),t.expr[":"][s.toLowerCase()]=function(e){return!!t.data(e,s)},t[h]=t[h]||{},o=t[h][e],r=t[h][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new r(t,e)},t.extend(r,o,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(n,function(e,n){return t.isFunction(n)?(l[e]=function(){var t=function(){return i.prototype[e].apply(this,arguments)},s=function(t){return i.prototype[e].apply(this,t)};return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=s,e=n.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(l[e]=n,void 0)}),r.prototype=t.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix:e},l,{constructor:r,namespace:h,widgetName:e,widgetFullName:s}),o?(t.each(o._childConstructors,function(e,i){var n=i.prototype;t.widget(n.namespace+"."+n.widgetName,r,i._proto)}),delete o._childConstructors):i._childConstructors.push(r),t.widget.bridge(e,r)},t.widget.extend=function(i){for(var s,o,r=n.call(arguments,1),a=0,l=r.length;l>a;a++)for(s in r[a])o=r[a][s],r[a].hasOwnProperty(s)&&o!==e&&(i[s]=t.isPlainObject(o)?t.isPlainObject(i[s])?t.widget.extend({},i[s],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,s){var o=s.prototype.widgetFullName||i;t.fn[i]=function(r){var a="string"==typeof r,l=n.call(arguments,1),h=this;return r=!a&&l.length?t.widget.extend.apply(null,[r].concat(l)):r,a?this.each(function(){var n,s=t.data(this,o);return s?t.isFunction(s[r])&&"_"!==r.charAt(0)?(n=s[r].apply(s,l),n!==s&&n!==e?(h=n&&n.jquery?h.pushStack(n.get()):n,!1):void 0):t.error("no such method '"+r+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+r+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(r||{})._init():t.data(this,o,new s(r,this))}),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"",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.options=t.widget.extend({},this.options,this._getCreateOptions(),e),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._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.widgetName).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(i,n){var s,o,r,a=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(a={},s=i.split("."),i=s.shift(),s.length){for(o=a[i]=t.widget.extend({},this.options[i]),r=0;r
",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,l),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var r=this,a=this.options,c="checkbox"===this.type||"radio"===this.type,u=c?"":"ui-state-active",p="ui-state-focus";null===a.label&&(a.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(o).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){a.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){a.disabled||t(this).removeClass(u)}).bind("click"+this.eventNamespace,function(t){a.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){r.buttonElement.addClass(p)}).bind("blur"+this.eventNamespace,function(){r.buttonElement.removeClass(p)}),c&&(this.element.bind("change"+this.eventNamespace,function(){s||r.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){a.disabled||(s=!1,i=t.pageX,n=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){a.disabled||(i!==t.pageX||n!==t.pageY)&&(s=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return a.disabled||s?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(a.disabled||s)return!1;t(this).addClass("ui-state-active"),r.buttonElement.attr("aria-pressed","true");var e=r.element[0];h(e).not(e).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return a.disabled?!1:(t(this).addClass("ui-state-active"),e=this,r.document.one("mouseup",function(){e=null}),void 0)}).bind("mouseup"+this.eventNamespace,function(){return a.disabled?!1:(t(this).removeClass("ui-state-active"),void 0)}).bind("keydown"+this.eventNamespace,function(e){return a.disabled?!1:((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"),void 0)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",a.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(o+" "+r+" "+a).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1),void 0):(this._resetButton(),void 0)},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?h(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),void 0;var e=this.buttonElement.removeClass(a),i=t(" ",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),n=this.options.icons,s=n.primary&&n.secondary,o=[];n.primary||n.secondary?(this.options.text&&o.push("ui-button-text-icon"+(s?"s":n.primary?"-primary":"-secondary")),n.primary&&e.prepend(" "),n.secondary&&e.append(" "),this.options.text||(o.push(s?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):o.push("ui-button-text-only"),e.addClass(o.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.3",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(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var n=this,s=1===i.which,o="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return n._mouseMove(t)},this._mouseUpDelegate=function(t){return n._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(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)),!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}})}(jQuery),function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("
").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(this._trigger("drag",e,n)===!1)return this._mouseUp({}),!1;this.position=n.position}return 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"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,n=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(n=t.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,n=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_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(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.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.element.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.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,n,s=this.options;return s.containment?"window"===s.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===s.containment?(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):s.containment.constructor===Array?(this.containment=s.containment,void 0):("parent"===s.containment&&(s.containment=this.helper[0].parentNode),i=t(s.containment),n=i[0],n&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(e,i){i||(i=this.position);var n="absolute"===e?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:s.scrollTop(),left:s.scrollLeft()}),{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*n}},_generatePosition:function(e){var i,n,s,o,r=this.options,a="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=e.pageX,h=e.pageY;return this.offset.scroll||(this.offset.scroll={top:a.scrollTop(),left:a.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(n=this.relative_container.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,e.pageX-this.offset.click.lefti[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),r.grid&&(s=r.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,h=i?s-this.offset.click.top>=i[1]||s-this.offset.click.top>i[3]?s:s-this.offset.click.top>=i[1]?s-r.grid[1]:s+r.grid[1]:s,o=r.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-r.grid[0]:o+r.grid[0]:o)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,n){return n=n||this._uiHash(),t.ui.plugin.call(this,e,[i,n]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var n=t(this).data("ui-draggable"),s=n.options,o=t.extend({},i,{item:n.element});n.sortables=[],t(s.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(n.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,o))})},stop:function(e,i){var n=t(this).data("ui-draggable"),s=t.extend({},i,{item:n.element});t.each(n.sortables,function(){this.instance.isOver?(this.instance.isOver=0,n.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===n.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,s))})},drag:function(e,i){var n=t(this).data("ui-draggable"),s=this;t.each(n.sortables,function(){var o=!1,r=this;this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,t.each(n.sortables,function(){return this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this!==r&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(r.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(s).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=n.offset.click.top,this.instance.offset.click.left=n.offset.click.left,this.instance.offset.parent.left-=n.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=n.offset.parent.top-this.instance.offset.parent.top,n._trigger("toSortable",e),n.dropped=this.instance.element,n.currentItem=n.element,this.instance.fromOutside=n),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),n._trigger("fromSortable",e),n.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var n=t(i.helper),s=t(this).data("ui-draggable").options;n.css("opacity")&&(s._opacity=n.css("opacity")),n.css("opacity",s.opacity)},stop:function(e,i){var n=t(this).data("ui-draggable").options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),n=i.options,s=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(n.axis&&"x"===n.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY=0;u--)a=d.snapElements[u].left,l=a+d.snapElements[u].width,h=d.snapElements[u].top,c=h+d.snapElements[u].height,a-g>v||m>l+g||h-g>b||y>c+g||!t.contains(d.snapElements[u].item.ownerDocument,d.snapElements[u].item)?(d.snapElements[u].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,e,t.extend(d._uiHash(),{snapItem:d.snapElements[u].item})),d.snapElements[u].snapping=!1):("inner"!==f.snapMode&&(n=Math.abs(h-b)<=g,s=Math.abs(c-y)<=g,o=Math.abs(a-v)<=g,r=Math.abs(l-m)<=g,n&&(i.position.top=d._convertPositionTo("relative",{top:h-d.helperProportions.height,left:0}).top-d.margins.top),s&&(i.position.top=d._convertPositionTo("relative",{top:c,left:0}).top-d.margins.top),o&&(i.position.left=d._convertPositionTo("relative",{top:0,left:a-d.helperProportions.width}).left-d.margins.left),r&&(i.position.left=d._convertPositionTo("relative",{top:0,left:l}).left-d.margins.left)),p=n||s||o||r,"outer"!==f.snapMode&&(n=Math.abs(h-y)<=g,s=Math.abs(c-b)<=g,o=Math.abs(a-m)<=g,r=Math.abs(l-v)<=g,n&&(i.position.top=d._convertPositionTo("relative",{top:h,left:0}).top-d.margins.top),s&&(i.position.top=d._convertPositionTo("relative",{top:c-d.helperProportions.height,left:0}).top-d.margins.top),o&&(i.position.left=d._convertPositionTo("relative",{top:0,left:a}).left-d.margins.left),r&&(i.position.left=d._convertPositionTo("relative",{top:0,left:l-d.helperProportions.width}).left-d.margins.left)),!d.snapElements[u].snapping&&(n||s||o||r||p)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,e,t.extend(d._uiHash(),{snapItem:d.snapElements[u].item})),d.snapElements[u].snapping=n||s||o||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,n=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});n.length&&(e=parseInt(t(n[0]).css("zIndex"),10)||0,t(n).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+n.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var n=t(i.helper),s=t(this).data("ui-draggable").options;n.css("zIndex")&&(s._zIndex=n.css("zIndex")),n.css("zIndex",s.zIndex)},stop:function(e,i){var n=t(this).data("ui-draggable").options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}})}(jQuery),function(t,e){function i(t,e,i){return[parseFloat(t[0])*(d.test(t[0])?e/100:1),parseFloat(t[1])*(d.test(t[1])?i/100:1)]}function n(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var o,r=Math.max,a=Math.abs,l=Math.round,h=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,p=/^\w+/,d=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(o!==e)return o;var i,n,s=t(""),r=s.children()[0];return t("body").append(s),i=r.offsetWidth,s.css("overflow","scroll"),n=r.offsetWidth,i===n&&(n=s[0].clientWidth),s.remove(),o=i-n},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),n=e.isWindow?"":e.element.css("overflow-y"),s="scroll"===i||"auto"===i&&e.widthn?"left":i>0?"right":"center",vertical:0>o?"top":s>0?"bottom":"middle"};u>d&&a(i+n)g&&a(s+o)r(a(s),a(o))?"horizontal":"vertical",e.using.call(this,t,l)}),c.offset(t.extend(T,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollLeft:n.offset.left,o=n.width,a=t.left-e.collisionPosition.marginLeft,l=s-a,h=a+e.collisionWidth-o-s;e.collisionWidth>o?l>0&&0>=h?(i=t.left+l+e.collisionWidth-o-s,t.left+=l-i):t.left=h>0&&0>=l?s:l>h?s+o-e.collisionWidth:s:l>0?t.left+=l:h>0?t.left-=h:t.left=r(t.left-a,t.left)},top:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,a=t.top-e.collisionPosition.marginTop,l=s-a,h=a+e.collisionHeight-o-s;e.collisionHeight>o?l>0&&0>=h?(i=t.top+l+e.collisionHeight-o-s,t.top+=l-i):t.top=h>0&&0>=l?s:l>h?s+o-e.collisionHeight:s:l>0?t.top+=l:h>0?t.top-=h:t.top=r(t.top-a,t.top)}},flip:{left:function(t,e){var i,n,s=e.within,o=s.offset.left+s.scrollLeft,r=s.width,l=s.isWindow?s.scrollLeft:s.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,p="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];0>c?(i=t.left+p+d+f+e.collisionWidth-r-o,(0>i||i0&&(n=t.left-e.collisionPosition.marginLeft+p+d+f-l,(n>0||a(n)c?(n=t.top+d+f+g+e.collisionHeight-r-o,t.top+d+f+g>c&&(0>n||n0&&(i=t.top-e.collisionPosition.marginTop+d+f+g-l,t.top+d+f+g>u&&(i>0||a(i)10&&11>s,e.innerHTML="",i.removeChild(e)}()}(jQuery),function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,n,s,o,r=this,a=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("
").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;i "),s.css({zIndex:a.zIndex}),"se"===n&&s.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[n]=".ui-resizable-"+n,this.element.append(s);this._renderAxis=function(e){var i,n,s,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(n=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),s=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(s,o),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){r.resizing||(this.className&&(s=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=s&&s[1]?s[1]:"se")}),a.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){a.disabled||(t(this).removeClass("ui-resizable-autohide"),r._handles.show())}).mouseleave(function(){a.disabled||r.resizing||(t(this).addClass("ui-resizable-autohide"),r._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,n,s=!1;for(i in this.handles)n=t(this.handles[i])[0],(n===e.target||t.contains(n,e.target))&&(s=!0);return!this.options.disabled&&s},_mouseStart:function(i){var n,s,o,r=this.options,a=this.element.position(),l=this.element;return this.resizing=!0,/absolute/.test(l.css("position"))?l.css({position:"absolute",top:l.css("top"),left:l.css("left")}):l.is(".ui-draggable")&&l.css({position:"absolute",top:a.top,left:a.left}),this._renderProxy(),n=e(this.helper.css("left")),s=e(this.helper.css("top")),r.containment&&(n+=t(r.containment).scrollLeft()||0,s+=t(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:s},this.size=this._helper?{width:l.outerWidth(),height:l.outerHeight()}:{width:l.width(),height:l.height()},this.originalSize=this._helper?{width:l.outerWidth(),height:l.outerHeight()}:{width:l.width(),height:l.height()},this.originalPosition={left:n,top:s},this.sizeDiff={width:l.outerWidth()-l.width(),height:l.outerHeight()-l.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof r.aspectRatio?r.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),l.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,n=this.helper,s={},o=this.originalMousePosition,r=this.axis,a=this.position.top,l=this.position.left,h=this.size.width,c=this.size.height,u=e.pageX-o.left||0,p=e.pageY-o.top||0,d=this._change[r];return d?(i=d.apply(this,[e,u,p]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==a&&(s.top=this.position.top+"px"),this.position.left!==l&&(s.left=this.position.left+"px"),this.size.width!==h&&(s.width=this.size.width+"px"),this.size.height!==c&&(s.height=this.size.height+"px"),n.css(s),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,n,s,o,r,a,l,h=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,n=i.length&&/textarea/i.test(i[0].nodeName),s=n&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,o=n?0:c.sizeDiff.width,r={width:c.helper.width()-o,height:c.helper.height()-s},a=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,l=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,h.animate||this.element.css(t.extend(r,{top:l,left:a})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!h.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,n,s,o,r,a=this.options;r={minWidth:i(a.minWidth)?a.minWidth:0,maxWidth:i(a.maxWidth)?a.maxWidth:1/0,minHeight:i(a.minHeight)?a.minHeight:0,maxHeight:i(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=r.minHeight*this.aspectRatio,s=r.minWidth/this.aspectRatio,n=r.maxHeight*this.aspectRatio,o=r.maxWidth/this.aspectRatio,e>r.minWidth&&(r.minWidth=e),s>r.minHeight&&(r.minHeight=s),nt.width,a=i(t.height)&&e.minHeight&&e.minHeight>t.height,l=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,c=/sw|nw|w/.test(n),u=/nw|ne|n/.test(n);return r&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),r&&c&&(t.left=l-e.minWidth),s&&c&&(t.left=l-e.maxWidth),a&&u&&(t.top=h-e.minHeight),o&&u&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,n,s,o=this.helper||this.element;for(t=0;t"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,n=this.originalPosition;return{left:n.left+e,width:i.width-e}},n:function(t,e,i){var n=this.originalSize,s=this.originalPosition;return{top:s.top+i,height:n.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},sw:function(e,i,n){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,n]))},ne:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,n]))},nw:function(e,i,n){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,n]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),n=i.options,s=i._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),r=o&&t.ui.hasScroll(s[0],"left")?0:i.sizeDiff.height,a=o?0:i.sizeDiff.width,l={width:i.size.width-a,height:i.size.height-r},h=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(l,c&&h?{top:c,left:h}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};s&&s.length&&t(s[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,n,s,o,r,a,l,h=t(this).data("ui-resizable"),c=h.options,u=h.element,p=c.containment,d=p instanceof t?p.get(0):/parent/.test(p)?u.parent().get(0):p;d&&(h.containerElement=t(d),/document/.test(p)||p===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(d),n=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){n[t]=e(i.css("padding"+s))}),h.containerOffset=i.offset(),h.containerPosition=i.position(),h.containerSize={height:i.innerHeight()-n[3],width:i.innerWidth()-n[1]},s=h.containerOffset,o=h.containerSize.height,r=h.containerSize.width,a=t.ui.hasScroll(d,"left")?d.scrollWidth:r,l=t.ui.hasScroll(d)?d.scrollHeight:o,h.parentData={element:d,left:s.left,top:s.top,width:a,height:l}))},resize:function(e){var i,n,s,o,r=t(this).data("ui-resizable"),a=r.options,l=r.containerOffset,h=r.position,c=r._aspectRatio||e.shiftKey,u={top:0,left:0},p=r.containerElement;p[0]!==document&&/static/.test(p.css("position"))&&(u=l),h.left<(r._helper?l.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-l.left:r.position.left-u.left),c&&(r.size.height=r.size.width/r.aspectRatio),r.position.left=a.helper?l.left:0),h.top<(r._helper?l.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-l.top:r.position.top),c&&(r.size.width=r.size.height*r.aspectRatio),r.position.top=r._helper?l.top:0),r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top,i=Math.abs((r._helper?r.offset.left-u.left:r.offset.left-u.left)+r.sizeDiff.width),n=Math.abs((r._helper?r.offset.top-u.top:r.offset.top-l.top)+r.sizeDiff.height),s=r.containerElement.get(0)===r.element.parent().get(0),o=/relative|absolute/.test(r.containerElement.css("position")),s&&o&&(i-=r.parentData.left),i+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-i,c&&(r.size.height=r.size.width/r.aspectRatio)),n+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-n,c&&(r.size.width=r.size.height*r.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,n=e.containerOffset,s=e.containerPosition,o=e.containerElement,r=t(e.helper),a=r.offset(),l=r.outerWidth()-e.sizeDiff.width,h=r.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:a.left-s.left-n.left,width:l,height:h}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:a.left-s.left-n.left,width:l,height:h})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,n=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?n(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],n(i.alsoResize)):t.each(i.alsoResize,function(t){n(t)})},resize:function(e,i){var n=t(this).data("ui-resizable"),s=n.options,o=n.originalSize,r=n.originalPosition,a={height:n.size.height-o.height||0,width:n.size.width-o.width||0,top:n.position.top-r.top||0,left:n.position.left-r.left||0},l=function(e,n){t(e).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),o={},r=n&&n.length?n:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(r,function(t,e){var i=(s[e]||0)+(a[e]||0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})};"object"!=typeof s.alsoResize||s.alsoResize.nodeType?l(s.alsoResize):t.each(s.alsoResize,function(t,e){l(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,n=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,n=e.size,s=e.originalSize,o=e.originalPosition,r=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=a[0]||1,h=a[1]||1,c=Math.round((n.width-s.width)/l)*l,u=Math.round((n.height-s.height)/h)*h,p=s.width+c,d=s.height+u,f=i.maxWidth&&i.maxWidthp,v=i.minHeight&&i.minHeight>d;i.grid=a,m&&(p+=l),v&&(d+=h),f&&(p-=l),g&&(d-=h),/^(se|s|e)$/.test(r)?(e.size.width=p,e.size.height=d):/^(ne)$/.test(r)?(e.size.width=p,e.size.height=d,e.position.top=o.top-u):/^(sw)$/.test(r)?(e.size.width=p,e.size.height=d,e.position.left=o.left-c):(e.size.width=p,e.size.height=d,e.position.top=o.top-u,e.position.left=o.left-c)}})}(jQuery),function(t){var e={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||t(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._trigger("open"),void 0)},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("
").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),void 0;if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),n=i.filter(":first"),s=i.filter(":last");e.target!==s[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==n[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(s.focus(1),e.preventDefault()):(n.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("
").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("
").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("
").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html(" "),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("
").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),void 0):(t.each(i,function(i,n){var s,o;n=t.isFunction(n)?{click:n,text:i}:n,n=t.extend({type:"button"},n),s=n.click,n.click=function(){s.apply(e.element[0],arguments)},o={icons:n.icons,text:n.showText},delete n.icons,delete n.showText,t("
",n).button(o).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,s){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",n,e(s))},drag:function(t,n){i._trigger("drag",t,e(n))},stop:function(s,o){n.position=[o.position.left-i.document.scrollLeft(),o.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",s,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,n=this.options,s=n.resizable,o=this.uiDialog.css("position"),r="string"==typeof s?s:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:r,start:function(n,s){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",n,e(s))
+},resize:function(t,n){i._trigger("resize",t,e(n))},stop:function(s,o){n.height=t(this).height(),n.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",s,e(o))}}).css("position",o)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(n){var s=this,o=!1,r={};t.each(n,function(t,n){s._setOption(t,n),t in e&&(o=!0),t in i&&(r[t]=n)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(t,e){var i,n,s=this.uiDialog;"dialogClass"===t&&s.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=s.is(":data(ui-draggable)"),i&&!e&&s.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(n=s.is(":data(ui-resizable)"),n&&!e&&s.resizable("destroy"),n&&"string"==typeof e&&s.resizable("option","handles",e),n||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),t=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),e=Math.max(0,n.minHeight-t),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-t):"none","auto"===n.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("
").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(n){e._allowInteraction(n)||(n.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("
").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,n=[],s=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(n=i.split?i.split(" "):[i[0],i[1]],1===n.length&&(n[1]=n[0]),t.each(["left","top"],function(t,e){+n[t]===n[t]&&(s[t]=n[t],n[t]=e)}),i={my:n[0]+(s[0]<0?s[0]:"+"+s[0])+" "+n[1]+(s[1]<0?s[1]:"+"+s[1]),at:n.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.3",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},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var n=null,s=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(n=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(n=t(e.target)),n?!this.options.handle||i||(t(this.options.handle,n).find("*").addBack().each(function(){this===e.target&&(s=!0)}),s)?(this.currentItem=n,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,n){var s,o,r=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,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",r.cursor),this.storedStylesheet=t("").appendTo(o)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)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&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,n,s,o,r=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]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY
=0;i--)if(n=this.items[i],s=n.item[0],o=this._intersectsWithPointer(n),o&&n.instance===this.currentContainer&&s!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==s&&!t.contains(this.placeholder[0],s)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],s):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(e,n),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,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var n=this,s=this.placeholder.offset(),o=this.options.axis,r={};o&&"x"!==o||(r.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(r.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(r,parseInt(this.options.revert,10)||500,function(){n._clear(e)})}else this._clear(e,i);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 i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&n.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!n.length&&e.key&&n.push(e.key+"="),n.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},i.each(function(){n.push(t(e.item||this).attr(e.attribute||"id")||"")}),n},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,n=this.positionAbs.top,s=n+this.helperProportions.height,o=t.left,r=o+t.width,a=t.top,l=a+t.height,h=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||n+h>a&&l>n+h,p="y"===this.options.axis||e+c>o&&r>e+c,d=u&&p;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?d:o0?"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.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,n,s,o,r=[],a=[],l=this._connectWith();if(l&&e)for(i=l.length-1;i>=0;i--)for(s=t(l[i]),n=s.length-1;n>=0;n--)o=t.data(s[n],this.widgetFullName),o&&o!==this&&!o.options.disabled&&a.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(a.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=a.length-1;i>=0;i--)a[i][0].each(function(){r.push(this)});return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;i=0;i--)for(s=t(p[i]),n=s.length-1;n>=0;n--)o=t.data(s[n],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(r=u[i][1],a=u[i][0],n=0,h=a.length;h>n;n++)l=t(a[n]),l.data(this.widgetName+"-item",r),c.push({item:l,instance:r,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,n,s,o;for(i=this.items.length-1;i>=0;i--)n=this.items[i],n.instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(s=this.options.toleranceElement?t(this.options.toleranceElement,n.item):n.item,e||(n.width=s.outerWidth(),n.height=s.outerHeight()),o=s.offset(),n.left=o.left,n.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,n=e.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=e.currentItem[0].nodeName.toLowerCase(),s=t("<"+n+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===n?e.currentItem.children().each(function(){t(" ",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(s)}):"img"===n&&s.attr("src",e.currentItem.attr("src")),i||s.css("visibility","hidden"),s},update:function(t,s){(!i||n.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(n.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),n.placeholder.update(e,e.placeholder)},_contactContainers:function(n){var s,o,r,a,l,h,c,u,p,d,f=null,g=null;for(s=this.containers.length-1;s>=0;s--)if(!t.contains(this.currentItem[0],this.containers[s].element[0]))if(this._intersectsWith(this.containers[s].containerCache)){if(f&&t.contains(this.containers[s].element[0],f.element[0]))continue;f=this.containers[s],g=s}else this.containers[s].containerCache.over&&(this.containers[s]._trigger("out",n,this._uiHash(this)),this.containers[s].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",n,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(r=1e4,a=null,d=f.floating||i(this.currentItem),l=d?"left":"top",h=d?"width":"height",c=this.positionAbs[l]+this.offset.click[l],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!d||e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[l],p=!1,Math.abs(u-c)>Math.abs(u+this.items[o][h]-c)&&(p=!0,u+=this.items[o][h]),Math.abs(u-c)this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),s.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/s.grid[1])*s.grid[1],r=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-s.grid[1]:i+s.grid[1]:i,n=this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0],o=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-s.grid[0]:n+s.grid[0]:n)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-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,i,n){i?i[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(!n)})},_clear:function(t,e){this.reverting=!1;var i,n=[];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&&n.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||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.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||n.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(n.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(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,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;i'),c=' ';l!==e&&a!==e&&(c+=' '),r&&h.attr("target",r),h.hide().append(c).appendTo("body"),h.submit()},disableFormElements:function(e){e.find(i.disableSelector).each(function(){var e=t(this),i=e.is("button")?"html":"val";e.data("ujs:enable-with",e[i]()),e[i](e.data("disable-with")),e.prop("disabled",!0)})},enableFormElements:function(e){e.find(i.enableSelector).each(function(){var e=t(this),i=e.is("button")?"html":"val";e.data("ujs:enable-with")&&e[i](e.data("ujs:enable-with")),e.prop("disabled",!1)})},allowAction:function(t){var e,n=t.data("confirm"),s=!1;return n?(i.fire(t,"confirm")&&(s=i.confirm(n),e=i.fire(t,"confirm:complete",[s])),s&&e):!0},blankInputs:function(e,i,n){var s,o,r=t(),a=i||"input,textarea",l=e.find(a);return l.each(function(){if(s=t(this),o=s.is("input[type=checkbox],input[type=radio]")?s.is(":checked"):s.val(),!o==!n){if(s.is("input[type=radio]")&&l.filter('input[type=radio]:checked[name="'+s.attr("name")+'"]').length)return!0;r=r.add(s)}}),r.length?r:!1},nonBlankInputs:function(t,e){return i.blankInputs(t,e,!0)},stopEverything:function(e){return t(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(t){t.data("ujs:enable-with",t.html()),t.html(t.data("disable-with")),t.bind("click.railsDisable",function(t){return i.stopEverything(t)})},enableElement:function(t){t.data("ujs:enable-with")!==e&&(t.html(t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.unbind("click.railsDisable")}},i.fire(n,"rails:attachBindings")&&(t.ajaxPrefilter(function(t,e,n){t.crossDomain||i.CSRFProtection(n)}),n.delegate(i.linkDisableSelector,"ajax:complete",function(){i.enableElement(t(this))}),n.delegate(i.linkClickSelector,"click.rails",function(n){var s=t(this),o=s.data("method"),r=s.data("params");if(!i.allowAction(s))return i.stopEverything(n);if(s.is(i.linkDisableSelector)&&i.disableElement(s),s.data("remote")!==e){if(!(!n.metaKey&&!n.ctrlKey||o&&"GET"!==o||r))return!0;var a=i.handleRemote(s);return a===!1?i.enableElement(s):a.error(function(){i.enableElement(s)}),!1}return s.data("method")?(i.handleMethod(s),!1):void 0}),n.delegate(i.buttonClickSelector,"click.rails",function(e){var n=t(this);return i.allowAction(n)?(i.handleRemote(n),!1):i.stopEverything(e)}),n.delegate(i.inputChangeSelector,"change.rails",function(e){var n=t(this);
+return i.allowAction(n)?(i.handleRemote(n),!1):i.stopEverything(e)}),n.delegate(i.formSubmitSelector,"submit.rails",function(n){var s=t(this),o=s.data("remote")!==e,r=i.blankInputs(s,i.requiredInputSelector),a=i.nonBlankInputs(s,i.fileInputSelector);if(!i.allowAction(s))return i.stopEverything(n);if(r&&s.attr("novalidate")==e&&i.fire(s,"ajax:aborted:required",[r]))return i.stopEverything(n);if(o){if(a){setTimeout(function(){i.disableFormElements(s)},13);var l=i.fire(s,"ajax:aborted:file",[a]);return l||setTimeout(function(){i.enableFormElements(s)},13),l}return i.handleRemote(s),!1}setTimeout(function(){i.disableFormElements(s)},13)}),n.delegate(i.formInputClickSelector,"click.rails",function(e){var n=t(this);if(!i.allowAction(n))return i.stopEverything(e);var s=n.attr("name"),o=s?{name:s,value:n.val()}:null;n.closest("form").data("ujs:submit-button",o)}),n.delegate(i.formSubmitSelector,"ajax:beforeSend.rails",function(e){this==e.target&&i.disableFormElements(t(this))}),n.delegate(i.formSubmitSelector,"ajax:complete.rails",function(e){this==e.target&&i.enableFormElements(t(this))}),t(function(){var e=t("meta[name=csrf-token]").attr("content"),i=t("meta[name=csrf-param]").attr("content");t('form input[name="'+i+'"]').val(e)}))}(jQuery),function(){window.ActiveAdmin={},window.AA||(window.AA=window.ActiveAdmin)}.call(this),function(){$(function(){return $(".batch_actions_selector li a").click(function(t){var e,i=this;return t.stopPropagation(),t.preventDefault(),(e=$(this).data("confirm"))?ActiveAdmin.modal_dialog(e,$(this).data("inputs"),function(t){return $(i).trigger("confirm:complete",t)}):$(this).trigger("confirm:complete")}),$(".batch_actions_selector li a").on("confirm:complete",function(t,e){var i;return(i=JSON.stringify(e))?$("#batch_action_inputs").val(i):$("#batch_action_inputs").attr("disabled","disabled"),$("#batch_action").val($(this).data("action")),$("#collection_selection").submit()}),$(".batch_actions_selector").length&&$(":checkbox.toggle_all").length?($(".paginated_collection table.index_table").length?$(".paginated_collection table.index_table").tableCheckboxToggler():$(".paginated_collection").checkboxToggler(),$(document).on("change",".paginated_collection :checkbox",function(){return $(".paginated_collection :checkbox:checked").length?$(".batch_actions_selector").each(function(){return $(this).aaDropdownMenu("enable")}):$(".batch_actions_selector").each(function(){return $(this).aaDropdownMenu("disable")})})):void 0})}.call(this),function(){ActiveAdmin.CheckboxToggler=function(){function t(t,e){var i;this.options=t,this.container=e,i={},this.options=$.extend(i,t),this._init(),this._bind()}return t.prototype._init=function(){if(!this.container)throw new Error("Container element not found");if(this.$container=$(this.container),!this.$container.find(".toggle_all").length)throw new Error('"toggle all" checkbox not found');return this.toggle_all_checkbox=this.$container.find(".toggle_all"),this.checkboxes=this.$container.find(":checkbox").not(this.toggle_all_checkbox)},t.prototype._bind=function(){var t=this;return this.checkboxes.change(function(e){return t._didChangeCheckbox(e.target)}),this.toggle_all_checkbox.change(function(){return t._didChangeToggleAllCheckbox()})},t.prototype._didChangeCheckbox=function(){switch(this.checkboxes.filter(":checked").length){case this.checkboxes.length-1:return this.toggle_all_checkbox.prop({checked:null});case this.checkboxes.length:return this.toggle_all_checkbox.prop({checked:!0})}},t.prototype._didChangeToggleAllCheckbox=function(){var t,e=this;return t=this.toggle_all_checkbox.prop("checked")?!0:null,this.checkboxes.each(function(i,n){return $(n).prop({checked:t}),e._didChangeCheckbox(n)})},t}(),$.widget.bridge("checkboxToggler",ActiveAdmin.CheckboxToggler)}.call(this),function(){ActiveAdmin.DropdownMenu=function(){function t(t,e){var i;this.options=t,this.element=e,this.$element=$(this.element),i={fadeInDuration:20,fadeOutDuration:100,onClickActionItemCallback:null},this.options=$.extend(i,t),this.isOpen=!1,this.$menuButton=this.$element.find(".dropdown_menu_button"),this.$menuList=this.$element.find(".dropdown_menu_list_wrapper"),this._buildMenuList(),this._bind()}return t.prototype.open=function(){return this.isOpen=!0,this.$menuList.fadeIn(this.options.fadeInDuration),this._positionMenuList(),this._positionNipple(),this},t.prototype.close=function(){return this.isOpen=!1,this.$menuList.fadeOut(this.options.fadeOutDuration),this},t.prototype.destroy=function(){return this.$element.unbind(),this.$element=null,this},t.prototype.isDisabled=function(){return this.$menuButton.hasClass("disabled")},t.prototype.disable=function(){return this.$menuButton.addClass("disabled")},t.prototype.enable=function(){return this.$menuButton.removeClass("disabled")},t.prototype.option=function(t,e){return $.isPlainObject(t)?this.options=$.extend(!0,this.options,t):null!=t?this.options[t]:this.options[t]=e},t.prototype._buildMenuList=function(){return this.$nipple=$(''),this.$menuList.prepend(this.$nipple),this.$menuList.hide()},t.prototype._bind=function(){var t=this;return $("body").click(function(){return t.isOpen?t.close():void 0}),this.$menuButton.click(function(){return t.isDisabled()||(t.isOpen?t.close():t.open()),!1})},t.prototype._positionMenuList=function(){var t,e;return t=this.$menuButton.position().left+this.$menuButton.outerWidth()/2,e=this.$menuList.outerWidth()/2,this.$menuList.css("left",t-e)},t.prototype._positionNipple=function(){return this.$menuList.css("top",this.$menuButton.position().top+this.$menuButton.outerHeight()+10),this.$nipple.css("left",this.$menuList.outerWidth()/2-this.$nipple.outerWidth()/2)},t}(),$.widget.bridge("aaDropdownMenu",ActiveAdmin.DropdownMenu),$(function(){return $(".dropdown_menu").aaDropdownMenu()})}.call(this),function(){var t,e;$(function(){return $(document).on("click","a.button.has_many_remove",function(t){var i,n;return t.preventDefault(),i=$(this).closest(".has_many_container"),n=$(this).closest("fieldset"),e(i),i.trigger("has_many_remove:before",[n]),n.remove()}),$(document).on("click","a.button.has_many_add",function(t){var i,n,s,o,r,a,l;return t.preventDefault(),n=$(this),a=n.closest(".has_many_container"),a.trigger(i=$.Event("has_many_add:before")),i.isDefaultPrevented()?void 0:(r=a.data("has_many_index")||a.children("fieldset").length-1,a.data({has_many_index:++r}),l=new RegExp(n.data("placeholder"),"g"),o=n.data("html").replace(l,r),s=$(o).insertBefore(this),e(a),a.trigger("has_many_add:after",[s]))}),$(document).on("change",'.has_many_container[data-sortable] :input[name$="[_destroy]"]',function(){return e($(this).closest(".has_many"))}),t(),$(document).on("has_many_add:after",".has_many_container",t)}),t=function(){var t;return t=$(".has_many_container[data-sortable]:not(.ui-sortable)"),t.sortable({items:"> fieldset",handle:"> ol > .handle",stop:e}),t.each(e)},e=function(t){var e,i;return t=t instanceof jQuery?t:$(this),e=t.data("sortable"),i=0,t.children("fieldset").each(function(){var t,n,s;return n=$(this),t=n.find("> ol > .input > :input[name$='[_destroy]']"),s=n.find("> ol > .input > :input[name$='["+e+"]']"),s.length?s.val(t.is(":checked")?"":i++):void 0})}}.call(this),function(){ActiveAdmin.modal_dialog=function(t,e,i){var n,s,o,r,a,l,h,c,u,p;s='",$(s).appendTo("body").dialog({modal:!0,buttons:{OK:function(){return i($(this).serializeObject()),$(this).dialog("close")},Cancel:function(){return $(this).dialog("close").remove()}}})}}.call(this),function(){ActiveAdmin.Popover=function(){function t(t,e){var i;this.options=t,this.element=e,this.$element=$(this.element),i={fadeInDuration:20,fadeOutDuration:100,autoOpen:!0,pageWrapperElement:"#wrapper",onClickActionItemCallback:null},this.options=$.extend(i,t),this.isOpen=!1,(this.$popover=$(this.$element.attr("href"))).length||(this.$popover=this.$element.next(".popover")),this._buildPopover(),this._bind()}return t.prototype.open=function(){return this.isOpen=!0,this.$popover.fadeIn(this.options.fadeInDuration),this._positionPopover(),this._positionNipple(),this},t.prototype.close=function(){return this.isOpen=!1,this.$popover.fadeOut(this.options.fadeOutDuration),this},t.prototype.destroy=function(){return this.$element.removeData("popover"),this.$element.unbind(),this.$element=null,this},t.prototype._buildPopover=function(){return this.$nipple=$('
'),this.$popover.prepend(this.$nipple),this.$popover.hide(),this.$popover.addClass("popover")},t.prototype._bind=function(){var t=this;return $(this.options.pageWrapperElement).click(function(){return t.isOpen?t.close():void 0}),this.options.autoOpen?this.$element.click(function(e){return e.stopPropagation(),t.isOpen?t.close():t.open()}):void 0},t.prototype._positionPopover=function(){var t,e;return t=this.$element.offset().left+this.$element.outerWidth()/2,e=this.$popover.outerWidth()/2,this.$popover.css("left",t-e)},t.prototype._positionNipple=function(){return this.$popover.css("top",this.$element.offset().top+this.$element.outerHeight()+10),this.$nipple.css("left",this.$popover.outerWidth()/2-this.$nipple.outerWidth()/2)},t}(),$.widget.bridge("popover",ActiveAdmin.Popover)}.call(this),function(){var t,e={}.hasOwnProperty,i=function(t,i){function n(){this.constructor=t}for(var s in i)e.call(i,s)&&(t[s]=i[s]);return n.prototype=i.prototype,t.prototype=new n,t.__super__=i.prototype,t};ActiveAdmin.TableCheckboxToggler=function(e){function n(){return t=n.__super__.constructor.apply(this,arguments)}return i(n,e),n.prototype._init=function(){return n.__super__._init.apply(this,arguments)},n.prototype._bind=function(){var t=this;return n.__super__._bind.apply(this,arguments),this.$container.find("tbody td").click(function(e){return"checkbox"!==e.target.type?t._didClickCell(e.target):void 0})},n.prototype._didChangeCheckbox=function(t){var e;return n.__super__._didChangeCheckbox.apply(this,arguments),e=$(t).parents("tr"),t.checked?e.addClass("selected"):e.removeClass("selected")},n.prototype._didClickCell=function(t){return $(t).parent("tr").find(":checkbox").click()},n}(ActiveAdmin.CheckboxToggler),$.widget.bridge("tableCheckboxToggler",ActiveAdmin.TableCheckboxToggler)}.call(this),function(){$.ui.dialog.prototype._focusTabbable=function(){return this.uiDialog.focus()}}.call(this),function(){$.fn.serializeObject=function(){var t,e,i,n,s;for(e={},s=this.serializeArray(),i=0,n=s.length;n>i;i++)t=s[i],e[t.name]=t.value;return e}}.call(this),function(){$(function(){var t;return $(document).on("focus",".datepicker:not(.hasDatepicker)",function(){var t,e;return t={dateFormat:"yy-mm-dd"},e=$(this).data("datepicker-options"),$(this).datepicker($.extend(t,e))}),$(".clear_filters_btn").click(function(){return window.location.search=""}),$(".dropdown_button").popover(),$(".filter_form").submit(function(){return $(this).find(":input").filter(function(){return""===this.value}).prop("disabled",!0)}),$(".filter_form_field.select_and_search select").change(function(){return $(this).siblings("input").prop({name:"q["+this.value+"]"})}),(t=$(".table_tools .batch_actions_selector")).length?t.next().css({width:"calc(100% - 10px - "+t.outerWidth()+"px)","float":"right"}):void 0})}.call(this),function(){}.call(this);
\ No newline at end of file
diff --git a/public/assets/active_admin-e2737089875438ec064e9877651c73e3.js.gz b/public/assets/active_admin-e2737089875438ec064e9877651c73e3.js.gz
new file mode 100644
index 0000000..0f304ad
Binary files /dev/null and b/public/assets/active_admin-e2737089875438ec064e9877651c73e3.js.gz differ
diff --git a/public/assets/ajax-loader-59b8fb62c74dad5cdbf036695be29b15.gif b/public/assets/ajax-loader-59b8fb62c74dad5cdbf036695be29b15.gif
new file mode 100644
index 0000000..3c2f7c0
Binary files /dev/null and b/public/assets/ajax-loader-59b8fb62c74dad5cdbf036695be29b15.gif differ
diff --git a/public/assets/application-176ef6f23f47be510b81c7f53e30cd99.js b/public/assets/application-176ef6f23f47be510b81c7f53e30cd99.js
new file mode 100644
index 0000000..1d44465
--- /dev/null
+++ b/public/assets/application-176ef6f23f47be510b81c7f53e30cd99.js
@@ -0,0 +1,6 @@
+function reloadCharts(){return-1===navigator.userAgent.toLowerCase().indexOf("firefox")?!1:($('.ui-widget-content [aria-expanded="false"]').find("iframe").each(function(){var t=$(this).attr("src");-1!==t.indexOf("charts")&&($(this).hide(),$(this).attr("src",t),$(this).show())}),void 0)}function openDialogCenter(t){t.dialog("open");var e=getDimensions(t.parent());t.dialog({position:[e[0],e[1]]})}function getDimensions(t){var e=new Array(2);return e[0]=$(window).width()/2-t.width()/2,e[1]=$(window).height()/2-t.height()/2,e}function updateChart(t,e,i,n,r,s){var i=i,n=n,o=$("#iframe"+t).attr("default_src");o||(o=$("#iframe"+t).attr("src")),src=o.split("?")[0],("bar"===$("#type_"+t).val()||"column"===$("#type_"+t).val())&&0==$("#timescale_"+t).val().length&&0==$("#average_"+t).val().length&&0==$("#median_"+t).val().length&&0==$("#sum_"+t).val().length&&$("#timescale_"+t).val(30);var a=[];$(".chart_options"+t).each(function(){var t=$(this).val(),e=$(this).attr("id"),i=e.split("_")[0];t.length>0&&a.push([i,t])});for(var l="";a.length>0;){var h=a.pop();"width"==h[0]&&(i=parseInt(h[1])),"height"==h[0]&&(n=parseInt(h[1])),("type"!=h[0]||"line"!=h[1])&&(l+="&"+h[0]+"="+encodeURIComponent(h[1]))}l.length>0&&(src+="?"+l.substring(1)),e&&t>0&&s?$.update("/channels/"+r+"/charts/"+t,{newOptions:{options:l}}):e&&t>0&&$.update("/channels/"+r+"/charts/"+t,{options:l}),$("#embed"+t).val(''),$("#iframe"+t).attr("src",src),$("#iframe"+t).attr("width",i),$("#iframe"+t).attr("height",n)}function updateSelectValues(){selectedValue=$(this).val(),$(".mutuallyexclusive"+index).each(function(){$(this).val("")}),$(this).val(selectedValue)}function setupChartForm(t){return function(e,i){i.length>0&&$("#"+i.split("=")[0]+"_"+t).val(decodeURIComponent(i.split("=")[1]))}}function setupColumns(t,e){$(sortColumnSetup(t,e)),$(".column").disableSelection()}function createWindowsWithData(t,e,i,n){for(var r in t){for(var s in t[r])var o=s;if(t[r].chart_window&&(a=t[r].chart_window),t[r].plugin_window&&(a=t[r].plugin_window),t[r].portlet_window&&(a=t[r].portlet_window),"undefined"==a)var a=t[r].portlet_window?t[r].portlet_window:t[r].chart_window;colId=a.col,title=a.title;var l=a.html;if(t[r].chart_window){var h=a.id;$("body").append("
")}var c=addWindow(n,colId,a.id,o,title,l);c.each(decoratePortlet(e)),c.find(".ui-toggle").click(uiToggleClick),c.find(".ui-view").click(uiViewClick(i)),c.find(".ui-edit").click(uiEditClick(i)),c.find(".ui-close").click(uiCloseClick(i))}}function addWindow(t,e,i,n,r,s){if($("#"+t+"_dialog"+e).append(''+s+"
"),$("#portlet_"+i).length>1)throw"Portlet count doesn't match what's expected";return $("#portlet_"+i)}function sortColumnSetup(t,e){$(".column").sortable({opacity:.6,helper:function(){return $("")},connectWith:".column",update:updatePortletPositions(t,e)})}function getPortletArray(t){var e=new Array,n=t.split("&");for(i in n)val=n[i].split("=")[1],e.push(val);return e}function uiToggleClick(){$(this).toggleClass("ui-icon-minusthick").toggleClass("ui-icon-plusthick"),$(this).parents(".portlet:first").find(".portlet-content").toggle()}!function(t,e){t.rails!==e&&t.error("jquery-ujs has already been loaded!");var i,n=t(document);t.rails=i={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",buttonClickSelector:"button[data-remote]",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type])",disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input[type=file]",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(e){var i=t('meta[name="csrf-token"]').attr("content");i&&e.setRequestHeader("X-CSRF-Token",i)},fire:function(e,i,n){var r=t.Event(i);return e.trigger(r,n),r.result!==!1},confirm:function(t){return confirm(t)},ajax:function(e){return t.ajax(e)},href:function(t){return t.attr("href")},handleRemote:function(n){var r,s,o,a,l,h,c,d;if(i.fire(n,"ajax:before")){if(a=n.data("cross-domain"),l=a===e?null:a,h=n.data("with-credentials")||null,c=n.data("type")||t.ajaxSettings&&t.ajaxSettings.dataType,n.is("form")){r=n.attr("method"),s=n.attr("action"),o=n.serializeArray();var u=n.data("ujs:submit-button");u&&(o.push(u),n.data("ujs:submit-button",null))}else n.is(i.inputChangeSelector)?(r=n.data("method"),s=n.data("url"),o=n.serialize(),n.data("params")&&(o=o+"&"+n.data("params"))):n.is(i.buttonClickSelector)?(r=n.data("method")||"get",s=n.data("url"),o=n.serialize(),n.data("params")&&(o=o+"&"+n.data("params"))):(r=n.data("method"),s=i.href(n),o=n.data("params")||null);d={type:r||"GET",data:o,dataType:c,beforeSend:function(t,r){return r.dataType===e&&t.setRequestHeader("accept","*/*;q=0.5, "+r.accepts.script),i.fire(n,"ajax:beforeSend",[t,r])},success:function(t,e,i){n.trigger("ajax:success",[t,e,i])},complete:function(t,e){n.trigger("ajax:complete",[t,e])},error:function(t,e,i){n.trigger("ajax:error",[t,e,i])},crossDomain:l},h&&(d.xhrFields={withCredentials:h}),s&&(d.url=s);var p=i.ajax(d);return n.trigger("ajax:send",p),p}return!1},handleMethod:function(n){var r=i.href(n),s=n.data("method"),o=n.attr("target"),a=t("meta[name=csrf-token]").attr("content"),l=t("meta[name=csrf-param]").attr("content"),h=t('
'),c='
';l!==e&&a!==e&&(c+='
'),o&&h.attr("target",o),h.hide().append(c).appendTo("body"),h.submit()},disableFormElements:function(e){e.find(i.disableSelector).each(function(){var e=t(this),i=e.is("button")?"html":"val";e.data("ujs:enable-with",e[i]()),e[i](e.data("disable-with")),e.prop("disabled",!0)})},enableFormElements:function(e){e.find(i.enableSelector).each(function(){var e=t(this),i=e.is("button")?"html":"val";e.data("ujs:enable-with")&&e[i](e.data("ujs:enable-with")),e.prop("disabled",!1)})},allowAction:function(t){var e,n=t.data("confirm"),r=!1;return n?(i.fire(t,"confirm")&&(r=i.confirm(n),e=i.fire(t,"confirm:complete",[r])),r&&e):!0},blankInputs:function(e,i,n){var r,s,o=t(),a=i||"input,textarea",l=e.find(a);return l.each(function(){if(r=t(this),s=r.is("input[type=checkbox],input[type=radio]")?r.is(":checked"):r.val(),!s==!n){if(r.is("input[type=radio]")&&l.filter('input[type=radio]:checked[name="'+r.attr("name")+'"]').length)return!0;o=o.add(r)}}),o.length?o:!1},nonBlankInputs:function(t,e){return i.blankInputs(t,e,!0)},stopEverything:function(e){return t(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(t){t.data("ujs:enable-with",t.html()),t.html(t.data("disable-with")),t.bind("click.railsDisable",function(t){return i.stopEverything(t)})},enableElement:function(t){t.data("ujs:enable-with")!==e&&(t.html(t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.unbind("click.railsDisable")}},i.fire(n,"rails:attachBindings")&&(t.ajaxPrefilter(function(t,e,n){t.crossDomain||i.CSRFProtection(n)}),n.delegate(i.linkDisableSelector,"ajax:complete",function(){i.enableElement(t(this))}),n.delegate(i.linkClickSelector,"click.rails",function(n){var r=t(this),s=r.data("method"),o=r.data("params");if(!i.allowAction(r))return i.stopEverything(n);if(r.is(i.linkDisableSelector)&&i.disableElement(r),r.data("remote")!==e){if(!(!n.metaKey&&!n.ctrlKey||s&&"GET"!==s||o))return!0;var a=i.handleRemote(r);return a===!1?i.enableElement(r):a.error(function(){i.enableElement(r)}),!1}return r.data("method")?(i.handleMethod(r),!1):void 0}),n.delegate(i.buttonClickSelector,"click.rails",function(e){var n=t(this);return i.allowAction(n)?(i.handleRemote(n),!1):i.stopEverything(e)}),n.delegate(i.inputChangeSelector,"change.rails",function(e){var n=t(this);return i.allowAction(n)?(i.handleRemote(n),!1):i.stopEverything(e)}),n.delegate(i.formSubmitSelector,"submit.rails",function(n){var r=t(this),s=r.data("remote")!==e,o=i.blankInputs(r,i.requiredInputSelector),a=i.nonBlankInputs(r,i.fileInputSelector);if(!i.allowAction(r))return i.stopEverything(n);if(o&&r.attr("novalidate")==e&&i.fire(r,"ajax:aborted:required",[o]))return i.stopEverything(n);if(s){if(a){setTimeout(function(){i.disableFormElements(r)},13);var l=i.fire(r,"ajax:aborted:file",[a]);return l||setTimeout(function(){i.enableFormElements(r)},13),l}return i.handleRemote(r),!1}setTimeout(function(){i.disableFormElements(r)},13)}),n.delegate(i.formInputClickSelector,"click.rails",function(e){var n=t(this);if(!i.allowAction(n))return i.stopEverything(e);var r=n.attr("name"),s=r?{name:r,value:n.val()}:null;n.closest("form").data("ujs:submit-button",s)}),n.delegate(i.formSubmitSelector,"ajax:beforeSend.rails",function(e){this==e.target&&i.disableFormElements(t(this))}),n.delegate(i.formSubmitSelector,"ajax:complete.rails",function(e){this==e.target&&i.enableFormElements(t(this))}),t(function(){var e=t("meta[name=csrf-token]").attr("content"),i=t("meta[name=csrf-param]").attr("content");t('form input[name="'+i+'"]').val(e)}))}(jQuery),function(t){t.cookie=function(e,i,n){if(arguments.length>1&&(!/Object/.test(Object.prototype.toString.call(i))||null===i||void 0===i)){if(n=t.extend({},n),(null===i||void 0===i)&&(n.expires=-1),"number"==typeof n.expires){var r=n.expires,s=n.expires=new Date;s.setDate(s.getDate()+r)}return i=String(i),document.cookie=[encodeURIComponent(e),"=",n.raw?i:encodeURIComponent(i),n.expires?"; expires="+n.expires.toUTCString():"",n.path?"; path="+n.path:"",n.domain?"; domain="+n.domain:"",n.secure?"; secure":""].join("")}n=i||{};for(var o,a=n.raw?function(t){return t}:decodeURIComponent,l=document.cookie.split("; "),h=0;o=l[h]&&l[h].split("=");h++)if(a(o[0])===e)return a(o[1]||"");return null}}(jQuery),function(){function t(t,e){var i;t||(t={});for(i in e)t[i]=e[i];return t}function e(){var t,e,i=arguments,n={},r=function(t,e){var i,n;"object"!=typeof t&&(t={});for(n in e)e.hasOwnProperty(n)&&(i=e[n],t[n]=i&&"object"==typeof i&&"[object Array]"!==Object.prototype.toString.call(i)&&"number"!=typeof i.nodeType?r(t[n]||{},i):e[n]);return t};for(i[0]===!0&&(n=i[1],i=Array.prototype.slice.call(i,2)),e=i.length,t=0;e>t;t++)n=r(n,i[t]);return n}function i(t,e){return parseInt(t,e||10)}function n(t){return"string"==typeof t}function r(t){return"object"==typeof t}function s(t){return"[object Array]"===Object.prototype.toString.call(t)}function o(t){return"number"==typeof t}function a(t){return le.log(t)/le.LN10}function l(t){return le.pow(10,t)}function h(t,e){for(var i=t.length;i--;)if(t[i]===e){t.splice(i,1);break}}function c(t){return t!==_&&null!==t}function d(t,e,i){var s,o;if(n(e))c(i)?t.setAttribute(e,i):t&&t.getAttribute&&(o=t.getAttribute(e));else if(c(e)&&r(e))for(s in e)t.setAttribute(s,e[s]);return o}function u(t){return s(t)?t:[t]}function p(){var t,e,i=arguments,n=i.length;for(t=0;n>t;t++)if(e=i[t],"undefined"!=typeof e&&null!==e)return e}function f(e,i){we&&i&&i.opacity!==_&&(i.filter="alpha(opacity="+100*i.opacity+")"),t(e.style,i)}function g(e,i,n,r,s){return e=oe.createElement(e),i&&t(e,i),s&&f(e,{padding:0,border:Be,margin:0}),n&&f(e,n),r&&r.appendChild(e),e}function m(e,i){var n=function(){};return n.prototype=new e,t(n.prototype,i),n}function y(t,e,n,r){var s=$.lang,t=+t||0,o=-1===e?(t.toString().split(".")[1]||"").length:isNaN(e=fe(e))?2:e,e=void 0===n?s.decimalPoint:n,r=void 0===r?s.thousandsSep:r,s=0>t?"-":"",n=String(i(t=fe(t).toFixed(o))),a=n.length>3?n.length%3:0;return s+(a?n.substr(0,a)+r:"")+n.substr(a).replace(/(\d{3})(?=\d)/g,"$1"+r)+(o?e+fe(t-n).toFixed(o).slice(2):"")}function v(t,e){return Array((e||2)+1-String(t).length).join(0)+t}function x(t,e,i){var n=t[e];t[e]=function(){var t=Array.prototype.slice.call(arguments);return t.unshift(n),i.apply(this,t)}}function b(t,e){for(var i,n,r,s,o,a="{",l=!1,h=[];-1!==(a=t.indexOf(a));){if(i=t.slice(0,a),l){for(n=i.split(":"),r=n.shift().split("."),o=r.length,i=e,s=0;o>s;s++)i=i[r[s]];n.length&&(n=n.join(":"),r=/\.([0-9])/,s=$.lang,o=void 0,/f$/.test(n)?(o=(o=n.match(r))?o[1]:-1,i=y(i,o,s.decimalPoint,n.indexOf(",")>-1?s.thousandsSep:"")):i=X(n,i))}h.push(i),t=t.slice(a+1),a=(l=!l)?"}":"{"}return h.push(t),h.join("")}function w(t){return le.pow(10,ce(le.log(t)/le.LN10))}function k(t,e,i,n){var r,i=p(i,1);for(r=t/i,e||(e=[1,2,2.5,5,10],n&&n.allowDecimals===!1&&(1===i?e=[1,2,5,10]:.1>=i&&(e=[1/i]))),n=0;n
n;n++)t[n].ss_i=n;for(t.sort(function(t,n){return i=e(t,n),0===i?t.ss_i-n.ss_i:i}),n=0;r>n;n++)delete t[n].ss_i}function C(t){for(var e=t.length,i=t[0];e--;)t[e]i&&(i=t[e]);return i}function A(t,e){for(var i in t)t[i]&&t[i]!==e&&t[i].destroy&&t[i].destroy(),delete t[i]}function L(t){W||(W=g(ze)),t&&W.appendChild(t),W.innerHTML=""}function M(t,e){var i="Highcharts error #"+t+": www.highcharts.com/errors/"+t;if(e)throw i;ae.console&&console.log(i)}function I(t){return parseFloat(t.toPrecision(14))}function D(t,e){G=p(t,e.animation)}function E(){var t=$.global.useUTC,e=t?"getUTC":"get",i=t?"setUTC":"set";q=6e4*(t&&$.global.timezoneOffset||0),V=t?Date.UTC:function(t,e,i,n,r,s){return new Date(t,e,p(i,1),p(n,0),p(r,0),p(s,0)).getTime()},U=e+"Minutes",Z=e+"Hours",K=e+"Day",Q=e+"Date",J=e+"Month",te=e+"FullYear",ee=i+"Minutes",ie=i+"Hours",ne=i+"Date",re=i+"Month",se=i+"FullYear"}function O(){}function R(t,e,i,n){this.axis=t,this.pos=e,this.type=i||"",this.isNew=!0,!i&&!n&&this.addLabel()}function z(){this.init.apply(this,arguments)}function B(t,e,i,n,r,s){var o=t.chart.inverted;this.axis=t,this.isNegative=i,this.options=e,this.x=n,this.total=null,this.points={},this.stack=r,this.percent="percent"===s,this.alignOptions={align:e.align||(o?i?"left":"right":"center"),verticalAlign:e.verticalAlign||(o?"middle":i?"bottom":"top"),y:p(e.y,o?4:i?14:-6),x:p(e.x,o?i?-6:6:0)},this.textAlign=e.textAlign||(o?i?"right":"left":"center")}function F(){this.init.apply(this,arguments)}function N(){this.init.apply(this,arguments)}var _,H,W,$,X,G,Y,j,V,q,U,Z,K,Q,J,te,ee,ie,ne,re,se,oe=document,ae=window,le=Math,he=le.round,ce=le.floor,de=le.ceil,ue=le.max,pe=le.min,fe=le.abs,ge=le.cos,me=le.sin,ye=le.PI,ve=2*ye/360,xe=navigator.userAgent,be=ae.opera,we=/msie/i.test(xe)&&!be,ke=8===oe.documentMode,Se=/AppleWebKit/.test(xe),Te=/Firefox/.test(xe),Ce=/(Mobile|Android|Windows Phone)/.test(xe),Pe="http://www.w3.org/2000/svg",Ae=!!oe.createElementNS&&!!oe.createElementNS(Pe,"svg").createSVGRect,Le=Te&&parseInt(xe.split("Firefox/")[1],10)<4,Me=!Ae&&!we&&!!oe.createElement("canvas").getContext,Ie=oe.documentElement.ontouchstart!==_,De={},Ee=0,Oe=function(){},Re=[],ze="div",Be="none",Fe=/^[0-9]+$/,Ne="rgba(192,192,192,"+(Ae?1e-4:.002)+")",_e="stroke-width",He={};ae.Highcharts=ae.Highcharts?M(16,!0):{},X=function(e,i,n){if(!c(i)||isNaN(i))return"Invalid date";var r,e=p(e,"%Y-%m-%d %H:%M:%S"),s=new Date(i-q),o=s[Z](),a=s[K](),l=s[Q](),h=s[J](),d=s[te](),u=$.lang,f=u.weekdays,s=t({a:f[a].substr(0,3),A:f[a],d:v(l),e:l,b:u.shortMonths[h],B:u.months[h],m:v(h+1),y:d.toString().substr(2,2),Y:d,H:v(o),I:v(o%12||12),l:o%12||12,M:v(s[U]()),p:12>o?"AM":"PM",P:12>o?"am":"pm",S:v(s.getSeconds()),L:v(he(i%1e3),3)},Highcharts.dateFormats);for(r in s)for(;-1!==e.indexOf("%"+r);)e=e.replace("%"+r,"function"==typeof s[r]?s[r](i):s[r]);return n?e.substr(0,1).toUpperCase()+e.substr(1):e},S.prototype={wrapColor:function(t){this.color>=t&&(this.color=0)},wrapSymbol:function(t){this.symbol>=t&&(this.symbol=0)}},j=function(){for(var t=0,e=arguments,i=e.length,n={};i>t;t++)n[e[t++]]=e[t];return n}("millisecond",1,"second",1e3,"minute",6e4,"hour",36e5,"day",864e5,"week",6048e5,"month",26784e5,"year",31556952e3),Y={init:function(t,e,i){var n,r,s,e=e||"",o=t.shift,a=e.indexOf("C")>-1,l=a?7:3,e=e.split(" "),i=[].concat(i),h=function(t){for(n=t.length;n--;)"M"===t[n]&&t.splice(n+1,0,t[n+1],t[n+2],t[n+1],t[n+2])};if(a&&(h(e),h(i)),t.isArea&&(r=e.splice(e.length-6,6),s=i.splice(i.length-6,6)),o<=i.length/l&&e.length===i.length)for(;o--;)i=[].concat(i).splice(0,l).concat(i);if(t.shift=0,e.length)for(t=i.length;e.lengthi)for(;s--;)n=parseFloat(t[s]),r[s]=isNaN(n)?t[s]:i*parseFloat(e[s]-n)+n;else r=e;return r}},function(e){ae.HighchartsAdapter=ae.HighchartsAdapter||e&&{init:function(t){var i,r=e.fx,s=r.step,o=e.Tween,a=o&&o.propHooks;i=e.cssHooks.opacity,e.extend(e.easing,{easeOutQuad:function(t,e,i,n,r){return-n*(e/=r)*(e-2)+i}}),e.each(["cur","_default","width","height","opacity"],function(t,e){var i,n=s;"cur"===e?n=r.prototype:"_default"===e&&o&&(n=a[e],e="set"),(i=n[e])&&(n[e]=function(n){var r,n=t?n:this;return"align"!==n.prop?(r=n.elem,r.attr?r.attr(n.prop,"cur"===e?_:n.now):i.apply(this,arguments)):void 0})}),x(i,"get",function(t,e,i){return e.attr?e.opacity||0:t.call(this,e,i)}),i=function(e){var i,n=e.elem;e.started||(i=t.init(n,n.d,n.toD),e.start=i[0],e.end=i[1],e.started=!0),n.attr("d",t.step(e.start,e.end,e.pos,n.toD))},o?a.d={set:i}:s.d=i,this.each=Array.prototype.forEach?function(t,e){return Array.prototype.forEach.call(t,e)}:function(t,e){for(var i=0,n=t.length;n>i;i++)if(e.call(t[i],t[i],i,t)===!1)return i},e.fn.highcharts=function(){var t,e,i="Chart",r=arguments;return n(r[0])&&(i=r[0],r=Array.prototype.slice.call(r,1)),t=r[0],t!==_&&(t.chart=t.chart||{},t.chart.renderTo=this[0],new Highcharts[i](t,r[1]),e=this),t===_&&(e=Re[d(this[0],"data-highcharts-chart")]),e}},getScript:e.getScript,inArray:e.inArray,adapterRun:function(t,i){return e(t)[i]()},grep:e.grep,map:function(t,e){for(var i=[],n=0,r=t.length;r>n;n++)i[n]=e.call(t[n],t[n],n,t);return i},offset:function(t){return e(t).offset()},addEvent:function(t,i,n){e(t).bind(i,n)},removeEvent:function(t,i,n){var r=oe.removeEventListener?"removeEventListener":"detachEvent";oe[r]&&t&&!t[r]&&(t[r]=function(){}),e(t).unbind(i,n)},fireEvent:function(i,n,r,s){var o,a=e.Event(n),l="detached"+n;!we&&r&&(delete r.layerX,delete r.layerY),t(a,r),i[n]&&(i[l]=i[n],i[n]=null),e.each(["preventDefault","stopPropagation"],function(t,e){var i=a[e];a[e]=function(){try{i.call(a)}catch(t){"preventDefault"===e&&(o=!0)}}}),e(i).trigger(a),i[l]&&(i[n]=i[l],i[l]=null),s&&!a.isDefaultPrevented()&&!o&&s(a)},washMouseEvent:function(t){var e=t.originalEvent||t;return e.pageX===_&&(e.pageX=t.pageX,e.pageY=t.pageY),e},animate:function(t,i,n){var r=e(t);t.style||(t.style={}),i.d&&(t.toD=i.d,i.d=1),r.stop(),i.opacity!==_&&t.attr&&(i.opacity+="px"),r.animate(i,n)},stop:function(t){e(t).stop()}}}(ae.jQuery);var We=ae.HighchartsAdapter,$e=We||{};We&&We.init.call(We,Y);var Xe=$e.adapterRun,Ge=$e.getScript,Ye=$e.inArray,je=$e.each,Ve=$e.grep,qe=$e.offset,Ue=$e.map,Ze=$e.addEvent,Ke=$e.removeEvent,Qe=$e.fireEvent,Je=$e.washMouseEvent,ti=$e.animate,ei=$e.stop,$e={enabled:!0,x:0,y:15,style:{color:"#666",cursor:"default",fontSize:"11px",lineHeight:"14px"}};$={colors:"#2f7ed8,#0d233a,#8bbc21,#910000,#1aadce,#492970,#f28f43,#77a1e5,#c42525,#a6c96a".split(","),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),decimalPoint:".",numericSymbols:"k,M,G,T,P,E".split(","),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:!0,canvasToolsURL:"http://code.highcharts.com/3.0.8/modules/canvas-tools.js",VMLRadialGradientURL:"http://code.highcharts.com/3.0.8/gfx/vml-radial-gradient.png"},chart:{borderColor:"#4572A7",borderRadius:5,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',fontSize:"12px"},backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0",resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}}},title:{text:"Chart title",align:"center",margin:15,style:{color:"#274b6d",fontSize:"16px"}},subtitle:{text:"",align:"center",style:{color:"#4d759e"}},plotOptions:{line:{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1e3},events:{},lineWidth:2,marker:{enabled:!0,lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{enabled:!0},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:e($e,{align:"center",enabled:!1,formatter:function(){return null===this.y?"":y(this.y,-1)},verticalAlign:"bottom",y:0}),cropThreshold:300,pointRange:0,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1e3}},labels:{style:{position:"absolute",color:"#3E576F"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderWidth:1,borderColor:"#909090",borderRadius:5,navigation:{activeColor:"#274b6d",inactiveColor:"#CCC"},shadow:!1,itemStyle:{cursor:"pointer",color:"#274b6d",fontSize:"12px"},itemHoverStyle:{color:"#000"},itemHiddenStyle:{color:"#CCC"},itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"1em"},style:{position:"absolute",backgroundColor:"white",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:Ae,backgroundColor:"rgba(255, 255, 255, .85)",borderWidth:1,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},headerFormat:'{point.key} ',pointFormat:'{series.name} : {point.y} ',shadow:!0,snap:Ce?25:10,style:{color:"#333333",cursor:"default",fontSize:"12px",padding:"8px",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"ThingSpeak.com",href:"https://thingspeak.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#D62020",fontSize:"9px"}}};var ii=$.plotOptions,We=ii.line;E();var ni=/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*\)/,ri=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,si=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,oi=function(t){var n,r,s=[];return function(t){t&&t.stops?r=Ue(t.stops,function(t){return oi(t[1])}):(n=ni.exec(t))?s=[i(n[1]),i(n[2]),i(n[3]),parseFloat(n[4],10)]:(n=ri.exec(t))?s=[i(n[1],16),i(n[2],16),i(n[3],16),1]:(n=si.exec(t))&&(s=[i(n[1]),i(n[2]),i(n[3]),1])}(t),{get:function(i){var n;return r?(n=e(t),n.stops=[].concat(n.stops),je(r,function(t,e){n.stops[e]=[n.stops[e][0],t.get(i)]})):n=s&&!isNaN(s[0])?"rgb"===i?"rgb("+s[0]+","+s[1]+","+s[2]+")":"a"===i?s[3]:"rgba("+s.join(",")+")":t,n},brighten:function(t){if(r)je(r,function(e){e.brighten(t)});else if(o(t)&&0!==t){var e;for(e=0;3>e;e++)s[e]+=i(255*t),s[e]<0&&(s[e]=0),s[e]>255&&(s[e]=255)}return this},rgba:s,setOpacity:function(t){return s[3]=t,this}}};O.prototype={init:function(t,e){this.element="span"===e?g(e):oe.createElementNS(Pe,e),this.renderer=t,this.attrSetters={}},opacity:1,animate:function(t,i,n){i=p(i,G,!0),ei(this),i?(i=e(i),n&&(i.complete=n),ti(this,t,i)):(this.attr(t),n&&n())},attr:function(t,e){var r,s,o,a,l,h,u,f=this.element,g=f.nodeName.toLowerCase(),m=this.renderer,y=this.attrSetters,v=this.shadows,x=this;if(n(t)&&c(e)&&(r=t,t={},t[r]=e),n(t))r=t,"circle"===g?r={x:"cx",y:"cy"}[r]||r:"strokeWidth"===r&&(r="stroke-width"),x=d(f,r)||this[r]||0,"d"!==r&&"visibility"!==r&&"fill"!==r&&(x=parseFloat(x));else{for(r in t)if(l=!1,s=t[r],o=y[r]&&y[r].call(this,s,r),o!==!1){if(o!==_&&(s=o),"d"===r)s&&s.join&&(s=s.join(" ")),/(NaN| {2}|^$)/.test(s)&&(s="M 0 0");else if("x"===r&&"text"===g)for(o=0;os&&(s=0),this[r]=s,"text"===r?(s!==this.textStr&&delete this.bBox,this.textStr=s,this.added&&m.buildText(this)):l||d(f,r,s)}u&&this.updateTransform()}return x},addClass:function(t){var e=this.element,i=d(e,"class")||"";return-1===i.indexOf(t)&&d(e,"class",i+" "+t),this},symbolAttr:function(t){var e=this;je("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","),function(i){e[i]=p(t[i],e[i])}),e.attr({d:e.renderer.symbols[e.symbolName](e.x,e.y,e.width,e.height,e)})},clip:function(t){return this.attr("clip-path",t?"url("+this.renderer.url+"#"+t.id+")":Be)},crisp:function(t,e,i,n,r){var s,o,a={},l={},t=t||this.strokeWidth||this.attr&&this.attr("stroke-width")||0;o=he(t)%2/2,l.x=ce(e||this.x||0)+o,l.y=ce(i||this.y||0)+o,l.width=ce((n||this.width||0)-2*o),l.height=ce((r||this.height||0)-2*o),l.strokeWidth=t;for(s in l)this[s]!==l[s]&&(this[s]=a[s]=l[s]);return a},css:function(e){var n,r=this.element,s=this.textWidth=e&&e.width&&"text"===r.nodeName.toLowerCase()&&i(e.width),o="",a=function(t,e){return"-"+e.toLowerCase()};if(e&&e.color&&(e.fill=e.color),this.styles=e=t(this.styles,e),s&&delete e.width,we&&!Ae)f(this.element,e);else{for(n in e)o+=n.replace(/([A-Z])/g,a)+":"+e[n]+";";d(r,"style",o)}return s&&this.added&&this.renderer.buildText(this),this},on:function(t,e){var i=this,n=i.element;return Ie&&"click"===t?(n.ontouchstart=function(t){i.touchEventFired=Date.now(),t.preventDefault(),e.call(n,t)},n.onclick=function(t){(-1===xe.indexOf("Android")||Date.now()-(i.touchEventFired||0)>1100)&&e.call(n,t)}):n["on"+t]=e,this},setRadialReference:function(t){return this.element.radialReference=t,this},translate:function(t,e){return this.attr({translateX:t,translateY:e})},invert:function(){return this.inverted=!0,this.updateTransform(),this},updateTransform:function(){var t=this.translateX||0,e=this.translateY||0,i=this.scaleX,n=this.scaleY,r=this.inverted,s=this.rotation;r&&(t+=this.attr("width"),e+=this.attr("height")),t=["translate("+t+","+e+")"],r?t.push("rotate(90) scale(-1,1)"):s&&t.push("rotate("+s+" "+(this.x||0)+" "+(this.y||0)+")"),(c(i)||c(n))&&t.push("scale("+p(i,1)+" "+p(n,1)+")"),t.length&&d(this.element,"transform",t.join(" "))},toFront:function(){var t=this.element;return t.parentNode.appendChild(t),this},align:function(t,e,i){var r,s,o,a,l={};return s=this.renderer,o=s.alignedObjects,t?(this.alignOptions=t,this.alignByTranslate=e,(!i||n(i))&&(this.alignTo=r=i||"renderer",h(o,this),o.push(this),i=null)):(t=this.alignOptions,e=this.alignByTranslate,r=this.alignTo),i=p(i,s[r],s),r=t.align,s=t.verticalAlign,o=(i.x||0)+(t.x||0),a=(i.y||0)+(t.y||0),("right"===r||"center"===r)&&(o+=(i.width-(t.width||0))/{right:1,center:2}[r]),l[e?"translateX":"x"]=he(o),("bottom"===s||"middle"===s)&&(a+=(i.height-(t.height||0))/({bottom:1,middle:2}[s]||1)),l[e?"translateY":"y"]=he(a),this[this.placed?"animate":"attr"](l),this.placed=!0,this.alignAttr=l,this},getBBox:function(){var e,i,n=this.bBox,r=this.renderer,s=this.rotation;e=this.element;var o=this.styles,a=s*ve;i=this.textStr;var l;if((""===i||Fe.test(i))&&(l=i.length+"|"+o.fontSize+"|"+o.fontFamily,n=r.cache[l]),!n){if(e.namespaceURI===Pe||r.forExport){try{n=e.getBBox?t({},e.getBBox()):{width:e.offsetWidth,height:e.offsetHeight}}catch(h){}(!n||n.width<0)&&(n={width:0,height:0})}else n=this.htmlGetBBox();r.isSVG&&(e=n.width,i=n.height,we&&o&&"11px"===o.fontSize&&"22.7"===i.toPrecision(3)&&(n.height=i=14),s&&(n.width=fe(i*me(a))+fe(e*ge(a)),n.height=fe(i*ge(a))+fe(e*me(a)))),this.bBox=n,l&&(r.cache[l]=n)}return n},show:function(){return this.attr({visibility:"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(t){var e=this;e.animate({opacity:0},{duration:t||150,complete:function(){e.hide()}})},add:function(t){var e,n=this.renderer,r=t||n,s=r.element||n.box,o=s.childNodes,a=this.element,l=d(a,"zIndex");if(t&&(this.parentGroup=t),this.parentInverted=t&&t.inverted,void 0!==this.textStr&&n.buildText(this),l&&(r.handleZ=!0,l=i(l)),r.handleZ)for(r=0;rl||!c(l)&&c(n))){s.insertBefore(a,t),e=!0;break}return e||s.appendChild(a),this.added=!0,Qe(this,"add"),this},safeRemoveChild:function(t){var e=t.parentNode;e&&e.removeChild(t)},destroy:function(){var t,e,i=this,n=i.element||{},r=i.shadows,s=i.renderer.isSVG&&"SPAN"===n.nodeName&&i.parentGroup;if(n.onclick=n.onmouseout=n.onmouseover=n.onmousemove=n.point=null,ei(i),i.clipPath&&(i.clipPath=i.clipPath.destroy()),i.stops){for(e=0;e=n;n++)r=c.cloneNode(0),s=2*o+1-2*n,d(r,{isShadow:"true",stroke:t.color||"black","stroke-opacity":a*n,"stroke-width":s,transform:"translate"+l,fill:Be}),i&&(d(r,"height",ue(d(r,"height")-s,0)),r.cutHeight=s),e?e.element.appendChild(r):c.parentNode.insertBefore(r,c),h.push(r);this.shadows=h}return this}};var ai=function(){this.init.apply(this,arguments)};ai.prototype={Element:O,init:function(t,e,i,n){var r,s,o=location;r=this.createElement("svg").attr({version:"1.1"}),s=r.element,t.appendChild(s),-1===t.innerHTML.indexOf("xmlns")&&d(s,"xmlns",Pe),this.isSVG=!0,this.box=s,this.boxWrapper=r,this.alignedObjects=[],this.url=(Te||Se)&&oe.getElementsByTagName("base").length?o.href.replace(/#.*?$/,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"",this.createElement("desc").add().element.appendChild(oe.createTextNode("Created with Highcharts 3.0.8")),this.defs=this.createElement("defs").add(),this.forExport=n,this.gradients={},this.cache={},this.setSize(e,i,!1);var a;Te&&t.getBoundingClientRect&&(this.subPixelFix=e=function(){f(t,{left:0,top:0}),a=t.getBoundingClientRect(),f(t,{left:de(a.left)-a.left+"px",top:de(a.top)-a.top+"px"})},e(),Ze(ae,"resize",e))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var t=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),A(this.gradients||{}),this.gradients=null,t&&(this.defs=t.destroy()),this.subPixelFix&&Ke(ae,"resize",this.subPixelFix),this.alignedObjects=null
+},createElement:function(t){var e=new this.Element;return e.init(this,t),e},draw:function(){},buildText:function(t){for(var e=t.element,n=this,r=n.forExport,s=p(t.textStr,"").toString().replace(/<(b|strong)>/g,'').replace(/<(i|em)>/g,'').replace(//g," ").split(//g),o=e.childNodes,a=/style="([^"]+)"/,l=/href="(http[^"]+)"/,h=d(e,"x"),c=t.styles,u=t.textWidth,g=c&&c.lineHeight,m=o.length;m--;)e.removeChild(o[m]);u&&!t.added&&this.box.appendChild(e),""===s[s.length-1]&&s.pop(),je(s,function(s,o){var p,m=0,s=s.replace(//g," |||");p=s.split("|||"),je(p,function(s){if(""!==s||1===p.length){var y,v={},x=oe.createElementNS(Pe,"tspan");if(a.test(s)&&(y=s.match(a)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),d(x,"style",y)),l.test(s)&&!r&&(d(x,"onclick",'location.href="'+s.match(l)[1]+'"'),f(x,{cursor:"pointer"})),s=(s.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"<").replace(/>/g,">")," "!==s&&(x.appendChild(oe.createTextNode(s)),m?v.dx=0:v.x=h,d(x,v),!m&&o&&(!Ae&&r&&f(x,{display:"block"}),d(x,"dy",g||n.fontMetrics(/px$/.test(x.style.fontSize)?x.style.fontSize:c.fontSize).h,Se&&x.offsetHeight)),e.appendChild(x),m++,u))for(var b,w,s=s.replace(/([^\^])-/g,"$1- ").split(" "),v=s.length>1&&"nowrap"!==c.whiteSpace,k=t._clipHeight,S=[],T=i(g||16),C=1;v&&(s.length||S.length);)delete t.bBox,b=t.getBBox(),w=b.width,!Ae&&n.forExport&&(w=n.measureSpanWidth(x.firstChild.data,t.styles)),b=w>u,b&&1!==s.length?(x.removeChild(x.firstChild),S.unshift(s.pop())):(s=S,S=[],s.length&&(C++,k&&C*T>k?(s=["..."],t.attr("title",t.textStr)):(x=oe.createElementNS(Pe,"tspan"),d(x,{dy:T,x:h}),y&&d(x,"style",y),e.appendChild(x),w>u&&(u=w)))),s.length&&x.appendChild(oe.createTextNode(s.join(" ").replace(/- /g,"-")))}})})},button:function(i,n,r,s,o,a,l,h,c){var d,u,p,f,g,m,y=this.label(i,n,r,c,null,null,null,null,"button"),v=0,i={x1:0,y1:0,x2:0,y2:1},o=e({"stroke-width":1,stroke:"#CCCCCC",fill:{linearGradient:i,stops:[[0,"#FEFEFE"],[1,"#F6F6F6"]]},r:2,padding:5,style:{color:"black"}},o);return p=o.style,delete o.style,a=e(o,{stroke:"#68A",fill:{linearGradient:i,stops:[[0,"#FFF"],[1,"#ACF"]]}},a),f=a.style,delete a.style,l=e(o,{stroke:"#68A",fill:{linearGradient:i,stops:[[0,"#9BD"],[1,"#CDF"]]}},l),g=l.style,delete l.style,h=e(o,{style:{color:"#CCC"}},h),m=h.style,delete h.style,Ze(y.element,we?"mouseover":"mouseenter",function(){3!==v&&y.attr(a).css(f)}),Ze(y.element,we?"mouseout":"mouseleave",function(){3!==v&&(d=[o,a,l][v],u=[p,f,g][v],y.attr(d).css(u))}),y.setState=function(t){(y.state=v=t)?2===t?y.attr(l).css(g):3===t&&y.attr(h).css(m):y.attr(o).css(p)},y.on("click",function(){3!==v&&s.call(y)}).attr(o).css(t({cursor:"default"},p))},crispLine:function(t,e){return t[1]===t[4]&&(t[1]=t[4]=he(t[1])-e%2/2),t[2]===t[5]&&(t[2]=t[5]=he(t[2])+e%2/2),t},path:function(e){var i={fill:Be};return s(e)?i.d=e:r(e)&&t(i,e),this.createElement("path").attr(i)},circle:function(t,e,i){return t=r(t)?t:{x:t,y:e,r:i},this.createElement("circle").attr(t)},arc:function(t,e,i,n,s,o){return r(t)&&(e=t.y,i=t.r,n=t.innerR,s=t.start,o=t.end,t=t.x),t=this.symbol("arc",t||0,e||0,i||0,i||0,{innerR:n||0,start:s||0,end:o||0}),t.r=i,t},rect:function(t,e,i,n,s,o){return s=r(t)?t.r:s,s=this.createElement("rect").attr({rx:s,ry:s,fill:Be}),s.attr(r(t)?t:s.crisp(o,t,e,ue(i,0),ue(n,0)))},setSize:function(t,e,i){var n=this.alignedObjects,r=n.length;for(this.width=t,this.height=e,this.boxWrapper[p(i,!0)?"animate":"attr"]({width:t,height:e});r--;)n[r].align()},g:function(t){var e=this.createElement("g");return c(t)?e.attr({"class":"highcharts-"+t}):e},image:function(e,i,n,r,s){var o={preserveAspectRatio:Be};return arguments.length>1&&t(o,{x:i,y:n,width:r,height:s}),o=this.createElement("image").attr(o),o.element.setAttributeNS?o.element.setAttributeNS("http://www.w3.org/1999/xlink","href",e):o.element.setAttribute("hc-svg-href",e),o},symbol:function(e,i,n,r,s,o){var a,l,h,c=this.symbols[e],c=c&&c(he(i),he(n),r,s,o),d=/^url\((.*?)\)$/;return c?(a=this.path(c),t(a,{symbolName:e,x:i,y:n,width:r,height:s}),o&&t(a,o)):d.test(e)&&(h=function(t,e){t.element&&(t.attr({width:e[0],height:e[1]}),t.alignByTranslate||t.translate(he((r-e[0])/2),he((s-e[1])/2)))},l=e.match(d)[1],e=De[l],a=this.image(l).attr({x:i,y:n}),a.isImg=!0,e?h(a,e):(a.attr({width:0,height:0}),g("img",{onload:function(){h(a,De[l]=[this.width,this.height])},src:l}))),a},symbols:{circle:function(t,e,i,n){var r=.166*i;return["M",t+i/2,e,"C",t+i+r,e,t+i+r,e+n,t+i/2,e+n,"C",t-r,e+n,t-r,e,t+i/2,e,"Z"]},square:function(t,e,i,n){return["M",t,e,"L",t+i,e,t+i,e+n,t,e+n,"Z"]},triangle:function(t,e,i,n){return["M",t+i/2,e,"L",t+i,e+n,t,e+n,"Z"]},"triangle-down":function(t,e,i,n){return["M",t,e,"L",t+i,e,t+i/2,e+n,"Z"]},diamond:function(t,e,i,n){return["M",t+i/2,e,"L",t+i,e+n/2,t+i/2,e+n,t,e+n/2,"Z"]},arc:function(t,e,i,n,r){var s=r.start,i=r.r||i||n,o=r.end-.001,n=r.innerR,a=r.open,l=ge(s),h=me(s),c=ge(o),o=me(o),r=r.end-st?t+4:he(1.2*t),e=he(.8*t);return{h:t,b:e}},label:function(i,n,r,s,o,a,l,h,d){function u(){var t,i;t=P.element.style,y=(void 0===v||void 0===x||C.styles.textAlign)&&P.getBBox(),C.width=(v||y.width||0)+2*L+M,C.height=(x||y.height||0)+2*L,k=L+T.fontMetrics(t&&t.fontSize).b,S&&(m||(t=he(-A*L),i=h?-k:0,C.box=m=s?T.symbol(s,t,i,C.width,C.height,D):T.rect(t,i,C.width,C.height,0,D[_e]),m.add(C)),m.isImg||m.attr(e({width:C.width,height:C.height},D)),D=null)}function p(){var t,e=C.styles,e=e&&e.textAlign,i=M+L*(1-A);t=h?0:k,!c(v)||"center"!==e&&"right"!==e||(i+={center:.5,right:1}[e]*(v-y.width)),(i!==P.x||t!==P.y)&&P.attr({x:i,y:t}),P.x=i,P.y=t}function f(t,e){m?m.attr(t,e):D[t]=e}function g(){P.add(C),C.attr({text:i,x:n,y:r}),m&&c(o)&&C.attr({anchorX:o,anchorY:a})}var m,y,v,x,b,w,k,S,T=this,C=T.g(d),P=T.text("",0,0,l).attr({zIndex:1}),A=0,L=3,M=0,I=0,D={},l=C.attrSetters;Ze(C,"add",g),l.width=function(t){return v=t,!1},l.height=function(t){return x=t,!1},l.padding=function(t){return c(t)&&t!==L&&(L=t,p()),!1},l.paddingLeft=function(t){return c(t)&&t!==M&&(M=t,p()),!1},l.align=function(t){return A={left:0,center:.5,right:1}[t],!1},l.text=function(t,e){return P.attr(e,t),u(),p(),!1},l[_e]=function(t,e){return S=!0,I=t%2/2,f(e,t),!1},l.stroke=l.fill=l.r=function(t,e){return"fill"===e&&(S=!0),f(e,t),!1},l.anchorX=function(t,e){return o=t,f(e,t+I-b),!1},l.anchorY=function(t,e){return a=t,f(e,t-w),!1},l.x=function(t){return C.x=t,t-=A*((v||y.width)+L),b=he(t),C.attr("translateX",b),!1},l.y=function(t){return w=C.y=he(t),C.attr("translateY",w),!1};var E=C.css;return t(C,{css:function(t){if(t){var i={},t=e(t);je("fontSize,fontWeight,fontFamily,color,lineHeight,width,textDecoration,textShadow".split(","),function(e){t[e]!==_&&(i[e]=t[e],delete t[e])}),P.css(i)}return E.call(C,t)},getBBox:function(){return{width:y.width+2*L,height:y.height+2*L,x:y.x-L,y:y.y-L}},shadow:function(t){return m&&m.shadow(t),C},destroy:function(){Ke(C,"add",g),Ke(C.element,"mouseenter"),Ke(C.element,"mouseleave"),P&&(P=P.destroy()),m&&(m=m.destroy()),O.prototype.destroy.call(C),C=T=u=p=f=g=null}})}},H=ai,t(O.prototype,{htmlCss:function(e){var i=this.element;return(i=e&&"SPAN"===i.tagName&&e.width)&&(delete e.width,this.textWidth=i,this.updateTransform()),this.styles=t(this.styles,e),f(this.element,e),this},htmlGetBBox:function(){var t=this.element,e=this.bBox;return e||("text"===t.nodeName&&(t.style.position="absolute"),e=this.bBox={x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}),e},htmlUpdateTransform:function(){if(this.added){var t=this.renderer,e=this.element,n=this.translateX||0,r=this.translateY||0,s=this.x||0,o=this.y||0,a=this.textAlign||"left",l={left:0,center:.5,right:1}[a],h=this.shadows;if(f(e,{marginLeft:n,marginTop:r}),h&&je(h,function(t){f(t,{marginLeft:n+1,marginTop:r+1})}),this.inverted&&je(e.childNodes,function(i){t.invertChild(i,e)}),"SPAN"===e.tagName){var d,u=this.rotation,g=i(this.textWidth),m=[u,a,e.innerHTML,this.textWidth].join(",");m!==this.cTT&&(d=t.fontMetrics(e.style.fontSize).b,c(u)&&this.setSpanRotation(u,l,d),h=p(this.elemWidth,e.offsetWidth),h>g&&/[ \-]/.test(e.textContent||e.innerText)&&(f(e,{width:g+"px",display:"block",whiteSpace:"normal"}),h=g),this.getSpanCorrection(h,d,l,u,a)),f(e,{left:s+(this.xCorr||0)+"px",top:o+(this.yCorr||0)+"px"}),Se&&(d=e.offsetHeight),this.cTT=m}}else this.alignOnAdd=!0},setSpanRotation:function(t,e,i){var n={},r=we?"-ms-transform":Se?"-webkit-transform":Te?"MozTransform":be?"-o-transform":"";n[r]=n.transform="rotate("+t+"deg)",n[r+(Te?"Origin":"-origin")]=100*e+"% "+i+"px",f(this.element,n)},getSpanCorrection:function(t,e,i){this.xCorr=-t*i,this.yCorr=-e}}),t(ai.prototype,{html:function(e,i,n){var r=$.chart.style,s=this.createElement("span"),o=s.attrSetters,a=s.element,l=s.renderer;return o.text=function(t){return t!==a.innerHTML&&delete this.bBox,a.innerHTML=t,!1},o.x=o.y=o.align=o.rotation=function(t,e){return"align"===e&&(e="textAlign"),s[e]=t,s.htmlUpdateTransform(),!1},s.attr({text:e,x:he(i),y:he(n)}).css({position:"absolute",whiteSpace:"nowrap",fontFamily:r.fontFamily,fontSize:r.fontSize}),s.css=s.htmlCss,l.isSVG&&(s.add=function(e){var i,n=l.box.parentNode,r=[];if(this.parentGroup=e){if(i=e.div,!i){for(;e;)r.push(e),e=e.parentGroup;je(r.reverse(),function(e){var r;i=e.div=e.div||g(ze,{className:d(e.element,"class")},{position:"absolute",left:(e.translateX||0)+"px",top:(e.translateY||0)+"px"},i||n),r=i.style,t(e.attrSetters,{translateX:function(t){r.left=t+"px"},translateY:function(t){r.top=t+"px"},visibility:function(t,e){r[e]=t}})})}}else i=n;return i.appendChild(a),s.added=!0,s.alignOnAdd&&s.htmlUpdateTransform(),s}),s}});var li;if(!Ae&&!Me){Highcharts.VMLElement=li={init:function(t,e){var i=["<",e,' filled="f" stroked="f"'],n=["position: ","absolute",";"],r=e===ze;("shape"===e||r)&&n.push("left:0;top:0;width:1px;height:1px;"),n.push("visibility: ",r?"hidden":"visible"),i.push(' style="',n.join(""),'"/>'),e&&(i=r||"span"===e||"img"===e?i.join(""):t.prepVML(i),this.element=g(i)),this.renderer=t,this.attrSetters={}},add:function(t){var e=this.renderer,i=this.element,n=e.box,n=t?t.element||t:n;return t&&t.inverted&&e.invertChild(i,n),n.appendChild(i),this.added=!0,this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform(),Qe(this,"add"),this},updateTransform:O.prototype.htmlUpdateTransform,setSpanRotation:function(){var t=this.rotation,e=ge(t*ve),i=me(t*ve);f(this.element,{filter:t?["progid:DXImageTransform.Microsoft.Matrix(M11=",e,", M12=",-i,", M21=",i,", M22=",e,", sizingMethod='auto expand')"].join(""):Be})},getSpanCorrection:function(t,e,i,n,r){var s,o=n?ge(n*ve):1,a=n?me(n*ve):0,l=p(this.elemHeight,this.element.offsetHeight);this.xCorr=0>o&&-t,this.yCorr=0>a&&-l,s=0>o*a,this.xCorr+=a*e*(s?1-i:i),this.yCorr-=o*e*(n?s?i:1-i:1),r&&"left"!==r&&(this.xCorr-=t*i*(0>o?-1:1),n&&(this.yCorr-=l*i*(0>a?-1:1)),f(this.element,{textAlign:r}))},pathToVML:function(t){for(var e=t.length,i=[];e--;)o(t[e])?i[e]=he(10*t[e])-5:"Z"===t[e]?i[e]="x":(i[e]=t[e],!t.isArc||"wa"!==t[e]&&"at"!==t[e]||(i[e+5]===i[e+7]&&(i[e+7]+=t[e+7]>t[e+5]?1:-1),i[e+6]===i[e+8]&&(i[e+8]+=t[e+8]>t[e+6]?1:-1)));return i.join(" ")||"x"},attr:function(t,e){var i,r,s,a,l,h=this.element||{},u=h.style,p=h.nodeName,f=this.renderer,m=this.symbolName,y=this.shadows,v=this.attrSetters,x=this;if(n(t)&&c(e)&&(i=t,t={},t[i]=e),n(t))i=t,x="strokeWidth"===i||"stroke-width"===i?this.strokeweight:this[i];else for(i in t)if(r=t[i],l=!1,s=v[i]&&v[i].call(this,r,i),s!==!1&&null!==r){if(s!==_&&(r=s),m&&/^(x|y|r|start|end|width|height|innerR|anchorX|anchorY)/.test(i))a||(this.symbolAttr(t),a=!0),l=!0;else if("d"===i){if(r=r||[],this.d=r.join(" "),h.path=r=this.pathToVML(r),y)for(s=y.length;s--;)y[s].path=y[s].cutOff?this.cutOffPath(r,y[s].cutOff):r;l=!0}else if("visibility"===i){if(y)for(s=y.length;s--;)y[s].style[i]=r;"DIV"===p&&(r="hidden"===r?"-999em":0,ke||(u[i]=r?"visible":"hidden"),i="top"),u[i]=r,l=!0}else"zIndex"===i?(r&&(u[i]=r),l=!0):-1!==Ye(i,["x","y","width","height"])?(this[i]=r,"x"===i||"y"===i?i={x:"left",y:"top"}[i]:r=ue(0,r),this.updateClipping?(this[i]=r,this.updateClipping()):u[i]=r,l=!0):"class"===i&&"DIV"===p?h.className=r:"stroke"===i?(r=f.color(r,h,i),i="strokecolor"):"stroke-width"===i||"strokeWidth"===i?(h.stroked=r?!0:!1,i="strokeweight",this[i]=r,o(r)&&(r+="px")):"dashstyle"===i?((h.getElementsByTagName("stroke")[0]||g(f.prepVML([" "]),null,null,h))[i]=r||"solid",this.dashstyle=r,l=!0):"fill"===i?"SPAN"===p?u.color=r:"IMG"!==p&&(h.filled=r!==Be?!0:!1,r=f.color(r,h,i,this),i="fillcolor"):"opacity"===i?l=!0:"shape"===p&&"rotation"===i?(this[i]=h.style[i]=r,h.style.left=-he(me(r*ve)+1)+"px",h.style.top=he(ge(r*ve))+"px"):("translateX"===i||"translateY"===i||"rotation"===i)&&(this[i]=r,this.updateTransform(),l=!0);l||(ke?h[i]=r:d(h,i,r))}return x},clip:function(t){var e,i=this;return t?(e=t.members,h(e,i),e.push(i),i.destroyClip=function(){h(e,i)},t=t.getCSS(i)):(i.destroyClip&&i.destroyClip(),t={clip:ke?"inherit":"rect(auto)"}),i.css(t)},css:O.prototype.htmlCss,safeRemoveChild:function(t){t.parentNode&&L(t)},destroy:function(){return this.destroyClip&&this.destroyClip(),O.prototype.destroy.apply(this)},on:function(t,e){return this.element["on"+t]=function(){var t=ae.event;t.target=t.srcElement,e(t)},this},cutOffPath:function(t,e){var n,t=t.split(/[ ,]/);return n=t.length,(9===n||11===n)&&(t[n-4]=t[n-2]=i(t[n-2])-10*e),t.join(" ")},shadow:function(t,e,n){var r,s,o,a,l,h,c,d=[],u=this.element,f=this.renderer,m=u.style,y=u.path;if(y&&"string"!=typeof y.value&&(y="x"),l=y,t){for(h=p(t.width,3),c=(t.opacity||.15)/h,r=1;3>=r;r++)a=2*h+1-2*r,n&&(l=this.cutOffPath(y.value,a+.5)),o=[' '],s=g(f.prepVML(o),null,{left:i(m.left)+p(t.offsetX,1),top:i(m.top)+p(t.offsetY,1)}),n&&(s.cutOff=a+1),o=[' '],g(f.prepVML(o),null,null,s),e?e.element.appendChild(s):u.parentNode.insertBefore(s,u),d.push(s);this.shadows=d}return this}},li=m(O,li);var hi={Element:li,isIE8:xe.indexOf("MSIE 8.0")>-1,init:function(t,e,i){var n,r;if(this.alignedObjects=[],n=this.createElement(ze),r=n.element,r.style.position="relative",t.appendChild(n.element),this.isVML=!0,this.box=r,this.boxWrapper=n,this.cache={},this.setSize(e,i,!1),!oe.namespaces.hcv){oe.namespaces.add("hcv","urn:schemas-microsoft-com:vml");try{oe.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}catch(s){oe.styleSheets[0].cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}}},isHidden:function(){return!this.box.offsetWidth},clipRect:function(e,i,n,s){var o=this.createElement(),a=r(e);return t(o,{members:[],left:(a?e.x:e)+1,top:(a?e.y:i)+1,width:(a?e.width:n)-1,height:(a?e.height:s)-1,getCSS:function(e){var i=e.element,n=i.nodeName,e=e.inverted,r=this.top-("shape"===n?i.offsetTop:0),s=this.left,i=s+this.width,o=r+this.height,r={clip:"rect("+he(e?s:r)+"px,"+he(e?o:i)+"px,"+he(e?i:o)+"px,"+he(e?r:s)+"px)"};return!e&&ke&&"DIV"===n&&t(r,{width:i+"px",height:o+"px"}),r},updateClipping:function(){je(o.members,function(t){t.css(o.getCSS(t))})}})},color:function(t,e,i,n){var r,s,o,a=this,l=/^rgba/,h=Be;if(t&&t.linearGradient?o="gradient":t&&t.radialGradient&&(o="pattern"),o){var c,d,u,p,f,m,y,v,x=t.linearGradient||t.radialGradient,b="",t=t.stops,w=[],k=function(){s=[' '],g(a.prepVML(s),null,null,e)};if(u=t[0],v=t[t.length-1],u[0]>0&&t.unshift([0,u[1]]),v[0]<1&&t.push([1,v[1]]),je(t,function(t,e){l.test(t[1])?(r=oi(t[1]),c=r.get("rgb"),d=r.get("a")):(c=t[1],d=1),w.push(100*t[0]+"% "+c),e?(f=d,m=c):(p=d,y=c)}),"fill"===i)if("gradient"===o)i=x.x1||x[0]||0,t=x.y1||x[1]||0,u=x.x2||x[2]||0,x=x.y2||x[3]||0,b='angle="'+(90-180*le.atan((x-t)/(u-i))/ye)+'"',k();else{var S,h=x.r,T=2*h,C=2*h,P=x.cx,A=x.cy,L=e.radialReference,h=function(){L&&(S=n.getBBox(),P+=(L[0]-S.x)/S.width-.5,A+=(L[1]-S.y)/S.height-.5,T*=L[2]/S.width,C*=L[2]/S.height),b='src="'+$.global.VMLRadialGradientURL+'" size="'+T+","+C+'" origin="0.5,0.5" position="'+P+","+A+'" color2="'+y+'" ',k()};n.added?h():Ze(n,"add",h),h=m}else h=c}else l.test(t)&&"IMG"!==e.tagName?(r=oi(t),s=["<",i,' opacity="',r.get("a"),'"/>'],g(this.prepVML(s),null,null,e),h=r.get("rgb")):(h=e.getElementsByTagName(i),h.length&&(h[0].opacity=1,h[0].type="solid"),h=t);return h},prepVML:function(t){var e=this.isIE8,t=t.join("");return e?(t=t.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),t=-1===t.indexOf('style="')?t.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):t.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):t=t.replace("<","1&&s.attr({x:e,y:i,width:n,height:r}),s},rect:function(t,e,i,n,s,o){var a=this.symbol("rect");return a.r=r(t)?t.r:s,a.attr(r(t)?t:a.crisp(o,t,e,ue(i,0),ue(n,0)))},invertChild:function(t,e){var n=e.style;f(t,{flip:"x",left:i(n.width)-1,top:i(n.height)-1,rotation:-90})},symbols:{arc:function(t,e,i,n,r){var s=r.start,o=r.end,a=r.r||i||n,i=r.innerR,n=ge(s),l=me(s),h=ge(o),c=me(o);return o-s===0?["x"]:(s=["wa",t-a,e-a,t+a,e+a,t+a*n,e+a*l,t+a*h,e+a*c],r.open&&!i&&s.push("e","M",t,e),s.push("at",t-i,e-i,t+i,e+i,t+i*h,e+i*c,t+i*n,e+i*l,"x","e"),s.isArc=!0,s)},circle:function(t,e,i,n,r){return r&&(i=n=2*r.r),r&&r.isCircle&&(t-=i/2,e-=n/2),["wa",t,e,t+i,e+n,t+i,e+n/2,t+i,e+n/2,"e"]},rect:function(t,e,i,n,r){var s,o=t+i,a=e+n;return c(r)&&r.r?(s=pe(r.r,i,n),o=["M",t+s,e,"L",o-s,e,"wa",o-2*s,e,o,e+2*s,o-s,e,o,e+s,"L",o,a-s,"wa",o-2*s,a-2*s,o,a,o,a-s,o-s,a,"L",t+s,a,"wa",t,a-2*s,t+2*s,a,t+s,a,t,a-s,"L",t,e+s,"wa",t,e,t+2*s,e+2*s,t,e+s,t+s,e,"x","e"]):o=ai.prototype.symbols.square.apply(0,arguments),o}}};Highcharts.VMLRenderer=li=function(){this.init.apply(this,arguments)},li.prototype=e(ai.prototype,hi),H=li}ai.prototype.measureSpanWidth=function(t,e){var i,n=oe.createElement("span");return i=oe.createTextNode(t),n.appendChild(i),f(n,e),this.box.appendChild(n),i=n.offsetWidth,L(n),i};var ci;Me&&(Highcharts.CanVGRenderer=li=function(){Pe="http://www.w3.org/1999/xhtml"},li.prototype.symbols={},ci=function(){function t(){var t,i=e.length;for(t=0;i>t;t++)e[t]();e=[]}var e=[];return{push:function(i,n){0===e.length&&Ge(n,t),e.push(i)}}}(),H=li),R.prototype={addLabel:function(){var e,i=this.axis,n=i.options,r=i.chart,s=i.horiz,a=i.categories,h=i.names,d=this.pos,u=n.labels,f=i.tickPositions,s=s&&a&&!u.step&&!u.staggerLines&&!u.rotation&&r.plotWidth/f.length||!s&&(r.margin[3]||.33*r.chartWidth),g=d===f[0],m=d===f[f.length-1],h=a?p(a[d],h[d],d):d,a=this.label,y=f.info;i.isDatetimeAxis&&y&&(e=n.dateTimeLabelFormats[y.higherRanks[d]||y.unitName]),this.isFirst=g,this.isLast=m,n=i.labelFormatter.call({axis:i,chart:r,isFirst:g,isLast:m,dateTimeLabelFormat:e,value:i.isLog?I(l(h)):h}),d=s&&{width:ue(1,he(s-2*(u.padding||10)))+"px"},d=t(d,u.style),c(a)?a&&a.attr({text:n}).css(d):(e={align:i.labelAlign},o(u.rotation)&&(e.rotation=u.rotation),s&&u.ellipsis&&(e._clipHeight=i.len/f.length),this.label=c(n)&&u.enabled?r.renderer.text(n,0,0,u.useHTML).attr(e).css(d).add(i.labelGroup):null)},getLabelSize:function(){var t=this.label,e=this.axis;return t?t.getBBox()[e.horiz?"height":"width"]:0},getLabelSides:function(){var t=this.label.getBBox(),e=this.axis,i=e.horiz,n=e.options.labels,t=i?t.width:t.height,e=i?t*{left:0,center:.5,right:1}[e.labelAlign]-n.x:t;return[-e,t-e]},handleOverflow:function(t,e){var i,n=!0,r=this.axis,s=this.isFirst,o=this.isLast,a=r.horiz?e.x:e.y,l=r.reversed,h=r.tickPositions,c=this.getLabelSides(),d=c[0],c=c[1],u=r.pos,p=u+r.len,f=this.label.line||0,g=r.labelEdge,m=r.justifyLabels&&(s||o);return g[f]===_||a+d>g[f]?g[f]=a+c:m||(n=!1),m&&(i=(r=r.ticks[h[t+(s?1:-1)]])&&r.label.xy&&r.label.xy.x+r.getLabelSides()[s?0:1],h=i,s&&!l||o&&l?u>a+d&&(a=u-d,r&&a+c>h&&(n=!1)):a+c>p&&(a=p-c,r&&h>a+d&&(n=!1)),e.x=a),n},getPosition:function(t,e,i,n){var r=this.axis,s=r.chart,o=n&&s.oldChartHeight||s.chartHeight;return{x:t?r.translate(e+i,null,null,n)+r.transB:r.left+r.offset+(r.opposite?(n&&s.oldChartWidth||s.chartWidth)-r.right-r.left:0),y:t?o-r.bottom+r.offset-(r.opposite?r.height:0):o-r.translate(e+i,null,null,n)-r.transB}},getLabelPosition:function(t,e,i,n,r,s,o,a){var l=this.axis,h=l.transA,d=l.reversed,u=l.staggerLines,p=l.chart.renderer.fontMetrics(r.style.fontSize).b,f=r.rotation,t=t+r.x-(s&&n?s*h*(d?-1:1):0),e=e+r.y-(s&&!n?s*h*(d?1:-1):0);return f&&2===l.side&&(e-=p-p*ge(f*ve)),!c(r.y)&&!f&&(e+=p-i.getBBox().height/2),u&&(i.line=o/(a||1)%u,e+=i.line*(l.labelOffset/u)),{x:t,y:e}},getMarkPath:function(t,e,i,n,r,s){return s.crispLine(["M",t,e,"L",t+(r?0:-i),e+(r?i:0)],n)},render:function(t,e,i){var n=this.axis,r=n.options,s=n.chart.renderer,o=n.horiz,a=this.type,l=this.label,h=this.pos,c=r.labels,d=this.gridLine,u=a?a+"Grid":"grid",f=a?a+"Tick":"tick",g=r[u+"LineWidth"],m=r[u+"LineColor"],y=r[u+"LineDashStyle"],v=r[f+"Length"],u=r[f+"Width"]||0,x=r[f+"Color"],b=r[f+"Position"],f=this.mark,w=c.step,k=!0,S=n.tickmarkOffset,T=this.getPosition(o,h,S,e),C=T.x,T=T.y,P=o&&C===n.pos+n.len||!o&&T===n.pos?-1:1;this.isActive=!0,g&&(h=n.getPlotLinePath(h+S,g*P,e,!0),d===_&&(d={stroke:m,"stroke-width":g},y&&(d.dashstyle=y),a||(d.zIndex=1),e&&(d.opacity=0),this.gridLine=d=g?s.path(h).attr(d).add(n.gridGroup):null),!e&&d&&h&&d[this.isNew?"attr":"animate"]({d:h,opacity:i})),u&&v&&("inside"===b&&(v=-v),n.opposite&&(v=-v),a=this.getMarkPath(C,T,v,u*P,o,s),f?f.animate({d:a,opacity:i}):this.mark=s.path(a).attr({stroke:x,"stroke-width":u,opacity:i}).add(n.axisGroup)),l&&!isNaN(C)&&(l.xy=T=this.getLabelPosition(C,T,l,o,c,S,t,w),this.isFirst&&!this.isLast&&!p(r.showFirstLabel,1)||this.isLast&&!this.isFirst&&!p(r.showLastLabel,1)?k=!1:!n.isRadial&&!c.step&&!c.rotation&&!e&&0!==i&&(k=this.handleOverflow(t,T)),w&&t%w&&(k=!1),k&&!isNaN(T.y)?(T.opacity=i,l[this.isNew?"attr":"animate"](T),this.isNew=!1):l.attr("y",-9999))},destroy:function(){A(this,this.axis)}};var di=function(t,e){this.axis=t,e&&(this.options=e,this.id=e.id)};di.prototype={render:function(){var t,i=this,n=i.axis,r=n.horiz,s=(n.pointRange||0)/2,o=i.options,l=o.label,h=i.label,d=o.width,u=o.to,f=o.from,g=c(f)&&c(u),m=o.value,y=o.dashStyle,v=i.svgElem,x=[],b=o.color,w=o.zIndex,k=o.events,S=n.chart.renderer;if(n.isLog&&(f=a(f),u=a(u),m=a(m)),d)x=n.getPlotLinePath(m,d),s={stroke:b,"stroke-width":d},y&&(s.dashstyle=y);else{if(!g)return;f=ue(f,n.min-s),u=pe(u,n.max+s),x=n.getPlotBandPath(f,u,o),s={fill:b},o.borderWidth&&(s.stroke=o.borderColor,s["stroke-width"]=o.borderWidth)}if(c(w)&&(s.zIndex=w),v)x?v.animate({d:x},null,v.onGetPath):(v.hide(),v.onGetPath=function(){v.show()},h&&(i.label=h=h.destroy()));else if(x&&x.length&&(i.svgElem=v=S.path(x).attr(s).add(),k))for(t in o=function(t){v.on(t,function(e){k[t].apply(i,[e])})},k)o(t);return l&&c(l.text)&&x&&x.length&&n.width>0&&n.height>0?(l=e({align:r&&g&&"center",x:r?!g&&4:10,verticalAlign:!r&&g&&"middle",y:r?g?16:10:g?6:-4,rotation:r&&!g&&90},l),h||(i.label=h=S.text(l.text,0,0,l.useHTML).attr({align:l.textAlign||l.align,rotation:l.rotation,zIndex:w}).css(l.style).add()),n=[x[1],x[4],p(x[6],x[1])],x=[x[2],x[5],p(x[7],x[2])],r=C(n),g=C(x),h.align(l,!1,{x:r,y:g,width:P(n)-r,height:P(x)-g}),h.show()):h&&h.hide(),i},destroy:function(){h(this.axis.plotLinesAndBands,this),delete this.axis,A(this)}},z.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#C0C0C0",labels:$e,lineColor:"#C0D0E0",lineWidth:1,minPadding:.01,maxPadding:.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#4d759e",fontWeight:"bold"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8,y:3},lineWidth:0,maxPadding:.05,minPadding:.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return y(this.total,-1)},style:$e.style}},defaultLeftAxisOptions:{labels:{x:-8,y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:8,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{x:0,y:14},title:{rotation:0}},defaultTopAxisOptions:{labels:{x:0,y:-5},title:{rotation:0}},init:function(t,e){var i=e.isX;this.horiz=t.inverted?!i:i,this.coll=(this.isXAxis=i)?"xAxis":"yAxis",this.opposite=e.opposite,this.side=e.side||(this.horiz?this.opposite?0:2:this.opposite?1:3),this.setOptions(e);var n=this.options,r=n.type;this.labelFormatter=n.labels.formatter||this.defaultLabelFormatter,this.userOptions=e,this.minPixelPadding=0,this.chart=t,this.reversed=n.reversed,this.zoomEnabled=n.zoomEnabled!==!1,this.categories=n.categories||"category"===r,this.names=[],this.isLog="logarithmic"===r,this.isDatetimeAxis="datetime"===r,this.isLinked=c(n.linkedTo),this.tickmarkOffset=this.categories&&"between"===n.tickmarkPlacement?.5:0,this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len=0,this.minRange=this.userMinRange=n.minRange||n.maxZoom,this.range=n.range,this.offset=n.offset||0,this.stacks={},this.oldStacks={},this.stackExtremes={},this.min=this.max=null,this.crosshair=p(n.crosshair,u(t.options.tooltip.crosshairs)[i?0:1],!1);var s,n=this.options.events;-1===Ye(this,t.axes)&&(t.axes.push(this),t[this.coll].push(this)),this.series=this.series||[],t.inverted&&i&&this.reversed===_&&(this.reversed=!0),this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(s in n)Ze(this,s,n[s]);this.isLog&&(this.val2lin=a,this.lin2val=l)},setOptions:function(t){this.options=e(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],e($[this.coll],t))},defaultLabelFormatter:function(){var t,e=this.axis,i=this.value,n=e.categories,r=this.dateTimeLabelFormat,s=$.lang.numericSymbols,o=s&&s.length,a=e.options.labels.format,e=e.isLog?i:e.tickInterval;if(a)t=b(a,this);else if(n)t=i;else if(r)t=X(r,i);else if(o&&e>=1e3)for(;o--&&t===_;)n=Math.pow(1e3,o+1),e>=n&&null!==s[o]&&(t=y(i/n,-1)+s[o]);return t===_&&(t=i>=1e4?y(i,0):y(i,-1,_,"")),t},getSeriesExtremes:function(){var t=this,e=t.chart;t.hasVisibleSeries=!1,t.dataMin=t.dataMax=null,t.stackExtremes={},t.buildStacks(),je(t.series,function(i){if(i.visible||!e.options.chart.ignoreHiddenSeries){var n;n=i.options.threshold;var r;t.hasVisibleSeries=!0,t.isLog&&0>=n&&(n=null),t.isXAxis?(n=i.xData,n.length&&(t.dataMin=pe(p(t.dataMin,n[0]),C(n)),t.dataMax=ue(p(t.dataMax,n[0]),P(n)))):(i.getExtremes(),r=i.dataMax,i=i.dataMin,c(i)&&c(r)&&(t.dataMin=pe(p(t.dataMin,i),i),t.dataMax=ue(p(t.dataMax,r),r)),c(n)&&(t.dataMin>=n?(t.dataMin=n,t.ignoreMinPadding=!0):t.dataMaxt||t>h+this.width)&&(a=!0)):(t=h,i=u-this.right,(c>s||s>c+this.height)&&(a=!0)),a&&!n?null:l.renderer.crispLine(["M",t,s,"L",i,o],e||1)},getLinearTickPositions:function(t,e,i){for(var n,e=I(ce(e/t)*t),i=I(de(i/t)*t),r=[];i>=e&&(r.push(e),e=I(e+t),e!==n);)n=e;return r},getMinorTickPositions:function(){var t,e=this.options,i=this.tickPositions,n=this.minorTickInterval,r=[];if(this.isLog)for(t=i.length,e=1;t>e;e++)r=r.concat(this.getLogTickPositions(n,i[e-1],i[e],!0));else if(this.isDatetimeAxis&&"auto"===e.minorTickInterval)r=r.concat(this.getTimeTicks(this.normalizeTimeTickInterval(n),this.min,this.max,e.startOfWeek)),r[0]=this.minRange;if(this.isXAxis&&this.minRange===_&&!this.isLog&&(c(o.min)||c(o.max)?this.minRange=null:(je(this.series,function(t){for(r=t.xData,i=s=t.xIncrement?1:r.length-1;i>0;i--)n=r[i]-r[i-1],(e===_||e>n)&&(e=n)}),this.minRange=pe(5*e,this.dataMax-this.dataMin))),l-al-a&&(t[0]=l-d,t[1]=p(o.min,l-d),a=P(t))}this.min=a,this.max=l},setAxisTranslation:function(t){var e,i=this.max-this.min,r=0,s=0,o=0,a=this.linkedParent,l=!!this.categories,h=this.transA;(this.isXAxis||l)&&(a?(s=a.minPointOffset,o=a.pointRangePadding):je(this.series,function(t){var a=ue(t.pointRange,+l),h=t.options.pointPlacement,d=t.closestPointRange;a>i&&(a=0),r=ue(r,a),s=ue(s,n(h)?0:a/2),o=ue(o,"on"===h?0:a),!t.noSharedTooltip&&c(d)&&(e=c(e)?pe(e,d):d)}),a=this.ordinalSlope&&e?this.ordinalSlope/e:1,this.minPointOffset=s*=a,this.pointRangePadding=o*=a,this.pointRange=pe(r,i),this.closestPointRange=e),t&&(this.oldTransA=h),this.translationSlope=this.transA=h=this.len/(i+o||1),this.transB=this.horiz?this.left:this.bottom,this.minPixelPadding=h*s},setTickPositions:function(t){var e,i=this,n=i.chart,r=i.options,s=i.isLog,o=i.isDatetimeAxis,l=i.isXAxis,h=i.isLinked,d=i.options.tickPositioner,u=r.maxPadding,f=r.minPadding,g=r.tickInterval,m=r.minTickInterval,y=r.tickPixelInterval,v=i.categories;h?(i.linkedParent=n[i.coll][r.linkedTo],n=i.linkedParent.getExtremes(),i.min=p(n.min,n.dataMin),i.max=p(n.max,n.dataMax),r.type!==i.linkedParent.options.type&&M(11,1)):(i.min=p(i.userMin,r.min,i.dataMin),i.max=p(i.userMax,r.max,i.dataMax)),s&&(!t&&pe(i.min,p(i.dataMin,i.min))<=0&&M(10,1),i.min=I(a(i.min)),i.max=I(a(i.max))),i.range&&c(i.max)&&(i.userMin=i.min=ue(i.min,i.max-i.range),i.userMax=i.max,i.range=null),i.beforePadding&&i.beforePadding(),i.adjustForMinRange(),!v&&!i.usePercentage&&!h&&c(i.min)&&c(i.max)&&(n=i.max-i.min)&&(c(r.min)||c(i.userMin)||!f||!(i.dataMin<0)&&i.ignoreMinPadding||(i.min-=n*f),c(r.max)||c(i.userMax)||!u||!(i.dataMax>0)&&i.ignoreMaxPadding||(i.max+=n*u)),i.min===i.max||void 0===i.min||void 0===i.max?i.tickInterval=1:h&&!g&&y===i.linkedParent.options.tickPixelInterval?i.tickInterval=i.linkedParent.tickInterval:(i.tickInterval=p(g,v?1:(i.max-i.min)*y/ue(i.len,y)),!c(g)&&i.lenue(2*i.len,200)&&M(19,!0),t=o?i.getTimeTicks(i.normalizeTimeTickInterval(i.tickInterval,r.units),i.min,i.max,r.startOfWeek,i.ordinalPositions,i.closestPointRange,!0):s?i.getLogTickPositions(i.tickInterval,i.min,i.max):i.getLinearTickPositions(i.tickInterval,i.min,i.max),e&&t.splice(1,t.length-2),i.tickPositions=t),h||(s=t[0],o=t[t.length-1],h=i.minPointOffset||0,r.startOnTick?i.min=s:i.min-h>s&&t.shift(),r.endOnTick?i.max=o:i.max+h(e[n]||0)&&this.options.alignTicks!==!1&&(e[n]=i.length),t.maxTicks=e},adjustTickAmount:function(){var t=this._maxTicksKey,e=this.tickPositions,i=this.chart.maxTicks;if(i&&i[t]&&!this.isDatetimeAxis&&!this.categories&&!this.isLinked&&this.options.alignTicks!==!1&&this.min!==_){var n=this.tickAmount,r=e.length;if(this.tickAmount=t=i[t],t>r){for(;e.length=this.dataMax&&(e=_)),this.displayBtn=t!==_||e!==_,this.setExtremes(t,e,!1,_,{trigger:"zoom"}),!0},setAxisSize:function(){var t,e,i=this.chart,n=this.options,r=n.offsetLeft||0,s=n.offsetRight||0,o=this.horiz;this.left=e=p(n.left,i.plotLeft+r),this.top=t=p(n.top,i.plotTop),this.width=r=p(n.width,i.plotWidth-r+s),this.height=n=p(n.height,i.plotHeight),this.bottom=i.chartHeight-n-t,this.right=i.chartWidth-r-e,this.len=ue(o?r:n,0),this.pos=o?e:t},getExtremes:function(){var t=this.isLog;return{min:t?I(l(this.min)):this.min,max:t?I(l(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(t){var e=this.isLog,i=e?l(this.min):this.min,e=e?l(this.max):this.max;return i>t||null===t?t=i:t>e&&(t=e),this.translate(t,0,1,0,1)},autoLabelAlign:function(t){return t=(p(t,0)-90*this.side+720)%360,t>15&&165>t?"right":t>195&&345>t?"left":"center"},getOffset:function(){var t,e,i,n,r,s,o,a=this,l=a.chart,h=l.renderer,d=a.options,u=a.tickPositions,f=a.ticks,g=a.horiz,m=a.side,y=l.inverted?[1,0,3,2][m]:m,v=0,x=0,b=d.title,w=d.labels,k=0,S=l.axisOffset,T=l.clipOffset,C=[-1,1,1,-1][m],P=1,A=p(w.maxStaggerLines,5);if(a.hasData=t=a.hasVisibleSeries||c(a.min)&&c(a.max)&&!!u,a.showAxis=l=t||p(d.showEmpty,!0),a.staggerLines=a.horiz&&w.staggerLines,a.axisGroup||(a.gridGroup=h.g("grid").attr({zIndex:d.gridZIndex||1}).add(),a.axisGroup=h.g("axis").attr({zIndex:d.zIndex||2}).add(),a.labelGroup=h.g("axis-labels").attr({zIndex:w.zIndex||7}).add()),t||a.isLinked){if(a.labelAlign=p(w.align||a.autoLabelAlign(w.rotation)),je(u,function(t){f[t]?f[t].addLabel():f[t]=new R(a,t)}),a.horiz&&!a.staggerLines&&A&&!w.rotation){for(i=a.reversed?[].concat(u).reverse():u;A>P;){for(t=[],n=!1,w=0;w1&&(a.staggerLines=P)}je(u,function(t){(0===m||2===m||{1:"left",3:"right"}[m]===a.labelAlign)&&(k=ue(f[t].getLabelSize(),k))}),a.staggerLines&&(k*=a.staggerLines,a.labelOffset=k)}else for(i in f)f[i].destroy(),delete f[i];b&&b.text&&b.enabled!==!1&&(a.axisTitle||(a.axisTitle=h.text(b.text,0,0,b.useHTML).attr({zIndex:7,rotation:b.rotation||0,align:b.textAlign||{low:"left",middle:"center",high:"right"}[b.align]}).css(b.style).add(a.axisGroup),a.axisTitle.isNew=!0),l&&(v=a.axisTitle.getBBox()[g?"height":"width"],x=p(b.margin,g?5:10),e=b.offset),a.axisTitle[l?"show":"hide"]()),a.offset=C*p(d.offset,S[m]),a.axisTitleMargin=p(e,k+x+(2!==m&&k&&C*d.labels[g?"y":"x"])),S[m]=ue(S[m],a.axisTitleMargin+v+C*a.offset),T[y]=ue(T[y],2*ce(d.lineWidth/2))},getLinePath:function(t){var e=this.chart,i=this.opposite,n=this.offset,r=this.horiz,s=this.left+(i?this.width:0)+n,n=e.chartHeight-this.bottom-(i?this.height:0)+n;return i&&(t*=-1),e.renderer.crispLine(["M",r?this.left:s,r?n:this.top,"L",r?e.chartWidth-this.right:s,r?n:e.chartHeight-this.bottom],t)},getTitlePosition:function(){var t=this.horiz,e=this.left,n=this.top,r=this.len,s=this.options.title,o=t?e:n,a=this.opposite,l=this.offset,h=i(s.style.fontSize||12),r={low:o+(t?0:r),middle:o+r/2,high:o+(t?r:0)}[s.align],e=(t?n+this.height:e)+(t?1:-1)*(a?-1:1)*this.axisTitleMargin+(2===this.side?h:0);return{x:t?r:e+(a?this.width:0)+l+(s.x||0),y:t?e-(a?this.height:0)+l:r+(s.y||0)}},render:function(){var t,e,i,n=this,r=n.horiz,s=n.reversed,o=n.chart,a=o.renderer,h=n.options,d=n.isLog,u=n.isLinked,p=n.tickPositions,f=n.axisTitle,g=n.stacks,m=n.ticks,y=n.minorTicks,v=n.alternateBands,x=h.stackLabels,b=h.alternateGridColor,w=n.tickmarkOffset,k=h.lineWidth,S=o.hasRendered&&c(n.oldMin)&&!isNaN(n.oldMin),T=n.hasData,C=n.showAxis,P=n.justifyLabels=!n.staggerLines&&r&&"justify"===h.labels.overflow;if(n.labelEdge.length=0,je([m,y,v],function(t){for(var e in t)t[e].isActive=!1}),(T||u)&&(n.minorTickInterval&&!n.categories&&je(n.getMinorTickPositions(),function(t){y[t]||(y[t]=new R(n,t,"minor")),S&&y[t].isNew&&y[t].render(null,!0),y[t].render(null,!1,1)}),p.length&&(t=p.slice(),(r&&s||!r&&!s)&&t.reverse(),P&&(t=t.slice(1).concat([t[0]])),je(t,function(e,i){P&&(i=i===t.length-1?0:i+1),(!u||e>=n.min&&e<=n.max)&&(m[e]||(m[e]=new R(n,e)),S&&m[e].isNew&&m[e].render(i,!0,.1),m[e].render(i,!1,1))}),w&&0===n.min&&(m[-1]||(m[-1]=new R(n,-1,null,!0)),m[-1].render(-1))),b&&je(p,function(t,r){r%2===0&&t=.5)t=he(t),o=this.getLinearTickPositions(t,e,i);else if(t>=.08)for(var h,c,d,u,f,s=ce(e),r=t>.3?[1,2,4]:t>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];i+1>s&&!f;s++)for(c=r.length,h=0;c>h&&!f;h++)d=a(l(s)*r[h]),d>e&&(!n||i>=u)&&o.push(u),u>i&&(f=!0),u=d;else e=l(e),i=l(i),t=r[n?"minorTickInterval":"tickInterval"],t=p("auto"===t?null:t,this._minorAutoInterval,(i-e)*(r.tickPixelInterval/(n?5:1))/((n?s/this.tickPositions.length:s)||1)),t=k(t,null,w(t)),o=Ue(this.getLinearTickPositions(t,e,i),a),n||(this._minorAutoInterval=t/5);return n||(this.tickInterval=t),o},z.prototype.getTimeTicks=function(e,i,n,r){var s,o=[],a={},l=$.global.useUTC,h=new Date(i-q),d=e.unitRange,u=e.count;if(c(i)){d>=j.second&&(h.setMilliseconds(0),h.setSeconds(d>=j.minute?0:u*ce(h.getSeconds()/u))),d>=j.minute&&h[ee](d>=j.hour?0:u*ce(h[U]()/u)),d>=j.hour&&h[ie](d>=j.day?0:u*ce(h[Z]()/u)),d>=j.day&&h[ne](d>=j.month?1:u*ce(h[Q]()/u)),d>=j.month&&(h[re](d>=j.year?0:u*ce(h[J]()/u)),s=h[te]()),d>=j.year&&(s-=s%u,h[se](s)),d===j.week&&h[ne](h[Q]()-h[K]()+p(r,1)),i=1,q&&(h=new Date(h.getTime()+q)),s=h[te]();for(var r=h.getTime(),f=h[J](),g=h[Q](),m=l?q:(864e5+6e4*h.getTimezoneOffset())%864e5;n>r;)o.push(r),d===j.year?r=V(s+i*u,0):d===j.month?r=V(s,f+i*u):l||d!==j.day&&d!==j.week?r+=d*u:r=V(s,f,g+i*u*(d===j.day?1:7)),i++;o.push(r),je(Ve(o,function(t){return d<=j.hour&&t%j.day===m}),function(t){a[t]="day"})}return o.info=t(e,{higherRanks:a,totalRange:d*u}),o},z.prototype.normalizeTimeTickInterval=function(t,e){var i,n=e||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]],r=n[n.length-1],s=j[r[0]],o=r[1];for(i=0;it&&(o=[1,2,5]),n=k(t/s,o,"year"===r[0]?ue(w(t/s),1):1),{unitRange:s,count:n,unitName:r[0]}},B.prototype={destroy:function(){A(this,this.axis)},render:function(t){var e=this.options,i=e.format,i=i?b(i,this):e.formatter.call(this);this.label?this.label.attr({text:i,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(i,0,0,e.useHTML).css(e.style).attr({align:this.textAlign,rotation:e.rotation,visibility:"hidden"}).add(t)},setOffset:function(t,e){var i=this.axis,n=i.chart,r=n.inverted,s=this.isNegative,o=i.translate(this.percent?100:this.total,0,0,0,1),i=i.translate(0),i=fe(o-i),a=n.xAxis[0].translate(this.x)+t,l=n.plotHeight,s={x:r?s?o:o-i:a,y:r?l-a-e:s?l-o-i:l-o,width:r?i:e,height:r?e:i};(r=this.label)&&(r.align(this.alignOptions,null,s),s=r.alignAttr,r.attr({visibility:this.options.crop===!1||n.isInsidePlot(s.x,s.y)?Ae?"inherit":"visible":"hidden"}))}},F.prototype={init:function(t,e){var n=e.borderWidth,r=e.style,s=i(r.padding);this.chart=t,this.options=e,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.label=t.renderer.label("",0,0,e.shape,null,null,e.useHTML,null,"tooltip").attr({padding:s,fill:e.backgroundColor,"stroke-width":n,r:e.borderRadius,zIndex:8}).css(r).css({padding:0}).add().attr({y:-999}),Me||this.label.shadow(e.shadow),this.shared=e.shared},destroy:function(){this.label&&(this.label=this.label.destroy()),clearTimeout(this.hideTimer),clearTimeout(this.tooltipTimeout)},move:function(e,i,n,r){var s=this,o=s.now,a=s.options.animation!==!1&&!s.isHidden;t(o,{x:a?(2*o.x+e)/3:e,y:a?(o.y+i)/2:i,anchorX:a?(2*o.anchorX+n)/3:n,anchorY:a?(o.anchorY+r)/2:r}),s.label.attr(o),a&&(fe(e-o.x)>1||fe(i-o.y)>1)&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){s&&s.move(e,i,n,r)},32))},hide:function(){var t,e=this;clearTimeout(this.hideTimer),this.isHidden||(t=this.chart.hoverPoints,this.hideTimer=setTimeout(function(){e.label.fadeOut(),e.isHidden=!0},p(this.options.hideDelay,500)),t&&je(t,function(t){t.setState()}),this.chart.hoverPoints=null)},getAnchor:function(t,e){var i,n,r=this.chart,s=r.inverted,o=r.plotTop,a=0,l=0,t=u(t);return i=t[0].tooltipPos,this.followPointer&&e&&(e.chartX===_&&(e=r.pointer.normalize(e)),i=[e.chartX-r.plotLeft,e.chartY-o]),i||(je(t,function(t){n=t.series.yAxis,a+=t.plotX,l+=(t.plotLow?(t.plotLow+t.plotHigh)/2:t.plotY)+(!s&&n?n.top-o:0)}),a/=t.length,l/=t.length,i=[s?r.plotWidth-l:a,this.shared&&!s&&t.length>1&&e?e.chartY-o:s?r.plotHeight-a:l]),Ue(i,he)},getPosition:function(t,e,i){var n,r=this.chart,s=r.plotLeft,o=r.plotTop,a=r.plotWidth,l=r.plotHeight,h=p(this.options.distance,12),c=i.plotX,i=i.plotY,r=c+s+(r.inverted?h:-t-h),d=i-e+o+15;return 7>r&&(r=s+ue(c,0)+h),r+t>s+a&&(r-=r+t-(s+a),d=i-e+o-h,n=!0),o+5>d&&(d=o+5,n&&i>=d&&d+e>=i&&(d=i+o+h)),d+e>o+l&&(d=ue(o,o+l-e-h)),{x:r,y:d}},defaultFormatter:function(t){var e,i=this.points||u(this),n=i[0].series;return e=[n.tooltipHeaderFormatter(i[0])],je(i,function(t){n=t.series,e.push(n.tooltipFormatter&&n.tooltipFormatter(t)||t.point.tooltipFormatter(n.tooltipOptions.pointFormat))}),e.push(t.options.footerFormat||""),e.join("")},refresh:function(t,e){var i,n,r,s=this.chart,o=this.label,a=this.options,l={},h=[];r=a.formatter||this.defaultFormatter;var c,l=s.hoverPoints,d=this.shared;clearTimeout(this.hideTimer),this.followPointer=u(t)[0].series.tooltipOptions.followPointer,n=this.getAnchor(t,e),i=n[0],n=n[1],!d||t.series&&t.series.noSharedTooltip?l=t.getLabelConfig():(s.hoverPoints=t,l&&je(l,function(t){t.setState()}),je(t,function(t){t.setState("hover"),h.push(t.getLabelConfig())}),l={x:t[0].category,y:t[0].y},l.points=h,t=t[0]),r=r.call(l,this),l=t.series,r===!1?this.hide():(this.isHidden&&(ei(o),o.attr("opacity",1).show()),o.attr({text:r}),c=a.borderColor||t.color||l.color||"#606060",o.attr({stroke:c}),this.updatePosition({plotX:i,plotY:n}),this.isHidden=!1),Qe(s,"tooltipRefresh",{text:r,x:i+s.plotLeft,y:n+s.plotTop,borderColor:c})},updatePosition:function(t){var e=this.chart,i=this.label,i=(this.options.positioner||this.getPosition).call(this,i.width,i.height,t);this.move(he(i.x),he(i.y),t.plotX+e.plotLeft,t.plotY+e.plotTop)}};var ui=Highcharts.Pointer=function(t,e){this.init(t,e)};if(ui.prototype={init:function(t,e){var i,n=e.chart,r=n.events,s=Me?"":n.zoomType,n=t.inverted;this.options=e,this.chart=t,this.zoomX=i=/x/.test(s),this.zoomY=s=/y/.test(s),this.zoomHor=i&&!n||s&&n,this.zoomVert=s&&!n||i&&n,this.runChartClick=r&&!!r.click,this.pinchDown=[],this.lastValidTouch={},e.tooltip.enabled&&(t.tooltip=new F(t,e.tooltip)),this.setDOMEvents()},normalize:function(e,i){var n,r,e=e||ae.event;return e.target||(e.target=e.srcElement),e=Je(e),r=e.touches?e.touches.item(0):e,i||(this.chartPosition=i=qe(this.chart.container)),r.pageX===_?(n=ue(e.x,e.clientX-i.left),r=e.y):(n=r.pageX-i.left,r=r.pageY-i.top),t(e,{chartX:he(n),chartY:he(r)})},getCoordinates:function(t){var e={xAxis:[],yAxis:[]};return je(this.chart.axes,function(i){e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])})}),e},getIndex:function(t){var e=this.chart;return e.inverted?e.plotHeight+e.plotTop-t.chartY:t.chartX-e.plotLeft},runPointActions:function(t){var e,i,n,r,s=this,o=s.chart,a=o.series,l=o.tooltip,h=o.hoverPoint,c=o.hoverSeries,d=o.chartWidth,u=s.getIndex(t);if(l&&s.options.tooltip.shared&&(!c||!c.noSharedTooltip)){for(i=[],n=a.length,r=0;n>r;r++)a[r].visible&&a[r].options.enableMouseTracking!==!1&&!a[r].noSharedTooltip&&a[r].tooltipPoints.length&&(e=a[r].tooltipPoints[u])&&e.series&&(e._dist=fe(u-e.clientX),d=pe(d,e._dist),i.push(e));for(n=i.length;n--;)i[n]._dist>d&&i.splice(n,1);i.length&&i[0].clientX!==s.hoverX&&(l.refresh(i,t),s.hoverX=i[0].clientX)}c&&c.tracker?(e=c.tooltipPoints[u])&&e!==h&&e.onMouseOver(t):l&&l.followPointer&&!l.isHidden&&(a=l.getAnchor([{}],t),l.updatePosition({plotX:a[0],plotY:a[1]})),l&&!s._onDocumentMouseMove&&(s._onDocumentMouseMove=function(t){s.onDocumentMouseMove(t)},Ze(oe,"mousemove",s._onDocumentMouseMove)),je(o.axes,function(i){i.drawCrosshair(t,p(h,e))})},reset:function(t){var e=this.chart,i=e.hoverSeries,n=e.hoverPoint,r=e.tooltip,s=r&&r.shared?e.hoverPoints:n;(t=t&&r&&s)&&u(s)[0].plotX===_&&(t=!1),t?(r.refresh(s),n&&n.setState(n.state,!0)):(n&&n.onMouseOut(),i&&i.onMouseOut(),r&&r.hide(),this._onDocumentMouseMove&&(Ke(oe,"mousemove",this._onDocumentMouseMove),this._onDocumentMouseMove=null),je(e.axes,function(t){t.hideCrosshair()}),this.hoverX=null)},scaleGroups:function(t,e){var i,n=this.chart;je(n.series,function(r){i=t||r.getPlotBox(),r.xAxis&&r.xAxis.zoomEnabled&&(r.group.attr(i),r.markerGroup&&(r.markerGroup.attr(i),r.markerGroup.clip(e?n.clipRect:null)),r.dataLabelsGroup&&r.dataLabelsGroup.attr(i))}),n.clipRect.attr(e||n.clipBox)},pinchTranslate:function(t,e,i,n,r,s,o,a){t&&this.pinchTranslateDirection(!0,i,n,r,s,o,a),e&&this.pinchTranslateDirection(!1,i,n,r,s,o,a)},pinchTranslateDirection:function(t,e,i,n,r,s,o,a){var l,h,c,d=this.chart,u=t?"x":"y",p=t?"X":"Y",f="chart"+p,g=t?"width":"height",m=d["plot"+(t?"Left":"Top")],y=a||1,v=d.inverted,x=d.bounds[t?"h":"v"],b=1===e.length,w=e[0][f],k=i[0][f],S=!b&&e[1][f],T=!b&&i[1][f],i=function(){!b&&fe(w-S)>20&&(y=a||fe(k-T)/fe(w-S)),h=(m-k)/y+w,l=d["plot"+(t?"Width":"Height")]/y};i(),e=h,ex.max&&(e=x.max-l,c=!0),c?(k-=.8*(k-o[u][0]),b||(T-=.8*(T-o[u][1])),i()):o[u]=[k,T],v||(s[u]=h-m,s[g]=l),s=v?1/y:y,r[g]=l,r[u]=e,n[v?t?"scaleY":"scaleX":"scale"+p]=y,n["translate"+p]=s*m+(k-s*w)},pinch:function(e){var i=this,n=i.chart,r=i.pinchDown,s=n.tooltip&&n.tooltip.options.followTouchMove,o=e.touches,a=o.length,l=i.lastValidTouch,h=i.zoomHor||i.pinchHor,c=i.zoomVert||i.pinchVert,d=h||c,u=i.selectionMarker,p={},f=1===a&&(i.inClass(e.target,"highcharts-tracker")&&n.runTrackerClick||n.runChartClick),g={};(d||s)&&!f&&e.preventDefault(),Ue(o,function(t){return i.normalize(t)}),"touchstart"===e.type?(je(o,function(t,e){r[e]={chartX:t.chartX,chartY:t.chartY}}),l.x=[r[0].chartX,r[1]&&r[1].chartX],l.y=[r[0].chartY,r[1]&&r[1].chartY],je(n.axes,function(t){if(t.zoomEnabled){var e=n.bounds[t.horiz?"h":"v"],i=t.minPixelPadding,r=t.toPixels(t.dataMin),s=t.toPixels(t.dataMax),o=pe(r,s),r=ue(r,s);e.min=pe(t.pos,o-i),e.max=ue(t.pos+t.len,r+i)}})):r.length&&(u||(i.selectionMarker=u=t({destroy:Oe},n.plotBox)),i.pinchTranslate(h,c,r,o,p,u,g,l),i.hasPinched=d,i.scaleGroups(p,g),!d&&s&&1===a&&this.runPointActions(i.normalize(e)))},dragStart:function(t){var e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=this.mouseDownX=t.chartX,e.mouseDownY=this.mouseDownY=t.chartY},drag:function(t){var e,i=this.chart,n=i.options.chart,r=t.chartX,s=t.chartY,o=this.zoomHor,a=this.zoomVert,l=i.plotLeft,h=i.plotTop,c=i.plotWidth,d=i.plotHeight,u=this.mouseDownX,p=this.mouseDownY;l>r?r=l:r>l+c&&(r=l+c),h>s?s=h:s>h+d&&(s=h+d),this.hasDragged=Math.sqrt(Math.pow(u-r,2)+Math.pow(p-s,2)),this.hasDragged>10&&(e=i.isInsidePlot(u-l,p-h),i.hasCartesianSeries&&(this.zoomX||this.zoomY)&&e&&!this.selectionMarker&&(this.selectionMarker=i.renderer.rect(l,h,o?1:c,a?1:d,0).attr({fill:n.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add()),this.selectionMarker&&o&&(r-=u,this.selectionMarker.attr({width:fe(r),x:(r>0?0:r)+u})),this.selectionMarker&&a&&(r=s-p,this.selectionMarker.attr({height:fe(r),y:(r>0?0:r)+p})),e&&!this.selectionMarker&&n.panning&&i.pan(t,n.panning))},drop:function(e){var i=this.chart,n=this.hasPinched;if(this.selectionMarker){var r,s={xAxis:[],yAxis:[],originalEvent:e.originalEvent||e},o=this.selectionMarker,a=o.x,l=o.y;(this.hasDragged||n)&&(je(i.axes,function(t){if(t.zoomEnabled){var e=t.horiz,i=t.toValue(e?a:l),e=t.toValue(e?a+o.width:l+o.height);!isNaN(i)&&!isNaN(e)&&(s[t.coll].push({axis:t,min:pe(i,e),max:ue(i,e)}),r=!0)}}),r&&Qe(i,"selection",s,function(e){i.zoom(t(e,n?{animation:!1}:null))})),this.selectionMarker=this.selectionMarker.destroy(),n&&this.scaleGroups()}i&&(f(i.container,{cursor:i._cursor}),i.cancelClick=this.hasDragged>10,i.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(t){t=this.normalize(t),t.preventDefault&&t.preventDefault(),this.dragStart(t)},onDocumentMouseUp:function(t){this.drop(t)},onDocumentMouseMove:function(t){var e=this.chart,i=this.chartPosition,n=e.hoverSeries,t=this.normalize(t,i);i&&n&&!this.inClass(t.target,"highcharts-tracker")&&!e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)&&this.reset()},onContainerMouseLeave:function(){this.reset(),this.chartPosition=null},onContainerMouseMove:function(t){var e=this.chart,t=this.normalize(t);"mousedown"===e.mouseIsDown&&this.drag(t),(this.inClass(t.target,"highcharts-tracker")||e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop))&&!e.openMenu&&this.runPointActions(t)},inClass:function(t,e){for(var i;t;){if(i=d(t,"class")){if(-1!==i.indexOf(e))return!0;if(-1!==i.indexOf("highcharts-container"))return!1}t=t.parentNode}},onTrackerMouseOut:function(t){var e=this.chart.hoverSeries,t=t.relatedTarget||t.toElement,i=t.point&&t.point.series;!e||e.options.stickyTracking||this.inClass(t,"highcharts-tooltip")||i===e||e.onMouseOut()},onContainerClick:function(e){var i,n,r,s=this.chart,o=s.hoverPoint,a=s.plotLeft,l=s.plotTop,h=s.inverted,e=this.normalize(e);e.cancelBubble=!0,s.cancelClick||(o&&this.inClass(e.target,"highcharts-tracker")?(i=this.chartPosition,n=o.plotX,r=o.plotY,t(o,{pageX:i.left+a+(h?s.plotWidth-r:n),pageY:i.top+l+(h?s.plotHeight-n:r)}),Qe(o.series,"click",t(e,{point:o})),s.hoverPoint&&o.firePointEvent("click",e)):(t(e,this.getCoordinates(e)),s.isInsidePlot(e.chartX-a,e.chartY-l)&&Qe(s,"click",e)))},onContainerTouchStart:function(t){var e=this.chart;1===t.touches.length?(t=this.normalize(t),e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)?(this.runPointActions(t),this.pinch(t)):this.reset()):2===t.touches.length&&this.pinch(t)},onContainerTouchMove:function(t){(1===t.touches.length||2===t.touches.length)&&this.pinch(t)},onDocumentTouchEnd:function(t){this.drop(t)},setDOMEvents:function(){var t,e=this,i=e.chart.container;this._events=t=[[i,"onmousedown","onContainerMouseDown"],[i,"onmousemove","onContainerMouseMove"],[i,"onclick","onContainerClick"],[i,"mouseleave","onContainerMouseLeave"],[oe,"mouseup","onDocumentMouseUp"]],Ie&&t.push([i,"ontouchstart","onContainerTouchStart"],[i,"ontouchmove","onContainerTouchMove"],[oe,"touchend","onDocumentTouchEnd"]),je(t,function(t){e["_"+t[2]]=function(i){e[t[2]](i)},0===t[1].indexOf("on")?t[0][t[1]]=e["_"+t[2]]:Ze(t[0],t[1],e["_"+t[2]])})},destroy:function(){var t=this;je(t._events,function(e){0===e[1].indexOf("on")?e[0][e[1]]=null:Ke(e[0],e[1],t["_"+e[2]])}),delete t._events,clearInterval(t.tooltipTimeout)}},$e=Highcharts.TrackerMixin={drawTrackerPoint:function(){var t=this,e=t.chart,i=e.pointer,n=t.options.cursor,r=n&&{cursor:n},s=function(i){var n,r=i.target;for(e.hoverSeries!==t&&t.onMouseOver();r&&!n;)n=r.point,r=r.parentNode;n!==_&&n!==e.hoverPoint&&n.onMouseOver(i)};je(t.points,function(t){t.graphic&&(t.graphic.element.point=t),t.dataLabel&&(t.dataLabel.element.point=t)}),t._hasTracking||(je(t.trackerGroups,function(e){t[e]&&(t[e].addClass("highcharts-tracker").on("mouseover",s).on("mouseout",function(t){i.onTrackerMouseOut(t)}).css(r),Ie)&&t[e].on("touchstart",s)}),t._hasTracking=!0)},drawTrackerGraph:function(){var t,e=this,i=e.options,n=i.trackByArea,r=[].concat(n?e.areaPath:e.graphPath),s=r.length,o=e.chart,a=o.pointer,l=o.renderer,h=o.options.tooltip.snap,c=e.tracker,d=i.cursor,u=d&&{cursor:d},d=e.singlePoints,p=function(){o.hoverSeries!==e&&e.onMouseOver()};if(s&&!n)for(t=s+1;t--;)"M"===r[t]&&r.splice(t+1,0,r[t+1]-h,r[t+2],"L"),(t&&"M"===r[t]||t===s)&&r.splice(t,0,"L",r[t-2]+h,r[t-1]);for(t=0;te-6&&e+n-6>s?"":Be}))}))},renderTitle:function(){var t=this.padding,e=this.options.title,i=0;e.text&&(this.title||(this.title=this.chart.renderer.label(e.text,t-3,t-4,null,null,null,null,null,"legend-title").attr({zIndex:1}).css(e.style).add(this.group)),t=this.title.getBBox(),i=t.height,this.offsetWidth=t.width,this.contentGroup.attr({translateY:i})),this.titleHeight=i},renderItem:function(t){var i,n=this,r=n.chart,s=r.renderer,o=n.options,a="horizontal"===o.layout,l=n.symbolWidth,h=o.symbolPadding,c=n.itemStyle,d=n.itemHiddenStyle,u=n.padding,f=a?p(o.itemDistance,8):0,m=!o.rtl,y=o.width,v=o.itemMarginBottom||0,x=n.itemMarginTop,w=n.initialItemX,k=t.legendItem,S=t.series&&t.series.drawLegendSymbol?t.series:t,T=S.options,T=T&&T.showCheckbox,C=o.useHTML;!k&&(t.legendGroup=s.g("legend-item").attr({zIndex:1}).add(n.scrollGroup),S.drawLegendSymbol(n,t),t.legendItem=k=s.text(o.labelFormat?b(o.labelFormat,t):o.labelFormatter.call(t),m?l+h:-h,n.baseline,C).css(e(t.visible?c:d)).attr({align:m?"left":"right",zIndex:2}).add(t.legendGroup),(C?k:t.legendGroup).on("mouseover",function(){t.setState("hover"),k.css(n.options.itemHoverStyle)}).on("mouseout",function(){k.css(t.visible?c:d),t.setState()}).on("click",function(e){var i=function(){t.setVisible()},e={browserEvent:e};t.firePointEvent?t.firePointEvent("legendItemClick",e,i):Qe(t,"legendItemClick",e,i)}),n.colorizeItem(t,t.visible),T)&&(t.checkbox=g("input",{type:"checkbox",checked:t.selected,defaultChecked:t.selected},o.itemCheckboxStyle,r.container),Ze(t.checkbox,"click",function(e){Qe(t,"checkboxClick",{checked:e.target.checked},function(){t.select()})})),s=k.getBBox(),i=t.legendItemWidth=o.itemWidth||t.legendItemWidth||l+h+s.width+f+(T?20:0),o=i,n.itemHeight=l=he(t.legendItemHeight||s.height),a&&n.itemX-w+o>(y||r.chartWidth-2*u-w)&&(n.itemX=w,n.itemY+=x+n.lastLineHeight+v,n.lastLineHeight=0),n.maxItemWidth=ue(n.maxItemWidth,o),n.lastItemY=x+n.itemY+v,n.lastLineHeight=ue(l,n.lastLineHeight),t._legendItemPos=[n.itemX,n.itemY],a?n.itemX+=o:(n.itemY+=x+l+v,n.lastLineHeight=l),n.offsetWidth=y||ue((a?n.itemX-w-f:o)+u,n.offsetWidth)},getAllItems:function(){var t=[];return je(this.chart.series,function(e){var i=e.options;p(i.showInLegend,c(i.linkedTo)?!1:_,!0)&&(t=t.concat(e.legendItems||("point"===i.legendType?e.data:e)))}),t},render:function(){var e,i,n,r,s=this,o=s.chart,a=o.renderer,l=s.group,h=s.box,c=s.options,d=s.padding,u=c.borderWidth,p=c.backgroundColor;s.itemX=s.initialItemX,s.itemY=s.initialItemY,s.offsetWidth=0,s.lastItemY=0,l||(s.group=l=a.g("legend").attr({zIndex:7}).add(),s.contentGroup=a.g().attr({zIndex:1}).add(l),s.scrollGroup=a.g().add(s.contentGroup)),s.renderTitle(),e=s.getAllItems(),T(e,function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)}),c.reversed&&e.reverse(),s.allItems=e,s.display=i=!!e.length,je(e,function(t){s.renderItem(t)}),n=c.width||s.offsetWidth,r=s.lastItemY+s.lastLineHeight+s.titleHeight,r=s.handleOverflow(r),(u||p)&&(n+=d,r+=d,h?n>0&&r>0&&(h[h.isNew?"attr":"animate"](h.crisp(null,null,null,n,r)),h.isNew=!1):(s.box=h=a.rect(0,0,n,r,c.borderRadius,u||0).attr({stroke:c.borderColor,"stroke-width":u||0,fill:p||Be}).add(l).shadow(c.shadow),h.isNew=!0),h[i?"show":"hide"]()),s.legendWidth=n,s.legendHeight=r,je(e,function(t){s.positionItem(t)}),i&&l.align(t({width:n,height:r},c),!0,"spacingBox"),o.isResizing||this.positionCheckboxes()},handleOverflow:function(t){var e,i,n=this,r=this.chart,s=r.renderer,o=this.options,a=o.y,a=r.spacingBox.height+("top"===o.verticalAlign?-a:a)-this.padding,l=o.maxHeight,h=this.clipRect,c=o.navigation,d=p(c.animation,!0),u=c.arrowSize||12,f=this.nav,g=this.pages,m=this.allItems;
+return"horizontal"===o.layout&&(a/=2),l&&(a=pe(a,l)),g.length=0,t>a&&!o.useHTML?(this.clipHeight=e=a-20-this.titleHeight-this.padding,this.currentPage=p(this.currentPage,1),this.fullHeight=t,je(m,function(t,n){var r=t._legendItemPos[1],s=he(t.legendItem.bBox.height),o=g.length;(!o||r-g[o-1]>e)&&g.push(i||r),n===m.length-1&&r+s-g[o-1]>e&&g.push(r),r!==i&&(i=r)}),h||(h=n.clipRect=s.clipRect(0,this.padding,9999,0),n.contentGroup.clip(h)),h.attr({height:e}),f||(this.nav=f=s.g().attr({zIndex:1}).add(this.group),this.up=s.symbol("triangle",0,0,u,u).on("click",function(){n.scroll(-1,d)}).add(f),this.pager=s.text("",15,10).css(c.style).add(f),this.down=s.symbol("triangle-down",0,0,u,u).on("click",function(){n.scroll(1,d)}).add(f)),n.scroll(0),t=a):f&&(h.attr({height:r.chartHeight}),f.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t},scroll:function(t,e){var i=this.pages,n=i.length,r=this.currentPage+t,s=this.clipHeight,o=this.options.navigation,a=o.activeColor,o=o.inactiveColor,l=this.pager,h=this.padding;r>n&&(r=n),r>0&&(e!==_&&D(e,this.chart),this.nav.attr({translateX:h,translateY:s+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({fill:1===r?o:a}).css({cursor:1===r?"default":"pointer"}),l.attr({text:r+"/"+n}),this.down.attr({x:18+this.pager.getBBox().width,fill:r===n?o:a}).css({cursor:r===n?"default":"pointer"}),i=-i[r-1]+this.initialItemY,this.scrollGroup.animate({translateY:i}),this.currentPage=r,this.positionCheckboxes(i))}},li=Highcharts.LegendSymbolMixin={drawRectangle:function(t,e){var i=t.options.symbolHeight||12;e.legendSymbol=this.chart.renderer.rect(0,t.baseline-5-i/2,t.symbolWidth,i,p(t.options.symbolRadius,2)).attr({zIndex:3}).add(e.legendGroup)},drawLineMarker:function(t){var e,i=this.options,n=i.marker;e=t.symbolWidth;var r,s=this.chart.renderer,o=this.legendGroup,t=t.baseline-he(.3*s.fontMetrics(t.options.itemStyle.fontSize).b);i.lineWidth&&(r={"stroke-width":i.lineWidth},i.dashStyle&&(r.dashstyle=i.dashStyle),this.legendLine=s.path(["M",0,t,"L",e,t]).attr(r).add(o)),n&&n.enabled&&(i=n.radius,this.legendSymbol=e=s.symbol(this.symbol,e/2-i,t-i,2*i,2*i).add(o),e.isMarker=!0)}},/Trident\/7\.0/.test(xe)&&x(fi.prototype,"positionItem",function(t,e){var i=this,n=function(){e._legendItemPos&&t.call(i,e)};i.chart.renderer.forExport?n():setTimeout(n)}),N.prototype={init:function(t,i){var n,r=t.series;t.series=null,n=e($,t),n.series=t.series=r,this.userOptions=t,r=n.chart,this.margin=this.splashArray("margin",r),this.spacing=this.splashArray("spacing",r);var s=r.events;this.bounds={h:{},v:{}},this.callback=i,this.isResizing=0,this.options=n,this.axes=[],this.series=[],this.hasCartesianSeries=r.showAxes;var o,a=this;if(a.index=Re.length,Re.push(a),r.reflow!==!1&&Ze(a,"load",function(){a.initReflow()}),s)for(o in s)Ze(a,o,s[o]);a.xAxis=[],a.yAxis=[],a.animation=Me?!1:p(r.animation,!0),a.pointCount=0,a.counters=new S,a.firstRender()},initSeries:function(t){var e=this.options.chart;return(e=He[t.type||e.type||e.defaultSeriesType])||M(17,!0),e=new e,e.init(this,t),e},isInsidePlot:function(t,e,i){var n=i?e:t,t=i?t:e;return n>=0&&n<=this.plotWidth&&t>=0&&t<=this.plotHeight},adjustTickAmounts:function(){this.options.chart.alignTicks!==!1&&je(this.axes,function(t){t.adjustTickAmount()}),this.maxTicks=null},redraw:function(e){var i,n,r=this.axes,s=this.series,o=this.pointer,a=this.legend,l=this.isDirtyLegend,h=this.isDirtyBox,c=s.length,d=c,u=this.renderer,p=u.isHidden(),f=[];for(D(e,this),p&&this.cloneRenderTo(),this.layOutTitles();d--;)if(e=s[d],e.options.stacking&&(i=!0,e.isDirty)){n=!0;break}if(n)for(d=c;d--;)e=s[d],e.options.stacking&&(e.isDirty=!0);je(s,function(t){t.isDirty&&"point"===t.options.legendType&&(l=!0)}),l&&a.options.enabled&&(a.render(),this.isDirtyLegend=!1),i&&this.getStacks(),this.hasCartesianSeries&&(this.isResizing||(this.maxTicks=null,je(r,function(t){t.setScale()})),this.adjustTickAmounts(),this.getMargins(),je(r,function(t){t.isDirty&&(h=!0)}),je(r,function(e){e.isDirtyExtremes&&(e.isDirtyExtremes=!1,f.push(function(){Qe(e,"afterSetExtremes",t(e.eventArgs,e.getExtremes())),delete e.eventArgs})),(h||i)&&e.redraw()})),h&&this.drawChartBox(),je(s,function(t){t.isDirty&&t.visible&&(!t.isCartesian||t.xAxis)&&t.redraw()}),o&&o.reset&&o.reset(!0),u.draw(),Qe(this,"redraw"),p&&this.cloneRenderTo(!0),je(f,function(t){t.call()})},get:function(t){var e,i,n=this.axes,r=this.series;for(e=0;epe(l.dataMin,l.min)&&o=18&&25>=e&&(e=15)),n&&(n.css({width:(r.width||o)+"px"}).align(t({y:e+s.margin},r),!1,"spacingBox"),!r.floating&&!r.verticalAlign&&(e=de(e+n.getBBox().height))),this.titleOffset=e},getChartSize:function(){var t=this.options.chart,e=this.renderToClone||this.renderTo;this.containerWidth=Xe(e,"width"),this.containerHeight=Xe(e,"height"),this.chartWidth=ue(0,t.width||this.containerWidth||600),this.chartHeight=ue(0,p(t.height,this.containerHeight>19?this.containerHeight:400))},cloneRenderTo:function(t){var e=this.renderToClone,i=this.container;t?e&&(this.renderTo.appendChild(i),L(e),delete this.renderToClone):(i&&i.parentNode===this.renderTo&&this.renderTo.removeChild(i),this.renderToClone=e=this.renderTo.cloneNode(0),f(e,{position:"absolute",top:"-9999px",display:"block"}),oe.body.appendChild(e),i&&e.appendChild(i))},getContainer:function(){var e,r,s,o,a=this.options.chart;this.renderTo=e=a.renderTo,o="highcharts-"+Ee++,n(e)&&(this.renderTo=e=oe.getElementById(e)),e||M(13,!0),r=i(d(e,"data-highcharts-chart")),!isNaN(r)&&Re[r]&&Re[r].destroy(),d(e,"data-highcharts-chart",this.index),e.innerHTML="",e.offsetWidth||this.cloneRenderTo(),this.getChartSize(),r=this.chartWidth,s=this.chartHeight,this.container=e=g(ze,{className:"highcharts-container"+(a.className?" "+a.className:""),id:o},t({position:"relative",overflow:"hidden",width:r+"px",height:s+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},a.style),this.renderToClone||e),this._cursor=e.style.cursor,this.renderer=a.forExport?new ai(e,r,s,!0):new H(e,r,s),Me&&this.renderer.create(this,e,r,s)},getMargins:function(){var t,e=this.spacing,i=this.legend,n=this.margin,r=this.options.legend,s=p(r.margin,10),o=r.x,a=r.y,l=r.align,h=r.verticalAlign,d=this.titleOffset;this.resetMargins(),t=this.axisOffset,d&&!c(n[0])&&(this.plotTop=ue(this.plotTop,d+this.options.title.margin+e[0])),i.display&&!r.floating&&("right"===l?c(n[1])||(this.marginRight=ue(this.marginRight,i.legendWidth-o+s+e[1])):"left"===l?c(n[3])||(this.plotLeft=ue(this.plotLeft,i.legendWidth+o+s+e[3])):"top"===h?c(n[0])||(this.plotTop=ue(this.plotTop,i.legendHeight+a+s+e[0])):"bottom"!==h||c(n[2])||(this.marginBottom=ue(this.marginBottom,i.legendHeight-a+s+e[2]))),this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin),this.extraTopMargin&&(this.plotTop+=this.extraTopMargin),this.hasCartesianSeries&&je(this.axes,function(t){t.getOffset()}),c(n[3])||(this.plotLeft+=t[3]),c(n[0])||(this.plotTop+=t[0]),c(n[2])||(this.marginBottom+=t[2]),c(n[1])||(this.marginRight+=t[1]),this.setChartSize()},reflow:function(t){var e=this,i=e.options.chart,n=e.renderTo,r=i.width||Xe(n,"width"),s=i.height||Xe(n,"height"),i=t?t.target:ae,n=function(){e.container&&(e.setSize(r,s,!1),e.hasUserSize=null)};e.hasUserSize||!r||!s||i!==ae&&i!==oe||((r!==e.containerWidth||s!==e.containerHeight)&&(clearTimeout(e.reflowTimeout),t?e.reflowTimeout=setTimeout(n,100):n()),e.containerWidth=r,e.containerHeight=s)},initReflow:function(){var t=this,e=function(e){t.reflow(e)};Ze(ae,"resize",e),Ze(t,"destroy",function(){Ke(ae,"resize",e)})},setSize:function(t,e,i){var n,r,s,o=this;o.isResizing+=1,s=function(){o&&Qe(o,"endResize",null,function(){o.isResizing-=1})},D(i,o),o.oldChartHeight=o.chartHeight,o.oldChartWidth=o.chartWidth,c(t)&&(o.chartWidth=n=ue(0,he(t)),o.hasUserSize=!!n),c(e)&&(o.chartHeight=r=ue(0,he(e))),(G?ti:f)(o.container,{width:n+"px",height:r+"px"},G),o.setChartSize(!0),o.renderer.setSize(n,r,i),o.maxTicks=null,je(o.axes,function(t){t.isDirty=!0,t.setScale()}),je(o.series,function(t){t.isDirty=!0}),o.isDirtyLegend=!0,o.isDirtyBox=!0,o.getMargins(),o.redraw(i),o.oldChartHeight=null,Qe(o,"resize"),G===!1?s():setTimeout(s,G&&G.duration||500)},setChartSize:function(t){var e,i,n,r,s=this.inverted,o=this.renderer,a=this.chartWidth,l=this.chartHeight,h=this.options.chart,c=this.spacing,d=this.clipOffset;this.plotLeft=e=he(this.plotLeft),this.plotTop=i=he(this.plotTop),this.plotWidth=n=ue(0,he(a-e-this.marginRight)),this.plotHeight=r=ue(0,he(l-i-this.marginBottom)),this.plotSizeX=s?r:n,this.plotSizeY=s?n:r,this.plotBorderWidth=h.plotBorderWidth||0,this.spacingBox=o.spacingBox={x:c[3],y:c[0],width:a-c[3]-c[1],height:l-c[0]-c[2]},this.plotBox=o.plotBox={x:e,y:i,width:n,height:r},a=2*ce(this.plotBorderWidth/2),s=de(ue(a,d[3])/2),o=de(ue(a,d[0])/2),this.clipBox={x:s,y:o,width:ce(this.plotSizeX-ue(a,d[1])/2-s),height:ce(this.plotSizeY-ue(a,d[2])/2-o)},t||je(this.axes,function(t){t.setAxisSize(),t.setAxisTranslation()})},resetMargins:function(){var t=this.spacing,e=this.margin;this.plotTop=p(e[0],t[0]),this.marginRight=p(e[1],t[1]),this.marginBottom=p(e[2],t[2]),this.plotLeft=p(e[3],t[3]),this.axisOffset=[0,0,0,0],this.clipOffset=[0,0,0,0]},drawChartBox:function(){var t,e=this.options.chart,i=this.renderer,n=this.chartWidth,r=this.chartHeight,s=this.chartBackground,o=this.plotBackground,a=this.plotBorder,l=this.plotBGImage,h=e.borderWidth||0,c=e.backgroundColor,d=e.plotBackgroundColor,u=e.plotBackgroundImage,p=e.plotBorderWidth||0,f=this.plotLeft,g=this.plotTop,m=this.plotWidth,y=this.plotHeight,v=this.plotBox,x=this.clipRect,b=this.clipBox;t=h+(e.shadow?8:0),(h||c)&&(s?s.animate(s.crisp(null,null,null,n-t,r-t)):(s={fill:c||Be},h&&(s.stroke=e.borderColor,s["stroke-width"]=h),this.chartBackground=i.rect(t/2,t/2,n-t,r-t,e.borderRadius,h).attr(s).add().shadow(e.shadow))),d&&(o?o.animate(v):this.plotBackground=i.rect(f,g,m,y,0).attr({fill:d}).add().shadow(e.plotShadow)),u&&(l?l.animate(v):this.plotBGImage=i.image(u,f,g,m,y).add()),x?x.animate({width:b.width,height:b.height}):this.clipRect=i.clipRect(b),p&&(a?a.animate(a.crisp(null,f,g,m,y)):this.plotBorder=i.rect(f,g,m,y,0,-p).attr({stroke:e.plotBorderColor,"stroke-width":p,zIndex:1}).add()),this.isDirtyBox=!1},propFromSeries:function(){var t,e,i,n=this,r=n.options.chart,s=n.options.series;je(["inverted","angular","polar"],function(o){for(t=He[r.type||r.defaultSeriesType],i=n[o]||r[o]||t&&t.prototype[o],e=s&&s.length;!i&&e--;)(t=He[s[e].type])&&t.prototype[o]&&(i=!0);n[o]=i})},linkSeries:function(){var t=this,e=t.series;je(e,function(t){t.linkedSeries.length=0}),je(e,function(e){var i=e.options.linkedTo;n(i)&&(i=":previous"===i?t.series[e.index-1]:t.get(i))&&(i.linkedSeries.push(e),e.linkedParent=i)})},render:function(){var e,n=this,r=n.axes,s=n.renderer,o=n.options,a=o.labels,l=o.credits;n.setTitle(),n.legend=new fi(n,o.legend),n.getStacks(),je(r,function(t){t.setScale()}),n.getMargins(),n.maxTicks=null,je(r,function(t){t.setTickPositions(!0),t.setMaxTicks()}),n.adjustTickAmounts(),n.getMargins(),n.drawChartBox(),n.hasCartesianSeries&&je(r,function(t){t.render()}),n.seriesGroup||(n.seriesGroup=s.g("series-group").attr({zIndex:3}).add()),je(n.series,function(t){t.translate(),t.setTooltipPoints(),t.render()}),a.items&&je(a.items,function(e){var r=t(a.style,e.style),o=i(r.left)+n.plotLeft,l=i(r.top)+n.plotTop+12;delete r.left,delete r.top,s.text(e.html,o,l).attr({zIndex:2}).css(r).add()}),l.enabled&&!n.credits&&(e=l.href,n.credits=s.text(l.text,0,0).on("click",function(){e&&(parent.location.href=e)}).attr({align:l.position.align,zIndex:8}).css(l.style).add().align(l.position)),n.hasRendered=!0},destroy:function(){var t,e=this,i=e.axes,n=e.series,r=e.container,s=r&&r.parentNode;for(Qe(e,"destroy"),Re[e.index]=_,e.renderTo.removeAttribute("data-highcharts-chart"),Ke(e),t=i.length;t--;)i[t]=i[t].destroy();for(t=n.length;t--;)n[t]=n[t].destroy();je("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","),function(t){var i=e[t];i&&i.destroy&&(e[t]=i.destroy())}),r&&(r.innerHTML="",Ke(r),s&&L(r));for(t in e)delete e[t]},isReadyToRender:function(){var t=this;return!Ae&&ae==ae.top&&"complete"!==oe.readyState||Me&&!ae.canvg?(Me?ci.push(function(){t.firstRender()},t.options.global.canvasToolsURL):oe.attachEvent("onreadystatechange",function(){oe.detachEvent("onreadystatechange",t.firstRender),"complete"===oe.readyState&&t.firstRender()}),!1):!0},firstRender:function(){var t=this,e=t.options,i=t.callback;t.isReadyToRender()&&(t.getContainer(),Qe(t,"init"),t.resetMargins(),t.setChartSize(),t.propFromSeries(),t.getAxes(),je(e.series||[],function(e){t.initSeries(e)}),t.linkSeries(),Qe(t,"beforeRender"),t.pointer=new ui(t,e),t.render(),t.renderer.draw(),i&&i.apply(t,[t]),je(t.callbacks,function(e){e.apply(t,[t])}),t.cloneRenderTo(!0),Qe(t,"load"))},splashArray:function(t,e){var i=e[t],i=r(i)?i:[i,i,i,i];return[p(e[t+"Top"],i[0]),p(e[t+"Right"],i[1]),p(e[t+"Bottom"],i[2]),p(e[t+"Left"],i[3])]}},N.prototype.callbacks=[];var hi=Highcharts.CenteredSeriesMixin={getCenter:function(){var t,e,n=this.options,r=this.chart,s=2*(n.slicedOffset||0),o=r.plotWidth-2*s,a=r.plotHeight-2*s,r=n.center,n=[p(r[0],"50%"),p(r[1],"50%"),n.size||"100%",n.innerSize||0],l=pe(o,a);return Ue(n,function(n,r){return e=/%$/.test(n),t=2>r||2===r&&e,(e?[o,a,l,l][r]*i(n)/100:n)+(t?s:0)})}},gi=function(){};gi.prototype={init:function(t,e,i){return this.series=t,this.applyOptions(e,i),this.pointAttr={},t.options.colorByPoint&&(e=t.options.colors||t.chart.options.colors,this.color=this.color||e[t.colorCounter++],t.colorCounter===e.length)&&(t.colorCounter=0),t.chart.pointCount++,this},applyOptions:function(e,i){var n=this.series,r=n.pointValKey,e=gi.prototype.optionsToObject.call(this,e);return t(this,e),this.options=this.options?t(this.options,e):e,r&&(this.y=this[r]),this.x===_&&n&&(this.x=i===_?n.autoIncrement():i),this},optionsToObject:function(t){var e={},i=this.series,n=i.pointArrayMap||["y"],r=n.length,o=0,a=0;if("number"==typeof t||null===t)e[n[0]]=t;else if(s(t))for(t.length>r&&(i=typeof t[0],"string"===i?e.name=t[0]:"number"===i&&(e.x=t[0]),o++);r>a;)e[n[a++]]=t[o++];else"object"==typeof t&&(e=t,t.dataLabels&&(i._hasPointLabels=!0),t.marker&&(i._hasPointMarkers=!0));return e},destroy:function(){var t,e=this.series.chart,i=e.hoverPoints;e.pointCount--,i&&(this.setState(),h(i,this),!i.length)&&(e.hoverPoints=null),this===e.hoverPoint&&this.onMouseOut(),(this.graphic||this.dataLabel)&&(Ke(this),this.destroyElements()),this.legendItem&&e.legend.destroyItem(this);for(t in this)this[t]=null},destroyElements:function(){for(var t,e="graphic,dataLabel,dataLabelUpper,group,connector,shadowGroup".split(","),i=6;i--;)t=e[i],this[t]&&(this[t]=this[t].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},select:function(t,e){var i=this,n=i.series,r=n.chart,t=p(t,!i.selected);i.firePointEvent(t?"select":"unselect",{accumulate:e},function(){i.selected=i.options.selected=t,n.options.data[Ye(i,n.data)]=i.options,i.setState(t&&"select"),e||je(r.getSelectedPoints(),function(t){t.selected&&t!==i&&(t.selected=t.options.selected=!1,n.options.data[Ye(t,n.data)]=t.options,t.setState(""),t.firePointEvent("unselect"))})})},onMouseOver:function(t){var e=this.series,i=e.chart,n=i.tooltip,r=i.hoverPoint;r&&r!==this&&r.onMouseOut(),this.firePointEvent("mouseOver"),n&&(!n.shared||e.noSharedTooltip)&&n.refresh(this,t),this.setState("hover"),i.hoverPoint=this},onMouseOut:function(){var t=this.series.chart,e=t.hoverPoints;e&&-1!==Ye(this,e)||(this.firePointEvent("mouseOut"),this.setState(),t.hoverPoint=null)},tooltipFormatter:function(t){var e=this.series,i=e.tooltipOptions,n=p(i.valueDecimals,""),r=i.valuePrefix||"",s=i.valueSuffix||"";return je(e.pointArrayMap||["y"],function(e){e="{point."+e,(r||s)&&(t=t.replace(e+"}",r+e+"}"+s)),t=t.replace(e+"}",e+":,."+n+"f}")}),b(t,{point:this,series:this.series})},firePointEvent:function(t,e,i){var n=this,r=this.series.options;(r.point.events[t]||n.options&&n.options.events&&n.options.events[t])&&this.importEvents(),"click"===t&&r.allowPointSelect&&(i=function(t){n.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),Qe(this,t,e,i)},importEvents:function(){if(!this.hasImportedEvents){var t,i=e(this.series.options.point,this.options).events;this.events=i;for(t in i)Ze(this,t,i[t]);this.hasImportedEvents=!0}},setState:function(t,i){var n=this.plotX,r=this.plotY,s=this.series,o=s.options.states,a=ii[s.type].marker&&s.options.marker,l=a&&!a.enabled,h=a&&a.states[t],c=h&&h.enabled===!1,d=s.stateMarkerGraphic,u=this.marker||{},p=s.chart,f=this.pointAttr,t=t||"",i=i&&d;t===this.state&&!i||this.selected&&"select"!==t||o[t]&&o[t].enabled===!1||t&&(c||l&&!h.enabled)||t&&u.states&&u.states[t]&&u.states[t].enabled===!1||(this.graphic?(o=a&&this.graphic.symbolName&&f[t].r,this.graphic.attr(e(f[t],o?{x:n-o,y:r-o,width:2*o,height:2*o}:{}))):(t&&h&&(o=h.radius,u=u.symbol||s.symbol,d&&d.currentSymbol!==u&&(d=d.destroy()),d?d[i?"animate":"attr"]({x:n-o,y:r-o}):(s.stateMarkerGraphic=d=p.renderer.symbol(u,n-o,r-o,2*o,2*o).attr(f[t]).add(s.markerGroup),d.currentSymbol=u)),d&&d[t&&p.isInsidePlot(n,r,p.inverted)?"show":"hide"]()),this.state=t)}};var mi=function(){};mi.prototype={isCartesian:!0,type:"line",pointClass:gi,sorted:!0,requireSorting:!0,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],init:function(e,i){var n,r,s=this,o=e.series,a=function(t,e){return p(t.options.index,t._i)-p(e.options.index,e._i)};s.chart=e,s.options=i=s.setOptions(i),s.linkedSeries=[],s.bindAxes(),t(s,{name:i.name,state:"",pointAttr:{},visible:i.visible!==!1,selected:i.selected===!0}),Me&&(i.animation=!1),r=i.events;for(n in r)Ze(s,n,r[n]);(r&&r.click||i.point&&i.point.events&&i.point.events.click||i.allowPointSelect)&&(e.runTrackerClick=!0),s.getColor(),s.getSymbol(),je(s.parallelArrays,function(t){s[t+"Data"]=[]}),s.setData(i.data,!1),s.isCartesian&&(e.hasCartesianSeries=!0),o.push(s),s._i=o.length-1,T(o,a),this.yAxis&&T(this.yAxis.series,a),je(o,function(t,e){t.index=e,t.name=t.name||"Series "+(e+1)})},bindAxes:function(){var t,e=this,i=e.options,n=e.chart;je(e.axisTypes||[],function(r){je(n[r],function(n){t=n.options,(i[r]===t.index||i[r]!==_&&i[r]===t.id||i[r]===_&&0===t.index)&&(n.series.push(e),e[r]=n,n.isDirty=!0)}),!e[r]&&e.optionalAxis!==r&&M(18,!0)})},updateParallelArrays:function(t,e){var i=t.series,n=arguments;je(i.parallelArrays,"number"==typeof e?function(n){var r="y"===n&&i.toYData?i.toYData(t):t[n];i[n+"Data"][e]=r}:function(t){Array.prototype[e].apply(i[t+"Data"],Array.prototype.slice.call(n,2))})},autoIncrement:function(){var t=this.options,e=this.xIncrement,e=p(e,t.pointStart,0);return this.pointInterval=p(this.pointInterval,t.pointInterval,1),this.xIncrement=e+this.pointInterval,e},getSegments:function(){var t,e=-1,i=[],n=this.points,r=n.length;if(r)if(this.options.connectNulls){for(t=r;t--;)null===n[t].y&&n.splice(t,1);n.length&&(i=[n])}else je(n,function(t,s){null===t.y?(s>e+1&&i.push(n.slice(e+1,s)),e=s):s===r-1&&i.push(n.slice(e+1,s+1))});this.segments=i},setOptions:function(t){var i=this.chart,n=i.options.plotOptions,i=i.userOptions||{},r=i.plotOptions||{},s=n[this.type];return this.userOptions=t,n=e(s,n.series,t),this.tooltipOptions=e($.tooltip,$.plotOptions[this.type].tooltip,i.tooltip,r.series&&r.series.tooltip,r[this.type]&&r[this.type].tooltip,t.tooltip),null===s.marker&&delete n.marker,n},getColor:function(){var t,e=this.options,i=this.userOptions,n=this.chart.options.colors,r=this.chart.counters;t=e.color||ii[this.type].color,t||e.colorByPoint||(c(i._colorIndex)?e=i._colorIndex:(i._colorIndex=r.color,e=r.color++),t=n[e]),this.color=t,r.wrapColor(n.length)},getSymbol:function(){var t=this.userOptions,e=this.options.marker,i=this.chart,n=i.options.symbols,i=i.counters;this.symbol=e.symbol,this.symbol||(c(t._symbolIndex)?t=t._symbolIndex:(t._symbolIndex=i.symbol,t=i.symbol++),this.symbol=n[t]),/^url/.test(this.symbol)&&(e.radius=0),i.wrapSymbol(n.length)},drawLegendSymbol:li.drawLineMarker,setData:function(t,e){var i,r=this,a=r.points,l=r.options,h=r.chart,c=null,d=r.xAxis,u=d&&!!d.categories;r.xIncrement=null,r.pointRange=u?1:l.pointRange,r.colorCounter=0;var t=t||[],f=t.length;i=l.turboThreshold;var g=this.xData,m=this.yData,y=r.pointArrayMap,y=y&&y.length;if(je(this.parallelArrays,function(t){r[t+"Data"].length=0}),i&&f>i){for(i=0;null===c&&f>i;)c=t[i],i++;if(o(c)){for(u=p(l.pointStart,0),l=p(l.pointInterval,1),i=0;f>i;i++)g[i]=u,m[i]=t[i],u+=l;r.xIncrement=u}else if(s(c))if(y)for(i=0;f>i;i++)l=t[i],g[i]=l[0],m[i]=l.slice(1,y+1);else for(i=0;f>i;i++)l=t[i],g[i]=l[0],m[i]=l[1];else M(12)}else for(i=0;f>i;i++)t[i]!==_&&(l={series:r},r.pointClass.prototype.applyOptions.apply(l,[t[i]]),r.updateParallelArrays(l,i),u&&l.name)&&(d.names[l.x]=l.name);for(n(m[0])&&M(14,!0),r.data=[],r.options.data=t,i=a&&a.length||0;i--;)a[i]&&a[i].destroy&&a[i].destroy();d&&(d.minRange=d.userMinRange),r.isDirty=r.isDirtyData=h.isDirtyBox=!0,p(e,!0)&&h.redraw(!1)},processData:function(t){var e,i=this.xData,n=this.yData,r=i.length;e=0;var s,o,a=this.xAxis,l=this.options,h=l.cropThreshold,c=this.isCartesian;if(c&&!this.isDirty&&!a.isDirty&&!this.yAxis.isDirty&&!t)return!1;for(c&&this.sorted&&(!h||r>h||this.forceCrop)&&(t=a.min,a=a.max,i[r-1]a?(i=[],n=[]):(i[0]a)&&(e=this.cropData(this.xData,this.yData,t,a),i=e.xData,n=e.yData,e=e.start,s=!0)),a=i.length-1;a>=0;a--)r=i[a]-i[a-1],r>0&&(o===_||o>r)?o=r:0>r&&this.requireSorting&&M(15);this.cropped=s,this.cropStart=e,this.processedXData=i,this.processedYData=n,null===l.pointRange&&(this.pointRange=o||1),this.closestPointRange=o},cropData:function(t,e,i,n){var r,s=t.length,o=0,a=s,l=p(this.cropShoulder,1);for(r=0;s>r;r++)if(t[r]>=i){o=ue(0,r-l);break}for(;s>r;r++)if(t[r]>n){a=r+l;break}return{xData:t.slice(o,a),yData:e.slice(o,a),start:o,end:a}},generatePoints:function(){var t,e,i,n,r=this.options.data,s=this.data,o=this.processedXData,a=this.processedYData,l=this.pointClass,h=o.length,c=this.cropStart||0,d=this.hasGroupedData,p=[];for(s||d||(s=[],s.length=r.length,s=this.data=s),n=0;h>n;n++)e=c+n,d?p[n]=(new l).init(this,[o[n]].concat(u(a[n]))):(s[e]?i=s[e]:r[e]!==_&&(s[e]=i=(new l).init(this,r[e],o[n])),p[n]=i);if(s&&(h!==(t=s.length)||d))for(n=0;t>n;n++)n===c&&!d&&(n+=h),s[n]&&(s[n].destroyElements(),s[n].plotX=_);this.data=s,this.points=p},setStackedPoints:function(){if(this.options.stacking&&(this.visible===!0||this.chart.options.chart.ignoreHiddenSeries===!1)){var t,e,i,n,r,s=this.processedXData,o=this.processedYData,a=[],l=o.length,h=this.options,c=h.threshold,d=h.stack,h=h.stacking,u=this.stackKey,p="-"+u,f=this.negStacks,g=this.yAxis,m=g.stacks,y=g.oldStacks;for(i=0;l>i;i++)n=s[i],r=o[i],e=(t=f&&c>r)?p:u,m[e]||(m[e]={}),m[e][n]||(y[e]&&y[e][n]?(m[e][n]=y[e][n],m[e][n].total=null):m[e][n]=new B(g,g.options.stackLabels,t,n,d,h)),e=m[e][n],e.points[this.index]=[e.cum||0],"percent"===h?(t=t?u:p,f&&m[t]&&m[t][n]?(t=m[t][n],e.total=t.total=ue(t.total,e.total)+fe(r)||0):e.total+=fe(r)||0):e.total+=r||0,e.cum=(e.cum||0)+(r||0),e.points[this.index].push(e.cum),a[i]=e.cum;"percent"===h&&(g.usePercentage=!0),this.stackedYData=a,g.oldStacks={}}},setPercentStacks:function(){var t=this,e=t.stackKey,i=t.yAxis.stacks;je([e,"-"+e],function(e){for(var n,r,s,o=t.xData.length;o--;)r=t.xData[o],n=(s=i[e]&&i[e][r])&&s.points[t.index],(r=n)&&(s=s.total?100/s.total:0,r[0]=I(r[0]*s),r[1]=I(r[1]*s),t.stackedYData[o]=r[1])})},getExtremes:function(t){var e,i=this.yAxis,n=this.processedXData,r=[],s=0;e=this.xAxis.getExtremes();var o,a,l,h,c=e.min,d=e.max,t=t||this.stackedYData||this.processedYData;for(e=t.length,h=0;e>h;h++)if(a=n[h],l=t[h],o=null!==l&&l!==_&&(!i.isLog||l.length||l>0),a=this.getExtremesFromAll||this.cropped||(n[h+1]||a)>=c&&(n[h-1]||a)<=d,o&&a)if(o=l.length)for(;o--;)null!==l[o]&&(r[s++]=l[o]);else r[s++]=l;this.dataMin=p(void 0,C(r)),this.dataMax=p(void 0,P(r))},translate:function(){this.processedXData||this.processData(),this.generatePoints();for(var t=this.options,e=t.stacking,i=this.xAxis,n=i.categories,r=this.yAxis,s=this.points,a=s.length,l=!!this.modifyValue,h=t.pointPlacement,d="between"===h||o(h),u=t.threshold,t=0;a>t;t++){var f=s[t],g=f.x,m=f.y,y=f.low,v=e&&r.stacks[(this.negStacks&&u>m?"-":"")+this.stackKey];r.isLog&&0>=m&&(f.y=m=null),f.plotX=i.translate(g,0,0,0,1,h,"flags"===this.type),e&&this.visible&&v&&v[g]&&(v=v[g],m=v.points[this.index],y=m[0],m=m[1],0===y&&(y=p(u,r.min)),r.isLog&&0>=y&&(y=null),f.total=f.stackTotal=v.total,f.percentage="percent"===e&&f.y/v.total*100,f.stackY=m,v.setOffset(this.pointXOffset||0,this.barW||0)),f.yBottom=c(y)?r.translate(y,0,1,0,1):null,l&&(m=this.modifyValue(m,f)),f.plotY="number"==typeof m&&1/0!==m?r.translate(m,0,1,0,1):_,f.clientX=d?i.translate(g,0,0,0,1):f.plotX,f.negative=f.y<(u||0),f.category=n&&n[f.x]!==_?n[f.x]:f.x}this.getSegments()},setTooltipPoints:function(t){var e,i,n,r,s=[],o=this.xAxis,a=o&&o.getExtremes(),l=o?o.tooltipLen||o.len:this.chart.plotSizeX,h=[];if(this.options.enableMouseTracking!==!1){for(t&&(this.tooltipPoints=null),je(this.segments||this.points,function(t){s=s.concat(t)}),o&&o.reversed&&(s=s.reverse()),this.orderTooltipPoints&&this.orderTooltipPoints(s),t=s.length,r=0;t>r;r++)if(o=s[r],e=o.x,e>=a.min&&e<=a.max)for(n=s[r+1],e=i===_?0:i+1,i=s[r+1]?pe(ue(0,ce((o.clientX+(n?n.wrappedClientX||n.clientX:l))/2)),l):l;e>=0&&i>=e;)h[e++]=o;this.tooltipPoints=h}},tooltipHeaderFormatter:function(t){var e,i=this.tooltipOptions,n=i.dateTimeLabelFormats,r=i.xDateFormat||n.year,s=this.xAxis,a=s&&"datetime"===s.options.type,i=i.headerFormat,s=s&&s.closestPointRange;if(a&&!r)if(s){for(e in j)if(j[e]>=s){r=n[e];break}}else r=n.day;return a&&r&&o(t.key)&&(i=i.replace("{point.key}","{point.key:"+r+"}")),b(i,{point:t,series:this})},onMouseOver:function(){var t=this.chart,e=t.hoverSeries;e&&e!==this&&e.onMouseOut(),this.options.events.mouseOver&&Qe(this,"mouseOver"),this.setState("hover"),t.hoverSeries=this},onMouseOut:function(){var t=this.options,e=this.chart,i=e.tooltip,n=e.hoverPoint;n&&n.onMouseOut(),this&&t.events.mouseOut&&Qe(this,"mouseOut"),i&&!t.stickyTracking&&(!i.shared||this.noSharedTooltip)&&i.hide(),this.setState(),e.hoverSeries=null},animate:function(e){var i,n=this,s=n.chart,o=s.renderer;i=n.options.animation;var a,l=s.clipBox,h=s.inverted;i&&!r(i)&&(i=ii[n.type].animation),a="_sharedClip"+i.duration+i.easing,e?(e=s[a],i=s[a+"m"],e||(s[a]=e=o.clipRect(t(l,{width:0})),s[a+"m"]=i=o.clipRect(-99,h?-s.plotLeft:-s.plotTop,99,h?s.chartWidth:s.chartHeight)),n.group.clip(e),n.markerGroup.clip(i),n.sharedClipKey=a):((e=s[a])&&(e.animate({width:s.plotSizeX},i),s[a+"m"].animate({width:s.plotSizeX+99},i)),n.animate=null,n.animationTimeout=setTimeout(function(){n.afterAnimate()},i.duration))},afterAnimate:function(){var t=this.chart,e=this.sharedClipKey,i=this.group;i&&this.options.clip!==!1&&(i.clip(t.clipRect),this.markerGroup.clip()),setTimeout(function(){e&&t[e]&&(t[e]=t[e].destroy(),t[e+"m"]=t[e+"m"].destroy())},100)},drawPoints:function(){var e,i,n,r,s,o,a,l,h,c,d=this.points,u=this.chart,f=this.options.marker,g=this.pointAttr[""],m=this.markerGroup;if(f.enabled||this._hasPointMarkers)for(r=d.length;r--;)s=d[r],i=ce(s.plotX),n=s.plotY,h=s.graphic,a=s.marker||{},e=f.enabled&&a.enabled===_||a.enabled,c=u.isInsidePlot(he(i),n,u.inverted),e&&n!==_&&!isNaN(n)&&null!==s.y?(e=s.pointAttr[s.selected?"select":""]||g,o=e.r,a=p(a.symbol,this.symbol),l=0===a.indexOf("url"),h?h.attr({visibility:c?Ae?"inherit":"visible":"hidden"}).animate(t({x:i-o,y:n-o},h.symbolName?{width:2*o,height:2*o}:{})):c&&(o>0||l)&&(s.graphic=u.renderer.symbol(a,i-o,n-o,2*o,2*o).attr(e).add(m))):h&&(s.graphic=h.destroy())},convertAttribs:function(t,e,i,n){var r,s,o=this.pointAttrToOptions,a={},t=t||{},e=e||{},i=i||{},n=n||{};for(r in o)s=o[r],a[r]=p(t[s],e[r],i[r],n[r]);return a},getAttribs:function(){var e,i=this,n=i.options,r=ii[i.type].marker?n.marker:n,s=r.states,o=s.hover,a=i.color;e={stroke:a,fill:a};var l,h,d=i.points||[],u=[],p=i.pointAttrToOptions;l=n.turboThreshold;var f,g=n.negativeColor,m=r.lineColor;if(n.marker?(o.radius=o.radius||r.radius+2,o.lineWidth=o.lineWidth||r.lineWidth+1):o.color=o.color||oi(o.color||a).brighten(o.brightness).get(),u[""]=i.convertAttribs(r,e),je(["hover","select"],function(t){u[t]=i.convertAttribs(s[t],u[""])}),i.pointAttr=u,a=d.length,!l||l>a)for(;a--;){if(l=d[a],(r=l.options&&l.options.marker||l.options)&&r.enabled===!1&&(r.radius=0),l.negative&&g&&(l.color=l.fillColor=g),e=n.colorByPoint||l.color,l.options)for(f in p)c(r[p[f]])&&(e=!0);e?(r=r||{},h=[],s=r.states||{},e=s.hover=s.hover||{},n.marker||(e.color=e.color||o.color||oi(l.color).brighten(e.brightness||o.brightness).get()),h[""]=i.convertAttribs(t({color:l.color,fillColor:l.color,lineColor:null===m?l.color:_},r),u[""]),h.hover=i.convertAttribs(s.hover,u.hover,h[""]),h.select=i.convertAttribs(s.select,u.select,h[""])):h=u,l.pointAttr=h}},destroy:function(){var t,e,i,n,r,s=this,o=s.chart,a=/AppleWebKit\/533/.test(xe),l=s.data||[];for(Qe(s,"destroy"),Ke(s),je(s.axisTypes||[],function(t){(r=s[t])&&(h(r.series,s),r.isDirty=r.forceRedraw=!0)}),s.legendItem&&s.chart.legend.destroyItem(s),e=l.length;e--;)(i=l[e])&&i.destroy&&i.destroy();s.points=null,clearTimeout(s.animationTimeout),je("area,graph,dataLabelsGroup,group,markerGroup,tracker,graphNeg,areaNeg,posClip,negClip".split(","),function(e){s[e]&&(t=a&&"group"===e?"hide":"destroy",s[e][t]())}),o.hoverSeries===s&&(o.hoverSeries=null),h(o.series,s);for(n in s)delete s[n]},getSegmentPath:function(t){var e=this,i=[],n=e.options.step;return je(t,function(r,s){var o,a=r.plotX,l=r.plotY;
+e.getPointSpline?i.push.apply(i,e.getPointSpline(t,r,s)):(i.push(s?"L":"M"),n&&s&&(o=t[s-1],"right"===n?i.push(o.plotX,l):"center"===n?i.push((o.plotX+a)/2,o.plotY,(o.plotX+a)/2,l):i.push(a,o.plotY)),i.push(r.plotX,r.plotY))}),i},getGraphPath:function(){var t,e=this,i=[],n=[];return je(e.segments,function(r){t=e.getSegmentPath(r),r.length>1?i=i.concat(t):n.push(r[0])}),e.singlePoints=n,e.graphPath=i},drawGraph:function(){var t=this,e=this.options,i=[["graph",e.lineColor||this.color]],n=e.lineWidth,r=e.dashStyle,s="square"!==e.linecap,o=this.getGraphPath(),a=e.negativeColor;a&&i.push(["graphNeg",a]),je(i,function(i,a){var l=i[0],h=t[l];h?(ei(h),h.animate({d:o})):n&&o.length&&(h={stroke:i[1],"stroke-width":n,zIndex:1},r?h.dashstyle=r:s&&(h["stroke-linecap"]=h["stroke-linejoin"]="round"),t[l]=t.chart.renderer.path(o).attr(h).add(t.group).shadow(!a&&e.shadow))})},clipNeg:function(){var t,e=this.options,i=this.chart,n=i.renderer,r=e.negativeColor||e.negativeFillColor,s=this.graph,o=this.area,a=this.posClip,l=this.negClip;t=i.chartWidth;var h=i.chartHeight,c=ue(t,h),d=this.yAxis;r&&(s||o)&&(r=he(d.toPixels(e.threshold||0,!0)),0>r&&(c-=r),e={x:0,y:0,width:c,height:r},c={x:0,y:r,width:c,height:c},i.inverted&&(e.height=c.y=i.plotWidth-r,n.isVML&&(e={x:i.plotWidth-r-i.plotLeft,y:0,width:t,height:h},c={x:r+i.plotLeft-t,y:0,width:i.plotLeft+r,height:t})),d.reversed?(i=c,t=e):(i=e,t=c),a?(a.animate(i),l.animate(t)):(this.posClip=a=n.clipRect(i),this.negClip=l=n.clipRect(t),s&&this.graphNeg&&(s.clip(a),this.graphNeg.clip(l)),o&&(o.clip(a),this.areaNeg.clip(l))))},invertGroups:function(){function t(){var t={width:e.yAxis.len,height:e.xAxis.len};je(["group","markerGroup"],function(i){e[i]&&e[i].attr(t).invert()})}var e=this,i=e.chart;e.xAxis&&(Ze(i,"resize",t),Ze(e,"destroy",function(){Ke(i,"resize",t)}),t(),e.invertGroups=t)},plotGroup:function(t,e,i,n,r){var s=this[t],o=!s;return o&&(this[t]=s=this.chart.renderer.g(e).attr({visibility:i,zIndex:n||.1}).add(r)),s[o?"attr":"animate"](this.getPlotBox()),s},getPlotBox:function(){return{translateX:this.xAxis?this.xAxis.left:this.chart.plotLeft,translateY:this.yAxis?this.yAxis.top:this.chart.plotTop,scaleX:1,scaleY:1}},render:function(){var t,e=this.chart,i=this.options,n=i.animation&&!!this.animate&&e.renderer.isSVG,r=this.visible?"visible":"hidden",s=i.zIndex,o=this.hasRendered,a=e.seriesGroup;t=this.plotGroup("group","series",r,s,a),this.markerGroup=this.plotGroup("markerGroup","markers",r,s,a),n&&this.animate(!0),this.getAttribs(),t.inverted=this.isCartesian?e.inverted:!1,this.drawGraph&&(this.drawGraph(),this.clipNeg()),this.drawDataLabels&&this.drawDataLabels(),this.visible&&this.drawPoints(),this.options.enableMouseTracking!==!1&&this.drawTracker(),e.inverted&&this.invertGroups(),i.clip!==!1&&!this.sharedClipKey&&!o&&t.clip(e.clipRect),n?this.animate():o||this.afterAnimate(),this.isDirty=this.isDirtyData=!1,this.hasRendered=!0},redraw:function(){var t=this.chart,e=this.isDirtyData,i=this.group,n=this.xAxis,r=this.yAxis;i&&(t.inverted&&i.attr({width:t.plotWidth,height:t.plotHeight}),i.animate({translateX:p(n&&n.left,t.plotLeft),translateY:p(r&&r.top,t.plotTop)})),this.translate(),this.setTooltipPoints(!0),this.render(),e&&Qe(this,"updatedData")},setState:function(t){var e=this.options,i=this.graph,n=this.graphNeg,r=e.states,e=e.lineWidth,t=t||"";this.state!==t&&(this.state=t,r[t]&&r[t].enabled===!1||(t&&(e=r[t].lineWidth||e+1),i&&!i.dashstyle&&(t={"stroke-width":e},i.attr(t),n&&n.attr(t))))},setVisible:function(t,e){var i,n=this,r=n.chart,s=n.legendItem,o=r.options.chart.ignoreHiddenSeries,a=n.visible;i=(n.visible=t=n.userOptions.visible=t===_?!a:t)?"show":"hide",je(["group","dataLabelsGroup","markerGroup","tracker"],function(t){n[t]&&n[t][i]()}),r.hoverSeries===n&&n.onMouseOut(),s&&r.legend.colorizeItem(n,t),n.isDirty=!0,n.options.stacking&&je(r.series,function(t){t.options.stacking&&t.visible&&(t.isDirty=!0)}),je(n.linkedSeries,function(e){e.setVisible(t,!1)}),o&&(r.isDirtyBox=!0),e!==!1&&r.redraw(),Qe(n,i)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(t){this.selected=t=t===_?!this.selected:t,this.checkbox&&(this.checkbox.checked=t),Qe(this,t?"select":"unselect")},drawTracker:$e.drawTrackerGraph},t(N.prototype,{addSeries:function(t,e,i){var n,r=this;return t&&(e=p(e,!0),Qe(r,"addSeries",{options:t},function(){n=r.initSeries(t),r.isDirtyLegend=!0,r.linkSeries(),e&&r.redraw(i)})),n},addAxis:function(t,i,n,r){var s=i?"xAxis":"yAxis",o=this.options;new z(this,e(t,{index:this[s].length,isX:i})),o[s]=u(o[s]||{}),o[s].push(t),p(n,!0)&&this.redraw(r)},showLoading:function(e){var i=this.options,n=this.loadingDiv,r=i.loading;n||(this.loadingDiv=n=g(ze,{className:"highcharts-loading"},t(r.style,{zIndex:10,display:Be}),this.container),this.loadingSpan=g("span",null,r.labelStyle,n)),this.loadingSpan.innerHTML=e||i.lang.loading,this.loadingShown||(f(n,{opacity:0,display:"",left:this.plotLeft+"px",top:this.plotTop+"px",width:this.plotWidth+"px",height:this.plotHeight+"px"}),ti(n,{opacity:r.style.opacity},{duration:r.showDuration||0}),this.loadingShown=!0)},hideLoading:function(){var t=this.options,e=this.loadingDiv;e&&ti(e,{opacity:0},{duration:t.loading.hideDuration||100,complete:function(){f(e,{display:Be})}}),this.loadingShown=!1}}),t(gi.prototype,{update:function(t,e,i){var n,s=this,o=s.series,a=s.graphic,l=o.data,h=o.chart,c=o.options,e=p(e,!0);s.firePointEvent("update",{options:t},function(){s.applyOptions(t),r(t)&&(o.getAttribs(),a&&(t&&t.marker&&t.marker.symbol?s.graphic=a.destroy():a.attr(s.pointAttr[s.state||""])),t&&t.dataLabels&&s.dataLabel&&(s.dataLabel=s.dataLabel.destroy())),n=Ye(s,l),o.updateParallelArrays(s,n),c.data[n]=s.options,o.isDirty=o.isDirtyData=!0,!o.fixedBox&&o.hasCartesianSeries&&(h.isDirtyBox=!0),"point"===c.legendType&&h.legend.destroyItem(s),e&&h.redraw(i)})},remove:function(t,e){var i,n=this,r=n.series,s=r.points,o=r.chart,a=r.data;D(e,o),t=p(t,!0),n.firePointEvent("remove",null,function(){i=Ye(n,a),a.length===s.length&&s.splice(i,1),a.splice(i,1),r.options.data.splice(i,1),r.updateParallelArrays(n,"splice",i,1),n.destroy(),r.isDirty=!0,r.isDirtyData=!0,t&&o.redraw()})}}),t(mi.prototype,{addPoint:function(t,e,i,n){var r,s=this.options,o=this.data,a=this.graph,l=this.area,h=this.chart,c=this.xAxis&&this.xAxis.names,d=a&&a.shift||0,u=s.data,f=this.xData;if(D(n,h),i&&je([a,l,this.graphNeg,this.areaNeg],function(t){t&&(t.shift=d+1)}),l&&(l.isArea=!0),e=p(e,!0),n={series:this},this.pointClass.prototype.applyOptions.apply(n,[t]),a=n.x,l=f.length,this.requireSorting&&aa;)l--;this.updateParallelArrays(n,"splice",l),this.updateParallelArrays(n,l),c&&(c[a]=n.name),u.splice(l,0,t),r&&(this.data.splice(l,0,null),this.processData()),"point"===s.legendType&&this.generatePoints(),i&&(o[0]&&o[0].remove?o[0].remove(!1):(o.shift(),this.updateParallelArrays(n,"shift"),u.shift())),this.isDirtyData=this.isDirty=!0,e&&(this.getAttribs(),h.redraw())},remove:function(t,e){var i=this,n=i.chart,t=p(t,!0);i.isRemoving||(i.isRemoving=!0,Qe(i,"remove",null,function(){i.destroy(),n.isDirtyLegend=n.isDirtyBox=!0,n.linkSeries(),t&&n.redraw(e)})),i.isRemoving=!1},update:function(i,n){var r,s=this.chart,o=this.type,a=He[o].prototype,i=e(this.userOptions,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},i);this.remove(!1);for(r in a)a.hasOwnProperty(r)&&(this[r]=_);t(this,He[i.type||o].prototype),this.init(s,i),p(n,!0)&&s.redraw(!1)}}),t(z.prototype,{update:function(i,n){var r=this.chart,i=r.options[this.coll][this.options.index]=e(this.userOptions,i);this.destroy(!0),this._addedPlotLB=this.userMin=this.userMax=_,this.init(r,t(i,{events:_})),r.isDirtyBox=!0,p(n,!0)&&r.redraw()},remove:function(t){var e=this.chart,i=this.coll;je(this.series,function(t){t.remove(!1)}),h(e.axes,this),h(e[i],this),e.options[i].splice(this.options.index,1),je(e[i],function(t,e){t.options.index=e}),this.destroy(),e.isDirtyBox=!0,p(t,!0)&&e.redraw()},setTitle:function(t,e){this.update({title:t},e)},setCategories:function(t,e){this.update({categories:t},e)}});var yi=m(mi);He.line=yi,ii.area=e(We,{threshold:0});var vi=m(mi,{type:"area",getSegments:function(){var t,e,i,n,r,s=[],o=[],a=[],l=this.xAxis,h=this.yAxis,c=h.stacks[this.stackKey],d={},u=this.points,p=this.options.connectNulls;if(this.options.stacking&&!this.cropped){for(n=0;n=0;e--)s=p(t[e].yBottom,o),et&&r>l?(r=ue(t,l),o=2*l-r):t>r&&l>r&&(r=pe(t,l),o=2*l-r),o>c&&o>l?(o=ue(c,l),r=2*l-o):c>o&&l>o&&(o=pe(c,l),r=2*l-o),e.rightContX=s,e.rightContY=o}return i?(e=["C",h.rightContX||h.plotX,h.rightContY||h.plotY,n||a,r||l,a,l],h.rightContX=h.rightContY=null):e=["M",a,l],e}}),He.spline=yi,ii.areaspline=e(ii.area),vi=vi.prototype,yi=m(yi,{type:"areaspline",closedStacks:!0,getSegmentPath:vi.getSegmentPath,closeSegment:vi.closeSegment,drawGraph:vi.drawGraph,drawLegendSymbol:li.drawRectangle}),He.areaspline=yi,ii.column=e(We,{borderColor:"#FFFFFF",borderWidth:1,borderRadius:0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{brightness:.1,shadow:!1},select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}},dataLabels:{align:null,verticalAlign:null,y:null},stickyTracking:!1,threshold:0}),yi=m(mi,{type:"column",pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color",r:"borderRadius"},cropShoulder:0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){mi.prototype.init.apply(this,arguments);var t=this,e=t.chart;e.hasRendered&&je(e.series,function(e){e.type===t.type&&(e.isDirty=!0)})},getColumnMetrics:function(){var t,e,i=this,n=i.options,r=i.xAxis,s=i.yAxis,o=r.reversed,a={},l=0;n.grouping===!1?l=1:je(i.chart.series,function(n){var r=n.options,o=n.yAxis;n.type===i.type&&n.visible&&s.len===o.len&&s.pos===o.pos&&(r.stacking?(t=n.stackKey,a[t]===_&&(a[t]=l++),e=a[t]):r.grouping!==!1&&(e=l++),n.columnIndex=e)});var r=pe(fe(r.transA)*(r.ordinalSlope||n.pointRange||r.closestPointRange||1),r.len),h=r*n.groupPadding,d=(r-2*h)/l,u=n.pointWidth,n=c(u)?(d-u)/2:d*n.pointPadding,u=p(u,d-2*n);return i.columnMetrics={width:u,offset:n+(h+((o?l-(i.columnIndex||0):i.columnIndex)||0)*d-r/2)*(o?-1:1)}},translate:function(){var t=this.chart,e=this.options,i=e.borderWidth,n=this.yAxis,r=this.translatedThreshold=n.getThreshold(e.threshold),s=p(e.minPointLength,5),e=this.getColumnMetrics(),o=e.width,a=this.barW=de(ue(o,1+2*i)),l=this.pointXOffset=e.offset,h=-(i%2?.5:0),c=i%2?.5:1;t.renderer.isVML&&t.inverted&&(c+=1),mi.prototype.translate.apply(this),je(this.points,function(t){var e,i=p(t.yBottom,r),d=pe(ue(-999-i,t.plotY),n.len+999+i),u=t.plotX+l,f=a,g=pe(d,i),d=ue(d,i)-g;fe(d)s?i-s:r-(n.translate(t.y,0,1,0,1)<=r?s:0))),t.barX=u,t.pointWidth=o,i=fe(u)<.5,f=he(u+f)+h,u=he(u)+h,f-=u,e=fe(g)<.5,d=he(g+d)+c,g=he(g)+c,d-=g,i&&(u+=1,f-=1),e&&(g-=1,d+=1),t.shapeType="rect",t.shapeArgs={x:u,y:g,width:f,height:d}})},getSymbol:Oe,drawLegendSymbol:li.drawRectangle,drawGraph:Oe,drawPoints:function(){var t,i=this,n=this.chart,r=i.options,s=n.renderer,o=n.options.animationLimit||250;je(i.points,function(a){var l=a.plotY,h=a.graphic;l===_||isNaN(l)||null===a.y?h&&(a.graphic=h.destroy()):(t=a.shapeArgs,h?(ei(h),h[n.pointCount{series.name} ',pointFormat:"x: {point.x} y: {point.y} ",followPointer:!0},stickyTracking:!1}),yi=m(mi,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["markerGroup"],takeOrdinalPosition:!1,drawTracker:$e.drawTrackerPoint,drawGraph:function(){this.options.lineWidth&&mi.prototype.drawGraph.call(this)},setTooltipPoints:Oe}),He.scatter=yi,ii.pie=e(We,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name}},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,states:{hover:{brightness:.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}}),We={type:"pie",isCartesian:!1,pointClass:m(gi,{init:function(){gi.prototype.init.apply(this,arguments);var e,i=this;return i.y<0&&(i.y=null),t(i,{visible:i.visible!==!1,name:p(i.name,"Slice")}),e=function(t){i.slice("select"===t.type)},Ze(i,"select",e),Ze(i,"unselect",e),i},setVisible:function(t){var e,i=this,n=i.series,r=n.chart;i.visible=i.options.visible=t=t===_?!i.visible:t,n.options.data[Ye(i,n.data)]=i.options,e=t?"show":"hide",je(["graphic","dataLabel","connector","shadowGroup"],function(t){i[t]&&i[t][e]()}),i.legendItem&&r.legend.colorizeItem(i,t),!n.isDirty&&n.options.ignoreHiddenPoint&&(n.isDirty=!0,r.redraw())},slice:function(t,e,i){var n=this.series;D(i,n.chart),p(e,!0),this.sliced=this.options.sliced=t=c(t)?t:!this.sliced,n.options.data[Ye(this,n.data)]=this.options,t=t?this.slicedTranslation:{translateX:0,translateY:0},this.graphic.animate(t),this.shadowGroup&&this.shadowGroup.animate(t)}}),requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:Oe,animate:function(t){var e=this,i=e.points,n=e.startAngleRad;t||(je(i,function(t){var i=t.graphic,t=t.shapeArgs;i&&(i.attr({r:e.center[3]/2,start:n,end:n}),i.animate({r:t.r,start:t.start,end:t.end},e.options.animation))}),e.animate=null)},setData:function(t,e){mi.prototype.setData.call(this,t,!1),this.processData(),this.generatePoints(),p(e,!0)&&this.chart.redraw()},generatePoints:function(){var t,e,i,n,r=0,s=this.options.ignoreHiddenPoint;for(mi.prototype.generatePoints.call(this),e=this.points,i=e.length,t=0;i>t;t++)n=e[t],r+=s&&!n.visible?0:n.y;for(this.total=r,t=0;i>t;t++)n=e[t],n.percentage=r>0?n.y/r*100:0,n.total=r},translate:function(t){this.generatePoints();var e,i,n,r,s,o=0,a=this.options,l=a.slicedOffset,h=l+a.borderWidth,c=a.startAngle||0,d=this.startAngleRad=ye/180*(c-90),c=(this.endAngleRad=ye/180*((a.endAngle||c+360)-90))-d,u=this.points,p=a.dataLabels.distance,a=a.ignoreHiddenPoint,f=u.length;for(t||(this.center=t=this.getCenter()),this.getX=function(e,i){return n=le.asin((e-t[1])/(t[2]/2+p)),t[0]+(i?-1:1)*ge(n)*(t[2]/2+p)},r=0;f>r;r++)s=u[r],e=d+o*c,(!a||s.visible)&&(o+=s.percentage/100),i=d+o*c,s.shapeType="arc",s.shapeArgs={x:t[0],y:t[1],r:t[2]/2,innerR:t[3]/2,start:he(1e3*e)/1e3,end:he(1e3*i)/1e3},n=(i+e)/2,n>.75*c&&(n-=2*ye),s.slicedTranslation={translateX:he(ge(n)*l),translateY:he(me(n)*l)},e=ge(n)*t[2]/2,i=me(n)*t[2]/2,s.tooltipPos=[t[0]+.7*e,t[1]+.7*i],s.half=-ye/2>n||n>ye/2?1:0,s.angle=n,h=pe(h,p/2),s.labelPos=[t[0]+e+ge(n)*p,t[1]+i+me(n)*p,t[0]+e+ge(n)*h,t[1]+i+me(n)*h,t[0]+e,t[1]+i,0>p?"center":s.half?"right":"left",n]},setTooltipPoints:Oe,drawGraph:null,drawPoints:function(){var e,i,n,r,s=this,o=s.chart.renderer,a=s.options.shadow;a&&!s.shadowGroup&&(s.shadowGroup=o.g("shadow").add(s.group)),je(s.points,function(l){i=l.graphic,r=l.shapeArgs,n=l.shadowGroup,a&&!n&&(n=l.shadowGroup=o.g("shadow").add(s.shadowGroup)),e=l.sliced?l.slicedTranslation:{translateX:0,translateY:0},n&&n.attr(e),i?i.animate(t(r,e)):l.graphic=i=o.arc(r).setRadialReference(s.center).attr(l.pointAttr[l.selected?"select":""]).attr({"stroke-linejoin":"round"}).attr(e).add(s.group).shadow(a,n),void 0!==l.visible&&l.setVisible(l.visible)})},sortByAngle:function(t,e){t.sort(function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e})},drawTracker:$e.drawTrackerPoint,drawLegendSymbol:li.drawRectangle,getCenter:hi.getCenter,getSymbol:Oe},We=m(mi,We),He.pie=We,mi.prototype.drawDataLabels=function(){var i,n,r,s,o=this,a=o.options,l=a.cursor,h=a.dataLabels,a=o.points;(h.enabled||o._hasPointLabels)&&(o.dlProcessOptions&&o.dlProcessOptions(h),s=o.plotGroup("dataLabelsGroup","data-labels",o.visible?"visible":"hidden",h.zIndex||6),n=h,je(a,function(a){var d,u,f,g=a.dataLabel,m=a.connector,y=!0;if(i=a.options&&a.options.dataLabels,d=p(i&&i.enabled,n.enabled),g&&!d)a.dataLabel=g.destroy();else if(d){if(h=e(n,i),d=h.rotation,u=a.getLabelConfig(),r=h.format?b(h.format,u):h.formatter.call(u,h),h.style.color=p(h.color,h.style.color,o.color,"black"),g)c(r)?(g.attr({text:r}),y=!1):(a.dataLabel=g=g.destroy(),m&&(a.connector=m.destroy()));else if(c(r)){g={fill:h.backgroundColor,stroke:h.borderColor,"stroke-width":h.borderWidth,r:h.borderRadius||0,rotation:d,padding:h.padding,zIndex:1};for(f in g)g[f]===_&&delete g[f];g=a.dataLabel=o.chart.renderer[d?"text":"label"](r,0,-999,null,null,null,h.useHTML).attr(g).css(t(h.style,l&&{cursor:l})).add(s).shadow(h.shadow)}g&&o.alignDataLabel(a,g,h,null,y)}}))},mi.prototype.alignDataLabel=function(e,i,n,r,s){var o=this.chart,a=o.inverted,l=p(e.plotX,-999),h=p(e.plotY,-999),c=i.getBBox();(e=this.visible&&(e.series.forceDL||o.isInsidePlot(e.plotX,e.plotY,a)))&&(r=t({x:a?o.plotWidth-h:l,y:he(a?o.plotHeight-l:h),width:0,height:0},r),t(n,{width:c.width,height:c.height}),n.rotation?(a={align:n.align,x:r.x+n.x+r.width/2,y:r.y+n.y+r.height/2},i[s?"attr":"animate"](a)):(i.align(n,null,r),a=i.alignAttr,"justify"===p(n.overflow,"justify")?this.justifyDataLabel(i,n,a,c,r,s):p(n.crop,!0)&&(e=o.isInsidePlot(a.x,a.y)&&o.isInsidePlot(a.x+c.width,a.y+c.height)))),e||(i.attr({y:-999}),i.placed=!1)},mi.prototype.justifyDataLabel=function(t,e,i,n,r,s){var o,a,l=this.chart,h=e.align,c=e.verticalAlign;o=i.x,0>o&&("right"===h?e.align="left":e.x=-o,a=!0),o=i.x+n.width,o>l.plotWidth&&("left"===h?e.align="right":e.x=l.plotWidth-o,a=!0),o=i.y,0>o&&("bottom"===c?e.verticalAlign="top":e.y=-o,a=!0),o=i.y+n.height,o>l.plotHeight&&("top"===c?e.verticalAlign="bottom":e.y=l.plotHeight-o,a=!0),a&&(t.placed=!s,t.align(e,null,r))},He.pie&&(He.pie.prototype.drawDataLabels=function(){var t,e,i,n,r,s,o,a,l,h,c,d,u=this,f=u.data,g=u.chart,m=u.options.dataLabels,y=p(m.connectorPadding,10),v=p(m.connectorWidth,1),x=g.plotWidth,g=g.plotHeight,b=p(m.softConnector,!0),w=m.distance,k=u.center,S=k[2]/2,T=k[1],C=w>0,A=[[],[]],L=[0,0,0,0],M=function(t,e){return e.y-t.y};if(u.visible&&(m.enabled||u._hasPointLabels)){for(mi.prototype.drawDataLabels.apply(u),je(f,function(t){t.dataLabel&&t.visible&&A[t.half].push(t)}),c=0;!o&&f[c];)o=f[c]&&f[c].dataLabel&&(f[c].dataLabel.getBBox().height||21),c++;for(c=2;c--;){var I,f=[],D=[],E=A[c],O=E.length;if(u.sortByAngle(E,c-.5),w>0){for(d=T-S-w;T+S+w>=d;d+=o)f.push(d);if(r=f.length,O>r){for(t=[].concat(E),t.sort(M),d=O;d--;)t[d].rank=d;for(d=O;d--;)E[d].rank>=r&&E.splice(d,1);O=E.length}for(d=0;O>d;d++){t=E[d],s=t.labelPos,t=9999;var R,z;for(z=0;r>z;z++)R=fe(f[z]-s[1]),t>R&&(t=R,I=z);if(d>I&&null!==f[d])I=d;else for(O-d+I>r&&null!==f[d]&&(I=r-O+d);null===f[I];)I++;D.push({i:I,y:f[I]}),f[I]=null}D.sort(M)}for(d=0;O>d;d++)t=E[d],s=t.labelPos,n=t.dataLabel,h=t.visible===!1?"hidden":"visible",t=s[1],w>0?(r=D.pop(),I=r.i,l=r.y,(t>l&&null!==f[I+1]||l>t&&null!==f[I-1])&&(l=t)):l=t,a=m.justify?k[0]+(c?-1:1)*(S+w):u.getX(0===I||I===f.length-1?t:l,c),n._attr={visibility:h,align:s[6]},n._pos={x:a+m.x+({left:y,right:-y}[s[6]]||0),y:l+m.y-10},n.connX=a,n.connY=l,null===this.options.size&&(r=n.width,y>a-r?L[3]=ue(he(r-a+y),L[3]):a+r>x-y&&(L[1]=ue(he(a+r-x+y),L[1])),0>l-o/2?L[0]=ue(he(-l+o/2),L[0]):l+o/2>g&&(L[2]=ue(he(l+o/2-g),L[2])))}(0===P(L)||this.verifyDataLabelOverflow(L))&&(this.placeDataLabels(),C&&v&&je(this.points,function(t){e=t.connector,s=t.labelPos,(n=t.dataLabel)&&n._pos?(h=n._attr.visibility,a=n.connX,l=n.connY,i=b?["M",a+("left"===s[6]?5:-5),l,"C",a,l,2*s[2]-s[4],2*s[3]-s[5],s[2],s[3],"L",s[4],s[5]]:["M",a+("left"===s[6]?5:-5),l,"L",s[2],s[3],"L",s[4],s[5]],e?(e.animate({d:i}),e.attr("visibility",h)):t.connector=e=u.chart.renderer.path(i).attr({"stroke-width":v,stroke:m.connectorColor||t.color||"#606060",visibility:h}).add(u.group)):e&&(t.connector=e.destroy())}))}},He.pie.prototype.placeDataLabels=function(){je(this.points,function(t){var e,t=t.dataLabel;t&&((e=t._pos)?(t.attr(t._attr),t[t.moved?"animate":"attr"](e),t.moved=!0):t&&t.attr({y:-999}))})},He.pie.prototype.alignDataLabel=Oe,He.pie.prototype.verifyDataLabelOverflow=function(t){var e,i=this.center,n=this.options,r=n.center,s=n=n.minSize||80;return null!==r[0]?s=ue(i[2]-ue(t[1],t[3]),n):(s=ue(i[2]-t[1]-t[3],n),i[0]+=(t[3]-t[1])/2),null!==r[1]?s=ue(pe(s,i[2]-ue(t[0],t[2])),n):(s=ue(pe(s,i[2]-t[0]-t[2]),n),i[1]+=(t[0]-t[2])/2),sp(this.translatedThreshold,o.plotSizeY),c=p(n.inside,!!this.options.stacking);l&&(r=e(l),a&&(r={x:o.plotWidth-r.y-r.height,y:o.plotHeight-r.x-r.width,width:r.height,height:r.width}),!c)&&(a?(r.x+=h?0:r.width,r.width=0):(r.y+=h?r.height:0,r.height=0)),n.align=p(n.align,!a||c?"center":h?"right":"left"),n.verticalAlign=p(n.verticalAlign,a||c?"middle":h?"top":"bottom"),mi.prototype.alignDataLabel.call(this,t,i,n,r,s)}),t(Highcharts,{Axis:z,Chart:N,Color:oi,Point:gi,Tick:R,Tooltip:F,Renderer:H,Series:mi,SVGElement:O,SVGRenderer:ai,arrayMin:C,arrayMax:P,charts:Re,dateFormat:X,format:b,pathAnim:Y,getOptions:function(){return $},hasBidiBug:Le,isTouchDevice:Ce,numberFormat:y,seriesTypes:He,setOptions:function(t){return $=e(!0,$,t),E(),$},addEvent:Ze,removeEvent:Ke,createElement:g,discardElement:L,css:f,each:je,extend:t,map:Ue,merge:e,pick:p,splat:u,extendClass:m,pInt:i,wrap:x,svg:Ae,canvas:Me,vml:!Ae&&!Me,product:"Highcharts",version:"3.0.8"})}(),function(){var t=Highcharts,e=t.Chart,i=t.addEvent,n=t.createElement,r=t.discardElement,s=t.css,o=t.merge,a=t.each,l=t.extend,h=Math.max,c=document,d=window,u="ontouchstart"in c.documentElement,p=t.setOptions({lang:{downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",exportButtonTitle:"Export to raster or vector image",printButtonTitle:"Print the chart"}});p.navigation={menuStyle:{border:"1px solid #A0A0A0",background:"#FFFFFF"},menuItemStyle:{padding:"0 5px",background:"none",color:"#303030",fontSize:u?"14px":"11px"},menuItemHoverStyle:{background:"#4572A5",color:"#FFFFFF"},buttonOptions:{align:"right",backgroundColor:{linearGradient:[0,0,0,20],stops:[[.4,"#F7F7F7"],[.6,"#E3E3E3"]]},borderColor:"#B0B0B0",borderRadius:3,borderWidth:1,height:20,hoverBorderColor:"#909090",hoverSymbolFill:"#81A7CF",hoverSymbolStroke:"#4572A5",symbolFill:"#E0E0E0",symbolStroke:"#A0A0A0",symbolX:11.5,symbolY:10.5,verticalAlign:"top",width:24,y:10}},p.exporting={type:"image/png",url:"http://export.highcharts.com/",width:800,buttons:{exportButton:{symbol:"exportIcon",x:-10,symbolFill:"#A8BF77",hoverSymbolFill:"#768F3E",_titleKey:"exportButtonTitle",menuItems:[{textKey:"downloadPNG",onclick:function(){this.exportChart()}},{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}]},printButton:{symbol:"printIcon",x:-36,symbolFill:"#B5C9DF",hoverSymbolFill:"#779ABF",_titleKey:"printButtonTitle",onclick:function(){this.print()}}}},l(e.prototype,{getSVG:function(t){var e,i,s,h,d,u,p=this,f=o(p.options,t);return c.createElementNS||(c.createElementNS=function(t,e){var i=c.createElement(e);return i.getBBox=function(){return p.renderer.Element.prototype.getBBox.apply({element:i})},i}),e=n("div",null,{position:"absolute",top:"-9999em",width:p.chartWidth+"px",height:p.chartHeight+"px"},c.body),l(f.chart,{renderTo:e,forExport:!0}),f.exporting.enabled=!1,f.chart.plotBackgroundImage=null,f.series=[],a(p.series,function(t){s=t.options,s.animation=!1,s.showCheckbox=!1,s&&s.marker&&/^url\(/.test(s.marker.symbol)&&(s.marker.symbol="circle"),s.data=[],a(t.data,function(t){h=t.config,d={x:t.x,y:t.y,name:t.name},"object"==typeof h&&t.config&&h.constructor!=Array&&l(d,h),s.data.push(d),(u=t.config&&t.config.marker)&&/^url\(/.test(u.symbol)&&delete u.symbol}),f.series.push(s)}),t=new Highcharts.Chart(f),i=t.container.innerHTML,f=null,t.destroy(),r(e),i=i.replace(/zIndex="[^"]+"/g,"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/isTracker="[^"]+"/g,"").replace(/url\([^#]+#/g,"url(#").replace(/id=([^" >]+)/g,'id="$1"').replace(/class=([^" ]+)/g,'class="$1"').replace(/ transform /g," ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(t){return t.toLowerCase()}),i=i.replace(/(url\(#highcharts-[0-9]+)"/g,"$1").replace(/"/g,"'"),2==i.match(/ xmlns="/g).length&&(i=i.replace(/xmlns="[^"]+"/,"")),i},exportChart:function(t,e){var i,s=this.getSVG(e);t=o(this.options.exporting,t),i=n("form",{method:"post",action:t.url},{display:"none"},c.body),a(["filename","type","width","svg"],function(e){n("input",{type:"hidden",name:e,value:{filename:t.filename||"chart",type:t.type,width:t.width,svg:s}[e]},null,i)}),i.submit(),r(i)},print:function(){var t=this,e=t.container,i=[],n=e.parentNode,r=c.body,s=r.childNodes;t.isPrinting||(t.isPrinting=!0,a(s,function(t,e){1==t.nodeType&&(i[e]=t.style.display,t.style.display="none")}),r.appendChild(e),d.print(),setTimeout(function(){n.appendChild(e),a(s,function(t,e){1==t.nodeType&&(t.style.display=i[e])}),t.isPrinting=!1},1e3))},contextMenu:function(e,r,o,c,d,p){var f,g,m=this,y=m.options.navigation,v=y.menuItemStyle,x=m.chartWidth,b=m.chartHeight,w="cache-"+e,k=m[w],S=h(d,p);k||(m[w]=k=n("div",{className:"highcharts-"+e},{position:"absolute",zIndex:1e3,padding:S+"px"},m.container),f=n("div",null,l({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},y.menuStyle),k),g=function(){s(k,{display:"none"})},i(k,"mouseleave",g),a(r,function(e){e&&(n("div",{onmouseover:function(){s(this,y.menuItemHoverStyle)},onmouseout:function(){s(this,v)},innerHTML:e.text||t.getOptions().lang[e.textKey]},l({cursor:"pointer"},v),f)[u?"ontouchstart":"onclick"]=function(){g(),e.onclick.apply(m,arguments)})}),m.exportMenuWidth=k.offsetWidth,m.exportMenuHeight=k.offsetHeight),e={display:"block"},o+m.exportMenuWidth>x?e.right=x-o-d-S+"px":e.left=o-S+"px",c+p+m.exportMenuHeight>b?e.bottom=b-c-S+"px":e.top=c+p-S+"px",s(k,e)},addButton:function(e){function i(){r.attr(m),n.attr(g)}var n,r,s,a=this,h=a.renderer,c=o(a.options.navigation.buttonOptions,e),d=c.onclick,u=c.menuItems,p=c.width,f=c.height;e=c.borderWidth;var g={stroke:c.borderColor},m={stroke:c.symbolStroke,fill:c.symbolFill};c.enabled!==!1&&(n=h.rect(0,0,p,f,c.borderRadius,e).align(c,!0).attr(l({fill:c.backgroundColor,"stroke-width":e,zIndex:19},g)).add(),s=h.rect(0,0,p,f,0).align(c).attr({fill:"rgba(255, 255, 255, 0.001)",title:t.getOptions().lang[c._titleKey],zIndex:21}).css({cursor:"pointer"}).on("mouseover",function(){r.attr({stroke:c.hoverSymbolStroke,fill:c.hoverSymbolFill}),n.attr({stroke:c.hoverBorderColor})}).on("mouseout",i).on("click",i).add(),u&&(d=function(){i();var t=s.getBBox();a.contextMenu("export-menu",u,t.x,t.y,p,f)}),s.on("click",function(){d.apply(a,arguments)}),r=h.symbol(c.symbol,c.symbolX,c.symbolY,(c.symbolSize||12)/2).align(c,!0).attr(l(m,{"stroke-width":c.symbolStrokeWidth||1,zIndex:20})).add())}}),t.Renderer.prototype.symbols.exportIcon=function(t,e,i){return["M",t-i,e+i,"L",t+i,e+i,t+i,e+.5*i,t-i,e+.5*i,"Z","M",t,e+.5*i,"L",t-.5*i,e-i/3,t-i/6,e-i/3,t-i/6,e-i,t+i/6,e-i,t+i/6,e-i/3,t+.5*i,e-i/3,"Z"]},t.Renderer.prototype.symbols.printIcon=function(t,e,i){return["M",t-i,e+.5*i,"L",t+i,e+.5*i,t+i,e-i/3,t-i,e-i/3,"Z","M",t-.5*i,e-i/3,"L",t-.5*i,e-i,t+.5*i,e-i,t+.5*i,e-i/3,"Z","M",t-.5*i,e+.5*i,"L",t-.75*i,e+i,t+.75*i,e+i,t+.5*i,e+.5*i,"Z"]},e.prototype.callbacks.push(function(t){var e,i=t.options.exporting,n=i.buttons;if(i.enabled!==!1)for(e in n)t.addButton(n[e])})}();var createWindows=function(t,e,i){return function(n){createWindowsWithData(n,t,e,i)}},updatePortletPositions=function(t,e){return function(){if(t){var i=$(this).sortable("serialize");colId=$(this).attr("id").charAt($(this).attr("id").length-1),portletArray=getPortletArray(i),jsonResult={col:colId,positions:portletArray},portletArray.length>0&&$.ajax({type:"PUT",url:"../channels/"+e+"/windows",data:{_method:"PUT",page:JSON.stringify(jsonResult)},dataType:"json"})}}},decoratePortlet=function(t){return function(){var e=$(this).find(".portlet-header");return e.append(""),thisObject=$(this),"true"==t?(thisObject.find(".wtype").prepend(" "),thisObject.find(".wtype-chart_window").append(" "),thisObject.find(".wtype").append(" "),thisObject.find(".portlet-header").css("cursor","move")):$(".column").sortable({disabled:!0}),$(this).attr("id")}},uiEditClick=function(t){return function(){var e=$(this).parents(".portlet:first").attr("id").substring(8),i="";$("#chartConfig"+e).load("/channels/"+t+"/charts/"+e+"/edit",function(){i=$("#chartOptions"+e).html(),"undefined"!=i&&i.length>2&&$.each(i.split("&"),setupChartForm(e)),$("#button"+e).click(function(){updateChart(e,!0,450,250,t,!0),$("#chartConfig"+e).dialog("close")})}).dialog({title:"Chart Options",modal:!0,resizable:!1,width:500,dialogClass:"dev-info-dialog"})}},uiViewClick=function(t){return function(){var e=$(this).parents(".portlet:first").find(".portlet-content").offset().left,i=$(this).parents(".portlet:first").find(".portlet-content").offset().top,n=$(this).parents(".portlet:first").attr("id").substring(8);$("body").append(''),$.get("/channels/"+t+"/windows/"+n+"/iframe",function(t){var e=t.replace(/id=\"iframe[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?\"/,"");$("#iframeinner"+n).text(e)}),$("#iframepopup"+n).dialog({resizable:!1,width:"300px",position:[e+200,i-200],title:"Chart Iframe",dialogClass:"dev-info-dialog"})}},uiCloseClick=function(t){return function(){var e=$(this).parents(".portlet:first").attr("id").substring(8),i=$(this).parents(".portlet:first");
+$.update("/channels/"+t+"/windows/"+e+"/hide",function(){i.hide("drop",function(){i.remove()})})}};!function(t){function e(){var e=i(this);return isNaN(e.datetime)||t(this).text(n(e.datetime)),this}function i(e){if(e=t(e),!e.data("timeago")){e.data("timeago",{datetime:s.datetime(e)});var i=t.trim(e.text());i.length>0&&e.attr("title",i)}return e.data("timeago")}function n(t){return s.inWords(r(t))}function r(t){return(new Date).getTime()-t.getTime()}t.timeago=function(e){return e instanceof Date?n(e):"string"==typeof e?n(t.timeago.parse(e)):n(t.timeago.datetime(e))};var s=t.timeago;t.extend(t.timeago,{settings:{refreshMillis:6e4,allowFuture:!1,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",numbers:[]}},inWords:function(e){function i(i,r){var s=t.isFunction(i)?i(r,e):i,o=n.numbers&&n.numbers[r]||r;return s.replace(/%d/i,o)}var n=this.settings.strings,r=n.prefixAgo,s=n.suffixAgo;this.settings.allowFuture&&(0>e&&(r=n.prefixFromNow,s=n.suffixFromNow),e=Math.abs(e));var o=e/1e3,a=o/60,l=a/60,h=l/24,c=h/365,d=45>o&&i(n.seconds,Math.round(o))||90>o&&i(n.minute,1)||45>a&&i(n.minutes,Math.round(a))||90>a&&i(n.hour,1)||24>l&&i(n.hours,Math.round(l))||48>l&&i(n.day,1)||30>h&&i(n.days,Math.floor(h))||60>h&&i(n.month,1)||365>h&&i(n.months,Math.floor(h/30))||2>c&&i(n.year,1)||i(n.years,Math.floor(c));return t.trim([r,d,s].join(" "))},parse:function(e){var i=t.trim(e);return i=i.replace(/\.\d\d\d+/,""),i=i.replace(/-/,"/").replace(/-/,"/"),i=i.replace(/T/," ").replace(/Z/," UTC"),i=i.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),new Date(i)},datetime:function(e){var i="time"===t(e).get(0).tagName.toLowerCase(),n=i?t(e).attr("datetime"):t(e).attr("title");return s.parse(n)}}),t.fn.timeago=function(){var t=this;t.each(e);var i=s.settings;return i.refreshMillis>0&&setInterval(function(){t.each(e)},i.refreshMillis),t},document.createElement("abbr"),document.createElement("time")}(jQuery),function(t){function e(t,e){return e.measureText(t).width}function i(t,e){return e.text(t),e.width()}var n,r,s,o=!1;t.fn.shorten=function(){var o={},a=arguments,l=a.callee;if(a.length)if(a[0].constructor==Object)o=a[0];else{if("options"==a[0])return t(this).eq(0).data("shorten-options");o={width:parseInt(a[0]),tail:a[1]}}this.css("visibility","hidden");var h=t.extend({},l.defaults,o);return this.each(function(){var a,c=t(this),d=c.text(),u=d.length,p=t(" ").html(h.tail).text(),f={shortened:!1,textOverflow:!1};if(a="none"!=c.css("float")?h.width||c.width():h.width||c.parent().width(),0>a)return!0;if(c.data("shorten-options",h),this.style.display="inline-block",this.style.whiteSpace="nowrap",n){var g=t(this),m=document.createElement("canvas");ctx=m.getContext("2d"),g.html(m),ctx.font=g.css("font-style")+" "+g.css("font-variant")+" "+g.css("font-weight")+" "+Math.ceil(parseFloat(g.css("font-size")))+"px "+g.css("font-family"),r=ctx,s=e}else g=t(''),$td=t("td",g),t(this).html(g),r=$td,s=i;if(g=s.call(this,d,r),a>g)return c.text(d),this.style.visibility="visible",c.data("shorten-info",f),!0;if(h.tooltip&&this.setAttribute("title",d),l._native&&!o.width&&(m=t(""+h.tail+" ").text(),1==m.length&&8230==m.charCodeAt(0)))return c.text(d),this.style.overflow="hidden",this.style[l._native]="ellipsis",this.style.visibility="visible",f.shortened=!0,f.textOverflow="ellipsis",c.data("shorten-info",f),!0;p=s.call(this,p,r),a-=p,p=1.15*a,g-p>0&&(p=d.substring(0,Math.ceil(u*(p/g))),s.call(this,p,r)>a&&(d=p,u=d.length));do u--,d=d.substring(0,u);while(s.call(this,d,r)>=a);return c.html(t.trim(t(" ").text(d).html())+h.tail),this.style.visibility="visible",f.shortened=!0,c.data("shorten-info",f),!0})};var a=document.documentElement.style;"textOverflow"in a?o="textOverflow":"OTextOverflow"in a&&(o="OTextOverflow"),"undefined"!=typeof Modernizr&&Modernizr.canvastext?n=Modernizr.canvastext:(a=document.createElement("canvas"),n=!(!a.getContext||!a.getContext("2d")||"function"!=typeof a.getContext("2d").fillText)),t.fn.shorten._is_canvasTextSupported=n,t.fn.shorten._native=o,t.fn.shorten.defaults={tail:"…",tooltip:!0}}(jQuery),function(t){window.NestedFormEvents=function(){this.addFields=t.proxy(this.addFields,this),this.removeFields=t.proxy(this.removeFields,this)},NestedFormEvents.prototype={addFields:function(e){var i=e.currentTarget,n=t(i).data("association"),r=t("#"+t(i).data("blueprint-id")),s=r.data("blueprint"),o=(t(i).closest(".fields").closestChild("input, textarea, select").eq(0).attr("name")||"").replace(new RegExp("[[a-z_]+]$"),"");if(o)for(var a=o.match(/[a-z_]+_attributes(?=\]\[(new_)?\d+\])/g)||[],l=o.match(/[0-9]+/g)||[],h=0;h0;)for(var n=i.shift(),r=n.children(),s=0;s=a&&l>n||l>=r&&r>a||a>n&&r>l}),a=l+1;var c=0;for(var h in o)if(o[h].selected){var d=o[h].start+c;e&&i.tabString==t.value.substring(d,d+i.tabString.length)?(t.value=t.value.substring(0,d)+t.value.substring(d+i.tabString.length),c-=i.tabString.length):e||(t.value=t.value.substring(0,d)+i.tabString+t.value.substring(d),c+=i.tabString.length)}t.focus();var u=n+(c>0?i.tabString.length:0>c?-i.tabString.length:0),p=r+c;t.setSelectionRange(u,p)}}function n(e,i,n){var r=document.selection.createRange();if(e==r.parentElement())if(""==r.text)if(i){var s=r.getBookmark();r.moveStart("character",-n.tabString.length),n.tabString==r.text?r.text="":(r.moveToBookmark(s),r.moveEnd("character",n.tabString.length),n.tabString==r.text&&(r.text="")),r.collapse(!0),r.select()}else r.text=n.tabString,r.collapse(!1),r.select();else{var o=r.text,a=o.length,l=o.split("\r\n"),h=document.body.createTextRange();h.moveToElementText(e),h.setEndPoint("EndToStart",r);var c=h.text,d=c.split("\r\n"),u=c.length,p=document.body.createTextRange();p.moveToElementText(e),p.setEndPoint("StartToEnd",r);var f=p.text,g=document.body.createTextRange();g.moveToElementText(e),g.setEndPoint("StartToEnd",h);var m=g.text,y=t(e).html();t("#r3").text(u+" + "+a+" + "+f.length+" = "+y.length),u+m.length0?x.setEndPoint("StartToEnd",h):x.setEndPoint("StartToStart",h),x.setEndPoint("EndToEnd",r),x.select()}}t.fn.tabby=function(i){var n=t.extend({},t.fn.tabby.defaults,i),r=t.fn.tabby.pressed;return this.each(function(){$this=t(this);var i=t.meta?t.extend({},n,$this.data()):n;$this.bind("keydown",function(n){var s=t.fn.tabby.catch_kc(n);return 16==s&&(r.shft=!0),17==s&&(r.ctrl=!0,setTimeout("$.fn.tabby.pressed.ctrl = false;",1e3)),18==s&&(r.alt=!0,setTimeout("$.fn.tabby.pressed.alt = false;",1e3)),9!=s||r.ctrl||r.alt?void 0:(n.preventDefault,r.last=s,setTimeout("$.fn.tabby.pressed.last = null;",0),e(t(n.target).get(0),r.shft,i),!1)}).bind("keyup",function(e){16==t.fn.tabby.catch_kc(e)&&(r.shft=!1)}).bind("blur",function(e){9==r.last&&t(e.target).one("focus",function(){r.last=null}).get(0).focus()})})},t.fn.tabby.catch_kc=function(t){return t.keyCode?t.keyCode:t.charCode?t.charCode:t.which},t.fn.tabby.pressed={shft:!1,ctrl:!1,alt:!1,last:null},t.fn.tabby.defaults={tabString:String.fromCharCode(9)}}(jQuery),function(t,e,i){var n={required:"The %s field is required.",matches:"The %s field does not match the %s field.",valid_email:"The %s field must contain a valid email address.",min_length:"The %s field must be at least %s characters in length.",max_length:"The %s field must not exceed %s characters in length.",exact_length:"The %s field must be exactly %s characters in length.",greater_than:"The %s field must contain a number greater than %s.",less_than:"The %s field must contain a number less than %s.",alpha:"The %s field must only contain alphabetical characters.",alpha_numeric:"The %s field must only contain alpha-numeric characters.",alpha_dash:"The %s field must only contain alpha-numeric characters, underscores, and dashes.",numeric:"The %s field must contain only numbers.",integer:"The %s field must contain an integer."},r=function(){},s=/^(.+)\[(.+)\]$/,o=/^[0-9]+$/,a=/^\-?[0-9]+$/,l=/^\-?[0-9]*\.?[0-9]+$/,h=/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,6}$/i,c=/^[a-z]+$/i,d=/^[a-z0-9]+$/i,u=/^[a-z0-9_-]+$/i,p=function(t,i,n){for(this.callback=n||r,this.errors=[],this.fields={},this.form=e.forms[t]||{},this.messages={},this.handlers={},t=0,n=i.length;n>t;t++){var s=i[t];s.name&&s.rules&&(this.fields[s.name]={name:s.name,display:s.display||s.name,rules:s.rules,type:null,value:null,checked:null})}this.form.onsubmit=function(t){return function(e){try{return t._validateForm(e)}catch(i){}}}(this)};p.prototype.setMessage=function(t,e){return this.messages[t]=e,this},p.prototype.registerCallback=function(t,e){return t&&"string"==typeof t&&e&&"function"==typeof e&&(this.handlers[t]=e),this},p.prototype._validateForm=function(t){this.errors=[];for(var e in this.fields)if(this.fields.hasOwnProperty(e)){var n=this.fields[e]||{},r=this.form[n.name];r&&r!==i&&(n.type=r.type,n.value=r.value,n.checked=r.checked),this._validateField(n)}if("function"==typeof this.callback&&this.callback(this.errors,t),this.errors.length>0){if(!t||!t.preventDefault)return!1;t.preventDefault()}return!0},p.prototype._validateField=function(t){var e=t.rules.split("|");if(-1!==t.rules.indexOf("required")||t.value&&""!==t.value&&t.value!==i)for(var r=0,o=e.length;o>r;r++){var a=e[r],l=null,h=!1;if((parts=s.exec(a))&&(a=parts[1],l=parts[2]),"function"==typeof this._hooks[a]?this._hooks[a].apply(this,[t,l])||(h=!0):"callback_"===a.substring(0,9)&&(a=a.substring(9,a.length),"function"==typeof this.handlers[a]&&this.handlers[a].apply(this,[t.value])===!1&&(h=!0)),h){(e=this.messages[a]||n[a])?(t=e.replace("%s",t.display),l&&(t=t.replace("%s",this.fields[l]?this.fields[l].display:l)),this.errors.push(t)):this.errors.push("An error has occurred with the "+t.display+" field.");break}}},p.prototype._hooks={required:function(t){var e=t.value;return"checkbox"===t.type?t.checked===!0:null!==e&&""!==e},matches:function(t,e){return(el=this.form[e])?t.value===el.value:!1},valid_email:function(t){return h.test(t.value)},min_length:function(t,e){return o.test(e)?t.value.length>=e:!1},max_length:function(t,e){return o.test(e)?t.value.length<=e:!1},exact_length:function(t,e){return o.test(e)?t.value.length==e:!1},greater_than:function(t,e){return l.test(t.value)?parseFloat(t.value)>parseFloat(e):!1},less_than:function(t,e){return l.test(t.value)?parseFloat(t.value)="0"&&"7">=i?parseInt(t.substring(1),8):"u"===i||"x"===i?parseInt(t.substring(2),16):t.charCodeAt(1)}function i(t){return 32>t?(16>t?"\\x0":"\\x")+t.toString(16):(t=String.fromCharCode(t),("\\"===t||"-"===t||"["===t||"]"===t)&&(t="\\"+t),t)}function n(t){for(var n=t.substring(1,t.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),t=[],r=[],s="^"===n[0],o=s?1:0,a=n.length;a>o;++o){var l=n[o];if(/\\[bdsw]/i.test(l))t.push(l);else{var h,l=e(l);a>o+2&&"-"===n[o+1]?(h=e(n[o+2]),o+=2):h=l,r.push([l,h]),65>h||l>122||(65>h||l>90||r.push([32|Math.max(65,l),32|Math.min(h,90)]),97>h||l>122||r.push([-33&Math.max(97,l),-33&Math.min(h,122)]))}}for(r.sort(function(t,e){return t[0]-e[0]||e[1]-t[1]}),n=[],l=[0/0,0/0],o=0;oa[0]&&(a[1]+1>a[0]&&r.push("-"),r.push(i(a[1])));return r.push("]"),r.join("")}function r(t){for(var e=t.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),i=e.length,r=[],a=0,l=0;i>a;++a){var h=e[a];"("===h?++l:"\\"===h.charAt(0)&&(h=+h.substring(1))&&l>=h&&(r[h]=-1)}for(a=1;aa;++a)h=e[a],"("===h?(++l,void 0===r[l]&&(e[a]="(?:")):"\\"===h.charAt(0)&&(h=+h.substring(1))&&l>=h&&(e[a]="\\"+r[l]);for(l=a=0;i>a;++a)"^"===e[a]&&"^"!==e[a+1]&&(e[a]="");if(t.ignoreCase&&o)for(a=0;i>a;++a)h=e[a],t=h.charAt(0),h.length>=2&&"["===t?e[a]=n(h):"\\"!==t&&(e[a]=h.replace(/[A-Za-z]/g,function(t){return t=t.charCodeAt(0),"["+String.fromCharCode(-33&t,32|t)+"]"}));return e.join("")}for(var s=0,o=!1,a=!1,l=0,h=t.length;h>l;++l){var c=t[l];if(c.ignoreCase)a=!0;else if(/[a-z]/i.test(c.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){o=!0,a=!1;break}}for(var d={b:8,t:9,n:10,v:11,f:12,r:13},u=[],l=0,h=t.length;h>l;++l){if(c=t[l],c.global||c.multiline)throw Error(""+c);u.push("(?:"+r(c)+")")}return RegExp(u.join("|"),a?"gi":"g")}function e(t){function e(t){switch(t.nodeType){case 1:if(n.test(t.className))break;for(var i=t.firstChild;i;i=i.nextSibling)e(i);i=t.nodeName,("BR"===i||"LI"===i)&&(r[a]="\n",o[a<<1]=s++,o[a++<<1|1]=t);break;case 3:case 4:i=t.nodeValue,i.length&&(i=l?i.replace(/\r\n?/g,"\n"):i.replace(/[\t\n\r ]+/g," "),r[a]=i,o[a<<1]=s,s+=i.length,o[a++<<1|1]=t)}}var i,n=/(?:^|\s)nocode(?:\s|$)/,r=[],s=0,o=[],a=0;t.currentStyle?i=t.currentStyle.whiteSpace:window.getComputedStyle&&(i=document.defaultView.getComputedStyle(t,q).getPropertyValue("white-space"));var l=i&&"pre"===i.substring(0,3);return e(t),{a:r.join("").replace(/\n$/,""),c:o}}function i(t,e,i,n){e&&(t={a:e,d:t},i(t),n.push.apply(n,t.e))}function n(e,n){function r(t){for(var e=t.d,h=[e,"pln"],c=0,d=t.a.match(s)||[],u={},p=0,f=d.length;f>p;++p){var g,m=d[p],y=u[m],v=void 0;if("string"==typeof y)g=!1;else{var x=o[m.charAt(0)];if(x)v=m.match(x[1]),y=x[0];else{for(g=0;l>g;++g)if(x=n[g],v=m.match(x[1])){y=x[0];break}v||(y="pln")}!(g=y.length>=5&&"lang-"===y.substring(0,5))||v&&"string"==typeof v[1]||(g=!1,y="src"),g||(u[m]=y)}if(x=c,c+=m.length,g){g=v[1];var b=m.indexOf(g),w=b+g.length;v[2]&&(w=m.length-v[2].length,b=w-g.length),y=y.substring(5),i(e+x,m.substring(0,b),r,h),i(e+x+b,g,a(y,g),h),i(e+x+w,m.substring(w),r,h)}else h.push(e+x,y)}t.e=h}var s,o={};!function(){for(var i=e.concat(n),r=[],a={},l=0,h=i.length;h>l;++l){var c=i[l],d=c[3];if(d)for(var u=d.length;--u>=0;)o[d.charAt(u)]=c;c=c[1],d=""+c,a.hasOwnProperty(d)||(r.push(c),a[d]=q)}r.push(/[\S\s]/),s=t(r)}();var l=n.length;return r}function r(t){var e=[],i=[];t.tripleQuotedStrings?e.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):t.multiLineStrings?e.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,q,"'\"`"]):e.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]),t.verbatimStrings&&i.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var r=t.hashComments;return r&&(t.cStyleComments?(r>1?e.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):e.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),i.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):e.push(["com",/^#[^\n\r]*/,q,"#"])),t.cStyleComments&&(i.push(["com",/^\/\/[^\n\r]*/,q]),i.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q])),t.regexLiterals&&i.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]),(r=t.types)&&i.push(["typ",r]),t=(""+t.keywords).replace(/^ | $/g,""),t.length&&i.push(["kwd",RegExp("^(?:"+t.replace(/[\s,]+/g,"|")+")\\b"),q]),e.push(["pln",/^\s+/,q," \r\n "]),i.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]),n(e,i)}function s(t,e){function i(t){switch(t.nodeType){case 1:if(s.test(t.className))break;if("BR"===t.nodeName)n(t),t.parentNode&&t.parentNode.removeChild(t);else for(t=t.firstChild;t;t=t.nextSibling)i(t);break;case 3:case 4:if(l){var e=t.nodeValue,r=e.match(o);if(r){var h=e.substring(0,r.index);t.nodeValue=h,(e=e.substring(r.index+r[0].length))&&t.parentNode.insertBefore(a.createTextNode(e),t.nextSibling),n(t),h||t.parentNode.removeChild(t)}}}}function n(t){function e(t,i){var n=i?t.cloneNode(!1):t,r=t.parentNode;if(r){var r=e(r,1),s=t.nextSibling;r.appendChild(n);for(var o=s;o;o=s)s=o.nextSibling,r.appendChild(o)}return n}for(;!t.nextSibling;)if(t=t.parentNode,!t)return;for(var i,t=e(t.nextSibling,0);(i=t.parentNode)&&1===i.nodeType;)t=i;h.push(t)}var r,s=/(?:^|\s)nocode(?:\s|$)/,o=/\r\n?|\n/,a=t.ownerDocument;t.currentStyle?r=t.currentStyle.whiteSpace:window.getComputedStyle&&(r=a.defaultView.getComputedStyle(t,q).getPropertyValue("white-space"));var l=r&&"pre"===r.substring(0,3);for(r=a.createElement("LI");t.firstChild;)r.appendChild(t.firstChild);for(var h=[r],c=0;cc;++c)r=h[c],r.className="L"+(c+u)%10,r.firstChild||r.appendChild(a.createTextNode(" ")),d.appendChild(r);t.appendChild(d)}function o(t,e){for(var i=e.length;--i>=0;){var n=e[i];x.hasOwnProperty(n)?window.console&&console.warn("cannot override language handler %s",n):x[n]=t}}function a(t,e){return t&&x.hasOwnProperty(t)||(t=/^\s*f;)d[f]!==d[f+2]?(d[p++]=d[f++],d[p++]=d[f++]):f+=2;for(u=p,f=p=0;u>f;){for(var g=d[f],m=d[f+1],y=f+2;u>=y+2&&d[y+1]===m;)y+=2;d[p++]=g,d[p++]=m,f=y}for(d.length=p;c>r;){var v,x=h[r+2]||l,b=d[t+2]||l,y=Math.min(x,b),w=h[r+1];if(1!==w.nodeType&&(v=o.substring(n,y))){s&&(v=v.replace(i,"\r")),w.nodeValue=v;var k=w.ownerDocument,S=k.createElement("SPAN");S.className=d[t+1];var T=w.parentNode;T.replaceChild(S,w),S.appendChild(w),x>n&&(h[r+1]=w=k.createTextNode(o.substring(y,x)),T.insertBefore(w,S.nextSibling))}n=y,n>=x&&(r+=2),n>=b&&(t+=2)}}catch(C){"console"in window&&console.log(C&&C.stack?C.stack:C)}}var h=["break,continue,do,else,for,if,return,while"],c=[[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],d=[c,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],u=[c,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],p=[u,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],c=[c,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],f=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],g=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],h=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],m=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,y=/\S/,v=r({keywords:[d,p,c,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+f,g,h],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),x={};o(v,["default-code"]),o(n([],[["pln",/^[^]+/],["dec",/^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^