/*!
 * jQuery JavaScript Library v1.12.0
 * http://jquery.com/
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2016-01-08T19:56Z
 */
!function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function n(t){var e=!!t&&"length"in t&&t.length,n=ft.type(t);return"function"===n||ft.isWindow(t)?!1:"array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t}function i(t,e,n){if(ft.isFunction(e))return ft.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return ft.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(Ct.test(e))return ft.filter(e,t,n);e=ft.filter(e,t)}return ft.grep(t,function(t){return ft.inArray(t,e)>-1!==n})}function r(t,e){do t=t[e];while(t&&1!==t.nodeType);return t}function o(t){var e={};return ft.each(t.match(Et)||[],function(t,n){e[n]=!0}),e}function s(){it.addEventListener?(it.removeEventListener("DOMContentLoaded",a),t.removeEventListener("load",a)):(it.detachEvent("onreadystatechange",a),t.detachEvent("onload",a))}function a(){(it.addEventListener||"load"===t.event.type||"complete"===it.readyState)&&(s(),ft.ready())}function l(t,e,n){if(void 0===n&&1===t.nodeType){var i="data-"+e.replace($t,"-$1").toLowerCase();if(n=t.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:It.test(n)?ft.parseJSON(n):n}catch(r){}ft.data(t,e,n)}else n=void 0}return n}function u(t){var e;for(e in t)if(("data"!==e||!ft.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function c(t,e,n,i){if(jt(t)){var r,o,s=ft.expando,a=t.nodeType,l=a?ft.cache:t,u=a?t[s]:t[s]&&s;if(u&&l[u]&&(i||l[u].data)||void 0!==n||"string"!=typeof e)return u||(u=a?t[s]=nt.pop()||ft.guid++:s),l[u]||(l[u]=a?{}:{toJSON:ft.noop}),("object"==typeof e||"function"==typeof e)&&(i?l[u]=ft.extend(l[u],e):l[u].data=ft.extend(l[u].data,e)),o=l[u],i||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[ft.camelCase(e)]=n),"string"==typeof e?(r=o[e],null==r&&(r=o[ft.camelCase(e)])):r=o,r}}function h(t,e,n){if(jt(t)){var i,r,o=t.nodeType,s=o?ft.cache:t,a=o?t[ft.expando]:ft.expando;if(s[a]){if(e&&(i=n?s[a]:s[a].data)){ft.isArray(e)?e=e.concat(ft.map(e,ft.camelCase)):e in i?e=[e]:(e=ft.camelCase(e),e=e in i?[e]:e.split(" ")),r=e.length;for(;r--;)delete i[e[r]];if(n?!u(i):!ft.isEmptyObject(i))return}(n||(delete s[a].data,u(s[a])))&&(o?ft.cleanData([t],!0):ht.deleteExpando||s!=s.window?delete s[a]:s[a]=void 0)}}}function d(t,e,n,i){var r,o=1,s=20,a=i?function(){return i.cur()}:function(){return ft.css(t,e,"")},l=a(),u=n&&n[3]||(ft.cssNumber[e]?"":"px"),c=(ft.cssNumber[e]||"px"!==u&&+l)&&Ht.exec(ft.css(t,e));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do o=o||".5",c/=o,ft.style(t,e,c+u);while(o!==(o=a()/l)&&1!==o&&--s)}return n&&(c=+c||+l||0,r=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=c,i.end=r)),r}function f(t){var e=Bt.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}function p(t,e){var n,i,r=0,o="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):void 0;if(!o)for(o=[],n=t.childNodes||t;null!=(i=n[r]);r++)!e||ft.nodeName(i,e)?o.push(i):ft.merge(o,p(i,e));return void 0===e||e&&ft.nodeName(t,e)?ft.merge([t],o):o}function g(t,e){for(var n,i=0;null!=(n=t[i]);i++)ft._data(n,"globalEval",!e||ft._data(e[i],"globalEval"))}function m(t){Ot.test(t.type)&&(t.defaultChecked=t.checked)}function v(t,e,n,i,r){for(var o,s,a,l,u,c,h,d=t.length,v=f(e),y=[],b=0;d>b;b++)if(s=t[b],s||0===s)if("object"===ft.type(s))ft.merge(y,s.nodeType?[s]:s);else if(Yt.test(s)){for(l=l||v.appendChild(e.createElement("div")),u=(Rt.exec(s)||["",""])[1].toLowerCase(),h=Ut[u]||Ut._default,l.innerHTML=h[1]+ft.htmlPrefilter(s)+h[2],o=h[0];o--;)l=l.lastChild;if(!ht.leadingWhitespace&&Wt.test(s)&&y.push(e.createTextNode(Wt.exec(s)[0])),!ht.tbody)for(s="table"!==u||Xt.test(s)?"<table>"!==h[1]||Xt.test(s)?0:l:l.firstChild,o=s&&s.childNodes.length;o--;)ft.nodeName(c=s.childNodes[o],"tbody")&&!c.childNodes.length&&s.removeChild(c);for(ft.merge(y,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=v.lastChild}else y.push(e.createTextNode(s));for(l&&v.removeChild(l),ht.appendChecked||ft.grep(p(y,"input"),m),b=0;s=y[b++];)if(i&&ft.inArray(s,i)>-1)r&&r.push(s);else if(a=ft.contains(s.ownerDocument,s),l=p(v.appendChild(s),"script"),a&&g(l),n)for(o=0;s=l[o++];)qt.test(s.type||"")&&n.push(s);return l=null,v}function y(){return!0}function b(){return!1}function _(){try{return it.activeElement}catch(t){}}function x(t,e,n,i,r,o){var s,a;if("object"==typeof e){"string"!=typeof n&&(i=i||n,n=void 0);for(a in e)x(t,a,n,i,e[a],o);return t}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),r===!1)r=b;else if(!r)return t;return 1===o&&(s=r,r=function(t){return ft().off(t),s.apply(this,arguments)},r.guid=s.guid||(s.guid=ft.guid++)),t.each(function(){ft.event.add(this,e,r,i,n)})}function w(t,e){return ft.nodeName(t,"table")&&ft.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function C(t){return t.type=(null!==ft.find.attr(t,"type"))+"/"+t.type,t}function k(t){var e=re.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function T(t,e){if(1===e.nodeType&&ft.hasData(t)){var n,i,r,o=ft._data(t),s=ft._data(e,o),a=o.events;if(a){delete s.handle,s.events={};for(n in a)for(i=0,r=a[n].length;r>i;i++)ft.event.add(e,n,a[n][i])}s.data&&(s.data=ft.extend({},s.data))}}function D(t,e){var n,i,r;if(1===e.nodeType){if(n=e.nodeName.toLowerCase(),!ht.noCloneEvent&&e[ft.expando]){r=ft._data(e);for(i in r.events)ft.removeEvent(e,i,r.handle);e.removeAttribute(ft.expando)}"script"===n&&e.text!==t.text?(C(e).text=t.text,k(e)):"object"===n?(e.parentNode&&(e.outerHTML=t.outerHTML),ht.html5Clone&&t.innerHTML&&!ft.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===n&&Ot.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===n?e.defaultSelected=e.selected=t.defaultSelected:("input"===n||"textarea"===n)&&(e.defaultValue=t.defaultValue)}}function M(t,e,n,i){e=ot.apply([],e);var r,o,s,a,l,u,c=0,h=t.length,d=h-1,f=e[0],g=ft.isFunction(f);if(g||h>1&&"string"==typeof f&&!ht.checkClone&&ie.test(f))return t.each(function(r){var o=t.eq(r);g&&(e[0]=f.call(this,r,o.html())),M(o,e,n,i)});if(h&&(u=v(e,t[0].ownerDocument,!1,t,i),r=u.firstChild,1===u.childNodes.length&&(u=r),r||i)){for(a=ft.map(p(u,"script"),C),s=a.length;h>c;c++)o=u,c!==d&&(o=ft.clone(o,!0,!0),s&&ft.merge(a,p(o,"script"))),n.call(t[c],o,c);if(s)for(l=a[a.length-1].ownerDocument,ft.map(a,k),c=0;s>c;c++)o=a[c],qt.test(o.type||"")&&!ft._data(o,"globalEval")&&ft.contains(l,o)&&(o.src?ft._evalUrl&&ft._evalUrl(o.src):ft.globalEval((o.text||o.textContent||o.innerHTML||"").replace(oe,"")));u=r=null}return t}function S(t,e,n){for(var i,r=e?ft.filter(e,t):t,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||ft.cleanData(p(i)),i.parentNode&&(n&&ft.contains(i.ownerDocument,i)&&g(p(i,"script")),i.parentNode.removeChild(i));return t}function E(t,e){var n=ft(e.createElement(t)).appendTo(e.body),i=ft.css(n[0],"display");return n.detach(),i}function N(t){var e=it,n=ue[t];return n||(n=E(t,e),"none"!==n&&n||(le=(le||ft("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=(le[0].contentWindow||le[0].contentDocument).document,e.write(),e.close(),n=E(t,e),le.detach()),ue[t]=n),n}function A(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function j(t){if(t in ke)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=Ce.length;n--;)if(t=Ce[n]+e,t in ke)return t}function I(t,e){for(var n,i,r,o=[],s=0,a=t.length;a>s;s++)i=t[s],i.style&&(o[s]=ft._data(i,"olddisplay"),n=i.style.display,e?(o[s]||"none"!==n||(i.style.display=""),""===i.style.display&&Lt(i)&&(o[s]=ft._data(i,"olddisplay",N(i.nodeName)))):(r=Lt(i),(n&&"none"!==n||!r)&&ft._data(i,"olddisplay",r?n:ft.css(i,"display"))));for(s=0;a>s;s++)i=t[s],i.style&&(e&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=e?o[s]||"":"none"));return t}function $(t,e,n){var i=_e.exec(e);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):e}function P(t,e,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===e?1:0,s=0;4>o;o+=2)"margin"===n&&(s+=ft.css(t,n+Ft[o],!0,r)),i?("content"===n&&(s-=ft.css(t,"padding"+Ft[o],!0,r)),"margin"!==n&&(s-=ft.css(t,"border"+Ft[o]+"Width",!0,r))):(s+=ft.css(t,"padding"+Ft[o],!0,r),"padding"!==n&&(s+=ft.css(t,"border"+Ft[o]+"Width",!0,r)));return s}function H(e,n,i){var r=!0,o="width"===n?e.offsetWidth:e.offsetHeight,s=pe(e),a=ht.boxSizing&&"border-box"===ft.css(e,"boxSizing",!1,s);if(it.msFullscreenElement&&t.top!==t&&e.getClientRects().length&&(o=Math.round(100*e.getBoundingClientRect()[n])),0>=o||null==o){if(o=ge(e,n,s),(0>o||null==o)&&(o=e.style[n]),he.test(o))return o;r=a&&(ht.boxSizingReliable()||o===e.style[n]),o=parseFloat(o)||0}return o+P(e,n,i||(a?"border":"content"),r,s)+"px"}function F(t,e,n,i,r){return new F.prototype.init(t,e,n,i,r)}function L(){return t.setTimeout(function(){Te=void 0}),Te=ft.now()}function z(t,e){var n,i={height:t},r=0;for(e=e?1:0;4>r;r+=2-e)n=Ft[r],i["margin"+n]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function O(t,e,n){for(var i,r=(W.tweeners[e]||[]).concat(W.tweeners["*"]),o=0,s=r.length;s>o;o++)if(i=r[o].call(n,e,t))return i}function R(t,e,n){var i,r,o,s,a,l,u,c,h=this,d={},f=t.style,p=t.nodeType&&Lt(t),g=ft._data(t,"fxshow");n.queue||(a=ft._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--,ft.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],u=ft.css(t,"display"),c="none"===u?ft._data(t,"olddisplay")||N(t.nodeName):u,"inline"===c&&"none"===ft.css(t,"float")&&(ht.inlineBlockNeedsLayout&&"inline"!==N(t.nodeName)?f.zoom=1:f.display="inline-block")),n.overflow&&(f.overflow="hidden",ht.shrinkWrapBlocks()||h.always(function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}));for(i in e)if(r=e[i],Me.exec(r)){if(delete e[i],o=o||"toggle"===r,r===(p?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;p=!0}d[i]=g&&g[i]||ft.style(t,i)}else u=void 0;if(ft.isEmptyObject(d))"inline"===("none"===u?N(t.nodeName):u)&&(f.display=u);else{g?"hidden"in g&&(p=g.hidden):g=ft._data(t,"fxshow",{}),o&&(g.hidden=!p),p?ft(t).show():h.done(function(){ft(t).hide()}),h.done(function(){var e;ft._removeData(t,"fxshow");for(e in d)ft.style(t,e,d[e])});for(i in d)s=O(p?g[i]:0,i,h),i in g||(g[i]=s.start,p&&(s.end=s.start,s.start="width"===i||"height"===i?1:0))}}function q(t,e){var n,i,r,o,s;for(n in t)if(i=ft.camelCase(n),r=e[i],o=t[n],ft.isArray(o)&&(r=o[1],o=t[n]=o[0]),n!==i&&(t[i]=o,delete t[n]),s=ft.cssHooks[i],s&&"expand"in s){o=s.expand(o),delete t[i];for(n in o)n in t||(t[n]=o[n],e[n]=r)}else e[i]=r}function W(t,e,n){var i,r,o=0,s=W.prefilters.length,a=ft.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var e=Te||L(),n=Math.max(0,u.startTime+u.duration-e),i=n/u.duration||0,o=1-i,s=0,l=u.tweens.length;l>s;s++)u.tweens[s].run(o);return a.notifyWith(t,[u,o,n]),1>o&&l?n:(a.resolveWith(t,[u]),!1)},u=a.promise({elem:t,props:ft.extend({},e),opts:ft.extend(!0,{specialEasing:{},easing:ft.easing._default},n),originalProperties:e,originalOptions:n,startTime:Te||L(),duration:n.duration,tweens:[],createTween:function(e,n){var i=ft.Tween(t,u.opts,e,n,u.opts.specialEasing[e]||u.opts.easing);return u.tweens.push(i),i},stop:function(e){var n=0,i=e?u.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)u.tweens[n].run(1);return e?(a.notifyWith(t,[u,1,0]),a.resolveWith(t,[u,e])):a.rejectWith(t,[u,e]),this}}),c=u.props;for(q(c,u.opts.specialEasing);s>o;o++)if(i=W.prefilters[o].call(u,t,c,u.opts))return ft.isFunction(i.stop)&&(ft._queueHooks(u.elem,u.opts.queue).stop=ft.proxy(i.stop,i)),i;return ft.map(c,O,u),ft.isFunction(u.opts.start)&&u.opts.start.call(t,u),ft.fx.timer(ft.extend(l,{elem:t,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function B(t){return ft.attr(t,"class")||""}function U(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,r=0,o=e.toLowerCase().match(Et)||[];if(ft.isFunction(n))for(;i=o[r++];)"+"===i.charAt(0)?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function Y(t,e,n,i){function r(a){var l;return o[a]=!0,ft.each(t[a]||[],function(t,a){var u=a(e,n,i);return"string"!=typeof u||s||o[u]?s?!(l=u):void 0:(e.dataTypes.unshift(u),r(u),!1)}),l}var o={},s=t===Ge;return r(e.dataTypes[0])||!o["*"]&&r("*")}function X(t,e){var n,i,r=ft.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((r[i]?t:n||(n={}))[i]=e[i]);return n&&ft.extend(!0,t,n),t}function V(t,e,n){for(var i,r,o,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(s in a)if(a[s]&&a[s].test(r)){l.unshift(s);break}if(l[0]in n)o=l[0];else{for(s in n){if(!l[0]||t.converters[s+" "+l[0]]){o=s;break}i||(i=s)}o=o||i}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function Q(t,e,n,i){var r,o,s,a,l,u={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)u[s.toLowerCase()]=t.converters[s];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(s=u[l+" "+o]||u["* "+o],!s)for(r in u)if(a=r.split(" "),a[1]===o&&(s=u[l+" "+a[0]]||u["* "+a[0]])){s===!0?s=u[r]:u[r]!==!0&&(o=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&t["throws"])e=s(e);else try{e=s(e)}catch(h){return{state:"parsererror",error:s?h:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}function K(t){return t.style&&t.style.display||ft.css(t,"display")}function G(t){for(;t&&1===t.nodeType;){if("none"===K(t)||"hidden"===t.type)return!0;t=t.parentNode}return!1}function Z(t,e,n,i){var r;if(ft.isArray(e))ft.each(e,function(e,r){n||nn.test(t)?i(t,r):Z(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,n,i)});else if(n||"object"!==ft.type(e))i(t,e);else for(r in e)Z(t+"["+r+"]",e[r],n,i)}function J(){try{return new t.XMLHttpRequest}catch(e){}}function tt(){try{return new t.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function et(t){return ft.isWindow(t)?t:9===t.nodeType?t.defaultView||t.parentWindow:!1}var nt=[],it=t.document,rt=nt.slice,ot=nt.concat,st=nt.push,at=nt.indexOf,lt={},ut=lt.toString,ct=lt.hasOwnProperty,ht={},dt="1.12.0",ft=function(t,e){return new ft.fn.init(t,e)},pt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,gt=/^-ms-/,mt=/-([\da-z])/gi,vt=function(t,e){return e.toUpperCase()};ft.fn=ft.prototype={jquery:dt,constructor:ft,selector:"",length:0,toArray:function(){return rt.call(this)},get:function(t){return null!=t?0>t?this[t+this.length]:this[t]:rt.call(this)},pushStack:function(t){var e=ft.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t){return ft.each(this,t)},map:function(t){return this.pushStack(ft.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(rt.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(0>t?e:0);return this.pushStack(n>=0&&e>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:st,sort:nt.sort,splice:nt.splice},ft.extend=ft.fn.extend=function(){var t,e,n,i,r,o,s=arguments[0]||{},a=1,l=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[a]||{},a++),"object"==typeof s||ft.isFunction(s)||(s={}),a===l&&(s=this,a--);l>a;a++)if(null!=(r=arguments[a]))for(i in r)t=s[i],n=r[i],s!==n&&(u&&n&&(ft.isPlainObject(n)||(e=ft.isArray(n)))?(e?(e=!1,o=t&&ft.isArray(t)?t:[]):o=t&&ft.isPlainObject(t)?t:{},s[i]=ft.extend(u,o,n)):void 0!==n&&(s[i]=n));return s},ft.extend({expando:"jQuery"+(dt+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===ft.type(t)},isArray:Array.isArray||function(t){return"array"===ft.type(t)},isWindow:function(t){return null!=t&&t==t.window},isNumeric:function(t){var e=t&&t.toString();return!ft.isArray(t)&&e-parseFloat(e)+1>=0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},isPlainObject:function(t){var e;if(!t||"object"!==ft.type(t)||t.nodeType||ft.isWindow(t))return!1;try{if(t.constructor&&!ct.call(t,"constructor")&&!ct.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!ht.ownFirst)for(e in t)return ct.call(t,e);for(e in t);return void 0===e||ct.call(t,e)},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?lt[ut.call(t)]||"object":typeof t},globalEval:function(e){e&&ft.trim(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(t){return t.replace(gt,"ms-").replace(mt,vt)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var i,r=0;if(n(t))for(i=t.length;i>r&&e.call(t[r],r,t[r])!==!1;r++);else for(r in t)if(e.call(t[r],r,t[r])===!1)break;return t},trim:function(t){return null==t?"":(t+"").replace(pt,"")},makeArray:function(t,e){var i=e||[];return null!=t&&(n(Object(t))?ft.merge(i,"string"==typeof t?[t]:t):st.call(i,t)),i},inArray:function(t,e,n){var i;if(e){if(at)return at.call(e,t,n);for(i=e.length,n=n?0>n?Math.max(0,i+n):n:0;i>n;n++)if(n in e&&e[n]===t)return n}return-1},merge:function(t,e){for(var n=+e.length,i=0,r=t.length;n>i;)t[r++]=e[i++];if(n!==n)for(;void 0!==e[i];)t[r++]=e[i++];return t.length=r,t},grep:function(t,e,n){for(var i,r=[],o=0,s=t.length,a=!n;s>o;o++)i=!e(t[o],o),i!==a&&r.push(t[o]);return r},map:function(t,e,i){var r,o,s=0,a=[];if(n(t))for(r=t.length;r>s;s++)o=e(t[s],s,i),null!=o&&a.push(o);else for(s in t)o=e(t[s],s,i),null!=o&&a.push(o);return ot.apply([],a)},guid:1,proxy:function(t,e){var n,i,r;return"string"==typeof e&&(r=t[e],e=t,t=r),ft.isFunction(t)?(n=rt.call(arguments,2),i=function(){return t.apply(e||this,n.concat(rt.call(arguments)))},i.guid=t.guid=t.guid||ft.guid++,i):void 0},now:function(){return+new Date},support:ht}),"function"==typeof Symbol&&(ft.fn[Symbol.iterator]=nt[Symbol.iterator]),ft.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){lt["[object "+e+"]"]=e.toLowerCase()});var yt=/*!
 * Sizzle CSS Selector Engine v2.2.1
 * http://sizzlejs.com/
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2015-10-17
 */
function(t){function e(t,e,n,i){var r,o,s,a,l,u,h,f,p=e&&e.ownerDocument,g=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==g&&9!==g&&11!==g)return n;if(!i&&((e?e.ownerDocument||e:O)!==j&&A(e),e=e||j,$)){if(11!==g&&(u=vt.exec(t)))if(r=u[1]){if(9===g){if(!(s=e.getElementById(r)))return n;if(s.id===r)return n.push(s),n}else if(p&&(s=p.getElementById(r))&&L(e,s)&&s.id===r)return n.push(s),n}else{if(u[2])return Z.apply(n,e.getElementsByTagName(t)),n;if((r=u[3])&&x.getElementsByClassName&&e.getElementsByClassName)return Z.apply(n,e.getElementsByClassName(r)),n}if(x.qsa&&!U[t+" "]&&(!P||!P.test(t))){if(1!==g)p=e,f=t;else if("object"!==e.nodeName.toLowerCase()){for((a=e.getAttribute("id"))?a=a.replace(bt,"\\$&"):e.setAttribute("id",a=z),h=T(t),o=h.length,l=dt.test(a)?"#"+a:"[id='"+a+"']";o--;)h[o]=l+" "+d(h[o]);f=h.join(","),p=yt.test(t)&&c(e.parentNode)||e}if(f)try{return Z.apply(n,p.querySelectorAll(f)),n}catch(m){}finally{a===z&&e.removeAttribute("id")}}}return M(t.replace(at,"$1"),e,n,i)}function n(){function t(n,i){return e.push(n+" ")>w.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[z]=!0,t}function r(t){var e=j.createElement("div");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var n=t.split("|"),i=n.length;i--;)w.attrHandle[n[i]]=e}function s(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||X)-(~t.sourceIndex||X);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function a(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function l(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function u(t){return i(function(e){return e=+e,i(function(n,i){for(var r,o=t([],n.length,e),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))})})}function c(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function h(){}function d(t){for(var e=0,n=t.length,i="";n>e;e++)i+=t[e].value;return i}function f(t,e,n){var i=e.dir,r=n&&"parentNode"===i,o=q++;return e.first?function(e,n,o){for(;e=e[i];)if(1===e.nodeType||r)return t(e,n,o)}:function(e,n,s){var a,l,u,c=[R,o];if(s){for(;e=e[i];)if((1===e.nodeType||r)&&t(e,n,s))return!0}else for(;e=e[i];)if(1===e.nodeType||r){if(u=e[z]||(e[z]={}),l=u[e.uniqueID]||(u[e.uniqueID]={}),(a=l[i])&&a[0]===R&&a[1]===o)return c[2]=a[2];if(l[i]=c,c[2]=t(e,n,s))return!0}}}function p(t){return t.length>1?function(e,n,i){for(var r=t.length;r--;)if(!t[r](e,n,i))return!1;return!0}:t[0]}function g(t,n,i){for(var r=0,o=n.length;o>r;r++)e(t,n[r],i);return i}function m(t,e,n,i,r){for(var o,s=[],a=0,l=t.length,u=null!=e;l>a;a++)(o=t[a])&&(!n||n(o,i,r))&&(s.push(o),u&&e.push(a));return s}function v(t,e,n,r,o,s){return r&&!r[z]&&(r=v(r)),o&&!o[z]&&(o=v(o,s)),i(function(i,s,a,l){var u,c,h,d=[],f=[],p=s.length,v=i||g(e||"*",a.nodeType?[a]:a,[]),y=!t||!i&&e?v:m(v,d,t,a,l),b=n?o||(i?t:p||r)?[]:s:y;if(n&&n(y,b,a,l),r)for(u=m(b,f),r(u,[],a,l),c=u.length;c--;)(h=u[c])&&(b[f[c]]=!(y[f[c]]=h));if(i){if(o||t){if(o){for(u=[],c=b.length;c--;)(h=b[c])&&u.push(y[c]=h);o(null,b=[],u,l)}for(c=b.length;c--;)(h=b[c])&&(u=o?tt(i,h):d[c])>-1&&(i[u]=!(s[u]=h))}}else b=m(b===s?b.splice(p,b.length):b),o?o(null,s,b,l):Z.apply(s,b)})}function y(t){for(var e,n,i,r=t.length,o=w.relative[t[0].type],s=o||w.relative[" "],a=o?1:0,l=f(function(t){return t===e},s,!0),u=f(function(t){return tt(e,t)>-1},s,!0),c=[function(t,n,i){var r=!o&&(i||n!==S)||((e=n).nodeType?l(t,n,i):u(t,n,i));return e=null,r}];r>a;a++)if(n=w.relative[t[a].type])c=[f(p(c),n)];else{if(n=w.filter[t[a].type].apply(null,t[a].matches),n[z]){for(i=++a;r>i&&!w.relative[t[i].type];i++);return v(a>1&&p(c),a>1&&d(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(at,"$1"),n,i>a&&y(t.slice(a,i)),r>i&&y(t=t.slice(i)),r>i&&d(t))}c.push(n)}return p(c)}function b(t,n){var r=n.length>0,o=t.length>0,s=function(i,s,a,l,u){var c,h,d,f=0,p="0",g=i&&[],v=[],y=S,b=i||o&&w.find.TAG("*",u),_=R+=null==y?1:Math.random()||.1,x=b.length;for(u&&(S=s===j||s||u);p!==x&&null!=(c=b[p]);p++){if(o&&c){for(h=0,s||c.ownerDocument===j||(A(c),a=!$);d=t[h++];)if(d(c,s||j,a)){l.push(c);break}u&&(R=_)}r&&((c=!d&&c)&&f--,i&&g.push(c))}if(f+=p,r&&p!==f){for(h=0;d=n[h++];)d(g,v,s,a);if(i){if(f>0)for(;p--;)g[p]||v[p]||(v[p]=K.call(l));v=m(v)}Z.apply(l,v),u&&!i&&v.length>0&&f+n.length>1&&e.uniqueSort(l)}return u&&(R=_,S=y),g};return r?i(s):s}var _,x,w,C,k,T,D,M,S,E,N,A,j,I,$,P,H,F,L,z="sizzle"+1*new Date,O=t.document,R=0,q=0,W=n(),B=n(),U=n(),Y=function(t,e){return t===e&&(N=!0),0},X=1<<31,V={}.hasOwnProperty,Q=[],K=Q.pop,G=Q.push,Z=Q.push,J=Q.slice,tt=function(t,e){for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return n;return-1},et="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",nt="[\\x20\\t\\r\\n\\f]",it="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",rt="\\["+nt+"*("+it+")(?:"+nt+"*([*^$|!~]?=)"+nt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+it+"))|)"+nt+"*\\]",ot=":("+it+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+rt+")*)|.*)\\)|)",st=new RegExp(nt+"+","g"),at=new RegExp("^"+nt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nt+"+$","g"),lt=new RegExp("^"+nt+"*,"+nt+"*"),ut=new RegExp("^"+nt+"*([>+~]|"+nt+")"+nt+"*"),ct=new RegExp("="+nt+"*([^\\]'\"]*?)"+nt+"*\\]","g"),ht=new RegExp(ot),dt=new RegExp("^"+it+"$"),ft={ID:new RegExp("^#("+it+")"),CLASS:new RegExp("^\\.("+it+")"),TAG:new RegExp("^("+it+"|[*])"),ATTR:new RegExp("^"+rt),PSEUDO:new RegExp("^"+ot),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},pt=/^(?:input|select|textarea|button)$/i,gt=/^h\d$/i,mt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,bt=/'|\\/g,_t=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),xt=function(t,e,n){var i="0x"+e-65536;return i!==i||n?e:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},wt=function(){A()};try{Z.apply(Q=J.call(O.childNodes),O.childNodes),Q[O.childNodes.length].nodeType}catch(Ct){Z={apply:Q.length?function(t,e){G.apply(t,J.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}x=e.support={},k=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return e?"HTML"!==e.nodeName:!1},A=e.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:O;return i!==j&&9===i.nodeType&&i.documentElement?(j=i,I=j.documentElement,$=!k(j),(n=j.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",wt,!1):n.attachEvent&&n.attachEvent("onunload",wt)),x.attributes=r(function(t){return t.className="i",!t.getAttribute("className")}),x.getElementsByTagName=r(function(t){return t.appendChild(j.createComment("")),!t.getElementsByTagName("*").length}),x.getElementsByClassName=mt.test(j.getElementsByClassName),x.getById=r(function(t){return I.appendChild(t).id=z,!j.getElementsByName||!j.getElementsByName(z).length}),x.getById?(w.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&$){var n=e.getElementById(t);return n?[n]:[]}},w.filter.ID=function(t){var e=t.replace(_t,xt);return function(t){return t.getAttribute("id")===e}}):(delete w.find.ID,w.filter.ID=function(t){var e=t.replace(_t,xt);return function(t){var n="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}}),w.find.TAG=x.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):x.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},w.find.CLASS=x.getElementsByClassName&&function(t,e){return"undefined"!=typeof e.getElementsByClassName&&$?e.getElementsByClassName(t):void 0},H=[],P=[],(x.qsa=mt.test(j.querySelectorAll))&&(r(function(t){I.appendChild(t).innerHTML="<a id='"+z+"'></a><select id='"+z+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+nt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||P.push("\\["+nt+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+z+"-]").length||P.push("~="),t.querySelectorAll(":checked").length||P.push(":checked"),t.querySelectorAll("a#"+z+"+*").length||P.push(".#.+[+~]")}),r(function(t){var e=j.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&P.push("name"+nt+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),P.push(",.*:")})),(x.matchesSelector=mt.test(F=I.matches||I.webkitMatchesSelector||I.mozMatchesSelector||I.oMatchesSelector||I.msMatchesSelector))&&r(function(t){x.disconnectedMatch=F.call(t,"div"),F.call(t,"[s!='']:x"),H.push("!=",ot)}),P=P.length&&new RegExp(P.join("|")),H=H.length&&new RegExp(H.join("|")),e=mt.test(I.compareDocumentPosition),L=e||mt.test(I.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},Y=e?function(t,e){if(t===e)return N=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n?n:(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!x.sortDetached&&e.compareDocumentPosition(t)===n?t===j||t.ownerDocument===O&&L(O,t)?-1:e===j||e.ownerDocument===O&&L(O,e)?1:E?tt(E,t)-tt(E,e):0:4&n?-1:1)}:function(t,e){if(t===e)return N=!0,0;var n,i=0,r=t.parentNode,o=e.parentNode,a=[t],l=[e];if(!r||!o)return t===j?-1:e===j?1:r?-1:o?1:E?tt(E,t)-tt(E,e):0;if(r===o)return s(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)l.unshift(n);for(;a[i]===l[i];)i++;return i?s(a[i],l[i]):a[i]===O?-1:l[i]===O?1:0},j):j},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==j&&A(t),n=n.replace(ct,"='$1']"),x.matchesSelector&&$&&!U[n+" "]&&(!H||!H.test(n))&&(!P||!P.test(n)))try{var i=F.call(t,n);if(i||x.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(r){}return e(n,j,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==j&&A(t),L(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==j&&A(t);var n=w.attrHandle[e.toLowerCase()],i=n&&V.call(w.attrHandle,e.toLowerCase())?n(t,e,!$):void 0;return void 0!==i?i:x.attributes||!$?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,r=0;if(N=!x.detectDuplicates,E=!x.sortStable&&t.slice(0),t.sort(Y),N){for(;e=t[r++];)e===t[r]&&(i=n.push(r));for(;i--;)t.splice(n[i],1)}return E=null,t},C=e.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=C(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=C(e);return n},w=e.selectors={cacheLength:50,createPseudo:i,match:ft,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(_t,xt),t[3]=(t[3]||t[4]||t[5]||"").replace(_t,xt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return ft.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&ht.test(n)&&(e=T(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(_t,xt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=W[t+" "];return e||(e=new RegExp("(^|"+nt+")"+t+"("+nt+"|$)"))&&W(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(r){var o=e.attr(r,t);return null==o?"!="===n:n?(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(st," ")+" ").indexOf(i)>-1:"|="===n?o===i||o.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(t,e,n,i,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,l){var u,c,h,d,f,p,g=o!==s?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(o){for(;g;){for(d=e;d=d[g];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=g="only"===t&&!p&&"nextSibling"}return!0}if(p=[s?m.firstChild:m.lastChild],s&&y){for(d=m,h=d[z]||(d[z]={}),c=h[d.uniqueID]||(h[d.uniqueID]={}),u=c[t]||[],f=u[0]===R&&u[1],b=f&&u[2],d=f&&m.childNodes[f];d=++f&&d&&d[g]||(b=f=0)||p.pop();)if(1===d.nodeType&&++b&&d===e){c[t]=[R,f,b];break}}else if(y&&(d=e,h=d[z]||(d[z]={}),c=h[d.uniqueID]||(h[d.uniqueID]={}),u=c[t]||[],f=u[0]===R&&u[1],b=f),b===!1)for(;(d=++f&&d&&d[g]||(b=f=0)||p.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&(h=d[z]||(d[z]={}),c=h[d.uniqueID]||(h[d.uniqueID]={}),c[t]=[R,b]),d!==e)););return b-=r,b===i||b%i===0&&b/i>=0}}},PSEUDO:function(t,n){var r,o=w.pseudos[t]||w.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[z]?o(n):o.length>1?(r=[t,t,"",n],w.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,r=o(t,n),s=r.length;s--;)i=tt(t,r[s]),t[i]=!(e[i]=r[s])}):function(t){return o(t,0,r)}):o}},pseudos:{not:i(function(t){var e=[],n=[],r=D(t.replace(at,"$1"));return r[z]?i(function(t,e,n,i){for(var o,s=r(t,null,i,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(t){return t=t.replace(_t,xt),function(e){return(e.textContent||e.innerText||C(e)).indexOf(t)>-1}}),lang:i(function(t){return dt.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(_t,xt).toLowerCase(),function(e){var n;do if(n=$?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===I},focus:function(t){return t===j.activeElement&&(!j.hasFocus||j.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.nodeType<6)return!1;return!0},parent:function(t){return!w.pseudos.empty(t)},header:function(t){return gt.test(t.nodeName)},input:function(t){return pt.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:u(function(){return[0]}),last:u(function(t,e){return[e-1]}),eq:u(function(t,e,n){return[0>n?n+e:n]}),even:u(function(t,e){for(var n=0;e>n;n+=2)t.push(n);return t}),odd:u(function(t,e){for(var n=1;e>n;n+=2)t.push(n);return t}),lt:u(function(t,e,n){for(var i=0>n?n+e:n;--i>=0;)t.push(i);return t}),gt:u(function(t,e,n){for(var i=0>n?n+e:n;++i<e;)t.push(i);return t})}},w.pseudos.nth=w.pseudos.eq;for(_ in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[_]=a(_);for(_ in{submit:!0,reset:!0})w.pseudos[_]=l(_);return h.prototype=w.filters=w.pseudos,w.setFilters=new h,T=e.tokenize=function(t,n){var i,r,o,s,a,l,u,c=B[t+" "];if(c)return n?0:c.slice(0);for(a=t,l=[],u=w.preFilter;a;){(!i||(r=lt.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),i=!1,(r=ut.exec(a))&&(i=r.shift(),o.push({value:i,type:r[0].replace(at," ")}),a=a.slice(i.length));for(s in w.filter)!(r=ft[s].exec(a))||u[s]&&!(r=u[s](r))||(i=r.shift(),o.push({value:i,type:s,matches:r}),a=a.slice(i.length));if(!i)break}return n?a.length:a?e.error(t):B(t,l).slice(0)},D=e.compile=function(t,e){var n,i=[],r=[],o=U[t+" "];if(!o){for(e||(e=T(t)),n=e.length;n--;)o=y(e[n]),o[z]?i.push(o):r.push(o);o=U(t,b(r,i)),o.selector=t}return o},M=e.select=function(t,e,n,i){var r,o,s,a,l,u="function"==typeof t&&t,h=!i&&T(t=u.selector||t);if(n=n||[],1===h.length){if(o=h[0]=h[0].slice(0),o.length>2&&"ID"===(s=o[0]).type&&x.getById&&9===e.nodeType&&$&&w.relative[o[1].type]){if(e=(w.find.ID(s.matches[0].replace(_t,xt),e)||[])[0],!e)return n;u&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(r=ft.needsContext.test(t)?0:o.length;r--&&(s=o[r],!w.relative[a=s.type]);)if((l=w.find[a])&&(i=l(s.matches[0].replace(_t,xt),yt.test(o[0].type)&&c(e.parentNode)||e))){if(o.splice(r,1),t=i.length&&d(o),!t)return Z.apply(n,i),n;break}}return(u||D(t,h))(i,e,!$,n,!e||yt.test(t)&&c(e.parentNode)||e),n},x.sortStable=z.split("").sort(Y).join("")===z,x.detectDuplicates=!!N,A(),x.sortDetached=r(function(t){return 1&t.compareDocumentPosition(j.createElement("div"))}),r(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,n){return n?void 0:t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),x.attributes&&r(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,n){return n||"input"!==t.nodeName.toLowerCase()?void 0:t.defaultValue}),r(function(t){return null==t.getAttribute("disabled")})||o(et,function(t,e,n){var i;return n?void 0:t[e]===!0?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(t);ft.find=yt,ft.expr=yt.selectors,ft.expr[":"]=ft.expr.pseudos,ft.uniqueSort=ft.unique=yt.uniqueSort,ft.text=yt.getText,ft.isXMLDoc=yt.isXML,ft.contains=yt.contains;var bt=function(t,e,n){for(var i=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&ft(t).is(n))break;i.push(t)}return i},_t=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},xt=ft.expr.match.needsContext,wt=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ct=/^.[^:#\[\.,]*$/;ft.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?ft.find.matchesSelector(i,t)?[i]:[]:ft.find.matches(t,ft.grep(e,function(t){return 1===t.nodeType}))},ft.fn.extend({find:function(t){var e,n=[],i=this,r=i.length;if("string"!=typeof t)return this.pushStack(ft(t).filter(function(){for(e=0;r>e;e++)if(ft.contains(i[e],this))return!0}));for(e=0;r>e;e++)ft.find(t,i[e],n);return n=this.pushStack(r>1?ft.unique(n):n),n.selector=this.selector?this.selector+" "+t:t,n},filter:function(t){return this.pushStack(i(this,t||[],!1))},not:function(t){return this.pushStack(i(this,t||[],!0))},is:function(t){return!!i(this,"string"==typeof t&&xt.test(t)?ft(t):t||[],!1).length}});var kt,Tt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,Dt=ft.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||kt,"string"==typeof t){if(i="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:Tt.exec(t),!i||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof ft?e[0]:e,ft.merge(this,ft.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:it,!0)),wt.test(i[1])&&ft.isPlainObject(e))for(i in e)ft.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}if(r=it.getElementById(i[2]),r&&r.parentNode){if(r.id!==i[2])return kt.find(t);this.length=1,this[0]=r}return this.context=it,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):ft.isFunction(t)?"undefined"!=typeof n.ready?n.ready(t):t(ft):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),ft.makeArray(t,this))};Dt.prototype=ft.fn,kt=ft(it);var Mt=/^(?:parents|prev(?:Until|All))/,St={children:!0,contents:!0,next:!0,prev:!0};ft.fn.extend({has:function(t){var e,n=ft(t,this),i=n.length;return this.filter(function(){for(e=0;i>e;e++)if(ft.contains(this,n[e]))return!0})},closest:function(t,e){for(var n,i=0,r=this.length,o=[],s=xt.test(t)||"string"!=typeof t?ft(t,e||this.context):0;r>i;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&ft.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?ft.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?ft.inArray(this[0],ft(t)):ft.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(ft.uniqueSort(ft.merge(this.get(),ft(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),ft.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return bt(t,"parentNode")},parentsUntil:function(t,e,n){return bt(t,"parentNode",n)},next:function(t){return r(t,"nextSibling")},prev:function(t){return r(t,"previousSibling")},nextAll:function(t){return bt(t,"nextSibling")},prevAll:function(t){return bt(t,"previousSibling")},nextUntil:function(t,e,n){return bt(t,"nextSibling",n)},prevUntil:function(t,e,n){return bt(t,"previousSibling",n)},siblings:function(t){return _t((t.parentNode||{}).firstChild,t)},children:function(t){return _t(t.firstChild)},contents:function(t){return ft.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:ft.merge([],t.childNodes)}},function(t,e){ft.fn[t]=function(n,i){var r=ft.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=ft.filter(i,r)),this.length>1&&(St[t]||(r=ft.uniqueSort(r)),Mt.test(t)&&(r=r.reverse())),this.pushStack(r)}});var Et=/\S+/g;ft.Callbacks=function(t){t="string"==typeof t?o(t):ft.extend({},t);var e,n,i,r,s=[],a=[],l=-1,u=function(){for(r=t.once,i=e=!0;a.length;l=-1)for(n=a.shift();++l<s.length;)s[l].apply(n[0],n[1])===!1&&t.stopOnFalse&&(l=s.length,n=!1);t.memory||(n=!1),e=!1,r&&(s=n?[]:"")},c={add:function(){return s&&(n&&!e&&(l=s.length-1,a.push(n)),function i(e){ft.each(e,function(e,n){ft.isFunction(n)?t.unique&&c.has(n)||s.push(n):n&&n.length&&"string"!==ft.type(n)&&i(n)})}(arguments),n&&!e&&u()),this},remove:function(){return ft.each(arguments,function(t,e){for(var n;(n=ft.inArray(e,s,n))>-1;)s.splice(n,1),l>=n&&l--}),this},has:function(t){return t?ft.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return r=a=[],s=n="",this},disabled:function(){return!s},lock:function(){return r=!0,n||c.disable(),this},locked:function(){return!!r},fireWith:function(t,n){return r||(n=n||[],n=[t,n.slice?n.slice():n],a.push(n),e||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},ft.extend({Deferred:function(t){var e=[["resolve","done",ft.Callbacks("once memory"),"resolved"],["reject","fail",ft.Callbacks("once memory"),"rejected"],["notify","progress",ft.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var t=arguments;return ft.Deferred(function(n){ft.each(e,function(e,o){var s=ft.isFunction(t[e])&&t[e];r[o[1]](function(){var t=s&&s.apply(this,arguments);t&&ft.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===i?n.promise():this,s?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?ft.extend(t,i):i}},r={};return i.pipe=i.then,ft.each(e,function(t,o){var s=o[2],a=o[3];i[o[1]]=s.add,a&&s.add(function(){n=a},e[1^t][2].disable,e[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?i:this,arguments),this},r[o[0]+"With"]=s.fireWith}),i.promise(r),t&&t.call(r,r),r},when:function(t){var e,n,i,r=0,o=rt.call(arguments),s=o.length,a=1!==s||t&&ft.isFunction(t.promise)?s:0,l=1===a?t:ft.Deferred(),u=function(t,n,i){return function(r){n[t]=this,i[t]=arguments.length>1?rt.call(arguments):r,i===e?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(s>1)for(e=new Array(s),n=new Array(s),i=new Array(s);s>r;r++)o[r]&&ft.isFunction(o[r].promise)?o[r].promise().progress(u(r,n,e)).done(u(r,i,o)).fail(l.reject):--a;return a||l.resolveWith(i,o),l.promise()}});var Nt;ft.fn.ready=function(t){return ft.ready.promise().done(t),this},ft.extend({isReady:!1,readyWait:1,holdReady:function(t){t?ft.readyWait++:ft.ready(!0)},ready:function(t){(t===!0?--ft.readyWait:ft.isReady)||(ft.isReady=!0,t!==!0&&--ft.readyWait>0||(Nt.resolveWith(it,[ft]),ft.fn.triggerHandler&&(ft(it).triggerHandler("ready"),ft(it).off("ready"))))}}),ft.ready.promise=function(e){if(!Nt)if(Nt=ft.Deferred(),"complete"===it.readyState)t.setTimeout(ft.ready);else if(it.addEventListener)it.addEventListener("DOMContentLoaded",a),t.addEventListener("load",a);else{it.attachEvent("onreadystatechange",a),t.attachEvent("onload",a);var n=!1;try{n=null==t.frameElement&&it.documentElement}catch(i){}n&&n.doScroll&&!function r(){if(!ft.isReady){try{n.doScroll("left")}catch(e){return t.setTimeout(r,50)}s(),ft.ready()}}()}return Nt.promise(e)},ft.ready.promise();var At;for(At in ft(ht))break;ht.ownFirst="0"===At,ht.inlineBlockNeedsLayout=!1,ft(function(){var t,e,n,i;n=it.getElementsByTagName("body")[0],n&&n.style&&(e=it.createElement("div"),i=it.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(e),"undefined"!=typeof e.style.zoom&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",ht.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(n.style.zoom=1)),n.removeChild(i))}),function(){var t=it.createElement("div");ht.deleteExpando=!0;try{delete t.test}catch(e){ht.deleteExpando=!1}t=null}();var jt=function(t){var e=ft.noData[(t.nodeName+" ").toLowerCase()],n=+t.nodeType||1;return 1!==n&&9!==n?!1:!e||e!==!0&&t.getAttribute("classid")===e},It=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,$t=/([A-Z])/g;ft.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return t=t.nodeType?ft.cache[t[ft.expando]]:t[ft.expando],!!t&&!u(t)},data:function(t,e,n){return c(t,e,n)},removeData:function(t,e){return h(t,e)},_data:function(t,e,n){return c(t,e,n,!0)},_removeData:function(t,e){return h(t,e,!0)}}),ft.fn.extend({data:function(t,e){var n,i,r,o=this[0],s=o&&o.attributes;if(void 0===t){if(this.length&&(r=ft.data(o),1===o.nodeType&&!ft._data(o,"parsedAttrs"))){for(n=s.length;n--;)s[n]&&(i=s[n].name,0===i.indexOf("data-")&&(i=ft.camelCase(i.slice(5)),l(o,i,r[i])));ft._data(o,"parsedAttrs",!0)}return r}return"object"==typeof t?this.each(function(){ft.data(this,t)}):arguments.length>1?this.each(function(){ft.data(this,t,e)}):o?l(o,t,ft.data(o,t)):void 0},removeData:function(t){return this.each(function(){ft.removeData(this,t)})}}),ft.extend({queue:function(t,e,n){var i;return t?(e=(e||"fx")+"queue",i=ft._data(t,e),n&&(!i||ft.isArray(n)?i=ft._data(t,e,ft.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(t,e){e=e||"fx";var n=ft.queue(t,e),i=n.length,r=n.shift(),o=ft._queueHooks(t,e),s=function(){ft.dequeue(t,e)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,s,o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return ft._data(t,n)||ft._data(t,n,{empty:ft.Callbacks("once memory").add(function(){ft._removeData(t,e+"queue"),ft._removeData(t,n)})})}}),ft.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?ft.queue(this[0],t):void 0===e?this:this.each(function(){var n=ft.queue(this,t,e);ft._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&ft.dequeue(this,t)})},dequeue:function(t){return this.each(function(){ft.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,r=ft.Deferred(),o=this,s=this.length,a=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)n=ft._data(o[s],t+"queueHooks"),n&&n.empty&&(i++,n.empty.add(a));return a(),r.promise(e)}}),function(){var t;ht.shrinkWrapBlocks=function(){if(null!=t)return t;t=!1;var e,n,i;return n=it.getElementsByTagName("body")[0],n&&n.style?(e=it.createElement("div"),i=it.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(e),"undefined"!=typeof e.style.zoom&&(e.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",e.appendChild(it.createElement("div")).style.width="5px",t=3!==e.offsetWidth),n.removeChild(i),t):void 0}}();var Pt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ht=new RegExp("^(?:([+-])=|)("+Pt+")([a-z%]*)$","i"),Ft=["Top","Right","Bottom","Left"],Lt=function(t,e){return t=e||t,"none"===ft.css(t,"display")||!ft.contains(t.ownerDocument,t)},zt=function(t,e,n,i,r,o,s){var a=0,l=t.length,u=null==n;if("object"===ft.type(n)){r=!0;for(a in n)zt(t,e,a,n[a],!0,o,s)}else if(void 0!==i&&(r=!0,ft.isFunction(i)||(s=!0),u&&(s?(e.call(t,i),e=null):(u=e,e=function(t,e,n){return u.call(ft(t),n)})),e))for(;l>a;a++)e(t[a],n,s?i:i.call(t[a],a,e(t[a],n)));return r?t:u?e.call(t):l?e(t[0],n):o},Ot=/^(?:checkbox|radio)$/i,Rt=/<([\w:-]+)/,qt=/^$|\/(?:java|ecma)script/i,Wt=/^\s+/,Bt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";!function(){var t=it.createElement("div"),e=it.createDocumentFragment(),n=it.createElement("input");t.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",ht.leadingWhitespace=3===t.firstChild.nodeType,ht.tbody=!t.getElementsByTagName("tbody").length,ht.htmlSerialize=!!t.getElementsByTagName("link").length,ht.html5Clone="<:nav></:nav>"!==it.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,e.appendChild(n),ht.appendChecked=n.checked,t.innerHTML="<textarea>x</textarea>",ht.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,e.appendChild(t),n=it.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ht.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,ht.noCloneEvent=!!t.addEventListener,t[ft.expando]=1,ht.attributes=!t.getAttribute(ft.expando)}();var Ut={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:ht.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};Ut.optgroup=Ut.option,Ut.tbody=Ut.tfoot=Ut.colgroup=Ut.caption=Ut.thead,Ut.th=Ut.td;var Yt=/<|&#?\w+;/,Xt=/<tbody/i;!function(){var e,n,i=it.createElement("div");for(e in{submit:!0,change:!0,focusin:!0})n="on"+e,(ht[e]=n in t)||(i.setAttribute(n,"t"),ht[e]=i.attributes[n].expando===!1);i=null}();var Vt=/^(?:input|select|textarea)$/i,Qt=/^key/,Kt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Gt=/^(?:focusinfocus|focusoutblur)$/,Zt=/^([^.]*)(?:\.(.+)|)/;ft.event={global:{},add:function(t,e,n,i,r){var o,s,a,l,u,c,h,d,f,p,g,m=ft._data(t);if(m){for(n.handler&&(l=n,n=l.handler,r=l.selector),n.guid||(n.guid=ft.guid++),(s=m.events)||(s=m.events={}),(c=m.handle)||(c=m.handle=function(t){return"undefined"==typeof ft||t&&ft.event.triggered===t.type?void 0:ft.event.dispatch.apply(c.elem,arguments)},c.elem=t),e=(e||"").match(Et)||[""],a=e.length;a--;)o=Zt.exec(e[a])||[],f=g=o[1],p=(o[2]||"").split(".").sort(),f&&(u=ft.event.special[f]||{},f=(r?u.delegateType:u.bindType)||f,u=ft.event.special[f]||{},h=ft.extend({type:f,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&ft.expr.match.needsContext.test(r),
namespace:p.join(".")},l),(d=s[f])||(d=s[f]=[],d.delegateCount=0,u.setup&&u.setup.call(t,i,p,c)!==!1||(t.addEventListener?t.addEventListener(f,c,!1):t.attachEvent&&t.attachEvent("on"+f,c))),u.add&&(u.add.call(t,h),h.handler.guid||(h.handler.guid=n.guid)),r?d.splice(d.delegateCount++,0,h):d.push(h),ft.event.global[f]=!0);t=null}},remove:function(t,e,n,i,r){var o,s,a,l,u,c,h,d,f,p,g,m=ft.hasData(t)&&ft._data(t);if(m&&(c=m.events)){for(e=(e||"").match(Et)||[""],u=e.length;u--;)if(a=Zt.exec(e[u])||[],f=g=a[1],p=(a[2]||"").split(".").sort(),f){for(h=ft.event.special[f]||{},f=(i?h.delegateType:h.bindType)||f,d=c[f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=d.length;o--;)s=d[o],!r&&g!==s.origType||n&&n.guid!==s.guid||a&&!a.test(s.namespace)||i&&i!==s.selector&&("**"!==i||!s.selector)||(d.splice(o,1),s.selector&&d.delegateCount--,h.remove&&h.remove.call(t,s));l&&!d.length&&(h.teardown&&h.teardown.call(t,p,m.handle)!==!1||ft.removeEvent(t,f,m.handle),delete c[f])}else for(f in c)ft.event.remove(t,f+e[u],n,i,!0);ft.isEmptyObject(c)&&(delete m.handle,ft._removeData(t,"events"))}},trigger:function(e,n,i,r){var o,s,a,l,u,c,h,d=[i||it],f=ct.call(e,"type")?e.type:e,p=ct.call(e,"namespace")?e.namespace.split("."):[];if(a=c=i=i||it,3!==i.nodeType&&8!==i.nodeType&&!Gt.test(f+ft.event.triggered)&&(f.indexOf(".")>-1&&(p=f.split("."),f=p.shift(),p.sort()),s=f.indexOf(":")<0&&"on"+f,e=e[ft.expando]?e:new ft.Event(f,"object"==typeof e&&e),e.isTrigger=r?2:3,e.namespace=p.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),n=null==n?[e]:ft.makeArray(n,[e]),u=ft.event.special[f]||{},r||!u.trigger||u.trigger.apply(i,n)!==!1)){if(!r&&!u.noBubble&&!ft.isWindow(i)){for(l=u.delegateType||f,Gt.test(l+f)||(a=a.parentNode);a;a=a.parentNode)d.push(a),c=a;c===(i.ownerDocument||it)&&d.push(c.defaultView||c.parentWindow||t)}for(h=0;(a=d[h++])&&!e.isPropagationStopped();)e.type=h>1?l:u.bindType||f,o=(ft._data(a,"events")||{})[e.type]&&ft._data(a,"handle"),o&&o.apply(a,n),o=s&&a[s],o&&o.apply&&jt(a)&&(e.result=o.apply(a,n),e.result===!1&&e.preventDefault());if(e.type=f,!r&&!e.isDefaultPrevented()&&(!u._default||u._default.apply(d.pop(),n)===!1)&&jt(i)&&s&&i[f]&&!ft.isWindow(i)){c=i[s],c&&(i[s]=null),ft.event.triggered=f;try{i[f]()}catch(g){}ft.event.triggered=void 0,c&&(i[s]=c)}return e.result}},dispatch:function(t){t=ft.event.fix(t);var e,n,i,r,o,s=[],a=rt.call(arguments),l=(ft._data(this,"events")||{})[t.type]||[],u=ft.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,t)!==!1){for(s=ft.event.handlers.call(this,t,l),e=0;(r=s[e++])&&!t.isPropagationStopped();)for(t.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!t.isImmediatePropagationStopped();)(!t.rnamespace||t.rnamespace.test(o.namespace))&&(t.handleObj=o,t.data=o.data,i=((ft.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,a),void 0!==i&&(t.result=i)===!1&&(t.preventDefault(),t.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,i,r,o,s=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==t.type)){for(i=[],n=0;a>n;n++)o=e[n],r=o.selector+" ",void 0===i[r]&&(i[r]=o.needsContext?ft(r,this).index(l)>-1:ft.find(r,this,null,[l]).length),i[r]&&i.push(o);i.length&&s.push({elem:l,handlers:i})}return a<e.length&&s.push({elem:this,handlers:e.slice(a)}),s},fix:function(t){if(t[ft.expando])return t;var e,n,i,r=t.type,o=t,s=this.fixHooks[r];for(s||(this.fixHooks[r]=s=Kt.test(r)?this.mouseHooks:Qt.test(r)?this.keyHooks:{}),i=s.props?this.props.concat(s.props):this.props,t=new ft.Event(o),e=i.length;e--;)n=i[e],t[n]=o[n];return t.target||(t.target=o.srcElement||it),3===t.target.nodeType&&(t.target=t.target.parentNode),t.metaKey=!!t.metaKey,s.filter?s.filter(t,o):t},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var n,i,r,o=e.button,s=e.fromElement;return null==t.pageX&&null!=e.clientX&&(i=t.target.ownerDocument||it,r=i.documentElement,n=i.body,t.pageX=e.clientX+(r&&r.scrollLeft||n&&n.scrollLeft||0)-(r&&r.clientLeft||n&&n.clientLeft||0),t.pageY=e.clientY+(r&&r.scrollTop||n&&n.scrollTop||0)-(r&&r.clientTop||n&&n.clientTop||0)),!t.relatedTarget&&s&&(t.relatedTarget=s===t.target?e.toElement:s),t.which||void 0===o||(t.which=1&o?1:2&o?3:4&o?2:0),t}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==_()&&this.focus)try{return this.focus(),!1}catch(t){}},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return ft.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(t){return ft.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,n){var i=ft.extend(new ft.Event,n,{type:t,isSimulated:!0});ft.event.trigger(i,null,e),i.isDefaultPrevented()&&n.preventDefault()}},ft.removeEvent=it.removeEventListener?function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)}:function(t,e,n){var i="on"+e;t.detachEvent&&("undefined"==typeof t[i]&&(t[i]=null),t.detachEvent(i,n))},ft.Event=function(t,e){return this instanceof ft.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&t.returnValue===!1?y:b):this.type=t,e&&ft.extend(this,e),this.timeStamp=t&&t.timeStamp||ft.now(),void(this[ft.expando]=!0)):new ft.Event(t,e)},ft.Event.prototype={constructor:ft.Event,isDefaultPrevented:b,isPropagationStopped:b,isImmediatePropagationStopped:b,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=y,t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=y,t&&!this.isSimulated&&(t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0)},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=y,t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),this.stopPropagation()}},ft.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){ft.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,r=t.relatedTarget,o=t.handleObj;return(!r||r!==i&&!ft.contains(i,r))&&(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}}),ht.submit||(ft.event.special.submit={setup:function(){return ft.nodeName(this,"form")?!1:void ft.event.add(this,"click._submit keypress._submit",function(t){var e=t.target,n=ft.nodeName(e,"input")||ft.nodeName(e,"button")?ft.prop(e,"form"):void 0;n&&!ft._data(n,"submit")&&(ft.event.add(n,"submit._submit",function(t){t._submitBubble=!0}),ft._data(n,"submit",!0))})},postDispatch:function(t){t._submitBubble&&(delete t._submitBubble,this.parentNode&&!t.isTrigger&&ft.event.simulate("submit",this.parentNode,t))},teardown:function(){return ft.nodeName(this,"form")?!1:void ft.event.remove(this,"._submit")}}),ht.change||(ft.event.special.change={setup:function(){return Vt.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(ft.event.add(this,"propertychange._change",function(t){"checked"===t.originalEvent.propertyName&&(this._justChanged=!0)}),ft.event.add(this,"click._change",function(t){this._justChanged&&!t.isTrigger&&(this._justChanged=!1),ft.event.simulate("change",this,t)})),!1):void ft.event.add(this,"beforeactivate._change",function(t){var e=t.target;Vt.test(e.nodeName)&&!ft._data(e,"change")&&(ft.event.add(e,"change._change",function(t){!this.parentNode||t.isSimulated||t.isTrigger||ft.event.simulate("change",this.parentNode,t)}),ft._data(e,"change",!0))})},handle:function(t){var e=t.target;return this!==e||t.isSimulated||t.isTrigger||"radio"!==e.type&&"checkbox"!==e.type?t.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return ft.event.remove(this,"._change"),!Vt.test(this.nodeName)}}),ht.focusin||ft.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){ft.event.simulate(e,t.target,ft.event.fix(t))};ft.event.special[e]={setup:function(){var i=this.ownerDocument||this,r=ft._data(i,e);r||i.addEventListener(t,n,!0),ft._data(i,e,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=ft._data(i,e)-1;r?ft._data(i,e,r):(i.removeEventListener(t,n,!0),ft._removeData(i,e))}}}),ft.fn.extend({on:function(t,e,n,i){return x(this,t,e,n,i)},one:function(t,e,n,i){return x(this,t,e,n,i,1)},off:function(t,e,n){var i,r;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,ft(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(r in t)this.off(r,e,t[r]);return this}return(e===!1||"function"==typeof e)&&(n=e,e=void 0),n===!1&&(n=b),this.each(function(){ft.event.remove(this,t,n,e)})},trigger:function(t,e){return this.each(function(){ft.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];return n?ft.event.trigger(t,e,n,!0):void 0}});var Jt=/ jQuery\d+="(?:null|\d+)"/g,te=new RegExp("<(?:"+Bt+")[\\s/>]","i"),ee=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ne=/<script|<style|<link/i,ie=/checked\s*(?:[^=]|=\s*.checked.)/i,re=/^true\/(.*)/,oe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,se=f(it),ae=se.appendChild(it.createElement("div"));ft.extend({htmlPrefilter:function(t){return t.replace(ee,"<$1></$2>")},clone:function(t,e,n){var i,r,o,s,a,l=ft.contains(t.ownerDocument,t);if(ht.html5Clone||ft.isXMLDoc(t)||!te.test("<"+t.nodeName+">")?o=t.cloneNode(!0):(ae.innerHTML=t.outerHTML,ae.removeChild(o=ae.firstChild)),!(ht.noCloneEvent&&ht.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||ft.isXMLDoc(t)))for(i=p(o),a=p(t),s=0;null!=(r=a[s]);++s)i[s]&&D(r,i[s]);if(e)if(n)for(a=a||p(t),i=i||p(o),s=0;null!=(r=a[s]);s++)T(r,i[s]);else T(t,o);return i=p(o,"script"),i.length>0&&g(i,!l&&p(t,"script")),i=a=r=null,o},cleanData:function(t,e){for(var n,i,r,o,s=0,a=ft.expando,l=ft.cache,u=ht.attributes,c=ft.event.special;null!=(n=t[s]);s++)if((e||jt(n))&&(r=n[a],o=r&&l[r])){if(o.events)for(i in o.events)c[i]?ft.event.remove(n,i):ft.removeEvent(n,i,o.handle);l[r]&&(delete l[r],u||"undefined"==typeof n.removeAttribute?n[a]=void 0:n.removeAttribute(a),nt.push(r))}}}),ft.fn.extend({domManip:M,detach:function(t){return S(this,t,!0)},remove:function(t){return S(this,t)},text:function(t){return zt(this,function(t){return void 0===t?ft.text(this):this.empty().append((this[0]&&this[0].ownerDocument||it).createTextNode(t))},null,t,arguments.length)},append:function(){return M(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=w(this,t);e.appendChild(t)}})},prepend:function(){return M(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=w(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return M(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return M(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&ft.cleanData(p(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&ft.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 ft.clone(this,t,e)})},html:function(t){return zt(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(Jt,""):void 0;if("string"==typeof t&&!ne.test(t)&&(ht.htmlSerialize||!te.test(t))&&(ht.leadingWhitespace||!Wt.test(t))&&!Ut[(Rt.exec(t)||["",""])[1].toLowerCase()]){t=ft.htmlPrefilter(t);try{for(;i>n;n++)e=this[n]||{},1===e.nodeType&&(ft.cleanData(p(e,!1)),e.innerHTML=t);e=0}catch(r){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return M(this,arguments,function(e){var n=this.parentNode;ft.inArray(this,t)<0&&(ft.cleanData(p(this)),n&&n.replaceChild(e,this))},t)}}),ft.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){ft.fn[t]=function(t){for(var n,i=0,r=[],o=ft(t),s=o.length-1;s>=i;i++)n=i===s?this:this.clone(!0),ft(o[i])[e](n),st.apply(r,n.get());return this.pushStack(r)}});var le,ue={HTML:"block",BODY:"block"},ce=/^margin/,he=new RegExp("^("+Pt+")(?!px)[a-z%]+$","i"),de=function(t,e,n,i){var r,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];r=n.apply(t,i||[]);for(o in e)t.style[o]=s[o];return r},fe=it.documentElement;!function(){function e(){var e,c,h=it.documentElement;h.appendChild(l),u.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",n=r=a=!1,i=s=!0,t.getComputedStyle&&(c=t.getComputedStyle(u),n="1%"!==(c||{}).top,a="2px"===(c||{}).marginLeft,r="4px"===(c||{width:"4px"}).width,u.style.marginRight="50%",i="4px"===(c||{marginRight:"4px"}).marginRight,e=u.appendChild(it.createElement("div")),e.style.cssText=u.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",e.style.marginRight=e.style.width="0",u.style.width="1px",s=!parseFloat((t.getComputedStyle(e)||{}).marginRight),u.removeChild(e)),u.style.display="none",o=0===u.getClientRects().length,o&&(u.style.display="",u.innerHTML="<table><tr><td></td><td>t</td></tr></table>",e=u.getElementsByTagName("td"),e[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===e[0].offsetHeight,o&&(e[0].style.display="",e[1].style.display="none",o=0===e[0].offsetHeight)),h.removeChild(l)}var n,i,r,o,s,a,l=it.createElement("div"),u=it.createElement("div");u.style&&(u.style.cssText="float:left;opacity:.5",ht.opacity="0.5"===u.style.opacity,ht.cssFloat=!!u.style.cssFloat,u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",ht.clearCloneStyle="content-box"===u.style.backgroundClip,l=it.createElement("div"),l.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",u.innerHTML="",l.appendChild(u),ht.boxSizing=""===u.style.boxSizing||""===u.style.MozBoxSizing||""===u.style.WebkitBoxSizing,ft.extend(ht,{reliableHiddenOffsets:function(){return null==n&&e(),o},boxSizingReliable:function(){return null==n&&e(),r},pixelMarginRight:function(){return null==n&&e(),i},pixelPosition:function(){return null==n&&e(),n},reliableMarginRight:function(){return null==n&&e(),s},reliableMarginLeft:function(){return null==n&&e(),a}}))}();var pe,ge,me=/^(top|right|bottom|left)$/;t.getComputedStyle?(pe=function(e){var n=e.ownerDocument.defaultView;return n.opener||(n=t),n.getComputedStyle(e)},ge=function(t,e,n){var i,r,o,s,a=t.style;return n=n||pe(t),s=n?n.getPropertyValue(e)||n[e]:void 0,n&&(""!==s||ft.contains(t.ownerDocument,t)||(s=ft.style(t,e)),!ht.pixelMarginRight()&&he.test(s)&&ce.test(e)&&(i=a.width,r=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=r,a.maxWidth=o)),void 0===s?s:s+""}):fe.currentStyle&&(pe=function(t){return t.currentStyle},ge=function(t,e,n){var i,r,o,s,a=t.style;return n=n||pe(t),s=n?n[e]:void 0,null==s&&a&&a[e]&&(s=a[e]),he.test(s)&&!me.test(e)&&(i=a.left,r=t.runtimeStyle,o=r&&r.left,o&&(r.left=t.currentStyle.left),a.left="fontSize"===e?"1em":s,s=a.pixelLeft+"px",a.left=i,o&&(r.left=o)),void 0===s?s:s+""||"auto"});var ve=/alpha\([^)]*\)/i,ye=/opacity\s*=\s*([^)]*)/i,be=/^(none|table(?!-c[ea]).+)/,_e=new RegExp("^("+Pt+")(.*)$","i"),xe={position:"absolute",visibility:"hidden",display:"block"},we={letterSpacing:"0",fontWeight:"400"},Ce=["Webkit","O","Moz","ms"],ke=it.createElement("div").style;ft.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=ge(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ht.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,s,a=ft.camelCase(e),l=t.style;if(e=ft.cssProps[a]||(ft.cssProps[a]=j(a)||a),s=ft.cssHooks[e]||ft.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(r=s.get(t,!1,i))?r:l[e];if(o=typeof n,"string"===o&&(r=Ht.exec(n))&&r[1]&&(n=d(t,e,r),o="number"),null!=n&&n===n&&("number"===o&&(n+=r&&r[3]||(ft.cssNumber[a]?"":"px")),ht.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),!(s&&"set"in s&&void 0===(n=s.set(t,n,i)))))try{l[e]=n}catch(u){}}},css:function(t,e,n,i){var r,o,s,a=ft.camelCase(e);return e=ft.cssProps[a]||(ft.cssProps[a]=j(a)||a),s=ft.cssHooks[e]||ft.cssHooks[a],s&&"get"in s&&(o=s.get(t,!0,n)),void 0===o&&(o=ge(t,e,i)),"normal"===o&&e in we&&(o=we[e]),""===n||n?(r=parseFloat(o),n===!0||isFinite(r)?r||0:o):o}}),ft.each(["height","width"],function(t,e){ft.cssHooks[e]={get:function(t,n,i){return n?be.test(ft.css(t,"display"))&&0===t.offsetWidth?de(t,xe,function(){return H(t,e,i)}):H(t,e,i):void 0},set:function(t,n,i){var r=i&&pe(t);return $(t,n,i?P(t,e,i,ht.boxSizing&&"border-box"===ft.css(t,"boxSizing",!1,r),r):0)}}}),ht.opacity||(ft.cssHooks.opacity={get:function(t,e){return ye.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var n=t.style,i=t.currentStyle,r=ft.isNumeric(e)?"alpha(opacity="+100*e+")":"",o=i&&i.filter||n.filter||"";n.zoom=1,(e>=1||""===e)&&""===ft.trim(o.replace(ve,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===e||i&&!i.filter)||(n.filter=ve.test(o)?o.replace(ve,r):o+" "+r)}}),ft.cssHooks.marginRight=A(ht.reliableMarginRight,function(t,e){return e?de(t,{display:"inline-block"},ge,[t,"marginRight"]):void 0}),ft.cssHooks.marginLeft=A(ht.reliableMarginLeft,function(t,e){return e?(parseFloat(ge(t,"marginLeft"))||(ft.contains(t.ownerDocument,t)?t.getBoundingClientRect().left-de(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}):0))+"px":void 0}),ft.each({margin:"",padding:"",border:"Width"},function(t,e){ft.cssHooks[t+e]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];4>i;i++)r[t+Ft[i]+e]=o[i]||o[i-2]||o[0];return r}},ce.test(t)||(ft.cssHooks[t+e].set=$)}),ft.fn.extend({css:function(t,e){return zt(this,function(t,e,n){var i,r,o={},s=0;if(ft.isArray(e)){for(i=pe(t),r=e.length;r>s;s++)o[e[s]]=ft.css(t,e[s],!1,i);return o}return void 0!==n?ft.style(t,e,n):ft.css(t,e)},t,e,arguments.length>1)},show:function(){return I(this,!0)},hide:function(){return I(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Lt(this)?ft(this).show():ft(this).hide()})}}),ft.Tween=F,F.prototype={constructor:F,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||ft.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(ft.cssNumber[n]?"":"px")},cur:function(){var t=F.propHooks[this.prop];return t&&t.get?t.get(this):F.propHooks._default.get(this)},run:function(t){var e,n=F.propHooks[this.prop];return this.options.duration?this.pos=e=ft.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):F.propHooks._default.set(this),this}},F.prototype.init.prototype=F.prototype,F.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=ft.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){ft.fx.step[t.prop]?ft.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[ft.cssProps[t.prop]]&&!ft.cssHooks[t.prop]?t.elem[t.prop]=t.now:ft.style(t.elem,t.prop,t.now+t.unit)}}},F.propHooks.scrollTop=F.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},ft.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},ft.fx=F.prototype.init,ft.fx.step={};var Te,De,Me=/^(?:toggle|show|hide)$/,Se=/queueHooks$/;ft.Animation=ft.extend(W,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return d(n.elem,t,Ht.exec(e),n),n}]},tweener:function(t,e){ft.isFunction(t)?(e=t,t=["*"]):t=t.match(Et);for(var n,i=0,r=t.length;r>i;i++)n=t[i],W.tweeners[n]=W.tweeners[n]||[],W.tweeners[n].unshift(e)},prefilters:[R],prefilter:function(t,e){e?W.prefilters.unshift(t):W.prefilters.push(t)}}),ft.speed=function(t,e,n){var i=t&&"object"==typeof t?ft.extend({},t):{complete:n||!n&&e||ft.isFunction(t)&&t,duration:t,easing:n&&e||e&&!ft.isFunction(e)&&e};return i.duration=ft.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in ft.fx.speeds?ft.fx.speeds[i.duration]:ft.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){ft.isFunction(i.old)&&i.old.call(this),i.queue&&ft.dequeue(this,i.queue)},i},ft.fn.extend({fadeTo:function(t,e,n,i){return this.filter(Lt).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var r=ft.isEmptyObject(t),o=ft.speed(e,n,i),s=function(){var e=W(this,ft.extend({},t),o);(r||ft._data(this,"finish"))&&e.stop(!0)};return s.finish=s,r||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,r=null!=t&&t+"queueHooks",o=ft.timers,s=ft._data(this);if(r)s[r]&&s[r].stop&&i(s[r]);else for(r in s)s[r]&&s[r].stop&&Se.test(r)&&i(s[r]);for(r=o.length;r--;)o[r].elem!==this||null!=t&&o[r].queue!==t||(o[r].anim.stop(n),e=!1,o.splice(r,1));(e||!n)&&ft.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,n=ft._data(this),i=n[t+"queue"],r=n[t+"queueHooks"],o=ft.timers,s=i?i.length:0;for(n.finish=!0,ft.queue(this,t,[]),r&&r.stop&&r.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;s>e;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish})}}),ft.each(["toggle","show","hide"],function(t,e){var n=ft.fn[e];ft.fn[e]=function(t,i,r){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(z(e,!0),t,i,r)}}),ft.each({slideDown:z("show"),slideUp:z("hide"),slideToggle:z("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){ft.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}}),ft.timers=[],ft.fx.tick=function(){var t,e=ft.timers,n=0;for(Te=ft.now();n<e.length;n++)t=e[n],t()||e[n]!==t||e.splice(n--,1);e.length||ft.fx.stop(),Te=void 0},ft.fx.timer=function(t){ft.timers.push(t),t()?ft.fx.start():ft.timers.pop()},ft.fx.interval=13,ft.fx.start=function(){De||(De=t.setInterval(ft.fx.tick,ft.fx.interval))},ft.fx.stop=function(){t.clearInterval(De),De=null},ft.fx.speeds={slow:600,fast:200,_default:400},ft.fn.delay=function(e,n){return e=ft.fx?ft.fx.speeds[e]||e:e,n=n||"fx",this.queue(n,function(n,i){var r=t.setTimeout(n,e);i.stop=function(){t.clearTimeout(r)}})},function(){var t,e=it.createElement("input"),n=it.createElement("div"),i=it.createElement("select"),r=i.appendChild(it.createElement("option"));n=it.createElement("div"),n.setAttribute("className","t"),n.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",t=n.getElementsByTagName("a")[0],e.setAttribute("type","checkbox"),n.appendChild(e),t=n.getElementsByTagName("a")[0],t.style.cssText="top:1px",ht.getSetAttribute="t"!==n.className,ht.style=/top/.test(t.getAttribute("style")),ht.hrefNormalized="/a"===t.getAttribute("href"),ht.checkOn=!!e.value,ht.optSelected=r.selected,ht.enctype=!!it.createElement("form").enctype,i.disabled=!0,ht.optDisabled=!r.disabled,e=it.createElement("input"),e.setAttribute("value",""),ht.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),ht.radioValue="t"===e.value}();var Ee=/\r/g;ft.fn.extend({val:function(t){var e,n,i,r=this[0];{if(arguments.length)return i=ft.isFunction(t),this.each(function(n){var r;1===this.nodeType&&(r=i?t.call(this,n,ft(this).val()):t,null==r?r="":"number"==typeof r?r+="":ft.isArray(r)&&(r=ft.map(r,function(t){return null==t?"":t+""})),e=ft.valHooks[this.type]||ft.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))});if(r)return e=ft.valHooks[r.type]||ft.valHooks[r.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(Ee,""):null==n?"":n)}}}),ft.extend({valHooks:{option:{get:function(t){var e=ft.find.attr(t,"value");return null!=e?e:ft.trim(ft.text(t))}},select:{get:function(t){for(var e,n,i=t.options,r=t.selectedIndex,o="select-one"===t.type||0>r,s=o?null:[],a=o?r+1:i.length,l=0>r?a:o?r:0;a>l;l++)if(n=i[l],(n.selected||l===r)&&(ht.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!ft.nodeName(n.parentNode,"optgroup"))){if(e=ft(n).val(),o)return e;s.push(e)}return s},set:function(t,e){for(var n,i,r=t.options,o=ft.makeArray(e),s=r.length;s--;)if(i=r[s],ft.inArray(ft.valHooks.option.get(i),o)>=0)try{i.selected=n=!0}catch(a){i.scrollHeight}else i.selected=!1;return n||(t.selectedIndex=-1),r}}}}),ft.each(["radio","checkbox"],function(){ft.valHooks[this]={set:function(t,e){return ft.isArray(e)?t.checked=ft.inArray(ft(t).val(),e)>-1:void 0}},ht.checkOn||(ft.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Ne,Ae,je=ft.expr.attrHandle,Ie=/^(?:checked|selected)$/i,$e=ht.getSetAttribute,Pe=ht.input;ft.fn.extend({attr:function(t,e){return zt(this,ft.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){ft.removeAttr(this,t)})}}),ft.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof t.getAttribute?ft.prop(t,e,n):(1===o&&ft.isXMLDoc(t)||(e=e.toLowerCase(),r=ft.attrHooks[e]||(ft.expr.match.bool.test(e)?Ae:Ne)),void 0!==n?null===n?void ft.removeAttr(t,e):r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):r&&"get"in r&&null!==(i=r.get(t,e))?i:(i=ft.find.attr(t,e),null==i?void 0:i))},attrHooks:{type:{set:function(t,e){if(!ht.radioValue&&"radio"===e&&ft.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i,r=0,o=e&&e.match(Et);if(o&&1===t.nodeType)for(;n=o[r++];)i=ft.propFix[n]||n,ft.expr.match.bool.test(n)?Pe&&$e||!Ie.test(n)?t[i]=!1:t[ft.camelCase("default-"+n)]=t[i]=!1:ft.attr(t,n,""),t.removeAttribute($e?n:i)}}),Ae={set:function(t,e,n){return e===!1?ft.removeAttr(t,n):Pe&&$e||!Ie.test(n)?t.setAttribute(!$e&&ft.propFix[n]||n,n):t[ft.camelCase("default-"+n)]=t[n]=!0,n}},ft.each(ft.expr.match.bool.source.match(/\w+/g),function(t,e){var n=je[e]||ft.find.attr;Pe&&$e||!Ie.test(e)?je[e]=function(t,e,i){var r,o;return i||(o=je[e],je[e]=r,r=null!=n(t,e,i)?e.toLowerCase():null,je[e]=o),r}:je[e]=function(t,e,n){return n?void 0:t[ft.camelCase("default-"+e)]?e.toLowerCase():null}}),Pe&&$e||(ft.attrHooks.value={set:function(t,e,n){return ft.nodeName(t,"input")?void(t.defaultValue=e):Ne&&Ne.set(t,e,n)}}),$e||(Ne={set:function(t,e,n){var i=t.getAttributeNode(n);return i||t.setAttributeNode(i=t.ownerDocument.createAttribute(n)),i.value=e+="","value"===n||e===t.getAttribute(n)?e:void 0}},je.id=je.name=je.coords=function(t,e,n){var i;return n?void 0:(i=t.getAttributeNode(e))&&""!==i.value?i.value:null},ft.valHooks.button={get:function(t,e){var n=t.getAttributeNode(e);return n&&n.specified?n.value:void 0},set:Ne.set},ft.attrHooks.contenteditable={set:function(t,e,n){Ne.set(t,""===e?!1:e,n)}},ft.each(["width","height"],function(t,e){ft.attrHooks[e]={set:function(t,n){return""===n?(t.setAttribute(e,"auto"),n):void 0}}})),ht.style||(ft.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var He=/^(?:input|select|textarea|button|object)$/i,Fe=/^(?:a|area)$/i;ft.fn.extend({prop:function(t,e){return zt(this,ft.prop,t,e,arguments.length>1)},removeProp:function(t){return t=ft.propFix[t]||t,this.each(function(){try{this[t]=void 0,delete this[t]}catch(e){}})}}),ft.extend({prop:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ft.isXMLDoc(t)||(e=ft.propFix[e]||e,r=ft.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=ft.find.attr(t,"tabindex");return e?parseInt(e,10):He.test(t.nodeName)||Fe.test(t.nodeName)&&t.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),ht.hrefNormalized||ft.each(["href","src"],function(t,e){ft.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),ht.optSelected||(ft.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}}),ft.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ft.propFix[this.toLowerCase()]=this}),ht.enctype||(ft.propFix.enctype="encoding");var Le=/[\t\r\n\f]/g;ft.fn.extend({addClass:function(t){var e,n,i,r,o,s,a,l=0;if(ft.isFunction(t))return this.each(function(e){ft(this).addClass(t.call(this,e,B(this)))});if("string"==typeof t&&t)for(e=t.match(Et)||[];n=this[l++];)if(r=B(n),i=1===n.nodeType&&(" "+r+" ").replace(Le," ")){for(s=0;o=e[s++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");a=ft.trim(i),r!==a&&ft.attr(n,"class",a)}return this},removeClass:function(t){var e,n,i,r,o,s,a,l=0;if(ft.isFunction(t))return this.each(function(e){ft(this).removeClass(t.call(this,e,B(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(Et)||[];n=this[l++];)if(r=B(n),i=1===n.nodeType&&(" "+r+" ").replace(Le," ")){for(s=0;o=e[s++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");a=ft.trim(i),r!==a&&ft.attr(n,"class",a)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):ft.isFunction(t)?this.each(function(n){ft(this).toggleClass(t.call(this,n,B(this),e),e)}):this.each(function(){var e,i,r,o;if("string"===n)for(i=0,r=ft(this),o=t.match(Et)||[];e=o[i++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else(void 0===t||"boolean"===n)&&(e=B(this),e&&ft._data(this,"__className__",e),ft.attr(this,"class",e||t===!1?"":ft._data(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+B(n)+" ").replace(Le," ").indexOf(e)>-1)return!0;return!1}}),ft.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){ft.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),ft.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}});var ze=t.location,Oe=ft.now(),Re=/\?/,qe=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;ft.parseJSON=function(e){if(t.JSON&&t.JSON.parse)return t.JSON.parse(e+"");var n,i=null,r=ft.trim(e+"");return r&&!ft.trim(r.replace(qe,function(t,e,r,o){return n&&e&&(i=0),0===i?t:(n=r||e,i+=!o-!r,"")}))?Function("return "+r)():ft.error("Invalid JSON: "+e)},ft.parseXML=function(e){var n,i;if(!e||"string"!=typeof e)return null;try{t.DOMParser?(i=new t.DOMParser,n=i.parseFromString(e,"text/xml")):(n=new t.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(e))}catch(r){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||ft.error("Invalid XML: "+e),n};var We=/#.*$/,Be=/([?&])_=[^&]*/,Ue=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ye=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Xe=/^(?:GET|HEAD)$/,Ve=/^\/\//,Qe=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ke={},Ge={},Ze="*/".concat("*"),Je=ze.href,tn=Qe.exec(Je.toLowerCase())||[];
ft.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Je,type:"GET",isLocal:Ye.test(tn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ze,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ft.parseJSON,"text xml":ft.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?X(X(t,ft.ajaxSettings),e):X(ft.ajaxSettings,t)},ajaxPrefilter:U(Ke),ajaxTransport:U(Ge),ajax:function(e,n){function i(e,n,i,r){var o,h,y,b,x,C=n;2!==_&&(_=2,l&&t.clearTimeout(l),c=void 0,a=r||"",w.readyState=e>0?4:0,o=e>=200&&300>e||304===e,i&&(b=V(d,w,i)),b=Q(d,b,w,o),o?(d.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(ft.lastModified[s]=x),x=w.getResponseHeader("etag"),x&&(ft.etag[s]=x)),204===e||"HEAD"===d.type?C="nocontent":304===e?C="notmodified":(C=b.state,h=b.data,y=b.error,o=!y)):(y=C,(e||!C)&&(C="error",0>e&&(e=0))),w.status=e,w.statusText=(n||C)+"",o?g.resolveWith(f,[h,C,w]):g.rejectWith(f,[w,C,y]),w.statusCode(v),v=void 0,u&&p.trigger(o?"ajaxSuccess":"ajaxError",[w,d,o?h:y]),m.fireWith(f,[w,C]),u&&(p.trigger("ajaxComplete",[w,d]),--ft.active||ft.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=void 0),n=n||{};var r,o,s,a,l,u,c,h,d=ft.ajaxSetup({},n),f=d.context||d,p=d.context&&(f.nodeType||f.jquery)?ft(f):ft.event,g=ft.Deferred(),m=ft.Callbacks("once memory"),v=d.statusCode||{},y={},b={},_=0,x="canceled",w={readyState:0,getResponseHeader:function(t){var e;if(2===_){if(!h)for(h={};e=Ue.exec(a);)h[e[1].toLowerCase()]=e[2];e=h[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===_?a:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return _||(t=b[n]=b[n]||t,y[t]=e),this},overrideMimeType:function(t){return _||(d.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>_)for(e in t)v[e]=[v[e],t[e]];else w.always(t[w.status]);return this},abort:function(t){var e=t||x;return c&&c.abort(e),i(0,e),this}};if(g.promise(w).complete=m.add,w.success=w.done,w.error=w.fail,d.url=((e||d.url||Je)+"").replace(We,"").replace(Ve,tn[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=ft.trim(d.dataType||"*").toLowerCase().match(Et)||[""],null==d.crossDomain&&(r=Qe.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]===tn[1]&&r[2]===tn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(tn[3]||("http:"===tn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=ft.param(d.data,d.traditional)),Y(Ke,d,n,w),2===_)return w;u=ft.event&&d.global,u&&0===ft.active++&&ft.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Xe.test(d.type),s=d.url,d.hasContent||(d.data&&(s=d.url+=(Re.test(s)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Be.test(s)?s.replace(Be,"$1_="+Oe++):s+(Re.test(s)?"&":"?")+"_="+Oe++)),d.ifModified&&(ft.lastModified[s]&&w.setRequestHeader("If-Modified-Since",ft.lastModified[s]),ft.etag[s]&&w.setRequestHeader("If-None-Match",ft.etag[s])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&w.setRequestHeader("Content-Type",d.contentType),w.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Ze+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)w.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(d.beforeSend.call(f,w,d)===!1||2===_))return w.abort();x="abort";for(o in{success:1,error:1,complete:1})w[o](d[o]);if(c=Y(Ge,d,n,w)){if(w.readyState=1,u&&p.trigger("ajaxSend",[w,d]),2===_)return w;d.async&&d.timeout>0&&(l=t.setTimeout(function(){w.abort("timeout")},d.timeout));try{_=1,c.send(y,i)}catch(C){if(!(2>_))throw C;i(-1,C)}}else i(-1,"No Transport");return w},getJSON:function(t,e,n){return ft.get(t,e,n,"json")},getScript:function(t,e){return ft.get(t,void 0,e,"script")}}),ft.each(["get","post"],function(t,e){ft[e]=function(t,n,i,r){return ft.isFunction(n)&&(r=r||i,i=n,n=void 0),ft.ajax(ft.extend({url:t,type:e,dataType:r,data:n,success:i},ft.isPlainObject(t)&&t))}}),ft._evalUrl=function(t){return ft.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},ft.fn.extend({wrapAll:function(t){if(ft.isFunction(t))return this.each(function(e){ft(this).wrapAll(t.call(this,e))});if(this[0]){var e=ft(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 ft.isFunction(t)?this.each(function(e){ft(this).wrapInner(t.call(this,e))}):this.each(function(){var e=ft(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=ft.isFunction(t);return this.each(function(n){ft(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){ft.nodeName(this,"body")||ft(this).replaceWith(this.childNodes)}).end()}}),ft.expr.filters.hidden=function(t){return ht.reliableHiddenOffsets()?t.offsetWidth<=0&&t.offsetHeight<=0&&!t.getClientRects().length:G(t)},ft.expr.filters.visible=function(t){return!ft.expr.filters.hidden(t)};var en=/%20/g,nn=/\[\]$/,rn=/\r?\n/g,on=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;ft.param=function(t,e){var n,i=[],r=function(t,e){e=ft.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=ft.ajaxSettings&&ft.ajaxSettings.traditional),ft.isArray(t)||t.jquery&&!ft.isPlainObject(t))ft.each(t,function(){r(this.name,this.value)});else for(n in t)Z(n,t[n],e,r);return i.join("&").replace(en,"+")},ft.fn.extend({serialize:function(){return ft.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=ft.prop(this,"elements");return t?ft.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!ft(this).is(":disabled")&&sn.test(this.nodeName)&&!on.test(t)&&(this.checked||!Ot.test(t))}).map(function(t,e){var n=ft(this).val();return null==n?null:ft.isArray(n)?ft.map(n,function(t){return{name:e.name,value:t.replace(rn,"\r\n")}}):{name:e.name,value:n.replace(rn,"\r\n")}}).get()}}),ft.ajaxSettings.xhr=void 0!==t.ActiveXObject?function(){return this.isLocal?tt():it.documentMode>8?J():/^(get|post|head|put|delete|options)$/i.test(this.type)&&J()||tt()}:J;var an=0,ln={},un=ft.ajaxSettings.xhr();t.attachEvent&&t.attachEvent("onunload",function(){for(var t in ln)ln[t](void 0,!0)}),ht.cors=!!un&&"withCredentials"in un,un=ht.ajax=!!un,un&&ft.ajaxTransport(function(e){if(!e.crossDomain||ht.cors){var n;return{send:function(i,r){var o,s=e.xhr(),a=++an;if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)s[o]=e.xhrFields[o];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(o in i)void 0!==i[o]&&s.setRequestHeader(o,i[o]+"");s.send(e.hasContent&&e.data||null),n=function(t,i){var o,l,u;if(n&&(i||4===s.readyState))if(delete ln[a],n=void 0,s.onreadystatechange=ft.noop,i)4!==s.readyState&&s.abort();else{u={},o=s.status,"string"==typeof s.responseText&&(u.text=s.responseText);try{l=s.statusText}catch(c){l=""}o||!e.isLocal||e.crossDomain?1223===o&&(o=204):o=u.text?200:404}u&&r(o,l,u,s.getAllResponseHeaders())},e.async?4===s.readyState?t.setTimeout(n):s.onreadystatechange=ln[a]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),ft.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),ft.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return ft.globalEval(t),t}}}),ft.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),ft.ajaxTransport("script",function(t){if(t.crossDomain){var e,n=it.head||ft("head")[0]||it.documentElement;return{send:function(i,r){e=it.createElement("script"),e.async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,n){(n||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,n||r(200,"success"))},n.insertBefore(e,n.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}});var cn=[],hn=/(=)\?(?=&|$)|\?\?/;ft.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=cn.pop()||ft.expando+"_"+Oe++;return this[t]=!0,t}}),ft.ajaxPrefilter("json jsonp",function(e,n,i){var r,o,s,a=e.jsonp!==!1&&(hn.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&hn.test(e.data)&&"data");return a||"jsonp"===e.dataTypes[0]?(r=e.jsonpCallback=ft.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(hn,"$1"+r):e.jsonp!==!1&&(e.url+=(Re.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return s||ft.error(r+" was not called"),s[0]},e.dataTypes[0]="json",o=t[r],t[r]=function(){s=arguments},i.always(function(){void 0===o?ft(t).removeProp(r):t[r]=o,e[r]&&(e.jsonpCallback=n.jsonpCallback,cn.push(r)),s&&ft.isFunction(o)&&o(s[0]),s=o=void 0}),"script"):void 0}),ht.createHTMLDocument=function(){if(!it.implementation.createHTMLDocument)return!1;var t=it.implementation.createHTMLDocument("");return t.body.innerHTML="<form></form><form></form>",2===t.body.childNodes.length}(),ft.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||(ht.createHTMLDocument?it.implementation.createHTMLDocument(""):it);var i=wt.exec(t),r=!n&&[];return i?[e.createElement(i[1])]:(i=v([t],e,r),r&&r.length&&ft(r).remove(),ft.merge([],i.childNodes))};var dn=ft.fn.load;ft.fn.load=function(t,e,n){if("string"!=typeof t&&dn)return dn.apply(this,arguments);var i,r,o,s=this,a=t.indexOf(" ");return a>-1&&(i=ft.trim(t.slice(a,t.length)),t=t.slice(0,a)),ft.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(r="POST"),s.length>0&&ft.ajax({url:t,type:r||"GET",dataType:"html",data:e}).done(function(t){o=arguments,s.html(i?ft("<div>").append(ft.parseHTML(t)).find(i):t)}).always(n&&function(t,e){s.each(function(){n.apply(s,o||[t.responseText,e,t])})}),this},ft.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){ft.fn[e]=function(t){return this.on(e,t)}}),ft.expr.filters.animated=function(t){return ft.grep(ft.timers,function(e){return t===e.elem}).length},ft.offset={setOffset:function(t,e,n){var i,r,o,s,a,l,u,c=ft.css(t,"position"),h=ft(t),d={};"static"===c&&(t.style.position="relative"),a=h.offset(),o=ft.css(t,"top"),l=ft.css(t,"left"),u=("absolute"===c||"fixed"===c)&&ft.inArray("auto",[o,l])>-1,u?(i=h.position(),s=i.top,r=i.left):(s=parseFloat(o)||0,r=parseFloat(l)||0),ft.isFunction(e)&&(e=e.call(t,n,ft.extend({},a))),null!=e.top&&(d.top=e.top-a.top+s),null!=e.left&&(d.left=e.left-a.left+r),"using"in e?e.using.call(t,d):h.css(d)}},ft.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ft.offset.setOffset(this,t,e)});var e,n,i={top:0,left:0},r=this[0],o=r&&r.ownerDocument;if(o)return e=o.documentElement,ft.contains(e,r)?("undefined"!=typeof r.getBoundingClientRect&&(i=r.getBoundingClientRect()),n=et(o),{top:i.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:i.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):i},position:function(){if(this[0]){var t,e,n={top:0,left:0},i=this[0];return"fixed"===ft.css(i,"position")?e=i.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),ft.nodeName(t[0],"html")||(n=t.offset()),n.top+=ft.css(t[0],"borderTopWidth",!0)-t.scrollTop(),n.left+=ft.css(t[0],"borderLeftWidth",!0)-t.scrollLeft()),{top:e.top-n.top-ft.css(i,"marginTop",!0),left:e.left-n.left-ft.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&!ft.nodeName(t,"html")&&"static"===ft.css(t,"position");)t=t.offsetParent;return t||fe})}}),ft.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n=/Y/.test(e);ft.fn[t]=function(i){return zt(this,function(t,i,r){var o=et(t);return void 0===r?o?e in o?o[e]:o.document.documentElement[i]:t[i]:void(o?o.scrollTo(n?ft(o).scrollLeft():r,n?r:ft(o).scrollTop()):t[i]=r)},t,i,arguments.length,null)}}),ft.each(["top","left"],function(t,e){ft.cssHooks[e]=A(ht.pixelPosition,function(t,n){return n?(n=ge(t,e),he.test(n)?ft(t).position()[e]+"px":n):void 0})}),ft.each({Height:"height",Width:"width"},function(t,e){ft.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){ft.fn[i]=function(i,r){var o=arguments.length&&(n||"boolean"!=typeof i),s=n||(i===!0||r===!0?"margin":"border");return zt(this,function(e,n,i){var r;return ft.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===i?ft.css(e,n,s):ft.style(e,n,i,s)},e,o?i:void 0,o,null)}})}),ft.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}}),ft.fn.size=function(){return this.length},ft.fn.andSelf=ft.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ft});var fn=t.jQuery,pn=t.$;return ft.noConflict=function(e){return t.$===ft&&(t.$=pn),e&&t.jQuery===ft&&(t.jQuery=fn),ft},e||(t.jQuery=t.$=ft),ft}),/*!
 * jQuery UI Core 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/category/ui-core/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(e,i){var r,o,s,a=e.nodeName.toLowerCase();return"area"===a?(r=e.parentNode,o=r.name,e.href&&o&&"map"===r.nodeName.toLowerCase()?(s=t("img[usemap='#"+o+"']")[0],!!s&&n(s)):!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}t.ui=t.ui||{},t.extend(t.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({scrollParent:function(e){var n=this.css("position"),i="absolute"===n,r=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return i&&"static"===e.css("position")?!1:r.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==n&&o.length?o:t(this[0].ownerDocument||document)},uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(n){return!!t.data(n,e)}}):function(e,n,i){return!!t.data(e,i[3])},focusable:function(n){return e(n,!isNaN(t.attr(n,"tabindex")))},tabbable:function(n){var i=t.attr(n,"tabindex"),r=isNaN(i);return(r||i>=0)&&e(n,!r)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(e,n){function i(e,n,i,o){return t.each(r,function(){n-=parseFloat(t.css(e,"padding"+this))||0,i&&(n-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(n-=parseFloat(t.css(e,"margin"+this))||0)}),n}var r="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),s={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+n]=function(e){return void 0===e?s["inner"+n].call(this):this.each(function(){t(this).css(o,i(this,e)+"px")})},t.fn["outer"+n]=function(e,r){return"number"!=typeof e?s["outer"+n].call(this,e):this.each(function(){t(this).css(o,i(this,e,!0,r)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(n){return arguments.length?e.call(this,t.camelCase(n)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.fn.extend({focus:function(e){return function(n,i){return"number"==typeof n?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),i&&i.call(e)},n)}):e.apply(this,arguments)}}(t.fn.focus),disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(e){if(void 0!==e)return this.css("zIndex",e);if(this.length)for(var n,i,r=t(this[0]);r.length&&r[0]!==document;){if(n=r.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(i=parseInt(r.css("zIndex"),10),!isNaN(i)&&0!==i))return i;r=r.parent()}return 0}}),t.ui.plugin={add:function(e,n,i){var r,o=t.ui[e].prototype;for(r in i)o.plugins[r]=o.plugins[r]||[],o.plugins[r].push([n,i[r]])},call:function(t,e,n,i){var r,o=t.plugins[e];if(o&&(i||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(r=0;r<o.length;r++)t.options[o[r][0]]&&o[r][1].apply(t.element,n)}}}),/*!
 * jQuery UI Widget 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/jQuery.widget/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){var e=0,n=Array.prototype.slice;return t.cleanData=function(e){return function(n){var i,r,o;for(o=0;null!=(r=n[o]);o++)try{i=t._data(r,"events"),i&&i.remove&&t(r).triggerHandler("remove")}catch(s){}e(n)}}(t.cleanData),t.widget=function(e,n,i){var r,o,s,a,l={},u=e.split(".")[0];return e=e.split(".")[1],r=u+"-"+e,i||(i=n,n=t.Widget),t.expr[":"][r.toLowerCase()]=function(e){return!!t.data(e,r)},t[u]=t[u]||{},o=t[u][e],s=t[u][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new s(t,e)},t.extend(s,o,{version:i.version,_proto:t.extend({},i),_childConstructors:[]}),a=new n,a.options=t.widget.extend({},a.options),t.each(i,function(e,i){return t.isFunction(i)?void(l[e]=function(){var t=function(){return n.prototype[e].apply(this,arguments)},r=function(t){return n.prototype[e].apply(this,t)};return function(){var e,n=this._super,o=this._superApply;return this._super=t,this._superApply=r,e=i.apply(this,arguments),this._super=n,this._superApply=o,e}}()):void(l[e]=i)}),s.prototype=t.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix||e:e},l,{constructor:s,namespace:u,widgetName:e,widgetFullName:r}),o?(t.each(o._childConstructors,function(e,n){var i=n.prototype;t.widget(i.namespace+"."+i.widgetName,s,n._proto)}),delete o._childConstructors):n._childConstructors.push(s),t.widget.bridge(e,s),s},t.widget.extend=function(e){for(var i,r,o=n.call(arguments,1),s=0,a=o.length;a>s;s++)for(i in o[s])r=o[s][i],o[s].hasOwnProperty(i)&&void 0!==r&&(t.isPlainObject(r)?e[i]=t.isPlainObject(e[i])?t.widget.extend({},e[i],r):t.widget.extend({},r):e[i]=r);return e},t.widget.bridge=function(e,i){var r=i.prototype.widgetFullName||e;t.fn[e]=function(o){var s="string"==typeof o,a=n.call(arguments,1),l=this;return s?this.each(function(){var n,i=t.data(this,r);return"instance"===o?(l=i,!1):i?t.isFunction(i[o])&&"_"!==o.charAt(0)?(n=i[o].apply(i,a),n!==i&&void 0!==n?(l=n&&n.jquery?l.pushStack(n.get()):n,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+o+"'")}):(a.length&&(o=t.widget.extend.apply(null,[o].concat(a))),this.each(function(){var e=t.data(this,r);e?(e.option(o||{}),e._init&&e._init()):t.data(this,r,new i(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(n,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),n),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(e,n){var i,r,o,s=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(s={},i=e.split("."),e=i.shift(),i.length){for(r=s[e]=t.widget.extend({},this.options[e]),o=0;o<i.length-1;o++)r[i[o]]=r[i[o]]||{},r=r[i[o]];if(e=i.pop(),1===arguments.length)return void 0===r[e]?null:r[e];r[e]=n}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];s[e]=n}return this._setOptions(s),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!e),e&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(e,n,i){var r,o=this;"boolean"!=typeof e&&(i=n,n=e,e=!1),i?(n=r=t(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,r=this.widget()),t.each(i,function(i,s){function a(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof s?o[s]:s).apply(o,arguments):void 0}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||t.guid++);var l=i.match(/^([\w:-]*)\s*(.*)$/),u=l[1]+o.eventNamespace,c=l[2];c?r.delegate(c,u,a):n.bind(u,a)})},_off:function(e,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(n).undelegate(n),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function n(){return("string"==typeof t?i[t]:t).apply(i,arguments)}var i=this;return setTimeout(n,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,n,i){var r,o,s=this.options[e];if(i=i||{},n=t.Event(n),n.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(r in o)r in n||(n[r]=o[r]);return this.element.trigger(n,i),!(t.isFunction(s)&&s.apply(this.element[0],[n].concat(i))===!1||n.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,n){t.Widget.prototype["_"+e]=function(i,r,o){"string"==typeof r&&(r={effect:r});var s,a=r?r===!0||"number"==typeof r?n:r.effect||n:e;r=r||{},"number"==typeof r&&(r={duration:r}),s=!t.isEmptyObject(r),r.complete=o,r.delay&&i.delay(r.delay),s&&t.effects&&t.effects.effect[a]?i[e](r):a!==e&&i[a]?i[a](r.duration,r.easing,o):i.queue(function(n){t(this)[e](),o&&o.call(i[0]),n()})}}),t.widget}),/*!
 * jQuery UI Accordion 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/accordion/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?void this._activate(e):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void("disabled"===t&&(this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e))))},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var n=t.ui.keyCode,i=this.headers.length,r=this.headers.index(e.target),o=!1;switch(e.keyCode){case n.RIGHT:case n.DOWN:o=this.headers[(r+1)%i];break;case n.LEFT:case n.UP:o=this.headers[(r-1+i)%i];break;case n.SPACE:case n.ENTER:this._eventHandler(e);break;case n.HOME:o=this.headers[0];break;case n.END:o=this.headers[i-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),o.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,n=this.options,i=n.heightStyle,r=this.element.parent();this.active=this._findActive(n.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var e=t(this),n=e.uniqueId().attr("id"),i=e.next(),r=i.uniqueId().attr("id");e.attr("aria-controls",r),i.attr("aria-labelledby",n)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(n.event),"fill"===i?(e=r.height(),this.element.siblings(":visible").each(function(){var n=t(this),i=n.css("position");"absolute"!==i&&"fixed"!==i&&(e-=n.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===i&&(e=0,this.headers.next().each(function(){e=Math.max(e,t(this).css("height","").height())}).height(e))},_activate:function(e){var n=this._findActive(e)[0];n!==this.active[0]&&(n=n||this.active[0],this._eventHandler({target:n,currentTarget:n,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var n={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){n[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,n),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var n=this.options,i=this.active,r=t(e.currentTarget),o=r[0]===i[0],s=o&&n.collapsible,a=s?t():r.next(),l=i.next(),u={oldHeader:i,oldPanel:l,newHeader:s?t():r,newPanel:a};e.preventDefault(),o&&!n.collapsible||this._trigger("beforeActivate",e,u)===!1||(n.active=s?!1:this.headers.index(r),this.active=o?t():r,this._toggle(u),i.removeClass("ui-accordion-header-active ui-state-active"),n.icons&&i.children(".ui-accordion-header-icon").removeClass(n.icons.activeHeader).addClass(n.icons.header),o||(r.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),n.icons&&r.children(".ui-accordion-header-icon").removeClass(n.icons.header).addClass(n.icons.activeHeader),r.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var n=e.newPanel,i=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=n,this.prevHide=i,this.options.animate?this._animate(n,i,e):(i.hide(),n.show(),this._toggleComplete(e)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),n.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):n.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),n.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,n){var i,r,o,s=this,a=0,l=t.css("box-sizing"),u=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},h=u&&c.down||c,d=function(){s._toggleComplete(n)};return"number"==typeof h&&(o=h),"string"==typeof h&&(r=h),r=r||h.easing||c.easing,o=o||h.duration||c.duration,e.length?t.length?(i=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:r,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:o,easing:r,complete:d,step:function(t,n){n.now=Math.round(t),"height"!==n.prop?"content-box"===l&&(a+=n.now):"content"!==s.options.heightStyle&&(n.now=Math.round(i-e.outerHeight()-a),a=0)}})):e.animate(this.hideProps,o,r,d):t.animate(this.showProps,o,r,d)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})}),/*!
 * jQuery UI Position 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/position/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){return function(){function e(t,e,n){return[parseFloat(t[0])*(f.test(t[0])?e/100:1),parseFloat(t[1])*(f.test(t[1])?n/100:1)]}function n(e,n){return parseInt(t.css(e,n),10)||0}function i(e){var n=e[0];return 9===n.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(n)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var r,o,s=Math.max,a=Math.abs,l=Math.round,u=/left|center|right/,c=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,f=/%$/,p=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==r)return r;var e,n,i=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=i.children()[0];return t("body").append(i),e=o.offsetWidth,i.css("overflow","scroll"),n=o.offsetWidth,e===n&&(n=i[0].clientWidth),i.remove(),r=e-n},getScrollInfo:function(e){var n=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),i=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),r="scroll"===n||"auto"===n&&e.width<e.element[0].scrollWidth,o="scroll"===i||"auto"===i&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:r?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var n=t(e||window),i=t.isWindow(n[0]),r=!!n[0]&&9===n[0].nodeType;return{element:n,isWindow:i,isDocument:r,offset:n.offset()||{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:i||r?n.width():n.outerWidth(),height:i||r?n.height():n.outerHeight()}}},t.fn.position=function(r){if(!r||!r.of)return p.apply(this,arguments);r=t.extend({},r);var f,g,m,v,y,b,_=t(r.of),x=t.position.getWithinInfo(r.within),w=t.position.getScrollInfo(x),C=(r.collision||"flip").split(" "),k={};return b=i(_),_[0].preventDefault&&(r.at="left top"),g=b.width,m=b.height,v=b.offset,y=t.extend({},v),t.each(["my","at"],function(){var t,e,n=(r[this]||"").split(" ");1===n.length&&(n=u.test(n[0])?n.concat(["center"]):c.test(n[0])?["center"].concat(n):["center","center"]),n[0]=u.test(n[0])?n[0]:"center",n[1]=c.test(n[1])?n[1]:"center",t=h.exec(n[0]),e=h.exec(n[1]),k[this]=[t?t[0]:0,e?e[0]:0],r[this]=[d.exec(n[0])[0],d.exec(n[1])[0]]}),1===C.length&&(C[1]=C[0]),"right"===r.at[0]?y.left+=g:"center"===r.at[0]&&(y.left+=g/2),"bottom"===r.at[1]?y.top+=m:"center"===r.at[1]&&(y.top+=m/2),f=e(k.at,g,m),y.left+=f[0],y.top+=f[1],this.each(function(){var i,u,c=t(this),h=c.outerWidth(),d=c.outerHeight(),p=n(this,"marginLeft"),b=n(this,"marginTop"),T=h+p+n(this,"marginRight")+w.width,D=d+b+n(this,"marginBottom")+w.height,M=t.extend({},y),S=e(k.my,c.outerWidth(),c.outerHeight());"right"===r.my[0]?M.left-=h:"center"===r.my[0]&&(M.left-=h/2),"bottom"===r.my[1]?M.top-=d:"center"===r.my[1]&&(M.top-=d/2),M.left+=S[0],M.top+=S[1],o||(M.left=l(M.left),M.top=l(M.top)),i={marginLeft:p,marginTop:b},t.each(["left","top"],function(e,n){t.ui.position[C[e]]&&t.ui.position[C[e]][n](M,{targetWidth:g,targetHeight:m,elemWidth:h,elemHeight:d,collisionPosition:i,collisionWidth:T,collisionHeight:D,offset:[f[0]+S[0],f[1]+S[1]],my:r.my,at:r.at,within:x,elem:c})}),r.using&&(u=function(t){var e=v.left-M.left,n=e+g-h,i=v.top-M.top,o=i+m-d,l={target:{element:_,left:v.left,top:v.top,width:g,height:m},element:{element:c,left:M.left,top:M.top,width:h,height:d},horizontal:0>n?"left":e>0?"right":"center",vertical:0>o?"top":i>0?"bottom":"middle"};h>g&&a(e+n)<g&&(l.horizontal="center"),d>m&&a(i+o)<m&&(l.vertical="middle"),s(a(e),a(n))>s(a(i),a(o))?l.important="horizontal":l.important="vertical",r.using.call(this,t,l)}),c.offset(t.extend(M,{using:u}))})},t.ui.position={fit:{left:function(t,e){var n,i=e.within,r=i.isWindow?i.scrollLeft:i.offset.left,o=i.width,a=t.left-e.collisionPosition.marginLeft,l=r-a,u=a+e.collisionWidth-o-r;e.collisionWidth>o?l>0&&0>=u?(n=t.left+l+e.collisionWidth-o-r,t.left+=l-n):u>0&&0>=l?t.left=r:l>u?t.left=r+o-e.collisionWidth:t.left=r:l>0?t.left+=l:u>0?t.left-=u:t.left=s(t.left-a,t.left)},top:function(t,e){var n,i=e.within,r=i.isWindow?i.scrollTop:i.offset.top,o=e.within.height,a=t.top-e.collisionPosition.marginTop,l=r-a,u=a+e.collisionHeight-o-r;e.collisionHeight>o?l>0&&0>=u?(n=t.top+l+e.collisionHeight-o-r,t.top+=l-n):u>0&&0>=l?t.top=r:l>u?t.top=r+o-e.collisionHeight:t.top=r:l>0?t.top+=l:u>0?t.top-=u:t.top=s(t.top-a,t.top)}},flip:{left:function(t,e){var n,i,r=e.within,o=r.offset.left+r.scrollLeft,s=r.width,l=r.isWindow?r.scrollLeft:r.offset.left,u=t.left-e.collisionPosition.marginLeft,c=u-l,h=u+e.collisionWidth-s-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,f="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,p=-2*e.offset[0];0>c?(n=t.left+d+f+p+e.collisionWidth-s-o,(0>n||n<a(c))&&(t.left+=d+f+p)):h>0&&(i=t.left-e.collisionPosition.marginLeft+d+f+p-l,(i>0||a(i)<h)&&(t.left+=d+f+p))},top:function(t,e){var n,i,r=e.within,o=r.offset.top+r.scrollTop,s=r.height,l=r.isWindow?r.scrollTop:r.offset.top,u=t.top-e.collisionPosition.marginTop,c=u-l,h=u+e.collisionHeight-s-l,d="top"===e.my[1],f=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,p="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(i=t.top+f+p+g+e.collisionHeight-s-o,(0>i||i<a(c))&&(t.top+=f+p+g)):h>0&&(n=t.top-e.collisionPosition.marginTop+f+p+g-l,(n>0||a(n)<h)&&(t.top+=f+p+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,n,i,r,s,a=document.getElementsByTagName("body")[0],l=document.createElement("div");e=document.createElement(a?"div":"body"),i={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&t.extend(i,{position:"absolute",left:"-1000px",top:"-1000px"});for(s in i)e.style[s]=i[s];e.appendChild(l),n=a||document.documentElement,n.insertBefore(e,n.firstChild),l.style.cssText="position: absolute; left: 10.7432222px;",r=t(l).offset().left,o=r>10&&11>r,e.innerHTML="",n.removeChild(e)}()}(),t.ui.position}),/*!
 * jQuery UI Menu 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/menu/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position"],t):t(jQuery)}(function(t){return t.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var n=t(e.target);!this.mouseHandled&&n.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),n.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var n=t(e.currentTarget);n.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(e,n)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var n=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,n)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){var n,i,r,o,s=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:s=!1,i=this.previousFilter||"",r=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),r===i?o=!0:r=i+r,n=this._filterMenuItems(r),n=o&&-1!==n.index(this.active.next())?this.active.nextAll(".ui-menu-item"):n,n.length||(r=String.fromCharCode(e.keyCode),n=this._filterMenuItems(r)),n.length?(this.focus(e,n),this.previousFilter=r,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}s&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(t):this.select(t))},refresh:function(){var e,n,i=this,r=this.options.icons.submenu,o=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),o.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),n=e.parent(),i=t("<span>").addClass("ui-menu-icon ui-icon "+r).data("ui-menu-submenu-carat",!0);n.attr("aria-haspopup","true").prepend(i),e.attr("aria-labelledby",n.attr("id"))}),e=o.add(this.element),n=e.find(this.options.items),n.not(".ui-menu-item").each(function(){var e=t(this);i._isDivider(e)&&e.addClass("ui-widget-content ui-menu-divider")}),n.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),n.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this._super(t,e)},focus:function(t,e){var n,i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),n=e.children(".ui-menu"),n.length&&t&&/^mouse/.test(t.type)&&this._startOpening(n),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var n,i,r,o,s,a;this._hasScroll()&&(n=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,r=e.offset().top-this.activeMenu.offset().top-n-i,o=this.activeMenu.scrollTop(),s=this.activeMenu.height(),a=e.outerHeight(),0>r?this.activeMenu.scrollTop(o+r):r+a>s&&this.activeMenu.scrollTop(o+r-s+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var n=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(n)},collapseAll:function(e,n){clearTimeout(this.timer),this.timer=this._delay(function(){var i=n?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));i.length||(i=this.element),this._close(i),this.blur(e),this.activeMenu=i},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,n){var i;this.active&&(i="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),i&&i.length&&this.active||(i=this.activeMenu.find(this.options.items)[e]()),this.focus(n,i)},nextPage:function(e){var n,i,r;return this.active?void(this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,r=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return n=t(this),n.offset().top-i-r<0}),this.focus(e,n)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var n,i,r;return this.active?void(this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,r=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return n=t(this),n.offset().top-i+r>0}),this.focus(e,n)):this.focus(e,this.activeMenu.find(this.options.items).first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var n={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,n)},_filterMenuItems:function(e){var n=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),i=new RegExp("^"+n,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return i.test(t.trim(t(this).text()))})}})}),/*!
 * jQuery UI Autocomplete 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/autocomplete/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position","./menu"],t):t(jQuery)}(function(t){return t.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,n,i,r=this.element[0].nodeName.toLowerCase(),o="textarea"===r,s="input"===r;this.isMultiLine=o?!0:s?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[o||s?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(r){if(this.element.prop("readOnly"))return e=!0,i=!0,void(n=!0);e=!1,i=!1,n=!1;var o=t.ui.keyCode;switch(r.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",r);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",r);break;case o.UP:e=!0,this._keyEvent("previous",r);break;case o.DOWN:e=!0,this._keyEvent("next",r);break;case o.ENTER:this.menu.active&&(e=!0,r.preventDefault(),this.menu.select(r));break;case o.TAB:this.menu.active&&this.menu.select(r);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(r),r.preventDefault());break;default:n=!0,this._searchTimeout(r)}},keypress:function(i){if(e)return e=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&i.preventDefault());if(!n){var r=t.ui.keyCode;switch(i.keyCode){case r.PAGE_UP:this._move("previousPage",i);break;case r.PAGE_DOWN:this._move("nextPage",i);break;case r.UP:this._keyEvent("previous",i);break;case r.DOWN:this._keyEvent("next",i)}}},input:function(t){return i?(i=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),void this._change(t))}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var n=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(i){i.target===e.element[0]||i.target===n||t.contains(n,i.target)||e.close()})})},menufocus:function(e,n){var i,r;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)})):(r=n.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:r})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(r.value),i=n.item.attr("aria-label")||r.value,void(i&&t.trim(i).length&&(this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))))},menuselect:function(t,e){var n=e.item.data("ui-autocomplete-item"),i=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=i,this._delay(function(){this.previous=i,this.selectedItem=n})),!1!==this._trigger("select",t,{item:n})&&this._value(n.value),this.term=this._value(),this.close(t),this.selectedItem=n}}),this.liveRegion=t("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,n,i=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(n,i){i(t.ui.autocomplete.filter(e,n.term))}):"string"==typeof this.options.source?(n=this.options.source,this.source=function(e,r){i.xhr&&i.xhr.abort(),i.xhr=t.ajax({url:n,data:e,dataType:"json",success:function(t){r(t)},error:function(){r([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),n=this.menu.element.is(":visible"),i=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!n&&!i)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var n=this.menu.element.empty();this._renderMenu(n,e),this.isNewMenu=!0,this.menu.refresh(),n.show(),this._resizeMenu(),n.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,n){var i=this;t.each(n,function(t,n){i._renderItemData(e,n)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,n){return t("<li>").text(n.label).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e):void this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,n){var i=new RegExp(t.ui.autocomplete.escapeRegex(n),"i");return t.grep(e,function(t){return i.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var n;this._superApply(arguments),this.options.disabled||this.cancelSearch||(n=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(n).appendTo(this.liveRegion))}}),t.ui.autocomplete}),/*!
 * jQuery UI Button 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/button/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],t):t(jQuery)}(function(t){var e,n="ui-button ui-widget ui-state-default ui-corner-all",i="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",r=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},o=function(e){var n=e.name,i=e.form,r=t([]);return n&&(n=n.replace(/'/g,"\\'"),r=i?t(i).find("[name='"+n+"'][type=radio]"):t("[name='"+n+"'][type=radio]",e.ownerDocument).filter(function(){return!this.form})),r};return t.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",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,r),"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 i=this,s=this.options,a="checkbox"===this.type||"radio"===this.type,l=a?"":"ui-state-active";null===s.label&&(s.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(n).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){s.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){s.disabled||t(this).removeClass(l)}).bind("click"+this.eventNamespace,function(t){s.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(){i.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return s.disabled?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(s.disabled)return!1;t(this).addClass("ui-state-active"),i.buttonElement.attr("aria-pressed","true");var e=i.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 s.disabled?!1:(t(this).addClass("ui-state-active"),e=this,void i.document.one("mouseup",function(){e=null}))}).bind("mouseup"+this.eventNamespace,function(){return s.disabled?!1:void t(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(e){return s.disabled?!1:void((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"))}).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",s.disabled),this._resetButton()},_determineButtonType:function(){var t,e,n;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="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"),n=this.element.is(":checked"),n&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",n)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(n+" ui-state-active "+i).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.widget().toggleClass("ui-state-disabled",!!e),this.element.prop("disabled",!!e),void(e&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")))):void this._resetButton()},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 void(this.options.label&&this.element.val(this.options.label));var e=this.buttonElement.removeClass(i),n=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),r=this.options.icons,o=r.primary&&r.secondary,s=[];r.primary||r.secondary?(this.options.text&&s.push("ui-button-text-icon"+(o?"s":r.primary?"-primary":"-secondary")),r.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+r.primary+"'></span>"),r.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+r.secondary+"'></span>"),this.options.text||(s.push(o?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(n)))):s.push("ui-button-text-only"),e.addClass(s.join(" "))}}),t.widget("ui.buttonset",{version:"1.11.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"),n=this.element.find(this.options.items),i=n.filter(":ui-button");n.not(":ui-button").button(),i.button("refresh"),this.buttons=n.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")}}),t.ui.button}),/*!
 * jQuery UI Datepicker 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/datepicker/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core"],t):t(jQuery)}(function(t){function e(t){for(var e,n;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(n=parseInt(t.css("zIndex"),10),!isNaN(n)&&0!==n))return n;t=t.parent()}return 0}function n(){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.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=i(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function i(e){var n="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(n,"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(n,"mouseover",r)}function r(){t.datepicker._isDisabledDatepicker(s.inline?s.dpDiv.parent()[0]:s.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 o(e,n){t.extend(e,n);for(var i in n)null==n[i]&&(e[i]=n[i]);return e}t.extend(t.ui,{datepicker:{version:"1.11.4"}});var s;return t.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return o(this._defaults,t||{}),this},_attachDatepicker:function(e,n){var i,r,o;i=e.nodeName.toLowerCase(),r="div"===i||"span"===i,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),r),o.settings=t.extend({},n||{}),"input"===i?this._connectDatepicker(e,o):r&&this._inlineDatepicker(e,o)},_newInst:function(e,n){var r=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:r,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:n,dpDiv:n?i(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,n){var i=t(e);n.append=t([]),n.trigger=t([]),i.hasClass(this.markerClassName)||(this._attachments(i,n),i.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(n),t.data(e,"datepicker",n),n.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,n){var i,r,o,s=this._get(n,"appendText"),a=this._get(n,"isRTL");n.append&&n.append.remove(),s&&(n.append=t("<span class='"+this._appendClass+"'>"+s+"</span>"),e[a?"before":"after"](n.append)),e.unbind("focus",this._showDatepicker),n.trigger&&n.trigger.remove(),i=this._get(n,"showOn"),("focus"===i||"both"===i)&&e.focus(this._showDatepicker),("button"===i||"both"===i)&&(r=this._get(n,"buttonText"),o=this._get(n,"buttonImage"),n.trigger=t(this._get(n,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:r,title:r}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:r,title:r}):r)),e[a?"before":"after"](n.trigger),n.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,n,i,r,o=new Date(2009,11,20),s=this._get(t,"dateFormat");s.match(/[DM]/)&&(e=function(t){for(n=0,i=0,r=0;r<t.length;r++)t[r].length>n&&(n=t[r].length,i=r);return i},o.setMonth(e(this._get(t,s.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,s.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,n){var i=t(e);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(n.dpDiv),t.data(e,"datepicker",n),this._setDate(n,this._getDefaultDate(n),!0),this._updateDatepicker(n),this._updateAlternate(n),n.settings.disabled&&this._disableDatepicker(e),n.dpDiv.css("display","block"))},_dialogDatepicker:function(e,n,i,r,s){var a,l,u,c,h,d=this._dialogInst;return d||(this.uuid+=1,a="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+a+"' style='position: absolute; top: -100px; width: 0px;'/>"),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],"datepicker",d)),o(d.settings,r||{}),n=n&&n.constructor===Date?this._formatDate(d,n):n,this._dialogInput.val(n),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,this._pos||(l=document.documentElement.clientWidth,u=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,h=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+c,u/2-150+h]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var n,i=t(e),r=t.data(e,"datepicker");i.hasClass(this.markerClassName)&&(n=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===n?(r.append.remove(),r.trigger.remove(),i.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===n||"span"===n)&&i.removeClass(this.markerClassName).empty(),s===r&&(s=null))},_enableDatepicker:function(e){var n,i,r=t(e),o=t.data(e,"datepicker");r.hasClass(this.markerClassName)&&(n=e.nodeName.toLowerCase(),"input"===n?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===n||"span"===n)&&(i=r.children("."+this._inlineClass),i.children().removeClass("ui-state-disabled"),i.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 n,i,r=t(e),o=t.data(e,"datepicker");r.hasClass(this.markerClassName)&&(n=e.nodeName.toLowerCase(),"input"===n?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===n||"span"===n)&&(i=r.children("."+this._inlineClass),i.children().addClass("ui-state-disabled"),i.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;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(n){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,n,i){var r,s,a,l,u=this._getInst(e);return 2===arguments.length&&"string"==typeof n?"defaults"===n?t.extend({},t.datepicker._defaults):u?"all"===n?t.extend({},u.settings):this._get(u,n):null:(r=n||{},"string"==typeof n&&(r={},r[n]=i),void(u&&(this._curInst===u&&this._hideDatepicker(),s=this._getDateDatepicker(e,!0),a=this._getMinMaxDate(u,"min"),l=this._getMinMaxDate(u,"max"),o(u.settings,r),null!==a&&void 0!==r.dateFormat&&void 0===r.minDate&&(u.settings.minDate=this._formatDate(u,a)),null!==l&&void 0!==r.dateFormat&&void 0===r.maxDate&&(u.settings.maxDate=this._formatDate(u,l)),"disabled"in r&&(r.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),u),this._autoSize(u),this._setDate(u,s),this._updateAlternate(u),this._updateDatepicker(u))))},_changeDatepicker:function(t,e,n){this._optionDatepicker(t,e,n)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var n=this._getInst(t);n&&(this._setDate(n,e),this._updateDatepicker(n),this._updateAlternate(n))},_getDateDatepicker:function(t,e){var n=this._getInst(t);return n&&!n.inline&&this._setDateFromField(n,e),n?this._getDate(n):null},_doKeyDown:function(e){var n,i,r,o=t.datepicker._getInst(e.target),s=!0,a=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),s=!1;break;case 13:return r=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),r[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,r[0]),n=t.datepicker._get(o,"onSelect"),n?(i=t.datepicker._formatDate(o),n.apply(o.input?o.input[0]:null,[i,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),s=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),s=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?1:-1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),s=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?-1:1,"D"),s=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),s=e.ctrlKey||e.metaKey;break;default:s=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):s=!1;s&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var n,i,r=t.datepicker._getInst(e.target);return t.datepicker._get(r,"constrainInput")?(n=t.datepicker._possibleChars(t.datepicker._get(r,"dateFormat")),i=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">i||!n||n.indexOf(i)>-1):void 0},_doKeyUp:function(e){var n,i=t.datepicker._getInst(e.target);if(i.input.val()!==i.lastVal)try{n=t.datepicker.parseDate(t.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,t.datepicker._getFormatConfig(i)),n&&(t.datepicker._setDateFromField(i),t.datepicker._updateAlternate(i),t.datepicker._updateDatepicker(i))}catch(r){}return!0},_showDatepicker:function(n){if(n=n.target||n,"input"!==n.nodeName.toLowerCase()&&(n=t("input",n.parentNode)[0]),!t.datepicker._isDisabledDatepicker(n)&&t.datepicker._lastInput!==n){var i,r,s,a,l,u,c;i=t.datepicker._getInst(n),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])),r=t.datepicker._get(i,"beforeShow"),s=r?r.apply(n,[n,i]):{},s!==!1&&(o(i.settings,s),i.lastVal=null,t.datepicker._lastInput=n,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(n.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(n),t.datepicker._pos[1]+=n.offsetHeight),a=!1,t(n).parents().each(function(){return a|="fixed"===t(this).css("position"),!a}),l={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),l=t.datepicker._checkOffset(i,l,a),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":a?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),i.inline||(u=t.datepicker._get(i,"showAnim"),c=t.datepicker._get(i,"duration"),i.dpDiv.css("z-index",e(t(n))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[u]?i.dpDiv.show(u,t.datepicker._get(i,"showOptions"),c):i.dpDiv[u||"show"](u?c:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,s=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var n,i=this._getNumberOfMonths(e),o=i[1],a=17,l=e.dpDiv.find("."+this._dayOverClass+" a");l.length>0&&r.apply(l.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),o>1&&e.dpDiv.addClass("ui-datepicker-multi-"+o).css("width",a*o+"em"),e.dpDiv[(1!==i[0]||1!==i[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&&(n=e.yearshtml,setTimeout(function(){n===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),n=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,n,i){var r=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),s=e.input?e.input.outerWidth():0,a=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(i?0:t(document).scrollLeft()),u=document.documentElement.clientHeight+(i?0:t(document).scrollTop());return n.left-=this._get(e,"isRTL")?r-s:0,n.left-=i&&n.left===e.input.offset().left?t(document).scrollLeft():0,n.top-=i&&n.top===e.input.offset().top+a?t(document).scrollTop():0,n.left-=Math.min(n.left,n.left+r>l&&l>r?Math.abs(n.left+r-l):0),n.top-=Math.min(n.top,n.top+o>u&&u>o?Math.abs(o+a):0),n},_findPos:function(e){for(var n,i=this._getInst(e),r=this._get(i,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[r?"previousSibling":"nextSibling"];return n=t(e).offset(),[n.left,n.top]},_hideDatepicker:function(e){var n,i,r,o,s=this._curInst;!s||e&&s!==t.data(e,"datepicker")||this._datepickerShowing&&(n=this._get(s,"showAnim"),i=this._get(s,"duration"),r=function(){t.datepicker._tidyDialog(s)},t.effects&&(t.effects.effect[n]||t.effects[n])?s.dpDiv.hide(n,t.datepicker._get(s,"showOptions"),i,r):s.dpDiv["slideDown"===n?"slideUp":"fadeIn"===n?"fadeOut":"hide"](n?i:null,r),n||r(),this._datepickerShowing=!1,o=this._get(s,"onClose"),o&&o.apply(s.input?s.input[0]:null,[s.input?s.input.val():"",s]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),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 n=t(e.target),i=t.datepicker._getInst(n[0]);(n[0].id!==t.datepicker._mainDivId&&0===n.parents("#"+t.datepicker._mainDivId).length&&!n.hasClass(t.datepicker.markerClassName)&&!n.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||n.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==i)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,n,i){var r=t(e),o=this._getInst(r[0]);this._isDisabledDatepicker(r[0])||(this._adjustInstDate(o,n+("M"===i?this._get(o,"showCurrentAtPos"):0),i),this._updateDatepicker(o))},_gotoToday:function(e){var n,i=t(e),r=this._getInst(i[0]);this._get(r,"gotoCurrent")&&r.currentDay?(r.selectedDay=r.currentDay,r.drawMonth=r.selectedMonth=r.currentMonth,r.drawYear=r.selectedYear=r.currentYear):(n=new Date,r.selectedDay=n.getDate(),r.drawMonth=r.selectedMonth=n.getMonth(),r.drawYear=r.selectedYear=n.getFullYear()),this._notifyChange(r),this._adjustDate(i)},_selectMonthYear:function(e,n,i){var r=t(e),o=this._getInst(r[0]);o["selected"+("M"===i?"Month":"Year")]=o["draw"+("M"===i?"Month":"Year")]=parseInt(n.options[n.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(r)},_selectDay:function(e,n,i,r){var o,s=t(e);t(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||(o=this._getInst(s[0]),o.selectedDay=o.currentDay=t("a",r).html(),o.selectedMonth=o.currentMonth=n,o.selectedYear=o.currentYear=i,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var n=t(e);this._selectDate(n,"")},_selectDate:function(e,n){var i,r=t(e),o=this._getInst(r[0]);n=null!=n?n:this._formatDate(o),o.input&&o.input.val(n),this._updateAlternate(o),i=this._get(o,"onSelect"),i?i.apply(o.input?o.input[0]:null,[n,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 n,i,r,o=this._get(e,"altField");o&&(n=this._get(e,"altFormat")||this._get(e,"dateFormat"),i=this._getDate(e),r=this.formatDate(n,i,this._getFormatConfig(e)),t(o).each(function(){t(this).val(r)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,n=new Date(t.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),e=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((e-n)/864e5)/7)+1},parseDate:function(e,n,i){if(null==e||null==n)throw"Invalid arguments";if(n="object"==typeof n?n.toString():n+"",""===n)return null;var r,o,s,a,l=0,u=(i?i.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof u?u:(new Date).getFullYear()%100+parseInt(u,10),h=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,d=(i?i.dayNames:null)||this._defaults.dayNames,f=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,p=(i?i.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,v=-1,y=-1,b=!1,_=function(t){var n=r+1<e.length&&e.charAt(r+1)===t;return n&&r++,n},x=function(t){var e=_(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,r="y"===t?i:1,o=new RegExp("^\\d{"+r+","+i+"}"),s=n.substring(l).match(o);if(!s)throw"Missing number at position "+l;return l+=s[0].length,parseInt(s[0],10)},w=function(e,i,r){var o=-1,s=t.map(_(e)?r:i,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(s,function(t,e){var i=e[1];return n.substr(l,i.length).toLowerCase()===i.toLowerCase()?(o=e[0],l+=i.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+l},C=function(){if(n.charAt(l)!==e.charAt(r))throw"Unexpected literal at position "+l;l++};for(r=0;r<e.length;r++)if(b)"'"!==e.charAt(r)||_("'")?C():b=!1;else switch(e.charAt(r)){case"d":v=x("d");break;case"D":w("D",h,d);break;case"o":y=x("o");break;case"m":m=x("m");break;case"M":m=w("M",f,p);break;case"y":g=x("y");break;case"@":a=new Date(x("@")),g=a.getFullYear(),m=a.getMonth()+1,v=a.getDate();break;case"!":a=new Date((x("!")-this._ticksTo1970)/1e4),g=a.getFullYear(),m=a.getMonth()+1,v=a.getDate();break;case"'":_("'")?C():b=!0;break;default:C()}if(l<n.length&&(s=n.substr(l),!/^\s+/.test(s)))throw"Extra/unparsed characters found in date: "+s;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(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,n){if(!e)return"";var i,r=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,o=(n?n.dayNames:null)||this._defaults.dayNames,s=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,a=(n?n.monthNames:null)||this._defaults.monthNames,l=function(e){var n=i+1<t.length&&t.charAt(i+1)===e;return n&&i++,n},u=function(t,e,n){var i=""+e;if(l(t))for(;i.length<n;)i="0"+i;return i},c=function(t,e,n,i){return l(t)?i[e]:n[e]},h="",d=!1;if(e)for(i=0;i<t.length;i++)if(d)"'"!==t.charAt(i)||l("'")?h+=t.charAt(i):d=!1;else switch(t.charAt(i)){case"d":h+=u("d",e.getDate(),2);break;case"D":h+=c("D",e.getDay(),r,o);break;case"o":h+=u("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":h+=u("m",e.getMonth()+1,2);break;case"M":h+=c("M",e.getMonth(),s,a);break;case"y":h+=l("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case"@":h+=e.getTime();break;case"!":h+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?h+="'":d=!0;break;default:h+=t.charAt(i)}return h},_possibleChars:function(t){var e,n="",i=!1,r=function(n){var i=e+1<t.length&&t.charAt(e+1)===n;return i&&e++,i};for(e=0;e<t.length;e++)if(i)"'"!==t.charAt(e)||r("'")?n+=t.charAt(e):i=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":n+="0123456789";break;case"D":case"M":return null;case"'":r("'")?n+="'":i=!0;break;default:n+=t.charAt(e)}return n},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var n=this._get(t,"dateFormat"),i=t.lastVal=t.input?t.input.val():null,r=this._getDefaultDate(t),o=r,s=this._getFormatConfig(t);try{o=this.parseDate(n,i,s)||r}catch(a){i=e?"":i}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=i?o.getDate():0,t.currentMonth=i?o.getMonth():0,t.currentYear=i?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,n,i){var r=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(n){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),n,t.datepicker._getFormatConfig(e))}catch(i){}for(var r=(n.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=r.getFullYear(),s=r.getMonth(),a=r.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,u=l.exec(n);u;){switch(u[2]||"d"){case"d":case"D":a+=parseInt(u[1],10);break;case"w":case"W":a+=7*parseInt(u[1],10);break;case"m":case"M":s+=parseInt(u[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,s));break;case"y":case"Y":o+=parseInt(u[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(o,s))}u=l.exec(n)}return new Date(o,s,a)},s=null==n||""===n?i:"string"==typeof n?o(n):"number"==typeof n?isNaN(n)?i:r(n):new Date(n.getTime());return s=s&&"Invalid Date"===s.toString()?i:s,s&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,n){var i=!e,r=t.selectedMonth,o=t.selectedYear,s=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=s.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=s.getMonth(),t.drawYear=t.selectedYear=t.currentYear=s.getFullYear(),r===t.selectedMonth&&o===t.selectedYear||n||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(i?"":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 n=this._get(e,"stepMonths"),i="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(i,-n,"M")},next:function(){t.datepicker._adjustDate(i,+n,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(i)},selectDay:function(){return t.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(i,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,n,i,r,o,s,a,l,u,c,h,d,f,p,g,m,v,y,b,_,x,w,C,k,T,D,M,S,E,N,A,j,I,$,P,H,F,L,z,O=new Date,R=this._daylightSavingAdjust(new Date(O.getFullYear(),O.getMonth(),O.getDate())),q=this._get(t,"isRTL"),W=this._get(t,"showButtonPanel"),B=this._get(t,"hideIfNoPrevNext"),U=this._get(t,"navigationAsDateFormat"),Y=this._getNumberOfMonths(t),X=this._get(t,"showCurrentAtPos"),V=this._get(t,"stepMonths"),Q=1!==Y[0]||1!==Y[1],K=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),Z=this._getMinMaxDate(t,"max"),J=t.drawMonth-X,tt=t.drawYear;if(0>J&&(J+=12,tt--),Z)for(e=this._daylightSavingAdjust(new Date(Z.getFullYear(),Z.getMonth()-Y[0]*Y[1]+1,Z.getDate())),e=G&&G>e?G:e;this._daylightSavingAdjust(new Date(tt,J,1))>e;)J--,0>J&&(J=11,tt--);for(t.drawMonth=J,t.drawYear=tt,n=this._get(t,"prevText"),n=U?this.formatDate(n,this._daylightSavingAdjust(new Date(tt,J-V,1)),this._getFormatConfig(t)):n,i=this._canAdjustMonth(t,-1,tt,J)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(q?"e":"w")+"'>"+n+"</span></a>":B?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(q?"e":"w")+"'>"+n+"</span></a>",r=this._get(t,"nextText"),r=U?this.formatDate(r,this._daylightSavingAdjust(new Date(tt,J+V,1)),this._getFormatConfig(t)):r,o=this._canAdjustMonth(t,1,tt,J)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(q?"w":"e")+"'>"+r+"</span></a>":B?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(q?"w":"e")+"'>"+r+"</span></a>",s=this._get(t,"currentText"),a=this._get(t,"gotoCurrent")&&t.currentDay?K:R,s=U?this.formatDate(s,a,this._getFormatConfig(t)):s,l=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",u=W?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(q?l:"")+(this._isInRange(t,a)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+s+"</button>":"")+(q?"":l)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,h=this._get(t,"showWeek"),d=this._get(t,"dayNames"),f=this._get(t,"dayNamesMin"),p=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),_="",w=0;w<Y[0];w++){for(C="",this.maxRows=4,k=0;k<Y[1];k++){if(T=this._daylightSavingAdjust(new Date(tt,J,t.selectedDay)),D=" ui-corner-all",M="",Q){if(M+="<div class='ui-datepicker-group",Y[1]>1)switch(k){case 0:M+=" ui-datepicker-group-first",D=" ui-corner-"+(q?"right":"left");break;case Y[1]-1:M+=" ui-datepicker-group-last",D=" ui-corner-"+(q?"left":"right");break;default:M+=" ui-datepicker-group-middle",D=""}M+="'>"}for(M+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+D+"'>"+(/all|left/.test(D)&&0===w?q?o:i:"")+(/all|right/.test(D)&&0===w?q?i:o:"")+this._generateMonthYearHeader(t,J,tt,G,Z,w>0||k>0,p,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",S=h?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",x=0;7>x;x++)E=(x+c)%7,S+="<th scope='col'"+((x+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[E]+"'>"+f[E]+"</span></th>";for(M+=S+"</tr></thead><tbody>",N=this._getDaysInMonth(tt,J),tt===t.selectedYear&&J===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,N)),A=(this._getFirstDayOfMonth(tt,J)-c+7)%7,j=Math.ceil((A+N)/7),I=Q&&this.maxRows>j?this.maxRows:j,this.maxRows=I,$=this._daylightSavingAdjust(new Date(tt,J,1-A)),P=0;I>P;P++){for(M+="<tr>",H=h?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")($)+"</td>":"",x=0;7>x;x++)F=m?m.apply(t.input?t.input[0]:null,[$]):[!0,""],L=$.getMonth()!==J,z=L&&!y||!F[0]||G&&G>$||Z&&$>Z,H+="<td class='"+((x+c+6)%7>=5?" ui-datepicker-week-end":"")+(L?" ui-datepicker-other-month":"")+($.getTime()===T.getTime()&&J===t.selectedMonth&&t._keyEvent||b.getTime()===$.getTime()&&b.getTime()===T.getTime()?" "+this._dayOverClass:"")+(z?" "+this._unselectableClass+" ui-state-disabled":"")+(L&&!v?"":" "+F[1]+($.getTime()===K.getTime()?" "+this._currentClass:"")+($.getTime()===R.getTime()?" ui-datepicker-today":""))+"'"+(L&&!v||!F[2]?"":" title='"+F[2].replace(/'/g,"&#39;")+"'")+(z?"":" data-handler='selectDay' data-event='click' data-month='"+$.getMonth()+"' data-year='"+$.getFullYear()+"'")+">"+(L&&!v?"&#xa0;":z?"<span class='ui-state-default'>"+$.getDate()+"</span>":"<a class='ui-state-default"+($.getTime()===R.getTime()?" ui-state-highlight":"")+($.getTime()===K.getTime()?" ui-state-active":"")+(L?" ui-priority-secondary":"")+"' href='#'>"+$.getDate()+"</a>")+"</td>",$.setDate($.getDate()+1),$=this._daylightSavingAdjust($);M+=H+"</tr>"}J++,J>11&&(J=0,tt++),M+="</tbody></table>"+(Q?"</div>"+(Y[0]>0&&k===Y[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),C+=M}_+=C}return _+=u,t._keyEvent=!1,_},_generateMonthYearHeader:function(t,e,n,i,r,o,s,a){var l,u,c,h,d,f,p,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),y=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",_="";if(o||!m)_+="<span class='ui-datepicker-month'>"+s[e]+"</span>";else{for(l=i&&i.getFullYear()===n,u=r&&r.getFullYear()===n,_+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!l||c>=i.getMonth())&&(!u||c<=r.getMonth())&&(_+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+a[c]+"</option>");_+="</select>"}if(y||(b+=_+(!o&&m&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+n+"</span>";else{for(h=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),f=function(t){var e=t.match(/c[+\-].*/)?n+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},p=f(h[0]),g=Math.max(p,f(h[1]||"")),p=i?Math.max(p,i.getFullYear()):p,g=r?Math.min(g,r.getFullYear()):g,
t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=p;p++)t.yearshtml+="<option value='"+p+"'"+(p===n?" selected='selected'":"")+">"+p+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),y&&(b+=(!o&&m&&v?"":"&#xa0;")+_),b+="</div>"},_adjustInstDate:function(t,e,n){var i=t.drawYear+("Y"===n?e:0),r=t.drawMonth+("M"===n?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(i,r))+("D"===n?e:0),s=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(i,r,o)));t.selectedDay=s.getDate(),t.drawMonth=t.selectedMonth=s.getMonth(),t.drawYear=t.selectedYear=s.getFullYear(),("M"===n||"Y"===n)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var n=this._getMinMaxDate(t,"min"),i=this._getMinMaxDate(t,"max"),r=n&&n>e?n:e;return i&&r>i?i:r},_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,n,i){var r=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(n,i+(0>e?e:r[0]*r[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var n,i,r=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),s=null,a=null,l=this._get(t,"yearRange");return l&&(n=l.split(":"),i=(new Date).getFullYear(),s=parseInt(n[0],10),a=parseInt(n[1],10),n[0].match(/[+\-].*/)&&(s+=i),n[1].match(/[+\-].*/)&&(a+=i)),(!r||e.getTime()>=r.getTime())&&(!o||e.getTime()<=o.getTime())&&(!s||e.getFullYear()>=s)&&(!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,n,i){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var r=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(i,n,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),r,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 n=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(n)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(n)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(n))},t.datepicker=new n,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.11.4",t.datepicker}),/*!
 * jQuery UI Mouse 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/mouse/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./widget"],t):t(jQuery)}(function(t){var e=!1;return t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(n){return!0===t.data(n.target,e.widgetName+".preventClickEvent")?(t.removeData(n.target,e.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(n){if(!e){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(n),this._mouseDownEvent=n;var i=this,r=1===n.which,o="string"==typeof this.options.cancel&&n.target.nodeName?t(n.target).closest(this.options.cancel).length:!1;return r&&!o&&this._mouseCapture(n)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(n)&&this._mouseDelayMet(n)&&(this._mouseStarted=this._mouseStart(n)!==!1,!this._mouseStarted)?(n.preventDefault(),!0):(!0===t.data(n.target,this.widgetName+".preventClickEvent")&&t.removeData(n.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),n.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(n){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,n.target===this._mouseDownEvent.target&&t.data(n.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(n)),e=!1,!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}),/*!
 * jQuery UI Draggable 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/draggable/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.draggable",t.ui.mouse,{version:"1.11.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&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(e){var n=this.options;return this._blurActiveElement(e),this.helper||n.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blockFrames(n.iframeFix===!0?"iframe":n.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var n=this.document[0];if(this.handleElement.is(e.target))try{n.activeElement&&"body"!==n.activeElement.nodeName.toLowerCase()&&t(n.activeElement).blur()}catch(i){}},_mouseStart:function(e){var n=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(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._normalizeRightBottom(),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,n){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!n){var i=this._uiHash();if(this._trigger("drag",e,i)===!1)return this._mouseUp({}),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var n=this,i=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(i=t.ui.ddmanager.drop(this,e)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){n._trigger("stop",e)!==!1&&n._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.focus(),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},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(e){var n=this.options,i=t.isFunction(n.helper),r=i?t(n.helper.apply(this.element[0],[e])):"clone"===n.helper?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo("parent"===n.appendTo?this.element[0].parentNode:n.appendTo),i&&r[0]===this.element[0]&&this._setPositionRelative(),r[0]===this.element[0]||/(fixed|absolute)/.test(r.css("position"))||r.css("position","absolute"),r},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_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)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),n=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==n&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(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)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_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,n,i,r=this.options,o=this.document[0];return this.relativeContainer=null,r.containment?"window"===r.containment?void(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()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===r.containment?void(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):r.containment.constructor===Array?void(this.containment=r.containment):("parent"===r.containment&&(r.containment=this.helper[0].parentNode),n=t(r.containment),i=n[0],void(i&&(e=/(scroll|auto)/.test(n.css("overflow")),this.containment=[(parseInt(n.css("borderLeftWidth"),10)||0)+(parseInt(n.css("paddingLeft"),10)||0),(parseInt(n.css("borderTopWidth"),10)||0)+(parseInt(n.css("paddingTop"),10)||0),(e?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(n.css("borderRightWidth"),10)||0)-(parseInt(n.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(n.css("borderBottomWidth"),10)||0)-(parseInt(n.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=n))):void(this.containment=null)},_convertPositionTo:function(t,e){e||(e=this.position);var n="absolute"===t?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.offset.scroll.top:i?0:this.offset.scroll.top)*n,left:e.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.offset.scroll.left:i?0:this.offset.scroll.left)*n}},_generatePosition:function(t,e){var n,i,r,o,s=this.options,a=this._isRootNode(this.scrollParent[0]),l=t.pageX,u=t.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(i=this.relativeContainer.offset(),n=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):n=this.containment,t.pageX-this.offset.click.left<n[0]&&(l=n[0]+this.offset.click.left),t.pageY-this.offset.click.top<n[1]&&(u=n[1]+this.offset.click.top),t.pageX-this.offset.click.left>n[2]&&(l=n[2]+this.offset.click.left),t.pageY-this.offset.click.top>n[3]&&(u=n[3]+this.offset.click.top)),s.grid&&(r=s.grid[1]?this.originalPageY+Math.round((u-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,u=n?r-this.offset.click.top>=n[1]||r-this.offset.click.top>n[3]?r:r-this.offset.click.top>=n[1]?r-s.grid[1]:r+s.grid[1]:r,o=s.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,l=n?o-this.offset.click.left>=n[0]||o-this.offset.click.left>n[2]?o:o-this.offset.click.left>=n[0]?o-s.grid[0]:o+s.grid[0]:o),"y"===s.axis&&(l=this.originalPageX),"x"===s.axis&&(u=this.originalPageY)),{top:u-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0: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,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(e,n,i){return i=i||this._uiHash(),t.ui.plugin.call(this,e,[n,i,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,n,i)},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,n,i){var r=t.extend({},n,{item:i.element});i.sortables=[],t(i.options.connectToSortable).each(function(){var n=t(this).sortable("instance");n&&!n.options.disabled&&(i.sortables.push(n),n.refreshPositions(),n._trigger("activate",e,r))})},stop:function(e,n,i){var r=t.extend({},n,{item:i.element});i.cancelHelperRemoval=!1,t.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,r))})},drag:function(e,n,i){t.each(i.sortables,function(){var r=!1,o=this;o.positionAbs=i.positionAbs,o.helperProportions=i.helperProportions,o.offset.click=i.offset.click,o._intersectsWith(o.containerCache)&&(r=!0,t.each(i.sortables,function(){return this.positionAbs=i.positionAbs,this.helperProportions=i.helperProportions,this.offset.click=i.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(r=!1),r})),r?(o.isOver||(o.isOver=1,i._parent=n.helper.parent(),o.currentItem=n.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return n.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=i.offset.click.top,o.offset.click.left=i.offset.click.left,o.offset.parent.left-=i.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=i.offset.parent.top-o.offset.parent.top,i._trigger("toSortable",e),i.dropped=o.element,t.each(i.sortables,function(){this.refreshPositions()}),i.currentItem=i.element,o.fromOutside=i),o.currentItem&&(o._mouseDrag(e),n.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),n.helper.appendTo(i._parent),i._refreshOffsets(e),n.position=i._generatePosition(e,!0),i._trigger("fromSortable",e),i.dropped=!1,t.each(i.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,n,i){var r=t("body"),o=i.options;r.css("cursor")&&(o._cursor=r.css("cursor")),r.css("cursor",o.cursor)},stop:function(e,n,i){var r=i.options;r._cursor&&t("body").css("cursor",r._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,n,i){var r=t(n.helper),o=i.options;r.css("opacity")&&(o._opacity=r.css("opacity")),r.css("opacity",o.opacity)},stop:function(e,n,i){var r=i.options;r._opacity&&t(n.helper).css("opacity",r._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(e,n,i){var r=i.options,o=!1,s=i.scrollParentNotHidden[0],a=i.document[0];s!==a&&"HTML"!==s.tagName?(r.axis&&"x"===r.axis||(i.overflowOffset.top+s.offsetHeight-e.pageY<r.scrollSensitivity?s.scrollTop=o=s.scrollTop+r.scrollSpeed:e.pageY-i.overflowOffset.top<r.scrollSensitivity&&(s.scrollTop=o=s.scrollTop-r.scrollSpeed)),r.axis&&"y"===r.axis||(i.overflowOffset.left+s.offsetWidth-e.pageX<r.scrollSensitivity?s.scrollLeft=o=s.scrollLeft+r.scrollSpeed:e.pageX-i.overflowOffset.left<r.scrollSensitivity&&(s.scrollLeft=o=s.scrollLeft-r.scrollSpeed))):(r.axis&&"x"===r.axis||(e.pageY-t(a).scrollTop()<r.scrollSensitivity?o=t(a).scrollTop(t(a).scrollTop()-r.scrollSpeed):t(window).height()-(e.pageY-t(a).scrollTop())<r.scrollSensitivity&&(o=t(a).scrollTop(t(a).scrollTop()+r.scrollSpeed))),r.axis&&"y"===r.axis||(e.pageX-t(a).scrollLeft()<r.scrollSensitivity?o=t(a).scrollLeft(t(a).scrollLeft()-r.scrollSpeed):t(window).width()-(e.pageX-t(a).scrollLeft())<r.scrollSensitivity&&(o=t(a).scrollLeft(t(a).scrollLeft()+r.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,n,i){var r=i.options;i.snapElements=[],t(r.snap.constructor!==String?r.snap.items||":data(ui-draggable)":r.snap).each(function(){var e=t(this),n=e.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:n.top,left:n.left})})},drag:function(e,n,i){var r,o,s,a,l,u,c,h,d,f,p=i.options,g=p.snapTolerance,m=n.offset.left,v=m+i.helperProportions.width,y=n.offset.top,b=y+i.helperProportions.height;for(d=i.snapElements.length-1;d>=0;d--)l=i.snapElements[d].left-i.margins.left,u=l+i.snapElements[d].width,c=i.snapElements[d].top-i.margins.top,h=c+i.snapElements[d].height,l-g>v||m>u+g||c-g>b||y>h+g||!t.contains(i.snapElements[d].item.ownerDocument,i.snapElements[d].item)?(i.snapElements[d].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,e,t.extend(i._uiHash(),{snapItem:i.snapElements[d].item})),i.snapElements[d].snapping=!1):("inner"!==p.snapMode&&(r=Math.abs(c-b)<=g,o=Math.abs(h-y)<=g,s=Math.abs(l-v)<=g,a=Math.abs(u-m)<=g,r&&(n.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),o&&(n.position.top=i._convertPositionTo("relative",{top:h,left:0}).top),s&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left),a&&(n.position.left=i._convertPositionTo("relative",{top:0,left:u}).left)),f=r||o||s||a,"outer"!==p.snapMode&&(r=Math.abs(c-y)<=g,o=Math.abs(h-b)<=g,s=Math.abs(l-m)<=g,a=Math.abs(u-v)<=g,r&&(n.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),o&&(n.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top),s&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l}).left),a&&(n.position.left=i._convertPositionTo("relative",{top:0,left:u-i.helperProportions.width}).left)),!i.snapElements[d].snapping&&(r||o||s||a||f)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,e,t.extend(i._uiHash(),{snapItem:i.snapElements[d].item})),i.snapElements[d].snapping=r||o||s||a||f)}}),t.ui.plugin.add("draggable","stack",{start:function(e,n,i){var r,o=i.options,s=t.makeArray(t(o.stack)).sort(function(e,n){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(n).css("zIndex"),10)||0)});s.length&&(r=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(e){t(this).css("zIndex",r+e)}),this.css("zIndex",r+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,n,i){var r=t(n.helper),o=i.options;r.css("zIndex")&&(o._zIndex=r.css("zIndex")),r.css("zIndex",o.zIndex)},stop:function(e,n,i){var r=i.options;r._zIndex&&t(n.helper).css("zIndex",r._zIndex)}}),t.ui.draggable}),/*!
 * jQuery UI Resizable 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/resizable/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.resizable",t.ui.mouse,{version:"1.11.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},_num:function(t){return parseInt(t,10)||0},_isNumber:function(t){return!isNaN(parseInt(t,10))},_hasScroll:function(e,n){if("hidden"===t(e).css("overflow"))return!1;var i=n&&"left"===n?"scrollLeft":"scrollTop",r=!1;return e[i]>0?!0:(e[i]=1,r=e[i]>0,e[i]=0,r)},_create:function(){var e,n,i,r,o,s=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("<div class='ui-wrapper' style='overflow: hidden;'></div>").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.resizable("instance")),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=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},n=0;n<e.length;n++)i=t.trim(e[n]),o="ui-resizable-"+i,r=t("<div class='ui-resizable-handle "+o+"'></div>"),r.css({zIndex:a.zIndex}),"se"===i&&r.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[i]=".ui-resizable-"+i,this.element.append(r);this._renderAxis=function(e){var n,i,r,o;e=e||this.element;for(n in this.handles)this.handles[n].constructor===String?this.handles[n]=this.element.children(this.handles[n]).first().show():(this.handles[n].jquery||this.handles[n].nodeType)&&(this.handles[n]=t(this.handles[n]),this._on(this.handles[n],{mousedown:s._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=t(this.handles[n],this.element),o=/sw|ne|nw|se|n|s/.test(n)?i.outerHeight():i.outerWidth(),r=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join(""),e.css(r,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[n])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){s.resizing||(this.className&&(r=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),s.axis=r&&r[1]?r[1]:"se")}),a.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){a.disabled||(t(this).removeClass("ui-resizable-autohide"),s._handles.show())}).mouseleave(function(){a.disabled||s.resizing||(t(this).addClass("ui-resizable-autohide"),s._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,n=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&&(n(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),n(this.originalElement),this},_mouseCapture:function(e){var n,i,r=!1;for(n in this.handles)i=t(this.handles[n])[0],(i===e.target||t.contains(i,e.target))&&(r=!0);return!this.options.disabled&&r},_mouseStart:function(e){var n,i,r,o=this.options,s=this.element;return this.resizing=!0,this._renderProxy(),n=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),o.containment&&(n+=t(o.containment).scrollLeft()||0,i+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:s.width(),height:s.height()},this.originalSize=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.height()},this.originalPosition={left:n,top:i},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,r=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===r?this.axis+"-resize":r),s.addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var n,i,r=this.originalMousePosition,o=this.axis,s=e.pageX-r.left||0,a=e.pageY-r.top||0,l=this._change[o];return this._updatePrevProperties(),l?(n=l.apply(this,[e,s,a]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(n=this._updateRatio(n,e)),n=this._respectSize(n,e),this._updateCache(n),this._propagate("resize",e),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var n,i,r,o,s,a,l,u=this.options,c=this;return this._helper&&(n=this._proportionallyResizeElements,i=n.length&&/textarea/i.test(n[0].nodeName),r=i&&this._hasScroll(n[0],"left")?0:c.sizeDiff.height,o=i?0:c.sizeDiff.width,s={width:c.helper.width()-o,height:c.helper.height()-r},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,u.animate||this.element.css(t.extend(s,{top:l,left:a})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!u.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,n,i,r,o,s=this.options;o={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,i=o.minWidth/this.aspectRatio,n=o.maxHeight*this.aspectRatio,r=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),i>o.minHeight&&(o.minHeight=i),n<o.maxWidth&&(o.maxWidth=n),r<o.maxHeight&&(o.maxHeight=r)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,n=this.size,i=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===i&&(t.left=e.left+(n.width-t.width),t.top=null),"nw"===i&&(t.top=e.top+(n.height-t.height),t.left=e.left+(n.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,n=this.axis,i=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,r=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,s=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,u=/sw|nw|w/.test(n),c=/nw|ne|n/.test(n);return o&&(t.width=e.minWidth),s&&(t.height=e.minHeight),i&&(t.width=e.maxWidth),r&&(t.height=e.maxHeight),o&&u&&(t.left=a-e.minWidth),i&&u&&(t.left=a-e.maxWidth),s&&c&&(t.top=l-e.minHeight),r&&c&&(t.top=l-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},_getPaddingPlusBorderDimensions:function(t){for(var e=0,n=[],i=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],r=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)n[e]=parseInt(i[e],10)||0,n[e]+=parseInt(r[e],10)||0;return{height:n[0]+n[2],width:n[1]+n[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,n=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:n.height()-this.outerDimensions.height||0,width:n.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,n=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),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:++n.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 n=this.originalSize,i=this.originalPosition;return{left:i.left+e,width:n.width-e}},n:function(t,e,n){var i=this.originalSize,r=this.originalPosition;return{top:r.top+n,height:i.height-n}},s:function(t,e,n){return{height:this.originalSize.height+n}},se:function(e,n,i){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,n,i]))},sw:function(e,n,i){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,n,i]))},ne:function(e,n,i){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,n,i]))},nw:function(e,n,i){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,n,i]))}},_propagate:function(e,n){t.ui.plugin.call(this,e,[n,this.ui()]),"resize"!==e&&this._trigger(e,n,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 n=t(this).resizable("instance"),i=n.options,r=n._proportionallyResizeElements,o=r.length&&/textarea/i.test(r[0].nodeName),s=o&&n._hasScroll(r[0],"left")?0:n.sizeDiff.height,a=o?0:n.sizeDiff.width,l={width:n.size.width-a,height:n.size.height-s},u=parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left)||null,c=parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top)||null;n.element.animate(t.extend(l,c&&u?{top:c,left:u}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var i={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};r&&r.length&&t(r[0]).css({width:i.width,height:i.height}),n._updateCache(i),n._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,n,i,r,o,s,a,l=t(this).resizable("instance"),u=l.options,c=l.element,h=u.containment,d=h instanceof t?h.get(0):/parent/.test(h)?c.parent().get(0):h;d&&(l.containerElement=t(d),/document/.test(h)||h===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),n=[],t(["Top","Right","Left","Bottom"]).each(function(t,i){n[t]=l._num(e.css("padding"+i))}),l.containerOffset=e.offset(),l.containerPosition=e.position(),l.containerSize={height:e.innerHeight()-n[3],width:e.innerWidth()-n[1]},i=l.containerOffset,r=l.containerSize.height,o=l.containerSize.width,s=l._hasScroll(d,"left")?d.scrollWidth:o,a=l._hasScroll(d)?d.scrollHeight:r,l.parentData={element:d,left:i.left,top:i.top,width:s,height:a}))},resize:function(e){var n,i,r,o,s=t(this).resizable("instance"),a=s.options,l=s.containerOffset,u=s.position,c=s._aspectRatio||e.shiftKey,h={top:0,left:0},d=s.containerElement,f=!0;d[0]!==document&&/static/.test(d.css("position"))&&(h=l),u.left<(s._helper?l.left:0)&&(s.size.width=s.size.width+(s._helper?s.position.left-l.left:s.position.left-h.left),c&&(s.size.height=s.size.width/s.aspectRatio,f=!1),s.position.left=a.helper?l.left:0),u.top<(s._helper?l.top:0)&&(s.size.height=s.size.height+(s._helper?s.position.top-l.top:s.position.top),c&&(s.size.width=s.size.height*s.aspectRatio,f=!1),s.position.top=s._helper?l.top:0),r=s.containerElement.get(0)===s.element.parent().get(0),o=/relative|absolute/.test(s.containerElement.css("position")),r&&o?(s.offset.left=s.parentData.left+s.position.left,s.offset.top=s.parentData.top+s.position.top):(s.offset.left=s.element.offset().left,s.offset.top=s.element.offset().top),n=Math.abs(s.sizeDiff.width+(s._helper?s.offset.left-h.left:s.offset.left-l.left)),i=Math.abs(s.sizeDiff.height+(s._helper?s.offset.top-h.top:s.offset.top-l.top)),n+s.size.width>=s.parentData.width&&(s.size.width=s.parentData.width-n,c&&(s.size.height=s.size.width/s.aspectRatio,f=!1)),i+s.size.height>=s.parentData.height&&(s.size.height=s.parentData.height-i,c&&(s.size.width=s.size.height*s.aspectRatio,f=!1)),f||(s.position.left=s.prevPosition.left,s.position.top=s.prevPosition.top,s.size.width=s.prevSize.width,s.size.height=s.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),n=e.options,i=e.containerOffset,r=e.containerPosition,o=e.containerElement,s=t(e.helper),a=s.offset(),l=s.outerWidth()-e.sizeDiff.width,u=s.outerHeight()-e.sizeDiff.height;e._helper&&!n.animate&&/relative/.test(o.css("position"))&&t(this).css({left:a.left-r.left-i.left,width:l,height:u}),e._helper&&!n.animate&&/static/.test(o.css("position"))&&t(this).css({left:a.left-r.left-i.left,width:l,height:u})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),n=e.options;t(n.alsoResize).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)})})},resize:function(e,n){var i=t(this).resizable("instance"),r=i.options,o=i.originalSize,s=i.originalPosition,a={height:i.size.height-o.height||0,width:i.size.width-o.width||0,top:i.position.top-s.top||0,left:i.position.left-s.left||0};t(r.alsoResize).each(function(){var e=t(this),i=t(this).data("ui-resizable-alsoresize"),r={},o=e.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var n=(i[e]||0)+(a[e]||0);n&&n>=0&&(r[e]=n||null)}),e.css(r)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),n=e.options,i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof n.ghost?n.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,n=t(this).resizable("instance"),i=n.options,r=n.size,o=n.originalSize,s=n.originalPosition,a=n.axis,l="number"==typeof i.grid?[i.grid,i.grid]:i.grid,u=l[0]||1,c=l[1]||1,h=Math.round((r.width-o.width)/u)*u,d=Math.round((r.height-o.height)/c)*c,f=o.width+h,p=o.height+d,g=i.maxWidth&&i.maxWidth<f,m=i.maxHeight&&i.maxHeight<p,v=i.minWidth&&i.minWidth>f,y=i.minHeight&&i.minHeight>p;i.grid=l,v&&(f+=u),y&&(p+=c),g&&(f-=u),m&&(p-=c),/^(se|s|e)$/.test(a)?(n.size.width=f,n.size.height=p):/^(ne)$/.test(a)?(n.size.width=f,n.size.height=p,n.position.top=s.top-d):/^(sw)$/.test(a)?(n.size.width=f,n.size.height=p,n.position.left=s.left-h):((0>=p-c||0>=f-u)&&(e=n._getPaddingPlusBorderDimensions(this)),p-c>0?(n.size.height=p,n.position.top=s.top-d):(p=c-e.height,n.size.height=p,n.position.top=s.top+o.height-p),f-u>0?(n.size.width=f,n.position.left=s.left-h):(f=u-e.width,n.size.width=f,n.position.left=s.left+o.width-f))}}),t.ui.resizable}),/*!
 * jQuery UI Dialog 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/dialog/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./button","./draggable","./mouse","./position","./resizable"],t):t(jQuery)}(function(t){return t.widget("ui.dialog",{version:"1.11.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 n=t(this).css(e).offset().top;0>n&&t(this).css("top",e.top-n)}},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},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_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,this._trackFocus()},_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._untrackInstance(),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 n,i=this;if(this._isOpen&&this._trigger("beforeClose",e)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{n=this.document[0].activeElement,n&&"body"!==n.nodeName.toLowerCase()&&t(n).blur()}catch(r){}this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,n){var i=!1,r=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,r);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),i=!0),i&&!n&&this._trigger("focus",e),i},open:function(){var e=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;t||(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 n(){var e=this.document[0].activeElement,n=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);n||this._focusTabbable()}e.preventDefault(),n.call(this),this._delay(n)},_createWrapper:function(){this.uiDialog=t("<div>").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(),void this.close(e);if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var n=this.uiDialog.find(":tabbable"),i=n.filter(":first"),r=n.filter(":last");e.target!==r[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==i[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){r.focus()}),e.preventDefault()):(this._delay(function(){i.focus()}),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("<div>").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 type='button'></button>").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("<span>").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("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,n=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(n)||t.isArray(n)&&!n.length?void this.uiDialog.removeClass("ui-dialog-buttons"):(t.each(n,function(n,i){var r,o;i=t.isFunction(i)?{click:i,text:n}:i,i=t.extend({type:"button"},i),r=i.click,i.click=function(){r.apply(e.element[0],arguments)},o={icons:i.icons,text:i.showText},delete i.icons,delete i.showText,t("<button></button>",i).button(o).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var n=this,i=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(i,r){t(this).addClass("ui-dialog-dragging"),n._blockFrames(),n._trigger("dragStart",i,e(r))},drag:function(t,i){n._trigger("drag",t,e(i))},stop:function(r,o){var s=o.offset.left-n.document.scrollLeft(),a=o.offset.top-n.document.scrollTop();i.position={my:"left top",at:"left"+(s>=0?"+":"")+s+" top"+(a>=0?"+":"")+a,of:n.window},t(this).removeClass("ui-dialog-dragging"),n._unblockFrames(),n._trigger("dragStop",r,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var n=this,i=this.options,r=i.resizable,o=this.uiDialog.css("position"),s="string"==typeof r?r:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:i.maxWidth,maxHeight:i.maxHeight,minWidth:i.minWidth,minHeight:this._minHeight(),handles:s,start:function(i,r){t(this).addClass("ui-dialog-resizing"),n._blockFrames(),n._trigger("resizeStart",i,e(r))},resize:function(t,i){n._trigger("resize",t,e(i))},stop:function(r,o){var s=n.uiDialog.offset(),a=s.left-n.document.scrollLeft(),l=s.top-n.document.scrollTop();i.height=n.uiDialog.height(),i.width=n.uiDialog.width(),i.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(l>=0?"+":"")+l,of:n.window},t(this).removeClass("ui-dialog-resizing"),n._unblockFrames(),n._trigger("resizeStop",r,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),n=t.inArray(this,e);-1!==n&&e.splice(n,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_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(e){var n=this,i=!1,r={};t.each(e,function(t,e){n._setOption(t,e),t in n.sizeRelatedOptions&&(i=!0),t in n.resizableRelatedOptions&&(r[t]=e)}),i&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(t,e){var n,i,r=this.uiDialog;"dialogClass"===t&&r.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&&(n=r.is(":data(ui-draggable)"),n&&!e&&r.draggable("destroy"),!n&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(i=r.is(":data(ui-resizable)"),i&&!e&&r.resizable("destroy"),i&&"string"==typeof e&&r.resizable("option","handles",e),i||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,n,i=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),i.minWidth>i.width&&(i.width=i.minWidth),t=this.uiDialog.css({height:"auto",width:i.width}).outerHeight(),e=Math.max(0,i.minHeight-t),n="number"==typeof i.maxHeight?Math.max(0,i.maxHeight-t):"none","auto"===i.height?this.element.css({minHeight:e,maxHeight:n,height:"auto"}):this.element.height(Math.max(0,i.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("<div>").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=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}})}),/*!
 * jQuery UI Droppable 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/droppable/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./mouse","./draggable"],t):t(jQuery)}(function(t){return t.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,n=this.options,i=n.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(i)?i:function(t){return t.is(i)},this.proportions=function(){return arguments.length?void(e=arguments[0]):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(n.scope),n.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,n){if("accept"===e)this.accept=t.isFunction(n)?n:function(t){return t.is(n)};else if("scope"===e){var i=t.ui.ddmanager.droppables[this.options.scope];this._splice(i),this._addToManager(n)}this._super(e,n)},_activate:function(e){var n=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),n&&this._trigger("activate",e,this.ui(n))},_deactivate:function(e){var n=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),n&&this._trigger("deactivate",e,this.ui(n))},_over:function(e){var n=t.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(n)))},_out:function(e){var n=t.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(n)))},_drop:function(e,n){var i=n||t.ui.ddmanager.current,r=!1;return i&&(i.currentItem||i.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var n=t(this).droppable("instance");return n.options.greedy&&!n.options.disabled&&n.options.scope===i.options.scope&&n.accept.call(n.element[0],i.currentItem||i.element)&&t.ui.intersect(i,t.extend(n,{offset:n.element.offset()}),n.options.tolerance,e)?(r=!0,!1):void 0}),r?!1:this.accept.call(this.element[0],i.currentItem||i.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(i)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(){function t(t,e,n){return t>=e&&e+n>t}return function(e,n,i,r){if(!n.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,s=(e.positionAbs||e.position.absolute).top+e.margins.top,a=o+e.helperProportions.width,l=s+e.helperProportions.height,u=n.offset.left,c=n.offset.top,h=u+n.proportions().width,d=c+n.proportions().height;switch(i){case"fit":return o>=u&&h>=a&&s>=c&&d>=l;case"intersect":return u<o+e.helperProportions.width/2&&a-e.helperProportions.width/2<h&&c<s+e.helperProportions.height/2&&l-e.helperProportions.height/2<d;case"pointer":return t(r.pageY,c,n.proportions().height)&&t(r.pageX,u,n.proportions().width);case"touch":return(s>=c&&d>=s||l>=c&&d>=l||c>s&&l>d)&&(o>=u&&h>=o||a>=u&&h>=a||u>o&&a>h);default:return!1}}}(),t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,n){var i,r,o=t.ui.ddmanager.droppables[e.options.scope]||[],s=n?n.type:null,a=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(i=0;i<o.length;i++)if(!(o[i].options.disabled||e&&!o[i].accept.call(o[i].element[0],e.currentItem||e.element))){for(r=0;r<a.length;r++)if(a[r]===o[i].element[0]){o[i].proportions().height=0;continue t}o[i].visible="none"!==o[i].element.css("display"),o[i].visible&&("mousedown"===s&&o[i]._activate.call(o[i],n),o[i].offset=o[i].element.offset(),o[i].proportions({width:o[i].element[0].offsetWidth,height:o[i].element[0].offsetHeight}))}},drop:function(e,n){var i=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance,n)&&(i=this._drop.call(this,n)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,n)))}),i},dragStart:function(e,n){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,n)})},drag:function(e,n){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,n),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var i,r,o,s=t.ui.intersect(e,this,this.options.tolerance,n),a=!s&&this.isover?"isout":s&&!this.isover?"isover":null;a&&(this.options.greedy&&(r=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===r}),o.length&&(i=t(o[0]).droppable("instance"),i.greedyChild="isover"===a)),i&&"isover"===a&&(i.isover=!1,i.isout=!0,i._out.call(i,n)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,n),i&&"isout"===a&&(i.isout=!1,i.isover=!0,i._over.call(i,n)))}})},dragStop:function(e,n){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,n)}},t.ui.droppable}),/*!
 * jQuery UI Effects 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/category/effects-core/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){var e="ui-effects-",n=t;/*!
 * jQuery Color Animations v2.1.2
 * https://github.com/jquery/jquery-color
 *
 * Copyright 2014 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * Date: Wed Jan 16 08:47:09 2013 -0600
 */
return t.effects={effect:{}},function(t,e){function n(t,e,n){var i=h[e.type]||{};return null==t?n||!e.def?null:e.def:(t=i.floor?~~t:parseFloat(t),isNaN(t)?e.def:i.mod?(t+i.mod)%i.mod:0>t?0:i.max<t?i.max:t)}function i(e){var n=u(),i=n._rgba=[];return e=e.toLowerCase(),p(l,function(t,r){var o,s=r.re.exec(e),a=s&&r.parse(s),l=r.space||"rgba";return a?(o=n[l](a),n[c[l].cache]=o[c[l].cache],i=n._rgba=o._rgba,!1):void 0}),i.length?("0,0,0,0"===i.join()&&t.extend(i,o.transparent),n):o[e]}function r(t,e,n){return n=(n+1)%1,1>6*n?t+(e-t)*n*6:1>2*n?e:2>3*n?t+(e-t)*(2/3-n)*6:t}var o,s="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",a=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],u=t.Color=function(e,n,i,r){return new t.Color.fn.parse(e,n,i,r)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},h={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=u.support={},f=t("<p>")[0],p=t.each;f.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=f.style.backgroundColor.indexOf("rgba")>-1,p(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),u.fn=t.extend(u.prototype,{parse:function(r,s,a,l){if(r===e)return this._rgba=[null,null,null,null],this;(r.jquery||r.nodeType)&&(r=t(r).css(s),s=e);var h=this,d=t.type(r),f=this._rgba=[];return s!==e&&(r=[r,s,a,l],d="array"),"string"===d?this.parse(i(r)||o._default):"array"===d?(p(c.rgba.props,function(t,e){f[e.idx]=n(r[e.idx],e)}),this):"object"===d?(r instanceof u?p(c,function(t,e){r[e.cache]&&(h[e.cache]=r[e.cache].slice())}):p(c,function(e,i){var o=i.cache;p(i.props,function(t,e){if(!h[o]&&i.to){if("alpha"===t||null==r[t])return;h[o]=i.to(h._rgba)}h[o][e.idx]=n(r[t],e,!0)}),h[o]&&t.inArray(null,h[o].slice(0,3))<0&&(h[o][3]=1,i.from&&(h._rgba=i.from(h[o])))}),this):void 0},is:function(t){var e=u(t),n=!0,i=this;return p(c,function(t,r){var o,s=e[r.cache];return s&&(o=i[r.cache]||r.to&&r.to(i._rgba)||[],p(r.props,function(t,e){return null!=s[e.idx]?n=s[e.idx]===o[e.idx]:void 0})),n}),n},_space:function(){var t=[],e=this;return p(c,function(n,i){e[i.cache]&&t.push(n)}),t.pop()},transition:function(t,e){var i=u(t),r=i._space(),o=c[r],s=0===this.alpha()?u("transparent"):this,a=s[o.cache]||o.to(s._rgba),l=a.slice();return i=i[o.cache],p(o.props,function(t,r){var o=r.idx,s=a[o],u=i[o],c=h[r.type]||{};null!==u&&(null===s?l[o]=u:(c.mod&&(u-s>c.mod/2?s+=c.mod:s-u>c.mod/2&&(s-=c.mod)),l[o]=n((u-s)*e+s,r)))}),this[r](l)},blend:function(e){if(1===this._rgba[3])return this;var n=this._rgba.slice(),i=n.pop(),r=u(e)._rgba;return u(t.map(n,function(t,e){return(1-i)*r[e]+i*t}))},toRgbaString:function(){var e="rgba(",n=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===n[3]&&(n.pop(),e="rgb("),e+n.join()+")"},toHslaString:function(){var e="hsla(",n=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===n[3]&&(n.pop(),e="hsl("),e+n.join()+")"},toHexString:function(e){var n=this._rgba.slice(),i=n.pop();return e&&n.push(~~(255*i)),"#"+t.map(n,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),u.fn.parse.prototype=u.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,s=t[3],a=Math.max(i,r,o),l=Math.min(i,r,o),u=a-l,c=a+l,h=.5*c;return e=l===a?0:i===a?60*(r-o)/u+360:r===a?60*(o-i)/u+120:60*(i-r)/u+240,n=0===u?0:.5>=h?u/c:u/(2-c),[Math.round(e)%360,n,h,null==s?1:s]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,n=t[1],i=t[2],o=t[3],s=.5>=i?i*(1+n):i+n-i*n,a=2*i-s;return[Math.round(255*r(a,s,e+1/3)),Math.round(255*r(a,s,e)),Math.round(255*r(a,s,e-1/3)),o]},p(c,function(i,r){var o=r.props,s=r.cache,l=r.to,c=r.from;u.fn[i]=function(i){if(l&&!this[s]&&(this[s]=l(this._rgba)),i===e)return this[s].slice();var r,a=t.type(i),h="array"===a||"object"===a?i:arguments,d=this[s].slice();return p(o,function(t,e){var i=h["object"===a?t:e.idx];null==i&&(i=d[e.idx]),d[e.idx]=n(i,e)}),c?(r=u(c(d)),r[s]=d,r):u(d)},p(o,function(e,n){u.fn[e]||(u.fn[e]=function(r){var o,s=t.type(r),l="alpha"===e?this._hsla?"hsla":"rgba":i,u=this[l](),c=u[n.idx];return"undefined"===s?c:("function"===s&&(r=r.call(this,c),s=t.type(r)),null==r&&n.empty?this:("string"===s&&(o=a.exec(r),o&&(r=c+parseFloat(o[2])*("+"===o[1]?1:-1))),u[n.idx]=r,this[l](u)))})})}),u.hook=function(e){var n=e.split(" ");p(n,function(e,n){t.cssHooks[n]={set:function(e,r){var o,s,a="";if("transparent"!==r&&("string"!==t.type(r)||(o=i(r)))){if(r=u(o||r),!d.rgba&&1!==r._rgba[3]){for(s="backgroundColor"===n?e.parentNode:e;(""===a||"transparent"===a)&&s&&s.style;)try{a=t.css(s,"backgroundColor"),s=s.parentNode}catch(l){}r=r.blend(a&&"transparent"!==a?a:"_default")}r=r.toRgbaString()}try{e.style[n]=r}catch(l){}}},t.fx.step[n]=function(e){e.colorInit||(e.start=u(e.elem,n),e.end=u(e.end),e.colorInit=!0),t.cssHooks[n].set(e.elem,e.start.transition(e.end,e.pos))}})},u.hook(s),t.cssHooks.borderColor={expand:function(t){var e={};return p(["Top","Right","Bottom","Left"],function(n,i){e["border"+i+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(n),function(){function e(e){var n,i,r=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(r&&r.length&&r[0]&&r[r[0]])for(i=r.length;i--;)n=r[i],"string"==typeof r[n]&&(o[t.camelCase(n)]=r[n]);else for(n in r)"string"==typeof r[n]&&(o[n]=r[n]);return o}function i(e,n){var i,r,s={};for(i in n)r=n[i],e[i]!==r&&(o[i]||(t.fx.step[i]||!isNaN(parseFloat(r)))&&(s[i]=r));return s}var r=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(n.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,s,a){var l=t.speed(o,s,a);return this.queue(function(){var o,s=t(this),a=s.attr("class")||"",u=l.children?s.find("*").addBack():s;u=u.map(function(){var n=t(this);return{el:n,start:e(this)}}),o=function(){t.each(r,function(t,e){n[e]&&s[e+"Class"](n[e])})},o(),u=u.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),s.attr("class",a),u=u.map(function(){var e=this,n=t.Deferred(),i=t.extend({},l,{queue:!1,complete:function(){n.resolve(e)}});return this.el.animate(this.diff,i),n.promise()}),t.when.apply(t,u.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(s[0])})})},t.fn.extend({addClass:function(e){return function(n,i,r,o){return i?t.effects.animateClass.call(this,{add:n},i,r,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(n,i,r,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:n},i,r,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(n,i,r,o,s){return"boolean"==typeof i||void 0===i?r?t.effects.animateClass.call(this,i?{add:n}:{remove:n},r,o,s):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:n},i,r,o)}}(t.fn.toggleClass),switchClass:function(e,n,i,r,o){return t.effects.animateClass.call(this,{add:n,remove:e},i,r,o)}})}(),function(){function n(e,n,i,r){return t.isPlainObject(e)&&(n=e,e=e.effect),e={effect:e},null==n&&(n={}),t.isFunction(n)&&(r=n,i=null,n={}),("number"==typeof n||t.fx.speeds[n])&&(r=i,i=n,n={}),t.isFunction(i)&&(r=i,i=null),n&&t.extend(e,n),i=i||n.duration,e.duration=t.fx.off?0:"number"==typeof i?i:i in t.fx.speeds?t.fx.speeds[i]:t.fx.speeds._default,e.complete=r||n.complete,e}function i(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.11.4",save:function(t,n){for(var i=0;i<n.length;i++)null!==n[i]&&t.data(e+n[i],t[0].style[n[i]])},restore:function(t,n){var i,r;for(r=0;r<n.length;r++)null!==n[r]&&(i=t.data(e+n[r]),void 0===i&&(i=""),t.css(n[r],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var n,i;switch(t[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=t[0]/e.height}switch(t[1]){case"left":i=0;break;case"center":i=.5;break;case"right":i=1;break;default:i=t[1]/e.width}return{x:i,y:n}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var n={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},i=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(s){o=document.body}return e.wrap(i),(e[0]===o||t.contains(e[0],o))&&t(o).focus(),i=e.parent(),"static"===e.css("position")?(i.css({position:"relative"}),e.css({position:"relative"})):(t.extend(n,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,i){n[i]=e.css(i),isNaN(parseInt(n[i],10))&&(n[i]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(r),i.css(n).show()},removeWrapper:function(e){var n=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===n||t.contains(e[0],n))&&t(n).focus()),e},setTransition:function(e,n,i,r){return r=r||{},t.each(n,function(t,n){var o=e.cssUnit(n);o[0]>0&&(r[n]=o[0]*i+o[1])}),r}}),t.fn.extend({effect:function(){function e(e){function n(){t.isFunction(o)&&o.call(r[0]),t.isFunction(e)&&e()}var r=t(this),o=i.complete,a=i.mode;(r.is(":hidden")?"hide"===a:"show"===a)?(r[a](),n()):s.call(r[0],i,n)}var i=n.apply(this,arguments),r=i.mode,o=i.queue,s=t.effects.effect[i.effect];return t.fx.off||!s?r?this[r](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):o===!1?this.each(e):this.queue(o||"fx",e)},show:function(t){return function(e){if(i(e))return t.apply(this,arguments);var r=n.apply(this,arguments);return r.mode="show",this.effect.call(this,r)}}(t.fn.show),hide:function(t){return function(e){if(i(e))return t.apply(this,arguments);var r=n.apply(this,arguments);return r.mode="hide",this.effect.call(this,r)}}(t.fn.hide),toggle:function(t){return function(e){if(i(e)||"boolean"==typeof e)return t.apply(this,arguments);var r=n.apply(this,arguments);return r.mode="toggle",this.effect.call(this,r)}}(t.fn.toggle),cssUnit:function(e){var n=this.css(e),i=[];return t.each(["em","px","%","pt"],function(t,e){n.indexOf(e)>0&&(i=[parseFloat(n),e])}),i}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,n){e[n]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,n){t.easing["easeIn"+e]=n,t.easing["easeOut"+e]=function(t){return 1-n(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?n(2*t)/2:1-n(-2*t+2)/2}})}(),t.effects}),/*!
 * jQuery UI Effects Blind 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/blind-effect/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.blind=function(e,n){var i,r,o,s=t(this),a=/up|down|vertical/,l=/up|left|vertical|horizontal/,u=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(s,e.mode||"hide"),h=e.direction||"up",d=a.test(h),f=d?"height":"width",p=d?"top":"left",g=l.test(h),m={},v="show"===c;s.parent().is(".ui-effects-wrapper")?t.effects.save(s.parent(),u):t.effects.save(s,u),s.show(),i=t.effects.createWrapper(s).css({overflow:"hidden"}),r=i[f](),o=parseFloat(i.css(p))||0,m[f]=v?r:0,g||(s.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[p]=v?o:r+o),v&&(i.css(f,0),g||i.css(p,o+r)),i.animate(m,{duration:e.duration,easing:e.easing,queue:!1,complete:function(){"hide"===c&&s.hide(),t.effects.restore(s,u),t.effects.removeWrapper(s),n()}})}}),/*!
 * jQuery UI Effects Bounce 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/bounce-effect/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.bounce=function(e,n){var i,r,o,s=t(this),a=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(s,e.mode||"effect"),u="hide"===l,c="show"===l,h=e.direction||"up",d=e.distance,f=e.times||5,p=2*f+(c||u?1:0),g=e.duration/p,m=e.easing,v="up"===h||"down"===h?"top":"left",y="up"===h||"left"===h,b=s.queue(),_=b.length;for((c||u)&&a.push("opacity"),t.effects.save(s,a),s.show(),t.effects.createWrapper(s),d||(d=s["top"===v?"outerHeight":"outerWidth"]()/3),c&&(o={opacity:1},o[v]=0,s.css("opacity",0).css(v,y?2*-d:2*d).animate(o,g,m)),u&&(d/=Math.pow(2,f-1)),o={},o[v]=0,i=0;f>i;i++)r={},r[v]=(y?"-=":"+=")+d,s.animate(r,g,m).animate(o,g,m),d=u?2*d:d/2;u&&(r={opacity:0},r[v]=(y?"-=":"+=")+d,s.animate(r,g,m)),s.queue(function(){u&&s.hide(),t.effects.restore(s,a),t.effects.removeWrapper(s),n()}),_>1&&b.splice.apply(b,[1,0].concat(b.splice(_,p+1))),s.dequeue()}}),/*!
 * jQuery UI Effects Clip 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/clip-effect/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.clip=function(e,n){var i,r,o,s=t(this),a=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(s,e.mode||"hide"),u="show"===l,c=e.direction||"vertical",h="vertical"===c,d=h?"height":"width",f=h?"top":"left",p={};t.effects.save(s,a),s.show(),i=t.effects.createWrapper(s).css({overflow:"hidden"}),r="IMG"===s[0].tagName?i:s,o=r[d](),u&&(r.css(d,0),r.css(f,o/2)),p[d]=u?o:0,p[f]=u?0:o/2,r.animate(p,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){u||s.hide(),t.effects.restore(s,a),t.effects.removeWrapper(s),n()}})}}),/*!
 * jQuery UI Effects Drop 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/drop-effect/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.drop=function(e,n){var i,r=t(this),o=["position","top","bottom","left","right","opacity","height","width"],s=t.effects.setMode(r,e.mode||"hide"),a="show"===s,l=e.direction||"left",u="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l?"pos":"neg",h={opacity:a?1:0};t.effects.save(r,o),r.show(),t.effects.createWrapper(r),i=e.distance||r["top"===u?"outerHeight":"outerWidth"](!0)/2,a&&r.css("opacity",0).css(u,"pos"===c?-i:i),h[u]=(a?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+i,r.animate(h,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===s&&r.hide(),t.effects.restore(r,o),t.effects.removeWrapper(r),n()}})}}),/*!
 * jQuery UI Effects Explode 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/explode-effect/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.explode=function(e,n){function i(){b.push(this),b.length===h*d&&r()}function r(){f.css({visibility:"visible"}),t(b).remove(),g||f.hide(),n()}var o,s,a,l,u,c,h=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=h,f=t(this),p=t.effects.setMode(f,e.mode||"hide"),g="show"===p,m=f.show().css("visibility","hidden").offset(),v=Math.ceil(f.outerWidth()/d),y=Math.ceil(f.outerHeight()/h),b=[];for(o=0;h>o;o++)for(l=m.top+o*y,c=o-(h-1)/2,s=0;d>s;s++)a=m.left+s*v,u=s-(d-1)/2,f.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-s*v,top:-o*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:a+(g?u*v:0),top:l+(g?c*y:0),opacity:g?0:1}).animate({left:a+(g?0:u*v),top:l+(g?0:c*y),opacity:g?1:0},e.duration||500,e.easing,i)}}),/*!
 * jQuery UI Effects Fade 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/fade-effect/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.fade=function(e,n){var i=t(this),r=t.effects.setMode(i,e.mode||"toggle");i.animate({opacity:r},{queue:!1,duration:e.duration,easing:e.easing,complete:n})}}),/*!
 * jQuery UI Effects Fold 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/fold-effect/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.fold=function(e,n){var i,r,o=t(this),s=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(o,e.mode||"hide"),l="show"===a,u="hide"===a,c=e.size||15,h=/([0-9]+)%/.exec(c),d=!!e.horizFirst,f=l!==d,p=f?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(o,s),o.show(),i=t.effects.createWrapper(o).css({overflow:"hidden"}),r=f?[i.width(),i.height()]:[i.height(),i.width()],h&&(c=parseInt(h[1],10)/100*r[u?0:1]),l&&i.css(d?{height:0,width:c}:{height:c,width:0}),m[p[0]]=l?r[0]:c,v[p[1]]=l?r[1]:0,i.animate(m,g,e.easing).animate(v,g,e.easing,function(){u&&o.hide(),t.effects.restore(o,s),t.effects.removeWrapper(o),n()})}}),/*!
 * jQuery UI Effects Highlight 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/highlight-effect/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.highlight=function(e,n){var i=t(this),r=["backgroundImage","backgroundColor","opacity"],o=t.effects.setMode(i,e.mode||"show"),s={backgroundColor:i.css("backgroundColor")};"hide"===o&&(s.opacity=0),t.effects.save(i,r),i.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(s,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&i.hide(),t.effects.restore(i,r),n()}})}}),/*!
 * jQuery UI Effects Size 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/size-effect/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.size=function(e,n){var i,r,o,s=t(this),a=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],u=["width","height","overflow"],c=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],f=t.effects.setMode(s,e.mode||"effect"),p=e.restore||"effect"!==f,g=e.scale||"both",m=e.origin||["middle","center"],v=s.css("position"),y=p?a:l,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===f&&s.show(),i={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},"toggle"===e.mode&&"show"===f?(s.from=e.to||b,s.to=e.from||i):(s.from=e.from||("show"===f?b:i),s.to=e.to||("hide"===f?b:i)),o={from:{y:s.from.height/i.height,x:s.from.width/i.width},to:{y:s.to.height/i.height,x:s.to.width/i.width}},("box"===g||"both"===g)&&(o.from.y!==o.to.y&&(y=y.concat(h),s.from=t.effects.setTransition(s,h,o.from.y,s.from),s.to=t.effects.setTransition(s,h,o.to.y,s.to)),o.from.x!==o.to.x&&(y=y.concat(d),s.from=t.effects.setTransition(s,d,o.from.x,s.from),s.to=t.effects.setTransition(s,d,o.to.x,s.to))),("content"===g||"both"===g)&&o.from.y!==o.to.y&&(y=y.concat(c).concat(u),s.from=t.effects.setTransition(s,c,o.from.y,s.from),s.to=t.effects.setTransition(s,c,o.to.y,s.to)),t.effects.save(s,y),s.show(),t.effects.createWrapper(s),s.css("overflow","hidden").css(s.from),m&&(r=t.effects.getBaseline(m,i),s.from.top=(i.outerHeight-s.outerHeight())*r.y,s.from.left=(i.outerWidth-s.outerWidth())*r.x,s.to.top=(i.outerHeight-s.to.outerHeight)*r.y,s.to.left=(i.outerWidth-s.to.outerWidth)*r.x),s.css(s.from),("content"===g||"both"===g)&&(h=h.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),u=a.concat(h).concat(d),s.find("*[width]").each(function(){var n=t(this),i={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()};p&&t.effects.save(n,u),n.from={height:i.height*o.from.y,width:i.width*o.from.x,outerHeight:i.outerHeight*o.from.y,outerWidth:i.outerWidth*o.from.x},n.to={height:i.height*o.to.y,width:i.width*o.to.x,outerHeight:i.height*o.to.y,outerWidth:i.width*o.to.x},o.from.y!==o.to.y&&(n.from=t.effects.setTransition(n,h,o.from.y,n.from),n.to=t.effects.setTransition(n,h,o.to.y,n.to)),o.from.x!==o.to.x&&(n.from=t.effects.setTransition(n,d,o.from.x,n.from),n.to=t.effects.setTransition(n,d,o.to.x,n.to)),n.css(n.from),n.animate(n.to,e.duration,e.easing,function(){p&&t.effects.restore(n,u)})})),s.animate(s.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===s.to.opacity&&s.css("opacity",s.from.opacity),"hide"===f&&s.hide(),t.effects.restore(s,y),p||("static"===v?s.css({position:"relative",top:s.to.top,left:s.to.left}):t.each(["top","left"],function(t,e){s.css(e,function(e,n){var i=parseInt(n,10),r=t?s.to.left:s.to.top;return"auto"===n?r+"px":i+r+"px"})})),t.effects.removeWrapper(s),n()}})}}),/*!
 * jQuery UI Effects Scale 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/scale-effect/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./effect","./effect-size"],t):t(jQuery)}(function(t){return t.effects.effect.scale=function(e,n){var i=t(this),r=t.extend(!0,{},e),o=t.effects.setMode(i,e.mode||"effect"),s=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===o?0:100),a=e.direction||"both",l=e.origin,u={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()},c={y:"horizontal"!==a?s/100:1,x:"vertical"!==a?s/100:1};r.effect="size",r.queue=!1,r.complete=n,"effect"!==o&&(r.origin=l||["middle","center"],r.restore=!0),r.from=e.from||("show"===o?{height:0,width:0,outerHeight:0,outerWidth:0}:u),r.to={height:u.height*c.y,width:u.width*c.x,outerHeight:u.outerHeight*c.y,outerWidth:u.outerWidth*c.x},r.fade&&("show"===o&&(r.from.opacity=0,r.to.opacity=1),"hide"===o&&(r.from.opacity=1,r.to.opacity=0)),i.effect(r)}}),/*!
 * jQuery UI Effects Puff 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/puff-effect/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./effect","./effect-scale"],t):t(jQuery)}(function(t){return t.effects.effect.puff=function(e,n){var i=t(this),r=t.effects.setMode(i,e.mode||"hide"),o="hide"===r,s=parseInt(e.percent,10)||150,a=s/100,l={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:r,complete:n,percent:o?s:100,from:o?l:{height:l.height*a,width:l.width*a,outerHeight:l.outerHeight*a,outerWidth:l.outerWidth*a}}),i.effect(e)}}),/*!
 * jQuery UI Effects Pulsate 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/pulsate-effect/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.pulsate=function(e,n){var i,r=t(this),o=t.effects.setMode(r,e.mode||"show"),s="show"===o,a="hide"===o,l=s||"hide"===o,u=2*(e.times||5)+(l?1:0),c=e.duration/u,h=0,d=r.queue(),f=d.length;for((s||!r.is(":visible"))&&(r.css("opacity",0).show(),h=1),i=1;u>i;i++)r.animate({opacity:h},c,e.easing),h=1-h;r.animate({opacity:h},c,e.easing),r.queue(function(){a&&r.hide(),n()}),f>1&&d.splice.apply(d,[1,0].concat(d.splice(f,u+1))),r.dequeue()}}),/*!
 * jQuery UI Effects Shake 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/shake-effect/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.shake=function(e,n){var i,r=t(this),o=["position","top","bottom","left","right","height","width"],s=t.effects.setMode(r,e.mode||"effect"),a=e.direction||"left",l=e.distance||20,u=e.times||3,c=2*u+1,h=Math.round(e.duration/c),d="up"===a||"down"===a?"top":"left",f="up"===a||"left"===a,p={},g={},m={},v=r.queue(),y=v.length;for(t.effects.save(r,o),r.show(),t.effects.createWrapper(r),p[d]=(f?"-=":"+=")+l,g[d]=(f?"+=":"-=")+2*l,m[d]=(f?"-=":"+=")+2*l,r.animate(p,h,e.easing),i=1;u>i;i++)r.animate(g,h,e.easing).animate(m,h,e.easing);r.animate(g,h,e.easing).animate(p,h/2,e.easing).queue(function(){"hide"===s&&r.hide(),t.effects.restore(r,o),t.effects.removeWrapper(r),n()}),y>1&&v.splice.apply(v,[1,0].concat(v.splice(y,c+1))),r.dequeue()}}),/*!
 * jQuery UI Effects Slide 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/slide-effect/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.slide=function(e,n){var i,r=t(this),o=["position","top","bottom","left","right","width","height"],s=t.effects.setMode(r,e.mode||"show"),a="show"===s,l=e.direction||"left",u="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,h={};t.effects.save(r,o),r.show(),i=e.distance||r["top"===u?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(r).css({overflow:"hidden"}),a&&r.css(u,c?isNaN(i)?"-"+i:-i:i),h[u]=(a?c?"+=":"-=":c?"-=":"+=")+i,r.animate(h,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===s&&r.hide(),t.effects.restore(r,o),t.effects.removeWrapper(r),n()}})}}),/*!
 * jQuery UI Effects Transfer 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/transfer-effect/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./effect"],t):t(jQuery)}(function(t){return t.effects.effect.transfer=function(e,n){var i=t(this),r=t(e.to),o="fixed"===r.css("position"),s=t("body"),a=o?s.scrollTop():0,l=o?s.scrollLeft():0,u=r.offset(),c={top:u.top-a,left:u.left-l,height:r.innerHeight(),width:r.innerWidth()},h=i.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:h.top-a,left:h.left-l,height:i.innerHeight(),width:i.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),n()})}}),/*!
 * jQuery UI Progressbar 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/progressbar/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),void this._refreshValue())},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,n=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(n.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})}),/*!
 * jQuery UI Selectable 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/selectable/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.selectable",t.ui.mouse,{version:"1.11.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,n=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(n.options.filter,n.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),n=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:n.left,top:n.top,right:n.left+e.outerWidth(),bottom:n.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var n=this,i=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(i.filter,this.element[0]),this._trigger("start",e),t(i.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),i.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var i=t.data(this,"selectable-item");i.startselected=!0,e.metaKey||e.ctrlKey||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",e,{unselecting:i.element}))}),t(e.target).parents().addBack().each(function(){var i,r=t.data(this,"selectable-item");return r?(i=!e.metaKey&&!e.ctrlKey||!r.$element.hasClass("ui-selected"),r.$element.removeClass(i?"ui-unselecting":"ui-selected").addClass(i?"ui-selecting":"ui-unselecting"),r.unselecting=!i,r.selecting=i,r.selected=i,i?n._trigger("selecting",e,{selecting:r.element}):n._trigger("unselecting",e,{unselecting:r.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var n,i=this,r=this.options,o=this.opos[0],s=this.opos[1],a=e.pageX,l=e.pageY;return o>a&&(n=a,a=o,o=n),s>l&&(n=l,l=s,s=n),this.helper.css({left:o,top:s,width:a-o,height:l-s}),this.selectees.each(function(){var n=t.data(this,"selectable-item"),u=!1;n&&n.element!==i.element[0]&&("touch"===r.tolerance?u=!(n.left>a||n.right<o||n.top>l||n.bottom<s):"fit"===r.tolerance&&(u=n.left>o&&n.right<a&&n.top>s&&n.bottom<l),u?(n.selected&&(n.$element.removeClass("ui-selected"),n.selected=!1),n.unselecting&&(n.$element.removeClass("ui-unselecting"),n.unselecting=!1),n.selecting||(n.$element.addClass("ui-selecting"),n.selecting=!0,i._trigger("selecting",e,{selecting:n.element}))):(n.selecting&&((e.metaKey||e.ctrlKey)&&n.startselected?(n.$element.removeClass("ui-selecting"),n.selecting=!1,n.$element.addClass("ui-selected"),n.selected=!0):(n.$element.removeClass("ui-selecting"),n.selecting=!1,n.startselected&&(n.$element.addClass("ui-unselecting"),n.unselecting=!0),i._trigger("unselecting",e,{unselecting:n.element}))),n.selected&&(e.metaKey||e.ctrlKey||n.startselected||(n.$element.removeClass("ui-selected"),n.selected=!1,n.$element.addClass("ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",e,{unselecting:n.element})))))}),!1}},_mouseStop:function(e){var n=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var i=t.data(this,"selectable-item");i.$element.removeClass("ui-unselecting"),i.unselecting=!1,i.startselected=!1,n._trigger("unselected",e,{unselected:i.element})}),t(".ui-selecting",this.element[0]).each(function(){var i=t.data(this,"selectable-item");i.$element.removeClass("ui-selecting").addClass("ui-selected"),i.selecting=!1,i.selected=!0,i.startselected=!0,n._trigger("selected",e,{selected:i.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}),/*!
 * jQuery UI Selectmenu 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/selectmenu
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position","./menu"],t):t(jQuery)}(function(t){return t.widget("ui.selectmenu",{version:"1.11.4",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var t=this.element.uniqueId().attr("id");this.ids={element:t,button:t+"-button",menu:t+"-menu"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var e=this;this.label=t("label[for='"+this.ids.element+"']").attr("for",this.ids.button),this._on(this.label,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element),t("<span>",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button),this.buttonText=t("<span>",{"class":"ui-selectmenu-text"}).appendTo(this.button),this._setText(this.buttonText,this.element.find("option:selected").text()),this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){e.menuItems||e._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>",{"class":"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(t,n){t.preventDefault(),e._setSelection(),e._select(n.item.data("ui-selectmenu-item"),t)},focus:function(t,n){var i=n.item.data("ui-selectmenu-item");null!=e.focusIndex&&i.index!==e.focusIndex&&(e._trigger("focus",t,{item:i}),e.isOpen||e._select(i,t)),e.focusIndex=i.index,e.button.attr("aria-activedescendant",e.menuItems.eq(i.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var t,e=this.element.find("option");e.length&&(this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(e,n){var i=this,r="";t.each(n,function(n,o){o.optgroup!==r&&(t("<li>",{"class":"ui-selectmenu-optgroup ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:o.optgroup}).appendTo(e),r=o.optgroup),i._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,n){var i=t("<li>");return n.disabled&&i.addClass("ui-state-disabled"),this._setText(i,n.label),i.appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var n,i,r=".ui-menu-item";this.isOpen?n=this.menuItems.eq(this.focusIndex):(n=this.menuItems.eq(this.element[0].selectedIndex),r+=":not(.ui-state-disabled)"),i="first"===t||"last"===t?n["first"===t?"prevAll":"nextAll"](r).eq(-1):n[t+"All"](r).eq(0),i.length&&this.menuInstance.focus(e,i)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var n=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),n=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),n=!1}n&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex);e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var n=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this._setText(this.buttonText,t.label),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==n&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){"icons"===t&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(e.button),this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"disabled"===t&&(this.menuInstance.option("disabled",e),this.button.toggleClass("ui-state-disabled",e).attr("aria-disabled",e),this.element.prop("disabled",e),e?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)),"width"===t&&this._resizeButton()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen),this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;t||(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(e){var n=[];e.each(function(e,i){var r=t(i),o=r.parent("optgroup");n.push({element:r,index:e,value:r.val(),label:r.text(),optgroup:o.attr("label")||"",disabled:o.prop("disabled")||r.prop("disabled")})}),this.items=n},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr("for",this.ids.element)}})}),/*!
 * jQuery UI Slider 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/slider/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.slider",t.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,n,i=this.options,r=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",s=[];for(n=i.values&&i.values.length||1,r.length>n&&(r.slice(n).remove(),r=r.slice(0,n)),e=r.length;n>e;e++)s.push(o);this.handles=r.add(t(s.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,n="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),n="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(n+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var n,i,r,o,s,a,l,u,c=this,h=this.options;return h.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),n={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(n),r=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var n=Math.abs(i-c.values(e));(r>n||r===n&&(e===c._lastChangedValue||c.values(e)===h.min))&&(r=n,o=t(this),s=e)}),a=this._start(e,s),a===!1?!1:(this._mouseSliding=!0,this._handleIndex=s,o.addClass("ui-state-active").focus(),l=o.offset(),u=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=u?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.pageY-l.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,s,i),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},n=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,n),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,n,i,r,o;return"horizontal"===this.orientation?(e=this.elementSize.width,n=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,n=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),i=n/e,i>1&&(i=1),0>i&&(i=0),"vertical"===this.orientation&&(i=1-i),r=this._valueMax()-this._valueMin(),o=this._valueMin()+i*r,this._trimAlignValue(o)},_start:function(t,e){var n={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(n.value=this.values(e),n.values=this.values()),this._trigger("start",t,n)},_slide:function(t,e,n){var i,r,o;this.options.values&&this.options.values.length?(i=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&n>i||1===e&&i>n)&&(n=i),n!==this.values(e)&&(r=this.values(),r[e]=n,o=this._trigger("slide",t,{handle:this.handles[e],value:n,values:r}),i=this.values(e?0:1),o!==!1&&this.values(e,n))):n!==this.value()&&(o=this._trigger("slide",t,{handle:this.handles[e],value:n}),o!==!1&&this.value(n))},_stop:function(t,e){var n={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(e),n.values=this.values()),this._trigger("stop",t,n)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var n={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(n.value=this.values(e),n.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,n)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,n){var i,r,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(n),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(i=this.options.values,r=arguments[0],o=0;o<i.length;o+=1)i[o]=this._trimAlignValue(r[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,n){var i,r=0;switch("range"===e&&this.options.range===!0&&("min"===n?(this.options.value=this._values(0),this.options.values=null):"max"===n&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(r=this.options.values.length),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!n),this._super(e,n),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===n?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=0;r>i;i+=1)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,n,i;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(n=this.options.values.slice(),i=0;i<n.length;i+=1)n[i]=this._trimAlignValue(n[i]);return n}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,n=(t-this._valueMin())%e,i=t-n;return 2*Math.abs(n)>=e&&(i+=n>0?e:-e),parseFloat(i.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),n=this.options.step,i=Math.floor(+(t-e).toFixed(this._precision())/n)*n;t=i+e,this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),n=e.indexOf(".");return-1===n?0:e.length-n-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var e,n,i,r,o,s=this.options.range,a=this.options,l=this,u=this._animateOff?!1:a.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(i){n=(l.values(i)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c["horizontal"===l.orientation?"left":"bottom"]=n+"%",t(this).stop(1,1)[u?"animate":"css"](c,a.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===i&&l.range.stop(1,1)[u?"animate":"css"]({left:n+"%"},a.animate),1===i&&l.range[u?"animate":"css"]({width:n-e+"%"},{queue:!1,duration:a.animate})):(0===i&&l.range.stop(1,1)[u?"animate":"css"]({bottom:n+"%"},a.animate),1===i&&l.range[u?"animate":"css"]({height:n-e+"%"},{queue:!1,duration:a.animate}))),e=n}):(i=this.value(),r=this._valueMin(),o=this._valueMax(),n=o!==r?(i-r)/(o-r)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=n+"%",this.handle.stop(1,1)[u?"animate":"css"](c,a.animate),"min"===s&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:n+"%"},a.animate),"max"===s&&"horizontal"===this.orientation&&this.range[u?"animate":"css"]({width:100-n+"%"},{queue:!1,duration:a.animate}),"min"===s&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:n+"%"},a.animate),"max"===s&&"vertical"===this.orientation&&this.range[u?"animate":"css"]({height:100-n+"%"},{queue:!1,duration:a.animate}))},_handleEvents:{keydown:function(e){var n,i,r,o,s=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(e.target).addClass("ui-state-active"),n=this._start(e,s),n===!1))return}switch(o=this.options.step,i=r=this.options.values&&this.options.values.length?this.values(s):this.value(),e.keyCode){case t.ui.keyCode.HOME:r=this._valueMin();break;case t.ui.keyCode.END:r=this._valueMax();break;case t.ui.keyCode.PAGE_UP:r=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:r=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(i===this._valueMax())return;r=this._trimAlignValue(i+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i===this._valueMin())return;r=this._trimAlignValue(i-o)}this._slide(e,s,r)},keyup:function(e){var n=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,n),this._change(e,n),t(e.target).removeClass("ui-state-active"))}}})}),/*!
 * jQuery UI Sortable 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/sortable/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./mouse","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.sortable",t.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,n){return t>=e&&e+n>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),t.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,n){var i=null,r=!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?(i=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(i=t(e.target)),i&&(!this.options.handle||n||(t(this.options.handle,i).find("*").addBack().each(function(){this===e.target&&(r=!0)}),r))?(this.currentItem=i,this._removeCurrentsFromItems(),!0):!1)},_mouseStart:function(e,n,i){var r,o,s=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,s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),s.containment&&this._setContainment(),s.cursor&&"auto"!==s.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",s.cursor),this.storedStylesheet=t("<style>*{ cursor: "+s.cursor+" !important; }</style>").appendTo(o)),s.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",s.opacity)),s.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",s.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(r=this.containers.length-1;r>=0;r--)this.containers[r]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var n,i,r,o,s=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-this.overflowOffset.top<s.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-s.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-this.overflowOffset.left<s.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-s.scrollSpeed)):(e.pageY-this.document.scrollTop()<s.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-s.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<s.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+s.scrollSpeed)),e.pageX-this.document.scrollLeft()<s.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-s.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<s.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+s.scrollSpeed))),a!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),n=this.items.length-1;n>=0;n--)if(i=this.items[n],r=i.item[0],o=this._intersectsWithPointer(i),o&&i.instance===this.currentContainer&&r!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==r&&!t.contains(this.placeholder[0],r)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],r):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(e,i),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,n){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var i=this,r=this.placeholder.offset(),o=this.options.axis,s={};o&&"x"!==o||(s.left=r.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(s.top=r.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(s,parseInt(this.options.revert,10)||500,function(){i._clear(e)})}else this._clear(e,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var n=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},t(n).each(function(){var n=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);n&&i.push((e.key||n[1]+"[]")+"="+(e.key&&e.expression?n[1]:n[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(e){var n=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},n.each(function(){i.push(t(e.item||this).attr(e.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,n=e+this.helperProportions.width,i=this.positionAbs.top,r=i+this.helperProportions.height,o=t.left,s=o+t.width,a=t.top,l=a+t.height,u=this.offset.click.top,c=this.offset.click.left,h="x"===this.options.axis||i+u>a&&l>i+u,d="y"===this.options.axis||e+c>o&&s>e+c,f=h&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?f:o<e+this.helperProportions.width/2&&n-this.helperProportions.width/2<s&&a<i+this.helperProportions.height/2&&r-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),i=e&&n,r=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return i?this.floating?o&&"right"===o||"down"===r?2:1:r&&("down"===r?2:1):!1},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),i=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return this.floating&&r?"right"===r&&n||"left"===r&&!n:i&&("down"===i&&e||"up"===i&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function n(){a.push(this)}var i,r,o,s,a=[],l=[],u=this._connectWith();if(u&&e)for(i=u.length-1;i>=0;i--)for(o=t(u[i],this.document[0]),r=o.length-1;r>=0;r--)s=t.data(o[r],this.widgetFullName),s&&s!==this&&!s.options.disabled&&l.push([t.isFunction(s.options.items)?s.options.items.call(s.element):t(s.options.items,s.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),s]);for(l.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=l.length-1;i>=0;i--)l[i][0].each(n);return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var n=0;n<e.length;n++)if(e[n]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var n,i,r,o,s,a,l,u,c=this.items,h=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(n=d.length-1;n>=0;n--)for(r=t(d[n],this.document[0]),i=r.length-1;i>=0;i--)o=t.data(r[i],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(h.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(n=h.length-1;n>=0;n--)for(s=h[n][1],a=h[n][0],i=0,u=a.length;u>i;i++)l=t(a[i]),l.data(this.widgetName+"-item",s),c.push({item:l,instance:s,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var n,i,r,o;for(n=this.items.length-1;n>=0;n--)i=this.items[n],i.instance!==this.currentContainer&&this.currentContainer&&i.item[0]!==this.currentItem[0]||(r=this.options.toleranceElement?t(this.options.toleranceElement,i.item):i.item,e||(i.width=r.outerWidth(),i.height=r.outerHeight()),o=r.offset(),i.left=o.left,i.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(n=this.containers.length-1;n>=0;n--)o=this.containers[n].element.offset(),this.containers[n].containerCache.left=o.left,this.containers[n].containerCache.top=o.top,this.containers[n].containerCache.width=this.containers[n].element.outerWidth(),this.containers[n].containerCache.height=this.containers[n].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var n,i=e.options;i.placeholder&&i.placeholder.constructor!==String||(n=i.placeholder,i.placeholder={element:function(){var i=e.currentItem[0].nodeName.toLowerCase(),r=t("<"+i+">",e.document[0]).addClass(n||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===i?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(r)):"tr"===i?e._createTrPlaceholder(e.currentItem,r):"img"===i&&r.attr("src",e.currentItem.attr("src")),n||r.css("visibility","hidden"),r},update:function(t,r){(!n||i.forcePlaceholderSize)&&(r.height()||r.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),r.width()||r.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(i.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),i.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,n){var i=this;e.children().each(function(){t("<td>&#160;</td>",i.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)})},_contactContainers:function(e){var n,i,r,o,s,a,l,u,c,h,d=null,f=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(d&&t.contains(this.containers[n].element[0],d.element[0]))continue;d=this.containers[n],f=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",e,this._uiHash(this)),this.containers[n].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[f].containerCache.over||(this.containers[f]._trigger("over",e,this._uiHash(this)),this.containers[f].containerCache.over=1);else{for(r=1e4,o=null,c=d.floating||this._isFloating(this.currentItem),s=c?"left":"top",a=c?"width":"height",h=c?"clientX":"clientY",i=this.items.length-1;i>=0;i--)t.contains(this.containers[f].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(l=this.items[i].item.offset()[s],u=!1,e[h]-l>this.items[i][a]/2&&(u=!0),Math.abs(e[h]-l)<r&&(r=Math.abs(e[h]-l),o=this.items[i],this.direction=u?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[f])return void(this.currentContainer.containerCache.over||(this.containers[f]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[f].element,!0),this._trigger("change",e,this._uiHash()),this.containers[f]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[f],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[f]._trigger("over",e,this._uiHash(this)),this.containers[f].containerCache.over=1}},_createHelper:function(e){var n=this.options,i=t.isFunction(n.helper)?t(n.helper.apply(this.element[0],[e,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||t("parent"!==n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!i[0].style.width||n.forceHelperSize)&&i.width(this.currentItem.width()),(!i[0].style.height||n.forceHelperSize)&&i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,n,i,r=this.options;"parent"===r.containment&&(r.containment=this.helper[0].parentNode),("document"===r.containment||"window"===r.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===r.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===r.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(r.containment)||(e=t(r.containment)[0],n=t(r.containment).offset(),i="hidden"!==t(e).css("overflow"),this.containment=[n.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,n.left+(i?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(i?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,n){n||(n=this.position);var i="absolute"===e?1:-1,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(r[0].tagName);return{top:n.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:r.scrollTop())*i,left:n.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:r.scrollLeft())*i}},_generatePosition:function(e){var n,i,r=this.options,o=e.pageX,s=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),r.grid&&(n=this.originalPageY+Math.round((s-this.originalPageY)/r.grid[1])*r.grid[1],s=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-r.grid[1]:n+r.grid[1]:n,i=this.originalPageX+Math.round((o-this.originalPageX)/r.grid[0])*r.grid[0],o=this.containment?i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-r.grid[0]:i+r.grid[0]:i)),{top:s-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,n,i){n?n[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var r=this.counter;this._delay(function(){r===this.counter&&this.refreshPositions(!i)})},_clear:function(t,e){function n(t,e,n){return function(i){n._trigger(t,i,e._uiHash(e))}}this.reverting=!1;var i,r=[];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&&r.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||r.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(r.push(function(t){this._trigger("remove",t,this._uiHash())}),r.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),r.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||r.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(r.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<r.length;i++)r[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var n=e||this;return{helper:n.helper,placeholder:n.placeholder||t([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:e?e.element:null}}})}),/*!
 * jQuery UI Spinner 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/spinner/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./button"],t):t(jQuery)}(function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}return t.widget("ui.spinner",{version:"1.11.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},n=this.element;return t.each(["min","max","step"],function(t,i){var r=n.attr(i);void 0!==r&&r.length&&(e[i]=r)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",t)))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function n(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=i,this._delay(function(){this.previous=i}))}var i;i=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),n.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,n.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var n=this.options,i=t.ui.keyCode;switch(e.keyCode){case i.UP:return this._repeat(null,1,e),!0;case i.DOWN:return this._repeat(null,-1,e),!0;case i.PAGE_UP:return this._repeat(null,n.page,e),!0;case i.PAGE_DOWN:return this._repeat(null,-n.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,n){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,n)},t),this._spin(e*this.options.step,n)},_spin:function(t,e){var n=this.value()||0;this.counter||(this.counter=1),n=this._adjustValue(n+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:n})===!1||(this._value(n),this.counter++)},_increment:function(e){var n=this.options.incremental;return n?t.isFunction(n)?n(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),n=e.indexOf(".");return-1===n?0:e.length-n-1},_adjustValue:function(t){var e,n,i=this.options;return e=null!==i.min?i.min:0,n=t-e,n=Math.round(n/i.step)*i.step,t=e+n,t=parseFloat(t.toFixed(this._precision())),null!==i.max&&t>i.max?i.max:null!==i.min&&t<i.min?i.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var n=this._parse(this.element.val());return this.options[t]=e,void this.element.val(this._format(n))}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(this.widget().toggleClass("ui-state-disabled",!!e),this.element.prop("disabled",!!e),this.buttons.button(e?"disable":"enable"))},_setOptions:e(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null===t?!1:t===this._adjustValue(t)},_value:function(t,e){var n;""!==t&&(n=this._parse(t),null!==n&&(e||(n=this._adjustValue(n)),t=this._format(n))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?void e(this._value).call(this,t):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}),/*!
 * jQuery UI Tabs 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/tabs/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget"],t):t(jQuery)}(function(t){return t.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var n,i;e=e.cloneNode(!1),n=e.href.replace(t,""),i=location.href.replace(t,"");try{n=decodeURIComponent(n)}catch(r){}try{i=decodeURIComponent(i)}catch(r){}return e.hash.length>1&&n===i}}(),_create:function(){var e=this,n=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",n.collapsible),this._processTabs(),n.active=this._initialActive(),t.isArray(n.disabled)&&(n.disabled=t.unique(n.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(n.active):this.active=t(),this._refresh(),this.active.length&&this.load(n.active)},_initialActive:function(){var e=this.options.active,n=this.options.collapsible,i=location.hash.substring(1);return null===e&&(i&&this.tabs.each(function(n,r){return t(r).attr("aria-controls")===i?(e=n,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=this.tabs.length?0:!1)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),-1===e&&(e=n?!1:0)),!n&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var n=t(this.document[0].activeElement).closest("li"),i=this.tabs.index(n),r=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:i++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:r=!1,i--;break;case t.ui.keyCode.END:i=this.anchors.length-1;break;case t.ui.keyCode.HOME:i=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(i);case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(i===this.options.active?!1:i);default:return}e.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,r),e.ctrlKey||e.metaKey||(n.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,n){function i(){return e>r&&(e=0),0>e&&(e=r),e}for(var r=this.tabs.length-1;-1!==t.inArray(i(),this.options.disabled);)e=n?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,e){return"active"===t?void this._activate(e):"disabled"===t?void this._setupDisabled(e):(this._super(t,e),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),void("heightStyle"===t&&this._setupHeightStyle(e)))},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,n=this.tablist.children(":has(a[href])");e.disabled=t.map(n.filter(".ui-state-disabled"),function(t){return n.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,n=this.tabs,i=this.anchors,r=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(n,i){var r,o,s,a=t(i).uniqueId().attr("id"),l=t(i).closest("li"),u=l.attr("aria-controls");e._isLocal(i)?(r=i.hash,s=r.substring(1),o=e.element.find(e._sanitizeSelector(r))):(s=l.attr("aria-controls")||t({}).uniqueId()[0].id,r="#"+s,o=e.element.find(r),o.length||(o=e._createPanel(s),o.insertAfter(e.panels[n-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),u&&l.data("ui-tabs-aria-controls",u),l.attr({"aria-controls":s,"aria-labelledby":a}),o.attr("aria-labelledby",a)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),n&&(this._off(n.not(this.tabs)),this._off(i.not(this.anchors)),this._off(r.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var n,i=0;n=this.tabs[i];i++)e===!0||-1!==t.inArray(i,e)?t(n).addClass("ui-state-disabled").attr("aria-disabled","true"):t(n).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var n={};e&&t.each(e.split(" "),function(t,e){n[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,n),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var n,i=this.element.parent();"fill"===e?(n=i.height(),n-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),i=e.css("position");"absolute"!==i&&"fixed"!==i&&(n-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){n-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,n-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(n=0,this.panels.each(function(){n=Math.max(n,t(this).height("").height())}).height(n))},_eventHandler:function(e){var n=this.options,i=this.active,r=t(e.currentTarget),o=r.closest("li"),s=o[0]===i[0],a=s&&n.collapsible,l=a?t():this._getPanelForTab(o),u=i.length?this._getPanelForTab(i):t(),c={oldTab:i,oldPanel:u,newTab:a?t():o,newPanel:l};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||s&&!n.collapsible||this._trigger("beforeActivate",e,c)===!1||(n.active=a?!1:this.tabs.index(o),this.active=s?t():o,this.xhr&&this.xhr.abort(),u.length||l.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,n){function i(){o.running=!1,o._trigger("activate",e,n)}function r(){n.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),s.length&&o.options.show?o._show(s,o.options.show,i):(s.show(),i())}var o=this,s=n.newPanel,a=n.oldPanel;this.running=!0,a.length&&this.options.hide?this._hide(a,this.options.hide,function(){n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r()}):(n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),a.hide(),r()),a.attr("aria-hidden","true"),n.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),s.length&&a.length?n.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr("aria-hidden","false"),n.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var n,i=this._findActive(e);i[0]!==this.active[0]&&(i.length||(i=this.active),n=i.find(".ui-tabs-anchor")[0],this._eventHandler({target:n,currentTarget:n,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),n=e.data("ui-tabs-aria-controls");n?e.attr("aria-controls",n).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var n=this.options.disabled;n!==!1&&(void 0===e?n=!1:(e=this._getIndex(e),n=t.isArray(n)?t.map(n,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,n){return n!==e?n:null})),this._setupDisabled(n))},disable:function(e){var n=this.options.disabled;if(n!==!0){if(void 0===e)n=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,n))return;n=t.isArray(n)?t.merge([e],n).sort():[e]}this._setupDisabled(n)}},load:function(e,n){e=this._getIndex(e);var i=this,r=this.tabs.eq(e),o=r.find(".ui-tabs-anchor"),s=this._getPanelForTab(r),a={tab:r,panel:s},l=function(t,e){"abort"===e&&i.panels.stop(!1,!0),r.removeClass("ui-tabs-loading"),s.removeAttr("aria-busy"),t===i.xhr&&delete i.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,n,a)),this.xhr&&"canceled"!==this.xhr.statusText&&(r.addClass("ui-tabs-loading"),s.attr("aria-busy","true"),this.xhr.done(function(t,e,r){setTimeout(function(){s.html(t),i._trigger("load",n,a),l(r,e)},1)}).fail(function(t,e){setTimeout(function(){l(t,e)},1)})))},_ajaxSettings:function(e,n,i){var r=this;return{url:e.attr("href"),beforeSend:function(e,o){return r._trigger("beforeLoad",n,t.extend({jqXHR:e,ajaxSettings:o},i))}}},_getPanelForTab:function(e){var n=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+n))}})}),/*!
 * jQuery UI Tooltip 1.11.4
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/tooltip/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery","./core","./widget","./position"],t):t(jQuery)}(function(t){return t.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(e,n){var i=(e.attr("aria-describedby")||"").split(/\s+/);i.push(n),e.data("ui-tooltip-id",n).attr("aria-describedby",t.trim(i.join(" ")))},_removeDescribedBy:function(e){var n=e.data("ui-tooltip-id"),i=(e.attr("aria-describedby")||"").split(/\s+/),r=t.inArray(n,i);-1!==r&&i.splice(r,1),e.removeData("ui-tooltip-id"),i=t.trim(i.join(" ")),i?e.attr("aria-describedby",i):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(e,n){var i=this;return"disabled"===e?(this[n?"_disable":"_enable"](),void(this.options[e]=n)):(this._super(e,n),void("content"===e&&t.each(this.tooltips,function(t,e){i._updateContent(e.element)})))},_disable:function(){var e=this;t.each(this.tooltips,function(n,i){var r=t.Event("blur");r.target=r.currentTarget=i.element[0],e.close(r,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var n=this,i=t(e?e.target:this.element).closest(this.options.items);i.length&&!i.data("ui-tooltip-id")&&(i.attr("title")&&i.data("ui-tooltip-title",i.attr("title")),i.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&i.parents().each(function(){var e,i=t(this);i.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,n.close(e,!0)),i.attr("title")&&(i.uniqueId(),n.parents[this.id]={element:this,title:i.attr("title")},i.attr("title",""))}),this._registerCloseHandlers(e,i),this._updateContent(i,e))},_updateContent:function(t,e){var n,i=this.options.content,r=this,o=e?e.type:null;return"string"==typeof i?this._open(e,t,i):(n=i.call(t[0],function(n){r._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,n))})}),void(n&&this._open(e,t,n)))},_open:function(e,n,i){function r(t){u.of=t,s.is(":hidden")||s.position(u)}var o,s,a,l,u=t.extend({},this.options.position);if(i){if(o=this._find(n))return void o.tooltip.find(".ui-tooltip-content").html(i);n.is("[title]")&&(e&&"mouseover"===e.type?n.attr("title",""):n.removeAttr("title")),o=this._tooltip(n),s=o.tooltip,this._addDescribedBy(n,s.attr("id")),s.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),i.clone?(l=i.clone(),l.removeAttr("id").find("[id]").removeAttr("id")):l=i,t("<div>").html(l).appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:r}),r(e)):s.position(t.extend({of:n},this.options.position)),s.hide(),this._show(s,this.options.show),this.options.show&&this.options.show.delay&&(a=this.delayedShow=setInterval(function(){s.is(":visible")&&(r(u.of),clearInterval(a))},t.fx.interval)),this._trigger("open",e,{tooltip:s})}},_registerCloseHandlers:function(e,n){var i={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=n[0],this.close(i,!0)}}};n[0]!==this.element[0]&&(i.remove=function(){this._removeTooltip(this._find(n).tooltip)}),e&&"mouseover"!==e.type||(i.mouseleave="close"),e&&"focusin"!==e.type||(i.focusout="close"),this._on(!0,n,i)},close:function(e){var n,i=this,r=t(e?e.currentTarget:this.element),o=this._find(r);return o?(n=o.tooltip,void(o.closing||(clearInterval(this.delayedShow),r.data("ui-tooltip-title")&&!r.attr("title")&&r.attr("title",r.data("ui-tooltip-title")),this._removeDescribedBy(r),o.hiding=!0,n.stop(!0),this._hide(n,this.options.hide,function(){i._removeTooltip(t(this))}),r.removeData("ui-tooltip-open"),this._off(r,"mouseleave focusout keyup"),r[0]!==this.element[0]&&this._off(r,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,n){t(n.element).attr("title",n.title),delete i.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:n}),o.hiding||(o.closing=!1)))):void r.removeData("ui-tooltip-open")},_tooltip:function(e){var n=t("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),i=n.uniqueId().attr("id");return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]={element:e,tooltip:n}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(n,i){var r=t.Event("blur"),o=i.element;r.target=r.currentTarget=o[0],e.close(r,!0),t("#"+n).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})}),function(t,e){"use strict";t.rails!==e&&t.error("jquery-ujs has already been loaded!");var n,i=t(document);t.rails=n={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not([form]):not(form button), button[data-confirm]:not([form]):not(form button)",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]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]), textarea[name][required]:not([disabled])",fileInputSelector:"input[type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",csrfToken:function(){return t("meta[name=csrf-token]").attr("content")},csrfParam:function(){return t("meta[name=csrf-param]").attr("content")},CSRFProtection:function(t){var e=n.csrfToken();e&&t.setRequestHeader("X-CSRF-Token",e)},refreshCSRFTokens:function(){t('form input[name="'+n.csrfParam()+'"]').val(n.csrfToken())},fire:function(e,n,i){var r=t.Event(n);return e.trigger(r,i),r.result!==!1},confirm:function(t){return confirm(t)},ajax:function(e){return t.ajax(e)},href:function(t){return t[0].href},isRemote:function(t){return t.data("remote")!==e&&t.data("remote")!==!1},handleRemote:function(i){var r,o,s,a,l,u;if(n.fire(i,"ajax:before")){if(a=i.data("with-credentials")||null,l=i.data("type")||t.ajaxSettings&&t.ajaxSettings.dataType,i.is("form")){r=i.data("ujs:submit-button-formmethod")||i.attr("method"),o=i.data("ujs:submit-button-formaction")||i.attr("action"),s=t(i[0].elements).serializeArray();var c=i.data("ujs:submit-button");c&&(s.push(c),i.data("ujs:submit-button",null)),i.data("ujs:submit-button-formmethod",null),i.data("ujs:submit-button-formaction",null)}else i.is(n.inputChangeSelector)?(r=i.data("method"),o=i.data("url"),s=i.serialize(),i.data("params")&&(s=s+"&"+i.data("params"))):i.is(n.buttonClickSelector)?(r=i.data("method")||"get",o=i.data("url"),s=i.serialize(),i.data("params")&&(s=s+"&"+i.data("params"))):(r=i.data("method"),o=n.href(i),s=i.data("params")||null);return u={type:r||"GET",data:s,dataType:l,beforeSend:function(t,r){return r.dataType===e&&t.setRequestHeader("accept","*/*;q=0.5, "+r.accepts.script),n.fire(i,"ajax:beforeSend",[t,r])?void i.trigger("ajax:send",t):!1},success:function(t,e,n){i.trigger("ajax:success",[t,e,n])},complete:function(t,e){i.trigger("ajax:complete",[t,e])},error:function(t,e,n){i.trigger("ajax:error",[t,e,n])},crossDomain:n.isCrossDomain(o)},a&&(u.xhrFields={withCredentials:a}),o&&(u.url=o),n.ajax(u)}return!1},isCrossDomain:function(t){var e=document.createElement("a");e.href=location.href;var n=document.createElement("a");try{return n.href=t,n.href=n.href,!((!n.protocol||":"===n.protocol)&&!n.host||e.protocol+"//"+e.host==n.protocol+"//"+n.host)}catch(i){return!0}},handleMethod:function(i){var r=n.href(i),o=i.data("method"),s=i.attr("target"),a=n.csrfToken(),l=n.csrfParam(),u=t('<form method="post" action="'+r+'"></form>'),c='<input name="_method" value="'+o+'" type="hidden" />';l===e||a===e||n.isCrossDomain(r)||(c+='<input name="'+l+'" value="'+a+'" type="hidden" />'),s&&u.attr("target",s),u.hide().append(c).appendTo("body"),u.submit()},formElements:function(e,n){return e.is("form")?t(e[0].elements).filter(n):e.find(n)},disableFormElements:function(e){n.formElements(e,n.disableSelector).each(function(){n.disableFormElement(t(this))})},disableFormElement:function(t){var n,i;n=t.is("button")?"html":"val",i=t.data("disable-with"),i!==e&&(t.data("ujs:enable-with",t[n]()),t[n](i)),t.prop("disabled",!0),t.data("ujs:disabled",!0)},enableFormElements:function(e){n.formElements(e,n.enableSelector).each(function(){n.enableFormElement(t(this))})},enableFormElement:function(t){var n=t.is("button")?"html":"val";t.data("ujs:enable-with")!==e&&(t[n](t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.prop("disabled",!1),t.removeData("ujs:disabled")},allowAction:function(t){var e,i=t.data("confirm"),r=!1;if(!i)return!0;if(n.fire(t,"confirm")){try{r=n.confirm(i)}catch(o){(console.error||console.log).call(console,o.stack||o)}e=n.fire(t,"confirm:complete",[r])}return r&&e},blankInputs:function(e,n,i){var r,o,s=t(),a=n||"input,textarea",l=e.find(a);return l.each(function(){if(r=t(this),o=r.is("input[type=checkbox],input[type=radio]")?r.is(":checked"):!!r.val(),o===i){if(r.is("input[type=radio]")&&l.filter('input[type=radio]:checked[name="'+r.attr("name")+'"]').length)return!0;s=s.add(r)}}),s.length?s:!1},nonBlankInputs:function(t,e){return n.blankInputs(t,e,!0)},stopEverything:function(e){return t(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(t){var i=t.data("disable-with");i!==e&&(t.data("ujs:enable-with",t.html()),t.html(i)),t.bind("click.railsDisable",function(t){return n.stopEverything(t)}),t.data("ujs:disabled",!0)},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"),t.removeData("ujs:disabled")}},n.fire(i,"rails:attachBindings")&&(t.ajaxPrefilter(function(t,e,i){t.crossDomain||n.CSRFProtection(i)}),t(window).on("pageshow.rails",function(){t(t.rails.enableSelector).each(function(){var e=t(this);e.data("ujs:disabled")&&t.rails.enableFormElement(e)}),t(t.rails.linkDisableSelector).each(function(){var e=t(this);e.data("ujs:disabled")&&t.rails.enableElement(e)})}),i.delegate(n.linkDisableSelector,"ajax:complete",function(){n.enableElement(t(this))}),i.delegate(n.buttonDisableSelector,"ajax:complete",function(){n.enableFormElement(t(this))}),i.delegate(n.linkClickSelector,"click.rails",function(e){var i=t(this),r=i.data("method"),o=i.data("params"),s=e.metaKey||e.ctrlKey;if(!n.allowAction(i))return n.stopEverything(e);if(!s&&i.is(n.linkDisableSelector)&&n.disableElement(i),n.isRemote(i)){if(s&&(!r||"GET"===r)&&!o)return!0;var a=n.handleRemote(i);return a===!1?n.enableElement(i):a.fail(function(){n.enableElement(i)}),!1}return r?(n.handleMethod(i),!1):void 0}),i.delegate(n.buttonClickSelector,"click.rails",function(e){var i=t(this);if(!n.allowAction(i)||!n.isRemote(i))return n.stopEverything(e);i.is(n.buttonDisableSelector)&&n.disableFormElement(i);var r=n.handleRemote(i);return r===!1?n.enableFormElement(i):r.fail(function(){n.enableFormElement(i)}),!1}),i.delegate(n.inputChangeSelector,"change.rails",function(e){var i=t(this);return n.allowAction(i)&&n.isRemote(i)?(n.handleRemote(i),!1):n.stopEverything(e)}),i.delegate(n.formSubmitSelector,"submit.rails",function(i){var r,o,s=t(this),a=n.isRemote(s);if(!n.allowAction(s))return n.stopEverything(i);if(s.attr("novalidate")===e)if(s.data("ujs:formnovalidate-button")===e){if(r=n.blankInputs(s,n.requiredInputSelector,!1),r&&n.fire(s,"ajax:aborted:required",[r]))return n.stopEverything(i)}else s.data("ujs:formnovalidate-button",e);if(a){if(o=n.nonBlankInputs(s,n.fileInputSelector)){setTimeout(function(){n.disableFormElements(s)},13);var l=n.fire(s,"ajax:aborted:file",[o]);return l||setTimeout(function(){n.enableFormElements(s)},13),l}return n.handleRemote(s),!1}setTimeout(function(){n.disableFormElements(s)},13)}),i.delegate(n.formInputClickSelector,"click.rails",function(e){var i=t(this);if(!n.allowAction(i))return n.stopEverything(e);var r=i.attr("name"),o=r?{name:r,value:i.val()}:null,s=i.closest("form");0===s.length&&(s=t("#"+i.attr("form"))),s.data("ujs:submit-button",o),s.data("ujs:formnovalidate-button",i.attr("formnovalidate")),s.data("ujs:submit-button-formaction",i.attr("formaction")),s.data("ujs:submit-button-formmethod",i.attr("formmethod"))}),i.delegate(n.formSubmitSelector,"ajax:send.rails",function(e){this===e.target&&n.disableFormElements(t(this))}),i.delegate(n.formSubmitSelector,"ajax:complete.rails",function(e){this===e.target&&n.enableFormElements(t(this))}),t(function(){n.refreshCSRFTokens()}))}(jQuery),/*!
 * jQuery Form Plugin
 * version: 3.51.0-2014.06.20
 * Requires jQuery v1.5 or later
 * Copyright (c) 2014 M. Alsup
 * Examples and documentation at: http://malsup.com/jquery/form/
 * Project repository: https://github.com/malsup/form
 * Dual licensed under the MIT and GPL licenses.
 * https://github.com/malsup/form#copyright-and-license
 */
function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(t){"use strict";function e(e){var n=e.data;e.isDefaultPrevented()||(e.preventDefault(),t(e.target).ajaxSubmit(n))}function n(e){var n=e.target,i=t(n);if(!i.is("[type=submit],[type=image]")){var r=i.closest("[type=submit]");if(0===r.length)return;n=r[0]}var o=this;if(o.clk=n,"image"==n.type)if(void 0!==e.offsetX)o.clk_x=e.offsetX,o.clk_y=e.offsetY;else if("function"==typeof t.fn.offset){var s=i.offset();o.clk_x=e.pageX-s.left,o.clk_y=e.pageY-s.top}else o.clk_x=e.pageX-n.offsetLeft,o.clk_y=e.pageY-n.offsetTop;setTimeout(function(){o.clk=o.clk_x=o.clk_y=null},100)}function i(){if(t.fn.ajaxSubmit.debug){var e="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e)}}var r={};r.fileapi=void 0!==t("<input type='file'/>").get(0).files,r.formdata=void 0!==window.FormData;var o=!!t.fn.prop;t.fn.attr2=function(){if(!o)return this.attr.apply(this,arguments);var t=this.prop.apply(this,arguments);return t&&t.jquery||"string"==typeof t?t:this.attr.apply(this,arguments)},t.fn.ajaxSubmit=function(e){function n(n){var i,r,o=t.param(n,e.traditional).split("&"),s=o.length,a=[];for(i=0;s>i;i++)o[i]=o[i].replace(/\+/g," "),r=o[i].split("="),a.push([decodeURIComponent(r[0]),decodeURIComponent(r[1])]);return a}function s(i){for(var r=new FormData,o=0;o<i.length;o++)r.append(i[o].name,i[o].value);if(e.extraData){var s=n(e.extraData);for(o=0;o<s.length;o++)s[o]&&r.append(s[o][0],s[o][1])}e.data=null;var a=t.extend(!0,{},t.ajaxSettings,e,{contentType:!1,processData:!1,cache:!1,type:l||"POST"});e.uploadProgress&&(a.xhr=function(){var n=t.ajaxSettings.xhr();return n.upload&&n.upload.addEventListener("progress",function(t){var n=0,i=t.loaded||t.position,r=t.total;t.lengthComputable&&(n=Math.ceil(i/r*100)),e.uploadProgress(t,i,r,n)},!1),n}),a.data=null;var u=a.beforeSend;return a.beforeSend=function(t,n){e.formData?n.data=e.formData:n.data=r,u&&u.call(this,t,n)},t.ajax(a)}function a(n){function r(t){var e=null;try{t.contentWindow&&(e=t.contentWindow.document)}catch(n){i("cannot get iframe.contentWindow document: "+n)}if(e)return e;try{e=t.contentDocument?t.contentDocument:t.document}catch(n){i("cannot get iframe.contentDocument: "+n),e=t.document}return e}function s(){function e(){try{var t=r(v).readyState;i("state = "+t),t&&"uninitialized"==t.toLowerCase()&&setTimeout(e,50)}catch(n){i("Server abort: ",n," (",n.name,")"),a(D),w&&clearTimeout(w),w=void 0}}var n=h.attr2("target"),o=h.attr2("action"),s="multipart/form-data",u=h.attr("enctype")||h.attr("encoding")||s;C.setAttribute("target",p),(!l||/post/i.test(l))&&C.setAttribute("method","POST"),o!=d.url&&C.setAttribute("action",d.url),d.skipEncodingOverride||l&&!/post/i.test(l)||h.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),d.timeout&&(w=setTimeout(function(){x=!0,a(T)},d.timeout));var c=[];try{if(d.extraData)for(var f in d.extraData)d.extraData.hasOwnProperty(f)&&(t.isPlainObject(d.extraData[f])&&d.extraData[f].hasOwnProperty("name")&&d.extraData[f].hasOwnProperty("value")?c.push(t('<input type="hidden" name="'+d.extraData[f].name+'">').val(d.extraData[f].value).appendTo(C)[0]):c.push(t('<input type="hidden" name="'+f+'">').val(d.extraData[f]).appendTo(C)[0]));d.iframeTarget||m.appendTo("body"),v.attachEvent?v.attachEvent("onload",a):v.addEventListener("load",a,!1),setTimeout(e,15);try{C.submit()}catch(g){var y=document.createElement("form").submit;y.apply(C)}}finally{C.setAttribute("action",o),C.setAttribute("enctype",u),n?C.setAttribute("target",n):h.removeAttr("target"),t(c).remove()}}function a(e){if(!y.aborted&&!A){if(N=r(v),N||(i("cannot access response document"),e=D),e===T&&y)return y.abort("timeout"),void k.reject(y,"timeout");if(e==D&&y)return y.abort("server abort"),void k.reject(y,"error","server abort");if(N&&N.location.href!=d.iframeSrc||x){v.detachEvent?v.detachEvent("onload",a):v.removeEventListener("load",a,!1);var n,o="success";try{if(x)throw"timeout";var s="xml"==d.dataType||N.XMLDocument||t.isXMLDoc(N);if(i("isXml="+s),!s&&window.opera&&(null===N.body||!N.body.innerHTML)&&--j)return i("requeing onLoad callback, DOM not available"),void setTimeout(a,250);var l=N.body?N.body:N.documentElement;y.responseText=l?l.innerHTML:null,y.responseXML=N.XMLDocument?N.XMLDocument:N,s&&(d.dataType="xml"),y.getResponseHeader=function(t){var e={"content-type":d.dataType};return e[t.toLowerCase()]},l&&(y.status=Number(l.getAttribute("status"))||y.status,y.statusText=l.getAttribute("statusText")||y.statusText);var u=(d.dataType||"").toLowerCase(),c=/(json|script|text)/.test(u);if(c||d.textarea){var h=N.getElementsByTagName("textarea")[0];if(h)y.responseText=h.value,y.status=Number(h.getAttribute("status"))||y.status,y.statusText=h.getAttribute("statusText")||y.statusText;else if(c){var p=N.getElementsByTagName("pre")[0],g=N.getElementsByTagName("body")[0];p?y.responseText=p.textContent?p.textContent:p.innerText:g&&(y.responseText=g.textContent?g.textContent:g.innerText)}}else"xml"==u&&!y.responseXML&&y.responseText&&(y.responseXML=I(y.responseText));try{E=P(y,u,d)}catch(b){o="parsererror",y.error=n=b||o}}catch(b){i("error caught: ",b),o="error",y.error=n=b||o}y.aborted&&(i("upload aborted"),o=null),y.status&&(o=y.status>=200&&y.status<300||304===y.status?"success":"error"),"success"===o?(d.success&&d.success.call(d.context,E,"success",y),k.resolve(y.responseText,"success",y),f&&t.event.trigger("ajaxSuccess",[y,d])):o&&(void 0===n&&(n=y.statusText),d.error&&d.error.call(d.context,y,o,n),k.reject(y,"error",n),f&&t.event.trigger("ajaxError",[y,d,n])),f&&t.event.trigger("ajaxComplete",[y,d]),f&&!--t.active&&t.event.trigger("ajaxStop"),d.complete&&d.complete.call(d.context,y,o),A=!0,d.timeout&&clearTimeout(w),setTimeout(function(){d.iframeTarget?m.attr("src",d.iframeSrc):m.remove(),y.responseXML=null},100)}}}var u,c,d,f,p,m,v,y,b,_,x,w,C=h[0],k=t.Deferred();if(k.abort=function(t){y.abort(t)},n)for(c=0;c<g.length;c++)u=t(g[c]),o?u.prop("disabled",!1):u.removeAttr("disabled");if(d=t.extend(!0,{},t.ajaxSettings,e),d.context=d.context||d,p="jqFormIO"+(new Date).getTime(),d.iframeTarget?(m=t(d.iframeTarget),_=m.attr2("name"),_?p=_:m.attr2("name",p)):(m=t('<iframe name="'+p+'" src="'+d.iframeSrc+'" />'),m.css({position:"absolute",top:"-1000px",left:"-1000px"})),v=m[0],y={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var n="timeout"===e?"timeout":"aborted";i("aborting upload... "+n),this.aborted=1;try{v.contentWindow.document.execCommand&&v.contentWindow.document.execCommand("Stop")}catch(r){}m.attr("src",d.iframeSrc),y.error=n,d.error&&d.error.call(d.context,y,n,e),f&&t.event.trigger("ajaxError",[y,d,n]),d.complete&&d.complete.call(d.context,y,n)}},f=d.global,f&&0===t.active++&&t.event.trigger("ajaxStart"),f&&t.event.trigger("ajaxSend",[y,d]),d.beforeSend&&d.beforeSend.call(d.context,y,d)===!1)return d.global&&t.active--,k.reject(),k;if(y.aborted)return k.reject(),k;b=C.clk,b&&(_=b.name,_&&!b.disabled&&(d.extraData=d.extraData||{},d.extraData[_]=b.value,"image"==b.type&&(d.extraData[_+".x"]=C.clk_x,d.extraData[_+".y"]=C.clk_y)));var T=1,D=2,M=t("meta[name=csrf-token]").attr("content"),S=t("meta[name=csrf-param]").attr("content");S&&M&&(d.extraData=d.extraData||{},d.extraData[S]=M),d.forceSync?s():setTimeout(s,10);var E,N,A,j=50,I=t.parseXML||function(t,e){return window.ActiveXObject?(e=new ActiveXObject("Microsoft.XMLDOM"),e.async="false",e.loadXML(t)):e=(new DOMParser).parseFromString(t,"text/xml"),e&&e.documentElement&&"parsererror"!=e.documentElement.nodeName?e:null},$=t.parseJSON||function(t){return window.eval("("+t+")")},P=function(e,n,i){var r=e.getResponseHeader("content-type")||"",o="xml"===n||!n&&r.indexOf("xml")>=0,s=o?e.responseXML:e.responseText;return o&&"parsererror"===s.documentElement.nodeName&&t.error&&t.error("parsererror"),i&&i.dataFilter&&(s=i.dataFilter(s,n)),"string"==typeof s&&("json"===n||!n&&r.indexOf("json")>=0?s=$(s):("script"===n||!n&&r.indexOf("javascript")>=0)&&t.globalEval(s)),s};return k}if(!this.length)return i("ajaxSubmit: skipping submit process - no element selected"),this;var l,u,c,h=this;"function"==typeof e?e={success:e}:void 0===e&&(e={}),l=e.type||this.attr2("method"),u=e.url||this.attr2("action"),c="string"==typeof u?t.trim(u):"",c=c||window.location.href||"",c&&(c=(c.match(/^([^#]+)/)||[])[1]),e=t.extend(!0,{url:c,success:t.ajaxSettings.success,type:l||t.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},e);var d={};if(this.trigger("form-pre-serialize",[this,e,d]),d.veto)return i("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(e.beforeSerialize&&e.beforeSerialize(this,e)===!1)return i("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var f=e.traditional;void 0===f&&(f=t.ajaxSettings.traditional);var p,g=[],m=this.formToArray(e.semantic,g);if(e.data&&(e.extraData=e.data,p=t.param(e.data,f)),e.beforeSubmit&&e.beforeSubmit(m,this,e)===!1)return i("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[m,this,e,d]),d.veto)return i("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var v=t.param(m,f);p&&(v=v?v+"&"+p:p),"GET"==e.type.toUpperCase()?(e.url+=(e.url.indexOf("?")>=0?"&":"?")+v,e.data=null):e.data=v;var y=[];if(e.resetForm&&y.push(function(){h.resetForm()}),e.clearForm&&y.push(function(){h.clearForm(e.includeHidden)}),!e.dataType&&e.target){var b=e.success||function(){};y.push(function(n){var i=e.replaceTarget?"replaceWith":"html";t(e.target)[i](n).each(b,arguments)})}else e.success&&y.push(e.success);if(e.success=function(t,n,i){for(var r=e.context||this,o=0,s=y.length;s>o;o++)y[o].apply(r,[t,n,i||h,h])},e.error){var _=e.error;e.error=function(t,n,i){var r=e.context||this;_.apply(r,[t,n,i,h])}}if(e.complete){var x=e.complete;e.complete=function(t,n){var i=e.context||this;x.apply(i,[t,n,h])}}var w=t("input[type=file]:enabled",this).filter(function(){return""!==t(this).val()}),C=w.length>0,k="multipart/form-data",T=h.attr("enctype")==k||h.attr("encoding")==k,D=r.fileapi&&r.formdata;i("fileAPI :"+D);var M,S=(C||T)&&!D;e.iframe!==!1&&(e.iframe||S)?e.closeKeepAlive?t.get(e.closeKeepAlive,function(){M=a(m)}):M=a(m):M=(C||T)&&D?s(m):t.ajax(e),h.removeData("jqxhr").data("jqxhr",M);for(var E=0;E<g.length;E++)g[E]=null;return this.trigger("form-submit-notify",[this,e]),this},t.fn.ajaxForm=function(r){if(r=r||{},r.delegation=r.delegation&&t.isFunction(t.fn.on),!r.delegation&&0===this.length){var o={s:this.selector,c:this.context};return!t.isReady&&o.s?(i("DOM not ready, queuing ajaxForm"),t(function(){t(o.s,o.c).ajaxForm(r)}),this):(i("terminating; zero elements found by selector"+(t.isReady?"":" (DOM not ready)")),this)}return r.delegation?(t(document).off("submit.form-plugin",this.selector,e).off("click.form-plugin",this.selector,n).on("submit.form-plugin",this.selector,r,e).on("click.form-plugin",this.selector,r,n),this):this.ajaxFormUnbind().bind("submit.form-plugin",r,e).bind("click.form-plugin",r,n)},t.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},t.fn.formToArray=function(e,n){var i=[];if(0===this.length)return i;var o,s=this[0],a=this.attr("id"),l=e?s.getElementsByTagName("*"):s.elements;if(l&&!/MSIE [678]/.test(navigator.userAgent)&&(l=t(l).get()),a&&(o=t(':input[form="'+a+'"]').get(),o.length&&(l=(l||[]).concat(o))),!l||!l.length)return i;var u,c,h,d,f,p,g;for(u=0,p=l.length;p>u;u++)if(f=l[u],h=f.name,h&&!f.disabled)if(e&&s.clk&&"image"==f.type)s.clk==f&&(i.push({name:h,value:t(f).val(),type:f.type}),i.push({name:h+".x",value:s.clk_x},{name:h+".y",value:s.clk_y}));else if(d=t.fieldValue(f,!0),d&&d.constructor==Array)for(n&&n.push(f),c=0,g=d.length;g>c;c++)i.push({name:h,value:d[c]});else if(r.fileapi&&"file"==f.type){n&&n.push(f);var m=f.files;if(m.length)for(c=0;c<m.length;c++)i.push({name:h,value:m[c],type:f.type});else i.push({name:h,value:"",type:f.type})}else null!==d&&"undefined"!=typeof d&&(n&&n.push(f),i.push({name:h,value:d,type:f.type,required:f.required}));if(!e&&s.clk){var v=t(s.clk),y=v[0];h=y.name,h&&!y.disabled&&"image"==y.type&&(i.push({name:h,value:v.val()}),i.push({name:h+".x",value:s.clk_x},{name:h+".y",value:s.clk_y}))}return i},t.fn.formSerialize=function(e){return t.param(this.formToArray(e))},t.fn.fieldSerialize=function(e){var n=[];return this.each(function(){var i=this.name;if(i){var r=t.fieldValue(this,e);if(r&&r.constructor==Array)for(var o=0,s=r.length;s>o;o++)n.push({name:i,value:r[o]});else null!==r&&"undefined"!=typeof r&&n.push({name:this.name,value:r})}}),t.param(n)},t.fn.fieldValue=function(e){for(var n=[],i=0,r=this.length;r>i;i++){var o=this[i],s=t.fieldValue(o,e);null===s||"undefined"==typeof s||s.constructor==Array&&!s.length||(s.constructor==Array?t.merge(n,s):n.push(s))}return n},t.fieldValue=function(e,n){var i=e.name,r=e.type,o=e.tagName.toLowerCase();if(void 0===n&&(n=!0),n&&(!i||e.disabled||"reset"==r||"button"==r||("checkbox"==r||"radio"==r)&&!e.checked||("submit"==r||"image"==r)&&e.form&&e.form.clk!=e||"select"==o&&-1==e.selectedIndex))return null;if("select"==o){var s=e.selectedIndex;if(0>s)return null;for(var a=[],l=e.options,u="select-one"==r,c=u?s+1:l.length,h=u?s:0;c>h;h++){var d=l[h];if(d.selected){var f=d.value;if(f||(f=d.attributes&&d.attributes.value&&!d.attributes.value.specified?d.text:d.value),u)return f;a.push(f)}}return a}return t(e).val()},t.fn.clearForm=function(e){return this.each(function(){t("input,select,textarea",this).clearFields(e)})},t.fn.clearFields=t.fn.clearInputs=function(e){var n=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var i=this.type,r=this.tagName.toLowerCase();n.test(i)||"textarea"==r?this.value="":"checkbox"==i||"radio"==i?this.checked=!1:"select"==r?this.selectedIndex=-1:"file"==i?/MSIE/.test(navigator.userAgent)?t(this).replaceWith(t(this).clone(!0)):t(this).val(""):e&&(e===!0&&/hidden/.test(i)||"string"==typeof e&&t(this).is(e))&&(this.value="")})},t.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},t.fn.enable=function(t){return void 0===t&&(t=!0),this.each(function(){this.disabled=!t})},t.fn.selected=function(e){return void 0===e&&(e=!0),this.each(function(){var n=this.type;if("checkbox"==n||"radio"==n)this.checked=e;else if("option"==this.tagName.toLowerCase()){var i=t(this).parent("select");e&&i[0]&&"select-one"==i[0].type&&i.find("option").selected(!1),this.selected=e}})},t.fn.ajaxSubmit.debug=!1}),/*!
 * jQuery TextChange Plugin
 * http://www.zurb.com/playground/jquery-text-change-custom-event
 *
 * Copyright 2010, ZURB
 * Released under the MIT License
 */
function(t){t.event.special.textchange={setup:function(){t(this).data("lastValue","true"===this.contentEditable?t(this).html():t(this).val()),t(this).bind("keyup.textchange",t.event.special.textchange.handler),t(this).bind("cut.textchange paste.textchange input.textchange",t.event.special.textchange.delayedHandler)},teardown:function(){t(this).unbind(".textchange")},handler:function(){t.event.special.textchange.triggerIfChanged(t(this))},delayedHandler:function(){var e=t(this);setTimeout(function(){t.event.special.textchange.triggerIfChanged(e)},25)},triggerIfChanged:function(t){var e="true"===t[0].contentEditable?t.html():t.val();e!==t.data("lastValue")&&(t.trigger("textchange",[t.data("lastValue")]),t.data("lastValue",e))}},t.event.special.hastext={setup:function(){t(this).bind("textchange",t.event.special.hastext.handler)},teardown:function(){t(this).unbind("textchange",t.event.special.hastext.handler)},handler:function(e,n){""===n&&n!==t(this).val()&&t(this).trigger("hastext")}},t.event.special.notext={setup:function(){t(this).bind("textchange",t.event.special.notext.handler)},teardown:function(){t(this).unbind("textchange",t.event.special.notext.handler)},handler:function(e,n){""===t(this).val()&&t(this).val()!==n&&t(this).trigger("notext")}}}(jQuery),function(t,e,n){function i(e,n){this.$element=t(e),this.options=t.extend({},s,n),this._defaults=s,this._name=r,this.init()}var r="textile",o=e.document,s={fullscreen:!1,resize:!0,tpl:{wrap:'<div class="textile-wrap"><ul class="textile-toolbar"></ul><div class="textile-inner"></div></div>',preview:'<div class="textile-preview loading-indicator">Loading...</div>',help:'<div class="textile-help loading-indicator">Loading...</div>'}};i.prototype={init:function(){this._buildContainer(),this._previousContent=this.$element.val(),this._previewRendered=!1,this._helpRendered=!1},_buildContainer:function(){this.options.$wrap=t(this.options.tpl.wrap),this.$element.parent().append(this.options.$wrap),t(".textile-inner",this.options.$wrap).append(this.$element),this.$element.css("resize","none"),this.$element.css("width","100%"),this.$element.attr("rows",20),this.options.$preview=t(this.options.tpl.preview),t(".textile-inner",this.options.$wrap).append(this.options.$preview),this.options.$preview.hide(),this.options.$help=t(this.options.tpl.help),t(".textile-inner",this.options.$wrap).append(this.options.$help),this.options.$help.hide(),this._buildToolbar()},_buildToolbar:function(){var e;e=t('<a class="btn-write active" href="javascript:void(null);"><span>Write</span></a>'),e.click(t.proxy(function(t){this._onBtnWrite(t)},this)),t(".textile-toolbar",this.options.$wrap).append(t("<li>").append(e)),e=t('<a class="btn-preview" href="javascript:void(null);"><span>Preview</span></a>'),e.click(t.proxy(function(t){this._onBtnPreview(t)},this)),t(".textile-toolbar",this.options.$wrap).append(t("<li>").append(e)),e=t('<a class="btn-fullscreen fa fa-expand" href="javascript:void(null);"><span>&nbsp;</span></a>'),e.click(t.proxy(function(t){this._onBtnFullScreen(t)},this)),t(".textile-toolbar",this.options.$wrap).append(t('<li class="right">').append(e)),e=t('<a class="btn-help fa fa-question" href="javascript:void(null);"><span>&nbsp;</span></a>'),e.click(t.proxy(function(t){this._onBtnHelp(t)},this)),t(".textile-toolbar",this.options.$wrap).append(t('<li class="right">').append(e))},_buildResizer:function(){return this.options.resize===!1?!1:void 0},_loadPreview:function(){this._previousContent=this.$element.val(),this.options.$preview.addClass("loading-indicator").text("Loading...");var e=this;t.getJSON(this.$element.data("preview-url"),{text:this.$element.val()},function(t){e.options.$preview.removeClass("loading-indicator").html(t.html),e._previewRendered=!0})},_loadHelp:function(){var e=this;t.get(this.$element.data("help-url"),function(t){e.options.$help.removeClass("loading-indicator").html(t),this._helpRendered=!0})},_onBtnWrite:function(){var e=this.options.$wrap;t(".textile-toolbar a",e).removeClass("active"),t(".textile-toolbar .btn-write",e).addClass("active"),this.options.$preview.hide(),this.options.$help.hide(),this.$element.show()},_onBtnPreview:function(){var e=this.options.$wrap;t(".textile-toolbar a",e).removeClass("active"),t(".textile-toolbar .btn-preview",e).addClass("active"),this.$element.hide(),this.options.$help.hide(),this.options.$preview.show(),this._previousContent==this.$element.val()?this._previewRendered||this._loadPreview():this._loadPreview()},_onBtnFullScreen:function(){$btnFS=t(".btn-fullscreen",this.options.$wrap),this.options.fullscreen===!1?(this.options.fullscreen=!0,this.options.height=this.$element.css("height"),this.options.width=this.options.$wrap.css("width"),this.options.tmpspan=t("<span></span>"),this.options.$wrap.addClass("textile-fullscreen").after(this.options.tmpspan),t(o.body).prepend(this.options.$wrap).css("overflow","hidden"),this._onFullScreenResize(),t(e).resize(t.proxy(this._onFullScreenResize,this)),$btnFS.removeClass("fa-expand").addClass("fa-compress"),t(o).scrollTop(0,0)):(this.options.fullscreen=!1,t(e).unbind("resize",t.proxy(this._onFullScreenResize,this)),t(o.body).css("overflow","visible"),this.options.$wrap.removeClass("textile-fullscreen"),this.options.$wrap.css("width",this.options.width),this.options.tmpspan.after(this.options.$wrap).remove(),this.options.$preview.css("height","auto"),this.$element.css("height",this.options.height),$btnFS.removeClass("fa-compress").addClass("fa-expand"))},_onBtnHelp:function(){var e=this.options.$wrap;t(".textile-toolbar a",e).removeClass("active"),t(".textile-toolbar .btn-help",e).addClass("active"),this.$element.hide(),this.options.$preview.hide(),this.options.$help.show(),this._helpRendered||this._loadHelp()},_onFullScreenResize:function(){if(this.options.fullscreen!==!1){var n=42,n=60,i=t(e).height()-n;this.options.$wrap.width(t(e).width()-20),this.options.$preview.height(i),this.$element.height(i-10)}}},t.fn[r]=function(e){return this.each(function(){t.data(this,"plugin_"+r)||t.data(this,"plugin_"+r,new i(this,e))})}}(jQuery,window),/*
 * jQuery UI Widget 1.9.1+amd
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2012 jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 *
 * http://api.jqueryui.com/jQuery.widget/
 */
function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t,e){var n=0,i=Array.prototype.slice,r=t.cleanData;t.cleanData=function(e){for(var n,i=0;null!=(n=e[i]);i++)try{t(n).triggerHandler("remove")}catch(o){}r(e)},t.widget=function(e,n,i){var r,o,s,a,l=e.split(".")[0];e=e.split(".")[1],r=l+"-"+e,i||(i=n,n=t.Widget),t.expr[":"][r.toLowerCase()]=function(e){return!!t.data(e,r)},t[l]=t[l]||{},o=t[l][e],s=t[l][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new s(t,e)},t.extend(s,o,{version:i.version,_proto:t.extend({},i),_childConstructors:[]}),a=new n,a.options=t.widget.extend({},a.options),t.each(i,function(e,r){t.isFunction(r)&&(i[e]=function(){var t=function(){return n.prototype[e].apply(this,arguments)},i=function(t){return n.prototype[e].apply(this,t)};return function(){var e,n=this._super,o=this._superApply;return this._super=t,this._superApply=i,e=r.apply(this,arguments),this._super=n,this._superApply=o,e}}())}),s.prototype=t.widget.extend(a,{widgetEventPrefix:a.widgetEventPrefix||e},i,{constructor:s,namespace:l,widgetName:e,widgetBaseClass:r,widgetFullName:r}),o?(t.each(o._childConstructors,function(e,n){var i=n.prototype;t.widget(i.namespace+"."+i.widgetName,s,n._proto)}),delete o._childConstructors):n._childConstructors.push(s),t.widget.bridge(e,s)},t.widget.extend=function(n){for(var r,o,s=i.call(arguments,1),a=0,l=s.length;l>a;a++)for(r in s[a])o=s[a][r],s[a].hasOwnProperty(r)&&o!==e&&(t.isPlainObject(o)?n[r]=t.isPlainObject(n[r])?t.widget.extend({},n[r],o):t.widget.extend({},o):n[r]=o);return n},t.widget.bridge=function(n,r){var o=r.prototype.widgetFullName;t.fn[n]=function(s){var a="string"==typeof s,l=i.call(arguments,1),u=this;return s=!a&&l.length?t.widget.extend.apply(null,[s].concat(l)):s,a?this.each(function(){var i,r=t.data(this,o);return r?t.isFunction(r[s])&&"_"!==s.charAt(0)?(i=r[s].apply(r,l),i!==r&&i!==e?(u=i&&i.jquery?u.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+s+"' for "+n+" widget instance"):t.error("cannot call methods on "+n+" prior to initialization; attempted to call method '"+s+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(s||{})._init():new r(s,this)}),u}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=n++,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(),i!==this&&(t.data(i,this.widgetName,this),t.data(i,this.widgetFullName,this),this._on(this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),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(n,i){var r,o,s,a=n;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof n)if(a={},r=n.split("."),n=r.shift(),r.length){for(o=a[n]=t.widget.extend({},this.options[n]),s=0;s<r.length-1;s++)o[r[s]]=o[r[s]]||{},o=o[r[s]];if(n=r.pop(),i===e)return o[n]===e?null:o[n];o[n]=i}else{if(i===e)return this.options[n]===e?null:this.options[n];a[n]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(e,n){var i,r=this;n?(e=i=t(e),this.bindings=this.bindings.add(e)):(n=e,e=this.element,i=this.widget()),t.each(n,function(n,o){function s(){return r.options.disabled===!0||t(this).hasClass("ui-state-disabled")?void 0:("string"==typeof o?r[o]:o).apply(r,arguments)}"string"!=typeof o&&(s.guid=o.guid=o.guid||s.guid||t.guid++);var a=n.match(/^(\w+)\s*(.*)$/),l=a[1]+r.eventNamespace,u=a[2];u?i.delegate(u,l,s):e.bind(l,s)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function n(){return("string"==typeof t?i[t]:t).apply(i,arguments)}var i=this;return setTimeout(n,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,n,i){var r,o,s=this.options[e];if(i=i||{},n=t.Event(n),n.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),n.target=this.element[0],o=n.originalEvent)for(r in o)r in n||(n[r]=o[r]);return this.element.trigger(n,i),!(t.isFunction(s)&&s.apply(this.element[0],[n].concat(i))===!1||n.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,n){t.Widget.prototype["_"+e]=function(i,r,o){"string"==typeof r&&(r={effect:r});var s,a=r?r===!0||"number"==typeof r?n:r.effect||n:e;r=r||{},"number"==typeof r&&(r={duration:r}),s=!t.isEmptyObject(r),r.complete=o,r.delay&&i.delay(r.delay),s&&t.effects&&(t.effects.effect[a]||t.uiBackCompat!==!1&&t.effects[a])?i[e](r):a!==e&&i[a]?i[a](r.duration,r.easing,o):i.queue(function(n){t(this)[e](),o&&o.call(i[0]),n()})}}),t.uiBackCompat!==!1&&(t.Widget.prototype._getCreateOptions=function(){return t.metadata&&t.metadata.get(this.element[0])[this.widgetName]})}),/*
 * JavaScript Load Image 1.2.1
 * https://github.com/blueimp/JavaScript-Load-Image
 *
 * Copyright 2011, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */
function(t){"use strict";var e=function(t,n,i){var r,o,s=document.createElement("img");return s.onerror=n,s.onload=function(){!o||i&&i.noRevoke||e.revokeObjectURL(o),n(e.scale(s,i))},r=window.Blob&&t instanceof Blob||window.File&&t instanceof File?o=e.createObjectURL(t):t,r?(s.src=r,s):e.readFile(t,function(t){s.src=t})},n=window.createObjectURL&&window||window.URL&&URL.revokeObjectURL&&URL||window.webkitURL&&webkitURL;e.scale=function(t,e){e=e||{};var n=document.createElement("canvas"),i=t.width,r=t.height,o=Math.max((e.minWidth||i)/i,(e.minHeight||r)/r);return o>1&&(i=parseInt(i*o,10),r=parseInt(r*o,10)),o=Math.min((e.maxWidth||i)/i,(e.maxHeight||r)/r),1>o&&(i=parseInt(i*o,10),r=parseInt(r*o,10)),t.getContext||e.canvas&&n.getContext?(n.width=i,n.height=r,n.getContext("2d").drawImage(t,0,0,i,r),n):(t.width=i,t.height=r,t)},e.createObjectURL=function(t){return n?n.createObjectURL(t):!1},e.revokeObjectURL=function(t){return n?n.revokeObjectURL(t):!1},e.readFile=function(t,e){if(window.FileReader&&FileReader.prototype.readAsDataURL){var n=new FileReader;return n.onload=function(t){e(t.target.result)},n.readAsDataURL(t),n}return!1},"function"==typeof define&&define.amd?define(function(){return e}):t.loadImage=e}(this),/*
 * JavaScript Canvas to Blob 2.0.3
 * https://github.com/blueimp/JavaScript-Canvas-to-Blob
 *
 * Copyright 2012, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 *
 * Based on stackoverflow user Stoive's code snippet:
 * http://stackoverflow.com/q/4998908
 */
function(t){"use strict";var e=t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype,n=t.Blob&&function(){try{return Boolean(new Blob)}catch(t){return!1}}(),i=n&&t.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(t){return!1}}(),r=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,o=(n||r)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(t){var e,o,s,a,l,u;for(e=t.split(",")[0].indexOf("base64")>=0?atob(t.split(",")[1]):decodeURIComponent(t.split(",")[1]),o=new ArrayBuffer(e.length),s=new Uint8Array(o),a=0;a<e.length;a+=1)s[a]=e.charCodeAt(a);return l=t.split(",")[0].split(":")[1].split(";")[0],n?new Blob([i?s:o],{type:l}):(u=new r,u.append(o),u.getBlob(l))};t.HTMLCanvasElement&&!e.toBlob&&(e.mozGetAsFile?e.toBlob=function(t,e){t(this.mozGetAsFile("blob",e))}:e.toDataURL&&o&&(e.toBlob=function(t,e){t(o(this.toDataURL(e)))})),"function"==typeof define&&define.amd?define(function(){return o}):t.dataURLtoBlob=o}(this),/*
 * JavaScript Templates 2.1.0
 * https://github.com/blueimp/JavaScript-Templates
 *
 * Copyright 2011, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 *
 * Inspired by John Resig's JavaScript Micro-Templating:
 * http://ejohn.org/blog/javascript-micro-templating/
 */
function(t){"use strict";var e=function(t,n){var i=/[^\w\-\.:]/.test(t)?new Function(e.arg+",tmpl","var _e=tmpl.encode"+e.helper+",_s='"+t.replace(e.regexp,e.func)+"';return _s;"):e.cache[t]=e.cache[t]||e(e.load(t));return n?i(n,e):function(t){return i(t,e)}};e.cache={},e.load=function(t){return document.getElementById(t).innerHTML},e.regexp=/([\s'\\])(?![^%]*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g,e.func=function(t,e,n,i,r,o){return e?{"\n":"\\n","\r":"\\r","	":"\\t"," ":" "}[t]||"\\"+t:n?"="===n?"'+_e("+i+")+'":"'+("+i+"||'')+'":r?"';":o?"_s+='":void 0},e.encReg=/[<>&"'\x00]/g,e.encMap={"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&#39;"},e.encode=function(t){return String(t||"").replace(e.encReg,function(t){return e.encMap[t]||""})},e.arg="o",e.helper=",print=function(s,e){_s+=e&&(s||'')||_e(s);},include=function(s,d){_s+=tmpl(s,d);}","function"==typeof define&&define.amd?define(function(){return e}):t.tmpl=e}(this),/*
 * jQuery Iframe Transport Plugin 1.5
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2011, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */
function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(window.jQuery)}(function(t){"use strict";var e=0;t.ajaxTransport("iframe",function(n){if(n.async&&("POST"===n.type||"GET"===n.type)){var i,r;return{send:function(o,s){i=t('<form style="display:none;"></form>'),i.attr("accept-charset",n.formAcceptCharset),r=t('<iframe src="javascript:false;" name="iframe-transport-'+(e+=1)+'"></iframe>').bind("load",function(){var e,o=t.isArray(n.paramName)?n.paramName:[n.paramName];r.unbind("load").bind("load",function(){var e;try{if(e=r.contents(),!e.length||!e[0].firstChild)throw new Error}catch(n){e=void 0}s(200,"success",{iframe:e}),t('<iframe src="javascript:false;"></iframe>').appendTo(i),i.remove()}),i.prop("target",r.prop("name")).prop("action",n.url).prop("method",n.type),n.formData&&t.each(n.formData,function(e,n){t('<input type="hidden"/>').prop("name",n.name).val(n.value).appendTo(i)}),n.fileInput&&n.fileInput.length&&"POST"===n.type&&(e=n.fileInput.clone(),n.fileInput.after(function(t){return e[t]}),n.paramName&&n.fileInput.each(function(e){t(this).prop("name",o[e]||n.paramName)}),i.append(n.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data")),i.submit(),e&&e.length&&n.fileInput.each(function(n,i){var r=t(e[n]);t(i).prop("name",r.prop("name")),r.replaceWith(i)})}),i.append(r).appendTo(document.body)},abort:function(){r&&r.unbind("load").prop("src","javascript".concat(":false;")),i&&i.remove()}}}}),t.ajaxSetup({converters:{"iframe text":function(e){return t(e[0].body).text()},"iframe json":function(e){return t.parseJSON(t(e[0].body).text())},"iframe html":function(e){return t(e[0].body).html()},"iframe script":function(e){return t.globalEval(t(e[0].body).text())}}})}),/*
 * jQuery File Upload Plugin 5.19.2
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2010, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */
function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","jquery.ui.widget"],t):t(window.jQuery)}(function(t){"use strict";t.support.xhrFileUpload=!(!window.XMLHttpRequestUpload||!window.FileReader),t.support.xhrFormDataFileUpload=!!window.FormData,t.widget("blueimp.fileupload",{options:{dropZone:t(document),pasteZone:t(document),fileInput:void 0,replaceFileInput:!0,paramName:void 0,singleFileUploads:!0,limitMultiFileUploads:void 0,sequentialUploads:!1,limitConcurrentUploads:void 0,forceIframeTransport:!1,redirect:void 0,redirectParamName:void 0,postMessage:void 0,multipart:!0,maxChunkSize:void 0,uploadedBytes:void 0,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,formData:function(t){return t.serializeArray()},add:function(t,e){e.submit()},processData:!1,contentType:!1,cache:!1},_refreshOptionsList:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_BitrateTimer:function(){this.timestamp=+new Date,this.loaded=0,this.bitrate=0,this.getBitrate=function(t,e,n){var i=t-this.timestamp;return(!this.bitrate||!n||i>n)&&(this.bitrate=(e-this.loaded)*(1e3/i)*8,this.loaded=e,this.timestamp=t),this.bitrate}},_isXHRUpload:function(e){return!e.forceIframeTransport&&(!e.multipart&&t.support.xhrFileUpload||t.support.xhrFormDataFileUpload)},_getFormData:function(e){var n;return"function"==typeof e.formData?e.formData(e.form):t.isArray(e.formData)?e.formData:e.formData?(n=[],t.each(e.formData,function(t,e){n.push({name:t,value:e})}),n):[]},_getTotal:function(e){var n=0;return t.each(e,function(t,e){n+=e.size||1}),n},_onProgress:function(t,e){if(t.lengthComputable){var n,i,r=+new Date;if(e._time&&e.progressInterval&&r-e._time<e.progressInterval&&t.loaded!==t.total)return;e._time=r,n=e.total||this._getTotal(e.files),i=parseInt(t.loaded/t.total*(e.chunkSize||n),10)+(e.uploadedBytes||0),this._loaded+=i-(e.loaded||e.uploadedBytes||0),e.lengthComputable=!0,e.loaded=i,e.total=n,e.bitrate=e._bitrateTimer.getBitrate(r,i,e.bitrateInterval),this._trigger("progress",t,e),this._trigger("progressall",t,{lengthComputable:!0,loaded:this._loaded,total:this._total,bitrate:this._bitrateTimer.getBitrate(r,this._loaded,e.bitrateInterval)})}},_initProgressListener:function(e){var n=this,i=e.xhr?e.xhr():t.ajaxSettings.xhr();i.upload&&(t(i.upload).bind("progress",function(t){var i=t.originalEvent;t.lengthComputable=i.lengthComputable,t.loaded=i.loaded,t.total=i.total,n._onProgress(t,e)}),e.xhr=function(){return i})},_initXHRData:function(e){var n,i=e.files[0],r=e.multipart||!t.support.xhrFileUpload,o=e.paramName[0];e.headers=e.headers||{},e.contentRange&&(e.headers["Content-Range"]=e.contentRange),r?t.support.xhrFormDataFileUpload&&(e.postMessage?(n=this._getFormData(e),e.blob?n.push({name:o,value:e.blob}):t.each(e.files,function(t,i){n.push({name:e.paramName[t]||o,value:i})})):(e.formData instanceof FormData?n=e.formData:(n=new FormData,t.each(this._getFormData(e),function(t,e){n.append(e.name,e.value)})),e.blob?(e.headers["Content-Disposition"]='attachment; filename="'+encodeURI(i.name)+'"',e.headers["Content-Description"]=encodeURI(i.type),n.append(o,e.blob,i.name)):t.each(e.files,function(t,i){i instanceof Blob&&n.append(e.paramName[t]||o,i,i.name)})),e.data=n):(e.headers["Content-Disposition"]='attachment; filename="'+encodeURI(i.name)+'"',e.contentType=i.type,e.data=e.blob||i),e.blob=null},_initIframeSettings:function(e){e.dataType="iframe "+(e.dataType||""),e.formData=this._getFormData(e),e.redirect&&t("<a></a>").prop("href",e.url).prop("host")!==location.host&&e.formData.push({name:e.redirectParamName||"redirect",value:e.redirect})},_initDataSettings:function(t){this._isXHRUpload(t)?(this._chunkedUpload(t,!0)||(t.data||this._initXHRData(t),this._initProgressListener(t)),t.postMessage&&(t.dataType="postmessage "+(t.dataType||""))):this._initIframeSettings(t,"iframe")},_getParamName:function(e){var n=t(e.fileInput),i=e.paramName;return i?t.isArray(i)||(i=[i]):(i=[],n.each(function(){for(var e=t(this),n=e.prop("name")||"files[]",r=(e.prop("files")||[1]).length;r;)i.push(n),r-=1}),i.length||(i=[n.prop("name")||"files[]"])),i},_initFormSettings:function(e){e.form&&e.form.length||(e.form=t(e.fileInput.prop("form")),e.form.length||(e.form=t(this.options.fileInput.prop("form")))),e.paramName=this._getParamName(e),e.url||(e.url=e.form.prop("action")||location.href),e.type=(e.type||e.form.prop("method")||"").toUpperCase(),"POST"!==e.type&&"PUT"!==e.type&&(e.type="POST"),e.formAcceptCharset||(e.formAcceptCharset=e.form.attr("accept-charset"))},_getAJAXSettings:function(e){var n=t.extend({},this.options,e);return this._initFormSettings(n),this._initDataSettings(n),n},_enhancePromise:function(t){return t.success=t.done,t.error=t.fail,t.complete=t.always,t},_getXHRPromise:function(e,n,i){var r=t.Deferred(),o=r.promise();return n=n||this.options.context||o,e===!0?r.resolveWith(n,i):e===!1&&r.rejectWith(n,i),o.abort=r.promise,this._enhancePromise(o)},_getUploadedBytes:function(t){var e=t.getResponseHeader("Range"),n=e&&e.split("-"),i=n&&n.length>1&&parseInt(n[1],10);return i&&i+1},_chunkedUpload:function(e,n){var i,r,o=this,s=e.files[0],a=s.size,l=e.uploadedBytes=e.uploadedBytes||0,u=e.maxChunkSize||a,c=s.slice||s.webkitSlice||s.mozSlice,h=t.Deferred(),d=h.promise();return this._isXHRUpload(e)&&c&&(l||a>u)&&!e.data?n?!0:l>=a?(s.error="Uploaded bytes exceed file size",this._getXHRPromise(!1,e.context,[null,"error",s.error])):(r=function(n){var d=t.extend({},e);d.blob=c.call(s,l,l+u),d.chunkSize=d.blob.size,d.contentRange="bytes "+l+"-"+(l+d.chunkSize-1)+"/"+a,o._initXHRData(d),o._initProgressListener(d),i=(t.ajax(d)||o._getXHRPromise(!1,d.context)).done(function(n,i,s){l=o._getUploadedBytes(s)||l+d.chunkSize,d.loaded||o._onProgress(t.Event("progress",{lengthComputable:!0,loaded:l-d.uploadedBytes,total:l-d.uploadedBytes}),d),e.uploadedBytes=d.uploadedBytes=l,a>l?r():h.resolveWith(d.context,[n,i,s])}).fail(function(t,e,n){h.rejectWith(d.context,[t,e,n])})},this._enhancePromise(d),d.abort=function(){return i.abort()},r(),d):!1},_beforeSend:function(t,e){0===this._active&&(this._trigger("start"),this._bitrateTimer=new this._BitrateTimer),this._active+=1,this._loaded+=e.uploadedBytes||0,this._total+=this._getTotal(e.files)},_onDone:function(e,n,i,r){this._isXHRUpload(r)||this._onProgress(t.Event("progress",{lengthComputable:!0,loaded:1,total:1}),r),r.result=e,r.textStatus=n,r.jqXHR=i,this._trigger("done",null,r)},_onFail:function(t,e,n,i){i.jqXHR=t,i.textStatus=e,i.errorThrown=n,this._trigger("fail",null,i),i.recalculateProgress&&(this._loaded-=i.loaded||i.uploadedBytes||0,this._total-=i.total||this._getTotal(i.files))},_onAlways:function(t,e,n,i){this._active-=1,i.textStatus=e,n&&n.always?(i.jqXHR=n,i.result=t):(i.jqXHR=t,i.errorThrown=n),this._trigger("always",null,i),0===this._active&&(this._trigger("stop"),this._loaded=this._total=0,this._bitrateTimer=null)},_onSend:function(e,n){var i,r,o,s=this,a=s._getAJAXSettings(n),l=function(n,r){return s._sending+=1,a._bitrateTimer=new s._BitrateTimer,i=i||(n!==!1&&s._trigger("send",e,a)!==!1&&(s._chunkedUpload(a)||t.ajax(a))||s._getXHRPromise(!1,a.context,r)).done(function(t,e,n){s._onDone(t,e,n,a)}).fail(function(t,e,n){s._onFail(t,e,n,a)}).always(function(t,e,n){if(s._sending-=1,s._onAlways(t,e,n,a),a.limitConcurrentUploads&&a.limitConcurrentUploads>s._sending)for(var i,r=s._slots.shift();r;){if(i=r.state?"pending"===r.state():!r.isRejected()){r.resolve();break}r=s._slots.shift()}})};return this._beforeSend(e,a),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?(this.options.limitConcurrentUploads>1?(r=t.Deferred(),this._slots.push(r),o=r.pipe(l)):o=this._sequence=this._sequence.pipe(l,l),o.abort=function(){var t=[void 0,"abort","abort"];return i?i.abort():(r&&r.rejectWith(o,t),l(!1,t))},this._enhancePromise(o)):l()},_onAdd:function(e,n){var i,r,o,s,a=this,l=!0,u=t.extend({},this.options,n),c=u.limitMultiFileUploads,h=this._getParamName(u);if((u.singleFileUploads||c)&&this._isXHRUpload(u))if(!u.singleFileUploads&&c)for(o=[],i=[],s=0;s<n.files.length;s+=c)o.push(n.files.slice(s,s+c)),r=h.slice(s,s+c),r.length||(r=h),i.push(r);else i=h;else o=[n.files],i=[h];return n.originalFiles=n.files,t.each(o||n.files,function(r,s){var u=t.extend({},n);return u.files=o?s:[s],u.paramName=i[r],u.submit=function(){return u.jqXHR=this.jqXHR=a._trigger("submit",e,this)!==!1&&a._onSend(e,this),this.jqXHR},l=a._trigger("add",e,u)}),l},_replaceFileInput:function(e){var n=e.clone(!0);t("<form></form>").append(n)[0].reset(),e.after(n).detach(),t.cleanData(e.unbind("remove")),this.options.fileInput=this.options.fileInput.map(function(t,i){return i===e[0]?n[0]:i}),e[0]===this.element[0]&&(this.element=n)},_handleFileTreeEntry:function(e,n){var i,r=this,o=t.Deferred(),s=function(t){t&&!t.entry&&(t.entry=e),o.resolve([t])};return n=n||"",e.isFile?e._file?(e._file.relativePath=n,o.resolve(e._file)):e.file(function(t){t.relativePath=n,o.resolve(t)},s):e.isDirectory?(i=e.createReader(),i.readEntries(function(t){r._handleFileTreeEntries(t,n+e.name+"/").done(function(t){o.resolve(t)}).fail(s)},s)):o.resolve([]),o.promise()},_handleFileTreeEntries:function(e,n){var i=this;return t.when.apply(t,t.map(e,function(t){return i._handleFileTreeEntry(t,n)})).pipe(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(e){e=e||{};var n=e.items;return n&&n.length&&(n[0].webkitGetAsEntry||n[0].getAsEntry)?this._handleFileTreeEntries(t.map(n,function(t){var e;return t.webkitGetAsEntry?(e=t.webkitGetAsEntry(),e&&(e._file=t.getAsFile()),e):t.getAsEntry()})):t.Deferred().resolve(t.makeArray(e.files)).promise()},_getSingleFileInputFiles:function(e){e=t(e);var n,i,r=e.prop("webkitEntries")||e.prop("entries");if(r&&r.length)return this._handleFileTreeEntries(r);if(n=t.makeArray(e.prop("files")),n.length)void 0===n[0].name&&n[0].fileName&&t.each(n,function(t,e){e.name=e.fileName,e.size=e.fileSize});else{if(i=e.prop("value"),!i)return t.Deferred().resolve([]).promise();n=[{name:i.replace(/^.*\\/,"")}]}return t.Deferred().resolve(n).promise()},_getFileInputFiles:function(e){return e instanceof t&&1!==e.length?t.when.apply(t,t.map(e,this._getSingleFileInputFiles)).pipe(function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(e)},_onChange:function(e){var n=this,i={fileInput:t(e.target),form:t(e.target.form)};this._getFileInputFiles(i.fileInput).always(function(t){i.files=t,n.options.replaceFileInput&&n._replaceFileInput(i.fileInput),n._trigger("change",e,i)!==!1&&n._onAdd(e,i)})},_onPaste:function(e){var n=e.originalEvent.clipboardData,i=n&&n.items||[],r={files:[]};return t.each(i,function(t,e){var n=e.getAsFile&&e.getAsFile();n&&r.files.push(n)}),this._trigger("paste",e,r)===!1||this._onAdd(e,r)===!1?!1:void 0},_onDrop:function(t){t.preventDefault();var e=this,n=t.dataTransfer=t.originalEvent.dataTransfer,i={};this._getDroppedFiles(n).always(function(n){i.files=n,e._trigger("drop",t,i)!==!1&&e._onAdd(t,i)})},_onDragOver:function(t){var e=t.dataTransfer=t.originalEvent.dataTransfer;return this._trigger("dragover",t)===!1?!1:(e&&(e.dropEffect="copy"),void t.preventDefault())},_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop}),this._on(this.options.pasteZone,{paste:this._onPaste})),this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_setOption:function(e,n){var i=-1!==t.inArray(e,this._refreshOptionsList);i&&this._destroyEventHandlers(),this._super(e,n),i&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var e=this.options;void 0===e.fileInput?e.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):e.fileInput instanceof t||(e.fileInput=t(e.fileInput)),e.dropZone instanceof t||(e.dropZone=t(e.dropZone)),e.pasteZone instanceof t||(e.pasteZone=t(e.pasteZone))},_create:function(){var e=this.options;t.extend(e,t(this.element[0].cloneNode(!1)).data()),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=this._loaded=this._total=0,this._initEventHandlers()},_destroy:function(){this._destroyEventHandlers()},add:function(e){var n=this;e&&!this.options.disabled&&(e.fileInput&&!e.files?this._getFileInputFiles(e.fileInput).always(function(t){e.files=t,n._onAdd(null,e)}):(e.files=t.makeArray(e.files),this._onAdd(null,e)))},send:function(e){if(e&&!this.options.disabled){if(e.fileInput&&!e.files){var n,i,r=this,o=t.Deferred(),s=o.promise();return s.abort=function(){return i=!0,n?n.abort():(o.reject(null,"abort","abort"),s)},this._getFileInputFiles(e.fileInput).always(function(t){i||(e.files=t,n=r._onSend(null,e).then(function(t,e,n){o.resolve(t,e,n)},function(t,e,n){o.reject(t,e,n)}))}),this._enhancePromise(s)}if(e.files=t.makeArray(e.files),e.files.length)return this._onSend(null,e)}return this._getXHRPromise(!1,e&&e.context)}})}),/*
 * jQuery File Upload File Processing Plugin 1.2
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2012, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */
function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","load-image","canvas-to-blob","./jquery.fileupload"],t):t(window.jQuery,window.loadImage)}(function(t,e){"use strict";t.widget("blueimp.fileupload",t.blueimp.fileupload,{options:{process:[],add:function(e,n){t(this).fileupload("process",n).done(function(){n.submit()})}},processActions:{load:function(n,i){var r=this,o=n.files[n.index],s=t.Deferred();return window.HTMLCanvasElement&&window.HTMLCanvasElement.prototype.toBlob&&("number"!==t.type(i.maxFileSize)||o.size<i.maxFileSize)&&(!i.fileTypes||i.fileTypes.test(o.type))?e(o,function(t){n.img=t,s.resolveWith(r,[n])}):s.rejectWith(r,[n]),s.promise()},resize:function(n,i){var r,o=n.img;return i=t.extend({canvas:!0},i),o&&(r=e.scale(o,i),(r.width!==o.width||r.height!==o.height)&&(n.canvas=r)),n},save:function(e,n){if(!e.canvas)return e;var i=this,r=e.files[e.index],o=r.name,s=t.Deferred(),a=function(t){t.name||(r.type===t.type?t.name=r.name:r.name&&(t.name=r.name.replace(/\..+$/,"."+t.type.substr(6)))),e.files[e.index]=t,s.resolveWith(i,[e])};return e.canvas.mozGetAsFile?a(e.canvas.mozGetAsFile(/^image\/(jpeg|png)$/.test(r.type)&&o||(o&&o.replace(/\..+$/,"")||"blob")+".png",r.type)):e.canvas.toBlob(a,r.type),s.promise()}},_processFile:function(e,n,i){var r=this,o=t.Deferred().resolveWith(r,[{files:e,index:n}]),s=o.promise();return r._processing+=1,t.each(i.process,function(t,e){s=s.pipe(function(t){return r.processActions[e.action].call(this,t,e)})}),s.always(function(){r._processing-=1,0===r._processing&&r.element.removeClass("fileupload-processing")}),1===r._processing&&r.element.addClass("fileupload-processing"),s},process:function(e){var n=this,i=t.extend({},this.options,e);return i.process&&i.process.length&&this._isXHRUpload(i)&&t.each(e.files,function(r,o){n._processingQueue=n._processingQueue.pipe(function(){var o=t.Deferred();return n._processFile(e.files,r,i).always(function(){o.resolveWith(n)}),o.promise()})}),this._processingQueue},_create:function(){this._super(),this._processing=0,this._processingQueue=t.Deferred().resolveWith(this).promise()}})}),/*
 * jQuery File Upload User Interface Plugin 6.11
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2010, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */
function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","tmpl","load-image","./jquery.fileupload-fp"],t):t(window.jQuery,window.tmpl,window.loadImage)}(function(t,e,n){"use strict";t.widget("blueimp.fileupload",t.blueimp.fileupload,{options:{autoUpload:!1,maxNumberOfFiles:void 0,maxFileSize:void 0,minFileSize:void 0,acceptFileTypes:/.+$/i,previewSourceFileTypes:/^image\/(gif|jpeg|png)$/,previewSourceMaxFileSize:5e6,previewMaxWidth:80,previewMaxHeight:80,previewAsCanvas:!0,uploadTemplateId:"template-upload",downloadTemplateId:"template-download",filesContainer:void 0,prependFiles:!1,dataType:"json",add:function(e,n){var i=t(this).data("fileupload"),r=i.options,o=n.files;t(this).fileupload("process",n).done(function(){i._adjustMaxNumberOfFiles(-o.length),n.maxNumberOfFilesAdjusted=!0,n.files.valid=n.isValidated=i._validate(o),n.context=i._renderUpload(o).data("data",n),r.filesContainer[r.prependFiles?"prepend":"append"](n.context),i._renderPreviews(o,n.context),i._forceReflow(n.context),i._transition(n.context).done(function(){i._trigger("added",e,n)!==!1&&(r.autoUpload||n.autoUpload)&&n.autoUpload!==!1&&n.isValidated&&n.submit()})})},send:function(e,n){var i=t(this).data("fileupload");return n.isValidated||(n.maxNumberOfFilesAdjusted||(i._adjustMaxNumberOfFiles(-n.files.length),n.maxNumberOfFilesAdjusted=!0),i._validate(n.files))?(n.context&&n.dataType&&"iframe"===n.dataType.substr(0,6)&&n.context.find(".progress").addClass(!t.support.transition&&"progress-animated").attr("aria-valuenow",100).find(".bar").css("width","100%"),i._trigger("sent",e,n)):!1},done:function(e,n){var i,r=t(this).data("fileupload");n.context?n.context.each(function(o){var s=t.isArray(n.result)&&n.result[o]||{error:"Empty file upload result"};s.error&&r._adjustMaxNumberOfFiles(1),r._transition(t(this)).done(function(){var o=t(this);i=r._renderDownload([s]).replaceAll(o),r._forceReflow(i),r._transition(i).done(function(){n.context=t(this),r._trigger("completed",e,n)})})}):(t.isArray(n.result)&&(t.each(n.result,function(t,e){n.maxNumberOfFilesAdjusted&&e.error?r._adjustMaxNumberOfFiles(1):n.maxNumberOfFilesAdjusted||e.error||r._adjustMaxNumberOfFiles(-1)}),n.maxNumberOfFilesAdjusted=!0),i=r._renderDownload(n.result).appendTo(r.options.filesContainer),r._forceReflow(i),r._transition(i).done(function(){n.context=t(this),r._trigger("completed",e,n)}))},fail:function(e,n){var i,r=t(this).data("fileupload");n.maxNumberOfFilesAdjusted&&r._adjustMaxNumberOfFiles(n.files.length),n.context?n.context.each(function(o){if("abort"!==n.errorThrown){var s=n.files[o];s.error=s.error||n.errorThrown||!0,r._transition(t(this)).done(function(){var o=t(this);i=r._renderDownload([s]).replaceAll(o),r._forceReflow(i),r._transition(i).done(function(){n.context=t(this),r._trigger("failed",e,n)})})}else r._transition(t(this)).done(function(){t(this).remove(),r._trigger("failed",e,n)})}):"abort"!==n.errorThrown?(n.context=r._renderUpload(n.files).appendTo(r.options.filesContainer).data("data",n),r._forceReflow(n.context),r._transition(n.context).done(function(){n.context=t(this),r._trigger("failed",e,n)})):r._trigger("failed",e,n)},progress:function(t,e){if(e.context){var n=parseInt(e.loaded/e.total*100,10);e.context.find(".progress").attr("aria-valuenow",n).find(".bar").css("width",n+"%")}},progressall:function(e,n){var i=t(this),r=parseInt(n.loaded/n.total*100,10),o=i.find(".fileupload-progress"),s=o.find(".progress-extended");s.length&&s.html(i.data("fileupload")._renderExtendedProgress(n)),o.find(".progress").attr("aria-valuenow",r).find(".bar").css("width",r+"%")},start:function(e){var n=t(this).data("fileupload");n._transition(t(this).find(".fileupload-progress")).done(function(){n._trigger("started",e)})},stop:function(e){var n=t(this).data("fileupload");n._transition(t(this).find(".fileupload-progress")).done(function(){t(this).find(".progress").attr("aria-valuenow","0").find(".bar").css("width","0%"),t(this).find(".progress-extended").html("&nbsp;"),n._trigger("stopped",e)})},destroy:function(e,n){var i=t(this).data("fileupload");n.url&&(t.ajax(n),i._adjustMaxNumberOfFiles(1)),i._transition(n.context).done(function(){t(this).remove(),i._trigger("destroyed",e,n)})}},_enableDragToDesktop:function(){var e=t(this),n=e.prop("href"),i=e.prop("download"),r="application/octet-stream";e.bind("dragstart",function(t){try{t.originalEvent.dataTransfer.setData("DownloadURL",[r,i,n].join(":"))}catch(e){}})},_adjustMaxNumberOfFiles:function(t){"number"==typeof this.options.maxNumberOfFiles&&(this.options.maxNumberOfFiles+=t,this.options.maxNumberOfFiles<1?this._disableFileInputButton():this._enableFileInputButton())},_formatFileSize:function(t){return"number"!=typeof t?"":t>=1e9?(t/1e9).toFixed(2)+" GB":t>=1e6?(t/1e6).toFixed(2)+" MB":(t/1e3).toFixed(2)+" KB"},_formatBitrate:function(t){return"number"!=typeof t?"":t>=1e9?(t/1e9).toFixed(2)+" Gbit/s":t>=1e6?(t/1e6).toFixed(2)+" Mbit/s":t>=1e3?(t/1e3).toFixed(2)+" kbit/s":t+" bit/s"},_formatTime:function(t){var e=new Date(1e3*t),n=parseInt(t/86400,10);return n=n?n+"d ":"",n+("0"+e.getUTCHours()).slice(-2)+":"+("0"+e.getUTCMinutes()).slice(-2)+":"+("0"+e.getUTCSeconds()).slice(-2)},_formatPercentage:function(t){return(100*t).toFixed(2)+" %"},_renderExtendedProgress:function(t){return this._formatBitrate(t.bitrate)+" | "+this._formatTime(8*(t.total-t.loaded)/t.bitrate)+" | "+this._formatPercentage(t.loaded/t.total)+" | "+this._formatFileSize(t.loaded)+" / "+this._formatFileSize(t.total)},_hasError:function(t){return t.error?t.error:this.options.maxNumberOfFiles<0?"Maximum number of files exceeded":this.options.acceptFileTypes.test(t.type)||this.options.acceptFileTypes.test(t.name)?this.options.maxFileSize&&t.size>this.options.maxFileSize?"File is too big":"number"==typeof t.size&&t.size<this.options.minFileSize?"File is too small":null:"Filetype not allowed"},_validate:function(e){var n=this,i=!!e.length;return t.each(e,function(t,e){e.error=n._hasError(e),e.error&&(i=!1)}),i},_renderTemplate:function(e,n){if(!e)return t();var i=e({files:n,formatFileSize:this._formatFileSize,options:this.options});return i instanceof t?i:t(this.options.templatesContainer).html(i).children()},_renderPreview:function(e,i){var r=this,o=this.options,s=t.Deferred();return(n&&n(e,function(e){i.append(e),r._forceReflow(i),r._transition(i).done(function(){s.resolveWith(i)}),t.contains(r.document[0].body,i[0])||s.resolveWith(i)},{maxWidth:o.previewMaxWidth,maxHeight:o.previewMaxHeight,canvas:o.previewAsCanvas})||s.resolveWith(i))&&s},_renderPreviews:function(e,n){var i=this,r=this.options;return n.find(".preview span").each(function(n,o){var s=e[n];r.previewSourceFileTypes.test(s.type)&&("number"!==t.type(r.previewSourceMaxFileSize)||s.size<r.previewSourceMaxFileSize)&&(i._processingQueue=i._processingQueue.pipe(function(){var e=t.Deferred();return i._renderPreview(s,t(o)).done(function(){e.resolveWith(i)}),e.promise()}))}),this._processingQueue},_renderUpload:function(t){return this._renderTemplate(this.options.uploadTemplate,t)},_renderDownload:function(t){return this._renderTemplate(this.options.downloadTemplate,t).find("a[download]").each(this._enableDragToDesktop).end()},_startHandler:function(e){e.preventDefault();var n=t(e.currentTarget),i=n.closest(".template-upload"),r=i.data("data");r&&r.submit&&!r.jqXHR&&r.submit()&&n.prop("disabled",!0)},_cancelHandler:function(e){e.preventDefault();var n=t(e.currentTarget).closest(".template-upload"),i=n.data("data")||{};i.jqXHR?i.jqXHR.abort():(i.errorThrown="abort",this._trigger("fail",e,i))},_deleteHandler:function(e){e.preventDefault();var n=t(e.currentTarget);this._trigger("destroy",e,t.extend({context:n.closest(".template-download"),type:"DELETE",dataType:this.options.dataType},n.data()))},_forceReflow:function(e){return t.support.transition&&e.length&&e[0].offsetWidth},_transition:function(e){var n=t.Deferred();return t.support.transition&&e.hasClass("fade")?e.bind(t.support.transition.end,function(i){i.target===e[0]&&(e.unbind(t.support.transition.end),n.resolveWith(e))}).toggleClass("in"):(e.toggleClass("in"),n.resolveWith(e)),n},_initButtonBarEventHandlers:function(){var e=this.element.find(".fileupload-buttonbar"),n=this.options.filesContainer;this._on(e.find(".start"),{click:function(t){t.preventDefault(),n.find(".start button").click()}}),this._on(e.find(".cancel"),{click:function(t){t.preventDefault(),n.find(".cancel button").click()}}),this._on(e.find(".delete"),{click:function(t){t.preventDefault(),n.find(".delete input:checked").siblings("button").click(),e.find(".toggle").prop("checked",!1)}}),this._on(e.find(".toggle"),{change:function(e){n.find(".delete input").prop("checked",t(e.currentTarget).is(":checked"))}})},_destroyButtonBarEventHandlers:function(){this._off(this.element.find(".fileupload-buttonbar button"),"click"),this._off(this.element.find(".fileupload-buttonbar .toggle"),"change.")},_initEventHandlers:function(){this._super(),this._on(this.options.filesContainer,{"click .start button":this._startHandler,"click .cancel button":this._cancelHandler,"click .delete button":this._deleteHandler}),this._initButtonBarEventHandlers()},_destroyEventHandlers:function(){this._destroyButtonBarEventHandlers(),this._off(this.options.filesContainer,"click"),this._super()},_enableFileInputButton:function(){this.element.find(".fileinput-button input").prop("disabled",!1).parent().removeClass("disabled")},_disableFileInputButton:function(){this.element.find(".fileinput-button input").prop("disabled",!0).parent().addClass("disabled")},_initTemplates:function(){var t=this.options;t.templatesContainer=this.document[0].createElement(t.filesContainer.prop("nodeName")),e&&(t.uploadTemplateId&&(t.uploadTemplate=e(t.uploadTemplateId)),t.downloadTemplateId&&(t.downloadTemplate=e(t.downloadTemplateId)))},_initFilesContainer:function(){var e=this.options;void 0===e.filesContainer?e.filesContainer=this.element.find(".files"):e.filesContainer instanceof t||(e.filesContainer=t(e.filesContainer))},_stringToRegExp:function(t){var e=t.split("/"),n=e.pop();return e.shift(),new RegExp(e.join("/"),n)},_initRegExpOptions:function(){var e=this.options;"string"===t.type(e.acceptFileTypes)&&(e.acceptFileTypes=this._stringToRegExp(e.acceptFileTypes)),"string"===t.type(e.previewSourceFileTypes)&&(e.previewSourceFileTypes=this._stringToRegExp(e.previewSourceFileTypes))},_initSpecialOptions:function(){this._super(),this._initFilesContainer(),this._initTemplates(),this._initRegExpOptions()},_create:function(){this._super(),this._refreshOptionsList.push("filesContainer","uploadTemplateId","downloadTemplateId"),this._processingQueue||(this._processingQueue=t.Deferred().resolveWith(this).promise(),this.process=function(){return this._processingQueue})},enable:function(){var t=!1;this.options.disabled&&(t=!0),this._super(),t&&(this.element.find("input, button").prop("disabled",!1),this._enableFileInputButton())},disable:function(){this.options.disabled||(this.element.find("input, button").prop("disabled",!0),this._disableFileInputButton()),this._super()}})}),/*
 * jQuery File Upload Plugin Localization Example 6.5.1
 * https://github.com/blueimp/jQuery-File-Upload
 *
 * Copyright 2012, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/MIT
 */
window.locale={fileupload:{errors:{maxFileSize:"File is too big",minFileSize:"File is too small",acceptFileTypes:"Filetype not allowed",maxNumberOfFiles:"Max number of files exceeded",uploadedBytes:"Uploaded bytes exceed file size",emptyResult:"Empty file upload result"},error:"Error",start:"Start",cancel:"Cancel",destroy:"Delete"}},/*
 * jQuery Hotkeys Plugin
 * Copyright 2010, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 * Based upon the plugin by Tzury Bar Yochay:
 * http://github.com/tzuryby/hotkeys
 *
 * Original idea by:
 * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/
*/
function(t){function e(e){if("string"==typeof e.data){var n=e.handler,i=e.data.toLowerCase().split(" ");e.handler=function(e){if(this===e.target||!/textarea|select/i.test(e.target.nodeName)&&"text"!==e.target.type){var r="keypress"!==e.type&&t.hotkeys.specialKeys[e.which],o=String.fromCharCode(e.which).toLowerCase(),s="",a={};e.altKey&&"alt"!==r&&(s+="alt+"),e.ctrlKey&&"ctrl"!==r&&(s+="ctrl+"),e.metaKey&&!e.ctrlKey&&"meta"!==r&&(s+="meta+"),e.shiftKey&&"shift"!==r&&(s+="shift+"),r?a[s+r]=!0:(a[s+o]=!0,a[s+t.hotkeys.shiftNums[o]]=!0,"shift+"===s&&(a[t.hotkeys.shiftNums[o]]=!0));for(var l=0,u=i.length;u>l;l++)if(a[i[l]])return n.apply(this,arguments)}}}}t.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"}},t.each(["keydown","keyup","keypress"],function(){t.event.special[this]={add:e}})}(jQuery),/* ===================================================
 * bootstrap-transition.js v2.3.2
 * http://twitter.github.com/bootstrap/javascript.html#transitions
 * ===================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ========================================================== */
!function(t){"use strict";t(function(){t.support.transition=function(){var t=function(){var t,e=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(t in n)if(void 0!==e.style[t])return n[t]}();return t&&{end:t}}()})}(window.jQuery),/* ==========================================================
 * bootstrap-affix.js v2.3.2
 * http://twitter.github.com/bootstrap/javascript.html#affix
 * ==========================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ========================================================== */
!function(t){"use strict";var e=function(e,n){this.options=t.extend({},t.fn.affix.defaults,n),this.$window=t(window).on("scroll.affix.data-api",t.proxy(this.checkPosition,this)).on("click.affix.data-api",t.proxy(function(){setTimeout(t.proxy(this.checkPosition,this),1)},this)),this.$element=t(e),this.checkPosition()};e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e,n=t(document).height(),i=this.$window.scrollTop(),r=this.$element.offset(),o=this.options.offset,s=o.bottom,a=o.top,l="affix affix-top affix-bottom";"object"!=typeof o&&(s=a=o),"function"==typeof a&&(a=o.top()),"function"==typeof s&&(s=o.bottom()),e=null!=this.unpin&&i+this.unpin<=r.top?!1:null!=s&&r.top+this.$element.height()>=n-s?"bottom":null!=a&&a>=i?"top":!1,this.affixed!==e&&(this.affixed=e,this.unpin="bottom"==e?r.top-i:null,this.$element.removeClass(l).addClass("affix"+(e?"-"+e:"")))}};var n=t.fn.affix;t.fn.affix=function(n){return this.each(function(){var i=t(this),r=i.data("affix"),o="object"==typeof n&&n;r||i.data("affix",r=new e(this,o)),"string"==typeof n&&r[n]()})},t.fn.affix.Constructor=e,t.fn.affix.defaults={offset:0},t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var e=t(this),n=e.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),e.affix(n)})})}(window.jQuery),/* ==========================================================
 * bootstrap-alert.js v2.3.2
 * http://twitter.github.com/bootstrap/javascript.html#alerts
 * ==========================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ========================================================== */
!function(t){"use strict";var e='[data-dismiss="alert"]',n=function(n){t(n).on("click",e,this.close)};n.prototype.close=function(e){function n(){i.trigger("closed").remove()}var i,r=t(this),o=r.attr("data-target");o||(o=r.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),i=t(o),e&&e.preventDefault(),i.length||(i=r.hasClass("alert")?r:r.parent()),i.trigger(e=t.Event("close")),e.isDefaultPrevented()||(i.removeClass("in"),t.support.transition&&i.hasClass("fade")?i.on(t.support.transition.end,n):n())};var i=t.fn.alert;t.fn.alert=function(e){return this.each(function(){var i=t(this),r=i.data("alert");r||i.data("alert",r=new n(this)),"string"==typeof e&&r[e].call(i)})},t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=i,this},t(document).on("click.alert.data-api",e,n.prototype.close)}(window.jQuery),/* ============================================================
 * bootstrap-button.js v2.3.2
 * http://twitter.github.com/bootstrap/javascript.html#buttons
 * ============================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============================================================ */
!function(t){"use strict";var e=function(e,n){this.$element=t(e),this.options=t.extend({},t.fn.button.defaults,n)};e.prototype.setState=function(t){var e="disabled",n=this.$element,i=n.data(),r=n.is("input")?"val":"html";t+="Text",i.resetText||n.data("resetText",n[r]()),n[r](i[t]||this.options[t]),setTimeout(function(){"loadingText"==t?n.addClass(e).attr(e,e):n.removeClass(e).removeAttr(e)},0)},e.prototype.toggle=function(){var t=this.$element.closest('[data-toggle="buttons-radio"]');t&&t.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=function(n){return this.each(function(){var i=t(this),r=i.data("button"),o="object"==typeof n&&n;r||i.data("button",r=new e(this,o)),"toggle"==n?r.toggle():n&&r.setState(n)})},t.fn.button.defaults={loadingText:"loading..."},t.fn.button.Constructor=e,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.button.data-api","[data-toggle^=button]",function(e){var n=t(e.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),/* ==========================================================
 * bootstrap-carousel.js v2.3.2
 * http://twitter.github.com/bootstrap/javascript.html#carousel
 * ==========================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ========================================================== */
!function(t){"use strict";var e=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,"hover"==this.options.pause&&this.$element.on("mouseenter",t.proxy(this.pause,this)).on("mouseleave",t.proxy(this.cycle,this))};e.prototype={cycle:function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(e){var n=this.getActiveIndex(),i=this;if(!(e>this.$items.length-1||0>e))return this.sliding?this.$element.one("slid",function(){i.to(e)}):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",t(this.$items[e]))},pause:function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition.end&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(e,n){var i,r=this.$element.find(".item.active"),o=n||r[e](),s=this.interval,a="next"==e?"left":"right",l="next"==e?"first":"last",u=this;if(this.sliding=!0,s&&this.pause(),o=o.length?o:this.$element.find(".item")[l](),i=t.Event("slide",{relatedTarget:o[0],direction:a}),!o.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var e=t(u.$indicators.children()[u.getActiveIndex()]);e&&e.addClass("active")})),t.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(i),i.isDefaultPrevented())return;o.addClass(e),o[0].offsetWidth,r.addClass(a),o.addClass(a),this.$element.one(t.support.transition.end,function(){o.removeClass([e,a].join(" ")).addClass("active"),r.removeClass(["active",a].join(" ")),u.sliding=!1,setTimeout(function(){u.$element.trigger("slid")},0)})}else{if(this.$element.trigger(i),i.isDefaultPrevented())return;r.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}}};var n=t.fn.carousel;t.fn.carousel=function(n){return this.each(function(){var i=t(this),r=i.data("carousel"),o=t.extend({},t.fn.carousel.defaults,"object"==typeof n&&n),s="string"==typeof n?n:o.slide;r||i.data("carousel",r=new e(this,o)),"number"==typeof n?r.to(n):s?r[s]():o.interval&&r.pause().cycle()})},t.fn.carousel.defaults={interval:5e3,pause:"hover"},t.fn.carousel.Constructor=e,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this},t(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(e){var n,i,r=t(this),o=t(r.attr("data-target")||(n=r.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"")),s=t.extend({},o.data(),r.data());o.carousel(s),(i=r.attr("data-slide-to"))&&o.data("carousel").pause().to(i).cycle(),e.preventDefault()})}(window.jQuery),/* =============================================================
 * bootstrap-collapse.js v2.3.2
 * http://twitter.github.com/bootstrap/javascript.html#collapse
 * =============================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============================================================ */
!function(t){"use strict";var e=function(e,n){this.$element=t(e),this.options=t.extend({},t.fn.collapse.defaults,n),this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};e.prototype={constructor:e,dimension:function(){var t=this.$element.hasClass("width");return t?"width":"height"},show:function(){var e,n,i,r;if(!this.transitioning&&!this.$element.hasClass("in")){if(e=this.dimension(),n=t.camelCase(["scroll",e].join("-")),i=this.$parent&&this.$parent.find("> .accordion-group > .in"),i&&i.length){if(r=i.data("collapse"),r&&r.transitioning)return;i.collapse("hide"),r||i.data("collapse",null)}this.$element[e](0),this.transition("addClass",t.Event("show"),"shown"),t.support.transition&&this.$element[e](this.$element[0][n])}},hide:function(){var e;!this.transitioning&&this.$element.hasClass("in")&&(e=this.dimension(),this.reset(this.$element[e]()),this.transition("removeClass",t.Event("hide"),"hidden"),this.$element[e](0))},reset:function(t){var e=this.dimension();return this.$element.removeClass("collapse")[e](t||"auto")[0].offsetWidth,this.$element[null!==t?"addClass":"removeClass"]("collapse"),this},transition:function(e,n,i){var r=this,o=function(){"show"==n.type&&r.reset(),r.transitioning=0,r.$element.trigger(i)};this.$element.trigger(n),n.isDefaultPrevented()||(this.transitioning=1,this.$element[e]("in"),t.support.transition&&this.$element.hasClass("collapse")?this.$element.one(t.support.transition.end,o):o())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=t.fn.collapse;t.fn.collapse=function(n){return this.each(function(){var i=t(this),r=i.data("collapse"),o=t.extend({},t.fn.collapse.defaults,i.data(),"object"==typeof n&&n);r||i.data("collapse",r=new e(this,o)),"string"==typeof n&&r[n]()})},t.fn.collapse.defaults={toggle:!0},t.fn.collapse.Constructor=e,t.fn.collapse.noConflict=function(){return t.fn.collapse=n,this},t(document).on("click.collapse.data-api","[data-toggle=collapse]",function(e){var n,i=t(this),r=i.attr("data-target")||e.preventDefault()||(n=i.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""),o=t(r).data("collapse")?"toggle":i.data();i[t(r).hasClass("in")?"addClass":"removeClass"]("collapsed"),t(r).collapse(o)})}(window.jQuery),/* ============================================================
 * bootstrap-dropdown.js v2.3.2
 * http://twitter.github.com/bootstrap/javascript.html#dropdowns
 * ============================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============================================================ */
!function(t){"use strict";function e(){t(".dropdown-backdrop").remove(),t(i).each(function(){n(t(this)).removeClass("open")})}function n(e){var n,i=e.attr("data-target");return i||(i=e.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),n=i&&t(i),n&&n.length||(n=e.parent()),n}var i="[data-toggle=dropdown]",r=function(e){var n=t(e).on("click.dropdown.data-api",this.toggle);t("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};r.prototype={constructor:r,toggle:function(i){var r,o,s=t(this);if(!s.is(".disabled, :disabled"))return r=n(s),o=r.hasClass("open"),e(),o||("ontouchstart"in document.documentElement&&t('<div class="dropdown-backdrop"/>').insertBefore(t(this)).on("click",e),r.toggleClass("open")),s.focus(),!1},keydown:function(e){var r,o,s,a,l;if(/(38|40|27)/.test(e.keyCode)&&(r=t(this),e.preventDefault(),e.stopPropagation(),!r.is(".disabled, :disabled"))){if(s=n(r),a=s.hasClass("open"),!a||a&&27==e.keyCode)return 27==e.which&&s.find(i).focus(),r.click();o=t("[role=menu] li:not(.divider):visible a",s),o.length&&(l=o.index(o.filter(":focus")),38==e.keyCode&&l>0&&l--,40==e.keyCode&&l<o.length-1&&l++,~l||(l=0),o.eq(l).focus())}}};var o=t.fn.dropdown;t.fn.dropdown=function(e){return this.each(function(){var n=t(this),i=n.data("dropdown");i||n.data("dropdown",i=new r(this)),"string"==typeof e&&i[e].call(n)})},t.fn.dropdown.Constructor=r,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=o,this},t(document).on("click.dropdown.data-api",e).on("click.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.dropdown.data-api",i,r.prototype.toggle).on("keydown.dropdown.data-api",i+", [role=menu]",r.prototype.keydown)}(window.jQuery),/* =========================================================
 * bootstrap-modal.js v2.3.2
 * http://twitter.github.com/bootstrap/javascript.html#modals
 * =========================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ========================================================= */
!function(t){"use strict";var e=function(e,n){this.options=n,this.$element=t(e).delegate('[data-dismiss="modal"]',"click.dismiss.modal",t.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};e.prototype={constructor:e,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var e=this,n=t.Event("show");this.$element.trigger(n),this.isShown||n.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var n=t.support.transition&&e.$element.hasClass("fade");e.$element.parent().length||e.$element.appendTo(document.body),e.$element.show(),n&&e.$element[0].offsetWidth,e.$element.addClass("in").attr("aria-hidden",!1),e.enforceFocus(),n?e.$element.one(t.support.transition.end,function(){e.$element.focus().trigger("shown")}):e.$element.focus().trigger("shown")}))},hide:function(e){e&&e.preventDefault();e=t.Event("hide"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),t(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),t.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var e=this;t(document).on("focusin.modal",function(t){e.$element[0]===t.target||e.$element.has(t.target).length||e.$element.focus()})},escape:function(){var t=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(e){27==e.which&&t.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var e=this,n=setTimeout(function(){e.$element.off(t.support.transition.end),e.hideModal()},500);this.$element.one(t.support.transition.end,function(){clearTimeout(n),e.hideModal()})},hideModal:function(){var t=this;this.$element.hide(),this.backdrop(function(){t.removeBackdrop(),t.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(e){var n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=t.support.transition&&n;if(this.$backdrop=t('<div class="modal-backdrop '+n+'" />').appendTo(document.body),this.$backdrop.click("static"==this.options.backdrop?t.proxy(this.$element[0].focus,this.$element[0]):t.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;i?this.$backdrop.one(t.support.transition.end,e):e()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(t.support.transition.end,e):e()):e&&e()}};var n=t.fn.modal;t.fn.modal=function(n){return this.each(function(){var i=t(this),r=i.data("modal"),o=t.extend({},t.fn.modal.defaults,i.data(),"object"==typeof n&&n);r||i.data("modal",r=new e(this,o)),"string"==typeof n?r[n]():o.show&&r.show()})},t.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},t.fn.modal.Constructor=e,t.fn.modal.noConflict=function(){return t.fn.modal=n,this},t(document).on("click.modal.data-api",'[data-toggle="modal"]',function(e){var n=t(this),i=n.attr("href"),r=t(n.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),o=r.data("modal")?"toggle":t.extend({remote:!/#/.test(i)&&i},r.data(),n.data());e.preventDefault(),r.modal(o).one("hide",function(){n.focus()})})}(window.jQuery),/* =============================================================
 * bootstrap-scrollspy.js v2.3.2
 * http://twitter.github.com/bootstrap/javascript.html#scrollspy
 * =============================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============================================================== */
!function(t){"use strict";function e(e,n){var i,r=t.proxy(this.process,this),o=t(t(e).is("body")?window:e);this.options=t.extend({},t.fn.scrollspy.defaults,n),this.$scrollElement=o.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(i=t(e).attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=t("body"),this.refresh(),this.process()}e.prototype={constructor:e,refresh:function(){var e,n=this;this.offsets=t([]),this.targets=t([]),e=this.$body.find(this.selector).map(function(){var e=t(this),i=e.data("target")||e.attr("href"),r=/^#\w/.test(i)&&t(i);return r&&r.length&&[[r.position().top+(!t.isWindow(n.$scrollElement.get(0))&&n.$scrollElement.scrollTop()),i]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){n.offsets.push(this[0]),n.targets.push(this[1])})},process:function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,i=n-this.$scrollElement.height(),r=this.offsets,o=this.targets,s=this.activeTarget;if(e>=i)return s!=(t=o.last()[0])&&this.activate(t);for(t=r.length;t--;)s!=o[t]&&e>=r[t]&&(!r[t+1]||e<=r[t+1])&&this.activate(o[t])},activate:function(e){var n,i;this.activeTarget=e,t(this.selector).parent(".active").removeClass("active"),i=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',n=t(i).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}};var n=t.fn.scrollspy;t.fn.scrollspy=function(n){return this.each(function(){var i=t(this),r=i.data("scrollspy"),o="object"==typeof n&&n;r||i.data("scrollspy",r=new e(this,o)),"string"==typeof n&&r[n]()})},t.fn.scrollspy.Constructor=e,t.fn.scrollspy.defaults={offset:10},t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=n,this},t(window).on("load",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);e.scrollspy(e.data())})})}(window.jQuery),/* ========================================================
 * bootstrap-tab.js v2.3.2
 * http://twitter.github.com/bootstrap/javascript.html#tabs
 * ========================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ======================================================== */
!function(t){"use strict";var e=function(e){this.element=t(e)};e.prototype={constructor:e,show:function(){var e,n,i,r=this.element,o=r.closest("ul:not(.dropdown-menu)"),s=r.attr("data-target");s||(s=r.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,"")),r.parent("li").hasClass("active")||(e=o.find(".active:last a")[0],i=t.Event("show",{relatedTarget:e}),r.trigger(i),i.isDefaultPrevented()||(n=t(s),this.activate(r.parent("li"),o),this.activate(n,n.parent(),function(){r.trigger({type:"shown",relatedTarget:e})})))},activate:function(e,n,i){function r(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),s?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),i&&i()}var o=n.find("> .active"),s=i&&t.support.transition&&o.hasClass("fade");s?o.one(t.support.transition.end,r):r(),o.removeClass("in")}};var n=t.fn.tab;t.fn.tab=function(n){return this.each(function(){var i=t(this),r=i.data("tab");r||i.data("tab",r=new e(this)),"string"==typeof n&&r[n]()})},t.fn.tab.Constructor=e,t.fn.tab.noConflict=function(){return t.fn.tab=n,this},t(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault(),t(this).tab("show")})}(window.jQuery),/* ===========================================================
 * bootstrap-tooltip.js v2.3.2
 * http://twitter.github.com/bootstrap/javascript.html#tooltips
 * Inspired by the original jQuery.tipsy by Jason Frame
 * ===========================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ========================================================== */
!function(t){"use strict";var e=function(t,e){this.init("tooltip",t,e)};e.prototype={constructor:e,init:function(e,n,i){var r,o,s,a,l;for(this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.enabled=!0,s=this.options.trigger.split(" "),l=s.length;l--;)a=s[l],"click"==a?this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this)):"manual"!=a&&(r="hover"==a?"mouseenter":"focus",o="hover"==a?"mouseleave":"blur",this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(o+"."+this.type,this.options.selector,t.proxy(this.leave,this)));this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(e){return e=t.extend({},t.fn[this.type].defaults,this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},enter:function(e){var n,i=t.fn[this.type].defaults,r={};return this._options&&t.each(this._options,function(t,e){i[t]!=e&&(r[t]=e)},this),n=t(e.currentTarget)[this.type](r).data(this.type),n.options.delay&&n.options.delay.show?(clearTimeout(this.timeout),n.hoverState="in",void(this.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show))):n.show()},leave:function(e){var n=t(e.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),n.options.delay&&n.options.delay.hide?(n.hoverState="out",void(this.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide))):n.hide()},show:function(){var e,n,i,r,o,s,a=t.Event("show");if(this.hasContent()&&this.enabled){if(this.$element.trigger(a),a.isDefaultPrevented())return;switch(e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),o="function"==typeof this.options.placement?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,e.detach().css({top:0,left:0,display:"block"}),this.options.container?e.appendTo(this.options.container):e.insertAfter(this.$element),n=this.getPosition(),i=e[0].offsetWidth,r=e[0].offsetHeight,o){case"bottom":s={top:n.top+n.height,left:n.left+n.width/2-i/2};break;case"top":s={top:n.top-r,left:n.left+n.width/2-i/2};break;case"left":s={top:n.top+n.height/2-r/2,left:n.left-i};break;case"right":s={top:n.top+n.height/2-r/2,left:n.left+n.width}}this.applyPlacement(s,o),this.$element.trigger("shown")}},applyPlacement:function(t,e){var n,i,r,o,s=this.tip(),a=s[0].offsetWidth,l=s[0].offsetHeight;s.offset(t).addClass(e).addClass("in"),n=s[0].offsetWidth,i=s[0].offsetHeight,"top"==e&&i!=l&&(t.top=t.top+l-i,o=!0),"bottom"==e||"top"==e?(r=0,t.left<0&&(r=-2*t.left,t.left=0,s.offset(t),n=s[0].offsetWidth,i=s[0].offsetHeight),this.replaceArrow(r-a+n,n,"left")):this.replaceArrow(i-l,i,"top"),o&&s.offset(t)},replaceArrow:function(t,e,n){this.arrow().css(n,t?50*(1-t/e)+"%":"")},setContent:function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},hide:function(){function e(){var e=setTimeout(function(){n.off(t.support.transition.end).detach()},500);n.one(t.support.transition.end,function(){clearTimeout(e),n.detach()})}var n=this.tip(),i=t.Event("hide");return this.$element.trigger(i),i.isDefaultPrevented()?void 0:(n.removeClass("in"),t.support.transition&&this.$tip.hasClass("fade")?e():n.detach(),this.$element.trigger("hidden"),this)},fixTitle:function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var e=this.$element[0];return t.extend({},"function"==typeof e.getBoundingClientRect?e.getBoundingClientRect():{width:e.offsetWidth,height:e.offsetHeight},this.$element.offset())},getTitle:function(){var t,e=this.$element,n=this.options;return t=e.attr("data-original-title")||("function"==typeof n.title?n.title.call(e[0]):n.title)},tip:function(){return this.$tip=this.$tip||t(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(e){var n=e?t(e.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=t.fn.tooltip;t.fn.tooltip=function(n){return this.each(function(){var i=t(this),r=i.data("tooltip"),o="object"==typeof n&&n;r||i.data("tooltip",r=new e(this,o)),"string"==typeof n&&r[n]()})},t.fn.tooltip.Constructor=e,t.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.fn.tooltip.noConflict=function(){return t.fn.tooltip=n,this}}(window.jQuery),/* ===========================================================
 * bootstrap-popover.js v2.3.2
 * http://twitter.github.com/bootstrap/javascript.html#popovers
 * ===========================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =========================================================== */
!function(t){"use strict";var e=function(t,e){this.init("popover",t,e)};e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype,{constructor:e,setContent:function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content")[this.options.html?"html":"text"](n),t.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var t,e=this.$element,n=this.options;return t=("function"==typeof n.content?n.content.call(e[0]):n.content)||e.attr("data-content")},tip:function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var n=t.fn.popover;t.fn.popover=function(n){return this.each(function(){var i=t(this),r=i.data("popover"),o="object"==typeof n&&n;r||i.data("popover",r=new e(this,o)),"string"==typeof n&&r[n]()})},t.fn.popover.Constructor=e,t.fn.popover.defaults=t.extend({},t.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(window.jQuery),/* =============================================================
 * bootstrap-typeahead.js v2.3.2
 * http://twitter.github.com/bootstrap/javascript.html#typeahead
 * =============================================================
 * Copyright 2012 Twitter, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============================================================ */
!function(t){"use strict";var e=function(e,n){this.$element=t(e),this.options=t.extend({},t.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=t(this.options.menu),this.shown=!1,this.listen()};e.prototype={constructor:e,select:function(){var t=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(t)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:e.top+e.height,left:e.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(e){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=t.isFunction(this.source)?this.source(this.query,t.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(e){var n=this;return e=t.grep(e,function(t){return n.matcher(t)}),e=this.sorter(e),e.length?this.render(e.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(t){return~t.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(t){for(var e,n=[],i=[],r=[];e=t.shift();)e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?i.push(e):r.push(e):n.push(e);return n.concat(i,r)},highlighter:function(t){var e=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return t.replace(new RegExp("("+e+")","ig"),function(t,e){return"<strong>"+e+"</strong>"})},render:function(e){var n=this;return e=t(e).map(function(e,i){return e=t(n.options.item).attr("data-value",i),e.find("a").html(n.highlighter(i)),e[0]}),e.first().addClass("active"),this.$menu.html(e),this},next:function(e){var n=this.$menu.find(".active").removeClass("active"),i=n.next();i.length||(i=t(this.$menu.find("li")[0])),i.addClass("active")},prev:function(t){var e=this.$menu.find(".active").removeClass("active"),n=e.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(t){this.focused=!0},blur:function(t){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(t){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=t.fn.typeahead;t.fn.typeahead=function(n){return this.each(function(){var i=t(this),r=i.data("typeahead"),o="object"==typeof n&&n;r||i.data("typeahead",r=new e(this,o)),"string"==typeof n&&r[n]()})},t.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},t.fn.typeahead.Constructor=e,t.fn.typeahead.noConflict=function(){return t.fn.typeahead=n,this},t(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(e){var n=t(this);n.data("typeahead")||n.typeahead(n.data())})}(window.jQuery),!function(){function t(t){return null!=t&&!isNaN(t)}function e(t){return t.length}function n(t){for(var e=1;t*e%1;)e*=10;return e}function i(t,e){try{for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}catch(i){t.prototype=e}}function r(){}function o(t){return ls+t in this}function s(t){return t=ls+t,t in this&&delete this[t]}function a(){var t=[];return this.forEach(function(e){t.push(e)}),t}function l(){var t=0;for(var e in this)e.charCodeAt(0)===us&&++t;return t}function u(){for(var t in this)if(t.charCodeAt(0)===us)return!1;return!0}function c(){}function h(t,e,n){return function(){var i=n.apply(e,arguments);return i===e?t:i}}function d(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.substring(1);for(var n=0,i=cs.length;i>n;++n){var r=cs[n]+e;if(r in t)return r}}function f(){}function p(){}function g(t){function e(){for(var e,i=n,r=-1,o=i.length;++r<o;)(e=i[r].on)&&e.apply(this,arguments);return t}var n=[],i=new r;return e.on=function(e,r){var o,s=i.get(e);return arguments.length<2?s&&s.on:(s&&(s.on=null,n=n.slice(0,o=n.indexOf(s)).concat(n.slice(o+1)),i.remove(e)),r&&n.push(i.set(e,{on:r})),t)},e}function m(){Xo.event.preventDefault()}function v(){for(var t,e=Xo.event;t=e.sourceEvent;)e=t;return e}function y(t){for(var e=new p,n=0,i=arguments.length;++n<i;)e[arguments[n]]=g(e);return e.of=function(n,i){return function(r){try{var o=r.sourceEvent=Xo.event;r.target=t,Xo.event=r,e[r.type].apply(n,i)}finally{Xo.event=o}}},e}function b(t){return ds(t,vs),t}function _(t){return"function"==typeof t?t:function(){return fs(t,this)}}function x(t){return"function"==typeof t?t:function(){return ps(t,this)}}function w(t,e){function n(){this.removeAttribute(t)}function i(){this.removeAttributeNS(t.space,t.local)}function r(){this.setAttribute(t,e)}function o(){this.setAttributeNS(t.space,t.local,e)}function s(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}function a(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}return t=Xo.ns.qualify(t),null==e?t.local?i:n:"function"==typeof e?t.local?a:s:t.local?o:r}function C(t){return t.trim().replace(/\s+/g," ")}function k(t){return new RegExp("(?:^|\\s+)"+Xo.requote(t)+"(?:\\s+|$)","g")}function T(t){return t.trim().split(/^|\s+/)}function D(t,e){function n(){for(var n=-1;++n<r;)t[n](this,e)}function i(){for(var n=-1,i=e.apply(this,arguments);++n<r;)t[n](this,i)}t=T(t).map(M);var r=t.length;return"function"==typeof e?i:n}function M(t){var e=k(t);return function(n,i){if(r=n.classList)return i?r.add(t):r.remove(t);var r=n.getAttribute("class")||"";i?(e.lastIndex=0,e.test(r)||n.setAttribute("class",C(r+" "+t))):n.setAttribute("class",C(r.replace(e," ")))}}function S(t,e,n){function i(){this.style.removeProperty(t)}function r(){this.style.setProperty(t,e,n)}function o(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}return null==e?i:"function"==typeof e?o:r}function E(t,e){function n(){delete this[t]}function i(){this[t]=e}function r(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}return null==e?n:"function"==typeof e?r:i}function N(t){return"function"==typeof t?t:(t=Xo.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,t)}}function A(t){return{__data__:t}}function j(t){return function(){return ms(this,t)}}function I(t){return arguments.length||(t=Xo.ascending),function(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}}function $(t,e){for(var n=0,i=t.length;i>n;n++)for(var r,o=t[n],s=0,a=o.length;a>s;s++)(r=o[s])&&e(r,s,n);return t}function P(t){return ds(t,bs),t}function H(t){var e,n;return function(i,r,o){var s,a=t[o].update,l=a.length;for(o!=n&&(n=o,e=0),r>=e&&(e=r+1);!(s=a[e])&&++e<l;);return s}}function F(){var t=this.__transition__;t&&++t.active}function L(t,e,n){function i(){var e=this[s];e&&(this.removeEventListener(t,e,e.$),delete this[s])}function r(){var r=l(e,Qo(arguments));i.call(this),this.addEventListener(t,this[s]=r,r.$=n),r._=e}function o(){var e,n=new RegExp("^__on([^.]+)"+Xo.requote(t)+"$");for(var i in this)if(e=i.match(n)){var r=this[i];this.removeEventListener(e[1],r,r.$),delete this[i]}}var s="__on"+t,a=t.indexOf("."),l=z;a>0&&(t=t.substring(0,a));var u=xs.get(t);return u&&(t=u,l=O),a?e?r:i:e?f:o}function z(t,e){return function(n){var i=Xo.event;Xo.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{Xo.event=i}}}function O(t,e){var n=z(t,e);return function(t){var e=this,i=t.relatedTarget;i&&(i===e||8&i.compareDocumentPosition(e))||n.call(e,t)}}function R(){var t=".dragsuppress-"+ ++Cs,e="click"+t,n=Xo.select(Zo).on("touchmove"+t,m).on("dragstart"+t,m).on("selectstart"+t,m);if(ws){var i=Go.style,r=i[ws];i[ws]="none"}return function(o){function s(){n.on(e,null)}n.on(t,null),ws&&(i[ws]=r),o&&(n.on(e,function(){m(),s()},!0),setTimeout(s,0))}}function q(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();if(0>ks&&(Zo.scrollX||Zo.scrollY)){n=Xo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var r=n[0][0].getScreenCTM();ks=!(r.f||r.e),n.remove()}return ks?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}function W(t){return t>0?1:0>t?-1:0}function B(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function U(t){return t>1?0:-1>t?Ts:Math.acos(t)}function Y(t){return t>1?Ms:-1>t?-Ms:Math.asin(t)}function X(t){return((t=Math.exp(t))-1/t)/2}function V(t){return((t=Math.exp(t))+1/t)/2}function Q(t){return((t=Math.exp(2*t))-1)/(t+1)}function K(t){return(t=Math.sin(t/2))*t}function G(){}function Z(t,e,n){return new J(t,e,n)}function J(t,e,n){this.h=t,this.s=e,this.l=n}function tt(t,e,n){function i(t){return t>360?t-=360:0>t&&(t+=360),60>t?o+(s-o)*t/60:180>t?s:240>t?o+(s-o)*(240-t)/60:o}function r(t){return Math.round(255*i(t))}var o,s;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:0>e?0:e>1?1:e,n=0>n?0:n>1?1:n,s=.5>=n?n*(1+e):n+e-n*e,o=2*n-s,ft(r(t+120),r(t),r(t-120))}function et(t,e,n){return new nt(t,e,n)}function nt(t,e,n){this.h=t,this.c=e,this.l=n}function it(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),rt(n,Math.cos(t*=Ns)*e,Math.sin(t)*e)}function rt(t,e,n){return new ot(t,e,n)}function ot(t,e,n){this.l=t,this.a=e,this.b=n}function st(t,e,n){var i=(t+16)/116,r=i+e/500,o=i-n/200;return r=lt(r)*Rs,i=lt(i)*qs,o=lt(o)*Ws,ft(ct(3.2404542*r-1.5371385*i-.4985314*o),ct(-.969266*r+1.8760108*i+.041556*o),ct(.0556434*r-.2040259*i+1.0572252*o))}function at(t,e,n){return t>0?et(Math.atan2(n,e)*As,Math.sqrt(e*e+n*n),t):et(NaN,NaN,t)}function lt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ut(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ct(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ht(t){return ft(t>>16,t>>8&255,255&t)}function dt(t){return ht(t)+""}function ft(t,e,n){return new pt(t,e,n)}function pt(t,e,n){this.r=t,this.g=e,this.b=n}function gt(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function mt(t,e,n){var i,r,o,s=0,a=0,l=0;if(i=/([a-z]+)\((.*)\)/i.exec(t))switch(r=i[2].split(","),i[1]){case"hsl":return n(parseFloat(r[0]),parseFloat(r[1])/100,parseFloat(r[2])/100);case"rgb":return e(_t(r[0]),_t(r[1]),_t(r[2]))}return(o=Ys.get(t))?e(o.r,o.g,o.b):(null!=t&&"#"===t.charAt(0)&&(4===t.length?(s=t.charAt(1),s+=s,a=t.charAt(2),a+=a,l=t.charAt(3),l+=l):7===t.length&&(s=t.substring(1,3),a=t.substring(3,5),l=t.substring(5,7)),s=parseInt(s,16),a=parseInt(a,16),l=parseInt(l,16)),e(s,a,l))}function vt(t,e,n){var i,r,o=Math.min(t/=255,e/=255,n/=255),s=Math.max(t,e,n),a=s-o,l=(s+o)/2;return a?(r=.5>l?a/(s+o):a/(2-s-o),i=t==s?(e-n)/a+(n>e?6:0):e==s?(n-t)/a+2:(t-e)/a+4,i*=60):(i=NaN,r=l>0&&1>l?0:i),Z(i,r,l)}function yt(t,e,n){t=bt(t),e=bt(e),n=bt(n);var i=ut((.4124564*t+.3575761*e+.1804375*n)/Rs),r=ut((.2126729*t+.7151522*e+.072175*n)/qs),o=ut((.0193339*t+.119192*e+.9503041*n)/Ws);return rt(116*r-16,500*(i-r),200*(r-o))}function bt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function _t(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function xt(t){return"function"==typeof t?t:function(){return t}}function wt(t){return t}function Ct(t){return function(e,n,i){return 2===arguments.length&&"function"==typeof n&&(i=n,n=null),kt(e,n,t,i)}}function kt(t,e,n,i){function r(){var t,e=l.status;if(!e&&l.responseText||e>=200&&300>e||304===e){try{t=n.call(o,l)}catch(i){return void s.error.call(o,i)}s.load.call(o,t)}else s.error.call(o,l)}var o={},s=Xo.dispatch("beforesend","progress","load","error"),a={},l=new XMLHttpRequest,u=null;return!Zo.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=r:l.onreadystatechange=function(){l.readyState>3&&r()},l.onprogress=function(t){var e=Xo.event;Xo.event=t;try{s.progress.call(o,l)}finally{Xo.event=e}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?a[t]:(null==e?delete a[t]:a[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",o):e},o.responseType=function(t){return arguments.length?(u=t,o):u},o.response=function(t){return n=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(Qo(arguments)))}}),o.send=function(n,i,r){if(2===arguments.length&&"function"==typeof i&&(r=i,i=null),l.open(n,t,!0),null==e||"accept"in a||(a.accept=e+",*/*"),l.setRequestHeader)for(var c in a)l.setRequestHeader(c,a[c]);return null!=e&&l.overrideMimeType&&l.overrideMimeType(e),null!=u&&(l.responseType=u),null!=r&&o.on("error",r).on("load",function(t){r(null,t)}),s.beforesend.call(o,l),l.send(null==i?null:i),o},o.abort=function(){return l.abort(),o},Xo.rebind(o,s,"on"),null==i?o:o.get(Tt(i))}function Tt(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}function Dt(){var t=Mt(),e=St()-t;e>24?(isFinite(e)&&(clearTimeout(Ks),Ks=setTimeout(Dt,e)),Qs=0):(Qs=1,Zs(Dt))}function Mt(){var t=Date.now();for(Gs=Xs;Gs;)t>=Gs.t&&(Gs.f=Gs.c(t-Gs.t)),Gs=Gs.n;return t}function St(){for(var t,e=Xs,n=1/0;e;)e.f?e=t?t.n=e.n:Xs=e.n:(e.t<n&&(n=e.t),e=(t=e).n);return Vs=t,n}function Et(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}function Nt(t,e){var n=Math.pow(10,3*as(8-e));return{scale:e>8?function(t){return t/n}:function(t){return t*n},symbol:t}}function At(t){var e=t.decimal,n=t.thousands,i=t.grouping,r=t.currency,o=i?function(t){for(var e=t.length,r=[],o=0,s=i[0];e>0&&s>0;)r.push(t.substring(e-=s,e+s)),s=i[o=(o+1)%i.length];return r.reverse().join(n)}:wt;return function(t){var n=ta.exec(t),i=n[1]||" ",s=n[2]||">",a=n[3]||"",l=n[4]||"",u=n[5],c=+n[6],h=n[7],d=n[8],f=n[9],p=1,g="",m="",v=!1;switch(d&&(d=+d.substring(1)),(u||"0"===i&&"="===s)&&(u=i="0",s="=",h&&(c-=Math.floor((c-1)/4))),f){case"n":h=!0,f="g";break;case"%":p=100,m="%",f="f";break;case"p":p=100,m="%",f="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+f.toLowerCase());case"c":case"d":v=!0,d=0;break;case"s":p=-1,f="r"}"$"===l&&(g=r[0],m=r[1]),"r"!=f||d||(f="g"),null!=d&&("g"==f?d=Math.max(1,Math.min(21,d)):("e"==f||"f"==f)&&(d=Math.max(0,Math.min(20,d)))),f=ea.get(f)||jt;var y=u&&h;return function(t){var n=m;if(v&&t%1)return"";var r=0>t||0===t&&0>1/t?(t=-t,"-"):a;if(0>p){var l=Xo.formatPrefix(t,d);t=l.scale(t),n=l.symbol+m}else t*=p;t=f(t,d);var b=t.lastIndexOf("."),_=0>b?t:t.substring(0,b),x=0>b?"":e+t.substring(b+1);!u&&h&&(_=o(_));var w=g.length+_.length+x.length+(y?0:r.length),C=c>w?new Array(w=c-w+1).join(i):"";return y&&(_=o(C+_)),r+=g,t=_+x,("<"===s?r+t+C:">"===s?C+r+t:"^"===s?C.substring(0,w>>=1)+r+t+C.substring(w):r+(y?t:C+t))+n}}}function jt(t){return t+""}function It(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function $t(t,e,n){function i(e){var n=t(e),i=o(n,1);return i-e>e-n?n:i}function r(n){return e(n=t(new ia(n-1)),1),n}function o(t,n){return e(t=new ia(+t),n),t}function s(t,i,o){var s=r(t),a=[];if(o>1)for(;i>s;)n(s)%o||a.push(new Date(+s)),e(s,1);else for(;i>s;)a.push(new Date(+s)),e(s,1);return a}function a(t,e,n){try{ia=It;var i=new It;return i._=t,s(i,e,n)}finally{ia=Date}}t.floor=t,t.round=i,t.ceil=r,t.offset=o,t.range=s;var l=t.utc=Pt(t);return l.floor=l,l.round=Pt(i),l.ceil=Pt(r),l.offset=Pt(o),l.range=a,t}function Pt(t){return function(e,n){try{ia=It;var i=new It;return i._=e,t(i,n)._}finally{ia=Date}}}function Ht(t){function e(t){function e(e){for(var n,r,o,s=[],a=-1,l=0;++a<i;)37===t.charCodeAt(a)&&(s.push(t.substring(l,a)),null!=(r=oa[n=t.charAt(++a)])&&(n=t.charAt(++a)),(o=S[n])&&(n=o(e,null==r?"e"===n?" ":"0":r)),s.push(n),l=a+1);return s.push(t.substring(l,a)),s.join("")}var i=t.length;return e.parse=function(e){var i={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},r=n(i,t,e,0);if(r!=e.length)return null;"p"in i&&(i.H=i.H%12+12*i.p);var o=null!=i.Z&&ia!==It,s=new(o?It:ia);return"j"in i?s.setFullYear(i.y,0,i.j):"w"in i&&("W"in i||"U"in i)?(s.setFullYear(i.y,0,1),s.setFullYear(i.y,0,"W"in i?(i.w+6)%7+7*i.W-(s.getDay()+5)%7:i.w+7*i.U-(s.getDay()+6)%7)):s.setFullYear(i.y,i.m,i.d),s.setHours(i.H+Math.floor(i.Z/100),i.M+i.Z%100,i.S,i.L),o?s._:s},e.toString=function(){return t},e}function n(t,e,n,i){for(var r,o,s,a=0,l=e.length,u=n.length;l>a;){if(i>=u)return-1;if(r=e.charCodeAt(a++),37===r){if(s=e.charAt(a++),o=E[s in oa?e.charAt(a++):s],!o||(i=o(t,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}function i(t,e,n){w.lastIndex=0;var i=w.exec(e.substring(n));return i?(t.w=C.get(i[0].toLowerCase()),n+i[0].length):-1}function r(t,e,n){_.lastIndex=0;var i=_.exec(e.substring(n));return i?(t.w=x.get(i[0].toLowerCase()),n+i[0].length):-1}function o(t,e,n){D.lastIndex=0;var i=D.exec(e.substring(n));return i?(t.m=M.get(i[0].toLowerCase()),n+i[0].length):-1}function s(t,e,n){k.lastIndex=0;var i=k.exec(e.substring(n));return i?(t.m=T.get(i[0].toLowerCase()),n+i[0].length):-1}function a(t,e,i){return n(t,S.c.toString(),e,i)}function l(t,e,i){return n(t,S.x.toString(),e,i)}function u(t,e,i){return n(t,S.X.toString(),e,i)}function c(t,e,n){var i=b.get(e.substring(n,n+=2).toLowerCase());return null==i?-1:(t.p=i,n)}var h=t.dateTime,d=t.date,f=t.time,p=t.periods,g=t.days,m=t.shortDays,v=t.months,y=t.shortMonths;e.utc=function(t){function n(t){try{ia=It;var e=new ia;return e._=t,i(e)}finally{ia=Date}}var i=e(t);return n.parse=function(t){try{ia=It;var e=i.parse(t);return e&&e._}finally{ia=Date}},n.toString=i.toString,n},e.multi=e.utc.multi=ne;var b=Xo.map(),_=Lt(g),x=zt(g),w=Lt(m),C=zt(m),k=Lt(v),T=zt(v),D=Lt(y),M=zt(y);p.forEach(function(t,e){b.set(t.toLowerCase(),e)});var S={a:function(t){return m[t.getDay()]},A:function(t){return g[t.getDay()]},b:function(t){return y[t.getMonth()]},B:function(t){return v[t.getMonth()]},c:e(h),d:function(t,e){return Ft(t.getDate(),e,2)},e:function(t,e){return Ft(t.getDate(),e,2)},H:function(t,e){return Ft(t.getHours(),e,2)},I:function(t,e){return Ft(t.getHours()%12||12,e,2)},j:function(t,e){return Ft(1+na.dayOfYear(t),e,3)},L:function(t,e){return Ft(t.getMilliseconds(),e,3)},m:function(t,e){return Ft(t.getMonth()+1,e,2)},M:function(t,e){return Ft(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return Ft(t.getSeconds(),e,2)},U:function(t,e){return Ft(na.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Ft(na.mondayOfYear(t),e,2)},x:e(d),X:e(f),y:function(t,e){return Ft(t.getFullYear()%100,e,2)},Y:function(t,e){return Ft(t.getFullYear()%1e4,e,4)},Z:te,"%":function(){return"%"}},E={a:i,A:r,b:o,B:s,c:a,d:Vt,e:Vt,H:Kt,I:Kt,j:Qt,L:Jt,m:Xt,M:Gt,p:c,S:Zt,U:Rt,w:Ot,W:qt,x:l,X:u,y:Bt,Y:Wt,Z:Ut,"%":ee};return e}function Ft(t,e,n){var i=0>t?"-":"",r=(i?-t:t)+"",o=r.length;return i+(n>o?new Array(n-o+1).join(e)+r:r)}function Lt(t){return new RegExp("^(?:"+t.map(Xo.requote).join("|")+")","i")}function zt(t){for(var e=new r,n=-1,i=t.length;++n<i;)e.set(t[n].toLowerCase(),n);return e}function Ot(t,e,n){sa.lastIndex=0;var i=sa.exec(e.substring(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function Rt(t,e,n){sa.lastIndex=0;var i=sa.exec(e.substring(n));return i?(t.U=+i[0],n+i[0].length):-1}function qt(t,e,n){sa.lastIndex=0;var i=sa.exec(e.substring(n));return i?(t.W=+i[0],n+i[0].length):-1}function Wt(t,e,n){sa.lastIndex=0;var i=sa.exec(e.substring(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function Bt(t,e,n){sa.lastIndex=0;var i=sa.exec(e.substring(n,n+2));return i?(t.y=Yt(+i[0]),n+i[0].length):-1}function Ut(t,e,n){return/^[+-]\d{4}$/.test(e=e.substring(n,n+5))?(t.Z=+e,n+5):-1}function Yt(t){return t+(t>68?1900:2e3)}function Xt(t,e,n){sa.lastIndex=0;var i=sa.exec(e.substring(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function Vt(t,e,n){sa.lastIndex=0;var i=sa.exec(e.substring(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function Qt(t,e,n){sa.lastIndex=0;var i=sa.exec(e.substring(n,n+3));return i?(t.j=+i[0],n+i[0].length):-1}function Kt(t,e,n){sa.lastIndex=0;var i=sa.exec(e.substring(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function Gt(t,e,n){sa.lastIndex=0;var i=sa.exec(e.substring(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function Zt(t,e,n){sa.lastIndex=0;var i=sa.exec(e.substring(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function Jt(t,e,n){sa.lastIndex=0;var i=sa.exec(e.substring(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function te(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",i=~~(as(e)/60),r=as(e)%60;return n+Ft(i,"0",2)+Ft(r,"0",2)}function ee(t,e,n){aa.lastIndex=0;var i=aa.exec(e.substring(n,n+1));return i?n+i[0].length:-1}function ne(t){for(var e=t.length,n=-1;++n<e;)t[n][0]=this(t[n][0]);return function(e){for(var n=0,i=t[n];!i[1](e);)i=t[++n];return i[0](e)}}function ie(){}function re(t,e,n){var i=n.s=t+e,r=i-t,o=i-r;n.t=t-o+(e-r)}function oe(t,e){t&&ha.hasOwnProperty(t.type)&&ha[t.type](t,e)}function se(t,e,n){var i,r=-1,o=t.length-n;for(e.lineStart();++r<o;)i=t[r],e.point(i[0],i[1],i[2]);e.lineEnd()}function ae(t,e){var n=-1,i=t.length;for(e.polygonStart();++n<i;)se(t[n],e,1);e.polygonEnd()}function le(){function t(t,e){t*=Ns,e=e*Ns/2+Ts/4;var n=t-i,s=Math.cos(e),a=Math.sin(e),l=o*a,u=r*s+l*Math.cos(n),c=l*Math.sin(n);fa.add(Math.atan2(c,u)),i=t,r=s,o=a}var e,n,i,r,o;pa.point=function(s,a){pa.point=t,i=(e=s)*Ns,r=Math.cos(a=(n=a)*Ns/2+Ts/4),o=Math.sin(a)},pa.lineEnd=function(){t(e,n)}}function ue(t){var e=t[0],n=t[1],i=Math.cos(n);return[i*Math.cos(e),i*Math.sin(e),Math.sin(n)]}function ce(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function he(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function de(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function fe(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function pe(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function ge(t){return[Math.atan2(t[1],t[0]),Y(t[2])]}function me(t,e){return as(t[0]-e[0])<Ss&&as(t[1]-e[1])<Ss}function ve(t,e){t*=Ns;var n=Math.cos(e*=Ns);ye(n*Math.cos(t),n*Math.sin(t),Math.sin(e))}function ye(t,e,n){++ga,va+=(t-va)/ga,ya+=(e-ya)/ga,ba+=(n-ba)/ga}function be(){function t(t,r){t*=Ns;var o=Math.cos(r*=Ns),s=o*Math.cos(t),a=o*Math.sin(t),l=Math.sin(r),u=Math.atan2(Math.sqrt((u=n*l-i*a)*u+(u=i*s-e*l)*u+(u=e*a-n*s)*u),e*s+n*a+i*l);ma+=u,_a+=u*(e+(e=s)),xa+=u*(n+(n=a)),wa+=u*(i+(i=l)),ye(e,n,i)}var e,n,i;Da.point=function(r,o){r*=Ns;var s=Math.cos(o*=Ns);e=s*Math.cos(r),n=s*Math.sin(r),i=Math.sin(o),Da.point=t,ye(e,n,i)}}function _e(){Da.point=ve}function xe(){function t(t,e){t*=Ns;var n=Math.cos(e*=Ns),s=n*Math.cos(t),a=n*Math.sin(t),l=Math.sin(e),u=r*l-o*a,c=o*s-i*l,h=i*a-r*s,d=Math.sqrt(u*u+c*c+h*h),f=i*s+r*a+o*l,p=d&&-U(f)/d,g=Math.atan2(d,f);Ca+=p*u,ka+=p*c,Ta+=p*h,ma+=g,_a+=g*(i+(i=s)),xa+=g*(r+(r=a)),wa+=g*(o+(o=l)),ye(i,r,o)}var e,n,i,r,o;Da.point=function(s,a){e=s,n=a,Da.point=t,s*=Ns;var l=Math.cos(a*=Ns);i=l*Math.cos(s),r=l*Math.sin(s),o=Math.sin(a),ye(i,r,o)},Da.lineEnd=function(){t(e,n),Da.lineEnd=_e,Da.point=ve}}function we(){return!0}function Ce(t,e,n,i,r){var o=[],s=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n=t[0],i=t[e];if(me(n,i)){r.lineStart();for(var a=0;e>a;++a)r.point((n=t[a])[0],n[1]);return void r.lineEnd()}var l=new Te(n,t,null,!0),u=new Te(n,null,l,!1);l.o=u,o.push(l),s.push(u),l=new Te(i,t,null,!1),u=new Te(i,null,l,!0),l.o=u,o.push(l),s.push(u)}}),s.sort(e),ke(o),ke(s),o.length){for(var a=0,l=n,u=s.length;u>a;++a)s[a].e=l=!l;for(var c,h,d=o[0];;){for(var f=d,p=!0;f.v;)if((f=f.n)===d)return;c=f.z,r.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(var a=0,u=c.length;u>a;++a)r.point((h=c[a])[0],h[1]);else i(f.x,f.n.x,1,r);f=f.n}else{if(p){c=f.p.z;for(var a=c.length-1;a>=0;--a)r.point((h=c[a])[0],h[1])}else i(f.x,f.p.x,-1,r);f=f.p}f=f.o,c=f.z,p=!p}while(!f.v);r.lineEnd()}}}function ke(t){if(e=t.length){for(var e,n,i=0,r=t[0];++i<e;)r.n=n=t[i],n.p=r,r=n;r.n=n=t[0],n.p=r}}function Te(t,e,n,i){this.x=t,this.z=e,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function De(t,e,n,i){return function(r,o){function s(e,n){var i=r(e,n);t(e=i[0],n=i[1])&&o.point(e,n)}function a(t,e){var n=r(t,e);m.point(n[0],n[1])}function l(){y.point=a,m.lineStart()}function u(){y.point=s,m.lineEnd()}function c(t,e){g.push([t,e]);var n=r(t,e);_.point(n[0],n[1])}function h(){_.lineStart(),g=[]}function d(){c(g[0][0],g[0][1]),_.lineEnd();var t,e=_.clean(),n=b.buffer(),i=n.length;if(g.pop(),p.push(g),g=null,i){if(1&e){t=n[0];var r,i=t.length-1,s=-1;for(o.lineStart();++s<i;)o.point((r=t[s])[0],r[1]);return void o.lineEnd()}i>1&&2&e&&n.push(n.pop().concat(n.shift())),f.push(n.filter(Me))}}var f,p,g,m=e(o),v=r.invert(i[0],i[1]),y={point:s,lineStart:l,lineEnd:u,polygonStart:function(){y.point=c,y.lineStart=h,y.lineEnd=d,f=[],p=[],o.polygonStart()},polygonEnd:function(){y.point=s,y.lineStart=l,y.lineEnd=u,f=Xo.merge(f);var t=Ne(v,p);f.length?Ce(f,Ee,t,n,o):t&&(o.lineStart(),n(null,null,1,o),o.lineEnd()),o.polygonEnd(),f=p=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},b=Se(),_=e(b);return y}}function Me(t){return t.length>1}function Se(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:f,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function Ee(t,e){return((t=t.x)[0]<0?t[1]-Ms-Ss:Ms-t[1])-((e=e.x)[0]<0?e[1]-Ms-Ss:Ms-e[1])}function Ne(t,e){var n=t[0],i=t[1],r=[Math.sin(n),-Math.cos(n),0],o=0,s=0;fa.reset();for(var a=0,l=e.length;l>a;++a){var u=e[a],c=u.length;if(c)for(var h=u[0],d=h[0],f=h[1]/2+Ts/4,p=Math.sin(f),g=Math.cos(f),m=1;;){m===c&&(m=0),t=u[m];var v=t[0],y=t[1]/2+Ts/4,b=Math.sin(y),_=Math.cos(y),x=v-d,w=as(x)>Ts,C=p*b;if(fa.add(Math.atan2(C*Math.sin(x),g*_+C*Math.cos(x))),o+=w?x+(x>=0?Ds:-Ds):x,w^d>=n^v>=n){var k=he(ue(h),ue(t));pe(k);var T=he(r,k);pe(T);var D=(w^x>=0?-1:1)*Y(T[2]);(i>D||i===D&&(k[0]||k[1]))&&(s+=w^x>=0?1:-1)}if(!m++)break;d=v,p=b,g=_,h=t}}return(-Ss>o||Ss>o&&0>fa)^1&s}function Ae(t){var e,n=NaN,i=NaN,r=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,s){var a=o>0?Ts:-Ts,l=as(o-n);as(l-Ts)<Ss?(t.point(n,i=(i+s)/2>0?Ms:-Ms),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(a,i),t.point(o,i),e=0):r!==a&&l>=Ts&&(as(n-r)<Ss&&(n-=r*Ss),as(o-a)<Ss&&(o-=a*Ss),i=je(n,i,o,s),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(a,i),e=0),t.point(n=o,i=s),r=a},lineEnd:function(){t.lineEnd(),n=i=NaN},clean:function(){return 2-e}}}function je(t,e,n,i){var r,o,s=Math.sin(t-n);return as(s)>Ss?Math.atan((Math.sin(e)*(o=Math.cos(i))*Math.sin(n)-Math.sin(i)*(r=Math.cos(e))*Math.sin(t))/(r*o*s)):(e+i)/2}function Ie(t,e,n,i){var r;if(null==t)r=n*Ms,i.point(-Ts,r),i.point(0,r),i.point(Ts,r),i.point(Ts,0),i.point(Ts,-r),i.point(0,-r),i.point(-Ts,-r),i.point(-Ts,0),i.point(-Ts,r);else if(as(t[0]-e[0])>Ss){var o=t[0]<e[0]?Ts:-Ts;r=n*o/2,i.point(-o,r),i.point(0,r),i.point(o,r)}else i.point(e[0],e[1])}function $e(t){function e(t,e){return Math.cos(t)*Math.cos(e)>o}function n(t){var n,o,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(h,d){var f,p=[h,d],g=e(h,d),m=s?g?0:r(h,d):g?r(h+(0>h?Ts:-Ts),d):0;if(!n&&(u=l=g)&&t.lineStart(),g!==l&&(f=i(n,p),(me(n,f)||me(p,f))&&(p[0]+=Ss,p[1]+=Ss,g=e(p[0],p[1]))),g!==l)c=0,g?(t.lineStart(),f=i(p,n),t.point(f[0],f[1])):(f=i(n,p),t.point(f[0],f[1]),t.lineEnd()),n=f;else if(a&&n&&s^g){var v;m&o||!(v=i(p,n,!0))||(c=0,s?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!g||n&&me(n,p)||t.point(p[0],p[1]),n=p,l=g,o=m},lineEnd:function(){l&&t.lineEnd(),n=null},clean:function(){return c|(u&&l)<<1}}}function i(t,e,n){var i=ue(t),r=ue(e),s=[1,0,0],a=he(i,r),l=ce(a,a),u=a[0],c=l-u*u;if(!c)return!n&&t;var h=o*l/c,d=-o*u/c,f=he(s,a),p=fe(s,h),g=fe(a,d);de(p,g);var m=f,v=ce(p,m),y=ce(m,m),b=v*v-y*(ce(p,p)-1);if(!(0>b)){var _=Math.sqrt(b),x=fe(m,(-v-_)/y);if(de(x,p),x=ge(x),!n)return x;var w,C=t[0],k=e[0],T=t[1],D=e[1];C>k&&(w=C,C=k,k=w);var M=k-C,S=as(M-Ts)<Ss,E=S||Ss>M;if(!S&&T>D&&(w=T,T=D,D=w),E?S?T+D>0^x[1]<(as(x[0]-C)<Ss?T:D):T<=x[1]&&x[1]<=D:M>Ts^(C<=x[0]&&x[0]<=k)){var N=fe(m,(-v+_)/y);return de(N,p),[x,ge(N)]}}}function r(e,n){var i=s?t:Ts-t,r=0;return-i>e?r|=1:e>i&&(r|=2),-i>n?r|=4:n>i&&(r|=8),r}var o=Math.cos(t),s=o>0,a=as(o)>Ss,l=un(t,6*Ns);return De(e,n,l,s?[0,-t]:[-Ts,t-Ts])}function Pe(t,e,n,i){return function(r){var o,s=r.a,a=r.b,l=s.x,u=s.y,c=a.x,h=a.y,d=0,f=1,p=c-l,g=h-u;if(o=t-l,p||!(o>0)){if(o/=p,0>p){if(d>o)return;f>o&&(f=o)}else if(p>0){if(o>f)return;o>d&&(d=o)}if(o=n-l,p||!(0>o)){if(o/=p,0>p){if(o>f)return;o>d&&(d=o)}else if(p>0){if(d>o)return;f>o&&(f=o)}if(o=e-u,g||!(o>0)){if(o/=g,0>g){if(d>o)return;f>o&&(f=o)}else if(g>0){if(o>f)return;o>d&&(d=o)}if(o=i-u,g||!(0>o)){if(o/=g,0>g){if(o>f)return;o>d&&(d=o)}else if(g>0){if(d>o)return;f>o&&(f=o)}return d>0&&(r.a={x:l+d*p,y:u+d*g}),1>f&&(r.b={x:l+f*p,y:u+f*g}),r}}}}}}function He(t,e,n,i){function r(i,r){return as(i[0]-t)<Ss?r>0?0:3:as(i[0]-n)<Ss?r>0?2:1:as(i[1]-e)<Ss?r>0?1:0:r>0?3:2}function o(t,e){return s(t.x,e.x)}function s(t,e){var n=r(t,1),i=r(e,1);return n!==i?n-i:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){function l(t){for(var e=0,n=m.length,i=t[1],r=0;n>r;++r)for(var o,s=1,a=m[r],l=a.length,u=a[0];l>s;++s)o=a[s],u[1]<=i?o[1]>i&&B(u,o,t)>0&&++e:o[1]<=i&&B(u,o,t)<0&&--e,u=o;return 0!==e}function u(o,a,l,u){var c=0,h=0;if(null==o||(c=r(o,l))!==(h=r(a,l))||s(o,a)<0^l>0){do u.point(0===c||3===c?t:n,c>1?i:e);while((c=(c+l+4)%4)!==h)}else u.point(a[0],a[1])}function c(r,o){return r>=t&&n>=r&&o>=e&&i>=o}function h(t,e){c(t,e)&&a.point(t,e)}function d(){E.point=p,m&&m.push(v=[]),k=!0,C=!1,x=w=NaN}function f(){g&&(p(y,b),_&&C&&M.rejoin(),g.push(M.buffer())),E.point=h,C&&a.lineEnd()}function p(t,e){t=Math.max(-Sa,Math.min(Sa,t)),e=Math.max(-Sa,Math.min(Sa,e));var n=c(t,e);if(m&&v.push([t,e]),k)y=t,b=e,_=n,k=!1,n&&(a.lineStart(),a.point(t,e));else if(n&&C)a.point(t,e);else{var i={a:{x:x,y:w},b:{x:t,y:e}};S(i)?(C||(a.lineStart(),a.point(i.a.x,i.a.y)),a.point(i.b.x,i.b.y),n||a.lineEnd(),T=!1):n&&(a.lineStart(),a.point(t,e),T=!1)}x=t,w=e,C=n}var g,m,v,y,b,_,x,w,C,k,T,D=a,M=Se(),S=Pe(t,e,n,i),E={point:h,lineStart:d,lineEnd:f,polygonStart:function(){a=M,g=[],m=[],T=!0},polygonEnd:function(){a=D,g=Xo.merge(g);var e=l([t,i]),n=T&&e,r=g.length;(n||r)&&(a.polygonStart(),n&&(a.lineStart(),u(null,null,1,a),a.lineEnd()),r&&Ce(g,o,e,u,a),a.polygonEnd()),g=m=v=null}};return E}}function Fe(t,e){function n(n,i){return n=t(n,i),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,i){return n=e.invert(n,i),n&&t.invert(n[0],n[1])}),n}function Le(t){var e=0,n=Ts/3,i=tn(t),r=i(e,n);return r.parallels=function(t){return arguments.length?i(e=t[0]*Ts/180,n=t[1]*Ts/180):[e/Ts*180,n/Ts*180]},r}function ze(t,e){function n(t,e){var n=Math.sqrt(o-2*r*Math.sin(e))/r;return[n*Math.sin(t*=r),s-n*Math.cos(t)]}var i=Math.sin(t),r=(i+Math.sin(e))/2,o=1+i*(2*r-i),s=Math.sqrt(o)/r;return n.invert=function(t,e){var n=s-e;return[Math.atan2(t,n)/r,Y((o-(t*t+n*n)*r*r)/(2*r))]},n}function Oe(){function t(t,e){
Na+=r*t-i*e,i=t,r=e}var e,n,i,r;Pa.point=function(o,s){Pa.point=t,e=i=o,n=r=s},Pa.lineEnd=function(){t(e,n)}}function Re(t,e){Aa>t&&(Aa=t),t>Ia&&(Ia=t),ja>e&&(ja=e),e>$a&&($a=e)}function qe(){function t(t,e){s.push("M",t,",",e,o)}function e(t,e){s.push("M",t,",",e),a.point=n}function n(t,e){s.push("L",t,",",e)}function i(){a.point=t}function r(){s.push("Z")}var o=We(4.5),s=[],a={point:t,lineStart:function(){a.point=e},lineEnd:i,polygonStart:function(){a.lineEnd=r},polygonEnd:function(){a.lineEnd=i,a.point=t},pointRadius:function(t){return o=We(t),a},result:function(){if(s.length){var t=s.join("");return s=[],t}}};return a}function We(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Be(t,e){va+=t,ya+=e,++ba}function Ue(){function t(t,i){var r=t-e,o=i-n,s=Math.sqrt(r*r+o*o);_a+=s*(e+t)/2,xa+=s*(n+i)/2,wa+=s,Be(e=t,n=i)}var e,n;Fa.point=function(i,r){Fa.point=t,Be(e=i,n=r)}}function Ye(){Fa.point=Be}function Xe(){function t(t,e){var n=t-i,o=e-r,s=Math.sqrt(n*n+o*o);_a+=s*(i+t)/2,xa+=s*(r+e)/2,wa+=s,s=r*t-i*e,Ca+=s*(i+t),ka+=s*(r+e),Ta+=3*s,Be(i=t,r=e)}var e,n,i,r;Fa.point=function(o,s){Fa.point=t,Be(e=i=o,n=r=s)},Fa.lineEnd=function(){t(e,n)}}function Ve(t){function e(e,n){t.moveTo(e,n),t.arc(e,n,s,0,Ds)}function n(e,n){t.moveTo(e,n),a.point=i}function i(e,n){t.lineTo(e,n)}function r(){a.point=e}function o(){t.closePath()}var s=4.5,a={point:e,lineStart:function(){a.point=n},lineEnd:r,polygonStart:function(){a.lineEnd=o},polygonEnd:function(){a.lineEnd=r,a.point=e},pointRadius:function(t){return s=t,a},result:f};return a}function Qe(t){function e(t){return(a?i:n)(t)}function n(e){return Ze(e,function(n,i){n=t(n,i),e.point(n[0],n[1])})}function i(e){function n(n,i){n=t(n,i),e.point(n[0],n[1])}function i(){b=NaN,k.point=o,e.lineStart()}function o(n,i){var o=ue([n,i]),s=t(n,i);r(b,_,y,x,w,C,b=s[0],_=s[1],y=n,x=o[0],w=o[1],C=o[2],a,e),e.point(b,_)}function s(){k.point=n,e.lineEnd()}function l(){i(),k.point=u,k.lineEnd=c}function u(t,e){o(h=t,d=e),f=b,p=_,g=x,m=w,v=C,k.point=o}function c(){r(b,_,y,x,w,C,f,p,h,g,m,v,a,e),k.lineEnd=s,s()}var h,d,f,p,g,m,v,y,b,_,x,w,C,k={point:n,lineStart:i,lineEnd:s,polygonStart:function(){e.polygonStart(),k.lineStart=l},polygonEnd:function(){e.polygonEnd(),k.lineStart=i}};return k}function r(e,n,i,a,l,u,c,h,d,f,p,g,m,v){var y=c-e,b=h-n,_=y*y+b*b;if(_>4*o&&m--){var x=a+f,w=l+p,C=u+g,k=Math.sqrt(x*x+w*w+C*C),T=Math.asin(C/=k),D=as(as(C)-1)<Ss||as(i-d)<Ss?(i+d)/2:Math.atan2(w,x),M=t(D,T),S=M[0],E=M[1],N=S-e,A=E-n,j=b*N-y*A;(j*j/_>o||as((y*N+b*A)/_-.5)>.3||s>a*f+l*p+u*g)&&(r(e,n,i,a,l,u,S,E,D,x/=k,w/=k,C,m,v),v.point(S,E),r(S,E,D,x,w,C,c,h,d,f,p,g,m,v))}}var o=.5,s=Math.cos(30*Ns),a=16;return e.precision=function(t){return arguments.length?(a=(o=t*t)>0&&16,e):Math.sqrt(o)},e}function Ke(t){var e=Qe(function(e,n){return t([e*As,n*As])});return function(t){return en(e(t))}}function Ge(t){this.stream=t}function Ze(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function Je(t){return tn(function(){return t})()}function tn(t){function e(t){return t=a(t[0]*Ns,t[1]*Ns),[t[0]*d+l,u-t[1]*d]}function n(t){return t=a.invert((t[0]-l)/d,(u-t[1])/d),t&&[t[0]*As,t[1]*As]}function i(){a=Fe(s=on(v,y,b),o);var t=o(g,m);return l=f-t[0]*d,u=p+t[1]*d,r()}function r(){return c&&(c.valid=!1,c=null),e}var o,s,a,l,u,c,h=Qe(function(t,e){return t=o(t,e),[t[0]*d+l,u-t[1]*d]}),d=150,f=480,p=250,g=0,m=0,v=0,y=0,b=0,_=Ma,x=wt,w=null,C=null;return e.stream=function(t){return c&&(c.valid=!1),c=en(_(s,h(x(t)))),c.valid=!0,c},e.clipAngle=function(t){return arguments.length?(_=null==t?(w=t,Ma):$e((w=+t)*Ns),r()):w},e.clipExtent=function(t){return arguments.length?(C=t,x=t?He(t[0][0],t[0][1],t[1][0],t[1][1]):wt,r()):C},e.scale=function(t){return arguments.length?(d=+t,i()):d},e.translate=function(t){return arguments.length?(f=+t[0],p=+t[1],i()):[f,p]},e.center=function(t){return arguments.length?(g=t[0]%360*Ns,m=t[1]%360*Ns,i()):[g*As,m*As]},e.rotate=function(t){return arguments.length?(v=t[0]%360*Ns,y=t[1]%360*Ns,b=t.length>2?t[2]%360*Ns:0,i()):[v*As,y*As,b*As]},Xo.rebind(e,h,"precision"),function(){return o=t.apply(this,arguments),e.invert=o.invert&&n,i()}}function en(t){return Ze(t,function(e,n){t.point(e*Ns,n*Ns)})}function nn(t,e){return[t,e]}function rn(t,e){return[t>Ts?t-Ds:-Ts>t?t+Ds:t,e]}function on(t,e,n){return t?e||n?Fe(an(t),ln(e,n)):an(t):e||n?ln(e,n):rn}function sn(t){return function(e,n){return e+=t,[e>Ts?e-Ds:-Ts>e?e+Ds:e,n]}}function an(t){var e=sn(t);return e.invert=sn(-t),e}function ln(t,e){function n(t,e){var n=Math.cos(e),a=Math.cos(t)*n,l=Math.sin(t)*n,u=Math.sin(e),c=u*i+a*r;return[Math.atan2(l*o-c*s,a*i-u*r),Y(c*o+l*s)]}var i=Math.cos(t),r=Math.sin(t),o=Math.cos(e),s=Math.sin(e);return n.invert=function(t,e){var n=Math.cos(e),a=Math.cos(t)*n,l=Math.sin(t)*n,u=Math.sin(e),c=u*o-l*s;return[Math.atan2(l*o+u*s,a*i+c*r),Y(c*i-a*r)]},n}function un(t,e){var n=Math.cos(t),i=Math.sin(t);return function(r,o,s,a){var l=s*e;null!=r?(r=cn(n,r),o=cn(n,o),(s>0?o>r:r>o)&&(r+=s*Ds)):(r=t+s*Ds,o=t-.5*l);for(var u,c=r;s>0?c>o:o>c;c-=l)a.point((u=ge([n,-i*Math.cos(c),-i*Math.sin(c)]))[0],u[1])}}function cn(t,e){var n=ue(e);n[0]-=t,pe(n);var i=U(-n[1]);return((-n[2]<0?-i:i)+2*Math.PI-Ss)%(2*Math.PI)}function hn(t,e,n){var i=Xo.range(t,e-Ss,n).concat(e);return function(t){return i.map(function(e){return[t,e]})}}function dn(t,e,n){var i=Xo.range(t,e-Ss,n).concat(e);return function(t){return i.map(function(e){return[e,t]})}}function fn(t){return t.source}function pn(t){return t.target}function gn(t,e,n,i){var r=Math.cos(e),o=Math.sin(e),s=Math.cos(i),a=Math.sin(i),l=r*Math.cos(t),u=r*Math.sin(t),c=s*Math.cos(n),h=s*Math.sin(n),d=2*Math.asin(Math.sqrt(K(i-e)+r*s*K(n-t))),f=1/Math.sin(d),p=d?function(t){var e=Math.sin(t*=d)*f,n=Math.sin(d-t)*f,i=n*l+e*c,r=n*u+e*h,s=n*o+e*a;return[Math.atan2(r,i)*As,Math.atan2(s,Math.sqrt(i*i+r*r))*As]}:function(){return[t*As,e*As]};return p.distance=d,p}function mn(){function t(t,r){var o=Math.sin(r*=Ns),s=Math.cos(r),a=as((t*=Ns)-e),l=Math.cos(a);La+=Math.atan2(Math.sqrt((a=s*Math.sin(a))*a+(a=i*o-n*s*l)*a),n*o+i*s*l),e=t,n=o,i=s}var e,n,i;za.point=function(r,o){e=r*Ns,n=Math.sin(o*=Ns),i=Math.cos(o),za.point=t},za.lineEnd=function(){za.point=za.lineEnd=f}}function vn(t,e){function n(e,n){var i=Math.cos(e),r=Math.cos(n),o=t(i*r);return[o*r*Math.sin(e),o*Math.sin(n)]}return n.invert=function(t,n){var i=Math.sqrt(t*t+n*n),r=e(i),o=Math.sin(r),s=Math.cos(r);return[Math.atan2(t*o,i*s),Math.asin(i&&n*o/i)]},n}function yn(t,e){function n(t,e){var n=as(as(e)-Ms)<Ss?0:s/Math.pow(r(e),o);return[n*Math.sin(o*t),s-n*Math.cos(o*t)]}var i=Math.cos(t),r=function(t){return Math.tan(Ts/4+t/2)},o=t===e?Math.sin(t):Math.log(i/Math.cos(e))/Math.log(r(e)/r(t)),s=i*Math.pow(r(t),o)/o;return o?(n.invert=function(t,e){var n=s-e,i=W(o)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/o,2*Math.atan(Math.pow(s/i,1/o))-Ms]},n):_n}function bn(t,e){function n(t,e){var n=o-e;return[n*Math.sin(r*t),o-n*Math.cos(r*t)]}var i=Math.cos(t),r=t===e?Math.sin(t):(i-Math.cos(e))/(e-t),o=i/r+t;return as(r)<Ss?nn:(n.invert=function(t,e){var n=o-e;return[Math.atan2(t,n)/r,o-W(r)*Math.sqrt(t*t+n*n)]},n)}function _n(t,e){return[t,Math.log(Math.tan(Ts/4+e/2))]}function xn(t){var e,n=Je(t),i=n.scale,r=n.translate,o=n.clipExtent;return n.scale=function(){var t=i.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.translate=function(){var t=r.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.clipExtent=function(t){var s=o.apply(n,arguments);if(s===n){if(e=null==t){var a=Ts*i(),l=r();o([[l[0]-a,l[1]-a],[l[0]+a,l[1]+a]])}}else e&&(s=null);return s},n.clipExtent(null)}function wn(t,e){return[Math.log(Math.tan(Ts/4+e/2)),-t]}function Cn(t){return t[0]}function kn(t){return t[1]}function Tn(t){for(var e=t.length,n=[0,1],i=2,r=2;e>r;r++){for(;i>1&&B(t[n[i-2]],t[n[i-1]],t[r])<=0;)--i;n[i++]=r}return n.slice(0,i)}function Dn(t,e){return t[0]-e[0]||t[1]-e[1]}function Mn(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function Sn(t,e,n,i){var r=t[0],o=n[0],s=e[0]-r,a=i[0]-o,l=t[1],u=n[1],c=e[1]-l,h=i[1]-u,d=(a*(l-u)-h*(r-o))/(h*s-a*c);return[r+d*s,l+d*c]}function En(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}function Nn(){Gn(this),this.edge=this.site=this.circle=null}function An(t){var e=Ga.pop()||new Nn;return e.site=t,e}function jn(t){qn(t),Va.remove(t),Ga.push(t),Gn(t)}function In(t){var e=t.circle,n=e.x,i=e.cy,r={x:n,y:i},o=t.P,s=t.N,a=[t];jn(t);for(var l=o;l.circle&&as(n-l.circle.x)<Ss&&as(i-l.circle.cy)<Ss;)o=l.P,a.unshift(l),jn(l),l=o;a.unshift(l),qn(l);for(var u=s;u.circle&&as(n-u.circle.x)<Ss&&as(i-u.circle.cy)<Ss;)s=u.N,a.push(u),jn(u),u=s;a.push(u),qn(u);var c,h=a.length;for(c=1;h>c;++c)u=a[c],l=a[c-1],Vn(u.edge,l.site,u.site,r);l=a[0],u=a[h-1],u.edge=Yn(l.site,u.site,null,r),Rn(l),Rn(u)}function $n(t){for(var e,n,i,r,o=t.x,s=t.y,a=Va._;a;)if(i=Pn(a,s)-o,i>Ss)a=a.L;else{if(r=o-Hn(a,s),!(r>Ss)){i>-Ss?(e=a.P,n=a):r>-Ss?(e=a,n=a.N):e=n=a;break}if(!a.R){e=a;break}a=a.R}var l=An(t);if(Va.insert(e,l),e||n){if(e===n)return qn(e),n=An(e.site),Va.insert(l,n),l.edge=n.edge=Yn(e.site,l.site),Rn(e),void Rn(n);if(!n)return void(l.edge=Yn(e.site,l.site));qn(e),qn(n);var u=e.site,c=u.x,h=u.y,d=t.x-c,f=t.y-h,p=n.site,g=p.x-c,m=p.y-h,v=2*(d*m-f*g),y=d*d+f*f,b=g*g+m*m,_={x:(m*y-f*b)/v+c,y:(d*b-g*y)/v+h};Vn(n.edge,u,p,_),l.edge=Yn(u,t,null,_),n.edge=Yn(t,p,null,_),Rn(e),Rn(n)}}function Pn(t,e){var n=t.site,i=n.x,r=n.y,o=r-e;if(!o)return i;var s=t.P;if(!s)return-(1/0);n=s.site;var a=n.x,l=n.y,u=l-e;if(!u)return a;var c=a-i,h=1/o-1/u,d=c/u;return h?(-d+Math.sqrt(d*d-2*h*(c*c/(-2*u)-l+u/2+r-o/2)))/h+i:(i+a)/2}function Hn(t,e){var n=t.N;if(n)return Pn(n,e);var i=t.site;return i.y===e?i.x:1/0}function Fn(t){this.site=t,this.edges=[]}function Ln(t){for(var e,n,i,r,o,s,a,l,u,c,h=t[0][0],d=t[1][0],f=t[0][1],p=t[1][1],g=Xa,m=g.length;m--;)if(o=g[m],o&&o.prepare())for(a=o.edges,l=a.length,s=0;l>s;)c=a[s].end(),i=c.x,r=c.y,u=a[++s%l].start(),e=u.x,n=u.y,(as(i-e)>Ss||as(r-n)>Ss)&&(a.splice(s,0,new Qn(Xn(o.site,c,as(i-h)<Ss&&p-r>Ss?{x:h,y:as(e-h)<Ss?n:p}:as(r-p)<Ss&&d-i>Ss?{x:as(n-p)<Ss?e:d,y:p}:as(i-d)<Ss&&r-f>Ss?{x:d,y:as(e-d)<Ss?n:f}:as(r-f)<Ss&&i-h>Ss?{x:as(n-f)<Ss?e:h,y:f}:null),o.site,null)),++l)}function zn(t,e){return e.angle-t.angle}function On(){Gn(this),this.x=this.y=this.arc=this.site=this.cy=null}function Rn(t){var e=t.P,n=t.N;if(e&&n){var i=e.site,r=t.site,o=n.site;if(i!==o){var s=r.x,a=r.y,l=i.x-s,u=i.y-a,c=o.x-s,h=o.y-a,d=2*(l*h-u*c);if(!(d>=-Es)){var f=l*l+u*u,p=c*c+h*h,g=(h*f-u*p)/d,m=(l*p-c*f)/d,h=m+a,v=Za.pop()||new On;v.arc=t,v.site=r,v.x=g+s,v.y=h+Math.sqrt(g*g+m*m),v.cy=h,t.circle=v;for(var y=null,b=Ka._;b;)if(v.y<b.y||v.y===b.y&&v.x<=b.x){if(!b.L){y=b.P;break}b=b.L}else{if(!b.R){y=b;break}b=b.R}Ka.insert(y,v),y||(Qa=v)}}}}function qn(t){var e=t.circle;e&&(e.P||(Qa=e.N),Ka.remove(e),Za.push(e),Gn(e),t.circle=null)}function Wn(t){for(var e,n=Ya,i=Pe(t[0][0],t[0][1],t[1][0],t[1][1]),r=n.length;r--;)e=n[r],(!Bn(e,t)||!i(e)||as(e.a.x-e.b.x)<Ss&&as(e.a.y-e.b.y)<Ss)&&(e.a=e.b=null,n.splice(r,1))}function Bn(t,e){var n=t.b;if(n)return!0;var i,r,o=t.a,s=e[0][0],a=e[1][0],l=e[0][1],u=e[1][1],c=t.l,h=t.r,d=c.x,f=c.y,p=h.x,g=h.y,m=(d+p)/2,v=(f+g)/2;if(g===f){if(s>m||m>=a)return;if(d>p){if(o){if(o.y>=u)return}else o={x:m,y:l};n={x:m,y:u}}else{if(o){if(o.y<l)return}else o={x:m,y:u};n={x:m,y:l}}}else if(i=(d-p)/(g-f),r=v-i*m,-1>i||i>1)if(d>p){if(o){if(o.y>=u)return}else o={x:(l-r)/i,y:l};n={x:(u-r)/i,y:u}}else{if(o){if(o.y<l)return}else o={x:(u-r)/i,y:u};n={x:(l-r)/i,y:l}}else if(g>f){if(o){if(o.x>=a)return}else o={x:s,y:i*s+r};n={x:a,y:i*a+r}}else{if(o){if(o.x<s)return}else o={x:a,y:i*a+r};n={x:s,y:i*s+r}}return t.a=o,t.b=n,!0}function Un(t,e){this.l=t,this.r=e,this.a=this.b=null}function Yn(t,e,n,i){var r=new Un(t,e);return Ya.push(r),n&&Vn(r,t,e,n),i&&Vn(r,e,t,i),Xa[t.i].edges.push(new Qn(r,t,e)),Xa[e.i].edges.push(new Qn(r,e,t)),r}function Xn(t,e,n){var i=new Un(t,null);return i.a=e,i.b=n,Ya.push(i),i}function Vn(t,e,n,i){t.a||t.b?t.l===n?t.b=i:t.a=i:(t.a=i,t.l=e,t.r=n)}function Qn(t,e,n){var i=t.a,r=t.b;this.edge=t,this.site=e,this.angle=n?Math.atan2(n.y-e.y,n.x-e.x):t.l===e?Math.atan2(r.x-i.x,i.y-r.y):Math.atan2(i.x-r.x,r.y-i.y)}function Kn(){this._=null}function Gn(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Zn(t,e){var n=e,i=e.R,r=n.U;r?r.L===n?r.L=i:r.R=i:t._=i,i.U=r,n.U=i,n.R=i.L,n.R&&(n.R.U=n),i.L=n}function Jn(t,e){var n=e,i=e.L,r=n.U;r?r.L===n?r.L=i:r.R=i:t._=i,i.U=r,n.U=i,n.L=i.R,n.L&&(n.L.U=n),i.R=n}function ti(t){for(;t.L;)t=t.L;return t}function ei(t,e){var n,i,r,o=t.sort(ni).pop();for(Ya=[],Xa=new Array(t.length),Va=new Kn,Ka=new Kn;;)if(r=Qa,o&&(!r||o.y<r.y||o.y===r.y&&o.x<r.x))(o.x!==n||o.y!==i)&&(Xa[o.i]=new Fn(o),$n(o),n=o.x,i=o.y),o=t.pop();else{if(!r)break;In(r.arc)}e&&(Wn(e),Ln(e));var s={cells:Xa,edges:Ya};return Va=Ka=Ya=Xa=null,s}function ni(t,e){return e.y-t.y||e.x-t.x}function ii(t,e,n){return(t.x-n.x)*(e.y-t.y)-(t.x-e.x)*(n.y-t.y)}function ri(t){return t.x}function oi(t){return t.y}function si(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function ai(t,e,n,i,r,o){if(!t(e,n,i,r,o)){var s=.5*(n+r),a=.5*(i+o),l=e.nodes;l[0]&&ai(t,l[0],n,i,s,a),l[1]&&ai(t,l[1],s,i,r,a),l[2]&&ai(t,l[2],n,a,s,o),l[3]&&ai(t,l[3],s,a,r,o)}}function li(t,e){t=Xo.rgb(t),e=Xo.rgb(e);var n=t.r,i=t.g,r=t.b,o=e.r-n,s=e.g-i,a=e.b-r;return function(t){return"#"+gt(Math.round(n+o*t))+gt(Math.round(i+s*t))+gt(Math.round(r+a*t))}}function ui(t,e){var n,i={},r={};for(n in t)n in e?i[n]=di(t[n],e[n]):r[n]=t[n];for(n in e)n in t||(r[n]=e[n]);return function(t){for(n in i)r[n]=i[n](t);return r}}function ci(t,e){return e-=t=+t,function(n){return t+e*n}}function hi(t,e){var n,i,r,o,s,a=0,l=0,u=[],c=[];for(t+="",e+="",tl.lastIndex=0,i=0;n=tl.exec(e);++i)n.index&&u.push(e.substring(a,l=n.index)),c.push({i:u.length,x:n[0]}),u.push(null),a=tl.lastIndex;for(a<e.length&&u.push(e.substring(a)),i=0,o=c.length;(n=tl.exec(t))&&o>i;++i)if(s=c[i],s.x==n[0]){if(s.i)if(null==u[s.i+1])for(u[s.i-1]+=s.x,u.splice(s.i,1),r=i+1;o>r;++r)c[r].i--;else for(u[s.i-1]+=s.x+u[s.i+1],u.splice(s.i,2),r=i+1;o>r;++r)c[r].i-=2;else if(null==u[s.i+1])u[s.i]=s.x;else for(u[s.i]=s.x+u[s.i+1],u.splice(s.i+1,1),r=i+1;o>r;++r)c[r].i--;c.splice(i,1),o--,i--}else s.x=ci(parseFloat(n[0]),parseFloat(s.x));for(;o>i;)s=c.pop(),null==u[s.i+1]?u[s.i]=s.x:(u[s.i]=s.x+u[s.i+1],u.splice(s.i+1,1)),o--;return 1===u.length?null==u[0]?(s=c[0].x,function(t){return s(t)+""}):function(){return e}:function(t){for(i=0;o>i;++i)u[(s=c[i]).i]=s.x(t);return u.join("")}}function di(t,e){for(var n,i=Xo.interpolators.length;--i>=0&&!(n=Xo.interpolators[i](t,e)););return n}function fi(t,e){var n,i=[],r=[],o=t.length,s=e.length,a=Math.min(t.length,e.length);for(n=0;a>n;++n)i.push(di(t[n],e[n]));for(;o>n;++n)r[n]=t[n];for(;s>n;++n)r[n]=e[n];return function(t){for(n=0;a>n;++n)r[n]=i[n](t);return r}}function pi(t){return function(e){return 0>=e?0:e>=1?1:t(e)}}function gi(t){return function(e){return 1-t(1-e)}}function mi(t){return function(e){return.5*(.5>e?t(2*e):2-t(2-2*e))}}function vi(t){return t*t}function yi(t){return t*t*t}function bi(t){if(0>=t)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(.5>t?n:3*(t-e)+n-.75)}function _i(t){return function(e){return Math.pow(e,t)}}function xi(t){return 1-Math.cos(t*Ms)}function wi(t){return Math.pow(2,10*(t-1))}function Ci(t){return 1-Math.sqrt(1-t*t)}function ki(t,e){var n;return arguments.length<2&&(e=.45),arguments.length?n=e/Ds*Math.asin(1/t):(t=1,n=e/4),function(i){return 1+t*Math.pow(2,-10*i)*Math.sin((i-n)*Ds/e)}}function Ti(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function Di(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Mi(t,e){t=Xo.hcl(t),e=Xo.hcl(e);var n=t.h,i=t.c,r=t.l,o=e.h-n,s=e.c-i,a=e.l-r;return isNaN(s)&&(s=0,i=isNaN(i)?e.c:i),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:-180>o&&(o+=360),function(t){return it(n+o*t,i+s*t,r+a*t)+""}}function Si(t,e){t=Xo.hsl(t),e=Xo.hsl(e);var n=t.h,i=t.s,r=t.l,o=e.h-n,s=e.s-i,a=e.l-r;return isNaN(s)&&(s=0,i=isNaN(i)?e.s:i),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:-180>o&&(o+=360),function(t){return tt(n+o*t,i+s*t,r+a*t)+""}}function Ei(t,e){t=Xo.lab(t),e=Xo.lab(e);var n=t.l,i=t.a,r=t.b,o=e.l-n,s=e.a-i,a=e.b-r;return function(t){return st(n+o*t,i+s*t,r+a*t)+""}}function Ni(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function Ai(t){var e=[t.a,t.b],n=[t.c,t.d],i=Ii(e),r=ji(e,n),o=Ii($i(n,e,-r))||0;e[0]*n[1]<n[0]*e[1]&&(e[0]*=-1,e[1]*=-1,i*=-1,r*=-1),this.rotate=(i?Math.atan2(e[1],e[0]):Math.atan2(-n[0],n[1]))*As,this.translate=[t.e,t.f],this.scale=[i,o],this.skew=o?Math.atan2(r,o)*As:0}function ji(t,e){return t[0]*e[0]+t[1]*e[1]}function Ii(t){var e=Math.sqrt(ji(t,t));return e&&(t[0]/=e,t[1]/=e),e}function $i(t,e,n){return t[0]+=n*e[0],t[1]+=n*e[1],t}function Pi(t,e){var n,i=[],r=[],o=Xo.transform(t),s=Xo.transform(e),a=o.translate,l=s.translate,u=o.rotate,c=s.rotate,h=o.skew,d=s.skew,f=o.scale,p=s.scale;return a[0]!=l[0]||a[1]!=l[1]?(i.push("translate(",null,",",null,")"),r.push({i:1,x:ci(a[0],l[0])},{i:3,x:ci(a[1],l[1])})):l[0]||l[1]?i.push("translate("+l+")"):i.push(""),u!=c?(u-c>180?c+=360:c-u>180&&(u+=360),r.push({i:i.push(i.pop()+"rotate(",null,")")-2,x:ci(u,c)})):c&&i.push(i.pop()+"rotate("+c+")"),h!=d?r.push({i:i.push(i.pop()+"skewX(",null,")")-2,x:ci(h,d)}):d&&i.push(i.pop()+"skewX("+d+")"),f[0]!=p[0]||f[1]!=p[1]?(n=i.push(i.pop()+"scale(",null,",",null,")"),r.push({i:n-4,x:ci(f[0],p[0])},{i:n-2,x:ci(f[1],p[1])})):(1!=p[0]||1!=p[1])&&i.push(i.pop()+"scale("+p+")"),n=r.length,function(t){for(var e,o=-1;++o<n;)i[(e=r[o]).i]=e.x(t);return i.join("")}}function Hi(t,e){return e=e-(t=+t)?1/(e-t):0,function(n){return(n-t)*e}}function Fi(t,e){return e=e-(t=+t)?1/(e-t):0,function(n){return Math.max(0,Math.min(1,(n-t)*e))}}function Li(t){for(var e=t.source,n=t.target,i=Oi(e,n),r=[e];e!==i;)e=e.parent,r.push(e);for(var o=r.length;n!==i;)r.splice(o,0,n),n=n.parent;return r}function zi(t){for(var e=[],n=t.parent;null!=n;)e.push(t),t=n,n=n.parent;return e.push(t),e}function Oi(t,e){if(t===e)return t;for(var n=zi(t),i=zi(e),r=n.pop(),o=i.pop(),s=null;r===o;)s=r,r=n.pop(),o=i.pop();return s}function Ri(t){t.fixed|=2}function qi(t){t.fixed&=-7}function Wi(t){t.fixed|=4,t.px=t.x,t.py=t.y}function Bi(t){t.fixed&=-5}function Ui(t,e,n){var i=0,r=0;if(t.charge=0,!t.leaf)for(var o,s=t.nodes,a=s.length,l=-1;++l<a;)o=s[l],null!=o&&(Ui(o,e,n),t.charge+=o.charge,i+=o.charge*o.cx,r+=o.charge*o.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var u=e*n[t.point.index];t.charge+=t.pointCharge=u,i+=u*t.point.x,r+=u*t.point.y}t.cx=i/t.charge,t.cy=r/t.charge}function Yi(t,e){return Xo.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=Ki,t}function Xi(t){return t.children}function Vi(t){return t.value}function Qi(t,e){return e.value-t.value}function Ki(t){return Xo.merge(t.map(function(t){return(t.children||[]).map(function(e){return{source:t,target:e}})}))}function Gi(t){return t.x}function Zi(t){return t.y}function Ji(t,e,n){t.y0=e,t.y=n}function tr(t){return Xo.range(t.length)}function er(t){for(var e=-1,n=t[0].length,i=[];++e<n;)i[e]=0;return i}function nr(t){for(var e,n=1,i=0,r=t[0][1],o=t.length;o>n;++n)(e=t[n][1])>r&&(i=n,r=e);return i}function ir(t){return t.reduce(rr,0)}function rr(t,e){return t+e[1]}function or(t,e){return sr(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function sr(t,e){for(var n=-1,i=+t[0],r=(t[1]-i)/e,o=[];++n<=e;)o[n]=r*n+i;return o}function ar(t){return[Xo.min(t),Xo.max(t)]}function lr(t,e){return t.parent==e.parent?1:2}function ur(t){var e=t.children;return e&&e.length?e[0]:t._tree.thread}function cr(t){var e,n=t.children;return n&&(e=n.length)?n[e-1]:t._tree.thread}function hr(t,e){var n=t.children;if(n&&(r=n.length))for(var i,r,o=-1;++o<r;)e(i=hr(n[o],e),t)>0&&(t=i);return t}function dr(t,e){return t.x-e.x}function fr(t,e){return e.x-t.x}function pr(t,e){return t.depth-e.depth}function gr(t,e){function n(t,i){var r=t.children;if(r&&(s=r.length))for(var o,s,a=null,l=-1;++l<s;)o=r[l],n(o,a),a=o;e(t,i)}n(t,null)}function mr(t){for(var e,n=0,i=0,r=t.children,o=r.length;--o>=0;)e=r[o]._tree,e.prelim+=n,e.mod+=n,n+=e.shift+(i+=e.change)}function vr(t,e,n){t=t._tree,e=e._tree;var i=n/(e.number-t.number);t.change+=i,e.change-=i,e.shift+=n,e.prelim+=n,e.mod+=n}function yr(t,e,n){return t._tree.ancestor.parent==e.parent?t._tree.ancestor:n}function br(t,e){return t.value-e.value}function _r(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function xr(t,e){t._pack_next=e,e._pack_prev=t}function wr(t,e){var n=e.x-t.x,i=e.y-t.y,r=t.r+e.r;return.999*r*r>n*n+i*i}function Cr(t){function e(t){c=Math.min(t.x-t.r,c),h=Math.max(t.x+t.r,h),d=Math.min(t.y-t.r,d),f=Math.max(t.y+t.r,f)}if((n=t.children)&&(u=n.length)){var n,i,r,o,s,a,l,u,c=1/0,h=-(1/0),d=1/0,f=-(1/0);if(n.forEach(kr),i=n[0],i.x=-i.r,i.y=0,e(i),u>1&&(r=n[1],r.x=r.r,r.y=0,e(r),u>2))for(o=n[2],Mr(i,r,o),e(o),_r(i,o),i._pack_prev=o,_r(o,r),r=i._pack_next,s=3;u>s;s++){Mr(i,r,o=n[s]);var p=0,g=1,m=1;for(a=r._pack_next;a!==r;a=a._pack_next,g++)if(wr(a,o)){p=1;break}if(1==p)for(l=i._pack_prev;l!==a._pack_prev&&!wr(l,o);l=l._pack_prev,m++);p?(m>g||g==m&&r.r<i.r?xr(i,r=a):xr(i=l,r),s--):(_r(i,o),r=o,e(o))}var v=(c+h)/2,y=(d+f)/2,b=0;for(s=0;u>s;s++)o=n[s],o.x-=v,o.y-=y,b=Math.max(b,o.r+Math.sqrt(o.x*o.x+o.y*o.y));t.r=b,n.forEach(Tr)}}function kr(t){t._pack_next=t._pack_prev=t}function Tr(t){delete t._pack_next,delete t._pack_prev}function Dr(t,e,n,i){var r=t.children;if(t.x=e+=i*t.x,t.y=n+=i*t.y,t.r*=i,r)for(var o=-1,s=r.length;++o<s;)Dr(r[o],e,n,i)}function Mr(t,e,n){var i=t.r+n.r,r=e.x-t.x,o=e.y-t.y;if(i&&(r||o)){var s=e.r+n.r,a=r*r+o*o;s*=s,i*=i;var l=.5+(i-s)/(2*a),u=Math.sqrt(Math.max(0,2*s*(i+a)-(i-=a)*i-s*s))/(2*a);n.x=t.x+l*r+u*o,n.y=t.y+l*o-u*r}else n.x=t.x+i,n.y=t.y}function Sr(t){return 1+Xo.max(t,function(t){return t.y})}function Er(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function Nr(t){var e=t.children;return e&&e.length?Nr(e[0]):t}function Ar(t){var e,n=t.children;return n&&(e=n.length)?Ar(n[e-1]):t}function jr(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Ir(t,e){var n=t.x+e[3],i=t.y+e[0],r=t.dx-e[1]-e[3],o=t.dy-e[0]-e[2];return 0>r&&(n+=r/2,r=0),0>o&&(i+=o/2,o=0),{x:n,y:i,dx:r,dy:o}}function $r(t){var e=t[0],n=t[t.length-1];return n>e?[e,n]:[n,e]}function Pr(t){return t.rangeExtent?t.rangeExtent():$r(t.range())}function Hr(t,e,n,i){var r=n(t[0],t[1]),o=i(e[0],e[1]);return function(t){return o(r(t))}}function Fr(t,e){var n,i=0,r=t.length-1,o=t[i],s=t[r];return o>s&&(n=i,i=r,r=n,n=o,o=s,s=n),t[i]=e.floor(o),t[r]=e.ceil(s),t}function Lr(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:hl}function zr(t,e,n,i){var r=[],o=[],s=0,a=Math.min(t.length,e.length)-1;for(t[a]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<=a;)r.push(n(t[s-1],t[s])),o.push(i(e[s-1],e[s]));return function(e){var n=Xo.bisect(t,e,1,a)-1;return o[n](r[n](e))}}function Or(t,e,n,i){function r(){var r=Math.min(t.length,e.length)>2?zr:Hr,l=i?Fi:Hi;return s=r(t,e,l,n),a=r(e,t,l,di),o}function o(t){return s(t)}var s,a;return o.invert=function(t){return a(t)},o.domain=function(e){return arguments.length?(t=e.map(Number),r()):t},o.range=function(t){return arguments.length?(e=t,r()):e},o.rangeRound=function(t){return o.range(t).interpolate(Ni)},o.clamp=function(t){return arguments.length?(i=t,r()):i},o.interpolate=function(t){return arguments.length?(n=t,r()):n},o.ticks=function(e){return Br(t,e)},o.tickFormat=function(e,n){return Ur(t,e,n)},o.nice=function(e){return qr(t,e),r()},o.copy=function(){return Or(t,e,n,i)},r()}function Rr(t,e){return Xo.rebind(t,e,"range","rangeRound","interpolate","clamp")}function qr(t,e){return Fr(t,Lr(Wr(t,e)[2]))}function Wr(t,e){null==e&&(e=10);var n=$r(t),i=n[1]-n[0],r=Math.pow(10,Math.floor(Math.log(i/e)/Math.LN10)),o=e/i*r;return.15>=o?r*=10:.35>=o?r*=5:.75>=o&&(r*=2),n[0]=Math.ceil(n[0]/r)*r,n[1]=Math.floor(n[1]/r)*r+.5*r,n[2]=r,n}function Br(t,e){return Xo.range.apply(Xo,Wr(t,e))}function Ur(t,e,n){var i=Wr(t,e);return Xo.format(n?n.replace(ta,function(t,e,n,r,o,s,a,l,u,c){return[e,n,r,o,s,a,l,u||"."+Xr(c,i),c].join("")}):",."+Yr(i[2])+"f")}function Yr(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function Xr(t,e){var n=Yr(e[2]);return t in dl?Math.abs(n-Yr(Math.max(Math.abs(e[0]),Math.abs(e[1]))))+ +("e"!==t):n-2*("%"===t)}function Vr(t,e,n,i){function r(t){return(n?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function o(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function s(e){return t(r(e))}return s.invert=function(e){return o(t.invert(e))},s.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((i=e.map(Number)).map(r)),s):i},s.base=function(n){return arguments.length?(e=+n,t.domain(i.map(r)),s):e},s.nice=function(){var e=Fr(i.map(r),n?Math:pl);return t.domain(e),i=e.map(o),s},s.ticks=function(){var t=$r(i),s=[],a=t[0],l=t[1],u=Math.floor(r(a)),c=Math.ceil(r(l)),h=e%1?2:e;if(isFinite(c-u)){if(n){for(;c>u;u++)for(var d=1;h>d;d++)s.push(o(u)*d);s.push(o(u))}else for(s.push(o(u));u++<c;)for(var d=h-1;d>0;d--)s.push(o(u)*d);for(u=0;s[u]<a;u++);for(c=s.length;s[c-1]>l;c--);s=s.slice(u,c)}return s},s.tickFormat=function(t,e){if(!arguments.length)return fl;arguments.length<2?e=fl:"function"!=typeof e&&(e=Xo.format(e));var i,a=Math.max(.1,t/s.ticks().length),l=n?(i=1e-12,Math.ceil):(i=-1e-12,Math.floor);return function(t){return t/o(l(r(t)+i))<=a?e(t):""}},s.copy=function(){return Vr(t.copy(),e,n,i)},Rr(s,t)}function Qr(t,e,n){function i(e){return t(r(e))}var r=Kr(e),o=Kr(1/e);return i.invert=function(e){return o(t.invert(e))},i.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(r)),i):n},i.ticks=function(t){return Br(n,t)},i.tickFormat=function(t,e){return Ur(n,t,e)},i.nice=function(t){return i.domain(qr(n,t))},i.exponent=function(s){return arguments.length?(r=Kr(e=s),o=Kr(1/e),t.domain(n.map(r)),i):e},i.copy=function(){return Qr(t.copy(),e,n)},Rr(i,t)}function Kr(t){return function(e){return 0>e?-Math.pow(-e,t):Math.pow(e,t)}}function Gr(t,e){function n(n){return s[((o.get(n)||"range"===e.t&&o.set(n,t.push(n)))-1)%s.length]}function i(e,n){return Xo.range(t.length).map(function(t){return e+n*t})}var o,s,a;return n.domain=function(i){if(!arguments.length)return t;t=[],o=new r;for(var s,a=-1,l=i.length;++a<l;)o.has(s=i[a])||o.set(s,t.push(s));return n[e.t].apply(n,e.a)},n.range=function(t){return arguments.length?(s=t,a=0,e={t:"range",a:arguments},n):s},n.rangePoints=function(r,o){arguments.length<2&&(o=0);var l=r[0],u=r[1],c=(u-l)/(Math.max(1,t.length-1)+o);return s=i(t.length<2?(l+u)/2:l+c*o/2,c),a=0,e={t:"rangePoints",a:arguments},n},n.rangeBands=function(r,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var u=r[1]<r[0],c=r[u-0],h=r[1-u],d=(h-c)/(t.length-o+2*l);return s=i(c+d*l,d),u&&s.reverse(),a=d*(1-o),e={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(r,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var u=r[1]<r[0],c=r[u-0],h=r[1-u],d=Math.floor((h-c)/(t.length-o+2*l)),f=h-c-(t.length-o)*d;return s=i(c+Math.round(f/2),d),u&&s.reverse(),a=Math.round(d*(1-o)),e={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return a},n.rangeExtent=function(){return $r(e.a[0])},n.copy=function(){return Gr(t,e)},n.domain(t)}function Zr(t,e){function n(){var n=0,o=e.length;for(r=[];++n<o;)r[n-1]=Xo.quantile(t,n/o);return i}function i(t){return isNaN(t=+t)?void 0:e[Xo.bisect(r,t)]}var r;return i.domain=function(e){return arguments.length?(t=e.filter(function(t){return!isNaN(t)}).sort(Xo.ascending),n()):t},i.range=function(t){return arguments.length?(e=t,n()):e},i.quantiles=function(){return r},i.invertExtent=function(n){return n=e.indexOf(n),0>n?[NaN,NaN]:[n>0?r[n-1]:t[0],n<r.length?r[n]:t[t.length-1]]},i.copy=function(){return Zr(t,e)},n()}function Jr(t,e,n){function i(e){return n[Math.max(0,Math.min(s,Math.floor(o*(e-t))))]}function r(){return o=n.length/(e-t),s=n.length-1,i}var o,s;return i.domain=function(n){return arguments.length?(t=+n[0],e=+n[n.length-1],r()):[t,e]},i.range=function(t){return arguments.length?(n=t,r()):n},i.invertExtent=function(e){return e=n.indexOf(e),e=0>e?NaN:e/o+t,[e,e+1/o]},i.copy=function(){return Jr(t,e,n)},r()}function to(t,e){function n(n){return n>=n?e[Xo.bisect(t,n)]:void 0}return n.domain=function(e){return arguments.length?(t=e,n):t},n.range=function(t){return arguments.length?(e=t,n):e},n.invertExtent=function(n){return n=e.indexOf(n),[t[n-1],t[n]]},n.copy=function(){return to(t,e)},n}function eo(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=n.map(e),e):t},e.ticks=function(e){return Br(t,e)},e.tickFormat=function(e,n){return Ur(t,e,n)},e.copy=function(){return eo(t)},e}function no(t){return t.innerRadius}function io(t){return t.outerRadius}function ro(t){return t.startAngle}function oo(t){return t.endAngle}function so(t){function e(e){function s(){u.push("M",o(t(c),a))}for(var l,u=[],c=[],h=-1,d=e.length,f=xt(n),p=xt(i);++h<d;)r.call(this,l=e[h],h)?c.push([+f.call(this,l,h),+p.call(this,l,h)]):c.length&&(s(),c=[]);return c.length&&s(),u.length?u.join(""):null}var n=Cn,i=kn,r=we,o=ao,s=o.key,a=.7;return e.x=function(t){return arguments.length?(n=t,e):n},e.y=function(t){return arguments.length?(i=t,e):i},e.defined=function(t){return arguments.length?(r=t,e):r},e.interpolate=function(t){return arguments.length?(s="function"==typeof t?o=t:(o=xl.get(t)||ao).key,e):s},e.tension=function(t){return arguments.length?(a=t,e):a},e}function ao(t){return t.join("L")}function lo(t){return ao(t)+"Z"}function uo(t){for(var e=0,n=t.length,i=t[0],r=[i[0],",",i[1]];++e<n;)r.push("H",(i[0]+(i=t[e])[0])/2,"V",i[1]);return n>1&&r.push("H",i[0]),r.join("")}function co(t){for(var e=0,n=t.length,i=t[0],r=[i[0],",",i[1]];++e<n;)r.push("V",(i=t[e])[1],"H",i[0]);return r.join("")}function ho(t){for(var e=0,n=t.length,i=t[0],r=[i[0],",",i[1]];++e<n;)r.push("H",(i=t[e])[0],"V",i[1]);return r.join("")}function fo(t,e){return t.length<4?ao(t):t[1]+mo(t.slice(1,t.length-1),vo(t,e))}function po(t,e){return t.length<3?ao(t):t[0]+mo((t.push(t[0]),t),vo([t[t.length-2]].concat(t,[t[1]]),e))}function go(t,e){return t.length<3?ao(t):t[0]+mo(t,vo(t,e))}function mo(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return ao(t);var n=t.length!=e.length,i="",r=t[0],o=t[1],s=e[0],a=s,l=1;if(n&&(i+="Q"+(o[0]-2*s[0]/3)+","+(o[1]-2*s[1]/3)+","+o[0]+","+o[1],r=t[1],l=2),e.length>1){a=e[1],o=t[l],l++,i+="C"+(r[0]+s[0])+","+(r[1]+s[1])+","+(o[0]-a[0])+","+(o[1]-a[1])+","+o[0]+","+o[1];for(var u=2;u<e.length;u++,l++)o=t[l],a=e[u],i+="S"+(o[0]-a[0])+","+(o[1]-a[1])+","+o[0]+","+o[1]}if(n){var c=t[l];i+="Q"+(o[0]+2*a[0]/3)+","+(o[1]+2*a[1]/3)+","+c[0]+","+c[1]}return i}function vo(t,e){for(var n,i=[],r=(1-e)/2,o=t[0],s=t[1],a=1,l=t.length;++a<l;)n=o,o=s,s=t[a],i.push([r*(s[0]-n[0]),r*(s[1]-n[1])]);return i}function yo(t){if(t.length<3)return ao(t);var e=1,n=t.length,i=t[0],r=i[0],o=i[1],s=[r,r,r,(i=t[1])[0]],a=[o,o,o,i[1]],l=[r,",",o,"L",wo(kl,s),",",wo(kl,a)];for(t.push(t[n-1]);++e<=n;)i=t[e],s.shift(),s.push(i[0]),a.shift(),a.push(i[1]),Co(l,s,a);return t.pop(),l.push("L",i),l.join("")}function bo(t){if(t.length<4)return ao(t);for(var e,n=[],i=-1,r=t.length,o=[0],s=[0];++i<3;)e=t[i],o.push(e[0]),s.push(e[1]);for(n.push(wo(kl,o)+","+wo(kl,s)),--i;++i<r;)e=t[i],o.shift(),o.push(e[0]),s.shift(),s.push(e[1]),Co(n,o,s);return n.join("")}function _o(t){for(var e,n,i=-1,r=t.length,o=r+4,s=[],a=[];++i<4;)n=t[i%r],s.push(n[0]),a.push(n[1]);for(e=[wo(kl,s),",",wo(kl,a)],--i;++i<o;)n=t[i%r],s.shift(),s.push(n[0]),a.shift(),a.push(n[1]),Co(e,s,a);return e.join("")}function xo(t,e){var n=t.length-1;if(n)for(var i,r,o=t[0][0],s=t[0][1],a=t[n][0]-o,l=t[n][1]-s,u=-1;++u<=n;)i=t[u],r=u/n,i[0]=e*i[0]+(1-e)*(o+r*a),i[1]=e*i[1]+(1-e)*(s+r*l);return yo(t)}function wo(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function Co(t,e,n){t.push("C",wo(wl,e),",",wo(wl,n),",",wo(Cl,e),",",wo(Cl,n),",",wo(kl,e),",",wo(kl,n))}function ko(t,e){return(e[1]-t[1])/(e[0]-t[0])}function To(t){for(var e=0,n=t.length-1,i=[],r=t[0],o=t[1],s=i[0]=ko(r,o);++e<n;)i[e]=(s+(s=ko(r=o,o=t[e+1])))/2;return i[e]=s,i}function Do(t){for(var e,n,i,r,o=[],s=To(t),a=-1,l=t.length-1;++a<l;)e=ko(t[a],t[a+1]),as(e)<Ss?s[a]=s[a+1]=0:(n=s[a]/e,i=s[a+1]/e,r=n*n+i*i,r>9&&(r=3*e/Math.sqrt(r),s[a]=r*n,s[a+1]=r*i));for(a=-1;++a<=l;)r=(t[Math.min(l,a+1)][0]-t[Math.max(0,a-1)][0])/(6*(1+s[a]*s[a])),o.push([r||0,s[a]*r||0]);return o}function Mo(t){
return t.length<3?ao(t):t[0]+mo(t,Do(t))}function So(t){for(var e,n,i,r=-1,o=t.length;++r<o;)e=t[r],n=e[0],i=e[1]+bl,e[0]=n*Math.cos(i),e[1]=n*Math.sin(i);return t}function Eo(t){function e(e){function l(){g.push("M",a(t(v),h),c,u(t(m.reverse()),h),"Z")}for(var d,f,p,g=[],m=[],v=[],y=-1,b=e.length,_=xt(n),x=xt(r),w=n===i?function(){return f}:xt(i),C=r===o?function(){return p}:xt(o);++y<b;)s.call(this,d=e[y],y)?(m.push([f=+_.call(this,d,y),p=+x.call(this,d,y)]),v.push([+w.call(this,d,y),+C.call(this,d,y)])):m.length&&(l(),m=[],v=[]);return m.length&&l(),g.length?g.join(""):null}var n=Cn,i=Cn,r=0,o=kn,s=we,a=ao,l=a.key,u=a,c="L",h=.7;return e.x=function(t){return arguments.length?(n=i=t,e):i},e.x0=function(t){return arguments.length?(n=t,e):n},e.x1=function(t){return arguments.length?(i=t,e):i},e.y=function(t){return arguments.length?(r=o=t,e):o},e.y0=function(t){return arguments.length?(r=t,e):r},e.y1=function(t){return arguments.length?(o=t,e):o},e.defined=function(t){return arguments.length?(s=t,e):s},e.interpolate=function(t){return arguments.length?(l="function"==typeof t?a=t:(a=xl.get(t)||ao).key,u=a.reverse||a,c=a.closed?"M":"L",e):l},e.tension=function(t){return arguments.length?(h=t,e):h},e}function No(t){return t.radius}function Ao(t){return[t.x,t.y]}function jo(t){return function(){var e=t.apply(this,arguments),n=e[0],i=e[1]+bl;return[n*Math.cos(i),n*Math.sin(i)]}}function Io(){return 64}function $o(){return"circle"}function Po(t){var e=Math.sqrt(t/Ts);return"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+-e+"A"+e+","+e+" 0 1,1 0,"+e+"Z"}function Ho(t,e){return ds(t,Nl),t.id=e,t}function Fo(t,e,n,i){var r=t.id;return $(t,"function"==typeof n?function(t,o,s){t.__transition__[r].tween.set(e,i(n.call(t,t.__data__,o,s)))}:(n=i(n),function(t){t.__transition__[r].tween.set(e,n)}))}function Lo(t){return null==t&&(t=""),function(){this.textContent=t}}function zo(t,e,n,i){var o=t.__transition__||(t.__transition__={active:0,count:0}),s=o[n];if(!s){var a=i.time;s=o[n]={tween:new r,time:a,ease:i.ease,delay:i.delay,duration:i.duration},++o.count,Xo.timer(function(i){function r(i){return o.active>n?u():(o.active=n,s.event&&s.event.start.call(t,c,e),s.tween.forEach(function(n,i){(i=i.call(t,c,e))&&g.push(i)}),void Xo.timer(function(){return p.c=l(i||1)?we:l,1},0,a))}function l(i){if(o.active!==n)return u();for(var r=i/f,a=h(r),l=g.length;l>0;)g[--l].call(t,a);return r>=1?(s.event&&s.event.end.call(t,c,e),u()):void 0}function u(){return--o.count?delete o[n]:delete t.__transition__,1}var c=t.__data__,h=s.ease,d=s.delay,f=s.duration,p=Gs,g=[];return p.t=d+a,i>=d?r(i-d):void(p.c=r)},0,a)}}function Oo(t,e){t.attr("transform",function(t){return"translate("+e(t)+",0)"})}function Ro(t,e){t.attr("transform",function(t){return"translate(0,"+e(t)+")"})}function qo(t){return t.toISOString()}function Wo(t,e,n){function i(e){return t(e)}function r(t,n){var i=t[1]-t[0],r=i/n,o=Xo.bisect(zl,r);return o==zl.length?[e.year,Wr(t.map(function(t){return t/31536e6}),n)[2]]:o?e[r/zl[o-1]<zl[o]/r?o-1:o]:[ql,Wr(t,n)[2]]}return i.invert=function(e){return Bo(t.invert(e))},i.domain=function(e){return arguments.length?(t.domain(e),i):t.domain().map(Bo)},i.nice=function(t,e){function n(n){return!isNaN(n)&&!t.range(n,Bo(+n+1),e).length}var o=i.domain(),s=$r(o),a=null==t?r(s,10):"number"==typeof t&&r(s,t);return a&&(t=a[0],e=a[1]),i.domain(Fr(o,e>1?{floor:function(e){for(;n(e=t.floor(e));)e=Bo(e-1);return e},ceil:function(e){for(;n(e=t.ceil(e));)e=Bo(+e+1);return e}}:t))},i.ticks=function(t,e){var n=$r(i.domain()),o=null==t?r(n,10):"number"==typeof t?r(n,t):!t.range&&[{range:t},e];return o&&(t=o[0],e=o[1]),t.range(n[0],Bo(+n[1]+1),1>e?1:e)},i.tickFormat=function(){return n},i.copy=function(){return Wo(t.copy(),e,n)},Rr(i,t)}function Bo(t){return new Date(t)}function Uo(t){return JSON.parse(t.responseText)}function Yo(t){var e=Ko.createRange();return e.selectNode(Ko.body),e.createContextualFragment(t.responseText)}var Xo={version:"3.4.2"};Date.now||(Date.now=function(){return+new Date});var Vo=[].slice,Qo=function(t){return Vo.call(t)},Ko=document,Go=Ko.documentElement,Zo=window;try{Qo(Go.childNodes)[0].nodeType}catch(Jo){Qo=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}try{Ko.createElement("div").style.setProperty("opacity",0,"")}catch(ts){var es=Zo.Element.prototype,ns=es.setAttribute,is=es.setAttributeNS,rs=Zo.CSSStyleDeclaration.prototype,os=rs.setProperty;es.setAttribute=function(t,e){ns.call(this,t,e+"")},es.setAttributeNS=function(t,e,n){is.call(this,t,e,n+"")},rs.setProperty=function(t,e,n){os.call(this,t,e+"",n)}}Xo.ascending=function(t,e){return e>t?-1:t>e?1:t>=e?0:NaN},Xo.descending=function(t,e){return t>e?-1:e>t?1:e>=t?0:NaN},Xo.min=function(t,e){var n,i,r=-1,o=t.length;if(1===arguments.length){for(;++r<o&&!(null!=(n=t[r])&&n>=n);)n=void 0;for(;++r<o;)null!=(i=t[r])&&n>i&&(n=i)}else{for(;++r<o&&!(null!=(n=e.call(t,t[r],r))&&n>=n);)n=void 0;for(;++r<o;)null!=(i=e.call(t,t[r],r))&&n>i&&(n=i)}return n},Xo.max=function(t,e){var n,i,r=-1,o=t.length;if(1===arguments.length){for(;++r<o&&!(null!=(n=t[r])&&n>=n);)n=void 0;for(;++r<o;)null!=(i=t[r])&&i>n&&(n=i)}else{for(;++r<o&&!(null!=(n=e.call(t,t[r],r))&&n>=n);)n=void 0;for(;++r<o;)null!=(i=e.call(t,t[r],r))&&i>n&&(n=i)}return n},Xo.extent=function(t,e){var n,i,r,o=-1,s=t.length;if(1===arguments.length){for(;++o<s&&!(null!=(n=r=t[o])&&n>=n);)n=r=void 0;for(;++o<s;)null!=(i=t[o])&&(n>i&&(n=i),i>r&&(r=i))}else{for(;++o<s&&!(null!=(n=r=e.call(t,t[o],o))&&n>=n);)n=void 0;for(;++o<s;)null!=(i=e.call(t,t[o],o))&&(n>i&&(n=i),i>r&&(r=i))}return[n,r]},Xo.sum=function(t,e){var n,i=0,r=t.length,o=-1;if(1===arguments.length)for(;++o<r;)isNaN(n=+t[o])||(i+=n);else for(;++o<r;)isNaN(n=+e.call(t,t[o],o))||(i+=n);return i},Xo.mean=function(e,n){var i,r=e.length,o=0,s=-1,a=0;if(1===arguments.length)for(;++s<r;)t(i=e[s])&&(o+=(i-o)/++a);else for(;++s<r;)t(i=n.call(e,e[s],s))&&(o+=(i-o)/++a);return a?o:void 0},Xo.quantile=function(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r},Xo.median=function(e,n){return arguments.length>1&&(e=e.map(n)),e=e.filter(t),e.length?Xo.quantile(e.sort(Xo.ascending),.5):void 0},Xo.bisector=function(t){return{left:function(e,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=e.length);r>i;){var o=i+r>>>1;t.call(e,e[o],o)<n?i=o+1:r=o}return i},right:function(e,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=e.length);r>i;){var o=i+r>>>1;n<t.call(e,e[o],o)?r=o:i=o+1}return i}}};var ss=Xo.bisector(function(t){return t});Xo.bisectLeft=ss.left,Xo.bisect=Xo.bisectRight=ss.right,Xo.shuffle=function(t){for(var e,n,i=t.length;i;)n=Math.random()*i--|0,e=t[i],t[i]=t[n],t[n]=e;return t},Xo.permute=function(t,e){for(var n=e.length,i=new Array(n);n--;)i[n]=t[e[n]];return i},Xo.pairs=function(t){for(var e,n=0,i=t.length-1,r=t[0],o=new Array(0>i?0:i);i>n;)o[n]=[e=r,r=t[++n]];return o},Xo.zip=function(){if(!(r=arguments.length))return[];for(var t=-1,n=Xo.min(arguments,e),i=new Array(n);++t<n;)for(var r,o=-1,s=i[t]=new Array(r);++o<r;)s[o]=arguments[o][t];return i},Xo.transpose=function(t){return Xo.zip.apply(Xo,t)},Xo.keys=function(t){var e=[];for(var n in t)e.push(n);return e},Xo.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},Xo.entries=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},Xo.merge=function(t){for(var e,n,i,r=t.length,o=-1,s=0;++o<r;)s+=t[o].length;for(n=new Array(s);--r>=0;)for(i=t[r],e=i.length;--e>=0;)n[--s]=i[e];return n};var as=Math.abs;Xo.range=function(t,e,i){if(arguments.length<3&&(i=1,arguments.length<2&&(e=t,t=0)),(e-t)/i===1/0)throw new Error("infinite range");var r,o=[],s=n(as(i)),a=-1;if(t*=s,e*=s,i*=s,0>i)for(;(r=t+i*++a)>e;)o.push(r/s);else for(;(r=t+i*++a)<e;)o.push(r/s);return o},Xo.map=function(t){var e=new r;if(t instanceof r)t.forEach(function(t,n){e.set(t,n)});else for(var n in t)e.set(n,t[n]);return e},i(r,{has:o,get:function(t){return this[ls+t]},set:function(t,e){return this[ls+t]=e},remove:s,keys:a,values:function(){var t=[];return this.forEach(function(e,n){t.push(n)}),t},entries:function(){var t=[];return this.forEach(function(e,n){t.push({key:e,value:n})}),t},size:l,empty:u,forEach:function(t){for(var e in this)e.charCodeAt(0)===us&&t.call(this,e.substring(1),this[e])}});var ls="\x00",us=ls.charCodeAt(0);Xo.nest=function(){function t(e,a,l){if(l>=s.length)return i?i.call(o,a):n?a.sort(n):a;for(var u,c,h,d,f=-1,p=a.length,g=s[l++],m=new r;++f<p;)(d=m.get(u=g(c=a[f])))?d.push(c):m.set(u,[c]);return e?(c=e(),h=function(n,i){c.set(n,t(e,i,l))}):(c={},h=function(n,i){c[n]=t(e,i,l)}),m.forEach(h),c}function e(t,n){if(n>=s.length)return t;var i=[],r=a[n++];return t.forEach(function(t,r){i.push({key:t,values:e(r,n)})}),r?i.sort(function(t,e){return r(t.key,e.key)}):i}var n,i,o={},s=[],a=[];return o.map=function(e,n){return t(n,e,0)},o.entries=function(n){return e(t(Xo.map,n,0),0)},o.key=function(t){return s.push(t),o},o.sortKeys=function(t){return a[s.length-1]=t,o},o.sortValues=function(t){return n=t,o},o.rollup=function(t){return i=t,o},o},Xo.set=function(t){var e=new c;if(t)for(var n=0,i=t.length;i>n;++n)e.add(t[n]);return e},i(c,{has:o,add:function(t){return this[ls+t]=!0,t},remove:function(t){return t=ls+t,t in this&&delete this[t]},values:a,size:l,empty:u,forEach:function(t){for(var e in this)e.charCodeAt(0)===us&&t.call(this,e.substring(1))}}),Xo.behavior={},Xo.rebind=function(t,e){for(var n,i=1,r=arguments.length;++i<r;)t[n=arguments[i]]=h(t,e,e[n]);return t};var cs=["webkit","ms","moz","Moz","o","O"];Xo.dispatch=function(){for(var t=new p,e=-1,n=arguments.length;++e<n;)t[arguments[e]]=g(t);return t},p.prototype.on=function(t,e){var n=t.indexOf("."),i="";if(n>=0&&(i=t.substring(n+1),t=t.substring(0,n)),t)return arguments.length<2?this[t].on(i):this[t].on(i,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(i,null);return this}},Xo.event=null,Xo.requote=function(t){return t.replace(hs,"\\$&")};var hs=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ds={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]},fs=function(t,e){return e.querySelector(t)},ps=function(t,e){return e.querySelectorAll(t)},gs=Go[d(Go,"matchesSelector")],ms=function(t,e){return gs.call(t,e)};"function"==typeof Sizzle&&(fs=function(t,e){return Sizzle(t,e)[0]||null},ps=function(t,e){return Sizzle.uniqueSort(Sizzle(t,e))},ms=Sizzle.matchesSelector),Xo.selection=function(){return _s};var vs=Xo.selection.prototype=[];vs.select=function(t){var e,n,i,r,o=[];t=_(t);for(var s=-1,a=this.length;++s<a;){o.push(e=[]),e.parentNode=(i=this[s]).parentNode;for(var l=-1,u=i.length;++l<u;)(r=i[l])?(e.push(n=t.call(r,r.__data__,l,s)),n&&"__data__"in r&&(n.__data__=r.__data__)):e.push(null)}return b(o)},vs.selectAll=function(t){var e,n,i=[];t=x(t);for(var r=-1,o=this.length;++r<o;)for(var s=this[r],a=-1,l=s.length;++a<l;)(n=s[a])&&(i.push(e=Qo(t.call(n,n.__data__,a,r))),e.parentNode=n);return b(i)};var ys={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};Xo.ns={prefix:ys,qualify:function(t){var e=t.indexOf(":"),n=t;return e>=0&&(n=t.substring(0,e),t=t.substring(e+1)),ys.hasOwnProperty(n)?{space:ys[n],local:t}:t}},vs.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return t=Xo.ns.qualify(t),t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(w(e,t[e]));return this}return this.each(w(t,e))},vs.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),i=(t=T(t)).length,r=-1;if(e=n.classList){for(;++r<i;)if(!e.contains(t[r]))return!1}else for(e=n.getAttribute("class");++r<i;)if(!k(t[r]).test(e))return!1;return!0}for(e in t)this.each(D(e,t[e]));return this}return this.each(D(t,e))},vs.style=function(t,e,n){var i=arguments.length;if(3>i){if("string"!=typeof t){2>i&&(e="");for(n in t)this.each(S(n,t[n],e));return this}if(2>i)return Zo.getComputedStyle(this.node(),null).getPropertyValue(t);n=""}return this.each(S(t,e,n))},vs.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(E(e,t[e]));return this}return this.each(E(t,e))},vs.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},vs.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},vs.append=function(t){return t=N(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},vs.insert=function(t,e){return t=N(t),e=_(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},vs.remove=function(){return this.each(function(){var t=this.parentNode;t&&t.removeChild(this)})},vs.data=function(t,e){function n(t,n){var i,o,s,a=t.length,h=n.length,d=Math.min(a,h),f=new Array(h),p=new Array(h),g=new Array(a);if(e){var m,v=new r,y=new r,b=[];for(i=-1;++i<a;)m=e.call(o=t[i],o.__data__,i),v.has(m)?g[i]=o:v.set(m,o),b.push(m);for(i=-1;++i<h;)m=e.call(n,s=n[i],i),(o=v.get(m))?(f[i]=o,o.__data__=s):y.has(m)||(p[i]=A(s)),y.set(m,s),v.remove(m);for(i=-1;++i<a;)v.has(b[i])&&(g[i]=t[i])}else{for(i=-1;++i<d;)o=t[i],s=n[i],o?(o.__data__=s,f[i]=o):p[i]=A(s);for(;h>i;++i)p[i]=A(n[i]);for(;a>i;++i)g[i]=t[i]}p.update=f,p.parentNode=f.parentNode=g.parentNode=t.parentNode,l.push(p),u.push(f),c.push(g)}var i,o,s=-1,a=this.length;if(!arguments.length){for(t=new Array(a=(i=this[0]).length);++s<a;)(o=i[s])&&(t[s]=o.__data__);return t}var l=P([]),u=b([]),c=b([]);if("function"==typeof t)for(;++s<a;)n(i=this[s],t.call(i,i.parentNode.__data__,s));else for(;++s<a;)n(i=this[s],t);return u.enter=function(){return l},u.exit=function(){return c},u},vs.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},vs.filter=function(t){var e,n,i,r=[];"function"!=typeof t&&(t=j(t));for(var o=0,s=this.length;s>o;o++){r.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var a=0,l=n.length;l>a;a++)(i=n[a])&&t.call(i,i.__data__,a,o)&&e.push(i)}return b(r)},vs.order=function(){for(var t=-1,e=this.length;++t<e;)for(var n,i=this[t],r=i.length-1,o=i[r];--r>=0;)(n=i[r])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},vs.sort=function(t){t=I.apply(this,arguments);for(var e=-1,n=this.length;++e<n;)this[e].sort(t);return this.order()},vs.each=function(t){return $(this,function(e,n,i){t.call(e,e.__data__,n,i)})},vs.call=function(t){var e=Qo(arguments);return t.apply(e[0]=this,e),this},vs.empty=function(){return!this.node()},vs.node=function(){for(var t=0,e=this.length;e>t;t++)for(var n=this[t],i=0,r=n.length;r>i;i++){var o=n[i];if(o)return o}return null},vs.size=function(){var t=0;return this.each(function(){++t}),t};var bs=[];Xo.selection.enter=P,Xo.selection.enter.prototype=bs,bs.append=vs.append,bs.empty=vs.empty,bs.node=vs.node,bs.call=vs.call,bs.size=vs.size,bs.select=function(t){for(var e,n,i,r,o,s=[],a=-1,l=this.length;++a<l;){i=(r=this[a]).update,s.push(e=[]),e.parentNode=r.parentNode;for(var u=-1,c=r.length;++u<c;)(o=r[u])?(e.push(i[u]=n=t.call(r.parentNode,o.__data__,u,a)),n.__data__=o.__data__):e.push(null)}return b(s)},bs.insert=function(t,e){return arguments.length<2&&(e=H(this)),vs.insert.call(this,t,e)},vs.transition=function(){for(var t,e,n=Dl||++Al,i=[],r=Ml||{time:Date.now(),ease:bi,delay:0,duration:250},o=-1,s=this.length;++o<s;){i.push(t=[]);for(var a=this[o],l=-1,u=a.length;++l<u;)(e=a[l])&&zo(e,l,n,r),t.push(e)}return Ho(i,n)},vs.interrupt=function(){return this.each(F)},Xo.select=function(t){var e=["string"==typeof t?fs(t,Ko):t];return e.parentNode=Go,b([e])},Xo.selectAll=function(t){var e=Qo("string"==typeof t?ps(t,Ko):t);return e.parentNode=Go,b([e])};var _s=Xo.select(Go);vs.on=function(t,e,n){var i=arguments.length;if(3>i){if("string"!=typeof t){2>i&&(e=!1);for(n in t)this.each(L(n,t[n],e));return this}if(2>i)return(i=this.node()["__on"+t])&&i._;n=!1}return this.each(L(t,e,n))};var xs=Xo.map({mouseenter:"mouseover",mouseleave:"mouseout"});xs.forEach(function(t){"on"+t in Ko&&xs.remove(t)});var ws="onselectstart"in Ko?null:d(Go.style,"userSelect"),Cs=0;Xo.mouse=function(t){return q(t,v())};var ks=/WebKit/.test(Zo.navigator.userAgent)?-1:0;Xo.touches=function(t,e){return arguments.length<2&&(e=v().touches),e?Qo(e).map(function(e){var n=q(t,e);return n.identifier=e.identifier,n}):[]},Xo.behavior.drag=function(){function t(){this.on("mousedown.drag",s).on("touchstart.drag",a)}function e(){return Xo.event.changedTouches[0].identifier}function n(t,e){return Xo.touches(t).filter(function(t){return t.identifier===e})[0]}function i(t,e,n,i){return function(){function s(){var t=e(c,f),n=t[0]-g[0],i=t[1]-g[1];m|=n|i,g=t,h({type:"drag",x:t[0]+l[0],y:t[1]+l[1],dx:n,dy:i})}function a(){v.on(n+"."+p,null).on(i+"."+p,null),y(m&&Xo.event.target===d),h({type:"dragend"})}var l,u=this,c=u.parentNode,h=r.of(u,arguments),d=Xo.event.target,f=t(),p=null==f?"drag":"drag-"+f,g=e(c,f),m=0,v=Xo.select(Zo).on(n+"."+p,s).on(i+"."+p,a),y=R();o?(l=o.apply(u,arguments),l=[l.x-g[0],l.y-g[1]]):l=[0,0],h({type:"dragstart"})}}var r=y(t,"drag","dragstart","dragend"),o=null,s=i(f,Xo.mouse,"mousemove","mouseup"),a=i(e,n,"touchmove","touchend");return t.origin=function(e){return arguments.length?(o=e,t):o},Xo.rebind(t,r,"on")};var Ts=Math.PI,Ds=2*Ts,Ms=Ts/2,Ss=1e-6,Es=Ss*Ss,Ns=Ts/180,As=180/Ts,js=Math.SQRT2,Is=2,$s=4;Xo.interpolateZoom=function(t,e){function n(t){var e=t*y;if(v){var n=V(g),s=o/(Is*d)*(n*Q(js*e+g)-X(g));return[i+s*u,r+s*c,o*n/V(js*e+g)]}return[i+t*u,r+t*c,o*Math.exp(js*e)]}var i=t[0],r=t[1],o=t[2],s=e[0],a=e[1],l=e[2],u=s-i,c=a-r,h=u*u+c*c,d=Math.sqrt(h),f=(l*l-o*o+$s*h)/(2*o*Is*d),p=(l*l-o*o-$s*h)/(2*l*Is*d),g=Math.log(Math.sqrt(f*f+1)-f),m=Math.log(Math.sqrt(p*p+1)-p),v=m-g,y=(v||Math.log(l/o))/js;return n.duration=1e3*y,n},Xo.behavior.zoom=function(){function t(t){t.on(M,u).on(Fs+".zoom",h).on(S,d).on("dblclick.zoom",f).on(N,c)}function e(t){return[(t[0]-k.x)/k.k,(t[1]-k.y)/k.k]}function n(t){return[t[0]*k.k+k.x,t[1]*k.k+k.y]}function i(t){k.k=Math.max(D[0],Math.min(D[1],t))}function r(t,e){e=n(e),k.x+=t[0]-e[0],k.y+=t[1]-e[1]}function o(){x&&x.domain(_.range().map(function(t){return(t-k.x)/k.k}).map(_.invert)),C&&C.domain(w.range().map(function(t){return(t-k.y)/k.k}).map(w.invert))}function s(t){t({type:"zoomstart"})}function a(t){o(),t({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function l(t){t({type:"zoomend"})}function u(){function t(){c=1,r(Xo.mouse(i),f),a(o)}function n(){h.on(S,Zo===i?d:null).on(E,null),p(c&&Xo.event.target===u),l(o)}var i=this,o=A.of(i,arguments),u=Xo.event.target,c=0,h=Xo.select(Zo).on(S,t).on(E,n),f=e(Xo.mouse(i)),p=R();F.call(i),s(o)}function c(){function t(){var t=Xo.touches(f);return d=k.k,t.forEach(function(t){t.identifier in g&&(g[t.identifier]=e(t))}),t}function n(){for(var e=Xo.event.changedTouches,n=0,o=e.length;o>n;++n)g[e[n].identifier]=null;var s=t(),l=Date.now();if(1===s.length){if(500>l-b){var u=s[0],c=g[u.identifier];i(2*k.k),r(u,c),m(),a(p)}b=l}else if(s.length>1){var u=s[0],h=s[1],d=u[0]-h[0],f=u[1]-h[1];v=d*d+f*f}}function o(){for(var t,e,n,o,s=Xo.touches(f),l=0,u=s.length;u>l;++l,o=null)if(n=s[l],o=g[n.identifier]){if(e)break;t=n,e=o}if(o){var c=(c=n[0]-t[0])*c+(c=n[1]-t[1])*c,h=v&&Math.sqrt(c/v);t=[(t[0]+n[0])/2,(t[1]+n[1])/2],e=[(e[0]+o[0])/2,(e[1]+o[1])/2],i(h*d)}b=null,r(t,e),a(p)}function h(){if(Xo.event.touches.length){for(var e=Xo.event.changedTouches,n=0,i=e.length;i>n;++n)delete g[e[n].identifier];for(var r in g)return void t()}w.on(_,null).on(x,null),C.on(M,u).on(N,c),T(),l(p)}var d,f=this,p=A.of(f,arguments),g={},v=0,y=Xo.event.changedTouches[0].identifier,_="touchmove.zoom-"+y,x="touchend.zoom-"+y,w=Xo.select(Zo).on(_,o).on(x,h),C=Xo.select(f).on(M,null).on(N,n),T=R();F.call(f),n(),s(p)}function h(){var t=A.of(this,arguments);v?clearTimeout(v):(F.call(this),s(t)),v=setTimeout(function(){v=null,l(t)},50),m();var n=g||Xo.mouse(this);p||(p=e(n)),i(Math.pow(2,.002*Ps())*k.k),r(n,p),a(t)}function d(){p=null}function f(){var t=A.of(this,arguments),n=Xo.mouse(this),o=e(n),u=Math.log(k.k)/Math.LN2;s(t),i(Math.pow(2,Xo.event.shiftKey?Math.ceil(u)-1:Math.floor(u)+1)),r(n,o),a(t),l(t)}var p,g,v,b,_,x,w,C,k={x:0,y:0,k:1},T=[960,500],D=Hs,M="mousedown.zoom",S="mousemove.zoom",E="mouseup.zoom",N="touchstart.zoom",A=y(t,"zoomstart","zoom","zoomend");return t.event=function(t){t.each(function(){var t=A.of(this,arguments),e=k;Dl?Xo.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},s(t)}).tween("zoom:zoom",function(){var n=T[0],i=T[1],r=n/2,o=i/2,s=Xo.interpolateZoom([(r-k.x)/k.k,(o-k.y)/k.k,n/k.k],[(r-e.x)/e.k,(o-e.y)/e.k,n/e.k]);return function(e){var i=s(e),l=n/i[2];this.__chart__=k={x:r-i[0]*l,y:o-i[1]*l,k:l},a(t)}}).each("end.zoom",function(){l(t)}):(this.__chart__=k,s(t),a(t),l(t))})},t.translate=function(e){return arguments.length?(k={x:+e[0],y:+e[1],k:k.k},o(),t):[k.x,k.y]},t.scale=function(e){return arguments.length?(k={x:k.x,y:k.y,k:+e},o(),t):k.k},t.scaleExtent=function(e){return arguments.length?(D=null==e?Hs:[+e[0],+e[1]],t):D},t.center=function(e){return arguments.length?(g=e&&[+e[0],+e[1]],t):g},t.size=function(e){return arguments.length?(T=e&&[+e[0],+e[1]],t):T},t.x=function(e){return arguments.length?(x=e,_=e.copy(),k={x:0,y:0,k:1},t):x},t.y=function(e){return arguments.length?(C=e,w=e.copy(),k={x:0,y:0,k:1},t):C},Xo.rebind(t,A,"on")};var Ps,Hs=[0,1/0],Fs="onwheel"in Ko?(Ps=function(){return-Xo.event.deltaY*(Xo.event.deltaMode?120:1)},"wheel"):"onmousewheel"in Ko?(Ps=function(){return Xo.event.wheelDelta},"mousewheel"):(Ps=function(){return-Xo.event.detail},"MozMousePixelScroll");G.prototype.toString=function(){return this.rgb()+""},Xo.hsl=function(t,e,n){return 1===arguments.length?t instanceof J?Z(t.h,t.s,t.l):mt(""+t,vt,Z):Z(+t,+e,+n)};var Ls=J.prototype=new G;Ls.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),Z(this.h,this.s,this.l/t)},Ls.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),Z(this.h,this.s,t*this.l)},Ls.rgb=function(){return tt(this.h,this.s,this.l)},Xo.hcl=function(t,e,n){return 1===arguments.length?t instanceof nt?et(t.h,t.c,t.l):t instanceof ot?at(t.l,t.a,t.b):at((t=yt((t=Xo.rgb(t)).r,t.g,t.b)).l,t.a,t.b):et(+t,+e,+n)};var zs=nt.prototype=new G;zs.brighter=function(t){return et(this.h,this.c,Math.min(100,this.l+Os*(arguments.length?t:1)))},zs.darker=function(t){return et(this.h,this.c,Math.max(0,this.l-Os*(arguments.length?t:1)))},zs.rgb=function(){return it(this.h,this.c,this.l).rgb()},Xo.lab=function(t,e,n){return 1===arguments.length?t instanceof ot?rt(t.l,t.a,t.b):t instanceof nt?it(t.l,t.c,t.h):yt((t=Xo.rgb(t)).r,t.g,t.b):rt(+t,+e,+n)};var Os=18,Rs=.95047,qs=1,Ws=1.08883,Bs=ot.prototype=new G;Bs.brighter=function(t){return rt(Math.min(100,this.l+Os*(arguments.length?t:1)),this.a,this.b)},Bs.darker=function(t){return rt(Math.max(0,this.l-Os*(arguments.length?t:1)),this.a,this.b)},Bs.rgb=function(){return st(this.l,this.a,this.b)},Xo.rgb=function(t,e,n){return 1===arguments.length?t instanceof pt?ft(t.r,t.g,t.b):mt(""+t,ft,tt):ft(~~t,~~e,~~n)};var Us=pt.prototype=new G;Us.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,i=this.b,r=30;return e||n||i?(e&&r>e&&(e=r),n&&r>n&&(n=r),i&&r>i&&(i=r),ft(Math.min(255,~~(e/t)),Math.min(255,~~(n/t)),Math.min(255,~~(i/t)))):ft(r,r,r)},Us.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),ft(~~(t*this.r),~~(t*this.g),~~(t*this.b))},Us.hsl=function(){return vt(this.r,this.g,this.b)},Us.toString=function(){return"#"+gt(this.r)+gt(this.g)+gt(this.b)};var Ys=Xo.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Ys.forEach(function(t,e){Ys.set(t,ht(e))}),Xo.functor=xt,Xo.xhr=Ct(wt),Xo.dsv=function(t,e){function n(t,n,o){arguments.length<3&&(o=n,n=null);var s=kt(t,e,null==n?i:r(n),o);return s.row=function(t){return arguments.length?s.response(null==(n=t)?i:r(t)):n},s}function i(t){return n.parse(t.responseText)}function r(t){return function(e){return n.parse(e.responseText,t)}}function o(e){return e.map(s).join(t)}function s(t){return a.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var a=new RegExp('["'+t+"\n]"),l=t.charCodeAt(0);return n.parse=function(t,e){var i;return n.parseRows(t,function(t,n){if(i)return i(t,n-1);var r=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");i=e?function(t,n){return e(r(t),n)}:r})},n.parseRows=function(t,e){function n(){if(c>=u)return s;if(r)return r=!1,o;var e=c;if(34===t.charCodeAt(e)){for(var n=e;n++<u;)if(34===t.charCodeAt(n)){if(34!==t.charCodeAt(n+1))break;++n}c=n+2;var i=t.charCodeAt(n+1);return 13===i?(r=!0,10===t.charCodeAt(n+2)&&++c):10===i&&(r=!0),t.substring(e+1,n).replace(/""/g,'"')}for(;u>c;){var i=t.charCodeAt(c++),a=1;if(10===i)r=!0;else if(13===i)r=!0,10===t.charCodeAt(c)&&(++c,++a);else if(i!==l)continue;return t.substring(e,c-a)}return t.substring(e)}for(var i,r,o={},s={},a=[],u=t.length,c=0,h=0;(i=n())!==s;){for(var d=[];i!==o&&i!==s;)d.push(i),i=n();(!e||(d=e(d,h++)))&&a.push(d)}return a},n.format=function(e){if(Array.isArray(e[0]))return n.formatRows(e);var i=new c,r=[];return e.forEach(function(t){for(var e in t)i.has(e)||r.push(i.add(e))}),[r.map(s).join(t)].concat(e.map(function(e){return r.map(function(t){return s(e[t])}).join(t)})).join("\n")},n.formatRows=function(t){return t.map(o).join("\n")},n},Xo.csv=Xo.dsv(",","text/csv"),Xo.tsv=Xo.dsv("	","text/tab-separated-values");var Xs,Vs,Qs,Ks,Gs,Zs=Zo[d(Zo,"requestAnimationFrame")]||function(t){setTimeout(t,17)};Xo.timer=function(t,e,n){var i=arguments.length;2>i&&(e=0),3>i&&(n=Date.now());var r=n+e,o={c:t,t:r,f:!1,n:null};Vs?Vs.n=o:Xs=o,Vs=o,Qs||(Ks=clearTimeout(Ks),Qs=1,Zs(Dt))},Xo.timer.flush=function(){Mt(),St()},Xo.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var Js=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Nt);Xo.formatPrefix=function(t,e){var n=0;return t&&(0>t&&(t*=-1),e&&(t=Xo.round(t,Et(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((0>=n?n+1:n-1)/3)))),Js[8+n/3]};var ta=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,ea=Xo.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=Xo.round(t,Et(t,e))).toFixed(Math.max(0,Math.min(20,Et(t*(1+1e-15),e))))}}),na=Xo.time={},ia=Date;It.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ra.setUTCDate.apply(this._,arguments)},setDay:function(){ra.setUTCDay.apply(this._,arguments)},setFullYear:function(){ra.setUTCFullYear.apply(this._,arguments)},setHours:function(){ra.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ra.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ra.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ra.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ra.setUTCSeconds.apply(this._,arguments)},setTime:function(){ra.setTime.apply(this._,arguments)}};var ra=Date.prototype;na.year=$t(function(t){return t=na.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),na.years=na.year.range,na.years.utc=na.year.utc.range,na.day=$t(function(t){var e=new ia(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),na.days=na.day.range,na.days.utc=na.day.utc.range,na.dayOfYear=function(t){var e=na.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var n=na[t]=$t(function(t){return(t=na.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var n=na.year(t).getDay();return Math.floor((na.dayOfYear(t)+(n+e)%7)/7)-(n!==e)});na[t+"s"]=n.range,na[t+"s"].utc=n.utc.range,na[t+"OfYear"]=function(t){var n=na.year(t).getDay();return Math.floor((na.dayOfYear(t)+(n+e)%7)/7)}}),na.week=na.sunday,na.weeks=na.sunday.range,na.weeks.utc=na.sunday.utc.range,na.weekOfYear=na.sundayOfYear;var oa={"-":"",_:" ",0:"0"},sa=/^\s*\d+/,aa=/^%/;Xo.locale=function(t){return{numberFormat:At(t),timeFormat:Ht(t)}};var la=Xo.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Xo.format=la.numberFormat,Xo.geo={},ie.prototype={s:0,t:0,add:function(t){re(t,this.t,ua),re(ua.s,this.s,this),this.s?this.t+=ua.t:this.s=ua.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var ua=new ie;Xo.geo.stream=function(t,e){
t&&ca.hasOwnProperty(t.type)?ca[t.type](t,e):oe(t,e)};var ca={Feature:function(t,e){oe(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,r=n.length;++i<r;)oe(n[i].geometry,e)}},ha={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)t=n[i],e.point(t[0],t[1],t[2])},LineString:function(t,e){se(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)se(n[i],e,0)},Polygon:function(t,e){ae(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)ae(n[i],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,r=n.length;++i<r;)oe(n[i],e)}};Xo.geo.area=function(t){return da=0,Xo.geo.stream(t,pa),da};var da,fa=new ie,pa={sphere:function(){da+=4*Ts},point:f,lineStart:f,lineEnd:f,polygonStart:function(){fa.reset(),pa.lineStart=le},polygonEnd:function(){var t=2*fa;da+=0>t?4*Ts+t:t,pa.lineStart=pa.lineEnd=pa.point=f}};Xo.geo.bounds=function(){function t(t,e){b.push(_=[c=t,d=t]),h>e&&(h=e),e>f&&(f=e)}function e(e,n){var i=ue([e*Ns,n*Ns]);if(v){var r=he(v,i),o=[r[1],-r[0],0],s=he(o,r);pe(s),s=ge(s);var l=e-p,u=l>0?1:-1,g=s[0]*As*u,m=as(l)>180;if(m^(g>u*p&&u*e>g)){var y=s[1]*As;y>f&&(f=y)}else if(g=(g+360)%360-180,m^(g>u*p&&u*e>g)){var y=-s[1]*As;h>y&&(h=y)}else h>n&&(h=n),n>f&&(f=n);m?p>e?a(c,e)>a(c,d)&&(d=e):a(e,d)>a(c,d)&&(c=e):d>=c?(c>e&&(c=e),e>d&&(d=e)):e>p?a(c,e)>a(c,d)&&(d=e):a(e,d)>a(c,d)&&(c=e)}else t(e,n);v=i,p=e}function n(){x.point=e}function i(){_[0]=c,_[1]=d,x.point=t,v=null}function r(t,n){if(v){var i=t-p;y+=as(i)>180?i+(i>0?360:-360):i}else g=t,m=n;pa.point(t,n),e(t,n)}function o(){pa.lineStart()}function s(){r(g,m),pa.lineEnd(),as(y)>Ss&&(c=-(d=180)),_[0]=c,_[1]=d,v=null}function a(t,e){return(e-=t)<0?e+360:e}function l(t,e){return t[0]-e[0]}function u(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}var c,h,d,f,p,g,m,v,y,b,_,x={point:t,lineStart:n,lineEnd:i,polygonStart:function(){x.point=r,x.lineStart=o,x.lineEnd=s,y=0,pa.polygonStart()},polygonEnd:function(){pa.polygonEnd(),x.point=t,x.lineStart=n,x.lineEnd=i,0>fa?(c=-(d=180),h=-(f=90)):y>Ss?f=90:-Ss>y&&(h=-90),_[0]=c,_[1]=d}};return function(t){f=d=-(c=h=1/0),b=[],Xo.geo.stream(t,x);var e=b.length;if(e){b.sort(l);for(var n,i=1,r=b[0],o=[r];e>i;++i)n=b[i],u(n[0],r)||u(n[1],r)?(a(r[0],n[1])>a(r[0],r[1])&&(r[1]=n[1]),a(n[0],r[1])>a(r[0],r[1])&&(r[0]=n[0])):o.push(r=n);for(var s,n,p=-(1/0),e=o.length-1,i=0,r=o[e];e>=i;r=n,++i)n=o[i],(s=a(r[1],n[0]))>p&&(p=s,c=n[0],d=r[1])}return b=_=null,c===1/0||h===1/0?[[NaN,NaN],[NaN,NaN]]:[[c,h],[d,f]]}}(),Xo.geo.centroid=function(t){ga=ma=va=ya=ba=_a=xa=wa=Ca=ka=Ta=0,Xo.geo.stream(t,Da);var e=Ca,n=ka,i=Ta,r=e*e+n*n+i*i;return Es>r&&(e=_a,n=xa,i=wa,Ss>ma&&(e=va,n=ya,i=ba),r=e*e+n*n+i*i,Es>r)?[NaN,NaN]:[Math.atan2(n,e)*As,Y(i/Math.sqrt(r))*As]};var ga,ma,va,ya,ba,_a,xa,wa,Ca,ka,Ta,Da={sphere:f,point:ve,lineStart:be,lineEnd:_e,polygonStart:function(){Da.lineStart=xe},polygonEnd:function(){Da.lineStart=be}},Ma=De(we,Ae,Ie,[-Ts,-Ts/2]),Sa=1e9;Xo.geo.clipExtent=function(){var t,e,n,i,r,o,s={stream:function(t){return r&&(r.valid=!1),r=o(t),r.valid=!0,r},extent:function(a){return arguments.length?(o=He(t=+a[0][0],e=+a[0][1],n=+a[1][0],i=+a[1][1]),r&&(r.valid=!1,r=null),s):[[t,e],[n,i]]}};return s.extent([[0,0],[960,500]])},(Xo.geo.conicEqualArea=function(){return Le(ze)}).raw=ze,Xo.geo.albers=function(){return Xo.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},Xo.geo.albersUsa=function(){function t(t){var o=t[0],s=t[1];return e=null,n(o,s),e||(i(o,s),e)||r(o,s),e}var e,n,i,r,o=Xo.geo.albers(),s=Xo.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=Xo.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,n){e=[t,n]}};return t.invert=function(t){var e=o.scale(),n=o.translate(),i=(t[0]-n[0])/e,r=(t[1]-n[1])/e;return(r>=.12&&.234>r&&i>=-.425&&-.214>i?s:r>=.166&&.234>r&&i>=-.214&&-.115>i?a:o).invert(t)},t.stream=function(t){var e=o.stream(t),n=s.stream(t),i=a.stream(t);return{point:function(t,r){e.point(t,r),n.point(t,r),i.point(t,r)},sphere:function(){e.sphere(),n.sphere(),i.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),i.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),i.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),i.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),i.polygonEnd()}}},t.precision=function(e){return arguments.length?(o.precision(e),s.precision(e),a.precision(e),t):o.precision()},t.scale=function(e){return arguments.length?(o.scale(e),s.scale(.35*e),a.scale(e),t.translate(o.translate())):o.scale()},t.translate=function(e){if(!arguments.length)return o.translate();var u=o.scale(),c=+e[0],h=+e[1];return n=o.translate(e).clipExtent([[c-.455*u,h-.238*u],[c+.455*u,h+.238*u]]).stream(l).point,i=s.translate([c-.307*u,h+.201*u]).clipExtent([[c-.425*u+Ss,h+.12*u+Ss],[c-.214*u-Ss,h+.234*u-Ss]]).stream(l).point,r=a.translate([c-.205*u,h+.212*u]).clipExtent([[c-.214*u+Ss,h+.166*u+Ss],[c-.115*u-Ss,h+.234*u-Ss]]).stream(l).point,t},t.scale(1070)};var Ea,Na,Aa,ja,Ia,$a,Pa={point:f,lineStart:f,lineEnd:f,polygonStart:function(){Na=0,Pa.lineStart=Oe},polygonEnd:function(){Pa.lineStart=Pa.lineEnd=Pa.point=f,Ea+=as(Na/2)}},Ha={point:Re,lineStart:f,lineEnd:f,polygonStart:f,polygonEnd:f},Fa={point:Be,lineStart:Ue,lineEnd:Ye,polygonStart:function(){Fa.lineStart=Xe},polygonEnd:function(){Fa.point=Be,Fa.lineStart=Ue,Fa.lineEnd=Ye}};Xo.geo.path=function(){function t(t){return t&&("function"==typeof a&&o.pointRadius(+a.apply(this,arguments)),s&&s.valid||(s=r(o)),Xo.geo.stream(t,s)),o.result()}function e(){return s=null,t}var n,i,r,o,s,a=4.5;return t.area=function(t){return Ea=0,Xo.geo.stream(t,r(Pa)),Ea},t.centroid=function(t){return va=ya=ba=_a=xa=wa=Ca=ka=Ta=0,Xo.geo.stream(t,r(Fa)),Ta?[Ca/Ta,ka/Ta]:wa?[_a/wa,xa/wa]:ba?[va/ba,ya/ba]:[NaN,NaN]},t.bounds=function(t){return Ia=$a=-(Aa=ja=1/0),Xo.geo.stream(t,r(Ha)),[[Aa,ja],[Ia,$a]]},t.projection=function(t){return arguments.length?(r=(n=t)?t.stream||Ke(t):wt,e()):n},t.context=function(t){return arguments.length?(o=null==(i=t)?new qe:new Ve(t),"function"!=typeof a&&o.pointRadius(a),e()):i},t.pointRadius=function(e){return arguments.length?(a="function"==typeof e?e:(o.pointRadius(+e),+e),t):a},t.projection(Xo.geo.albersUsa()).context(null)},Xo.geo.transform=function(t){return{stream:function(e){var n=new Ge(e);for(var i in t)n[i]=t[i];return n}}},Ge.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},Xo.geo.projection=Je,Xo.geo.projectionMutator=tn,(Xo.geo.equirectangular=function(){return Je(nn)}).raw=nn.invert=nn,Xo.geo.rotation=function(t){function e(e){return e=t(e[0]*Ns,e[1]*Ns),e[0]*=As,e[1]*=As,e}return t=on(t[0]%360*Ns,t[1]*Ns,t.length>2?t[2]*Ns:0),e.invert=function(e){return e=t.invert(e[0]*Ns,e[1]*Ns),e[0]*=As,e[1]*=As,e},e},rn.invert=nn,Xo.geo.circle=function(){function t(){var t="function"==typeof i?i.apply(this,arguments):i,e=on(-t[0]*Ns,-t[1]*Ns,0).invert,r=[];return n(null,null,1,{point:function(t,n){r.push(t=e(t,n)),t[0]*=As,t[1]*=As}}),{type:"Polygon",coordinates:[r]}}var e,n,i=[0,0],r=6;return t.origin=function(e){return arguments.length?(i=e,t):i},t.angle=function(i){return arguments.length?(n=un((e=+i)*Ns,r*Ns),t):e},t.precision=function(i){return arguments.length?(n=un(e*Ns,(r=+i)*Ns),t):r},t.angle(90)},Xo.geo.distance=function(t,e){var n,i=(e[0]-t[0])*Ns,r=t[1]*Ns,o=e[1]*Ns,s=Math.sin(i),a=Math.cos(i),l=Math.sin(r),u=Math.cos(r),c=Math.sin(o),h=Math.cos(o);return Math.atan2(Math.sqrt((n=h*s)*n+(n=u*c-l*h*a)*n),l*c+u*h*a)},Xo.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return Xo.range(Math.ceil(o/m)*m,r,m).map(d).concat(Xo.range(Math.ceil(u/v)*v,l,v).map(f)).concat(Xo.range(Math.ceil(i/p)*p,n,p).filter(function(t){return as(t%m)>Ss}).map(c)).concat(Xo.range(Math.ceil(a/g)*g,s,g).filter(function(t){return as(t%v)>Ss}).map(h))}var n,i,r,o,s,a,l,u,c,h,d,f,p=10,g=p,m=90,v=360,y=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[d(o).concat(f(l).slice(1),d(r).reverse().slice(1),f(u).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(o=+e[0][0],r=+e[1][0],u=+e[0][1],l=+e[1][1],o>r&&(e=o,o=r,r=e),u>l&&(e=u,u=l,l=e),t.precision(y)):[[o,u],[r,l]]},t.minorExtent=function(e){return arguments.length?(i=+e[0][0],n=+e[1][0],a=+e[0][1],s=+e[1][1],i>n&&(e=i,i=n,n=e),a>s&&(e=a,a=s,s=e),t.precision(y)):[[i,a],[n,s]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(m=+e[0],v=+e[1],t):[m,v]},t.minorStep=function(e){return arguments.length?(p=+e[0],g=+e[1],t):[p,g]},t.precision=function(e){return arguments.length?(y=+e,c=hn(a,s,90),h=dn(i,n,y),d=hn(u,l,90),f=dn(o,r,y),t):y},t.majorExtent([[-180,-90+Ss],[180,90-Ss]]).minorExtent([[-180,-80-Ss],[180,80+Ss]])},Xo.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||i.apply(this,arguments),n||r.apply(this,arguments)]}}var e,n,i=fn,r=pn;return t.distance=function(){return Xo.geo.distance(e||i.apply(this,arguments),n||r.apply(this,arguments))},t.source=function(n){return arguments.length?(i=n,e="function"==typeof n?null:n,t):i},t.target=function(e){return arguments.length?(r=e,n="function"==typeof e?null:e,t):r},t.precision=function(){return arguments.length?t:0},t},Xo.geo.interpolate=function(t,e){return gn(t[0]*Ns,t[1]*Ns,e[0]*Ns,e[1]*Ns)},Xo.geo.length=function(t){return La=0,Xo.geo.stream(t,za),La};var La,za={sphere:f,point:f,lineStart:mn,lineEnd:f,polygonStart:f,polygonEnd:f},Oa=vn(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(Xo.geo.azimuthalEqualArea=function(){return Je(Oa)}).raw=Oa;var Ra=vn(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},wt);(Xo.geo.azimuthalEquidistant=function(){return Je(Ra)}).raw=Ra,(Xo.geo.conicConformal=function(){return Le(yn)}).raw=yn,(Xo.geo.conicEquidistant=function(){return Le(bn)}).raw=bn;var qa=vn(function(t){return 1/t},Math.atan);(Xo.geo.gnomonic=function(){return Je(qa)}).raw=qa,_n.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Ms]},(Xo.geo.mercator=function(){return xn(_n)}).raw=_n;var Wa=vn(function(){return 1},Math.asin);(Xo.geo.orthographic=function(){return Je(Wa)}).raw=Wa;var Ba=vn(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(Xo.geo.stereographic=function(){return Je(Ba)}).raw=Ba,wn.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Ms]},(Xo.geo.transverseMercator=function(){var t=xn(wn),e=t.center,n=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[-t[1],t[0]])},t.rotate=function(t){return t?n([t[0],t[1],t.length>2?t[2]+90:90]):(t=n(),[t[0],t[1],t[2]-90])},t.rotate([0,0])}).raw=wn,Xo.geom={},Xo.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,r=xt(n),o=xt(i),s=t.length,a=[],l=[];for(e=0;s>e;e++)a.push([+r.call(this,t[e],e),+o.call(this,t[e],e),e]);for(a.sort(Dn),e=0;s>e;e++)l.push([a[e][0],-a[e][1]]);var u=Tn(a),c=Tn(l),h=c[0]===u[0],d=c[c.length-1]===u[u.length-1],f=[];for(e=u.length-1;e>=0;--e)f.push(t[a[u[e]][2]]);for(e=+h;e<c.length-d;++e)f.push(t[a[c[e]][2]]);return f}var n=Cn,i=kn;return arguments.length?e(t):(e.x=function(t){return arguments.length?(n=t,e):n},e.y=function(t){return arguments.length?(i=t,e):i},e)},Xo.geom.polygon=function(t){return ds(t,Ua),t};var Ua=Xo.geom.polygon.prototype=[];Ua.area=function(){for(var t,e=-1,n=this.length,i=this[n-1],r=0;++e<n;)t=i,i=this[e],r+=t[1]*i[0]-t[0]*i[1];return.5*r},Ua.centroid=function(t){var e,n,i=-1,r=this.length,o=0,s=0,a=this[r-1];for(arguments.length||(t=-1/(6*this.area()));++i<r;)e=a,a=this[i],n=e[0]*a[1]-a[0]*e[1],o+=(e[0]+a[0])*n,s+=(e[1]+a[1])*n;return[o*t,s*t]},Ua.clip=function(t){for(var e,n,i,r,o,s,a=En(t),l=-1,u=this.length-En(this),c=this[u-1];++l<u;){for(e=t.slice(),t.length=0,r=this[l],o=e[(i=e.length-a)-1],n=-1;++n<i;)s=e[n],Mn(s,c,r)?(Mn(o,c,r)||t.push(Sn(o,s,c,r)),t.push(s)):Mn(o,c,r)&&t.push(Sn(o,s,c,r)),o=s;a&&t.push(t[0]),c=r}return t};var Ya,Xa,Va,Qa,Ka,Ga=[],Za=[];Fn.prototype.prepare=function(){for(var t,e=this.edges,n=e.length;n--;)t=e[n].edge,t.b&&t.a||e.splice(n,1);return e.sort(zn),e.length},Qn.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Kn.prototype={insert:function(t,e){var n,i,r;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=ti(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)i=n.U,n===i.L?(r=i.R,r&&r.C?(n.C=r.C=!1,i.C=!0,t=i):(t===n.R&&(Zn(this,n),t=n,n=t.U),n.C=!1,i.C=!0,Jn(this,i))):(r=i.L,r&&r.C?(n.C=r.C=!1,i.C=!0,t=i):(t===n.L&&(Jn(this,n),t=n,n=t.U),n.C=!1,i.C=!0,Zn(this,i))),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,i,r=t.U,o=t.L,s=t.R;if(n=o?s?ti(s):o:s,r?r.L===t?r.L=n:r.R=n:this._=n,o&&s?(i=n.C,n.C=t.C,n.L=o,o.U=n,n!==s?(r=n.U,n.U=t.U,t=n.R,r.L=t,n.R=s,s.U=n):(n.U=r,r=n,t=n.R)):(i=t.C,t=n),t&&(t.U=r),!i){if(t&&t.C)return void(t.C=!1);do{if(t===this._)break;if(t===r.L){if(e=r.R,e.C&&(e.C=!1,r.C=!0,Zn(this,r),e=r.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Jn(this,e),e=r.R),e.C=r.C,r.C=e.R.C=!1,Zn(this,r),t=this._;break}}else if(e=r.L,e.C&&(e.C=!1,r.C=!0,Jn(this,r),e=r.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Zn(this,e),e=r.L),e.C=r.C,r.C=e.L.C=!1,Jn(this,r),t=this._;break}e.C=!0,t=r,r=r.U}while(!t.C);t&&(t.C=!1)}}},Xo.geom.voronoi=function(t){function e(t){var e=new Array(t.length),i=a[0][0],r=a[0][1],o=a[1][0],s=a[1][1];return ei(n(t),a).cells.forEach(function(n,a){var l=n.edges,u=n.site,c=e[a]=l.length?l.map(function(t){var e=t.start();return[e.x,e.y]}):u.x>=i&&u.x<=o&&u.y>=r&&u.y<=s?[[i,s],[o,s],[o,r],[i,r]]:[];c.point=t[a]}),e}function n(t){return t.map(function(t,e){return{x:Math.round(o(t,e)/Ss)*Ss,y:Math.round(s(t,e)/Ss)*Ss,i:e}})}var i=Cn,r=kn,o=i,s=r,a=Ja;return t?e(t):(e.links=function(t){return ei(n(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return ei(n(t)).cells.forEach(function(n,i){for(var r,o,s=n.site,a=n.edges.sort(zn),l=-1,u=a.length,c=a[u-1].edge,h=c.l===s?c.r:c.l;++l<u;)r=c,o=h,c=a[l].edge,h=c.l===s?c.r:c.l,i<o.i&&i<h.i&&ii(s,o,h)<0&&e.push([t[i],t[o.i],t[h.i]])}),e},e.x=function(t){return arguments.length?(o=xt(i=t),e):i},e.y=function(t){return arguments.length?(s=xt(r=t),e):r},e.clipExtent=function(t){return arguments.length?(a=null==t?Ja:t,e):a===Ja?null:a},e.size=function(t){return arguments.length?e.clipExtent(t&&[[0,0],t]):a===Ja?null:a&&a[1]},e)};var Ja=[[-1e6,-1e6],[1e6,1e6]];Xo.geom.delaunay=function(t){return Xo.geom.voronoi().triangles(t)},Xo.geom.quadtree=function(t,e,n,i,r){function o(t){function o(t,e,n,i,r,o,s,a){if(!isNaN(n)&&!isNaN(i))if(t.leaf){var l=t.x,c=t.y;if(null!=l)if(as(l-n)+as(c-i)<.01)u(t,e,n,i,r,o,s,a);else{var h=t.point;t.x=t.y=t.point=null,u(t,h,l,c,r,o,s,a),u(t,e,n,i,r,o,s,a)}else t.x=n,t.y=i,t.point=e}else u(t,e,n,i,r,o,s,a)}function u(t,e,n,i,r,s,a,l){var u=.5*(r+a),c=.5*(s+l),h=n>=u,d=i>=c,f=(d<<1)+h;t.leaf=!1,t=t.nodes[f]||(t.nodes[f]=si()),h?r=u:a=u,d?s=c:l=c,o(t,e,n,i,r,s,a,l)}var c,h,d,f,p,g,m,v,y,b=xt(a),_=xt(l);if(null!=e)g=e,m=n,v=i,y=r;else if(v=y=-(g=m=1/0),h=[],d=[],p=t.length,s)for(f=0;p>f;++f)c=t[f],c.x<g&&(g=c.x),c.y<m&&(m=c.y),c.x>v&&(v=c.x),c.y>y&&(y=c.y),h.push(c.x),d.push(c.y);else for(f=0;p>f;++f){var x=+b(c=t[f],f),w=+_(c,f);g>x&&(g=x),m>w&&(m=w),x>v&&(v=x),w>y&&(y=w),h.push(x),d.push(w)}var C=v-g,k=y-m;C>k?y=m+C:v=g+k;var T=si();if(T.add=function(t){o(T,t,+b(t,++f),+_(t,f),g,m,v,y)},T.visit=function(t){ai(t,T,g,m,v,y)},f=-1,null==e){for(;++f<p;)o(T,t[f],h[f],d[f],g,m,v,y);--f}else t.forEach(T.add);return h=d=t=c=null,T}var s,a=Cn,l=kn;return(s=arguments.length)?(a=ri,l=oi,3===s&&(r=n,i=e,n=e=0),o(t)):(o.x=function(t){return arguments.length?(a=t,o):a},o.y=function(t){return arguments.length?(l=t,o):l},o.extent=function(t){return arguments.length?(null==t?e=n=i=r=null:(e=+t[0][0],n=+t[0][1],i=+t[1][0],r=+t[1][1]),o):null==e?null:[[e,n],[i,r]]},o.size=function(t){return arguments.length?(null==t?e=n=i=r=null:(e=n=0,i=+t[0],r=+t[1]),o):null==e?null:[i-e,r-n]},o)},Xo.interpolateRgb=li,Xo.interpolateObject=ui,Xo.interpolateNumber=ci,Xo.interpolateString=hi;var tl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;Xo.interpolate=di,Xo.interpolators=[function(t,e){var n=typeof e;return("string"===n?Ys.has(e)||/^(#|rgb\(|hsl\()/.test(e)?li:hi:e instanceof G?li:"object"===n?Array.isArray(e)?fi:ui:ci)(t,e)}],Xo.interpolateArray=fi;var el=function(){return wt},nl=Xo.map({linear:el,poly:_i,quad:function(){return vi},cubic:function(){return yi},sin:function(){return xi},exp:function(){return wi},circle:function(){return Ci},elastic:ki,back:Ti,bounce:function(){return Di}}),il=Xo.map({"in":wt,out:gi,"in-out":mi,"out-in":function(t){return mi(gi(t))}});Xo.ease=function(t){var e=t.indexOf("-"),n=e>=0?t.substring(0,e):t,i=e>=0?t.substring(e+1):"in";return n=nl.get(n)||el,i=il.get(i)||wt,pi(i(n.apply(null,Vo.call(arguments,1))))},Xo.interpolateHcl=Mi,Xo.interpolateHsl=Si,Xo.interpolateLab=Ei,Xo.interpolateRound=Ni,Xo.transform=function(t){var e=Ko.createElementNS(Xo.ns.prefix.svg,"g");return(Xo.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new Ai(n?n.matrix:rl)})(t)},Ai.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var rl={a:1,b:0,c:0,d:1,e:0,f:0};Xo.interpolateTransform=Pi,Xo.layout={},Xo.layout.bundle=function(){return function(t){for(var e=[],n=-1,i=t.length;++n<i;)e.push(Li(t[n]));return e}},Xo.layout.chord=function(){function t(){var t,u,h,d,f,p={},g=[],m=Xo.range(o),v=[];for(n=[],i=[],t=0,d=-1;++d<o;){for(u=0,f=-1;++f<o;)u+=r[d][f];g.push(u),v.push(Xo.range(o)),t+=u}for(s&&m.sort(function(t,e){return s(g[t],g[e])}),a&&v.forEach(function(t,e){t.sort(function(t,n){return a(r[e][t],r[e][n])})}),t=(Ds-c*o)/t,u=0,d=-1;++d<o;){for(h=u,f=-1;++f<o;){var y=m[d],b=v[y][f],_=r[y][b],x=u,w=u+=_*t;p[y+"-"+b]={index:y,subindex:b,startAngle:x,endAngle:w,value:_}}i[y]={index:y,startAngle:h,endAngle:u,value:(u-h)/t},u+=c}for(d=-1;++d<o;)for(f=d-1;++f<o;){var C=p[d+"-"+f],k=p[f+"-"+d];(C.value||k.value)&&n.push(C.value<k.value?{source:k,target:C}:{source:C,target:k})}l&&e()}function e(){n.sort(function(t,e){return l((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)})}var n,i,r,o,s,a,l,u={},c=0;return u.matrix=function(t){return arguments.length?(o=(r=t)&&r.length,n=i=null,u):r},u.padding=function(t){return arguments.length?(c=t,n=i=null,u):c},u.sortGroups=function(t){return arguments.length?(s=t,n=i=null,u):s},u.sortSubgroups=function(t){return arguments.length?(a=t,n=null,u):a},u.sortChords=function(t){return arguments.length?(l=t,n&&e(),u):l},u.chords=function(){return n||t(),n},u.groups=function(){return i||t(),i},u},Xo.layout.force=function(){function t(t){return function(e,n,i,r){if(e.point!==t){var o=e.cx-t.x,s=e.cy-t.y,a=r-n,l=o*o+s*s;if(l>a*a/m){if(p>l){var u=e.charge/l;t.px-=o*u,t.py-=s*u}return!0}if(e.point&&l&&p>l){var u=e.pointCharge/l;t.px-=o*u,t.py-=s*u}}return!e.charge}}function e(t){t.px=Xo.event.x,t.py=Xo.event.y,a.resume()}var n,i,r,o,s,a={},l=Xo.dispatch("start","tick","end"),u=[1,1],c=.9,h=ol,d=sl,f=-30,p=al,g=.1,m=.64,v=[],y=[];return a.tick=function(){if((i*=.99)<.005)return l.end({type:"end",alpha:i=0}),!0;var e,n,a,h,d,p,m,b,_,x=v.length,w=y.length;for(n=0;w>n;++n)a=y[n],h=a.source,d=a.target,b=d.x-h.x,_=d.y-h.y,(p=b*b+_*_)&&(p=i*o[n]*((p=Math.sqrt(p))-r[n])/p,b*=p,_*=p,d.x-=b*(m=h.weight/(d.weight+h.weight)),d.y-=_*m,h.x+=b*(m=1-m),h.y+=_*m);if((m=i*g)&&(b=u[0]/2,_=u[1]/2,n=-1,m))for(;++n<x;)a=v[n],a.x+=(b-a.x)*m,a.y+=(_-a.y)*m;if(f)for(Ui(e=Xo.geom.quadtree(v),i,s),n=-1;++n<x;)(a=v[n]).fixed||e.visit(t(a));for(n=-1;++n<x;)a=v[n],a.fixed?(a.x=a.px,a.y=a.py):(a.x-=(a.px-(a.px=a.x))*c,a.y-=(a.py-(a.py=a.y))*c);l.tick({type:"tick",alpha:i})},a.nodes=function(t){return arguments.length?(v=t,a):v},a.links=function(t){return arguments.length?(y=t,a):y},a.size=function(t){return arguments.length?(u=t,a):u},a.linkDistance=function(t){return arguments.length?(h="function"==typeof t?t:+t,a):h},a.distance=a.linkDistance,a.linkStrength=function(t){return arguments.length?(d="function"==typeof t?t:+t,a):d},a.friction=function(t){return arguments.length?(c=+t,a):c},a.charge=function(t){return arguments.length?(f="function"==typeof t?t:+t,a):f},a.chargeDistance=function(t){return arguments.length?(p=t*t,a):Math.sqrt(p)},a.gravity=function(t){return arguments.length?(g=+t,a):g},a.theta=function(t){return arguments.length?(m=t*t,a):Math.sqrt(m)},a.alpha=function(t){return arguments.length?(t=+t,i?i=t>0?t:0:t>0&&(l.start({type:"start",alpha:i=t}),Xo.timer(a.tick)),a):i},a.start=function(){function t(t,i){if(!n){for(n=new Array(l),a=0;l>a;++a)n[a]=[];for(a=0;u>a;++a){var r=y[a];n[r.source.index].push(r.target),n[r.target.index].push(r.source)}}for(var o,s=n[e],a=-1,u=s.length;++a<u;)if(!isNaN(o=s[a][t]))return o;return Math.random()*i}var e,n,i,l=v.length,c=y.length,p=u[0],g=u[1];for(e=0;l>e;++e)(i=v[e]).index=e,i.weight=0;for(e=0;c>e;++e)i=y[e],"number"==typeof i.source&&(i.source=v[i.source]),"number"==typeof i.target&&(i.target=v[i.target]),++i.source.weight,++i.target.weight;for(e=0;l>e;++e)i=v[e],isNaN(i.x)&&(i.x=t("x",p)),isNaN(i.y)&&(i.y=t("y",g)),isNaN(i.px)&&(i.px=i.x),isNaN(i.py)&&(i.py=i.y);if(r=[],"function"==typeof h)for(e=0;c>e;++e)r[e]=+h.call(this,y[e],e);else for(e=0;c>e;++e)r[e]=h;if(o=[],"function"==typeof d)for(e=0;c>e;++e)o[e]=+d.call(this,y[e],e);else for(e=0;c>e;++e)o[e]=d;if(s=[],"function"==typeof f)for(e=0;l>e;++e)s[e]=+f.call(this,v[e],e);else for(e=0;l>e;++e)s[e]=f;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return n||(n=Xo.behavior.drag().origin(wt).on("dragstart.force",Ri).on("drag.force",e).on("dragend.force",qi)),arguments.length?void this.on("mouseover.force",Wi).on("mouseout.force",Bi).call(n):n},Xo.rebind(a,l,"on")};var ol=20,sl=1,al=1/0;Xo.layout.hierarchy=function(){function t(e,s,a){var l=r.call(n,e,s);if(e.depth=s,a.push(e),l&&(u=l.length)){for(var u,c,h=-1,d=e.children=new Array(u),f=0,p=s+1;++h<u;)c=d[h]=t(l[h],p,a),c.parent=e,f+=c.value;i&&d.sort(i),o&&(e.value=f)}else delete e.children,o&&(e.value=+o.call(n,e,s)||0);return e}function e(t,i){var r=t.children,s=0;if(r&&(a=r.length))for(var a,l=-1,u=i+1;++l<a;)s+=e(r[l],u);else o&&(s=+o.call(n,t,i)||0);return o&&(t.value=s),s}function n(e){var n=[];return t(e,0,n),n}var i=Qi,r=Xi,o=Vi;return n.sort=function(t){return arguments.length?(i=t,n):i},n.children=function(t){return arguments.length?(r=t,n):r},n.value=function(t){return arguments.length?(o=t,n):o},n.revalue=function(t){return e(t,0),t},n},Xo.layout.partition=function(){function t(e,n,i,r){var o=e.children;if(e.x=n,e.y=e.depth*r,e.dx=i,e.dy=r,o&&(s=o.length)){var s,a,l,u=-1;for(i=e.value?i/e.value:0;++u<s;)t(a=o[u],n,l=a.value*i,r),n+=l}}function e(t){var n=t.children,i=0;if(n&&(r=n.length))for(var r,o=-1;++o<r;)i=Math.max(i,e(n[o]));return 1+i}function n(n,o){var s=i.call(this,n,o);return t(s[0],0,r[0],r[1]/e(s[0])),s}var i=Xo.layout.hierarchy(),r=[1,1];return n.size=function(t){return arguments.length?(r=t,n):r},Yi(n,i)},Xo.layout.pie=function(){function t(o){var s=o.map(function(n,i){return+e.call(t,n,i)}),a=+("function"==typeof i?i.apply(this,arguments):i),l=(("function"==typeof r?r.apply(this,arguments):r)-a)/Xo.sum(s),u=Xo.range(o.length);null!=n&&u.sort(n===ll?function(t,e){return s[e]-s[t]}:function(t,e){return n(o[t],o[e])});var c=[];return u.forEach(function(t){var e;c[t]={data:o[t],value:e=s[t],startAngle:a,endAngle:a+=e*l}}),c}var e=Number,n=ll,i=0,r=Ds;return t.value=function(n){return arguments.length?(e=n,t):e},t.sort=function(e){return arguments.length?(n=e,t):n},t.startAngle=function(e){return arguments.length?(i=e,t):i},t.endAngle=function(e){return arguments.length?(r=e,t):r},t};var ll={};Xo.layout.stack=function(){function t(a,l){var u=a.map(function(n,i){return e.call(t,n,i)}),c=u.map(function(e){return e.map(function(e,n){return[o.call(t,e,n),s.call(t,e,n)]})}),h=n.call(t,c,l);u=Xo.permute(u,h),c=Xo.permute(c,h);var d,f,p,g=i.call(t,c,l),m=u.length,v=u[0].length;for(f=0;v>f;++f)for(r.call(t,u[0][f],p=g[f],c[0][f][1]),d=1;m>d;++d)r.call(t,u[d][f],p+=c[d-1][f][1],c[d][f][1]);return a}var e=wt,n=tr,i=er,r=Ji,o=Gi,s=Zi;return t.values=function(n){return arguments.length?(e=n,t):e},t.order=function(e){return arguments.length?(n="function"==typeof e?e:ul.get(e)||tr,t):n},t.offset=function(e){return arguments.length?(i="function"==typeof e?e:cl.get(e)||er,t):i},t.x=function(e){return arguments.length?(o=e,t):o},t.y=function(e){return arguments.length?(s=e,t):s},t.out=function(e){return arguments.length?(r=e,t):r},t};var ul=Xo.map({"inside-out":function(t){var e,n,i=t.length,r=t.map(nr),o=t.map(ir),s=Xo.range(i).sort(function(t,e){return r[t]-r[e]}),a=0,l=0,u=[],c=[];for(e=0;i>e;++e)n=s[e],l>a?(a+=o[n],u.push(n)):(l+=o[n],c.push(n));return c.reverse().concat(u)},reverse:function(t){return Xo.range(t.length).reverse()},"default":tr}),cl=Xo.map({silhouette:function(t){var e,n,i,r=t.length,o=t[0].length,s=[],a=0,l=[];for(n=0;o>n;++n){for(e=0,i=0;r>e;e++)i+=t[e][n][1];i>a&&(a=i),s.push(i)}for(n=0;o>n;++n)l[n]=(a-s[n])/2;return l},wiggle:function(t){var e,n,i,r,o,s,a,l,u,c=t.length,h=t[0],d=h.length,f=[];for(f[0]=l=u=0,n=1;d>n;++n){for(e=0,r=0;c>e;++e)r+=t[e][n][1];for(e=0,o=0,a=h[n][0]-h[n-1][0];c>e;++e){for(i=0,s=(t[e][n][1]-t[e][n-1][1])/(2*a);e>i;++i)s+=(t[i][n][1]-t[i][n-1][1])/a;o+=s*t[e][n][1]}f[n]=l-=r?o/r*a:0,u>l&&(u=l)}for(n=0;d>n;++n)f[n]-=u;return f},expand:function(t){var e,n,i,r=t.length,o=t[0].length,s=1/r,a=[];for(n=0;o>n;++n){for(e=0,i=0;r>e;e++)i+=t[e][n][1];if(i)for(e=0;r>e;e++)t[e][n][1]/=i;else for(e=0;r>e;e++)t[e][n][1]=s}for(n=0;o>n;++n)a[n]=0;return a},zero:er});Xo.layout.histogram=function(){function t(t,o){for(var s,a,l=[],u=t.map(n,this),c=i.call(this,u,o),h=r.call(this,c,u,o),o=-1,d=u.length,f=h.length-1,p=e?1:1/d;++o<f;)s=l[o]=[],s.dx=h[o+1]-(s.x=h[o]),s.y=0;if(f>0)for(o=-1;++o<d;)a=u[o],a>=c[0]&&a<=c[1]&&(s=l[Xo.bisect(h,a,1,f)-1],s.y+=p,s.push(t[o]));return l}var e=!0,n=Number,i=ar,r=or;return t.value=function(e){return arguments.length?(n=e,t):n},t.range=function(e){return arguments.length?(i=xt(e),t):i},t.bins=function(e){return arguments.length?(r="number"==typeof e?function(t){return sr(t,e)}:xt(e),t):r},t.frequency=function(n){return arguments.length?(e=!!n,t):e},t},Xo.layout.tree=function(){function t(t,o){function s(t,e){var i=t.children,r=t._tree;if(i&&(o=i.length)){for(var o,a,u,c=i[0],h=c,d=-1;++d<o;)u=i[d],s(u,a),h=l(u,a,h),a=u;mr(t);var f=.5*(c._tree.prelim+u._tree.prelim);e?(r.prelim=e._tree.prelim+n(t,e),r.mod=r.prelim-f):r.prelim=f}else e&&(r.prelim=e._tree.prelim+n(t,e))}function a(t,e){t.x=t._tree.prelim+e;var n=t.children;if(n&&(i=n.length)){var i,r=-1;for(e+=t._tree.mod;++r<i;)a(n[r],e)}}function l(t,e,i){if(e){for(var r,o=t,s=t,a=e,l=t.parent.children[0],u=o._tree.mod,c=s._tree.mod,h=a._tree.mod,d=l._tree.mod;a=cr(a),o=ur(o),a&&o;)l=ur(l),s=cr(s),s._tree.ancestor=t,r=a._tree.prelim+h-o._tree.prelim-u+n(a,o),r>0&&(vr(yr(a,t,i),t,r),u+=r,c+=r),h+=a._tree.mod,u+=o._tree.mod,d+=l._tree.mod,c+=s._tree.mod;a&&!cr(s)&&(s._tree.thread=a,s._tree.mod+=h-c),o&&!ur(l)&&(l._tree.thread=o,l._tree.mod+=u-d,i=t)}return i}var u=e.call(this,t,o),c=u[0];gr(c,function(t,e){t._tree={ancestor:t,prelim:0,mod:0,change:0,shift:0,number:e?e._tree.number+1:0}}),s(c),a(c,-c._tree.prelim);var h=hr(c,fr),d=hr(c,dr),f=hr(c,pr),p=h.x-n(h,d)/2,g=d.x+n(d,h)/2,m=f.depth||1;return gr(c,r?function(t){t.x*=i[0],t.y=t.depth*i[1],delete t._tree}:function(t){t.x=(t.x-p)/(g-p)*i[0],t.y=t.depth/m*i[1],delete t._tree}),u}var e=Xo.layout.hierarchy().sort(null).value(null),n=lr,i=[1,1],r=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(r=null==(i=e),t):r?null:i},t.nodeSize=function(e){return arguments.length?(r=null!=(i=e),t):r?i:null},Yi(t,e)},Xo.layout.pack=function(){function t(t,o){var s=n.call(this,t,o),a=s[0],l=r[0],u=r[1],c=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(a.x=a.y=0,gr(a,function(t){t.r=+c(t.value)}),gr(a,Cr),i){var h=i*(e?1:Math.max(2*a.r/l,2*a.r/u))/2;gr(a,function(t){t.r+=h}),gr(a,Cr),gr(a,function(t){t.r-=h})}return Dr(a,l/2,u/2,e?1:1/Math.max(2*a.r/l,2*a.r/u)),s}var e,n=Xo.layout.hierarchy().sort(br),i=0,r=[1,1];return t.size=function(e){return arguments.length?(r=e,t):r},t.radius=function(n){return arguments.length?(e=null==n||"function"==typeof n?n:+n,t):e},t.padding=function(e){return arguments.length?(i=+e,t):i},Yi(t,n)},Xo.layout.cluster=function(){function t(t,o){var s,a=e.call(this,t,o),l=a[0],u=0;gr(l,function(t){var e=t.children;e&&e.length?(t.x=Er(e),t.y=Sr(e)):(t.x=s?u+=n(t,s):0,t.y=0,s=t)});var c=Nr(l),h=Ar(l),d=c.x-n(c,h)/2,f=h.x+n(h,c)/2;return gr(l,r?function(t){t.x=(t.x-l.x)*i[0],t.y=(l.y-t.y)*i[1]}:function(t){t.x=(t.x-d)/(f-d)*i[0],t.y=(1-(l.y?t.y/l.y:1))*i[1]}),a}var e=Xo.layout.hierarchy().sort(null).value(null),n=lr,i=[1,1],r=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(r=null==(i=e),t):r?null:i},t.nodeSize=function(e){return arguments.length?(r=null!=(i=e),t):r?i:null},Yi(t,e)},Xo.layout.treemap=function(){function t(t,e){for(var n,i,r=-1,o=t.length;++r<o;)i=(n=t[r]).value*(0>e?0:e),n.area=isNaN(i)||0>=i?0:i}function e(n){var o=n.children;if(o&&o.length){var s,a,l,u=h(n),c=[],d=o.slice(),p=1/0,g="slice"===f?u.dx:"dice"===f?u.dy:"slice-dice"===f?1&n.depth?u.dy:u.dx:Math.min(u.dx,u.dy);for(t(d,u.dx*u.dy/n.value),c.area=0;(l=d.length)>0;)c.push(s=d[l-1]),c.area+=s.area,"squarify"!==f||(a=i(c,g))<=p?(d.pop(),p=a):(c.area-=c.pop().area,r(c,g,u,!1),g=Math.min(u.dx,u.dy),c.length=c.area=0,p=1/0);c.length&&(r(c,g,u,!0),c.length=c.area=0),o.forEach(e)}}function n(e){var i=e.children;if(i&&i.length){var o,s=h(e),a=i.slice(),l=[];for(t(a,s.dx*s.dy/e.value),l.area=0;o=a.pop();)l.push(o),l.area+=o.area,null!=o.z&&(r(l,o.z?s.dx:s.dy,s,!a.length),l.length=l.area=0);i.forEach(n)}}function i(t,e){for(var n,i=t.area,r=0,o=1/0,s=-1,a=t.length;++s<a;)(n=t[s].area)&&(o>n&&(o=n),n>r&&(r=n));return i*=i,e*=e,i?Math.max(e*r*p/i,i/(e*o*p)):1/0}function r(t,e,n,i){var r,o=-1,s=t.length,a=n.x,u=n.y,c=e?l(t.area/e):0;if(e==n.dx){for((i||c>n.dy)&&(c=n.dy);++o<s;)r=t[o],r.x=a,r.y=u,r.dy=c,a+=r.dx=Math.min(n.x+n.dx-a,c?l(r.area/c):0);r.z=!0,r.dx+=n.x+n.dx-a,n.y+=c,n.dy-=c}else{for((i||c>n.dx)&&(c=n.dx);++o<s;)r=t[o],r.x=a,r.y=u,r.dx=c,u+=r.dy=Math.min(n.y+n.dy-u,c?l(r.area/c):0);r.z=!1,r.dy+=n.y+n.dy-u,n.x+=c,n.dx-=c}}function o(i){var r=s||a(i),o=r[0];return o.x=0,o.y=0,o.dx=u[0],o.dy=u[1],s&&a.revalue(o),t([o],o.dx*o.dy/o.value),(s?n:e)(o),d&&(s=r),r}var s,a=Xo.layout.hierarchy(),l=Math.round,u=[1,1],c=null,h=jr,d=!1,f="squarify",p=.5*(1+Math.sqrt(5));return o.size=function(t){return arguments.length?(u=t,o):u},o.padding=function(t){function e(e){var n=t.call(o,e,e.depth);return null==n?jr(e):Ir(e,"number"==typeof n?[n,n,n,n]:n)}function n(e){return Ir(e,t)}if(!arguments.length)return c;var i;return h=null==(c=t)?jr:"function"==(i=typeof t)?e:"number"===i?(t=[t,t,t,t],n):n,o},o.round=function(t){return arguments.length?(l=t?Math.round:Number,o):l!=Number},o.sticky=function(t){return arguments.length?(d=t,s=null,o):d},o.ratio=function(t){return arguments.length?(p=t,o):p},o.mode=function(t){return arguments.length?(f=t+"",o):f},Yi(o,a)},Xo.random={normal:function(t,e){var n=arguments.length;return 2>n&&(e=1),1>n&&(t=0),function(){var n,i,r;do n=2*Math.random()-1,i=2*Math.random()-1,r=n*n+i*i;while(!r||r>1);return t+e*n*Math.sqrt(-2*Math.log(r)/r)}},logNormal:function(){var t=Xo.random.normal.apply(Xo,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=Xo.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;t>n;n++)e+=Math.random();return e}}},
Xo.scale={};var hl={floor:wt,ceil:wt};Xo.scale.linear=function(){return Or([0,1],[0,1],di,!1)};var dl={s:1,g:1,p:1,r:1,e:1};Xo.scale.log=function(){return Vr(Xo.scale.linear().domain([0,1]),10,!0,[1,10])};var fl=Xo.format(".0e"),pl={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};Xo.scale.pow=function(){return Qr(Xo.scale.linear(),1,[0,1])},Xo.scale.sqrt=function(){return Xo.scale.pow().exponent(.5)},Xo.scale.ordinal=function(){return Gr([],{t:"range",a:[[]]})},Xo.scale.category10=function(){return Xo.scale.ordinal().range(gl)},Xo.scale.category20=function(){return Xo.scale.ordinal().range(ml)},Xo.scale.category20b=function(){return Xo.scale.ordinal().range(vl)},Xo.scale.category20c=function(){return Xo.scale.ordinal().range(yl)};var gl=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(dt),ml=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(dt),vl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(dt),yl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(dt);Xo.scale.quantile=function(){return Zr([],[])},Xo.scale.quantize=function(){return Jr(0,1,[0,1])},Xo.scale.threshold=function(){return to([.5],[0,1])},Xo.scale.identity=function(){return eo([0,1])},Xo.svg={},Xo.svg.arc=function(){function t(){var t=e.apply(this,arguments),o=n.apply(this,arguments),s=i.apply(this,arguments)+bl,a=r.apply(this,arguments)+bl,l=(s>a&&(l=s,s=a,a=l),a-s),u=Ts>l?"0":"1",c=Math.cos(s),h=Math.sin(s),d=Math.cos(a),f=Math.sin(a);return l>=_l?t?"M0,"+o+"A"+o+","+o+" 0 1,1 0,"+-o+"A"+o+","+o+" 0 1,1 0,"+o+"M0,"+t+"A"+t+","+t+" 0 1,0 0,"+-t+"A"+t+","+t+" 0 1,0 0,"+t+"Z":"M0,"+o+"A"+o+","+o+" 0 1,1 0,"+-o+"A"+o+","+o+" 0 1,1 0,"+o+"Z":t?"M"+o*c+","+o*h+"A"+o+","+o+" 0 "+u+",1 "+o*d+","+o*f+"L"+t*d+","+t*f+"A"+t+","+t+" 0 "+u+",0 "+t*c+","+t*h+"Z":"M"+o*c+","+o*h+"A"+o+","+o+" 0 "+u+",1 "+o*d+","+o*f+"L0,0Z"}var e=no,n=io,i=ro,r=oo;return t.innerRadius=function(n){return arguments.length?(e=xt(n),t):e},t.outerRadius=function(e){return arguments.length?(n=xt(e),t):n},t.startAngle=function(e){return arguments.length?(i=xt(e),t):i},t.endAngle=function(e){return arguments.length?(r=xt(e),t):r},t.centroid=function(){var t=(e.apply(this,arguments)+n.apply(this,arguments))/2,o=(i.apply(this,arguments)+r.apply(this,arguments))/2+bl;return[Math.cos(o)*t,Math.sin(o)*t]},t};var bl=-Ms,_l=Ds-Ss;Xo.svg.line=function(){return so(wt)};var xl=Xo.map({linear:ao,"linear-closed":lo,step:uo,"step-before":co,"step-after":ho,basis:yo,"basis-open":bo,"basis-closed":_o,bundle:xo,cardinal:go,"cardinal-open":fo,"cardinal-closed":po,monotone:Mo});xl.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var wl=[0,2/3,1/3,0],Cl=[0,1/3,2/3,0],kl=[0,1/6,2/3,1/6];Xo.svg.line.radial=function(){var t=so(So);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},co.reverse=ho,ho.reverse=co,Xo.svg.area=function(){return Eo(wt)},Xo.svg.area.radial=function(){var t=Eo(So);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},Xo.svg.chord=function(){function t(t,a){var l=e(this,o,t,a),u=e(this,s,t,a);return"M"+l.p0+i(l.r,l.p1,l.a1-l.a0)+(n(l,u)?r(l.r,l.p1,l.r,l.p0):r(l.r,l.p1,u.r,u.p0)+i(u.r,u.p1,u.a1-u.a0)+r(u.r,u.p1,l.r,l.p0))+"Z"}function e(t,e,n,i){var r=e.call(t,n,i),o=a.call(t,r,i),s=l.call(t,r,i)+bl,c=u.call(t,r,i)+bl;return{r:o,a0:s,a1:c,p0:[o*Math.cos(s),o*Math.sin(s)],p1:[o*Math.cos(c),o*Math.sin(c)]}}function n(t,e){return t.a0==e.a0&&t.a1==e.a1}function i(t,e,n){return"A"+t+","+t+" 0 "+ +(n>Ts)+",1 "+e}function r(t,e,n,i){return"Q 0,0 "+i}var o=fn,s=pn,a=No,l=ro,u=oo;return t.radius=function(e){return arguments.length?(a=xt(e),t):a},t.source=function(e){return arguments.length?(o=xt(e),t):o},t.target=function(e){return arguments.length?(s=xt(e),t):s},t.startAngle=function(e){return arguments.length?(l=xt(e),t):l},t.endAngle=function(e){return arguments.length?(u=xt(e),t):u},t},Xo.svg.diagonal=function(){function t(t,r){var o=e.call(this,t,r),s=n.call(this,t,r),a=(o.y+s.y)/2,l=[o,{x:o.x,y:a},{x:s.x,y:a},s];return l=l.map(i),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var e=fn,n=pn,i=Ao;return t.source=function(n){return arguments.length?(e=xt(n),t):e},t.target=function(e){return arguments.length?(n=xt(e),t):n},t.projection=function(e){return arguments.length?(i=e,t):i},t},Xo.svg.diagonal.radial=function(){var t=Xo.svg.diagonal(),e=Ao,n=t.projection;return t.projection=function(t){return arguments.length?n(jo(e=t)):e},t},Xo.svg.symbol=function(){function t(t,i){return(Tl.get(e.call(this,t,i))||Po)(n.call(this,t,i))}var e=$o,n=Io;return t.type=function(n){return arguments.length?(e=xt(n),t):e},t.size=function(e){return arguments.length?(n=xt(e),t):n},t};var Tl=Xo.map({circle:Po,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*El)),n=e*El;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Sl),n=e*Sl/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Sl),n=e*Sl/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});Xo.svg.symbolTypes=Tl.keys();var Dl,Ml,Sl=Math.sqrt(3),El=Math.tan(30*Ns),Nl=[],Al=0;Nl.call=vs.call,Nl.empty=vs.empty,Nl.node=vs.node,Nl.size=vs.size,Xo.transition=function(t){return arguments.length?Dl?t.transition():t:_s.transition()},Xo.transition.prototype=Nl,Nl.select=function(t){var e,n,i,r=this.id,o=[];t=_(t);for(var s=-1,a=this.length;++s<a;){o.push(e=[]);for(var l=this[s],u=-1,c=l.length;++u<c;)(i=l[u])&&(n=t.call(i,i.__data__,u,s))?("__data__"in i&&(n.__data__=i.__data__),zo(n,u,r,i.__transition__[r]),e.push(n)):e.push(null)}return Ho(o,r)},Nl.selectAll=function(t){var e,n,i,r,o,s=this.id,a=[];t=x(t);for(var l=-1,u=this.length;++l<u;)for(var c=this[l],h=-1,d=c.length;++h<d;)if(i=c[h]){o=i.__transition__[s],n=t.call(i,i.__data__,h,l),a.push(e=[]);for(var f=-1,p=n.length;++f<p;)(r=n[f])&&zo(r,f,s,o),e.push(r)}return Ho(a,s)},Nl.filter=function(t){var e,n,i,r=[];"function"!=typeof t&&(t=j(t));for(var o=0,s=this.length;s>o;o++){r.push(e=[]);for(var n=this[o],a=0,l=n.length;l>a;a++)(i=n[a])&&t.call(i,i.__data__,a,o)&&e.push(i)}return Ho(r,this.id)},Nl.tween=function(t,e){var n=this.id;return arguments.length<2?this.node().__transition__[n].tween.get(t):$(this,null==e?function(e){e.__transition__[n].tween.remove(t)}:function(i){i.__transition__[n].tween.set(t,e)})},Nl.attr=function(t,e){function n(){this.removeAttribute(a)}function i(){this.removeAttributeNS(a.space,a.local)}function r(t){return null==t?n:(t+="",function(){var e,n=this.getAttribute(a);return n!==t&&(e=s(n,t),function(t){this.setAttribute(a,e(t))})})}function o(t){return null==t?i:(t+="",function(){var e,n=this.getAttributeNS(a.space,a.local);return n!==t&&(e=s(n,t),function(t){this.setAttributeNS(a.space,a.local,e(t))})})}if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var s="transform"==t?Pi:di,a=Xo.ns.qualify(t);return Fo(this,"attr."+t,e,a.local?o:r)},Nl.attrTween=function(t,e){function n(t,n){var i=e.call(this,t,n,this.getAttribute(r));return i&&function(t){this.setAttribute(r,i(t))}}function i(t,n){var i=e.call(this,t,n,this.getAttributeNS(r.space,r.local));return i&&function(t){this.setAttributeNS(r.space,r.local,i(t))}}var r=Xo.ns.qualify(t);return this.tween("attr."+t,r.local?i:n)},Nl.style=function(t,e,n){function i(){this.style.removeProperty(t)}function r(e){return null==e?i:(e+="",function(){var i,r=Zo.getComputedStyle(this,null).getPropertyValue(t);return r!==e&&(i=di(r,e),function(e){this.style.setProperty(t,i(e),n)})})}var o=arguments.length;if(3>o){if("string"!=typeof t){2>o&&(e="");for(n in t)this.style(n,t[n],e);return this}n=""}return Fo(this,"style."+t,e,r)},Nl.styleTween=function(t,e,n){function i(i,r){var o=e.call(this,i,r,Zo.getComputedStyle(this,null).getPropertyValue(t));return o&&function(e){this.style.setProperty(t,o(e),n)}}return arguments.length<3&&(n=""),this.tween("style."+t,i)},Nl.text=function(t){return Fo(this,"text",t,Lo)},Nl.remove=function(){return this.each("end.transition",function(){var t;this.__transition__.count<2&&(t=this.parentNode)&&t.removeChild(this)})},Nl.ease=function(t){var e=this.id;return arguments.length<1?this.node().__transition__[e].ease:("function"!=typeof t&&(t=Xo.ease.apply(Xo,arguments)),$(this,function(n){n.__transition__[e].ease=t}))},Nl.delay=function(t){var e=this.id;return $(this,"function"==typeof t?function(n,i,r){n.__transition__[e].delay=+t.call(n,n.__data__,i,r)}:(t=+t,function(n){n.__transition__[e].delay=t}))},Nl.duration=function(t){var e=this.id;return $(this,"function"==typeof t?function(n,i,r){n.__transition__[e].duration=Math.max(1,t.call(n,n.__data__,i,r))}:(t=Math.max(1,t),function(n){n.__transition__[e].duration=t}))},Nl.each=function(t,e){var n=this.id;if(arguments.length<2){var i=Ml,r=Dl;Dl=n,$(this,function(e,i,r){Ml=e.__transition__[n],t.call(e,e.__data__,i,r)}),Ml=i,Dl=r}else $(this,function(i){var r=i.__transition__[n];(r.event||(r.event=Xo.dispatch("start","end"))).on(t,e)});return this},Nl.transition=function(){for(var t,e,n,i,r=this.id,o=++Al,s=[],a=0,l=this.length;l>a;a++){s.push(t=[]);for(var e=this[a],u=0,c=e.length;c>u;u++)(n=e[u])&&(i=Object.create(n.__transition__[r]),i.delay+=i.duration,zo(n,u,o,i)),t.push(n)}return Ho(s,o)},Xo.svg.axis=function(){function t(t){t.each(function(){var t,u=Xo.select(this),c=this.__chart__||n,h=this.__chart__=n.copy(),d=null==l?h.ticks?h.ticks.apply(h,a):h.domain():l,f=null==e?h.tickFormat?h.tickFormat.apply(h,a):wt:e,p=u.selectAll(".tick").data(d,h),g=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Ss),m=Xo.transition(p.exit()).style("opacity",Ss).remove(),v=Xo.transition(p).style("opacity",1),y=Pr(h),b=u.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),Xo.transition(b));g.append("line"),g.append("text");var x=g.select("line"),w=v.select("line"),C=p.select("text").text(f),k=g.select("text"),T=v.select("text");switch(i){case"bottom":t=Oo,x.attr("y2",r),k.attr("y",Math.max(r,0)+s),w.attr("x2",0).attr("y2",r),T.attr("x",0).attr("y",Math.max(r,0)+s),C.attr("dy",".71em").style("text-anchor","middle"),_.attr("d","M"+y[0]+","+o+"V0H"+y[1]+"V"+o);break;case"top":t=Oo,x.attr("y2",-r),k.attr("y",-(Math.max(r,0)+s)),w.attr("x2",0).attr("y2",-r),T.attr("x",0).attr("y",-(Math.max(r,0)+s)),C.attr("dy","0em").style("text-anchor","middle"),_.attr("d","M"+y[0]+","+-o+"V0H"+y[1]+"V"+-o);break;case"left":t=Ro,x.attr("x2",-r),k.attr("x",-(Math.max(r,0)+s)),w.attr("x2",-r).attr("y2",0),T.attr("x",-(Math.max(r,0)+s)).attr("y",0),C.attr("dy",".32em").style("text-anchor","end"),_.attr("d","M"+-o+","+y[0]+"H0V"+y[1]+"H"+-o);break;case"right":t=Ro,x.attr("x2",r),k.attr("x",Math.max(r,0)+s),w.attr("x2",r).attr("y2",0),T.attr("x",Math.max(r,0)+s).attr("y",0),C.attr("dy",".32em").style("text-anchor","start"),_.attr("d","M"+o+","+y[0]+"H0V"+y[1]+"H"+o)}if(h.rangeBand){var D=h,M=D.rangeBand()/2;c=h=function(t){return D(t)+M}}else c.rangeBand?c=h:m.call(t,h);g.call(t,c),v.call(t,h)})}var e,n=Xo.scale.linear(),i=jl,r=6,o=6,s=3,a=[10],l=null;return t.scale=function(e){return arguments.length?(n=e,t):n},t.orient=function(e){return arguments.length?(i=e in Il?e+"":jl,t):i},t.ticks=function(){return arguments.length?(a=arguments,t):a},t.tickValues=function(e){return arguments.length?(l=e,t):l},t.tickFormat=function(n){return arguments.length?(e=n,t):e},t.tickSize=function(e){var n=arguments.length;return n?(r=+e,o=+arguments[n-1],t):r},t.innerTickSize=function(e){return arguments.length?(r=+e,t):r},t.outerTickSize=function(e){return arguments.length?(o=+e,t):o},t.tickPadding=function(e){return arguments.length?(s=+e,t):s},t.tickSubdivide=function(){return arguments.length&&t},t};var jl="bottom",Il={top:1,right:1,bottom:1,left:1};Xo.svg.brush=function(){function t(o){o.each(function(){var o=Xo.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",r).on("touchstart.brush",r),s=o.selectAll(".background").data([0]);s.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),o.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=o.selectAll(".resize").data(p,wt);a.exit().remove(),a.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return $l[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",t.empty()?"none":null);var c,h=Xo.transition(o),d=Xo.transition(s);l&&(c=Pr(l),d.attr("x",c[0]).attr("width",c[1]-c[0]),n(h)),u&&(c=Pr(u),d.attr("y",c[0]).attr("height",c[1]-c[0]),i(h)),e(h)})}function e(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+c[+/e$/.test(t)]+","+h[+/^s/.test(t)]+")"})}function n(t){t.select(".extent").attr("x",c[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",c[1]-c[0])}function i(t){t.select(".extent").attr("y",h[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function r(){function r(){32==Xo.event.keyCode&&(S||(b=null,N[0]-=c[1],N[1]-=h[1],S=2),m())}function p(){32==Xo.event.keyCode&&2==S&&(N[0]+=c[1],N[1]+=h[1],S=0,m())}function g(){var t=Xo.mouse(x),r=!1;_&&(t[0]+=_[0],t[1]+=_[1]),S||(Xo.event.altKey?(b||(b=[(c[0]+c[1])/2,(h[0]+h[1])/2]),N[0]=c[+(t[0]<b[0])],N[1]=h[+(t[1]<b[1])]):b=null),D&&v(t,l,0)&&(n(k),r=!0),M&&v(t,u,1)&&(i(k),r=!0),r&&(e(k),C({type:"brush",mode:S?"move":"resize"}))}function v(t,e,n){var i,r,a=Pr(e),l=a[0],u=a[1],p=N[n],g=n?h:c,m=g[1]-g[0];return S&&(l-=p,u-=m+p),i=(n?f:d)?Math.max(l,Math.min(u,t[n])):t[n],S?r=(i+=p)+m:(b&&(p=Math.max(l,Math.min(u,2*b[n]-i))),i>p?(r=i,i=p):r=p),g[0]!=i||g[1]!=r?(n?s=null:o=null,g[0]=i,g[1]=r,!0):void 0}function y(){g(),k.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),Xo.select("body").style("cursor",null),A.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),E(),C({type:"brushend"})}var b,_,x=this,w=Xo.select(Xo.event.target),C=a.of(x,arguments),k=Xo.select(x),T=w.datum(),D=!/^(n|s)$/.test(T)&&l,M=!/^(e|w)$/.test(T)&&u,S=w.classed("extent"),E=R(),N=Xo.mouse(x),A=Xo.select(Zo).on("keydown.brush",r).on("keyup.brush",p);if(Xo.event.changedTouches?A.on("touchmove.brush",g).on("touchend.brush",y):A.on("mousemove.brush",g).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),S)N[0]=c[0]-N[0],N[1]=h[0]-N[1];else if(T){var j=+/w$/.test(T),I=+/^n/.test(T);_=[c[1-j]-N[0],h[1-I]-N[1]],N[0]=c[j],N[1]=h[I]}else Xo.event.altKey&&(b=N.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),Xo.select("body").style("cursor",w.style("cursor")),C({type:"brushstart"}),g()}var o,s,a=y(t,"brushstart","brush","brushend"),l=null,u=null,c=[0,0],h=[0,0],d=!0,f=!0,p=Pl[0];return t.event=function(t){t.each(function(){var t=a.of(this,arguments),e={x:c,y:h,i:o,j:s},n=this.__chart__||e;this.__chart__=e,Dl?Xo.select(this).transition().each("start.brush",function(){o=n.i,s=n.j,c=n.x,h=n.y,t({type:"brushstart"})}).tween("brush:brush",function(){var n=fi(c,e.x),i=fi(h,e.y);return o=s=null,function(r){c=e.x=n(r),h=e.y=i(r),t({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=e.i,s=e.j,t({type:"brush",mode:"resize"}),t({type:"brushend"})}):(t({type:"brushstart"}),t({type:"brush",mode:"resize"}),t({type:"brushend"}))})},t.x=function(e){return arguments.length?(l=e,p=Pl[!l<<1|!u],t):l},t.y=function(e){return arguments.length?(u=e,p=Pl[!l<<1|!u],t):u},t.clamp=function(e){return arguments.length?(l&&u?(d=!!e[0],f=!!e[1]):l?d=!!e:u&&(f=!!e),t):l&&u?[d,f]:l?d:u?f:null},t.extent=function(e){var n,i,r,a,d;return arguments.length?(l&&(n=e[0],i=e[1],u&&(n=n[0],i=i[0]),o=[n,i],l.invert&&(n=l(n),i=l(i)),n>i&&(d=n,n=i,i=d),(n!=c[0]||i!=c[1])&&(c=[n,i])),u&&(r=e[0],a=e[1],l&&(r=r[1],a=a[1]),s=[r,a],u.invert&&(r=u(r),a=u(a)),r>a&&(d=r,r=a,a=d),(r!=h[0]||a!=h[1])&&(h=[r,a])),t):(l&&(o?(n=o[0],i=o[1]):(n=c[0],i=c[1],l.invert&&(n=l.invert(n),i=l.invert(i)),n>i&&(d=n,n=i,i=d))),u&&(s?(r=s[0],a=s[1]):(r=h[0],a=h[1],u.invert&&(r=u.invert(r),a=u.invert(a)),r>a&&(d=r,r=a,a=d))),l&&u?[[n,r],[i,a]]:l?[n,i]:u&&[r,a])},t.clear=function(){return t.empty()||(c=[0,0],h=[0,0],o=s=null),t},t.empty=function(){return!!l&&c[0]==c[1]||!!u&&h[0]==h[1]},Xo.rebind(t,a,"on")};var $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Pl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Hl=na.format=la.timeFormat,Fl=Hl.utc,Ll=Fl("%Y-%m-%dT%H:%M:%S.%LZ");Hl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?qo:Ll,qo.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},qo.toString=Ll.toString,na.second=$t(function(t){return new ia(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),na.seconds=na.second.range,na.seconds.utc=na.second.utc.range,na.minute=$t(function(t){return new ia(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),na.minutes=na.minute.range,na.minutes.utc=na.minute.utc.range,na.hour=$t(function(t){var e=t.getTimezoneOffset()/60;return new ia(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),na.hours=na.hour.range,na.hours.utc=na.hour.utc.range,na.month=$t(function(t){return t=na.day(t),t.setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),na.months=na.month.range,na.months.utc=na.month.utc.range;var zl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ol=[[na.second,1],[na.second,5],[na.second,15],[na.second,30],[na.minute,1],[na.minute,5],[na.minute,15],[na.minute,30],[na.hour,1],[na.hour,3],[na.hour,6],[na.hour,12],[na.day,1],[na.day,2],[na.week,1],[na.month,1],[na.month,3],[na.year,1]],Rl=Hl.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",we]]),ql={range:function(t,e,n){return Xo.range(+t,+e,n).map(Bo)},floor:wt,ceil:wt};Ol.year=na.year,na.scale=function(){return Wo(Xo.scale.linear(),Ol,Rl)};var Wl=Ol.map(function(t){return[t[0].utc,t[1]]}),Bl=Fl.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",we]]);Wl.year=na.year.utc,na.scale.utc=function(){return Wo(Xo.scale.linear(),Wl,Bl)},Xo.text=Ct(function(t){return t.responseText}),Xo.json=function(t,e){return kt(t,"application/json",Uo,e)},Xo.html=function(t,e){return kt(t,"text/html",Yo,e)},Xo.xml=Ct(function(t){return t.responseXML}),"function"==typeof define&&define.amd?define(Xo):"object"==typeof module&&module.exports?module.exports=Xo:this.d3=Xo}(),function(){var t,e,n,i,r,o,s,a,l,u,c,h,d,f,p,g,m,v;n=function(){return document.querySelectorAll&&document.addEventListener},n()&&(isNaN(Date.parse("2011-01-01T12:00:00-05:00"))&&(a=Date.parse,r=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(Z|[-+]?[\d:]+)$/,Date.parse=function(t){var e,n,i,o,s,l,u,c,h,d;return t=t.toString(),(o=t.match(r))&&(e=o[0],h=o[1],l=o[2],n=o[3],i=o[4],s=o[5],c=o[6],d=o[7],"Z"!==d&&(u=d.replace(":","")),t=h+"/"+l+"/"+n+" "+i+":"+s+":"+c+" GMT"+[u]),a(t)}),v="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),o="January February March April May June July August September October November December".split(" "),s=function(t){return("0"+t).slice(-2)},l=function(t){var e,n,i,r,o;return o=t.toString(),(e=null!=(n=o.match(/\(([\w\s]+)\)$/))?n[1]:void 0)?/\s/.test(e)?e.match(/\b(\w)/g).join(""):e:(e=null!=(i=o.match(/(\w{3,4})\s\d{4}$/))?i[1]:void 0)?e:(e=null!=(r=o.match(/(UTC[\+\-]\d+)/))?r[1]:void 0)?e:""},g=function(t,e){var n,i,r,a,u,c,h;return i=t.getDay(),n=t.getDate(),u=t.getMonth(),h=t.getFullYear(),r=t.getHours(),a=t.getMinutes(),c=t.getSeconds(),e.replace(/%([%aAbBcdeHIlmMpPSwyYZ])/g,function(e){var d,f;switch(d=e[0],f=e[1]){case"%":return"%";case"a":return v[i].slice(0,3);case"A":return v[i];case"b":return o[u].slice(0,3);case"B":return o[u];case"c":return t.toString();case"d":return s(n);case"e":return n;case"H":return s(r);case"I":return s(g(t,"%l"));case"l":return 0===r||12===r?12:(r+12)%12;case"m":return s(u+1);case"M":return s(a);case"p":return r>11?"PM":"AM";case"P":return r>11?"pm":"am";case"S":return s(c);case"w":return i;case"y":return s(h%100);case"Y":return h;case"Z":return l(t)}})},t=function(){function t(t,e,n){this.date=new Date(Date.UTC(t,e-1)),this.date.setUTCDate(n),this.year=this.date.getUTCFullYear(),this.month=this.date.getUTCMonth()+1,this.day=this.date.getUTCDate(),this.value=this.date.getTime()}return t.fromDate=function(t){return new this(t.getFullYear(),t.getMonth()+1,t.getDate())},t.today=function(){return this.fromDate(new Date)},t.prototype.equals=function(t){return(null!=t?t.value:void 0)===this.value},t.prototype.is=function(t){return this.equals(t)},t.prototype.isToday=function(){return this.is(this.constructor.today())},t.prototype.occursOnSameYearAs=function(t){return this.year===(null!=t?t.year:void 0)},t.prototype.occursThisYear=function(){return this.occursOnSameYearAs(this.constructor.today())},t.prototype.daysSince=function(t){return t?(this.date-t.date)/864e5:void 0},t.prototype.daysPassed=function(){return this.constructor.today().daysSince(this)},t}(),e=function(){function e(e){this.date=e,this.calendarDate=t.fromDate(this.date)}return e.prototype.toString=function(){var t,e;return(t=this.timeElapsed())?t+" ago":(e=this.relativeWeekday())?e+" at "+this.formatTime():"on "+this.formatDate()},e.prototype.toTimeOrDateString=function(){return this.calendarDate.isToday()?this.formatTime():this.formatDate()},e.prototype.timeElapsed=function(){var t,e,n,i;return n=(new Date).getTime()-this.date.getTime(),i=Math.round(n/1e3),e=Math.round(i/60),t=Math.round(e/60),0>n?null:10>i?"a second":45>i?i+" seconds":90>i?"a minute":45>e?e+" minutes":90>e?"an hour":24>t?t+" hours":null},e.prototype.relativeWeekday=function(){switch(this.calendarDate.daysPassed()){case 0:return"today";case 1:return"yesterday";case 2:case 3:case 4:case 5:case 6:return g(this.date,"%A")}},e.prototype.formatDate=function(){var t;return t="%b %e",this.calendarDate.occursThisYear()||(t+=", %Y"),g(this.date,t)},e.prototype.formatTime=function(){return g(this.date,"%l:%M%P")},e}(),c=function(t){return new e(t).formatDate()},h=function(t){return new e(t).toString()},d=function(t){return new e(t).toTimeOrDateString()},f=function(t){var n;return(n=new e(t).relativeWeekday())?n.charAt(0).toUpperCase()+n.substring(1):void 0},i=!1,m=function(t){return i&&t(),document.addEventListener("time:elapse",t),("undefined"!=typeof Turbolinks&&null!==Turbolinks?Turbolinks.supported:void 0)?document.addEventListener("page:update",t):"function"==typeof jQuery?jQuery(document).on("ajaxSuccess",function(e,n){return jQuery.trim(n.responseText)?t():void 0}):void 0},u=function(t,e){return m(function(){var n,i,r,o,s;for(o=document.querySelectorAll(t),s=[],i=0,r=o.length;r>i;i++)n=o[i],s.push(e(n));return s})},document.addEventListener("DOMContentLoaded",function(){var t;return i=!0,t="textContent"in document.body?"textContent":"innerText",u("time[data-local]:not([data-localized])",function(e){var n,i,r,o;return n=e.getAttribute("datetime"),i=e.getAttribute("data-format"),r=e.getAttribute("data-local"),o=new Date(Date.parse(n)),isNaN(o)?void 0:(e.hasAttribute("title")||e.setAttribute("title",g(o,"%B %e, %Y at %l:%M%P %Z")),e[t]=function(){var t,n;switch(r){case"date":return e.setAttribute("data-localized",!0),c(o);case"time":return e.setAttribute("data-localized",!0),g(o,i);case"time-ago":return h(o);case"time-or-date":return d(o);case"weekday":return null!=(t=f(o))?t:"";case"weekday-or-date":return null!=(n=f(o))?n:c(o)}}())})}),p=function(){var t;return t=document.createEvent("Events"),t.initEvent("time:elapse",!0,!0),document.dispatchEvent(t)},setInterval(p,6e4),this.LocalTime={relativeDate:c,relativeTimeAgo:h,relativeTimeOrDate:d,relativeWeekday:f,run:p,strftime:g})}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};!function(e,n,i){var r,o,s;return s="breadcrums",o={property:"value"},r=function(){function n(n,i){this.element=n,this.insertElement=t(this.insertElement,this),this.settings=e.extend({},o,i),this._defaults=o,this._name=s,this.init()}return n.prototype.init=function(){var t,n;return this.$el=e(this.element),n=this.$el.find("li:last").data("node-id"),t=this.settings.tree.find("[data-node-id='"+n+"']"),t.parents("[data-node-id]").each(this.insertElement)},n.prototype.insertElement=function(t,n){var i,r,o;return i=e(n),o=i.data("label"),r=i.data("url"),this.$el.find("li:first").after('<li><a href="'+r+'">'+o+'</a> <span class="divider">/</span></li>')},n}(),e.fn[s]=function(t){return this.each(function(){return e.data(this,"plugin_"+s)?void 0:e.data(this,"plugin_"+s,new r(this,t))})}}(jQuery,window,document)}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};!function(e,n,i){var r,o;return o="treeModal",r=function(){function n(e){this.element=e,this.selectMoveDestination=t(this.selectMoveDestination,this),this.selectNode=t(this.selectNode,this),this.makeActiveSelection=t(this.makeActiveSelection,this),this._name=o,this.init()}return n.prototype.init=function(){var t,n;return this.$el=e(this.element),this.$tree=this.$el.find(".tree-modal-box"),this.$nodeParentIdHiddenInput=this.$el.find("#node_parent_id"),this.disableSubmitBtn(),t="#node_"+this.$el.data("node-id"),this.isDescendedFromCurrentNode=function(e){return e.parents(t).length>0},this.$el.find("input[name='node_move_destination']").click(this.selectMoveDestination),n="a:not('.invalid-selection'):not('.toggle')",this.$tree.on("click",n,this.selectNode)},n.prototype.markAsInvalid=function(t){return t.addClass("invalid-selection").attr("href","javascript:void(0)")},n.prototype.makeActiveSelection=function(t){return this.$el.find(".active-selection").removeClass("active-selection"),t.addClass("active-selection")},n.prototype.selectNode=function(t){var n,i;return t.preventDefault(),this.$el.find("#node_move_destination_node").click(),n=e(t.currentTarget),this.isDescendedFromCurrentNode(n)?(this.markAsInvalid(n),!1):(this.makeActiveSelection(n),i=n.parent().data("node-id"),this.$nodeParentIdHiddenInput.val(i),this.$el.find("#current-selection").text(n.text()),this.enableSubmitBtn())},n.prototype.selectMoveDestination=function(t){var n;return n=e(t.currentTarget),"root"===n.val()?this.prepareForMoveToRoot():(this.prepareForMoveToNode(),this.disableSubmitBtn())},n.prototype.prepareForMoveToRoot=function(){return this.$el.find("#move-under").hide(),this.$el.find("#move-to-root").show(),this.$el.find("#node_parent_id").val(null),this.enableSubmitBtn(),this.$el.find("#current-selection").text(""),this.$el.find(".active-selection").removeClass("active-selection")},n.prototype.prepareForMoveToNode=function(){return this.$el.find("#move-under").show(),this.$el.find("#move-to-root").hide()},n.prototype.disableSubmitBtn=function(){return this.$el.find(".btn-primary").prop("disabled",!0)},n.prototype.enableSubmitBtn=function(){return this.$el.find(".btn-primary").prop("disabled",!1)},n}(),e.fn[o]=function(){return this.each(function(){return e.data(this,"plugin_"+o)?void 0:e.data(this,"plugin_"+o,new r(this))})}}(jQuery,window,document)}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};!function(e,n,i){var r,o,s;return s="treeNav",o={property:"value"},r=function(){function i(n,i){this.element=n,this.getNodeIdFromPath=t(this.getNodeIdFromPath,this),this.toggleChildren=t(this.toggleChildren,this),this.openNode=t(this.openNode,this),this.loadChildren=t(this.loadChildren,this),this.settings=e.extend({},o,i),this._defaults=o,this._name=s,this.init()}var r;return i.prototype.init=function(){var t,i;return this.$el=e(this.element),this.$el.on("click","a.toggle",this.toggleChildren),i=n.location.pathname,r.test(i)?(t=this.getNodeIdFromPath(i),this.openNode(t)):void 0},i.prototype.loadChildren=function(t){var n;return t.siblings(".children").first().has("li.node").length?void 0:(n=t.siblings(".children"),e.get(t.attr("href")).done(function(){return n.find("li.loading").hide(),n.find("li.error").hide()}).fail(function(){return n.find("li.loading").hide(),n.find("li.error").show()}))},i.prototype.openNode=function(t){var e,n,i,r;return e=this.$el.find("li[data-node-id="+t+"]"),r=e.parent("ul.children"),r.length&&r.show().addClass("opened"),n=r.parent(),i=n.data("node-id"),n.children("a.toggle").find("i").addClass("fa-caret-down").removeClass("fa-caret-right"),i?this.openNode(i):void 0},i.prototype.toggleChildren=function(t){var n,i,r;return t.preventDefault(),t.stopPropagation(),i=e(t.currentTarget),n=i.siblings(".children").first(),n.hasClass("opened")?n.slideUp(200):(r=this,n.slideDown(200,function(){return r.loadChildren(i)})),n.toggleClass("opened"),i.find("i").toggleClass("fa-caret-right").toggleClass("fa-caret-down")},i.prototype.getNodeIdFromPath=function(t){return parseInt(t.match(r)[2],10)},r=/^(\/pro)?\/nodes\/(\d+)/,i}(),e.fn[s]=function(t){return this.each(function(){return e.data(this,"plugin_"+s)?void 0:e.data(this,"plugin_"+s,new r(this,t))})}}(jQuery,window,document)}.call(this),function(){jQuery(function(){var t;return $(".jquery-upload").fileupload({dropZone:$("#drop-zone"),destroy:function(t,e){return confirm("Are you sure?")?$.blueimpUI.fileupload.prototype.options.destroy.call(this,t,e):void 0},paste:function(t,e){return $.each(e.files,function(t,e){return null==e.name?e.name=prompt("Please provide a filename for the pasted image","screenshot-XX.png")||"unnamed.png":void 0})}}),$(".textile").textile(),$(".breadcrumb").breadcrums({tree:$(".main-sidebar .tree-navigation")}),$(".tree-navigation").treeNav(),$(".modal-node-selection-form").treeModal(),$(".modal").on("shown",function(){return $(this).find("input:text:visible:first").focus()}),$(".gravatar img").length&&$(".gravatar img").each(function(){var t,e;return t=$(this),e=new Image,e.onerror=function(){return t.attr("src",t.data("fallback-image"))},e.src=t.attr("src")}),(t=$("#activities-poller")).length&&(ActivitiesPoller.init(t),ActivitiesPoller.poll()),$("form").submit(function(t){return $("input[type=submit]",this).attr("disabled","disabled").val("Processing...")})})}.call(this),function(){$(function(){return $("body.nodes").length?($(document).bind("keydown","Meta+s",function(){return alert("TODO: implement save"),!1}),$(document).bind("keydown","Meta+o",function(){return $(".dropdown-toggle[data-name='notes']").click(),!1}),$(document).bind("keydown","Meta+i",function(){return $(".dropdown-toggle[data-name='issues']").click(),!1})):void 0})}.call(this),function(){jQuery(function(){return $("body.configurations").length?(console.log("init"),$("tbody tr.gemified td.value").on("blur","input",function(){return console.log("blur"),$(this).removeClass("editing")}).on("change","input",function(){var t,e,n,i,r,o,s;return console.log("change"),n=$(this).attr("name").split("_settings_"),i=n[0],s=n[1],r=$(this).parents("form").attr("action"),e=r+"/"+i,o={},o[s]=$(this).val(),t={context:$(this),data:{setting:o},dataType:"json",type:"post",complete:function(){return $(this).removeClass("saving")},error:function(t,e,n){return $(this).addClass("failed");
},success:function(t,e,n){var i;return $(this).addClass("saved"),i=t.setting_is_default?"default":"user set",$(this).parents("td").siblings("td.status").text(i)}},$.extend(!0,t,{data:{_method:"put"},url:e}),$(this).addClass("saving"),$.ajax(t)}).on("keydown","input",function(t){return $(this).addClass("editing").removeClass("saved","failed")})):void 0})}.call(this),function(){this.ConsoleUpdater={jobId:0,parsing:!1,updateConsole:function(){var t,e;return ConsoleUpdater.parsing?(t=0,$(".log").length&&(t=$("#console p:last-child").data("id")),e=$("#result").data("url"),$.get(e,{item_id:ConsoleUpdater.jobId,after:t},null,"script")):void($("#download").length&&$("#download").attr("disabled",!1).text("Download"))}}}.call(this),function(){jQuery(function(){return $("body.export").length?($(".js-export-button").on("click",function(t){var e,n;return t.preventDefault(),n=$(this).closest("form"),e=n.find("input[name=action]:checked"),n.attr("action",e.val()),n.submit()}),$("#plugin-chooser a[data-target='#plugin-html_export']").tab("show")):void 0})}.call(this),function(){this.IssueImporter={query:function(t){return $(".results").show(),$(".results .loading:first").parent().show(),$(".results .placeholder:first").parent().hide(),$.post($(".import-box:first").data("url"),t.serialize()),$(".results .list-item").each(function(t,e){return $(e).children(".loading").length>0?$(e).show():$(e).children(".placeholder").length>0?$(e).hide():$(e).remove()})},submit:function(t,e){return $.post(t,{issue:{text:e}}),$(".results .loading").parent().show()},addIssue:function(t){return $(".results .loading").parent().hide(),$("#issues .issue-list").prepend($(t))},addResults:function(t){return $(".results .loading").parent().hide(),t.length>0?$(".results .issue-list").append($(t)):$(".results .placeholder:first").parent().show()}},jQuery(function(){return $("#issues").length?($(".results").length&&($(".import-toggle").click(),$(".import-box").find("input:text[value!='']").focus(),$(".import-box").find(".control-group").removeClass("error")),$("input.search-query").on("blur",function(){return $(this).val().length>0?$(this).closest(".control-group").removeClass("error"):$(this).closest(".control-group").addClass("error")}),$(".results").on("click","a.add-issue",function(t){return t.preventDefault(),IssueImporter.submit($(this).attr("href"),$(this).data("text")),$(this).parents(".accordion-group").slideUp(300,function(){return $(this).remove()})})):void 0})}.call(this),function(){jQuery(function(){return $("#issues").length?($(".js-add-evidence").popover({container:$("#js-add-evidence-container .js-popover-container"),content:function(){return $("#js-add-evidence-container .content").html()},html:!0,title:"Find node",trigger:"manual"}),$(".js-add-evidence").click(function(t){return $(this).popover("show"),$("#js-add-evidence-container .js-popover-container").find("input:text:visible:first").focus()}),$("#js-add-evidence-container .js-popover-container").on("change","#add-evidence",function(){var t,e,n,i;return i=$(this).val(),e=$("#add-evidence").data("source").indexOf(i),-1!==e?(t=$("form#new-evidence").attr("action"),n=$("#add-evidence").data("ids")[e],$(".js-add-evidence").popover("hide"),$("form#new-evidence").attr("action",t.replace(":node_id",n)),$("form#new-evidence").submit()):alert("You need to choose a node that already exists in the project.")})):void 0})}.call(this),function(){var t;t=function(){function t(){$("#issue-table").on("click",".js-taglink",this.tagSelected),$("#issue-table").on("confirm:complete","#delete-selected",this.deleteSelected)}return t.prototype.deleteSelected=function(t,e){return e&&$("#tbl-issues").find("input[type=checkbox]:checked.js-multicheck").each(function(){var t,e;return t=$(this).parent().parent(),$(t.find("td")[2]).replaceWith('<td class="loading">Deleting...</td>'),e=$(this),$.ajax($(this).data("url"),{method:"DELETE",dataType:"json",success:function(e){return t.remove(),$("#issue_"+e.id).remove()},error:function(e,n,i){return $(t.find("td")[2]).replaceWith("<td class='text-error'>Please try again</td>")}})}),!1},t.prototype.tagSelected=function(t){var e;return e=$(t.target),t.preventDefault(),$("#tbl-issues").find("input[type=checkbox]:checked.js-multicheck").each(function(){var t,n,i,r,o;return i=$(this),i.prop("checked",!1),t=i.parent().parent(),$(t.find("td")[2]).replaceWith('<td class="loading">Loading...</td>'),o=i.data("url"),r={issue:{tag_list:e.data("tag")}},n=i,$.ajax(o,{method:"PUT",data:r,dataType:"json",success:function(e){var i;return i=n.val(),$(t.find("td")[2]).replaceWith(e.tag_cell),$("#issues #issue_"+i).replaceWith(e.issue_link)},error:function(e,n,i){return $(t.find("td")[2]).replaceWith("<td class='text-error'>Please try again</td>")}})})},t}(),jQuery(function(){return $("body.issues.index").length?($("#select-all").click(function(){return $("input[type=checkbox]").not(this).prop("checked",$(this).prop("checked"))}),$("input[type=checkbox].js-multicheck").click(function(){var t;return t=$(this).prop("checked"),t&&$("input[type=checkbox].js-multicheck").each(function(){return t=$(this).prop("checked")}),$("#select-all").prop("checked",t)}),$("input[type=checkbox]").click(function(){return $("input[type=checkbox]:checked").length?$(".btn-group").css("visibility","visible"):$(".btn-group").css("visibility","hidden")}),new t):void 0})}.call(this),function(){jQuery(function(){return $("#issues_editor .js-taglink").click(function(t){var e,n;return n=$(t.target),$("#issue_tag_list").val(n.data("tag")),e=$("#issues_editor .dropdown-toggle span.tag"),e.html(n.html()),e.css("color",n.css("color"))})})}.call(this),function(){jQuery(function(){return $("body.issues").length?$(".import-toggle").click(function(){var t;return t=$(this),t.find("i").toggleClass("fa-chevron-down fa-chevron-up"),$(t.data("target")).find("input[type='text']:first").focus()}):void 0})}.call(this),function(){jQuery(function(){var t;return $("#methodologies").length>0&&($("#m-tabs a:first").tab("show"),$("input:checkbox:checked").parent().addClass("done"),$("input[type=checkbox]").click(function(){var t,e,n,i,r,o;return o=$(this).closest(".tab-pane").data("url"),n=$(this).attr("name").split("~"),i=n[0],r=n[1],e={section:i,task:r,checked:$(this).prop("checked")},t=$(this).parent(),t.removeClass("failed").addClass("saving"),$.ajax(o,{type:"PUT",data:e,complete:function(){return t.removeClass("saving")},error:function(e,n,i){return t.addClass("failed")},success:function(){return t.addClass("saved")}}),$(this).prop("checked")?t.addClass("done"):t.removeClass("done")})),$("#methodology_content").length?(t=0,$("#methodology_content").on("textchange",function(e,n){return clearTimeout(t),t=setTimeout(function(){var t;return t={content:$("#methodology_content").val()},$.ajax({type:"POST",url:$("#methodology_content").data("preview"),data:t,dataType:"script"})},500)})):void 0})}.call(this),function(){this.ActivitiesPoller=function(){function t(){}var e;return e=1e4,t.init=function(t){if(this.initialized=!0,this.action=t.data("action"),this.controller=t.data("controller"),this.modelId=t.data("id"),this.nodeId=t.data("node-id"),this.url=t.data("url"),this.lastPoll=t.data("last-poll"),null==this.url||null==this.action||null==this.controller)throw"Activity poller not configured correctly";return this},t.poll=function(){var t;return t=this,setTimeout(function(){return t.request()},e)},t.request=function(){return $.get(this.url,{last_poll:this.lastPoll})},t.setAfter=function(t){return this.after=t},t.addRootNode=function(t){return $(".nodes-nav.tree-navigation").append(t)},t.addSubNode=function(t,e){return this._findNodeLinks(t).each(function(t,n){var i,r,o;return i=$(n),o=i.children(".toggle"),r=i.children("ul.children"),"hidden"===o.css("visibility")?(o.css("visibility","").addClass("hasSubmenu"),o.children("i").removeClass("fa-caret-down").addClass("fa-caret-right"),o.find("li.loading").show(),o.find("li.error").hide(),r.removeClass("opened")):r.children(".loading").length?void 0:r.append(e)})},t.updateNode=function(t,e){var n;return n=this._findNodeLinks(t),n.replaceWith(e),this.nodeId===t?n.addClass("active"):void 0},t.deleteNode=function(t){var e;return e=this._findNodeLinks(t),this.nodeId===t?(e.find("a").attr("href","#"),this._showNodeDeletedAlert()):e.each(function(t,e){var n,i,r;return n=$(e),i=n.parents("li").first(),r=i.find("ul li").length,n.remove(),1===r?(i.removeClass("hasSubmenu"),i.find(".toggle").replaceWith('<span class="toggle">&nbsp;</span>')):void 0})},t.addNote=function(t,e){return this.nodeId===t?this._addLink("notes",e):void 0},t.updateNote=function(t,e,n){return this.nodeId===t&&(this._findNoteLink(e).replaceWith(n),this._currentlyViewingNote(e))?$("#note-updated-alert").show():void 0},t.deleteNote=function(t){var e;return e=this._findNoteLink(t),e.length&&(e.remove(),1===$("#notes .list-item").size()&&$("#notes .placeholder").slideDown(300),this._currentlyViewingNote(t))?this._showNoteDeletedAlert():void 0},t.addEvidence=function(t,e){return this.nodeId===t?this._addLink("evidence",e):void 0},t.updateEvidence=function(t,e,n,i){return this.nodeId===t&&(this._findEvidenceLink(e).replaceWith(n),this._currentlyViewingEvidence(e))?$("#evidence-updated-alert").show():void 0},t.deleteEvidence=function(t){var e;return e=this._findEvidenceLink(t),e.length&&(e.remove(),1===$("#evidence .list-item").size()&&$("#notes .placeholder").slideDown(300)),this._currentlyViewingEvidence(t)?this._showEvidenceDeletedAlert():void 0},t._addLink=function(t,e){return $("#"+t).append(e),$("#"+t+" .placeholder").hide()},t._currentlyViewingEvidence=function(t){return"evidence"===this.controller&&this.modelId===t},t._currentlyViewingNote=function(t){return"notes"===this.controller&&this.modelId===t},t._findNodeLinks=function(t){return $("[id='node_"+t+"']")},t._findNoteLink=function(t){return $("#note_"+t+"_link")},t._findEvidenceLink=function(t){return $("#evidence_"+t+"_link")},t._showEvidenceDeletedAlert=function(){return $("#evidence-updated-alert").hide(),$("#evidence-deleted-alert").show()},t._showNoteDeletedAlert=function(){return $("#note-updated-alert").hide(),$("#note-deleted-alert").show()},t._showNodeDeletedAlert=function(){return $("#node-deleted-alert").show()},t}()}.call(this),function(){jQuery(function(){var t,e,n;return $("body.upload").length?(t=$(".bar"),e=$(".percent"),n=$("#status"),$("form").ajaxForm({resetForm:!0,dataType:"script",beforeSend:function(){var i;return n.empty(),i="0%",t.width(i),e.html(i)},uploadProgress:function(n,i,r,o){var s;return s=o+"%",t.width(s),e.html(s)},success:function(){var n;return n="100%",t.width(n),e.html(n)}}),$(":file").change(function(){return ConsoleUpdater.jobId=ConsoleUpdater.jobId+1,$("#console").empty(),$("#filename").text(this.value),$("#spinner").show(),$("#result").data("id",ConsoleUpdater.jobId),$("#result").show(),$("#item_id").val(ConsoleUpdater.jobId),$(this).closest("form").submit()})):void 0})}.call(this);