mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-23 23:02:18 +08:00
171 lines
580 KiB
JavaScript
171 lines
580 KiB
JavaScript
!function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=2)}([function(t,e,n){var i,r;/*!
|
|
* jQuery JavaScript Library v2.2.4
|
|
* 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-05-20T17:23Z
|
|
*/
|
|
!function(e,n){"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,function(n,s){function o(t){var e=!!t&&"length"in t&&t.length,n=lt.type(t);return"function"!==n&&!lt.isWindow(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function a(t,e,n){if(lt.isFunction(e))return lt.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return lt.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(yt.test(e))return lt.filter(e,t,n);e=lt.filter(e,t)}return lt.grep(t,function(t){return it.call(e,t)>-1!==n})}function l(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function u(t){var e={};return lt.each(t.match(kt)||[],function(t,n){e[n]=!0}),e}function h(){Q.removeEventListener("DOMContentLoaded",h),n.removeEventListener("load",h),lt.ready()}function c(){this.expando=lt.expando+c.uid++}function f(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(It,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Et.test(n)?lt.parseJSON(n):n)}catch(t){}St.set(t,e,n)}else n=void 0;return n}function d(t,e,n,i){var r,s=1,o=20,a=i?function(){return i.cur()}:function(){return lt.css(t,e,"")},l=a(),u=n&&n[3]||(lt.cssNumber[e]?"":"px"),h=(lt.cssNumber[e]||"px"!==u&&+l)&&Pt.exec(lt.css(t,e));if(h&&h[3]!==u){u=u||h[3],n=n||[],h=+l||1;do{s=s||".5",h/=s,lt.style(t,e,h+u)}while(s!==(s=a()/l)&&1!==s&&--o)}return n&&(h=+h||+l||0,r=n[1]?h+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=h,i.end=r)),r}function p(t,e){var n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&<.nodeName(t,e)?lt.merge([t],n):n}function g(t,e){for(var n=0,i=t.length;n<i;n++)Dt.set(t[n],"globalEval",!e||Dt.get(e[n],"globalEval"))}function m(t,e,n,i,r){for(var s,o,a,l,u,h,c=e.createDocumentFragment(),f=[],d=0,m=t.length;d<m;d++)if((s=t[d])||0===s)if("object"===lt.type(s))lt.merge(f,s.nodeType?[s]:s);else if(Ft.test(s)){for(o=o||c.appendChild(e.createElement("div")),a=(Ht.exec(s)||["",""])[1].toLowerCase(),l=Rt[a]||Rt._default,o.innerHTML=l[1]+lt.htmlPrefilter(s)+l[2],h=l[0];h--;)o=o.lastChild;lt.merge(f,o.childNodes),o=c.firstChild,o.textContent=""}else f.push(e.createTextNode(s));for(c.textContent="",d=0;s=f[d++];)if(i&<.inArray(s,i)>-1)r&&r.push(s);else if(u=lt.contains(s.ownerDocument,s),o=p(c.appendChild(s),"script"),u&&g(o),n)for(h=0;s=o[h++];)Lt.test(s.type||"")&&n.push(s);return c}function v(){return!0}function y(){return!1}function b(){try{return Q.activeElement}catch(t){}}function _(t,e,n,i,r,s){var o,a;if("object"==typeof e){"string"!=typeof n&&(i=i||n,n=void 0);for(a in e)_(t,a,n,i,e[a],s);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)),!1===r)r=y;else if(!r)return t;return 1===s&&(o=r,r=function(t){return lt().off(t),o.apply(this,arguments)},r.guid=o.guid||(o.guid=lt.guid++)),t.each(function(){lt.event.add(this,e,r,i,n)})}function x(t,e){return lt.nodeName(t,"table")&<.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function w(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function k(t){var e=Yt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function C(t,e){var n,i,r,s,o,a,l,u;if(1===e.nodeType){if(Dt.hasData(t)&&(s=Dt.access(t),o=Dt.set(e,s),u=s.events)){delete o.handle,o.events={};for(r in u)for(n=0,i=u[r].length;n<i;n++)lt.event.add(e,r,u[r][n])}St.hasData(t)&&(a=St.access(t),l=lt.extend({},a),St.set(e,l))}}function M(t,e){var n=e.nodeName.toLowerCase();"input"===n&&zt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function T(t,e,n,i){e=et.apply([],e);var r,s,o,a,l,u,h=0,c=t.length,f=c-1,d=e[0],g=lt.isFunction(d);if(g||c>1&&"string"==typeof d&&!at.checkClone&&Ut.test(d))return t.each(function(r){var s=t.eq(r);g&&(e[0]=d.call(this,r,s.html())),T(s,e,n,i)});if(c&&(r=m(e,t[0].ownerDocument,!1,t,i),s=r.firstChild,1===r.childNodes.length&&(r=s),s||i)){for(o=lt.map(p(r,"script"),w),a=o.length;h<c;h++)l=r,h!==f&&(l=lt.clone(l,!0,!0),a&<.merge(o,p(l,"script"))),n.call(t[h],l,h);if(a)for(u=o[o.length-1].ownerDocument,lt.map(o,k),h=0;h<a;h++)l=o[h],Lt.test(l.type||"")&&!Dt.access(l,"globalEval")&<.contains(u,l)&&(l.src?lt._evalUrl&<._evalUrl(l.src):lt.globalEval(l.textContent.replace(Vt,"")))}return t}function D(t,e,n){for(var i,r=e?lt.filter(e,t):t,s=0;null!=(i=r[s]);s++)n||1!==i.nodeType||lt.cleanData(p(i)),i.parentNode&&(n&<.contains(i.ownerDocument,i)&&g(p(i,"script")),i.parentNode.removeChild(i));return t}function S(t,e){var n=lt(e.createElement(t)).appendTo(e.body),i=lt.css(n[0],"display");return n.detach(),i}function E(t){var e=Q,n=Xt[t];return n||(n=S(t,e),"none"!==n&&n||(Kt=(Kt||lt("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=Kt[0].contentDocument,e.write(),e.close(),n=S(t,e),Kt.detach()),Xt[t]=n),n}function I(t,e,n){var i,r,s,o,a=t.style;return n=n||Zt(t),o=n?n.getPropertyValue(e)||n[e]:void 0,""!==o&&void 0!==o||lt.contains(t.ownerDocument,t)||(o=lt.style(t,e)),n&&!at.pixelMarginRight()&&Jt.test(o)&&Gt.test(e)&&(i=a.width,r=a.minWidth,s=a.maxWidth,a.minWidth=a.maxWidth=a.width=o,o=n.width,a.width=i,a.minWidth=r,a.maxWidth=s),void 0!==o?o+"":o}function N(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function P(t){if(t in se)return t;for(var e=t[0].toUpperCase()+t.slice(1),n=re.length;n--;)if((t=re[n]+e)in se)return t}function A(t,e,n){var i=Pt.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function O(t,e,n,i,r){for(var s=n===(i?"border":"content")?4:"width"===e?1:0,o=0;s<4;s+=2)"margin"===n&&(o+=lt.css(t,n+At[s],!0,r)),i?("content"===n&&(o-=lt.css(t,"padding"+At[s],!0,r)),"margin"!==n&&(o-=lt.css(t,"border"+At[s]+"Width",!0,r))):(o+=lt.css(t,"padding"+At[s],!0,r),"padding"!==n&&(o+=lt.css(t,"border"+At[s]+"Width",!0,r)));return o}function z(t,e,n){var i=!0,r="width"===e?t.offsetWidth:t.offsetHeight,s=Zt(t),o="border-box"===lt.css(t,"boxSizing",!1,s);if(r<=0||null==r){if(r=I(t,e,s),(r<0||null==r)&&(r=t.style[e]),Jt.test(r))return r;i=o&&(at.boxSizingReliable()||r===t.style[e]),r=parseFloat(r)||0}return r+O(t,e,n||(o?"border":"content"),i,s)+"px"}function H(t,e){for(var n,i,r,s=[],o=0,a=t.length;o<a;o++)i=t[o],i.style&&(s[o]=Dt.get(i,"olddisplay"),n=i.style.display,e?(s[o]||"none"!==n||(i.style.display=""),""===i.style.display&&Ot(i)&&(s[o]=Dt.access(i,"olddisplay",E(i.nodeName)))):(r=Ot(i),"none"===n&&r||Dt.set(i,"olddisplay",r?n:lt.css(i,"display"))));for(o=0;o<a;o++)i=t[o],i.style&&(e&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=e?s[o]||"":"none"));return t}function L(t,e,n,i,r){return new L.prototype.init(t,e,n,i,r)}function R(){return n.setTimeout(function(){oe=void 0}),oe=lt.now()}function F(t,e){var n,i=0,r={height:t};for(e=e?1:0;i<4;i+=2-e)n=At[i],r["margin"+n]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function j(t,e,n){for(var i,r=(q.tweeners[e]||[]).concat(q.tweeners["*"]),s=0,o=r.length;s<o;s++)if(i=r[s].call(n,e,t))return i}function $(t,e,n){var i,r,s,o,a,l,u,h=this,c={},f=t.style,d=t.nodeType&&Ot(t),p=Dt.get(t,"fxshow");n.queue||(a=lt._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--,lt.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=lt.css(t,"display"),"inline"===("none"===u?Dt.get(t,"olddisplay")||E(t.nodeName):u)&&"none"===lt.css(t,"float")&&(f.display="inline-block")),n.overflow&&(f.overflow="hidden",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],le.exec(r)){if(delete e[i],s=s||"toggle"===r,r===(d?"hide":"show")){if("show"!==r||!p||void 0===p[i])continue;d=!0}c[i]=p&&p[i]||lt.style(t,i)}else u=void 0;if(lt.isEmptyObject(c))"inline"===("none"===u?E(t.nodeName):u)&&(f.display=u);else{p?"hidden"in p&&(d=p.hidden):p=Dt.access(t,"fxshow",{}),s&&(p.hidden=!d),d?lt(t).show():h.done(function(){lt(t).hide()}),h.done(function(){var e;Dt.remove(t,"fxshow");for(e in c)lt.style(t,e,c[e])});for(i in c)o=j(d?p[i]:0,i,h),i in p||(p[i]=o.start,d&&(o.end=o.start,o.start="width"===i||"height"===i?1:0))}}function W(t,e){var n,i,r,s,o;for(n in t)if(i=lt.camelCase(n),r=e[i],s=t[n],lt.isArray(s)&&(r=s[1],s=t[n]=s[0]),n!==i&&(t[i]=s,delete t[n]),(o=lt.cssHooks[i])&&"expand"in o){s=o.expand(s),delete t[i];for(n in s)n in t||(t[n]=s[n],e[n]=r)}else e[i]=r}function q(t,e,n){var i,r,s=0,o=q.prefilters.length,a=lt.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var e=oe||R(),n=Math.max(0,u.startTime+u.duration-e),i=n/u.duration||0,s=1-i,o=0,l=u.tweens.length;o<l;o++)u.tweens[o].run(s);return a.notifyWith(t,[u,s,n]),s<1&&l?n:(a.resolveWith(t,[u]),!1)},u=a.promise({elem:t,props:lt.extend({},e),opts:lt.extend(!0,{specialEasing:{},easing:lt.easing._default},n),originalProperties:e,originalOptions:n,startTime:oe||R(),duration:n.duration,tweens:[],createTween:function(e,n){var i=lt.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;n<i;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}}),h=u.props;for(W(h,u.opts.specialEasing);s<o;s++)if(i=q.prefilters[s].call(u,t,h,u.opts))return lt.isFunction(i.stop)&&(lt._queueHooks(u.elem,u.opts.queue).stop=lt.proxy(i.stop,i)),i;return lt.map(h,j,u),lt.isFunction(u.opts.start)&&u.opts.start.call(t,u),lt.fx.timer(lt.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 t.getAttribute&&t.getAttribute("class")||""}function U(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,r=0,s=e.toLowerCase().match(kt)||[];if(lt.isFunction(n))for(;i=s[r++];)"+"===i[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 s[a]=!0,lt.each(t[a]||[],function(t,a){var u=a(e,n,i);return"string"!=typeof u||o||s[u]?o?!(l=u):void 0:(e.dataTypes.unshift(u),r(u),!1)}),l}var s={},o=t===Se;return r(e.dataTypes[0])||!s["*"]&&r("*")}function V(t,e){var n,i,r=lt.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((r[n]?t:i||(i={}))[n]=e[n]);return i&<.extend(!0,t,i),t}function K(t,e,n){for(var i,r,s,o,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){l.unshift(r);break}if(l[0]in n)s=l[0];else{for(r in n){if(!l[0]||t.converters[r+" "+l[0]]){s=r;break}o||(o=r)}s=s||o}if(s)return s!==l[0]&&l.unshift(s),n[s]}function X(t,e,n,i){var r,s,o,a,l,u={},h=t.dataTypes.slice();if(h[1])for(o in t.converters)u[o.toLowerCase()]=t.converters[o];for(s=h.shift();s;)if(t.responseFields[s]&&(n[t.responseFields[s]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=s,s=h.shift())if("*"===s)s=l;else if("*"!==l&&l!==s){if(!(o=u[l+" "+s]||u["* "+s]))for(r in u)if(a=r.split(" "),a[1]===s&&(o=u[l+" "+a[0]]||u["* "+a[0]])){!0===o?o=u[r]:!0!==u[r]&&(s=a[0],h.unshift(a[1]));break}if(!0!==o)if(o&&t.throws)e=o(e);else try{e=o(e)}catch(t){return{state:"parsererror",error:o?t:"No conversion from "+l+" to "+s}}}return{state:"success",data:e}}function G(t,e,n,i){var r;if(lt.isArray(e))lt.each(e,function(e,r){n||Pe.test(t)?i(t,r):G(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,n,i)});else if(n||"object"!==lt.type(e))i(t,e);else for(r in e)G(t+"["+r+"]",e[r],n,i)}function J(t){return lt.isWindow(t)?t:9===t.nodeType&&t.defaultView}var Z=[],Q=n.document,tt=Z.slice,et=Z.concat,nt=Z.push,it=Z.indexOf,rt={},st=rt.toString,ot=rt.hasOwnProperty,at={},lt=function(t,e){return new lt.fn.init(t,e)},ut=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ht=/^-ms-/,ct=/-([\da-z])/gi,ft=function(t,e){return e.toUpperCase()};lt.fn=lt.prototype={jquery:"2.2.4",constructor:lt,selector:"",length:0,toArray:function(){return tt.call(this)},get:function(t){return null!=t?t<0?this[t+this.length]:this[t]:tt.call(this)},pushStack:function(t){var e=lt.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t){return lt.each(this,t)},map:function(t){return this.pushStack(lt.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(tt.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:nt,sort:Z.sort,splice:Z.splice},lt.extend=lt.fn.extend=function(){var t,e,n,i,r,s,o=arguments[0]||{},a=1,l=arguments.length,u=!1;for("boolean"==typeof o&&(u=o,o=arguments[a]||{},a++),"object"==typeof o||lt.isFunction(o)||(o={}),a===l&&(o=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)n=o[e],i=t[e],o!==i&&(u&&i&&(lt.isPlainObject(i)||(r=lt.isArray(i)))?(r?(r=!1,s=n&<.isArray(n)?n:[]):s=n&<.isPlainObject(n)?n:{},o[e]=lt.extend(u,s,i)):void 0!==i&&(o[e]=i));return o},lt.extend({expando:"jQuery"+("2.2.4"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===lt.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){var e=t&&t.toString();return!lt.isArray(t)&&e-parseFloat(e)+1>=0},isPlainObject:function(t){var e;if("object"!==lt.type(t)||t.nodeType||lt.isWindow(t))return!1;if(t.constructor&&!ot.call(t,"constructor")&&!ot.call(t.constructor.prototype||{},"isPrototypeOf"))return!1;for(e in t);return void 0===e||ot.call(t,e)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?rt[st.call(t)]||"object":typeof t},globalEval:function(t){var e,n=eval;(t=lt.trim(t))&&(1===t.indexOf("use strict")?(e=Q.createElement("script"),e.text=t,Q.head.appendChild(e).parentNode.removeChild(e)):n(t))},camelCase:function(t){return t.replace(ht,"ms-").replace(ct,ft)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var n,i=0;if(o(t))for(n=t.length;i<n&&!1!==e.call(t[i],i,t[i]);i++);else for(i in t)if(!1===e.call(t[i],i,t[i]))break;return t},trim:function(t){return null==t?"":(t+"").replace(ut,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(o(Object(t))?lt.merge(n,"string"==typeof t?[t]:t):nt.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:it.call(e,t,n)},merge:function(t,e){for(var n=+e.length,i=0,r=t.length;i<n;i++)t[r++]=e[i];return t.length=r,t},grep:function(t,e,n){for(var i=[],r=0,s=t.length,o=!n;r<s;r++)!e(t[r],r)!==o&&i.push(t[r]);return i},map:function(t,e,n){var i,r,s=0,a=[];if(o(t))for(i=t.length;s<i;s++)null!=(r=e(t[s],s,n))&&a.push(r);else for(s in t)null!=(r=e(t[s],s,n))&&a.push(r);return et.apply([],a)},guid:1,proxy:function(t,e){var n,i,r;if("string"==typeof e&&(n=t[e],e=t,t=n),lt.isFunction(t))return i=tt.call(arguments,2),r=function(){return t.apply(e||this,i.concat(tt.call(arguments)))},r.guid=t.guid=t.guid||lt.guid++,r},now:Date.now,support:at}),"function"==typeof Symbol&&(lt.fn[Symbol.iterator]=Z[Symbol.iterator]),lt.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){rt["[object "+e+"]"]=e.toLowerCase()});var dt=/*!
|
|
* 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,s,o,a,u,c,f,d,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:R)!==I&&E(e),e=e||I,P)){if(11!==g&&(c=gt.exec(t)))if(r=c[1]){if(9===g){if(!(o=e.getElementById(r)))return n;if(o.id===r)return n.push(o),n}else if(p&&(o=p.getElementById(r))&&H(e,o)&&o.id===r)return n.push(o),n}else{if(c[2])return G.apply(n,e.getElementsByTagName(t)),n;if((r=c[3])&&b.getElementsByClassName&&e.getElementsByClassName)return G.apply(n,e.getElementsByClassName(r)),n}if(b.qsa&&!q[t+" "]&&(!A||!A.test(t))){if(1!==g)p=e,d=t;else if("object"!==e.nodeName.toLowerCase()){for((a=e.getAttribute("id"))?a=a.replace(vt,"\\$&"):e.setAttribute("id",a=L),f=k(t),s=f.length,u=ht.test(a)?"#"+a:"[id='"+a+"']";s--;)f[s]=u+" "+h(f[s]);d=f.join(","),p=mt.test(t)&&l(e.parentNode)||e}if(d)try{return G.apply(n,p.querySelectorAll(d)),n}catch(t){}finally{a===L&&e.removeAttribute("id")}}}return M(t.replace(st,"$1"),e,n,i)}function n(){function t(n,i){return e.push(n+" ")>_.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[L]=!0,t}function r(t){var e=I.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function s(t,e){for(var n=t.split("|"),i=n.length;i--;)_.attrHandle[n[i]]=e}function o(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||U)-(~t.sourceIndex||U);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function a(t){return i(function(e){return e=+e,i(function(n,i){for(var r,s=t([],n.length,e),o=s.length;o--;)n[r=s[o]]&&(n[r]=!(i[r]=n[r]))})})}function l(t){return t&&void 0!==t.getElementsByTagName&&t}function u(){}function h(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function c(t,e,n){var i=e.dir,r=n&&"parentNode"===i,s=j++;return e.first?function(e,n,s){for(;e=e[i];)if(1===e.nodeType||r)return t(e,n,s)}:function(e,n,o){var a,l,u,h=[F,s];if(o){for(;e=e[i];)if((1===e.nodeType||r)&&t(e,n,o))return!0}else for(;e=e[i];)if(1===e.nodeType||r){if(u=e[L]||(e[L]={}),l=u[e.uniqueID]||(u[e.uniqueID]={}),(a=l[i])&&a[0]===F&&a[1]===s)return h[2]=a[2];if(l[i]=h,h[2]=t(e,n,o))return!0}}}function f(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 d(t,n,i){for(var r=0,s=n.length;r<s;r++)e(t,n[r],i);return i}function p(t,e,n,i,r){for(var s,o=[],a=0,l=t.length,u=null!=e;a<l;a++)(s=t[a])&&(n&&!n(s,i,r)||(o.push(s),u&&e.push(a)));return o}function g(t,e,n,r,s,o){return r&&!r[L]&&(r=g(r)),s&&!s[L]&&(s=g(s,o)),i(function(i,o,a,l){var u,h,c,f=[],g=[],m=o.length,v=i||d(e||"*",a.nodeType?[a]:a,[]),y=!t||!i&&e?v:p(v,f,t,a,l),b=n?s||(i?t:m||r)?[]:o:y;if(n&&n(y,b,a,l),r)for(u=p(b,g),r(u,[],a,l),h=u.length;h--;)(c=u[h])&&(b[g[h]]=!(y[g[h]]=c));if(i){if(s||t){if(s){for(u=[],h=b.length;h--;)(c=b[h])&&u.push(y[h]=c);s(null,b=[],u,l)}for(h=b.length;h--;)(c=b[h])&&(u=s?Z(i,c):f[h])>-1&&(i[u]=!(o[u]=c))}}else b=p(b===o?b.splice(m,b.length):b),s?s(null,o,b,l):G.apply(o,b)})}function m(t){for(var e,n,i,r=t.length,s=_.relative[t[0].type],o=s||_.relative[" "],a=s?1:0,l=c(function(t){return t===e},o,!0),u=c(function(t){return Z(e,t)>-1},o,!0),d=[function(t,n,i){var r=!s&&(i||n!==T)||((e=n).nodeType?l(t,n,i):u(t,n,i));return e=null,r}];a<r;a++)if(n=_.relative[t[a].type])d=[c(f(d),n)];else{if(n=_.filter[t[a].type].apply(null,t[a].matches),n[L]){for(i=++a;i<r&&!_.relative[t[i].type];i++);return g(a>1&&f(d),a>1&&h(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(st,"$1"),n,a<i&&m(t.slice(a,i)),i<r&&m(t=t.slice(i)),i<r&&h(t))}d.push(n)}return f(d)}function v(t,n){var r=n.length>0,s=t.length>0,o=function(i,o,a,l,u){var h,c,f,d=0,g="0",m=i&&[],v=[],y=T,b=i||s&&_.find.TAG("*",u),x=F+=null==y?1:Math.random()||.1,w=b.length;for(u&&(T=o===I||o||u);g!==w&&null!=(h=b[g]);g++){if(s&&h){for(c=0,o||h.ownerDocument===I||(E(h),a=!P);f=t[c++];)if(f(h,o||I,a)){l.push(h);break}u&&(F=x)}r&&((h=!f&&h)&&d--,i&&m.push(h))}if(d+=g,r&&g!==d){for(c=0;f=n[c++];)f(m,v,o,a);if(i){if(d>0)for(;g--;)m[g]||v[g]||(v[g]=K.call(l));v=p(v)}G.apply(l,v),u&&!i&&v.length>0&&d+n.length>1&&e.uniqueSort(l)}return u&&(F=x,T=y),m};return r?i(o):o}var y,b,_,x,w,k,C,M,T,D,S,E,I,N,P,A,O,z,H,L="sizzle"+1*new Date,R=t.document,F=0,j=0,$=n(),W=n(),q=n(),B=function(t,e){return t===e&&(S=!0),0},U=1<<31,Y={}.hasOwnProperty,V=[],K=V.pop,X=V.push,G=V.push,J=V.slice,Z=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},Q="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",tt="[\\x20\\t\\r\\n\\f]",et="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",nt="\\["+tt+"*("+et+")(?:"+tt+"*([*^$|!~]?=)"+tt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+et+"))|)"+tt+"*\\]",it=":("+et+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+nt+")*)|.*)\\)|)",rt=new RegExp(tt+"+","g"),st=new RegExp("^"+tt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+tt+"+$","g"),ot=new RegExp("^"+tt+"*,"+tt+"*"),at=new RegExp("^"+tt+"*([>+~]|"+tt+")"+tt+"*"),lt=new RegExp("="+tt+"*([^\\]'\"]*?)"+tt+"*\\]","g"),ut=new RegExp(it),ht=new RegExp("^"+et+"$"),ct={ID:new RegExp("^#("+et+")"),CLASS:new RegExp("^\\.("+et+")"),TAG:new RegExp("^("+et+"|[*])"),ATTR:new RegExp("^"+nt),PSEUDO:new RegExp("^"+it),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+tt+"*(even|odd|(([+-]|)(\\d*)n|)"+tt+"*(?:([+-]|)"+tt+"*(\\d+)|))"+tt+"*\\)|)","i"),bool:new RegExp("^(?:"+Q+")$","i"),needsContext:new RegExp("^"+tt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+tt+"*((?:-\\d)?\\d*)"+tt+"*\\)|)(?=[^-]|$)","i")},ft=/^(?:input|select|textarea|button)$/i,dt=/^h\d$/i,pt=/^[^{]+\{\s*\[native \w/,gt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,mt=/[+~]/,vt=/'|\\/g,yt=new RegExp("\\\\([\\da-f]{1,6}"+tt+"?|("+tt+")|.)","ig"),bt=function(t,e,n){var i="0x"+e-65536;return i!==i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},_t=function(){E()};try{G.apply(V=J.call(R.childNodes),R.childNodes),V[R.childNodes.length].nodeType}catch(t){G={apply:V.length?function(t,e){X.apply(t,J.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}b=e.support={},w=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},E=e.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:R;return i!==I&&9===i.nodeType&&i.documentElement?(I=i,N=I.documentElement,P=!w(I),(n=I.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",_t,!1):n.attachEvent&&n.attachEvent("onunload",_t)),b.attributes=r(function(t){return t.className="i",!t.getAttribute("className")}),b.getElementsByTagName=r(function(t){return t.appendChild(I.createComment("")),!t.getElementsByTagName("*").length}),b.getElementsByClassName=pt.test(I.getElementsByClassName),b.getById=r(function(t){return N.appendChild(t).id=L,!I.getElementsByName||!I.getElementsByName(L).length}),b.getById?(_.find.ID=function(t,e){if(void 0!==e.getElementById&&P){var n=e.getElementById(t);return n?[n]:[]}},_.filter.ID=function(t){var e=t.replace(yt,bt);return function(t){return t.getAttribute("id")===e}}):(delete _.find.ID,_.filter.ID=function(t){var e=t.replace(yt,bt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}}),_.find.TAG=b.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):b.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,s=e.getElementsByTagName(t);if("*"===t){for(;n=s[r++];)1===n.nodeType&&i.push(n);return i}return s},_.find.CLASS=b.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&P)return e.getElementsByClassName(t)},O=[],A=[],(b.qsa=pt.test(I.querySelectorAll))&&(r(function(t){N.appendChild(t).innerHTML="<a id='"+L+"'></a><select id='"+L+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&A.push("[*^$]="+tt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||A.push("\\["+tt+"*(?:value|"+Q+")"),t.querySelectorAll("[id~="+L+"-]").length||A.push("~="),t.querySelectorAll(":checked").length||A.push(":checked"),t.querySelectorAll("a#"+L+"+*").length||A.push(".#.+[+~]")}),r(function(t){var e=I.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&A.push("name"+tt+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||A.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),A.push(",.*:")})),(b.matchesSelector=pt.test(z=N.matches||N.webkitMatchesSelector||N.mozMatchesSelector||N.oMatchesSelector||N.msMatchesSelector))&&r(function(t){b.disconnectedMatch=z.call(t,"div"),z.call(t,"[s!='']:x"),O.push("!=",it)}),A=A.length&&new RegExp(A.join("|")),O=O.length&&new RegExp(O.join("|")),e=pt.test(N.compareDocumentPosition),H=e||pt.test(N.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},B=e?function(t,e){if(t===e)return S=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!b.sortDetached&&e.compareDocumentPosition(t)===n?t===I||t.ownerDocument===R&&H(R,t)?-1:e===I||e.ownerDocument===R&&H(R,e)?1:D?Z(D,t)-Z(D,e):0:4&n?-1:1)}:function(t,e){if(t===e)return S=!0,0;var n,i=0,r=t.parentNode,s=e.parentNode,a=[t],l=[e];if(!r||!s)return t===I?-1:e===I?1:r?-1:s?1:D?Z(D,t)-Z(D,e):0;if(r===s)return o(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)l.unshift(n);for(;a[i]===l[i];)i++;return i?o(a[i],l[i]):a[i]===R?-1:l[i]===R?1:0},I):I},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==I&&E(t),n=n.replace(lt,"='$1']"),b.matchesSelector&&P&&!q[n+" "]&&(!O||!O.test(n))&&(!A||!A.test(n)))try{var i=z.call(t,n);if(i||b.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return e(n,I,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==I&&E(t),H(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==I&&E(t);var n=_.attrHandle[e.toLowerCase()],i=n&&Y.call(_.attrHandle,e.toLowerCase())?n(t,e,!P):void 0;return void 0!==i?i:b.attributes||!P?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(S=!b.detectDuplicates,D=!b.sortStable&&t.slice(0),t.sort(B),S){for(;e=t[r++];)e===t[r]&&(i=n.push(r));for(;i--;)t.splice(n[i],1)}return D=null,t},x=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+=x(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=x(e);return n},_=e.selectors={cacheLength:50,createPseudo:i,match:ct,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(yt,bt),t[3]=(t[3]||t[4]||t[5]||"").replace(yt,bt),"~="===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 ct.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&ut.test(n)&&(e=k(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(yt,bt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=$[t+" "];return e||(e=new RegExp("(^|"+tt+")"+t+"("+tt+"|$)"))&&$(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(r){var s=e.attr(r,t);return null==s?"!="===n:!n||(s+="","="===n?s===i:"!="===n?s!==i:"^="===n?i&&0===s.indexOf(i):"*="===n?i&&s.indexOf(i)>-1:"$="===n?i&&s.slice(-i.length)===i:"~="===n?(" "+s.replace(rt," ")+" ").indexOf(i)>-1:"|="===n&&(s===i||s.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,n,i,r){var s="nth"!==t.slice(0,3),o="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,l){var u,h,c,f,d,p,g=s!==o?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(s){for(;g;){for(f=e;f=f[g];)if(a?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;p=g="only"===t&&!p&&"nextSibling"}return!0}if(p=[o?m.firstChild:m.lastChild],o&&y){for(f=m,c=f[L]||(f[L]={}),h=c[f.uniqueID]||(c[f.uniqueID]={}),u=h[t]||[],d=u[0]===F&&u[1],b=d&&u[2],f=d&&m.childNodes[d];f=++d&&f&&f[g]||(b=d=0)||p.pop();)if(1===f.nodeType&&++b&&f===e){h[t]=[F,d,b];break}}else if(y&&(f=e,c=f[L]||(f[L]={}),h=c[f.uniqueID]||(c[f.uniqueID]={}),u=h[t]||[],d=u[0]===F&&u[1],b=d),!1===b)for(;(f=++d&&f&&f[g]||(b=d=0)||p.pop())&&((a?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++b||(y&&(c=f[L]||(f[L]={}),h=c[f.uniqueID]||(c[f.uniqueID]={}),h[t]=[F,b]),f!==e)););return(b-=r)===i||b%i==0&&b/i>=0}}},PSEUDO:function(t,n){var r,s=_.pseudos[t]||_.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return s[L]?s(n):s.length>1?(r=[t,t,"",n],_.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,r=s(t,n),o=r.length;o--;)i=Z(t,r[o]),t[i]=!(e[i]=r[o])}):function(t){return s(t,0,r)}):s}},pseudos:{not:i(function(t){var e=[],n=[],r=C(t.replace(st,"$1"));return r[L]?i(function(t,e,n,i){for(var s,o=r(t,null,i,[]),a=t.length;a--;)(s=o[a])&&(t[a]=!(e[a]=s))}):function(t,i,s){return e[0]=t,r(e,null,s,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(yt,bt),function(e){return(e.textContent||e.innerText||x(e)).indexOf(t)>-1}}),lang:i(function(t){return ht.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(yt,bt).toLowerCase(),function(e){var n;do{if(n=P?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===N},focus:function(t){return t===I.activeElement&&(!I.hasFocus||I.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!_.pseudos.empty(t)},header:function(t){return dt.test(t.nodeName)},input:function(t){return ft.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:a(function(){return[0]}),last:a(function(t,e){return[e-1]}),eq:a(function(t,e,n){return[n<0?n+e:n]}),even:a(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:a(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:a(function(t,e,n){for(var i=n<0?n+e:n;--i>=0;)t.push(i);return t}),gt:a(function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t})}},_.pseudos.nth=_.pseudos.eq;for(y in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})_.pseudos[y]=function(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}(y);for(y in{submit:!0,reset:!0})_.pseudos[y]=function(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}(y);return u.prototype=_.filters=_.pseudos,_.setFilters=new u,k=e.tokenize=function(t,n){var i,r,s,o,a,l,u,h=W[t+" "];if(h)return n?0:h.slice(0);for(a=t,l=[],u=_.preFilter;a;){i&&!(r=ot.exec(a))||(r&&(a=a.slice(r[0].length)||a),l.push(s=[])),i=!1,(r=at.exec(a))&&(i=r.shift(),s.push({value:i,type:r[0].replace(st," ")}),a=a.slice(i.length));for(o in _.filter)!(r=ct[o].exec(a))||u[o]&&!(r=u[o](r))||(i=r.shift(),s.push({value:i,type:o,matches:r}),a=a.slice(i.length));if(!i)break}return n?a.length:a?e.error(t):W(t,l).slice(0)},C=e.compile=function(t,e){var n,i=[],r=[],s=q[t+" "];if(!s){for(e||(e=k(t)),n=e.length;n--;)s=m(e[n]),s[L]?i.push(s):r.push(s);s=q(t,v(r,i)),s.selector=t}return s},M=e.select=function(t,e,n,i){var r,s,o,a,u,c="function"==typeof t&&t,f=!i&&k(t=c.selector||t);if(n=n||[],1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(o=s[0]).type&&b.getById&&9===e.nodeType&&P&&_.relative[s[1].type]){if(!(e=(_.find.ID(o.matches[0].replace(yt,bt),e)||[])[0]))return n;c&&(e=e.parentNode),t=t.slice(s.shift().value.length)}for(r=ct.needsContext.test(t)?0:s.length;r--&&(o=s[r],!_.relative[a=o.type]);)if((u=_.find[a])&&(i=u(o.matches[0].replace(yt,bt),mt.test(s[0].type)&&l(e.parentNode)||e))){if(s.splice(r,1),!(t=i.length&&h(s)))return G.apply(n,i),n;break}}return(c||C(t,f))(i,e,!P,n,!e||mt.test(t)&&l(e.parentNode)||e),n},b.sortStable=L.split("").sort(B).join("")===L,b.detectDuplicates=!!S,E(),b.sortDetached=r(function(t){return 1&t.compareDocumentPosition(I.createElement("div"))}),r(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||s("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),b.attributes&&r(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||s("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),r(function(t){return null==t.getAttribute("disabled")})||s(Q,function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(n);lt.find=dt,lt.expr=dt.selectors,lt.expr[":"]=lt.expr.pseudos,lt.uniqueSort=lt.unique=dt.uniqueSort,lt.text=dt.getText,lt.isXMLDoc=dt.isXML,lt.contains=dt.contains;var pt=function(t,e,n){for(var i=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&<(t).is(n))break;i.push(t)}return i},gt=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},mt=lt.expr.match.needsContext,vt=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,yt=/^.[^:#\[\.,]*$/;lt.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?lt.find.matchesSelector(i,t)?[i]:[]:lt.find.matches(t,lt.grep(e,function(t){return 1===t.nodeType}))},lt.fn.extend({find:function(t){var e,n=this.length,i=[],r=this;if("string"!=typeof t)return this.pushStack(lt(t).filter(function(){for(e=0;e<n;e++)if(lt.contains(r[e],this))return!0}));for(e=0;e<n;e++)lt.find(t,r[e],i);return i=this.pushStack(n>1?lt.unique(i):i),i.selector=this.selector?this.selector+" "+t:t,i},filter:function(t){return this.pushStack(a(this,t||[],!1))},not:function(t){return this.pushStack(a(this,t||[],!0))},is:function(t){return!!a(this,"string"==typeof t&&mt.test(t)?lt(t):t||[],!1).length}});var bt,_t=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(lt.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||bt,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:_t.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof lt?e[0]:e,lt.merge(this,lt.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:Q,!0)),vt.test(i[1])&<.isPlainObject(e))for(i in e)lt.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return r=Q.getElementById(i[2]),r&&r.parentNode&&(this.length=1,this[0]=r),this.context=Q,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):lt.isFunction(t)?void 0!==n.ready?n.ready(t):t(lt):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),lt.makeArray(t,this))}).prototype=lt.fn,bt=lt(Q);var xt=/^(?:parents|prev(?:Until|All))/,wt={children:!0,contents:!0,next:!0,prev:!0};lt.fn.extend({has:function(t){var e=lt(t,this),n=e.length;return this.filter(function(){for(var t=0;t<n;t++)if(lt.contains(this,e[t]))return!0})},closest:function(t,e){for(var n,i=0,r=this.length,s=[],o=mt.test(t)||"string"!=typeof t?lt(t,e||this.context):0;i<r;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:1===n.nodeType&<.find.matchesSelector(n,t))){s.push(n);break}return this.pushStack(s.length>1?lt.uniqueSort(s):s)},index:function(t){return t?"string"==typeof t?it.call(lt(t),this[0]):it.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(lt.uniqueSort(lt.merge(this.get(),lt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),lt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return pt(t,"parentNode")},parentsUntil:function(t,e,n){return pt(t,"parentNode",n)},next:function(t){return l(t,"nextSibling")},prev:function(t){return l(t,"previousSibling")},nextAll:function(t){return pt(t,"nextSibling")},prevAll:function(t){return pt(t,"previousSibling")},nextUntil:function(t,e,n){return pt(t,"nextSibling",n)},prevUntil:function(t,e,n){return pt(t,"previousSibling",n)},siblings:function(t){return gt((t.parentNode||{}).firstChild,t)},children:function(t){return gt(t.firstChild)},contents:function(t){return t.contentDocument||lt.merge([],t.childNodes)}},function(t,e){lt.fn[t]=function(n,i){var r=lt.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=lt.filter(i,r)),this.length>1&&(wt[t]||lt.uniqueSort(r),xt.test(t)&&r.reverse()),this.pushStack(r)}});var kt=/\S+/g;lt.Callbacks=function(t){t="string"==typeof t?u(t):lt.extend({},t);var e,n,i,r,s=[],o=[],a=-1,l=function(){for(r=t.once,i=e=!0;o.length;a=-1)for(n=o.shift();++a<s.length;)!1===s[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=s.length,n=!1);t.memory||(n=!1),e=!1,r&&(s=n?[]:"")},h={add:function(){return s&&(n&&!e&&(a=s.length-1,o.push(n)),function e(n){lt.each(n,function(n,i){lt.isFunction(i)?t.unique&&h.has(i)||s.push(i):i&&i.length&&"string"!==lt.type(i)&&e(i)})}(arguments),n&&!e&&l()),this},remove:function(){return lt.each(arguments,function(t,e){for(var n;(n=lt.inArray(e,s,n))>-1;)s.splice(n,1),n<=a&&a--}),this},has:function(t){return t?lt.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return r=o=[],s=n="",this},disabled:function(){return!s},lock:function(){return r=o=[],n||(s=n=""),this},locked:function(){return!!r},fireWith:function(t,n){return r||(n=n||[],n=[t,n.slice?n.slice():n],o.push(n),e||l()),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!i}};return h},lt.extend({Deferred:function(t){var e=[["resolve","done",lt.Callbacks("once memory"),"resolved"],["reject","fail",lt.Callbacks("once memory"),"rejected"],["notify","progress",lt.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var t=arguments;return lt.Deferred(function(n){lt.each(e,function(e,s){var o=lt.isFunction(t[e])&&t[e];r[s[1]](function(){var t=o&&o.apply(this,arguments);t&<.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[s[0]+"With"](this===i?n.promise():this,o?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?lt.extend(t,i):i}},r={};return i.pipe=i.then,lt.each(e,function(t,s){var o=s[2],a=s[3];i[s[1]]=o.add,a&&o.add(function(){n=a},e[1^t][2].disable,e[2][2].lock),r[s[0]]=function(){return r[s[0]+"With"](this===r?i:this,arguments),this},r[s[0]+"With"]=o.fireWith}),i.promise(r),t&&t.call(r,r),r},when:function(t){var e,n,i,r=0,s=tt.call(arguments),o=s.length,a=1!==o||t&<.isFunction(t.promise)?o:0,l=1===a?t:lt.Deferred(),u=function(t,n,i){return function(r){n[t]=this,i[t]=arguments.length>1?tt.call(arguments):r,i===e?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(o>1)for(e=new Array(o),n=new Array(o),i=new Array(o);r<o;r++)s[r]&<.isFunction(s[r].promise)?s[r].promise().progress(u(r,n,e)).done(u(r,i,s)).fail(l.reject):--a;return a||l.resolveWith(i,s),l.promise()}});var Ct;lt.fn.ready=function(t){return lt.ready.promise().done(t),this},lt.extend({isReady:!1,readyWait:1,holdReady:function(t){t?lt.readyWait++:lt.ready(!0)},ready:function(t){(!0===t?--lt.readyWait:lt.isReady)||(lt.isReady=!0,!0!==t&&--lt.readyWait>0||(Ct.resolveWith(Q,[lt]),lt.fn.triggerHandler&&(lt(Q).triggerHandler("ready"),lt(Q).off("ready"))))}}),lt.ready.promise=function(t){return Ct||(Ct=lt.Deferred(),"complete"===Q.readyState||"loading"!==Q.readyState&&!Q.documentElement.doScroll?n.setTimeout(lt.ready):(Q.addEventListener("DOMContentLoaded",h),n.addEventListener("load",h))),Ct.promise(t)},lt.ready.promise();var Mt=function(t,e,n,i,r,s,o){var a=0,l=t.length,u=null==n;if("object"===lt.type(n)){r=!0;for(a in n)Mt(t,e,a,n[a],!0,s,o)}else if(void 0!==i&&(r=!0,lt.isFunction(i)||(o=!0),u&&(o?(e.call(t,i),e=null):(u=e,e=function(t,e,n){return u.call(lt(t),n)})),e))for(;a<l;a++)e(t[a],n,o?i:i.call(t[a],a,e(t[a],n)));return r?t:u?e.call(t):l?e(t[0],n):s},Tt=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};c.uid=1,c.prototype={register:function(t,e){var n=e||{};return t.nodeType?t[this.expando]=n:Object.defineProperty(t,this.expando,{value:n,writable:!0,configurable:!0}),t[this.expando]},cache:function(t){if(!Tt(t))return{};var e=t[this.expando];return e||(e={},Tt(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,r=this.cache(t);if("string"==typeof e)r[e]=n;else for(i in e)r[i]=e[i];return r},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][e]},access:function(t,e,n){var i;return void 0===e||e&&"string"==typeof e&&void 0===n?(i=this.get(t,e),void 0!==i?i:this.get(t,lt.camelCase(e))):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,i,r,s=t[this.expando];if(void 0!==s){if(void 0===e)this.register(t);else{lt.isArray(e)?i=e.concat(e.map(lt.camelCase)):(r=lt.camelCase(e),e in s?i=[e,r]:(i=r,i=i in s?[i]:i.match(kt)||[])),n=i.length;for(;n--;)delete s[i[n]]}(void 0===e||lt.isEmptyObject(s))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!lt.isEmptyObject(e)}};var Dt=new c,St=new c,Et=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,It=/[A-Z]/g;lt.extend({hasData:function(t){return St.hasData(t)||Dt.hasData(t)},data:function(t,e,n){return St.access(t,e,n)},removeData:function(t,e){St.remove(t,e)},_data:function(t,e,n){return Dt.access(t,e,n)},_removeData:function(t,e){Dt.remove(t,e)}}),lt.fn.extend({data:function(t,e){var n,i,r,s=this[0],o=s&&s.attributes;if(void 0===t){if(this.length&&(r=St.get(s),1===s.nodeType&&!Dt.get(s,"hasDataAttrs"))){for(n=o.length;n--;)o[n]&&(i=o[n].name,0===i.indexOf("data-")&&(i=lt.camelCase(i.slice(5)),f(s,i,r[i])));Dt.set(s,"hasDataAttrs",!0)}return r}return"object"==typeof t?this.each(function(){St.set(this,t)}):Mt(this,function(e){var n,i;if(s&&void 0===e){if(void 0!==(n=St.get(s,t)||St.get(s,t.replace(It,"-$&").toLowerCase())))return n;if(i=lt.camelCase(t),void 0!==(n=St.get(s,i)))return n;if(void 0!==(n=f(s,i,void 0)))return n}else i=lt.camelCase(t),this.each(function(){var n=St.get(this,i);St.set(this,i,e),t.indexOf("-")>-1&&void 0!==n&&St.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){St.remove(this,t)})}}),lt.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=Dt.get(t,e),n&&(!i||lt.isArray(n)?i=Dt.access(t,e,lt.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=lt.queue(t,e),i=n.length,r=n.shift(),s=lt._queueHooks(t,e),o=function(){lt.dequeue(t,e)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete s.stop,r.call(t,o,s)),!i&&s&&s.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Dt.get(t,n)||Dt.access(t,n,{empty:lt.Callbacks("once memory").add(function(){Dt.remove(t,[e+"queue",n])})})}}),lt.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?lt.queue(this[0],t):void 0===e?this:this.each(function(){var n=lt.queue(this,t,e);lt._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&<.dequeue(this,t)})},dequeue:function(t){return this.each(function(){lt.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,r=lt.Deferred(),s=this,o=this.length,a=function(){--i||r.resolveWith(s,[s])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";o--;)(n=Dt.get(s[o],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),r.promise(e)}});var Nt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Pt=new RegExp("^(?:([+-])=|)("+Nt+")([a-z%]*)$","i"),At=["Top","Right","Bottom","Left"],Ot=function(t,e){return t=e||t,"none"===lt.css(t,"display")||!lt.contains(t.ownerDocument,t)},zt=/^(?:checkbox|radio)$/i,Ht=/<([\w:-]+)/,Lt=/^$|\/(?:java|ecma)script/i,Rt={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Rt.optgroup=Rt.option,Rt.tbody=Rt.tfoot=Rt.colgroup=Rt.caption=Rt.thead,Rt.th=Rt.td;var Ft=/<|&#?\w+;/;!function(){var t=Q.createDocumentFragment(),e=t.appendChild(Q.createElement("div")),n=Q.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),at.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",at.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var jt=/^key/,$t=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Wt=/^([^.]*)(?:\.(.+)|)/;lt.event={global:{},add:function(t,e,n,i,r){var s,o,a,l,u,h,c,f,d,p,g,m=Dt.get(t);if(m)for(n.handler&&(s=n,n=s.handler,r=s.selector),n.guid||(n.guid=lt.guid++),(l=m.events)||(l=m.events={}),(o=m.handle)||(o=m.handle=function(e){return void 0!==lt&<.event.triggered!==e.type?lt.event.dispatch.apply(t,arguments):void 0}),e=(e||"").match(kt)||[""],u=e.length;u--;)a=Wt.exec(e[u])||[],d=g=a[1],p=(a[2]||"").split(".").sort(),d&&(c=lt.event.special[d]||{},d=(r?c.delegateType:c.bindType)||d,c=lt.event.special[d]||{},h=lt.extend({type:d,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&<.expr.match.needsContext.test(r),namespace:p.join(".")},s),(f=l[d])||(f=l[d]=[],f.delegateCount=0,c.setup&&!1!==c.setup.call(t,i,p,o)||t.addEventListener&&t.addEventListener(d,o)),c.add&&(c.add.call(t,h),h.handler.guid||(h.handler.guid=n.guid)),r?f.splice(f.delegateCount++,0,h):f.push(h),lt.event.global[d]=!0)},remove:function(t,e,n,i,r){var s,o,a,l,u,h,c,f,d,p,g,m=Dt.hasData(t)&&Dt.get(t);if(m&&(l=m.events)){for(e=(e||"").match(kt)||[""],u=e.length;u--;)if(a=Wt.exec(e[u])||[],d=g=a[1],p=(a[2]||"").split(".").sort(),d){for(c=lt.event.special[d]||{},d=(i?c.delegateType:c.bindType)||d,f=l[d]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=f.length;s--;)h=f[s],!r&&g!==h.origType||n&&n.guid!==h.guid||a&&!a.test(h.namespace)||i&&i!==h.selector&&("**"!==i||!h.selector)||(f.splice(s,1),h.selector&&f.delegateCount--,c.remove&&c.remove.call(t,h));o&&!f.length&&(c.teardown&&!1!==c.teardown.call(t,p,m.handle)||lt.removeEvent(t,d,m.handle),delete l[d])}else for(d in l)lt.event.remove(t,d+e[u],n,i,!0);lt.isEmptyObject(l)&&Dt.remove(t,"handle events")}},dispatch:function(t){t=lt.event.fix(t);var e,n,i,r,s,o=[],a=tt.call(arguments),l=(Dt.get(this,"events")||{})[t.type]||[],u=lt.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,t)){for(o=lt.event.handlers.call(this,t,l),e=0;(r=o[e++])&&!t.isPropagationStopped();)for(t.currentTarget=r.elem,n=0;(s=r.handlers[n++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(s.namespace)||(t.handleObj=s,t.data=s.data,void 0!==(i=((lt.event.special[s.origType]||{}).handle||s.handler).apply(r.elem,a))&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,i,r,s,o=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==t.type)){for(i=[],n=0;n<a;n++)s=e[n],r=s.selector+" ",void 0===i[r]&&(i[r]=s.needsContext?lt(r,this).index(l)>-1:lt.find(r,this,null,[l]).length),i[r]&&i.push(s);i.length&&o.push({elem:l,handlers:i})}return a<e.length&&o.push({elem:this,handlers:e.slice(a)}),o},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var n,i,r,s=e.button;return null==t.pageX&&null!=e.clientX&&(n=t.target.ownerDocument||Q,i=n.documentElement,r=n.body,t.pageX=e.clientX+(i&&i.scrollLeft||r&&r.scrollLeft||0)-(i&&i.clientLeft||r&&r.clientLeft||0),t.pageY=e.clientY+(i&&i.scrollTop||r&&r.scrollTop||0)-(i&&i.clientTop||r&&r.clientTop||0)),t.which||void 0===s||(t.which=1&s?1:2&s?3:4&s?2:0),t}},fix:function(t){if(t[lt.expando])return t;var e,n,i,r=t.type,s=t,o=this.fixHooks[r];for(o||(this.fixHooks[r]=o=$t.test(r)?this.mouseHooks:jt.test(r)?this.keyHooks:{}),i=o.props?this.props.concat(o.props):this.props,t=new lt.Event(s),e=i.length;e--;)n=i[e],t[n]=s[n];return t.target||(t.target=Q),3===t.target.nodeType&&(t.target=t.target.parentNode),o.filter?o.filter(t,s):t},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==b()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===b()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&<.nodeName(this,"input"))return this.click(),!1},_default:function(t){return lt.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},lt.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},lt.Event=function(t,e){if(!(this instanceof lt.Event))return new lt.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?v:y):this.type=t,e&<.extend(this,e),this.timeStamp=t&&t.timeStamp||lt.now(),this[lt.expando]=!0},lt.Event.prototype={constructor:lt.Event,isDefaultPrevented:y,isPropagationStopped:y,isImmediatePropagationStopped:y,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=v,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=v,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=v,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},lt.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){lt.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,r=t.relatedTarget,s=t.handleObj;return r&&(r===i||lt.contains(i,r))||(t.type=s.origType,n=s.handler.apply(this,arguments),t.type=e),n}}}),lt.fn.extend({on:function(t,e,n,i){return _(this,t,e,n,i)},one:function(t,e,n,i){return _(this,t,e,n,i,1)},off:function(t,e,n){var i,r;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,lt(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!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=y),this.each(function(){lt.event.remove(this,t,n,e)})}});var qt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Bt=/<script|<style|<link/i,Ut=/checked\s*(?:[^=]|=\s*.checked.)/i,Yt=/^true\/(.*)/,Vt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;lt.extend({htmlPrefilter:function(t){return t.replace(qt,"<$1></$2>")},clone:function(t,e,n){var i,r,s,o,a=t.cloneNode(!0),l=lt.contains(t.ownerDocument,t);if(!(at.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||lt.isXMLDoc(t)))for(o=p(a),s=p(t),i=0,r=s.length;i<r;i++)M(s[i],o[i]);if(e)if(n)for(s=s||p(t),o=o||p(a),i=0,r=s.length;i<r;i++)C(s[i],o[i]);else C(t,a);return o=p(a,"script"),o.length>0&&g(o,!l&&p(t,"script")),a},cleanData:function(t){for(var e,n,i,r=lt.event.special,s=0;void 0!==(n=t[s]);s++)if(Tt(n)){if(e=n[Dt.expando]){if(e.events)for(i in e.events)r[i]?lt.event.remove(n,i):lt.removeEvent(n,i,e.handle);n[Dt.expando]=void 0}n[St.expando]&&(n[St.expando]=void 0)}}}),lt.fn.extend({domManip:T,detach:function(t){return D(this,t,!0)},remove:function(t){return D(this,t)},text:function(t){return Mt(this,function(t){return void 0===t?lt.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return T(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){x(this,t).appendChild(t)}})},prepend:function(){return T(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=x(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return T(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return T(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(lt.cleanData(p(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return lt.clone(this,t,e)})},html:function(t){return Mt(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Bt.test(t)&&!Rt[(Ht.exec(t)||["",""])[1].toLowerCase()]){t=lt.htmlPrefilter(t);try{for(;n<i;n++)e=this[n]||{},1===e.nodeType&&(lt.cleanData(p(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return T(this,arguments,function(e){var n=this.parentNode;lt.inArray(this,t)<0&&(lt.cleanData(p(this)),n&&n.replaceChild(e,this))},t)}}),lt.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){lt.fn[t]=function(t){for(var n,i=[],r=lt(t),s=r.length-1,o=0;o<=s;o++)n=o===s?this:this.clone(!0),lt(r[o])[e](n),nt.apply(i,n.get());return this.pushStack(i)}});var Kt,Xt={HTML:"block",BODY:"block"},Gt=/^margin/,Jt=new RegExp("^("+Nt+")(?!px)[a-z%]+$","i"),Zt=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=n),e.getComputedStyle(t)},Qt=function(t,e,n,i){var r,s,o={};for(s in e)o[s]=t.style[s],t.style[s]=e[s];r=n.apply(t,i||[]);for(s in e)t.style[s]=o[s];return r},te=Q.documentElement;!function(){function t(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",te.appendChild(o);var t=n.getComputedStyle(a);e="1%"!==t.top,s="2px"===t.marginLeft,i="4px"===t.width,a.style.marginRight="50%",r="4px"===t.marginRight,te.removeChild(o)}var e,i,r,s,o=Q.createElement("div"),a=Q.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",at.clearCloneStyle="content-box"===a.style.backgroundClip,o.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",o.appendChild(a),lt.extend(at,{pixelPosition:function(){return t(),e},boxSizingReliable:function(){return null==i&&t(),i},pixelMarginRight:function(){return null==i&&t(),r},reliableMarginLeft:function(){return null==i&&t(),s},reliableMarginRight:function(){var t,e=a.appendChild(Q.createElement("div"));return e.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",e.style.marginRight=e.style.width="0",a.style.width="1px",te.appendChild(o),t=!parseFloat(n.getComputedStyle(e).marginRight),te.removeChild(o),a.removeChild(e),t}}))}();var ee=/^(none|table(?!-c[ea]).+)/,ne={position:"absolute",visibility:"hidden",display:"block"},ie={letterSpacing:"0",fontWeight:"400"},re=["Webkit","O","Moz","ms"],se=Q.createElement("div").style;lt.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=I(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,s,o,a=lt.camelCase(e),l=t.style;if(e=lt.cssProps[a]||(lt.cssProps[a]=P(a)||a),o=lt.cssHooks[e]||lt.cssHooks[a],void 0===n)return o&&"get"in o&&void 0!==(r=o.get(t,!1,i))?r:l[e];s=typeof n,"string"===s&&(r=Pt.exec(n))&&r[1]&&(n=d(t,e,r),s="number"),null!=n&&n===n&&("number"===s&&(n+=r&&r[3]||(lt.cssNumber[a]?"":"px")),at.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),o&&"set"in o&&void 0===(n=o.set(t,n,i))||(l[e]=n))}},css:function(t,e,n,i){var r,s,o,a=lt.camelCase(e);return e=lt.cssProps[a]||(lt.cssProps[a]=P(a)||a),o=lt.cssHooks[e]||lt.cssHooks[a],o&&"get"in o&&(r=o.get(t,!0,n)),void 0===r&&(r=I(t,e,i)),"normal"===r&&e in ie&&(r=ie[e]),""===n||n?(s=parseFloat(r),!0===n||isFinite(s)?s||0:r):r}}),lt.each(["height","width"],function(t,e){lt.cssHooks[e]={get:function(t,n,i){if(n)return ee.test(lt.css(t,"display"))&&0===t.offsetWidth?Qt(t,ne,function(){return z(t,e,i)}):z(t,e,i)},set:function(t,n,i){var r,s=i&&Zt(t),o=i&&O(t,e,i,"border-box"===lt.css(t,"boxSizing",!1,s),s);return o&&(r=Pt.exec(n))&&"px"!==(r[3]||"px")&&(t.style[e]=n,n=lt.css(t,e)),A(t,n,o)}}}),lt.cssHooks.marginLeft=N(at.reliableMarginLeft,function(t,e){if(e)return(parseFloat(I(t,"marginLeft"))||t.getBoundingClientRect().left-Qt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),lt.cssHooks.marginRight=N(at.reliableMarginRight,function(t,e){if(e)return Qt(t,{display:"inline-block"},I,[t,"marginRight"])}),lt.each({margin:"",padding:"",border:"Width"},function(t,e){lt.cssHooks[t+e]={expand:function(n){for(var i=0,r={},s="string"==typeof n?n.split(" "):[n];i<4;i++)r[t+At[i]+e]=s[i]||s[i-2]||s[0];return r}},Gt.test(t)||(lt.cssHooks[t+e].set=A)}),lt.fn.extend({css:function(t,e){return Mt(this,function(t,e,n){var i,r,s={},o=0;if(lt.isArray(e)){for(i=Zt(t),r=e.length;o<r;o++)s[e[o]]=lt.css(t,e[o],!1,i);return s}return void 0!==n?lt.style(t,e,n):lt.css(t,e)},t,e,arguments.length>1)},show:function(){return H(this,!0)},hide:function(){return H(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Ot(this)?lt(this).show():lt(this).hide()})}}),lt.Tween=L,L.prototype={constructor:L,init:function(t,e,n,i,r,s){this.elem=t,this.prop=n,this.easing=r||lt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=s||(lt.cssNumber[n]?"":"px")},cur:function(){var t=L.propHooks[this.prop];return t&&t.get?t.get(this):L.propHooks._default.get(this)},run:function(t){var e,n=L.propHooks[this.prop];return this.options.duration?this.pos=e=lt.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):L.propHooks._default.set(this),this}},L.prototype.init.prototype=L.prototype,L.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=lt.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){lt.fx.step[t.prop]?lt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[lt.cssProps[t.prop]]&&!lt.cssHooks[t.prop]?t.elem[t.prop]=t.now:lt.style(t.elem,t.prop,t.now+t.unit)}}},L.propHooks.scrollTop=L.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},lt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},lt.fx=L.prototype.init,lt.fx.step={};var oe,ae,le=/^(?:toggle|show|hide)$/,ue=/queueHooks$/;lt.Animation=lt.extend(q,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return d(n.elem,t,Pt.exec(e),n),n}]},tweener:function(t,e){lt.isFunction(t)?(e=t,t=["*"]):t=t.match(kt);for(var n,i=0,r=t.length;i<r;i++)n=t[i],q.tweeners[n]=q.tweeners[n]||[],q.tweeners[n].unshift(e)},prefilters:[$],prefilter:function(t,e){e?q.prefilters.unshift(t):q.prefilters.push(t)}}),lt.speed=function(t,e,n){var i=t&&"object"==typeof t?lt.extend({},t):{complete:n||!n&&e||lt.isFunction(t)&&t,duration:t,easing:n&&e||e&&!lt.isFunction(e)&&e};return i.duration=lt.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in lt.fx.speeds?lt.fx.speeds[i.duration]:lt.fx.speeds._default,null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){lt.isFunction(i.old)&&i.old.call(this),i.queue&<.dequeue(this,i.queue)},i},lt.fn.extend({fadeTo:function(t,e,n,i){return this.filter(Ot).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var r=lt.isEmptyObject(t),s=lt.speed(e,n,i),o=function(){var e=q(this,lt.extend({},t),s);(r||Dt.get(this,"finish"))&&e.stop(!0)};return o.finish=o,r||!1===s.queue?this.each(o):this.queue(s.queue,o)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&!1!==t&&this.queue(t||"fx",[]),this.each(function(){var e=!0,r=null!=t&&t+"queueHooks",s=lt.timers,o=Dt.get(this);if(r)o[r]&&o[r].stop&&i(o[r]);else for(r in o)o[r]&&o[r].stop&&ue.test(r)&&i(o[r]);for(r=s.length;r--;)s[r].elem!==this||null!=t&&s[r].queue!==t||(s[r].anim.stop(n),e=!1,s.splice(r,1));!e&&n||lt.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,n=Dt.get(this),i=n[t+"queue"],r=n[t+"queueHooks"],s=lt.timers,o=i?i.length:0;for(n.finish=!0,lt.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=s.length;e--;)s[e].elem===this&&s[e].queue===t&&(s[e].anim.stop(!0),s.splice(e,1));for(e=0;e<o;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish})}}),lt.each(["toggle","show","hide"],function(t,e){var n=lt.fn[e];lt.fn[e]=function(t,i,r){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(F(e,!0),t,i,r)}}),lt.each({slideDown:F("show"),slideUp:F("hide"),slideToggle:F("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){lt.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}}),lt.timers=[],lt.fx.tick=function(){var t,e=0,n=lt.timers;for(oe=lt.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||lt.fx.stop(),oe=void 0},lt.fx.timer=function(t){lt.timers.push(t),t()?lt.fx.start():lt.timers.pop()},lt.fx.interval=13,lt.fx.start=function(){ae||(ae=n.setInterval(lt.fx.tick,lt.fx.interval))},lt.fx.stop=function(){n.clearInterval(ae),ae=null},lt.fx.speeds={slow:600,fast:200,_default:400},lt.fn.delay=function(t,e){return t=lt.fx?lt.fx.speeds[t]||t:t,e=e||"fx",this.queue(e,function(e,i){var r=n.setTimeout(e,t);i.stop=function(){n.clearTimeout(r)}})},function(){var t=Q.createElement("input"),e=Q.createElement("select"),n=e.appendChild(Q.createElement("option"));t.type="checkbox",at.checkOn=""!==t.value,at.optSelected=n.selected,e.disabled=!0,at.optDisabled=!n.disabled,t=Q.createElement("input"),t.value="t",t.type="radio",at.radioValue="t"===t.value}();var he,ce=lt.expr.attrHandle;lt.fn.extend({attr:function(t,e){return Mt(this,lt.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){lt.removeAttr(this,t)})}}),lt.extend({attr:function(t,e,n){var i,r,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return void 0===t.getAttribute?lt.prop(t,e,n):(1===s&<.isXMLDoc(t)||(e=e.toLowerCase(),r=lt.attrHooks[e]||(lt.expr.match.bool.test(e)?he:void 0)),void 0!==n?null===n?void lt.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=lt.find.attr(t,e),null==i?void 0:i))},attrHooks:{type:{set:function(t,e){if(!at.radioValue&&"radio"===e&<.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,s=e&&e.match(kt);if(s&&1===t.nodeType)for(;n=s[r++];)i=lt.propFix[n]||n,lt.expr.match.bool.test(n)&&(t[i]=!1),t.removeAttribute(n)}}),he={set:function(t,e,n){return!1===e?lt.removeAttr(t,n):t.setAttribute(n,n),n}},lt.each(lt.expr.match.bool.source.match(/\w+/g),function(t,e){var n=ce[e]||lt.find.attr;ce[e]=function(t,e,i){var r,s;return i||(s=ce[e],ce[e]=r,r=null!=n(t,e,i)?e.toLowerCase():null,ce[e]=s),r}});var fe=/^(?:input|select|textarea|button)$/i,de=/^(?:a|area)$/i;lt.fn.extend({prop:function(t,e){return Mt(this,lt.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[lt.propFix[t]||t]})}}),lt.extend({prop:function(t,e,n){var i,r,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&<.isXMLDoc(t)||(e=lt.propFix[e]||e,r=lt.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=lt.find.attr(t,"tabindex");return e?parseInt(e,10):fe.test(t.nodeName)||de.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),at.optSelected||(lt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),lt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){lt.propFix[this.toLowerCase()]=this});var pe=/[\t\r\n\f]/g;lt.fn.extend({addClass:function(t){var e,n,i,r,s,o,a,l=0;if(lt.isFunction(t))return this.each(function(e){lt(this).addClass(t.call(this,e,B(this)))});if("string"==typeof t&&t)for(e=t.match(kt)||[];n=this[l++];)if(r=B(n),i=1===n.nodeType&&(" "+r+" ").replace(pe," ")){for(o=0;s=e[o++];)i.indexOf(" "+s+" ")<0&&(i+=s+" ");a=lt.trim(i),r!==a&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,i,r,s,o,a,l=0;if(lt.isFunction(t))return this.each(function(e){lt(this).removeClass(t.call(this,e,B(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(kt)||[];n=this[l++];)if(r=B(n),i=1===n.nodeType&&(" "+r+" ").replace(pe," ")){for(o=0;s=e[o++];)for(;i.indexOf(" "+s+" ")>-1;)i=i.replace(" "+s+" "," ");a=lt.trim(i),r!==a&&n.setAttribute("class",a)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):lt.isFunction(t)?this.each(function(n){lt(this).toggleClass(t.call(this,n,B(this),e),e)}):this.each(function(){var e,i,r,s;if("string"===n)for(i=0,r=lt(this),s=t.match(kt)||[];e=s[i++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else void 0!==t&&"boolean"!==n||(e=B(this),e&&Dt.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Dt.get(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+B(n)+" ").replace(pe," ").indexOf(e)>-1)return!0;return!1}});var ge=/\r/g,me=/[\x20\t\r\n\f]+/g;lt.fn.extend({val:function(t){var e,n,i,r=this[0];{if(arguments.length)return i=lt.isFunction(t),this.each(function(n){var r;1===this.nodeType&&(r=i?t.call(this,n,lt(this).val()):t,null==r?r="":"number"==typeof r?r+="":lt.isArray(r)&&(r=lt.map(r,function(t){return null==t?"":t+""})),(e=lt.valHooks[this.type]||lt.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))});if(r)return(e=lt.valHooks[r.type]||lt.valHooks[r.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(ge,""):null==n?"":n)}}}),lt.extend({valHooks:{option:{get:function(t){var e=lt.find.attr(t,"value");return null!=e?e:lt.trim(lt.text(t)).replace(me," ")}},select:{get:function(t){for(var e,n,i=t.options,r=t.selectedIndex,s="select-one"===t.type||r<0,o=s?null:[],a=s?r+1:i.length,l=r<0?a:s?r:0;l<a;l++)if(n=i[l],(n.selected||l===r)&&(at.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!lt.nodeName(n.parentNode,"optgroup"))){if(e=lt(n).val(),s)return e;o.push(e)}return o},set:function(t,e){for(var n,i,r=t.options,s=lt.makeArray(e),o=r.length;o--;)i=r[o],(i.selected=lt.inArray(lt.valHooks.option.get(i),s)>-1)&&(n=!0);return n||(t.selectedIndex=-1),s}}}}),lt.each(["radio","checkbox"],function(){lt.valHooks[this]={set:function(t,e){if(lt.isArray(e))return t.checked=lt.inArray(lt(t).val(),e)>-1}},at.checkOn||(lt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var ve=/^(?:focusinfocus|focusoutblur)$/;lt.extend(lt.event,{trigger:function(t,e,i,r){var s,o,a,l,u,h,c,f=[i||Q],d=ot.call(t,"type")?t.type:t,p=ot.call(t,"namespace")?t.namespace.split("."):[];if(o=a=i=i||Q,3!==i.nodeType&&8!==i.nodeType&&!ve.test(d+lt.event.triggered)&&(d.indexOf(".")>-1&&(p=d.split("."),d=p.shift(),p.sort()),u=d.indexOf(":")<0&&"on"+d,t=t[lt.expando]?t:new lt.Event(d,"object"==typeof t&&t),t.isTrigger=r?2:3,t.namespace=p.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),e=null==e?[t]:lt.makeArray(e,[t]),c=lt.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(i,e))){if(!r&&!c.noBubble&&!lt.isWindow(i)){for(l=c.delegateType||d,ve.test(l+d)||(o=o.parentNode);o;o=o.parentNode)f.push(o),a=o;a===(i.ownerDocument||Q)&&f.push(a.defaultView||a.parentWindow||n)}for(s=0;(o=f[s++])&&!t.isPropagationStopped();)t.type=s>1?l:c.bindType||d,h=(Dt.get(o,"events")||{})[t.type]&&Dt.get(o,"handle"),h&&h.apply(o,e),(h=u&&o[u])&&h.apply&&Tt(o)&&(t.result=h.apply(o,e),!1===t.result&&t.preventDefault());return t.type=d,r||t.isDefaultPrevented()||c._default&&!1!==c._default.apply(f.pop(),e)||!Tt(i)||u&<.isFunction(i[d])&&!lt.isWindow(i)&&(a=i[u],a&&(i[u]=null),lt.event.triggered=d,i[d](),lt.event.triggered=void 0,a&&(i[u]=a)),t.result}},simulate:function(t,e,n){var i=lt.extend(new lt.Event,n,{type:t,isSimulated:!0});lt.event.trigger(i,null,e)}}),lt.fn.extend({trigger:function(t,e){return this.each(function(){lt.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return lt.event.trigger(t,e,n,!0)}}),lt.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){lt.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),lt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),at.focusin="onfocusin"in n,at.focusin||lt.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){lt.event.simulate(e,t.target,lt.event.fix(t))};lt.event.special[e]={setup:function(){var i=this.ownerDocument||this,r=Dt.access(i,e);r||i.addEventListener(t,n,!0),Dt.access(i,e,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=Dt.access(i,e)-1;r?Dt.access(i,e,r):(i.removeEventListener(t,n,!0),Dt.remove(i,e))}}});var ye=n.location,be=lt.now(),_e=/\?/;lt.parseJSON=function(t){return JSON.parse(t+"")},lt.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||lt.error("Invalid XML: "+t),e};var xe=/#.*$/,we=/([?&])_=[^&]*/,ke=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ce=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Me=/^(?:GET|HEAD)$/,Te=/^\/\//,De={},Se={},Ee="*/".concat("*"),Ie=Q.createElement("a");Ie.href=ye.href,lt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ye.href,type:"GET",isLocal:Ce.test(ye.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ee,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":lt.parseJSON,"text xml":lt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?V(V(t,lt.ajaxSettings),e):V(lt.ajaxSettings,t)},ajaxPrefilter:U(De),ajaxTransport:U(Se),ajax:function(t,e){function i(t,e,i,a){var u,c,y,b,x,k=e;2!==_&&(_=2,l&&n.clearTimeout(l),r=void 0,o=a||"",w.readyState=t>0?4:0,u=t>=200&&t<300||304===t,i&&(b=K(f,w,i)),b=X(f,b,w,u),u?(f.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(lt.lastModified[s]=x),(x=w.getResponseHeader("etag"))&&(lt.etag[s]=x)),204===t||"HEAD"===f.type?k="nocontent":304===t?k="notmodified":(k=b.state,c=b.data,y=b.error,u=!y)):(y=k,!t&&k||(k="error",t<0&&(t=0))),w.status=t,w.statusText=(e||k)+"",u?g.resolveWith(d,[c,k,w]):g.rejectWith(d,[w,k,y]),w.statusCode(v),v=void 0,h&&p.trigger(u?"ajaxSuccess":"ajaxError",[w,f,u?c:y]),m.fireWith(d,[w,k]),h&&(p.trigger("ajaxComplete",[w,f]),--lt.active||lt.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var r,s,o,a,l,u,h,c,f=lt.ajaxSetup({},e),d=f.context||f,p=f.context&&(d.nodeType||d.jquery)?lt(d):lt.event,g=lt.Deferred(),m=lt.Callbacks("once memory"),v=f.statusCode||{},y={},b={},_=0,x="canceled",w={readyState:0,getResponseHeader:function(t){var e;if(2===_){if(!a)for(a={};e=ke.exec(o);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===_?o:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return _||(t=b[n]=b[n]||t,y[t]=e),this},overrideMimeType:function(t){return _||(f.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 r&&r.abort(e),i(0,e),this}};if(g.promise(w).complete=m.add,w.success=w.done,w.error=w.fail,f.url=((t||f.url||ye.href)+"").replace(xe,"").replace(Te,ye.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=lt.trim(f.dataType||"*").toLowerCase().match(kt)||[""],null==f.crossDomain){u=Q.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=Ie.protocol+"//"+Ie.host!=u.protocol+"//"+u.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=lt.param(f.data,f.traditional)),Y(De,f,e,w),2===_)return w;h=lt.event&&f.global,h&&0==lt.active++&<.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Me.test(f.type),s=f.url,f.hasContent||(f.data&&(s=f.url+=(_e.test(s)?"&":"?")+f.data,delete f.data),!1===f.cache&&(f.url=we.test(s)?s.replace(we,"$1_="+be++):s+(_e.test(s)?"&":"?")+"_="+be++)),f.ifModified&&(lt.lastModified[s]&&w.setRequestHeader("If-Modified-Since",lt.lastModified[s]),lt.etag[s]&&w.setRequestHeader("If-None-Match",lt.etag[s])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&w.setRequestHeader("Content-Type",f.contentType),w.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Ee+"; q=0.01":""):f.accepts["*"]);for(c in f.headers)w.setRequestHeader(c,f.headers[c]);if(f.beforeSend&&(!1===f.beforeSend.call(d,w,f)||2===_))return w.abort();x="abort";for(c in{success:1,error:1,complete:1})w[c](f[c]);if(r=Y(Se,f,e,w)){if(w.readyState=1,h&&p.trigger("ajaxSend",[w,f]),2===_)return w;f.async&&f.timeout>0&&(l=n.setTimeout(function(){w.abort("timeout")},f.timeout));try{_=1,r.send(y,i)}catch(t){if(!(_<2))throw t;i(-1,t)}}else i(-1,"No Transport");return w},getJSON:function(t,e,n){return lt.get(t,e,n,"json")},getScript:function(t,e){return lt.get(t,void 0,e,"script")}}),lt.each(["get","post"],function(t,e){lt[e]=function(t,n,i,r){return lt.isFunction(n)&&(r=r||i,i=n,n=void 0),lt.ajax(lt.extend({url:t,type:e,dataType:r,data:n,success:i},lt.isPlainObject(t)&&t))}}),lt._evalUrl=function(t){return lt.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},lt.fn.extend({wrapAll:function(t){var e;return lt.isFunction(t)?this.each(function(e){lt(this).wrapAll(t.call(this,e))}):(this[0]&&(e=lt(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return lt.isFunction(t)?this.each(function(e){lt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=lt(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=lt.isFunction(t);return this.each(function(n){lt(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){lt.nodeName(this,"body")||lt(this).replaceWith(this.childNodes)}).end()}}),lt.expr.filters.hidden=function(t){return!lt.expr.filters.visible(t)},lt.expr.filters.visible=function(t){return t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0};var Ne=/%20/g,Pe=/\[\]$/,Ae=/\r?\n/g,Oe=/^(?:submit|button|image|reset|file)$/i,ze=/^(?:input|select|textarea|keygen)/i;lt.param=function(t,e){var n,i=[],r=function(t,e){e=lt.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=lt.ajaxSettings&<.ajaxSettings.traditional),lt.isArray(t)||t.jquery&&!lt.isPlainObject(t))lt.each(t,function(){r(this.name,this.value)});else for(n in t)G(n,t[n],e,r);return i.join("&").replace(Ne,"+")},lt.fn.extend({serialize:function(){return lt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=lt.prop(this,"elements");return t?lt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!lt(this).is(":disabled")&&ze.test(this.nodeName)&&!Oe.test(t)&&(this.checked||!zt.test(t))}).map(function(t,e){var n=lt(this).val();return null==n?null:lt.isArray(n)?lt.map(n,function(t){return{name:e.name,value:t.replace(Ae,"\r\n")}}):{name:e.name,value:n.replace(Ae,"\r\n")}}).get()}}),lt.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var He={0:200,1223:204},Le=lt.ajaxSettings.xhr();at.cors=!!Le&&"withCredentials"in Le,at.ajax=Le=!!Le,lt.ajaxTransport(function(t){var e,i;if(at.cors||Le&&!t.crossDomain)return{send:function(r,s){var o,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)a.setRequestHeader(o,r[o]);e=function(t){return function(){e&&(e=i=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?s(0,"error"):s(a.status,a.statusText):s(He[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),i=a.onerror=e("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout(function(){e&&i()})},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),lt.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 lt.globalEval(t),t}}}),lt.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),lt.ajaxTransport("script",function(t){if(t.crossDomain){var e,n;return{send:function(i,r){e=lt("<script>").prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&r("error"===t.type?404:200,t.type)}),Q.head.appendChild(e[0])},abort:function(){n&&n()}}}});var Re=[],Fe=/(=)\?(?=&|$)|\?\?/;lt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Re.pop()||lt.expando+"_"+be++;return this[t]=!0,t}}),lt.ajaxPrefilter("json jsonp",function(t,e,i){var r,s,o,a=!1!==t.jsonp&&(Fe.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Fe.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return r=t.jsonpCallback=lt.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Fe,"$1"+r):!1!==t.jsonp&&(t.url+=(_e.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return o||lt.error(r+" was not called"),o[0]},t.dataTypes[0]="json",s=n[r],n[r]=function(){o=arguments},i.always(function(){void 0===s?lt(n).removeProp(r):n[r]=s,t[r]&&(t.jsonpCallback=e.jsonpCallback,Re.push(r)),o&<.isFunction(s)&&s(o[0]),o=s=void 0}),"script"}),lt.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||Q;var i=vt.exec(t),r=!n&&[];return i?[e.createElement(i[1])]:(i=m([t],e,r),r&&r.length&<(r).remove(),lt.merge([],i.childNodes))};var je=lt.fn.load;lt.fn.load=function(t,e,n){if("string"!=typeof t&&je)return je.apply(this,arguments);var i,r,s,o=this,a=t.indexOf(" ");return a>-1&&(i=lt.trim(t.slice(a)),t=t.slice(0,a)),lt.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(r="POST"),o.length>0&<.ajax({url:t,type:r||"GET",dataType:"html",data:e}).done(function(t){s=arguments,o.html(i?lt("<div>").append(lt.parseHTML(t)).find(i):t)}).always(n&&function(t,e){o.each(function(){n.apply(this,s||[t.responseText,e,t])})}),this},lt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){lt.fn[e]=function(t){return this.on(e,t)}}),lt.expr.filters.animated=function(t){return lt.grep(lt.timers,function(e){return t===e.elem}).length},lt.offset={setOffset:function(t,e,n){var i,r,s,o,a,l,u,h=lt.css(t,"position"),c=lt(t),f={};"static"===h&&(t.style.position="relative"),a=c.offset(),s=lt.css(t,"top"),l=lt.css(t,"left"),u=("absolute"===h||"fixed"===h)&&(s+l).indexOf("auto")>-1,u?(i=c.position(),o=i.top,r=i.left):(o=parseFloat(s)||0,r=parseFloat(l)||0),lt.isFunction(e)&&(e=e.call(t,n,lt.extend({},a))),null!=e.top&&(f.top=e.top-a.top+o),null!=e.left&&(f.left=e.left-a.left+r),"using"in e?e.using.call(t,f):c.css(f)}},lt.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){lt.offset.setOffset(this,t,e)});var e,n,i=this[0],r={top:0,left:0},s=i&&i.ownerDocument;if(s)return e=s.documentElement,lt.contains(e,i)?(r=i.getBoundingClientRect(),n=J(s),{top:r.top+n.pageYOffset-e.clientTop,left:r.left+n.pageXOffset-e.clientLeft}):r},position:function(){if(this[0]){var t,e,n=this[0],i={top:0,left:0};return"fixed"===lt.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),lt.nodeName(t[0],"html")||(i=t.offset()),i.top+=lt.css(t[0],"borderTopWidth",!0),i.left+=lt.css(t[0],"borderLeftWidth",!0)),{top:e.top-i.top-lt.css(n,"marginTop",!0),left:e.left-i.left-lt.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===lt.css(t,"position");)t=t.offsetParent;return t||te})}}),lt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n="pageYOffset"===e;lt.fn[t]=function(i){return Mt(this,function(t,i,r){var s=J(t);if(void 0===r)return s?s[e]:t[i];s?s.scrollTo(n?s.pageXOffset:r,n?r:s.pageYOffset):t[i]=r},t,i,arguments.length)}}),lt.each(["top","left"],function(t,e){lt.cssHooks[e]=N(at.pixelPosition,function(t,n){if(n)return n=I(t,e),Jt.test(n)?lt(t).position()[e]+"px":n})}),lt.each({Height:"height",Width:"width"},function(t,e){lt.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){lt.fn[i]=function(i,r){var s=arguments.length&&(n||"boolean"!=typeof i),o=n||(!0===i||!0===r?"margin":"border");return Mt(this,function(e,n,i){var r;return lt.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?lt.css(e,n,o):lt.style(e,n,i,o)},e,s?i:void 0,s,null)}})}),lt.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},size:function(){return this.length}}),lt.fn.andSelf=lt.fn.addBack,i=[],void 0!==(r=function(){return lt}.apply(e,i))&&(t.exports=r);var $e=n.jQuery,We=n.$;return lt.noConflict=function(t){return n.$===lt&&(n.$=We),t&&n.jQuery===lt&&(n.jQuery=$e),lt},s||(n.jQuery=n.$=lt),lt})},function(t,e,n){(function(i){var r,s;!function(o){var a="object"==typeof self&&self.self===self&&self||"object"==typeof i&&i.global===i&&i;r=[n(5),n(0),e],void 0!==(s=function(t,e,n){a.Backbone=o(a,n,t,e)}.apply(e,r))&&(t.exports=s)}(function(t,e,n,i){var r=t.Backbone,s=Array.prototype.slice;e.VERSION="1.3.3",e.$=i,e.noConflict=function(){return t.Backbone=r,this},e.emulateHTTP=!1,e.emulateJSON=!1;var o=function(t,e,i){switch(t){case 1:return function(){return n[e](this[i])};case 2:return function(t){return n[e](this[i],t)};case 3:return function(t,r){return n[e](this[i],l(t,this),r)};case 4:return function(t,r,s){return n[e](this[i],l(t,this),r,s)};default:return function(){var t=s.call(arguments);return t.unshift(this[i]),n[e].apply(n,t)}}},a=function(t,e,i){n.each(e,function(e,r){n[r]&&(t.prototype[r]=o(e,r,i))})},l=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?u(t):n.isString(t)?function(e){return e.get(t)}:t},u=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}},h=e.Events={},c=/\s+/,f=function(t,e,i,r,s){var o,a=0;if(i&&"object"==typeof i){void 0!==r&&"context"in s&&void 0===s.context&&(s.context=r);for(o=n.keys(i);a<o.length;a++)e=f(t,e,o[a],i[o[a]],s)}else if(i&&c.test(i))for(o=i.split(c);a<o.length;a++)e=t(e,o[a],r,s);else e=t(e,i,r,s);return e};h.on=function(t,e,n){return d(this,t,e,n)};var d=function(t,e,n,i,r){if(t._events=f(p,t._events||{},e,n,{context:i,ctx:t,listening:r}),r){(t._listeners||(t._listeners={}))[r.id]=r}return t};h.listenTo=function(t,e,i){if(!t)return this;var r=t._listenId||(t._listenId=n.uniqueId("l")),s=this._listeningTo||(this._listeningTo={}),o=s[r];if(!o){var a=this._listenId||(this._listenId=n.uniqueId("l"));o=s[r]={obj:t,objId:r,id:a,listeningTo:s,count:0}}return d(t,e,i,this,o),this};var p=function(t,e,n,i){if(n){var r=t[e]||(t[e]=[]),s=i.context,o=i.ctx,a=i.listening;a&&a.count++,r.push({callback:n,context:s,ctx:s||o,listening:a})}return t};h.off=function(t,e,n){return this._events?(this._events=f(g,this._events,t,e,{context:n,listeners:this._listeners}),this):this},h.stopListening=function(t,e,i){var r=this._listeningTo;if(!r)return this;for(var s=t?[t._listenId]:n.keys(r),o=0;o<s.length;o++){var a=r[s[o]];if(!a)break;a.obj.off(e,i,this)}return this};var g=function(t,e,i,r){if(t){var s,o=0,a=r.context,l=r.listeners;if(e||i||a){for(var u=e?[e]:n.keys(t);o<u.length;o++){e=u[o];var h=t[e];if(!h)break;for(var c=[],f=0;f<h.length;f++){var d=h[f];i&&i!==d.callback&&i!==d.callback._callback||a&&a!==d.context?c.push(d):(s=d.listening)&&0==--s.count&&(delete l[s.id],delete s.listeningTo[s.objId])}c.length?t[e]=c:delete t[e]}return t}for(var p=n.keys(l);o<p.length;o++)s=l[p[o]],delete l[s.id],delete s.listeningTo[s.objId]}};h.once=function(t,e,i){var r=f(m,{},t,e,n.bind(this.off,this));return"string"==typeof t&&null==i&&(e=void 0),this.on(r,e,i)},h.listenToOnce=function(t,e,i){var r=f(m,{},e,i,n.bind(this.stopListening,this,t));return this.listenTo(t,r)};var m=function(t,e,i,r){if(i){var s=t[e]=n.once(function(){r(e,s),i.apply(this,arguments)});s._callback=i}return t};h.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),n=Array(e),i=0;i<e;i++)n[i]=arguments[i+1];return f(v,this._events,t,void 0,n),this};var v=function(t,e,n,i){if(t){var r=t[e],s=t.all;r&&s&&(s=s.slice()),r&&y(r,i),s&&y(s,[e].concat(i))}return t},y=function(t,e){var n,i=-1,r=t.length,s=e[0],o=e[1],a=e[2];switch(e.length){case 0:for(;++i<r;)(n=t[i]).callback.call(n.ctx);return;case 1:for(;++i<r;)(n=t[i]).callback.call(n.ctx,s);return;case 2:for(;++i<r;)(n=t[i]).callback.call(n.ctx,s,o);return;case 3:for(;++i<r;)(n=t[i]).callback.call(n.ctx,s,o,a);return;default:for(;++i<r;)(n=t[i]).callback.apply(n.ctx,e);return}};h.bind=h.on,h.unbind=h.off,n.extend(e,h);var b=e.Model=function(t,e){var i=t||{};e||(e={}),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(i=this.parse(i,e)||{});var r=n.result(this,"defaults");i=n.defaults(n.extend({},r,i),r),this.set(i,e),this.changed={},this.initialize.apply(this,arguments)};n.extend(b.prototype,h,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(t){return n.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return n.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!n.iteratee(t,this)(this.attributes)},set:function(t,e,i){if(null==t)return this;var r;if("object"==typeof t?(r=t,i=e):(r={})[t]=e,i||(i={}),!this._validate(r,i))return!1;var s=i.unset,o=i.silent,a=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=n.clone(this.attributes),this.changed={});var u=this.attributes,h=this.changed,c=this._previousAttributes;for(var f in r)e=r[f],n.isEqual(u[f],e)||a.push(f),n.isEqual(c[f],e)?delete h[f]:h[f]=e,s?delete u[f]:u[f]=e;if(this.idAttribute in r&&(this.id=this.get(this.idAttribute)),!o){a.length&&(this._pending=i);for(var d=0;d<a.length;d++)this.trigger("change:"+a[d],this,u[a[d]],i)}if(l)return this;if(!o)for(;this._pending;)i=this._pending,this._pending=!1,this.trigger("change",this,i);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,n.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var i in this.attributes)e[i]=void 0;return this.set(e,n.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!n.isEmpty(this.changed):n.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&n.clone(this.changed);var e=this._changing?this._previousAttributes:this.attributes,i={};for(var r in t){var s=t[r];n.isEqual(e[r],s)||(i[r]=s)}return!!n.size(i)&&i},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(t){t=n.extend({parse:!0},t);var e=this,i=t.success;return t.success=function(n){var r=t.parse?e.parse(n,t):n;if(!e.set(r,t))return!1;i&&i.call(t.context,e,n,t),e.trigger("sync",e,n,t)},F(this,t),this.sync("read",this,t)},save:function(t,e,i){var r;null==t||"object"==typeof t?(r=t,i=e):(r={})[t]=e,i=n.extend({validate:!0,parse:!0},i);var s=i.wait;if(r&&!s){if(!this.set(r,i))return!1}else if(!this._validate(r,i))return!1;var o=this,a=i.success,l=this.attributes;i.success=function(t){o.attributes=l;var e=i.parse?o.parse(t,i):t;if(s&&(e=n.extend({},r,e)),e&&!o.set(e,i))return!1;a&&a.call(i.context,o,t,i),o.trigger("sync",o,t,i)},F(this,i),r&&s&&(this.attributes=n.extend({},l,r));var u=this.isNew()?"create":i.patch?"patch":"update";"patch"!==u||i.attrs||(i.attrs=r);var h=this.sync(u,this,i);return this.attributes=l,h},destroy:function(t){t=t?n.clone(t):{};var e=this,i=t.success,r=t.wait,s=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(n){r&&s(),i&&i.call(t.context,e,n,t),e.isNew()||e.trigger("sync",e,n,t)};var o=!1;return this.isNew()?n.defer(t.success):(F(this,t),o=this.sync("delete",this,t)),r||s(),o},url:function(){var t=n.result(this,"urlRoot")||n.result(this.collection,"url")||R();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},n.extend({},t,{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=n.extend({},this.attributes,t);var i=this.validationError=this.validate(t,e)||null;return!i||(this.trigger("invalid",this,i,n.extend(e,{validationError:i})),!1)}}),a(b,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes");var _=e.Collection=function(t,e){e||(e={}),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,n.extend({silent:!0},e))},x={add:!0,remove:!0,merge:!0},w={add:!0,remove:!1},k=function(t,e,n){n=Math.min(Math.max(n,0),t.length);var i,r=Array(t.length-n),s=e.length;for(i=0;i<r.length;i++)r[i]=t[i+n];for(i=0;i<s;i++)t[i+n]=e[i];for(i=0;i<r.length;i++)t[i+s+n]=r[i]};n.extend(_.prototype,h,{model:b,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,n.extend({merge:!1},e,w))},remove:function(t,e){e=n.extend({},e);var i=!n.isArray(t);t=i?[t]:t.slice();var r=this._removeModels(t,e);return!e.silent&&r.length&&(e.changes={added:[],merged:[],removed:r},this.trigger("update",this,e)),i?r[0]:r},set:function(t,e){if(null!=t){e=n.extend({},x,e),e.parse&&!this._isModel(t)&&(t=this.parse(t,e)||[]);var i=!n.isArray(t);t=i?[t]:t.slice();var r=e.at;null!=r&&(r=+r),r>this.length&&(r=this.length),r<0&&(r+=this.length+1);var s,o,a=[],l=[],u=[],h=[],c={},f=e.add,d=e.merge,p=e.remove,g=!1,m=this.comparator&&null==r&&!1!==e.sort,v=n.isString(this.comparator)?this.comparator:null;for(o=0;o<t.length;o++){s=t[o];var y=this.get(s);if(y){if(d&&s!==y){var b=this._isModel(s)?s.attributes:s;e.parse&&(b=y.parse(b,e)),y.set(b,e),u.push(y),m&&!g&&(g=y.hasChanged(v))}c[y.cid]||(c[y.cid]=!0,a.push(y)),t[o]=y}else f&&(s=t[o]=this._prepareModel(s,e))&&(l.push(s),this._addReference(s,e),c[s.cid]=!0,a.push(s))}if(p){for(o=0;o<this.length;o++)s=this.models[o],c[s.cid]||h.push(s);h.length&&this._removeModels(h,e)}var _=!1,w=!m&&f&&p;if(a.length&&w?(_=this.length!==a.length||n.some(this.models,function(t,e){return t!==a[e]}),this.models.length=0,k(this.models,a,0),this.length=this.models.length):l.length&&(m&&(g=!0),k(this.models,l,null==r?this.length:r),this.length=this.models.length),g&&this.sort({silent:!0}),!e.silent){for(o=0;o<l.length;o++)null!=r&&(e.index=r+o),s=l[o],s.trigger("add",s,this,e);(g||_)&&this.trigger("sort",this,e),(l.length||h.length||u.length)&&(e.changes={added:l,removed:h,merged:u},this.trigger("update",this,e))}return i?t[0]:t}},reset:function(t,e){e=e?n.clone(e):{};for(var i=0;i<this.models.length;i++)this._removeReference(this.models[i],e);return e.previousModels=this.models,this._reset(),t=this.add(t,n.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,n.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,n.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return s.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[this.modelId(t.attributes||t)]||t.cid&&this._byId[t.cid]},has:function(t){return null!=this.get(t)},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var i=e.length;return n.isFunction(e)&&(e=n.bind(e,this)),1===i||n.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return this.map(t+"")},fetch:function(t){t=n.extend({parse:!0},t);var e=t.success,i=this;return t.success=function(n){var r=t.reset?"reset":"set";i[r](n,t),e&&e.call(t.context,i,n,t),i.trigger("sync",i,n,t)},F(this,t),this.sync("read",this,t)},create:function(t,e){e=e?n.clone(e):{};var i=e.wait;if(!(t=this._prepareModel(t,e)))return!1;i||this.add(t,e);var r=this,s=e.success;return e.success=function(t,e,n){i&&r.add(t,n),s&&s.call(n.context,t,e,n)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(this._isModel(t))return t.collection||(t.collection=this),t;e=e?n.clone(e):{},e.collection=this;var i=new this.model(t,e);return i.validationError?(this.trigger("invalid",this,i.validationError,e),!1):i},_removeModels:function(t,e){for(var n=[],i=0;i<t.length;i++){var r=this.get(t[i]);if(r){var s=this.indexOf(r);this.models.splice(s,1),this.length--,delete this._byId[r.cid];var o=this.modelId(r.attributes);null!=o&&delete this._byId[o],e.silent||(e.index=s,r.trigger("remove",r,this,e)),n.push(r),this._removeReference(r,e)}}return n},_isModel:function(t){return t instanceof b},_addReference:function(t,e){this._byId[t.cid]=t;var n=this.modelId(t.attributes);null!=n&&(this._byId[n]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var n=this.modelId(t.attributes);null!=n&&delete this._byId[n],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,i){if(e){if(("add"===t||"remove"===t)&&n!==this)return;if("destroy"===t&&this.remove(e,i),"change"===t){var r=this.modelId(e.previousAttributes()),s=this.modelId(e.attributes);r!==s&&(null!=r&&delete this._byId[r],null!=s&&(this._byId[s]=e))}}this.trigger.apply(this,arguments)}}),a(_,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models");var C=e.View=function(t){this.cid=n.uniqueId("view"),n.extend(this,n.pick(t,T)),this._ensureElement(),this.initialize.apply(this,arguments)},M=/^(\S+)\s*(.*)$/,T=["model","collection","el","id","attributes","className","tagName","events"];n.extend(C.prototype,h,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=n.result(this,"events")),!t)return this;this.undelegateEvents();for(var e in t){var i=t[e];if(n.isFunction(i)||(i=this[i]),i){var r=e.match(M);this.delegate(r[1],r[2],n.bind(i,this))}}return this},delegate:function(t,e,n){return this.$el.on(t+".delegateEvents"+this.cid,e,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,n){return this.$el.off(t+".delegateEvents"+this.cid,e,n),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var t=n.extend({},n.result(this,"attributes"));this.id&&(t.id=n.result(this,"id")),this.className&&(t.class=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}}),e.sync=function(t,i,r){var s=D[t];n.defaults(r||(r={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var o={type:s,dataType:"json"};if(r.url||(o.url=n.result(i,"url")||R()),null!=r.data||!i||"create"!==t&&"update"!==t&&"patch"!==t||(o.contentType="application/json",o.data=JSON.stringify(r.attrs||i.toJSON(r))),r.emulateJSON&&(o.contentType="application/x-www-form-urlencoded",o.data=o.data?{model:o.data}:{}),r.emulateHTTP&&("PUT"===s||"DELETE"===s||"PATCH"===s)){o.type="POST",r.emulateJSON&&(o.data._method=s);var a=r.beforeSend;r.beforeSend=function(t){if(t.setRequestHeader("X-HTTP-Method-Override",s),a)return a.apply(this,arguments)}}"GET"===o.type||r.emulateJSON||(o.processData=!1);var l=r.error;r.error=function(t,e,n){r.textStatus=e,r.errorThrown=n,l&&l.call(r.context,t,e,n)};var u=r.xhr=e.ajax(n.extend(o,r));return i.trigger("request",i,u,r),u};var D={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var S=e.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},E=/\((.*?)\)/g,I=/(\(\?)?:\w+/g,N=/\*\w+/g,P=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(S.prototype,h,{initialize:function(){},route:function(t,i,r){n.isRegExp(t)||(t=this._routeToRegExp(t)),n.isFunction(i)&&(r=i,i=""),r||(r=this[i]);var s=this;return e.history.route(t,function(n){var o=s._extractParameters(t,n);!1!==s.execute(r,o,i)&&(s.trigger.apply(s,["route:"+i].concat(o)),s.trigger("route",i,o),e.history.trigger("route",s,i,o))}),this},execute:function(t,e,n){t&&t.apply(this,e)},navigate:function(t,n){return e.history.navigate(t,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var t,e=n.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(P,"\\$&").replace(E,"(?:$1)?").replace(I,function(t,e){return e?t:"([^/?]+)"}).replace(N,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var i=t.exec(e).slice(1);return n.map(i,function(t,e){return e===i.length-1?t||null:t?decodeURIComponent(t):null})}});var A=e.History=function(){this.handlers=[],this.checkUrl=n.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},O=/^[#\/]|\s+$/g,z=/^\/+|\/+$/g,H=/#.*$/;A.started=!1,n.extend(A.prototype,h,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return null==t&&(t=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),t.replace(O,"")},start:function(t){if(A.started)throw new Error("Backbone.history has already been started");if(A.started=!0,this.options=n.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(z,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var i=document.body,r=i.insertBefore(this.iframe,i.firstChild).contentWindow;r.document.open(),r.document.close(),r.location.hash="#"+this.fragment}var s=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?s("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?s("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),A.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),n.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0}))},navigate:function(t,e){if(!A.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;""!==t&&"?"!==t.charAt(0)||(n=n.slice(0,-1)||"/");var i=n+t;if(t=this.decodeFragment(t.replace(H,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,i);else{if(!this._wantsHashChange)return this.location.assign(i);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var r=this.iframe.contentWindow;e.replace||(r.document.open(),r.document.close()),this._updateHash(r.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var i=t.href.replace(/(javascript:|#).*$/,"");t.replace(i+"#"+e)}else t.hash="#"+e}}),e.history=new A;var L=function(t,e){var i,r=this;return i=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(i,r,e),i.prototype=n.create(r.prototype,t),i.prototype.constructor=i,i.__super__=r.prototype,i};b.extend=_.extend=S.extend=C.extend=A.extend=L;var R=function(){throw new Error('A "url" property or function must be specified')},F=function(t,e){var n=e.error;e.error=function(i){n&&n.call(e.context,t,i,e),t.trigger("error",t,i,e)}};return e})}).call(e,n(4))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t,i){function r(e,n,i){function r(){var t={v:{},h:{}};return t.v.lines=m.selectAll("line.v-grid-line").data(d.x.ticks(v.x.fn.ticks()[0])),t.v.lines.enter().append("svg:line").classed("grid-line v-grid-line",!0),t.v.lines.attr("x1",d.x).attr("x2",d.x).attr("y1",0).attr("y2",n.height),t.v.lines.exit().remove(),t.h.lines=m.selectAll("line.h-grid-line").data(d.y.ticks(v.y.fn.ticks()[0])),t.h.lines.enter().append("svg:line").classed("grid-line h-grid-line",!0),t.h.lines.attr("x1",0).attr("x2",n.width).attr("y1",d.y).attr("y2",d.y),t.h.lines.exit().remove(),t}function s(){return b.attr("cx",function(t,e){return d.x(h(t,e))}).attr("cy",function(t,e){return d.y(c(t,e))}).style("display","block").filter(function(t,e){var i=u.select(this).attr("cx"),r=u.select(this).attr("cy");return i<0||i>n.width||(r<0||r>n.height)}).style("display","none")}function o(e,n,i){t(".chart-info-box").remove(),v.redraw(),s(),y=r(),t(g.node()).trigger("zoom.scatterplot",{scale:p.scale(),translate:p.translate()})}function a(e,i,r){return i+=8,t(['<div class="chart-info-box" style="position: absolute">',void 0!==n.idColumn?"<div>"+r[n.idColumn]+"</div>":"","<div>",h(r),"</div>","<div>",c(r),"</div>","</div>"].join("")).css({top:e,left:i,"z-index":2})}var l=function(t,e){return"translate("+t+","+e+")"},h=function(t,e){return t[n.xColumn]},c=function(t,e){return t[n.yColumn]},f={x:{extent:u.extent(i,h)},y:{extent:u.extent(i,c)}},d={x:u.scale.linear().domain(f.x.extent).range([0,n.width]),y:u.scale.linear().domain(f.y.extent).range([n.height,0])},p=u.behavior.zoom().x(d.x).y(d.y).scaleExtent([1,30]).scale(n.scale||1).translate(n.translate||[0,0]),g=u.select(e).attr("class","scatterplot").attr("width","100%").attr("height",n.height+(n.margin.top+n.margin.bottom)),m=g.append("g").attr("class","content").attr("transform",l(n.margin.left,n.margin.top)).call(p);m.append("rect").attr("class","zoom-rect").attr("width",n.width).attr("height",n.height).style("fill","transparent");var v={x:{},y:{}};v.x.fn=u.svg.axis().orient("bottom").scale(d.x).ticks(n.xTicks).tickFormat(u.format("s")),v.y.fn=u.svg.axis().orient("left").scale(d.y).ticks(n.yTicks).tickFormat(u.format("s")),v.x.g=m.append("g").attr("class","x axis").attr("transform",l(0,n.height)).call(v.x.fn),v.y.g=m.append("g").attr("class","y axis").call(v.y.fn);v.x.label=g.append("text").attr("id","x-axis-label").attr("class","axis-label").text(n.xLabel).attr("text-anchor","middle").attr("dominant-baseline","text-after-edge").attr("x",n.width/2+n.margin.left).attr("y",n.height+n.margin.bottom+n.margin.top-6),v.y.label=g.append("text").attr("id","y-axis-label").attr("class","axis-label").text(n.yLabel).attr("text-anchor","middle").attr("dominant-baseline","text-before-edge").attr("x",6).attr("y",n.height/2).attr("transform",function(t,e,n){return"rotate("+t+","+e+","+n+")"}(-90,6,n.height/2)),v.redraw=function(){g.select(".x.axis").call(v.x.fn),g.select(".y.axis").call(v.y.fn)};var y=r(),b=m.selectAll(".glyph").data(i).enter().append("svg:circle").classed("glyph",!0).attr("cx",function(t,e){return d.x(h(t,e))}).attr("cy",function(t,e){return d.y(c(t,e))}).attr("r",0);b.transition().duration(n.animDuration).attr("r",n.datapointSize),s(),p.on("zoom",o),b.on("mouseover",function(e,i){var r=u.select(this);r.classed("highlight",!0).style("fill","red").style("fill-opacity",1),m.append("line").attr("stroke","red").attr("stroke-width",1).attr("x1",r.attr("cx")-n.datapointSize).attr("y1",r.attr("cy")).attr("x2",0).attr("y2",r.attr("cy")).classed("hoverline",!0),r.attr("cy")<n.height&&m.append("line").attr("stroke","red").attr("stroke-width",1).attr("x1",r.attr("cx")).attr("y1",+r.attr("cy")+n.datapointSize).attr("x2",r.attr("cx")).attr("y2",n.height).classed("hoverline",!0);var s=this.getBoundingClientRect();t("body").append(a(s.top,s.right,e)),t(g.node()).trigger("mouseover-datapoint.scatterplot",[this,e,i])}),b.on("mouseout",function(){u.select(this).classed("highlight",!1).style("fill","black").style("fill-opacity",.2),m.selectAll(".hoverline").remove(),t(".chart-info-box").remove()})}e.scatterplot=r;var s=n(3),o=(n.n(s),n(6)),a=(n.n(o),n(1)),l=(n.n(a),n(19)),u=(n.n(l),n(20)),h=(n.n(u),n(21)),c=(n.n(h),n(22)),f=(n.n(c),a.View.extend({className:"scatterplot-control-form",initialize:function(t){if(this.model||(this.model=new s.Visualization({type:"scatterplot"})),!t||!t.dataset)throw new Error("ScatterplotConfigEditor requires a dataset");this.dataset=t.dataset,this.display=new d({dataset:t.dataset,model:this.model})},render:function(){this.$el.empty().append(f.templates.mainLayout({})),this.model.id&&(this.$el.find(".copy-btn").show(),this.$el.find(".save-btn").text("Update saved")),this.$el.find("[title]").tooltip(),this._render_dataControl(),this._render_chartControls(),this._render_chartDisplay();var t=this.model.get("config");return this.model.id&&_.isFinite(t.xColumn)&&_.isFinite(t.yColumn)&&this.renderChart(),this},_getColumnIndecesByType:function(){var t={numeric:[],text:[],all:[]};return _.each(this.dataset.metadata_column_types||[],function(e,n){"int"===e||"float"===e?t.numeric.push(n):"str"!==e&&"list"!==e||t.text.push(n),t.all.push(n)}),t.numeric.length<2&&(t.numeric=[]),t},_render_dataControl:function(t){t=t||this.$el;var e=this,n=this.model.get("config"),i=this._getColumnIndecesByType(),r=t.find(".tab-pane#data-control");return r.html(f.templates.dataControl({peek:this.dataset.peek})),r.find(".peek").peekColumnSelector({controls:[{label:"X Column",id:"xColumn",selected:n.xColumn,disabled:i.text},{label:"Y Column",id:"yColumn",selected:n.yColumn,disabled:i.text},{label:"ID Column",id:"idColumn",selected:n.idColumn}]}).on("peek-column-selector.change",function(t,n){e.model.set("config",n)}).on("peek-column-selector.rename",function(t,e){}),r.find("[title]").tooltip(),r},_render_chartControls:function(e){function n(){var e=t(this),n=e.slider("value");i.model.set("config",_.object([[e.parent().data("config-key"),n]])),e.siblings(".slider-output").text(n)}e=e||this.$el;var i=this,r=this.model.get("config"),s=e.find("#chart-control");s.html(f.templates.chartControl(r));var o={datapointSize:{min:2,max:10,step:1},width:{min:200,max:800,step:20},height:{min:200,max:800,step:20}};s.find(".numeric-slider-input").each(function(){var e=t(this),i=e.attr("data-config-key"),s=_.extend(o[i],{value:r[i],change:n,slide:n});e.find(".slider").slider(s),e.children(".slider-output").text(r[i])});var a=this.dataset.metadata_column_names||[],l=r.xLabel||a[r.xColumn]||"X",u=r.yLabel||a[r.yColumn]||"Y";return s.find('input[name="X-axis-label"]').val(l).on("change",function(){i.model.set("config",{xLabel:t(this).val()})}),s.find('input[name="Y-axis-label"]').val(u).on("change",function(){i.model.set("config",{yLabel:t(this).val()})}),s.find("[title]").tooltip(),s},_render_chartDisplay:function(t){t=t||this.$el;var e=t.find(".tab-pane#chart-display");return this.display.setElement(e),this.display.render(),e.find("[title]").tooltip(),e},events:{"change #include-id-checkbox":"toggleThirdColumnSelector","click #data-control .render-button":"renderChart","click #chart-control .render-button":"renderChart","click .save-btn":"saveVisualization"},saveVisualization:function(){var t=this;this.model.save().fail(function(e,n,i){console.error(e,n,i),t.trigger("save:error",view),alert("Error loading data:\n"+e.responseText)}).then(function(){t.display.render()})},toggleThirdColumnSelector:function(){this.$el.find('select[name="idColumn"]').parent().toggle()},renderChart:function(){this.$el.find(".nav li.disabled").removeClass("disabled"),this.$el.find("ul.nav").find('a[href="#chart-display"]').tab("show"),this.display.fetchData()},toString:function(){return"ScatterplotConfigEditor("+(this.dataset?this.dataset.id:"")+")"}}));f.templates={mainLayout:_.template(['<div class="scatterplot-editor tabbable tabs-left">','<ul class="nav nav-tabs">','<li class="active">','<a title="Use this tab to change which data are used"','href="#data-control" data-toggle="tab">Data Controls</a>',"</li>","<li>",'<a title="Use this tab to change how the chart is drawn"','href="#chart-control" data-toggle="tab" >Chart Controls</a>',"</li>",'<li class="disabled">','<a title="This tab will display the chart"','href="#chart-display" data-toggle="tab">Chart</a>',"</li>",'<li class="file-controls">','<button class="save-btn btn btn-default">Save</button>',"</li>","</ul>",'<div class="tab-content">','<div id="data-control" class="scatterplot-config-control tab-pane active"></div>','<div id="chart-control" class="scatterplot-config-control tab-pane"></div>','<div id="chart-display" class="scatterplot-display tab-pane"></div>',"</div>","</div>"].join("")),dataControl:_.template(['<p class="help-text">',"Use the following control to change which columns are used by the chart. Click any cell ","from the last three rows of the table to select the column for the appropriate data. ","Use the 'Draw' button to render (or re-render) the chart with the current settings. ","</p>",'<ul class="help-text" style="margin-left: 8px">',"<li><b>X Column</b>: which column values will be used for the x axis of the chart.</li>","<li><b>Y Column</b>: which column values will be used for the y axis of the chart.</li>","<li><b>ID Column</b>: an additional column value displayed when the user hovers over a data point. ","It may be useful to select unique or categorical identifiers here (such as gene ids).","</li>","</ul>",'<div class="column-selection">','<pre class="peek"><%= peek %></pre>',"</div>",'<p class="help-text help-text-small">',"<b>Note</b>: If it can be determined from the dataset's filetype that a column is not numeric, ","that column choice may be disabled for either the x or y axis.","</p>",'<button class="render-button btn btn-primary active">Draw</button>'].join("")),chartControl:_.template(['<p class="help-text">',"Use the following controls to how the chart is displayed. The slide controls can be moved ","by the mouse or, if the 'handle' is in focus, your keyboard's arrow keys. ","Move the focus between controls by using the tab or shift+tab keys on your keyboard. ","Use the 'Draw' button to render (or re-render) the chart with the current settings. ","</p>",'<div data-config-key="datapointSize" class="form-input numeric-slider-input">','<label for="datapointSize">Size of data point: </label>','<div class="slider-output"><%- datapointSize %></div>','<div class="slider"></div>','<p class="form-help help-text-small">',"Size of the graphic representation of each data point","</p>","</div>",'<div data-config-key="width" class="form-input numeric-slider-input">','<label for="width">Chart width: </label>','<div class="slider-output"><%- width %></div>','<div class="slider"></div>','<p class="form-help help-text-small">',"(not including chart margins and axes)","</p>","</div>",'<div data-config-key="height" class="form-input numeric-slider-input">','<label for="height">Chart height: </label>','<div class="slider-output"><%- height %></div>','<div class="slider"></div>','<p class="form-help help-text-small">',"(not including chart margins and axes)","</p>","</div>",'<div data-config-key="X-axis-label"class="text-input form-input">','<label for="X-axis-label">Re-label the X axis: </label>','<input type="text" name="X-axis-label" id="X-axis-label" value="<%- xLabel %>" />','<p class="form-help help-text-small"></p>',"</div>",'<div data-config-key="Y-axis-label" class="text-input form-input">','<label for="Y-axis-label">Re-label the Y axis: </label>','<input type="text" name="Y-axis-label" id="Y-axis-label" value="<%- yLabel %>" />','<p class="form-help help-text-small"></p>',"</div>",'<button class="render-button btn btn-primary active">Draw</button>'].join(""))};var d=a.View.extend({initialize:function(t){this.data=null,this.dataset=t.dataset,this.lineCount=this.dataset.metadata_data_lines||null},fetchData:function(){this.showLoadingIndicator();var t=this,e=this.model.get("config"),n=window.parent&&parent.galaxy_config?parent.galaxy_config.root:"/",r=i.getJSON(n+"api/datasets/"+this.dataset.id,{data_type:"raw_data",provider:"dataset-column",limit:e.pagination.perPage,offset:e.pagination.currPage*e.pagination.perPage});return r.done(function(e){t.data=e.data,t.trigger("data:fetched",t),t.renderData()}),r.fail(function(e,n,i){console.error(e,n,i),t.trigger("data:error",t),alert("Error loading data:\n"+e.responseText)}),r},showLoadingIndicator:function(){this.$el.find(".scatterplot-data-info").html(['<div class="loading-indicator">','<span class="fa fa-spinner fa-spin"></span>','<span class="loading-indicator-message">loading...</span>',"</div>"].join(""))},template:function(){return['<div class="controls clear">','<div class="right">','<p class="scatterplot-data-info"></p>','<button class="stats-toggle-btn">Stats</button>','<button class="rerender-btn">Redraw</button>',"</div>",'<div class="left">','<div class="page-control"></div>',"</div>","</div>","<svg/>",'<div class="stats-display"></div>'].join("")},render:function(){return this.$el.addClass("scatterplot-display").html(this.template()),this.data&&this.renderData(),this},renderData:function(){this.renderLeftControls(),this.renderRightControls(),this.renderPlot(this.data),this.getStats()},renderLeftControls:function(){var t=this,e=this.model.get("config");return this.$el.find(".controls .left .page-control").pagination({startingPage:e.pagination.currPage,perPage:e.pagination.perPage,totalDataSize:this.lineCount,currDataSize:this.data.length}).off().on("pagination.page-change",function(n,i){e.pagination.currPage=i,t.model.set("config",{pagination:e.pagination}),t.resetZoom(),t.fetchData()}),this},renderRightControls:function(){var t=this;this.setLineInfo(this.data),this.$el.find(".stats-toggle-btn").off().click(function(){t.toggleStats()}),this.$el.find(".rerender-btn").off().click(function(){t.resetZoom(),t.renderPlot(this.data)})},renderPlot:function(){var t=this,e=this.$el.find("svg");this.toggleStats(!1),e.off().empty().show().on("zoom.scatterplot",function(e,n){t.model.set("config",n)}),r(e.get(0),this.model.get("config"),this.data)},setLineInfo:function(t,e){if(t){var n=this.model.get("config"),i=this.lineCount||"an unknown total",r=n.pagination.currPage*n.pagination.perPage,s=r+t.length;this.$el.find(".controls p.scatterplot-data-info").text([r+1,"to",s,"of",i].join(" "))}else this.$el.find(".controls p.scatterplot-data-info").html(e||"");return this},resetZoom:function(t,e){return t=void 0!==t?t:1,e=void 0!==e?e:[0,0],this.model.set("config",{scale:t,translate:e}),this},getStats:function(){if(this.data){var t=this,e=this.model.get("config"),n=new Worker("/plugins/visualizations/scatterplot/static/worker-stats.js");n.postMessage({data:this.data,keys:[e.xColumn,e.yColumn]}),n.onerror=function(t){n.terminate()},n.onmessage=function(e){t.renderStats(e.data)}}},renderStats:function(e,n){var i=this.model.get("config"),r=this.$el.find(".stats-display"),s=i.xLabel,o=i.yLabel,a=t("<table/>").addClass("table").append(["<thead><th></th><th>",s,"</th><th>",o,"</th></thead>"].join("")).append(_.map(e,function(e,n){return t(["<tr><td>",n,"</td><td>",e[0],"</td><td>",e[1],"</td></tr>"].join(""))}));r.empty().append(a)},toggleStats:function(t){var e=this.$el.find(".stats-display");t=void 0===t?e.is(":hidden"):t,t?(this.$el.find("svg").hide(),e.show(),this.$el.find(".controls .stats-toggle-btn").text("Plot")):(e.hide(),this.$el.find("svg").show(),this.$el.find(".controls .stats-toggle-btn").text("Stats"))},toString:function(){return"ScatterplotView()"}}),p=s.Visualization.extend({defaults:{type:"scatterplot",config:{pagination:{currPage:0,perPage:3e3},width:400,height:400,margin:{top:16,right:16,bottom:40,left:54},xTicks:10,xLabel:"X",yTicks:10,yLabel:"Y",datapointSize:4,animDuration:500,scale:1,translate:[0,0]}}});window.ScatterplotModel=p,window.ScatterplotConfigEditor=f}.call(e,n(0),n(0))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VisualizationCollection=e.Visualization=void 0;var i=n(1),r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(i),s=e.Visualization=r.Model.extend({defaults:{config:{}},urlRoot:function(){return Galaxy.root+"api/visualizations"},initialize:function(t){_.isObject(t.config)&&_.isObject(this.defaults.config)&&_.defaults(t.config,this.defaults.config),this._setUpListeners()},_setUpListeners:function(){},set:function(t,e){if("config"===t){var n=this.get("config");_.isObject(n)&&(e=_.extend(_.clone(n),e))}return r.Model.prototype.set.call(this,t,e),this},toString:function(){var t=this.get("id")||"";return this.get("title")&&(t+=":"+this.get("title")),"Visualization("+t+")"}});e.VisualizationCollection=r.Collection.extend({model:s,url:function(){return Galaxy.root+"api/visualizations"},initialize:function(t,e){e=e||{}},set:function(t,e){var n=this;t=_.map(t,function(t){var e=n.get(t.id);if(!e)return t;var i=e.toJSON();return _.extend(i,t),i}),r.Collection.prototype.set.call(this,t,e)},toString:function(){return["VisualizationCollection(",[this.historyId,this.length].join(),")"].join("")}})},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var i,r;(function(){function n(t){function e(e,n,i,r,s,o){for(;s>=0&&s<o;s+=t){var a=r?r[s]:s;i=n(i,e[a],a,e)}return i}return function(n,i,r,s){i=k(i,s,4);var o=!I(n)&&w.keys(n),a=(o||n).length,l=t>0?0:a-1;return arguments.length<3&&(r=n[o?o[l]:l],l+=t),e(n,i,r,o,l,a)}}function s(t){return function(e,n,i){n=C(n,i);for(var r=E(e),s=t>0?0:r-1;s>=0&&s<r;s+=t)if(n(e[s],s,e))return s;return-1}}function o(t,e,n){return function(i,r,s){var o=0,a=E(i);if("number"==typeof s)t>0?o=s>=0?s:Math.max(s+a,o):a=s>=0?Math.min(s+1,a):s+a+1;else if(n&&s&&a)return s=n(i,r),i[s]===r?s:-1;if(r!==r)return s=e(p.call(i,o,a),w.isNaN),s>=0?s+o:-1;for(s=t>0?o:a-1;s>=0&&s<a;s+=t)if(i[s]===r)return s;return-1}}function a(t,e){var n=z.length,i=t.constructor,r=w.isFunction(i)&&i.prototype||c,s="constructor";for(w.has(t,s)&&!w.contains(e,s)&&e.push(s);n--;)(s=z[n])in t&&t[s]!==r[s]&&!w.contains(e,s)&&e.push(s)}var l=this,u=l._,h=Array.prototype,c=Object.prototype,f=Function.prototype,d=h.push,p=h.slice,g=c.toString,m=c.hasOwnProperty,v=Array.isArray,y=Object.keys,b=f.bind,_=Object.create,x=function(){},w=function(t){return t instanceof w?t:this instanceof w?void(this._wrapped=t):new w(t)};void 0!==t&&t.exports&&(e=t.exports=w),e._=w,w.VERSION="1.8.3";var k=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)};case 4:return function(n,i,r,s){return t.call(e,n,i,r,s)}}return function(){return t.apply(e,arguments)}},C=function(t,e,n){return null==t?w.identity:w.isFunction(t)?k(t,e,n):w.isObject(t)?w.matcher(t):w.property(t)};w.iteratee=function(t,e){return C(t,e,1/0)};var M=function(t,e){return function(n){var i=arguments.length;if(i<2||null==n)return n;for(var r=1;r<i;r++)for(var s=arguments[r],o=t(s),a=o.length,l=0;l<a;l++){var u=o[l];e&&void 0!==n[u]||(n[u]=s[u])}return n}},T=function(t){if(!w.isObject(t))return{};if(_)return _(t);x.prototype=t;var e=new x;return x.prototype=null,e},D=function(t){return function(e){return null==e?void 0:e[t]}},S=Math.pow(2,53)-1,E=D("length"),I=function(t){var e=E(t);return"number"==typeof e&&e>=0&&e<=S};w.each=w.forEach=function(t,e,n){e=k(e,n);var i,r;if(I(t))for(i=0,r=t.length;i<r;i++)e(t[i],i,t);else{var s=w.keys(t);for(i=0,r=s.length;i<r;i++)e(t[s[i]],s[i],t)}return t},w.map=w.collect=function(t,e,n){e=C(e,n);for(var i=!I(t)&&w.keys(t),r=(i||t).length,s=Array(r),o=0;o<r;o++){var a=i?i[o]:o;s[o]=e(t[a],a,t)}return s},w.reduce=w.foldl=w.inject=n(1),w.reduceRight=w.foldr=n(-1),w.find=w.detect=function(t,e,n){var i;if(void 0!==(i=I(t)?w.findIndex(t,e,n):w.findKey(t,e,n))&&-1!==i)return t[i]},w.filter=w.select=function(t,e,n){var i=[];return e=C(e,n),w.each(t,function(t,n,r){e(t,n,r)&&i.push(t)}),i},w.reject=function(t,e,n){return w.filter(t,w.negate(C(e)),n)},w.every=w.all=function(t,e,n){e=C(e,n);for(var i=!I(t)&&w.keys(t),r=(i||t).length,s=0;s<r;s++){var o=i?i[s]:s;if(!e(t[o],o,t))return!1}return!0},w.some=w.any=function(t,e,n){e=C(e,n);for(var i=!I(t)&&w.keys(t),r=(i||t).length,s=0;s<r;s++){var o=i?i[s]:s;if(e(t[o],o,t))return!0}return!1},w.contains=w.includes=w.include=function(t,e,n,i){return I(t)||(t=w.values(t)),("number"!=typeof n||i)&&(n=0),w.indexOf(t,e,n)>=0},w.invoke=function(t,e){var n=p.call(arguments,2),i=w.isFunction(e);return w.map(t,function(t){var r=i?e:t[e];return null==r?r:r.apply(t,n)})},w.pluck=function(t,e){return w.map(t,w.property(e))},w.where=function(t,e){return w.filter(t,w.matcher(e))},w.findWhere=function(t,e){return w.find(t,w.matcher(e))},w.max=function(t,e,n){var i,r,s=-1/0,o=-1/0;if(null==e&&null!=t){t=I(t)?t:w.values(t);for(var a=0,l=t.length;a<l;a++)(i=t[a])>s&&(s=i)}else e=C(e,n),w.each(t,function(t,n,i){((r=e(t,n,i))>o||r===-1/0&&s===-1/0)&&(s=t,o=r)});return s},w.min=function(t,e,n){var i,r,s=1/0,o=1/0;if(null==e&&null!=t){t=I(t)?t:w.values(t);for(var a=0,l=t.length;a<l;a++)(i=t[a])<s&&(s=i)}else e=C(e,n),w.each(t,function(t,n,i){((r=e(t,n,i))<o||r===1/0&&s===1/0)&&(s=t,o=r)});return s},w.shuffle=function(t){for(var e,n=I(t)?t:w.values(t),i=n.length,r=Array(i),s=0;s<i;s++)e=w.random(0,s),e!==s&&(r[s]=r[e]),r[e]=n[s];return r},w.sample=function(t,e,n){return null==e||n?(I(t)||(t=w.values(t)),t[w.random(t.length-1)]):w.shuffle(t).slice(0,Math.max(0,e))},w.sortBy=function(t,e,n){return e=C(e,n),w.pluck(w.map(t,function(t,n,i){return{value:t,index:n,criteria:e(t,n,i)}}).sort(function(t,e){var n=t.criteria,i=e.criteria;if(n!==i){if(n>i||void 0===n)return 1;if(n<i||void 0===i)return-1}return t.index-e.index}),"value")};var N=function(t){return function(e,n,i){var r={};return n=C(n,i),w.each(e,function(i,s){var o=n(i,s,e);t(r,i,o)}),r}};w.groupBy=N(function(t,e,n){w.has(t,n)?t[n].push(e):t[n]=[e]}),w.indexBy=N(function(t,e,n){t[n]=e}),w.countBy=N(function(t,e,n){w.has(t,n)?t[n]++:t[n]=1}),w.toArray=function(t){return t?w.isArray(t)?p.call(t):I(t)?w.map(t,w.identity):w.values(t):[]},w.size=function(t){return null==t?0:I(t)?t.length:w.keys(t).length},w.partition=function(t,e,n){e=C(e,n);var i=[],r=[];return w.each(t,function(t,n,s){(e(t,n,s)?i:r).push(t)}),[i,r]},w.first=w.head=w.take=function(t,e,n){if(null!=t)return null==e||n?t[0]:w.initial(t,t.length-e)},w.initial=function(t,e,n){return p.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},w.last=function(t,e,n){if(null!=t)return null==e||n?t[t.length-1]:w.rest(t,Math.max(0,t.length-e))},w.rest=w.tail=w.drop=function(t,e,n){return p.call(t,null==e||n?1:e)},w.compact=function(t){return w.filter(t,w.identity)};var P=function(t,e,n,i){for(var r=[],s=0,o=i||0,a=E(t);o<a;o++){var l=t[o];if(I(l)&&(w.isArray(l)||w.isArguments(l))){e||(l=P(l,e,n));var u=0,h=l.length;for(r.length+=h;u<h;)r[s++]=l[u++]}else n||(r[s++]=l)}return r};w.flatten=function(t,e){return P(t,e,!1)},w.without=function(t){return w.difference(t,p.call(arguments,1))},w.uniq=w.unique=function(t,e,n,i){w.isBoolean(e)||(i=n,n=e,e=!1),null!=n&&(n=C(n,i));for(var r=[],s=[],o=0,a=E(t);o<a;o++){var l=t[o],u=n?n(l,o,t):l;e?(o&&s===u||r.push(l),s=u):n?w.contains(s,u)||(s.push(u),r.push(l)):w.contains(r,l)||r.push(l)}return r},w.union=function(){return w.uniq(P(arguments,!0,!0))},w.intersection=function(t){for(var e=[],n=arguments.length,i=0,r=E(t);i<r;i++){var s=t[i];if(!w.contains(e,s)){for(var o=1;o<n&&w.contains(arguments[o],s);o++);o===n&&e.push(s)}}return e},w.difference=function(t){var e=P(arguments,!0,!0,1);return w.filter(t,function(t){return!w.contains(e,t)})},w.zip=function(){return w.unzip(arguments)},w.unzip=function(t){for(var e=t&&w.max(t,E).length||0,n=Array(e),i=0;i<e;i++)n[i]=w.pluck(t,i);return n},w.object=function(t,e){for(var n={},i=0,r=E(t);i<r;i++)e?n[t[i]]=e[i]:n[t[i][0]]=t[i][1];return n},w.findIndex=s(1),w.findLastIndex=s(-1),w.sortedIndex=function(t,e,n,i){n=C(n,i,1);for(var r=n(e),s=0,o=E(t);s<o;){var a=Math.floor((s+o)/2);n(t[a])<r?s=a+1:o=a}return s},w.indexOf=o(1,w.findIndex,w.sortedIndex),w.lastIndexOf=o(-1,w.findLastIndex),w.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var i=Math.max(Math.ceil((e-t)/n),0),r=Array(i),s=0;s<i;s++,t+=n)r[s]=t;return r};var A=function(t,e,n,i,r){if(!(i instanceof e))return t.apply(n,r);var s=T(t.prototype),o=t.apply(s,r);return w.isObject(o)?o:s};w.bind=function(t,e){if(b&&t.bind===b)return b.apply(t,p.call(arguments,1));if(!w.isFunction(t))throw new TypeError("Bind must be called on a function");var n=p.call(arguments,2),i=function(){return A(t,i,e,this,n.concat(p.call(arguments)))};return i},w.partial=function(t){var e=p.call(arguments,1),n=function(){for(var i=0,r=e.length,s=Array(r),o=0;o<r;o++)s[o]=e[o]===w?arguments[i++]:e[o];for(;i<arguments.length;)s.push(arguments[i++]);return A(t,n,this,this,s)};return n},w.bindAll=function(t){var e,n,i=arguments.length;if(i<=1)throw new Error("bindAll must be passed function names");for(e=1;e<i;e++)n=arguments[e],t[n]=w.bind(t[n],t);return t},w.memoize=function(t,e){var n=function(i){var r=n.cache,s=""+(e?e.apply(this,arguments):i);return w.has(r,s)||(r[s]=t.apply(this,arguments)),r[s]};return n.cache={},n},w.delay=function(t,e){var n=p.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},w.defer=w.partial(w.delay,w,1),w.throttle=function(t,e,n){var i,r,s,o=null,a=0;n||(n={});var l=function(){a=!1===n.leading?0:w.now(),o=null,s=t.apply(i,r),o||(i=r=null)};return function(){var u=w.now();a||!1!==n.leading||(a=u);var h=e-(u-a);return i=this,r=arguments,h<=0||h>e?(o&&(clearTimeout(o),o=null),a=u,s=t.apply(i,r),o||(i=r=null)):o||!1===n.trailing||(o=setTimeout(l,h)),s}},w.debounce=function(t,e,n){var i,r,s,o,a,l=function(){var u=w.now()-o;u<e&&u>=0?i=setTimeout(l,e-u):(i=null,n||(a=t.apply(s,r),i||(s=r=null)))};return function(){s=this,r=arguments,o=w.now();var u=n&&!i;return i||(i=setTimeout(l,e)),u&&(a=t.apply(s,r),s=r=null),a}},w.wrap=function(t,e){return w.partial(e,t)},w.negate=function(t){return function(){return!t.apply(this,arguments)}},w.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,i=t[e].apply(this,arguments);n--;)i=t[n].call(this,i);return i}},w.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},w.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},w.once=w.partial(w.before,2);var O=!{toString:null}.propertyIsEnumerable("toString"),z=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];w.keys=function(t){if(!w.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)w.has(t,n)&&e.push(n);return O&&a(t,e),e},w.allKeys=function(t){if(!w.isObject(t))return[];var e=[];for(var n in t)e.push(n);return O&&a(t,e),e},w.values=function(t){for(var e=w.keys(t),n=e.length,i=Array(n),r=0;r<n;r++)i[r]=t[e[r]];return i},w.mapObject=function(t,e,n){e=C(e,n);for(var i,r=w.keys(t),s=r.length,o={},a=0;a<s;a++)i=r[a],o[i]=e(t[i],i,t);return o},w.pairs=function(t){for(var e=w.keys(t),n=e.length,i=Array(n),r=0;r<n;r++)i[r]=[e[r],t[e[r]]];return i},w.invert=function(t){for(var e={},n=w.keys(t),i=0,r=n.length;i<r;i++)e[t[n[i]]]=n[i];return e},w.functions=w.methods=function(t){var e=[];for(var n in t)w.isFunction(t[n])&&e.push(n);return e.sort()},w.extend=M(w.allKeys),w.extendOwn=w.assign=M(w.keys),w.findKey=function(t,e,n){e=C(e,n);for(var i,r=w.keys(t),s=0,o=r.length;s<o;s++)if(i=r[s],e(t[i],i,t))return i},w.pick=function(t,e,n){var i,r,s={},o=t;if(null==o)return s;w.isFunction(e)?(r=w.allKeys(o),i=k(e,n)):(r=P(arguments,!1,!1,1),i=function(t,e,n){return e in n},o=Object(o));for(var a=0,l=r.length;a<l;a++){var u=r[a],h=o[u];i(h,u,o)&&(s[u]=h)}return s},w.omit=function(t,e,n){if(w.isFunction(e))e=w.negate(e);else{var i=w.map(P(arguments,!1,!1,1),String);e=function(t,e){return!w.contains(i,e)}}return w.pick(t,e,n)},w.defaults=M(w.allKeys,!0),w.create=function(t,e){var n=T(t);return e&&w.extendOwn(n,e),n},w.clone=function(t){return w.isObject(t)?w.isArray(t)?t.slice():w.extend({},t):t},w.tap=function(t,e){return e(t),t},w.isMatch=function(t,e){var n=w.keys(e),i=n.length;if(null==t)return!i;for(var r=Object(t),s=0;s<i;s++){var o=n[s];if(e[o]!==r[o]||!(o in r))return!1}return!0};var H=function(t,e,n,i){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return t===e;t instanceof w&&(t=t._wrapped),e instanceof w&&(e=e._wrapped);var r=g.call(t);if(r!==g.call(e))return!1;switch(r){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e}var s="[object Array]"===r;if(!s){if("object"!=typeof t||"object"!=typeof e)return!1;var o=t.constructor,a=e.constructor;if(o!==a&&!(w.isFunction(o)&&o instanceof o&&w.isFunction(a)&&a instanceof a)&&"constructor"in t&&"constructor"in e)return!1}n=n||[],i=i||[];for(var l=n.length;l--;)if(n[l]===t)return i[l]===e;if(n.push(t),i.push(e),s){if((l=t.length)!==e.length)return!1;for(;l--;)if(!H(t[l],e[l],n,i))return!1}else{var u,h=w.keys(t);if(l=h.length,w.keys(e).length!==l)return!1;for(;l--;)if(u=h[l],!w.has(e,u)||!H(t[u],e[u],n,i))return!1}return n.pop(),i.pop(),!0};w.isEqual=function(t,e){return H(t,e)},w.isEmpty=function(t){return null==t||(I(t)&&(w.isArray(t)||w.isString(t)||w.isArguments(t))?0===t.length:0===w.keys(t).length)},w.isElement=function(t){return!(!t||1!==t.nodeType)},w.isArray=v||function(t){return"[object Array]"===g.call(t)},w.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},w.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){w["is"+t]=function(e){return g.call(e)==="[object "+t+"]"}}),w.isArguments(arguments)||(w.isArguments=function(t){return w.has(t,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(w.isFunction=function(t){return"function"==typeof t||!1}),w.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},w.isNaN=function(t){return w.isNumber(t)&&t!==+t},w.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===g.call(t)},w.isNull=function(t){return null===t},w.isUndefined=function(t){return void 0===t},w.has=function(t,e){return null!=t&&m.call(t,e)},w.noConflict=function(){return l._=u,this},w.identity=function(t){return t},w.constant=function(t){return function(){return t}},w.noop=function(){},w.property=D,w.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},w.matcher=w.matches=function(t){return t=w.extendOwn({},t),function(e){return w.isMatch(e,t)}},w.times=function(t,e,n){var i=Array(Math.max(0,t));e=k(e,n,1);for(var r=0;r<t;r++)i[r]=e(r);return i},w.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},w.now=Date.now||function(){return(new Date).getTime()};var L={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},R=w.invert(L),F=function(t){var e=function(e){return t[e]},n="(?:"+w.keys(t).join("|")+")",i=RegExp(n),r=RegExp(n,"g");return function(t){return t=null==t?"":""+t,i.test(t)?t.replace(r,e):t}};w.escape=F(L),w.unescape=F(R),w.result=function(t,e,n){var i=null==t?void 0:t[e];return void 0===i&&(i=n),w.isFunction(i)?i.call(t):i};var j=0;w.uniqueId=function(t){var e=++j+"";return t?t+e:e},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var $=/(.)^/,W={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},q=/\\|'|\r|\n|\u2028|\u2029/g,B=function(t){return"\\"+W[t]};w.template=function(t,e,n){!e&&n&&(e=n),e=w.defaults({},e,w.templateSettings);var i=RegExp([(e.escape||$).source,(e.interpolate||$).source,(e.evaluate||$).source].join("|")+"|$","g"),r=0,s="__p+='";t.replace(i,function(e,n,i,o,a){return s+=t.slice(r,a).replace(q,B),r=a+e.length,n?s+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?s+="'+\n((__t=("+i+"))==null?'':__t)+\n'":o&&(s+="';\n"+o+"\n__p+='"),e}),s+="';\n",e.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{var o=new Function(e.variable||"obj","_",s)}catch(t){throw t.source=s,t}var a=function(t){return o.call(this,t,w)};return a.source="function("+(e.variable||"obj")+"){\n"+s+"}",a},w.chain=function(t){var e=w(t);return e._chain=!0,e};var U=function(t,e){return t._chain?w(e).chain():e};w.mixin=function(t){w.each(w.functions(t),function(e){var n=w[e]=t[e];w.prototype[e]=function(){var t=[this._wrapped];return d.apply(t,arguments),U(this,n.apply(w,t))}})},w.mixin(w),w.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=h[t];w.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),w.each(["concat","join","slice"],function(t){var e=h[t];w.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),w.prototype.value=function(){return this._wrapped},w.prototype.valueOf=w.prototype.toJSON=w.prototype.value,w.prototype.toString=function(){return""+this._wrapped},i=[],void 0!==(r=function(){return w}.apply(e,i))&&(t.exports=r)}).call(this)},function(t,e,n){n(7),n(8),n(9),n(10),n(11),n(12),n(13),n(14),n(15),n(16),n(17),n(18)},function(t,e,n){(function(t){+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",function(){n=!0});var r=function(){n||t(i).trigger(t.support.transition.end)};return setTimeout(r,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(t)}).call(e,n(0))},function(t,e,n){(function(t){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),r=n.data("bs.alert");r||n.data("bs.alert",r=new i(this)),"string"==typeof e&&r[e].call(n)})}var n='[data-dismiss="alert"]',i=function(e){t(e).on("click",n,this.close)};i.VERSION="3.3.7",i.TRANSITION_DURATION=150,i.prototype.close=function(e){function n(){o.detach().trigger("closed.bs.alert").remove()}var r=t(this),s=r.attr("data-target");s||(s=r.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,""));var o=t("#"===s?[]:s);e&&e.preventDefault(),o.length||(o=r.closest(".alert")),o.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(o.removeClass("in"),t.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var r=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=r,this},t(document).on("click.bs.alert.data-api",n,i.prototype.close)}(t)}).call(e,n(0))},function(t,e,n){(function(t){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.button"),s="object"==typeof e&&e;r||i.data("bs.button",r=new n(this,s)),"toggle"==e?r.toggle():e&&r.setState(e)})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.7",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",i=this.$element,r=i.is("input")?"val":"html",s=i.data();e+="Text",null==s.resetText&&i.data("resetText",i[r]()),setTimeout(t.proxy(function(){i[r](null==s[e]?this.options[e]:s[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=t(n.target).closest(".btn");e.call(i,"toggle"),t(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),i.is("input,button")?i.trigger("focus"):i.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(t)}).call(e,n(0))},function(t,e,n){(function(t){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.carousel"),s=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e),o="string"==typeof e?e:s.slide;r||i.data("bs.carousel",r=new n(this,s)),"number"==typeof e?r.to(e):o?r[o]():s.interval&&r.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.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},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e);if(("prev"==t&&0===n||"next"==t&&n==this.$items.length-1)&&!this.options.wrap)return e;var i="prev"==t?-1:1,r=(n+i)%this.$items.length;return this.$items.eq(r)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(e,i){var r=this.$element.find(".item.active"),s=i||this.getItemForDirection(e,r),o=this.interval,a="next"==e?"left":"right",l=this;if(s.hasClass("active"))return this.sliding=!1;var u=s[0],h=t.Event("slide.bs.carousel",{relatedTarget:u,direction:a});if(this.$element.trigger(h),!h.isDefaultPrevented()){if(this.sliding=!0,o&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var c=t(this.$indicators.children()[this.getItemIndex(s)]);c&&c.addClass("active")}var f=t.Event("slid.bs.carousel",{relatedTarget:u,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(s.addClass(e),s[0].offsetWidth,r.addClass(a),s.addClass(a),r.one("bsTransitionEnd",function(){s.removeClass([e,a].join(" ")).addClass("active"),r.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(f)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(r.removeClass("active"),s.addClass("active"),this.sliding=!1,this.$element.trigger(f)),o&&this.cycle(),this}};var i=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this};var r=function(n){var i,r=t(this),s=t(r.attr("data-target")||(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(s.hasClass("carousel")){var o=t.extend({},s.data(),r.data()),a=r.attr("data-slide-to");a&&(o.interval=!1),e.call(s,o),a&&s.data("bs.carousel").to(a),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(t)}).call(e,n(0))},function(t,e,n){(function(t){+function(t){"use strict";function e(e){var n,i=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(i)}function n(e){return this.each(function(){var n=t(this),r=n.data("bs.collapse"),s=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);!r&&s.toggle&&/show|hide/.test(e)&&(s.toggle=!1),r||n.data("bs.collapse",r=new i(this,s)),"string"==typeof e&&r[e]()})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.3.7",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(r&&r.length&&(e=r.data("bs.collapse"))&&e.transitioning)){var s=t.Event("show.bs.collapse");if(this.$element.trigger(s),!s.isDefaultPrevented()){r&&r.length&&(n.call(r,"hide"),e||r.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[o](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!t.support.transition)return r.call(this);this.$element[n](0).one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(i.TRANSITION_DURATION)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,i){var r=t(i);this.addAriaAndCollapsedClass(e(r),r)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var r=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=r,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var r=t(this);r.attr("data-target")||i.preventDefault();var s=e(r),o=s.data("bs.collapse"),a=o?"toggle":r.data();n.call(s,a)})}(t)}).call(e,n(0))},function(t,e,n){(function(t){+function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=e.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&t(n);return i&&i.length?i:e.parent()}function n(n){n&&3===n.which||(t(r).remove(),t(s).each(function(){var i=t(this),r=e(i),s={relatedTarget:this};r.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(r[0],n.target)||(r.trigger(n=t.Event("hide.bs.dropdown",s)),n.isDefaultPrevented()||(i.attr("aria-expanded","false"),r.removeClass("open").trigger(t.Event("hidden.bs.dropdown",s)))))}))}function i(e){return this.each(function(){var n=t(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new o(this)),"string"==typeof e&&i[e].call(n)})}var r=".dropdown-backdrop",s='[data-toggle="dropdown"]',o=function(e){t(e).on("click.bs.dropdown",this.toggle)};o.VERSION="3.3.7",o.prototype.toggle=function(i){var r=t(this);if(!r.is(".disabled, :disabled")){var s=e(r),o=s.hasClass("open");if(n(),!o){"ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var a={relatedTarget:this};if(s.trigger(i=t.Event("show.bs.dropdown",a)),i.isDefaultPrevented())return;r.trigger("focus").attr("aria-expanded","true"),s.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},o.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=t(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var r=e(i),o=r.hasClass("open");if(!o&&27!=n.which||o&&27==n.which)return 27==n.which&&r.find(s).trigger("focus"),i.trigger("click");var a=r.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var l=a.index(n.target);38==n.which&&l>0&&l--,40==n.which&&l<a.length-1&&l++,~l||(l=0),a.eq(l).trigger("focus")}}}};var a=t.fn.dropdown;t.fn.dropdown=i,t.fn.dropdown.Constructor=o,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=a,this},t(document).on("click.bs.dropdown.data-api",n).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",s,o.prototype.toggle).on("keydown.bs.dropdown.data-api",s,o.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",o.prototype.keydown)}(t)}).call(e,n(0))},function(t,e,n){(function(t){+function(t){"use strict";function e(e,i){return this.each(function(){var r=t(this),s=r.data("bs.modal"),o=t.extend({},n.DEFAULTS,r.data(),"object"==typeof e&&e);s||r.data("bs.modal",s=new n(this,o)),"string"==typeof e?s[e](i):o.show&&s.show(i)})}var n=function(e,n){this.options=n,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},n.prototype.show=function(e){var i=this,r=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){i.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(i.$element)&&(i.ignoreBackdropClick=!0)})}),this.backdrop(function(){var r=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),r&&i.$element[0].offsetWidth,i.$element.addClass("in"),i.enforceFocus();var s=t.Event("shown.bs.modal",{relatedTarget:e});r?i.$dialog.one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(s)}).emulateTransitionEnd(n.TRANSITION_DURATION):i.$element.trigger("focus").trigger(s)}))},n.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(n.TRANSITION_DURATION):this.hideModal())},n.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},n.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},n.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(e){var i=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var s=t.support.transition&&r;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+r).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){if(this.ignoreBackdropClick)return void(this.ignoreBackdropClick=!1);t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),s&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;s?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var o=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",o).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):o()}else e&&e()},n.prototype.handleUpdate=function(){this.adjustDialog()},n.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},n.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},n.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var i=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=n,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var i=t(this),r=i.attr("href"),s=t(i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),o=s.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(r)&&r},s.data(),i.data());i.is("a")&&n.preventDefault(),s.one("show.bs.modal",function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",function(){i.is(":visible")&&i.trigger("focus")})}),e.call(s,o,this)})}(t)}).call(e,n(0))},function(t,e,n){(function(t){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.tooltip"),s="object"==typeof e&&e;!r&&/destroy|hide/.test(e)||(r||i.data("bs.tooltip",r=new n(this,s)),"string"==typeof e&&r[e]())})}var n=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(e,n,i){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),s=r.length;s--;){var o=r[s];if("click"==o)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=o){var a="hover"==o?"mouseenter":"focusin",l="hover"==o?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},n.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,i){n[t]!=i&&(e[t]=i)}),e},n.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},n.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)}},n.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var r=this,s=this.tip(),o=this.getUID(this.type);this.setContent(),s.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&s.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,u=l.test(a);u&&(a=a.replace(l,"")||"top"),s.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?s.appendTo(this.options.container):s.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var h=this.getPosition(),c=s[0].offsetWidth,f=s[0].offsetHeight;if(u){var d=a,p=this.getPosition(this.$viewport);a="bottom"==a&&h.bottom+f>p.bottom?"top":"top"==a&&h.top-f<p.top?"bottom":"right"==a&&h.right+c>p.width?"left":"left"==a&&h.left-c<p.left?"right":a,s.removeClass(d).addClass(a)}var g=this.getCalculatedOffset(a,h,c,f);this.applyPlacement(g,a);var m=function(){var t=r.hoverState;r.$element.trigger("shown.bs."+r.type),r.hoverState=null,"out"==t&&r.leave(r)};t.support.transition&&this.$tip.hasClass("fade")?s.one("bsTransitionEnd",m).emulateTransitionEnd(n.TRANSITION_DURATION):m()}},n.prototype.applyPlacement=function(e,n){var i=this.tip(),r=i[0].offsetWidth,s=i[0].offsetHeight,o=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(o)&&(o=0),isNaN(a)&&(a=0),e.top+=o,e.left+=a,t.offset.setOffset(i[0],t.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),i.addClass("in");var l=i[0].offsetWidth,u=i[0].offsetHeight;"top"==n&&u!=s&&(e.top=e.top+s-u);var h=this.getViewportAdjustedDelta(n,e,l,u);h.left?e.left+=h.left:e.top+=h.top;var c=/top|bottom/.test(n),f=c?2*h.left-r+l:2*h.top-s+u,d=c?"offsetWidth":"offsetHeight";i.offset(e),this.replaceArrow(f,i[0][d],c)},n.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},n.prototype.hide=function(e){function i(){"in"!=r.hoverState&&s.detach(),r.$element&&r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type),e&&e()}var r=this,s=t(this.$tip),o=t.Event("hide.bs."+this.type);if(this.$element.trigger(o),!o.isDefaultPrevented())return s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i(),this.hoverState=null,this},n.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},n.prototype.hasContent=function(){return this.getTitle()},n.prototype.getPosition=function(e){e=e||this.$element;var n=e[0],i="BODY"==n.tagName,r=n.getBoundingClientRect();null==r.width&&(r=t.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var s=window.SVGElement&&n instanceof window.SVGElement,o=i?{top:0,left:0}:s?null:e.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},l=i?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},r,a,l,o)},n.prototype.getCalculatedOffset=function(t,e,n,i){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-i,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-i/2,left:e.left-n}:{top:e.top+e.height/2-i/2,left:e.left+e.width}},n.prototype.getViewportAdjustedDelta=function(t,e,n,i){var r={top:0,left:0};if(!this.$viewport)return r;var s=this.options.viewport&&this.options.viewport.padding||0,o=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-s-o.scroll,l=e.top+s-o.scroll+i;a<o.top?r.top=o.top-a:l>o.top+o.height&&(r.top=o.top+o.height-l)}else{var u=e.left-s,h=e.left+s+n;u<o.left?r.left=o.left-u:h>o.right&&(r.left=o.left+o.width-h)}return r},n.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},n.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},n.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(e){var n=this;e&&((n=t(e.currentTarget).data("bs."+this.type))||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var i=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=n,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(t)}).call(e,n(0))},function(t,e,n){(function(t){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.popover"),s="object"==typeof e&&e;!r&&/destroy|hide/.test(e)||(r||i.data("bs.popover",r=new n(this,s)),"string"==typeof e&&r[e]())})}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.7",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(t)}).call(e,n(0))},function(t,e,n){(function(t){+function(t){"use strict";function e(n,i){this.$body=t(document.body),this.$scrollElement=t(t(n).is(document.body)?window:n),this.options=t.extend({},e.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var i=t(this),r=i.data("bs.scrollspy"),s="object"==typeof n&&n;r||i.data("bs.scrollspy",r=new e(this,s)),"string"==typeof n&&r[n]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),r=e.data("target")||e.attr("href"),s=/^#./.test(r)&&t(r);return s&&s.length&&s.is(":visible")&&[[s[n]().top+i,r]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),r=this.offsets,s=this.targets,o=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=i)return o!=(t=s[s.length-1])&&this.activate(t);if(o&&e<r[0])return this.activeTarget=null,this.clear();for(t=r.length;t--;)o!=s[t]&&e>=r[t]&&(void 0===r[t+1]||e<r[t+1])&&this.activate(s[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var n=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',i=t(n).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var i=t.fn.scrollspy;t.fn.scrollspy=n,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=i,this},t(window).on("load.bs.scrollspy.data-api",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);n.call(e,e.data())})})}(t)}).call(e,n(0))},function(t,e,n){(function(t){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.tab");r||i.data("bs.tab",r=new n(this)),"string"==typeof e&&r[e]()})}var n=function(e){this.element=t(e)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.prototype.show=function(){var e=this.element,n=e.closest("ul:not(.dropdown-menu)"),i=e.data("target");if(i||(i=e.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var r=n.find(".active:last a"),s=t.Event("hide.bs.tab",{relatedTarget:e[0]}),o=t.Event("show.bs.tab",{relatedTarget:r[0]});if(r.trigger(s),e.trigger(o),!o.isDefaultPrevented()&&!s.isDefaultPrevented()){var a=t(i);this.activate(e.closest("li"),n),this.activate(a,a.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:r[0]})})}}},n.prototype.activate=function(e,i,r){function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),r&&r()}var o=i.find("> .active"),a=r&&t.support.transition&&(o.length&&o.hasClass("fade")||!!i.find("> .fade").length);o.length&&a?o.one("bsTransitionEnd",s).emulateTransitionEnd(n.TRANSITION_DURATION):s(),o.removeClass("in")};var i=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,this};var r=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(t)}).call(e,n(0))},function(t,e,n){(function(t){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.affix"),s="object"==typeof e&&e;r||i.data("bs.affix",r=new n(this,s)),"string"==typeof e&&r[e]()})}var n=function(e,i){this.options=t.extend({},n.DEFAULTS,i),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.7",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,i){var r=this.$target.scrollTop(),s=this.$element.offset(),o=this.$target.height();if(null!=n&&"top"==this.affixed)return r<n&&"top";if("bottom"==this.affixed)return null!=n?!(r+this.unpin<=s.top)&&"bottom":!(r+o<=t-i)&&"bottom";var a=null==this.affixed,l=a?r:s.top,u=a?o:e;return null!=n&&r<=n?"top":null!=i&&l+u>=t-i&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),i=this.options.offset,r=i.top,s=i.bottom,o=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(s=r=i),"function"==typeof r&&(r=i.top(this.$element)),"function"==typeof s&&(s=i.bottom(this.$element));var a=this.getState(o,e,r,s);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),u=t.Event(l+".bs.affix");if(this.$element.trigger(u),u.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:o-e-s})}};var i=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),e.call(n,i)})})}(t)}).call(e,n(0))},function(t,e,n){var i,r,s;/*! jQuery UI - v1.12.1 - 2017-03-19
|
|
* http://jqueryui.com
|
|
* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/draggable.js, widgets/droppable.js, widgets/resizable.js, widgets/selectable.js, widgets/sortable.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/selectmenu.js, widgets/slider.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js
|
|
* Copyright jQuery Foundation and other contributors; Licensed MIT */
|
|
!function(o){r=[n(0)],i=o,void 0!==(s="function"==typeof i?i.apply(e,r):i)&&(t.exports=s)}(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function n(t){for(var e,n;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(n=parseInt(t.css("zIndex"),10),!isNaN(n)&&0!==n))return n;t=t.parent()}return 0}function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=r(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function r(e){var n="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",n,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")}).on("mouseover",n,s)}function s(){t.datepicker._isDisabledDatepicker(d.inline?d.dpDiv.parent()[0]:d.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}/*!
|
|
* jQuery UI Spinner 1.12.1
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*/
|
|
function a(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{};var l=(t.ui.version="1.12.1",0),u=Array.prototype.slice;t.cleanData=function(e){return function(n){var i,r,s;for(s=0;null!=(r=n[s]);s++)try{i=t._data(r,"events"),i&&i.remove&&t(r).triggerHandler("remove")}catch(t){}e(n)}}(t.cleanData),t.widget=function(e,n,i){var r,s,o,a={},l=e.split(".")[0];e=e.split(".")[1];var u=l+"-"+e;return i||(i=n,n=t.Widget),t.isArray(i)&&(i=t.extend.apply(null,[{}].concat(i))),t.expr[":"][u.toLowerCase()]=function(e){return!!t.data(e,u)},t[l]=t[l]||{},r=t[l][e],s=t[l][e]=function(t,e){if(!this._createWidget)return new s(t,e);arguments.length&&this._createWidget(t,e)},t.extend(s,r,{version:i.version,_proto:t.extend({},i),_childConstructors:[]}),o=new n,o.options=t.widget.extend({},o.options),t.each(i,function(e,i){if(!t.isFunction(i))return void(a[e]=i);a[e]=function(){function t(){return n.prototype[e].apply(this,arguments)}function r(t){return n.prototype[e].apply(this,t)}return function(){var e,n=this._super,s=this._superApply;return this._super=t,this._superApply=r,e=i.apply(this,arguments),this._super=n,this._superApply=s,e}}()}),s.prototype=t.widget.extend(o,{widgetEventPrefix:r?o.widgetEventPrefix||e:e},a,{constructor:s,namespace:l,widgetName:e,widgetFullName:u}),r?(t.each(r._childConstructors,function(e,n){var i=n.prototype;t.widget(i.namespace+"."+i.widgetName,s,n._proto)}),delete r._childConstructors):n._childConstructors.push(s),t.widget.bridge(e,s),s},t.widget.extend=function(e){for(var n,i,r=u.call(arguments,1),s=0,o=r.length;s<o;s++)for(n in r[s])i=r[s][n],r[s].hasOwnProperty(n)&&void 0!==i&&(t.isPlainObject(i)?e[n]=t.isPlainObject(e[n])?t.widget.extend({},e[n],i):t.widget.extend({},i):e[n]=i);return e},t.widget.bridge=function(e,n){var i=n.prototype.widgetFullName||e;t.fn[e]=function(r){var s="string"==typeof r,o=u.call(arguments,1),a=this;return s?this.length||"instance"!==r?this.each(function(){var n,s=t.data(this,i);return"instance"===r?(a=s,!1):s?t.isFunction(s[r])&&"_"!==r.charAt(0)?(n=s[r].apply(s,o),n!==s&&void 0!==n?(a=n&&n.jquery?a.pushStack(n.get()):n,!1):void 0):t.error("no such method '"+r+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+r+"'")}):a=void 0:(o.length&&(r=t.widget.extend.apply(null,[r].concat(o))),this.each(function(){var e=t.data(this,i);e?(e.option(r||{}),e._init&&e._init()):t.data(this,i,new n(r,this))})),a}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,n){n=t(n||this.defaultElement||this)[0],this.element=t(n),this.uuid=l++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},n!==this&&(t.data(n,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===n&&this.destroy()}}),this.document=t(n.style?n.ownerDocument:n.document||n),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,n){e._removeClass(n,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,n){var i,r,s,o=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(o={},i=e.split("."),e=i.shift(),i.length){for(r=o[e]=t.widget.extend({},this.options[e]),s=0;s<i.length-1;s++)r[i[s]]=r[i[s]]||{},r=r[i[s]];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];o[e]=n}return this._setOptions(o),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var n,i,r;for(n in e)r=this.classesElementLookup[n],e[n]!==this.options.classes[n]&&r&&r.length&&(i=t(r.get()),this._removeClass(r,n),i.addClass(this._classes({element:i,keys:n,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function n(n,s){var o,a;for(a=0;a<n.length;a++)o=r.classesElementLookup[n[a]]||t(),o=t(e.add?t.unique(o.get().concat(e.element.get())):o.not(e.element).get()),r.classesElementLookup[n[a]]=o,i.push(n[a]),s&&e.classes[n[a]]&&i.push(e.classes[n[a]])}var i=[],r=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&n(e.keys.match(/\S+/g)||[],!0),e.extra&&n(e.extra.match(/\S+/g)||[]),i.join(" ")},_untrackClassesElement:function(e){var n=this;t.each(n.classesElementLookup,function(i,r){-1!==t.inArray(e.target,r)&&(n.classesElementLookup[i]=t(r.not(e.target).get()))})},_removeClass:function(t,e,n){return this._toggleClass(t,e,n,!1)},_addClass:function(t,e,n){return this._toggleClass(t,e,n,!0)},_toggleClass:function(t,e,n,i){i="boolean"==typeof i?i:n;var r="string"==typeof t||null===t,s={extra:r?e:n,keys:r?t:e,element:r?this.element:t,add:i};return s.element.toggleClass(this._classes(s),i),this},_on:function(e,n,i){var r,s=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,o){function a(){if(e||!0!==s.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof o?s[o]:o).apply(s,arguments)}"string"!=typeof o&&(a.guid=o.guid=o.guid||a.guid||t.guid++);var l=i.match(/^([\w:-]*)\s*(.*)$/),u=l[1]+s.eventNamespace,h=l[2];h?r.on(u,h,a):n.on(u,a)})},_off:function(e,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(n).off(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){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,n,i){var r,s,o=this.options[e];if(i=i||{},n=t.Event(n),n.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),n.target=this.element[0],s=n.originalEvent)for(r in s)r in n||(n[r]=s[r]);return this.element.trigger(n,i),!(t.isFunction(o)&&!1===o.apply(this.element[0],[n].concat(i))||n.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,n){t.Widget.prototype["_"+e]=function(i,r,s){"string"==typeof r&&(r={effect:r});var o,a=r?!0===r||"number"==typeof r?n:r.effect||n:e;r=r||{},"number"==typeof r&&(r={duration:r}),o=!t.isEmptyObject(r),r.complete=s,r.delay&&i.delay(r.delay),o&&t.effects&&t.effects.effect[a]?i[e](r):a!==e&&i[a]?i[a](r.duration,r.easing,s):i.queue(function(n){t(this)[e](),s&&s.call(i[0]),n()})}});t.widget;/*!
|
|
* jQuery UI Position 1.12.1
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*
|
|
* http://api.jqueryui.com/position/
|
|
*/
|
|
!function(){function e(t,e,n){return[parseFloat(t[0])*(c.test(t[0])?e/100:1),parseFloat(t[1])*(c.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()}}var r,s=Math.max,o=Math.abs,a=/left|center|right/,l=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,h=/^\w+/,c=/%$/,f=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>"),s=i.children()[0];return t("body").append(i),e=s.offsetWidth,i.css("overflow","scroll"),n=s.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;return{width:"scroll"===i||"auto"===i&&e.height<e.element[0].scrollHeight?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:i||r?{left:0,top:0}:t(e).offset(),scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:n.outerWidth(),height:n.outerHeight()}}},t.fn.position=function(r){if(!r||!r.of)return f.apply(this,arguments);r=t.extend({},r);var c,d,p,g,m,v,y=t(r.of),b=t.position.getWithinInfo(r.within),_=t.position.getScrollInfo(b),x=(r.collision||"flip").split(" "),w={};return v=i(y),y[0].preventDefault&&(r.at="left top"),d=v.width,p=v.height,g=v.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,n=(r[this]||"").split(" ");1===n.length&&(n=a.test(n[0])?n.concat(["center"]):l.test(n[0])?["center"].concat(n):["center","center"]),n[0]=a.test(n[0])?n[0]:"center",n[1]=l.test(n[1])?n[1]:"center",t=u.exec(n[0]),e=u.exec(n[1]),w[this]=[t?t[0]:0,e?e[0]:0],r[this]=[h.exec(n[0])[0],h.exec(n[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===r.at[0]?m.left+=d:"center"===r.at[0]&&(m.left+=d/2),"bottom"===r.at[1]?m.top+=p:"center"===r.at[1]&&(m.top+=p/2),c=e(w.at,d,p),m.left+=c[0],m.top+=c[1],this.each(function(){var i,a,l=t(this),u=l.outerWidth(),h=l.outerHeight(),f=n(this,"marginLeft"),v=n(this,"marginTop"),k=u+f+n(this,"marginRight")+_.width,C=h+v+n(this,"marginBottom")+_.height,M=t.extend({},m),T=e(w.my,l.outerWidth(),l.outerHeight());"right"===r.my[0]?M.left-=u:"center"===r.my[0]&&(M.left-=u/2),"bottom"===r.my[1]?M.top-=h:"center"===r.my[1]&&(M.top-=h/2),M.left+=T[0],M.top+=T[1],i={marginLeft:f,marginTop:v},t.each(["left","top"],function(e,n){t.ui.position[x[e]]&&t.ui.position[x[e]][n](M,{targetWidth:d,targetHeight:p,elemWidth:u,elemHeight:h,collisionPosition:i,collisionWidth:k,collisionHeight:C,offset:[c[0]+T[0],c[1]+T[1]],my:r.my,at:r.at,within:b,elem:l})}),r.using&&(a=function(t){var e=g.left-M.left,n=e+d-u,i=g.top-M.top,a=i+p-h,c={target:{element:y,left:g.left,top:g.top,width:d,height:p},element:{element:l,left:M.left,top:M.top,width:u,height:h},horizontal:n<0?"left":e>0?"right":"center",vertical:a<0?"top":i>0?"bottom":"middle"};d<u&&o(e+n)<d&&(c.horizontal="center"),p<h&&o(i+a)<p&&(c.vertical="middle"),s(o(e),o(n))>s(o(i),o(a))?c.important="horizontal":c.important="vertical",r.using.call(this,t,c)}),l.offset(t.extend(M,{using:a}))})},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&&u<=0?(n=t.left+l+e.collisionWidth-o-r,t.left+=l-n):t.left=u>0&&l<=0?r:l>u?r+o-e.collisionWidth: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&&u<=0?(n=t.top+l+e.collisionHeight-o-r,t.top+=l-n):t.top=u>0&&l<=0?r:l>u?r+o-e.collisionHeight: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,s=r.offset.left+r.scrollLeft,a=r.width,l=r.isWindow?r.scrollLeft:r.offset.left,u=t.left-e.collisionPosition.marginLeft,h=u-l,c=u+e.collisionWidth-a-l,f="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,d="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,p=-2*e.offset[0];h<0?((n=t.left+f+d+p+e.collisionWidth-a-s)<0||n<o(h))&&(t.left+=f+d+p):c>0&&((i=t.left-e.collisionPosition.marginLeft+f+d+p-l)>0||o(i)<c)&&(t.left+=f+d+p)},top:function(t,e){var n,i,r=e.within,s=r.offset.top+r.scrollTop,a=r.height,l=r.isWindow?r.scrollTop:r.offset.top,u=t.top-e.collisionPosition.marginTop,h=u-l,c=u+e.collisionHeight-a-l,f="top"===e.my[1],d=f?-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];h<0?((i=t.top+d+p+g+e.collisionHeight-a-s)<0||i<o(h))&&(t.top+=d+p+g):c>0&&((n=t.top-e.collisionPosition.marginTop+d+p+g-l)>0||o(n)<c)&&(t.top+=d+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)}}}}();t.ui.position,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])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}});/*!
|
|
* jQuery UI Focusable 1.12.1
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*/
|
|
t.ui.focusable=function(n,i){var r,s,o,a,l,u=n.nodeName.toLowerCase();return"area"===u?(r=n.parentNode,s=r.name,!(!n.href||!s||"map"!==r.nodeName.toLowerCase())&&(o=t("img[usemap='#"+s+"']"),o.length>0&&o.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(u)?(a=!n.disabled)&&(l=t(n).closest("fieldset")[0])&&(a=!l.disabled):a="a"===u?n.href||i:i,a&&t(n).is(":visible")&&e(t(n)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}});t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var n=e.data("ui-form-reset-instances");t.each(n,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}};/*!
|
|
* jQuery UI Support for jQuery core 1.7.x 1.12.1
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*
|
|
*/
|
|
"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,n){function i(e,n,i,s){return t.each(r,function(){n-=parseFloat(t.css(e,"padding"+this))||0,i&&(n-=parseFloat(t.css(e,"border"+this+"Width"))||0),s&&(n-=parseFloat(t.css(e,"margin"+this))||0)}),n}var r="Width"===n?["Left","Right"]:["Top","Bottom"],s=n.toLowerCase(),o={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+n]=function(e){return void 0===e?o["inner"+n].call(this):this.each(function(){t(this).css(s,i(this,e)+"px")})},t.fn["outer"+n]=function(e,r){return"number"!=typeof e?o["outer"+n].call(this,e):this.each(function(){t(this).css(s,i(this,e,!0,r)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))});/*!
|
|
* jQuery UI Keycode 1.12.1
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*/
|
|
var h=(t.ui.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.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,n,i,r,s;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(r=this.eq(0).parents("label"),i=this.attr("id"),i&&(e=this.eq(0).parents().last(),s=e.add(e.length?e.siblings():this.siblings()),n="label[for='"+t.ui.escapeSelector(i)+"']",r=r.add(s.find(n).addBack(n))),this.pushStack(r))},t.fn.scrollParent=function(e){var n=this.css("position"),i="absolute"===n,r=e?/(auto|scroll|hidden)/:/(auto|scroll)/,s=this.parents().filter(function(){var e=t(this);return(!i||"static"!==e.css("position"))&&r.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==n&&s.length?s:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var n=t.attr(e,"tabindex"),i=null!=n;return(!i||n>=0)&&t.ui.focusable(e,i)}}),t.fn.extend({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.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),!1);t(document).on("mouseup",function(){h=!1});t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(n){if(!0===t.data(n.target,e.widgetName+".preventClickEvent"))return t.removeData(n.target,e.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!h){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var n=this,i=1===e.which,r=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(i&&!r&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return n._mouseMove(t)},this._mouseUpDelegate=function(t){return n._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),h=!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)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,h=!1,e.preventDefault()},_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}}),t.ui.plugin={add:function(e,n,i){var r,s=t.ui[e].prototype;for(r in i)s.plugins[r]=s.plugins[r]||[],s.plugins[r].push([n,i[r]])},call:function(t,e,n,i){var r,s=t.plugins[e];if(s&&(i||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(r=0;r<s.length;r++)t.options[s[r][0]]&&s[r][1].apply(t.element,n)}},t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(n){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")};/*!
|
|
* jQuery UI Draggable 1.12.1
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*/
|
|
t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",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._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){if((this.helper||this.element).is(".ui-draggable-dragging"))return void(this.destroyOnClear=!0);this._removeHandleClassName(),this._mouseDestroy()},_mouseCapture:function(e){var n=this.options;return!(this.helper||n.disabled||t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),this._blockFrames(!0===n.iframeFix?"iframe":n.iframeFix),!0))},_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=t.ui.safeActiveElement(this.document[0]);t(e.target).closest(n).length||t.ui.safeBlur(n)},_mouseStart:function(e){var n=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"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(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),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(!1===this._trigger("drag",e,i))return this._mouseUp(new t.Event("mouseup",e)),!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||!0===this.options.revert||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==n._trigger("stop",e)&&n._clear()}):!1!==this._trigger("stop",e)&&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.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"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,s=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()||s.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===r.containment?void(this.containment=[0,0,t(s).width()-this.helperProportions.width-this.margins.left,(t(s).height()||s.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),void((i=n[0])&&(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,s,o=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)),o.grid&&(r=o.grid[1]?this.originalPageY+Math.round((u-this.originalPageY)/o.grid[1])*o.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-o.grid[1]:r+o.grid[1]:r,s=o.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,l=n?s-this.offset.click.left>=n[0]||s-this.offset.click.left>n[2]?s:s-this.offset.click.left>=n[0]?s-o.grid[0]:s+o.grid[0]:s),"y"===o.axis&&(l=this.originalPageX),"x"===o.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._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_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,s=this;s.positionAbs=i.positionAbs,s.helperProportions=i.helperProportions,s.offset.click=i.offset.click,s._intersectsWith(s.containerCache)&&(r=!0,t.each(i.sortables,function(){return this.positionAbs=i.positionAbs,this.helperProportions=i.helperProportions,this.offset.click=i.offset.click,this!==s&&this._intersectsWith(this.containerCache)&&t.contains(s.element[0],this.element[0])&&(r=!1),r})),r?(s.isOver||(s.isOver=1,i._parent=n.helper.parent(),s.currentItem=n.helper.appendTo(s.element).data("ui-sortable-item",!0),s.options._helper=s.options.helper,s.options.helper=function(){return n.helper[0]},e.target=s.currentItem[0],s._mouseCapture(e,!0),s._mouseStart(e,!0,!0),s.offset.click.top=i.offset.click.top,s.offset.click.left=i.offset.click.left,s.offset.parent.left-=i.offset.parent.left-s.offset.parent.left,s.offset.parent.top-=i.offset.parent.top-s.offset.parent.top,i._trigger("toSortable",e),i.dropped=s.element,t.each(i.sortables,function(){this.refreshPositions()}),i.currentItem=i.element,s.fromOutside=i),s.currentItem&&(s._mouseDrag(e),n.position=s.position)):s.isOver&&(s.isOver=0,s.cancelHelperRemoval=!0,s.options._revert=s.options.revert,s.options.revert=!1,s._trigger("out",e,s._uiHash(s)),s._mouseStop(e,!0),s.options.revert=s.options._revert,s.options.helper=s.options._helper,s.placeholder&&s.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"),s=i.options;r.css("cursor")&&(s._cursor=r.css("cursor")),r.css("cursor",s.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),s=i.options;r.css("opacity")&&(s._opacity=r.css("opacity")),r.css("opacity",s.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,s=!1,o=i.scrollParentNotHidden[0],a=i.document[0];o!==a&&"HTML"!==o.tagName?(r.axis&&"x"===r.axis||(i.overflowOffset.top+o.offsetHeight-e.pageY<r.scrollSensitivity?o.scrollTop=s=o.scrollTop+r.scrollSpeed:e.pageY-i.overflowOffset.top<r.scrollSensitivity&&(o.scrollTop=s=o.scrollTop-r.scrollSpeed)),r.axis&&"y"===r.axis||(i.overflowOffset.left+o.offsetWidth-e.pageX<r.scrollSensitivity?o.scrollLeft=s=o.scrollLeft+r.scrollSpeed:e.pageX-i.overflowOffset.left<r.scrollSensitivity&&(o.scrollLeft=s=o.scrollLeft-r.scrollSpeed))):(r.axis&&"x"===r.axis||(e.pageY-t(a).scrollTop()<r.scrollSensitivity?s=t(a).scrollTop(t(a).scrollTop()-r.scrollSpeed):t(window).height()-(e.pageY-t(a).scrollTop())<r.scrollSensitivity&&(s=t(a).scrollTop(t(a).scrollTop()+r.scrollSpeed))),r.axis&&"y"===r.axis||(e.pageX-t(a).scrollLeft()<r.scrollSensitivity?s=t(a).scrollLeft(t(a).scrollLeft()-r.scrollSpeed):t(window).width()-(e.pageX-t(a).scrollLeft())<r.scrollSensitivity&&(s=t(a).scrollLeft(t(a).scrollLeft()+r.scrollSpeed)))),!1!==s&&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,s,o,a,l,u,h,c,f,d,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(f=i.snapElements.length-1;f>=0;f--)l=i.snapElements[f].left-i.margins.left,u=l+i.snapElements[f].width,h=i.snapElements[f].top-i.margins.top,c=h+i.snapElements[f].height,v<l-g||m>u+g||b<h-g||y>c+g||!t.contains(i.snapElements[f].item.ownerDocument,i.snapElements[f].item)?(i.snapElements[f].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,e,t.extend(i._uiHash(),{snapItem:i.snapElements[f].item})),i.snapElements[f].snapping=!1):("inner"!==p.snapMode&&(r=Math.abs(h-b)<=g,s=Math.abs(c-y)<=g,o=Math.abs(l-v)<=g,a=Math.abs(u-m)<=g,r&&(n.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top),s&&(n.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),o&&(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)),d=r||s||o||a,"outer"!==p.snapMode&&(r=Math.abs(h-y)<=g,s=Math.abs(c-b)<=g,o=Math.abs(l-m)<=g,a=Math.abs(u-v)<=g,r&&(n.position.top=i._convertPositionTo("relative",{top:h,left:0}).top),s&&(n.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),o&&(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[f].snapping&&(r||s||o||a||d)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,e,t.extend(i._uiHash(),{snapItem:i.snapElements[f].item})),i.snapElements[f].snapping=r||s||o||a||d)}}),t.ui.plugin.add("draggable","stack",{start:function(e,n,i){var r,s=i.options,o=t.makeArray(t(s.stack)).sort(function(e,n){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(n).css("zIndex"),10)||0)});o.length&&(r=parseInt(t(o[0]).css("zIndex"),10)||0,t(o).each(function(e){t(this).css("zIndex",r+e)}),this.css("zIndex",r+o.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,n,i){var r=t(n.helper),s=i.options;r.css("zIndex")&&(s._zIndex=r.css("zIndex")),r.css("zIndex",s.zIndex)},stop:function(e,n,i){var r=i.options;r._zIndex&&t(n.helper).css("zIndex",r._zIndex)}});t.ui.draggable;/*!
|
|
* jQuery UI Droppable 1.12.1
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*/
|
|
t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!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(){if(!arguments.length)return e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});e=arguments[0]},this._addToManager(n.scope),n.addClasses&&this._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)},_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._addActiveClass(),n&&this._trigger("activate",e,this.ui(n))},_deactivate:function(e){var n=t.ui.ddmanager.current;this._removeActiveClass(),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._addHoverClass(),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._removeHoverClass(),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");if(n.options.greedy&&!n.options.disabled&&n.options.scope===i.options.scope&&n.accept.call(n.element[0],i.currentItem||i.element)&&c(i,t.extend(n,{offset:n.element.offset()}),n.options.tolerance,e))return r=!0,!1}),!r&&(!!this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(i)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var c=t.ui.intersect=function(){function t(t,e,n){return t>=e&&t<e+n}return function(e,n,i,r){if(!n.offset)return!1;var s=(e.positionAbs||e.position.absolute).left+e.margins.left,o=(e.positionAbs||e.position.absolute).top+e.margins.top,a=s+e.helperProportions.width,l=o+e.helperProportions.height,u=n.offset.left,h=n.offset.top,c=u+n.proportions().width,f=h+n.proportions().height;switch(i){case"fit":return u<=s&&a<=c&&h<=o&&l<=f;case"intersect":return u<s+e.helperProportions.width/2&&a-e.helperProportions.width/2<c&&h<o+e.helperProportions.height/2&&l-e.helperProportions.height/2<f;case"pointer":return t(r.pageY,h,n.proportions().height)&&t(r.pageX,u,n.proportions().width);case"touch":return(o>=h&&o<=f||l>=h&&l<=f||o<h&&l>f)&&(s>=u&&s<=c||a>=u&&a<=c||s<u&&a>c);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,n){var i,r,s=t.ui.ddmanager.droppables[e.options.scope]||[],o=n?n.type:null,a=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(i=0;i<s.length;i++)if(!(s[i].options.disabled||e&&!s[i].accept.call(s[i].element[0],e.currentItem||e.element))){for(r=0;r<a.length;r++)if(a[r]===s[i].element[0]){s[i].proportions().height=0;continue t}s[i].visible="none"!==s[i].element.css("display"),s[i].visible&&("mousedown"===o&&s[i]._activate.call(s[i],n),s[i].offset=s[i].element.offset(),s[i].proportions({width:s[i].element[0].offsetWidth,height:s[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&&c(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").on("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,s,o=c(e,this,this.options.tolerance,n),a=!o&&this.isover?"isout":o&&!this.isover?"isover":null;a&&(this.options.greedy&&(r=this.options.scope,s=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===r}),s.length&&(i=t(s[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").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,n)}},!1!==t.uiBackCompat&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});t.ui.droppable;/*!
|
|
* jQuery UI Resizable 1.12.1
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*/
|
|
t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},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 parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_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||(e[i]=1,r=e[i]>0,e[i]=0,r)},_create:function(){var e,n=this.options,i=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!n.aspectRatio,aspectRatio:n.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:n.helper||n.ghost||n.animate?n.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,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",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(e),this._proportionallyResize()),this._setupHandles(),n.autoHide&&t(this.element).on("mouseenter",function(){n.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){n.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,n=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".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},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var e,n,i,r,s,o=this.options,a=this;if(this.handles=o.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"),i=this.handles.split(","),this.handles={},n=0;n<i.length;n++)e=t.trim(i[n]),r="ui-resizable-"+e,s=t("<div>"),this._addClass(s,"ui-resizable-handle "+r),s.css({zIndex:o.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(s);this._renderAxis=function(e){var n,i,r,s;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:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=t(this.handles[n],this.element),s=/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,s),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.on("mouseover",function(){a.resizing||(this.className&&(s=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=s&&s[1]?s[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var n,i,r=!1;for(n in this.handles)((i=t(this.handles[n])[0])===e.target||t.contains(i,e.target))&&(r=!0);return!this.options.disabled&&r},_mouseStart:function(e){var n,i,r,s=this.options,o=this.element;return this.resizing=!0,this._renderProxy(),n=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(n+=t(s.containment).scrollLeft()||0,i+=t(s.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:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalPosition={left:n,top:i},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.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),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var n,i,r=this.originalMousePosition,s=this.axis,o=e.pageX-r.left||0,a=e.pageY-r.top||0,l=this._change[s];return this._updatePrevProperties(),!!l&&(n=l.apply(this,[e,o,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)},_mouseStop:function(e){this.resizing=!1;var n,i,r,s,o,a,l,u=this.options,h=this;return this._helper&&(n=this._proportionallyResizeElements,i=n.length&&/textarea/i.test(n[0].nodeName),r=i&&this._hasScroll(n[0],"left")?0:h.sizeDiff.height,s=i?0:h.sizeDiff.width,o={width:h.helper.width()-s,height:h.helper.height()-r},a=parseFloat(h.element.css("left"))+(h.position.left-h.originalPosition.left)||null,l=parseFloat(h.element.css("top"))+(h.position.top-h.originalPosition.top)||null,u.animate||this.element.css(t.extend(o,{top:l,left:a})),h.helper.height(h.size.height),h.helper.width(h.size.width),this._helper&&!u.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._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,s,o=this.options;s={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||t)&&(e=s.minHeight*this.aspectRatio,i=s.minWidth/this.aspectRatio,n=s.maxHeight*this.aspectRatio,r=s.maxWidth/this.aspectRatio,e>s.minWidth&&(s.minWidth=e),i>s.minHeight&&(s.minHeight=i),n<s.maxWidth&&(s.maxWidth=n),r<s.maxHeight&&(s.maxHeight=r)),this._vBoundaries=s},_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,s=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,o=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,u=/sw|nw|w/.test(n),h=/nw|ne|n/.test(n);return s&&(t.width=e.minWidth),o&&(t.height=e.minHeight),i&&(t.width=e.maxWidth),r&&(t.height=e.maxHeight),s&&u&&(t.left=a-e.minWidth),i&&u&&(t.left=a-e.maxWidth),o&&h&&(t.top=l-e.minHeight),r&&h&&(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")];e<4;e++)n[e]=parseFloat(i[e])||0,n[e]+=parseFloat(r[e])||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._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),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;return{left:this.originalPosition.left+e,width:n.width-e}},n:function(t,e,n){var i=this.originalSize;return{top:this.originalPosition.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,s=r.length&&/textarea/i.test(r[0].nodeName),o=s&&n._hasScroll(r[0],"left")?0:n.sizeDiff.height,a=s?0:n.sizeDiff.width,l={width:n.size.width-a,height:n.size.height-o},u=parseFloat(n.element.css("left"))+(n.position.left-n.originalPosition.left)||null,h=parseFloat(n.element.css("top"))+(n.position.top-n.originalPosition.top)||null;n.element.animate(t.extend(l,h&&u?{top:h,left:u}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var i={width:parseFloat(n.element.css("width")),height:parseFloat(n.element.css("height")),top:parseFloat(n.element.css("top")),left:parseFloat(n.element.css("left"))};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,s,o,a,l=t(this).resizable("instance"),u=l.options,h=l.element,c=u.containment,f=c instanceof t?c.get(0):/parent/.test(c)?h.parent().get(0):c;f&&(l.containerElement=t(f),/document/.test(c)||c===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(f),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,s=l.containerSize.width,o=l._hasScroll(f,"left")?f.scrollWidth:s,a=l._hasScroll(f)?f.scrollHeight:r,l.parentData={element:f,left:i.left,top:i.top,width:o,height:a}))},resize:function(e){var n,i,r,s,o=t(this).resizable("instance"),a=o.options,l=o.containerOffset,u=o.position,h=o._aspectRatio||e.shiftKey,c={top:0,left:0},f=o.containerElement,d=!0;f[0]!==document&&/static/.test(f.css("position"))&&(c=l),u.left<(o._helper?l.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-l.left:o.position.left-c.left),h&&(o.size.height=o.size.width/o.aspectRatio,d=!1),o.position.left=a.helper?l.left:0),u.top<(o._helper?l.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-l.top:o.position.top),h&&(o.size.width=o.size.height*o.aspectRatio,d=!1),o.position.top=o._helper?l.top:0),r=o.containerElement.get(0)===o.element.parent().get(0),s=/relative|absolute/.test(o.containerElement.css("position")),r&&s?(o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.offset.top=o.element.offset().top),n=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-c.left:o.offset.left-l.left)),i=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-c.top:o.offset.top-l.top)),n+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-n,h&&(o.size.height=o.size.width/o.aspectRatio,d=!1)),i+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-i,h&&(o.size.width=o.size.height*o.aspectRatio,d=!1)),d||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),n=e.options,i=e.containerOffset,r=e.containerPosition,s=e.containerElement,o=t(e.helper),a=o.offset(),l=o.outerWidth()-e.sizeDiff.width,u=o.outerHeight()-e.sizeDiff.height;e._helper&&!n.animate&&/relative/.test(s.css("position"))&&t(this).css({left:a.left-r.left-i.left,width:l,height:u}),e._helper&&!n.animate&&/static/.test(s.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:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,n){var i=t(this).resizable("instance"),r=i.options,s=i.originalSize,o=i.originalPosition,a={height:i.size.height-s.height||0,width:i.size.width-s.width||0,top:i.position.top-o.top||0,left:i.position.left-o.left||0};t(r.alsoResize).each(function(){var e=t(this),i=t(this).data("ui-resizable-alsoresize"),r={},s=e.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(s,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("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),n=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),!1!==t.uiBackCompat&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.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,s=n.originalSize,o=n.originalPosition,a=n.axis,l="number"==typeof i.grid?[i.grid,i.grid]:i.grid,u=l[0]||1,h=l[1]||1,c=Math.round((r.width-s.width)/u)*u,f=Math.round((r.height-s.height)/h)*h,d=s.width+c,p=s.height+f,g=i.maxWidth&&i.maxWidth<d,m=i.maxHeight&&i.maxHeight<p,v=i.minWidth&&i.minWidth>d,y=i.minHeight&&i.minHeight>p;i.grid=l,v&&(d+=u),y&&(p+=h),g&&(d-=u),m&&(p-=h),/^(se|s|e)$/.test(a)?(n.size.width=d,n.size.height=p):/^(ne)$/.test(a)?(n.size.width=d,n.size.height=p,n.position.top=o.top-f):/^(sw)$/.test(a)?(n.size.width=d,n.size.height=p,n.position.left=o.left-c):((p-h<=0||d-u<=0)&&(e=n._getPaddingPlusBorderDimensions(this)),p-h>0?(n.size.height=p,n.position.top=o.top-f):(p=h-e.height,n.size.height=p,n.position.top=o.top+s.height-p),d-u>0?(n.size.width=d,n.position.left=o.left-c):(d=u-e.width,n.size.width=d,n.position.left=o.left+s.width-d))}});t.ui.resizable,t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",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=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var n=t(this),i=n.offset(),r={left:i.left-e.elementPos.left,top:i.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:n,left:r.left,top:r.top,right:r.left+n.outerWidth(),bottom:r.top+n.outerHeight(),startselected:!1,selected:n.hasClass("ui-selected"),selecting:n.hasClass("ui-selecting"),unselecting:n.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var n=this,i=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),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||(n._removeClass(i.$element,"ui-selected"),i.selected=!1,n._addClass(i.$element,"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");if(r)return i=!e.metaKey&&!e.ctrlKey||!r.$element.hasClass("ui-selected"),n._removeClass(r.$element,i?"ui-unselecting":"ui-selected")._addClass(r.$element,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}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var n,i=this,r=this.options,s=this.opos[0],o=this.opos[1],a=e.pageX,l=e.pageY;return s>a&&(n=a,a=s,s=n),o>l&&(n=l,l=o,o=n),this.helper.css({left:s,top:o,width:a-s,height:l-o}),this.selectees.each(function(){var n=t.data(this,"selectable-item"),u=!1,h={};n&&n.element!==i.element[0]&&(h.left=n.left+i.elementPos.left,h.right=n.right+i.elementPos.left,h.top=n.top+i.elementPos.top,h.bottom=n.bottom+i.elementPos.top,"touch"===r.tolerance?u=!(h.left>a||h.right<s||h.top>l||h.bottom<o):"fit"===r.tolerance&&(u=h.left>s&&h.right<a&&h.top>o&&h.bottom<l),u?(n.selected&&(i._removeClass(n.$element,"ui-selected"),n.selected=!1),n.unselecting&&(i._removeClass(n.$element,"ui-unselecting"),n.unselecting=!1),n.selecting||(i._addClass(n.$element,"ui-selecting"),n.selecting=!0,i._trigger("selecting",e,{selecting:n.element}))):(n.selecting&&((e.metaKey||e.ctrlKey)&&n.startselected?(i._removeClass(n.$element,"ui-selecting"),n.selecting=!1,i._addClass(n.$element,"ui-selected"),n.selected=!0):(i._removeClass(n.$element,"ui-selecting"),n.selecting=!1,n.startselected&&(i._addClass(n.$element,"ui-unselecting"),n.unselecting=!0),i._trigger("unselecting",e,{unselecting:n.element}))),n.selected&&(e.metaKey||e.ctrlKey||n.startselected||(i._removeClass(n.$element,"ui-selected"),n.selected=!1,i._addClass(n.$element,"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");n._removeClass(i.$element,"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");n._removeClass(i.$element,"ui-selecting")._addClass(i.$element,"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}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,n){return t>=e&&t<e+n},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._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(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){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,s=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each(function(){if(t.data(this,s.widgetName+"-item")===s)return i=t(this),!1}),t.data(e.target,s.widgetName+"-item")===s&&(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))))},_mouseStart:function(e,n,i){var r,s,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(s=this.document.find("body"),this.storedCursor=s.css("cursor"),s.css("cursor",o.cursor),this.storedStylesheet=t("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(s)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(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&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var n,i,r,s,o=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+o.scrollSpeed:e.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+o.scrollSpeed:e.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(e.pageY-this.document.scrollTop()<o.scrollSensitivity?a=this.document.scrollTop(this.document.scrollTop()-o.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<o.scrollSensitivity&&(a=this.document.scrollTop(this.document.scrollTop()+o.scrollSpeed)),e.pageX-this.document.scrollLeft()<o.scrollSensitivity?a=this.document.scrollLeft(this.document.scrollLeft()-o.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<o.scrollSensitivity&&(a=this.document.scrollLeft(this.document.scrollLeft()+o.scrollSpeed))),!1!==a&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),n=this.items.length-1;n>=0;n--)if(i=this.items[n],r=i.item[0],(s=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(r===this.currentItem[0]||this.placeholder[1===s?"next":"prev"]()[0]===r||t.contains(this.placeholder[0],r)||"semi-dynamic"===this.options.type&&t.contains(this.element[0],r))){if(this.direction=1===s?"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(),s=this.options.axis,o={};s&&"x"!==s||(o.left=r.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),s&&"y"!==s||(o.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(o,parseInt(this.options.revert,10)||500,function(){i._clear(e)})}else this._clear(e,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"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,s=t.left,o=s+t.width,a=t.top,l=a+t.height,u=this.offset.click.top,h=this.offset.click.left,c="x"===this.options.axis||i+u>a&&i+u<l,f="y"===this.options.axis||e+h>s&&e+h<o,d=c&&f;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?d:s<e+this.helperProportions.width/2&&n-this.helperProportions.width/2<o&&a<i+this.helperProportions.height/2&&r-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e,n,i="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),r="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!i||!r)&&(e=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection(),this.floating?"right"===n||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),i=this._getDragVerticalDirection(),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,s,o,a=[],l=[],u=this._connectWith();if(u&&e)for(i=u.length-1;i>=0;i--)for(s=t(u[i],this.document[0]),r=s.length-1;r>=0;r--)(o=t.data(s[r],this.widgetFullName))&&o!==this&&!o.options.disabled&&l.push([t.isFunction(o.options.items)?o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(l.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=l.length-1;i>=0;i--)l[i][0].each(n);return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var n=0;n<e.length;n++)if(e[n]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var n,i,r,s,o,a,l,u,h=this.items,c=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],f=this._connectWith();if(f&&this.ready)for(n=f.length-1;n>=0;n--)for(r=t(f[n],this.document[0]),i=r.length-1;i>=0;i--)(s=t.data(r[i],this.widgetFullName))&&s!==this&&!s.options.disabled&&(c.push([t.isFunction(s.options.items)?s.options.items.call(s.element[0],e,{item:this.currentItem}):t(s.options.items,s.element),s]),this.containers.push(s));for(n=c.length-1;n>=0;n--)for(o=c[n][1],a=c[n][0],i=0,u=a.length;i<u;i++)l=t(a[i]),l.data(this.widgetName+"-item",o),h.push({item:l,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var n,i,r,s;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()),s=r.offset(),i.left=s.left,i.top=s.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--)s=this.containers[n].element.offset(),this.containers[n].containerCache.left=s.left,this.containers[n].containerCache.top=s.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]);return e._addClass(r,"ui-sortable-placeholder",n||e.currentItem[0].className)._removeClass(r,"ui-sortable-helper"),"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> </td>",i.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)})},_contactContainers:function(e){var n,i,r,s,o,a,l,u,h,c,f=null,d=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],d=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",e,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[d].containerCache.over||(this.containers[d]._trigger("over",e,this._uiHash(this)),this.containers[d].containerCache.over=1);else{for(r=1e4,s=null,h=f.floating||this._isFloating(this.currentItem),o=h?"left":"top",a=h?"width":"height",c=h?"pageX":"pageY",i=this.items.length-1;i>=0;i--)t.contains(this.containers[d].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(l=this.items[i].item.offset()[o],u=!1,e[c]-l>this.items[i][a]/2&&(u=!0),Math.abs(e[c]-l)<r&&(r=Math.abs(e[c]-l),s=this.items[i],this.direction=u?"up":"down"));if(!s&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[d])return void(this.currentContainer.containerCache.over||(this.containers[d]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));s?this._rearrange(e,s,null,!0):this._rearrange(e,null,this.containers[d].element,!0),this._trigger("change",e,this._uiHash()),this.containers[d]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[d],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",e,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(e){var n=this.options,i=t.isFunction(n.helper)?t(n.helper.apply(this.element[0],[e,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||t("parent"!==n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),i[0].style.width&&!n.forceHelperSize||i.width(this.currentItem.width()),i[0].style.height&&!n.forceHelperSize||i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,n,i,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.height()||document.body.parentNode.scrollHeight: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,s=/(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():s?0:r.scrollTop())*i,left:n.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:r.scrollLeft())*i}},_generatePosition:function(e){var n,i,r=this.options,s=e.pageX,o=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(s=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(s=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),r.grid&&(n=this.originalPageY+Math.round((o-this.originalPageY)/r.grid[1])*r.grid[1],o=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-r.grid[1]:n+r.grid[1]:n,i=this.originalPageX+Math.round((s-this.originalPageX)/r.grid[0])*r.grid[0],s=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:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:s-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),this._removeClass(this.currentItem,"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(){!1===t.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var n=e||this;return{helper:n.helper,placeholder:n.placeholder||t([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:e?e.element:null}}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},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._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,n,i=this.options.icons;i&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+i.header),e.prependTo(this.headers),n=this.active.children(".ui-accordion-header-icon"),this._removeClass(n,i.header)._addClass(n,null,i.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){if("active"===t)return void this._activate(e);"event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons())},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var n=t.ui.keyCode,i=this.headers.length,r=this.headers.index(e.target),s=!1;switch(e.keyCode){case n.RIGHT:case n.DOWN:s=this.headers[(r+1)%i];break;case n.LEFT:case n.UP:s=this.headers[(r-1+i)%i];break;case n.SPACE:case n.ENTER:this._eventHandler(e);break;case n.HOME:s=this.headers[0];break;case n.END:s=this.headers[i-1]}s&&(t(e.target).attr("tabIndex",-1),t(s).attr("tabIndex",0),t(s).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=t()):!1===e.active?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),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),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().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(){var n=t(this).is(":visible");n||t(this).show(),e=Math.max(e,t(this).css("height","").height()),n||t(this).hide()}).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,i,r=this.options,s=this.active,o=t(e.currentTarget),a=o[0]===s[0],l=a&&r.collapsible,u=l?t():o.next(),h=s.next(),c={oldHeader:s,oldPanel:h,newHeader:l?t():o,newPanel:u};e.preventDefault(),a&&!r.collapsible||!1===this._trigger("beforeActivate",e,c)||(r.active=!l&&this.headers.index(o),this.active=a?t():o,this._toggle(c),this._removeClass(s,"ui-accordion-header-active","ui-state-active"),r.icons&&(n=s.children(".ui-accordion-header-icon"),this._removeClass(n,null,r.icons.activeHeader)._addClass(n,null,r.icons.header)),a||(this._removeClass(o,"ui-accordion-header-collapsed")._addClass(o,"ui-accordion-header-active","ui-state-active"),r.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,r.icons.header)._addClass(i,null,r.icons.activeHeader)),this._addClass(o.next(),"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,s,o=this,a=0,l=t.css("box-sizing"),u=t.length&&(!e.length||t.index()<e.index()),h=this.options.animate||{},c=u&&h.down||h,f=function(){o._toggleComplete(n)};return"number"==typeof c&&(s=c),"string"==typeof c&&(r=c),r=r||c.easing||h.easing,s=s||c.duration||h.duration,e.length?t.length?(i=t.show().outerHeight(),e.animate(this.hideProps,{duration:s,easing:r,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:s,easing:r,complete:f,step:function(t,n){n.now=Math.round(t),"height"!==n.prop?"content-box"===l&&(a+=n.now):"content"!==o.options.heightStyle&&(n.now=Math.round(i-e.outerHeight()-a),a=0)}})):e.animate(this.hideProps,s,r,f):t.animate(this.showProps,s,r,f)},_toggleComplete:function(t){var e=t.oldPanel,n=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(n,"ui-accordion-header-active")._addClass(n,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var n=t(e.target),i=t(t.ui.safeActiveElement(this.document[0]));!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")&&i.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.target).closest(".ui-menu-item"),i=t(e.currentTarget);n[0]===i[0]&&(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,i))}},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],t.ui.safeActiveElement(this.document[0]))&&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(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),n=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),n.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var n,i,r,s,o=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:o=!1,i=this.previousFilter||"",s=!1,r=e.keyCode>=96&&e.keyCode<=105?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),r===i?s=!0:r=i+r,n=this._filterMenuItems(r),n=s&&-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}o&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,n,i,r,s,o=this,a=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),i=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),n=e.prev(),i=t("<span>").data("ui-menu-submenu-caret",!0);o._addClass(i,"ui-menu-icon","ui-icon "+a),n.attr("aria-haspopup","true").prepend(i),e.attr("aria-labelledby",n.attr("id"))}),this._addClass(i,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),n=e.find(this.options.items),n.not(".ui-menu-item").each(function(){var e=t(this);o._isDivider(e)&&o._addClass(e,"ui-menu-divider","ui-widget-content")}),r=n.not(".ui-menu-item, .ui-menu-divider"),s=r.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(r,"ui-menu-item")._addClass(s,"ui-menu-item-wrapper"),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){if("icons"===t){var n=this.element.find(".ui-menu-icon");this._removeClass(n,null,this.options.icons.submenu)._addClass(n,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var n,i,r;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),r=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(r,null,"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,s,o,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,s=this.activeMenu.scrollTop(),o=this.activeMenu.height(),a=e.outerHeight(),r<0?this.activeMenu.scrollTop(s+r):r+a>o&&this.activeMenu.scrollTop(s+r-o+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_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._removeClass(i.find(".ui-state-active"),null,"ui-state-active"),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")},_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;if(!this.active)return void this.next(e);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"]()))},previousPage:function(e){var n,i,r;if(!this.active)return void this.next(e);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()))},_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).children(".ui-menu-item-wrapper").text()))})}});/*!
|
|
* jQuery UI Autocomplete 1.12.1
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*/
|
|
t.widget("ui.autocomplete",{version:"1.12.1",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(),s="textarea"===r,o="input"===r;this.isMultiLine=s||!o&&this._isContentEditable(this.element),this.valueMethod=this.element[s||o?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.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 s=t.ui.keyCode;switch(r.keyCode){case s.PAGE_UP:e=!0,this._move("previousPage",r);break;case s.PAGE_DOWN:e=!0,this._move("nextPage",r);break;case s.UP:e=!0,this._keyEvent("previous",r);break;case s.DOWN:e=!0,this._keyEvent("next",r);break;case s.ENTER:this.menu.active&&(e=!0,r.preventDefault(),this.menu.select(r));break;case s.TAB:this.menu.active&&this.menu.select(r);break;case s.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){if(i)return i=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){if(this.cancelBlur)return void delete this.cancelBlur;clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,n){var i,r;if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)});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)&&t.trim(i).length&&(this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))},menuselect:function(e,n){var i=n.item.data("ui-autocomplete-item"),r=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=r,this._delay(function(){this.previous=r,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.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()},_isEventTargetInWidget:function(e){var n=this.menu.element[0];return e.target===this.element[0]||e.target===n||t.contains(n,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_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, dialog")),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):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._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._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._off(this.document,"mousedown"),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(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_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>").append(t("<div>").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())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),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))}});var f=(t.ui.autocomplete,/ui-corner-([a-z]){2,6}/g);t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,n=[];t.each(this.options.items,function(i,r){var s,o={};if(r)return"controlgroupLabel"===i?(s=e.element.find(r),s.each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(s,null,"ui-widget ui-widget-content ui-state-default"),void(n=n.concat(s.get()))):void(t.fn[i]&&(o=e["_"+i+"Options"]?e["_"+i+"Options"]("middle"):{classes:{}},e.element.find(r).each(function(){var r=t(this),s=r[i]("instance"),a=t.widget.extend({},o);if("button"!==i||!r.parent(".ui-spinner").length){s||(s=r[i]()[i]("instance")),s&&(a.classes=e._resolveClassesValues(a.classes,s)),r[i](a);var l=r[i]("widget");t.data(l[0],"ui-controlgroup-data",s||r[i]("instance")),n.push(l[0])}})))}),this.childWidgets=t(t.unique(n)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var n=t(this),i=n.data("ui-controlgroup-data");i&&i[e]&&i[e]()})},_updateCornerClass:function(t,e){var n=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,n)},_buildSimpleOptions:function(t,e){var n="vertical"===this.options.direction,i={classes:{}};return i.classes[e]={middle:"",first:"ui-corner-"+(n?"top":"left"),last:"ui-corner-"+(n?"bottom":"right"),only:"ui-corner-all"}[t],i},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:!!e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,n){var i={};return t.each(e,function(r){var s=n.options.classes[r]||"";s=t.trim(s.replace(f,"")),i[r]=(s+" "+e[r]).replace(/\s+/g," ")}),i},_setOption:function(t,e){if("direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t)return void this._callChildMethod(e?"disable":"enable");this.refresh()},refresh:function(){var e,n=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,i){var r=e[i]().data("ui-controlgroup-data");if(r&&n["_"+r.widgetName+"Options"]){var s=n["_"+r.widgetName+"Options"](1===e.length?"only":i);s.classes=n._resolveClassesValues(s.classes,r),r.element[r.widgetName](s)}else n._updateCornerClass(e[i](),i)}),this._callChildMethod("refresh"))}});/*!
|
|
* jQuery UI Checkboxradio 1.12.1
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*/
|
|
t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,n,i=this,r=this._super()||{};return this._readType(),n=this.element.labels(),this.label=t(n[n.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){i.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(r.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(r.disabled=e),r},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e,n=this.element[0].name,i="input[name='"+t.ui.escapeSelector(n)+"']";return n?(e=this.form.length?t(this.form[0].elements).filter(i):t(i).filter(function(){return 0===t(this).form().length}),e.not(this.element)):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){if("label"!==t||e){if(this._super(t,e),"disabled"===t)return this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e);this.refresh()}},_updateIcon:function(e){var n="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(n+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):n+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",n),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]);t.ui.checkboxradio;/*!
|
|
* jQuery UI Button 1.12.1
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*/
|
|
t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),t=this.element[0].disabled,null!=t&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,n){var i="iconPosition"!==e,r=i?this.options.iconPosition:n,s="top"===r||"bottom"===r;this.icon?i&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),i&&this._addClass(this.icon,null,n),this._attachIcon(r),s?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(r))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,n=void 0===t.icon?this.options.icon:t.icon;e||n||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!1!==t.uiBackCompat&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){if("text"===t)return void this._super("showLabel",e);"showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments)}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))});t.ui.button;/*!
|
|
* jQuery UI Datepicker 1.12.1
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*/
|
|
t.extend(t.ui,{datepicker:{version:"1.12.1"}});var d;t.extend(i.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,s;i=e.nodeName.toLowerCase(),r="div"===i||"span"===i,e.id||(this.uuid+=1,e.id="dp"+this.uuid),s=this._newInst(t(e),r),s.settings=t.extend({},n||{}),"input"===i?this._connectDatepicker(e,s):r&&this._inlineDatepicker(e,s)},_newInst:function(e,n){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:n,dpDiv:n?r(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).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(n),t.data(e,"datepicker",n),n.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,n){var i,r,s,o=this._get(n,"appendText"),a=this._get(n,"isRTL");n.append&&n.append.remove(),o&&(n.append=t("<span class='"+this._appendClass+"'>"+o+"</span>"),e[a?"before":"after"](n.append)),e.off("focus",this._showDatepicker),n.trigger&&n.trigger.remove(),i=this._get(n,"showOn"),"focus"!==i&&"both"!==i||e.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(r=this._get(n,"buttonText"),s=this._get(n,"buttonImage"),n.trigger=t(this._get(n,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:s,alt:r,title:r}):t("<button type='button'></button>").addClass(this._triggerClass).html(s?t("<img/>").attr({src:s,alt:r,title:r}):r)),e[a?"before":"after"](n.trigger),n.trigger.on("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,s=new Date(2009,11,20),o=this._get(t,"dateFormat");o.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},s.setMonth(e(this._get(t,o.match(/MM/)?"monthNames":"monthNamesShort"))),s.setDate(e(this._get(t,o.match(/DD/)?"dayNames":"dayNamesShort"))+20-s.getDay())),t.input.attr("size",this._formatDate(t,s).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,h,c,f=this._dialogInst;return f||(this.uuid+=1,a="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+a+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),f=this._dialogInst=this._newInst(this._dialogInput,!1),f.settings={},t.data(this._dialogInput[0],"datepicker",f)),o(f.settings,r||{}),n=n&&n.constructor===Date?this._formatDate(f,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,h=document.documentElement.scrollLeft||document.body.scrollLeft,c=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+h,u/2-150+c]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),f.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",f),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).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==n&&"span"!==n||i.removeClass(this.markerClassName).empty(),d===r&&(d=null))},_enableDatepicker:function(e){var n,i,r=t(e),s=t.data(e,"datepicker");r.hasClass(this.markerClassName)&&(n=e.nodeName.toLowerCase(),"input"===n?(e.disabled=!1,s.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),s=t.data(e,"datepicker");r.hasClass(this.markerClassName)&&(n=e.nodeName.toLowerCase(),"input"===n?(e.disabled=!0,s.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(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,n,i){var r,s,a,l,u=this._getInst(e);if(2===arguments.length&&"string"==typeof n)return"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),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,s=t.datepicker._getInst(e.target),o=!0,a=s.dpDiv.is(".ui-datepicker-rtl");if(s._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),o=!1;break;case 13:return r=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",s.dpDiv),r[0]&&t.datepicker._selectDay(e.target,s.selectedMonth,s.selectedYear,r[0]),n=t.datepicker._get(s,"onSelect"),n?(i=t.datepicker._formatDate(s),n.apply(s.input?s.input[0]:null,[i,s])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(s,"stepBigMonths"):-t.datepicker._get(s,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(s,"stepBigMonths"):+t.datepicker._get(s,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),o=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),o=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?1:-1,"D"),o=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(s,"stepBigMonths"):-t.datepicker._get(s,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),o=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,a?-1:1,"D"),o=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(s,"stepBigMonths"):+t.datepicker._get(s,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),o=e.ctrlKey||e.metaKey;break;default:o=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):o=!1;o&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var n,i,r=t.datepicker._getInst(e.target);if(t.datepicker._get(r,"constrainInput"))return 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},_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(t){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,r,s,a,l,u,h;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),r=t.datepicker._get(i,"beforeShow"),s=r?r.apply(e,[e,i]):{},!1!==s&&(o(i.settings,s),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),a=!1,t(e).parents().each(function(){return!(a|="fixed"===t(this).css("position"))}),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"),h=t.datepicker._get(i,"duration"),i.dpDiv.css("z-index",n(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[u]?i.dpDiv.show(u,t.datepicker._get(i,"showOptions"),h):i.dpDiv[u||"show"](u?h:null),t.datepicker._shouldFocusInput(i)&&i.input.trigger("focus"),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,d=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var n,i=this._getNumberOfMonths(e),r=i[1],o=e.dpDiv.find("."+this._dayOverClass+" a");o.length>0&&s.apply(o.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),r>1&&e.dpDiv.addClass("ui-datepicker-multi-"+r).css("width",17*r+"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.trigger("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(),s=e.dpDiv.outerHeight(),o=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-o: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+s>u&&u>s?Math.abs(s+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,s,o=this._curInst;!o||e&&o!==t.data(e,"datepicker")||this._datepickerShowing&&(n=this._get(o,"showAnim"),i=this._get(o,"duration"),r=function(){t.datepicker._tidyDialog(o)},t.effects&&(t.effects.effect[n]||t.effects[n])?o.dpDiv.hide(n,t.datepicker._get(o,"showOptions"),i,r):o.dpDiv["slideDown"===n?"slideUp":"fadeIn"===n?"fadeOut":"hide"](n?i:null,r),n||r(),this._datepickerShowing=!1,s=this._get(o,"onClose"),s&&s.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),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).off(".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),s=this._getInst(r[0]);this._isDisabledDatepicker(r[0])||(this._adjustInstDate(s,n+("M"===i?this._get(s,"showCurrentAtPos"):0),i),this._updateDatepicker(s))},_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),s=this._getInst(r[0]);s["selected"+("M"===i?"Month":"Year")]=s["draw"+("M"===i?"Month":"Year")]=parseInt(n.options[n.selectedIndex].value,10),this._notifyChange(s),this._adjustDate(r)},_selectDay:function(e,n,i,r){var s,o=t(e);t(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(o[0])||(s=this._getInst(o[0]),s.selectedDay=s.currentDay=t("a",r).html(),s.selectedMonth=s.currentMonth=n,s.selectedYear=s.currentYear=i,this._selectDate(e,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear)))},_clearDate:function(e){var n=t(e);this._selectDate(n,"")},_selectDate:function(e,n){var i,r=t(e),s=this._getInst(r[0]);n=null!=n?n:this._formatDate(s),s.input&&s.input.val(n),this._updateAlternate(s),i=this._get(s,"onSelect"),i?i.apply(s.input?s.input[0]:null,[n,s]):s.input&&s.input.trigger("change"),s.inline?this._updateDatepicker(s):(this._hideDatepicker(),this._lastInput=s.input[0],"object"!=typeof s.input[0]&&s.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var n,i,r,s=this._get(e,"altField");s&&(n=this._get(e,"altFormat")||this._get(e,"dateFormat"),i=this._getDate(e),r=this.formatDate(n,i,this._getFormatConfig(e)),t(s).val(r))},noWeekends:function(t){var e=t.getDay();return[e>0&&e<6,""]},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+""))return null;var r,s,o,a,l=0,u=(i?i.shortYearCutoff:null)||this._defaults.shortYearCutoff,h="string"!=typeof u?u:(new Date).getFullYear()%100+parseInt(u,10),c=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,f=(i?i.dayNames:null)||this._defaults.dayNames,d=(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,s=new RegExp("^\\d{"+r+","+i+"}"),o=n.substring(l).match(s);if(!o)throw"Missing number at position "+l;return l+=o[0].length,parseInt(o[0],10)},w=function(e,i,r){var s=-1,o=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(o,function(t,e){var i=e[1];if(n.substr(l,i.length).toLowerCase()===i.toLowerCase())return s=e[0],l+=i.length,!1}),-1!==s)return s+1;throw"Unknown name at position "+l},k=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)||_("'")?k():b=!1;else switch(e.charAt(r)){case"d":v=x("d");break;case"D":w("D",c,f);break;case"o":y=x("o");break;case"m":m=x("m");break;case"M":m=w("M",d,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"'":_("'")?k():b=!0;break;default:k()}if(l<n.length&&(o=n.substr(l),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===g?g=(new Date).getFullYear():g<100&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(g<=h?0:-100)),y>-1)for(m=1,v=y;;){if(s=this._getDaysInMonth(g,m-1),v<=s)break;m++,v-=s}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,s=(n?n.dayNames:null)||this._defaults.dayNames,o=(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},h=function(t,e,n,i){return l(t)?i[e]:n[e]},c="",f=!1;if(e)for(i=0;i<t.length;i++)if(f)"'"!==t.charAt(i)||l("'")?c+=t.charAt(i):f=!1;else switch(t.charAt(i)){case"d":c+=u("d",e.getDate(),2);break;case"D":c+=h("D",e.getDay(),r,s);break;case"o":c+=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":c+=u("m",e.getMonth()+1,2);break;case"M":c+=h("M",e.getMonth(),o,a);break;case"y":c+=l("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":c+=e.getTime();break;case"!":c+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?c+="'":f=!0;break;default:c+=t.charAt(i)}return c},_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),s=r,o=this._getFormatConfig(t);try{s=this.parseDate(n,i,o)||r}catch(t){i=e?"":i}t.selectedDay=s.getDate(),t.drawMonth=t.selectedMonth=s.getMonth(),t.drawYear=t.selectedYear=s.getFullYear(),t.currentDay=i?s.getDate():0,t.currentMonth=i?s.getMonth():0,t.currentYear=i?s.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=null==n||""===n?i:"string"==typeof n?function(n){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),n,t.datepicker._getFormatConfig(e))}catch(t){}for(var i=(n.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,r=i.getFullYear(),s=i.getMonth(),o=i.getDate(),a=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=a.exec(n);l;){switch(l[2]||"d"){case"d":case"D":o+=parseInt(l[1],10);break;case"w":case"W":o+=7*parseInt(l[1],10);break;case"m":case"M":s+=parseInt(l[1],10),o=Math.min(o,t.datepicker._getDaysInMonth(r,s));break;case"y":case"Y":r+=parseInt(l[1],10),o=Math.min(o,t.datepicker._getDaysInMonth(r,s))}l=a.exec(n)}return new Date(r,s,o)}(n):"number"==typeof n?isNaN(n)?i:function(t){var e=new Date;return e.setDate(e.getDate()+t),e}(n):new Date(n.getTime());return r=r&&"Invalid Date"===r.toString()?i:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_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,s=t.selectedYear,o=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=o.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=o.getMonth(),t.drawYear=t.selectedYear=t.currentYear=o.getFullYear(),r===t.selectedMonth&&s===t.selectedYear||n||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(i?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_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).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,n,i,r,s,o,a,l,u,h,c,f,d,p,g,m,v,y,b,_,x,w,k,C,M,T,D,S,E,I,N,P,A,O,z,H,L,R,F,j=new Date,$=this._daylightSavingAdjust(new Date(j.getFullYear(),j.getMonth(),j.getDate())),W=this._get(t,"isRTL"),q=this._get(t,"showButtonPanel"),B=this._get(t,"hideIfNoPrevNext"),U=this._get(t,"navigationAsDateFormat"),Y=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),K=this._get(t,"stepMonths"),X=1!==Y[0]||1!==Y[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),J=this._getMinMaxDate(t,"min"),Z=this._getMinMaxDate(t,"max"),Q=t.drawMonth-V,tt=t.drawYear;if(Q<0&&(Q+=12,tt--),Z)for(e=this._daylightSavingAdjust(new Date(Z.getFullYear(),Z.getMonth()-Y[0]*Y[1]+1,Z.getDate())),e=J&&e<J?J:e;this._daylightSavingAdjust(new Date(tt,Q,1))>e;)--Q<0&&(Q=11,tt--);for(t.drawMonth=Q,t.drawYear=tt,n=this._get(t,"prevText"),n=U?this.formatDate(n,this._daylightSavingAdjust(new Date(tt,Q-K,1)),this._getFormatConfig(t)):n,i=this._canAdjustMonth(t,-1,tt,Q)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(W?"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-"+(W?"e":"w")+"'>"+n+"</span></a>",r=this._get(t,"nextText"),r=U?this.formatDate(r,this._daylightSavingAdjust(new Date(tt,Q+K,1)),this._getFormatConfig(t)):r,s=this._canAdjustMonth(t,1,tt,Q)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(W?"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-"+(W?"w":"e")+"'>"+r+"</span></a>",o=this._get(t,"currentText"),a=this._get(t,"gotoCurrent")&&t.currentDay?G:$,o=U?this.formatDate(o,a,this._getFormatConfig(t)):o,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=q?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(W?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'>"+o+"</button>":"")+(W?"":l)+"</div>":"",h=parseInt(this._get(t,"firstDay"),10),h=isNaN(h)?0:h,c=this._get(t,"showWeek"),f=this._get(t,"dayNames"),d=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(k="",this.maxRows=4,C=0;C<Y[1];C++){if(M=this._daylightSavingAdjust(new Date(tt,Q,t.selectedDay)),T=" ui-corner-all",D="",X){if(D+="<div class='ui-datepicker-group",Y[1]>1)switch(C){case 0:D+=" ui-datepicker-group-first",T=" ui-corner-"+(W?"right":"left");break;case Y[1]-1:D+=" ui-datepicker-group-last",T=" ui-corner-"+(W?"left":"right");break;default:D+=" ui-datepicker-group-middle",T=""}D+="'>"}for(D+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+T+"'>"+(/all|left/.test(T)&&0===w?W?s:i:"")+(/all|right/.test(T)&&0===w?W?i:s:"")+this._generateMonthYearHeader(t,Q,tt,J,Z,w>0||C>0,p,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",S=c?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",x=0;x<7;x++)E=(x+h)%7,S+="<th scope='col'"+((x+h+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+f[E]+"'>"+d[E]+"</span></th>";for(D+=S+"</tr></thead><tbody>",I=this._getDaysInMonth(tt,Q),tt===t.selectedYear&&Q===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,I)),N=(this._getFirstDayOfMonth(tt,Q)-h+7)%7,P=Math.ceil((N+I)/7),A=X&&this.maxRows>P?this.maxRows:P,this.maxRows=A,O=this._daylightSavingAdjust(new Date(tt,Q,1-N)),z=0;z<A;z++){for(D+="<tr>",H=c?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(O)+"</td>":"",x=0;x<7;x++)L=m?m.apply(t.input?t.input[0]:null,[O]):[!0,""],R=O.getMonth()!==Q,F=R&&!y||!L[0]||J&&O<J||Z&&O>Z,H+="<td class='"+((x+h+6)%7>=5?" ui-datepicker-week-end":"")+(R?" ui-datepicker-other-month":"")+(O.getTime()===M.getTime()&&Q===t.selectedMonth&&t._keyEvent||b.getTime()===O.getTime()&&b.getTime()===M.getTime()?" "+this._dayOverClass:"")+(F?" "+this._unselectableClass+" ui-state-disabled":"")+(R&&!v?"":" "+L[1]+(O.getTime()===G.getTime()?" "+this._currentClass:"")+(O.getTime()===$.getTime()?" ui-datepicker-today":""))+"'"+(R&&!v||!L[2]?"":" title='"+L[2].replace(/'/g,"'")+"'")+(F?"":" data-handler='selectDay' data-event='click' data-month='"+O.getMonth()+"' data-year='"+O.getFullYear()+"'")+">"+(R&&!v?" ":F?"<span class='ui-state-default'>"+O.getDate()+"</span>":"<a class='ui-state-default"+(O.getTime()===$.getTime()?" ui-state-highlight":"")+(O.getTime()===G.getTime()?" ui-state-active":"")+(R?" ui-priority-secondary":"")+"' href='#'>"+O.getDate()+"</a>")+"</td>",O.setDate(O.getDate()+1),O=this._daylightSavingAdjust(O);D+=H+"</tr>"}Q++,Q>11&&(Q=0,tt++),D+="</tbody></table>"+(X?"</div>"+(Y[0]>0&&C===Y[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),k+=D}_+=k}return _+=u,t._keyEvent=!1,_},_generateMonthYearHeader:function(t,e,n,i,r,s,o,a){var l,u,h,c,f,d,p,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),y=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",_="";if(s||!m)_+="<span class='ui-datepicker-month'>"+o[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'>",h=0;h<12;h++)(!l||h>=i.getMonth())&&(!u||h<=r.getMonth())&&(_+="<option value='"+h+"'"+(h===e?" selected='selected'":"")+">"+a[h]+"</option>");_+="</select>"}if(y||(b+=_+(!s&&m&&v?"":" ")),!t.yearshtml)if(t.yearshtml="",s||!v)b+="<span class='ui-datepicker-year'>"+n+"</span>";else{for(c=this._get(t,"yearRange").split(":"),f=(new Date).getFullYear(),d=function(t){var e=t.match(/c[+\-].*/)?n+parseInt(t.substring(1),10):t.match(/[+\-].*/)?f+parseInt(t,10):parseInt(t,10);return isNaN(e)?f:e},p=d(c[0]),g=Math.max(p,d(c[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'>";p<=g;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+=(!s&&m&&v?"":" ")+_),b+="</div>"},_adjustInstDate:function(t,e,n){var i=t.selectedYear+("Y"===n?e:0),r=t.selectedMonth+("M"===n?e:0),s=Math.min(t.selectedDay,this._getDaysInMonth(i,r))+("D"===n?e:0),o=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(i,r,s)));t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.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&&e<n?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),s=this._daylightSavingAdjust(new Date(n,i+(e<0?e:r[0]*r[1]),1));return e<0&&s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth())),this._isInRange(t,s)},_isInRange:function(t,e){var n,i,r=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),o=null,a=null,l=this._get(t,"yearRange");return l&&(n=l.split(":"),i=(new Date).getFullYear(),o=parseInt(n[0],10),a=parseInt(n[1],10),n[0].match(/[+\-].*/)&&(o+=i),n[1].match(/[+\-].*/)&&(a+=i)),(!r||e.getTime()>=r.getTime())&&(!s||e.getTime()<=s.getTime())&&(!o||e.getFullYear()>=o)&&(!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).on("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 i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1";t.datepicker;/*!
|
|
* jQuery UI Dialog 1.12.1
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*/
|
|
t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",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;n<0&&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"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),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().css(this.originalCss).detach(),this.uiDialog.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=this;this._isOpen&&!1!==this._trigger("beforeClose",e)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){n._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(),s=Math.max.apply(null,r);return s>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",s+1),i=!0),i&&!n&&this._trigger("focus",e),i},open:function(){var e=this;if(this._isOpen)return void(this._moveToTop()&&this._focusTabbable());this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),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(),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).trigger("focus")},_keepFocus:function(e){function n(){var e=t.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===e||t.contains(this.uiDialog[0],e)||this._focusTabbable()}e.preventDefault(),n.call(this),this._delay(n)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),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.trigger("focus")}),e.preventDefault()):(this._delay(function(){i.trigger("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>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html(" ")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,n=this.options.buttons;if(this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(n)||t.isArray(n)&&!n.length)return void this._removeClass(this.uiDialog,"ui-dialog-buttons");t.each(n,function(n,i){var r,s;i=t.isFunction(i)?{click:i,text:n}:i,i=t.extend({type:"button"},i),r=i.click,s={icon:i.icon,iconPosition:i.iconPosition,showLabel:i.showLabel,icons:i.icons,text:i.text},delete i.click,delete i.icon,delete i.iconPosition,delete i.showLabel,delete i.icons,"boolean"==typeof i.text&&delete i.text,t("<button></button>",i).button(s).appendTo(e.uiButtonSet).on("click",function(){r.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),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){n._addClass(t(this),"ui-dialog-dragging"),n._blockFrames(),n._trigger("dragStart",i,e(r))},drag:function(t,i){n._trigger("drag",t,e(i))},stop:function(r,s){var o=s.offset.left-n.document.scrollLeft(),a=s.offset.top-n.document.scrollTop();i.position={my:"left top",at:"left"+(o>=0?"+":"")+o+" top"+(a>=0?"+":"")+a,of:n.window},n._removeClass(t(this),"ui-dialog-dragging"),n._unblockFrames(),n._trigger("dragStop",r,e(s))}})},_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,s=this.uiDialog.css("position"),o="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:o,start:function(i,r){n._addClass(t(this),"ui-dialog-resizing"),n._blockFrames(),n._trigger("resizeStart",i,e(r))},resize:function(t,i){n._trigger("resize",t,e(i))},stop:function(r,s){var o=n.uiDialog.offset(),a=o.left-n.document.scrollLeft(),l=o.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},n._removeClass(t(this),"ui-dialog-resizing"),n._unblockFrames(),n._trigger("resizeStop",r,e(s))}}).css("position",s)},_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(e,n){var i,r,s=this.uiDialog;"disabled"!==e&&(this._super(e,n),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&(i=s.is(":data(ui-draggable)"),i&&!n&&s.draggable("destroy"),!i&&n&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(r=s.is(":data(ui-resizable)"),r&&!n&&s.resizable("destroy"),r&&"string"==typeof n&&s.resizable("option","handles",n),r||!1===n||this._makeResizable()),"title"===e&&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||!!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>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),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._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!1!==t.uiBackCompat&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}});t.ui.dialog,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){if(void 0===t)return this.options.value;this.options.value=this._constrainedValue(t),this._refreshValue()},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&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)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_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).width(n.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(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")}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,n=this,i=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{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",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(i).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){n._rendered||n._refreshMenu()})},_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>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},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.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(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._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(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},_renderButtonItem:function(e){var n=t("<span>");return this._setText(n,e.label),this._addClass(n,"ui-selectmenu-text"),n},_renderMenu:function(e,n){var i=this,r="";t.each(n,function(n,s){var o;s.optgroup!==r&&(o=t("<li>",{text:s.optgroup}),i._addClass(o,"ui-selectmenu-optgroup","ui-menu-divider"+(s.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),o.appendTo(e),r=s.optgroup),i._renderItemData(e,s)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,n){var i=t("<li>"),r=t("<div>",{title:n.element.attr("title")});return n.disabled&&this._addClass(i,null,"ui-state-disabled"),this._setText(r,n.label),i.append(r).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html(" ")},_move:function(t,e){var n,i,r=".ui-menu-item";this.isOpen?n=this.menuItems.eq(this.focusIndex).parent("li"):(n=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),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).parent("li")},_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, #"+t.ui.escapeSelector(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).parent("li");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.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),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){if("icons"===t){var n=this.button.find("span.ui-icon");this._removeClass(n,null,this.options.icons.button)._addClass(n,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_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, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;if(!1===t)return void this.button.css("width","");null===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(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var n=this,i=[];e.each(function(e,r){i.push(n._parseOption(t(r),e))}),this.items=i},_parseOption:function(t,e){var n=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:n.attr("label")||"",disabled:n.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},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._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),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"),s=[];for(n=i.values&&i.values.length||1,r.length>n&&(r.slice(n).remove(),r=r.slice(0,n)),e=r.length;e<n;e++)s.push("<span tabindex='0'></span>");this.handles=r.add(t(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(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._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==e.range&&"max"!==e.range||this._addClass(this.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._mouseDestroy()},_mouseCapture:function(e){var n,i,r,s,o,a,l,u=this,h=this.options;return!h.disabled&&(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-u.values(e));(r>n||r===n&&(e===u._lastChangedValue||u.values(e)===h.min))&&(r=n,s=t(this),o=e)}),!1!==this._start(e,o)&&(this._mouseSliding=!0,this._handleIndex=o,this._addClass(s,null,"ui-state-active"),s.trigger("focus"),a=s.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-a.left-s.width()/2,top:e.pageY-a.top-s.height()/2-(parseInt(s.css("borderTopWidth"),10)||0)-(parseInt(s.css("borderBottomWidth"),10)||0)+(parseInt(s.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,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._removeClass(this.handles,null,"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,s;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),i<0&&(i=0),"vertical"===this.orientation&&(i=1-i),r=this._valueMax()-this._valueMin(),s=this._valueMin()+i*r,this._trimAlignValue(s)},_uiHash:function(t,e,n){var i={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(i.value=void 0!==e?e:this.values(t),i.values=n||this.values()),i},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,n){var i,r=this.value(),s=this.values();this._hasMultipleValues()&&(i=this.values(e?0:1),r=this.values(e),2===this.options.values.length&&!0===this.options.range&&(n=0===e?Math.min(i,n):Math.max(i,n)),s[e]=n),n!==r&&!1!==this._trigger("slide",t,this._uiHash(e,n,s))&&(this._hasMultipleValues()?this.values(e,n):this.value(n))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},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,s;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._hasMultipleValues()?this._values(e):this.value();for(i=this.options.values,r=arguments[0],s=0;s<i.length;s+=1)i[s]=this._trimAlignValue(r[s]),this._change(null,s);this._refreshValue()},_setOption:function(e,n){var i,r=0;switch("range"===e&&!0===this.options.range&&("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),this._super(e,n),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(n),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=r-1;i>=0;i--)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}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_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._hasMultipleValues()){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;t=Math.round((t-e)/n)*n+e,t>this.options.max&&(t-=n),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},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,n,i,r,s,o=this.options.range,a=this.options,l=this,u=!this._animateOff&&a.animate,h={};this._hasMultipleValues()?this.handles.each(function(i){n=(l.values(i)-l._valueMin())/(l._valueMax()-l._valueMin())*100,h["horizontal"===l.orientation?"left":"bottom"]=n+"%",t(this).stop(1,1)[u?"animate":"css"](h,a.animate),!0===l.options.range&&("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(),s=this._valueMax(),n=s!==r?(i-r)/(s-r)*100:0,h["horizontal"===this.orientation?"left":"bottom"]=n+"%",this.handle.stop(1,1)[u?"animate":"css"](h,a.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:n+"%"},a.animate),"max"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:100-n+"%"},a.animate),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:n+"%"},a.animate),"max"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:100-n+"%"},a.animate))},_handleEvents:{keydown:function(e){var n,i,r,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,this._addClass(t(e.target),null,"ui-state-active"),!1===this._start(e,s)))return}switch(r=this.options.step,n=i=this._hasMultipleValues()?this.values(s):this.value(),e.keyCode){case t.ui.keyCode.HOME:i=this._valueMin();break;case t.ui.keyCode.END:i=this._valueMax();break;case t.ui.keyCode.PAGE_UP:i=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;i=this._trimAlignValue(n+r);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;i=this._trimAlignValue(n-r)}this._slide(e,s,i)},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),this._removeClass(t(e.target),null,"ui-state-active"))}}});t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},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=this._super(),n=this.element;return t.each(["min","max","step"],function(t,i){var r=n.attr(i);null!=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){if(this.cancelBlur)return void delete this.cancelBlur;this._stop(),this._refresh(),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(){this.element[0]===t.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=i,this._delay(function(){this.previous=i}))}var i;i=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),n.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,n.call(this)}),!1!==this._start(e)&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){if(t(e.currentTarget).hasClass("ui-state-active"))return!1!==this._start(e)&&void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_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},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_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&&!1===this._trigger("spin",e,{value:n})||(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){var n,i,r;if("culture"===t||"numberFormat"===t)return n=this._parse(this.element.val()),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&&(i=this.buttons.first().find(".ui-icon"),this._removeClass(i,null,this.options.icons.up),this._addClass(i,null,e.up),r=this.buttons.last().find(".ui-icon"),this._removeClass(r,null,this.options.icons.down),this._addClass(r,null,e.down)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:a(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&&t===this._adjustValue(t)},_value:function(t,e){var n;""!==t&&null!==(n=this._parse(t))&&(e||(n=this._adjustValue(n)),t=this._format(n)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:a(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:a(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:a(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:a(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){if(!arguments.length)return this._parse(this.element.val());a(this._value).call(this,t)},widget:function(){return this.uiSpinner}}),!1!==t.uiBackCompat&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}});t.ui.spinner;/*!
|
|
* jQuery UI Tabs 1.12.1
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*/
|
|
t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},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;n=e.href.replace(t,""),i=location.href.replace(t,"");try{n=decodeURIComponent(n)}catch(t){}try{i=decodeURIComponent(i)}catch(t){}return e.hash.length>1&&n===i}}(),_create:function(){var e=this,n=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,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()),!1!==this.options.active&&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){if(t(r).attr("aria-controls")===i)return e=n,!1}),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)))&&(e=!n&&0),!n&&!1===e&&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(t.ui.safeActiveElement(this.document[0])).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&&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.trigger("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){for(var i=this.tabs.length-1;-1!==t.inArray(function(){return e>i&&(e=0),e<0&&(e=i),e}(),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).trigger("focus"),t},_setOption:function(t,e){if("active"===t)return void this._activate(e);this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"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(),!1!==e.active&&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._setOptionDisabled(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.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),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().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(n,i){var r,s,o,a=t(i).uniqueId().attr("id"),l=t(i).closest("li"),u=l.attr("aria-controls");e._isLocal(i)?(r=i.hash,o=r.substring(1),s=e.element.find(e._sanitizeSelector(r))):(o=l.attr("aria-controls")||t({}).uniqueId()[0].id,r="#"+o,s=e.element.find(r),s.length||(s=e._createPanel(o),s.insertAfter(e.panels[n-1]||e.tablist)),s.attr("aria-live","polite")),s.length&&(e.panels=e.panels.add(s)),u&&l.data("ui-tabs-aria-controls",u),l.attr({"aria-controls":o,"aria-labelledby":a}),s.attr("aria-labelledby",a)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),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).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var n,i,r;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),r=0;i=this.tabs[r];r++)n=t(i),!0===e||-1!==t.inArray(r,e)?(n.attr("aria-disabled","true"),this._addClass(n,null,"ui-state-disabled")):(n.removeAttr("aria-disabled"),this._removeClass(n,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===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),s=r.closest("li"),o=s[0]===i[0],a=o&&n.collapsible,l=a?t():this._getPanelForTab(s),u=i.length?this._getPanelForTab(i):t(),h={oldTab:i,oldPanel:u,newTab:a?t():s,newPanel:l};e.preventDefault(),s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||o&&!n.collapsible||!1===this._trigger("beforeActivate",e,h)||(n.active=!a&&this.tabs.index(s),this.active=o?t():s,this.xhr&&this.xhr.abort(),u.length||l.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(s),e),this._toggle(e,h))},_toggle:function(e,n){function i(){s.running=!1,s._trigger("activate",e,n)}function r(){s._addClass(n.newTab.closest("li"),"ui-tabs-active","ui-state-active"),o.length&&s.options.show?s._show(o,s.options.show,i):(o.show(),i())}var s=this,o=n.newPanel,a=n.oldPanel;this.running=!0,a.length&&this.options.hide?this._hide(a,this.options.hide,function(){s._removeClass(n.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r()}):(this._removeClass(n.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),a.hide(),r()),a.attr("aria-hidden","true"),n.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),o.length&&a.length?n.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),o.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!1===e?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),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;!1!==n&&(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._setOptionDisabled(n))},disable:function(e){var n=this.options.disabled;if(!0!==n){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._setOptionDisabled(n)}},load:function(e,n){e=this._getIndex(e);var i=this,r=this.tabs.eq(e),s=r.find(".ui-tabs-anchor"),o=this._getPanelForTab(r),a={tab:r,panel:o},l=function(t,e){"abort"===e&&i.panels.stop(!1,!0),i._removeClass(r,"ui-tabs-loading"),o.removeAttr("aria-busy"),t===i.xhr&&delete i.xhr};this._isLocal(s[0])||(this.xhr=t.ajax(this._ajaxSettings(s,n,a)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(r,"ui-tabs-loading"),o.attr("aria-busy","true"),this.xhr.done(function(t,e,r){setTimeout(function(){o.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").replace(/#.*$/,""),beforeSend:function(e,s){return r._trigger("beforeLoad",n,t.extend({jqXHR:e,ajaxSettings:s},i))}}},_getPanelForTab:function(e){var n=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+n))}}),!1!==t.uiBackCompat&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});t.ui.tabs;/*!
|
|
* jQuery UI Tooltip 1.12.1
|
|
* http://jqueryui.com
|
|
*
|
|
* Copyright jQuery Foundation and other contributors
|
|
* Released under the MIT license.
|
|
* http://jquery.org/license
|
|
*/
|
|
t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},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,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.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,n){var i=this;this._super(e,n),"content"===e&&t.each(this.tooltips,function(t,e){i._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_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.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);if(e.is("[title]"))return e.data("ui-tooltip-title",e.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},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,s=e?e.type:null;if("string"==typeof i||i.nodeType||i.jquery)return this._open(e,t,i);(n=i.call(t[0],function(n){r._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=s),this._open(e,t,n))})}))&&this._open(e,t,n)},_open:function(e,n,i){function r(t){u.of=t,o.is(":hidden")||o.position(u)}var s,o,a,l,u=t.extend({},this.options.position);if(i){if(s=this._find(n))return void s.tooltip.find(".ui-tooltip-content").html(i);n.is("[title]")&&(e&&"mouseover"===e.type?n.attr("title",""):n.removeAttr("title")),s=this._tooltip(n),o=s.tooltip,this._addDescribedBy(n,o.attr("id")),o.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),l=t("<div>").html(o.find(".ui-tooltip-content").html()),l.removeAttr("name").find("[name]").removeAttr("name"),l.removeAttr("id").find("[id]").removeAttr("id"),l.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:r}),r(e)):o.position(t.extend({of:n},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(a=this.delayedShow=setInterval(function(){o.is(":visible")&&(r(u.of),clearInterval(a))},t.fx.interval)),this._trigger("open",e,{tooltip:o})}},_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),s=this._find(r);if(!s)return void r.removeData("ui-tooltip-open");n=s.tooltip,s.closing||(clearInterval(this.delayedShow),r.data("ui-tooltip-title")&&!r.attr("title")&&r.attr("title",r.data("ui-tooltip-title")),this._removeDescribedBy(r),s.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]}),s.closing=!0,this._trigger("close",e,{tooltip:n}),s.hiding||(s.closing=!1))},_tooltip:function(e){var n=t("<div>").attr("role","tooltip"),i=t("<div>").appendTo(n),r=n.uniqueId().attr("id");return this._addClass(i,"ui-tooltip-content"),this._addClass(n,"ui-tooltip","ui-widget ui-widget-content"),n.appendTo(this._appendTo(e)),this.tooltips[r]={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")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(n,i){var r=t.Event("blur"),s=i.element;r.target=r.currentTarget=s[0],e.close(r,!0),t("#"+n).remove(),s.data("ui-tooltip-title")&&(s.attr("title")||s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==t.uiBackCompat&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}});var p=(t.ui.tooltip,"ui-effects-animated"),g=t;t.effects={effect:{}},/*!
|
|
* 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
|
|
*/
|
|
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=l(),i=n._rgba=[];return e=e.toLowerCase(),d(a,function(t,r){var s,o=r.re.exec(e),a=o&&r.parse(o),l=r.space||"rgba";if(a)return s=n[l](a),n[u[l].cache]=s[u[l].cache],i=n._rgba=s._rgba,!1}),i.length?("0,0,0,0"===i.join()&&t.extend(i,s.transparent),n):s[e]}function r(t,e,n){return n=(n+1)%1,6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}var s,o=/^([\-+])=\s*(\d+\.?\d*)/,a=[{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]]}}],l=t.Color=function(e,n,i,r){return new t.Color.fn.parse(e,n,i,r)},u={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}},c=l.support={},f=t("<p>")[0],d=t.each;f.style.cssText="background-color:rgba(1,1,1,.5)",c.rgba=f.style.backgroundColor.indexOf("rgba")>-1,d(u,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(e,r,o,a){if(void 0===e)return this._rgba=[null,null,null,null],this;(e.jquery||e.nodeType)&&(e=t(e).css(r),r=void 0);var h=this,c=t.type(e),f=this._rgba=[];/*!
|
|
* 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 void 0!==r&&(e=[e,r,o,a],c="array"),"string"===c?this.parse(i(e)||s._default):"array"===c?(d(u.rgba.props,function(t,i){f[i.idx]=n(e[i.idx],i)}),this):"object"===c?(e instanceof l?d(u,function(t,n){e[n.cache]&&(h[n.cache]=e[n.cache].slice())}):d(u,function(i,r){var s=r.cache;d(r.props,function(t,i){if(!h[s]&&r.to){if("alpha"===t||null==e[t])return;h[s]=r.to(h._rgba)}h[s][i.idx]=n(e[t],i,!0)}),h[s]&&t.inArray(null,h[s].slice(0,3))<0&&(h[s][3]=1,r.from&&(h._rgba=r.from(h[s])))}),this):void 0},is:function(t){var e=l(t),n=!0,i=this;return d(u,function(t,r){var s,o=e[r.cache];return o&&(s=i[r.cache]||r.to&&r.to(i._rgba)||[],d(r.props,function(t,e){if(null!=o[e.idx])return n=o[e.idx]===s[e.idx]})),n}),n},_space:function(){var t=[],e=this;return d(u,function(n,i){e[i.cache]&&t.push(n)}),t.pop()},transition:function(t,e){var i=l(t),r=i._space(),s=u[r],o=0===this.alpha()?l("transparent"):this,a=o[s.cache]||s.to(o._rgba),c=a.slice();return i=i[s.cache],d(s.props,function(t,r){var s=r.idx,o=a[s],l=i[s],u=h[r.type]||{};null!==l&&(null===o?c[s]=l:(u.mod&&(l-o>u.mod/2?o+=u.mod:o-l>u.mod/2&&(o-=u.mod)),c[s]=n((l-o)*e+o,r)))}),this[r](c)},blend:function(e){if(1===this._rgba[3])return this;var n=this._rgba.slice(),i=n.pop(),r=l(e)._rgba;return l(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&&e<3&&(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()}}),l.fn.parse.prototype=l.fn,u.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,s=t[2]/255,o=t[3],a=Math.max(i,r,s),l=Math.min(i,r,s),u=a-l,h=a+l,c=.5*h;return e=l===a?0:i===a?60*(r-s)/u+360:r===a?60*(s-i)/u+120:60*(i-r)/u+240,n=0===u?0:c<=.5?u/h:u/(2-h),[Math.round(e)%360,n,c,null==o?1:o]},u.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],s=t[3],o=i<=.5?i*(1+n):i+n-i*n,a=2*i-o;return[Math.round(255*r(a,o,e+1/3)),Math.round(255*r(a,o,e)),Math.round(255*r(a,o,e-1/3)),s]},d(u,function(e,i){var r=i.props,s=i.cache,a=i.to,u=i.from;l.fn[e]=function(e){if(a&&!this[s]&&(this[s]=a(this._rgba)),void 0===e)return this[s].slice();var i,o=t.type(e),h="array"===o||"object"===o?e:arguments,c=this[s].slice();return d(r,function(t,e){var i=h["object"===o?t:e.idx];null==i&&(i=c[e.idx]),c[e.idx]=n(i,e)}),u?(i=l(u(c)),i[s]=c,i):l(c)},d(r,function(n,i){l.fn[n]||(l.fn[n]=function(r){var s,a=t.type(r),l="alpha"===n?this._hsla?"hsla":"rgba":e,u=this[l](),h=u[i.idx];return"undefined"===a?h:("function"===a&&(r=r.call(this,h),a=t.type(r)),null==r&&i.empty?this:("string"===a&&(s=o.exec(r))&&(r=h+parseFloat(s[2])*("+"===s[1]?1:-1)),u[i.idx]=r,this[l](u)))})})}),l.hook=function(e){var n=e.split(" ");d(n,function(e,n){t.cssHooks[n]={set:function(e,r){var s,o,a="";if("transparent"!==r&&("string"!==t.type(r)||(s=i(r)))){if(r=l(s||r),!c.rgba&&1!==r._rgba[3]){for(o="backgroundColor"===n?e.parentNode:e;(""===a||"transparent"===a)&&o&&o.style;)try{a=t.css(o,"backgroundColor"),o=o.parentNode}catch(t){}r=r.blend(a&&"transparent"!==a?a:"_default")}r=r.toRgbaString()}try{e.style[n]=r}catch(t){}}},t.fx.step[n]=function(e){e.colorInit||(e.start=l(e.elem,n),e.end=l(e.end),e.colorInit=!0),t.cssHooks[n].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),t.cssHooks.borderColor={expand:function(t){var e={};return d(["Top","Right","Bottom","Left"],function(n,i){e["border"+i+"Color"]=t}),e}},s=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"}}(g),function(){function e(e){var n,i,r=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,s={};if(r&&r.length&&r[0]&&r[r[0]])for(i=r.length;i--;)n=r[i],"string"==typeof r[n]&&(s[t.camelCase(n)]=r[n]);else for(n in r)"string"==typeof r[n]&&(s[n]=r[n]);return s}function n(e,n){var i,s,o={};for(i in n)s=n[i],e[i]!==s&&(r[i]||!t.fx.step[i]&&isNaN(parseFloat(s))||(o[i]=s));return o}var i=["add","remove","toggle"],r={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,n){t.fx.step[n]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(g.style(t.elem,n,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(r,s,o,a){var l=t.speed(s,o,a);return this.queue(function(){var s,o=t(this),a=o.attr("class")||"",u=l.children?o.find("*").addBack():o;u=u.map(function(){return{el:t(this),start:e(this)}}),s=function(){t.each(i,function(t,e){r[e]&&o[e+"Class"](r[e])})},s(),u=u.map(function(){return this.end=e(this.el[0]),this.diff=n(this.start,this.end),this}),o.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(){s(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(o[0])})})},t.fn.extend({addClass:function(e){return function(n,i,r,s){return i?t.effects.animateClass.call(this,{add:n},i,r,s):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(n,i,r,s){return arguments.length>1?t.effects.animateClass.call(this,{remove:n},i,r,s):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(n,i,r,s,o){return"boolean"==typeof i||void 0===i?r?t.effects.animateClass.call(this,i?{add:n}:{remove:n},r,s,o):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:n},i,r,s)}}(t.fn.toggleClass),switchClass:function(e,n,i,r,s){return t.effects.animateClass.call(this,{add:n,remove:e},i,r,s)}})}(),function(){function e(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 n(e){return!(e&&"number"!=typeof e&&!t.fx.speeds[e])||("string"==typeof e&&!t.effects.effect[e]||(!!t.isFunction(e)||"object"==typeof e&&!e.effect))}function i(t,e){var n=e.outerWidth(),i=e.outerHeight(),r=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,s=r.exec(t)||["",0,n,i,0];return{top:parseFloat(s[1])||0,right:"auto"===s[2]?n:parseFloat(s[2]),bottom:"auto"===s[3]?i:parseFloat(s[3]),left:parseFloat(s[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(n){return!!t(n).data(p)||e(n)}}(t.expr.filters.animated)),!1!==t.uiBackCompat&&t.extend(t.effects,{save:function(t,e){for(var n=0,i=e.length;n<i;n++)null!==e[n]&&t.data("ui-effects-"+e[n],t[0].style[e[n]])},restore:function(t,e){for(var n,i=0,r=e.length;i<r;i++)null!==e[i]&&(n=t.data("ui-effects-"+e[i]),t.css(e[i],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},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()},s=document.activeElement;try{s.id}catch(t){s=document.body}return e.wrap(i),(e[0]===s||t.contains(e[0],s))&&t(s).trigger("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).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,n,i){return i||(i=n,n="effect"),t.effects.effect[e]=i,t.effects.effect[e].mode=n,i},scaledDimensions:function(t,e,n){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var i="horizontal"!==n?(e||100)/100:1,r="vertical"!==n?(e||100)/100:1;return{height:t.height()*r,width:t.width()*i,outerHeight:t.outerHeight()*r,outerWidth:t.outerWidth()*i}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,n){var i=t.queue();e>1&&i.splice.apply(i,[1,0].concat(i.splice(e,n))),t.dequeue()},saveStyle:function(t){t.data("ui-effects-style",t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data("ui-effects-style")||"",t.removeData("ui-effects-style")},mode:function(t,e){var n=t.is(":hidden");return"toggle"===e&&(e=n?"show":"hide"),(n?"hide"===e:"show"===e)&&(e="none"),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}},createPlaceholder:function(e){var n,i=e.css("position"),r=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(i)&&(i="absolute",n=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data("ui-effects-placeholder",n)),e.css({position:i,left:r.left,top:r.top}),n},removePlaceholder:function(t){var e="ui-effects-placeholder",n=t.data(e);n&&(n.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,n,i,r){return r=r||{},t.each(n,function(t,n){var s=e.cssUnit(n);s[0]>0&&(r[n]=s[0]*i+s[1])}),r}}),t.fn.extend({effect:function(){function n(e){function n(){a.removeData(p),t.effects.cleanUp(a),"hide"===i.mode&&a.hide(),o()}function o(){t.isFunction(l)&&l.call(a[0]),t.isFunction(e)&&e()}var a=t(this);i.mode=h.shift(),!1===t.uiBackCompat||s?"none"===i.mode?(a[u](),o()):r.call(a[0],i,n):(a.is(":hidden")?"hide"===u:"show"===u)?(a[u](),o()):r.call(a[0],i,o)}var i=e.apply(this,arguments),r=t.effects.effect[i.effect],s=r.mode,o=i.queue,a=o||"fx",l=i.complete,u=i.mode,h=[],c=function(e){var n=t(this),i=t.effects.mode(n,u)||s;n.data(p,!0),h.push(i),s&&("show"===i||i===s&&"hide"===i)&&n.show(),s&&"none"===i||t.effects.saveStyle(n),t.isFunction(e)&&e()};return t.fx.off||!r?u?this[u](i.duration,l):this.each(function(){l&&l.call(this)}):!1===o?this.each(c).each(n):this.queue(a,c).queue(a,n)},show:function(t){return function(i){if(n(i))return t.apply(this,arguments);var r=e.apply(this,arguments);return r.mode="show",this.effect.call(this,r)}}(t.fn.show),hide:function(t){return function(i){if(n(i))return t.apply(this,arguments);var r=e.apply(this,arguments);return r.mode="hide",this.effect.call(this,r)}}(t.fn.hide),toggle:function(t){return function(i){if(n(i)||"boolean"==typeof i)return t.apply(this,arguments);var r=e.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},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):i(this.css("clip"),this)},transfer:function(e,n){var i=t(this),r=t(e.to),s="fixed"===r.css("position"),o=t("body"),a=s?o.scrollTop():0,l=s?o.scrollLeft():0,u=r.offset(),h={top:u.top-a,left:u.left-l,height:r.innerHeight(),width:r.innerWidth()},c=i.offset(),f=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:c.top-a,left:c.left-l,height:i.innerHeight(),width:i.innerWidth(),position:s?"fixed":"absolute"}).animate(h,e.duration,e.easing,function(){f.remove(),t.isFunction(n)&&n()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=i(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),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 t<.5?n(2*t)/2:1-n(-2*t+2)/2}})}();t.effects,t.effects.define("blind","hide",function(e,n){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},r=t(this),s=e.direction||"up",o=r.cssClip(),a={clip:t.extend({},o)},l=t.effects.createPlaceholder(r);a.clip[i[s][0]]=a.clip[i[s][1]],"show"===e.mode&&(r.cssClip(a.clip),l&&l.css(t.effects.clipToBox(a)),a.clip=o),l&&l.animate(t.effects.clipToBox(a),e.duration,e.easing),r.animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:n})}),t.effects.define("bounce",function(e,n){var i,r,s,o=t(this),a=e.mode,l="hide"===a,u="show"===a,h=e.direction||"up",c=e.distance,f=e.times||5,d=2*f+(u||l?1:0),p=e.duration/d,g=e.easing,m="up"===h||"down"===h?"top":"left",v="up"===h||"left"===h,y=0,b=o.queue().length;for(t.effects.createPlaceholder(o),s=o.css(m),c||(c=o["top"===m?"outerHeight":"outerWidth"]()/3),u&&(r={opacity:1},r[m]=s,o.css("opacity",0).css(m,v?2*-c:2*c).animate(r,p,g)),l&&(c/=Math.pow(2,f-1)),r={},r[m]=s;y<f;y++)i={},i[m]=(v?"-=":"+=")+c,o.animate(i,p,g).animate(r,p,g),c=l?2*c:c/2;l&&(i={opacity:0},i[m]=(v?"-=":"+=")+c,o.animate(i,p,g)),o.queue(n),t.effects.unshift(o,b,d+1)}),t.effects.define("clip","hide",function(e,n){var i,r={},s=t(this),o=e.direction||"vertical",a="both"===o,l=a||"horizontal"===o,u=a||"vertical"===o;i=s.cssClip(),r.clip={top:u?(i.bottom-i.top)/2:i.top,right:l?(i.right-i.left)/2:i.right,bottom:u?(i.bottom-i.top)/2:i.bottom,left:l?(i.right-i.left)/2:i.left},t.effects.createPlaceholder(s),"show"===e.mode&&(s.cssClip(r.clip),r.clip=i),s.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:n})}),t.effects.define("drop","hide",function(e,n){var i,r=t(this),s=e.mode,o="show"===s,a=e.direction||"left",l="up"===a||"down"===a?"top":"left",u="up"===a||"left"===a?"-=":"+=",h="+="===u?"-=":"+=",c={opacity:0};t.effects.createPlaceholder(r),i=e.distance||r["top"===l?"outerHeight":"outerWidth"](!0)/2,c[l]=u+i,o&&(r.css(c),c[l]=h+i,c.opacity=1),r.animate(c,{queue:!1,duration:e.duration,easing:e.easing,complete:n})}),t.effects.define("explode","hide",function(e,n){function i(){b.push(this),b.length===c*f&&r()}function r(){d.css({visibility:"visible"}),t(b).remove(),n()}var s,o,a,l,u,h,c=e.pieces?Math.round(Math.sqrt(e.pieces)):3,f=c,d=t(this),p=e.mode,g="show"===p,m=d.show().css("visibility","hidden").offset(),v=Math.ceil(d.outerWidth()/f),y=Math.ceil(d.outerHeight()/c),b=[];for(s=0;s<c;s++)for(l=m.top+s*y,h=s-(c-1)/2,o=0;o<f;o++)a=m.left+o*v,u=o-(f-1)/2,d.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*v,top:-s*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:a+(g?u*v:0),top:l+(g?h*y:0),opacity:g?0:1}).animate({left:a+(g?0:u*v),top:l+(g?0:h*y),opacity:g?1:0},e.duration||500,e.easing,i)}),t.effects.define("fade","toggle",function(e,n){var i="show"===e.mode;t(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:n})}),t.effects.define("fold","hide",function(e,n){var i=t(this),r=e.mode,s="show"===r,o="hide"===r,a=e.size||15,l=/([0-9]+)%/.exec(a),u=!!e.horizFirst,h=u?["right","bottom"]:["bottom","right"],c=e.duration/2,f=t.effects.createPlaceholder(i),d=i.cssClip(),p={clip:t.extend({},d)},g={clip:t.extend({},d)},m=[d[h[0]],d[h[1]]],v=i.queue().length;l&&(a=parseInt(l[1],10)/100*m[o?0:1]),p.clip[h[0]]=a,g.clip[h[0]]=a,g.clip[h[1]]=0,s&&(i.cssClip(g.clip),f&&f.css(t.effects.clipToBox(g)),g.clip=d),i.queue(function(n){f&&f.animate(t.effects.clipToBox(p),c,e.easing).animate(t.effects.clipToBox(g),c,e.easing),n()}).animate(p,c,e.easing).animate(g,c,e.easing).queue(n),t.effects.unshift(i,v,4)}),t.effects.define("highlight","show",function(e,n){var i=t(this),r={backgroundColor:i.css("backgroundColor")};"hide"===e.mode&&(r.opacity=0),t.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:n})}),t.effects.define("size",function(e,n){var i,r,s,o=t(this),a=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],u=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],h=e.mode,c="effect"!==h,f=e.scale||"both",d=e.origin||["middle","center"],p=o.css("position"),g=o.position(),m=t.effects.scaledDimensions(o),v=e.from||m,y=e.to||t.effects.scaledDimensions(o,0);t.effects.createPlaceholder(o),"show"===h&&(s=v,v=y,y=s),r={from:{y:v.height/m.height,x:v.width/m.width},to:{y:y.height/m.height,x:y.width/m.width}},"box"!==f&&"both"!==f||(r.from.y!==r.to.y&&(v=t.effects.setTransition(o,l,r.from.y,v),y=t.effects.setTransition(o,l,r.to.y,y)),r.from.x!==r.to.x&&(v=t.effects.setTransition(o,u,r.from.x,v),y=t.effects.setTransition(o,u,r.to.x,y))),"content"!==f&&"both"!==f||r.from.y!==r.to.y&&(v=t.effects.setTransition(o,a,r.from.y,v),y=t.effects.setTransition(o,a,r.to.y,y)),d&&(i=t.effects.getBaseline(d,m),v.top=(m.outerHeight-v.outerHeight)*i.y+g.top,v.left=(m.outerWidth-v.outerWidth)*i.x+g.left,y.top=(m.outerHeight-y.outerHeight)*i.y+g.top,y.left=(m.outerWidth-y.outerWidth)*i.x+g.left),o.css(v),"content"!==f&&"both"!==f||(l=l.concat(["marginTop","marginBottom"]).concat(a),u=u.concat(["marginLeft","marginRight"]),o.find("*[width]").each(function(){var n=t(this),i=t.effects.scaledDimensions(n),s={height:i.height*r.from.y,width:i.width*r.from.x,outerHeight:i.outerHeight*r.from.y,outerWidth:i.outerWidth*r.from.x},o={height:i.height*r.to.y,width:i.width*r.to.x,outerHeight:i.height*r.to.y,outerWidth:i.width*r.to.x};r.from.y!==r.to.y&&(s=t.effects.setTransition(n,l,r.from.y,s),o=t.effects.setTransition(n,l,r.to.y,o)),r.from.x!==r.to.x&&(s=t.effects.setTransition(n,u,r.from.x,s),o=t.effects.setTransition(n,u,r.to.x,o)),c&&t.effects.saveStyle(n),n.css(s),n.animate(o,e.duration,e.easing,function(){c&&t.effects.restoreStyle(n)})})),o.animate(y,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=o.offset();0===y.opacity&&o.css("opacity",v.opacity),c||(o.css("position","static"===p?"relative":p).offset(e),t.effects.saveStyle(o)),n()}})}),t.effects.define("scale",function(e,n){var i=t(this),r=e.mode,s=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==r?0:100),o=t.extend(!0,{from:t.effects.scaledDimensions(i),to:t.effects.scaledDimensions(i,s,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(o.from.opacity=1,o.to.opacity=0),t.effects.effect.size.call(this,o,n)}),t.effects.define("puff","hide",function(e,n){var i=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,i,n)}),t.effects.define("pulsate","show",function(e,n){var i=t(this),r=e.mode,s="show"===r,o="hide"===r,a=s||o,l=2*(e.times||5)+(a?1:0),u=e.duration/l,h=0,c=1,f=i.queue().length;for(!s&&i.is(":visible")||(i.css("opacity",0).show(),h=1);c<l;c++)i.animate({opacity:h},u,e.easing),h=1-h;i.animate({opacity:h},u,e.easing),i.queue(n),t.effects.unshift(i,f,l+1)}),t.effects.define("shake",function(e,n){var i=1,r=t(this),s=e.direction||"left",o=e.distance||20,a=e.times||3,l=2*a+1,u=Math.round(e.duration/l),h="up"===s||"down"===s?"top":"left",c="up"===s||"left"===s,f={},d={},p={},g=r.queue().length;for(t.effects.createPlaceholder(r),f[h]=(c?"-=":"+=")+o,d[h]=(c?"+=":"-=")+2*o,p[h]=(c?"-=":"+=")+2*o,r.animate(f,u,e.easing);i<a;i++)r.animate(d,u,e.easing).animate(p,u,e.easing);r.animate(d,u,e.easing).animate(f,u/2,e.easing).queue(n),t.effects.unshift(r,g,l+1)}),t.effects.define("slide","show",function(e,n){var i,r,s=t(this),o={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=e.mode,l=e.direction||"left",u="up"===l||"down"===l?"top":"left",h="up"===l||"left"===l,c=e.distance||s["top"===u?"outerHeight":"outerWidth"](!0),f={};t.effects.createPlaceholder(s),i=s.cssClip(),r=s.position()[u],f[u]=(h?-1:1)*c+r,f.clip=s.cssClip(),f.clip[o[l][1]]=f.clip[o[l][0]],"show"===a&&(s.cssClip(f.clip),s.css(u,f[u]),f.clip=i,f[u]=r),s.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:n})});!1!==t.uiBackCompat&&t.effects.define("transfer",function(e,n){t(this).transfer(e,n)})})},function(t,e,n){var i,r;!function(){function s(t){return t&&(t.ownerDocument||t.document||t).documentElement}function o(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function a(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function l(t){return null===t?NaN:+t}function u(t){return!isNaN(t)}function h(t){return{left:function(e,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=e.length);i<r;){var s=i+r>>>1;t(e[s],n)<0?i=s+1:r=s}return i},right:function(e,n,i,r){for(arguments.length<3&&(i=0),arguments.length<4&&(r=e.length);i<r;){var s=i+r>>>1;t(e[s],n)>0?r=s:i=s+1}return i}}}function c(t){return t.length}function f(t){for(var e=1;t*e%1;)e*=10;return e}function d(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function p(){this._=Object.create(null)}function g(t){return(t+="")===Co||t[0]===Mo?Mo+t:t}function m(t){return(t+="")[0]===Mo?t.slice(1):t}function v(t){return g(t)in this._}function y(t){return(t=g(t))in this._&&delete this._[t]}function b(){var t=[];for(var e in this._)t.push(m(e));return t}function _(){var t=0;for(var e in this._)++t;return t}function x(){for(var t in this._)return!1;return!0}function w(){this._=Object.create(null)}function k(t){return t}function C(t,e,n){return function(){var i=n.apply(e,arguments);return i===e?t:i}}function M(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,i=To.length;n<i;++n){var r=To[n]+e;if(r in t)return r}}function T(){}function D(){}function S(t){function e(){for(var e,i=n,r=-1,s=i.length;++r<s;)(e=i[r].on)&&e.apply(this,arguments);return t}var n=[],i=new p;return e.on=function(e,r){var s,o=i.get(e);return arguments.length<2?o&&o.on:(o&&(o.on=null,n=n.slice(0,s=n.indexOf(o)).concat(n.slice(s+1)),i.remove(e)),r&&n.push(i.set(e,{on:r})),t)},e}function E(){fo.event.preventDefault()}function I(){for(var t,e=fo.event;t=e.sourceEvent;)e=t;return e}function N(t){for(var e=new D,n=0,i=arguments.length;++n<i;)e[arguments[n]]=S(e);return e.of=function(n,i){return function(r){try{var s=r.sourceEvent=fo.event;r.target=t,fo.event=r,e[r.type].apply(n,i)}finally{fo.event=s}}},e}function P(t){return So(t,Po),t}function A(t){return"function"==typeof t?t:function(){return Eo(t,this)}}function O(t){return"function"==typeof t?t:function(){return Io(t,this)}}function z(t,e){function n(){this.removeAttribute(t)}function i(){this.removeAttributeNS(t.space,t.local)}function r(){this.setAttribute(t,e)}function s(){this.setAttributeNS(t.space,t.local,e)}function o(){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=fo.ns.qualify(t),null==e?t.local?i:n:"function"==typeof e?t.local?a:o:t.local?s:r}function H(t){return t.trim().replace(/\s+/g," ")}function L(t){return new RegExp("(?:^|\\s+)"+fo.requote(t)+"(?:\\s+|$)","g")}function R(t){return(t+"").trim().split(/^|\s+/)}function F(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=R(t).map(j);var r=t.length;return"function"==typeof e?i:n}function j(t){var e=L(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",H(r+" "+t))):n.setAttribute("class",H(r.replace(e," ")))}}function $(t,e,n){function i(){this.style.removeProperty(t)}function r(){this.style.setProperty(t,e,n)}function s(){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?s:r}function W(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 q(t){function e(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ao&&e.documentElement.namespaceURI===Ao?e.createElement(t):e.createElementNS(n,t)}function n(){return this.ownerDocument.createElementNS(t.space,t.local)}return"function"==typeof t?t:(t=fo.ns.qualify(t)).local?n:e}function B(){var t=this.parentNode;t&&t.removeChild(this)}function U(t){return{__data__:t}}function Y(t){return function(){return No(this,t)}}function V(t){return arguments.length||(t=a),function(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}}function K(t,e){for(var n=0,i=t.length;n<i;n++)for(var r,s=t[n],o=0,a=s.length;o<a;o++)(r=s[o])&&e(r,o,n);return t}function X(t){return So(t,zo),t}function G(t){var e,n;return function(i,r,s){var o,a=t[s].update,l=a.length;for(s!=n&&(n=s,e=0),r>=e&&(e=r+1);!(o=a[e])&&++e<l;);return o}}function J(t,e,n){function i(){var e=this[o];e&&(this.removeEventListener(t,e,e.$),delete this[o])}function r(){var r=l(e,go(arguments));i.call(this),this.addEventListener(t,this[o]=r,r.$=n),r._=e}function s(){var e,n=new RegExp("^__on([^.]+)"+fo.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 o="__on"+t,a=t.indexOf("."),l=Z;a>0&&(t=t.slice(0,a));var u=Ho.get(t);return u&&(t=u,l=Q),a?e?r:i:e?T:s}function Z(t,e){return function(n){var i=fo.event;fo.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{fo.event=i}}}function Q(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 tt(t){var e=".dragsuppress-"+ ++Ro,n="click"+e,i=fo.select(o(t)).on("touchmove"+e,E).on("dragstart"+e,E).on("selectstart"+e,E);if(null==Lo&&(Lo=!("onselectstart"in t)&&M(t.style,"userSelect")),Lo){var r=s(t).style,a=r[Lo];r[Lo]="none"}return function(t){if(i.on(e,null),Lo&&(r[Lo]=a),t){var s=function(){i.on(n,null)};i.on(n,function(){E(),s()},!0),setTimeout(s,0)}}}function et(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();if(Fo<0){var r=o(t);if(r.scrollX||r.scrollY){n=fo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var s=n[0][0].getScreenCTM();Fo=!(s.f||s.e),n.remove()}}return Fo?(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 a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}function nt(){return fo.event.changedTouches[0].identifier}function it(t){return t>0?1:t<0?-1:0}function rt(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function st(t){return t>1?0:t<-1?Wo:Math.acos(t)}function ot(t){return t>1?Uo:t<-1?-Uo:Math.asin(t)}function at(t){return((t=Math.exp(t))-1/t)/2}function lt(t){return((t=Math.exp(t))+1/t)/2}function ut(t){return((t=Math.exp(2*t))-1)/(t+1)}function ht(t){return(t=Math.sin(t/2))*t}function ct(){}function ft(t,e,n){return this instanceof ft?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof ft?new ft(t.h,t.s,t.l):Tt(""+t,Dt,ft):new ft(t,e,n)}function dt(t,e,n){function i(t){return t>360?t-=360:t<0&&(t+=360),t<60?s+(o-s)*t/60:t<180?o:t<240?s+(o-s)*(240-t)/60:s}function r(t){return Math.round(255*i(t))}var s,o;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,n=n<0?0:n>1?1:n,o=n<=.5?n*(1+e):n+e-n*e,s=2*n-o,new wt(r(t+120),r(t),r(t-120))}function pt(t,e,n){return this instanceof pt?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof pt?new pt(t.h,t.c,t.l):t instanceof mt?yt(t.l,t.a,t.b):yt((t=St((t=fo.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new pt(t,e,n)}function gt(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new mt(n,Math.cos(t*=Yo)*e,Math.sin(t)*e)}function mt(t,e,n){return this instanceof mt?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof mt?new mt(t.l,t.a,t.b):t instanceof pt?gt(t.h,t.c,t.l):St((t=wt(t)).r,t.g,t.b):new mt(t,e,n)}function vt(t,e,n){var i=(t+16)/116,r=i+e/500,s=i-n/200;return r=bt(r)*ea,i=bt(i)*na,s=bt(s)*ia,new wt(xt(3.2404542*r-1.5371385*i-.4985314*s),xt(-.969266*r+1.8760108*i+.041556*s),xt(.0556434*r-.2040259*i+1.0572252*s))}function yt(t,e,n){return t>0?new pt(Math.atan2(n,e)*Vo,Math.sqrt(e*e+n*n),t):new pt(NaN,NaN,t)}function bt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function _t(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function xt(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function wt(t,e,n){return this instanceof wt?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof wt?new wt(t.r,t.g,t.b):Tt(""+t,wt,dt):new wt(t,e,n)}function kt(t){return new wt(t>>16,t>>8&255,255&t)}function Ct(t){return kt(t)+""}function Mt(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function Tt(t,e,n){var i,r,s,o=0,a=0,l=0;if(i=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))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(It(r[0]),It(r[1]),It(r[2]))}return(s=oa.get(t))?e(s.r,s.g,s.b):(null==t||"#"!==t.charAt(0)||isNaN(s=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&s)>>4,o|=o>>4,a=240&s,a|=a>>4,l=15&s,l|=l<<4):7===t.length&&(o=(16711680&s)>>16,a=(65280&s)>>8,l=255&s)),e(o,a,l))}function Dt(t,e,n){var i,r,s=Math.min(t/=255,e/=255,n/=255),o=Math.max(t,e,n),a=o-s,l=(o+s)/2;return a?(r=l<.5?a/(o+s):a/(2-o-s),i=t==o?(e-n)/a+(e<n?6:0):e==o?(n-t)/a+2:(t-e)/a+4,i*=60):(i=NaN,r=l>0&&l<1?0:i),new ft(i,r,l)}function St(t,e,n){t=Et(t),e=Et(e),n=Et(n);var i=_t((.4124564*t+.3575761*e+.1804375*n)/ea),r=_t((.2126729*t+.7151522*e+.072175*n)/na);return mt(116*r-16,500*(i-r),200*(r-_t((.0193339*t+.119192*e+.9503041*n)/ia)))}function Et(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function It(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function Nt(t){return"function"==typeof t?t:function(){return t}}function Pt(t){return function(e,n,i){return 2===arguments.length&&"function"==typeof n&&(i=n,n=null),At(e,n,t,i)}}function At(t,e,n,i){function r(){var t,e=l.status;if(!e&&zt(l)||e>=200&&e<300||304===e){try{t=n.call(s,l)}catch(t){return void o.error.call(s,t)}o.load.call(s,t)}else o.error.call(s,l)}var s={},o=fo.dispatch("beforesend","progress","load","error"),a={},l=new XMLHttpRequest,u=null;return!this.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=fo.event;fo.event=t;try{o.progress.call(s,l)}finally{fo.event=e}},s.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?a[t]:(null==e?delete a[t]:a[t]=e+"",s)},s.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",s):e},s.responseType=function(t){return arguments.length?(u=t,s):u},s.response=function(t){return n=t,s},["get","post"].forEach(function(t){s[t]=function(){return s.send.apply(s,[t].concat(go(arguments)))}}),s.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 h in a)l.setRequestHeader(h,a[h]);return null!=e&&l.overrideMimeType&&l.overrideMimeType(e),null!=u&&(l.responseType=u),null!=r&&s.on("error",r).on("load",function(t){r(null,t)}),o.beforesend.call(s,l),l.send(null==i?null:i),s},s.abort=function(){return l.abort(),s},fo.rebind(s,o,"on"),null==i?s:s.get(Ot(i))}function Ot(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}function zt(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function Ht(t,e,n){var i=arguments.length;i<2&&(e=0),i<3&&(n=Date.now());var r=n+e,s={c:t,t:r,n:null};return la?la.n=s:aa=s,la=s,ua||(ha=clearTimeout(ha),ua=1,ca(Lt)),s}function Lt(){var t=Rt(),e=Ft()-t;e>24?(isFinite(e)&&(clearTimeout(ha),ha=setTimeout(Lt,e)),ua=0):(ua=1,ca(Lt))}function Rt(){for(var t=Date.now(),e=aa;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Ft(){for(var t,e=aa,n=1/0;e;)e.c?(e.t<n&&(n=e.t),e=(t=e).n):e=t?t.n=e.n:aa=e.n;return la=t,n}function jt(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}function $t(t,e){var n=Math.pow(10,3*ko(8-e));return{scale:e>8?function(t){return t/n}:function(t){return t*n},symbol:t}}function Wt(t){var e=t.decimal,n=t.thousands,i=t.grouping,r=t.currency,s=i&&n?function(t,e){for(var r=t.length,s=[],o=0,a=i[0],l=0;r>0&&a>0&&(l+a+1>e&&(a=Math.max(1,e-l)),s.push(t.substring(r-=a,r+a)),!((l+=a+1)>e));)a=i[o=(o+1)%i.length];return s.reverse().join(n)}:k;return function(t){var n=da.exec(t),i=n[1]||" ",o=n[2]||">",a=n[3]||"-",l=n[4]||"",u=n[5],h=+n[6],c=n[7],f=n[8],d=n[9],p=1,g="",m="",v=!1,y=!0;switch(f&&(f=+f.substring(1)),(u||"0"===i&&"="===o)&&(u=i="0",o="="),d){case"n":c=!0,d="g";break;case"%":p=100,m="%",d="f";break;case"p":p=100,m="%",d="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+d.toLowerCase());case"c":y=!1;case"d":v=!0,f=0;break;case"s":p=-1,d="r"}"$"===l&&(g=r[0],m=r[1]),"r"!=d||f||(d="g"),null!=f&&("g"==d?f=Math.max(1,Math.min(21,f)):"e"!=d&&"f"!=d||(f=Math.max(0,Math.min(20,f)))),d=pa.get(d)||qt;var b=u&&c;return function(t){var n=m;if(v&&t%1)return"";var r=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===a?"":a;if(p<0){var l=fo.formatPrefix(t,f);t=l.scale(t),n=l.symbol+m}else t*=p;t=d(t,f);var _,x,w=t.lastIndexOf(".");if(w<0){var k=y?t.lastIndexOf("e"):-1;k<0?(_=t,x=""):(_=t.substring(0,k),x=t.substring(k))}else _=t.substring(0,w),x=e+t.substring(w+1);!u&&c&&(_=s(_,1/0));var C=g.length+_.length+x.length+(b?0:r.length),M=C<h?new Array(C=h-C+1).join(i):"";return b&&(_=s(M+_,M.length?h-x.length:1/0)),r+=g,t=_+x,("<"===o?r+t+M:">"===o?M+r+t:"^"===o?M.substring(0,C>>=1)+r+t+M.substring(C):r+(b?t:M+t))+n}}}function qt(t){return t+""}function Bt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ut(t,e,n){function i(e){var n=t(e),i=s(n,1);return e-n<i-e?n:i}function r(n){return e(n=t(new ma(n-1)),1),n}function s(t,n){return e(t=new ma(+t),n),t}function o(t,i,s){var o=r(t),a=[];if(s>1)for(;o<i;)n(o)%s||a.push(new Date(+o)),e(o,1);else for(;o<i;)a.push(new Date(+o)),e(o,1);return a}function a(t,e,n){try{ma=Bt;var i=new Bt;return i._=t,o(i,e,n)}finally{ma=Date}}t.floor=t,t.round=i,t.ceil=r,t.offset=s,t.range=o;var l=t.utc=Yt(t);return l.floor=l,l.round=Yt(i),l.ceil=Yt(r),l.offset=Yt(s),l.range=a,t}function Yt(t){return function(e,n){try{ma=Bt;var i=new Bt;return i._=e,t(i,n)._}finally{ma=Date}}}function Vt(t){function e(t){function e(e){for(var n,r,s,o=[],a=-1,l=0;++a<i;)37===t.charCodeAt(a)&&(o.push(t.slice(l,a)),null!=(r=ya[n=t.charAt(++a)])&&(n=t.charAt(++a)),(s=S[n])&&(n=s(e,null==r?"e"===n?" ":"0":r)),o.push(n),l=a+1);return o.push(t.slice(l,a)),o.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};if(n(i,t,e,0)!=e.length)return null;"p"in i&&(i.H=i.H%12+12*i.p);var r=null!=i.Z&&ma!==Bt,s=new(r?Bt:ma);return"j"in i?s.setFullYear(i.y,0,i.j):"W"in i||"U"in i?("w"in i||(i.w="W"in i?1:0),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+(i.Z/100|0),i.M+i.Z%100,i.S,i.L),r?s._:s},e.toString=function(){return t},e}function n(t,e,n,i){for(var r,s,o,a=0,l=e.length,u=n.length;a<l;){if(i>=u)return-1;if(37===(r=e.charCodeAt(a++))){if(o=e.charAt(a++),!(s=E[o in ya?e.charAt(a++):o])||(i=s(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.slice(n));return i?(t.w=k.get(i[0].toLowerCase()),n+i[0].length):-1}function r(t,e,n){_.lastIndex=0;var i=_.exec(e.slice(n));return i?(t.w=x.get(i[0].toLowerCase()),n+i[0].length):-1}function s(t,e,n){T.lastIndex=0;var i=T.exec(e.slice(n));return i?(t.m=D.get(i[0].toLowerCase()),n+i[0].length):-1}function o(t,e,n){C.lastIndex=0;var i=C.exec(e.slice(n));return i?(t.m=M.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 h(t,e,n){var i=b.get(e.slice(n,n+=2).toLowerCase());return null==i?-1:(t.p=i,n)}var c=t.dateTime,f=t.date,d=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{ma=Bt;var e=new ma;return e._=t,i(e)}finally{ma=Date}}var i=e(t);return n.parse=function(t){try{ma=Bt;var e=i.parse(t);return e&&e._}finally{ma=Date}},n.toString=i.toString,n},e.multi=e.utc.multi=de;var b=fo.map(),_=Xt(g),x=Gt(g),w=Xt(m),k=Gt(m),C=Xt(v),M=Gt(v),T=Xt(y),D=Gt(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(c),d:function(t,e){return Kt(t.getDate(),e,2)},e:function(t,e){return Kt(t.getDate(),e,2)},H:function(t,e){return Kt(t.getHours(),e,2)},I:function(t,e){return Kt(t.getHours()%12||12,e,2)},j:function(t,e){return Kt(1+ga.dayOfYear(t),e,3)},L:function(t,e){return Kt(t.getMilliseconds(),e,3)},m:function(t,e){return Kt(t.getMonth()+1,e,2)},M:function(t,e){return Kt(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return Kt(t.getSeconds(),e,2)},U:function(t,e){return Kt(ga.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Kt(ga.mondayOfYear(t),e,2)},x:e(f),X:e(d),y:function(t,e){return Kt(t.getFullYear()%100,e,2)},Y:function(t,e){return Kt(t.getFullYear()%1e4,e,4)},Z:ce,"%":function(){return"%"}},E={a:i,A:r,b:s,B:o,c:a,d:se,e:se,H:ae,I:ae,j:oe,L:he,m:re,M:le,p:h,S:ue,U:Zt,w:Jt,W:Qt,x:l,X:u,y:ee,Y:te,Z:ne,"%":fe};return e}function Kt(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",s=r.length;return i+(s<n?new Array(n-s+1).join(e)+r:r)}function Xt(t){return new RegExp("^(?:"+t.map(fo.requote).join("|")+")","i")}function Gt(t){for(var e=new p,n=-1,i=t.length;++n<i;)e.set(t[n].toLowerCase(),n);return e}function Jt(t,e,n){ba.lastIndex=0;var i=ba.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function Zt(t,e,n){ba.lastIndex=0;var i=ba.exec(e.slice(n));return i?(t.U=+i[0],n+i[0].length):-1}function Qt(t,e,n){ba.lastIndex=0;var i=ba.exec(e.slice(n));return i?(t.W=+i[0],n+i[0].length):-1}function te(t,e,n){ba.lastIndex=0;var i=ba.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function ee(t,e,n){ba.lastIndex=0;var i=ba.exec(e.slice(n,n+2));return i?(t.y=ie(+i[0]),n+i[0].length):-1}function ne(t,e,n){return/^[+-]\d{4}$/.test(e=e.slice(n,n+5))?(t.Z=-e,n+5):-1}function ie(t){return t+(t>68?1900:2e3)}function re(t,e,n){ba.lastIndex=0;var i=ba.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function se(t,e,n){ba.lastIndex=0;var i=ba.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function oe(t,e,n){ba.lastIndex=0;var i=ba.exec(e.slice(n,n+3));return i?(t.j=+i[0],n+i[0].length):-1}function ae(t,e,n){ba.lastIndex=0;var i=ba.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function le(t,e,n){ba.lastIndex=0;var i=ba.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function ue(t,e,n){ba.lastIndex=0;var i=ba.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function he(t,e,n){ba.lastIndex=0;var i=ba.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function ce(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",i=ko(e)/60|0,r=ko(e)%60;return n+Kt(i,"0",2)+Kt(r,"0",2)}function fe(t,e,n){_a.lastIndex=0;var i=_a.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function de(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 pe(){}function ge(t,e,n){var i=n.s=t+e,r=i-t,s=i-r;n.t=t-s+(e-r)}function me(t,e){t&&Ca.hasOwnProperty(t.type)&&Ca[t.type](t,e)}function ve(t,e,n){var i,r=-1,s=t.length-n;for(e.lineStart();++r<s;)i=t[r],e.point(i[0],i[1],i[2]);e.lineEnd()}function ye(t,e){var n=-1,i=t.length;for(e.polygonStart();++n<i;)ve(t[n],e,1);e.polygonEnd()}function be(){function t(t,e){t*=Yo,e=e*Yo/2+Wo/4;var n=t-i,o=n>=0?1:-1,a=o*n,l=Math.cos(e),u=Math.sin(e),h=s*u,c=r*l+h*Math.cos(a),f=h*o*Math.sin(a);Ta.add(Math.atan2(f,c)),i=t,r=l,s=u}var e,n,i,r,s;Da.point=function(o,a){Da.point=t,i=(e=o)*Yo,r=Math.cos(a=(n=a)*Yo/2+Wo/4),s=Math.sin(a)},Da.lineEnd=function(){t(e,n)}}function _e(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 xe(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function we(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 ke(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Ce(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Me(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 Te(t){return[Math.atan2(t[1],t[0]),ot(t[2])]}function De(t,e){return ko(t[0]-e[0])<jo&&ko(t[1]-e[1])<jo}function Se(t,e){t*=Yo;var n=Math.cos(e*=Yo);Ee(n*Math.cos(t),n*Math.sin(t),Math.sin(e))}function Ee(t,e,n){++Sa,Ia+=(t-Ia)/Sa,Na+=(e-Na)/Sa,Pa+=(n-Pa)/Sa}function Ie(){function t(t,r){t*=Yo;var s=Math.cos(r*=Yo),o=s*Math.cos(t),a=s*Math.sin(t),l=Math.sin(r),u=Math.atan2(Math.sqrt((u=n*l-i*a)*u+(u=i*o-e*l)*u+(u=e*a-n*o)*u),e*o+n*a+i*l);Ea+=u,Aa+=u*(e+(e=o)),Oa+=u*(n+(n=a)),za+=u*(i+(i=l)),Ee(e,n,i)}var e,n,i;Fa.point=function(r,s){r*=Yo;var o=Math.cos(s*=Yo);e=o*Math.cos(r),n=o*Math.sin(r),i=Math.sin(s),Fa.point=t,Ee(e,n,i)}}function Ne(){Fa.point=Se}function Pe(){function t(t,e){t*=Yo;var n=Math.cos(e*=Yo),o=n*Math.cos(t),a=n*Math.sin(t),l=Math.sin(e),u=r*l-s*a,h=s*o-i*l,c=i*a-r*o,f=Math.sqrt(u*u+h*h+c*c),d=i*o+r*a+s*l,p=f&&-st(d)/f,g=Math.atan2(f,d);Ha+=p*u,La+=p*h,Ra+=p*c,Ea+=g,Aa+=g*(i+(i=o)),Oa+=g*(r+(r=a)),za+=g*(s+(s=l)),Ee(i,r,s)}var e,n,i,r,s;Fa.point=function(o,a){e=o,n=a,Fa.point=t,o*=Yo;var l=Math.cos(a*=Yo);i=l*Math.cos(o),r=l*Math.sin(o),s=Math.sin(a),Ee(i,r,s)},Fa.lineEnd=function(){t(e,n),Fa.lineEnd=Ne,Fa.point=Se}}function Ae(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))&&t.invert(n[0],n[1])}),n}function Oe(){return!0}function ze(t,e,n,i,r){var s=[],o=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n=t[0],i=t[e];if(De(n,i)){r.lineStart();for(var a=0;a<e;++a)r.point((n=t[a])[0],n[1]);return void r.lineEnd()}var l=new Le(n,t,null,!0),u=new Le(n,null,l,!1);l.o=u,s.push(l),o.push(u),l=new Le(i,t,null,!1),u=new Le(i,null,l,!0),l.o=u,s.push(l),o.push(u)}}),o.sort(e),He(s),He(o),s.length){for(var a=0,l=n,u=o.length;a<u;++a)o[a].e=l=!l;for(var h,c,f=s[0];;){for(var d=f,p=!0;d.v;)if((d=d.n)===f)return;h=d.z,r.lineStart();do{if(d.v=d.o.v=!0,d.e){if(p)for(var a=0,u=h.length;a<u;++a)r.point((c=h[a])[0],c[1]);else i(d.x,d.n.x,1,r);d=d.n}else{if(p){h=d.p.z;for(var a=h.length-1;a>=0;--a)r.point((c=h[a])[0],c[1])}else i(d.x,d.p.x,-1,r);d=d.p}d=d.o,h=d.z,p=!p}while(!d.v);r.lineEnd()}}}function He(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 Le(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 Re(t,e,n,i){return function(r,s){function o(e,n){var i=r(e,n);t(e=i[0],n=i[1])&&s.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=o,m.lineEnd()}function h(t,e){g.push([t,e]);var n=r(t,e);_.point(n[0],n[1])}function c(){_.lineStart(),g=[]}function f(){h(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,o=-1;if(i>0){for(x||(s.polygonStart(),x=!0),s.lineStart();++o<i;)s.point((r=t[o])[0],r[1]);s.lineEnd()}}else i>1&&2&e&&n.push(n.pop().concat(n.shift())),d.push(n.filter(Fe))}var d,p,g,m=e(s),v=r.invert(i[0],i[1]),y={point:o,lineStart:l,lineEnd:u,polygonStart:function(){y.point=h,y.lineStart=c,y.lineEnd=f,d=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=l,y.lineEnd=u,d=fo.merge(d);var t=Ue(v,p);d.length?(x||(s.polygonStart(),x=!0),ze(d,$e,t,n,s)):t&&(x||(s.polygonStart(),x=!0),s.lineStart(),n(null,null,1,s),s.lineEnd()),x&&(s.polygonEnd(),x=!1),d=p=null},sphere:function(){s.polygonStart(),s.lineStart(),n(null,null,1,s),s.lineEnd(),s.polygonEnd()}},b=je(),_=e(b),x=!1;return y}}function Fe(t){return t.length>1}function je(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:T,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function $e(t,e){return((t=t.x)[0]<0?t[1]-Uo-jo:Uo-t[1])-((e=e.x)[0]<0?e[1]-Uo-jo:Uo-e[1])}function We(t){var e,n=NaN,i=NaN,r=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(s,o){var a=s>0?Wo:-Wo,l=ko(s-n);ko(l-Wo)<jo?(t.point(n,i=(i+o)/2>0?Uo:-Uo),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(a,i),t.point(s,i),e=0):r!==a&&l>=Wo&&(ko(n-r)<jo&&(n-=r*jo),ko(s-a)<jo&&(s-=a*jo),i=qe(n,i,s,o),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(a,i),e=0),t.point(n=s,i=o),r=a},lineEnd:function(){t.lineEnd(),n=i=NaN},clean:function(){return 2-e}}}function qe(t,e,n,i){var r,s,o=Math.sin(t-n);return ko(o)>jo?Math.atan((Math.sin(e)*(s=Math.cos(i))*Math.sin(n)-Math.sin(i)*(r=Math.cos(e))*Math.sin(t))/(r*s*o)):(e+i)/2}function Be(t,e,n,i){var r;if(null==t)r=n*Uo,i.point(-Wo,r),i.point(0,r),i.point(Wo,r),i.point(Wo,0),i.point(Wo,-r),i.point(0,-r),i.point(-Wo,-r),i.point(-Wo,0),i.point(-Wo,r);else if(ko(t[0]-e[0])>jo){var s=t[0]<e[0]?Wo:-Wo;r=n*s/2,i.point(-s,r),i.point(0,r),i.point(s,r)}else i.point(e[0],e[1])}function Ue(t,e){var n=t[0],i=t[1],r=[Math.sin(n),-Math.cos(n),0],s=0,o=0;Ta.reset();for(var a=0,l=e.length;a<l;++a){var u=e[a],h=u.length;if(h)for(var c=u[0],f=c[0],d=c[1]/2+Wo/4,p=Math.sin(d),g=Math.cos(d),m=1;;){m===h&&(m=0),t=u[m];var v=t[0],y=t[1]/2+Wo/4,b=Math.sin(y),_=Math.cos(y),x=v-f,w=x>=0?1:-1,k=w*x,C=k>Wo,M=p*b;if(Ta.add(Math.atan2(M*w*Math.sin(k),g*_+M*Math.cos(k))),s+=C?x+w*qo:x,C^f>=n^v>=n){var T=we(_e(c),_e(t));Me(T);var D=we(r,T);Me(D);var S=(C^x>=0?-1:1)*ot(D[2]);(i>S||i===S&&(T[0]||T[1]))&&(o+=C^x>=0?1:-1)}if(!m++)break;f=v,p=b,g=_,c=t}}return(s<-jo||s<jo&&Ta<-jo)^1&o}function Ye(t){function e(t,e){return Math.cos(t)*Math.cos(e)>s}function n(t){var n,s,l,u,h;return{lineStart:function(){u=l=!1,h=1},point:function(c,f){var d,p=[c,f],g=e(c,f),m=o?g?0:r(c,f):g?r(c+(c<0?Wo:-Wo),f):0;if(!n&&(u=l=g)&&t.lineStart(),g!==l&&(d=i(n,p),(De(n,d)||De(p,d))&&(p[0]+=jo,p[1]+=jo,g=e(p[0],p[1]))),g!==l)h=0,g?(t.lineStart(),d=i(p,n),t.point(d[0],d[1])):(d=i(n,p),t.point(d[0],d[1]),t.lineEnd()),n=d;else if(a&&n&&o^g){var v;m&s||!(v=i(p,n,!0))||(h=0,o?(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&&De(n,p)||t.point(p[0],p[1]),n=p,l=g,s=m},lineEnd:function(){l&&t.lineEnd(),n=null},clean:function(){return h|(u&&l)<<1}}}function i(t,e,n){var i=_e(t),r=_e(e),o=[1,0,0],a=we(i,r),l=xe(a,a),u=a[0],h=l-u*u;if(!h)return!n&&t;var c=s*l/h,f=-s*u/h,d=we(o,a),p=Ce(o,c);ke(p,Ce(a,f));var g=d,m=xe(p,g),v=xe(g,g),y=m*m-v*(xe(p,p)-1);if(!(y<0)){var b=Math.sqrt(y),_=Ce(g,(-m-b)/v);if(ke(_,p),_=Te(_),!n)return _;var x,w=t[0],k=e[0],C=t[1],M=e[1];k<w&&(x=w,w=k,k=x);var T=k-w,D=ko(T-Wo)<jo,S=D||T<jo;if(!D&&M<C&&(x=C,C=M,M=x),S?D?C+M>0^_[1]<(ko(_[0]-w)<jo?C:M):C<=_[1]&&_[1]<=M:T>Wo^(w<=_[0]&&_[0]<=k)){var E=Ce(g,(-m+b)/v);return ke(E,p),[_,Te(E)]}}}function r(e,n){var i=o?t:Wo-t,r=0;return e<-i?r|=1:e>i&&(r|=2),n<-i?r|=4:n>i&&(r|=8),r}var s=Math.cos(t),o=s>0,a=ko(s)>jo;return Re(e,n,_n(t,6*Yo),o?[0,-t]:[-Wo,t-Wo])}function Ve(t,e,n,i){return function(r){var s,o=r.a,a=r.b,l=o.x,u=o.y,h=a.x,c=a.y,f=0,d=1,p=h-l,g=c-u;if(s=t-l,p||!(s>0)){if(s/=p,p<0){if(s<f)return;s<d&&(d=s)}else if(p>0){if(s>d)return;s>f&&(f=s)}if(s=n-l,p||!(s<0)){if(s/=p,p<0){if(s>d)return;s>f&&(f=s)}else if(p>0){if(s<f)return;s<d&&(d=s)}if(s=e-u,g||!(s>0)){if(s/=g,g<0){if(s<f)return;s<d&&(d=s)}else if(g>0){if(s>d)return;s>f&&(f=s)}if(s=i-u,g||!(s<0)){if(s/=g,g<0){if(s>d)return;s>f&&(f=s)}else if(g>0){if(s<f)return;s<d&&(d=s)}return f>0&&(r.a={x:l+f*p,y:u+f*g}),d<1&&(r.b={x:l+d*p,y:u+d*g}),r}}}}}}function Ke(t,e,n,i){function r(i,r){return ko(i[0]-t)<jo?r>0?0:3:ko(i[0]-n)<jo?r>0?2:1:ko(i[1]-e)<jo?r>0?1:0:r>0?3:2}function s(t,e){return o(t.x,e.x)}function o(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;r<n;++r)for(var s,o=1,a=m[r],l=a.length,u=a[0];o<l;++o)s=a[o],u[1]<=i?s[1]>i&&rt(u,s,t)>0&&++e:s[1]<=i&&rt(u,s,t)<0&&--e,u=s;return 0!==e}function u(s,a,l,u){var h=0,c=0;if(null==s||(h=r(s,l))!==(c=r(a,l))||o(s,a)<0^l>0)do{u.point(0===h||3===h?t:n,h>1?i:e)}while((h=(h+l+4)%4)!==c);else u.point(a[0],a[1])}function h(r,s){return t<=r&&r<=n&&e<=s&&s<=i}function c(t,e){h(t,e)&&a.point(t,e)}function f(){E.point=p,m&&m.push(v=[]),C=!0,k=!1,x=w=NaN}function d(){g&&(p(y,b),_&&k&&D.rejoin(),g.push(D.buffer())),E.point=c,k&&a.lineEnd()}function p(t,e){t=Math.max(-$a,Math.min($a,t)),e=Math.max(-$a,Math.min($a,e));var n=h(t,e);if(m&&v.push([t,e]),C)y=t,b=e,_=n,C=!1,n&&(a.lineStart(),a.point(t,e));else if(n&&k)a.point(t,e);else{var i={a:{x:x,y:w},b:{x:t,y:e}};S(i)?(k||(a.lineStart(),a.point(i.a.x,i.a.y)),a.point(i.b.x,i.b.y),n||a.lineEnd(),M=!1):n&&(a.lineStart(),a.point(t,e),M=!1)}x=t,w=e,k=n}var g,m,v,y,b,_,x,w,k,C,M,T=a,D=je(),S=Ve(t,e,n,i),E={point:c,lineStart:f,lineEnd:d,polygonStart:function(){a=D,g=[],m=[],M=!0},polygonEnd:function(){a=T,g=fo.merge(g);var e=l([t,i]),n=M&&e,r=g.length;(n||r)&&(a.polygonStart(),n&&(a.lineStart(),u(null,null,1,a),a.lineEnd()),r&&ze(g,s,e,u,a),a.polygonEnd()),g=m=v=null}};return E}}function Xe(t){var e=0,n=Wo/3,i=fn(t),r=i(e,n);return r.parallels=function(t){return arguments.length?i(e=t[0]*Wo/180,n=t[1]*Wo/180):[e/Wo*180,n/Wo*180]},r}function Ge(t,e){function n(t,e){var n=Math.sqrt(s-2*r*Math.sin(e))/r;return[n*Math.sin(t*=r),o-n*Math.cos(t)]}var i=Math.sin(t),r=(i+Math.sin(e))/2,s=1+i*(2*r-i),o=Math.sqrt(s)/r;return n.invert=function(t,e){var n=o-e;return[Math.atan2(t,n)/r,ot((s-(t*t+n*n)*r*r)/(2*r))]},n}function Je(){function t(t,e){qa+=r*t-i*e,i=t,r=e}var e,n,i,r;Ka.point=function(s,o){Ka.point=t,e=i=s,n=r=o},Ka.lineEnd=function(){t(e,n)}}function Ze(t,e){t<Ba&&(Ba=t),t>Ya&&(Ya=t),e<Ua&&(Ua=e),e>Va&&(Va=e)}function Qe(){function t(t,e){o.push("M",t,",",e,s)}function e(t,e){o.push("M",t,",",e),a.point=n}function n(t,e){o.push("L",t,",",e)}function i(){a.point=t}function r(){o.push("Z")}var s=tn(4.5),o=[],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 s=tn(t),a},result:function(){if(o.length){var t=o.join("");return o=[],t}}};return a}function tn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function en(t,e){Ia+=t,Na+=e,++Pa}function nn(){function t(t,i){var r=t-e,s=i-n,o=Math.sqrt(r*r+s*s);Aa+=o*(e+t)/2,Oa+=o*(n+i)/2,za+=o,en(e=t,n=i)}var e,n;Ga.point=function(i,r){Ga.point=t,en(e=i,n=r)}}function rn(){Ga.point=en}function sn(){function t(t,e){var n=t-i,s=e-r,o=Math.sqrt(n*n+s*s);Aa+=o*(i+t)/2,Oa+=o*(r+e)/2,za+=o,o=r*t-i*e,Ha+=o*(i+t),La+=o*(r+e),Ra+=3*o,en(i=t,r=e)}var e,n,i,r;Ga.point=function(s,o){Ga.point=t,en(e=i=s,n=r=o)},Ga.lineEnd=function(){t(e,n)}}function on(t){function e(e,n){t.moveTo(e+o,n),t.arc(e,n,o,0,qo)}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 s(){t.closePath()}var o=4.5,a={point:e,lineStart:function(){a.point=n},lineEnd:r,polygonStart:function(){a.lineEnd=s},polygonEnd:function(){a.lineEnd=r,a.point=e},pointRadius:function(t){return o=t,a},result:T};return a}function an(t){function e(t){return(a?i:n)(t)}function n(e){return hn(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,C.point=s,e.lineStart()}function s(n,i){var s=_e([n,i]),o=t(n,i);r(b,_,y,x,w,k,b=o[0],_=o[1],y=n,x=s[0],w=s[1],k=s[2],a,e),e.point(b,_)}function o(){C.point=n,e.lineEnd()}function l(){i(),C.point=u,C.lineEnd=h}function u(t,e){s(c=t,f=e),d=b,p=_,g=x,m=w,v=k,C.point=s}function h(){r(b,_,y,x,w,k,d,p,c,g,m,v,a,e),C.lineEnd=o,o()}var c,f,d,p,g,m,v,y,b,_,x,w,k,C={point:n,lineStart:i,lineEnd:o,polygonStart:function(){e.polygonStart(),C.lineStart=l},polygonEnd:function(){e.polygonEnd(),C.lineStart=i}};return C}function r(e,n,i,a,l,u,h,c,f,d,p,g,m,v){var y=h-e,b=c-n,_=y*y+b*b;if(_>4*s&&m--){var x=a+d,w=l+p,k=u+g,C=Math.sqrt(x*x+w*w+k*k),M=Math.asin(k/=C),T=ko(ko(k)-1)<jo||ko(i-f)<jo?(i+f)/2:Math.atan2(w,x),D=t(T,M),S=D[0],E=D[1],I=S-e,N=E-n,P=b*I-y*N;(P*P/_>s||ko((y*I+b*N)/_-.5)>.3||a*d+l*p+u*g<o)&&(r(e,n,i,a,l,u,S,E,T,x/=C,w/=C,k,m,v),v.point(S,E),r(S,E,T,x,w,k,h,c,f,d,p,g,m,v))}}var s=.5,o=Math.cos(30*Yo),a=16;return e.precision=function(t){return arguments.length?(a=(s=t*t)>0&&16,e):Math.sqrt(s)},e}function ln(t){var e=an(function(e,n){return t([e*Vo,n*Vo])});return function(t){return dn(e(t))}}function un(t){this.stream=t}function hn(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 cn(t){return fn(function(){return t})()}function fn(t){function e(t){return t=a(t[0]*Yo,t[1]*Yo),[t[0]*f+l,u-t[1]*f]}function n(t){return(t=a.invert((t[0]-l)/f,(u-t[1])/f))&&[t[0]*Vo,t[1]*Vo]}function i(){a=Ae(o=mn(v,y,b),s);var t=s(g,m);return l=d-t[0]*f,u=p+t[1]*f,r()}function r(){return h&&(h.valid=!1,h=null),e}var s,o,a,l,u,h,c=an(function(t,e){return t=s(t,e),[t[0]*f+l,u-t[1]*f]}),f=150,d=480,p=250,g=0,m=0,v=0,y=0,b=0,_=ja,x=k,w=null,C=null;return e.stream=function(t){return h&&(h.valid=!1),h=dn(_(o,c(x(t)))),h.valid=!0,h},e.clipAngle=function(t){return arguments.length?(_=null==t?(w=t,ja):Ye((w=+t)*Yo),r()):w},e.clipExtent=function(t){return arguments.length?(C=t,x=t?Ke(t[0][0],t[0][1],t[1][0],t[1][1]):k,r()):C},e.scale=function(t){return arguments.length?(f=+t,i()):f},e.translate=function(t){return arguments.length?(d=+t[0],p=+t[1],i()):[d,p]},e.center=function(t){return arguments.length?(g=t[0]%360*Yo,m=t[1]%360*Yo,i()):[g*Vo,m*Vo]},e.rotate=function(t){return arguments.length?(v=t[0]%360*Yo,y=t[1]%360*Yo,b=t.length>2?t[2]%360*Yo:0,i()):[v*Vo,y*Vo,b*Vo]},fo.rebind(e,c,"precision"),function(){return s=t.apply(this,arguments),e.invert=s.invert&&n,i()}}function dn(t){return hn(t,function(e,n){t.point(e*Yo,n*Yo)})}function pn(t,e){return[t,e]}function gn(t,e){return[t>Wo?t-qo:t<-Wo?t+qo:t,e]}function mn(t,e,n){return t?e||n?Ae(yn(t),bn(e,n)):yn(t):e||n?bn(e,n):gn}function vn(t){return function(e,n){return e+=t,[e>Wo?e-qo:e<-Wo?e+qo:e,n]}}function yn(t){var e=vn(t);return e.invert=vn(-t),e}function bn(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),h=u*i+a*r;return[Math.atan2(l*s-h*o,a*i-u*r),ot(h*s+l*o)]}var i=Math.cos(t),r=Math.sin(t),s=Math.cos(e),o=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),h=u*s-l*o;return[Math.atan2(l*s+u*o,a*i+h*r),ot(h*i-a*r)]},n}function _n(t,e){var n=Math.cos(t),i=Math.sin(t);return function(r,s,o,a){var l=o*e;null!=r?(r=xn(n,r),s=xn(n,s),(o>0?r<s:r>s)&&(r+=o*qo)):(r=t+o*qo,s=t-.5*l);for(var u,h=r;o>0?h>s:h<s;h-=l)a.point((u=Te([n,-i*Math.cos(h),-i*Math.sin(h)]))[0],u[1])}}function xn(t,e){var n=_e(e);n[0]-=t,Me(n);var i=st(-n[1]);return((-n[2]<0?-i:i)+2*Math.PI-jo)%(2*Math.PI)}function wn(t,e,n){var i=fo.range(t,e-jo,n).concat(e);return function(t){return i.map(function(e){return[t,e]})}}function kn(t,e,n){var i=fo.range(t,e-jo,n).concat(e);return function(t){return i.map(function(e){return[e,t]})}}function Cn(t){return t.source}function Mn(t){return t.target}function Tn(t,e,n,i){var r=Math.cos(e),s=Math.sin(e),o=Math.cos(i),a=Math.sin(i),l=r*Math.cos(t),u=r*Math.sin(t),h=o*Math.cos(n),c=o*Math.sin(n),f=2*Math.asin(Math.sqrt(ht(i-e)+r*o*ht(n-t))),d=1/Math.sin(f),p=f?function(t){var e=Math.sin(t*=f)*d,n=Math.sin(f-t)*d,i=n*l+e*h,r=n*u+e*c,o=n*s+e*a;return[Math.atan2(r,i)*Vo,Math.atan2(o,Math.sqrt(i*i+r*r))*Vo]}:function(){return[t*Vo,e*Vo]};return p.distance=f,p}function Dn(){function t(t,r){var s=Math.sin(r*=Yo),o=Math.cos(r),a=ko((t*=Yo)-e),l=Math.cos(a);Ja+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=i*s-n*o*l)*a),n*s+i*o*l),e=t,n=s,i=o}var e,n,i;Za.point=function(r,s){e=r*Yo,n=Math.sin(s*=Yo),i=Math.cos(s),Za.point=t},Za.lineEnd=function(){Za.point=Za.lineEnd=T}}function Sn(t,e){function n(e,n){var i=Math.cos(e),r=Math.cos(n),s=t(i*r);return[s*r*Math.sin(e),s*Math.sin(n)]}return n.invert=function(t,n){var i=Math.sqrt(t*t+n*n),r=e(i),s=Math.sin(r),o=Math.cos(r);return[Math.atan2(t*s,i*o),Math.asin(i&&n*s/i)]},n}function En(t,e){function n(t,e){o>0?e<-Uo+jo&&(e=-Uo+jo):e>Uo-jo&&(e=Uo-jo);var n=o/Math.pow(r(e),s);return[n*Math.sin(s*t),o-n*Math.cos(s*t)]}var i=Math.cos(t),r=function(t){return Math.tan(Wo/4+t/2)},s=t===e?Math.sin(t):Math.log(i/Math.cos(e))/Math.log(r(e)/r(t)),o=i*Math.pow(r(t),s)/s;return s?(n.invert=function(t,e){var n=o-e,i=it(s)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/s,2*Math.atan(Math.pow(o/i,1/s))-Uo]},n):Nn}function In(t,e){function n(t,e){var n=s-e;return[n*Math.sin(r*t),s-n*Math.cos(r*t)]}var i=Math.cos(t),r=t===e?Math.sin(t):(i-Math.cos(e))/(e-t),s=i/r+t;return ko(r)<jo?pn:(n.invert=function(t,e){var n=s-e;return[Math.atan2(t,n)/r,s-it(r)*Math.sqrt(t*t+n*n)]},n)}function Nn(t,e){return[t,Math.log(Math.tan(Wo/4+e/2))]}function Pn(t){var e,n=cn(t),i=n.scale,r=n.translate,s=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 o=s.apply(n,arguments);if(o===n){if(e=null==t){var a=Wo*i(),l=r();s([[l[0]-a,l[1]-a],[l[0]+a,l[1]+a]])}}else e&&(o=null);return o},n.clipExtent(null)}function An(t,e){return[Math.log(Math.tan(Wo/4+e/2)),-t]}function On(t){return t[0]}function zn(t){return t[1]}function Hn(t){for(var e=t.length,n=[0,1],i=2,r=2;r<e;r++){for(;i>1&&rt(t[n[i-2]],t[n[i-1]],t[r])<=0;)--i;n[i++]=r}return n.slice(0,i)}function Ln(t,e){return t[0]-e[0]||t[1]-e[1]}function Rn(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function Fn(t,e,n,i){var r=t[0],s=n[0],o=e[0]-r,a=i[0]-s,l=t[1],u=n[1],h=e[1]-l,c=i[1]-u,f=(a*(l-u)-c*(r-s))/(c*o-a*h);return[r+f*o,l+f*h]}function jn(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}function $n(){li(this),this.edge=this.site=this.circle=null}function Wn(t){var e=hl.pop()||new $n;return e.site=t,e}function qn(t){Qn(t),al.remove(t),hl.push(t),li(t)}function Bn(t){var e=t.circle,n=e.x,i=e.cy,r={x:n,y:i},s=t.P,o=t.N,a=[t];qn(t);for(var l=s;l.circle&&ko(n-l.circle.x)<jo&&ko(i-l.circle.cy)<jo;)s=l.P,a.unshift(l),qn(l),l=s;a.unshift(l),Qn(l);for(var u=o;u.circle&&ko(n-u.circle.x)<jo&&ko(i-u.circle.cy)<jo;)o=u.N,a.push(u),qn(u),u=o;a.push(u),Qn(u);var h,c=a.length;for(h=1;h<c;++h)u=a[h],l=a[h-1],si(u.edge,l.site,u.site,r);l=a[0],u=a[c-1],u.edge=ii(l.site,u.site,null,r),Zn(l),Zn(u)}function Un(t){for(var e,n,i,r,s=t.x,o=t.y,a=al._;a;)if((i=Yn(a,o)-s)>jo)a=a.L;else{if(!((r=s-Vn(a,o))>jo)){i>-jo?(e=a.P,n=a):r>-jo?(e=a,n=a.N):e=n=a;break}if(!a.R){e=a;break}a=a.R}var l=Wn(t);if(al.insert(e,l),e||n){if(e===n)return Qn(e),n=Wn(e.site),al.insert(l,n),l.edge=n.edge=ii(e.site,l.site),Zn(e),void Zn(n);if(!n)return void(l.edge=ii(e.site,l.site));Qn(e),Qn(n);var u=e.site,h=u.x,c=u.y,f=t.x-h,d=t.y-c,p=n.site,g=p.x-h,m=p.y-c,v=2*(f*m-d*g),y=f*f+d*d,b=g*g+m*m,_={x:(m*y-d*b)/v+h,y:(f*b-g*y)/v+c};si(n.edge,u,p,_),l.edge=ii(u,t,null,_),n.edge=ii(t,p,null,_),Zn(e),Zn(n)}}function Yn(t,e){var n=t.site,i=n.x,r=n.y,s=r-e;if(!s)return i;var o=t.P;if(!o)return-1/0;n=o.site;var a=n.x,l=n.y,u=l-e;if(!u)return a;var h=a-i,c=1/s-1/u,f=h/u;return c?(-f+Math.sqrt(f*f-2*c*(h*h/(-2*u)-l+u/2+r-s/2)))/c+i:(i+a)/2}function Vn(t,e){var n=t.N;if(n)return Yn(n,e);var i=t.site;return i.y===e?i.x:1/0}function Kn(t){this.site=t,this.edges=[]}function Xn(t){for(var e,n,i,r,s,o,a,l,u,h,c=t[0][0],f=t[1][0],d=t[0][1],p=t[1][1],g=ol,m=g.length;m--;)if((s=g[m])&&s.prepare())for(a=s.edges,l=a.length,o=0;o<l;)h=a[o].end(),i=h.x,r=h.y,u=a[++o%l].start(),e=u.x,n=u.y,(ko(i-e)>jo||ko(r-n)>jo)&&(a.splice(o,0,new oi(ri(s.site,h,ko(i-c)<jo&&p-r>jo?{x:c,y:ko(e-c)<jo?n:p}:ko(r-p)<jo&&f-i>jo?{x:ko(n-p)<jo?e:f,y:p}:ko(i-f)<jo&&r-d>jo?{x:f,y:ko(e-f)<jo?n:d}:ko(r-d)<jo&&i-c>jo?{x:ko(n-d)<jo?e:c,y:d}:null),s.site,null)),++l)}function Gn(t,e){return e.angle-t.angle}function Jn(){li(this),this.x=this.y=this.arc=this.site=this.cy=null}function Zn(t){var e=t.P,n=t.N;if(e&&n){var i=e.site,r=t.site,s=n.site;if(i!==s){var o=r.x,a=r.y,l=i.x-o,u=i.y-a,h=s.x-o,c=s.y-a,f=2*(l*c-u*h);if(!(f>=-$o)){var d=l*l+u*u,p=h*h+c*c,g=(c*d-u*p)/f,m=(l*p-h*d)/f,c=m+a,v=cl.pop()||new Jn;v.arc=t,v.site=r,v.x=g+o,v.y=c+Math.sqrt(g*g+m*m),v.cy=c,t.circle=v;for(var y=null,b=ul._;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}ul.insert(y,v),y||(ll=v)}}}}function Qn(t){var e=t.circle;e&&(e.P||(ll=e.N),ul.remove(e),cl.push(e),li(e),t.circle=null)}function ti(t){for(var e,n=sl,i=Ve(t[0][0],t[0][1],t[1][0],t[1][1]),r=n.length;r--;)e=n[r],(!ei(e,t)||!i(e)||ko(e.a.x-e.b.x)<jo&&ko(e.a.y-e.b.y)<jo)&&(e.a=e.b=null,n.splice(r,1))}function ei(t,e){var n=t.b;if(n)return!0;var i,r,s=t.a,o=e[0][0],a=e[1][0],l=e[0][1],u=e[1][1],h=t.l,c=t.r,f=h.x,d=h.y,p=c.x,g=c.y,m=(f+p)/2,v=(d+g)/2;if(g===d){if(m<o||m>=a)return;if(f>p){if(s){if(s.y>=u)return}else s={x:m,y:l};n={x:m,y:u}}else{if(s){if(s.y<l)return}else s={x:m,y:u};n={x:m,y:l}}}else if(i=(f-p)/(g-d),r=v-i*m,i<-1||i>1)if(f>p){if(s){if(s.y>=u)return}else s={x:(l-r)/i,y:l};n={x:(u-r)/i,y:u}}else{if(s){if(s.y<l)return}else s={x:(u-r)/i,y:u};n={x:(l-r)/i,y:l}}else if(d<g){if(s){if(s.x>=a)return}else s={x:o,y:i*o+r};n={x:a,y:i*a+r}}else{if(s){if(s.x<o)return}else s={x:a,y:i*a+r};n={x:o,y:i*o+r}}return t.a=s,t.b=n,!0}function ni(t,e){this.l=t,this.r=e,this.a=this.b=null}function ii(t,e,n,i){var r=new ni(t,e);return sl.push(r),n&&si(r,t,e,n),i&&si(r,e,t,i),ol[t.i].edges.push(new oi(r,t,e)),ol[e.i].edges.push(new oi(r,e,t)),r}function ri(t,e,n){var i=new ni(t,null);return i.a=e,i.b=n,sl.push(i),i}function si(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 oi(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 ai(){this._=null}function li(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function ui(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 hi(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 ci(t){for(;t.L;)t=t.L;return t}function fi(t,e){var n,i,r,s=t.sort(di).pop();for(sl=[],ol=new Array(t.length),al=new ai,ul=new ai;;)if(r=ll,s&&(!r||s.y<r.y||s.y===r.y&&s.x<r.x))s.x===n&&s.y===i||(ol[s.i]=new Kn(s),Un(s),n=s.x,i=s.y),s=t.pop();else{if(!r)break;Bn(r.arc)}e&&(ti(e),Xn(e));var o={cells:ol,edges:sl};return al=ul=sl=ol=null,o}function di(t,e){return e.y-t.y||e.x-t.x}function pi(t,e,n){return(t.x-n.x)*(e.y-t.y)-(t.x-e.x)*(n.y-t.y)}function gi(t){return t.x}function mi(t){return t.y}function vi(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function yi(t,e,n,i,r,s){if(!t(e,n,i,r,s)){var o=.5*(n+r),a=.5*(i+s),l=e.nodes;l[0]&&yi(t,l[0],n,i,o,a),l[1]&&yi(t,l[1],o,i,r,a),l[2]&&yi(t,l[2],n,a,o,s),l[3]&&yi(t,l[3],o,a,r,s)}}function bi(t,e,n,i,r,s,o){var a,l=1/0;return function t(u,h,c,f,d){if(!(h>s||c>o||f<i||d<r)){if(p=u.point){var p,g=e-u.x,m=n-u.y,v=g*g+m*m;if(v<l){var y=Math.sqrt(l=v);i=e-y,r=n-y,s=e+y,o=n+y,a=p}}for(var b=u.nodes,_=.5*(h+f),x=.5*(c+d),w=e>=_,k=n>=x,C=k<<1|w,M=C+4;C<M;++C)if(u=b[3&C])switch(3&C){case 0:t(u,h,c,_,x);break;case 1:t(u,_,c,f,x);break;case 2:t(u,h,x,_,d);break;case 3:t(u,_,x,f,d)}}}(t,i,r,s,o),a}function _i(t,e){t=fo.rgb(t),e=fo.rgb(e);var n=t.r,i=t.g,r=t.b,s=e.r-n,o=e.g-i,a=e.b-r;return function(t){return"#"+Mt(Math.round(n+s*t))+Mt(Math.round(i+o*t))+Mt(Math.round(r+a*t))}}function xi(t,e){var n,i={},r={};for(n in t)n in e?i[n]=Ci(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 wi(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function ki(t,e){var n,i,r,s=dl.lastIndex=pl.lastIndex=0,o=-1,a=[],l=[];for(t+="",e+="";(n=dl.exec(t))&&(i=pl.exec(e));)(r=i.index)>s&&(r=e.slice(s,r),a[o]?a[o]+=r:a[++o]=r),(n=n[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,l.push({i:o,x:wi(n,i)})),s=pl.lastIndex;return s<e.length&&(r=e.slice(s),a[o]?a[o]+=r:a[++o]=r),a.length<2?l[0]?(e=l[0].x,function(t){return e(t)+""}):function(){return e}:(e=l.length,function(t){for(var n,i=0;i<e;++i)a[(n=l[i]).i]=n.x(t);return a.join("")})}function Ci(t,e){for(var n,i=fo.interpolators.length;--i>=0&&!(n=fo.interpolators[i](t,e)););return n}function Mi(t,e){var n,i=[],r=[],s=t.length,o=e.length,a=Math.min(t.length,e.length);for(n=0;n<a;++n)i.push(Ci(t[n],e[n]));for(;n<s;++n)r[n]=t[n];for(;n<o;++n)r[n]=e[n];return function(t){for(n=0;n<a;++n)r[n]=i[n](t);return r}}function Ti(t){return function(e){return e<=0?0:e>=1?1:t(e)}}function Di(t){return function(e){return 1-t(1-e)}}function Si(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Ei(t){return t*t}function Ii(t){return t*t*t}function Ni(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)}function Pi(t){return function(e){return Math.pow(e,t)}}function Ai(t){return 1-Math.cos(t*Uo)}function Oi(t){return Math.pow(2,10*(t-1))}function zi(t){return 1-Math.sqrt(1-t*t)}function Hi(t,e){var n;return arguments.length<2&&(e=.45),arguments.length?n=e/qo*Math.asin(1/t):(t=1,n=e/4),function(i){return 1+t*Math.pow(2,-10*i)*Math.sin((i-n)*qo/e)}}function Li(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function Ri(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Fi(t,e){t=fo.hcl(t),e=fo.hcl(e);var n=t.h,i=t.c,r=t.l,s=e.h-n,o=e.c-i,a=e.l-r;return isNaN(o)&&(o=0,i=isNaN(i)?e.c:i),isNaN(s)?(s=0,n=isNaN(n)?e.h:n):s>180?s-=360:s<-180&&(s+=360),function(t){return gt(n+s*t,i+o*t,r+a*t)+""}}function ji(t,e){t=fo.hsl(t),e=fo.hsl(e);var n=t.h,i=t.s,r=t.l,s=e.h-n,o=e.s-i,a=e.l-r;return isNaN(o)&&(o=0,i=isNaN(i)?e.s:i),isNaN(s)?(s=0,n=isNaN(n)?e.h:n):s>180?s-=360:s<-180&&(s+=360),function(t){return dt(n+s*t,i+o*t,r+a*t)+""}}function $i(t,e){t=fo.lab(t),e=fo.lab(e);var n=t.l,i=t.a,r=t.b,s=e.l-n,o=e.a-i,a=e.b-r;return function(t){return vt(n+s*t,i+o*t,r+a*t)+""}}function Wi(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function qi(t){var e=[t.a,t.b],n=[t.c,t.d],i=Ui(e),r=Bi(e,n),s=Ui(Yi(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]))*Vo,this.translate=[t.e,t.f],this.scale=[i,s],this.skew=s?Math.atan2(r,s)*Vo:0}function Bi(t,e){return t[0]*e[0]+t[1]*e[1]}function Ui(t){var e=Math.sqrt(Bi(t,t));return e&&(t[0]/=e,t[1]/=e),e}function Yi(t,e,n){return t[0]+=n*e[0],t[1]+=n*e[1],t}function Vi(t){return t.length?t.pop()+",":""}function Ki(t,e,n,i){if(t[0]!==e[0]||t[1]!==e[1]){var r=n.push("translate(",null,",",null,")");i.push({i:r-4,x:wi(t[0],e[0])},{i:r-2,x:wi(t[1],e[1])})}else(e[0]||e[1])&&n.push("translate("+e+")")}function Xi(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(Vi(n)+"rotate(",null,")")-2,x:wi(t,e)})):e&&n.push(Vi(n)+"rotate("+e+")")}function Gi(t,e,n,i){t!==e?i.push({i:n.push(Vi(n)+"skewX(",null,")")-2,x:wi(t,e)}):e&&n.push(Vi(n)+"skewX("+e+")")}function Ji(t,e,n,i){if(t[0]!==e[0]||t[1]!==e[1]){var r=n.push(Vi(n)+"scale(",null,",",null,")");i.push({i:r-4,x:wi(t[0],e[0])},{i:r-2,x:wi(t[1],e[1])})}else 1===e[0]&&1===e[1]||n.push(Vi(n)+"scale("+e+")")}function Zi(t,e){var n=[],i=[];return t=fo.transform(t),e=fo.transform(e),Ki(t.translate,e.translate,n,i),Xi(t.rotate,e.rotate,n,i),Gi(t.skew,e.skew,n,i),Ji(t.scale,e.scale,n,i),t=e=null,function(t){for(var e,r=-1,s=i.length;++r<s;)n[(e=i[r]).i]=e.x(t);return n.join("")}}function Qi(t,e){return e=(e-=t=+t)||1/e,function(n){return(n-t)/e}}function tr(t,e){return e=(e-=t=+t)||1/e,function(n){return Math.max(0,Math.min(1,(n-t)/e))}}function er(t){for(var e=t.source,n=t.target,i=ir(e,n),r=[e];e!==i;)e=e.parent,r.push(e);for(var s=r.length;n!==i;)r.splice(s,0,n),n=n.parent;return r}function nr(t){for(var e=[],n=t.parent;null!=n;)e.push(t),t=n,n=n.parent;return e.push(t),e}function ir(t,e){if(t===e)return t;for(var n=nr(t),i=nr(e),r=n.pop(),s=i.pop(),o=null;r===s;)o=r,r=n.pop(),s=i.pop();return o}function rr(t){t.fixed|=2}function sr(t){t.fixed&=-7}function or(t){t.fixed|=4,t.px=t.x,t.py=t.y}function ar(t){t.fixed&=-5}function lr(t,e,n){var i=0,r=0;if(t.charge=0,!t.leaf)for(var s,o=t.nodes,a=o.length,l=-1;++l<a;)null!=(s=o[l])&&(lr(s,e,n),t.charge+=s.charge,i+=s.charge*s.cx,r+=s.charge*s.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 ur(t,e){return fo.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=gr,t}function hr(t,e){for(var n=[t];null!=(t=n.pop());)if(e(t),(r=t.children)&&(i=r.length))for(var i,r;--i>=0;)n.push(r[i])}function cr(t,e){for(var n=[t],i=[];null!=(t=n.pop());)if(i.push(t),(s=t.children)&&(r=s.length))for(var r,s,o=-1;++o<r;)n.push(s[o]);for(;null!=(t=i.pop());)e(t)}function fr(t){return t.children}function dr(t){return t.value}function pr(t,e){return e.value-t.value}function gr(t){return fo.merge(t.map(function(t){return(t.children||[]).map(function(e){return{source:t,target:e}})}))}function mr(t){return t.x}function vr(t){return t.y}function yr(t,e,n){t.y0=e,t.y=n}function br(t){return fo.range(t.length)}function _r(t){for(var e=-1,n=t[0].length,i=[];++e<n;)i[e]=0;return i}function xr(t){for(var e,n=1,i=0,r=t[0][1],s=t.length;n<s;++n)(e=t[n][1])>r&&(i=n,r=e);return i}function wr(t){return t.reduce(kr,0)}function kr(t,e){return t+e[1]}function Cr(t,e){return Mr(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Mr(t,e){for(var n=-1,i=+t[0],r=(t[1]-i)/e,s=[];++n<=e;)s[n]=r*n+i;return s}function Tr(t){return[fo.min(t),fo.max(t)]}function Dr(t,e){return t.value-e.value}function Sr(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function Er(t,e){t._pack_next=e,e._pack_prev=t}function Ir(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 Nr(t){function e(t){h=Math.min(t.x-t.r,h),c=Math.max(t.x+t.r,c),f=Math.min(t.y-t.r,f),d=Math.max(t.y+t.r,d)}if((n=t.children)&&(u=n.length)){var n,i,r,s,o,a,l,u,h=1/0,c=-1/0,f=1/0,d=-1/0;if(n.forEach(Pr),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(s=n[2],zr(i,r,s),e(s),Sr(i,s),i._pack_prev=s,Sr(s,r),r=i._pack_next,o=3;o<u;o++){zr(i,r,s=n[o]);var p=0,g=1,m=1;for(a=r._pack_next;a!==r;a=a._pack_next,g++)if(Ir(a,s)){p=1;break}if(1==p)for(l=i._pack_prev;l!==a._pack_prev&&!Ir(l,s);l=l._pack_prev,m++);p?(g<m||g==m&&r.r<i.r?Er(i,r=a):Er(i=l,r),o--):(Sr(i,s),r=s,e(s))}var v=(h+c)/2,y=(f+d)/2,b=0;for(o=0;o<u;o++)s=n[o],s.x-=v,s.y-=y,b=Math.max(b,s.r+Math.sqrt(s.x*s.x+s.y*s.y));t.r=b,n.forEach(Ar)}}function Pr(t){t._pack_next=t._pack_prev=t}function Ar(t){delete t._pack_next,delete t._pack_prev}function Or(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 s=-1,o=r.length;++s<o;)Or(r[s],e,n,i)}function zr(t,e,n){var i=t.r+n.r,r=e.x-t.x,s=e.y-t.y;if(i&&(r||s)){var o=e.r+n.r,a=r*r+s*s;o*=o,i*=i;var l=.5+(i-o)/(2*a),u=Math.sqrt(Math.max(0,2*o*(i+a)-(i-=a)*i-o*o))/(2*a);n.x=t.x+l*r+u*s,n.y=t.y+l*s-u*r}else n.x=t.x+i,n.y=t.y}function Hr(t,e){return t.parent==e.parent?1:2}function Lr(t){var e=t.children;return e.length?e[0]:t.t}function Rr(t){var e,n=t.children;return(e=n.length)?n[e-1]:t.t}function Fr(t,e,n){var i=n/(e.i-t.i);e.c-=i,e.s+=n,t.c+=i,e.z+=n,e.m+=n}function jr(t){for(var e,n=0,i=0,r=t.children,s=r.length;--s>=0;)e=r[s],e.z+=n,e.m+=n,n+=e.s+(i+=e.c)}function $r(t,e,n){return t.a.parent===e.parent?t.a:n}function Wr(t){return 1+fo.max(t,function(t){return t.y})}function qr(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function Br(t){var e=t.children;return e&&e.length?Br(e[0]):t}function Ur(t){var e,n=t.children;return n&&(e=n.length)?Ur(n[e-1]):t}function Yr(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Vr(t,e){var n=t.x+e[3],i=t.y+e[0],r=t.dx-e[1]-e[3],s=t.dy-e[0]-e[2];return r<0&&(n+=r/2,r=0),s<0&&(i+=s/2,s=0),{x:n,y:i,dx:r,dy:s}}function Kr(t){var e=t[0],n=t[t.length-1];return e<n?[e,n]:[n,e]}function Xr(t){return t.rangeExtent?t.rangeExtent():Kr(t.range())}function Gr(t,e,n,i){var r=n(t[0],t[1]),s=i(e[0],e[1]);return function(t){return s(r(t))}}function Jr(t,e){var n,i=0,r=t.length-1,s=t[i],o=t[r];return o<s&&(n=i,i=r,r=n,n=s,s=o,o=n),t[i]=e.floor(s),t[r]=e.ceil(o),t}function Zr(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:Ml}function Qr(t,e,n,i){var r=[],s=[],o=0,a=Math.min(t.length,e.length)-1;for(t[a]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<=a;)r.push(n(t[o-1],t[o])),s.push(i(e[o-1],e[o]));return function(e){var n=fo.bisect(t,e,1,a)-1;return s[n](r[n](e))}}function ts(t,e,n,i){function r(){var r=Math.min(t.length,e.length)>2?Qr:Gr,l=i?tr:Qi;return o=r(t,e,l,n),a=r(e,t,l,Ci),s}function s(t){return o(t)}var o,a;return s.invert=function(t){return a(t)},s.domain=function(e){return arguments.length?(t=e.map(Number),r()):t},s.range=function(t){return arguments.length?(e=t,r()):e},s.rangeRound=function(t){return s.range(t).interpolate(Wi)},s.clamp=function(t){return arguments.length?(i=t,r()):i},s.interpolate=function(t){return arguments.length?(n=t,r()):n},s.ticks=function(e){return rs(t,e)},s.tickFormat=function(e,n){return ss(t,e,n)},s.nice=function(e){return ns(t,e),r()},s.copy=function(){return ts(t,e,n,i)},r()}function es(t,e){return fo.rebind(t,e,"range","rangeRound","interpolate","clamp")}function ns(t,e){return Jr(t,Zr(is(t,e)[2])),Jr(t,Zr(is(t,e)[2])),t}function is(t,e){null==e&&(e=10);var n=Kr(t),i=n[1]-n[0],r=Math.pow(10,Math.floor(Math.log(i/e)/Math.LN10)),s=e/i*r;return s<=.15?r*=10:s<=.35?r*=5:s<=.75&&(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 rs(t,e){return fo.range.apply(fo,is(t,e))}function ss(t,e,n){var i=is(t,e);if(n){var r=da.exec(n);if(r.shift(),"s"===r[8]){var s=fo.formatPrefix(Math.max(ko(i[0]),ko(i[1])));return r[7]||(r[7]="."+os(s.scale(i[2]))),r[8]="f",n=fo.format(r.join("")),function(t){return n(s.scale(t))+s.symbol}}r[7]||(r[7]="."+as(r[8],i)),n=r.join("")}else n=",."+os(i[2])+"f";return fo.format(n)}function os(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function as(t,e){var n=os(e[2]);return t in Tl?Math.abs(n-os(Math.max(ko(e[0]),ko(e[1]))))+ +("e"!==t):n-2*("%"===t)}function ls(t,e,n,i){function r(t){return(n?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function s(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function o(e){return t(r(e))}return o.invert=function(e){return s(t.invert(e))},o.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((i=e.map(Number)).map(r)),o):i},o.base=function(n){return arguments.length?(e=+n,t.domain(i.map(r)),o):e},o.nice=function(){var e=Jr(i.map(r),n?Math:Sl);return t.domain(e),i=e.map(s),o},o.ticks=function(){var t=Kr(i),o=[],a=t[0],l=t[1],u=Math.floor(r(a)),h=Math.ceil(r(l)),c=e%1?2:e;if(isFinite(h-u)){if(n){for(;u<h;u++)for(var f=1;f<c;f++)o.push(s(u)*f);o.push(s(u))}else for(o.push(s(u));u++<h;)for(var f=c-1;f>0;f--)o.push(s(u)*f);for(u=0;o[u]<a;u++);for(h=o.length;o[h-1]>l;h--);o=o.slice(u,h)}return o},o.tickFormat=function(t,n){if(!arguments.length)return Dl;arguments.length<2?n=Dl:"function"!=typeof n&&(n=fo.format(n));var i=Math.max(1,e*t/o.ticks().length);return function(t){var o=t/s(Math.round(r(t)));return o*e<e-.5&&(o*=e),o<=i?n(t):""}},o.copy=function(){return ls(t.copy(),e,n,i)},es(o,t)}function us(t,e,n){function i(e){return t(r(e))}var r=hs(e),s=hs(1/e);return i.invert=function(e){return s(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 rs(n,t)},i.tickFormat=function(t,e){return ss(n,t,e)},i.nice=function(t){return i.domain(ns(n,t))},i.exponent=function(o){return arguments.length?(r=hs(e=o),s=hs(1/e),t.domain(n.map(r)),i):e},i.copy=function(){return us(t.copy(),e,n)},es(i,t)}function hs(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function cs(t,e){function n(n){return s[((r.get(n)||("range"===e.t?r.set(n,t.push(n)):NaN))-1)%s.length]}function i(e,n){return fo.range(t.length).map(function(t){return e+n*t})}var r,s,o;return n.domain=function(i){if(!arguments.length)return t;t=[],r=new p;for(var s,o=-1,a=i.length;++o<a;)r.has(s=i[o])||r.set(s,t.push(s));return n[e.t].apply(n,e.a)},n.range=function(t){return arguments.length?(s=t,o=0,e={t:"range",a:arguments},n):s},n.rangePoints=function(r,a){arguments.length<2&&(a=0);var l=r[0],u=r[1],h=t.length<2?(l=(l+u)/2,0):(u-l)/(t.length-1+a);return s=i(l+h*a/2,h),o=0,e={t:"rangePoints",a:arguments},n},n.rangeRoundPoints=function(r,a){arguments.length<2&&(a=0);var l=r[0],u=r[1],h=t.length<2?(l=u=Math.round((l+u)/2),0):(u-l)/(t.length-1+a)|0;return s=i(l+Math.round(h*a/2+(u-l-(t.length-1+a)*h)/2),h),o=0,e={t:"rangeRoundPoints",a:arguments},n},n.rangeBands=function(r,a,l){arguments.length<2&&(a=0),arguments.length<3&&(l=a);var u=r[1]<r[0],h=r[u-0],c=r[1-u],f=(c-h)/(t.length-a+2*l);return s=i(h+f*l,f),u&&s.reverse(),o=f*(1-a),e={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(r,a,l){arguments.length<2&&(a=0),arguments.length<3&&(l=a);var u=r[1]<r[0],h=r[u-0],c=r[1-u],f=Math.floor((c-h)/(t.length-a+2*l));return s=i(h+Math.round((c-h-(t.length-a)*f)/2),f),u&&s.reverse(),o=Math.round(f*(1-a)),e={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return o},n.rangeExtent=function(){return Kr(e.a[0])},n.copy=function(){return cs(t,e)},n.domain(t)}function fs(t,e){function n(){var n=0,s=e.length;for(r=[];++n<s;)r[n-1]=fo.quantile(t,n/s);return i}function i(t){if(!isNaN(t=+t))return e[fo.bisect(r,t)]}var r;return i.domain=function(e){return arguments.length?(t=e.map(l).filter(u).sort(a),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),n<0?[NaN,NaN]:[n>0?r[n-1]:t[0],n<r.length?r[n]:t[t.length-1]]},i.copy=function(){return fs(t,e)},n()}function ds(t,e,n){function i(e){return n[Math.max(0,Math.min(o,Math.floor(s*(e-t))))]}function r(){return s=n.length/(e-t),o=n.length-1,i}var s,o;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=e<0?NaN:e/s+t,[e,e+1/s]},i.copy=function(){return ds(t,e,n)},r()}function ps(t,e){function n(n){if(n<=n)return e[fo.bisect(t,n)]}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 ps(t,e)},n}function gs(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 rs(t,e)},e.tickFormat=function(e,n){return ss(t,e,n)},e.copy=function(){return gs(t)},e}function ms(){return 0}function vs(t){return t.innerRadius}function ys(t){return t.outerRadius}function bs(t){return t.startAngle}function _s(t){return t.endAngle}function xs(t){return t&&t.padAngle}function ws(t,e,n,i){return(t-n)*e-(e-i)*t>0?0:1}function ks(t,e,n,i,r){var s=t[0]-e[0],o=t[1]-e[1],a=(r?i:-i)/Math.sqrt(s*s+o*o),l=a*o,u=-a*s,h=t[0]+l,c=t[1]+u,f=e[0]+l,d=e[1]+u,p=(h+f)/2,g=(c+d)/2,m=f-h,v=d-c,y=m*m+v*v,b=n-i,_=h*d-f*c,x=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-_*_)),w=(_*v-m*x)/y,k=(-_*m-v*x)/y,C=(_*v+m*x)/y,M=(-_*m+v*x)/y,T=w-p,D=k-g,S=C-p,E=M-g;return T*T+D*D>S*S+E*E&&(w=C,k=M),[[w-l,k-u],[w*n/b,k*n/b]]}function Cs(t){function e(e){function o(){u.push("M",s(t(h),a))}for(var l,u=[],h=[],c=-1,f=e.length,d=Nt(n),p=Nt(i);++c<f;)r.call(this,l=e[c],c)?h.push([+d.call(this,l,c),+p.call(this,l,c)]):h.length&&(o(),h=[]);return h.length&&o(),u.length?u.join(""):null}var n=On,i=zn,r=Oe,s=Ms,o=s.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?(o="function"==typeof t?s=t:(s=Ol.get(t)||Ms).key,e):o},e.tension=function(t){return arguments.length?(a=t,e):a},e}function Ms(t){return t.length>1?t.join("L"):t+"Z"}function Ts(t){return t.join("L")+"Z"}function Ds(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 Ss(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 Es(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 Is(t,e){return t.length<4?Ms(t):t[1]+As(t.slice(1,-1),Os(t,e))}function Ns(t,e){return t.length<3?Ts(t):t[0]+As((t.push(t[0]),t),Os([t[t.length-2]].concat(t,[t[1]]),e))}function Ps(t,e){return t.length<3?Ms(t):t[0]+As(t,Os(t,e))}function As(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return Ms(t);var n=t.length!=e.length,i="",r=t[0],s=t[1],o=e[0],a=o,l=1;if(n&&(i+="Q"+(s[0]-2*o[0]/3)+","+(s[1]-2*o[1]/3)+","+s[0]+","+s[1],r=t[1],l=2),e.length>1){a=e[1],s=t[l],l++,i+="C"+(r[0]+o[0])+","+(r[1]+o[1])+","+(s[0]-a[0])+","+(s[1]-a[1])+","+s[0]+","+s[1];for(var u=2;u<e.length;u++,l++)s=t[l],a=e[u],i+="S"+(s[0]-a[0])+","+(s[1]-a[1])+","+s[0]+","+s[1]}if(n){var h=t[l];i+="Q"+(s[0]+2*a[0]/3)+","+(s[1]+2*a[1]/3)+","+h[0]+","+h[1]}return i}function Os(t,e){for(var n,i=[],r=(1-e)/2,s=t[0],o=t[1],a=1,l=t.length;++a<l;)n=s,s=o,o=t[a],i.push([r*(o[0]-n[0]),r*(o[1]-n[1])]);return i}function zs(t){if(t.length<3)return Ms(t);var e=1,n=t.length,i=t[0],r=i[0],s=i[1],o=[r,r,r,(i=t[1])[0]],a=[s,s,s,i[1]],l=[r,",",s,"L",Fs(Ll,o),",",Fs(Ll,a)];for(t.push(t[n-1]);++e<=n;)i=t[e],o.shift(),o.push(i[0]),a.shift(),a.push(i[1]),js(l,o,a);return t.pop(),l.push("L",i),l.join("")}function Hs(t){if(t.length<4)return Ms(t);for(var e,n=[],i=-1,r=t.length,s=[0],o=[0];++i<3;)e=t[i],s.push(e[0]),o.push(e[1]);for(n.push(Fs(Ll,s)+","+Fs(Ll,o)),--i;++i<r;)e=t[i],s.shift(),s.push(e[0]),o.shift(),o.push(e[1]),js(n,s,o);return n.join("")}function Ls(t){for(var e,n,i=-1,r=t.length,s=r+4,o=[],a=[];++i<4;)n=t[i%r],o.push(n[0]),a.push(n[1]);for(e=[Fs(Ll,o),",",Fs(Ll,a)],--i;++i<s;)n=t[i%r],o.shift(),o.push(n[0]),a.shift(),a.push(n[1]),js(e,o,a);return e.join("")}function Rs(t,e){var n=t.length-1;if(n)for(var i,r,s=t[0][0],o=t[0][1],a=t[n][0]-s,l=t[n][1]-o,u=-1;++u<=n;)i=t[u],r=u/n,i[0]=e*i[0]+(1-e)*(s+r*a),i[1]=e*i[1]+(1-e)*(o+r*l);return zs(t)}function Fs(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function js(t,e,n){t.push("C",Fs(zl,e),",",Fs(zl,n),",",Fs(Hl,e),",",Fs(Hl,n),",",Fs(Ll,e),",",Fs(Ll,n))}function $s(t,e){return(e[1]-t[1])/(e[0]-t[0])}function Ws(t){for(var e=0,n=t.length-1,i=[],r=t[0],s=t[1],o=i[0]=$s(r,s);++e<n;)i[e]=(o+(o=$s(r=s,s=t[e+1])))/2;return i[e]=o,i}function qs(t){for(var e,n,i,r,s=[],o=Ws(t),a=-1,l=t.length-1;++a<l;)e=$s(t[a],t[a+1]),ko(e)<jo?o[a]=o[a+1]=0:(n=o[a]/e,i=o[a+1]/e,(r=n*n+i*i)>9&&(r=3*e/Math.sqrt(r),o[a]=r*n,o[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+o[a]*o[a])),s.push([r||0,o[a]*r||0]);return s}function Bs(t){return t.length<3?Ms(t):t[0]+As(t,qs(t))}function Us(t){for(var e,n,i,r=-1,s=t.length;++r<s;)e=t[r],n=e[0],i=e[1]-Uo,e[0]=n*Math.cos(i),e[1]=n*Math.sin(i);return t}function Ys(t){function e(e){function l(){g.push("M",a(t(v),c),h,u(t(m.reverse()),c),"Z")}for(var f,d,p,g=[],m=[],v=[],y=-1,b=e.length,_=Nt(n),x=Nt(r),w=n===i?function(){return d}:Nt(i),k=r===s?function(){return p}:Nt(s);++y<b;)o.call(this,f=e[y],y)?(m.push([d=+_.call(this,f,y),p=+x.call(this,f,y)]),v.push([+w.call(this,f,y),+k.call(this,f,y)])):m.length&&(l(),m=[],v=[]);return m.length&&l(),g.length?g.join(""):null}var n=On,i=On,r=0,s=zn,o=Oe,a=Ms,l=a.key,u=a,h="L",c=.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=s=t,e):s},e.y0=function(t){return arguments.length?(r=t,e):r},e.y1=function(t){return arguments.length?(s=t,e):s},e.defined=function(t){return arguments.length?(o=t,e):o},e.interpolate=function(t){return arguments.length?(l="function"==typeof t?a=t:(a=Ol.get(t)||Ms).key,u=a.reverse||a,h=a.closed?"M":"L",e):l},e.tension=function(t){return arguments.length?(c=t,e):c},e}function Vs(t){return t.radius}function Ks(t){return[t.x,t.y]}function Xs(t){return function(){var e=t.apply(this,arguments),n=e[0],i=e[1]-Uo;return[n*Math.cos(i),n*Math.sin(i)]}}function Gs(){return 64}function Js(){return"circle"}function Zs(t){var e=Math.sqrt(t/Wo);return"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+-e+"A"+e+","+e+" 0 1,1 0,"+e+"Z"}function Qs(t){return function(){var e,n,i;(e=this[t])&&(i=e[n=e.active])&&(i.timer.c=null,i.timer.t=NaN,--e.count?delete e[n]:delete this[t],e.active+=.5,i.event&&i.event.interrupt.call(this,this.__data__,i.index))}}function to(t,e,n){return So(t,Bl),t.namespace=e,t.id=n,t}function eo(t,e,n,i){var r=t.id,s=t.namespace;return K(t,"function"==typeof n?function(t,o,a){t[s][r].tween.set(e,i(n.call(t,t.__data__,o,a)))}:(n=i(n),function(t){t[s][r].tween.set(e,n)}))}function no(t){return null==t&&(t=""),function(){this.textContent=t}}function io(t){return null==t?"__transition__":"__transition_"+t+"__"}function ro(t,e,n,i,r){function s(t){var e=g.delay;if(u.t=e+l,e<=t)return o(t-e);u.c=o}function o(n){var r=d.active,s=d[r];s&&(s.timer.c=null,s.timer.t=NaN,--d.count,delete d[r],s.event&&s.event.interrupt.call(t,t.__data__,s.index));for(var o in d)if(+o<i){var p=d[o];p.timer.c=null,p.timer.t=NaN,--d.count,delete d[o]}u.c=a,Ht(function(){return u.c&&a(n||1)&&(u.c=null,u.t=NaN),1},0,l),d.active=i,g.event&&g.event.start.call(t,t.__data__,e),f=[],g.tween.forEach(function(n,i){(i=i.call(t,t.__data__,e))&&f.push(i)}),c=g.ease,h=g.duration}function a(r){for(var s=r/h,o=c(s),a=f.length;a>0;)f[--a].call(t,o);if(s>=1)return g.event&&g.event.end.call(t,t.__data__,e),--d.count?delete d[i]:delete t[n],1}var l,u,h,c,f,d=t[n]||(t[n]={active:0,count:0}),g=d[i];g||(l=r.time,u=Ht(s,0,l),g=d[i]={tween:new p,time:l,timer:u,delay:r.delay,duration:r.duration,ease:r.ease,index:e},r=null,++d.count)}function so(t,e,n){t.attr("transform",function(t){var i=e(t);return"translate("+(isFinite(i)?i:n(t))+",0)"})}function oo(t,e,n){t.attr("transform",function(t){var i=e(t);return"translate(0,"+(isFinite(i)?i:n(t))+")"})}function ao(t){return t.toISOString()}function lo(t,e,n){function i(e){return t(e)}function r(t,n){var i=t[1]-t[0],r=i/n,s=fo.bisect(Ql,r);return s==Ql.length?[e.year,is(t.map(function(t){return t/31536e6}),n)[2]]:s?e[r/Ql[s-1]<Ql[s]/r?s-1:s]:[nu,is(t,n)[2]]}return i.invert=function(e){return uo(t.invert(e))},i.domain=function(e){return arguments.length?(t.domain(e),i):t.domain().map(uo)},i.nice=function(t,e){function n(n){return!isNaN(n)&&!t.range(n,uo(+n+1),e).length}var s=i.domain(),o=Kr(s),a=null==t?r(o,10):"number"==typeof t&&r(o,t);return a&&(t=a[0],e=a[1]),i.domain(Jr(s,e>1?{floor:function(e){for(;n(e=t.floor(e));)e=uo(e-1);return e},ceil:function(e){for(;n(e=t.ceil(e));)e=uo(+e+1);return e}}:t))},i.ticks=function(t,e){var n=Kr(i.domain()),s=null==t?r(n,10):"number"==typeof t?r(n,t):!t.range&&[{range:t},e];return s&&(t=s[0],e=s[1]),t.range(n[0],uo(+n[1]+1),e<1?1:e)},i.tickFormat=function(){return n},i.copy=function(){return lo(t.copy(),e,n)},es(i,t)}function uo(t){return new Date(t)}function ho(t){return JSON.parse(t.responseText)}function co(t){var e=mo.createRange();return e.selectNode(mo.body),e.createContextualFragment(t.responseText)}var fo={version:"3.5.17"},po=[].slice,go=function(t){return po.call(t)},mo=this.document;if(mo)try{go(mo.documentElement.childNodes)[0].nodeType}catch(t){go=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}if(Date.now||(Date.now=function(){return+new Date}),mo)try{mo.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var vo=this.Element.prototype,yo=vo.setAttribute,bo=vo.setAttributeNS,_o=this.CSSStyleDeclaration.prototype,xo=_o.setProperty;vo.setAttribute=function(t,e){yo.call(this,t,e+"")},vo.setAttributeNS=function(t,e,n){bo.call(this,t,e,n+"")},_o.setProperty=function(t,e,n){xo.call(this,t,e+"",n)}}fo.ascending=a,fo.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},fo.min=function(t,e){var n,i,r=-1,s=t.length;if(1===arguments.length){for(;++r<s;)if(null!=(i=t[r])&&i>=i){n=i;break}for(;++r<s;)null!=(i=t[r])&&n>i&&(n=i)}else{for(;++r<s;)if(null!=(i=e.call(t,t[r],r))&&i>=i){n=i;break}for(;++r<s;)null!=(i=e.call(t,t[r],r))&&n>i&&(n=i)}return n},fo.max=function(t,e){var n,i,r=-1,s=t.length;if(1===arguments.length){for(;++r<s;)if(null!=(i=t[r])&&i>=i){n=i;break}for(;++r<s;)null!=(i=t[r])&&i>n&&(n=i)}else{for(;++r<s;)if(null!=(i=e.call(t,t[r],r))&&i>=i){n=i;break}for(;++r<s;)null!=(i=e.call(t,t[r],r))&&i>n&&(n=i)}return n},fo.extent=function(t,e){var n,i,r,s=-1,o=t.length;if(1===arguments.length){for(;++s<o;)if(null!=(i=t[s])&&i>=i){n=r=i;break}for(;++s<o;)null!=(i=t[s])&&(n>i&&(n=i),r<i&&(r=i))}else{for(;++s<o;)if(null!=(i=e.call(t,t[s],s))&&i>=i){n=r=i;break}for(;++s<o;)null!=(i=e.call(t,t[s],s))&&(n>i&&(n=i),r<i&&(r=i))}return[n,r]},fo.sum=function(t,e){var n,i=0,r=t.length,s=-1;if(1===arguments.length)for(;++s<r;)u(n=+t[s])&&(i+=n);else for(;++s<r;)u(n=+e.call(t,t[s],s))&&(i+=n);return i},fo.mean=function(t,e){var n,i=0,r=t.length,s=-1,o=r;if(1===arguments.length)for(;++s<r;)u(n=l(t[s]))?i+=n:--o;else for(;++s<r;)u(n=l(e.call(t,t[s],s)))?i+=n:--o;if(o)return i/o},fo.quantile=function(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],s=n-i;return s?r+s*(t[i]-r):r},fo.median=function(t,e){var n,i=[],r=t.length,s=-1;if(1===arguments.length)for(;++s<r;)u(n=l(t[s]))&&i.push(n);else for(;++s<r;)u(n=l(e.call(t,t[s],s)))&&i.push(n);if(i.length)return fo.quantile(i.sort(a),.5)},fo.variance=function(t,e){var n,i,r=t.length,s=0,o=0,a=-1,h=0;if(1===arguments.length)for(;++a<r;)u(n=l(t[a]))&&(i=n-s,s+=i/++h,o+=i*(n-s));else for(;++a<r;)u(n=l(e.call(t,t[a],a)))&&(i=n-s,s+=i/++h,o+=i*(n-s));if(h>1)return o/(h-1)},fo.deviation=function(){var t=fo.variance.apply(this,arguments);return t?Math.sqrt(t):t};var wo=h(a);fo.bisectLeft=wo.left,fo.bisect=fo.bisectRight=wo.right,fo.bisector=function(t){return h(1===t.length?function(e,n){return a(t(e),n)}:t)},fo.shuffle=function(t,e,n){(s=arguments.length)<3&&(n=t.length,s<2&&(e=0));for(var i,r,s=n-e;s;)r=Math.random()*s--|0,i=t[s+e],t[s+e]=t[r+e],t[r+e]=i;return t},fo.permute=function(t,e){for(var n=e.length,i=new Array(n);n--;)i[n]=t[e[n]];return i},fo.pairs=function(t){for(var e=0,n=t.length-1,i=t[0],r=new Array(n<0?0:n);e<n;)r[e]=[i,i=t[++e]];return r},fo.transpose=function(t){if(!(r=t.length))return[];for(var e=-1,n=fo.min(t,c),i=new Array(n);++e<n;)for(var r,s=-1,o=i[e]=new Array(r);++s<r;)o[s]=t[s][e];return i},fo.zip=function(){return fo.transpose(arguments)},fo.keys=function(t){var e=[];for(var n in t)e.push(n);return e},fo.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},fo.entries=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},fo.merge=function(t){for(var e,n,i,r=t.length,s=-1,o=0;++s<r;)o+=t[s].length;for(n=new Array(o);--r>=0;)for(i=t[r],e=i.length;--e>=0;)n[--o]=i[e];return n};var ko=Math.abs;fo.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n==1/0)throw new Error("infinite range");var i,r=[],s=f(ko(n)),o=-1;if(t*=s,e*=s,n*=s,n<0)for(;(i=t+n*++o)>e;)r.push(i/s);else for(;(i=t+n*++o)<e;)r.push(i/s);return r},fo.map=function(t,e){var n=new p;if(t instanceof p)t.forEach(function(t,e){n.set(t,e)});else if(Array.isArray(t)){var i,r=-1,s=t.length;if(1===arguments.length)for(;++r<s;)n.set(r,t[r]);else for(;++r<s;)n.set(e.call(t,i=t[r],r),i)}else for(var o in t)n.set(o,t[o]);return n};var Co="__proto__",Mo="\0";d(p,{has:v,get:function(t){return this._[g(t)]},set:function(t,e){return this._[g(t)]=e},remove:y,keys:b,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:m(e),value:this._[e]});return t},size:_,empty:x,forEach:function(t){for(var e in this._)t.call(this,m(e),this._[e])}}),fo.nest=function(){function t(e,o,a){if(a>=s.length)return i?i.call(r,o):n?o.sort(n):o;for(var l,u,h,c,f=-1,d=o.length,g=s[a++],m=new p;++f<d;)(c=m.get(l=g(u=o[f])))?c.push(u):m.set(l,[u]);return e?(u=e(),h=function(n,i){u.set(n,t(e,i,a))}):(u={},h=function(n,i){u[n]=t(e,i,a)}),m.forEach(h),u}function e(t,n){if(n>=s.length)return t;var i=[],r=o[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,r={},s=[],o=[];return r.map=function(e,n){return t(n,e,0)},r.entries=function(n){return e(t(fo.map,n,0),0)},r.key=function(t){return s.push(t),r},r.sortKeys=function(t){return o[s.length-1]=t,r},r.sortValues=function(t){return n=t,r},r.rollup=function(t){return i=t,r},r},fo.set=function(t){var e=new w;if(t)for(var n=0,i=t.length;n<i;++n)e.add(t[n]);return e},d(w,{has:v,add:function(t){return this._[g(t+="")]=!0,t},remove:y,values:b,size:_,empty:x,forEach:function(t){for(var e in this._)t.call(this,m(e))}}),fo.behavior={},fo.rebind=function(t,e){for(var n,i=1,r=arguments.length;++i<r;)t[n=arguments[i]]=C(t,e,e[n]);return t};var To=["webkit","ms","moz","Moz","o","O"];fo.dispatch=function(){for(var t=new D,e=-1,n=arguments.length;++e<n;)t[arguments[e]]=S(t);return t},D.prototype.on=function(t,e){var n=t.indexOf("."),i="";if(n>=0&&(i=t.slice(n+1),t=t.slice(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}},fo.event=null,fo.requote=function(t){return t.replace(Do,"\\$&")};var Do=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,So={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]},Eo=function(t,e){return e.querySelector(t)},Io=function(t,e){return e.querySelectorAll(t)},No=function(t,e){var n=t.matches||t[M(t,"matchesSelector")];return(No=function(t,e){return n.call(t,e)})(t,e)};"function"==typeof Sizzle&&(Eo=function(t,e){return Sizzle(t,e)[0]||null},Io=Sizzle,No=Sizzle.matchesSelector),fo.selection=function(){return fo.select(mo.documentElement)};var Po=fo.selection.prototype=[];Po.select=function(t){var e,n,i,r,s=[];t=A(t);for(var o=-1,a=this.length;++o<a;){s.push(e=[]),e.parentNode=(i=this[o]).parentNode;for(var l=-1,u=i.length;++l<u;)(r=i[l])?(e.push(n=t.call(r,r.__data__,l,o)),n&&"__data__"in r&&(n.__data__=r.__data__)):e.push(null)}return P(s)},Po.selectAll=function(t){var e,n,i=[];t=O(t);for(var r=-1,s=this.length;++r<s;)for(var o=this[r],a=-1,l=o.length;++a<l;)(n=o[a])&&(i.push(e=go(t.call(n,n.__data__,a,r))),e.parentNode=n);return P(i)};var Ao="http://www.w3.org/1999/xhtml",Oo={svg:"http://www.w3.org/2000/svg",xhtml:Ao,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};fo.ns={prefix:Oo,qualify:function(t){var e=t.indexOf(":"),n=t;return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Oo.hasOwnProperty(n)?{space:Oo[n],local:t}:t}},Po.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return t=fo.ns.qualify(t),t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(z(e,t[e]));return this}return this.each(z(t,e))},Po.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),i=(t=R(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(!L(t[r]).test(e))return!1;return!0}for(e in t)this.each(F(e,t[e]));return this}return this.each(F(t,e))},Po.style=function(t,e,n){var i=arguments.length;if(i<3){if("string"!=typeof t){i<2&&(e="");for(n in t)this.each($(n,t[n],e));return this}if(i<2){var r=this.node();return o(r).getComputedStyle(r,null).getPropertyValue(t)}n=""}return this.each($(t,e,n))},Po.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(W(e,t[e]));return this}return this.each(W(t,e))},Po.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},Po.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},Po.append=function(t){return t=q(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},Po.insert=function(t,e){return t=q(t),e=A(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},Po.remove=function(){return this.each(B)},Po.data=function(t,e){function n(t,n){var i,r,s,o=t.length,h=n.length,c=Math.min(o,h),f=new Array(h),d=new Array(h),g=new Array(o);if(e){var m,v=new p,y=new Array(o);for(i=-1;++i<o;)(r=t[i])&&(v.has(m=e.call(r,r.__data__,i))?g[i]=r:v.set(m,r),y[i]=m);for(i=-1;++i<h;)(r=v.get(m=e.call(n,s=n[i],i)))?!0!==r&&(f[i]=r,r.__data__=s):d[i]=U(s),v.set(m,!0);for(i=-1;++i<o;)i in y&&!0!==v.get(y[i])&&(g[i]=t[i])}else{for(i=-1;++i<c;)r=t[i],s=n[i],r?(r.__data__=s,f[i]=r):d[i]=U(s);for(;i<h;++i)d[i]=U(n[i]);for(;i<o;++i)g[i]=t[i]}d.update=f,d.parentNode=f.parentNode=g.parentNode=t.parentNode,a.push(d),l.push(f),u.push(g)}var i,r,s=-1,o=this.length;if(!arguments.length){for(t=new Array(o=(i=this[0]).length);++s<o;)(r=i[s])&&(t[s]=r.__data__);return t}var a=X([]),l=P([]),u=P([]);if("function"==typeof t)for(;++s<o;)n(i=this[s],t.call(i,i.parentNode.__data__,s));else for(;++s<o;)n(i=this[s],t);return l.enter=function(){return a},l.exit=function(){return u},l},Po.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},Po.filter=function(t){var e,n,i,r=[];"function"!=typeof t&&(t=Y(t));for(var s=0,o=this.length;s<o;s++){r.push(e=[]),e.parentNode=(n=this[s]).parentNode;for(var a=0,l=n.length;a<l;a++)(i=n[a])&&t.call(i,i.__data__,a,s)&&e.push(i)}return P(r)},Po.order=function(){for(var t=-1,e=this.length;++t<e;)for(var n,i=this[t],r=i.length-1,s=i[r];--r>=0;)(n=i[r])&&(s&&s!==n.nextSibling&&s.parentNode.insertBefore(n,s),s=n);return this},Po.sort=function(t){t=V.apply(this,arguments);for(var e=-1,n=this.length;++e<n;)this[e].sort(t);return this.order()},Po.each=function(t){return K(this,function(e,n,i){t.call(e,e.__data__,n,i)})},Po.call=function(t){var e=go(arguments);return t.apply(e[0]=this,e),this},Po.empty=function(){return!this.node()},Po.node=function(){for(var t=0,e=this.length;t<e;t++)for(var n=this[t],i=0,r=n.length;i<r;i++){var s=n[i];if(s)return s}return null},Po.size=function(){var t=0;return K(this,function(){++t}),t};var zo=[];fo.selection.enter=X,fo.selection.enter.prototype=zo,zo.append=Po.append,zo.empty=Po.empty,zo.node=Po.node,zo.call=Po.call,zo.size=Po.size,zo.select=function(t){for(var e,n,i,r,s,o=[],a=-1,l=this.length;++a<l;){i=(r=this[a]).update,o.push(e=[]),e.parentNode=r.parentNode;for(var u=-1,h=r.length;++u<h;)(s=r[u])?(e.push(i[u]=n=t.call(r.parentNode,s.__data__,u,a)),n.__data__=s.__data__):e.push(null)}return P(o)},zo.insert=function(t,e){return arguments.length<2&&(e=G(this)),Po.insert.call(this,t,e)},fo.select=function(t){var e;return"string"==typeof t?(e=[Eo(t,mo)],e.parentNode=mo.documentElement):(e=[t],e.parentNode=s(t)),P([e])},fo.selectAll=function(t){var e;return"string"==typeof t?(e=go(Io(t,mo)),e.parentNode=mo.documentElement):(e=go(t),e.parentNode=null),P([e])},Po.on=function(t,e,n){var i=arguments.length;if(i<3){if("string"!=typeof t){i<2&&(e=!1);for(n in t)this.each(J(n,t[n],e));return this}if(i<2)return(i=this.node()["__on"+t])&&i._;n=!1}return this.each(J(t,e,n))};var Ho=fo.map({mouseenter:"mouseover",mouseleave:"mouseout"});mo&&Ho.forEach(function(t){"on"+t in mo&&Ho.remove(t)});var Lo,Ro=0;fo.mouse=function(t){return et(t,I())};var Fo=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;fo.touch=function(t,e,n){if(arguments.length<3&&(n=e,e=I().changedTouches),e)for(var i,r=0,s=e.length;r<s;++r)if((i=e[r]).identifier===n)return et(t,i)},fo.behavior.drag=function(){function t(){this.on("mousedown.drag",r).on("touchstart.drag",s)}function e(t,e,r,s,o){return function(){function a(){var t,n,i=e(f,g);i&&(t=i[0]-b[0],n=i[1]-b[1],p|=t|n,b=i,d({type:"drag",x:i[0]+u[0],y:i[1]+u[1],dx:t,dy:n}))}function l(){e(f,g)&&(v.on(s+m,null).on(o+m,null),y(p),d({type:"dragend"}))}var u,h=this,c=fo.event.target.correspondingElement||fo.event.target,f=h.parentNode,d=n.of(h,arguments),p=0,g=t(),m=".drag"+(null==g?"":"-"+g),v=fo.select(r(c)).on(s+m,a).on(o+m,l),y=tt(c),b=e(f,g);i?(u=i.apply(h,arguments),u=[u.x-b[0],u.y-b[1]]):u=[0,0],d({type:"dragstart"})}}var n=N(t,"drag","dragstart","dragend"),i=null,r=e(T,fo.mouse,o,"mousemove","mouseup"),s=e(nt,fo.touch,k,"touchmove","touchend");return t.origin=function(e){return arguments.length?(i=e,t):i},fo.rebind(t,n,"on")},fo.touches=function(t,e){return arguments.length<2&&(e=I().touches),e?go(e).map(function(e){var n=et(t,e);return n.identifier=e.identifier,n}):[]};var jo=1e-6,$o=jo*jo,Wo=Math.PI,qo=2*Wo,Bo=qo-jo,Uo=Wo/2,Yo=Wo/180,Vo=180/Wo,Ko=Math.SQRT2;fo.interpolateZoom=function(t,e){var n,i,r=t[0],s=t[1],o=t[2],a=e[0],l=e[1],u=e[2],h=a-r,c=l-s,f=h*h+c*c;if(f<$o)i=Math.log(u/o)/Ko,n=function(t){return[r+t*h,s+t*c,o*Math.exp(Ko*t*i)]};else{var d=Math.sqrt(f),p=(u*u-o*o+4*f)/(2*o*2*d),g=(u*u-o*o-4*f)/(2*u*2*d),m=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(g*g+1)-g);i=(v-m)/Ko,n=function(t){var e=t*i,n=lt(m),a=o/(2*d)*(n*ut(Ko*e+m)-at(m));return[r+a*h,s+a*c,o*n/lt(Ko*e+m)]}}return n.duration=1e3*i,n},fo.behavior.zoom=function(){function t(t){t.on(I,c).on(Go+".zoom",d).on("dblclick.zoom",p).on(O,f)}function e(t){return[(t[0]-C.x)/C.k,(t[1]-C.y)/C.k]}function n(t){return[t[0]*C.k+C.x,t[1]*C.k+C.y]}function i(t){C.k=Math.max(T[0],Math.min(T[1],t))}function r(t,e){e=n(e),C.x+=t[0]-e[0],C.y+=t[1]-e[1]}function s(e,n,s,o){e.__chart__={x:C.x,y:C.y,k:C.k},i(Math.pow(2,o)),r(m=n,s),e=fo.select(e),D>0&&(e=e.transition().duration(D)),e.call(t.event)}function a(){x&&x.domain(_.range().map(function(t){return(t-C.x)/C.k}).map(_.invert)),k&&k.domain(w.range().map(function(t){return(t-C.y)/C.k}).map(w.invert))}function l(t){S++||t({type:"zoomstart"})}function u(t){a(),t({type:"zoom",scale:C.k,translate:[C.x,C.y]})}function h(t){--S||(t({type:"zoomend"}),m=null)}function c(){function t(){a=1,r(fo.mouse(i),f),u(s)}function n(){c.on(P,null).on(A,null),d(a),h(s)}var i=this,s=z.of(i,arguments),a=0,c=fo.select(o(i)).on(P,t).on(A,n),f=e(fo.mouse(i)),d=tt(i);ql.call(i),l(s)}function f(){function t(){var t=fo.touches(p);return d=C.k,t.forEach(function(t){t.identifier in m&&(m[t.identifier]=e(t))}),t}function n(){var e=fo.event.target;fo.select(e).on(_,o).on(x,a),w.push(e);for(var n=fo.event.changedTouches,i=0,r=n.length;i<r;++i)m[n[i].identifier]=null;var l=t(),u=Date.now();if(1===l.length){if(u-b<500){var h=l[0];s(p,h,m[h.identifier],Math.floor(Math.log(C.k)/Math.LN2)+1),E()}b=u}else if(l.length>1){var h=l[0],c=l[1],f=h[0]-c[0],d=h[1]-c[1];v=f*f+d*d}}function o(){var t,e,n,s,o=fo.touches(p);ql.call(p);for(var a=0,l=o.length;a<l;++a,s=null)if(n=o[a],s=m[n.identifier]){if(e)break;t=n,e=s}if(s){var h=(h=n[0]-t[0])*h+(h=n[1]-t[1])*h,c=v&&Math.sqrt(h/v);t=[(t[0]+n[0])/2,(t[1]+n[1])/2],e=[(e[0]+s[0])/2,(e[1]+s[1])/2],i(c*d)}b=null,r(t,e),u(g)}function a(){if(fo.event.touches.length){for(var e=fo.event.changedTouches,n=0,i=e.length;n<i;++n)delete m[e[n].identifier];for(var r in m)return void t()}fo.selectAll(w).on(y,null),k.on(I,c).on(O,f),M(),h(g)}var d,p=this,g=z.of(p,arguments),m={},v=0,y=".zoom-"+fo.event.changedTouches[0].identifier,_="touchmove"+y,x="touchend"+y,w=[],k=fo.select(p),M=tt(p);n(),l(g),k.on(I,null).on(O,n)}function d(){var t=z.of(this,arguments);y?clearTimeout(y):(ql.call(this),g=e(m=v||fo.mouse(this)),l(t)),y=setTimeout(function(){y=null,h(t)},50),E(),i(Math.pow(2,.002*Xo())*C.k),r(m,g),u(t)}function p(){var t=fo.mouse(this),n=Math.log(C.k)/Math.LN2;s(this,t,e(t),fo.event.shiftKey?Math.ceil(n)-1:Math.floor(n)+1)}var g,m,v,y,b,_,x,w,k,C={x:0,y:0,k:1},M=[960,500],T=Jo,D=250,S=0,I="mousedown.zoom",P="mousemove.zoom",A="mouseup.zoom",O="touchstart.zoom",z=N(t,"zoomstart","zoom","zoomend");return Go||(Go="onwheel"in mo?(Xo=function(){return-fo.event.deltaY*(fo.event.deltaMode?120:1)},"wheel"):"onmousewheel"in mo?(Xo=function(){return fo.event.wheelDelta},"mousewheel"):(Xo=function(){return-fo.event.detail},"MozMousePixelScroll")),t.event=function(t){t.each(function(){var t=z.of(this,arguments),e=C;$l?fo.select(this).transition().each("start.zoom",function(){C=this.__chart__||{x:0,y:0,k:1},l(t)}).tween("zoom:zoom",function(){var n=M[0],i=M[1],r=m?m[0]:n/2,s=m?m[1]:i/2,o=fo.interpolateZoom([(r-C.x)/C.k,(s-C.y)/C.k,n/C.k],[(r-e.x)/e.k,(s-e.y)/e.k,n/e.k]);return function(e){var i=o(e),a=n/i[2];this.__chart__=C={x:r-i[0]*a,y:s-i[1]*a,k:a},u(t)}}).each("interrupt.zoom",function(){h(t)}).each("end.zoom",function(){h(t)}):(this.__chart__=C,l(t),u(t),h(t))})},t.translate=function(e){return arguments.length?(C={x:+e[0],y:+e[1],k:C.k},a(),t):[C.x,C.y]},t.scale=function(e){return arguments.length?(C={x:C.x,y:C.y,k:null},i(+e),a(),t):C.k},t.scaleExtent=function(e){return arguments.length?(T=null==e?Jo:[+e[0],+e[1]],t):T},t.center=function(e){return arguments.length?(v=e&&[+e[0],+e[1]],t):v},t.size=function(e){return arguments.length?(M=e&&[+e[0],+e[1]],t):M},t.duration=function(e){return arguments.length?(D=+e,t):D},t.x=function(e){return arguments.length?(x=e,_=e.copy(),C={x:0,y:0,k:1},t):x},t.y=function(e){return arguments.length?(k=e,w=e.copy(),C={x:0,y:0,k:1},t):k},fo.rebind(t,z,"on")};var Xo,Go,Jo=[0,1/0];fo.color=ct,ct.prototype.toString=function(){return this.rgb()+""},fo.hsl=ft;var Zo=ft.prototype=new ct;Zo.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new ft(this.h,this.s,this.l/t)},Zo.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new ft(this.h,this.s,t*this.l)},Zo.rgb=function(){return dt(this.h,this.s,this.l)},fo.hcl=pt;var Qo=pt.prototype=new ct;Qo.brighter=function(t){return new pt(this.h,this.c,Math.min(100,this.l+ta*(arguments.length?t:1)))},Qo.darker=function(t){return new pt(this.h,this.c,Math.max(0,this.l-ta*(arguments.length?t:1)))},Qo.rgb=function(){return gt(this.h,this.c,this.l).rgb()},fo.lab=mt;var ta=18,ea=.95047,na=1,ia=1.08883,ra=mt.prototype=new ct;ra.brighter=function(t){return new mt(Math.min(100,this.l+ta*(arguments.length?t:1)),this.a,this.b)},ra.darker=function(t){return new mt(Math.max(0,this.l-ta*(arguments.length?t:1)),this.a,this.b)},ra.rgb=function(){return vt(this.l,this.a,this.b)},fo.rgb=wt;var sa=wt.prototype=new ct;sa.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&&e<r&&(e=r),n&&n<r&&(n=r),i&&i<r&&(i=r),new wt(Math.min(255,e/t),Math.min(255,n/t),Math.min(255,i/t))):new wt(r,r,r)},sa.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new wt(t*this.r,t*this.g,t*this.b)},sa.hsl=function(){return Dt(this.r,this.g,this.b)},sa.toString=function(){return"#"+Mt(this.r)+Mt(this.g)+Mt(this.b)};var oa=fo.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,rebeccapurple:6697881,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});oa.forEach(function(t,e){oa.set(t,kt(e))}),fo.functor=Nt,fo.xhr=Pt(k),fo.dsv=function(t,e){function n(t,n,s){arguments.length<3&&(s=n,n=null);var o=At(t,e,null==n?i:r(n),s);return o.row=function(t){return arguments.length?o.response(null==(n=t)?i:r(t)):n},o}function i(t){return n.parse(t.responseText)}function r(t){return function(e){return n.parse(e.responseText,t)}}function s(e){return e.map(o).join(t)}function o(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(h>=u)return o;if(r)return r=!1,s;var e=h;if(34===t.charCodeAt(e)){for(var n=e;n++<u;)if(34===t.charCodeAt(n)){if(34!==t.charCodeAt(n+1))break;++n}h=n+2;var i=t.charCodeAt(n+1);return 13===i?(r=!0,10===t.charCodeAt(n+2)&&++h):10===i&&(r=!0),t.slice(e+1,n).replace(/""/g,'"')}for(;h<u;){var i=t.charCodeAt(h++),a=1;if(10===i)r=!0;else if(13===i)r=!0,10===t.charCodeAt(h)&&(++h,++a);else if(i!==l)continue;return t.slice(e,h-a)}return t.slice(e)}for(var i,r,s={},o={},a=[],u=t.length,h=0,c=0;(i=n())!==o;){for(var f=[];i!==s&&i!==o;)f.push(i),i=n();e&&null==(f=e(f,c++))||a.push(f)}return a},n.format=function(e){if(Array.isArray(e[0]))return n.formatRows(e);var i=new w,r=[];return e.forEach(function(t){for(var e in t)i.has(e)||r.push(i.add(e))}),[r.map(o).join(t)].concat(e.map(function(e){return r.map(function(t){return o(e[t])}).join(t)})).join("\n")},n.formatRows=function(t){return t.map(s).join("\n")},n},fo.csv=fo.dsv(",","text/csv"),fo.tsv=fo.dsv("\t","text/tab-separated-values");var aa,la,ua,ha,ca=this[M(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};fo.timer=function(){Ht.apply(this,arguments)},fo.timer.flush=function(){Rt(),Ft()},fo.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var fa=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map($t);fo.formatPrefix=function(t,e){var n=0;return(t=+t)&&(t<0&&(t*=-1),e&&(t=fo.round(t,jt(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),fa[8+n/3]};var da=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,pa=fo.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=fo.round(t,jt(t,e))).toFixed(Math.max(0,Math.min(20,jt(t*(1+1e-15),e))))}}),ga=fo.time={},ma=Date;Bt.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(){va.setUTCDate.apply(this._,arguments)},setDay:function(){va.setUTCDay.apply(this._,arguments)},setFullYear:function(){va.setUTCFullYear.apply(this._,arguments)},setHours:function(){va.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){va.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){va.setUTCMinutes.apply(this._,arguments)},setMonth:function(){va.setUTCMonth.apply(this._,arguments)},setSeconds:function(){va.setUTCSeconds.apply(this._,arguments)},setTime:function(){va.setTime.apply(this._,arguments)}};var va=Date.prototype;ga.year=Ut(function(t){return t=ga.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),ga.years=ga.year.range,ga.years.utc=ga.year.utc.range,ga.day=Ut(function(t){var e=new ma(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}),ga.days=ga.day.range,ga.days.utc=ga.day.utc.range,ga.dayOfYear=function(t){var e=ga.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=ga[t]=Ut(function(t){return(t=ga.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=ga.year(t).getDay();return Math.floor((ga.dayOfYear(t)+(n+e)%7)/7)-(n!==e)});ga[t+"s"]=n.range,ga[t+"s"].utc=n.utc.range,ga[t+"OfYear"]=function(t){var n=ga.year(t).getDay();return Math.floor((ga.dayOfYear(t)+(n+e)%7)/7)}}),ga.week=ga.sunday,ga.weeks=ga.sunday.range,ga.weeks.utc=ga.sunday.utc.range,ga.weekOfYear=ga.sundayOfYear;var ya={"-":"",_:" ",0:"0"},ba=/^\s*\d+/,_a=/^%/;fo.locale=function(t){return{numberFormat:Wt(t),timeFormat:Vt(t)}};var xa=fo.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"]});fo.format=xa.numberFormat,fo.geo={},pe.prototype={s:0,t:0,add:function(t){ge(t,this.t,wa),ge(wa.s,this.s,this),this.s?this.t+=wa.t:this.s=wa.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var wa=new pe;fo.geo.stream=function(t,e){t&&ka.hasOwnProperty(t.type)?ka[t.type](t,e):me(t,e)};var ka={Feature:function(t,e){me(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,r=n.length;++i<r;)me(n[i].geometry,e)}},Ca={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){ve(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)ve(n[i],e,0)},Polygon:function(t,e){ye(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,i=-1,r=n.length;++i<r;)ye(n[i],e)},GeometryCollection:function(t,e){for(var n=t.geometries,i=-1,r=n.length;++i<r;)me(n[i],e)}};fo.geo.area=function(t){return Ma=0,fo.geo.stream(t,Da),Ma};var Ma,Ta=new pe,Da={sphere:function(){Ma+=4*Wo},point:T,lineStart:T,lineEnd:T,polygonStart:function(){Ta.reset(),Da.lineStart=be},polygonEnd:function(){var t=2*Ta;Ma+=t<0?4*Wo+t:t,Da.lineStart=Da.lineEnd=Da.point=T}};fo.geo.bounds=function(){function t(t,e){b.push(_=[h=t,f=t]),e<c&&(c=e),e>d&&(d=e)}function e(e,n){var i=_e([e*Yo,n*Yo]);if(v){var r=we(v,i),s=[r[1],-r[0],0],o=we(s,r);Me(o),o=Te(o);var l=e-p,u=l>0?1:-1,g=o[0]*Vo*u,m=ko(l)>180;if(m^(u*p<g&&g<u*e)){var y=o[1]*Vo;y>d&&(d=y)}else if(g=(g+360)%360-180,m^(u*p<g&&g<u*e)){var y=-o[1]*Vo;y<c&&(c=y)}else n<c&&(c=n),n>d&&(d=n);m?e<p?a(h,e)>a(h,f)&&(f=e):a(e,f)>a(h,f)&&(h=e):f>=h?(e<h&&(h=e),e>f&&(f=e)):e>p?a(h,e)>a(h,f)&&(f=e):a(e,f)>a(h,f)&&(h=e)}else t(e,n);v=i,p=e}function n(){x.point=e}function i(){_[0]=h,_[1]=f,x.point=t,v=null}function r(t,n){if(v){var i=t-p;y+=ko(i)>180?i+(i>0?360:-360):i}else g=t,m=n;Da.point(t,n),e(t,n)}function s(){Da.lineStart()}function o(){r(g,m),Da.lineEnd(),ko(y)>jo&&(h=-(f=180)),_[0]=h,_[1]=f,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 h,c,f,d,p,g,m,v,y,b,_,x={point:t,lineStart:n,lineEnd:i,polygonStart:function(){x.point=r,x.lineStart=s,x.lineEnd=o,y=0,Da.polygonStart()},polygonEnd:function(){Da.polygonEnd(),x.point=t,x.lineStart=n,x.lineEnd=i,Ta<0?(h=-(f=180),c=-(d=90)):y>jo?d=90:y<-jo&&(c=-90),_[0]=h,_[1]=f}};return function(t){d=f=-(h=c=1/0),b=[],fo.geo.stream(t,x);var e=b.length;if(e){b.sort(l);for(var n,i=1,r=b[0],s=[r];i<e;++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])):s.push(r=n);for(var o,n,p=-1/0,e=s.length-1,i=0,r=s[e];i<=e;r=n,++i)n=s[i],(o=a(r[1],n[0]))>p&&(p=o,h=n[0],f=r[1])}return b=_=null,h===1/0||c===1/0?[[NaN,NaN],[NaN,NaN]]:[[h,c],[f,d]]}}(),fo.geo.centroid=function(t){Sa=Ea=Ia=Na=Pa=Aa=Oa=za=Ha=La=Ra=0,fo.geo.stream(t,Fa);var e=Ha,n=La,i=Ra,r=e*e+n*n+i*i;return r<$o&&(e=Aa,n=Oa,i=za,Ea<jo&&(e=Ia,n=Na,i=Pa),(r=e*e+n*n+i*i)<$o)?[NaN,NaN]:[Math.atan2(n,e)*Vo,ot(i/Math.sqrt(r))*Vo]};var Sa,Ea,Ia,Na,Pa,Aa,Oa,za,Ha,La,Ra,Fa={sphere:T,point:Se,lineStart:Ie,lineEnd:Ne,polygonStart:function(){Fa.lineStart=Pe},polygonEnd:function(){Fa.lineStart=Ie}},ja=Re(Oe,We,Be,[-Wo,-Wo/2]),$a=1e9;fo.geo.clipExtent=function(){var t,e,n,i,r,s,o={stream:function(t){return r&&(r.valid=!1),r=s(t),r.valid=!0,r},extent:function(a){return arguments.length?(s=Ke(t=+a[0][0],e=+a[0][1],n=+a[1][0],i=+a[1][1]),r&&(r.valid=!1,r=null),o):[[t,e],[n,i]]}};return o.extent([[0,0],[960,500]])},(fo.geo.conicEqualArea=function(){return Xe(Ge)}).raw=Ge,fo.geo.albers=function(){return fo.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},fo.geo.albersUsa=function(){function t(t){var s=t[0],o=t[1];return e=null,n(s,o),e||(i(s,o),e)||r(s,o),e}var e,n,i,r,s=fo.geo.albers(),o=fo.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=fo.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=s.scale(),n=s.translate(),i=(t[0]-n[0])/e,r=(t[1]-n[1])/e;return(r>=.12&&r<.234&&i>=-.425&&i<-.214?o:r>=.166&&r<.234&&i>=-.214&&i<-.115?a:s).invert(t)},t.stream=function(t){var e=s.stream(t),n=o.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?(s.precision(e),o.precision(e),a.precision(e),t):s.precision()},t.scale=function(e){return arguments.length?(s.scale(e),o.scale(.35*e),a.scale(e),t.translate(s.translate())):s.scale()},t.translate=function(e){if(!arguments.length)return s.translate();var u=s.scale(),h=+e[0],c=+e[1];return n=s.translate(e).clipExtent([[h-.455*u,c-.238*u],[h+.455*u,c+.238*u]]).stream(l).point,i=o.translate([h-.307*u,c+.201*u]).clipExtent([[h-.425*u+jo,c+.12*u+jo],[h-.214*u-jo,c+.234*u-jo]]).stream(l).point,r=a.translate([h-.205*u,c+.212*u]).clipExtent([[h-.214*u+jo,c+.166*u+jo],[h-.115*u-jo,c+.234*u-jo]]).stream(l).point,t},t.scale(1070)};var Wa,qa,Ba,Ua,Ya,Va,Ka={point:T,lineStart:T,lineEnd:T,polygonStart:function(){qa=0,Ka.lineStart=Je},polygonEnd:function(){Ka.lineStart=Ka.lineEnd=Ka.point=T,Wa+=ko(qa/2)}},Xa={point:Ze,lineStart:T,lineEnd:T,polygonStart:T,polygonEnd:T},Ga={point:en,lineStart:nn,lineEnd:rn,polygonStart:function(){Ga.lineStart=sn},polygonEnd:function(){Ga.point=en,Ga.lineStart=nn,Ga.lineEnd=rn}};fo.geo.path=function(){function t(t){return t&&("function"==typeof a&&s.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=r(s)),fo.geo.stream(t,o)),s.result()}function e(){return o=null,t}var n,i,r,s,o,a=4.5;return t.area=function(t){return Wa=0,fo.geo.stream(t,r(Ka)),Wa},t.centroid=function(t){return Ia=Na=Pa=Aa=Oa=za=Ha=La=Ra=0,fo.geo.stream(t,r(Ga)),Ra?[Ha/Ra,La/Ra]:za?[Aa/za,Oa/za]:Pa?[Ia/Pa,Na/Pa]:[NaN,NaN]},t.bounds=function(t){return Ya=Va=-(Ba=Ua=1/0),fo.geo.stream(t,r(Xa)),[[Ba,Ua],[Ya,Va]]},t.projection=function(t){return arguments.length?(r=(n=t)?t.stream||ln(t):k,e()):n},t.context=function(t){return arguments.length?(s=null==(i=t)?new Qe:new on(t),"function"!=typeof a&&s.pointRadius(a),e()):i},t.pointRadius=function(e){return arguments.length?(a="function"==typeof e?e:(s.pointRadius(+e),+e),t):a},t.projection(fo.geo.albersUsa()).context(null)},fo.geo.transform=function(t){return{stream:function(e){var n=new un(e);for(var i in t)n[i]=t[i];return n}}},un.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()}},fo.geo.projection=cn,fo.geo.projectionMutator=fn,(fo.geo.equirectangular=function(){return cn(pn)}).raw=pn.invert=pn,fo.geo.rotation=function(t){function e(e){return e=t(e[0]*Yo,e[1]*Yo),e[0]*=Vo,e[1]*=Vo,e}return t=mn(t[0]%360*Yo,t[1]*Yo,t.length>2?t[2]*Yo:0),e.invert=function(e){return e=t.invert(e[0]*Yo,e[1]*Yo),e[0]*=Vo,e[1]*=Vo,e},e},gn.invert=pn,fo.geo.circle=function(){function t(){var t="function"==typeof i?i.apply(this,arguments):i,e=mn(-t[0]*Yo,-t[1]*Yo,0).invert,r=[];return n(null,null,1,{point:function(t,n){r.push(t=e(t,n)),t[0]*=Vo,t[1]*=Vo}}),{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=_n((e=+i)*Yo,r*Yo),t):e},t.precision=function(i){return arguments.length?(n=_n(e*Yo,(r=+i)*Yo),t):r},t.angle(90)},fo.geo.distance=function(t,e){var n,i=(e[0]-t[0])*Yo,r=t[1]*Yo,s=e[1]*Yo,o=Math.sin(i),a=Math.cos(i),l=Math.sin(r),u=Math.cos(r),h=Math.sin(s),c=Math.cos(s);return Math.atan2(Math.sqrt((n=c*o)*n+(n=u*h-l*c*a)*n),l*h+u*c*a)},fo.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return fo.range(Math.ceil(s/m)*m,r,m).map(f).concat(fo.range(Math.ceil(u/v)*v,l,v).map(d)).concat(fo.range(Math.ceil(i/p)*p,n,p).filter(function(t){return ko(t%m)>jo}).map(h)).concat(fo.range(Math.ceil(a/g)*g,o,g).filter(function(t){return ko(t%v)>jo}).map(c))}var n,i,r,s,o,a,l,u,h,c,f,d,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:[f(s).concat(d(l).slice(1),f(r).reverse().slice(1),d(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?(s=+e[0][0],r=+e[1][0],u=+e[0][1],l=+e[1][1],s>r&&(e=s,s=r,r=e),u>l&&(e=u,u=l,l=e),t.precision(y)):[[s,u],[r,l]]},t.minorExtent=function(e){return arguments.length?(i=+e[0][0],n=+e[1][0],a=+e[0][1],o=+e[1][1],i>n&&(e=i,i=n,n=e),a>o&&(e=a,a=o,o=e),t.precision(y)):[[i,a],[n,o]]},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,h=wn(a,o,90),c=kn(i,n,y),f=wn(u,l,90),d=kn(s,r,y),t):y},t.majorExtent([[-180,-90+jo],[180,90-jo]]).minorExtent([[-180,-80-jo],[180,80+jo]])},fo.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||i.apply(this,arguments),n||r.apply(this,arguments)]}}var e,n,i=Cn,r=Mn;return t.distance=function(){return fo.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},fo.geo.interpolate=function(t,e){return Tn(t[0]*Yo,t[1]*Yo,e[0]*Yo,e[1]*Yo)},fo.geo.length=function(t){return Ja=0,fo.geo.stream(t,Za),Ja};var Ja,Za={sphere:T,point:T,lineStart:Dn,lineEnd:T,polygonStart:T,polygonEnd:T},Qa=Sn(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(fo.geo.azimuthalEqualArea=function(){return cn(Qa)}).raw=Qa;var tl=Sn(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},k);(fo.geo.azimuthalEquidistant=function(){return cn(tl)}).raw=tl,(fo.geo.conicConformal=function(){return Xe(En)}).raw=En,(fo.geo.conicEquidistant=function(){return Xe(In)}).raw=In;var el=Sn(function(t){return 1/t},Math.atan);(fo.geo.gnomonic=function(){return cn(el)}).raw=el,Nn.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Uo]},(fo.geo.mercator=function(){return Pn(Nn)}).raw=Nn;var nl=Sn(function(){return 1},Math.asin);(fo.geo.orthographic=function(){return cn(nl)}).raw=nl;var il=Sn(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(fo.geo.stereographic=function(){return cn(il)}).raw=il,An.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Uo]},(fo.geo.transverseMercator=function(){var t=Pn(An),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])},n([0,0,90])}).raw=An,fo.geom={},fo.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,r=Nt(n),s=Nt(i),o=t.length,a=[],l=[];for(e=0;e<o;e++)a.push([+r.call(this,t[e],e),+s.call(this,t[e],e),e]);for(a.sort(Ln),e=0;e<o;e++)l.push([a[e][0],-a[e][1]]);var u=Hn(a),h=Hn(l),c=h[0]===u[0],f=h[h.length-1]===u[u.length-1],d=[];for(e=u.length-1;e>=0;--e)d.push(t[a[u[e]][2]]);for(e=+c;e<h.length-f;++e)d.push(t[a[h[e]][2]]);return d}var n=On,i=zn;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)},fo.geom.polygon=function(t){return So(t,rl),t};var rl=fo.geom.polygon.prototype=[];rl.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},rl.centroid=function(t){var e,n,i=-1,r=this.length,s=0,o=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],s+=(e[0]+a[0])*n,o+=(e[1]+a[1])*n;return[s*t,o*t]},rl.clip=function(t){for(var e,n,i,r,s,o,a=jn(t),l=-1,u=this.length-jn(this),h=this[u-1];++l<u;){for(e=t.slice(),t.length=0,r=this[l],s=e[(i=e.length-a)-1],n=-1;++n<i;)o=e[n],Rn(o,h,r)?(Rn(s,h,r)||t.push(Fn(s,o,h,r)),t.push(o)):Rn(s,h,r)&&t.push(Fn(s,o,h,r)),s=o;a&&t.push(t[0]),h=r}return t};var sl,ol,al,ll,ul,hl=[],cl=[];Kn.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(Gn),e.length},oi.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}},ai.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=ci(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&&(ui(this,n),t=n,n=t.U),n.C=!1,i.C=!0,hi(this,i))):(r=i.L,r&&r.C?(n.C=r.C=!1,i.C=!0,t=i):(t===n.L&&(hi(this,n),t=n,n=t.U),n.C=!1,i.C=!0,ui(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,s=t.L,o=t.R;if(n=s?o?ci(o):s:o,r?r.L===t?r.L=n:r.R=n:this._=n,s&&o?(i=n.C,n.C=t.C,n.L=s,s.U=n,n!==o?(r=n.U,n.U=t.U,t=n.R,r.L=t,n.R=o,o.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,ui(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,hi(this,e),e=r.R),e.C=r.C,r.C=e.R.C=!1,ui(this,r),t=this._;break}}else if(e=r.L,e.C&&(e.C=!1,r.C=!0,hi(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,ui(this,e),e=r.L),e.C=r.C,r.C=e.L.C=!1,hi(this,r),t=this._;break}e.C=!0,t=r,r=r.U}while(!t.C);t&&(t.C=!1)}}},fo.geom.voronoi=function(t){function e(t){var e=new Array(t.length),i=a[0][0],r=a[0][1],s=a[1][0],o=a[1][1];return fi(n(t),a).cells.forEach(function(n,a){var l=n.edges,u=n.site;(e[a]=l.length?l.map(function(t){var e=t.start();return[e.x,e.y]}):u.x>=i&&u.x<=s&&u.y>=r&&u.y<=o?[[i,o],[s,o],[s,r],[i,r]]:[]).point=t[a]}),e}function n(t){return t.map(function(t,e){return{x:Math.round(s(t,e)/jo)*jo,y:Math.round(o(t,e)/jo)*jo,i:e}})}var i=On,r=zn,s=i,o=r,a=fl;return t?e(t):(e.links=function(t){return fi(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 fi(n(t)).cells.forEach(function(n,i){for(var r,s=n.site,o=n.edges.sort(Gn),a=-1,l=o.length,u=o[l-1].edge,h=u.l===s?u.r:u.l;++a<l;)u,r=h,u=o[a].edge,h=u.l===s?u.r:u.l,i<r.i&&i<h.i&&pi(s,r,h)<0&&e.push([t[i],t[r.i],t[h.i]])}),e},e.x=function(t){return arguments.length?(s=Nt(i=t),e):i},e.y=function(t){return arguments.length?(o=Nt(r=t),e):r},e.clipExtent=function(t){return arguments.length?(a=null==t?fl:t,e):a===fl?null:a},e.size=function(t){return arguments.length?e.clipExtent(t&&[[0,0],t]):a===fl?null:a&&a[1]},e)};var fl=[[-1e6,-1e6],[1e6,1e6]];fo.geom.delaunay=function(t){return fo.geom.voronoi().triangles(t)},fo.geom.quadtree=function(t,e,n,i,r){function s(t){function s(t,e,n,i,r,s,o,a){if(!isNaN(n)&&!isNaN(i))if(t.leaf){var l=t.x,h=t.y;if(null!=l)if(ko(l-n)+ko(h-i)<.01)u(t,e,n,i,r,s,o,a);else{var c=t.point;t.x=t.y=t.point=null,u(t,c,l,h,r,s,o,a),u(t,e,n,i,r,s,o,a)}else t.x=n,t.y=i,t.point=e}else u(t,e,n,i,r,s,o,a)}function u(t,e,n,i,r,o,a,l){var u=.5*(r+a),h=.5*(o+l),c=n>=u,f=i>=h,d=f<<1|c;t.leaf=!1,t=t.nodes[d]||(t.nodes[d]=vi()),c?r=u:a=u,f?o=h:l=h,s(t,e,n,i,r,o,a,l)}var h,c,f,d,p,g,m,v,y,b=Nt(a),_=Nt(l);if(null!=e)g=e,m=n,v=i,y=r;else if(v=y=-(g=m=1/0),c=[],f=[],p=t.length,o)for(d=0;d<p;++d)h=t[d],h.x<g&&(g=h.x),h.y<m&&(m=h.y),h.x>v&&(v=h.x),h.y>y&&(y=h.y),c.push(h.x),f.push(h.y);else for(d=0;d<p;++d){var x=+b(h=t[d],d),w=+_(h,d);x<g&&(g=x),w<m&&(m=w),x>v&&(v=x),w>y&&(y=w),c.push(x),f.push(w)}var k=v-g,C=y-m;k>C?y=m+k:v=g+C;var M=vi();if(M.add=function(t){s(M,t,+b(t,++d),+_(t,d),g,m,v,y)},M.visit=function(t){yi(t,M,g,m,v,y)},M.find=function(t){return bi(M,t[0],t[1],g,m,v,y)},d=-1,null==e){for(;++d<p;)s(M,t[d],c[d],f[d],g,m,v,y);--d}else t.forEach(M.add);return c=f=t=h=null,M}var o,a=On,l=zn;return(o=arguments.length)?(a=gi,l=mi,3===o&&(r=n,i=e,n=e=0),s(t)):(s.x=function(t){return arguments.length?(a=t,s):a},s.y=function(t){return arguments.length?(l=t,s):l},s.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]),s):null==e?null:[[e,n],[i,r]]},s.size=function(t){return arguments.length?(null==t?e=n=i=r=null:(e=n=0,i=+t[0],r=+t[1]),s):null==e?null:[i-e,r-n]},s)},fo.interpolateRgb=_i,fo.interpolateObject=xi,fo.interpolateNumber=wi,fo.interpolateString=ki;var dl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pl=new RegExp(dl.source,"g");fo.interpolate=Ci,fo.interpolators=[function(t,e){var n=typeof e;return("string"===n?oa.has(e.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(e)?_i:ki:e instanceof ct?_i:Array.isArray(e)?Mi:"object"===n&&isNaN(e)?xi:wi)(t,e)}],fo.interpolateArray=Mi;var gl=function(){return k},ml=fo.map({linear:gl,poly:Pi,quad:function(){return Ei},cubic:function(){return Ii},sin:function(){return Ai},exp:function(){return Oi},circle:function(){return zi},elastic:Hi,back:Li,bounce:function(){return Ri}}),vl=fo.map({in:k,out:Di,"in-out":Si,"out-in":function(t){return Si(Di(t))}});fo.ease=function(t){var e=t.indexOf("-"),n=e>=0?t.slice(0,e):t,i=e>=0?t.slice(e+1):"in";return n=ml.get(n)||gl,i=vl.get(i)||k,Ti(i(n.apply(null,po.call(arguments,1))))},fo.interpolateHcl=Fi,fo.interpolateHsl=ji,fo.interpolateLab=$i,fo.interpolateRound=Wi,fo.transform=function(t){var e=mo.createElementNS(fo.ns.prefix.svg,"g");return(fo.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new qi(n?n.matrix:yl)})(t)},qi.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var yl={a:1,b:0,c:0,d:1,e:0,f:0};fo.interpolateTransform=Zi,fo.layout={},fo.layout.bundle=function(){return function(t){for(var e=[],n=-1,i=t.length;++n<i;)e.push(er(t[n]));return e}},fo.layout.chord=function(){function t(){var t,u,c,f,d,p={},g=[],m=fo.range(s),v=[];for(n=[],i=[],t=0,f=-1;++f<s;){for(u=0,d=-1;++d<s;)u+=r[f][d];g.push(u),v.push(fo.range(s)),t+=u}for(o&&m.sort(function(t,e){return o(g[t],g[e])}),a&&v.forEach(function(t,e){t.sort(function(t,n){return a(r[e][t],r[e][n])})}),t=(qo-h*s)/t,u=0,f=-1;++f<s;){for(c=u,d=-1;++d<s;){var y=m[f],b=v[y][d],_=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:c,endAngle:u,value:g[y]},u+=h}for(f=-1;++f<s;)for(d=f-1;++d<s;){var k=p[f+"-"+d],C=p[d+"-"+f];(k.value||C.value)&&n.push(k.value<C.value?{source:C,target:k}:{source:k,target:C})}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,s,o,a,l,u={},h=0;return u.matrix=function(t){return arguments.length?(s=(r=t)&&r.length,n=i=null,u):r},u.padding=function(t){return arguments.length?(h=t,n=i=null,u):h},u.sortGroups=function(t){return arguments.length?(o=t,n=i=null,u):o},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},fo.layout.force=function(){function t(t){return function(e,n,i,r){if(e.point!==t){var s=e.cx-t.x,o=e.cy-t.y,a=r-n,l=s*s+o*o;if(a*a/v<l){if(l<g){var u=e.charge/l;t.px-=s*u,t.py-=o*u}return!0}if(e.point&&l&&l<g){var u=e.pointCharge/l;t.px-=s*u,t.py-=o*u}}return!e.charge}}function e(t){t.px=fo.event.x,t.py=fo.event.y,l.resume()}var n,i,r,s,o,a,l={},u=fo.dispatch("start","tick","end"),h=[1,1],c=.9,f=bl,d=_l,p=-30,g=xl,m=.1,v=.64,y=[],b=[];return l.tick=function(){if((r*=.99)<.005)return n=null,u.end({type:"end",alpha:r=0}),!0;var e,i,l,f,d,g,v,_,x,w=y.length,k=b.length;for(i=0;i<k;++i)l=b[i],f=l.source,d=l.target,_=d.x-f.x,x=d.y-f.y,(g=_*_+x*x)&&(g=r*o[i]*((g=Math.sqrt(g))-s[i])/g,_*=g,x*=g,d.x-=_*(v=f.weight+d.weight?f.weight/(f.weight+d.weight):.5),d.y-=x*v,f.x+=_*(v=1-v),f.y+=x*v);if((v=r*m)&&(_=h[0]/2,x=h[1]/2,i=-1,v))for(;++i<w;)l=y[i],l.x+=(_-l.x)*v,l.y+=(x-l.y)*v;if(p)for(lr(e=fo.geom.quadtree(y),r,a),i=-1;++i<w;)(l=y[i]).fixed||e.visit(t(l));for(i=-1;++i<w;)l=y[i],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*c,l.y-=(l.py-(l.py=l.y))*c);u.tick({type:"tick",alpha:r})},l.nodes=function(t){return arguments.length?(y=t,l):y},l.links=function(t){return arguments.length?(b=t,l):b},l.size=function(t){return arguments.length?(h=t,l):h},l.linkDistance=function(t){return arguments.length?(f="function"==typeof t?t:+t,l):f},l.distance=l.linkDistance,l.linkStrength=function(t){return arguments.length?(d="function"==typeof t?t:+t,l):d},l.friction=function(t){return arguments.length?(c=+t,l):c},l.charge=function(t){return arguments.length?(p="function"==typeof t?t:+t,l):p},l.chargeDistance=function(t){return arguments.length?(g=t*t,l):Math.sqrt(g)},l.gravity=function(t){return arguments.length?(m=+t,l):m},l.theta=function(t){return arguments.length?(v=t*t,l):Math.sqrt(v)},l.alpha=function(t){return arguments.length?(t=+t,r?t>0?r=t:(n.c=null,n.t=NaN,n=null,u.end({type:"end",alpha:r=0})):t>0&&(u.start({type:"start",alpha:r=t}),n=Ht(l.tick)),l):r},l.start=function(){function t(t,i){if(!n){for(n=new Array(r),l=0;l<r;++l)n[l]=[];for(l=0;l<u;++l){var s=b[l];n[s.source.index].push(s.target),n[s.target.index].push(s.source)}}for(var o,a=n[e],l=-1,h=a.length;++l<h;)if(!isNaN(o=a[l][t]))return o;return Math.random()*i}var e,n,i,r=y.length,u=b.length,c=h[0],g=h[1];for(e=0;e<r;++e)(i=y[e]).index=e,i.weight=0;for(e=0;e<u;++e)i=b[e],"number"==typeof i.source&&(i.source=y[i.source]),"number"==typeof i.target&&(i.target=y[i.target]),++i.source.weight,++i.target.weight;for(e=0;e<r;++e)i=y[e],isNaN(i.x)&&(i.x=t("x",c)),isNaN(i.y)&&(i.y=t("y",g)),isNaN(i.px)&&(i.px=i.x),isNaN(i.py)&&(i.py=i.y);if(s=[],"function"==typeof f)for(e=0;e<u;++e)s[e]=+f.call(this,b[e],e);else for(e=0;e<u;++e)s[e]=f;if(o=[],"function"==typeof d)for(e=0;e<u;++e)o[e]=+d.call(this,b[e],e);else for(e=0;e<u;++e)o[e]=d;if(a=[],"function"==typeof p)for(e=0;e<r;++e)a[e]=+p.call(this,y[e],e);else for(e=0;e<r;++e)a[e]=p;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){if(i||(i=fo.behavior.drag().origin(k).on("dragstart.force",rr).on("drag.force",e).on("dragend.force",sr)),!arguments.length)return i;this.on("mouseover.force",or).on("mouseout.force",ar).call(i)},fo.rebind(l,u,"on")};var bl=20,_l=1,xl=1/0;fo.layout.hierarchy=function(){function t(r){var s,o=[r],a=[];for(r.depth=0;null!=(s=o.pop());)if(a.push(s),(u=n.call(t,s,s.depth))&&(l=u.length)){for(var l,u,h;--l>=0;)o.push(h=u[l]),h.parent=s,h.depth=s.depth+1;i&&(s.value=0),s.children=u}else i&&(s.value=+i.call(t,s,s.depth)||0),delete s.children;return cr(r,function(t){var n,r;e&&(n=t.children)&&n.sort(e),i&&(r=t.parent)&&(r.value+=t.value)}),a}var e=pr,n=fr,i=dr;return t.sort=function(n){return arguments.length?(e=n,t):e},t.children=function(e){return arguments.length?(n=e,t):n},t.value=function(e){return arguments.length?(i=e,t):i},t.revalue=function(e){return i&&(hr(e,function(t){t.children&&(t.value=0)}),cr(e,function(e){var n;e.children||(e.value=+i.call(t,e,e.depth)||0),(n=e.parent)&&(n.value+=e.value)})),e},t},fo.layout.partition=function(){function t(e,n,i,r){var s=e.children;if(e.x=n,e.y=e.depth*r,e.dx=i,e.dy=r,s&&(o=s.length)){var o,a,l,u=-1;for(i=e.value?i/e.value:0;++u<o;)t(a=s[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,s=-1;++s<r;)i=Math.max(i,e(n[s]));return 1+i}function n(n,s){var o=i.call(this,n,s);return t(o[0],0,r[0],r[1]/e(o[0])),o}var i=fo.layout.hierarchy(),r=[1,1];return n.size=function(t){return arguments.length?(r=t,n):r},ur(n,i)},fo.layout.pie=function(){function t(o){var a,l=o.length,u=o.map(function(n,i){return+e.call(t,n,i)}),h=+("function"==typeof i?i.apply(this,arguments):i),c=("function"==typeof r?r.apply(this,arguments):r)-h,f=Math.min(Math.abs(c)/l,+("function"==typeof s?s.apply(this,arguments):s)),d=f*(c<0?-1:1),p=fo.sum(u),g=p?(c-l*d)/p:0,m=fo.range(l),v=[];return null!=n&&m.sort(n===wl?function(t,e){return u[e]-u[t]}:function(t,e){return n(o[t],o[e])}),m.forEach(function(t){v[t]={data:o[t],value:a=u[t],startAngle:h,endAngle:h+=a*g+d,padAngle:f}}),v}var e=Number,n=wl,i=0,r=qo,s=0;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.padAngle=function(e){return arguments.length?(s=e,t):s},t};var wl={};fo.layout.stack=function(){function t(a,l){if(!(f=a.length))return a;var u=a.map(function(n,i){return e.call(t,n,i)}),h=u.map(function(e){return e.map(function(e,n){return[s.call(t,e,n),o.call(t,e,n)]})}),c=n.call(t,h,l);u=fo.permute(u,c),h=fo.permute(h,c);var f,d,p,g,m=i.call(t,h,l),v=u[0].length;for(p=0;p<v;++p)for(r.call(t,u[0][p],g=m[p],h[0][p][1]),d=1;d<f;++d)r.call(t,u[d][p],g+=h[d-1][p][1],h[d][p][1]);return a}var e=k,n=br,i=_r,r=yr,s=mr,o=vr;return t.values=function(n){return arguments.length?(e=n,t):e},t.order=function(e){return arguments.length?(n="function"==typeof e?e:kl.get(e)||br,t):n},t.offset=function(e){return arguments.length?(i="function"==typeof e?e:Cl.get(e)||_r,t):i},t.x=function(e){return arguments.length?(s=e,t):s},t.y=function(e){return arguments.length?(o=e,t):o},t.out=function(e){return arguments.length?(r=e,t):r},t};var kl=fo.map({"inside-out":function(t){var e,n,i=t.length,r=t.map(xr),s=t.map(wr),o=fo.range(i).sort(function(t,e){return r[t]-r[e]}),a=0,l=0,u=[],h=[];for(e=0;e<i;++e)n=o[e],a<l?(a+=s[n],u.push(n)):(l+=s[n],h.push(n));return h.reverse().concat(u)},reverse:function(t){return fo.range(t.length).reverse()},default:br}),Cl=fo.map({silhouette:function(t){var e,n,i,r=t.length,s=t[0].length,o=[],a=0,l=[];for(n=0;n<s;++n){for(e=0,i=0;e<r;e++)i+=t[e][n][1];i>a&&(a=i),o.push(i)}for(n=0;n<s;++n)l[n]=(a-o[n])/2;return l},wiggle:function(t){var e,n,i,r,s,o,a,l,u,h=t.length,c=t[0],f=c.length,d=[];for(d[0]=l=u=0,n=1;n<f;++n){for(e=0,r=0;e<h;++e)r+=t[e][n][1];for(e=0,s=0,a=c[n][0]-c[n-1][0];e<h;++e){for(i=0,o=(t[e][n][1]-t[e][n-1][1])/(2*a);i<e;++i)o+=(t[i][n][1]-t[i][n-1][1])/a;s+=o*t[e][n][1]}d[n]=l-=r?s/r*a:0,l<u&&(u=l)}for(n=0;n<f;++n)d[n]-=u;return d},expand:function(t){var e,n,i,r=t.length,s=t[0].length,o=1/r,a=[];for(n=0;n<s;++n){for(e=0,i=0;e<r;e++)i+=t[e][n][1];if(i)for(e=0;e<r;e++)t[e][n][1]/=i;else for(e=0;e<r;e++)t[e][n][1]=o}for(n=0;n<s;++n)a[n]=0;return a},zero:_r});fo.layout.histogram=function(){function t(t,s){for(var o,a,l=[],u=t.map(n,this),h=i.call(this,u,s),c=r.call(this,h,u,s),s=-1,f=u.length,d=c.length-1,p=e?1:1/f;++s<d;)o=l[s]=[],o.dx=c[s+1]-(o.x=c[s]),o.y=0;if(d>0)for(s=-1;++s<f;)(a=u[s])>=h[0]&&a<=h[1]&&(o=l[fo.bisect(c,a,1,d)-1],o.y+=p,o.push(t[s]));return l}var e=!0,n=Number,i=Tr,r=Cr;return t.value=function(e){return arguments.length?(n=e,t):n},t.range=function(e){return arguments.length?(i=Nt(e),t):i},t.bins=function(e){return arguments.length?(r="number"==typeof e?function(t){return Mr(t,e)}:Nt(e),t):r},t.frequency=function(n){return arguments.length?(e=!!n,t):e},t},fo.layout.pack=function(){function t(t,s){var o=n.call(this,t,s),a=o[0],l=r[0],u=r[1],h=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(a.x=a.y=0,cr(a,function(t){t.r=+h(t.value)}),cr(a,Nr),i){var c=i*(e?1:Math.max(2*a.r/l,2*a.r/u))/2;cr(a,function(t){t.r+=c}),cr(a,Nr),cr(a,function(t){t.r-=c})}return Or(a,l/2,u/2,e?1:1/Math.max(2*a.r/l,2*a.r/u)),o}var e,n=fo.layout.hierarchy().sort(Dr),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},ur(t,n)},fo.layout.tree=function(){function t(t,r){var h=o.call(this,t,r),c=h[0],f=e(c);if(cr(f,n),f.parent.m=-f.z,hr(f,i),u)hr(c,s);else{var d=c,p=c,g=c;hr(c,function(t){t.x<d.x&&(d=t),t.x>p.x&&(p=t),t.depth>g.depth&&(g=t)});var m=a(d,p)/2-d.x,v=l[0]/(p.x+a(p,d)/2+m),y=l[1]/(g.depth||1);hr(c,function(t){t.x=(t.x+m)*v,t.y=t.depth*y})}return h}function e(t){for(var e,n={A:null,children:[t]},i=[n];null!=(e=i.pop());)for(var r,s=e.children,o=0,a=s.length;o<a;++o)i.push((s[o]=r={_:s[o],parent:e,children:(r=s[o].children)&&r.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=r);return n.children[0]}function n(t){var e=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(e.length){jr(t);var s=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+a(t._,i._),t.m=t.z-s):t.z=s}else i&&(t.z=i.z+a(t._,i._));t.parent.A=r(t,i,t.parent.A||n[0])}function i(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function r(t,e,n){if(e){for(var i,r=t,s=t,o=e,l=r.parent.children[0],u=r.m,h=s.m,c=o.m,f=l.m;o=Rr(o),r=Lr(r),o&&r;)l=Lr(l),s=Rr(s),s.a=t,i=o.z+c-r.z-u+a(o._,r._),i>0&&(Fr($r(o,t,n),t,i),u+=i,h+=i),c+=o.m,u+=r.m,f+=l.m,h+=s.m;o&&!Rr(s)&&(s.t=o,s.m+=c-h),r&&!Lr(l)&&(l.t=r,l.m+=u-f,n=t)}return n}function s(t){t.x*=l[0],t.y=t.depth*l[1]}var o=fo.layout.hierarchy().sort(null).value(null),a=Hr,l=[1,1],u=null;return t.separation=function(e){return arguments.length?(a=e,t):a},t.size=function(e){return arguments.length?(u=null==(l=e)?s:null,t):u?null:l},t.nodeSize=function(e){return arguments.length?(u=null==(l=e)?null:s,t):u?l:null},ur(t,o)},fo.layout.cluster=function(){function t(t,s){var o,a=e.call(this,t,s),l=a[0],u=0;cr(l,function(t){var e=t.children;e&&e.length?(t.x=qr(e),t.y=Wr(e)):(t.x=o?u+=n(t,o):0,t.y=0,o=t)});var h=Br(l),c=Ur(l),f=h.x-n(h,c)/2,d=c.x+n(c,h)/2;return cr(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-f)/(d-f)*i[0],t.y=(1-(l.y?t.y/l.y:1))*i[1]}),a}var e=fo.layout.hierarchy().sort(null).value(null),n=Hr,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},ur(t,e)},fo.layout.treemap=function(){function t(t,e){for(var n,i,r=-1,s=t.length;++r<s;)i=(n=t[r]).value*(e<0?0:e),n.area=isNaN(i)||i<=0?0:i}function e(n){var s=n.children;if(s&&s.length){var o,a,l,u=c(n),h=[],f=s.slice(),p=1/0,g="slice"===d?u.dx:"dice"===d?u.dy:"slice-dice"===d?1&n.depth?u.dy:u.dx:Math.min(u.dx,u.dy);for(t(f,u.dx*u.dy/n.value),h.area=0;(l=f.length)>0;)h.push(o=f[l-1]),h.area+=o.area,"squarify"!==d||(a=i(h,g))<=p?(f.pop(),p=a):(h.area-=h.pop().area,r(h,g,u,!1),g=Math.min(u.dx,u.dy),h.length=h.area=0,p=1/0);h.length&&(r(h,g,u,!0),h.length=h.area=0),s.forEach(e)}}function n(e){var i=e.children;if(i&&i.length){var s,o=c(e),a=i.slice(),l=[];for(t(a,o.dx*o.dy/e.value),l.area=0;s=a.pop();)l.push(s),l.area+=s.area,null!=s.z&&(r(l,s.z?o.dx:o.dy,o,!a.length),l.length=l.area=0);i.forEach(n)}}function i(t,e){for(var n,i=t.area,r=0,s=1/0,o=-1,a=t.length;++o<a;)(n=t[o].area)&&(n<s&&(s=n),n>r&&(r=n));return i*=i,e*=e,i?Math.max(e*r*p/i,i/(e*s*p)):1/0}function r(t,e,n,i){var r,s=-1,o=t.length,a=n.x,u=n.y,h=e?l(t.area/e):0;if(e==n.dx){for((i||h>n.dy)&&(h=n.dy);++s<o;)r=t[s],r.x=a,r.y=u,r.dy=h,a+=r.dx=Math.min(n.x+n.dx-a,h?l(r.area/h):0);r.z=!0,r.dx+=n.x+n.dx-a,n.y+=h,n.dy-=h}else{for((i||h>n.dx)&&(h=n.dx);++s<o;)r=t[s],r.x=a,r.y=u,r.dx=h,u+=r.dy=Math.min(n.y+n.dy-u,h?l(r.area/h):0);r.z=!1,r.dy+=n.y+n.dy-u,n.x+=h,n.dx-=h}}function s(i){var r=o||a(i),s=r[0];return s.x=s.y=0,s.value?(s.dx=u[0],s.dy=u[1]):s.dx=s.dy=0,o&&a.revalue(s),t([s],s.dx*s.dy/s.value),(o?n:e)(s),f&&(o=r),r}var o,a=fo.layout.hierarchy(),l=Math.round,u=[1,1],h=null,c=Yr,f=!1,d="squarify",p=.5*(1+Math.sqrt(5));return s.size=function(t){return arguments.length?(u=t,s):u},s.padding=function(t){function e(e){var n=t.call(s,e,e.depth);return null==n?Yr(e):Vr(e,"number"==typeof n?[n,n,n,n]:n)}function n(e){return Vr(e,t)}if(!arguments.length)return h;var i;return c=null==(h=t)?Yr:"function"==(i=typeof t)?e:"number"===i?(t=[t,t,t,t],n):n,s},s.round=function(t){return arguments.length?(l=t?Math.round:Number,s):l!=Number},s.sticky=function(t){return arguments.length?(f=t,o=null,s):f},s.ratio=function(t){return arguments.length?(p=t,s):p},s.mode=function(t){return arguments.length?(d=t+"",s):d},ur(s,a)},fo.random={normal:function(t,e){var n=arguments.length;return n<2&&(e=1),n<1&&(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=fo.random.normal.apply(fo,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=fo.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;n<t;n++)e+=Math.random();return e}}},fo.scale={};var Ml={floor:k,ceil:k};fo.scale.linear=function(){return ts([0,1],[0,1],Ci,!1)};var Tl={s:1,g:1,p:1,r:1,e:1};fo.scale.log=function(){return ls(fo.scale.linear().domain([0,1]),10,!0,[1,10])};var Dl=fo.format(".0e"),Sl={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};fo.scale.pow=function(){return us(fo.scale.linear(),1,[0,1])},fo.scale.sqrt=function(){return fo.scale.pow().exponent(.5)},fo.scale.ordinal=function(){return cs([],{t:"range",a:[[]]})},fo.scale.category10=function(){return fo.scale.ordinal().range(El)},fo.scale.category20=function(){return fo.scale.ordinal().range(Il)},fo.scale.category20b=function(){return fo.scale.ordinal().range(Nl)},fo.scale.category20c=function(){return fo.scale.ordinal().range(Pl)};var El=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Ct),Il=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Ct),Nl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Ct),Pl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Ct);fo.scale.quantile=function(){return fs([],[])},fo.scale.quantize=function(){return ds(0,1,[0,1])},fo.scale.threshold=function(){return ps([.5],[0,1])},fo.scale.identity=function(){return gs([0,1])},fo.svg={},fo.svg.arc=function(){function t(){var t=Math.max(0,+n.apply(this,arguments)),u=Math.max(0,+i.apply(this,arguments)),h=o.apply(this,arguments)-Uo,c=a.apply(this,arguments)-Uo,f=Math.abs(c-h),d=h>c?0:1;if(u<t&&(p=u,u=t,t=p),f>=Bo)return e(u,d)+(t?e(t,1-d):"")+"Z";var p,g,m,v,y,b,_,x,w,k,C,M,T=0,D=0,S=[];if((v=(+l.apply(this,arguments)||0)/2)&&(m=s===Al?Math.sqrt(t*t+u*u):+s.apply(this,arguments),d||(D*=-1),u&&(D=ot(m/u*Math.sin(v))),t&&(T=ot(m/t*Math.sin(v)))),u){y=u*Math.cos(h+D),b=u*Math.sin(h+D),_=u*Math.cos(c-D),x=u*Math.sin(c-D);var E=Math.abs(c-h-2*D)<=Wo?0:1;if(D&&ws(y,b,_,x)===d^E){var I=(h+c)/2;y=u*Math.cos(I),b=u*Math.sin(I),_=x=null}}else y=b=0;if(t){w=t*Math.cos(c-T),k=t*Math.sin(c-T),C=t*Math.cos(h+T),M=t*Math.sin(h+T);var N=Math.abs(h-c+2*T)<=Wo?0:1;if(T&&ws(w,k,C,M)===1-d^N){var P=(h+c)/2;w=t*Math.cos(P),k=t*Math.sin(P),C=M=null}}else w=k=0;if(f>jo&&(p=Math.min(Math.abs(u-t)/2,+r.apply(this,arguments)))>.001){g=t<u^d?0:1;var A=p,O=p;if(f<Wo){var z=null==C?[w,k]:null==_?[y,b]:Fn([y,b],[C,M],[_,x],[w,k]),H=y-z[0],L=b-z[1],R=_-z[0],F=x-z[1],j=1/Math.sin(Math.acos((H*R+L*F)/(Math.sqrt(H*H+L*L)*Math.sqrt(R*R+F*F)))/2),$=Math.sqrt(z[0]*z[0]+z[1]*z[1]);O=Math.min(p,(t-$)/(j-1)),A=Math.min(p,(u-$)/(j+1))}if(null!=_){var W=ks(null==C?[w,k]:[C,M],[y,b],u,A,d),q=ks([_,x],[w,k],u,A,d);p===A?S.push("M",W[0],"A",A,",",A," 0 0,",g," ",W[1],"A",u,",",u," 0 ",1-d^ws(W[1][0],W[1][1],q[1][0],q[1][1]),",",d," ",q[1],"A",A,",",A," 0 0,",g," ",q[0]):S.push("M",W[0],"A",A,",",A," 0 1,",g," ",q[0])}else S.push("M",y,",",b);if(null!=C){var B=ks([y,b],[C,M],t,-O,d),U=ks([w,k],null==_?[y,b]:[_,x],t,-O,d);p===O?S.push("L",U[0],"A",O,",",O," 0 0,",g," ",U[1],"A",t,",",t," 0 ",d^ws(U[1][0],U[1][1],B[1][0],B[1][1]),",",1-d," ",B[1],"A",O,",",O," 0 0,",g," ",B[0]):S.push("L",U[0],"A",O,",",O," 0 0,",g," ",B[0])}else S.push("L",w,",",k)}else S.push("M",y,",",b),null!=_&&S.push("A",u,",",u," 0 ",E,",",d," ",_,",",x),S.push("L",w,",",k),null!=C&&S.push("A",t,",",t," 0 ",N,",",1-d," ",C,",",M);return S.push("Z"),S.join("")}function e(t,e){return"M0,"+t+"A"+t+","+t+" 0 1,"+e+" 0,"+-t+"A"+t+","+t+" 0 1,"+e+" 0,"+t}var n=vs,i=ys,r=ms,s=Al,o=bs,a=_s,l=xs;return t.innerRadius=function(e){return arguments.length?(n=Nt(e),t):n},t.outerRadius=function(e){return arguments.length?(i=Nt(e),t):i},t.cornerRadius=function(e){return arguments.length?(r=Nt(e),t):r},t.padRadius=function(e){return arguments.length?(s=e==Al?Al:Nt(e),t):s},t.startAngle=function(e){return arguments.length?(o=Nt(e),t):o},t.endAngle=function(e){return arguments.length?(a=Nt(e),t):a},t.padAngle=function(e){return arguments.length?(l=Nt(e),t):l},t.centroid=function(){var t=(+n.apply(this,arguments)+ +i.apply(this,arguments))/2,e=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-Uo;return[Math.cos(e)*t,Math.sin(e)*t]},t};var Al="auto";fo.svg.line=function(){return Cs(k)};var Ol=fo.map({linear:Ms,"linear-closed":Ts,step:Ds,"step-before":Ss,"step-after":Es,basis:zs,"basis-open":Hs,"basis-closed":Ls,bundle:Rs,cardinal:Ps,"cardinal-open":Is,"cardinal-closed":Ns,monotone:Bs});Ol.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var zl=[0,2/3,1/3,0],Hl=[0,1/3,2/3,0],Ll=[0,1/6,2/3,1/6];fo.svg.line.radial=function(){var t=Cs(Us);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},Ss.reverse=Es,Es.reverse=Ss,fo.svg.area=function(){return Ys(k)},fo.svg.area.radial=function(){var t=Ys(Us);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},fo.svg.chord=function(){function t(t,a){var l=e(this,s,t,a),u=e(this,o,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),s=a.call(t,r,i),o=l.call(t,r,i)-Uo,h=u.call(t,r,i)-Uo;return{r:s,a0:o,a1:h,p0:[s*Math.cos(o),s*Math.sin(o)],p1:[s*Math.cos(h),s*Math.sin(h)]}}function n(t,e){return t.a0==e.a0&&t.a1==e.a1}function i(t,e,n){return"A"+t+","+t+" 0 "+ +(n>Wo)+",1 "+e}function r(t,e,n,i){return"Q 0,0 "+i}var s=Cn,o=Mn,a=Vs,l=bs,u=_s;return t.radius=function(e){return arguments.length?(a=Nt(e),t):a},t.source=function(e){return arguments.length?(s=Nt(e),t):s},t.target=function(e){return arguments.length?(o=Nt(e),t):o},t.startAngle=function(e){return arguments.length?(l=Nt(e),t):l},t.endAngle=function(e){return arguments.length?(u=Nt(e),t):u},t},fo.svg.diagonal=function(){function t(t,r){var s=e.call(this,t,r),o=n.call(this,t,r),a=(s.y+o.y)/2,l=[s,{x:s.x,y:a},{x:o.x,y:a},o];return l=l.map(i),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var e=Cn,n=Mn,i=Ks;return t.source=function(n){return arguments.length?(e=Nt(n),t):e},t.target=function(e){return arguments.length?(n=Nt(e),t):n},t.projection=function(e){return arguments.length?(i=e,t):i},t},fo.svg.diagonal.radial=function(){var t=fo.svg.diagonal(),e=Ks,n=t.projection;return t.projection=function(t){return arguments.length?n(Xs(e=t)):e},t},fo.svg.symbol=function(){function t(t,i){return(Rl.get(e.call(this,t,i))||Zs)(n.call(this,t,i))}var e=Js,n=Gs;return t.type=function(n){return arguments.length?(e=Nt(n),t):e},t.size=function(e){return arguments.length?(n=Nt(e),t):n},t};var Rl=fo.map({circle:Zs,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*jl)),n=e*jl;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/Fl),n=e*Fl/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Fl),n=e*Fl/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});fo.svg.symbolTypes=Rl.keys();var Fl=Math.sqrt(3),jl=Math.tan(30*Yo);Po.transition=function(t){for(var e,n,i=$l||++Ul,r=io(t),s=[],o=Wl||{time:Date.now(),ease:Ni,delay:0,duration:250},a=-1,l=this.length;++a<l;){s.push(e=[]);for(var u=this[a],h=-1,c=u.length;++h<c;)(n=u[h])&&ro(n,h,r,i,o),e.push(n)}return to(s,r,i)},Po.interrupt=function(t){return this.each(null==t?ql:Qs(io(t)))};var $l,Wl,ql=Qs(io()),Bl=[],Ul=0;Bl.call=Po.call,Bl.empty=Po.empty,Bl.node=Po.node,Bl.size=Po.size,fo.transition=function(t,e){return t&&t.transition?$l?t.transition(e):t:fo.selection().transition(t)},fo.transition.prototype=Bl,Bl.select=function(t){var e,n,i,r=this.id,s=this.namespace,o=[];t=A(t);for(var a=-1,l=this.length;++a<l;){o.push(e=[]);for(var u=this[a],h=-1,c=u.length;++h<c;)(i=u[h])&&(n=t.call(i,i.__data__,h,a))?("__data__"in i&&(n.__data__=i.__data__),ro(n,h,s,r,i[s][r]),e.push(n)):e.push(null)}return to(o,s,r)},Bl.selectAll=function(t){var e,n,i,r,s,o=this.id,a=this.namespace,l=[];t=O(t);for(var u=-1,h=this.length;++u<h;)for(var c=this[u],f=-1,d=c.length;++f<d;)if(i=c[f]){s=i[a][o],n=t.call(i,i.__data__,f,u),l.push(e=[]);for(var p=-1,g=n.length;++p<g;)(r=n[p])&&ro(r,p,a,o,s),e.push(r)}return to(l,a,o)},Bl.filter=function(t){var e,n,i,r=[];"function"!=typeof t&&(t=Y(t));for(var s=0,o=this.length;s<o;s++){r.push(e=[]);for(var n=this[s],a=0,l=n.length;a<l;a++)(i=n[a])&&t.call(i,i.__data__,a,s)&&e.push(i)}return to(r,this.namespace,this.id)},Bl.tween=function(t,e){var n=this.id,i=this.namespace;return arguments.length<2?this.node()[i][n].tween.get(t):K(this,null==e?function(e){e[i][n].tween.remove(t)}:function(r){r[i][n].tween.set(t,e)})},Bl.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=o(n,t),function(t){this.setAttribute(a,e(t))})})}function s(t){return null==t?i:(t+="",function(){var e,n=this.getAttributeNS(a.space,a.local);return n!==t&&(e=o(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 o="transform"==t?Zi:Ci,a=fo.ns.qualify(t);return eo(this,"attr."+t,e,a.local?s:r)},Bl.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=fo.ns.qualify(t);return this.tween("attr."+t,r.local?i:n)},Bl.style=function(t,e,n){function i(){this.style.removeProperty(t)}function r(e){return null==e?i:(e+="",function(){var i,r=o(this).getComputedStyle(this,null).getPropertyValue(t);return r!==e&&(i=Ci(r,e),function(e){this.style.setProperty(t,i(e),n)})})}var s=arguments.length;if(s<3){if("string"!=typeof t){s<2&&(e="");for(n in t)this.style(n,t[n],e);return this}n=""}return eo(this,"style."+t,e,r)},Bl.styleTween=function(t,e,n){function i(i,r){var s=e.call(this,i,r,o(this).getComputedStyle(this,null).getPropertyValue(t));return s&&function(e){this.style.setProperty(t,s(e),n)}}return arguments.length<3&&(n=""),this.tween("style."+t,i)},Bl.text=function(t){return eo(this,"text",t,no)},Bl.remove=function(){var t=this.namespace;return this.each("end.transition",function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)})},Bl.ease=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].ease:("function"!=typeof t&&(t=fo.ease.apply(fo,arguments)),K(this,function(i){i[n][e].ease=t}))},Bl.delay=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].delay:K(this,"function"==typeof t?function(i,r,s){i[n][e].delay=+t.call(i,i.__data__,r,s)}:(t=+t,function(i){i[n][e].delay=t}))},Bl.duration=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].duration:K(this,"function"==typeof t?function(i,r,s){i[n][e].duration=Math.max(1,t.call(i,i.__data__,r,s))}:(t=Math.max(1,t),function(i){i[n][e].duration=t}))},Bl.each=function(t,e){var n=this.id,i=this.namespace;if(arguments.length<2){var r=Wl,s=$l;try{$l=n,K(this,function(e,r,s){Wl=e[i][n],t.call(e,e.__data__,r,s)})}finally{Wl=r,$l=s}}else K(this,function(r){var s=r[i][n];(s.event||(s.event=fo.dispatch("start","end","interrupt"))).on(t,e)});return this},Bl.transition=function(){for(var t,e,n,i,r=this.id,s=++Ul,o=this.namespace,a=[],l=0,u=this.length;l<u;l++){a.push(t=[]);for(var e=this[l],h=0,c=e.length;h<c;h++)(n=e[h])&&(i=n[o][r],ro(n,h,o,s,{time:i.time,ease:i.ease,delay:i.delay+i.duration,duration:i.duration})),t.push(n)}return to(a,o,s)},fo.svg.axis=function(){function t(t){t.each(function(){var t,u=fo.select(this),h=this.__chart__||n,c=this.__chart__=n.copy(),f=null==l?c.ticks?c.ticks.apply(c,a):c.domain():l,d=null==e?c.tickFormat?c.tickFormat.apply(c,a):k:e,p=u.selectAll(".tick").data(f,c),g=p.enter().insert("g",".domain").attr("class","tick").style("opacity",jo),m=fo.transition(p.exit()).style("opacity",jo).remove(),v=fo.transition(p.order()).style("opacity",1),y=Math.max(r,0)+o,b=Xr(c),_=u.selectAll(".domain").data([0]),x=(_.enter().append("path").attr("class","domain"),fo.transition(_));g.append("line"),g.append("text");var w,C,M,T,D=g.select("line"),S=v.select("line"),E=p.select("text").text(d),I=g.select("text"),N=v.select("text"),P="top"===i||"left"===i?-1:1;if("bottom"===i||"top"===i?(t=so,w="x",M="y",C="x2",T="y2",E.attr("dy",P<0?"0em":".71em").style("text-anchor","middle"),x.attr("d","M"+b[0]+","+P*s+"V0H"+b[1]+"V"+P*s)):(t=oo,w="y",M="x",C="y2",T="x2",E.attr("dy",".32em").style("text-anchor",P<0?"end":"start"),x.attr("d","M"+P*s+","+b[0]+"H0V"+b[1]+"H"+P*s)),D.attr(T,P*r),I.attr(M,P*y),S.attr(C,0).attr(T,P*r),N.attr(w,0).attr(M,P*y),c.rangeBand){var A=c,O=A.rangeBand()/2;h=c=function(t){return A(t)+O}}else h.rangeBand?h=c:m.call(t,c,h);g.call(t,h,c),v.call(t,c,c)})}var e,n=fo.scale.linear(),i=Yl,r=6,s=6,o=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 Vl?e+"":Yl,t):i},t.ticks=function(){return arguments.length?(a=go(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,s=+arguments[n-1],t):r},t.innerTickSize=function(e){return arguments.length?(r=+e,t):r},t.outerTickSize=function(e){return arguments.length?(s=+e,t):s},t.tickPadding=function(e){return arguments.length?(o=+e,t):o},t.tickSubdivide=function(){return arguments.length&&t},t};var Yl="bottom",Vl={top:1,right:1,bottom:1,left:1};fo.svg.brush=function(){function t(s){s.each(function(){var s=fo.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",r).on("touchstart.brush",r),o=s.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),s.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=s.selectAll(".resize").data(g,k);a.exit().remove(),a.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Kl[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 l,c=fo.transition(s),f=fo.transition(o);u&&(l=Xr(u),f.attr("x",l[0]).attr("width",l[1]-l[0]),n(c)),h&&(l=Xr(h),f.attr("y",l[0]).attr("height",l[1]-l[0]),i(c)),e(c)})}function e(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+c[+/e$/.test(t)]+","+f[+/^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",f[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function r(){function r(){32==fo.event.keyCode&&(S||(b=null,N[0]-=c[1],N[1]-=f[1],S=2),E())}function g(){32==fo.event.keyCode&&2==S&&(N[0]+=c[1],N[1]+=f[1],S=0,E())}function m(){var t=fo.mouse(x),r=!1;_&&(t[0]+=_[0],t[1]+=_[1]),S||(fo.event.altKey?(b||(b=[(c[0]+c[1])/2,(f[0]+f[1])/2]),N[0]=c[+(t[0]<b[0])],N[1]=f[+(t[1]<b[1])]):b=null),T&&v(t,u,0)&&(n(C),r=!0),D&&v(t,h,1)&&(i(C),r=!0),r&&(e(C),k({type:"brush",mode:S?"move":"resize"}))}function v(t,e,n){var i,r,o=Xr(e),l=o[0],u=o[1],h=N[n],g=n?f:c,m=g[1]-g[0];if(S&&(l-=h,u-=m+h),i=(n?p:d)?Math.max(l,Math.min(u,t[n])):t[n],S?r=(i+=h)+m:(b&&(h=Math.max(l,Math.min(u,2*b[n]-i))),h<i?(r=i,i=h):r=h),g[0]!=i||g[1]!=r)return n?a=null:s=null,g[0]=i,g[1]=r,!0}function y(){m(),C.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),fo.select("body").style("cursor",null),P.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),I(),k({type:"brushend"})}var b,_,x=this,w=fo.select(fo.event.target),k=l.of(x,arguments),C=fo.select(x),M=w.datum(),T=!/^(n|s)$/.test(M)&&u,D=!/^(e|w)$/.test(M)&&h,S=w.classed("extent"),I=tt(x),N=fo.mouse(x),P=fo.select(o(x)).on("keydown.brush",r).on("keyup.brush",g);if(fo.event.changedTouches?P.on("touchmove.brush",m).on("touchend.brush",y):P.on("mousemove.brush",m).on("mouseup.brush",y),C.interrupt().selectAll("*").interrupt(),S)N[0]=c[0]-N[0],N[1]=f[0]-N[1];else if(M){var A=+/w$/.test(M),O=+/^n/.test(M);_=[c[1-A]-N[0],f[1-O]-N[1]],N[0]=c[A],N[1]=f[O]}else fo.event.altKey&&(b=N.slice());C.style("pointer-events","none").selectAll(".resize").style("display",null),fo.select("body").style("cursor",w.style("cursor")),k({type:"brushstart"}),m()}var s,a,l=N(t,"brushstart","brush","brushend"),u=null,h=null,c=[0,0],f=[0,0],d=!0,p=!0,g=Xl[0];return t.event=function(t){t.each(function(){var t=l.of(this,arguments),e={x:c,y:f,i:s,j:a},n=this.__chart__||e;this.__chart__=e,$l?fo.select(this).transition().each("start.brush",function(){s=n.i,a=n.j,c=n.x,f=n.y,t({type:"brushstart"})}).tween("brush:brush",function(){var n=Mi(c,e.x),i=Mi(f,e.y);return s=a=null,function(r){c=e.x=n(r),f=e.y=i(r),t({type:"brush",mode:"resize"})}}).each("end.brush",function(){s=e.i,a=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?(u=e,g=Xl[!u<<1|!h],t):u},t.y=function(e){return arguments.length?(h=e,g=Xl[!u<<1|!h],t):h},t.clamp=function(e){return arguments.length?(u&&h?(d=!!e[0],p=!!e[1]):u?d=!!e:h&&(p=!!e),t):u&&h?[d,p]:u?d:h?p:null},t.extent=function(e){var n,i,r,o,l;return arguments.length?(u&&(n=e[0],i=e[1],h&&(n=n[0],i=i[0]),s=[n,i],u.invert&&(n=u(n),i=u(i)),i<n&&(l=n,n=i,i=l),n==c[0]&&i==c[1]||(c=[n,i])),h&&(r=e[0],o=e[1],u&&(r=r[1],o=o[1]),a=[r,o],h.invert&&(r=h(r),o=h(o)),o<r&&(l=r,r=o,o=l),r==f[0]&&o==f[1]||(f=[r,o])),t):(u&&(s?(n=s[0],i=s[1]):(n=c[0],i=c[1],u.invert&&(n=u.invert(n),i=u.invert(i)),i<n&&(l=n,n=i,i=l))),h&&(a?(r=a[0],o=a[1]):(r=f[0],o=f[1],h.invert&&(r=h.invert(r),o=h.invert(o)),o<r&&(l=r,r=o,o=l))),u&&h?[[n,r],[i,o]]:u?[n,i]:h&&[r,o])},t.clear=function(){return t.empty()||(c=[0,0],f=[0,0],s=a=null),t},t.empty=function(){return!!u&&c[0]==c[1]||!!h&&f[0]==f[1]},fo.rebind(t,l,"on")};var Kl={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Xl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Gl=ga.format=xa.timeFormat,Jl=Gl.utc,Zl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Gl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ao:Zl,ao.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},ao.toString=Zl.toString,ga.second=Ut(function(t){return new ma(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),ga.seconds=ga.second.range,ga.seconds.utc=ga.second.utc.range,ga.minute=Ut(function(t){return new ma(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),ga.minutes=ga.minute.range,ga.minutes.utc=ga.minute.utc.range,ga.hour=Ut(function(t){var e=t.getTimezoneOffset()/60;return new ma(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),ga.hours=ga.hour.range,ga.hours.utc=ga.hour.utc.range,ga.month=Ut(function(t){return t=ga.day(t),t.setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),ga.months=ga.month.range,ga.months.utc=ga.month.utc.range;var Ql=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],tu=[[ga.second,1],[ga.second,5],[ga.second,15],[ga.second,30],[ga.minute,1],[ga.minute,5],[ga.minute,15],[ga.minute,30],[ga.hour,1],[ga.hour,3],[ga.hour,6],[ga.hour,12],[ga.day,1],[ga.day,2],[ga.week,1],[ga.month,1],[ga.month,3],[ga.year,1]],eu=Gl.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",Oe]]),nu={range:function(t,e,n){return fo.range(Math.ceil(t/n)*n,+e,n).map(uo)},floor:k,ceil:k};tu.year=ga.year,ga.scale=function(){return lo(fo.scale.linear(),tu,eu)};var iu=tu.map(function(t){return[t[0].utc,t[1]]}),ru=Jl.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",Oe]]);iu.year=ga.year.utc,ga.scale.utc=function(){return lo(fo.scale.linear(),iu,ru)},fo.text=Pt(function(t){return t.responseText}),fo.json=function(t,e){return At(t,"application/json",ho,e)},fo.html=function(t,e){return At(t,"text/html",co,e)},fo.xml=Pt(function(t){return t.responseXML}),this.d3=fo,i=fo,void 0!==(r="function"==typeof i?i.call(e,n,e,t):i)&&(t.exports=r)}()},function(t,e,n){"use strict";function i(t){if(t.disabled&&"array"!==d.default.type(t.disabled))throw new Error('"disabled" must be defined as an array of indeces: '+JSON.stringify(t));if(t.multiselect&&t.selected&&"array"!==d.default.type(t.selected))throw new Error('Mulitselect rows need an array for "selected": '+JSON.stringify(t));if(!t.label||!t.id)throw new Error("Peek controls need a label and id for each control row: "+JSON.stringify(t));if(t.disabled&&-1!==t.disabled.indexOf(t.selected))throw new Error("Selected column is in the list of disabled columns: "+JSON.stringify(t));return t}function r(t,e){return p("<div/>").addClass(k).text(t.label)}function s(t,e){var n=p("<td/>").html(r(t,e)).attr("data-"+M,e);return t.disabled&&-1!==t.disabled.indexOf(e)&&n.addClass(w),n}function o(t,e,n){var i=t.children("."+k);t.hasClass(x)?i.html(void 0!==e.selectedText?e.selectedText:e.label):i.html(void 0!==e.unselectedText?e.unselectedText:e.label)}function a(t,e){var n=s(t,e);return t.selected===e&&n.addClass(x),o(n,t,e),n.hasClass(w)||n.click(function(n){var i=p(this);if(!i.hasClass(x)){i.parent().children("."+x).removeClass(x).each(function(){o(p(this),t,e)}),i.addClass(x),o(i,t,e);var r={},s=i.parent().attr("id"),a=i.data(M);r[s]=a,i.parents(".peek").trigger(v,r)}}),n}function l(t,e){var n=s(t,e);return t.selected&&-1!==t.selected.indexOf(e)&&n.addClass(x),o(n,t,e),n.hasClass(w)||n.click(function(n){var i=p(this);i.toggleClass(x),o(i,t,e);var r=i.parent().find("."+x).map(function(t,e){return p(e).data(M)}),s={},a=i.parent().attr("id"),l=d.default.makeArray(r);s[a]=l,i.parents(".peek").trigger(v,s)}),n}function u(t,e){for(var n=[],i=0;i<t;i+=1)n.push(e.multiselect?l(e,i):a(e,i));return n}function h(t,e,n){var i=p("<tr/>").attr("id",e.id).addClass(b);if(n){var r=p("<td/>").addClass(_).text(e.label+":");i.append(r)}return i.append(u(t,e)),i}function c(t){t=d.default.extend(!0,{},g,t);var e=p(this).addClass(m),n=e.find("table"),r=n.find("th").length,s=n.find("tr").length,o=n.find("td[colspan]").map(function(e,n){var i=p(this);return i.text()&&i.text().match(new RegExp("^"+t.commentChar))?p(this).css("color","grey").parent().get(0):null});if(t.hideCommentRows&&(o.hide(),s-=o.length),t.includePrompts){var a=p("<th/>").addClass("top-left").text(t.topLeftContent).attr("rowspan",s);n.find("tr").first().prepend(a)}var l=n.find("th:not(.top-left)").each(function(e,n){var i=p(this),r=i.text().replace(/^\d+\.*/,""),s=t.columnNames[e]||r;i.attr("data-"+T,s).text(e+1+(s?"."+s:""))});return t.renameColumns&&l.addClass(C).click(function(){var e=p(this),n=e.index()+(t.includePrompts?0:1),i=e.data(T),r=prompt("New column name:",i);if(null!==r&&r!==i){e.text(n+(r?"."+r:"")).data(T,r).attr("data-",T,r);var s=d.default.makeArray(e.parent().children("th:not(.top-left)").map(function(){return p(this).data(T)}));e.parents(".peek").trigger(y,s)}}),t.controls.forEach(function(e,s){i(e);var o=h(r,e,t.includePrompts);n.find("tbody").append(o)}),this}var f=n(0),d=function(t){return t&&t.__esModule?t:{default:t}}(f),p=d.default,g={renameColumns:!1,columnNames:[],commentChar:"#",hideCommentRows:!1,includePrompts:!0,topLeftContent:"Columns:"},m="peek-column-selector",v="peek-column-selector.change",y="peek-column-selector.rename",b="control",_="control-prompt",x="selected",w="disabled",k="button",C="renamable-header",M="column-index",T="column-name";d.default.fn.extend({peekColumnSelector:function(t){return this.map(function(){return c.call(this,t)})}})},function(t,e,n){"use strict";function i(t,e){return this.numPages=null,this.currPage=0,this.init(t,e)}function r(t){return a(['<li><a href="javascript:void(0);">',t,"</a></li>"].join(""))}var s=n(0),o=function(t){return t&&t.__esModule?t:{default:t}}(s),a=o.default;i.prototype.DATA_KEY="pagination",i.prototype.defaults={startingPage:0,perPage:20,totalDataSize:null,currDataSize:null},i.prototype.init=function(t,e){return e=e||{},this.$element=t,this.options=o.default.extend(!0,{},this.defaults,e),this.currPage=this.options.startingPage,null!==this.options.totalDataSize&&(this.numPages=Math.ceil(this.options.totalDataSize/this.options.perPage),this.currPage>=this.numPages&&(this.currPage=this.numPages-1)),this.$element.data(i.prototype.DATA_KEY,this),this._render(),this},i.prototype._render=function(){return 0===this.options.totalDataSize?this:1===this.numPages?this:(this.numPages>0?(this._renderPages(),this._scrollToActivePage()):this._renderPrevNext(),this)},i.prototype._renderPrevNext=function(){var t=this,e=r("Prev"),n=r("Next"),i=a("<ul/>").addClass("pagination pagination-prev-next");return 0===this.currPage?e.addClass("disabled"):e.click(function(){t.prevPage()}),this.numPages&&this.currPage===this.numPages-1||this.options.currDataSize&&this.options.currDataSize<this.options.perPage?n.addClass("disabled"):n.click(function(){t.nextPage()}),this.$element.html(i.append([e,n])),this.$element},i.prototype._renderPages=function(){for(var t=this,e=a("<div>").addClass("pagination-scroll-container"),n=a("<ul/>").addClass("pagination pagination-page-list"),i=function(e){t.goToPage(a(this).data("page"))},s=0;s<this.numPages;s+=1){var o=r(s+1).attr("data-page",s).click(i);s===this.currPage&&o.addClass("active"),n.append(o)}return this.$element.html(e.html(n))},i.prototype._scrollToActivePage=function(){var t=this.$element.find(".pagination-scroll-container");if(!t.length)return this;var e=this.$element.find("li.active"),n=t.width()/2;return t.scrollLeft(t.scrollLeft()+e.position().left-n),this},i.prototype.goToPage=function(t){return t<=0&&(t=0),this.numPages&&t>=this.numPages&&(t=this.numPages-1),t===this.currPage?this:(this.currPage=t,this.$element.trigger("pagination.page-change",this.currPage),this._render(),this)},i.prototype.prevPage=function(){return this.goToPage(this.currPage-1)},i.prototype.nextPage=function(){return this.goToPage(this.currPage+1)},i.prototype.page=function(){return this.currPage},i.create=function(t,e){return new i(t,e)},o.default.fn.extend({pagination:function(t){var e=o.default.makeArray(arguments).slice(1);if("object"===o.default.type(t))return this.map(function(){return i.create(a(this),t),this});var n=a(this[0]),r=n.data(i.prototype.DATA_KEY);if(r){if("string"!==o.default.type(t))return r;var s=r[t];if("function"===o.default.type(s))return s.apply(r,e)}}})}]); |