if(function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function i(e){var t=e.length,i=st.type(e);return"function"===i||st.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===i||0===t||"number"==typeof t&&t>0&&t-1 in e}function n(e,t,i){if(st.isFunction(t))return st.grep(e,function(e,n){return!!t.call(e,n,e)!==i});if(t.nodeType)return st.grep(e,function(e){return e===t!==i});if("string"==typeof t){if(dt.test(t))return st.filter(t,e,i);t=st.filter(t,e)}return st.grep(e,function(e){return st.inArray(e,t)>=0!==i})}function s(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function r(e){var t=_t[e]={};return st.each(e.match(bt)||[],function(e,i){t[i]=!0}),t}function a(){pt.addEventListener?(pt.removeEventListener("DOMContentLoaded",o,!1),e.removeEventListener("load",o,!1)):(pt.detachEvent("onreadystatechange",o),e.detachEvent("onload",o))}function o(){(pt.addEventListener||"load"===event.type||"complete"===pt.readyState)&&(a(),st.ready())}function l(e,t,i){if(void 0===i&&1===e.nodeType){var n="data-"+t.replace(Ct,"-$1").toLowerCase();if(i=e.getAttribute(n),"string"==typeof i){try{i="true"===i?!0:"false"===i?!1:"null"===i?null:+i+""===i?+i:Dt.test(i)?st.parseJSON(i):i}catch(s){}st.data(e,t,i)}else i=void 0}return i}function u(e){var t;for(t in e)if(("data"!==t||!st.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,i,n){if(st.acceptData(e)){var s,r,a=st.expando,o=e.nodeType,l=o?st.cache:e,u=o?e[a]:e[a]&&a;if(u&&l[u]&&(n||l[u].data)||void 0!==i||"string"!=typeof t)return u||(u=o?e[a]=V.pop()||st.guid++:a),l[u]||(l[u]=o?{}:{toJSON:st.noop}),("object"==typeof t||"function"==typeof t)&&(n?l[u]=st.extend(l[u],t):l[u].data=st.extend(l[u].data,t)),r=l[u],n||(r.data||(r.data={}),r=r.data),void 0!==i&&(r[st.camelCase(t)]=i),"string"==typeof t?(s=r[t],null==s&&(s=r[st.camelCase(t)])):s=r,s}}function h(e,t,i){if(st.acceptData(e)){var n,s,r=e.nodeType,a=r?st.cache:e,o=r?e[st.expando]:st.expando;if(a[o]){if(t&&(n=i?a[o]:a[o].data)){st.isArray(t)?t=t.concat(st.map(t,st.camelCase)):t in n?t=[t]:(t=st.camelCase(t),t=t in n?[t]:t.split(" ")),s=t.length;for(;s--;)delete n[t[s]];if(i?!u(n):!st.isEmptyObject(n))return}(i||(delete a[o].data,u(a[o])))&&(r?st.cleanData([e],!0):it.deleteExpando||a!=a.window?delete a[o]:a[o]=null)}}}function d(){return!0}function f(){return!1}function p(){try{return pt.activeElement}catch(e){}}function g(e){var t=Ht.split("|"),i=e.createDocumentFragment();if(i.createElement)for(;t.length;)i.createElement(t.pop());return i}function m(e,t){var i,n,s=0,r=typeof e.getElementsByTagName!==kt?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==kt?e.querySelectorAll(t||"*"):void 0;if(!r)for(r=[],i=e.childNodes||e;null!=(n=i[s]);s++)!t||st.nodeName(n,t)?r.push(n):st.merge(r,m(n,t));return void 0===t||t&&st.nodeName(e,t)?st.merge([e],r):r}function v(e){At.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t){return st.nodeName(e,"table")&&st.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function b(e){return e.type=(null!==st.find.attr(e,"type"))+"/"+e.type,e}function _(e){var t=Gt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function w(e,t){for(var i,n=0;null!=(i=e[n]);n++)st._data(i,"globalEval",!t||st._data(t[n],"globalEval"))}function x(e,t){if(1===t.nodeType&&st.hasData(e)){var i,n,s,r=st._data(e),a=st._data(t,r),o=r.events;if(o){delete a.handle,a.events={};for(i in o)for(n=0,s=o[i].length;s>n;n++)st.event.add(t,i,o[i][n])}a.data&&(a.data=st.extend({},a.data))}}function k(e,t){var i,n,s;if(1===t.nodeType){if(i=t.nodeName.toLowerCase(),!it.noCloneEvent&&t[st.expando]){s=st._data(t);for(n in s.events)st.removeEvent(t,n,s.handle);t.removeAttribute(st.expando)}"script"===i&&t.text!==e.text?(b(t).text=e.text,_(t)):"object"===i?(t.parentNode&&(t.outerHTML=e.outerHTML),it.html5Clone&&e.innerHTML&&!st.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===i&&At.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===i?t.defaultSelected=t.selected=e.defaultSelected:("input"===i||"textarea"===i)&&(t.defaultValue=e.defaultValue)}}function D(t,i){var n,s=st(i.createElement(t)).appendTo(i.body),r=e.getDefaultComputedStyle&&(n=e.getDefaultComputedStyle(s[0]))?n.display:st.css(s[0],"display");return s.detach(),r}function C(e){var t=pt,i=Zt[e];return i||(i=D(e,t),"none"!==i&&i||(Qt=(Qt||st("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=(Qt[0].contentWindow||Qt[0].contentDocument).document,t.write(),t.close(),i=D(e,t),Qt.detach()),Zt[e]=i),i}function S(e,t){return{get:function(){var i=e();if(null!=i)return i?void delete this.get:(this.get=t).apply(this,arguments)}}}function T(e,t){if(t in e)return t;for(var i=t.charAt(0).toUpperCase()+t.slice(1),n=t,s=di.length;s--;)if(t=di[s]+i,t in e)return t;return n}function P(e,t){for(var i,n,s,r=[],a=0,o=e.length;o>a;a++)n=e[a],n.style&&(r[a]=st._data(n,"olddisplay"),i=n.style.display,t?(r[a]||"none"!==i||(n.style.display=""),""===n.style.display&&Pt(n)&&(r[a]=st._data(n,"olddisplay",C(n.nodeName)))):(s=Pt(n),(i&&"none"!==i||!s)&&st._data(n,"olddisplay",s?i:st.css(n,"display"))));for(a=0;o>a;a++)n=e[a],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?r[a]||"":"none"));return e}function I(e,t,i){var n=li.exec(t);return n?Math.max(0,n[1]-(i||0))+(n[2]||"px"):t}function A(e,t,i,n,s){for(var r=i===(n?"border":"content")?4:"width"===t?1:0,a=0;4>r;r+=2)"margin"===i&&(a+=st.css(e,i+Tt[r],!0,s)),n?("content"===i&&(a-=st.css(e,"padding"+Tt[r],!0,s)),"margin"!==i&&(a-=st.css(e,"border"+Tt[r]+"Width",!0,s))):(a+=st.css(e,"padding"+Tt[r],!0,s),"padding"!==i&&(a+=st.css(e,"border"+Tt[r]+"Width",!0,s)));return a}function N(e,t,i){var n=!0,s="width"===t?e.offsetWidth:e.offsetHeight,r=ei(e),a=it.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,r);if(0>=s||null==s){if(s=ti(e,t,r),(0>s||null==s)&&(s=e.style[t]),ni.test(s))return s;n=a&&(it.boxSizingReliable()||s===e.style[t]),s=parseFloat(s)||0}return s+A(e,t,i||(a?"border":"content"),n,r)+"px"}function M(e,t,i,n,s){return new M.prototype.init(e,t,i,n,s)}function E(){return setTimeout(function(){fi=void 0}),fi=st.now()}function F(e,t){var i,n={height:e},s=0;for(t=t?1:0;4>s;s+=2-t)i=Tt[s],n["margin"+i]=n["padding"+i]=e;return t&&(n.opacity=n.width=e),n}function O(e,t,i){for(var n,s=(bi[t]||[]).concat(bi["*"]),r=0,a=s.length;a>r;r++)if(n=s[r].call(i,t,e))return n}function H(e,t,i){var n,s,r,a,o,l,u,c,h=this,d={},f=e.style,p=e.nodeType&&Pt(e),g=st._data(e,"fxshow");i.queue||(o=st._queueHooks(e,"fx"),null==o.unqueued&&(o.unqueued=0,l=o.empty.fire,o.empty.fire=function(){o.unqueued||l()}),o.unqueued++,h.always(function(){h.always(function(){o.unqueued--,st.queue(e,"fx").length||o.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],u=st.css(e,"display"),c="none"===u?st._data(e,"olddisplay")||C(e.nodeName):u,"inline"===c&&"none"===st.css(e,"float")&&(it.inlineBlockNeedsLayout&&"inline"!==C(e.nodeName)?f.zoom=1:f.display="inline-block")),i.overflow&&(f.overflow="hidden",it.shrinkWrapBlocks()||h.always(function(){f.overflow=i.overflow[0],f.overflowX=i.overflow[1],f.overflowY=i.overflow[2]}));for(n in t)if(s=t[n],gi.exec(s)){if(delete t[n],r=r||"toggle"===s,s===(p?"hide":"show")){if("show"!==s||!g||void 0===g[n])continue;p=!0}d[n]=g&&g[n]||st.style(e,n)}else u=void 0;if(st.isEmptyObject(d))"inline"===("none"===u?C(e.nodeName):u)&&(f.display=u);else{g?"hidden"in g&&(p=g.hidden):g=st._data(e,"fxshow",{}),r&&(g.hidden=!p),p?st(e).show():h.done(function(){st(e).hide()}),h.done(function(){var t;st._removeData(e,"fxshow");for(t in d)st.style(e,t,d[t])});for(n in d)a=O(p?g[n]:0,n,h),n in g||(g[n]=a.start,p&&(a.end=a.start,a.start="width"===n||"height"===n?1:0))}}function R(e,t){var i,n,s,r,a;for(i in e)if(n=st.camelCase(i),s=t[n],r=e[i],st.isArray(r)&&(s=r[1],r=e[i]=r[0]),i!==n&&(e[n]=r,delete e[i]),a=st.cssHooks[n],a&&"expand"in a){r=a.expand(r),delete e[n];for(i in r)i in e||(e[i]=r[i],t[i]=s)}else t[n]=s}function L(e,t,i){var n,s,r=0,a=yi.length,o=st.Deferred().always(function(){delete l.elem}),l=function(){if(s)return!1;for(var t=fi||E(),i=Math.max(0,u.startTime+u.duration-t),n=i/u.duration||0,r=1-n,a=0,l=u.tweens.length;l>a;a++)u.tweens[a].run(r);return o.notifyWith(e,[u,r,i]),1>r&&l?i:(o.resolveWith(e,[u]),!1)},u=o.promise({elem:e,props:st.extend({},t),opts:st.extend(!0,{specialEasing:{}},i),originalProperties:t,originalOptions:i,startTime:fi||E(),duration:i.duration,tweens:[],createTween:function(t,i){var n=st.Tween(e,u.opts,t,i,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(n),n},stop:function(t){var i=0,n=t?u.tweens.length:0;if(s)return this;for(s=!0;n>i;i++)u.tweens[i].run(1);return t?o.resolveWith(e,[u,t]):o.rejectWith(e,[u,t]),this}}),c=u.props;for(R(c,u.opts.specialEasing);a>r;r++)if(n=yi[r].call(u,e,c,u.opts))return n;return st.map(c,O,u),st.isFunction(u.opts.start)&&u.opts.start.call(e,u),st.fx.timer(st.extend(l,{elem:e,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 j(e){return function(t,i){"string"!=typeof t&&(i=t,t="*");var n,s=0,r=t.toLowerCase().match(bt)||[];if(st.isFunction(i))for(;n=r[s++];)"+"===n.charAt(0)?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(i)):(e[n]=e[n]||[]).push(i)}}function U(e,t,i,n){function s(o){var l;return r[o]=!0,st.each(e[o]||[],function(e,o){var u=o(t,i,n);return"string"!=typeof u||a||r[u]?a?!(l=u):void 0:(t.dataTypes.unshift(u),s(u),!1)}),l}var r={},a=e===$i;return s(t.dataTypes[0])||!r["*"]&&s("*")}function z(e,t){var i,n,s=st.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((s[n]?e:i||(i={}))[n]=t[n]);return i&&st.extend(!0,e,i),e}function W(e,t,i){for(var n,s,r,a,o=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===s&&(s=e.mimeType||t.getResponseHeader("Content-Type"));if(s)for(a in o)if(o[a]&&o[a].test(s)){l.unshift(a);break}if(l[0]in i)r=l[0];else{for(a in i){if(!l[0]||e.converters[a+" "+l[0]]){r=a;break}n||(n=a)}r=r||n}return r?(r!==l[0]&&l.unshift(r),i[r]):void 0}function $(e,t,i,n){var s,r,a,o,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(r=c.shift();r;)if(e.responseFields[r]&&(i[e.responseFields[r]]=t),!l&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=c.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(a=u[l+" "+r]||u["* "+r],!a)for(s in u)if(o=s.split(" "),o[1]===r&&(a=u[l+" "+o[0]]||u["* "+o[0]])){a===!0?a=u[s]:u[s]!==!0&&(r=o[0],c.unshift(o[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(h){return{state:"parsererror",error:a?h:"No conversion from "+l+" to "+r}}}return{state:"success",data:t}}function B(e,t,i,n){var s;if(st.isArray(t))st.each(t,function(t,s){i||Gi.test(e)?n(e,s):B(e+"["+("object"==typeof s?t:"")+"]",s,i,n)});else if(i||"object"!==st.type(t))n(e,t);else for(s in t)B(e+"["+s+"]",t[s],i,n)}function q(){try{return new e.XMLHttpRequest}catch(t){}}function Y(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function G(e){return st.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var V=[],J=V.slice,K=V.concat,X=V.push,Q=V.indexOf,Z={},et=Z.toString,tt=Z.hasOwnProperty,it={},nt="1.11.1",st=function(e,t){return new st.fn.init(e,t)},rt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,at=/^-ms-/,ot=/-([\da-z])/gi,lt=function(e,t){return t.toUpperCase()};st.fn=st.prototype={jquery:nt,constructor:st,selector:"",length:0,toArray:function(){return J.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:J.call(this)},pushStack:function(e){var t=st.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return st.each(this,e,t)},map:function(e){return this.pushStack(st.map(this,function(t,i){return e.call(t,i,t)}))},slice:function(){return this.pushStack(J.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,i=+e+(0>e?t:0);return this.pushStack(i>=0&&t>i?[this[i]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:X,sort:V.sort,splice:V.splice},st.extend=st.fn.extend=function(){var e,t,i,n,s,r,a=arguments[0]||{},o=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[o]||{},o++),"object"==typeof a||st.isFunction(a)||(a={}),o===l&&(a=this,o--);l>o;o++)if(null!=(s=arguments[o]))for(n in s)e=a[n],i=s[n],a!==i&&(u&&i&&(st.isPlainObject(i)||(t=st.isArray(i)))?(t?(t=!1,r=e&&st.isArray(e)?e:[]):r=e&&st.isPlainObject(e)?e:{},a[n]=st.extend(u,r,i)):void 0!==i&&(a[n]=i));return a},st.extend({expando:"jQuery"+(nt+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===st.type(e)},isArray:Array.isArray||function(e){return"array"===st.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!st.isArray(e)&&e-parseFloat(e)>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==st.type(e)||e.nodeType||st.isWindow(e))return!1;try{if(e.constructor&&!tt.call(e,"constructor")&&!tt.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(i){return!1}if(it.ownLast)for(t in e)return tt.call(e,t);for(t in e);return void 0===t||tt.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Z[et.call(e)]||"object":typeof e},globalEval:function(t){t&&st.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(at,"ms-").replace(ot,lt)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var s,r=0,a=e.length,o=i(e);if(n){if(o)for(;a>r&&(s=t.apply(e[r],n),s!==!1);r++);else for(r in e)if(s=t.apply(e[r],n),s===!1)break}else if(o)for(;a>r&&(s=t.call(e[r],r,e[r]),s!==!1);r++);else for(r in e)if(s=t.call(e[r],r,e[r]),s===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(rt,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(i(Object(e))?st.merge(n,"string"==typeof e?[e]:e):X.call(n,e)),n},inArray:function(e,t,i){var n;if(t){if(Q)return Q.call(t,e,i);for(n=t.length,i=i?0>i?Math.max(0,n+i):i:0;n>i;i++)if(i in t&&t[i]===e)return i}return-1},merge:function(e,t){for(var i=+t.length,n=0,s=e.length;i>n;)e[s++]=t[n++];if(i!==i)for(;void 0!==t[n];)e[s++]=t[n++];return e.length=s,e},grep:function(e,t,i){for(var n,s=[],r=0,a=e.length,o=!i;a>r;r++)n=!t(e[r],r),n!==o&&s.push(e[r]);return s},map:function(e,t,n){var s,r=0,a=e.length,o=i(e),l=[];if(o)for(;a>r;r++)s=t(e[r],r,n),null!=s&&l.push(s);else for(r in e)s=t(e[r],r,n),null!=s&&l.push(s);return K.apply([],l)},guid:1,proxy:function(e,t){var i,n,s;return"string"==typeof t&&(s=e[t],t=e,e=s),st.isFunction(e)?(i=J.call(arguments,2),n=function(){return e.apply(t||this,i.concat(J.call(arguments)))},n.guid=e.guid=e.guid||st.guid++,n):void 0},now:function(){return+new Date},support:it}),st.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Z["[object "+t+"]"]=t.toLowerCase()});var ut=function(e){function t(e,t,i,n){var s,r,a,o,l,u,h,f,p,g;if((t?t.ownerDocument||t:U)!==M&&N(t),t=t||M,i=i||[],!e||"string"!=typeof e)return i;if(1!==(o=t.nodeType)&&9!==o)return[];if(F&&!n){if(s=yt.exec(e))if(a=s[1]){if(9===o){if(r=t.getElementById(a),!r||!r.parentNode)return i;if(r.id===a)return i.push(r),i}else if(t.ownerDocument&&(r=t.ownerDocument.getElementById(a))&&L(t,r)&&r.id===a)return i.push(r),i}else{if(s[2])return Z.apply(i,t.getElementsByTagName(e)),i;if((a=s[3])&&w.getElementsByClassName&&t.getElementsByClassName)return Z.apply(i,t.getElementsByClassName(a)),i}if(w.qsa&&(!O||!O.test(e))){if(f=h=j,p=t,g=9===o&&e,1===o&&"object"!==t.nodeName.toLowerCase()){for(u=C(e),(h=t.getAttribute("id"))?f=h.replace(_t,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",l=u.length;l--;)u[l]=f+d(u[l]);p=bt.test(e)&&c(t.parentNode)||t,g=u.join(",")}if(g)try{return Z.apply(i,p.querySelectorAll(g)),i}catch(m){}finally{h||t.removeAttribute("id")}}}return T(e.replace(lt,"$1"),t,i,n)}function i(){function e(i,n){return t.push(i+" ")>x.cacheLength&&delete e[t.shift()],e[i+" "]=n}var t=[];return e}function n(e){return e[j]=!0,e}function s(e){var t=M.createElement("div");try{return!!e(t)}catch(i){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function r(e,t){for(var i=e.split("|"),n=e.length;n--;)x.attrHandle[i[n]]=t}function a(e,t){var i=t&&e,n=i&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function o(e){return function(t){var i=t.nodeName.toLowerCase();return"input"===i&&t.type===e}}function l(e){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===e}}function u(e){return n(function(t){return t=+t,n(function(i,n){for(var s,r=e([],i.length,t),a=r.length;a--;)i[s=r[a]]&&(i[s]=!(n[s]=i[s]))})})}function c(e){return e&&typeof e.getElementsByTagName!==G&&e}function h(){}function d(e){for(var t=0,i=e.length,n="";i>t;t++)n+=e[t].value;return n}function f(e,t,i){var n=t.dir,s=i&&"parentNode"===n,r=W++;return t.first?function(t,i,r){for(;t=t[n];)if(1===t.nodeType||s)return e(t,i,r)}:function(t,i,a){var o,l,u=[z,r];if(a){for(;t=t[n];)if((1===t.nodeType||s)&&e(t,i,a))return!0}else for(;t=t[n];)if(1===t.nodeType||s){if(l=t[j]||(t[j]={}),(o=l[n])&&o[0]===z&&o[1]===r)return u[2]=o[2];if(l[n]=u,u[2]=e(t,i,a))return!0}}}function p(e){return e.length>1?function(t,i,n){for(var s=e.length;s--;)if(!e[s](t,i,n))return!1;return!0}:e[0]}function g(e,i,n){for(var s=0,r=i.length;r>s;s++)t(e,i[s],n);return n}function m(e,t,i,n,s){for(var r,a=[],o=0,l=e.length,u=null!=t;l>o;o++)(r=e[o])&&(!i||i(r,n,s))&&(a.push(r),u&&t.push(o));return a}function v(e,t,i,s,r,a){return s&&!s[j]&&(s=v(s)),r&&!r[j]&&(r=v(r,a)),n(function(n,a,o,l){var u,c,h,d=[],f=[],p=a.length,v=n||g(t||"*",o.nodeType?[o]:o,[]),y=!e||!n&&t?v:m(v,d,e,o,l),b=i?r||(n?e:p||s)?[]:a:y;if(i&&i(y,b,o,l),s)for(u=m(b,f),s(u,[],o,l),c=u.length;c--;)(h=u[c])&&(b[f[c]]=!(y[f[c]]=h));if(n){if(r||e){if(r){for(u=[],c=b.length;c--;)(h=b[c])&&u.push(y[c]=h);r(null,b=[],u,l)}for(c=b.length;c--;)(h=b[c])&&(u=r?tt.call(n,h):d[c])>-1&&(n[u]=!(a[u]=h))}}else b=m(b===a?b.splice(p,b.length):b),r?r(null,a,b,l):Z.apply(a,b)})}function y(e){for(var t,i,n,s=e.length,r=x.relative[e[0].type],a=r||x.relative[" "],o=r?1:0,l=f(function(e){return e===t},a,!0),u=f(function(e){return tt.call(t,e)>-1},a,!0),c=[function(e,i,n){return!r&&(n||i!==P)||((t=i).nodeType?l(e,i,n):u(e,i,n))}];s>o;o++)if(i=x.relative[e[o].type])c=[f(p(c),i)];else{if(i=x.filter[e[o].type].apply(null,e[o].matches),i[j]){for(n=++o;s>n&&!x.relative[e[n].type];n++);return v(o>1&&p(c),o>1&&d(e.slice(0,o-1).concat({value:" "===e[o-2].type?"*":""})).replace(lt,"$1"),i,n>o&&y(e.slice(o,n)),s>n&&y(e=e.slice(n)),s>n&&d(e))}c.push(i)}return p(c)}function b(e,i){var s=i.length>0,r=e.length>0,a=function(n,a,o,l,u){var c,h,d,f=0,p="0",g=n&&[],v=[],y=P,b=n||r&&x.find.TAG("*",u),_=z+=null==y?1:Math.random()||.1,w=b.length;for(u&&(P=a!==M&&a);p!==w&&null!=(c=b[p]);p++){if(r&&c){for(h=0;d=e[h++];)if(d(c,a,o)){l.push(c);break}u&&(z=_)}s&&((c=!d&&c)&&f--,n&&g.push(c))}if(f+=p,s&&p!==f){for(h=0;d=i[h++];)d(g,v,a,o);if(n){if(f>0)for(;p--;)g[p]||v[p]||(v[p]=X.call(l));v=m(v)}Z.apply(l,v),u&&!n&&v.length>0&&f+i.length>1&&t.uniqueSort(l)}return u&&(z=_,P=y),g};return s?n(a):a}var _,w,x,k,D,C,S,T,P,I,A,N,M,E,F,O,H,R,L,j="sizzle"+-new Date,U=e.document,z=0,W=0,$=i(),B=i(),q=i(),Y=function(e,t){return e===t&&(A=!0),0},G="undefined",V=1<<31,J={}.hasOwnProperty,K=[],X=K.pop,Q=K.push,Z=K.push,et=K.slice,tt=K.indexOf||function(e){for(var t=0,i=this.length;i>t;t++)if(this[t]===e)return t;return-1},it="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",nt="[\\x20\\t\\r\\n\\f]",st="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",rt=st.replace("w","w#"),at="\\["+nt+"*("+st+")(?:"+nt+"*([*^$|!~]?=)"+nt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+rt+"))|)"+nt+"*\\]",ot=":("+st+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+at+")*)|.*)\\)|)",lt=new RegExp("^"+nt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nt+"+$","g"),ut=new RegExp("^"+nt+"*,"+nt+"*"),ct=new RegExp("^"+nt+"*([>+~]|"+nt+")"+nt+"*"),ht=new RegExp("="+nt+"*([^\\]'\"]*?)"+nt+"*\\]","g"),dt=new RegExp(ot),ft=new RegExp("^"+rt+"$"),pt={ID:new RegExp("^#("+st+")"),CLASS:new RegExp("^\\.("+st+")"),TAG:new RegExp("^("+st.replace("w","w*")+")"),ATTR:new RegExp("^"+at),PSEUDO:new RegExp("^"+ot),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+it+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},gt=/^(?:input|select|textarea|button)$/i,mt=/^h\d$/i,vt=/^[^{]+\{\s*\[native \w/,yt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,bt=/[+~]/,_t=/'|\\/g,wt=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),xt=function(e,t,i){var n="0x"+t-65536;return n!==n||i?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)};try{Z.apply(K=et.call(U.childNodes),U.childNodes),K[U.childNodes.length].nodeType}catch(kt){Z={apply:K.length?function(e,t){Q.apply(e,et.call(t))}:function(e,t){for(var i=e.length,n=0;e[i++]=t[n++];);e.length=i-1}}}w=t.support={},D=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},N=t.setDocument=function(e){var t,i=e?e.ownerDocument||e:U,n=i.defaultView;return i!==M&&9===i.nodeType&&i.documentElement?(M=i,E=i.documentElement,F=!D(i),n&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",function(){N()},!1):n.attachEvent&&n.attachEvent("onunload",function(){N()})),w.attributes=s(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=s(function(e){return e.appendChild(i.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=vt.test(i.getElementsByClassName)&&s(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),w.getById=s(function(e){return E.appendChild(e).id=j,!i.getElementsByName||!i.getElementsByName(j).length}),w.getById?(x.find.ID=function(e,t){if(typeof t.getElementById!==G&&F){var i=t.getElementById(e);return i&&i.parentNode?[i]:[]}},x.filter.ID=function(e){var t=e.replace(wt,xt);return function(e){return e.getAttribute("id")===t}}):(delete x.find.ID,x.filter.ID=function(e){var t=e.replace(wt,xt);return function(e){var i=typeof e.getAttributeNode!==G&&e.getAttributeNode("id");return i&&i.value===t}}),x.find.TAG=w.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==G?t.getElementsByTagName(e):void 0}:function(e,t){var i,n=[],s=0,r=t.getElementsByTagName(e);if("*"===e){for(;i=r[s++];)1===i.nodeType&&n.push(i);return n}return r},x.find.CLASS=w.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==G&&F?t.getElementsByClassName(e):void 0},H=[],O=[],(w.qsa=vt.test(i.querySelectorAll))&&(s(function(e){e.innerHTML="<select msallowclip=''><option selected=''></option></select>",e.querySelectorAll("[msallowclip^='']").length&&O.push("[*^$]="+nt+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||O.push("\\["+nt+"*(?:value|"+it+")"),e.querySelectorAll(":checked").length||O.push(":checked")}),s(function(e){var t=i.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&O.push("name"+nt+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||O.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),O.push(",.*:")})),(w.matchesSelector=vt.test(R=E.matches||E.webkitMatchesSelector||E.mozMatchesSelector||E.oMatchesSelector||E.msMatchesSelector))&&s(function(e){w.disconnectedMatch=R.call(e,"div"),R.call(e,"[s!='']:x"),H.push("!=",ot)}),O=O.length&&new RegExp(O.join("|")),H=H.length&&new RegExp(H.join("|")),t=vt.test(E.compareDocumentPosition),L=t||vt.test(E.contains)?function(e,t){var i=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Y=t?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===i||e.ownerDocument===U&&L(U,e)?-1:t===i||t.ownerDocument===U&&L(U,t)?1:I?tt.call(I,e)-tt.call(I,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,s=0,r=e.parentNode,o=t.parentNode,l=[e],u=[t];if(!r||!o)return e===i?-1:t===i?1:r?-1:o?1:I?tt.call(I,e)-tt.call(I,t):0;if(r===o)return a(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;l[s]===u[s];)s++;return s?a(l[s],u[s]):l[s]===U?-1:u[s]===U?1:0},i):M},t.matches=function(e,i){return t(e,null,null,i)},t.matchesSelector=function(e,i){if((e.ownerDocument||e)!==M&&N(e),i=i.replace(ht,"='$1']"),!(!w.matchesSelector||!F||H&&H.test(i)||O&&O.test(i)))try{var n=R.call(e,i);if(n||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(s){}return t(i,M,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==M&&N(e),L(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==M&&N(e);var i=x.attrHandle[t.toLowerCase()],n=i&&J.call(x.attrHandle,t.toLowerCase())?i(e,t,!F):void 0;return void 0!==n?n:w.attributes||!F?e.getAttribute(t):(n=e.getAttributeNode(t))&&n.specified?n.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,i=[],n=0,s=0;if(A=!w.detectDuplicates,I=!w.sortStable&&e.slice(0),e.sort(Y),A){for(;t=e[s++];)t===e[s]&&(n=i.push(s));for(;n--;)e.splice(i[n],1)}return I=null,e},k=t.getText=function(e){var t,i="",n=0,s=e.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=k(e)}else if(3===s||4===s)return e.nodeValue}else for(;t=e[n++];)i+=k(t);return i},x=t.selectors={cacheLength:50,createPseudo:n,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(wt,xt),e[3]=(e[3]||e[4]||e[5]||"").replace(wt,xt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return pt.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&dt.test(i)&&(t=C(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(wt,xt).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+nt+")"+e+"("+nt+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==G&&e.getAttribute("class")||"")})},ATTR:function(e,i,n){return function(s){var r=t.attr(s,e);return null==r?"!="===i:i?(r+="","="===i?r===n:"!="===i?r!==n:"^="===i?n&&0===r.indexOf(n):"*="===i?n&&r.indexOf(n)>-1:"$="===i?n&&r.slice(-n.length)===n:"~="===i?(" "+r+" ").indexOf(n)>-1:"|="===i?r===n||r.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,i,n,s){var r="nth"!==e.slice(0,3),a="last"!==e.slice(-4),o="of-type"===t;return 1===n&&0===s?function(e){return!!e.parentNode}:function(t,i,l){var u,c,h,d,f,p,g=r!==a?"nextSibling":"previousSibling",m=t.parentNode,v=o&&t.nodeName.toLowerCase(),y=!l&&!o;if(m){if(r){for(;g;){for(h=t;h=h[g];)if(o?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=g="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?m.firstChild:m.lastChild],a&&y){for(c=m[j]||(m[j]={}),u=c[e]||[],f=u[0]===z&&u[1],d=u[0]===z&&u[2],h=f&&m.childNodes[f];h=++f&&h&&h[g]||(d=f=0)||p.pop();)if(1===h.nodeType&&++d&&h===t){c[e]=[z,f,d];break}}else if(y&&(u=(t[j]||(t[j]={}))[e])&&u[0]===z)d=u[1];else for(;(h=++f&&h&&h[g]||(d=f=0)||p.pop())&&((o?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++d||(y&&((h[j]||(h[j]={}))[e]=[z,d]),h!==t)););return d-=s,d===n||d%n===0&&d/n>=0}}},PSEUDO:function(e,i){var s,r=x.pseudos[e]||x.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return r[j]?r(i):r.length>1?(s=[e,e,"",i],x.setFilters.hasOwnProperty(e.toLowerCase())?n(function(e,t){for(var n,s=r(e,i),a=s.length;a--;)n=tt.call(e,s[a]),e[n]=!(t[n]=s[a])}):function(e){return r(e,0,s)}):r}},pseudos:{not:n(function(e){var t=[],i=[],s=S(e.replace(lt,"$1"));return s[j]?n(function(e,t,i,n){for(var r,a=s(e,null,n,[]),o=e.length;o--;)(r=a[o])&&(e[o]=!(t[o]=r))}):function(e,n,r){return t[0]=e,s(t,null,r,i),!i.pop()}}),has:n(function(e){return function(i){return t(e,i).length>0}}),contains:n(function(e){return function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:n(function(e){return ft.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(wt,xt).toLowerCase(),function(t){var i;do if(i=F?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===e||0===i.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=e.location&&e.location.hash;return i&&i.slice(1)===t.id},root:function(e){return e===E},focus:function(e){return e===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!x.pseudos.empty(e)},header:function(e){return mt.test(e.nodeName)},input:function(e){return gt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,i){return[0>i?i+t:i]}),even:u(function(e,t){for(var i=0;t>i;i+=2)e.push(i);return e}),odd:u(function(e,t){for(var i=1;t>i;i+=2)e.push(i);return e}),lt:u(function(e,t,i){for(var n=0>i?i+t:i;--n>=0;)e.push(n);return e}),gt:u(function(e,t,i){for(var n=0>i?i+t:i;++n<t;)e.push(n);return e})}},x.pseudos.nth=x.pseudos.eq;for(_ in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})x.pseudos[_]=o(_);for(_ in{submit:!0,reset:!0})x.pseudos[_]=l(_);return h.prototype=x.filters=x.pseudos,x.setFilters=new h,C=t.tokenize=function(e,i){var n,s,r,a,o,l,u,c=B[e+" "];if(c)return i?0:c.slice(0);for(o=e,l=[],u=x.preFilter;o;){(!n||(s=ut.exec(o)))&&(s&&(o=o.slice(s[0].length)||o),l.push(r=[])),n=!1,(s=ct.exec(o))&&(n=s.shift(),r.push({value:n,type:s[0].replace(lt," ")}),o=o.slice(n.length));for(a in x.filter)!(s=pt[a].exec(o))||u[a]&&!(s=u[a](s))||(n=s.shift(),r.push({value:n,type:a,matches:s}),o=o.slice(n.length));
if(!n)break}return i?o.length:o?t.error(e):B(e,l).slice(0)},S=t.compile=function(e,t){var i,n=[],s=[],r=q[e+" "];if(!r){for(t||(t=C(e)),i=t.length;i--;)r=y(t[i]),r[j]?n.push(r):s.push(r);r=q(e,b(s,n)),r.selector=e}return r},T=t.select=function(e,t,i,n){var s,r,a,o,l,u="function"==typeof e&&e,h=!n&&C(e=u.selector||e);if(i=i||[],1===h.length){if(r=h[0]=h[0].slice(0),r.length>2&&"ID"===(a=r[0]).type&&w.getById&&9===t.nodeType&&F&&x.relative[r[1].type]){if(t=(x.find.ID(a.matches[0].replace(wt,xt),t)||[])[0],!t)return i;u&&(t=t.parentNode),e=e.slice(r.shift().value.length)}for(s=pt.needsContext.test(e)?0:r.length;s--&&(a=r[s],!x.relative[o=a.type]);)if((l=x.find[o])&&(n=l(a.matches[0].replace(wt,xt),bt.test(r[0].type)&&c(t.parentNode)||t))){if(r.splice(s,1),e=n.length&&d(r),!e)return Z.apply(i,n),i;break}}return(u||S(e,h))(n,t,!F,i,bt.test(e)&&c(t.parentNode)||t),i},w.sortStable=j.split("").sort(Y).join("")===j,w.detectDuplicates=!!A,N(),w.sortDetached=s(function(e){return 1&e.compareDocumentPosition(M.createElement("div"))}),s(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||r("type|href|height|width",function(e,t,i){return i?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&s(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||r("value",function(e,t,i){return i||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),s(function(e){return null==e.getAttribute("disabled")})||r(it,function(e,t,i){var n;return i?void 0:e[t]===!0?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null}),t}(e);st.find=ut,st.expr=ut.selectors,st.expr[":"]=st.expr.pseudos,st.unique=ut.uniqueSort,st.text=ut.getText,st.isXMLDoc=ut.isXML,st.contains=ut.contains;var ct=st.expr.match.needsContext,ht=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,dt=/^.[^:#\[\.,]*$/;st.filter=function(e,t,i){var n=t[0];return i&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?st.find.matchesSelector(n,e)?[n]:[]:st.find.matches(e,st.grep(t,function(e){return 1===e.nodeType}))},st.fn.extend({find:function(e){var t,i=[],n=this,s=n.length;if("string"!=typeof e)return this.pushStack(st(e).filter(function(){for(t=0;s>t;t++)if(st.contains(n[t],this))return!0}));for(t=0;s>t;t++)st.find(e,n[t],i);return i=this.pushStack(s>1?st.unique(i):i),i.selector=this.selector?this.selector+" "+e:e,i},filter:function(e){return this.pushStack(n(this,e||[],!1))},not:function(e){return this.pushStack(n(this,e||[],!0))},is:function(e){return!!n(this,"string"==typeof e&&ct.test(e)?st(e):e||[],!1).length}});var ft,pt=e.document,gt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,mt=st.fn.init=function(e,t){var i,n;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:gt.exec(e),!i||!i[1]&&t)return!t||t.jquery?(t||ft).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof st?t[0]:t,st.merge(this,st.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:pt,!0)),ht.test(i[1])&&st.isPlainObject(t))for(i in t)st.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}if(n=pt.getElementById(i[2]),n&&n.parentNode){if(n.id!==i[2])return ft.find(e);this.length=1,this[0]=n}return this.context=pt,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):st.isFunction(e)?"undefined"!=typeof ft.ready?ft.ready(e):e(st):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),st.makeArray(e,this))};mt.prototype=st.fn,ft=st(pt);var vt=/^(?:parents|prev(?:Until|All))/,yt={children:!0,contents:!0,next:!0,prev:!0};st.extend({dir:function(e,t,i){for(var n=[],s=e[t];s&&9!==s.nodeType&&(void 0===i||1!==s.nodeType||!st(s).is(i));)1===s.nodeType&&n.push(s),s=s[t];return n},sibling:function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i}}),st.fn.extend({has:function(e){var t,i=st(e,this),n=i.length;return this.filter(function(){for(t=0;n>t;t++)if(st.contains(this,i[t]))return!0})},closest:function(e,t){for(var i,n=0,s=this.length,r=[],a=ct.test(e)||"string"!=typeof e?st(e,t||this.context):0;s>n;n++)for(i=this[n];i&&i!==t;i=i.parentNode)if(i.nodeType<11&&(a?a.index(i)>-1:1===i.nodeType&&st.find.matchesSelector(i,e))){r.push(i);break}return this.pushStack(r.length>1?st.unique(r):r)},index:function(e){return e?"string"==typeof e?st.inArray(this[0],st(e)):st.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(st.unique(st.merge(this.get(),st(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),st.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return st.dir(e,"parentNode")},parentsUntil:function(e,t,i){return st.dir(e,"parentNode",i)},next:function(e){return s(e,"nextSibling")},prev:function(e){return s(e,"previousSibling")},nextAll:function(e){return st.dir(e,"nextSibling")},prevAll:function(e){return st.dir(e,"previousSibling")},nextUntil:function(e,t,i){return st.dir(e,"nextSibling",i)},prevUntil:function(e,t,i){return st.dir(e,"previousSibling",i)},siblings:function(e){return st.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return st.sibling(e.firstChild)},contents:function(e){return st.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:st.merge([],e.childNodes)}},function(e,t){st.fn[e]=function(i,n){var s=st.map(this,t,i);return"Until"!==e.slice(-5)&&(n=i),n&&"string"==typeof n&&(s=st.filter(n,s)),this.length>1&&(yt[e]||(s=st.unique(s)),vt.test(e)&&(s=s.reverse())),this.pushStack(s)}});var bt=/\S+/g,_t={};st.Callbacks=function(e){e="string"==typeof e?_t[e]||r(e):st.extend({},e);var t,i,n,s,a,o,l=[],u=!e.once&&[],c=function(r){for(i=e.memory&&r,n=!0,a=o||0,o=0,s=l.length,t=!0;l&&s>a;a++)if(l[a].apply(r[0],r[1])===!1&&e.stopOnFalse){i=!1;break}t=!1,l&&(u?u.length&&c(u.shift()):i?l=[]:h.disable())},h={add:function(){if(l){var n=l.length;!function r(t){st.each(t,function(t,i){var n=st.type(i);"function"===n?e.unique&&h.has(i)||l.push(i):i&&i.length&&"string"!==n&&r(i)})}(arguments),t?s=l.length:i&&(o=n,c(i))}return this},remove:function(){return l&&st.each(arguments,function(e,i){for(var n;(n=st.inArray(i,l,n))>-1;)l.splice(n,1),t&&(s>=n&&s--,a>=n&&a--)}),this},has:function(e){return e?st.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],s=0,this},disable:function(){return l=u=i=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,i||h.disable(),this},locked:function(){return!u},fireWith:function(e,i){return!l||n&&!u||(i=i||[],i=[e,i.slice?i.slice():i],t?u.push(i):c(i)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!n}};return h},st.extend({Deferred:function(e){var t=[["resolve","done",st.Callbacks("once memory"),"resolved"],["reject","fail",st.Callbacks("once memory"),"rejected"],["notify","progress",st.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var e=arguments;return st.Deferred(function(i){st.each(t,function(t,r){var a=st.isFunction(e[t])&&e[t];s[r[1]](function(){var e=a&&a.apply(this,arguments);e&&st.isFunction(e.promise)?e.promise().done(i.resolve).fail(i.reject).progress(i.notify):i[r[0]+"With"](this===n?i.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?st.extend(e,n):n}},s={};return n.pipe=n.then,st.each(t,function(e,r){var a=r[2],o=r[3];n[r[1]]=a.add,o&&a.add(function(){i=o},t[1^e][2].disable,t[2][2].lock),s[r[0]]=function(){return s[r[0]+"With"](this===s?n:this,arguments),this},s[r[0]+"With"]=a.fireWith}),n.promise(s),e&&e.call(s,s),s},when:function(e){var t,i,n,s=0,r=J.call(arguments),a=r.length,o=1!==a||e&&st.isFunction(e.promise)?a:0,l=1===o?e:st.Deferred(),u=function(e,i,n){return function(s){i[e]=this,n[e]=arguments.length>1?J.call(arguments):s,n===t?l.notifyWith(i,n):--o||l.resolveWith(i,n)}};if(a>1)for(t=new Array(a),i=new Array(a),n=new Array(a);a>s;s++)r[s]&&st.isFunction(r[s].promise)?r[s].promise().done(u(s,n,r)).fail(l.reject).progress(u(s,i,t)):--o;return o||l.resolveWith(n,r),l.promise()}});var wt;st.fn.ready=function(e){return st.ready.promise().done(e),this},st.extend({isReady:!1,readyWait:1,holdReady:function(e){e?st.readyWait++:st.ready(!0)},ready:function(e){if(e===!0?!--st.readyWait:!st.isReady){if(!pt.body)return setTimeout(st.ready);st.isReady=!0,e!==!0&&--st.readyWait>0||(wt.resolveWith(pt,[st]),st.fn.triggerHandler&&(st(pt).triggerHandler("ready"),st(pt).off("ready")))}}}),st.ready.promise=function(t){if(!wt)if(wt=st.Deferred(),"complete"===pt.readyState)setTimeout(st.ready);else if(pt.addEventListener)pt.addEventListener("DOMContentLoaded",o,!1),e.addEventListener("load",o,!1);else{pt.attachEvent("onreadystatechange",o),e.attachEvent("onload",o);var i=!1;try{i=null==e.frameElement&&pt.documentElement}catch(n){}i&&i.doScroll&&!function s(){if(!st.isReady){try{i.doScroll("left")}catch(e){return setTimeout(s,50)}a(),st.ready()}}()}return wt.promise(t)};var xt,kt="undefined";for(xt in st(it))break;it.ownLast="0"!==xt,it.inlineBlockNeedsLayout=!1,st(function(){var e,t,i,n;i=pt.getElementsByTagName("body")[0],i&&i.style&&(t=pt.createElement("div"),n=pt.createElement("div"),n.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(n).appendChild(t),typeof t.style.zoom!==kt&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",it.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(i.style.zoom=1)),i.removeChild(n))}),function(){var e=pt.createElement("div");if(null==it.deleteExpando){it.deleteExpando=!0;try{delete e.test}catch(t){it.deleteExpando=!1}}e=null}(),st.acceptData=function(e){var t=st.noData[(e.nodeName+" ").toLowerCase()],i=+e.nodeType||1;return 1!==i&&9!==i?!1:!t||t!==!0&&e.getAttribute("classid")===t};var Dt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ct=/([A-Z])/g;st.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?st.cache[e[st.expando]]:e[st.expando],!!e&&!u(e)},data:function(e,t,i){return c(e,t,i)},removeData:function(e,t){return h(e,t)},_data:function(e,t,i){return c(e,t,i,!0)},_removeData:function(e,t){return h(e,t,!0)}}),st.fn.extend({data:function(e,t){var i,n,s,r=this[0],a=r&&r.attributes;if(void 0===e){if(this.length&&(s=st.data(r),1===r.nodeType&&!st._data(r,"parsedAttrs"))){for(i=a.length;i--;)a[i]&&(n=a[i].name,0===n.indexOf("data-")&&(n=st.camelCase(n.slice(5)),l(r,n,s[n])));st._data(r,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){st.data(this,e)}):arguments.length>1?this.each(function(){st.data(this,e,t)}):r?l(r,e,st.data(r,e)):void 0},removeData:function(e){return this.each(function(){st.removeData(this,e)})}}),st.extend({queue:function(e,t,i){var n;return e?(t=(t||"fx")+"queue",n=st._data(e,t),i&&(!n||st.isArray(i)?n=st._data(e,t,st.makeArray(i)):n.push(i)),n||[]):void 0},dequeue:function(e,t){t=t||"fx";var i=st.queue(e,t),n=i.length,s=i.shift(),r=st._queueHooks(e,t),a=function(){st.dequeue(e,t)};"inprogress"===s&&(s=i.shift(),n--),s&&("fx"===t&&i.unshift("inprogress"),delete r.stop,s.call(e,a,r)),!n&&r&&r.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return st._data(e,i)||st._data(e,i,{empty:st.Callbacks("once memory").add(function(){st._removeData(e,t+"queue"),st._removeData(e,i)})})}}),st.fn.extend({queue:function(e,t){var i=2;return"string"!=typeof e&&(t=e,e="fx",i--),arguments.length<i?st.queue(this[0],e):void 0===t?this:this.each(function(){var i=st.queue(this,e,t);st._queueHooks(this,e),"fx"===e&&"inprogress"!==i[0]&&st.dequeue(this,e)})},dequeue:function(e){return this.each(function(){st.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var i,n=1,s=st.Deferred(),r=this,a=this.length,o=function(){--n||s.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)i=st._data(r[a],e+"queueHooks"),i&&i.empty&&(n++,i.empty.add(o));return o(),s.promise(t)}});var St=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Tt=["Top","Right","Bottom","Left"],Pt=function(e,t){return e=t||e,"none"===st.css(e,"display")||!st.contains(e.ownerDocument,e)},It=st.access=function(e,t,i,n,s,r,a){var o=0,l=e.length,u=null==i;if("object"===st.type(i)){s=!0;for(o in i)st.access(e,t,o,i[o],!0,r,a)}else if(void 0!==n&&(s=!0,st.isFunction(n)||(a=!0),u&&(a?(t.call(e,n),t=null):(u=t,t=function(e,t,i){return u.call(st(e),i)})),t))for(;l>o;o++)t(e[o],i,a?n:n.call(e[o],o,t(e[o],i)));return s?e:u?t.call(e):l?t(e[0],i):r},At=/^(?:checkbox|radio)$/i;!function(){var e=pt.createElement("input"),t=pt.createElement("div"),i=pt.createDocumentFragment();if(t.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",it.leadingWhitespace=3===t.firstChild.nodeType,it.tbody=!t.getElementsByTagName("tbody").length,it.htmlSerialize=!!t.getElementsByTagName("link").length,it.html5Clone="<:nav></:nav>"!==pt.createElement("nav").cloneNode(!0).outerHTML,e.type="checkbox",e.checked=!0,i.appendChild(e),it.appendChecked=e.checked,t.innerHTML="<textarea>x</textarea>",it.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,i.appendChild(t),t.innerHTML="<input type='radio' checked='checked' name='t'/>",it.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,it.noCloneEvent=!0,t.attachEvent&&(t.attachEvent("onclick",function(){it.noCloneEvent=!1}),t.cloneNode(!0).click()),null==it.deleteExpando){it.deleteExpando=!0;try{delete t.test}catch(n){it.deleteExpando=!1}}}(),function(){var t,i,n=pt.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})i="on"+t,(it[t+"Bubbles"]=i in e)||(n.setAttribute(i,"t"),it[t+"Bubbles"]=n.attributes[i].expando===!1);n=null}();var Nt=/^(?:input|select|textarea)$/i,Mt=/^key/,Et=/^(?:mouse|pointer|contextmenu)|click/,Ft=/^(?:focusinfocus|focusoutblur)$/,Ot=/^([^.]*)(?:\.(.+)|)$/;st.event={global:{},add:function(e,t,i,n,s){var r,a,o,l,u,c,h,d,f,p,g,m=st._data(e);if(m){for(i.handler&&(l=i,i=l.handler,s=l.selector),i.guid||(i.guid=st.guid++),(a=m.events)||(a=m.events={}),(c=m.handle)||(c=m.handle=function(e){return typeof st===kt||e&&st.event.triggered===e.type?void 0:st.event.dispatch.apply(c.elem,arguments)},c.elem=e),t=(t||"").match(bt)||[""],o=t.length;o--;)r=Ot.exec(t[o])||[],f=g=r[1],p=(r[2]||"").split(".").sort(),f&&(u=st.event.special[f]||{},f=(s?u.delegateType:u.bindType)||f,u=st.event.special[f]||{},h=st.extend({type:f,origType:g,data:n,handler:i,guid:i.guid,selector:s,needsContext:s&&st.expr.match.needsContext.test(s),namespace:p.join(".")},l),(d=a[f])||(d=a[f]=[],d.delegateCount=0,u.setup&&u.setup.call(e,n,p,c)!==!1||(e.addEventListener?e.addEventListener(f,c,!1):e.attachEvent&&e.attachEvent("on"+f,c))),u.add&&(u.add.call(e,h),h.handler.guid||(h.handler.guid=i.guid)),s?d.splice(d.delegateCount++,0,h):d.push(h),st.event.global[f]=!0);e=null}},remove:function(e,t,i,n,s){var r,a,o,l,u,c,h,d,f,p,g,m=st.hasData(e)&&st._data(e);if(m&&(c=m.events)){for(t=(t||"").match(bt)||[""],u=t.length;u--;)if(o=Ot.exec(t[u])||[],f=g=o[1],p=(o[2]||"").split(".").sort(),f){for(h=st.event.special[f]||{},f=(n?h.delegateType:h.bindType)||f,d=c[f]||[],o=o[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=r=d.length;r--;)a=d[r],!s&&g!==a.origType||i&&i.guid!==a.guid||o&&!o.test(a.namespace)||n&&n!==a.selector&&("**"!==n||!a.selector)||(d.splice(r,1),a.selector&&d.delegateCount--,h.remove&&h.remove.call(e,a));l&&!d.length&&(h.teardown&&h.teardown.call(e,p,m.handle)!==!1||st.removeEvent(e,f,m.handle),delete c[f])}else for(f in c)st.event.remove(e,f+t[u],i,n,!0);st.isEmptyObject(c)&&(delete m.handle,st._removeData(e,"events"))}},trigger:function(t,i,n,s){var r,a,o,l,u,c,h,d=[n||pt],f=tt.call(t,"type")?t.type:t,p=tt.call(t,"namespace")?t.namespace.split("."):[];if(o=c=n=n||pt,3!==n.nodeType&&8!==n.nodeType&&!Ft.test(f+st.event.triggered)&&(f.indexOf(".")>=0&&(p=f.split("."),f=p.shift(),p.sort()),a=f.indexOf(":")<0&&"on"+f,t=t[st.expando]?t:new st.Event(f,"object"==typeof t&&t),t.isTrigger=s?2:3,t.namespace=p.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),i=null==i?[t]:st.makeArray(i,[t]),u=st.event.special[f]||{},s||!u.trigger||u.trigger.apply(n,i)!==!1)){if(!s&&!u.noBubble&&!st.isWindow(n)){for(l=u.delegateType||f,Ft.test(l+f)||(o=o.parentNode);o;o=o.parentNode)d.push(o),c=o;c===(n.ownerDocument||pt)&&d.push(c.defaultView||c.parentWindow||e)}for(h=0;(o=d[h++])&&!t.isPropagationStopped();)t.type=h>1?l:u.bindType||f,r=(st._data(o,"events")||{})[t.type]&&st._data(o,"handle"),r&&r.apply(o,i),r=a&&o[a],r&&r.apply&&st.acceptData(o)&&(t.result=r.apply(o,i),t.result===!1&&t.preventDefault());if(t.type=f,!s&&!t.isDefaultPrevented()&&(!u._default||u._default.apply(d.pop(),i)===!1)&&st.acceptData(n)&&a&&n[f]&&!st.isWindow(n)){c=n[a],c&&(n[a]=null),st.event.triggered=f;try{n[f]()}catch(g){}st.event.triggered=void 0,c&&(n[a]=c)}return t.result}},dispatch:function(e){e=st.event.fix(e);var t,i,n,s,r,a=[],o=J.call(arguments),l=(st._data(this,"events")||{})[e.type]||[],u=st.event.special[e.type]||{};if(o[0]=e,e.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,e)!==!1){for(a=st.event.handlers.call(this,e,l),t=0;(s=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=s.elem,r=0;(n=s.handlers[r++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(n.namespace))&&(e.handleObj=n,e.data=n.data,i=((st.event.special[n.origType]||{}).handle||n.handler).apply(s.elem,o),void 0!==i&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var i,n,s,r,a=[],o=t.delegateCount,l=e.target;if(o&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(s=[],r=0;o>r;r++)n=t[r],i=n.selector+" ",void 0===s[i]&&(s[i]=n.needsContext?st(i,this).index(l)>=0:st.find(i,this,null,[l]).length),s[i]&&s.push(n);s.length&&a.push({elem:l,handlers:s})}return o<t.length&&a.push({elem:this,handlers:t.slice(o)}),a},fix:function(e){if(e[st.expando])return e;var t,i,n,s=e.type,r=e,a=this.fixHooks[s];for(a||(this.fixHooks[s]=a=Et.test(s)?this.mouseHooks:Mt.test(s)?this.keyHooks:{}),n=a.props?this.props.concat(a.props):this.props,e=new st.Event(r),t=n.length;t--;)i=n[t],e[i]=r[i];return e.target||(e.target=r.srcElement||pt),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,r):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var i,n,s,r=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||pt,s=n.documentElement,i=n.body,e.pageX=t.clientX+(s&&s.scrollLeft||i&&i.scrollLeft||0)-(s&&s.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(s&&s.scrollTop||i&&i.scrollTop||0)-(s&&s.clientTop||i&&i.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||void 0===r||(e.which=1&r?1:2&r?3:4&r?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==p()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===p()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return st.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(e){return st.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,i,n){var s=st.extend(new st.Event,i,{type:e,isSimulated:!0,originalEvent:{}});n?st.event.trigger(s,null,t):st.event.dispatch.call(t,s),s.isDefaultPrevented()&&i.preventDefault()}},st.removeEvent=pt.removeEventListener?function(e,t,i){e.removeEventListener&&e.removeEventListener(t,i,!1)}:function(e,t,i){var n="on"+t;e.detachEvent&&(typeof e[n]===kt&&(e[n]=null),e.detachEvent(n,i))},st.Event=function(e,t){return this instanceof st.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?d:f):this.type=e,t&&st.extend(this,t),this.timeStamp=e&&e.timeStamp||st.now(),void(this[st.expando]=!0)):new st.Event(e,t)},st.Event.prototype={isDefaultPrevented:f,isPropagationStopped:f,isImmediatePropagationStopped:f,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=d,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=d,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=d,e&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),this.stopPropagation()}},st.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){st.event.special[e]={delegateType:t,bindType:t,handle:function(e){var i,n=this,s=e.relatedTarget,r=e.handleObj;return(!s||s!==n&&!st.contains(n,s))&&(e.type=r.origType,i=r.handler.apply(this,arguments),e.type=t),i}}}),it.submitBubbles||(st.event.special.submit={setup:function(){return st.nodeName(this,"form")?!1:void st.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,i=st.nodeName(t,"input")||st.nodeName(t,"button")?t.form:void 0;i&&!st._data(i,"submitBubbles")&&(st.event.add(i,"submit._submit",function(e){e._submit_bubble=!0}),st._data(i,"submitBubbles",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&st.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return st.nodeName(this,"form")?!1:void st.event.remove(this,"._submit")}}),it.changeBubbles||(st.event.special.change={setup:function(){return Nt.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(st.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),st.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),st.event.simulate("change",this,e,!0)})),!1):void st.event.add(this,"beforeactivate._change",function(e){var t=e.target;Nt.test(t.nodeName)&&!st._data(t,"changeBubbles")&&(st.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||st.event.simulate("change",this.parentNode,e,!0)}),st._data(t,"changeBubbles",!0))})},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return st.event.remove(this,"._change"),!Nt.test(this.nodeName)}}),it.focusinBubbles||st.each({focus:"focusin",blur:"focusout"},function(e,t){var i=function(e){st.event.simulate(t,e.target,st.event.fix(e),!0)};st.event.special[t]={setup:function(){var n=this.ownerDocument||this,s=st._data(n,t);s||n.addEventListener(e,i,!0),st._data(n,t,(s||0)+1)},teardown:function(){var n=this.ownerDocument||this,s=st._data(n,t)-1;s?st._data(n,t,s):(n.removeEventListener(e,i,!0),st._removeData(n,t))}}}),st.fn.extend({on:function(e,t,i,n,s){var r,a;if("object"==typeof e){"string"!=typeof t&&(i=i||t,t=void 0);for(r in e)this.on(r,t,i,e[r],s);return this}if(null==i&&null==n?(n=t,i=t=void 0):null==n&&("string"==typeof t?(n=i,i=void 0):(n=i,i=t,t=void 0)),n===!1)n=f;else if(!n)return this;return 1===s&&(a=n,n=function(e){return st().off(e),a.apply(this,arguments)},n.guid=a.guid||(a.guid=st.guid++)),this.each(function(){st.event.add(this,e,n,i,t)})},one:function(e,t,i,n){return this.on(e,t,i,n,1)},off:function(e,t,i){var n,s;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,st(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof e){for(s in e)this.off(s,t,e[s]);return this}return(t===!1||"function"==typeof t)&&(i=t,t=void 0),i===!1&&(i=f),this.each(function(){st.event.remove(this,e,i,t)})},trigger:function(e,t){return this.each(function(){st.event.trigger(e,t,this)})},triggerHandler:function(e,t){var i=this[0];return i?st.event.trigger(e,t,i,!0):void 0}});var Ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Rt=/ jQuery\d+="(?:null|\d+)"/g,Lt=new RegExp("<(?:"+Ht+")[\\s/>]","i"),jt=/^\s+/,Ut=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,zt=/<([\w:]+)/,Wt=/<tbody/i,$t=/<|&#?\w+;/,Bt=/<(?:script|style|link)/i,qt=/checked\s*(?:[^=]|=\s*.checked.)/i,Yt=/^$|\/(?:java|ecma)script/i,Gt=/^true\/(.*)/,Vt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Jt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:it.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Kt=g(pt),Xt=Kt.appendChild(pt.createElement("div"));Jt.optgroup=Jt.option,Jt.tbody=Jt.tfoot=Jt.colgroup=Jt.caption=Jt.thead,Jt.th=Jt.td,st.extend({clone:function(e,t,i){var n,s,r,a,o,l=st.contains(e.ownerDocument,e);if(it.html5Clone||st.isXMLDoc(e)||!Lt.test("<"+e.nodeName+">")?r=e.cloneNode(!0):(Xt.innerHTML=e.outerHTML,Xt.removeChild(r=Xt.firstChild)),!(it.noCloneEvent&&it.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||st.isXMLDoc(e)))for(n=m(r),o=m(e),a=0;null!=(s=o[a]);++a)n[a]&&k(s,n[a]);if(t)if(i)for(o=o||m(e),n=n||m(r),a=0;null!=(s=o[a]);a++)x(s,n[a]);else x(e,r);return n=m(r,"script"),n.length>0&&w(n,!l&&m(e,"script")),n=o=s=null,r},buildFragment:function(e,t,i,n){for(var s,r,a,o,l,u,c,h=e.length,d=g(t),f=[],p=0;h>p;p++)if(r=e[p],r||0===r)if("object"===st.type(r))st.merge(f,r.nodeType?[r]:r);else if($t.test(r)){for(o=o||d.appendChild(t.createElement("div")),l=(zt.exec(r)||["",""])[1].toLowerCase(),c=Jt[l]||Jt._default,o.innerHTML=c[1]+r.replace(Ut,"<$1></$2>")+c[2],s=c[0];s--;)o=o.lastChild;if(!it.leadingWhitespace&&jt.test(r)&&f.push(t.createTextNode(jt.exec(r)[0])),!it.tbody)for(r="table"!==l||Wt.test(r)?"<table>"!==c[1]||Wt.test(r)?0:o:o.firstChild,s=r&&r.childNodes.length;s--;)st.nodeName(u=r.childNodes[s],"tbody")&&!u.childNodes.length&&r.removeChild(u);for(st.merge(f,o.childNodes),o.textContent="";o.firstChild;)o.removeChild(o.firstChild);o=d.lastChild}else f.push(t.createTextNode(r));for(o&&d.removeChild(o),it.appendChecked||st.grep(m(f,"input"),v),p=0;r=f[p++];)if((!n||-1===st.inArray(r,n))&&(a=st.contains(r.ownerDocument,r),o=m(d.appendChild(r),"script"),a&&w(o),i))for(s=0;r=o[s++];)Yt.test(r.type||"")&&i.push(r);return o=null,d},cleanData:function(e,t){for(var i,n,s,r,a=0,o=st.expando,l=st.cache,u=it.deleteExpando,c=st.event.special;null!=(i=e[a]);a++)if((t||st.acceptData(i))&&(s=i[o],r=s&&l[s])){if(r.events)for(n in r.events)c[n]?st.event.remove(i,n):st.removeEvent(i,n,r.handle);l[s]&&(delete l[s],u?delete i[o]:typeof i.removeAttribute!==kt?i.removeAttribute(o):i[o]=null,V.push(s))}}}),st.fn.extend({text:function(e){return It(this,function(e){return void 0===e?st.text(this):this.empty().append((this[0]&&this[0].ownerDocument||pt).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var i,n=e?st.filter(e,this):this,s=0;null!=(i=n[s]);s++)t||1!==i.nodeType||st.cleanData(m(i)),i.parentNode&&(t&&st.contains(i.ownerDocument,i)&&w(m(i,"script")),i.parentNode.removeChild(i));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&st.cleanData(m(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&st.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return st.clone(this,e,t)})},html:function(e){return It(this,function(e){var t=this[0]||{},i=0,n=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Rt,""):void 0;if(!("string"!=typeof e||Bt.test(e)||!it.htmlSerialize&&Lt.test(e)||!it.leadingWhitespace&&jt.test(e)||Jt[(zt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Ut,"<$1></$2>");try{for(;n>i;i++)t=this[i]||{},1===t.nodeType&&(st.cleanData(m(t,!1)),t.innerHTML=e);t=0}catch(s){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,st.cleanData(m(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=K.apply([],e);var i,n,s,r,a,o,l=0,u=this.length,c=this,h=u-1,d=e[0],f=st.isFunction(d);if(f||u>1&&"string"==typeof d&&!it.checkClone&&qt.test(d))return this.each(function(i){var n=c.eq(i);f&&(e[0]=d.call(this,i,n.html())),n.domManip(e,t)});if(u&&(o=st.buildFragment(e,this[0].ownerDocument,!1,this),i=o.firstChild,1===o.childNodes.length&&(o=i),i)){for(r=st.map(m(o,"script"),b),s=r.length;u>l;l++)n=o,l!==h&&(n=st.clone(n,!0,!0),s&&st.merge(r,m(n,"script"))),t.call(this[l],n,l);if(s)for(a=r[r.length-1].ownerDocument,st.map(r,_),l=0;s>l;l++)n=r[l],Yt.test(n.type||"")&&!st._data(n,"globalEval")&&st.contains(a,n)&&(n.src?st._evalUrl&&st._evalUrl(n.src):st.globalEval((n.text||n.textContent||n.innerHTML||"").replace(Vt,"")));o=i=null}return this}}),st.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){st.fn[e]=function(e){for(var i,n=0,s=[],r=st(e),a=r.length-1;a>=n;n++)i=n===a?this:this.clone(!0),st(r[n])[t](i),X.apply(s,i.get());return this.pushStack(s)}});var Qt,Zt={};!function(){var e;it.shrinkWrapBlocks=function(){if(null!=e)return e;e=!1;var t,i,n;return i=pt.getElementsByTagName("body")[0],i&&i.style?(t=pt.createElement("div"),n=pt.createElement("div"),n.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(n).appendChild(t),typeof t.style.zoom!==kt&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(pt.createElement("div")).style.width="5px",e=3!==t.offsetWidth),i.removeChild(n),e):void 0}}();var ei,ti,ii=/^margin/,ni=new RegExp("^("+St+")(?!px)[a-z%]+$","i"),si=/^(top|right|bottom|left)$/;e.getComputedStyle?(ei=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)},ti=function(e,t,i){var n,s,r,a,o=e.style;return i=i||ei(e),a=i?i.getPropertyValue(t)||i[t]:void 0,i&&(""!==a||st.contains(e.ownerDocument,e)||(a=st.style(e,t)),ni.test(a)&&ii.test(t)&&(n=o.width,s=o.minWidth,r=o.maxWidth,o.minWidth=o.maxWidth=o.width=a,a=i.width,o.width=n,o.minWidth=s,o.maxWidth=r)),void 0===a?a:a+""}):pt.documentElement.currentStyle&&(ei=function(e){return e.currentStyle
},ti=function(e,t,i){var n,s,r,a,o=e.style;return i=i||ei(e),a=i?i[t]:void 0,null==a&&o&&o[t]&&(a=o[t]),ni.test(a)&&!si.test(t)&&(n=o.left,s=e.runtimeStyle,r=s&&s.left,r&&(s.left=e.currentStyle.left),o.left="fontSize"===t?"1em":a,a=o.pixelLeft+"px",o.left=n,r&&(s.left=r)),void 0===a?a:a+""||"auto"}),function(){function t(){var t,i,n,s;i=pt.getElementsByTagName("body")[0],i&&i.style&&(t=pt.createElement("div"),n=pt.createElement("div"),n.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(n).appendChild(t),t.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",r=a=!1,l=!0,e.getComputedStyle&&(r="1%"!==(e.getComputedStyle(t,null)||{}).top,a="4px"===(e.getComputedStyle(t,null)||{width:"4px"}).width,s=t.appendChild(pt.createElement("div")),s.style.cssText=t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",s.style.marginRight=s.style.width="0",t.style.width="1px",l=!parseFloat((e.getComputedStyle(s,null)||{}).marginRight)),t.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=t.getElementsByTagName("td"),s[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===s[0].offsetHeight,o&&(s[0].style.display="",s[1].style.display="none",o=0===s[0].offsetHeight),i.removeChild(n))}var i,n,s,r,a,o,l;i=pt.createElement("div"),i.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",s=i.getElementsByTagName("a")[0],n=s&&s.style,n&&(n.cssText="float:left;opacity:.5",it.opacity="0.5"===n.opacity,it.cssFloat=!!n.cssFloat,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",it.clearCloneStyle="content-box"===i.style.backgroundClip,it.boxSizing=""===n.boxSizing||""===n.MozBoxSizing||""===n.WebkitBoxSizing,st.extend(it,{reliableHiddenOffsets:function(){return null==o&&t(),o},boxSizingReliable:function(){return null==a&&t(),a},pixelPosition:function(){return null==r&&t(),r},reliableMarginRight:function(){return null==l&&t(),l}}))}(),st.swap=function(e,t,i,n){var s,r,a={};for(r in t)a[r]=e.style[r],e.style[r]=t[r];s=i.apply(e,n||[]);for(r in t)e.style[r]=a[r];return s};var ri=/alpha\([^)]*\)/i,ai=/opacity\s*=\s*([^)]*)/,oi=/^(none|table(?!-c[ea]).+)/,li=new RegExp("^("+St+")(.*)$","i"),ui=new RegExp("^([+-])=("+St+")","i"),ci={position:"absolute",visibility:"hidden",display:"block"},hi={letterSpacing:"0",fontWeight:"400"},di=["Webkit","O","Moz","ms"];st.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=ti(e,"opacity");return""===i?"1":i}}}},cssNumber:{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":it.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var s,r,a,o=st.camelCase(t),l=e.style;if(t=st.cssProps[o]||(st.cssProps[o]=T(l,o)),a=st.cssHooks[t]||st.cssHooks[o],void 0===i)return a&&"get"in a&&void 0!==(s=a.get(e,!1,n))?s:l[t];if(r=typeof i,"string"===r&&(s=ui.exec(i))&&(i=(s[1]+1)*s[2]+parseFloat(st.css(e,t)),r="number"),null!=i&&i===i&&("number"!==r||st.cssNumber[o]||(i+="px"),it.clearCloneStyle||""!==i||0!==t.indexOf("background")||(l[t]="inherit"),!(a&&"set"in a&&void 0===(i=a.set(e,i,n)))))try{l[t]=i}catch(u){}}},css:function(e,t,i,n){var s,r,a,o=st.camelCase(t);return t=st.cssProps[o]||(st.cssProps[o]=T(e.style,o)),a=st.cssHooks[t]||st.cssHooks[o],a&&"get"in a&&(r=a.get(e,!0,i)),void 0===r&&(r=ti(e,t,n)),"normal"===r&&t in hi&&(r=hi[t]),""===i||i?(s=parseFloat(r),i===!0||st.isNumeric(s)?s||0:r):r}}),st.each(["height","width"],function(e,t){st.cssHooks[t]={get:function(e,i,n){return i?oi.test(st.css(e,"display"))&&0===e.offsetWidth?st.swap(e,ci,function(){return N(e,t,n)}):N(e,t,n):void 0},set:function(e,i,n){var s=n&&ei(e);return I(e,i,n?A(e,t,n,it.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,s),s):0)}}}),it.opacity||(st.cssHooks.opacity={get:function(e,t){return ai.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var i=e.style,n=e.currentStyle,s=st.isNumeric(t)?"alpha(opacity="+100*t+")":"",r=n&&n.filter||i.filter||"";i.zoom=1,(t>=1||""===t)&&""===st.trim(r.replace(ri,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===t||n&&!n.filter)||(i.filter=ri.test(r)?r.replace(ri,s):r+" "+s)}}),st.cssHooks.marginRight=S(it.reliableMarginRight,function(e,t){return t?st.swap(e,{display:"inline-block"},ti,[e,"marginRight"]):void 0}),st.each({margin:"",padding:"",border:"Width"},function(e,t){st.cssHooks[e+t]={expand:function(i){for(var n=0,s={},r="string"==typeof i?i.split(" "):[i];4>n;n++)s[e+Tt[n]+t]=r[n]||r[n-2]||r[0];return s}},ii.test(e)||(st.cssHooks[e+t].set=I)}),st.fn.extend({css:function(e,t){return It(this,function(e,t,i){var n,s,r={},a=0;if(st.isArray(t)){for(n=ei(e),s=t.length;s>a;a++)r[t[a]]=st.css(e,t[a],!1,n);return r}return void 0!==i?st.style(e,t,i):st.css(e,t)},e,t,arguments.length>1)},show:function(){return P(this,!0)},hide:function(){return P(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Pt(this)?st(this).show():st(this).hide()})}}),st.Tween=M,M.prototype={constructor:M,init:function(e,t,i,n,s,r){this.elem=e,this.prop=i,this.easing=s||"swing",this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=r||(st.cssNumber[i]?"":"px")},cur:function(){var e=M.propHooks[this.prop];return e&&e.get?e.get(this):M.propHooks._default.get(this)},run:function(e){var t,i=M.propHooks[this.prop];return this.pos=t=this.options.duration?st.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):M.propHooks._default.set(this),this}},M.prototype.init.prototype=M.prototype,M.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=st.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){st.fx.step[e.prop]?st.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[st.cssProps[e.prop]]||st.cssHooks[e.prop])?st.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},M.propHooks.scrollTop=M.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},st.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},st.fx=M.prototype.init,st.fx.step={};var fi,pi,gi=/^(?:toggle|show|hide)$/,mi=new RegExp("^(?:([+-])=|)("+St+")([a-z%]*)$","i"),vi=/queueHooks$/,yi=[H],bi={"*":[function(e,t){var i=this.createTween(e,t),n=i.cur(),s=mi.exec(t),r=s&&s[3]||(st.cssNumber[e]?"":"px"),a=(st.cssNumber[e]||"px"!==r&&+n)&&mi.exec(st.css(i.elem,e)),o=1,l=20;if(a&&a[3]!==r){r=r||a[3],s=s||[],a=+n||1;do o=o||".5",a/=o,st.style(i.elem,e,a+r);while(o!==(o=i.cur()/n)&&1!==o&&--l)}return s&&(a=i.start=+a||+n||0,i.unit=r,i.end=s[1]?a+(s[1]+1)*s[2]:+s[2]),i}]};st.Animation=st.extend(L,{tweener:function(e,t){st.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var i,n=0,s=e.length;s>n;n++)i=e[n],bi[i]=bi[i]||[],bi[i].unshift(t)},prefilter:function(e,t){t?yi.unshift(e):yi.push(e)}}),st.speed=function(e,t,i){var n=e&&"object"==typeof e?st.extend({},e):{complete:i||!i&&t||st.isFunction(e)&&e,duration:e,easing:i&&t||t&&!st.isFunction(t)&&t};return n.duration=st.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in st.fx.speeds?st.fx.speeds[n.duration]:st.fx.speeds._default,(null==n.queue||n.queue===!0)&&(n.queue="fx"),n.old=n.complete,n.complete=function(){st.isFunction(n.old)&&n.old.call(this),n.queue&&st.dequeue(this,n.queue)},n},st.fn.extend({fadeTo:function(e,t,i,n){return this.filter(Pt).css("opacity",0).show().end().animate({opacity:t},e,i,n)},animate:function(e,t,i,n){var s=st.isEmptyObject(e),r=st.speed(t,i,n),a=function(){var t=L(this,st.extend({},e),r);(s||st._data(this,"finish"))&&t.stop(!0)};return a.finish=a,s||r.queue===!1?this.each(a):this.queue(r.queue,a)},stop:function(e,t,i){var n=function(e){var t=e.stop;delete e.stop,t(i)};return"string"!=typeof e&&(i=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,s=null!=e&&e+"queueHooks",r=st.timers,a=st._data(this);if(s)a[s]&&a[s].stop&&n(a[s]);else for(s in a)a[s]&&a[s].stop&&vi.test(s)&&n(a[s]);for(s=r.length;s--;)r[s].elem!==this||null!=e&&r[s].queue!==e||(r[s].anim.stop(i),t=!1,r.splice(s,1));(t||!i)&&st.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,i=st._data(this),n=i[e+"queue"],s=i[e+"queueHooks"],r=st.timers,a=n?n.length:0;for(i.finish=!0,st.queue(this,e,[]),s&&s.stop&&s.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;a>t;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete i.finish})}}),st.each(["toggle","show","hide"],function(e,t){var i=st.fn[t];st.fn[t]=function(e,n,s){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(F(t,!0),e,n,s)}}),st.each({slideDown:F("show"),slideUp:F("hide"),slideToggle:F("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){st.fn[e]=function(e,i,n){return this.animate(t,e,i,n)}}),st.timers=[],st.fx.tick=function(){var e,t=st.timers,i=0;for(fi=st.now();i<t.length;i++)e=t[i],e()||t[i]!==e||t.splice(i--,1);t.length||st.fx.stop(),fi=void 0},st.fx.timer=function(e){st.timers.push(e),e()?st.fx.start():st.timers.pop()},st.fx.interval=13,st.fx.start=function(){pi||(pi=setInterval(st.fx.tick,st.fx.interval))},st.fx.stop=function(){clearInterval(pi),pi=null},st.fx.speeds={slow:600,fast:200,_default:400},st.fn.delay=function(e,t){return e=st.fx?st.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,i){var n=setTimeout(t,e);i.stop=function(){clearTimeout(n)}})},function(){var e,t,i,n,s;t=pt.createElement("div"),t.setAttribute("className","t"),t.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=t.getElementsByTagName("a")[0],i=pt.createElement("select"),s=i.appendChild(pt.createElement("option")),e=t.getElementsByTagName("input")[0],n.style.cssText="top:1px",it.getSetAttribute="t"!==t.className,it.style=/top/.test(n.getAttribute("style")),it.hrefNormalized="/a"===n.getAttribute("href"),it.checkOn=!!e.value,it.optSelected=s.selected,it.enctype=!!pt.createElement("form").enctype,i.disabled=!0,it.optDisabled=!s.disabled,e=pt.createElement("input"),e.setAttribute("value",""),it.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),it.radioValue="t"===e.value}();var _i=/\r/g;st.fn.extend({val:function(e){var t,i,n,s=this[0];{if(arguments.length)return n=st.isFunction(e),this.each(function(i){var s;1===this.nodeType&&(s=n?e.call(this,i,st(this).val()):e,null==s?s="":"number"==typeof s?s+="":st.isArray(s)&&(s=st.map(s,function(e){return null==e?"":e+""})),t=st.valHooks[this.type]||st.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,s,"value")||(this.value=s))});if(s)return t=st.valHooks[s.type]||st.valHooks[s.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(i=t.get(s,"value"))?i:(i=s.value,"string"==typeof i?i.replace(_i,""):null==i?"":i)}}}),st.extend({valHooks:{option:{get:function(e){var t=st.find.attr(e,"value");return null!=t?t:st.trim(st.text(e))}},select:{get:function(e){for(var t,i,n=e.options,s=e.selectedIndex,r="select-one"===e.type||0>s,a=r?null:[],o=r?s+1:n.length,l=0>s?o:r?s:0;o>l;l++)if(i=n[l],!(!i.selected&&l!==s||(it.optDisabled?i.disabled:null!==i.getAttribute("disabled"))||i.parentNode.disabled&&st.nodeName(i.parentNode,"optgroup"))){if(t=st(i).val(),r)return t;a.push(t)}return a},set:function(e,t){for(var i,n,s=e.options,r=st.makeArray(t),a=s.length;a--;)if(n=s[a],st.inArray(st.valHooks.option.get(n),r)>=0)try{n.selected=i=!0}catch(o){n.scrollHeight}else n.selected=!1;return i||(e.selectedIndex=-1),s}}}}),st.each(["radio","checkbox"],function(){st.valHooks[this]={set:function(e,t){return st.isArray(t)?e.checked=st.inArray(st(e).val(),t)>=0:void 0}},it.checkOn||(st.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var wi,xi,ki=st.expr.attrHandle,Di=/^(?:checked|selected)$/i,Ci=it.getSetAttribute,Si=it.input;st.fn.extend({attr:function(e,t){return It(this,st.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){st.removeAttr(this,e)})}}),st.extend({attr:function(e,t,i){var n,s,r=e.nodeType;if(e&&3!==r&&8!==r&&2!==r)return typeof e.getAttribute===kt?st.prop(e,t,i):(1===r&&st.isXMLDoc(e)||(t=t.toLowerCase(),n=st.attrHooks[t]||(st.expr.match.bool.test(t)?xi:wi)),void 0===i?n&&"get"in n&&null!==(s=n.get(e,t))?s:(s=st.find.attr(e,t),null==s?void 0:s):null!==i?n&&"set"in n&&void 0!==(s=n.set(e,i,t))?s:(e.setAttribute(t,i+""),i):void st.removeAttr(e,t))},removeAttr:function(e,t){var i,n,s=0,r=t&&t.match(bt);if(r&&1===e.nodeType)for(;i=r[s++];)n=st.propFix[i]||i,st.expr.match.bool.test(i)?Si&&Ci||!Di.test(i)?e[n]=!1:e[st.camelCase("default-"+i)]=e[n]=!1:st.attr(e,i,""),e.removeAttribute(Ci?i:n)},attrHooks:{type:{set:function(e,t){if(!it.radioValue&&"radio"===t&&st.nodeName(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}}}),xi={set:function(e,t,i){return t===!1?st.removeAttr(e,i):Si&&Ci||!Di.test(i)?e.setAttribute(!Ci&&st.propFix[i]||i,i):e[st.camelCase("default-"+i)]=e[i]=!0,i}},st.each(st.expr.match.bool.source.match(/\w+/g),function(e,t){var i=ki[t]||st.find.attr;ki[t]=Si&&Ci||!Di.test(t)?function(e,t,n){var s,r;return n||(r=ki[t],ki[t]=s,s=null!=i(e,t,n)?t.toLowerCase():null,ki[t]=r),s}:function(e,t,i){return i?void 0:e[st.camelCase("default-"+t)]?t.toLowerCase():null}}),Si&&Ci||(st.attrHooks.value={set:function(e,t,i){return st.nodeName(e,"input")?void(e.defaultValue=t):wi&&wi.set(e,t,i)}}),Ci||(wi={set:function(e,t,i){var n=e.getAttributeNode(i);return n||e.setAttributeNode(n=e.ownerDocument.createAttribute(i)),n.value=t+="","value"===i||t===e.getAttribute(i)?t:void 0}},ki.id=ki.name=ki.coords=function(e,t,i){var n;return i?void 0:(n=e.getAttributeNode(t))&&""!==n.value?n.value:null},st.valHooks.button={get:function(e,t){var i=e.getAttributeNode(t);return i&&i.specified?i.value:void 0},set:wi.set},st.attrHooks.contenteditable={set:function(e,t,i){wi.set(e,""===t?!1:t,i)}},st.each(["width","height"],function(e,t){st.attrHooks[t]={set:function(e,i){return""===i?(e.setAttribute(t,"auto"),i):void 0}}})),it.style||(st.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Ti=/^(?:input|select|textarea|button|object)$/i,Pi=/^(?:a|area)$/i;st.fn.extend({prop:function(e,t){return It(this,st.prop,e,t,arguments.length>1)},removeProp:function(e){return e=st.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),st.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,i){var n,s,r,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return r=1!==a||!st.isXMLDoc(e),r&&(t=st.propFix[t]||t,s=st.propHooks[t]),void 0!==i?s&&"set"in s&&void 0!==(n=s.set(e,i,t))?n:e[t]=i:s&&"get"in s&&null!==(n=s.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=st.find.attr(e,"tabindex");return t?parseInt(t,10):Ti.test(e.nodeName)||Pi.test(e.nodeName)&&e.href?0:-1}}}}),it.hrefNormalized||st.each(["href","src"],function(e,t){st.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),it.optSelected||(st.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),st.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){st.propFix[this.toLowerCase()]=this}),it.enctype||(st.propFix.enctype="encoding");var Ii=/[\t\r\n\f]/g;st.fn.extend({addClass:function(e){var t,i,n,s,r,a,o=0,l=this.length,u="string"==typeof e&&e;if(st.isFunction(e))return this.each(function(t){st(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(bt)||[];l>o;o++)if(i=this[o],n=1===i.nodeType&&(i.className?(" "+i.className+" ").replace(Ii," "):" ")){for(r=0;s=t[r++];)n.indexOf(" "+s+" ")<0&&(n+=s+" ");a=st.trim(n),i.className!==a&&(i.className=a)}return this},removeClass:function(e){var t,i,n,s,r,a,o=0,l=this.length,u=0===arguments.length||"string"==typeof e&&e;if(st.isFunction(e))return this.each(function(t){st(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(bt)||[];l>o;o++)if(i=this[o],n=1===i.nodeType&&(i.className?(" "+i.className+" ").replace(Ii," "):"")){for(r=0;s=t[r++];)for(;n.indexOf(" "+s+" ")>=0;)n=n.replace(" "+s+" "," ");a=e?st.trim(n):"",i.className!==a&&(i.className=a)}return this},toggleClass:function(e,t){var i=typeof e;return"boolean"==typeof t&&"string"===i?t?this.addClass(e):this.removeClass(e):this.each(st.isFunction(e)?function(i){st(this).toggleClass(e.call(this,i,this.className,t),t)}:function(){if("string"===i)for(var t,n=0,s=st(this),r=e.match(bt)||[];t=r[n++];)s.hasClass(t)?s.removeClass(t):s.addClass(t);else(i===kt||"boolean"===i)&&(this.className&&st._data(this,"__className__",this.className),this.className=this.className||e===!1?"":st._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",i=0,n=this.length;n>i;i++)if(1===this[i].nodeType&&(" "+this[i].className+" ").replace(Ii," ").indexOf(t)>=0)return!0;return!1}}),st.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(e,t){st.fn[t]=function(e,i){return arguments.length>0?this.on(t,null,e,i):this.trigger(t)}}),st.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)}});var Ai=st.now(),Ni=/\?/,Mi=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;st.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var i,n=null,s=st.trim(t+"");return s&&!st.trim(s.replace(Mi,function(e,t,s,r){return i&&t&&(n=0),0===n?e:(i=s||t,n+=!r-!s,"")}))?Function("return "+s)():st.error("Invalid JSON: "+t)},st.parseXML=function(t){var i,n;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(n=new DOMParser,i=n.parseFromString(t,"text/xml")):(i=new ActiveXObject("Microsoft.XMLDOM"),i.async="false",i.loadXML(t))}catch(s){i=void 0}return i&&i.documentElement&&!i.getElementsByTagName("parsererror").length||st.error("Invalid XML: "+t),i};var Ei,Fi,Oi=/#.*$/,Hi=/([?&])_=[^&]*/,Ri=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Li=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ji=/^(?:GET|HEAD)$/,Ui=/^\/\//,zi=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Wi={},$i={},Bi="*/".concat("*");try{Fi=location.href}catch(qi){Fi=pt.createElement("a"),Fi.href="",Fi=Fi.href}Ei=zi.exec(Fi.toLowerCase())||[],st.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fi,type:"GET",isLocal:Li.test(Ei[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Bi,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":st.parseJSON,"text xml":st.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?z(z(e,st.ajaxSettings),t):z(st.ajaxSettings,e)},ajaxPrefilter:j(Wi),ajaxTransport:j($i),ajax:function(e,t){function i(e,t,i,n){var s,c,v,y,_,x=t;2!==b&&(b=2,o&&clearTimeout(o),u=void 0,a=n||"",w.readyState=e>0?4:0,s=e>=200&&300>e||304===e,i&&(y=W(h,w,i)),y=$(h,y,w,s),s?(h.ifModified&&(_=w.getResponseHeader("Last-Modified"),_&&(st.lastModified[r]=_),_=w.getResponseHeader("etag"),_&&(st.etag[r]=_)),204===e||"HEAD"===h.type?x="nocontent":304===e?x="notmodified":(x=y.state,c=y.data,v=y.error,s=!v)):(v=x,(e||!x)&&(x="error",0>e&&(e=0))),w.status=e,w.statusText=(t||x)+"",s?p.resolveWith(d,[c,x,w]):p.rejectWith(d,[w,x,v]),w.statusCode(m),m=void 0,l&&f.trigger(s?"ajaxSuccess":"ajaxError",[w,h,s?c:v]),g.fireWith(d,[w,x]),l&&(f.trigger("ajaxComplete",[w,h]),--st.active||st.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,s,r,a,o,l,u,c,h=st.ajaxSetup({},t),d=h.context||h,f=h.context&&(d.nodeType||d.jquery)?st(d):st.event,p=st.Deferred(),g=st.Callbacks("once memory"),m=h.statusCode||{},v={},y={},b=0,_="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c)for(c={};t=Ri.exec(a);)c[t[1].toLowerCase()]=t[2];t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var i=e.toLowerCase();return b||(e=y[i]=y[i]||e,v[e]=t),this},overrideMimeType:function(e){return b||(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||_;return u&&u.abort(t),i(0,t),this}};if(p.promise(w).complete=g.add,w.success=w.done,w.error=w.fail,h.url=((e||h.url||Fi)+"").replace(Oi,"").replace(Ui,Ei[1]+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=st.trim(h.dataType||"*").toLowerCase().match(bt)||[""],null==h.crossDomain&&(n=zi.exec(h.url.toLowerCase()),h.crossDomain=!(!n||n[1]===Ei[1]&&n[2]===Ei[2]&&(n[3]||("http:"===n[1]?"80":"443"))===(Ei[3]||("http:"===Ei[1]?"80":"443")))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=st.param(h.data,h.traditional)),U(Wi,h,t,w),2===b)return w;l=h.global,l&&0===st.active++&&st.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!ji.test(h.type),r=h.url,h.hasContent||(h.data&&(r=h.url+=(Ni.test(r)?"&":"?")+h.data,delete h.data),h.cache===!1&&(h.url=Hi.test(r)?r.replace(Hi,"$1_="+Ai++):r+(Ni.test(r)?"&":"?")+"_="+Ai++)),h.ifModified&&(st.lastModified[r]&&w.setRequestHeader("If-Modified-Since",st.lastModified[r]),st.etag[r]&&w.setRequestHeader("If-None-Match",st.etag[r])),(h.data&&h.hasContent&&h.contentType!==!1||t.contentType)&&w.setRequestHeader("Content-Type",h.contentType),w.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Bi+"; q=0.01":""):h.accepts["*"]);for(s in h.headers)w.setRequestHeader(s,h.headers[s]);if(h.beforeSend&&(h.beforeSend.call(d,w,h)===!1||2===b))return w.abort();_="abort";for(s in{success:1,error:1,complete:1})w[s](h[s]);if(u=U($i,h,t,w)){w.readyState=1,l&&f.trigger("ajaxSend",[w,h]),h.async&&h.timeout>0&&(o=setTimeout(function(){w.abort("timeout")},h.timeout));try{b=1,u.send(v,i)}catch(x){if(!(2>b))throw x;i(-1,x)}}else i(-1,"No Transport");return w},getJSON:function(e,t,i){return st.get(e,t,i,"json")},getScript:function(e,t){return st.get(e,void 0,t,"script")}}),st.each(["get","post"],function(e,t){st[t]=function(e,i,n,s){return st.isFunction(i)&&(s=s||n,n=i,i=void 0),st.ajax({url:e,type:t,dataType:s,data:i,success:n})}}),st.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){st.fn[t]=function(e){return this.on(t,e)}}),st._evalUrl=function(e){return st.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},st.fn.extend({wrapAll:function(e){if(st.isFunction(e))return this.each(function(t){st(this).wrapAll(e.call(this,t))});if(this[0]){var t=st(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return this.each(st.isFunction(e)?function(t){st(this).wrapInner(e.call(this,t))}:function(){var t=st(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)})},wrap:function(e){var t=st.isFunction(e);return this.each(function(i){st(this).wrapAll(t?e.call(this,i):e)})},unwrap:function(){return this.parent().each(function(){st.nodeName(this,"body")||st(this).replaceWith(this.childNodes)}).end()}}),st.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!it.reliableHiddenOffsets()&&"none"===(e.style&&e.style.display||st.css(e,"display"))},st.expr.filters.visible=function(e){return!st.expr.filters.hidden(e)};var Yi=/%20/g,Gi=/\[\]$/,Vi=/\r?\n/g,Ji=/^(?:submit|button|image|reset|file)$/i,Ki=/^(?:input|select|textarea|keygen)/i;st.param=function(e,t){var i,n=[],s=function(e,t){t=st.isFunction(t)?t():null==t?"":t,n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=st.ajaxSettings&&st.ajaxSettings.traditional),st.isArray(e)||e.jquery&&!st.isPlainObject(e))st.each(e,function(){s(this.name,this.value)});else for(i in e)B(i,e[i],t,s);return n.join("&").replace(Yi,"+")},st.fn.extend({serialize:function(){return st.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=st.prop(this,"elements");return e?st.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!st(this).is(":disabled")&&Ki.test(this.nodeName)&&!Ji.test(e)&&(this.checked||!At.test(e))}).map(function(e,t){var i=st(this).val();return null==i?null:st.isArray(i)?st.map(i,function(e){return{name:t.name,value:e.replace(Vi,"\r\n")}}):{name:t.name,value:i.replace(Vi,"\r\n")}}).get()}}),st.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&q()||Y()}:q;var Xi=0,Qi={},Zi=st.ajaxSettings.xhr();e.ActiveXObject&&st(e).on("unload",function(){for(var e in Qi)Qi[e](void 0,!0)}),it.cors=!!Zi&&"withCredentials"in Zi,Zi=it.ajax=!!Zi,Zi&&st.ajaxTransport(function(e){if(!e.crossDomain||it.cors){var t;return{send:function(i,n){var s,r=e.xhr(),a=++Xi;if(r.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)r[s]=e.xhrFields[s];e.mimeType&&r.overrideMimeType&&r.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(s in i)void 0!==i[s]&&r.setRequestHeader(s,i[s]+"");r.send(e.hasContent&&e.data||null),t=function(i,s){var o,l,u;if(t&&(s||4===r.readyState))if(delete Qi[a],t=void 0,r.onreadystatechange=st.noop,s)4!==r.readyState&&r.abort();else{u={},o=r.status,"string"==typeof r.responseText&&(u.text=r.responseText);try{l=r.statusText}catch(c){l=""}o||!e.isLocal||e.crossDomain?1223===o&&(o=204):o=u.text?200:404}u&&n(o,l,u,r.getAllResponseHeaders())},e.async?4===r.readyState?setTimeout(t):r.onreadystatechange=Qi[a]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),st.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return st.globalEval(e),e}}}),st.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),st.ajaxTransport("script",function(e){if(e.crossDomain){var t,i=pt.head||st("head")[0]||pt.documentElement;return{send:function(n,s){t=pt.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,i){(i||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,i||s(200,"success"))},i.insertBefore(t,i.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var en=[],tn=/(=)\?(?=&|$)|\?\?/;st.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=en.pop()||st.expando+"_"+Ai++;return this[e]=!0,e}}),st.ajaxPrefilter("json jsonp",function(t,i,n){var s,r,a,o=t.jsonp!==!1&&(tn.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&tn.test(t.data)&&"data");return o||"jsonp"===t.dataTypes[0]?(s=t.jsonpCallback=st.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,o?t[o]=t[o].replace(tn,"$1"+s):t.jsonp!==!1&&(t.url+=(Ni.test(t.url)?"&":"?")+t.jsonp+"="+s),t.converters["script json"]=function(){return a||st.error(s+" was not called"),a[0]},t.dataTypes[0]="json",r=e[s],e[s]=function(){a=arguments},n.always(function(){e[s]=r,t[s]&&(t.jsonpCallback=i.jsonpCallback,en.push(s)),a&&st.isFunction(r)&&r(a[0]),a=r=void 0}),"script"):void 0}),st.parseHTML=function(e,t,i){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(i=t,t=!1),t=t||pt;var n=ht.exec(e),s=!i&&[];return n?[t.createElement(n[1])]:(n=st.buildFragment([e],t,s),s&&s.length&&st(s).remove(),st.merge([],n.childNodes))};var nn=st.fn.load;st.fn.load=function(e,t,i){if("string"!=typeof e&&nn)return nn.apply(this,arguments);var n,s,r,a=this,o=e.indexOf(" ");return o>=0&&(n=st.trim(e.slice(o,e.length)),e=e.slice(0,o)),st.isFunction(t)?(i=t,t=void 0):t&&"object"==typeof t&&(r="POST"),a.length>0&&st.ajax({url:e,type:r,dataType:"html",data:t}).done(function(e){s=arguments,a.html(n?st("<div>").append(st.parseHTML(e)).find(n):e)}).complete(i&&function(e,t){a.each(i,s||[e.responseText,t,e])}),this},st.expr.filters.animated=function(e){return st.grep(st.timers,function(t){return e===t.elem}).length};var sn=e.document.documentElement;st.offset={setOffset:function(e,t,i){var n,s,r,a,o,l,u,c=st.css(e,"position"),h=st(e),d={};"static"===c&&(e.style.position="relative"),o=h.offset(),r=st.css(e,"top"),l=st.css(e,"left"),u=("absolute"===c||"fixed"===c)&&st.inArray("auto",[r,l])>-1,u?(n=h.position(),a=n.top,s=n.left):(a=parseFloat(r)||0,s=parseFloat(l)||0),st.isFunction(t)&&(t=t.call(e,i,o)),null!=t.top&&(d.top=t.top-o.top+a),null!=t.left&&(d.left=t.left-o.left+s),"using"in t?t.using.call(e,d):h.css(d)}},st.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){st.offset.setOffset(this,e,t)});var t,i,n={top:0,left:0},s=this[0],r=s&&s.ownerDocument;if(r)return t=r.documentElement,st.contains(t,s)?(typeof s.getBoundingClientRect!==kt&&(n=s.getBoundingClientRect()),i=G(r),{top:n.top+(i.pageYOffset||t.scrollTop)-(t.clientTop||0),left:n.left+(i.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):n},position:function(){if(this[0]){var e,t,i={top:0,left:0},n=this[0];return"fixed"===st.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),st.nodeName(e[0],"html")||(i=e.offset()),i.top+=st.css(e[0],"borderTopWidth",!0),i.left+=st.css(e[0],"borderLeftWidth",!0)),{top:t.top-i.top-st.css(n,"marginTop",!0),left:t.left-i.left-st.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||sn;e&&!st.nodeName(e,"html")&&"static"===st.css(e,"position");)e=e.offsetParent;return e||sn})}}),st.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var i=/Y/.test(t);st.fn[e]=function(n){return It(this,function(e,n,s){var r=G(e);return void 0===s?r?t in r?r[t]:r.document.documentElement[n]:e[n]:void(r?r.scrollTo(i?st(r).scrollLeft():s,i?s:st(r).scrollTop()):e[n]=s)},e,n,arguments.length,null)}}),st.each(["top","left"],function(e,t){st.cssHooks[t]=S(it.pixelPosition,function(e,i){return i?(i=ti(e,t),ni.test(i)?st(e).position()[t]+"px":i):void 0})}),st.each({Height:"height",Width:"width"},function(e,t){st.each({padding:"inner"+e,content:t,"":"outer"+e},function(i,n){st.fn[n]=function(n,s){var r=arguments.length&&(i||"boolean"!=typeof n),a=i||(n===!0||s===!0?"margin":"border");return It(this,function(t,i,n){var s;return st.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(s=t.documentElement,Math.max(t.body["scroll"+e],s["scroll"+e],t.body["offset"+e],s["offset"+e],s["client"+e])):void 0===n?st.css(t,i,a):st.style(t,i,n,a)
},t,r?n:void 0,r,null)}})}),st.fn.size=function(){return this.length},st.fn.andSelf=st.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return st});var rn=e.jQuery,an=e.$;return st.noConflict=function(t){return e.$===st&&(e.$=an),t&&e.jQuery===st&&(e.jQuery=rn),st},typeof t===kt&&(e.jQuery=e.$=st),st}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){function t(t,n){var s,r,a,o=t.nodeName.toLowerCase();return"area"===o?(s=t.parentNode,r=s.name,t.href&&r&&"map"===s.nodeName.toLowerCase()?(a=e("img[usemap='#"+r+"']")[0],!!a&&i(a)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||n:n)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function n(e){for(var t,i;e.length&&e[0]!==document;){if(t=e.css("position"),("absolute"===t||"relative"===t||"fixed"===t)&&(i=parseInt(e.css("zIndex"),10),!isNaN(i)&&0!==i))return i;e=e.parent()}return 0}function s(){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},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=r(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function r(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",a)}function a(){e.datepicker._isDisabledDatepicker(v.inline?v.dpDiv.parent()[0]:v.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function o(t,i){e.extend(t,i);for(var n in i)null==i[n]&&(t[n]=i[n]);return t}function l(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.2",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),n="absolute"===i,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var t=e(this);return n&&"static"===t.css("position")?!1:s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&r.length?r:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var n=e.attr(i,"tabindex"),s=isNaN(n);return(s||n>=0)&&t(i,!s)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function n(t,i,n,r){return e.each(s,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),r&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var s="Width"===i?["Left","Right"]:["Top","Bottom"],r=i.toLowerCase(),a={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?a["inner"+i].call(this):this.each(function(){e(this).css(r,n(this,t)+"px")})},e.fn["outer"+i]=function(t,s){return"number"!=typeof t?a["outer"+i].call(this,t):this.each(function(){e(this).css(r,n(this,t,!0,s)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,n){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,n,s=e(this[0]);s.length&&s[0]!==document;){if(i=s.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(n=parseInt(s.css("zIndex"),10),!isNaN(n)&&0!==n))return n;s=s.parent()}return 0}}),e.ui.plugin={add:function(t,i,n){var s,r=e.ui[t].prototype;for(s in n)r.plugins[s]=r.plugins[s]||[],r.plugins[s].push([i,n[s]])},call:function(e,t,i,n){var s,r=e.plugins[t];if(r&&(n||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(s=0;s<r.length;s++)e.options[r[s][0]]&&r[s][1].apply(e.element,i)}};var u=0,c=Array.prototype.slice;e.cleanData=function(t){return function(i){var n,s,r;for(r=0;null!=(s=i[r]);r++)try{n=e._data(s,"events"),n&&n.remove&&e(s).triggerHandler("remove")}catch(a){}t(i)}}(e.cleanData),e.widget=function(t,i,n){var s,r,a,o,l={},u=t.split(".")[0];return t=t.split(".")[1],s=u+"-"+t,n||(n=i,i=e.Widget),e.expr[":"][s.toLowerCase()]=function(t){return!!e.data(t,s)},e[u]=e[u]||{},r=e[u][t],a=e[u][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new a(e,t)},e.extend(a,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),o=new i,o.options=e.widget.extend({},o.options),e.each(n,function(t,n){return e.isFunction(n)?void(l[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},s=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,r=this._superApply;return this._super=e,this._superApply=s,t=n.apply(this,arguments),this._super=i,this._superApply=r,t}}()):void(l[t]=n)}),a.prototype=e.widget.extend(o,{widgetEventPrefix:r?o.widgetEventPrefix||t:t},l,{constructor:a,namespace:u,widgetName:t,widgetFullName:s}),r?(e.each(r._childConstructors,function(t,i){var n=i.prototype;e.widget(n.namespace+"."+n.widgetName,a,i._proto)}),delete r._childConstructors):i._childConstructors.push(a),e.widget.bridge(t,a),a},e.widget.extend=function(t){for(var i,n,s=c.call(arguments,1),r=0,a=s.length;a>r;r++)for(i in s[r])n=s[r][i],s[r].hasOwnProperty(i)&&void 0!==n&&(t[i]=e.isPlainObject(n)?e.isPlainObject(t[i])?e.widget.extend({},t[i],n):e.widget.extend({},n):n);return t},e.widget.bridge=function(t,i){var n=i.prototype.widgetFullName||t;e.fn[t]=function(s){var r="string"==typeof s,a=c.call(arguments,1),o=this;return s=!r&&a.length?e.widget.extend.apply(null,[s].concat(a)):s,this.each(r?function(){var i,r=e.data(this,n);return"instance"===s?(o=r,!1):r?e.isFunction(r[s])&&"_"!==s.charAt(0)?(i=r[s].apply(r,a),i!==r&&void 0!==i?(o=i&&i.jquery?o.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+s+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+s+"'")}:function(){var t=e.data(this,n);t?(t.option(s||{}),t._init&&t._init()):e.data(this,n,new i(s,this))}),o}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=u++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var n,s,r,a=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(a={},n=t.split("."),t=n.shift(),n.length){for(s=a[t]=e.widget.extend({},this.options[t]),r=0;r<n.length-1;r++)s[n[r]]=s[n[r]]||{},s=s[n[r]];if(t=n.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];a[t]=i}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,n){var s,r=this;"boolean"!=typeof t&&(n=i,i=t,t=!1),n?(i=s=e(i),this.bindings=this.bindings.add(i)):(n=i,i=this.element,s=this.widget()),e.each(n,function(n,a){function o(){return t||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof a?r[a]:a).apply(r,arguments):void 0}"string"!=typeof a&&(o.guid=a.guid=a.guid||o.guid||e.guid++);var l=n.match(/^([\w:-]*)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?s.delegate(c,u,o):i.bind(u,o)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(i).undelegate(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return("string"==typeof e?n[e]:e).apply(n,arguments)}var n=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,n){var s,r,a=this.options[t];if(n=n||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],r=i.originalEvent)for(s in r)s in i||(i[s]=r[s]);return this.element.trigger(i,n),!(e.isFunction(a)&&a.apply(this.element[0],[i].concat(n))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(n,s,r){"string"==typeof s&&(s={effect:s});var a,o=s?s===!0||"number"==typeof s?i:s.effect||i:t;s=s||{},"number"==typeof s&&(s={duration:s}),a=!e.isEmptyObject(s),s.complete=r,s.delay&&n.delay(s.delay),a&&e.effects&&e.effects.effect[o]?n[t](s):o!==t&&n[o]?n[o](s.duration,s.easing,r):n.queue(function(i){e(this)[t](),r&&r.call(n[0]),i()})}});var h=(e.widget,!1);e(document).mouseup(function(){h=!1});e.widget("ui.mouse",{version:"1.11.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!h){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var i=this,n=1===t.which,s="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return n&&!s&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),h=!0,!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),h=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}});!function(){function t(e,t,i){return[parseFloat(e[0])*(f.test(e[0])?t/100:1),parseFloat(e[1])*(f.test(e[1])?i/100:1)]}function i(t,i){return parseInt(e.css(t,i),10)||0}function n(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var s,r,a=Math.max,o=Math.abs,l=Math.round,u=/left|center|right/,c=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,f=/%$/,p=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==s)return s;var t,i,n=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=n.children()[0];return e("body").append(n),t=r.offsetWidth,n.css("overflow","scroll"),i=r.offsetWidth,t===i&&(i=n[0].clientWidth),n.remove(),s=t-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),n=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),s="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,r="scroll"===n||"auto"===n&&t.height<t.element[0].scrollHeight;return{width:r?e.position.scrollbarWidth():0,height:s?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),n=e.isWindow(i[0]),s=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:n,isDocument:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:n||s?i.width():i.outerWidth(),height:n||s?i.height():i.outerHeight()}}},e.fn.position=function(s){if(!s||!s.of)return p.apply(this,arguments);s=e.extend({},s);var f,g,m,v,y,b,_=e(s.of),w=e.position.getWithinInfo(s.within),x=e.position.getScrollInfo(w),k=(s.collision||"flip").split(" "),D={};return b=n(_),_[0].preventDefault&&(s.at="left top"),g=b.width,m=b.height,v=b.offset,y=e.extend({},v),e.each(["my","at"],function(){var e,t,i=(s[this]||"").split(" ");1===i.length&&(i=u.test(i[0])?i.concat(["center"]):c.test(i[0])?["center"].concat(i):["center","center"]),i[0]=u.test(i[0])?i[0]:"center",i[1]=c.test(i[1])?i[1]:"center",e=h.exec(i[0]),t=h.exec(i[1]),D[this]=[e?e[0]:0,t?t[0]:0],s[this]=[d.exec(i[0])[0],d.exec(i[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===s.at[0]?y.left+=g:"center"===s.at[0]&&(y.left+=g/2),"bottom"===s.at[1]?y.top+=m:"center"===s.at[1]&&(y.top+=m/2),f=t(D.at,g,m),y.left+=f[0],y.top+=f[1],this.each(function(){var n,u,c=e(this),h=c.outerWidth(),d=c.outerHeight(),p=i(this,"marginLeft"),b=i(this,"marginTop"),C=h+p+i(this,"marginRight")+x.width,S=d+b+i(this,"marginBottom")+x.height,T=e.extend({},y),P=t(D.my,c.outerWidth(),c.outerHeight());"right"===s.my[0]?T.left-=h:"center"===s.my[0]&&(T.left-=h/2),"bottom"===s.my[1]?T.top-=d:"center"===s.my[1]&&(T.top-=d/2),T.left+=P[0],T.top+=P[1],r||(T.left=l(T.left),T.top=l(T.top)),n={marginLeft:p,marginTop:b},e.each(["left","top"],function(t,i){e.ui.position[k[t]]&&e.ui.position[k[t]][i](T,{targetWidth:g,targetHeight:m,elemWidth:h,elemHeight:d,collisionPosition:n,collisionWidth:C,collisionHeight:S,offset:[f[0]+P[0],f[1]+P[1]],my:s.my,at:s.at,within:w,elem:c})}),s.using&&(u=function(e){var t=v.left-T.left,i=t+g-h,n=v.top-T.top,r=n+m-d,l={target:{element:_,left:v.left,top:v.top,width:g,height:m},element:{element:c,left:T.left,top:T.top,width:h,height:d},horizontal:0>i?"left":t>0?"right":"center",vertical:0>r?"top":n>0?"bottom":"middle"};h>g&&o(t+i)<g&&(l.horizontal="center"),d>m&&o(n+r)<m&&(l.vertical="middle"),l.important=a(o(t),o(i))>a(o(n),o(r))?"horizontal":"vertical",s.using.call(this,e,l)}),c.offset(e.extend(T,{using:u}))})},e.ui.position={fit:{left:function(e,t){var i,n=t.within,s=n.isWindow?n.scrollLeft:n.offset.left,r=n.width,o=e.left-t.collisionPosition.marginLeft,l=s-o,u=o+t.collisionWidth-r-s;t.collisionWidth>r?l>0&&0>=u?(i=e.left+l+t.collisionWidth-r-s,e.left+=l-i):e.left=u>0&&0>=l?s:l>u?s+r-t.collisionWidth:s:l>0?e.left+=l:u>0?e.left-=u:e.left=a(e.left-o,e.left)},top:function(e,t){var i,n=t.within,s=n.isWindow?n.scrollTop:n.offset.top,r=t.within.height,o=e.top-t.collisionPosition.marginTop,l=s-o,u=o+t.collisionHeight-r-s;t.collisionHeight>r?l>0&&0>=u?(i=e.top+l+t.collisionHeight-r-s,e.top+=l-i):e.top=u>0&&0>=l?s:l>u?s+r-t.collisionHeight:s:l>0?e.top+=l:u>0?e.top-=u:e.top=a(e.top-o,e.top)}},flip:{left:function(e,t){var i,n,s=t.within,r=s.offset.left+s.scrollLeft,a=s.width,l=s.isWindow?s.scrollLeft:s.offset.left,u=e.left-t.collisionPosition.marginLeft,c=u-l,h=u+t.collisionWidth-a-l,d="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,f="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,p=-2*t.offset[0];0>c?(i=e.left+d+f+p+t.collisionWidth-a-r,(0>i||i<o(c))&&(e.left+=d+f+p)):h>0&&(n=e.left-t.collisionPosition.marginLeft+d+f+p-l,(n>0||o(n)<h)&&(e.left+=d+f+p))},top:function(e,t){var i,n,s=t.within,r=s.offset.top+s.scrollTop,a=s.height,l=s.isWindow?s.scrollTop:s.offset.top,u=e.top-t.collisionPosition.marginTop,c=u-l,h=u+t.collisionHeight-a-l,d="top"===t.my[1],f=d?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,p="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,g=-2*t.offset[1];0>c?(n=e.top+f+p+g+t.collisionHeight-a-r,e.top+f+p+g>c&&(0>n||n<o(c))&&(e.top+=f+p+g)):h>0&&(i=e.top-t.collisionPosition.marginTop+f+p+g-l,e.top+f+p+g>h&&(i>0||o(i)<h)&&(e.top+=f+p+g))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,n,s,a,o=document.getElementsByTagName("body")[0],l=document.createElement("div");t=document.createElement(o?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&e.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in n)t.style[a]=n[a];t.appendChild(l),i=o||document.documentElement,i.insertBefore(t,i.firstChild),l.style.cssText="position: absolute; left: 10.7432222px;",s=e(l).offset().left,r=s>10&&11>s,t.innerHTML="",i.removeChild(t)}()}();e.ui.position,e.widget("ui.accordion",{version:"1.11.2",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?void this._activate(t):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),void("disabled"===e&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t))))},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,n=this.headers.length,s=this.headers.index(t.target),r=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:r=this.headers[(s+1)%n];break;case i.LEFT:case i.UP:r=this.headers[(s-1+n)%n];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:r=this.headers[0];break;case i.END:r=this.headers[n-1]}r&&(e(t.target).attr("tabIndex",-1),e(r).attr("tabIndex",0),r.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var t,i=this.options,n=i.heightStyle,s=this.element.parent();this.active=this._findActive(i.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var t=e(this),i=t.uniqueId().attr("id"),n=t.next(),s=n.uniqueId().attr("id");t.attr("aria-controls",s),n.attr("aria-labelledby",i)}).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(i.event),"fill"===n?(t=s.height(),this.element.siblings(":visible").each(function(){var i=e(this),n=i.css("position");"absolute"!==n&&"fixed"!==n&&(t-=i.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===n&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,n=this.active,s=e(t.currentTarget),r=s[0]===n[0],a=r&&i.collapsible,o=a?e():s.next(),l=n.next(),u={oldHeader:n,oldPanel:l,newHeader:a?e():s,newPanel:o};t.preventDefault(),r&&!i.collapsible||this._trigger("beforeActivate",t,u)===!1||(i.active=a?!1:this.headers.index(s),this.active=r?e():s,this._toggle(u),n.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),r||(s.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),s.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,n=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=n,this.options.animate?this._animate(i,n,t):(n.hide(),i.show(),this._toggleComplete(t)),n.attr({"aria-hidden":"true"}),n.prev().attr("aria-selected","false"),i.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(e,t,i){var n,s,r,a=this,o=0,l=e.length&&(!t.length||e.index()<t.index()),u=this.options.animate||{},c=l&&u.down||u,h=function(){a._toggleComplete(i)};return"number"==typeof c&&(r=c),"string"==typeof c&&(s=c),s=s||c.easing||u.easing,r=r||c.duration||u.duration,t.length?e.length?(n=e.show().outerHeight(),t.animate(this.hideProps,{duration:r,easing:s,step:function(e,t){t.now=Math.round(e)}}),void e.hide().animate(this.showProps,{duration:r,easing:s,complete:h,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?o+=i.now:"content"!==a.options.heightStyle&&(i.now=Math.round(n-t.outerHeight()-o),o=0)}})):t.animate(this.hideProps,r,s,h):e.animate(this.showProps,r,s,h)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),e.widget("ui.menu",{version:"1.11.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var i=e(t.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))
},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var i=e(t.currentTarget);i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){var i,n,s,r,a=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:a=!1,n=this.previousFilter||"",s=String.fromCharCode(t.keyCode),r=!1,clearTimeout(this.filterTimer),s===n?r=!0:s=n+s,i=this._filterMenuItems(s),i=r&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(s=String.fromCharCode(t.keyCode),i=this._filterMenuItems(s)),i.length?(this.focus(t,i),this.previousFilter=s,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(e):this.select(e))},refresh:function(){var t,i,n=this,s=this.options.icons.submenu,r=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),r.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),i=t.parent(),n=e("<span>").addClass("ui-menu-icon ui-icon "+s).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(n),t.attr("aria-labelledby",i.attr("id"))}),t=r.add(this.element),i=t.find(this.options.items),i.not(".ui-menu-item").each(function(){var t=e(this);n._isDivider(t)&&t.addClass("ui-widget-content ui-menu-divider")}),i.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},focus:function(e,t){var i,n;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),n=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,n,s,r,a,o;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,s=t.offset().top-this.activeMenu.offset().top-i-n,r=this.activeMenu.scrollTop(),a=this.activeMenu.height(),o=t.outerHeight(),0>s?this.activeMenu.scrollTop(r+s):s+o>a&&this.activeMenu.scrollTop(r+s-a+o))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(t),this.activeMenu=n},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},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(e,t,i){var n;this.active&&(n="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.find(this.options.items)[t]()),this.focus(i,n)},nextPage:function(t){var i,n,s;return this.active?void(this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-n-s<0}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]()))):void this.next(t)},previousPage:function(t){var i,n,s;return this.active?void(this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-n+s>0}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items).first()))):void this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)},_filterMenuItems:function(t){var i=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=new RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return n.test(e.trim(e(this).text()))})}});e.widget("ui.autocomplete",{version:"1.11.2",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 t,i,n,s=this.element[0].nodeName.toLowerCase(),r="textarea"===s,a="input"===s;this.isMultiLine=r?!0:a?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[r||a?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(s){if(this.element.prop("readOnly"))return t=!0,n=!0,void(i=!0);t=!1,n=!1,i=!1;var r=e.ui.keyCode;switch(s.keyCode){case r.PAGE_UP:t=!0,this._move("previousPage",s);break;case r.PAGE_DOWN:t=!0,this._move("nextPage",s);break;case r.UP:t=!0,this._keyEvent("previous",s);break;case r.DOWN:t=!0,this._keyEvent("next",s);break;case r.ENTER:this.menu.active&&(t=!0,s.preventDefault(),this.menu.select(s));break;case r.TAB:this.menu.active&&this.menu.select(s);break;case r.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(s),s.preventDefault());break;default:i=!0,this._searchTimeout(s)}},keypress:function(n){if(t)return t=!1,void((!this.isMultiLine||this.menu.element.is(":visible"))&&n.preventDefault());if(!i){var s=e.ui.keyCode;switch(n.keyCode){case s.PAGE_UP:this._move("previousPage",n);break;case s.PAGE_DOWN:this._move("nextPage",n);break;case s.UP:this._keyEvent("previous",n);break;case s.DOWN:this._keyEvent("next",n)}}},input:function(e){return n?(n=!1,void e.preventDefault()):void this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),void this._change(e))}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(n){n.target===t.element[0]||n.target===i||e.contains(i,n.target)||t.close()})})},menufocus:function(t,i){var n,s;return this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type))?(this.menu.blur(),void this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)})):(s=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),n=i.item.attr("aria-label")||s.value,void(n&&e.trim(n).length&&(this.liveRegion.children().hide(),e("<div>").text(n).appendTo(this.liveRegion))))},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n,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=e("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,n=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,n){n(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,s){n.xhr&&n.xhr.abort(),n.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){s(e)},error:function(){s([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),i=this.menu.element.is(":visible"),n=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;(!t||t&&!i&&!n)&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var n=this;e.each(i,function(e,i){n._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").text(i.label).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[e](t):void this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var n=new RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return n.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),e("<div>").text(i).appendTo(this.liveRegion))}});var d,f=(e.ui.autocomplete,"ui-button ui-widget ui-state-default ui-corner-all"),p="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",g=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},m=function(t){var i=t.name,n=t.form,s=e([]);return i&&(i=i.replace(/'/g,"\\'"),s=n?e(n).find("[name='"+i+"'][type=radio]"):e("[name='"+i+"'][type=radio]",t.ownerDocument).filter(function(){return!this.form})),s};e.widget("ui.button",{version:"1.11.2",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,g),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var t=this,i=this.options,n="checkbox"===this.type||"radio"===this.type,s=n?"":"ui-state-active";null===i.label&&(i.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(f).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){i.disabled||this===d&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){i.disabled||e(this).removeClass(s)}).bind("click"+this.eventNamespace,function(e){i.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),n&&this.element.bind("change"+this.eventNamespace,function(){t.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return i.disabled?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(i.disabled)return!1;e(this).addClass("ui-state-active"),t.buttonElement.attr("aria-pressed","true");var n=t.element[0];m(n).not(n).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return i.disabled?!1:(e(this).addClass("ui-state-active"),d=this,void t.document.one("mouseup",function(){d=null}))}).bind("mouseup"+this.eventNamespace,function(){return i.disabled?!1:void e(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(t){return i.disabled?!1:void((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",i.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(f+" ui-state-active "+p).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){return this._super(e,t),"disabled"===e?(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),void(t&&this.buttonElement.removeClass("checkbox"===this.type||"radio"===this.type?"ui-state-focus":"ui-state-focus ui-state-active"))):void this._resetButton()},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?m(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var t=this.buttonElement.removeClass(p),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),n=this.options.icons,s=n.primary&&n.secondary,r=[];n.primary||n.secondary?(this.options.text&&r.push("ui-button-text-icon"+(s?"s":n.primary?"-primary":"-secondary")),n.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+n.primary+"'></span>"),n.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+n.secondary+"'></span>"),this.options.text||(r.push(s?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(i)))):r.push("ui-button-text-only"),t.addClass(r.join(" "))}}),e.widget("ui.buttonset",{version:"1.11.2",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction"),i=this.element.find(this.options.items),n=i.filter(":ui-button");i.not(":ui-button").button(),n.button("refresh"),this.buttons=i.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}});e.ui.button;e.extend(e.ui,{datepicker:{version:"1.11.2"}});var v;e.extend(s.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return o(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var n,s,r;n=t.nodeName.toLowerCase(),s="div"===n||"span"===n,t.id||(this.uuid+=1,t.id="dp"+this.uuid),r=this._newInst(e(t),s),r.settings=e.extend({},i||{}),"input"===n?this._connectDatepicker(t,r):s&&this._inlineDatepicker(t,r)},_newInst:function(t,i){var n=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?r(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var n=e(t);i.append=e([]),i.trigger=e([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,"datepicker",i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var n,s,r,a=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=e("<span class='"+this._appendClass+"'>"+a+"</span>"),t[o?"before":"after"](i.append)),t.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,"showOn"),("focus"===n||"both"===n)&&t.focus(this._showDatepicker),("button"===n||"both"===n)&&(s=this._get(i,"buttonText"),r=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:r,alt:s,title:s}):e("<button type='button'></button>").addClass(this._triggerClass).html(r?e("<img/>").attr({src:r,alt:s,title:s}):s)),t[o?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,n,s,r=new Date(2009,11,20),a=this._get(e,"dateFormat");a.match(/[DM]/)&&(t=function(e){for(i=0,n=0,s=0;s<e.length;s++)e[s].length>i&&(i=e[s].length,n=s);return n},r.setMonth(t(this._get(e,a.match(/MM/)?"monthNames":"monthNamesShort"))),r.setDate(t(this._get(e,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-r.getDay())),e.input.attr("size",this._formatDate(e,r).length)}},_inlineDatepicker:function(t,i){var n=e(t);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),e.data(t,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,n,s,r){var a,l,u,c,h,d=this._dialogInst;return d||(this.uuid+=1,a="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+a+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},e.data(this._dialogInput[0],"datepicker",d)),o(d.settings,s||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(l=document.documentElement.clientWidth,u=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,h=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+c,u/2-150+h]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(t){var i,n=e(t),s=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===i?(s.append.remove(),s.trigger.remove(),n.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&n.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var i,n,s=e(t),r=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,r.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(n=s.children("."+this._inlineClass),n.children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,n,s=e(t),r=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,r.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(n=s.children("."+this._inlineClass),n.children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,i,n){var s,r,a,l,u=this._getInst(t);return 2===arguments.length&&"string"==typeof i?"defaults"===i?e.extend({},e.datepicker._defaults):u?"all"===i?e.extend({},u.settings):this._get(u,i):null:(s=i||{},"string"==typeof i&&(s={},s[i]=n),void(u&&(this._curInst===u&&this._hideDatepicker(),r=this._getDateDatepicker(t,!0),a=this._getMinMaxDate(u,"min"),l=this._getMinMaxDate(u,"max"),o(u.settings,s),null!==a&&void 0!==s.dateFormat&&void 0===s.minDate&&(u.settings.minDate=this._formatDate(u,a)),null!==l&&void 0!==s.dateFormat&&void 0===s.maxDate&&(u.settings.maxDate=this._formatDate(u,l)),"disabled"in s&&(s.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),u),this._autoSize(u),this._setDate(u,r),this._updateAlternate(u),this._updateDatepicker(u))))},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,n,s,r=e.datepicker._getInst(t.target),a=!0,o=r.dpDiv.is(".ui-datepicker-rtl");if(r._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),a=!1;break;case 13:return s=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",r.dpDiv),s[0]&&e.datepicker._selectDay(t.target,r.selectedMonth,r.selectedYear,s[0]),i=e.datepicker._get(r,"onSelect"),i?(n=e.datepicker._formatDate(r),i.apply(r.input?r.input[0]:null,[n,r])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(r,"stepBigMonths"):-e.datepicker._get(r,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(r,"stepBigMonths"):+e.datepicker._get(r,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),a=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),a=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?1:-1,"D"),a=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(r,"stepBigMonths"):-e.datepicker._get(r,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),a=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?-1:1,"D"),a=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(r,"stepBigMonths"):+e.datepicker._get(r,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),a=t.ctrlKey||t.metaKey;break;default:a=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):a=!1;a&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,n,s=e.datepicker._getInst(t.target);
return e.datepicker._get(s,"constrainInput")?(i=e.datepicker._possibleChars(e.datepicker._get(s,"dateFormat")),n=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">n||!i||i.indexOf(n)>-1):void 0},_doKeyUp:function(t){var i,n=e.datepicker._getInst(t.target);if(n.input.val()!==n.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(n,"dateFormat"),n.input?n.input.val():null,e.datepicker._getFormatConfig(n)),i&&(e.datepicker._setDateFromField(n),e.datepicker._updateAlternate(n),e.datepicker._updateDatepicker(n))}catch(s){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,s,r,a,l,u,c;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),s=e.datepicker._get(i,"beforeShow"),r=s?s.apply(t,[t,i]):{},r!==!1&&(o(i.settings,r),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),a=!1,e(t).parents().each(function(){return a|="fixed"===e(this).css("position"),!a}),l={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),l=e.datepicker._checkOffset(i,l,a),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":a?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),i.inline||(u=e.datepicker._get(i,"showAnim"),c=e.datepicker._get(i,"duration"),i.dpDiv.css("z-index",n(e(t))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[u]?i.dpDiv.show(u,e.datepicker._get(i,"showOptions"),c):i.dpDiv[u||"show"](u?c:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,v=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var i,n=this._getNumberOfMonths(t),s=n[1],r=17,o=t.dpDiv.find("."+this._dayOverClass+" a");o.length>0&&a.apply(o.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",r*s+"em"),t.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,n){var s=t.dpDiv.outerWidth(),r=t.dpDiv.outerHeight(),a=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:e(document).scrollLeft()),u=document.documentElement.clientHeight+(n?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?s-a:0,i.left-=n&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=n&&i.top===t.input.offset().top+o?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>l&&l>s?Math.abs(i.left+s-l):0),i.top-=Math.min(i.top,i.top+r>u&&u>r?Math.abs(r+o):0),i},_findPos:function(t){for(var i,n=this._getInst(t),s=this._get(n,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[s?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,n,s,r,a=this._curInst;!a||t&&a!==e.data(t,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),n=this._get(a,"duration"),s=function(){e.datepicker._tidyDialog(a)},e.effects&&(e.effects.effect[i]||e.effects[i])?a.dpDiv.hide(i,e.datepicker._get(a,"showOptions"),n,s):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?n:null,s),i||s(),this._datepickerShowing=!1,r=this._get(a,"onClose"),r&&r.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),n=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==n)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,n){var s=e(t),r=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(r,i+("M"===n?this._get(r,"showCurrentAtPos"):0),n),this._updateDatepicker(r))},_gotoToday:function(t){var i,n=e(t),s=this._getInst(n[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(i=new Date,s.selectedDay=i.getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(n)},_selectMonthYear:function(t,i,n){var s=e(t),r=this._getInst(s[0]);r["selected"+("M"===n?"Month":"Year")]=r["draw"+("M"===n?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(r),this._adjustDate(s)},_selectDay:function(t,i,n,s){var r,a=e(t);e(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(r=this._getInst(a[0]),r.selectedDay=r.currentDay=e("a",s).html(),r.selectedMonth=r.currentMonth=i,r.selectedYear=r.currentYear=n,this._selectDate(t,this._formatDate(r,r.currentDay,r.currentMonth,r.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var n,s=e(t),r=this._getInst(s[0]);i=null!=i?i:this._formatDate(r),r.input&&r.input.val(i),this._updateAlternate(r),n=this._get(r,"onSelect"),n?n.apply(r.input?r.input[0]:null,[i,r]):r.input&&r.input.trigger("change"),r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],"object"!=typeof r.input[0]&&r.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,n,s,r=this._get(t,"altField");r&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),n=this._getDate(t),s=this.formatDate(i,n,this._getFormatConfig(t)),e(r).each(function(){e(this).val(s)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,n){if(null==t||null==i)throw"Invalid arguments";if(i="object"==typeof i?i.toString():i+"",""===i)return null;var s,r,a,o,l=0,u=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof u?u:(new Date).getFullYear()%100+parseInt(u,10),h=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,d=(n?n.dayNames:null)||this._defaults.dayNames,f=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,p=(n?n.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,v=-1,y=-1,b=!1,_=function(e){var i=s+1<t.length&&t.charAt(s+1)===e;return i&&s++,i},w=function(e){var t=_(e),n="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,s="y"===e?n:1,r=new RegExp("^\\d{"+s+","+n+"}"),a=i.substring(l).match(r);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},x=function(t,n,s){var r=-1,a=e.map(_(t)?s:n,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(a,function(e,t){var n=t[1];return i.substr(l,n.length).toLowerCase()===n.toLowerCase()?(r=t[0],l+=n.length,!1):void 0}),-1!==r)return r+1;throw"Unknown name at position "+l},k=function(){if(i.charAt(l)!==t.charAt(s))throw"Unexpected literal at position "+l;l++};for(s=0;s<t.length;s++)if(b)"'"!==t.charAt(s)||_("'")?k():b=!1;else switch(t.charAt(s)){case"d":v=w("d");break;case"D":x("D",h,d);break;case"o":y=w("o");break;case"m":m=w("m");break;case"M":m=x("M",f,p);break;case"y":g=w("y");break;case"@":o=new Date(w("@")),g=o.getFullYear(),m=o.getMonth()+1,v=o.getDate();break;case"!":o=new Date((w("!")-this._ticksTo1970)/1e4),g=o.getFullYear(),m=o.getMonth()+1,v=o.getDate();break;case"'":_("'")?k():b=!0;break;default:k()}if(l<i.length&&(a=i.substr(l),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),y>-1)for(m=1,v=y;;){if(r=this._getDaysInMonth(g,m-1),r>=v)break;m++,v-=r}if(o=this._daylightSavingAdjust(new Date(g,m-1,v)),o.getFullYear()!==g||o.getMonth()+1!==m||o.getDate()!==v)throw"Invalid date";return o},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,i){if(!t)return"";var n,s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,r=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,l=function(t){var i=n+1<e.length&&e.charAt(n+1)===t;return i&&n++,i},u=function(e,t,i){var n=""+t;if(l(e))for(;n.length<i;)n="0"+n;return n},c=function(e,t,i,n){return l(e)?n[t]:i[t]},h="",d=!1;if(t)for(n=0;n<e.length;n++)if(d)"'"!==e.charAt(n)||l("'")?h+=e.charAt(n):d=!1;else switch(e.charAt(n)){case"d":h+=u("d",t.getDate(),2);break;case"D":h+=c("D",t.getDay(),s,r);break;case"o":h+=u("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":h+=u("m",t.getMonth()+1,2);break;case"M":h+=c("M",t.getMonth(),a,o);break;case"y":h+=l("y")?t.getFullYear():(t.getYear()%100<10?"0":"")+t.getYear()%100;break;case"@":h+=t.getTime();break;case"!":h+=1e4*t.getTime()+this._ticksTo1970;break;case"'":l("'")?h+="'":d=!0;break;default:h+=e.charAt(n)}return h},_possibleChars:function(e){var t,i="",n=!1,s=function(i){var n=t+1<e.length&&e.charAt(t+1)===i;return n&&t++,n};for(t=0;t<e.length;t++)if(n)"'"!==e.charAt(t)||s("'")?i+=e.charAt(t):n=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":s("'")?i+="'":n=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),n=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),r=s,a=this._getFormatConfig(e);try{r=this.parseDate(i,n,a)||s}catch(o){n=t?"":n}e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),e.currentDay=n?r.getDate():0,e.currentMonth=n?r.getMonth():0,e.currentYear=n?r.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,n){var s=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},r=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(n){}for(var s=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,r=s.getFullYear(),a=s.getMonth(),o=s.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,u=l.exec(i);u;){switch(u[2]||"d"){case"d":case"D":o+=parseInt(u[1],10);break;case"w":case"W":o+=7*parseInt(u[1],10);break;case"m":case"M":a+=parseInt(u[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(r,a));break;case"y":case"Y":r+=parseInt(u[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(r,a))}u=l.exec(i)}return new Date(r,a,o)},a=null==i||""===i?n:"string"==typeof i?r(i):"number"==typeof i?isNaN(i)?n:s(i):new Date(i.getTime());return a=a&&"Invalid Date"===a.toString()?n:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var n=!t,s=e.selectedMonth,r=e.selectedYear,a=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=a.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=a.getMonth(),e.drawYear=e.selectedYear=e.currentYear=a.getFullYear(),s===e.selectedMonth&&r===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(n?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),n="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(n,-i,"M")},next:function(){e.datepicker._adjustDate(n,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(n)},selectDay:function(){return e.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(n,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,n,s,r,a,o,l,u,c,h,d,f,p,g,m,v,y,b,_,w,x,k,D,C,S,T,P,I,A,N,M,E,F,O,H,R,L,j,U=new Date,z=this._daylightSavingAdjust(new Date(U.getFullYear(),U.getMonth(),U.getDate())),W=this._get(e,"isRTL"),$=this._get(e,"showButtonPanel"),B=this._get(e,"hideIfNoPrevNext"),q=this._get(e,"navigationAsDateFormat"),Y=this._getNumberOfMonths(e),G=this._get(e,"showCurrentAtPos"),V=this._get(e,"stepMonths"),J=1!==Y[0]||1!==Y[1],K=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),X=this._getMinMaxDate(e,"min"),Q=this._getMinMaxDate(e,"max"),Z=e.drawMonth-G,et=e.drawYear;if(0>Z&&(Z+=12,et--),Q)for(t=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-Y[0]*Y[1]+1,Q.getDate())),t=X&&X>t?X:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=q?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-V,1)),this._getFormatConfig(e)):i,n=this._canAdjustMonth(e,-1,et,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(W?"e":"w")+"'>"+i+"</span></a>":B?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(W?"e":"w")+"'>"+i+"</span></a>",s=this._get(e,"nextText"),s=q?this.formatDate(s,this._daylightSavingAdjust(new Date(et,Z+V,1)),this._getFormatConfig(e)):s,r=this._canAdjustMonth(e,1,et,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(W?"w":"e")+"'>"+s+"</span></a>":B?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(W?"w":"e")+"'>"+s+"</span></a>",a=this._get(e,"currentText"),o=this._get(e,"gotoCurrent")&&e.currentDay?K:z,a=q?this.formatDate(a,o,this._getFormatConfig(e)):a,l=e.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(e,"closeText")+"</button>",u=$?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(W?l:"")+(this._isInRange(e,o)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(W?"":l)+"</div>":"",c=parseInt(this._get(e,"firstDay"),10),c=isNaN(c)?0:c,h=this._get(e,"showWeek"),d=this._get(e,"dayNames"),f=this._get(e,"dayNamesMin"),p=this._get(e,"monthNames"),g=this._get(e,"monthNamesShort"),m=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),y=this._get(e,"selectOtherMonths"),b=this._getDefaultDate(e),_="",x=0;x<Y[0];x++){for(k="",this.maxRows=4,D=0;D<Y[1];D++){if(C=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),S=" ui-corner-all",T="",J){if(T+="<div class='ui-datepicker-group",Y[1]>1)switch(D){case 0:T+=" ui-datepicker-group-first",S=" ui-corner-"+(W?"right":"left");break;case Y[1]-1:T+=" ui-datepicker-group-last",S=" ui-corner-"+(W?"left":"right");break;default:T+=" ui-datepicker-group-middle",S=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+S+"'>"+(/all|left/.test(S)&&0===x?W?r:n:"")+(/all|right/.test(S)&&0===x?W?n:r:"")+this._generateMonthYearHeader(e,Z,et,X,Q,x>0||D>0,p,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",P=h?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",w=0;7>w;w++)I=(w+c)%7,P+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[I]+"'>"+f[I]+"</span></th>";for(T+=P+"</tr></thead><tbody>",A=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),N=(this._getFirstDayOfMonth(et,Z)-c+7)%7,M=Math.ceil((N+A)/7),E=J&&this.maxRows>M?this.maxRows:M,this.maxRows=E,F=this._daylightSavingAdjust(new Date(et,Z,1-N)),O=0;E>O;O++){for(T+="<tr>",H=h?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(F)+"</td>":"",w=0;7>w;w++)R=m?m.apply(e.input?e.input[0]:null,[F]):[!0,""],L=F.getMonth()!==Z,j=L&&!y||!R[0]||X&&X>F||Q&&F>Q,H+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(L?" ui-datepicker-other-month":"")+(F.getTime()===C.getTime()&&Z===e.selectedMonth&&e._keyEvent||b.getTime()===F.getTime()&&b.getTime()===C.getTime()?" "+this._dayOverClass:"")+(j?" "+this._unselectableClass+" ui-state-disabled":"")+(L&&!v?"":" "+R[1]+(F.getTime()===K.getTime()?" "+this._currentClass:"")+(F.getTime()===z.getTime()?" ui-datepicker-today":""))+"'"+(L&&!v||!R[2]?"":" title='"+R[2].replace(/'/g,"&#39;")+"'")+(j?"":" data-handler='selectDay' data-event='click' data-month='"+F.getMonth()+"' data-year='"+F.getFullYear()+"'")+">"+(L&&!v?"&#xa0;":j?"<span class='ui-state-default'>"+F.getDate()+"</span>":"<a class='ui-state-default"+(F.getTime()===z.getTime()?" ui-state-highlight":"")+(F.getTime()===K.getTime()?" ui-state-active":"")+(L?" ui-priority-secondary":"")+"' href='#'>"+F.getDate()+"</a>")+"</td>",F.setDate(F.getDate()+1),F=this._daylightSavingAdjust(F);T+=H+"</tr>"}Z++,Z>11&&(Z=0,et++),T+="</tbody></table>"+(J?"</div>"+(Y[0]>0&&D===Y[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),k+=T}_+=k}return _+=u,e._keyEvent=!1,_},_generateMonthYearHeader:function(e,t,i,n,s,r,a,o){var l,u,c,h,d,f,p,g,m=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",_="";if(r||!m)_+="<span class='ui-datepicker-month'>"+a[t]+"</span>";else{for(l=n&&n.getFullYear()===i,u=s&&s.getFullYear()===i,_+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!l||c>=n.getMonth())&&(!u||c<=s.getMonth())&&(_+="<option value='"+c+"'"+(c===t?" selected='selected'":"")+">"+o[c]+"</option>");_+="</select>"}if(y||(b+=_+(!r&&m&&v?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",r||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(h=this._get(e,"yearRange").split(":"),d=(new Date).getFullYear(),f=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?d+parseInt(e,10):parseInt(e,10);return isNaN(t)?d:t},p=f(h[0]),g=Math.max(p,f(h[1]||"")),p=n?Math.max(p,n.getFullYear()):p,g=s?Math.min(g,s.getFullYear()):g,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=p;p++)e.yearshtml+="<option value='"+p+"'"+(p===i?" selected='selected'":"")+">"+p+"</option>";e.yearshtml+="</select>",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,"yearSuffix"),y&&(b+=(!r&&m&&v?"":"&#xa0;")+_),b+="</div>"},_adjustInstDate:function(e,t,i){var n=e.drawYear+("Y"===i?t:0),s=e.drawMonth+("M"===i?t:0),r=Math.min(e.selectedDay,this._getDaysInMonth(n,s))+("D"===i?t:0),a=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(n,s,r)));e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),s=i&&i>t?i:t;return n&&s>n?n:s},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,n){var s=this._getNumberOfMonths(e),r=this._daylightSavingAdjust(new Date(i,n+(0>t?t:s[0]*s[1]),1));return 0>t&&r.setDate(this._getDaysInMonth(r.getFullYear(),r.getMonth())),this._isInRange(e,r)},_isInRange:function(e,t){var i,n,s=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max"),a=null,o=null,l=this._get(e,"yearRange");return l&&(i=l.split(":"),n=(new Date).getFullYear(),a=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=n),i[1].match(/[+\-].*/)&&(o+=n)),(!s||t.getTime()>=s.getTime())&&(!r||t.getTime()<=r.getTime())&&(!a||t.getFullYear()>=a)&&(!o||t.getFullYear()<=o)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,n){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(n,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new s,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.11.2";e.datepicker;e.widget("ui.draggable",e.ui.mouse,{version:"1.11.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(t){var i=this.options;return this._blurActiveElement(t),this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=e(this);return e("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var i=this.document[0];if(this.handleElement.is(t.target))try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()&&e(i.activeElement).blur()}catch(n){}},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.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"===e(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._normalizeRightBottom(),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){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:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(this._trigger("drag",t,n)===!1)return this._mouseUp({}),!1;this.position=n.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,n=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(n=e.ui.ddmanager.drop(this,t)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.focus(),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(t){var i=this.options,n=e.isFunction(i.helper),s=n?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),n&&s[0]===this.element[0]&&this._setPositionRelative(),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?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 t,i,n,s=this.options,r=this.document[0];return this.relativeContainer=null,s.containment?"window"===s.containment?void(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===s.containment?void(this.containment=[0,0,e(r).width()-this.helperProportions.width-this.margins.left,(e(r).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):s.containment.constructor===Array?void(this.containment=s.containment):("parent"===s.containment&&(s.containment=this.helper[0].parentNode),i=e(s.containment),n=i[0],void(n&&(t=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i))):void(this.containment=null)
},_convertPositionTo:function(e,t){t||(t=this.position);var i="absolute"===e?1:-1,n=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)*i}},_generatePosition:function(e,t){var i,n,s,r,a=this.options,o=this._isRootNode(this.scrollParent[0]),l=e.pageX,u=e.pageY;return o&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(n=this.relativeContainer.offset(),i=[this.containment[0]+n.left,this.containment[1]+n.top,this.containment[2]+n.left,this.containment[3]+n.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(u=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(u=i[3]+this.offset.click.top)),a.grid&&(s=a.grid[1]?this.originalPageY+Math.round((u-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,u=i?s-this.offset.click.top>=i[1]||s-this.offset.click.top>i[3]?s:s-this.offset.click.top>=i[1]?s-a.grid[1]:s+a.grid[1]:s,r=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=i?r-this.offset.click.left>=i[0]||r-this.offset.click.left>i[2]?r:r-this.offset.click.left>=i[0]?r-a.grid[0]:r+a.grid[0]:r),"y"===a.axis&&(l=this.originalPageX),"x"===a.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:o?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:o?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(t,i,n){return n=n||this._uiHash(),e.ui.plugin.call(this,t,[i,n,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i,n){var s=e.extend({},i,{item:n.element});n.sortables=[],e(n.options.connectToSortable).each(function(){var i=e(this).sortable("instance");i&&!i.options.disabled&&(n.sortables.push(i),i.refreshPositions(),i._trigger("activate",t,s))})},stop:function(t,i,n){var s=e.extend({},i,{item:n.element});n.cancelHelperRemoval=!1,e.each(n.sortables,function(){var e=this;e.isOver?(e.isOver=0,n.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,s))})},drag:function(t,i,n){e.each(n.sortables,function(){var s=!1,r=this;r.positionAbs=n.positionAbs,r.helperProportions=n.helperProportions,r.offset.click=n.offset.click,r._intersectsWith(r.containerCache)&&(s=!0,e.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,this!==r&&this._intersectsWith(this.containerCache)&&e.contains(r.element[0],this.element[0])&&(s=!1),s})),s?(r.isOver||(r.isOver=1,r.currentItem=i.helper.appendTo(r.element).data("ui-sortable-item",!0),r.options._helper=r.options.helper,r.options.helper=function(){return i.helper[0]},t.target=r.currentItem[0],r._mouseCapture(t,!0),r._mouseStart(t,!0,!0),r.offset.click.top=n.offset.click.top,r.offset.click.left=n.offset.click.left,r.offset.parent.left-=n.offset.parent.left-r.offset.parent.left,r.offset.parent.top-=n.offset.parent.top-r.offset.parent.top,n._trigger("toSortable",t),n.dropped=r.element,e.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,r.fromOutside=n),r.currentItem&&(r._mouseDrag(t),i.position=r.position)):r.isOver&&(r.isOver=0,r.cancelHelperRemoval=!0,r.options._revert=r.options.revert,r.options.revert=!1,r._trigger("out",t,r._uiHash(r)),r._mouseStop(t,!0),r.options.revert=r.options._revert,r.options.helper=r.options._helper,r.placeholder&&r.placeholder.remove(),n._refreshOffsets(t),i.position=n._generatePosition(t,!0),n._trigger("fromSortable",t),n.dropped=!1,e.each(n.sortables,function(){this.refreshPositions()}))})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,i,n){var s=e("body"),r=n.options;s.css("cursor")&&(r._cursor=s.css("cursor")),s.css("cursor",r.cursor)},stop:function(t,i,n){var s=n.options;s._cursor&&e("body").css("cursor",s._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i,n){var s=e(i.helper),r=n.options;s.css("opacity")&&(r._opacity=s.css("opacity")),s.css("opacity",r.opacity)},stop:function(t,i,n){var s=n.options;s._opacity&&e(i.helper).css("opacity",s._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,n){var s=n.options,r=!1,a=n.scrollParentNotHidden[0],o=n.document[0];a!==o&&"HTML"!==a.tagName?(s.axis&&"x"===s.axis||(n.overflowOffset.top+a.offsetHeight-t.pageY<s.scrollSensitivity?a.scrollTop=r=a.scrollTop+s.scrollSpeed:t.pageY-n.overflowOffset.top<s.scrollSensitivity&&(a.scrollTop=r=a.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(n.overflowOffset.left+a.offsetWidth-t.pageX<s.scrollSensitivity?a.scrollLeft=r=a.scrollLeft+s.scrollSpeed:t.pageX-n.overflowOffset.left<s.scrollSensitivity&&(a.scrollLeft=r=a.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-e(o).scrollTop()<s.scrollSensitivity?r=e(o).scrollTop(e(o).scrollTop()-s.scrollSpeed):e(window).height()-(t.pageY-e(o).scrollTop())<s.scrollSensitivity&&(r=e(o).scrollTop(e(o).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-e(o).scrollLeft()<s.scrollSensitivity?r=e(o).scrollLeft(e(o).scrollLeft()-s.scrollSpeed):e(window).width()-(t.pageX-e(o).scrollLeft())<s.scrollSensitivity&&(r=e(o).scrollLeft(e(o).scrollLeft()+s.scrollSpeed)))),r!==!1&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(n,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,i,n){var s=n.options;n.snapElements=[],e(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each(function(){var t=e(this),i=t.offset();this!==n.element[0]&&n.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:i.top,left:i.left})})},drag:function(t,i,n){var s,r,a,o,l,u,c,h,d,f,p=n.options,g=p.snapTolerance,m=i.offset.left,v=m+n.helperProportions.width,y=i.offset.top,b=y+n.helperProportions.height;for(d=n.snapElements.length-1;d>=0;d--)l=n.snapElements[d].left-n.margins.left,u=l+n.snapElements[d].width,c=n.snapElements[d].top-n.margins.top,h=c+n.snapElements[d].height,l-g>v||m>u+g||c-g>b||y>h+g||!e.contains(n.snapElements[d].item.ownerDocument,n.snapElements[d].item)?(n.snapElements[d].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,t,e.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=!1):("inner"!==p.snapMode&&(s=Math.abs(c-b)<=g,r=Math.abs(h-y)<=g,a=Math.abs(l-v)<=g,o=Math.abs(u-m)<=g,s&&(i.position.top=n._convertPositionTo("relative",{top:c-n.helperProportions.height,left:0}).top),r&&(i.position.top=n._convertPositionTo("relative",{top:h,left:0}).top),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l-n.helperProportions.width}).left),o&&(i.position.left=n._convertPositionTo("relative",{top:0,left:u}).left)),f=s||r||a||o,"outer"!==p.snapMode&&(s=Math.abs(c-y)<=g,r=Math.abs(h-b)<=g,a=Math.abs(l-m)<=g,o=Math.abs(u-v)<=g,s&&(i.position.top=n._convertPositionTo("relative",{top:c,left:0}).top),r&&(i.position.top=n._convertPositionTo("relative",{top:h-n.helperProportions.height,left:0}).top),a&&(i.position.left=n._convertPositionTo("relative",{top:0,left:l}).left),o&&(i.position.left=n._convertPositionTo("relative",{top:0,left:u-n.helperProportions.width}).left)),!n.snapElements[d].snapping&&(s||r||a||o||f)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,t,e.extend(n._uiHash(),{snapItem:n.snapElements[d].item})),n.snapElements[d].snapping=s||r||a||o||f)}}),e.ui.plugin.add("draggable","stack",{start:function(t,i,n){var s,r=n.options,a=e.makeArray(e(r.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});a.length&&(s=parseInt(e(a[0]).css("zIndex"),10)||0,e(a).each(function(t){e(this).css("zIndex",s+t)}),this.css("zIndex",s+a.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i,n){var s=e(i.helper),r=n.options;s.css("zIndex")&&(r._zIndex=s.css("zIndex")),s.css("zIndex",r.zIndex)},stop:function(t,i,n){var s=n.options;s._zIndex&&e(i.helper).css("zIndex",s._zIndex)}});e.ui.draggable;e.widget("ui.resizable",e.ui.mouse,{version:"1.11.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseInt(e,10)||0},_isNumber:function(e){return!isNaN(parseInt(e,10))},_hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[n]>0?!0:(t[n]=1,s=t[n]>0,t[n]=0,s)},_create:function(){var t,i,n,s,r,a=this,o=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!o.aspectRatio,aspectRatio:o.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:o.helper||o.ghost||o.animate?o.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=o.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;i<t.length;i++)n=e.trim(t[i]),r="ui-resizable-"+n,s=e("<div class='ui-resizable-handle "+r+"'></div>"),s.css({zIndex:o.zIndex}),"se"===n&&s.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[n]=".ui-resizable-"+n,this.element.append(s);this._renderAxis=function(t){var i,n,s,r;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=this.element.children(this.handles[i]).first().show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(n=e(this.handles[i],this.element),r=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth(),s=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(s,r),this._proportionallyResize()),e(this.handles[i]).length},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.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(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){o.disabled||(e(this).removeClass("ui-resizable-autohide"),a._handles.show())}).mouseleave(function(){o.disabled||a.resizing||(e(this).addClass("ui-resizable-autohide"),a._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,n,s=!1;for(i in this.handles)n=e(this.handles[i])[0],(n===t.target||e.contains(n,t.target))&&(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var i,n,s,r=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),n=this._num(this.helper.css("top")),r.containment&&(i+=e(r.containment).scrollLeft()||0,n+=e(r.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:n},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof r.aspectRatio?r.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===s?this.axis+"-resize":s),a.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i,n,s=this.originalMousePosition,r=this.axis,a=t.pageX-s.left||0,o=t.pageY-s.top||0,l=this._change[r];return this._updatePrevProperties(),l?(i=l.apply(this,[t,a,o]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),n=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(n)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,n,s,r,a,o,l,u=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,n=i.length&&/textarea/i.test(i[0].nodeName),s=n&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,r=n?0:c.sizeDiff.width,a={width:c.helper.width()-r,height:c.helper.height()-s},o=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,l=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,u.animate||this.element.css(e.extend(a,{top:l,left:o})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!u.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),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 e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,i,n,s,r,a=this.options;r={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||e)&&(t=r.minHeight*this.aspectRatio,n=r.minWidth/this.aspectRatio,i=r.maxHeight*this.aspectRatio,s=r.maxWidth/this.aspectRatio,t>r.minWidth&&(r.minWidth=t),n>r.minHeight&&(r.minHeight=n),i<r.maxWidth&&(r.maxWidth=i),s<r.maxHeight&&(r.maxHeight=s)),this._vBoundaries=r},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,i=this.size,n=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===n&&(e.left=t.left+(i.width-e.width),e.top=null),"nw"===n&&(e.top=t.top+(i.height-e.height),e.left=t.left+(i.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,i=this.axis,n=this._isNumber(e.width)&&t.maxWidth&&t.maxWidth<e.width,s=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,r=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,a=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,o=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,u=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return r&&(e.width=t.minWidth),a&&(e.height=t.minHeight),n&&(e.width=t.maxWidth),s&&(e.height=t.maxHeight),r&&u&&(e.left=o-t.minWidth),n&&u&&(e.left=o-t.maxWidth),a&&c&&(e.top=l-t.minHeight),s&&c&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,i=[],n=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],s=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];4>t;t++)i[t]=parseInt(n[t],10)||0,i[t]+=parseInt(s[t],10)||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,i=this.helper||this.element;t<this._proportionallyResizeElements.length;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,n=this.originalPosition;return{left:n.left+t,width:i.width-t}},n:function(e,t,i){var n=this.originalSize,s=this.originalPosition;return{top:s.top+i,height:n.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,n){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,n]))},sw:function(t,i,n){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,n]))},ne:function(t,i,n){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,n]))},nw:function(t,i,n){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,n]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).resizable("instance"),n=i.options,s=i._proportionallyResizeElements,r=s.length&&/textarea/i.test(s[0].nodeName),a=r&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,o=r?0:i.sizeDiff.width,l={width:i.size.width-o,height:i.size.height-a},u=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(l,c&&u?{top:c,left:u}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};s&&s.length&&e(s[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var t,i,n,s,r,a,o,l=e(this).resizable("instance"),u=l.options,c=l.element,h=u.containment,d=h instanceof e?h.get(0):/parent/.test(h)?c.parent().get(0):h;d&&(l.containerElement=e(d),/document/.test(h)||h===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(d),i=[],e(["Top","Right","Left","Bottom"]).each(function(e,n){i[e]=l._num(t.css("padding"+n))}),l.containerOffset=t.offset(),l.containerPosition=t.position(),l.containerSize={height:t.innerHeight()-i[3],width:t.innerWidth()-i[1]},n=l.containerOffset,s=l.containerSize.height,r=l.containerSize.width,a=l._hasScroll(d,"left")?d.scrollWidth:r,o=l._hasScroll(d)?d.scrollHeight:s,l.parentData={element:d,left:n.left,top:n.top,width:a,height:o}))},resize:function(t){var i,n,s,r,a=e(this).resizable("instance"),o=a.options,l=a.containerOffset,u=a.position,c=a._aspectRatio||t.shiftKey,h={top:0,left:0},d=a.containerElement,f=!0;d[0]!==document&&/static/.test(d.css("position"))&&(h=l),u.left<(a._helper?l.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-l.left:a.position.left-h.left),c&&(a.size.height=a.size.width/a.aspectRatio,f=!1),a.position.left=o.helper?l.left:0),u.top<(a._helper?l.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-l.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,f=!1),a.position.top=a._helper?l.top:0),s=a.containerElement.get(0)===a.element.parent().get(0),r=/relative|absolute/.test(a.containerElement.css("position")),s&&r?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-h.left:a.offset.left-l.left)),n=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-h.top:a.offset.top-l.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,f=!1)),n+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-n,c&&(a.size.width=a.size.height*a.aspectRatio,f=!1)),f||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var t=e(this).resizable("instance"),i=t.options,n=t.containerOffset,s=t.containerPosition,r=t.containerElement,a=e(t.helper),o=a.offset(),l=a.outerWidth()-t.sizeDiff.width,u=a.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(r.css("position"))&&e(this).css({left:o.left-s.left-n.left,width:l,height:u}),t._helper&&!i.animate&&/static/.test(r.css("position"))&&e(this).css({left:o.left-s.left-n.left,width:l,height:u})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance"),i=t.options,n=function(t){e(t).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?n(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],n(i.alsoResize)):e.each(i.alsoResize,function(e){n(e)})},resize:function(t,i){var n=e(this).resizable("instance"),s=n.options,r=n.originalSize,a=n.originalPosition,o={height:n.size.height-r.height||0,width:n.size.width-r.width||0,top:n.position.top-a.top||0,left:n.position.left-a.left||0},l=function(t,n){e(t).each(function(){var t=e(this),s=e(this).data("ui-resizable-alsoresize"),r={},a=n&&n.length?n:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(a,function(e,t){var i=(s[t]||0)+(o[t]||0);i&&i>=0&&(r[t]=i||null)}),t.css(r)})};"object"!=typeof s.alsoResize||s.alsoResize.nodeType?l(s.alsoResize):e.each(s.alsoResize,function(e,t){l(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),i=t.options,n=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t,i=e(this).resizable("instance"),n=i.options,s=i.size,r=i.originalSize,a=i.originalPosition,o=i.axis,l="number"==typeof n.grid?[n.grid,n.grid]:n.grid,u=l[0]||1,c=l[1]||1,h=Math.round((s.width-r.width)/u)*u,d=Math.round((s.height-r.height)/c)*c,f=r.width+h,p=r.height+d,g=n.maxWidth&&n.maxWidth<f,m=n.maxHeight&&n.maxHeight<p,v=n.minWidth&&n.minWidth>f,y=n.minHeight&&n.minHeight>p;n.grid=l,v&&(f+=u),y&&(p+=c),g&&(f-=u),m&&(p-=c),/^(se|s|e)$/.test(o)?(i.size.width=f,i.size.height=p):/^(ne)$/.test(o)?(i.size.width=f,i.size.height=p,i.position.top=a.top-d):/^(sw)$/.test(o)?(i.size.width=f,i.size.height=p,i.position.left=a.left-h):((0>=p-c||0>=f-u)&&(t=i._getPaddingPlusBorderDimensions(this)),p-c>0?(i.size.height=p,i.position.top=a.top-d):(p=c-t.height,i.size.height=p,i.position.top=a.top+r.height-p),f-u>0?(i.size.width=f,i.position.left=a.left-h):(f=c-t.height,i.size.width=f,i.position.left=a.left+r.width-f))}});e.ui.resizable,e.widget("ui.dialog",{version:"1.11.2",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"Close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i,n=this;if(this._isOpen&&this._trigger("beforeClose",t)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&e(i).blur()}catch(s){}this._hide(this.uiDialog,this.options.hide,function(){n._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,i){var n=!1,s=this.uiDialog.siblings(".ui-front:visible").map(function(){return+e(this).css("z-index")}).get(),r=Math.max.apply(null,s);return r>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",r+1),n=!0),n&&!i&&this._trigger("focus",t),n},open:function(){var t=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),void this._trigger("open"))},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find("[autofocus]")),e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);
if(t.keyCode===e.ui.keyCode.TAB&&!t.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),n=i.filter(":first"),s=i.filter(":last");t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==n[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){s.focus()}),t.preventDefault()):(this._delay(function(){n.focus()}),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html("&#160;"),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?void this.uiDialog.removeClass("ui-dialog-buttons"):(e.each(i,function(i,n){var s,r;n=e.isFunction(n)?{click:n,text:i}:n,n=e.extend({type:"button"},n),s=n.click,n.click=function(){s.apply(t.element[0],arguments)},r={icons:n.icons,text:n.showText},delete n.icons,delete n.showText,e("<button></button>",n).button(r).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,n=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(n,s){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",n,t(s))},drag:function(e,n){i._trigger("drag",e,t(n))},stop:function(s,r){var a=r.offset.left-i.document.scrollLeft(),o=r.offset.top-i.document.scrollTop();n.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" top"+(o>=0?"+":"")+o,of:i.window},e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",s,t(r))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,n=this.options,s=n.resizable,r=this.uiDialog.css("position"),a="string"==typeof s?s:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:n.maxWidth,maxHeight:n.maxHeight,minWidth:n.minWidth,minHeight:this._minHeight(),handles:a,start:function(n,s){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",n,t(s))},resize:function(e,n){i._trigger("resize",e,t(n))},stop:function(s,r){var a=i.uiDialog.offset(),o=a.left-i.document.scrollLeft(),l=a.top-i.document.scrollTop();n.height=i.uiDialog.height(),n.width=i.uiDialog.width(),n.position={my:"left top",at:"left"+(o>=0?"+":"")+o+" top"+(l>=0?"+":"")+l,of:i.window},e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",s,t(r))}}).css("position",r)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=e(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),i=e.inArray(this,t);-1!==i&&t.splice(i,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(t){var i=this,n=!1,s={};e.each(t,function(e,t){i._setOption(e,t),e in i.sizeRelatedOptions&&(n=!0),e in i.resizableRelatedOptions&&(s[e]=t)}),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",s)},_setOption:function(e,t){var i,n,s=this.uiDialog;"dialogClass"===e&&s.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(i=s.is(":data(ui-draggable)"),i&&!t&&s.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(n=s.is(":data(ui-resizable)"),n&&!t&&s.resizable("destroy"),n&&"string"==typeof t&&s.resizable("option","handles",t),n||t===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,n=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),n.minWidth>n.width&&(n.width=n.minWidth),e=this.uiDialog.css({height:"auto",width:n.width}).outerHeight(),t=Math.max(0,n.minHeight-e),i="number"==typeof n.maxHeight?Math.max(0,n.maxHeight-e):"none","auto"===n.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,n.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return e(t.target).closest(".ui-dialog").length?!0:!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(e){t||this._allowInteraction(e)||(e.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}});e.widget("ui.droppable",{version:"1.11.2",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,i=this.options,n=i.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(n)?n:function(e){return e.is(n)},this.proportions=function(){return arguments.length?void(t=arguments[0]):t?t:t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;t<e.length;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){if("accept"===t)this.accept=e.isFunction(i)?i:function(e){return e.is(i)};else if("scope"===t){var n=e.ui.ddmanager.droppables[this.options.scope];this._splice(n),this._addToManager(i)}this._super(t,i)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var n=i||e.ui.ddmanager.current,s=!1;return n&&(n.currentItem||n.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=e(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===n.options.scope&&i.accept.call(i.element[0],n.currentItem||n.element)&&e.ui.intersect(n,e.extend(i,{offset:i.element.offset()}),i.options.tolerance,t)?(s=!0,!1):void 0}),s?!1:this.accept.call(this.element[0],n.currentItem||n.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(n)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(){function e(e,t,i){return e>=t&&t+i>e}return function(t,i,n,s){if(!i.offset)return!1;var r=(t.positionAbs||t.position.absolute).left+t.margins.left,a=(t.positionAbs||t.position.absolute).top+t.margins.top,o=r+t.helperProportions.width,l=a+t.helperProportions.height,u=i.offset.left,c=i.offset.top,h=u+i.proportions().width,d=c+i.proportions().height;switch(n){case"fit":return r>=u&&h>=o&&a>=c&&d>=l;case"intersect":return u<r+t.helperProportions.width/2&&o-t.helperProportions.width/2<h&&c<a+t.helperProportions.height/2&&l-t.helperProportions.height/2<d;case"pointer":return e(s.pageY,c,i.proportions().height)&&e(s.pageX,u,i.proportions().width);case"touch":return(a>=c&&d>=a||l>=c&&d>=l||c>a&&l>d)&&(r>=u&&h>=r||o>=u&&h>=o||u>r&&o>h);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var n,s,r=e.ui.ddmanager.droppables[t.options.scope]||[],a=i?i.type:null,o=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(n=0;n<r.length;n++)if(!(r[n].options.disabled||t&&!r[n].accept.call(r[n].element[0],t.currentItem||t.element))){for(s=0;s<o.length;s++)if(o[s]===r[n].element[0]){r[n].proportions().height=0;continue e}r[n].visible="none"!==r[n].element.css("display"),r[n].visible&&("mousedown"===a&&r[n]._activate.call(r[n],i),r[n].offset=r[n].element.offset(),r[n].proportions({width:r[n].element[0].offsetWidth,height:r[n].element[0].offsetHeight}))}},drop:function(t,i){var n=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,i)&&(n=this._drop.call(this,i)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),n},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var n,s,r,a=e.ui.intersect(t,this,this.options.tolerance,i),o=!a&&this.isover?"isout":a&&!this.isover?"isover":null;o&&(this.options.greedy&&(s=this.options.scope,r=this.element.parents(":data(ui-droppable)").filter(function(){return e(this).droppable("instance").options.scope===s}),r.length&&(n=e(r[0]).droppable("instance"),n.greedyChild="isover"===o)),n&&"isover"===o&&(n.isover=!1,n.isout=!0,n._out.call(n,i)),this[o]=!0,this["isout"===o?"isover":"isout"]=!1,this["isover"===o?"_over":"_out"].call(this,i),n&&"isout"===o&&(n.isout=!1,n.isover=!0,n._over.call(n,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}};var y=(e.ui.droppable,"ui-effects-"),b=e;e.effects={effect:{}},function(e,t){function i(e,t,i){var n=h[t.type]||{};return null==e?i||!t.def?null:t.def:(e=n.floor?~~e:parseFloat(e),isNaN(e)?t.def:n.mod?(e+n.mod)%n.mod:0>e?0:n.max<e?n.max:e)}function n(t){var i=u(),n=i._rgba=[];return t=t.toLowerCase(),p(l,function(e,s){var r,a=s.re.exec(t),o=a&&s.parse(a),l=s.space||"rgba";return o?(r=i[l](o),i[c[l].cache]=r[c[l].cache],n=i._rgba=r._rgba,!1):void 0}),n.length?("0,0,0,0"===n.join()&&e.extend(n,r.transparent),i):r[t]}function s(e,t,i){return i=(i+1)%1,1>6*i?e+(t-e)*i*6:1>2*i?t:2>3*i?e+(t-e)*(2/3-i)*6:e}var r,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",o=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],u=e.Color=function(t,i,n,s){return new e.Color.fn.parse(t,i,n,s)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},h={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=u.support={},f=e("<p>")[0],p=e.each;f.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=f.style.backgroundColor.indexOf("rgba")>-1,p(c,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),u.fn=e.extend(u.prototype,{parse:function(s,a,o,l){if(s===t)return this._rgba=[null,null,null,null],this;(s.jquery||s.nodeType)&&(s=e(s).css(a),a=t);var h=this,d=e.type(s),f=this._rgba=[];return a!==t&&(s=[s,a,o,l],d="array"),"string"===d?this.parse(n(s)||r._default):"array"===d?(p(c.rgba.props,function(e,t){f[t.idx]=i(s[t.idx],t)}),this):"object"===d?(s instanceof u?p(c,function(e,t){s[t.cache]&&(h[t.cache]=s[t.cache].slice())}):p(c,function(t,n){var r=n.cache;p(n.props,function(e,t){if(!h[r]&&n.to){if("alpha"===e||null==s[e])return;h[r]=n.to(h._rgba)}h[r][t.idx]=i(s[e],t,!0)}),h[r]&&e.inArray(null,h[r].slice(0,3))<0&&(h[r][3]=1,n.from&&(h._rgba=n.from(h[r])))}),this):void 0},is:function(e){var t=u(e),i=!0,n=this;return p(c,function(e,s){var r,a=t[s.cache];return a&&(r=n[s.cache]||s.to&&s.to(n._rgba)||[],p(s.props,function(e,t){return null!=a[t.idx]?i=a[t.idx]===r[t.idx]:void 0})),i}),i},_space:function(){var e=[],t=this;return p(c,function(i,n){t[n.cache]&&e.push(i)}),e.pop()},transition:function(e,t){var n=u(e),s=n._space(),r=c[s],a=0===this.alpha()?u("transparent"):this,o=a[r.cache]||r.to(a._rgba),l=o.slice();return n=n[r.cache],p(r.props,function(e,s){var r=s.idx,a=o[r],u=n[r],c=h[s.type]||{};null!==u&&(null===a?l[r]=u:(c.mod&&(u-a>c.mod/2?a+=c.mod:a-u>c.mod/2&&(a-=c.mod)),l[r]=i((u-a)*t+a,s)))}),this[s](l)},blend:function(t){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),s=u(t)._rgba;return u(e.map(i,function(e,t){return(1-n)*s[t]+n*e}))},toRgbaString:function(){var t="rgba(",i=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===i[3]&&(i.pop(),t="rgb("),t+i.join()+")"},toHslaString:function(){var t="hsla(",i=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&3>t&&(e=Math.round(100*e)+"%"),e});return 1===i[3]&&(i.pop(),t="hsl("),t+i.join()+")"},toHexString:function(t){var i=this._rgba.slice(),n=i.pop();return t&&i.push(~~(255*n)),"#"+e.map(i,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),u.fn.parse.prototype=u.fn,c.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,i,n=e[0]/255,s=e[1]/255,r=e[2]/255,a=e[3],o=Math.max(n,s,r),l=Math.min(n,s,r),u=o-l,c=o+l,h=.5*c;return t=l===o?0:n===o?60*(s-r)/u+360:s===o?60*(r-n)/u+120:60*(n-s)/u+240,i=0===u?0:.5>=h?u/c:u/(2-c),[Math.round(t)%360,i,h,null==a?1:a]},c.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],n=e[2],r=e[3],a=.5>=n?n*(1+i):n+i-n*i,o=2*n-a;return[Math.round(255*s(o,a,t+1/3)),Math.round(255*s(o,a,t)),Math.round(255*s(o,a,t-1/3)),r]},p(c,function(n,s){var r=s.props,a=s.cache,l=s.to,c=s.from;u.fn[n]=function(n){if(l&&!this[a]&&(this[a]=l(this._rgba)),n===t)return this[a].slice();var s,o=e.type(n),h="array"===o||"object"===o?n:arguments,d=this[a].slice();return p(r,function(e,t){var n=h["object"===o?e:t.idx];null==n&&(n=d[t.idx]),d[t.idx]=i(n,t)}),c?(s=u(c(d)),s[a]=d,s):u(d)},p(r,function(t,i){u.fn[t]||(u.fn[t]=function(s){var r,a=e.type(s),l="alpha"===t?this._hsla?"hsla":"rgba":n,u=this[l](),c=u[i.idx];return"undefined"===a?c:("function"===a&&(s=s.call(this,c),a=e.type(s)),null==s&&i.empty?this:("string"===a&&(r=o.exec(s),r&&(s=c+parseFloat(r[2])*("+"===r[1]?1:-1))),u[i.idx]=s,this[l](u)))})})}),u.hook=function(t){var i=t.split(" ");p(i,function(t,i){e.cssHooks[i]={set:function(t,s){var r,a,o="";if("transparent"!==s&&("string"!==e.type(s)||(r=n(s)))){if(s=u(r||s),!d.rgba&&1!==s._rgba[3]){for(a="backgroundColor"===i?t.parentNode:t;(""===o||"transparent"===o)&&a&&a.style;)try{o=e.css(a,"backgroundColor"),a=a.parentNode}catch(l){}s=s.blend(o&&"transparent"!==o?o:"_default")}s=s.toRgbaString()}try{t.style[i]=s}catch(l){}}},e.fx.step[i]=function(t){t.colorInit||(t.start=u(t.elem,i),t.end=u(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}})},u.hook(a),e.cssHooks.borderColor={expand:function(e){var t={};return p(["Top","Right","Bottom","Left"],function(i,n){t["border"+n+"Color"]=e}),t}},r=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(b),function(){function t(t){var i,n,s=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,r={};if(s&&s.length&&s[0]&&s[s[0]])for(n=s.length;n--;)i=s[n],"string"==typeof s[i]&&(r[e.camelCase(i)]=s[i]);else for(i in s)"string"==typeof s[i]&&(r[i]=s[i]);return r}function i(t,i){var n,r,a={};for(n in i)r=i[n],t[n]!==r&&(s[n]||(e.fx.step[n]||!isNaN(parseFloat(r)))&&(a[n]=r));return a}var n=["add","remove","toggle"],s={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(b.style(e.elem,i,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(s,r,a,o){var l=e.speed(r,a,o);return this.queue(function(){var r,a=e(this),o=a.attr("class")||"",u=l.children?a.find("*").addBack():a;u=u.map(function(){var i=e(this);return{el:i,start:t(this)}}),r=function(){e.each(n,function(e,t){s[t]&&a[t+"Class"](s[t])})},r(),u=u.map(function(){return this.end=t(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr("class",o),u=u.map(function(){var t=this,i=e.Deferred(),n=e.extend({},l,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,n),i.promise()}),e.when.apply(e,u.get()).done(function(){r(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),l.complete.call(a[0])})})},e.fn.extend({addClass:function(t){return function(i,n,s,r){return n?e.effects.animateClass.call(this,{add:i},n,s,r):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(i,n,s,r){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},n,s,r):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,n,s,r,a){return"boolean"==typeof n||void 0===n?s?e.effects.animateClass.call(this,n?{add:i}:{remove:i},s,r,a):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},n,s,r)}}(e.fn.toggleClass),switchClass:function(t,i,n,s,r){return e.effects.animateClass.call(this,{add:i,remove:t},n,s,r)}})}(),function(){function t(t,i,n,s){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),e.isFunction(i)&&(s=i,n=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(s=n,n=i,i={}),e.isFunction(n)&&(s=n,n=null),i&&e.extend(t,i),n=n||i.duration,t.duration=e.fx.off?0:"number"==typeof n?n:n in e.fx.speeds?e.fx.speeds[n]:e.fx.speeds._default,t.complete=s||i.complete,t}function i(t){return!t||"number"==typeof t||e.fx.speeds[t]?!0:"string"!=typeof t||e.effects.effect[t]?e.isFunction(t)?!0:"object"!=typeof t||t.effect?!1:!0:!0}e.extend(e.effects,{version:"1.11.2",save:function(e,t){for(var i=0;i<t.length;i++)null!==t[i]&&e.data(y+t[i],e[0].style[t[i]])},restore:function(e,t){var i,n;for(n=0;n<t.length;n++)null!==t[n]&&(i=e.data(y+t[n]),void 0===i&&(i=""),e.css(t[n],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var i,n;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=e[1]/t.width}return{x:n,y:i}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},n=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),s={width:t.width(),height:t.height()},r=document.activeElement;try{r.id}catch(a){r=document.body}return t.wrap(n),(t[0]===r||e.contains(t[0],r))&&e(r).focus(),n=t.parent(),"static"===t.css("position")?(n.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,n){i[n]=t.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(s),n.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).focus()),t},setTransition:function(t,i,n,s){return s=s||{},e.each(i,function(e,i){var r=t.cssUnit(i);r[0]>0&&(s[i]=r[0]*n+r[1])}),s}}),e.fn.extend({effect:function(){function i(t){function i(){e.isFunction(r)&&r.call(s[0]),e.isFunction(t)&&t()}var s=e(this),r=n.complete,o=n.mode;(s.is(":hidden")?"hide"===o:"show"===o)?(s[o](),i()):a.call(s[0],n,i)}var n=t.apply(this,arguments),s=n.mode,r=n.queue,a=e.effects.effect[n.effect];return e.fx.off||!a?s?this[s](n.duration,n.complete):this.each(function(){n.complete&&n.complete.call(this)}):r===!1?this.each(i):this.queue(r||"fx",i)},show:function(e){return function(n){if(i(n))return e.apply(this,arguments);var s=t.apply(this,arguments);return s.mode="show",this.effect.call(this,s)}}(e.fn.show),hide:function(e){return function(n){if(i(n))return e.apply(this,arguments);var s=t.apply(this,arguments);return s.mode="hide",this.effect.call(this,s)}}(e.fn.hide),toggle:function(e){return function(n){if(i(n)||"boolean"==typeof n)return e.apply(this,arguments);var s=t.apply(this,arguments);return s.mode="toggle",this.effect.call(this,s)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),n=[];return e.each(["em","px","%","pt"],function(e,t){i.indexOf(t)>0&&(n=[parseFloat(i),t])}),n}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,i){t[i]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;e<((t=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return.5>e?i(2*e)/2:1-i(-2*e+2)/2}})}();e.effects,e.effects.effect.blind=function(t,i){var n,s,r,a=e(this),o=/up|down|vertical/,l=/up|left|vertical|horizontal/,u=["position","top","bottom","left","right","height","width"],c=e.effects.setMode(a,t.mode||"hide"),h=t.direction||"up",d=o.test(h),f=d?"height":"width",p=d?"top":"left",g=l.test(h),m={},v="show"===c;a.parent().is(".ui-effects-wrapper")?e.effects.save(a.parent(),u):e.effects.save(a,u),a.show(),n=e.effects.createWrapper(a).css({overflow:"hidden"}),s=n[f](),r=parseFloat(n.css(p))||0,m[f]=v?s:0,g||(a.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[p]=v?r:s+r),v&&(n.css(f,0),g||n.css(p,r+s)),n.animate(m,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){"hide"===c&&a.hide(),e.effects.restore(a,u),e.effects.removeWrapper(a),i()}})},e.effects.effect.bounce=function(t,i){var n,s,r,a=e(this),o=["position","top","bottom","left","right","height","width"],l=e.effects.setMode(a,t.mode||"effect"),u="hide"===l,c="show"===l,h=t.direction||"up",d=t.distance,f=t.times||5,p=2*f+(c||u?1:0),g=t.duration/p,m=t.easing,v="up"===h||"down"===h?"top":"left",y="up"===h||"left"===h,b=a.queue(),_=b.length;for((c||u)&&o.push("opacity"),e.effects.save(a,o),a.show(),e.effects.createWrapper(a),d||(d=a["top"===v?"outerHeight":"outerWidth"]()/3),c&&(r={opacity:1},r[v]=0,a.css("opacity",0).css(v,y?2*-d:2*d).animate(r,g,m)),u&&(d/=Math.pow(2,f-1)),r={},r[v]=0,n=0;f>n;n++)s={},s[v]=(y?"-=":"+=")+d,a.animate(s,g,m).animate(r,g,m),d=u?2*d:d/2;u&&(s={opacity:0},s[v]=(y?"-=":"+=")+d,a.animate(s,g,m)),a.queue(function(){u&&a.hide(),e.effects.restore(a,o),e.effects.removeWrapper(a),i()}),_>1&&b.splice.apply(b,[1,0].concat(b.splice(_,p+1))),a.dequeue()},e.effects.effect.clip=function(t,i){var n,s,r,a=e(this),o=["position","top","bottom","left","right","height","width"],l=e.effects.setMode(a,t.mode||"hide"),u="show"===l,c=t.direction||"vertical",h="vertical"===c,d=h?"height":"width",f=h?"top":"left",p={};e.effects.save(a,o),a.show(),n=e.effects.createWrapper(a).css({overflow:"hidden"}),s="IMG"===a[0].tagName?n:a,r=s[d](),u&&(s.css(d,0),s.css(f,r/2)),p[d]=u?r:0,p[f]=u?0:r/2,s.animate(p,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){u||a.hide(),e.effects.restore(a,o),e.effects.removeWrapper(a),i()}})},e.effects.effect.drop=function(t,i){var n,s=e(this),r=["position","top","bottom","left","right","opacity","height","width"],a=e.effects.setMode(s,t.mode||"hide"),o="show"===a,l=t.direction||"left",u="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l?"pos":"neg",h={opacity:o?1:0};e.effects.save(s,r),s.show(),e.effects.createWrapper(s),n=t.distance||s["top"===u?"outerHeight":"outerWidth"](!0)/2,o&&s.css("opacity",0).css(u,"pos"===c?-n:n),h[u]=(o?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+n,s.animate(h,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===a&&s.hide(),e.effects.restore(s,r),e.effects.removeWrapper(s),i()}})},e.effects.effect.explode=function(t,i){function n(){b.push(this),b.length===h*d&&s()}function s(){f.css({visibility:"visible"}),e(b).remove(),g||f.hide(),i()}var r,a,o,l,u,c,h=t.pieces?Math.round(Math.sqrt(t.pieces)):3,d=h,f=e(this),p=e.effects.setMode(f,t.mode||"hide"),g="show"===p,m=f.show().css("visibility","hidden").offset(),v=Math.ceil(f.outerWidth()/d),y=Math.ceil(f.outerHeight()/h),b=[];for(r=0;h>r;r++)for(l=m.top+r*y,c=r-(h-1)/2,a=0;d>a;a++)o=m.left+a*v,u=a-(d-1)/2,f.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*v,top:-r*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:o+(g?u*v:0),top:l+(g?c*y:0),opacity:g?0:1}).animate({left:o+(g?0:u*v),top:l+(g?0:c*y),opacity:g?1:0},t.duration||500,t.easing,n)},e.effects.effect.fade=function(t,i){var n=e(this),s=e.effects.setMode(n,t.mode||"toggle");n.animate({opacity:s},{queue:!1,duration:t.duration,easing:t.easing,complete:i})},e.effects.effect.fold=function(t,i){var n,s,r=e(this),a=["position","top","bottom","left","right","height","width"],o=e.effects.setMode(r,t.mode||"hide"),l="show"===o,u="hide"===o,c=t.size||15,h=/([0-9]+)%/.exec(c),d=!!t.horizFirst,f=l!==d,p=f?["width","height"]:["height","width"],g=t.duration/2,m={},v={};e.effects.save(r,a),r.show(),n=e.effects.createWrapper(r).css({overflow:"hidden"}),s=f?[n.width(),n.height()]:[n.height(),n.width()],h&&(c=parseInt(h[1],10)/100*s[u?0:1]),l&&n.css(d?{height:0,width:c}:{height:c,width:0}),m[p[0]]=l?s[0]:c,v[p[1]]=l?s[1]:0,n.animate(m,g,t.easing).animate(v,g,t.easing,function(){u&&r.hide(),e.effects.restore(r,a),e.effects.removeWrapper(r),i()})},e.effects.effect.highlight=function(t,i){var n=e(this),s=["backgroundImage","backgroundColor","opacity"],r=e.effects.setMode(n,t.mode||"show"),a={backgroundColor:n.css("backgroundColor")};"hide"===r&&(a.opacity=0),e.effects.save(n,s),n.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(a,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===r&&n.hide(),e.effects.restore(n,s),i()}})},e.effects.effect.size=function(t,i){var n,s,r,a=e(this),o=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],u=["width","height","overflow"],c=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],f=e.effects.setMode(a,t.mode||"effect"),p=t.restore||"effect"!==f,g=t.scale||"both",m=t.origin||["middle","center"],v=a.css("position"),y=p?o:l,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===f&&a.show(),n={height:a.height(),width:a.width(),outerHeight:a.outerHeight(),outerWidth:a.outerWidth()},"toggle"===t.mode&&"show"===f?(a.from=t.to||b,a.to=t.from||n):(a.from=t.from||("show"===f?b:n),a.to=t.to||("hide"===f?b:n)),r={from:{y:a.from.height/n.height,x:a.from.width/n.width},to:{y:a.to.height/n.height,x:a.to.width/n.width}},("box"===g||"both"===g)&&(r.from.y!==r.to.y&&(y=y.concat(h),a.from=e.effects.setTransition(a,h,r.from.y,a.from),a.to=e.effects.setTransition(a,h,r.to.y,a.to)),r.from.x!==r.to.x&&(y=y.concat(d),a.from=e.effects.setTransition(a,d,r.from.x,a.from),a.to=e.effects.setTransition(a,d,r.to.x,a.to))),("content"===g||"both"===g)&&r.from.y!==r.to.y&&(y=y.concat(c).concat(u),a.from=e.effects.setTransition(a,c,r.from.y,a.from),a.to=e.effects.setTransition(a,c,r.to.y,a.to)),e.effects.save(a,y),a.show(),e.effects.createWrapper(a),a.css("overflow","hidden").css(a.from),m&&(s=e.effects.getBaseline(m,n),a.from.top=(n.outerHeight-a.outerHeight())*s.y,a.from.left=(n.outerWidth-a.outerWidth())*s.x,a.to.top=(n.outerHeight-a.to.outerHeight)*s.y,a.to.left=(n.outerWidth-a.to.outerWidth)*s.x),a.css(a.from),("content"===g||"both"===g)&&(h=h.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),u=o.concat(h).concat(d),a.find("*[width]").each(function(){var i=e(this),n={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};
p&&e.effects.save(i,u),i.from={height:n.height*r.from.y,width:n.width*r.from.x,outerHeight:n.outerHeight*r.from.y,outerWidth:n.outerWidth*r.from.x},i.to={height:n.height*r.to.y,width:n.width*r.to.x,outerHeight:n.height*r.to.y,outerWidth:n.width*r.to.x},r.from.y!==r.to.y&&(i.from=e.effects.setTransition(i,h,r.from.y,i.from),i.to=e.effects.setTransition(i,h,r.to.y,i.to)),r.from.x!==r.to.x&&(i.from=e.effects.setTransition(i,d,r.from.x,i.from),i.to=e.effects.setTransition(i,d,r.to.x,i.to)),i.css(i.from),i.animate(i.to,t.duration,t.easing,function(){p&&e.effects.restore(i,u)})})),a.animate(a.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){0===a.to.opacity&&a.css("opacity",a.from.opacity),"hide"===f&&a.hide(),e.effects.restore(a,y),p||("static"===v?a.css({position:"relative",top:a.to.top,left:a.to.left}):e.each(["top","left"],function(e,t){a.css(t,function(t,i){var n=parseInt(i,10),s=e?a.to.left:a.to.top;return"auto"===i?s+"px":n+s+"px"})})),e.effects.removeWrapper(a),i()}})},e.effects.effect.scale=function(t,i){var n=e(this),s=e.extend(!0,{},t),r=e.effects.setMode(n,t.mode||"effect"),a=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"hide"===r?0:100),o=t.direction||"both",l=t.origin,u={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()},c={y:"horizontal"!==o?a/100:1,x:"vertical"!==o?a/100:1};s.effect="size",s.queue=!1,s.complete=i,"effect"!==r&&(s.origin=l||["middle","center"],s.restore=!0),s.from=t.from||("show"===r?{height:0,width:0,outerHeight:0,outerWidth:0}:u),s.to={height:u.height*c.y,width:u.width*c.x,outerHeight:u.outerHeight*c.y,outerWidth:u.outerWidth*c.x},s.fade&&("show"===r&&(s.from.opacity=0,s.to.opacity=1),"hide"===r&&(s.from.opacity=1,s.to.opacity=0)),n.effect(s)},e.effects.effect.puff=function(t,i){var n=e(this),s=e.effects.setMode(n,t.mode||"hide"),r="hide"===s,a=parseInt(t.percent,10)||150,o=a/100,l={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:s,complete:i,percent:r?a:100,from:r?l:{height:l.height*o,width:l.width*o,outerHeight:l.outerHeight*o,outerWidth:l.outerWidth*o}}),n.effect(t)},e.effects.effect.pulsate=function(t,i){var n,s=e(this),r=e.effects.setMode(s,t.mode||"show"),a="show"===r,o="hide"===r,l=a||"hide"===r,u=2*(t.times||5)+(l?1:0),c=t.duration/u,h=0,d=s.queue(),f=d.length;for((a||!s.is(":visible"))&&(s.css("opacity",0).show(),h=1),n=1;u>n;n++)s.animate({opacity:h},c,t.easing),h=1-h;s.animate({opacity:h},c,t.easing),s.queue(function(){o&&s.hide(),i()}),f>1&&d.splice.apply(d,[1,0].concat(d.splice(f,u+1))),s.dequeue()},e.effects.effect.shake=function(t,i){var n,s=e(this),r=["position","top","bottom","left","right","height","width"],a=e.effects.setMode(s,t.mode||"effect"),o=t.direction||"left",l=t.distance||20,u=t.times||3,c=2*u+1,h=Math.round(t.duration/c),d="up"===o||"down"===o?"top":"left",f="up"===o||"left"===o,p={},g={},m={},v=s.queue(),y=v.length;for(e.effects.save(s,r),s.show(),e.effects.createWrapper(s),p[d]=(f?"-=":"+=")+l,g[d]=(f?"+=":"-=")+2*l,m[d]=(f?"-=":"+=")+2*l,s.animate(p,h,t.easing),n=1;u>n;n++)s.animate(g,h,t.easing).animate(m,h,t.easing);s.animate(g,h,t.easing).animate(p,h/2,t.easing).queue(function(){"hide"===a&&s.hide(),e.effects.restore(s,r),e.effects.removeWrapper(s),i()}),y>1&&v.splice.apply(v,[1,0].concat(v.splice(y,c+1))),s.dequeue()},e.effects.effect.slide=function(t,i){var n,s=e(this),r=["position","top","bottom","left","right","width","height"],a=e.effects.setMode(s,t.mode||"show"),o="show"===a,l=t.direction||"left",u="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,h={};e.effects.save(s,r),s.show(),n=t.distance||s["top"===u?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(s).css({overflow:"hidden"}),o&&s.css(u,c?isNaN(n)?"-"+n:-n:n),h[u]=(o?c?"+=":"-=":c?"-=":"+=")+n,s.animate(h,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===a&&s.hide(),e.effects.restore(s,r),e.effects.removeWrapper(s),i()}})},e.effects.effect.transfer=function(t,i){var n=e(this),s=e(t.to),r="fixed"===s.css("position"),a=e("body"),o=r?a.scrollTop():0,l=r?a.scrollLeft():0,u=s.offset(),c={top:u.top-o,left:u.left-l,height:s.innerHeight(),width:s.innerWidth()},h=n.offset(),d=e("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(t.className).css({top:h.top-o,left:h.left-l,height:n.innerHeight(),width:n.innerWidth(),position:r?"fixed":"absolute"}).animate(c,t.duration,t.easing,function(){d.remove(),i()})},e.widget("ui.progressbar",{version:"1.11.2",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){return void 0===e?this.options.value:(this.options.value=this._constrainedValue(e),void this._refreshValue())},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=e===!1,"number"!=typeof e&&(e=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),e.widget("ui.selectable",e.ui.mouse,{version:"1.11.2",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 t,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=e(i.options.filter,i.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this,n=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(n.filter,this.element[0]),this._trigger("start",t),e(n.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),n.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var n=e.data(this,"selectable-item");n.startselected=!0,t.metaKey||t.ctrlKey||(n.$element.removeClass("ui-selected"),n.selected=!1,n.$element.addClass("ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",t,{unselecting:n.element}))}),e(t.target).parents().addBack().each(function(){var n,s=e.data(this,"selectable-item");return s?(n=!t.metaKey&&!t.ctrlKey||!s.$element.hasClass("ui-selected"),s.$element.removeClass(n?"ui-unselecting":"ui-selected").addClass(n?"ui-selecting":"ui-unselecting"),s.unselecting=!n,s.selecting=n,s.selected=n,n?i._trigger("selecting",t,{selecting:s.element}):i._trigger("unselecting",t,{unselecting:s.element}),!1):void 0}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,n=this,s=this.options,r=this.opos[0],a=this.opos[1],o=t.pageX,l=t.pageY;return r>o&&(i=o,o=r,r=i),a>l&&(i=l,l=a,a=i),this.helper.css({left:r,top:a,width:o-r,height:l-a}),this.selectees.each(function(){var i=e.data(this,"selectable-item"),u=!1;i&&i.element!==n.element[0]&&("touch"===s.tolerance?u=!(i.left>o||i.right<r||i.top>l||i.bottom<a):"fit"===s.tolerance&&(u=i.left>r&&i.right<o&&i.top>a&&i.bottom<l),u?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,n._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),n._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var n=e.data(this,"selectable-item");n.$element.removeClass("ui-unselecting"),n.unselecting=!1,n.startselected=!1,i._trigger("unselected",t,{unselected:n.element})}),e(".ui-selecting",this.element[0]).each(function(){var n=e.data(this,"selectable-item");n.$element.removeClass("ui-selecting").addClass("ui-selected"),n.selecting=!1,n.selected=!0,n.startselected=!0,i._trigger("selected",t,{selected:n.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),e.widget("ui.selectmenu",{version:"1.11.2",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var t=this,i=this.element.attr("tabindex");this.label=e("label[for='"+this.ids.element+"']").attr("for",this.ids.button),this._on(this.label,{click:function(e){this.button.focus(),e.preventDefault()}}),this.element.hide(),this.button=e("<span>",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:i||this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element),e("<span>",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button),this.buttonText=e("<span>",{"class":"ui-selectmenu-text"}).appendTo(this.button),this._setText(this.buttonText,this.element.find("option:selected").text()),this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){t.menuItems||t._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var t=this;this.menu=e("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=e("<div>",{"class":"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(e,i){e.preventDefault(),t._setSelection(),t._select(i.item.data("ui-selectmenu-item"),e)},focus:function(e,i){var n=i.item.data("ui-selectmenu-item");null!=t.focusIndex&&n.index!==t.focusIndex&&(t._trigger("focus",e,{item:n}),t.isOpen||t._select(n,e)),t.focusIndex=n.index,t.button.attr("aria-activedescendant",t.menuItems.eq(n.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var e,t=this.element.find("option");t.length&&(this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),e=this._getSelectedItem(),this.menuInstance.focus(null,e),this._setAria(e.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(e){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",e))},_position:function(){this.menuWrap.position(e.extend({of:this.button},this.options.position))},close:function(e){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",e))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(t,i){var n=this,s="";e.each(i,function(i,r){r.optgroup!==s&&(e("<li>",{"class":"ui-selectmenu-optgroup ui-menu-divider"+(r.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:r.optgroup}).appendTo(t),s=r.optgroup),n._renderItemData(t,r)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-selectmenu-item",t)},_renderItem:function(t,i){var n=e("<li>");return i.disabled&&n.addClass("ui-state-disabled"),this._setText(n,i.label),n.appendTo(t)},_setText:function(e,t){t?e.text(t):e.html("&#160;")},_move:function(e,t){var i,n,s=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex):(i=this.menuItems.eq(this.element[0].selectedIndex),s+=":not(.ui-state-disabled)"),n="first"===e||"last"===e?i["first"===e?"prevAll":"nextAll"](s).eq(-1):i[e+"All"](s).eq(0),n.length&&this.menuInstance.focus(t,n)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(e){this[this.isOpen?"close":"open"](e)},_setSelection:function(){var e;this.range&&(window.getSelection?(e=window.getSelection(),e.removeAllRanges(),e.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(t){this.isOpen&&(e(t.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(t))}},_buttonEvents:{mousedown:function(){var e;window.getSelection?(e=window.getSelection(),e.rangeCount&&(this.range=e.getRangeAt(0))):this.range=document.selection.createRange()},click:function(e){this._setSelection(),this._toggle(e)},keydown:function(t){var i=!0;switch(t.keyCode){case e.ui.keyCode.TAB:case e.ui.keyCode.ESCAPE:this.close(t),i=!1;break;case e.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case e.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case e.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case e.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case e.ui.keyCode.LEFT:this._move("prev",t);break;case e.ui.keyCode.RIGHT:this._move("next",t);break;case e.ui.keyCode.HOME:case e.ui.keyCode.PAGE_UP:this._move("first",t);break;case e.ui.keyCode.END:case e.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),i=!1}i&&t.preventDefault()}},_selectFocusedItem:function(e){var t=this.menuItems.eq(this.focusIndex);t.hasClass("ui-state-disabled")||this._select(t.data("ui-selectmenu-item"),e)},_select:function(e,t){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=e.index,this._setText(this.buttonText,e.label),this._setAria(e),this._trigger("select",t,{item:e}),e.index!==i&&this._trigger("change",t,{item:e}),this.close(t)},_setAria:function(e){var t=this.menuItems.eq(e.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(e,t){"icons"===e&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(t.button),this._super(e,t),"appendTo"===e&&this.menuWrap.appendTo(this._appendTo()),"disabled"===e&&(this.menuInstance.option("disabled",t),this.button.toggleClass("ui-state-disabled",t).attr("aria-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)),"width"===e&&this._resizeButton()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen),this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var e=this.options.width;e||(e=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(e)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(t){var i=[];t.each(function(t,n){var s=e(n),r=s.parent("optgroup");i.push({element:s,index:t,value:s.attr("value"),label:s.text(),optgroup:r.attr("label")||"",disabled:r.prop("disabled")||s.prop("disabled")})}),this.items=i},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr("for",this.ids.element)}}),e.widget("ui.slider",e.ui.mouse,{version:"1.11.2",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,i,n=this.options,s=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),r="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",a=[];for(i=n.values&&n.values.length||1,s.length>i&&(s.slice(i).remove(),s=s.slice(0,i)),t=s.length;i>t;t++)a.push(r);this.handles=s.add(e(a.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options,i="";t.range?(t.range===!0&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=e("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===t.range||"max"===t.range?" ui-slider-range-"+t.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var i,n,s,r,a,o,l,u,c=this,h=this.options;return h.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},n=this._normValueFromMouse(i),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(n-c.values(t));(s>i||s===i&&(t===c._lastChangedValue||c.values(t)===h.min))&&(s=i,r=e(this),a=t)}),o=this._start(t,a),o===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,r.addClass("ui-state-active").focus(),l=r.offset(),u=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=u?{left:0,top:0}:{left:t.pageX-l.left-r.width()/2,top:t.pageY-l.top-r.height()/2-(parseInt(r.css("borderTopWidth"),10)||0)-(parseInt(r.css("borderBottomWidth"),10)||0)+(parseInt(r.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,a,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,n,s,r;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/t,n>1&&(n=1),0>n&&(n=0),"vertical"===this.orientation&&(n=1-n),s=this._valueMax()-this._valueMin(),r=this._valueMin()+n*s,this._trimAlignValue(r)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var n,s,r;this.options.values&&this.options.values.length?(n=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>n||1===t&&n>i)&&(i=n),i!==this.values(t)&&(s=this.values(),s[t]=i,r=this._trigger("slide",e,{handle:this.handles[t],value:i,values:s}),n=this.values(t?0:1),r!==!1&&this.values(t,i))):i!==this.value()&&(r=this._trigger("slide",e,{handle:this.handles[t],value:i}),r!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._lastChangedValue=t,this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),void this._change(null,0)):this._value()},values:function(t,i){var n,s,r;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(n=this.options.values,s=arguments[0],r=0;r<n.length;r+=1)n[r]=this._trimAlignValue(s[r]),this._change(null,r);this._refreshValue()},_setOption:function(t,i){var n,s=0;switch("range"===t&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(s=this.options.values.length),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!i),this._super(t,i),t){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===i?"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(),n=0;s>n;n+=1)this._change(null,n);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,n;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,n=e-i;return 2*Math.abs(i)>=t&&(n+=i>0?t:-t),parseFloat(n.toFixed(5))},_calculateNewMax:function(){var e=(this.options.max-this._valueMin())%this.options.step;this.max=this.options.max-e},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var t,i,n,s,r,a=this.options.range,o=this.options,l=this,u=this._animateOff?!1:o.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(n){i=(l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())*100,c["horizontal"===l.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[u?"animate":"css"](c,o.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[u?"animate":"css"]({left:i+"%"},o.animate),1===n&&l.range[u?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:o.animate})):(0===n&&l.range.stop(1,1)[u?"animate":"css"]({bottom:i+"%"},o.animate),1===n&&l.range[u?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:o.animate}))),t=i}):(n=this.value(),s=this._valueMin(),r=this._valueMax(),i=r!==s?(n-s)/(r-s)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[u?"animate":"css"](c,o.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:i+"%"},o.animate),"max"===a&&"horizontal"===this.orientation&&this.range[u?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:o.animate}),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:i+"%"},o.animate),"max"===a&&"vertical"===this.orientation&&this.range[u?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:o.animate}))},_handleEvents:{keydown:function(t){var i,n,s,r,a=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(t.target).addClass("ui-state-active"),i=this._start(t,a),i===!1))return}switch(r=this.options.step,n=s=this.options.values&&this.options.values.length?this.values(a):this.value(),t.keyCode){case e.ui.keyCode.HOME:s=this._valueMin();break;case e.ui.keyCode.END:s=this._valueMax();break;case e.ui.keyCode.PAGE_UP:s=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.PAGE_DOWN:s=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(n===this._valueMax())return;s=this._trimAlignValue(n+r);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(n===this._valueMin())return;s=this._trimAlignValue(n-r)}this._slide(t,a,s)},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass("ui-state-active"))}}}),e.widget("ui.sortable",e.ui.mouse,{version:"1.11.2",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(e,t,i){return e>=t&&t+i>e},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===e.axis||this._isFloating(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),e.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,i){var n=null,s=!1,r=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(t),e(t.target).parents().each(function(){return e.data(this,r.widgetName+"-item")===r?(n=e(this),!1):void 0}),e.data(t.target,r.widgetName+"-item")===r&&(n=e(t.target)),n&&(!this.options.handle||i||(e(this.options.handle,n).find("*").addBack().each(function(){this===t.target&&(s=!0)}),s))?(this.currentItem=n,this._removeCurrentsFromItems(),!0):!1)},_mouseStart:function(t,i,n){var s,r,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),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},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.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(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(r=this.document.find("body"),this.storedCursor=r.css("cursor"),r.css("cursor",a.cursor),this.storedStylesheet=e("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(r)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(s=this.containers.length-1;s>=0;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));
return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!a.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,n,s,r,a=this.options,o=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=o=this.scrollParent[0].scrollTop+a.scrollSpeed:t.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=o=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=o=this.scrollParent[0].scrollLeft+a.scrollSpeed:t.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=o=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(t.pageY-e(document).scrollTop()<a.scrollSensitivity?o=e(document).scrollTop(e(document).scrollTop()-a.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<a.scrollSensitivity&&(o=e(document).scrollTop(e(document).scrollTop()+a.scrollSpeed)),t.pageX-e(document).scrollLeft()<a.scrollSensitivity?o=e(document).scrollLeft(e(document).scrollLeft()-a.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<a.scrollSensitivity&&(o=e(document).scrollLeft(e(document).scrollLeft()+a.scrollSpeed))),o!==!1&&e.ui.ddmanager&&!a.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),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"),i=this.items.length-1;i>=0;i--)if(n=this.items[i],s=n.item[0],r=this._intersectsWithPointer(n),r&&n.instance===this.currentContainer&&s!==this.currentItem[0]&&this.placeholder[1===r?"next":"prev"]()[0]!==s&&!e.contains(this.placeholder[0],s)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],s):!0)){if(this.direction=1===r?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(t,n),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var n=this,s=this.placeholder.offset(),r=this.options.axis,a={};r&&"x"!==r||(a.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),r&&"y"!==r||(a.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){n._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].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(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&n.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))}),!n.length&&t.key&&n.push(t.key+"="),n.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},i.each(function(){n.push(e(t.item||this).attr(t.attribute||"id")||"")}),n},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,n=this.positionAbs.top,s=n+this.helperProportions.height,r=e.left,a=r+e.width,o=e.top,l=o+e.height,u=this.offset.click.top,c=this.offset.click.left,h="x"===this.options.axis||n+u>o&&l>n+u,d="y"===this.options.axis||t+c>r&&a>t+c,f=h&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?f:r<t+this.helperProportions.width/2&&i-this.helperProportions.width/2<a&&o<n+this.helperProportions.height/2&&s-this.helperProportions.height/2<l},_intersectsWithPointer:function(e){var t="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),n=t&&i,s=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return n?this.floating?r&&"right"===r||"down"===s?2:1:s&&("down"===s?2:1):!1},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),n=this._getDragVerticalDirection(),s=this._getDragHorizontalDirection();return this.floating&&s?"right"===s&&i||"left"===s&&!i:n&&("down"===n&&t||"up"===n&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function i(){o.push(this)}var n,s,r,a,o=[],l=[],u=this._connectWith();if(u&&t)for(n=u.length-1;n>=0;n--)for(r=e(u[n]),s=r.length-1;s>=0;s--)a=e.data(r[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&l.push([e.isFunction(a.options.items)?a.options.items.call(a.element):e(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(l.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),n=l.length-1;n>=0;n--)l[n][0].each(i);return e(o)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var i=0;i<t.length;i++)if(t[i]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var i,n,s,r,a,o,l,u,c=this.items,h=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(s=e(d[i]),n=s.length-1;n>=0;n--)r=e.data(s[n],this.widgetFullName),r&&r!==this&&!r.options.disabled&&(h.push([e.isFunction(r.options.items)?r.options.items.call(r.element[0],t,{item:this.currentItem}):e(r.options.items,r.element),r]),this.containers.push(r));for(i=h.length-1;i>=0;i--)for(a=h[i][1],o=h[i][0],n=0,u=o.length;u>n;n++)l=e(o[n]),l.data(this.widgetName+"-item",a),c.push({item:l,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,n,s,r;for(i=this.items.length-1;i>=0;i--)n=this.items[i],n.instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(s=this.options.toleranceElement?e(this.options.toleranceElement,n.item):n.item,t||(n.width=s.outerWidth(),n.height=s.outerHeight()),r=s.offset(),n.left=r.left,n.top=r.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)r=this.containers[i].element.offset(),this.containers[i].containerCache.left=r.left,this.containers[i].containerCache.top=r.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var i,n=t.options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,n.placeholder={element:function(){var n=t.currentItem[0].nodeName.toLowerCase(),s=e("<"+n+">",t.document[0]).addClass(i||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===n?t.currentItem.children().each(function(){e("<td>&#160;</td>",t.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(s)}):"img"===n&&s.attr("src",t.currentItem.attr("src")),i||s.css("visibility","hidden"),s},update:function(e,s){(!i||n.forcePlaceholderSize)&&(s.height()||s.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),s.width()||s.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(n.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),n.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var i,n,s,r,a,o,l,u,c,h,d=null,f=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&e.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],f=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[f].containerCache.over||(this.containers[f]._trigger("over",t,this._uiHash(this)),this.containers[f].containerCache.over=1);else{for(s=1e4,r=null,c=d.floating||this._isFloating(this.currentItem),a=c?"left":"top",o=c?"width":"height",h=c?"clientX":"clientY",n=this.items.length-1;n>=0;n--)e.contains(this.containers[f].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(l=this.items[n].item.offset()[a],u=!1,t[h]-l>this.items[n][o]/2&&(u=!0),Math.abs(t[h]-l)<s&&(s=Math.abs(t[h]-l),r=this.items[n],this.direction=u?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[f])return void(this.currentContainer.containerCache.over||(this.containers[f]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));r?this._rearrange(t,r,null,!0):this._rearrange(t,null,this.containers[f].element,!0),this._trigger("change",t,this._uiHash()),this.containers[f]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[f],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[f]._trigger("over",t,this._uiHash(this)),this.containers[f].containerCache.over=1}},_createHelper:function(t){var i=this.options,n=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||e("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[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")}),(!n[0].style.width||i.forceHelperSize)&&n.width(this.currentItem.width()),(!n[0].style.height||i.forceHelperSize)&&n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.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 t,i,n,s=this.options;"parent"===s.containment&&(s.containment=this.helper[0].parentNode),("document"===s.containment||"window"===s.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e("document"===s.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e("document"===s.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(s.containment)||(t=e(s.containment)[0],i=e(s.containment).offset(),n="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(n?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(n?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var n="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=/(html|body)/i.test(s[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():r?0:s.scrollTop())*n,left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():r?0:s.scrollLeft())*n}},_generatePosition:function(t){var i,n,s=this.options,r=t.pageX,a=t.pageY,o="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(o[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(r=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(r=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),s.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/s.grid[1])*s.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-s.grid[1]:i+s.grid[1]:i,n=this.originalPageX+Math.round((r-this.originalPageX)/s.grid[0])*s.grid[0],r=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-s.grid[0]:n+s.grid[0]:n)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:o.scrollTop()),left:r-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:o.scrollLeft())}},_rearrange:function(e,t,i,n){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var s=this.counter;this._delay(function(){s===this.counter&&this.refreshPositions(!n)})},_clear:function(e,t){function i(e,t,i){return function(n){i._trigger(e,n,t._uiHash(t))}}this.reverting=!1;var n,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)("auto"===this._storedCSS[n]||"static"===this._storedCSS[n])&&(this._storedCSS[n]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&s.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||s.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(s.push(function(e){this._trigger("remove",e,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)t||s.push(i("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(s.push(i("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(n=0;n<s.length;n++)s[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}}),e.widget("ui.spinner",{version:"1.11.2",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},i=this.element;return e.each(["min","max","step"],function(e,n){var s=i.attr(n);void 0!==s&&s.length&&(t[n]=s)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",e)))},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){function i(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){return e(t.currentTarget).hasClass("ui-state-active")?this._start(t)===!1?!1:void this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var i=this.options,n=e.ui.keyCode;switch(t.keyCode){case n.UP:return this._repeat(null,1,t),!0;case n.DOWN:return this._repeat(null,-1,t),!0;case n.PAGE_UP:return this._repeat(null,i.page,t),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(e){return this.spinning||this._trigger("start",e)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(e,t,i){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,i)},e),this._spin(t*this.options.step,i)},_spin:function(e,t){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+e*this._increment(this.counter)),this.spinning&&this._trigger("spin",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?e.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),i=t.indexOf(".");return-1===i?0:t.length-i-1},_adjustValue:function(e){var t,i,n=this.options;return t=null!==n.min?n.min:0,i=e-t,i=Math.round(i/n.step)*n.step,e=t+i,e=parseFloat(e.toFixed(this._precision())),null!==n.max&&e>n.max?n.max:null!==n.min&&e<n.min?n.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){if("culture"===e||"numberFormat"===e){var i=this._parse(this.element.val());return this.options[e]=t,void this.element.val(this._format(i))}("max"===e||"min"===e||"step"===e)&&"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down)),this._super(e,t),"disabled"===e&&(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable"))},_setOptions:l(function(e){this._super(e)}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_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 e=this.value();return null===e?!1:e===this._adjustValue(e)},_value:function(e,t){var i;""!==e&&(i=this._parse(e),null!==i&&(t||(i=this._adjustValue(i)),e=this._format(i))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:l(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:l(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:l(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:l(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){return arguments.length?void l(this._value).call(this,e):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),e.widget("ui.tabs",{version:"1.11.2",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var e=/#.*$/;return function(t){var i,n;t=t.cloneNode(!1),i=t.href.replace(e,""),n=location.href.replace(e,"");try{i=decodeURIComponent(i)}catch(s){}try{n=decodeURIComponent(n)}catch(s){}return t.hash.length>1&&i===n}}(),_create:function(){var t=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible),this._processTabs(),i.active=this._initialActive(),e.isArray(i.disabled)&&(i.disabled=e.unique(i.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):e(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,n=location.hash.substring(1);return null===t&&(n&&this.tabs.each(function(i,s){return e(s).attr("aria-controls")===n?(t=i,!1):void 0}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===t||-1===t)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),-1===t&&(t=i?!1:0)),!i&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var i=e(this.document[0].activeElement).closest("li"),n=this.tabs.index(i),s=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:n++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:s=!1,n--;break;case e.ui.keyCode.END:n=this.anchors.length-1;break;case e.ui.keyCode.HOME:n=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(n);case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(n===this.options.active?!1:n);default:return}t.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,s),t.ctrlKey||(i.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){function n(){return t>s&&(t=0),0>t&&(t=s),t}for(var s=this.tabs.length-1;-1!==e.inArray(n(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){return"active"===e?void this._activate(t):"disabled"===e?void this._setupDisabled(t):(this._super(e,t),"collapsible"===e&&(this.element.toggleClass("ui-tabs-collapsible",t),t||this.options.active!==!1||this._activate(0)),"event"===e&&this._setupEvents(t),void("heightStyle"===e&&this._setupHeightStyle(t)))},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=e.map(i.filter(".ui-state-disabled"),function(e){return i.index(e)}),this._processTabs(),t.active!==!1&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,i=this.tabs,n=this.anchors,s=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]
}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(i,n){var s,r,a,o=e(n).uniqueId().attr("id"),l=e(n).closest("li"),u=l.attr("aria-controls");t._isLocal(n)?(s=n.hash,a=s.substring(1),r=t.element.find(t._sanitizeSelector(s))):(a=l.attr("aria-controls")||e({}).uniqueId()[0].id,s="#"+a,r=t.element.find(s),r.length||(r=t._createPanel(a),r.insertAfter(t.panels[i-1]||t.tablist)),r.attr("aria-live","polite")),r.length&&(t.panels=t.panels.add(r)),u&&l.data("ui-tabs-aria-controls",u),l.attr({"aria-controls":a,"aria-labelledby":o}),r.attr("aria-labelledby",o)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),i&&(this._off(i.not(this.tabs)),this._off(n.not(this.anchors)),this._off(s.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i,n=0;i=this.tabs[n];n++)t===!0||-1!==e.inArray(n,t)?e(i).addClass("ui-state-disabled").attr("aria-disabled","true"):e(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,n=this.element.parent();"fill"===t?(i=n.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),n=t.css("position");"absolute"!==n&&"fixed"!==n&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,e(this).height("").height())}).height(i))},_eventHandler:function(t){var i=this.options,n=this.active,s=e(t.currentTarget),r=s.closest("li"),a=r[0]===n[0],o=a&&i.collapsible,l=o?e():this._getPanelForTab(r),u=n.length?this._getPanelForTab(n):e(),c={oldTab:n,oldPanel:u,newTab:o?e():r,newPanel:l};t.preventDefault(),r.hasClass("ui-state-disabled")||r.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",t,c)===!1||(i.active=o?!1:this.tabs.index(r),this.active=a?e():r,this.xhr&&this.xhr.abort(),u.length||l.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(r),t),this._toggle(t,c))},_toggle:function(t,i){function n(){r.running=!1,r._trigger("activate",t,i)}function s(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),a.length&&r.options.show?r._show(a,r.options.show,n):(a.show(),n())}var r=this,a=i.newPanel,o=i.oldPanel;this.running=!0,o.length&&this.options.hide?this._hide(o,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),o.hide(),s()),o.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&o.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var i,n=this._findActive(t);n[0]!==this.active[0]&&(n.length||(n=this.active),i=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var i=this.options.disabled;i!==!1&&(void 0===t?i=!1:(t=this._getIndex(t),i=e.isArray(i)?e.map(i,function(e){return e!==t?e:null}):e.map(this.tabs,function(e,i){return i!==t?i:null})),this._setupDisabled(i))},disable:function(t){var i=this.options.disabled;if(i!==!0){if(void 0===t)i=!0;else{if(t=this._getIndex(t),-1!==e.inArray(t,i))return;i=e.isArray(i)?e.merge([t],i).sort():[t]}this._setupDisabled(i)}},load:function(t,i){t=this._getIndex(t);var n=this,s=this.tabs.eq(t),r=s.find(".ui-tabs-anchor"),a=this._getPanelForTab(s),o={tab:s,panel:a};this._isLocal(r[0])||(this.xhr=e.ajax(this._ajaxSettings(r,i,o)),this.xhr&&"canceled"!==this.xhr.statusText&&(s.addClass("ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.success(function(e){setTimeout(function(){a.html(e),n._trigger("load",i,o)},1)}).complete(function(e,t){setTimeout(function(){"abort"===t&&n.panels.stop(!1,!0),s.removeClass("ui-tabs-loading"),a.removeAttr("aria-busy"),e===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(t,i,n){var s=this;return{url:t.attr("href"),beforeSend:function(t,r){return s._trigger("beforeLoad",i,e.extend({jqXHR:t,ajaxSettings:r},n))}}},_getPanelForTab:function(t){var i=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),e.widget("ui.tooltip",{version:"1.11.2",options:{content:function(){var t=e(this).attr("title")||"";return e("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(t,i){var n=(t.attr("aria-describedby")||"").split(/\s+/);n.push(i),t.data("ui-tooltip-id",i).attr("aria-describedby",e.trim(n.join(" ")))},_removeDescribedBy:function(t){var i=t.data("ui-tooltip-id"),n=(t.attr("aria-describedby")||"").split(/\s+/),s=e.inArray(i,n);-1!==s&&n.splice(s,1),t.removeData("ui-tooltip-id"),n=e.trim(n.join(" ")),n?t.attr("aria-describedby",n):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=e("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(t,i){var n=this;return"disabled"===t?(this[i?"_disable":"_enable"](),void(this.options[t]=i)):(this._super(t,i),void("content"===t&&e.each(this.tooltips,function(e,t){n._updateContent(t.element)})))},_disable:function(){var t=this;e.each(this.tooltips,function(i,n){var s=e.Event("blur");s.target=s.currentTarget=n.element[0],t.close(s,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var i=this,n=e(t?t.target:this.element).closest(this.options.items);n.length&&!n.data("ui-tooltip-id")&&(n.attr("title")&&n.data("ui-tooltip-title",n.attr("title")),n.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&n.parents().each(function(){var t,n=e(this);n.data("ui-tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,i.close(t,!0)),n.attr("title")&&(n.uniqueId(),i.parents[this.id]={element:this,title:n.attr("title")},n.attr("title",""))}),this._updateContent(n,t))},_updateContent:function(e,t){var i,n=this.options.content,s=this,r=t?t.type:null;return"string"==typeof n?this._open(t,e,n):(i=n.call(e[0],function(i){e.data("ui-tooltip-open")&&s._delay(function(){t&&(t.type=r),this._open(t,e,i)})}),void(i&&this._open(t,e,i)))},_open:function(t,i,n){function s(e){c.of=e,a.is(":hidden")||a.position(c)}var r,a,o,l,u,c=e.extend({},this.options.position);if(n){if(r=this._find(i))return void r.tooltip.find(".ui-tooltip-content").html(n);i.is("[title]")&&(t&&"mouseover"===t.type?i.attr("title",""):i.removeAttr("title")),r=this._tooltip(i),a=r.tooltip,this._addDescribedBy(i,a.attr("id")),a.find(".ui-tooltip-content").html(n),this.liveRegion.children().hide(),n.clone?(u=n.clone(),u.removeAttr("id").find("[id]").removeAttr("id")):u=n,e("<div>").html(u).appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:s}),s(t)):a.position(e.extend({of:i},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(l=this.delayedShow=setInterval(function(){a.is(":visible")&&(s(c.of),clearInterval(l))},e.fx.interval)),this._trigger("open",t,{tooltip:a}),o={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var n=e.Event(t);n.currentTarget=i[0],this.close(n,!0)}}},i[0]!==this.element[0]&&(o.remove=function(){this._removeTooltip(a)}),t&&"mouseover"!==t.type||(o.mouseleave="close"),t&&"focusin"!==t.type||(o.focusout="close"),this._on(!0,i,o)}},close:function(t){var i,n=this,s=e(t?t.currentTarget:this.element),r=this._find(s);r&&(i=r.tooltip,r.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&!s.attr("title")&&s.attr("title",s.data("ui-tooltip-title")),this._removeDescribedBy(s),r.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){n._removeTooltip(e(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,i){e(i.element).attr("title",i.title),delete n.parents[t]}),r.closing=!0,this._trigger("close",t,{tooltip:i}),r.hiding||(r.closing=!1)))},_tooltip:function(t){var i=e("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),n=i.uniqueId().attr("id");return e("<div>").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[n]={element:t,tooltip:i}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(i,n){var s=e.Event("blur"),r=n.element;s.target=s.currentTarget=r[0],t.close(s,!0),e("#"+i).remove(),r.data("ui-tooltip-title")&&(r.attr("title")||r.attr("title",r.data("ui-tooltip-title")),r.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}})}),function(){var e=this,t=e._,i=Array.prototype,n=Object.prototype,s=Function.prototype,r=i.push,a=i.slice,o=i.concat,l=n.toString,u=n.hasOwnProperty,c=Array.isArray,h=Object.keys,d=s.bind,f=function(e){return e instanceof f?e:this instanceof f?void(this._wrapped=e):new f(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=f),exports._=f):e._=f,f.VERSION="1.7.0";var p=function(e,t,i){if(void 0===t)return e;switch(null==i?3:i){case 1:return function(i){return e.call(t,i)};case 2:return function(i,n){return e.call(t,i,n)};case 3:return function(i,n,s){return e.call(t,i,n,s)};case 4:return function(i,n,s,r){return e.call(t,i,n,s,r)}}return function(){return e.apply(t,arguments)}};f.iteratee=function(e,t,i){return null==e?f.identity:f.isFunction(e)?p(e,t,i):f.isObject(e)?f.matches(e):f.property(e)},f.each=f.forEach=function(e,t,i){if(null==e)return e;t=p(t,i);var n,s=e.length;if(s===+s)for(n=0;s>n;n++)t(e[n],n,e);else{var r=f.keys(e);for(n=0,s=r.length;s>n;n++)t(e[r[n]],r[n],e)}return e},f.map=f.collect=function(e,t,i){if(null==e)return[];t=f.iteratee(t,i);for(var n,s=e.length!==+e.length&&f.keys(e),r=(s||e).length,a=Array(r),o=0;r>o;o++)n=s?s[o]:o,a[o]=t(e[n],n,e);return a};var g="Reduce of empty array with no initial value";f.reduce=f.foldl=f.inject=function(e,t,i,n){null==e&&(e=[]),t=p(t,n,4);var s,r=e.length!==+e.length&&f.keys(e),a=(r||e).length,o=0;if(arguments.length<3){if(!a)throw new TypeError(g);i=e[r?r[o++]:o++]}for(;a>o;o++)s=r?r[o]:o,i=t(i,e[s],s,e);return i},f.reduceRight=f.foldr=function(e,t,i,n){null==e&&(e=[]),t=p(t,n,4);var s,r=e.length!==+e.length&&f.keys(e),a=(r||e).length;if(arguments.length<3){if(!a)throw new TypeError(g);i=e[r?r[--a]:--a]}for(;a--;)s=r?r[a]:a,i=t(i,e[s],s,e);return i},f.find=f.detect=function(e,t,i){var n;return t=f.iteratee(t,i),f.some(e,function(e,i,s){return t(e,i,s)?(n=e,!0):void 0}),n},f.filter=f.select=function(e,t,i){var n=[];return null==e?n:(t=f.iteratee(t,i),f.each(e,function(e,i,s){t(e,i,s)&&n.push(e)}),n)},f.reject=function(e,t,i){return f.filter(e,f.negate(f.iteratee(t)),i)},f.every=f.all=function(e,t,i){if(null==e)return!0;t=f.iteratee(t,i);var n,s,r=e.length!==+e.length&&f.keys(e),a=(r||e).length;for(n=0;a>n;n++)if(s=r?r[n]:n,!t(e[s],s,e))return!1;return!0},f.some=f.any=function(e,t,i){if(null==e)return!1;t=f.iteratee(t,i);var n,s,r=e.length!==+e.length&&f.keys(e),a=(r||e).length;for(n=0;a>n;n++)if(s=r?r[n]:n,t(e[s],s,e))return!0;return!1},f.contains=f.include=function(e,t){return null==e?!1:(e.length!==+e.length&&(e=f.values(e)),f.indexOf(e,t)>=0)},f.invoke=function(e,t){var i=a.call(arguments,2),n=f.isFunction(t);return f.map(e,function(e){return(n?t:e[t]).apply(e,i)})},f.pluck=function(e,t){return f.map(e,f.property(t))},f.where=function(e,t){return f.filter(e,f.matches(t))},f.findWhere=function(e,t){return f.find(e,f.matches(t))},f.max=function(e,t,i){var n,s,r=-1/0,a=-1/0;if(null==t&&null!=e){e=e.length===+e.length?e:f.values(e);for(var o=0,l=e.length;l>o;o++)n=e[o],n>r&&(r=n)}else t=f.iteratee(t,i),f.each(e,function(e,i,n){s=t(e,i,n),(s>a||s===-1/0&&r===-1/0)&&(r=e,a=s)});return r},f.min=function(e,t,i){var n,s,r=1/0,a=1/0;if(null==t&&null!=e){e=e.length===+e.length?e:f.values(e);for(var o=0,l=e.length;l>o;o++)n=e[o],r>n&&(r=n)}else t=f.iteratee(t,i),f.each(e,function(e,i,n){s=t(e,i,n),(a>s||1/0===s&&1/0===r)&&(r=e,a=s)});return r},f.shuffle=function(e){for(var t,i=e&&e.length===+e.length?e:f.values(e),n=i.length,s=Array(n),r=0;n>r;r++)t=f.random(0,r),t!==r&&(s[r]=s[t]),s[t]=i[r];return s},f.sample=function(e,t,i){return null==t||i?(e.length!==+e.length&&(e=f.values(e)),e[f.random(e.length-1)]):f.shuffle(e).slice(0,Math.max(0,t))},f.sortBy=function(e,t,i){return t=f.iteratee(t,i),f.pluck(f.map(e,function(e,i,n){return{value:e,index:i,criteria:t(e,i,n)}}).sort(function(e,t){var i=e.criteria,n=t.criteria;if(i!==n){if(i>n||void 0===i)return 1;if(n>i||void 0===n)return-1}return e.index-t.index}),"value")};var m=function(e){return function(t,i,n){var s={};return i=f.iteratee(i,n),f.each(t,function(n,r){var a=i(n,r,t);e(s,n,a)}),s}};f.groupBy=m(function(e,t,i){f.has(e,i)?e[i].push(t):e[i]=[t]}),f.indexBy=m(function(e,t,i){e[i]=t}),f.countBy=m(function(e,t,i){f.has(e,i)?e[i]++:e[i]=1}),f.sortedIndex=function(e,t,i,n){i=f.iteratee(i,n,1);for(var s=i(t),r=0,a=e.length;a>r;){var o=r+a>>>1;i(e[o])<s?r=o+1:a=o}return r},f.toArray=function(e){return e?f.isArray(e)?a.call(e):e.length===+e.length?f.map(e,f.identity):f.values(e):[]},f.size=function(e){return null==e?0:e.length===+e.length?e.length:f.keys(e).length},f.partition=function(e,t,i){t=f.iteratee(t,i);var n=[],s=[];return f.each(e,function(e,i,r){(t(e,i,r)?n:s).push(e)}),[n,s]},f.first=f.head=f.take=function(e,t,i){return null==e?void 0:null==t||i?e[0]:0>t?[]:a.call(e,0,t)},f.initial=function(e,t,i){return a.call(e,0,Math.max(0,e.length-(null==t||i?1:t)))},f.last=function(e,t,i){return null==e?void 0:null==t||i?e[e.length-1]:a.call(e,Math.max(e.length-t,0))},f.rest=f.tail=f.drop=function(e,t,i){return a.call(e,null==t||i?1:t)},f.compact=function(e){return f.filter(e,f.identity)};var v=function(e,t,i,n){if(t&&f.every(e,f.isArray))return o.apply(n,e);for(var s=0,a=e.length;a>s;s++){var l=e[s];f.isArray(l)||f.isArguments(l)?t?r.apply(n,l):v(l,t,i,n):i||n.push(l)}return n};f.flatten=function(e,t){return v(e,t,!1,[])},f.without=function(e){return f.difference(e,a.call(arguments,1))},f.uniq=f.unique=function(e,t,i,n){if(null==e)return[];f.isBoolean(t)||(n=i,i=t,t=!1),null!=i&&(i=f.iteratee(i,n));for(var s=[],r=[],a=0,o=e.length;o>a;a++){var l=e[a];if(t)a&&r===l||s.push(l),r=l;else if(i){var u=i(l,a,e);f.indexOf(r,u)<0&&(r.push(u),s.push(l))}else f.indexOf(s,l)<0&&s.push(l)}return s},f.union=function(){return f.uniq(v(arguments,!0,!0,[]))},f.intersection=function(e){if(null==e)return[];for(var t=[],i=arguments.length,n=0,s=e.length;s>n;n++){var r=e[n];if(!f.contains(t,r)){for(var a=1;i>a&&f.contains(arguments[a],r);a++);a===i&&t.push(r)}}return t},f.difference=function(e){var t=v(a.call(arguments,1),!0,!0,[]);return f.filter(e,function(e){return!f.contains(t,e)})},f.zip=function(e){if(null==e)return[];for(var t=f.max(arguments,"length").length,i=Array(t),n=0;t>n;n++)i[n]=f.pluck(arguments,n);return i},f.object=function(e,t){if(null==e)return{};for(var i={},n=0,s=e.length;s>n;n++)t?i[e[n]]=t[n]:i[e[n][0]]=e[n][1];return i},f.indexOf=function(e,t,i){if(null==e)return-1;var n=0,s=e.length;if(i){if("number"!=typeof i)return n=f.sortedIndex(e,t),e[n]===t?n:-1;n=0>i?Math.max(0,s+i):i}for(;s>n;n++)if(e[n]===t)return n;return-1},f.lastIndexOf=function(e,t,i){if(null==e)return-1;var n=e.length;for("number"==typeof i&&(n=0>i?n+i+1:Math.min(n,i+1));--n>=0;)if(e[n]===t)return n;return-1},f.range=function(e,t,i){arguments.length<=1&&(t=e||0,e=0),i=i||1;for(var n=Math.max(Math.ceil((t-e)/i),0),s=Array(n),r=0;n>r;r++,e+=i)s[r]=e;return s};var y=function(){};f.bind=function(e,t){var i,n;if(d&&e.bind===d)return d.apply(e,a.call(arguments,1));if(!f.isFunction(e))throw new TypeError("Bind must be called on a function");return i=a.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(t,i.concat(a.call(arguments)));y.prototype=e.prototype;var s=new y;y.prototype=null;var r=e.apply(s,i.concat(a.call(arguments)));return f.isObject(r)?r:s}},f.partial=function(e){var t=a.call(arguments,1);return function(){for(var i=0,n=t.slice(),s=0,r=n.length;r>s;s++)n[s]===f&&(n[s]=arguments[i++]);for(;i<arguments.length;)n.push(arguments[i++]);return e.apply(this,n)}},f.bindAll=function(e){var t,i,n=arguments.length;if(1>=n)throw new Error("bindAll must be passed function names");for(t=1;n>t;t++)i=arguments[t],e[i]=f.bind(e[i],e);return e},f.memoize=function(e,t){var i=function(n){var s=i.cache,r=t?t.apply(this,arguments):n;return f.has(s,r)||(s[r]=e.apply(this,arguments)),s[r]};return i.cache={},i},f.delay=function(e,t){var i=a.call(arguments,2);return setTimeout(function(){return e.apply(null,i)},t)},f.defer=function(e){return f.delay.apply(f,[e,1].concat(a.call(arguments,1)))},f.throttle=function(e,t,i){var n,s,r,a=null,o=0;i||(i={});var l=function(){o=i.leading===!1?0:f.now(),a=null,r=e.apply(n,s),a||(n=s=null)};return function(){var u=f.now();o||i.leading!==!1||(o=u);var c=t-(u-o);return n=this,s=arguments,0>=c||c>t?(clearTimeout(a),a=null,o=u,r=e.apply(n,s),a||(n=s=null)):a||i.trailing===!1||(a=setTimeout(l,c)),r}},f.debounce=function(e,t,i){var n,s,r,a,o,l=function(){var u=f.now()-a;t>u&&u>0?n=setTimeout(l,t-u):(n=null,i||(o=e.apply(r,s),n||(r=s=null)))};return function(){r=this,s=arguments,a=f.now();var u=i&&!n;return n||(n=setTimeout(l,t)),u&&(o=e.apply(r,s),r=s=null),o}},f.wrap=function(e,t){return f.partial(t,e)},f.negate=function(e){return function(){return!e.apply(this,arguments)}},f.compose=function(){var e=arguments,t=e.length-1;return function(){for(var i=t,n=e[t].apply(this,arguments);i--;)n=e[i].call(this,n);return n}},f.after=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}},f.before=function(e,t){var i;return function(){return--e>0?i=t.apply(this,arguments):t=null,i}},f.once=f.partial(f.before,2),f.keys=function(e){if(!f.isObject(e))return[];if(h)return h(e);var t=[];for(var i in e)f.has(e,i)&&t.push(i);return t},f.values=function(e){for(var t=f.keys(e),i=t.length,n=Array(i),s=0;i>s;s++)n[s]=e[t[s]];return n},f.pairs=function(e){for(var t=f.keys(e),i=t.length,n=Array(i),s=0;i>s;s++)n[s]=[t[s],e[t[s]]];return n},f.invert=function(e){for(var t={},i=f.keys(e),n=0,s=i.length;s>n;n++)t[e[i[n]]]=i[n];return t},f.functions=f.methods=function(e){var t=[];for(var i in e)f.isFunction(e[i])&&t.push(i);return t.sort()},f.extend=function(e){if(!f.isObject(e))return e;for(var t,i,n=1,s=arguments.length;s>n;n++){t=arguments[n];for(i in t)u.call(t,i)&&(e[i]=t[i])}return e},f.pick=function(e,t,i){var n,s={};if(null==e)return s;if(f.isFunction(t)){t=p(t,i);for(n in e){var r=e[n];t(r,n,e)&&(s[n]=r)}}else{var l=o.apply([],a.call(arguments,1));e=new Object(e);for(var u=0,c=l.length;c>u;u++)n=l[u],n in e&&(s[n]=e[n])}return s},f.omit=function(e,t,i){if(f.isFunction(t))t=f.negate(t);else{var n=f.map(o.apply([],a.call(arguments,1)),String);t=function(e,t){return!f.contains(n,t)}}return f.pick(e,t,i)},f.defaults=function(e){if(!f.isObject(e))return e;for(var t=1,i=arguments.length;i>t;t++){var n=arguments[t];for(var s in n)void 0===e[s]&&(e[s]=n[s])}return e},f.clone=function(e){return f.isObject(e)?f.isArray(e)?e.slice():f.extend({},e):e},f.tap=function(e,t){return t(e),e};var b=function(e,t,i,n){if(e===t)return 0!==e||1/e===1/t;if(null==e||null==t)return e===t;e instanceof f&&(e=e._wrapped),t instanceof f&&(t=t._wrapped);var s=l.call(e);if(s!==l.call(t))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!==+e?+t!==+t:0===+e?1/+e===1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t}if("object"!=typeof e||"object"!=typeof t)return!1;for(var r=i.length;r--;)if(i[r]===e)return n[r]===t;var a=e.constructor,o=t.constructor;if(a!==o&&"constructor"in e&&"constructor"in t&&!(f.isFunction(a)&&a instanceof a&&f.isFunction(o)&&o instanceof o))return!1;i.push(e),n.push(t);var u,c;if("[object Array]"===s){if(u=e.length,c=u===t.length)for(;u--&&(c=b(e[u],t[u],i,n)););}else{var h,d=f.keys(e);if(u=d.length,c=f.keys(t).length===u)for(;u--&&(h=d[u],c=f.has(t,h)&&b(e[h],t[h],i,n)););}return i.pop(),n.pop(),c};f.isEqual=function(e,t){return b(e,t,[],[])},f.isEmpty=function(e){if(null==e)return!0;if(f.isArray(e)||f.isString(e)||f.isArguments(e))return 0===e.length;for(var t in e)if(f.has(e,t))return!1;return!0},f.isElement=function(e){return!(!e||1!==e.nodeType)},f.isArray=c||function(e){return"[object Array]"===l.call(e)},f.isObject=function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},f.each(["Arguments","Function","String","Number","Date","RegExp"],function(e){f["is"+e]=function(t){return l.call(t)==="[object "+e+"]"}}),f.isArguments(arguments)||(f.isArguments=function(e){return f.has(e,"callee")}),"function"!=typeof/./&&(f.isFunction=function(e){return"function"==typeof e||!1}),f.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},f.isNaN=function(e){return f.isNumber(e)&&e!==+e},f.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"===l.call(e)},f.isNull=function(e){return null===e},f.isUndefined=function(e){return void 0===e},f.has=function(e,t){return null!=e&&u.call(e,t)},f.noConflict=function(){return e._=t,this},f.identity=function(e){return e},f.constant=function(e){return function(){return e}},f.noop=function(){},f.property=function(e){return function(t){return t[e]}},f.matches=function(e){var t=f.pairs(e),i=t.length;return function(e){if(null==e)return!i;e=new Object(e);for(var n=0;i>n;n++){var s=t[n],r=s[0];if(s[1]!==e[r]||!(r in e))return!1}return!0}},f.times=function(e,t,i){var n=Array(Math.max(0,e));t=p(t,i,1);for(var s=0;e>s;s++)n[s]=t(s);return n},f.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},f.now=Date.now||function(){return(new Date).getTime()};var _={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},w=f.invert(_),x=function(e){var t=function(t){return e[t]},i="(?:"+f.keys(e).join("|")+")",n=RegExp(i),s=RegExp(i,"g");return function(e){return e=null==e?"":""+e,n.test(e)?e.replace(s,t):e}};f.escape=x(_),f.unescape=x(w),f.result=function(e,t){if(null==e)return void 0;var i=e[t];return f.isFunction(i)?e[t]():i};var k=0;f.uniqueId=function(e){var t=++k+"";return e?e+t:t},f.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var D=/(.)^/,C={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},S=/\\|'|\r|\n|\u2028|\u2029/g,T=function(e){return"\\"+C[e]};f.template=function(e,t,i){!t&&i&&(t=i),t=f.defaults({},t,f.templateSettings);var n=RegExp([(t.escape||D).source,(t.interpolate||D).source,(t.evaluate||D).source].join("|")+"|$","g"),s=0,r="__p+='";e.replace(n,function(t,i,n,a,o){return r+=e.slice(s,o).replace(S,T),s=o+t.length,i?r+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'":n?r+="'+\n((__t=("+n+"))==null?'':__t)+\n'":a&&(r+="';\n"+a+"\n__p+='"),t}),r+="';\n",t.variable||(r="with(obj||{}){\n"+r+"}\n"),r="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+r+"return __p;\n";try{var a=new Function(t.variable||"obj","_",r)}catch(o){throw o.source=r,o}var l=function(e){return a.call(this,e,f)},u=t.variable||"obj";return l.source="function("+u+"){\n"+r+"}",l},f.chain=function(e){var t=f(e);return t._chain=!0,t};var P=function(e){return this._chain?f(e).chain():e};f.mixin=function(e){f.each(f.functions(e),function(t){var i=f[t]=e[t];f.prototype[t]=function(){var e=[this._wrapped];return r.apply(e,arguments),P.call(this,i.apply(f,e))}})},f.mixin(f),f.each(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=i[e];f.prototype[e]=function(){var i=this._wrapped;return t.apply(i,arguments),"shift"!==e&&"splice"!==e||0!==i.length||delete i[0],P.call(this,i)}}),f.each(["concat","join","slice"],function(e){var t=i[e];f.prototype[e]=function(){return P.call(this,t.apply(this._wrapped,arguments))}}),f.prototype.value=function(){return this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return f})}.call(this),!function(e,t){"use strict";function i(e,t){var i,n,s=e.toLowerCase();for(t=[].concat(t),i=0;i<t.length;i+=1)if(n=t[i]){if(n.test&&n.test(e))return!0;if(n.toLowerCase()===s)return!0}}var n=t.prototype.trim,s=t.prototype.trimRight,r=t.prototype.trimLeft,a=function(e){return 1*e||0},o=function(e,t){if(1>t)return"";for(var i="";t>0;)1&t&&(i+=e),t>>=1,e+=e;return i},l=[].slice,u=function(e){return null==e?"\\s":e.source?e.source:"["+p.escapeRegExp(e)+"]"},c={lt:"<",gt:">",quot:'"',amp:"&",apos:"'"},h={};for(var d in c)h[c[d]]=d;h["'"]="#39";var f=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var i=o,n=function(){return n.cache.hasOwnProperty(arguments[0])||(n.cache[arguments[0]]=n.parse(arguments[0])),n.format.call(null,n.cache[arguments[0]],arguments)};return n.format=function(n,s){var r,a,o,l,u,c,h,d=1,p=n.length,g="",m=[];for(a=0;p>a;a++)if(g=e(n[a]),"string"===g)m.push(n[a]);else if("array"===g){if(l=n[a],l[2])for(r=s[d],o=0;o<l[2].length;o++){if(!r.hasOwnProperty(l[2][o]))throw new Error(f('[_.sprintf] property "%s" does not exist',l[2][o]));r=r[l[2][o]]}else r=l[1]?s[l[1]]:s[d++];if(/[^s]/.test(l[8])&&"number"!=e(r))throw new Error(f("[_.sprintf] expecting number but found %s",e(r)));switch(l[8]){case"b":r=r.toString(2);break;case"c":r=t.fromCharCode(r);break;case"d":r=parseInt(r,10);break;case"e":r=l[7]?r.toExponential(l[7]):r.toExponential();break;case"f":r=l[7]?parseFloat(r).toFixed(l[7]):parseFloat(r);break;case"o":r=r.toString(8);break;case"s":r=(r=t(r))&&l[7]?r.substring(0,l[7]):r;break;case"u":r=Math.abs(r);break;case"x":r=r.toString(16);break;case"X":r=r.toString(16).toUpperCase()}r=/[def]/.test(l[8])&&l[3]&&r>=0?"+"+r:r,c=l[4]?"0"==l[4]?"0":l[4].charAt(1):" ",h=l[6]-t(r).length,u=l[6]?i(c,h):"",m.push(l[5]?r+u:u+r)}return m.join("")},n.cache={},n.parse=function(e){for(var t=e,i=[],n=[],s=0;t;){if(null!==(i=/^[^\x25]+/.exec(t)))n.push(i[0]);else if(null!==(i=/^\x25{2}/.exec(t)))n.push("%");else{if(null===(i=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t)))throw new Error("[_.sprintf] huh?");if(i[2]){s|=1;var r=[],a=i[2],o=[];if(null===(o=/^([a-z_][a-z_\d]*)/i.exec(a)))throw new Error("[_.sprintf] huh?");for(r.push(o[1]);""!==(a=a.substring(o[0].length));)if(null!==(o=/^\.([a-z_][a-z_\d]*)/i.exec(a)))r.push(o[1]);else{if(null===(o=/^\[(\d+)\]/.exec(a)))throw new Error("[_.sprintf] huh?");r.push(o[1])}i[2]=r}else s|=2;if(3===s)throw new Error("[_.sprintf] mixing positional and named placeholders is not (yet) supported");n.push(i)}t=t.substring(i[0].length)}return n},n}(),p={VERSION:"2.4.0",isBlank:function(e){return null==e&&(e=""),/^\s*$/.test(e)},stripTags:function(e){return null==e?"":t(e).replace(/<\/?[^>]+>/g,"")},capitalize:function(e){return e=null==e?"":t(e),e.charAt(0).toUpperCase()+e.slice(1)},chop:function(e,i){return null==e?[]:(e=t(e),i=~~i,i>0?e.match(new RegExp(".{1,"+i+"}","g")):[e])},clean:function(e){return p.strip(e).replace(/\s+/g," ")},count:function(e,i){if(null==e||null==i)return 0;e=t(e),i=t(i);for(var n=0,s=0,r=i.length;;){if(s=e.indexOf(i,s),-1===s)break;n++,s+=r}return n},chars:function(e){return null==e?[]:t(e).split("")},swapCase:function(e){return null==e?"":t(e).replace(/\S/g,function(e){return e===e.toUpperCase()?e.toLowerCase():e.toUpperCase()})},escapeHTML:function(e){return null==e?"":t(e).replace(/[&<>"']/g,function(e){return"&"+h[e]+";"})},unescapeHTML:function(e){return null==e?"":t(e).replace(/\&([^;]+);/g,function(e,i){var n;return i in c?c[i]:(n=i.match(/^#x([\da-fA-F]+)$/))?t.fromCharCode(parseInt(n[1],16)):(n=i.match(/^#(\d+)$/))?t.fromCharCode(~~n[1]):e})},escapeRegExp:function(e){return null==e?"":t(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},splice:function(e,t,i,n){var s=p.chars(e);return s.splice(~~t,~~i,n),s.join("")},insert:function(e,t,i){return p.splice(e,t,0,i)},include:function(e,i){return""===i?!0:null==e?!1:-1!==t(e).indexOf(i)},join:function(){var e=l.call(arguments),t=e.shift();return null==t&&(t=""),e.join(t)},lines:function(e){return null==e?[]:t(e).split("\n")},reverse:function(e){return p.chars(e).reverse().join("")},startsWith:function(e,i){return""===i?!0:null==e||null==i?!1:(e=t(e),i=t(i),e.length>=i.length&&e.slice(0,i.length)===i)},endsWith:function(e,i){return""===i?!0:null==e||null==i?!1:(e=t(e),i=t(i),e.length>=i.length&&e.slice(e.length-i.length)===i)},succ:function(e){return null==e?"":(e=t(e),e.slice(0,-1)+t.fromCharCode(e.charCodeAt(e.length-1)+1))},titleize:function(e){return null==e?"":(e=t(e).toLowerCase(),e.replace(/(?:^|\s|-)\S/g,function(e){return e.toUpperCase()}))},camelize:function(e){return p.trim(e).replace(/[-_\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""})},underscored:function(e){return p.trim(e).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()},dasherize:function(e){return p.trim(e).replace(/([A-Z])/g,"-$1").replace(/[-_\s]+/g,"-").toLowerCase()
},classify:function(e){return p.capitalize(p.camelize(t(e).replace(/[\W_]/g," ")).replace(/\s/g,""))},humanize:function(e){return p.capitalize(p.underscored(e).replace(/_id$/,"").replace(/_/g," "))},trim:function(e,i){return null==e?"":!i&&n?n.call(e):(i=u(i),t(e).replace(new RegExp("^"+i+"+|"+i+"+$","g"),""))},ltrim:function(e,i){return null==e?"":!i&&r?r.call(e):(i=u(i),t(e).replace(new RegExp("^"+i+"+"),""))},rtrim:function(e,i){return null==e?"":!i&&s?s.call(e):(i=u(i),t(e).replace(new RegExp(i+"+$"),""))},truncate:function(e,i,n){return null==e?"":(e=t(e),n=n||"...",i=~~i,e.length>i?e.slice(0,i)+n:e)},prune:function(e,i,n){if(null==e)return"";if(e=t(e),i=~~i,n=null!=n?t(n):"...",e.length<=i)return e;var s=function(e){return e.toUpperCase()!==e.toLowerCase()?"A":" "},r=e.slice(0,i+1).replace(/.(?=\W*\w*$)/g,s);return r=r.slice(r.length-2).match(/\w\w/)?r.replace(/\s*\S+$/,""):p.rtrim(r.slice(0,r.length-1)),(r+n).length>e.length?e:e.slice(0,r.length)+n},words:function(e,t){return p.isBlank(e)?[]:p.trim(e,t).split(t||/\s+/)},pad:function(e,i,n,s){e=null==e?"":t(e),i=~~i;var r=0;switch(n?n.length>1&&(n=n.charAt(0)):n=" ",s){case"right":return r=i-e.length,e+o(n,r);case"both":return r=i-e.length,o(n,Math.ceil(r/2))+e+o(n,Math.floor(r/2));default:return r=i-e.length,o(n,r)+e}},lpad:function(e,t,i){return p.pad(e,t,i)},rpad:function(e,t,i){return p.pad(e,t,i,"right")},lrpad:function(e,t,i){return p.pad(e,t,i,"both")},sprintf:f,vsprintf:function(e,t){return t.unshift(e),f.apply(null,t)},toNumber:function(e,t){return e?(e=p.trim(e),e.match(/^-?\d+(?:\.\d+)?$/)?a(a(e).toFixed(~~t)):0/0):0},numberFormat:function(e,t,i,n){if(isNaN(e)||null==e)return"";e=e.toFixed(~~t),n="string"==typeof n?n:",";var s=e.split("."),r=s[0],a=s[1]?(i||".")+s[1]:"";return r.replace(/(\d)(?=(?:\d{3})+$)/g,"$1"+n)+a},strRight:function(e,i){if(null==e)return"";e=t(e),i=null!=i?t(i):i;var n=i?e.indexOf(i):-1;return~n?e.slice(n+i.length,e.length):e},strRightBack:function(e,i){if(null==e)return"";e=t(e),i=null!=i?t(i):i;var n=i?e.lastIndexOf(i):-1;return~n?e.slice(n+i.length,e.length):e},strLeft:function(e,i){if(null==e)return"";e=t(e),i=null!=i?t(i):i;var n=i?e.indexOf(i):-1;return~n?e.slice(0,n):e},strLeftBack:function(e,t){if(null==e)return"";e+="",t=null!=t?""+t:t;var i=e.lastIndexOf(t);return~i?e.slice(0,i):e},toSentence:function(e,t,i,n){t=t||", ",i=i||" and ";var s=e.slice(),r=s.pop();return e.length>2&&n&&(i=p.rtrim(t)+i),s.length?s.join(t)+i+r:r},toSentenceSerial:function(){var e=l.call(arguments);return e[3]=!0,p.toSentence.apply(p,e)},slugify:function(e){if(null==e)return"";var i="ąàáäâãåæăćęèéëêìíïîłńòóöôõøśșțùúüûñçżź",n="aaaaaaaaaceeeeeiiiilnoooooosstuuuunczz",s=new RegExp(u(i),"g");return e=t(e).toLowerCase().replace(s,function(e){var t=i.indexOf(e);return n.charAt(t)||"-"}),p.dasherize(e.replace(/[^\w\s-]/g,""))},surround:function(e,t){return[t,e,t].join("")},quote:function(e,t){return p.surround(e,t||'"')},unquote:function(e,t){return t=t||'"',e[0]===t&&e[e.length-1]===t?e.slice(1,e.length-1):e},exports:function(){var e={};for(var t in this)this.hasOwnProperty(t)&&!t.match(/^(?:include|contains|reverse)$/)&&(e[t]=this[t]);return e},repeat:function(e,i,n){if(null==e)return"";if(i=~~i,null==n)return o(t(e),i);for(var s=[];i>0;s[--i]=e);return s.join(n)},naturalCmp:function(e,i){if(e==i)return 0;if(!e)return-1;if(!i)return 1;for(var n=/(\.\d+)|(\d+)|(\D+)/g,s=t(e).toLowerCase().match(n),r=t(i).toLowerCase().match(n),a=Math.min(s.length,r.length),o=0;a>o;o++){var l=s[o],u=r[o];if(l!==u){var c=parseInt(l,10);if(!isNaN(c)){var h=parseInt(u,10);if(!isNaN(h)&&c-h)return c-h}return u>l?-1:1}}return s.length===r.length?s.length-r.length:i>e?-1:1},levenshtein:function(e,i){if(null==e&&null==i)return 0;if(null==e)return t(i).length;if(null==i)return t(e).length;e=t(e),i=t(i);for(var n,s,r=[],a=0;a<=i.length;a++)for(var o=0;o<=e.length;o++)s=a&&o?e.charAt(o-1)===i.charAt(a-1)?n:Math.min(r[o],r[o-1],n)+1:a+o,n=r[o],r[o]=s;return r.pop()},toBoolean:function(e,t,n){return"number"==typeof e&&(e=""+e),"string"!=typeof e?!!e:(e=p.trim(e),i(e,t||["true","1"])?!0:i(e,n||["false","0"])?!1:void 0)}};p.strip=p.trim,p.lstrip=p.ltrim,p.rstrip=p.rtrim,p.center=p.lrpad,p.rjust=p.lpad,p.ljust=p.rpad,p.contains=p.include,p.q=p.quote,p.toBool=p.toBoolean,"undefined"!=typeof exports&&("undefined"!=typeof module&&module.exports&&(module.exports=p),exports._s=p),"function"==typeof define&&define.amd&&define("underscore.string",[],function(){return p}),e._=e._||{},e._.string=e._.str=p}(this,String),function(e){function t(e,t,i){switch(arguments.length){case 2:return null!=e?e:t;case 3:return null!=e?e:null!=t?t:i;default:throw new Error("Implement me")}}function i(e,t){return Ct.call(e,t)}function n(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function s(e){bt.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function r(e,t){var i=!0;return d(function(){return i&&(s(e),i=!1),t.apply(this,arguments)},t)}function a(e,t){mi[e]||(s(t),mi[e]=!0)}function o(e,t){return function(i){return g(e.call(this,i),t)}}function l(e,t){return function(i){return this.localeData().ordinal(e.call(this,i),t)}}function u(){}function c(e,t){t!==!1&&N(e),f(this,e),this._d=new Date(+e._d)}function h(e){var t=D(e),i=t.year||0,n=t.quarter||0,s=t.month||0,r=t.week||0,a=t.day||0,o=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._milliseconds=+c+1e3*u+6e4*l+36e5*o,this._days=+a+7*r,this._months=+s+3*n+12*i,this._data={},this._locale=bt.localeData(),this._bubble()}function d(e,t){for(var n in t)i(t,n)&&(e[n]=t[n]);return i(t,"toString")&&(e.toString=t.toString),i(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t){var i,n,s;if("undefined"!=typeof t._isAMomentObject&&(e._isAMomentObject=t._isAMomentObject),"undefined"!=typeof t._i&&(e._i=t._i),"undefined"!=typeof t._f&&(e._f=t._f),"undefined"!=typeof t._l&&(e._l=t._l),"undefined"!=typeof t._strict&&(e._strict=t._strict),"undefined"!=typeof t._tzm&&(e._tzm=t._tzm),"undefined"!=typeof t._isUTC&&(e._isUTC=t._isUTC),"undefined"!=typeof t._offset&&(e._offset=t._offset),"undefined"!=typeof t._pf&&(e._pf=t._pf),"undefined"!=typeof t._locale&&(e._locale=t._locale),Ft.length>0)for(i in Ft)n=Ft[i],s=t[n],"undefined"!=typeof s&&(e[n]=s);return e}function p(e){return 0>e?Math.ceil(e):Math.floor(e)}function g(e,t,i){for(var n=""+Math.abs(e),s=e>=0;n.length<t;)n="0"+n;return(s?i?"+":"":"-")+n}function m(e,t){var i={milliseconds:0,months:0};return i.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+e.clone().add(i.months,"M"),i}function v(e,t){var i;return t=H(t,e),e.isBefore(t)?i=m(e,t):(i=m(t,e),i.milliseconds=-i.milliseconds,i.months=-i.months),i}function y(e,t){return function(i,n){var s,r;return null===n||isNaN(+n)||(a(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period)."),r=i,i=n,n=r),i="string"==typeof i?+i:i,s=bt.duration(i,n),b(this,s,e),this}}function b(e,t,i,n){var s=t._milliseconds,r=t._days,a=t._months;n=null==n?!0:n,s&&e._d.setTime(+e._d+s*i),r&&ft(e,"Date",dt(e,"Date")+r*i),a&&ht(e,dt(e,"Month")+a*i),n&&bt.updateOffset(e,r||a)}function _(e){return"[object Array]"===Object.prototype.toString.call(e)}function w(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}function x(e,t,i){var n,s=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0;for(n=0;s>n;n++)(i&&e[n]!==t[n]||!i&&S(e[n])!==S(t[n]))&&a++;return a+r}function k(e){if(e){var t=e.toLowerCase().replace(/(.)s$/,"$1");e=ui[e]||ci[t]||t}return e}function D(e){var t,n,s={};for(n in e)i(e,n)&&(t=k(n),t&&(s[t]=e[n]));return s}function C(t){var i,n;if(0===t.indexOf("week"))i=7,n="day";else{if(0!==t.indexOf("month"))return;i=12,n="month"}bt[t]=function(s,r){var a,o,l=bt._locale[t],u=[];if("number"==typeof s&&(r=s,s=e),o=function(e){var t=bt().utc().set(n,e);return l.call(bt._locale,t,s||"")},null!=r)return o(r);for(a=0;i>a;a++)u.push(o(a));return u}}function S(e){var t=+e,i=0;return 0!==t&&isFinite(t)&&(i=t>=0?Math.floor(t):Math.ceil(t)),i}function T(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function P(e,t,i){return ot(bt([e,11,31+t-i]),t,i).week}function I(e){return A(e)?366:365}function A(e){return e%4===0&&e%100!==0||e%400===0}function N(e){var t;e._a&&-2===e._pf.overflow&&(t=e._a[Tt]<0||e._a[Tt]>11?Tt:e._a[Pt]<1||e._a[Pt]>T(e._a[St],e._a[Tt])?Pt:e._a[It]<0||e._a[It]>24||24===e._a[It]&&(0!==e._a[At]||0!==e._a[Nt]||0!==e._a[Mt])?It:e._a[At]<0||e._a[At]>59?At:e._a[Nt]<0||e._a[Nt]>59?Nt:e._a[Mt]<0||e._a[Mt]>999?Mt:-1,e._pf._overflowDayOfYear&&(St>t||t>Pt)&&(t=Pt),e._pf.overflow=t)}function M(t){return null==t._isValid&&(t._isValid=!isNaN(t._d.getTime())&&t._pf.overflow<0&&!t._pf.empty&&!t._pf.invalidMonth&&!t._pf.nullInput&&!t._pf.invalidFormat&&!t._pf.userInvalidated,t._strict&&(t._isValid=t._isValid&&0===t._pf.charsLeftOver&&0===t._pf.unusedTokens.length&&t._pf.bigHour===e)),t._isValid}function E(e){return e?e.toLowerCase().replace("_","-"):e}function F(e){for(var t,i,n,s,r=0;r<e.length;){for(s=E(e[r]).split("-"),t=s.length,i=E(e[r+1]),i=i?i.split("-"):null;t>0;){if(n=O(s.slice(0,t).join("-")))return n;if(i&&i.length>=t&&x(s,i,!0)>=t-1)break;t--}r++}return null}function O(e){var t=null;if(!Et[e]&&Ot)try{t=bt.locale(),require("./locale/"+e),bt.locale(t)}catch(i){}return Et[e]}function H(e,t){var i,n;return t._isUTC?(i=t.clone(),n=(bt.isMoment(e)||w(e)?+e:+bt(e))-+i,i._d.setTime(+i._d+n),bt.updateOffset(i,!1),i):bt(e).local()}function R(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function L(e){var t,i,n=e.match(jt);for(t=0,i=n.length;i>t;t++)n[t]=gi[n[t]]?gi[n[t]]:R(n[t]);return function(s){var r="";for(t=0;i>t;t++)r+=n[t]instanceof Function?n[t].call(s,e):n[t];return r}}function j(e,t){return e.isValid()?(t=U(t,e.localeData()),hi[t]||(hi[t]=L(t)),hi[t](e)):e.localeData().invalidDate()}function U(e,t){function i(e){return t.longDateFormat(e)||e}var n=5;for(Ut.lastIndex=0;n>=0&&Ut.test(e);)e=e.replace(Ut,i),Ut.lastIndex=0,n-=1;return e}function z(e,t){var i,n=t._strict;switch(e){case"Q":return Xt;case"DDDD":return Zt;case"YYYY":case"GGGG":case"gggg":return n?ei:$t;case"Y":case"G":case"g":return ii;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return n?ti:Bt;case"S":if(n)return Xt;case"SS":if(n)return Qt;case"SSS":if(n)return Zt;case"DDD":return Wt;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Yt;case"a":case"A":return t._locale._meridiemParse;case"x":return Jt;case"X":return Kt;case"Z":case"ZZ":return Gt;case"T":return Vt;case"SSSS":return qt;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return n?Qt:zt;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return zt;case"Do":return n?t._locale._ordinalParse:t._locale._ordinalParseLenient;default:return i=new RegExp(K(J(e.replace("\\","")),"i"))}}function W(e){e=e||"";var t=e.match(Gt)||[],i=t[t.length-1]||[],n=(i+"").match(oi)||["-",0,0],s=+(60*n[1])+S(n[2]);return"+"===n[0]?-s:s}function $(e,t,i){var n,s=i._a;switch(e){case"Q":null!=t&&(s[Tt]=3*(S(t)-1));break;case"M":case"MM":null!=t&&(s[Tt]=S(t)-1);break;case"MMM":case"MMMM":n=i._locale.monthsParse(t,e,i._strict),null!=n?s[Tt]=n:i._pf.invalidMonth=t;break;case"D":case"DD":null!=t&&(s[Pt]=S(t));break;case"Do":null!=t&&(s[Pt]=S(parseInt(t.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=t&&(i._dayOfYear=S(t));break;case"YY":s[St]=bt.parseTwoDigitYear(t);break;case"YYYY":case"YYYYY":case"YYYYYY":s[St]=S(t);break;case"a":case"A":i._isPm=i._locale.isPM(t);break;case"h":case"hh":i._pf.bigHour=!0;case"H":case"HH":s[It]=S(t);break;case"m":case"mm":s[At]=S(t);break;case"s":case"ss":s[Nt]=S(t);break;case"S":case"SS":case"SSS":case"SSSS":s[Mt]=S(1e3*("0."+t));break;case"x":i._d=new Date(S(t));break;case"X":i._d=new Date(1e3*parseFloat(t));break;case"Z":case"ZZ":i._useUTC=!0,i._tzm=W(t);break;case"dd":case"ddd":case"dddd":n=i._locale.weekdaysParse(t),null!=n?(i._w=i._w||{},i._w.d=n):i._pf.invalidWeekday=t;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":e=e.substr(0,1);case"gggg":case"GGGG":case"GGGGG":e=e.substr(0,2),t&&(i._w=i._w||{},i._w[e]=S(t));break;case"gg":case"GG":i._w=i._w||{},i._w[e]=bt.parseTwoDigitYear(t)}}function B(e){var i,n,s,r,a,o,l;i=e._w,null!=i.GG||null!=i.W||null!=i.E?(a=1,o=4,n=t(i.GG,e._a[St],ot(bt(),1,4).year),s=t(i.W,1),r=t(i.E,1)):(a=e._locale._week.dow,o=e._locale._week.doy,n=t(i.gg,e._a[St],ot(bt(),a,o).year),s=t(i.w,1),null!=i.d?(r=i.d,a>r&&++s):r=null!=i.e?i.e+a:a),l=lt(n,s,r,o,a),e._a[St]=l.year,e._dayOfYear=l.dayOfYear}function q(e){var i,n,s,r,a=[];if(!e._d){for(s=G(e),e._w&&null==e._a[Pt]&&null==e._a[Tt]&&B(e),e._dayOfYear&&(r=t(e._a[St],s[St]),e._dayOfYear>I(r)&&(e._pf._overflowDayOfYear=!0),n=nt(r,0,e._dayOfYear),e._a[Tt]=n.getUTCMonth(),e._a[Pt]=n.getUTCDate()),i=0;3>i&&null==e._a[i];++i)e._a[i]=a[i]=s[i];for(;7>i;i++)e._a[i]=a[i]=null==e._a[i]?2===i?1:0:e._a[i];24===e._a[It]&&0===e._a[At]&&0===e._a[Nt]&&0===e._a[Mt]&&(e._nextDay=!0,e._a[It]=0),e._d=(e._useUTC?nt:it).apply(null,a),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()+e._tzm),e._nextDay&&(e._a[It]=24)}}function Y(e){var t;e._d||(t=D(e._i),e._a=[t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],q(e))}function G(e){var t=new Date;return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function V(t){if(t._f===bt.ISO_8601)return void Q(t);t._a=[],t._pf.empty=!0;var i,n,s,r,a,o=""+t._i,l=o.length,u=0;for(s=U(t._f,t._locale).match(jt)||[],i=0;i<s.length;i++)r=s[i],n=(o.match(z(r,t))||[])[0],n&&(a=o.substr(0,o.indexOf(n)),a.length>0&&t._pf.unusedInput.push(a),o=o.slice(o.indexOf(n)+n.length),u+=n.length),gi[r]?(n?t._pf.empty=!1:t._pf.unusedTokens.push(r),$(r,n,t)):t._strict&&!n&&t._pf.unusedTokens.push(r);t._pf.charsLeftOver=l-u,o.length>0&&t._pf.unusedInput.push(o),t._pf.bigHour===!0&&t._a[It]<=12&&(t._pf.bigHour=e),t._isPm&&t._a[It]<12&&(t._a[It]+=12),t._isPm===!1&&12===t._a[It]&&(t._a[It]=0),q(t),N(t)}function J(e){return e.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,i,n,s){return t||i||n||s})}function K(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function X(e){var t,i,s,r,a;if(0===e._f.length)return e._pf.invalidFormat=!0,void(e._d=new Date(0/0));for(r=0;r<e._f.length;r++)a=0,t=f({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._pf=n(),t._f=e._f[r],V(t),M(t)&&(a+=t._pf.charsLeftOver,a+=10*t._pf.unusedTokens.length,t._pf.score=a,(null==s||s>a)&&(s=a,i=t));d(e,i||t)}function Q(e){var t,i,n=e._i,s=ni.exec(n);if(s){for(e._pf.iso=!0,t=0,i=ri.length;i>t;t++)if(ri[t][1].exec(n)){e._f=ri[t][0]+(s[6]||" ");break}for(t=0,i=ai.length;i>t;t++)if(ai[t][1].exec(n)){e._f+=ai[t][0];break}n.match(Gt)&&(e._f+="Z"),V(e)}else e._isValid=!1}function Z(e){Q(e),e._isValid===!1&&(delete e._isValid,bt.createFromInputFallback(e))}function et(e,t){var i,n=[];for(i=0;i<e.length;++i)n.push(t(e[i],i));return n}function tt(t){var i,n=t._i;n===e?t._d=new Date:w(n)?t._d=new Date(+n):null!==(i=Ht.exec(n))?t._d=new Date(+i[1]):"string"==typeof n?Z(t):_(n)?(t._a=et(n.slice(0),function(e){return parseInt(e,10)}),q(t)):"object"==typeof n?Y(t):"number"==typeof n?t._d=new Date(n):bt.createFromInputFallback(t)}function it(e,t,i,n,s,r,a){var o=new Date(e,t,i,n,s,r,a);return 1970>e&&o.setFullYear(e),o}function nt(e){var t=new Date(Date.UTC.apply(null,arguments));return 1970>e&&t.setUTCFullYear(e),t}function st(e,t){if("string"==typeof e)if(isNaN(e)){if(e=t.weekdaysParse(e),"number"!=typeof e)return null}else e=parseInt(e,10);return e}function rt(e,t,i,n,s){return s.relativeTime(t||1,!!i,e,n)}function at(e,t,i){var n=bt.duration(e).abs(),s=Dt(n.as("s")),r=Dt(n.as("m")),a=Dt(n.as("h")),o=Dt(n.as("d")),l=Dt(n.as("M")),u=Dt(n.as("y")),c=s<di.s&&["s",s]||1===r&&["m"]||r<di.m&&["mm",r]||1===a&&["h"]||a<di.h&&["hh",a]||1===o&&["d"]||o<di.d&&["dd",o]||1===l&&["M"]||l<di.M&&["MM",l]||1===u&&["y"]||["yy",u];return c[2]=t,c[3]=+e>0,c[4]=i,rt.apply({},c)}function ot(e,t,i){var n,s=i-t,r=i-e.day();return r>s&&(r-=7),s-7>r&&(r+=7),n=bt(e).add(r,"d"),{week:Math.ceil(n.dayOfYear()/7),year:n.year()}}function lt(e,t,i,n,s){var r,a,o=nt(e,0,1).getUTCDay();return o=0===o?7:o,i=null!=i?i:s,r=s-o+(o>n?7:0)-(s>o?7:0),a=7*(t-1)+(i-s)+r+1,{year:a>0?e:e-1,dayOfYear:a>0?a:I(e-1)+a}}function ut(t){var i,n=t._i,s=t._f;return t._locale=t._locale||bt.localeData(t._l),null===n||s===e&&""===n?bt.invalid({nullInput:!0}):("string"==typeof n&&(t._i=n=t._locale.preparse(n)),bt.isMoment(n)?new c(n,!0):(s?_(s)?X(t):V(t):tt(t),i=new c(t),i._nextDay&&(i.add(1,"d"),i._nextDay=e),i))}function ct(e,t){var i,n;if(1===t.length&&_(t[0])&&(t=t[0]),!t.length)return bt();for(i=t[0],n=1;n<t.length;++n)t[n][e](i)&&(i=t[n]);return i}function ht(e,t){var i;return"string"==typeof t&&(t=e.localeData().monthsParse(t),"number"!=typeof t)?e:(i=Math.min(e.date(),T(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,i),e)}function dt(e,t){return e._d["get"+(e._isUTC?"UTC":"")+t]()}function ft(e,t,i){return"Month"===t?ht(e,i):e._d["set"+(e._isUTC?"UTC":"")+t](i)}function pt(e,t){return function(i){return null!=i?(ft(this,e,i),bt.updateOffset(this,t),this):dt(this,e)}}function gt(e){return 400*e/146097}function mt(e){return 146097*e/400}function vt(e){bt.duration.fn[e]=function(){return this._data[e]}}function yt(e){"undefined"==typeof ender&&(_t=kt.moment,kt.moment=e?r("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",bt):bt)}for(var bt,_t,wt,xt="2.8.4",kt="undefined"!=typeof global?global:this,Dt=Math.round,Ct=Object.prototype.hasOwnProperty,St=0,Tt=1,Pt=2,It=3,At=4,Nt=5,Mt=6,Et={},Ft=[],Ot="undefined"!=typeof module&&module&&module.exports,Ht=/^\/?Date\((\-?\d+)/i,Rt=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Lt=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,jt=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,Ut=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,zt=/\d\d?/,Wt=/\d{1,3}/,$t=/\d{1,4}/,Bt=/[+\-]?\d{1,6}/,qt=/\d+/,Yt=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Gt=/Z|[\+\-]\d\d:?\d\d/gi,Vt=/T/i,Jt=/[\+\-]?\d+/,Kt=/[\+\-]?\d+(\.\d{1,3})?/,Xt=/\d/,Qt=/\d\d/,Zt=/\d{3}/,ei=/\d{4}/,ti=/[+-]?\d{6}/,ii=/[+-]?\d+/,ni=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,si="YYYY-MM-DDTHH:mm:ssZ",ri=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],ai=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],oi=/([\+\-]|\d\d)/gi,li=("Date|Hours|Minutes|Seconds|Milliseconds".split("|"),{Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6}),ui={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},ci={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},hi={},di={s:45,m:45,h:22,d:26,M:11},fi="DDD w W M D d".split(" "),pi="M D H h m s w W".split(" "),gi={M:function(){return this.month()+1},MMM:function(e){return this.localeData().monthsShort(this,e)},MMMM:function(e){return this.localeData().months(this,e)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(e){return this.localeData().weekdaysMin(this,e)},ddd:function(e){return this.localeData().weekdaysShort(this,e)},dddd:function(e){return this.localeData().weekdays(this,e)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return g(this.year()%100,2)},YYYY:function(){return g(this.year(),4)},YYYYY:function(){return g(this.year(),5)},YYYYYY:function(){var e=this.year(),t=e>=0?"+":"-";return t+g(Math.abs(e),6)},gg:function(){return g(this.weekYear()%100,2)},gggg:function(){return g(this.weekYear(),4)},ggggg:function(){return g(this.weekYear(),5)},GG:function(){return g(this.isoWeekYear()%100,2)},GGGG:function(){return g(this.isoWeekYear(),4)},GGGGG:function(){return g(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return S(this.milliseconds()/100)},SS:function(){return g(S(this.milliseconds()/10),2)},SSS:function(){return g(this.milliseconds(),3)},SSSS:function(){return g(this.milliseconds(),3)},Z:function(){var e=-this.zone(),t="+";return 0>e&&(e=-e,t="-"),t+g(S(e/60),2)+":"+g(S(e)%60,2)},ZZ:function(){var e=-this.zone(),t="+";return 0>e&&(e=-e,t="-"),t+g(S(e/60),2)+g(S(e)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},mi={},vi=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];fi.length;)wt=fi.pop(),gi[wt+"o"]=l(gi[wt],wt);for(;pi.length;)wt=pi.pop(),gi[wt+wt]=o(gi[wt],2);gi.DDDD=o(gi.DDD,3),d(u.prototype,{set:function(e){var t,i;for(i in e)t=e[i],"function"==typeof t?this[i]=t:this["_"+i]=t;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(e){return this._months[e.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(e){return this._monthsShort[e.month()]},monthsParse:function(e,t,i){var n,s,r;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;12>n;n++){if(s=bt.utc([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(r="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[n]=new RegExp(r.replace(".",""),"i")),i&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(i&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!i&&this._monthsParse[n].test(e))return n}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(e){return this._weekdays[e.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(e){return this._weekdaysShort[e.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(e){return this._weekdaysMin[e.day()]},weekdaysParse:function(e){var t,i,n;for(this._weekdaysParse||(this._weekdaysParse=[]),t=0;7>t;t++)if(this._weekdaysParse[t]||(i=bt([2e3,1]).day(t),n="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[t]=new RegExp(n.replace(".",""),"i")),this._weekdaysParse[t].test(e))return t},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(e){var t=this._longDateFormat[e];return!t&&this._longDateFormat[e.toUpperCase()]&&(t=this._longDateFormat[e.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e]=t),t},isPM:function(e){return"p"===(e+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(e,t,i){return e>11?i?"pm":"PM":i?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(e,t,i){var n=this._calendar[e];return"function"==typeof n?n.apply(t,[i]):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(e,t,i,n){var s=this._relativeTime[i];return"function"==typeof s?s(e,t,i,n):s.replace(/%d/i,e)},pastFuture:function(e,t){var i=this._relativeTime[e>0?"future":"past"];return"function"==typeof i?i(t):i.replace(/%s/i,t)},ordinal:function(e){return this._ordinal.replace("%d",e)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(e){return e},postformat:function(e){return e},week:function(e){return ot(e,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),bt=function(t,i,s,r){var a;return"boolean"==typeof s&&(r=s,s=e),a={},a._isAMomentObject=!0,a._i=t,a._f=i,a._l=s,a._strict=r,a._isUTC=!1,a._pf=n(),ut(a)},bt.suppressDeprecationWarnings=!1,bt.createFromInputFallback=r("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),bt.min=function(){var e=[].slice.call(arguments,0);return ct("isBefore",e)},bt.max=function(){var e=[].slice.call(arguments,0);return ct("isAfter",e)},bt.utc=function(t,i,s,r){var a;return"boolean"==typeof s&&(r=s,s=e),a={},a._isAMomentObject=!0,a._useUTC=!0,a._isUTC=!0,a._l=s,a._i=t,a._f=i,a._strict=r,a._pf=n(),ut(a).utc()},bt.unix=function(e){return bt(1e3*e)},bt.duration=function(e,t){var n,s,r,a,o=e,l=null;return bt.isDuration(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:"number"==typeof e?(o={},t?o[t]=e:o.milliseconds=e):(l=Rt.exec(e))?(n="-"===l[1]?-1:1,o={y:0,d:S(l[Pt])*n,h:S(l[It])*n,m:S(l[At])*n,s:S(l[Nt])*n,ms:S(l[Mt])*n}):(l=Lt.exec(e))?(n="-"===l[1]?-1:1,r=function(e){var t=e&&parseFloat(e.replace(",","."));return(isNaN(t)?0:t)*n},o={y:r(l[2]),M:r(l[3]),d:r(l[4]),h:r(l[5]),m:r(l[6]),s:r(l[7]),w:r(l[8])}):"object"==typeof o&&("from"in o||"to"in o)&&(a=v(bt(o.from),bt(o.to)),o={},o.ms=a.milliseconds,o.M=a.months),s=new h(o),bt.isDuration(e)&&i(e,"_locale")&&(s._locale=e._locale),s},bt.version=xt,bt.defaultFormat=si,bt.ISO_8601=function(){},bt.momentProperties=Ft,bt.updateOffset=function(){},bt.relativeTimeThreshold=function(t,i){return di[t]===e?!1:i===e?di[t]:(di[t]=i,!0)},bt.lang=r("moment.lang is deprecated. Use moment.locale instead.",function(e,t){return bt.locale(e,t)}),bt.locale=function(e,t){var i;return e&&(i="undefined"!=typeof t?bt.defineLocale(e,t):bt.localeData(e),i&&(bt.duration._locale=bt._locale=i)),bt._locale._abbr},bt.defineLocale=function(e,t){return null!==t?(t.abbr=e,Et[e]||(Et[e]=new u),Et[e].set(t),bt.locale(e),Et[e]):(delete Et[e],null)},bt.langData=r("moment.langData is deprecated. Use moment.localeData instead.",function(e){return bt.localeData(e)}),bt.localeData=function(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return bt._locale;if(!_(e)){if(t=O(e))return t;e=[e]}return F(e)},bt.isMoment=function(e){return e instanceof c||null!=e&&i(e,"_isAMomentObject")},bt.isDuration=function(e){return e instanceof h};for(wt=vi.length-1;wt>=0;--wt)C(vi[wt]);bt.normalizeUnits=function(e){return k(e)},bt.invalid=function(e){var t=bt.utc(0/0);return null!=e?d(t._pf,e):t._pf.userInvalidated=!0,t},bt.parseZone=function(){return bt.apply(null,arguments).parseZone()},bt.parseTwoDigitYear=function(e){return S(e)+(S(e)>68?1900:2e3)},d(bt.fn=c.prototype,{clone:function(){return bt(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var e=bt(this).utc();return 0<e.year()&&e.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():j(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):j(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds()]},isValid:function(){return M(this)},isDSTShifted:function(){return this._a?this.isValid()&&x(this._a,(this._isUTC?bt.utc(this._a):bt(this._a)).toArray())>0:!1},parsingFlags:function(){return d({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(e){return this.zone(0,e)},local:function(e){return this._isUTC&&(this.zone(0,e),this._isUTC=!1,e&&this.add(this._dateTzOffset(),"m")),this},format:function(e){var t=j(this,e||bt.defaultFormat);return this.localeData().postformat(t)},add:y(1,"add"),subtract:y(-1,"subtract"),diff:function(e,t,i){var n,s,r,a=H(e,this),o=6e4*(this.zone()-a.zone());return t=k(t),"year"===t||"month"===t?(n=432e5*(this.daysInMonth()+a.daysInMonth()),s=12*(this.year()-a.year())+(this.month()-a.month()),r=this-bt(this).startOf("month")-(a-bt(a).startOf("month")),r-=6e4*(this.zone()-bt(this).startOf("month").zone()-(a.zone()-bt(a).startOf("month").zone())),s+=r/n,"year"===t&&(s/=12)):(n=this-a,s="second"===t?n/1e3:"minute"===t?n/6e4:"hour"===t?n/36e5:"day"===t?(n-o)/864e5:"week"===t?(n-o)/6048e5:n),i?s:p(s)},from:function(e,t){return bt.duration({to:this,from:e}).locale(this.locale()).humanize(!t)},fromNow:function(e){return this.from(bt(),e)},calendar:function(e){var t=e||bt(),i=H(t,this).startOf("day"),n=this.diff(i,"days",!0),s=-6>n?"sameElse":-1>n?"lastWeek":0>n?"lastDay":1>n?"sameDay":2>n?"nextDay":7>n?"nextWeek":"sameElse";return this.format(this.localeData().calendar(s,this,bt(t)))},isLeapYear:function(){return A(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(e){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=st(e,this.localeData()),this.add(e-t,"d")):t},month:pt("Month",!0),startOf:function(e){switch(e=k(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e?this.weekday(0):"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(t){return t=k(t),t===e||"millisecond"===t?this:this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")},isAfter:function(e,t){var i;return t=k("undefined"!=typeof t?t:"millisecond"),"millisecond"===t?(e=bt.isMoment(e)?e:bt(e),+this>+e):(i=bt.isMoment(e)?+e:+bt(e),i<+this.clone().startOf(t))},isBefore:function(e,t){var i;return t=k("undefined"!=typeof t?t:"millisecond"),"millisecond"===t?(e=bt.isMoment(e)?e:bt(e),+e>+this):(i=bt.isMoment(e)?+e:+bt(e),+this.clone().endOf(t)<i)},isSame:function(e,t){var i;return t=k(t||"millisecond"),"millisecond"===t?(e=bt.isMoment(e)?e:bt(e),+this===+e):(i=+bt(e),+this.clone().startOf(t)<=i&&i<=+this.clone().endOf(t))},min:r("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(e){return e=bt.apply(null,arguments),this>e?this:e}),max:r("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(e){return e=bt.apply(null,arguments),e>this?this:e}),zone:function(e,t){var i,n=this._offset||0;return null==e?this._isUTC?n:this._dateTzOffset():("string"==typeof e&&(e=W(e)),Math.abs(e)<16&&(e=60*e),!this._isUTC&&t&&(i=this._dateTzOffset()),this._offset=e,this._isUTC=!0,null!=i&&this.subtract(i,"m"),n!==e&&(!t||this._changeInProgress?b(this,bt.duration(n-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,bt.updateOffset(this,!0),this._changeInProgress=null)),this)
},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(e){return e=e?bt(e).zone():0,(this.zone()-e)%60===0},daysInMonth:function(){return T(this.year(),this.month())},dayOfYear:function(e){var t=Dt((bt(this).startOf("day")-bt(this).startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},quarter:function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},weekYear:function(e){var t=ot(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==e?t:this.add(e-t,"y")},isoWeekYear:function(e){var t=ot(this,1,4).year;return null==e?t:this.add(e-t,"y")},week:function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},isoWeek:function(e){var t=ot(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},weekday:function(e){var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},isoWeekday:function(e){return null==e?this.day()||7:this.day(this.day()%7?e:e-7)},isoWeeksInYear:function(){return P(this.year(),1,4)},weeksInYear:function(){var e=this.localeData()._week;return P(this.year(),e.dow,e.doy)},get:function(e){return e=k(e),this[e]()},set:function(e,t){return e=k(e),"function"==typeof this[e]&&this[e](t),this},locale:function(t){var i;return t===e?this._locale._abbr:(i=bt.localeData(t),null!=i&&(this._locale=i),this)},lang:r("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===e?this.localeData():this.locale(t)}),localeData:function(){return this._locale},_dateTzOffset:function(){return 15*Math.round(this._d.getTimezoneOffset()/15)}}),bt.fn.millisecond=bt.fn.milliseconds=pt("Milliseconds",!1),bt.fn.second=bt.fn.seconds=pt("Seconds",!1),bt.fn.minute=bt.fn.minutes=pt("Minutes",!1),bt.fn.hour=bt.fn.hours=pt("Hours",!0),bt.fn.date=pt("Date",!0),bt.fn.dates=r("dates accessor is deprecated. Use date instead.",pt("Date",!0)),bt.fn.year=pt("FullYear",!0),bt.fn.years=r("years accessor is deprecated. Use year instead.",pt("FullYear",!0)),bt.fn.days=bt.fn.day,bt.fn.months=bt.fn.month,bt.fn.weeks=bt.fn.week,bt.fn.isoWeeks=bt.fn.isoWeek,bt.fn.quarters=bt.fn.quarter,bt.fn.toJSON=bt.fn.toISOString,d(bt.duration.fn=h.prototype,{_bubble:function(){var e,t,i,n=this._milliseconds,s=this._days,r=this._months,a=this._data,o=0;a.milliseconds=n%1e3,e=p(n/1e3),a.seconds=e%60,t=p(e/60),a.minutes=t%60,i=p(t/60),a.hours=i%24,s+=p(i/24),o=p(gt(s)),s-=p(mt(o)),r+=p(s/30),s%=30,o+=p(r/12),r%=12,a.days=s,a.months=r,a.years=o},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return p(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*S(this._months/12)},humanize:function(e){var t=at(this,!e,this.localeData());return e&&(t=this.localeData().pastFuture(+this,t)),this.localeData().postformat(t)},add:function(e,t){var i=bt.duration(e,t);return this._milliseconds+=i._milliseconds,this._days+=i._days,this._months+=i._months,this._bubble(),this},subtract:function(e,t){var i=bt.duration(e,t);return this._milliseconds-=i._milliseconds,this._days-=i._days,this._months-=i._months,this._bubble(),this},get:function(e){return e=k(e),this[e.toLowerCase()+"s"]()},as:function(e){var t,i;if(e=k(e),"month"===e||"year"===e)return t=this._days+this._milliseconds/864e5,i=this._months+12*gt(t),"month"===e?i:i/12;switch(t=this._days+Math.round(mt(this._months/12)),e){case"week":return t/7+this._milliseconds/6048e5;case"day":return t+this._milliseconds/864e5;case"hour":return 24*t+this._milliseconds/36e5;case"minute":return 24*t*60+this._milliseconds/6e4;case"second":return 24*t*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*t*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+e)}},lang:bt.fn.lang,locale:bt.fn.locale,toIsoString:r("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var e=Math.abs(this.years()),t=Math.abs(this.months()),i=Math.abs(this.days()),n=Math.abs(this.hours()),s=Math.abs(this.minutes()),r=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(e?e+"Y":"")+(t?t+"M":"")+(i?i+"D":"")+(n||s||r?"T":"")+(n?n+"H":"")+(s?s+"M":"")+(r?r+"S":""):"P0D"},localeData:function(){return this._locale}}),bt.duration.fn.toString=bt.duration.fn.toISOString;for(wt in li)i(li,wt)&&vt(wt.toLowerCase());bt.duration.fn.asMilliseconds=function(){return this.as("ms")},bt.duration.fn.asSeconds=function(){return this.as("s")},bt.duration.fn.asMinutes=function(){return this.as("m")},bt.duration.fn.asHours=function(){return this.as("h")},bt.duration.fn.asDays=function(){return this.as("d")},bt.duration.fn.asWeeks=function(){return this.as("weeks")},bt.duration.fn.asMonths=function(){return this.as("M")},bt.duration.fn.asYears=function(){return this.as("y")},bt.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,i=1===S(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i}}),Ot?module.exports=bt:"function"==typeof define&&define.amd?(define("moment",function(e,t,i){return i.config&&i.config()&&i.config().noGlobal===!0&&(kt.moment=_t),bt}),yt(!0)):yt()}.call(this),function(e,t){"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Spinner=t()}(this,function(){"use strict";function e(e,t){var i,n=document.createElement(e||"div");for(i in t)n[i]=t[i];return n}function t(e){for(var t=1,i=arguments.length;i>t;t++)e.appendChild(arguments[t]);return e}function i(e,t,i,n){var s=["opacity",t,~~(100*e),i,n].join("-"),r=.01+i/n*100,a=Math.max(1-(1-e)/t*(100-r),e),o=u.substring(0,u.indexOf("Animation")).toLowerCase(),l=o&&"-"+o+"-"||"";return h[s]||(d.insertRule("@"+l+"keyframes "+s+"{0%{opacity:"+a+"}"+r+"%{opacity:"+e+"}"+(r+.01)+"%{opacity:1}"+(r+t)%100+"%{opacity:"+e+"}100%{opacity:"+a+"}}",d.cssRules.length),h[s]=1),s}function n(e,t){var i,n,s=e.style;for(t=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<c.length;n++)if(i=c[n]+t,void 0!==s[i])return i;return void 0!==s[t]?t:void 0}function s(e,t){for(var i in t)e.style[n(e,i)||i]=t[i];return e}function r(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)void 0===e[n]&&(e[n]=i[n])}return e}function a(e,t){return"string"==typeof e?e:e[t%e.length]}function o(e){this.opts=r(e||{},o.defaults,f)}function l(){function i(t,i){return e("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',i)}d.addRule(".spin-vml","behavior:url(#default#VML)"),o.prototype.lines=function(e,n){function r(){return s(i("group",{coordsize:c+" "+c,coordorigin:-u+" "+-u}),{width:c,height:c})}function o(e,o,l){t(d,t(s(r(),{rotation:360/n.lines*e+"deg",left:~~o}),t(s(i("roundrect",{arcsize:n.corners}),{width:u,height:n.width,left:n.radius,top:-n.width>>1,filter:l}),i("fill",{color:a(n.color,e),opacity:n.opacity}),i("stroke",{opacity:0}))))}var l,u=n.length+n.width,c=2*u,h=2*-(n.width+n.length)+"px",d=s(r(),{position:"absolute",top:h,left:h});if(n.shadow)for(l=1;l<=n.lines;l++)o(l,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(l=1;l<=n.lines;l++)o(l);return t(e,d)},o.prototype.opacity=function(e,t,i,n){var s=e.firstChild;n=n.shadow&&n.lines||0,s&&t+n<s.childNodes.length&&(s=s.childNodes[t+n],s=s&&s.firstChild,s=s&&s.firstChild,s&&(s.opacity=i))}}var u,c=["webkit","Moz","ms","O"],h={},d=function(){var i=e("style",{type:"text/css"});return t(document.getElementsByTagName("head")[0],i),i.sheet||i.styleSheet}(),f={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};o.defaults={},r(o.prototype,{spin:function(t){this.stop();{var i=this,n=i.opts,r=i.el=s(e(0,{className:n.className}),{position:n.position,width:0,zIndex:n.zIndex});n.radius+n.length+n.width}if(s(r,{left:n.left,top:n.top}),t&&t.insertBefore(r,t.firstChild||null),r.setAttribute("role","progressbar"),i.lines(r,i.opts),!u){var a,o=0,l=(n.lines-1)*(1-n.direction)/2,c=n.fps,h=c/n.speed,d=(1-n.opacity)/(h*n.trail/100),f=h/n.lines;!function p(){o++;for(var e=0;e<n.lines;e++)a=Math.max(1-(o+(n.lines-e)*f)%h*d,n.opacity),i.opacity(r,e*n.direction+l,a,n);i.timeout=i.el&&setTimeout(p,~~(1e3/c))}()}return i},stop:function(){var e=this.el;return e&&(clearTimeout(this.timeout),e.parentNode&&e.parentNode.removeChild(e),this.el=void 0),this},lines:function(n,r){function o(t,i){return s(e(),{position:"absolute",width:r.length+r.width+"px",height:r.width+"px",background:t,boxShadow:i,transformOrigin:"left",transform:"rotate("+~~(360/r.lines*c+r.rotate)+"deg) translate("+r.radius+"px,0)",borderRadius:(r.corners*r.width>>1)+"px"})}for(var l,c=0,h=(r.lines-1)*(1-r.direction)/2;c<r.lines;c++)l=s(e(),{position:"absolute",top:1+~(r.width/2)+"px",transform:r.hwaccel?"translate3d(0,0,0)":"",opacity:r.opacity,animation:u&&i(r.opacity,r.trail,h+c*r.direction,r.lines)+" "+1/r.speed+"s linear infinite"}),r.shadow&&t(l,s(o("#000","0 0 4px #000"),{top:"2px"})),t(n,t(l,o(a(r.color,c),"0 0 1px rgba(0,0,0,.1)")));return n},opacity:function(e,t,i){t<e.childNodes.length&&(e.childNodes[t].style.opacity=i)}});var p=s(e("group"),{behavior:"url(#default#VML)"});return!n(p,"transform")&&p.adj?l():u=n(p,"animation"),o}),function(){"use strict";function e(e){function t(t,n){var r,g,m=t==window,v=n&&void 0!==n.message?n.message:void 0;if(n=e.extend({},e.blockUI.defaults,n||{}),!n.ignoreIfBlocked||!e(t).data("blockUI.isBlocked")){if(n.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,n.overlayCSS||{}),r=e.extend({},e.blockUI.defaults.css,n.css||{}),n.onOverlayClick&&(n.overlayCSS.cursor="pointer"),g=e.extend({},e.blockUI.defaults.themedCSS,n.themedCSS||{}),v=void 0===v?n.message:v,m&&f&&i(window,{fadeOut:0}),v&&"string"!=typeof v&&(v.parentNode||v.jquery)){var y=v.jquery?v[0]:v,b={};e(t).data("blockUI.history",b),b.el=y,b.parent=y.parentNode,b.display=y.style.display,b.position=y.style.position,b.parent&&b.parent.removeChild(y)}e(t).data("blockUI.onUnblock",n.onUnblock);var _,w,x,k,D=n.baseZ;_=e(c||n.forceIframe?'<iframe class="blockUI" style="z-index:'+D++ +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+n.iframeSrc+'"></iframe>':'<div class="blockUI" style="display:none"></div>'),w=e(n.theme?'<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+D++ +';display:none"></div>':'<div class="blockUI blockOverlay" style="z-index:'+D++ +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),n.theme&&m?(k='<div class="blockUI '+n.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(D+10)+';display:none;position:fixed">',n.title&&(k+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(n.title||"&nbsp;")+"</div>"),k+='<div class="ui-widget-content ui-dialog-content"></div>',k+="</div>"):n.theme?(k='<div class="blockUI '+n.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(D+10)+';display:none;position:absolute">',n.title&&(k+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(n.title||"&nbsp;")+"</div>"),k+='<div class="ui-widget-content ui-dialog-content"></div>',k+="</div>"):k=m?'<div class="blockUI '+n.blockMsgClass+' blockPage" style="z-index:'+(D+10)+';display:none;position:fixed"></div>':'<div class="blockUI '+n.blockMsgClass+' blockElement" style="z-index:'+(D+10)+';display:none;position:absolute"></div>',x=e(k),v&&(n.theme?(x.css(g),x.addClass("ui-widget-content")):x.css(r)),n.theme||w.css(n.overlayCSS),w.css("position",m?"fixed":"absolute"),(c||n.forceIframe)&&_.css("opacity",0);var C=[_,w,x],S=e(m?"body":t);e.each(C,function(){this.appendTo(S)}),n.theme&&n.draggable&&e.fn.draggable&&x.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var T=d&&(!e.support.boxModel||e("object,embed",m?null:t).length>0);if(h||T){if(m&&n.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%"),(h||!e.support.boxModel)&&!m)var P=l(t,"borderTopWidth"),I=l(t,"borderLeftWidth"),A=P?"(0 - "+P+")":0,N=I?"(0 - "+I+")":0;e.each(C,function(e,t){var i=t[0].style;if(i.position="absolute",2>e)m?i.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+n.quirksmodeOffsetHack+') + "px"'):i.setExpression("height",'this.parentNode.offsetHeight + "px"'),m?i.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):i.setExpression("width",'this.parentNode.offsetWidth + "px"'),N&&i.setExpression("left",N),A&&i.setExpression("top",A);else if(n.centerY)m&&i.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),i.marginTop=0;else if(!n.centerY&&m){var s=n.css&&n.css.top?parseInt(n.css.top,10):0,r="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+s+') + "px"';i.setExpression("top",r)}})}if(v&&(n.theme?x.find(".ui-widget-content").append(v):x.append(v),(v.jquery||v.nodeType)&&e(v).show()),(c||n.forceIframe)&&n.showOverlay&&_.show(),n.fadeIn){var M=n.onBlock?n.onBlock:u,E=n.showOverlay&&!v?M:u,F=v?M:u;n.showOverlay&&w._fadeIn(n.fadeIn,E),v&&x._fadeIn(n.fadeIn,F)}else n.showOverlay&&w.show(),v&&x.show(),n.onBlock&&n.onBlock.bind(x)();if(s(1,t,n),m?(f=x[0],p=e(n.focusableElements,f),n.focusInput&&setTimeout(a,20)):o(x[0],n.centerX,n.centerY),n.timeout){var O=setTimeout(function(){m?e.unblockUI(n):e(t).unblock(n)},n.timeout);e(t).data("blockUI.timeout",O)}}}function i(t,i){var r,a=t==window,o=e(t),l=o.data("blockUI.history"),u=o.data("blockUI.timeout");u&&(clearTimeout(u),o.removeData("blockUI.timeout")),i=e.extend({},e.blockUI.defaults,i||{}),s(0,t,i),null===i.onUnblock&&(i.onUnblock=o.data("blockUI.onUnblock"),o.removeData("blockUI.onUnblock"));var c;c=a?e("body").children().filter(".blockUI").add("body > .blockUI"):o.find(">.blockUI"),i.cursorReset&&(c.length>1&&(c[1].style.cursor=i.cursorReset),c.length>2&&(c[2].style.cursor=i.cursorReset)),a&&(f=p=null),i.fadeOut?(r=c.length,c.stop().fadeOut(i.fadeOut,function(){0===--r&&n(c,l,i,t)})):n(c,l,i,t)}function n(t,i,n,s){var r=e(s);if(!r.data("blockUI.isBlocked")){t.each(function(){this.parentNode&&this.parentNode.removeChild(this)}),i&&i.el&&(i.el.style.display=i.display,i.el.style.position=i.position,i.el.style.cursor="default",i.parent&&i.parent.appendChild(i.el),r.removeData("blockUI.history")),r.data("blockUI.static")&&r.css("position","static"),"function"==typeof n.onUnblock&&n.onUnblock(s,n);var a=e(document.body),o=a.width(),l=a[0].style.width;a.width(o-1).width(o),a[0].style.width=l}}function s(t,i,n){var s=i==window,a=e(i);if((t||(!s||f)&&(s||a.data("blockUI.isBlocked")))&&(a.data("blockUI.isBlocked",t),s&&n.bindEvents&&(!t||n.showOverlay))){var o="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";t?e(document).bind(o,n,r):e(document).unbind(o,r)}}function r(t){if("keydown"===t.type&&t.keyCode&&9==t.keyCode&&f&&t.data.constrainTabKey){var i=p,n=!t.shiftKey&&t.target===i[i.length-1],s=t.shiftKey&&t.target===i[0];if(n||s)return setTimeout(function(){a(s)},10),!1}var r=t.data,o=e(t.target);return o.hasClass("blockOverlay")&&r.onOverlayClick&&r.onOverlayClick(t),o.parents("div."+r.blockMsgClass).length>0?!0:0===o.parents().children().filter("div.blockUI").length}function a(e){if(p){var t=p[e===!0?p.length-1:0];t&&t.focus()}}function o(e,t,i){var n=e.parentNode,s=e.style,r=(n.offsetWidth-e.offsetWidth)/2-l(n,"borderLeftWidth"),a=(n.offsetHeight-e.offsetHeight)/2-l(n,"borderTopWidth");t&&(s.left=r>0?r+"px":"0"),i&&(s.top=a>0?a+"px":"0")}function l(t,i){return parseInt(e.css(t,i),10)||0}e.fn._fadeIn=e.fn.fadeIn;var u=e.noop||function(){},c=/MSIE/.test(navigator.userAgent),h=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),d=(document.documentMode||0,e.isFunction(document.createElement("div").style.setExpression));e.blockUI=function(e){t(window,e)},e.unblockUI=function(e){i(window,e)},e.growlUI=function(t,i,n,s){var r=e('<div class="growlUI"></div>');t&&r.append("<h1>"+t+"</h1>"),i&&r.append("<h2>"+i+"</h2>"),void 0===n&&(n=3e3);var a=function(t){t=t||{},e.blockUI({message:r,fadeIn:"undefined"!=typeof t.fadeIn?t.fadeIn:700,fadeOut:"undefined"!=typeof t.fadeOut?t.fadeOut:1e3,timeout:"undefined"!=typeof t.timeout?t.timeout:n,centerY:!1,showOverlay:!1,onUnblock:s,css:e.blockUI.defaults.growlCSS})};a();r.css("opacity");r.mouseover(function(){a({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop(),t.fadeTo(300,1)}).mouseout(function(){e(".blockMsg").fadeOut(1e3)})},e.fn.block=function(i){if(this[0]===window)return e.blockUI(i),this;var n=e.extend({},e.blockUI.defaults,i||{});return this.each(function(){var t=e(this);n.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})}),this.each(function(){"static"==e.css(this,"position")&&(this.style.position="relative",e(this).data("blockUI.static",!0)),this.style.zoom=1,t(this,i)})},e.fn.unblock=function(t){return this[0]===window?(e.unblockUI(t),this):this.each(function(){i(this,t)})},e.blockUI.version=2.7,e.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var f=null,p=[]}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}(),function(e,t,i){!function(e){"use strict";"function"==typeof define&&define.amd?define("datatables",["jquery"],e):"object"==typeof exports?e(require("jquery")):jQuery&&!jQuery.fn.dataTable&&e(jQuery)}(function(n){"use strict";function s(e){var t,i,r="a aa ai ao as b fn i m o s ",a={};n.each(e,function(n){t=n.match(/^([^A-Z]+?)([A-Z])/),t&&-1!==r.indexOf(t[1]+" ")&&(i=n.replace(t[0],t[2].toLowerCase()),a[i]=n,"o"===t[1]&&s(e[n]))}),e._hungarianMap=a}function r(e,t,a){e._hungarianMap||s(e);var o;n.each(t,function(s){o=e._hungarianMap[s],o===i||!a&&t[o]!==i||("o"===o.charAt(0)?(t[o]||(t[o]={}),n.extend(!0,t[o],t[s]),r(e[o],t[o],a)):t[o]=t[s])})}function a(e){var t=Vt.defaults.oLanguage,i=e.sZeroRecords;!e.sEmptyTable&&i&&"No data available in table"===t.sEmptyTable&&Rt(e,e,"sZeroRecords","sEmptyTable"),!e.sLoadingRecords&&i&&"Loading..."===t.sLoadingRecords&&Rt(e,e,"sZeroRecords","sLoadingRecords"),e.sInfoThousands&&(e.sThousands=e.sInfoThousands);var n=e.sDecimal;n&&Yt(n)}function o(e){yi(e,"ordering","bSort"),yi(e,"orderMulti","bSortMulti"),yi(e,"orderClasses","bSortClasses"),yi(e,"orderCellsTop","bSortCellsTop"),yi(e,"order","aaSorting"),yi(e,"orderFixed","aaSortingFixed"),yi(e,"paging","bPaginate"),yi(e,"pagingType","sPaginationType"),yi(e,"pageLength","iDisplayLength"),yi(e,"searching","bFilter");var t=e.aoSearchCols;if(t)for(var i=0,n=t.length;n>i;i++)t[i]&&r(Vt.models.oSearch,t[i])}function l(e){yi(e,"orderable","bSortable"),yi(e,"orderData","aDataSort"),yi(e,"orderSequence","asSorting"),yi(e,"orderDataType","sortDataType")}function u(e){var t=e.oBrowser,i=n("<div/>").css({position:"absolute",top:0,left:0,height:1,width:1,overflow:"hidden"}).append(n("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(n('<div class="test"/>').css({width:"100%",height:10}))).appendTo("body"),s=i.find(".test");t.bScrollOversize=100===s[0].offsetWidth,t.bScrollbarLeft=1!==s.offset().left,i.remove()}function c(e,t,n,s,r,a){var o,l=s,u=!1;for(n!==i&&(o=n,u=!0);l!==r;)e.hasOwnProperty(l)&&(o=u?t(o,e[l],l,e):e[l],u=!0,l+=a);return o}function h(e,i){var s=Vt.defaults.column,r=e.aoColumns.length,a=n.extend({},Vt.models.oColumn,s,{nTh:i?i:t.createElement("th"),sTitle:s.sTitle?s.sTitle:i?i.innerHTML:"",aDataSort:s.aDataSort?s.aDataSort:[r],mData:s.mData?s.mData:r,idx:r});e.aoColumns.push(a);var o=e.aoPreSearchCols;o[r]=n.extend({},Vt.models.oSearch,o[r]),d(e,r,null)}function d(e,t,s){var a=e.aoColumns[t],o=e.oClasses,u=n(a.nTh);if(!a.sWidthOrig){a.sWidthOrig=u.attr("width")||null;var c=(u.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);c&&(a.sWidthOrig=c[1])}s!==i&&null!==s&&(l(s),r(Vt.defaults.column,s),s.mDataProp===i||s.mData||(s.mData=s.mDataProp),s.sType&&(a._sManualType=s.sType),s.className&&!s.sClass&&(s.sClass=s.className),n.extend(a,s),Rt(a,s,"sWidth","sWidthOrig"),"number"==typeof s.iDataSort&&(a.aDataSort=[s.iDataSort]),Rt(a,s,"aDataSort"));var h=a.mData,d=T(h),f=a.mRender?T(a.mRender):null,p=function(e){return"string"==typeof e&&-1!==e.indexOf("@")};a._bAttrSrc=n.isPlainObject(h)&&(p(h.sort)||p(h.type)||p(h.filter)),a.fnGetData=function(e,t,n){var s=d(e,t,i,n);return f&&t?f(s,t,e,n):s},a.fnSetData=function(e,t,i){return P(h)(e,t,i)},"number"!=typeof h&&(e._rowReadObject=!0),e.oFeatures.bSort||(a.bSortable=!1,u.addClass(o.sSortableNone));var g=-1!==n.inArray("asc",a.asSorting),m=-1!==n.inArray("desc",a.asSorting);a.bSortable&&(g||m)?g&&!m?(a.sSortingClass=o.sSortableAsc,a.sSortingClassJUI=o.sSortJUIAscAllowed):!g&&m?(a.sSortingClass=o.sSortableDesc,a.sSortingClassJUI=o.sSortJUIDescAllowed):(a.sSortingClass=o.sSortable,a.sSortingClassJUI=o.sSortJUI):(a.sSortingClass=o.sSortableNone,a.sSortingClassJUI="")}function f(e){if(e.oFeatures.bAutoWidth!==!1){var t=e.aoColumns;yt(e);for(var i=0,n=t.length;n>i;i++)t[i].nTh.style.width=t[i].sWidth}var s=e.oScroll;(""!==s.sY||""!==s.sX)&&mt(e),zt(e,null,"column-sizing",[e])}function p(e,t){var i=v(e,"bVisible");return"number"==typeof i[t]?i[t]:null}function g(e,t){var i=v(e,"bVisible"),s=n.inArray(t,i);return-1!==s?s:null}function m(e){return v(e,"bVisible").length}function v(e,t){var i=[];return n.map(e.aoColumns,function(e,n){e[t]&&i.push(n)}),i}function y(e){var t,n,s,r,a,o,l,u,c,h=e.aoColumns,d=e.aoData,f=Vt.ext.type.detect;for(t=0,n=h.length;n>t;t++)if(l=h[t],c=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){for(s=0,r=f.length;r>s;s++){for(a=0,o=d.length;o>a&&(c[a]===i&&(c[a]=D(e,a,t,"type")),u=f[s](c[a],e),u||s===f.length-1)&&"html"!==u;a++);if(u){l.sType=u;break}}l.sType||(l.sType="string")}}function b(e,t,s,r){var a,o,l,u,c,d,f,p=e.aoColumns;if(t)for(a=t.length-1;a>=0;a--){f=t[a];var g=f.targets!==i?f.targets:f.aTargets;for(n.isArray(g)||(g=[g]),l=0,u=g.length;u>l;l++)if("number"==typeof g[l]&&g[l]>=0){for(;p.length<=g[l];)h(e);r(g[l],f)}else if("number"==typeof g[l]&&g[l]<0)r(p.length+g[l],f);else if("string"==typeof g[l])for(c=0,d=p.length;d>c;c++)("_all"==g[l]||n(p[c].nTh).hasClass(g[l]))&&r(c,f)}if(s)for(a=0,o=s.length;o>a;a++)r(a,s[a])}function _(e,t,i,s){var r=e.aoData.length,a=n.extend(!0,{},Vt.models.oRow,{src:i?"dom":"data"});a._aData=t,e.aoData.push(a);for(var o=e.aoColumns,l=0,u=o.length;u>l;l++)i&&C(e,r,l,D(e,r,l)),o[l].sType=null;return e.aiDisplayMaster.push(r),(i||!e.oFeatures.bDeferRender)&&F(e,r,i,s),r}function w(e,t){var i;return t instanceof n||(t=n(t)),t.map(function(t,n){return i=E(e,n),_(e,i.data,n,i.cells)})}function x(e,t){return t._DT_RowIndex!==i?t._DT_RowIndex:null}function k(e,t,i){return n.inArray(i,e.aoData[t].anCells)}function D(e,t,n,s){var r=e.iDraw,a=e.aoColumns[n],o=e.aoData[t]._aData,l=a.sDefaultContent,u=a.fnGetData(o,s,{settings:e,row:t,col:n});if(u===i)return e.iDrawError!=r&&null===l&&(Ht(e,0,"Requested unknown parameter "+("function"==typeof a.mData?"{function}":"'"+a.mData+"'")+" for row "+t,4),e.iDrawError=r),l;if(u!==o&&null!==u||null===l){if("function"==typeof u)return u.call(o)}else u=l;return null===u&&"display"==s?"":u}function C(e,t,i,n){var s=e.aoColumns[i],r=e.aoData[t]._aData;s.fnSetData(r,n,{settings:e,row:t,col:i})}function S(e){return n.map(e.match(/(\\.|[^\.])+/g),function(e){return e.replace(/\\./g,".")})}function T(e){if(n.isPlainObject(e)){var t={};return n.each(e,function(e,i){i&&(t[e]=T(i))}),function(e,n,s,r){var a=t[n]||t._;return a!==i?a(e,n,s,r):e}}if(null===e)return function(e){return e};if("function"==typeof e)return function(t,i,n,s){return e(t,i,n,s)};if("string"!=typeof e||-1===e.indexOf(".")&&-1===e.indexOf("[")&&-1===e.indexOf("("))return function(t){return t[e]};var s=function(e,t,n){var r,a,o,l;if(""!==n)for(var u=S(n),c=0,h=u.length;h>c;c++){if(r=u[c].match(bi),a=u[c].match(_i),r){u[c]=u[c].replace(bi,""),""!==u[c]&&(e=e[u[c]]),o=[],u.splice(0,c+1),l=u.join(".");for(var d=0,f=e.length;f>d;d++)o.push(s(e[d],t,l));var p=r[0].substring(1,r[0].length-1);e=""===p?o:o.join(p);break}if(a)u[c]=u[c].replace(_i,""),e=e[u[c]]();else{if(null===e||e[u[c]]===i)return i;e=e[u[c]]}}return e};return function(t,i){return s(t,i,e)}}function P(e){if(n.isPlainObject(e))return P(e._);if(null===e)return function(){};if("function"==typeof e)return function(t,i,n){e(t,"set",i,n)};if("string"!=typeof e||-1===e.indexOf(".")&&-1===e.indexOf("[")&&-1===e.indexOf("("))return function(t,i){t[e]=i};var t=function(e,n,s){for(var r,a,o,l,u,c=S(s),h=c[c.length-1],d=0,f=c.length-1;f>d;d++){if(a=c[d].match(bi),o=c[d].match(_i),a){c[d]=c[d].replace(bi,""),e[c[d]]=[],r=c.slice(),r.splice(0,d+1),u=r.join(".");for(var p=0,g=n.length;g>p;p++)l={},t(l,n[p],u),e[c[d]].push(l);return}o&&(c[d]=c[d].replace(_i,""),e=e[c[d]](n)),(null===e[c[d]]||e[c[d]]===i)&&(e[c[d]]={}),e=e[c[d]]}h.match(_i)?e=e[h.replace(_i,"")](n):e[h.replace(bi,"")]=n};return function(i,n){return t(i,n,e)}}function I(e){return di(e.aoData,"_aData")}function A(e){e.aoData.length=0,e.aiDisplayMaster.length=0,e.aiDisplay.length=0}function N(e,t,n){for(var s=-1,r=0,a=e.length;a>r;r++)e[r]==t?s=r:e[r]>t&&e[r]--;-1!=s&&n===i&&e.splice(s,1)}function M(e,t,n,s){var r,a,o=e.aoData[t],l=function(i,n){for(;i.childNodes.length;)i.removeChild(i.firstChild);i.innerHTML=D(e,t,n,"display")};if("dom"!==n&&(n&&"auto"!==n||"dom"!==o.src)){var u=o.anCells;if(u)if(s!==i)l(u[s],s);else for(r=0,a=u.length;a>r;r++)l(u[r],r)}else o._aData=E(e,o,s,s===i?i:o._aData).data;o._aSortData=null,o._aFilterData=null;var c=e.aoColumns;if(s!==i)c[s].sType=null;else{for(r=0,a=c.length;a>r;r++)c[r].sType=null;O(o)}}function E(e,t,s,r){var a,o,l,u=[],c=t.firstChild,h=0,d=e.aoColumns,f=e._rowReadObject;r=r||f?{}:[];var p=function(e,t){if("string"==typeof e){var i=e.indexOf("@");if(-1!==i){var n=e.substring(i+1),s=P(e);s(r,t.getAttribute(n))}}},g=function(e){if(s===i||s===h)if(o=d[h],l=n.trim(e.innerHTML),o&&o._bAttrSrc){var t=P(o.mData._);t(r,l),p(o.mData.sort,e),p(o.mData.type,e),p(o.mData.filter,e)}else f?(o._setter||(o._setter=P(o.mData)),o._setter(r,l)):r[h]=l;h++};if(c)for(;c;)a=c.nodeName.toUpperCase(),("TD"==a||"TH"==a)&&(g(c),u.push(c)),c=c.nextSibling;else{u=t.anCells;for(var m=0,v=u.length;v>m;m++)g(u[m])}return{data:r,cells:u}}function F(e,i,n,s){var r,a,o,l,u,c=e.aoData[i],h=c._aData,d=[];if(null===c.nTr){for(r=n||t.createElement("tr"),c.nTr=r,c.anCells=d,r._DT_RowIndex=i,O(c),l=0,u=e.aoColumns.length;u>l;l++)o=e.aoColumns[l],a=n?s[l]:t.createElement(o.sCellType),d.push(a),(!n||o.mRender||o.mData!==l)&&(a.innerHTML=D(e,i,l,"display")),o.sClass&&(a.className+=" "+o.sClass),o.bVisible&&!n?r.appendChild(a):!o.bVisible&&n&&a.parentNode.removeChild(a),o.fnCreatedCell&&o.fnCreatedCell.call(e.oInstance,a,D(e,i,l),h,i,l);zt(e,"aoRowCreatedCallback",null,[r,h,i])}c.nTr.setAttribute("role","row")}function O(e){var t=e.nTr,i=e._aData;if(t){if(i.DT_RowId&&(t.id=i.DT_RowId),i.DT_RowClass){var s=i.DT_RowClass.split(" ");e.__rowc=e.__rowc?vi(e.__rowc.concat(s)):s,n(t).removeClass(e.__rowc.join(" ")).addClass(i.DT_RowClass)}i.DT_RowData&&n(t).data(i.DT_RowData)}}function H(e){var t,i,s,r,a,o=e.nTHead,l=e.nTFoot,u=0===n("th, td",o).length,c=e.oClasses,h=e.aoColumns;for(u&&(r=n("<tr/>").appendTo(o)),t=0,i=h.length;i>t;t++)a=h[t],s=n(a.nTh).addClass(a.sClass),u&&s.appendTo(r),e.oFeatures.bSort&&(s.addClass(a.sSortingClass),a.bSortable!==!1&&(s.attr("tabindex",e.iTabIndex).attr("aria-controls",e.sTableId),At(e,a.nTh,t))),a.sTitle!=s.html()&&s.html(a.sTitle),$t(e,"header")(e,s,a,c);if(u&&z(e.aoHeader,o),n(o).find(">tr").attr("role","row"),n(o).find(">tr>th, >tr>td").addClass(c.sHeaderTH),n(l).find(">tr>th, >tr>td").addClass(c.sFooterTH),null!==l){var d=e.aoFooter[0];for(t=0,i=d.length;i>t;t++)a=h[t],a.nTf=d[t].cell,a.sClass&&n(a.nTf).addClass(a.sClass)}}function R(e,t,s){var r,a,o,l,u,c,h,d,f,p=[],g=[],m=e.aoColumns.length;if(t){for(s===i&&(s=!1),r=0,a=t.length;a>r;r++){for(p[r]=t[r].slice(),p[r].nTr=t[r].nTr,o=m-1;o>=0;o--)e.aoColumns[o].bVisible||s||p[r].splice(o,1);g.push([])}for(r=0,a=p.length;a>r;r++){if(h=p[r].nTr)for(;c=h.firstChild;)h.removeChild(c);for(o=0,l=p[r].length;l>o;o++)if(d=1,f=1,g[r][o]===i){for(h.appendChild(p[r][o].cell),g[r][o]=1;p[r+d]!==i&&p[r][o].cell==p[r+d][o].cell;)g[r+d][o]=1,d++;for(;p[r][o+f]!==i&&p[r][o].cell==p[r][o+f].cell;){for(u=0;d>u;u++)g[r+u][o+f]=1;f++}n(p[r][o].cell).attr("rowspan",d).attr("colspan",f)}}}}function L(e){var t=zt(e,"aoPreDrawCallback","preDraw",[e]);if(-1!==n.inArray(!1,t))return void pt(e,!1);var s=[],r=0,a=e.asStripeClasses,o=a.length,l=(e.aoOpenRows.length,e.oLanguage),u=e.iInitDisplayStart,c="ssp"==Bt(e),h=e.aiDisplay;e.bDrawing=!0,u!==i&&-1!==u&&(e._iDisplayStart=c?u:u>=e.fnRecordsDisplay()?0:u,e.iInitDisplayStart=-1);var d=e._iDisplayStart,f=e.fnDisplayEnd();if(e.bDeferLoading)e.bDeferLoading=!1,e.iDraw++,pt(e,!1);else if(c){if(!e.bDestroying&&!B(e))return}else e.iDraw++;if(0!==h.length)for(var p=c?0:d,g=c?e.aoData.length:f,v=p;g>v;v++){var y=h[v],b=e.aoData[y];null===b.nTr&&F(e,y);var _=b.nTr;if(0!==o){var w=a[r%o];b._sRowStripe!=w&&(n(_).removeClass(b._sRowStripe).addClass(w),b._sRowStripe=w)}zt(e,"aoRowCallback",null,[_,b._aData,r,v]),s.push(_),r++}else{var x=l.sZeroRecords;1==e.iDraw&&"ajax"==Bt(e)?x=l.sLoadingRecords:l.sEmptyTable&&0===e.fnRecordsTotal()&&(x=l.sEmptyTable),s[0]=n("<tr/>",{"class":o?a[0]:""}).append(n("<td />",{valign:"top",colSpan:m(e),"class":e.oClasses.sRowEmpty}).html(x))[0]}zt(e,"aoHeaderCallback","header",[n(e.nTHead).children("tr")[0],I(e),d,f,h]),zt(e,"aoFooterCallback","footer",[n(e.nTFoot).children("tr")[0],I(e),d,f,h]);var k=n(e.nTBody);k.children().detach(),k.append(n(s)),zt(e,"aoDrawCallback","draw",[e]),e.bSorted=!1,e.bFiltered=!1,e.bDrawing=!1}function j(e,t){var i=e.oFeatures,n=i.bSort,s=i.bFilter;n&&Tt(e),s?J(e,e.oPreviousSearch):e.aiDisplay=e.aiDisplayMaster.slice(),t!==!0&&(e._iDisplayStart=0),e._drawHold=t,L(e),e._drawHold=!1}function U(e){var t=e.oClasses,i=n(e.nTable),s=n("<div/>").insertBefore(i),r=e.oFeatures,a=n("<div/>",{id:e.sTableId+"_wrapper","class":t.sWrapper+(e.nTFoot?"":" "+t.sNoFooter)});
e.nHolding=s[0],e.nTableWrapper=a[0],e.nTableReinsertBefore=e.nTable.nextSibling;for(var o,l,u,c,h,d,f=e.sDom.split(""),p=0;p<f.length;p++){if(o=null,l=f[p],"<"==l){if(u=n("<div/>")[0],c=f[p+1],"'"==c||'"'==c){for(h="",d=2;f[p+d]!=c;)h+=f[p+d],d++;if("H"==h?h=t.sJUIHeader:"F"==h&&(h=t.sJUIFooter),-1!=h.indexOf(".")){var g=h.split(".");u.id=g[0].substr(1,g[0].length-1),u.className=g[1]}else"#"==h.charAt(0)?u.id=h.substr(1,h.length-1):u.className=h;p+=d}a.append(u),a=n(u)}else if(">"==l)a=a.parent();else if("l"==l&&r.bPaginate&&r.bLengthChange)o=ct(e);else if("f"==l&&r.bFilter)o=V(e);else if("r"==l&&r.bProcessing)o=ft(e);else if("t"==l)o=gt(e);else if("i"==l&&r.bInfo)o=st(e);else if("p"==l&&r.bPaginate)o=ht(e);else if(0!==Vt.ext.feature.length)for(var m=Vt.ext.feature,v=0,y=m.length;y>v;v++)if(l==m[v].cFeature){o=m[v].fnInit(e);break}if(o){var b=e.aanFeatures;b[l]||(b[l]=[]),b[l].push(o),a.append(o)}}s.replaceWith(a)}function z(e,t){var i,s,r,a,o,l,u,c,h,d,f,p=n(t).children("tr"),g=function(e,t,i){for(var n=e[t];n[i];)i++;return i};for(e.splice(0,e.length),r=0,l=p.length;l>r;r++)e.push([]);for(r=0,l=p.length;l>r;r++)for(i=p[r],c=0,s=i.firstChild;s;){if("TD"==s.nodeName.toUpperCase()||"TH"==s.nodeName.toUpperCase())for(h=1*s.getAttribute("colspan"),d=1*s.getAttribute("rowspan"),h=h&&0!==h&&1!==h?h:1,d=d&&0!==d&&1!==d?d:1,u=g(e,r,c),f=1===h?!0:!1,o=0;h>o;o++)for(a=0;d>a;a++)e[r+a][u+o]={cell:s,unique:f},e[r+a].nTr=i;s=s.nextSibling}}function W(e,t,i){var n=[];i||(i=e.aoHeader,t&&(i=[],z(i,t)));for(var s=0,r=i.length;r>s;s++)for(var a=0,o=i[s].length;o>a;a++)!i[s][a].unique||n[a]&&e.bSortCellsTop||(n[a]=i[s][a].cell);return n}function $(e,t,i){if(zt(e,"aoServerParams","serverParams",[t]),t&&n.isArray(t)){var s={},r=/(.*?)\[\]$/;n.each(t,function(e,t){var i=t.name.match(r);if(i){var n=i[0];s[n]||(s[n]=[]),s[n].push(t.value)}else s[t.name]=t.value}),t=s}var a,o=e.ajax,l=e.oInstance;if(n.isPlainObject(o)&&o.data){a=o.data;var u=n.isFunction(a)?a(t):a;t=n.isFunction(a)&&u?u:n.extend(!0,t,u),delete o.data}var c={data:t,success:function(t){var n=t.error||t.sError;n&&e.oApi._fnLog(e,0,n),e.json=t,zt(e,null,"xhr",[e,t]),i(t)},dataType:"json",cache:!1,type:e.sServerMethod,error:function(t,i){var n=e.oApi._fnLog;"parsererror"==i?n(e,0,"Invalid JSON response",1):4===t.readyState&&n(e,0,"Ajax error",7),pt(e,!1)}};e.oAjaxData=t,zt(e,null,"preXhr",[e,t]),e.fnServerData?e.fnServerData.call(l,e.sAjaxSource,n.map(t,function(e,t){return{name:t,value:e}}),i,e):e.sAjaxSource||"string"==typeof o?e.jqXHR=n.ajax(n.extend(c,{url:o||e.sAjaxSource})):n.isFunction(o)?e.jqXHR=o.call(l,t,i,e):(e.jqXHR=n.ajax(n.extend(c,o)),o.data=a)}function B(e){return e.bAjaxDataGet?(e.iDraw++,pt(e,!0),$(e,q(e),function(t){Y(e,t)}),!1):!0}function q(e){var t,i,s,r,a=e.aoColumns,o=a.length,l=e.oFeatures,u=e.oPreviousSearch,c=e.aoPreSearchCols,h=[],d=St(e),f=e._iDisplayStart,p=l.bPaginate!==!1?e._iDisplayLength:-1,g=function(e,t){h.push({name:e,value:t})};g("sEcho",e.iDraw),g("iColumns",o),g("sColumns",di(a,"sName").join(",")),g("iDisplayStart",f),g("iDisplayLength",p);var m={draw:e.iDraw,columns:[],order:[],start:f,length:p,search:{value:u.sSearch,regex:u.bRegex}};for(t=0;o>t;t++)s=a[t],r=c[t],i="function"==typeof s.mData?"function":s.mData,m.columns.push({data:i,name:s.sName,searchable:s.bSearchable,orderable:s.bSortable,search:{value:r.sSearch,regex:r.bRegex}}),g("mDataProp_"+t,i),l.bFilter&&(g("sSearch_"+t,r.sSearch),g("bRegex_"+t,r.bRegex),g("bSearchable_"+t,s.bSearchable)),l.bSort&&g("bSortable_"+t,s.bSortable);l.bFilter&&(g("sSearch",u.sSearch),g("bRegex",u.bRegex)),l.bSort&&(n.each(d,function(e,t){m.order.push({column:t.col,dir:t.dir}),g("iSortCol_"+e,t.col),g("sSortDir_"+e,t.dir)}),g("iSortingCols",d.length));var v=Vt.ext.legacy.ajax;return null===v?e.sAjaxSource?h:m:v?h:m}function Y(e,t){var n=function(e,n){return t[e]!==i?t[e]:t[n]},s=n("sEcho","draw"),r=n("iTotalRecords","recordsTotal"),a=n("iTotalDisplayRecords","recordsFiltered");if(s){if(1*s<e.iDraw)return;e.iDraw=1*s}A(e),e._iRecordsTotal=parseInt(r,10),e._iRecordsDisplay=parseInt(a,10);for(var o=G(e,t),l=0,u=o.length;u>l;l++)_(e,o[l]);e.aiDisplay=e.aiDisplayMaster.slice(),e.bAjaxDataGet=!1,L(e),e._bInitComplete||lt(e,t),e.bAjaxDataGet=!0,pt(e,!1)}function G(e,t){var s=n.isPlainObject(e.ajax)&&e.ajax.dataSrc!==i?e.ajax.dataSrc:e.sAjaxDataProp;return"data"===s?t.aaData||t[s]:""!==s?T(s)(t):t}function V(e){var i=e.oClasses,s=e.sTableId,r=e.oLanguage,a=e.oPreviousSearch,o=e.aanFeatures,l='<input type="search" class="'+i.sFilterInput+'"/>',u=r.sSearch;u=u.match(/_INPUT_/)?u.replace("_INPUT_",l):u+l;var c=n("<div/>",{id:o.f?null:s+"_filter","class":i.sFilter}).append(n("<label/>").append(u)),h=function(){var t=(o.f,this.value?this.value:"");t!=a.sSearch&&(J(e,{sSearch:t,bRegex:a.bRegex,bSmart:a.bSmart,bCaseInsensitive:a.bCaseInsensitive}),e._iDisplayStart=0,L(e))},d=null!==e.searchDelay?e.searchDelay:"ssp"===Bt(e)?400:0,f=n("input",c).val(a.sSearch).attr("placeholder",r.sSearchPlaceholder).bind("keyup.DT search.DT input.DT paste.DT cut.DT",d?bt(h,d):h).bind("keypress.DT",function(e){return 13==e.keyCode?!1:void 0}).attr("aria-controls",s);return n(e.nTable).on("search.dt.DT",function(i,n){if(e===n)try{f[0]!==t.activeElement&&f.val(a.sSearch)}catch(s){}}),c[0]}function J(e,t,n){var s=e.oPreviousSearch,r=e.aoPreSearchCols,a=function(e){s.sSearch=e.sSearch,s.bRegex=e.bRegex,s.bSmart=e.bSmart,s.bCaseInsensitive=e.bCaseInsensitive},o=function(e){return e.bEscapeRegex!==i?!e.bEscapeRegex:e.bRegex};if(y(e),"ssp"!=Bt(e)){Q(e,t.sSearch,n,o(t),t.bSmart,t.bCaseInsensitive),a(t);for(var l=0;l<r.length;l++)X(e,r[l].sSearch,l,o(r[l]),r[l].bSmart,r[l].bCaseInsensitive);K(e)}else a(t);e.bFiltered=!0,zt(e,null,"search",[e])}function K(e){for(var t,i,n=Vt.ext.search,s=e.aiDisplay,r=0,a=n.length;a>r;r++){for(var o=[],l=0,u=s.length;u>l;l++)i=s[l],t=e.aoData[i],n[r](e,t._aFilterData,i,t._aData,l)&&o.push(i);s.length=0,s.push.apply(s,o)}}function X(e,t,i,n,s,r){if(""!==t)for(var a,o=e.aiDisplay,l=Z(t,n,s,r),u=o.length-1;u>=0;u--)a=e.aoData[o[u]]._aFilterData[i],l.test(a)||o.splice(u,1)}function Q(e,t,i,n,s,r){var a,o,l,u=Z(t,n,s,r),c=e.oPreviousSearch.sSearch,h=e.aiDisplayMaster;if(0!==Vt.ext.search.length&&(i=!0),o=tt(e),t.length<=0)e.aiDisplay=h.slice();else for((o||i||c.length>t.length||0!==t.indexOf(c)||e.bSorted)&&(e.aiDisplay=h.slice()),a=e.aiDisplay,l=a.length-1;l>=0;l--)u.test(e.aoData[a[l]]._sFilterRow)||a.splice(l,1)}function Z(e,t,i,s){if(e=t?e:et(e),i){var r=n.map(e.match(/"[^"]+"|[^ ]+/g)||"",function(e){if('"'===e.charAt(0)){var t=e.match(/^"(.*)"$/);e=t?t[1]:e}return e.replace('"',"")});e="^(?=.*?"+r.join(")(?=.*?")+").*$"}return new RegExp(e,s?"i":"")}function et(e){return e.replace(si,"\\$1")}function tt(e){var t,i,n,s,r,a,o,l,u=e.aoColumns,c=Vt.ext.type.search,h=!1;for(i=0,s=e.aoData.length;s>i;i++)if(l=e.aoData[i],!l._aFilterData){for(a=[],n=0,r=u.length;r>n;n++)t=u[n],t.bSearchable?(o=D(e,i,n,"filter"),c[t.sType]&&(o=c[t.sType](o)),null===o&&(o=""),"string"!=typeof o&&o.toString&&(o=o.toString())):o="",o.indexOf&&-1!==o.indexOf("&")&&(wi.innerHTML=o,o=xi?wi.textContent:wi.innerText),o.replace&&(o=o.replace(/[\r\n]/g,"")),a.push(o);l._aFilterData=a,l._sFilterRow=a.join("  "),h=!0}return h}function it(e){return{search:e.sSearch,smart:e.bSmart,regex:e.bRegex,caseInsensitive:e.bCaseInsensitive}}function nt(e){return{sSearch:e.search,bSmart:e.smart,bRegex:e.regex,bCaseInsensitive:e.caseInsensitive}}function st(e){var t=e.sTableId,i=e.aanFeatures.i,s=n("<div/>",{"class":e.oClasses.sInfo,id:i?null:t+"_info"});return i||(e.aoDrawCallback.push({fn:rt,sName:"information"}),s.attr("role","status").attr("aria-live","polite"),n(e.nTable).attr("aria-describedby",t+"_info")),s[0]}function rt(e){var t=e.aanFeatures.i;if(0!==t.length){var i=e.oLanguage,s=e._iDisplayStart+1,r=e.fnDisplayEnd(),a=e.fnRecordsTotal(),o=e.fnRecordsDisplay(),l=o?i.sInfo:i.sInfoEmpty;o!==a&&(l+=" "+i.sInfoFiltered),l+=i.sInfoPostFix,l=at(e,l);var u=i.fnInfoCallback;null!==u&&(l=u.call(e.oInstance,e,s,r,a,o,l)),n(t).html(l)}}function at(e,t){var i=e.fnFormatNumber,n=e._iDisplayStart+1,s=e._iDisplayLength,r=e.fnRecordsDisplay(),a=-1===s;return t.replace(/_START_/g,i.call(e,n)).replace(/_END_/g,i.call(e,e.fnDisplayEnd())).replace(/_MAX_/g,i.call(e,e.fnRecordsTotal())).replace(/_TOTAL_/g,i.call(e,r)).replace(/_PAGE_/g,i.call(e,a?1:Math.ceil(n/s))).replace(/_PAGES_/g,i.call(e,a?1:Math.ceil(r/s)))}function ot(e){var t,i,n,s=e.iInitDisplayStart,r=e.aoColumns,a=e.oFeatures;if(!e.bInitialised)return void setTimeout(function(){ot(e)},200);for(U(e),H(e),R(e,e.aoHeader),R(e,e.aoFooter),pt(e,!0),a.bAutoWidth&&yt(e),t=0,i=r.length;i>t;t++)n=r[t],n.sWidth&&(n.nTh.style.width=Dt(n.sWidth));j(e);var o=Bt(e);"ssp"!=o&&("ajax"==o?$(e,[],function(i){var n=G(e,i);for(t=0;t<n.length;t++)_(e,n[t]);e.iInitDisplayStart=s,j(e),pt(e,!1),lt(e,i)},e):(pt(e,!1),lt(e)))}function lt(e,t){e._bInitComplete=!0,t&&f(e),zt(e,"aoInitComplete","init",[e,t])}function ut(e,t){var i=parseInt(t,10);e._iDisplayLength=i,Wt(e),zt(e,null,"length",[e,i])}function ct(e){for(var t=e.oClasses,i=e.sTableId,s=e.aLengthMenu,r=n.isArray(s[0]),a=r?s[0]:s,o=r?s[1]:s,l=n("<select/>",{name:i+"_length","aria-controls":i,"class":t.sLengthSelect}),u=0,c=a.length;c>u;u++)l[0][u]=new Option(o[u],a[u]);var h=n("<div><label/></div>").addClass(t.sLength);return e.aanFeatures.l||(h[0].id=i+"_length"),h.children().append(e.oLanguage.sLengthMenu.replace("_MENU_",l[0].outerHTML)),n("select",h).val(e._iDisplayLength).bind("change.DT",function(){ut(e,n(this).val()),L(e)}),n(e.nTable).bind("length.dt.DT",function(t,i,s){e===i&&n("select",h).val(s)}),h[0]}function ht(e){var t=e.sPaginationType,i=Vt.ext.pager[t],s="function"==typeof i,r=function(e){L(e)},a=n("<div/>").addClass(e.oClasses.sPaging+t)[0],o=e.aanFeatures;return s||i.fnInit(e,a,r),o.p||(a.id=e.sTableId+"_paginate",e.aoDrawCallback.push({fn:function(e){if(s){var t,n,a=e._iDisplayStart,l=e._iDisplayLength,u=e.fnRecordsDisplay(),c=-1===l,h=c?0:Math.ceil(a/l),d=c?1:Math.ceil(u/l),f=i(h,d);for(t=0,n=o.p.length;n>t;t++)$t(e,"pageButton")(e,o.p[t],t,f,h,d)}else i.fnUpdate(e,r)},sName:"pagination"})),a}function dt(e,t,i){var n=e._iDisplayStart,s=e._iDisplayLength,r=e.fnRecordsDisplay();0===r||-1===s?n=0:"number"==typeof t?(n=t*s,n>r&&(n=0)):"first"==t?n=0:"previous"==t?(n=s>=0?n-s:0,0>n&&(n=0)):"next"==t?r>n+s&&(n+=s):"last"==t?n=Math.floor((r-1)/s)*s:Ht(e,0,"Unknown paging action: "+t,5);var a=e._iDisplayStart!==n;return e._iDisplayStart=n,a&&(zt(e,null,"page",[e]),i&&L(e)),a}function ft(e){return n("<div/>",{id:e.aanFeatures.r?null:e.sTableId+"_processing","class":e.oClasses.sProcessing}).html(e.oLanguage.sProcessing).insertBefore(e.nTable)[0]}function pt(e,t){e.oFeatures.bProcessing&&n(e.aanFeatures.r).css("display",t?"block":"none"),zt(e,null,"processing",[e,t])}function gt(e){var t=n(e.nTable);t.attr("role","grid");var i=e.oScroll;if(""===i.sX&&""===i.sY)return e.nTable;var s=i.sX,r=i.sY,a=e.oClasses,o=t.children("caption"),l=o.length?o[0]._captionSide:null,u=n(t[0].cloneNode(!1)),c=n(t[0].cloneNode(!1)),h=t.children("tfoot"),d="<div/>",f=function(e){return e?Dt(e):null};i.sX&&"100%"===t.attr("width")&&t.removeAttr("width"),h.length||(h=null);var p=n(d,{"class":a.sScrollWrapper}).append(n(d,{"class":a.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:s?f(s):"100%"}).append(n(d,{"class":a.sScrollHeadInner}).css({"box-sizing":"content-box",width:i.sXInner||"100%"}).append(u.removeAttr("id").css("margin-left",0).append("top"===l?o:null).append(t.children("thead"))))).append(n(d,{"class":a.sScrollBody}).css({overflow:"auto",height:f(r),width:f(s)}).append(t));h&&p.append(n(d,{"class":a.sScrollFoot}).css({overflow:"hidden",border:0,width:s?f(s):"100%"}).append(n(d,{"class":a.sScrollFootInner}).append(c.removeAttr("id").css("margin-left",0).append("bottom"===l?o:null).append(t.children("tfoot")))));var g=p.children(),m=g[0],v=g[1],y=h?g[2]:null;return s&&n(v).scroll(function(){var e=this.scrollLeft;m.scrollLeft=e,h&&(y.scrollLeft=e)}),e.nScrollHead=m,e.nScrollBody=v,e.nScrollFoot=y,e.aoDrawCallback.push({fn:mt,sName:"scrolling"}),p[0]}function mt(e){var t,i,s,r,a,o,l,u,c,h=e.oScroll,d=h.sX,f=h.sXInner,g=h.sY,m=h.iBarWidth,v=n(e.nScrollHead),y=v[0].style,b=v.children("div"),_=b[0].style,w=b.children("table"),x=e.nScrollBody,k=n(x),D=x.style,C=n(e.nScrollFoot),S=C.children("div"),T=S.children("table"),P=n(e.nTHead),I=n(e.nTable),A=I[0],N=A.style,M=e.nTFoot?n(e.nTFoot):null,E=e.oBrowser,F=E.bScrollOversize,O=[],H=[],R=[],L=function(e){var t=e.style;t.paddingTop="0",t.paddingBottom="0",t.borderTopWidth="0",t.borderBottomWidth="0",t.height=0};if(I.children("thead, tfoot").remove(),a=P.clone().prependTo(I),t=P.find("tr"),s=a.find("tr"),a.find("th, td").removeAttr("tabindex"),M&&(o=M.clone().prependTo(I),i=M.find("tr"),r=o.find("tr")),d||(D.width="100%",v[0].style.width="100%"),n.each(W(e,a),function(t,i){l=p(e,t),i.style.width=e.aoColumns[l].sWidth}),M&&vt(function(e){e.style.width=""},r),h.bCollapse&&""!==g&&(D.height=k[0].offsetHeight+P[0].offsetHeight+"px"),c=I.outerWidth(),""===d?(N.width="100%",F&&(I.find("tbody").height()>x.offsetHeight||"scroll"==k.css("overflow-y"))&&(N.width=Dt(I.outerWidth()-m))):""!==f?N.width=Dt(f):c==k.width()&&k.height()<I.height()?(N.width=Dt(c-m),I.outerWidth()>c-m&&(N.width=Dt(c))):N.width=Dt(c),c=I.outerWidth(),vt(L,s),vt(function(e){R.push(e.innerHTML),O.push(Dt(n(e).css("width")))},s),vt(function(e,t){e.style.width=O[t]},t),n(s).height(0),M&&(vt(L,r),vt(function(e){H.push(Dt(n(e).css("width")))},r),vt(function(e,t){e.style.width=H[t]},i),n(r).height(0)),vt(function(e,t){e.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+R[t]+"</div>",e.style.width=O[t]},s),M&&vt(function(e,t){e.innerHTML="",e.style.width=H[t]},r),I.outerWidth()<c?(u=x.scrollHeight>x.offsetHeight||"scroll"==k.css("overflow-y")?c+m:c,F&&(x.scrollHeight>x.offsetHeight||"scroll"==k.css("overflow-y"))&&(N.width=Dt(u-m)),(""===d||""!==f)&&Ht(e,1,"Possible column misalignment",6)):u="100%",D.width=Dt(u),y.width=Dt(u),M&&(e.nScrollFoot.style.width=Dt(u)),g||F&&(D.height=Dt(A.offsetHeight+m)),g&&h.bCollapse){D.height=Dt(g);var j=d&&A.offsetWidth>x.offsetWidth?m:0;A.offsetHeight<x.offsetHeight&&(D.height=Dt(A.offsetHeight+j))}var U=I.outerWidth();w[0].style.width=Dt(U),_.width=Dt(U);var z=I.height()>x.clientHeight||"scroll"==k.css("overflow-y"),$="padding"+(E.bScrollbarLeft?"Left":"Right");_[$]=z?m+"px":"0px",M&&(T[0].style.width=Dt(U),S[0].style.width=Dt(U),S[0].style[$]=z?m+"px":"0px"),k.scroll(),!e.bSorted&&!e.bFiltered||e._drawHold||(x.scrollTop=0)}function vt(e,t,i){for(var n,s,r=0,a=0,o=t.length;o>a;){for(n=t[a].firstChild,s=i?i[a].firstChild:null;n;)1===n.nodeType&&(i?e(n,s,r):e(n,r),r++),n=n.nextSibling,s=i?s.nextSibling:null;a++}}function yt(t){var i,s,r,a,o,l=t.nTable,u=t.aoColumns,c=t.oScroll,h=c.sY,d=c.sX,p=c.sXInner,g=u.length,y=v(t,"bVisible"),b=n("th",t.nTHead),_=l.getAttribute("width"),w=l.parentNode,x=!1;for(i=0;i<y.length;i++)s=u[y[i]],null!==s.sWidth&&(s.sWidth=_t(s.sWidthOrig,w),x=!0);if(x||d||h||g!=m(t)||g!=b.length){var k=n(l).clone().empty().css("visibility","hidden").removeAttr("id").append(n(t.nTHead).clone(!1)).append(n(t.nTFoot).clone(!1)).append(n("<tbody><tr/></tbody>"));k.find("tfoot th, tfoot td").css("width","");var D=k.find("tbody tr");for(b=W(t,k.find("thead")[0]),i=0;i<y.length;i++)s=u[y[i]],b[i].style.width=null!==s.sWidthOrig&&""!==s.sWidthOrig?Dt(s.sWidthOrig):"";if(t.aoData.length)for(i=0;i<y.length;i++)r=y[i],s=u[r],n(xt(t,r)).clone(!1).append(s.sContentPadding).appendTo(D);if(k.appendTo(w),d&&p?k.width(p):d?(k.css("width","auto"),k.width()<w.offsetWidth&&k.width(w.offsetWidth)):h?k.width(w.offsetWidth):_&&k.width(_),wt(t,k[0]),d){var C=0;for(i=0;i<y.length;i++)s=u[y[i]],o=n(b[i]).outerWidth(),C+=null===s.sWidthOrig?o:parseInt(s.sWidth,10)+o-n(b[i]).width();k.width(Dt(C)),l.style.width=Dt(C)}for(i=0;i<y.length;i++)s=u[y[i]],a=n(b[i]).width(),a&&(s.sWidth=Dt(a));l.style.width=Dt(k.css("width")),k.remove()}else for(i=0;g>i;i++)u[i].sWidth=Dt(b.eq(i).width());_&&(l.style.width=Dt(_)),!_&&!d||t._reszEvt||(n(e).bind("resize.DT-"+t.sInstance,bt(function(){f(t)})),t._reszEvt=!0)}function bt(e,t){var n,s,r=t!==i?t:200;return function(){var t=this,a=+new Date,o=arguments;n&&n+r>a?(clearTimeout(s),s=setTimeout(function(){n=i,e.apply(t,o)},r)):n?(n=a,e.apply(t,o)):n=a}}function _t(e,i){if(!e)return 0;var s=n("<div/>").css("width",Dt(e)).appendTo(i||t.body),r=s[0].offsetWidth;return s.remove(),r}function wt(e,t){var i=e.oScroll;if(i.sX||i.sY){var s=i.sX?0:i.iBarWidth;t.style.width=Dt(n(t).outerWidth()-s)}}function xt(e,t){var i=kt(e,t);if(0>i)return null;var s=e.aoData[i];return s.nTr?s.anCells[t]:n("<td/>").html(D(e,i,t,"display"))[0]}function kt(e,t){for(var i,n=-1,s=-1,r=0,a=e.aoData.length;a>r;r++)i=D(e,r,t,"display")+"",i=i.replace(ki,""),i.length>n&&(n=i.length,s=r);return s}function Dt(e){return null===e?"0px":"number"==typeof e?0>e?"0px":e+"px":e.match(/\d$/)?e+"px":e}function Ct(){if(!Vt.__scrollbarWidth){var e=n("<p/>").css({width:"100%",height:200,padding:0})[0],t=n("<div/>").css({position:"absolute",top:0,left:0,width:200,height:150,padding:0,overflow:"hidden",visibility:"hidden"}).append(e).appendTo("body"),i=e.offsetWidth;t.css("overflow","scroll");var s=e.offsetWidth;i===s&&(s=t[0].clientWidth),t.remove(),Vt.__scrollbarWidth=i-s}return Vt.__scrollbarWidth}function St(e){var t,s,r,a,o,l,u,c=[],h=e.aoColumns,d=e.aaSortingFixed,f=n.isPlainObject(d),p=[],g=function(e){e.length&&!n.isArray(e[0])?p.push(e):p.push.apply(p,e)};for(n.isArray(d)&&g(d),f&&d.pre&&g(d.pre),g(e.aaSorting),f&&d.post&&g(d.post),t=0;t<p.length;t++)for(u=p[t][0],a=h[u].aDataSort,s=0,r=a.length;r>s;s++)o=a[s],l=h[o].sType||"string",p[t]._idx===i&&(p[t]._idx=n.inArray(p[t][1],h[o].asSorting)),c.push({src:u,col:o,dir:p[t][1],index:p[t]._idx,type:l,formatter:Vt.ext.type.order[l+"-pre"]});return c}function Tt(e){var t,i,n,s,r,a=[],o=Vt.ext.type.order,l=e.aoData,u=(e.aoColumns,0),c=e.aiDisplayMaster;for(y(e),r=St(e),t=0,i=r.length;i>t;t++)s=r[t],s.formatter&&u++,Mt(e,s.col);if("ssp"!=Bt(e)&&0!==r.length){for(t=0,n=c.length;n>t;t++)a[c[t]]=t;c.sort(u===r.length?function(e,t){var i,n,s,o,u,c=r.length,h=l[e]._aSortData,d=l[t]._aSortData;for(s=0;c>s;s++)if(u=r[s],i=h[u.col],n=d[u.col],o=n>i?-1:i>n?1:0,0!==o)return"asc"===u.dir?o:-o;return i=a[e],n=a[t],n>i?-1:i>n?1:0}:function(e,t){var i,n,s,u,c,h,d=r.length,f=l[e]._aSortData,p=l[t]._aSortData;for(s=0;d>s;s++)if(c=r[s],i=f[c.col],n=p[c.col],h=o[c.type+"-"+c.dir]||o["string-"+c.dir],u=h(i,n),0!==u)return u;return i=a[e],n=a[t],n>i?-1:i>n?1:0})}e.bSorted=!0}function Pt(e){for(var t,i,n=e.aoColumns,s=St(e),r=e.oLanguage.oAria,a=0,o=n.length;o>a;a++){var l=n[a],u=l.asSorting,c=l.sTitle.replace(/<.*?>/g,""),h=l.nTh;h.removeAttribute("aria-sort"),l.bSortable?(s.length>0&&s[0].col==a?(h.setAttribute("aria-sort","asc"==s[0].dir?"ascending":"descending"),i=u[s[0].index+1]||u[0]):i=u[0],t=c+("asc"===i?r.sSortAscending:r.sSortDescending)):t=c,h.setAttribute("aria-label",t)}}function It(e,t,s,r){var a,o=e.aoColumns[t],l=e.aaSorting,u=o.asSorting,c=function(e,t){var s=e._idx;return s===i&&(s=n.inArray(e[1],u)),s+1<u.length?s+1:t?null:0};if("number"==typeof l[0]&&(l=e.aaSorting=[l]),s&&e.oFeatures.bSortMulti){var h=n.inArray(t,di(l,"0"));-1!==h?(a=c(l[h],!0),null===a?l.splice(h,1):(l[h][1]=u[a],l[h]._idx=a)):(l.push([t,u[0],0]),l[l.length-1]._idx=0)}else l.length&&l[0][0]==t?(a=c(l[0]),l.length=1,l[0][1]=u[a],l[0]._idx=a):(l.length=0,l.push([t,u[0]]),l[0]._idx=0);j(e),"function"==typeof r&&r(e)}function At(e,t,i,n){var s=e.aoColumns[i];jt(t,{},function(t){s.bSortable!==!1&&(e.oFeatures.bProcessing?(pt(e,!0),setTimeout(function(){It(e,i,t.shiftKey,n),"ssp"!==Bt(e)&&pt(e,!1)},0)):It(e,i,t.shiftKey,n))})}function Nt(e){var t,i,s,r=e.aLastSort,a=e.oClasses.sSortColumn,o=St(e),l=e.oFeatures;if(l.bSort&&l.bSortClasses){for(t=0,i=r.length;i>t;t++)s=r[t].src,n(di(e.aoData,"anCells",s)).removeClass(a+(2>t?t+1:3));for(t=0,i=o.length;i>t;t++)s=o[t].src,n(di(e.aoData,"anCells",s)).addClass(a+(2>t?t+1:3))}e.aLastSort=o}function Mt(e,t){var i,n=e.aoColumns[t],s=Vt.ext.order[n.sSortDataType];s&&(i=s.call(e.oInstance,e,t,g(e,t)));for(var r,a,o=Vt.ext.type.order[n.sType+"-pre"],l=0,u=e.aoData.length;u>l;l++)r=e.aoData[l],r._aSortData||(r._aSortData=[]),(!r._aSortData[t]||s)&&(a=s?i[l]:D(e,l,t,"sort"),r._aSortData[t]=o?o(a):a)}function Et(e){if(e.oFeatures.bStateSave&&!e.bDestroying){var t={time:+new Date,start:e._iDisplayStart,length:e._iDisplayLength,order:n.extend(!0,[],e.aaSorting),search:it(e.oPreviousSearch),columns:n.map(e.aoColumns,function(t,i){return{visible:t.bVisible,search:it(e.aoPreSearchCols[i])}})};zt(e,"aoStateSaveParams","stateSaveParams",[e,t]),e.oSavedState=t,e.fnStateSaveCallback.call(e.oInstance,e,t)}}function Ft(e){var t,i,s=e.aoColumns;if(e.oFeatures.bStateSave){var r=e.fnStateLoadCallback.call(e.oInstance,e);if(r&&r.time){var a=zt(e,"aoStateLoadParams","stateLoadParams",[e,r]);if(-1===n.inArray(!1,a)){var o=e.iStateDuration;if(!(o>0&&r.time<+new Date-1e3*o)&&s.length===r.columns.length){for(e.oLoadedState=n.extend(!0,{},r),e._iDisplayStart=r.start,e.iInitDisplayStart=r.start,e._iDisplayLength=r.length,e.aaSorting=[],n.each(r.order,function(t,i){e.aaSorting.push(i[0]>=s.length?[0,i[1]]:i)}),n.extend(e.oPreviousSearch,nt(r.search)),t=0,i=r.columns.length;i>t;t++){var l=r.columns[t];s[t].bVisible=l.visible,n.extend(e.aoPreSearchCols[t],nt(l.search))}zt(e,"aoStateLoaded","stateLoaded",[e,r])}}}}}function Ot(e){var t=Vt.settings,i=n.inArray(e,di(t,"nTable"));return-1!==i?t[i]:null}function Ht(t,i,n,s){if(n="DataTables warning: "+(null!==t?"table id="+t.sTableId+" - ":"")+n,s&&(n+=". For more information about this error, please see http://datatables.net/tn/"+s),i)e.console&&console.log&&console.log(n);else{var r=Vt.ext,a=r.sErrMode||r.errMode;if("alert"!=a)throw new Error(n);alert(n)}}function Rt(e,t,s,r){return n.isArray(s)?void n.each(s,function(i,s){n.isArray(s)?Rt(e,t,s[0],s[1]):Rt(e,t,s)}):(r===i&&(r=s),void(t[s]!==i&&(e[r]=t[s])))}function Lt(e,t,i){var s;for(var r in t)t.hasOwnProperty(r)&&(s=t[r],n.isPlainObject(s)?(n.isPlainObject(e[r])||(e[r]={}),n.extend(!0,e[r],s)):e[r]=i&&"data"!==r&&"aaData"!==r&&n.isArray(s)?s.slice():s);return e}function jt(e,t,i){n(e).bind("click.DT",t,function(t){e.blur(),i(t)}).bind("keypress.DT",t,function(e){13===e.which&&(e.preventDefault(),i(e))}).bind("selectstart.DT",function(){return!1})}function Ut(e,t,i,n){i&&e[t].push({fn:i,sName:n})}function zt(e,t,i,s){var r=[];return t&&(r=n.map(e[t].slice().reverse(),function(t){return t.fn.apply(e.oInstance,s)})),null!==i&&n(e.nTable).trigger(i+".dt",s),r}function Wt(e){var t=e._iDisplayStart,i=e.fnDisplayEnd(),n=e._iDisplayLength;t>=i&&(t=i-n),t-=t%n,(-1===n||0>t)&&(t=0),e._iDisplayStart=t}function $t(e,t){var i=e.renderer,s=Vt.ext.renderer[t];return n.isPlainObject(i)&&i[t]?s[i[t]]||s._:"string"==typeof i?s[i]||s._:s._}function Bt(e){return e.oFeatures.bServerSide?"ssp":e.ajax||e.sAjaxSource?"ajax":"dom"}function qt(e,t){var i=[],n=Yi.numbers_length,s=Math.floor(n/2);return n>=t?i=pi(0,t):s>=e?(i=pi(0,n-2),i.push("ellipsis"),i.push(t-1)):e>=t-1-s?(i=pi(t-(n-2),t),i.splice(0,0,"ellipsis"),i.splice(0,0,0)):(i=pi(e-1,e+2),i.push("ellipsis"),i.push(t-1),i.splice(0,0,"ellipsis"),i.splice(0,0,0)),i.DT_el="span",i}function Yt(e){n.each({num:function(t){return Gi(t,e)},"num-fmt":function(t){return Gi(t,e,ri)},"html-num":function(t){return Gi(t,e,ti)},"html-num-fmt":function(t){return Gi(t,e,ti,ri)}},function(t,i){Jt.type.order[t+e+"-pre"]=i,t.match(/^html\-/)&&(Jt.type.search[t+e]=Jt.type.search.html)})}function Gt(e){return function(){var t=[Ot(this[Vt.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return Vt.ext.internal[e].apply(this,t)}}var Vt,Jt,Kt,Xt,Qt,Zt={},ei=/[\r\n]/g,ti=/<.*?>/g,ii=/^[\w\+\-]/,ni=/[\w\+\-]$/,si=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),ri=/[',$£€¥%\u2009\u202F]/g,ai=function(e){return e&&e!==!0&&"-"!==e?!1:!0},oi=function(e){var t=parseInt(e,10);return!isNaN(t)&&isFinite(e)?t:null},li=function(e,t){return Zt[t]||(Zt[t]=new RegExp(et(t),"g")),"string"==typeof e&&"."!==t?e.replace(/\./g,"").replace(Zt[t],"."):e},ui=function(e,t,i){var n="string"==typeof e;return t&&n&&(e=li(e,t)),i&&n&&(e=e.replace(ri,"")),ai(e)||!isNaN(parseFloat(e))&&isFinite(e)},ci=function(e){return ai(e)||"string"==typeof e},hi=function(e,t,i){if(ai(e))return!0;var n=ci(e);return n&&ui(mi(e),t,i)?!0:null},di=function(e,t,n){var s=[],r=0,a=e.length;if(n!==i)for(;a>r;r++)e[r]&&e[r][t]&&s.push(e[r][t][n]);else for(;a>r;r++)e[r]&&s.push(e[r][t]);return s},fi=function(e,t,n,s){var r=[],a=0,o=t.length;if(s!==i)for(;o>a;a++)e[t[a]][n]&&r.push(e[t[a]][n][s]);else for(;o>a;a++)r.push(e[t[a]][n]);return r},pi=function(e,t){var n,s=[];t===i?(t=0,n=e):(n=t,t=e);for(var r=t;n>r;r++)s.push(r);return s},gi=function(e){for(var t=[],i=0,n=e.length;n>i;i++)e[i]&&t.push(e[i]);return t},mi=function(e){return e.replace(ti,"")},vi=function(e){var t,i,n,s=[],r=e.length,a=0;e:for(i=0;r>i;i++){for(t=e[i],n=0;a>n;n++)if(s[n]===t)continue e;s.push(t),a++}return s},yi=function(e,t,n){e[t]!==i&&(e[n]=e[t])},bi=/\[.*?\]$/,_i=/\(\)$/,wi=n("<div>")[0],xi=wi.textContent!==i,ki=/<.*?>/g;Vt=function(e){this.$=function(e,t){return this.api(!0).$(e,t)},this._=function(e,t){return this.api(!0).rows(e,t).data()},this.api=function(e){return new Kt(e?Ot(this[Jt.iApiIndex]):this)},this.fnAddData=function(e,t){var s=this.api(!0),r=n.isArray(e)&&(n.isArray(e[0])||n.isPlainObject(e[0]))?s.rows.add(e):s.row.add(e);return(t===i||t)&&s.draw(),r.flatten().toArray()},this.fnAdjustColumnSizing=function(e){var t=this.api(!0).columns.adjust(),n=t.settings()[0],s=n.oScroll;e===i||e?t.draw(!1):(""!==s.sX||""!==s.sY)&&mt(n)},this.fnClearTable=function(e){var t=this.api(!0).clear();(e===i||e)&&t.draw()},this.fnClose=function(e){this.api(!0).row(e).child.hide()},this.fnDeleteRow=function(e,t,n){var s=this.api(!0),r=s.rows(e),a=r.settings()[0],o=a.aoData[r[0][0]];return r.remove(),t&&t.call(this,a,o),(n===i||n)&&s.draw(),o},this.fnDestroy=function(e){this.api(!0).destroy(e)},this.fnDraw=function(e){this.api(!0).draw(!e)},this.fnFilter=function(e,t,n,s,r,a){var o=this.api(!0);null===t||t===i?o.search(e,n,s,a):o.column(t).search(e,n,s,a),o.draw()},this.fnGetData=function(e,t){var n=this.api(!0);if(e!==i){var s=e.nodeName?e.nodeName.toLowerCase():"";return t!==i||"td"==s||"th"==s?n.cell(e,t).data():n.row(e).data()||null}return n.data().toArray()},this.fnGetNodes=function(e){var t=this.api(!0);return e!==i?t.row(e).node():t.rows().nodes().flatten().toArray()},this.fnGetPosition=function(e){var t=this.api(!0),i=e.nodeName.toUpperCase();if("TR"==i)return t.row(e).index();if("TD"==i||"TH"==i){var n=t.cell(e).index();return[n.row,n.columnVisible,n.column]}return null},this.fnIsOpen=function(e){return this.api(!0).row(e).child.isShown()},this.fnOpen=function(e,t,i){return this.api(!0).row(e).child(t,i).show().child()[0]},this.fnPageChange=function(e,t){var n=this.api(!0).page(e);(t===i||t)&&n.draw(!1)},this.fnSetColumnVis=function(e,t,n){var s=this.api(!0).column(e).visible(t);(n===i||n)&&s.columns.adjust().draw()},this.fnSettings=function(){return Ot(this[Jt.iApiIndex])},this.fnSort=function(e){this.api(!0).order(e).draw()},this.fnSortListener=function(e,t,i){this.api(!0).order.listener(e,t,i)},this.fnUpdate=function(e,t,n,s,r){var a=this.api(!0);return n===i||null===n?a.row(t).data(e):a.cell(t,n).data(e),(r===i||r)&&a.columns.adjust(),(s===i||s)&&a.draw(),0},this.fnVersionCheck=Jt.fnVersionCheck;var t=this,s=e===i,c=this.length;s&&(e={}),this.oApi=this.internal=Jt.internal;for(var f in Vt.ext.internal)f&&(this[f]=Gt(f));return this.each(function(){var f,p={},g=c>1?Lt(p,e,!0):e,m=0,v=this.getAttribute("id"),y=!1,x=Vt.defaults;if("table"!=this.nodeName.toLowerCase())return void Ht(null,0,"Non-table node initialisation ("+this.nodeName+")",2);o(x),l(x.column),r(x,x,!0),r(x.column,x.column,!0),r(x,g);var k=Vt.settings;for(m=0,f=k.length;f>m;m++){if(k[m].nTable==this){var D=g.bRetrieve!==i?g.bRetrieve:x.bRetrieve,C=g.bDestroy!==i?g.bDestroy:x.bDestroy;if(s||D)return k[m].oInstance;if(C){k[m].oInstance.fnDestroy();break}return void Ht(k[m],0,"Cannot reinitialise DataTable",3)}if(k[m].sTableId==this.id){k.splice(m,1);break}}(null===v||""===v)&&(v="DataTables_Table_"+Vt.ext._unique++,this.id=v);var S=n.extend(!0,{},Vt.models.oSettings,{nTable:this,oApi:t.internal,oInit:g,sDestroyWidth:n(this)[0].style.width,sInstance:v,sTableId:v});k.push(S),S.oInstance=1===t.length?t:n(this).dataTable(),o(g),g.oLanguage&&a(g.oLanguage),g.aLengthMenu&&!g.iDisplayLength&&(g.iDisplayLength=n.isArray(g.aLengthMenu[0])?g.aLengthMenu[0][0]:g.aLengthMenu[0]),g=Lt(n.extend(!0,{},x),g),Rt(S.oFeatures,g,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),Rt(S,g,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"],["bJQueryUI","bJUI"]]),Rt(S.oScroll,g,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),Rt(S.oLanguage,g,"fnInfoCallback"),Ut(S,"aoDrawCallback",g.fnDrawCallback,"user"),Ut(S,"aoServerParams",g.fnServerParams,"user"),Ut(S,"aoStateSaveParams",g.fnStateSaveParams,"user"),Ut(S,"aoStateLoadParams",g.fnStateLoadParams,"user"),Ut(S,"aoStateLoaded",g.fnStateLoaded,"user"),Ut(S,"aoRowCallback",g.fnRowCallback,"user"),Ut(S,"aoRowCreatedCallback",g.fnCreatedRow,"user"),Ut(S,"aoHeaderCallback",g.fnHeaderCallback,"user"),Ut(S,"aoFooterCallback",g.fnFooterCallback,"user"),Ut(S,"aoInitComplete",g.fnInitComplete,"user"),Ut(S,"aoPreDrawCallback",g.fnPreDrawCallback,"user");var T=S.oClasses;if(g.bJQueryUI?(n.extend(T,Vt.ext.oJUIClasses,g.oClasses),g.sDom===x.sDom&&"lfrtip"===x.sDom&&(S.sDom='<"H"lfr>t<"F"ip>'),S.renderer?n.isPlainObject(S.renderer)&&!S.renderer.header&&(S.renderer.header="jqueryui"):S.renderer="jqueryui"):n.extend(T,Vt.ext.classes,g.oClasses),n(this).addClass(T.sTable),(""!==S.oScroll.sX||""!==S.oScroll.sY)&&(S.oScroll.iBarWidth=Ct()),S.oScroll.sX===!0&&(S.oScroll.sX="100%"),S.iInitDisplayStart===i&&(S.iInitDisplayStart=g.iDisplayStart,S._iDisplayStart=g.iDisplayStart),null!==g.iDeferLoading){S.bDeferLoading=!0;var P=n.isArray(g.iDeferLoading);S._iRecordsDisplay=P?g.iDeferLoading[0]:g.iDeferLoading,S._iRecordsTotal=P?g.iDeferLoading[1]:g.iDeferLoading}var I=S.oLanguage;n.extend(!0,I,g.oLanguage),""!==I.sUrl&&(n.ajax({dataType:"json",url:I.sUrl,success:function(e){a(e),r(x.oLanguage,e),n.extend(!0,I,e),ot(S)},error:function(){ot(S)}}),y=!0),null===g.asStripeClasses&&(S.asStripeClasses=[T.sStripeOdd,T.sStripeEven]);var A=S.asStripeClasses,N=n("tbody tr:eq(0)",this);-1!==n.inArray(!0,n.map(A,function(e){return N.hasClass(e)}))&&(n("tbody tr",this).removeClass(A.join(" ")),S.asDestroyStripes=A.slice());var M,F=[],O=this.getElementsByTagName("thead");if(0!==O.length&&(z(S.aoHeader,O[0]),F=W(S)),null===g.aoColumns)for(M=[],m=0,f=F.length;f>m;m++)M.push(null);else M=g.aoColumns;for(m=0,f=M.length;f>m;m++)h(S,F?F[m]:null);if(b(S,g.aoColumnDefs,M,function(e,t){d(S,e,t)}),N.length){var H=function(e,t){return e.getAttribute("data-"+t)?t:null};n.each(E(S,N[0]).cells,function(e,t){var n=S.aoColumns[e];if(n.mData===e){var s=H(t,"sort")||H(t,"order"),r=H(t,"filter")||H(t,"search");(null!==s||null!==r)&&(n.mData={_:e+".display",sort:null!==s?e+".@data-"+s:i,type:null!==s?e+".@data-"+s:i,filter:null!==r?e+".@data-"+r:i},d(S,e))}})}var R=S.oFeatures;if(g.bStateSave&&(R.bStateSave=!0,Ft(S,g),Ut(S,"aoDrawCallback",Et,"state_save")),g.aaSorting===i){var L=S.aaSorting;
for(m=0,f=L.length;f>m;m++)L[m][1]=S.aoColumns[m].asSorting[0]}Nt(S),R.bSort&&Ut(S,"aoDrawCallback",function(){if(S.bSorted){var e=St(S),t={};n.each(e,function(e,i){t[i.src]=i.dir}),zt(S,null,"order",[S,e,t]),Pt(S)}}),Ut(S,"aoDrawCallback",function(){(S.bSorted||"ssp"===Bt(S)||R.bDeferRender)&&Nt(S)},"sc"),u(S);var j=n(this).children("caption").each(function(){this._captionSide=n(this).css("caption-side")}),U=n(this).children("thead");0===U.length&&(U=n("<thead/>").appendTo(this)),S.nTHead=U[0];var $=n(this).children("tbody");0===$.length&&($=n("<tbody/>").appendTo(this)),S.nTBody=$[0];var B=n(this).children("tfoot");if(0===B.length&&j.length>0&&(""!==S.oScroll.sX||""!==S.oScroll.sY)&&(B=n("<tfoot/>").appendTo(this)),0===B.length||0===B.children().length?n(this).addClass(T.sNoFooter):B.length>0&&(S.nTFoot=B[0],z(S.aoFooter,S.nTFoot)),g.aaData)for(m=0;m<g.aaData.length;m++)_(S,g.aaData[m]);else(S.bDeferLoading||"dom"==Bt(S))&&w(S,n(S.nTBody).children("tr"));S.aiDisplay=S.aiDisplayMaster.slice(),S.bInitialised=!0,y===!1&&ot(S)}),t=null,this};var Di=[],Ci=Array.prototype,Si=function(e){var t,i,s=Vt.settings,r=n.map(s,function(e){return e.nTable});return e?e.nTable&&e.oApi?[e]:e.nodeName&&"table"===e.nodeName.toLowerCase()?(t=n.inArray(e,r),-1!==t?[s[t]]:null):e&&"function"==typeof e.settings?e.settings().toArray():("string"==typeof e?i=n(e):e instanceof n&&(i=e),i?i.map(function(){return t=n.inArray(this,r),-1!==t?s[t]:null}).toArray():void 0):[]};Kt=function(e,t){if(!this instanceof Kt)throw"DT API must be constructed as a new object";var i=[],s=function(e){var t=Si(e);t&&i.push.apply(i,t)};if(n.isArray(e))for(var r=0,a=e.length;a>r;r++)s(e[r]);else s(e);this.context=vi(i),t&&this.push.apply(this,t.toArray?t.toArray():t),this.selector={rows:null,cols:null,opts:null},Kt.extend(this,this,Di)},Vt.Api=Kt,Kt.prototype={concat:Ci.concat,context:[],each:function(e){for(var t=0,i=this.length;i>t;t++)e.call(this,this[t],t,this);return this},eq:function(e){var t=this.context;return t.length>e?new Kt(t[e],this[e]):null},filter:function(e){var t=[];if(Ci.filter)t=Ci.filter.call(this,e,this);else for(var i=0,n=this.length;n>i;i++)e.call(this,this[i],i,this)&&t.push(this[i]);return new Kt(this.context,t)},flatten:function(){var e=[];return new Kt(this.context,e.concat.apply(e,this.toArray()))},join:Ci.join,indexOf:Ci.indexOf||function(e,t){for(var i=t||0,n=this.length;n>i;i++)if(this[i]===e)return i;return-1},iterator:function(e,t,n,s){var r,a,o,l,u,c,h,d,f=[],p=this.context,g=this.selector;for("string"==typeof e&&(s=n,n=t,t=e,e=!1),a=0,o=p.length;o>a;a++){var m=new Kt(p[a]);if("table"===t)r=n.call(m,p[a],a),r!==i&&f.push(r);else if("columns"===t||"rows"===t)r=n.call(m,p[a],this[a],a),r!==i&&f.push(r);else if("column"===t||"column-rows"===t||"row"===t||"cell"===t)for(h=this[a],"column-rows"===t&&(c=Mi(p[a],g.opts)),l=0,u=h.length;u>l;l++)d=h[l],r="cell"===t?n.call(m,p[a],d.row,d.column,a,l):n.call(m,p[a],d,a,l,c),r!==i&&f.push(r)}if(f.length||s){var v=new Kt(p,e?f.concat.apply([],f):f),y=v.selector;return y.rows=g.rows,y.cols=g.cols,y.opts=g.opts,v}return this},lastIndexOf:Ci.lastIndexOf||function(){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(e){var t=[];if(Ci.map)t=Ci.map.call(this,e,this);else for(var i=0,n=this.length;n>i;i++)t.push(e.call(this,this[i],i));return new Kt(this.context,t)},pluck:function(e){return this.map(function(t){return t[e]})},pop:Ci.pop,push:Ci.push,reduce:Ci.reduce||function(e,t){return c(this,e,t,0,this.length,1)},reduceRight:Ci.reduceRight||function(e,t){return c(this,e,t,this.length-1,-1,-1)},reverse:Ci.reverse,selector:null,shift:Ci.shift,sort:Ci.sort,splice:Ci.splice,toArray:function(){return Ci.slice.call(this)},to$:function(){return n(this)},toJQuery:function(){return n(this)},unique:function(){return new Kt(this.context,vi(this))},unshift:Ci.unshift},Kt.extend=function(e,t,i){if(t&&(t instanceof Kt||t.__dt_wrapper)){var s,r,a,o=function(e,t,i){return function(){var n=t.apply(e,arguments);return Kt.extend(n,n,i.methodExt),n}};for(s=0,r=i.length;r>s;s++)a=i[s],t[a.name]="function"==typeof a.val?o(e,a.val,a):n.isPlainObject(a.val)?{}:a.val,t[a.name].__dt_wrapper=!0,Kt.extend(e,t[a.name],a.propExt)}},Kt.register=Xt=function(e,t){if(n.isArray(e))for(var i=0,s=e.length;s>i;i++)Kt.register(e[i],t);else{var r,a,o,l,u=e.split("."),c=Di,h=function(e,t){for(var i=0,n=e.length;n>i;i++)if(e[i].name===t)return e[i];return null};for(r=0,a=u.length;a>r;r++){l=-1!==u[r].indexOf("()"),o=l?u[r].replace("()",""):u[r];var d=h(c,o);d||(d={name:o,val:{},methodExt:[],propExt:[]},c.push(d)),r===a-1?d.val=t:c=l?d.methodExt:d.propExt}}},Kt.registerPlural=Qt=function(e,t,s){Kt.register(e,s),Kt.register(t,function(){var e=s.apply(this,arguments);return e===this?this:e instanceof Kt?e.length?n.isArray(e[0])?new Kt(e.context,e[0]):e[0]:i:e})};var Ti=function(e,t){if("number"==typeof e)return[t[e]];var i=n.map(t,function(e){return e.nTable});return n(i).filter(e).map(function(){var e=n.inArray(this,i);return t[e]}).toArray()};Xt("tables()",function(e){return e?new Kt(Ti(e,this.context)):this}),Xt("table()",function(e){var t=this.tables(e),i=t.context;return i.length?new Kt(i[0]):t}),Qt("tables().nodes()","table().node()",function(){return this.iterator("table",function(e){return e.nTable},1)}),Qt("tables().body()","table().body()",function(){return this.iterator("table",function(e){return e.nTBody},1)}),Qt("tables().header()","table().header()",function(){return this.iterator("table",function(e){return e.nTHead},1)}),Qt("tables().footer()","table().footer()",function(){return this.iterator("table",function(e){return e.nTFoot},1)}),Qt("tables().containers()","table().container()",function(){return this.iterator("table",function(e){return e.nTableWrapper},1)}),Xt("draw()",function(e){return this.iterator("table",function(t){j(t,e===!1)})}),Xt("page()",function(e){return e===i?this.page.info().page:this.iterator("table",function(t){dt(t,e)})}),Xt("page.info()",function(){if(0===this.context.length)return i;var e=this.context[0],t=e._iDisplayStart,n=e._iDisplayLength,s=e.fnRecordsDisplay(),r=-1===n;return{page:r?0:Math.floor(t/n),pages:r?1:Math.ceil(s/n),start:t,end:e.fnDisplayEnd(),length:n,recordsTotal:e.fnRecordsTotal(),recordsDisplay:s}}),Xt("page.len()",function(e){return e===i?0!==this.context.length?this.context[0]._iDisplayLength:i:this.iterator("table",function(t){ut(t,e)})});var Pi=function(e,t,i){if("ssp"==Bt(e)?j(e,t):(pt(e,!0),$(e,[],function(i){A(e);for(var n=G(e,i),s=0,r=n.length;r>s;s++)_(e,n[s]);j(e,t),pt(e,!1)})),i){var n=new Kt(e);n.one("draw",function(){i(n.ajax.json())})}};Xt("ajax.json()",function(){var e=this.context;return e.length>0?e[0].json:void 0}),Xt("ajax.params()",function(){var e=this.context;return e.length>0?e[0].oAjaxData:void 0}),Xt("ajax.reload()",function(e,t){return this.iterator("table",function(i){Pi(i,t===!1,e)})}),Xt("ajax.url("/remote/a.mtstatic.com/deki/javascript/out/community.min.js%3F_=472f77b4:site_4040")",function(e){var t=this.context;return e===i?0===t.length?i:(t=t[0],t.ajax?n.isPlainObject(t.ajax)?t.ajax.url:t.ajax:t.sAjaxSource):this.iterator("table",function(t){n.isPlainObject(t.ajax)?t.ajax.url=e:t.ajax=e})}),Xt("ajax.url("/remote/a.mtstatic.com/deki/javascript/out/community.min.js%3F_=472f77b4:site_4040").load()",function(e,t){return this.iterator("table",function(i){Pi(i,t===!1,e)})});var Ii=function(e,t){var s,r,a,o,l,u,c=[],h=typeof e;for(e&&"string"!==h&&"function"!==h&&e.length!==i||(e=[e]),a=0,o=e.length;o>a;a++)for(r=e[a]&&e[a].split?e[a].split(","):[e[a]],l=0,u=r.length;u>l;l++)s=t("string"==typeof r[l]?n.trim(r[l]):r[l]),s&&s.length&&c.push.apply(c,s);return c},Ai=function(e){return e||(e={}),e.filter&&!e.search&&(e.search=e.filter),{search:e.search||"none",order:e.order||"current",page:e.page||"all"}},Ni=function(e){for(var t=0,i=e.length;i>t;t++)if(e[t].length>0)return e[0]=e[t],e.length=1,e.context=[e.context[t]],e;return e.length=0,e},Mi=function(e,t){var i,s,r,a=[],o=e.aiDisplay,l=e.aiDisplayMaster,u=t.search,c=t.order,h=t.page;if("ssp"==Bt(e))return"removed"===u?[]:pi(0,l.length);if("current"==h)for(i=e._iDisplayStart,s=e.fnDisplayEnd();s>i;i++)a.push(o[i]);else if("current"==c||"applied"==c)a="none"==u?l.slice():"applied"==u?o.slice():n.map(l,function(e){return-1===n.inArray(e,o)?e:null});else if("index"==c||"original"==c)for(i=0,s=e.aoData.length;s>i;i++)"none"==u?a.push(i):(r=n.inArray(i,o),(-1===r&&"removed"==u||r>=0&&"applied"==u)&&a.push(i));return a},Ei=function(e,t,i){return Ii(t,function(t){var s=oi(t);if(null!==s&&!i)return[s];var r=Mi(e,i);if(null!==s&&-1!==n.inArray(s,r))return[s];if(!t)return r;if("function"==typeof t)return n.map(r,function(i){var n=e.aoData[i];return t(i,n._aData,n.nTr)?i:null});var a=gi(fi(e.aoData,r,"nTr"));return t.nodeName&&-1!==n.inArray(t,a)?[t._DT_RowIndex]:n(a).filter(t).map(function(){return this._DT_RowIndex}).toArray()})};Xt("rows()",function(e,t){e===i?e="":n.isPlainObject(e)&&(t=e,e=""),t=Ai(t);var s=this.iterator("table",function(i){return Ei(i,e,t)},1);return s.selector.rows=e,s.selector.opts=t,s}),Xt("rows().nodes()",function(){return this.iterator("row",function(e,t){return e.aoData[t].nTr||i},1)}),Xt("rows().data()",function(){return this.iterator(!0,"rows",function(e,t){return fi(e.aoData,t,"_aData")},1)}),Qt("rows().cache()","row().cache()",function(e){return this.iterator("row",function(t,i){var n=t.aoData[i];return"search"===e?n._aFilterData:n._aSortData},1)}),Qt("rows().invalidate()","row().invalidate()",function(e){return this.iterator("row",function(t,i){M(t,i,e)})}),Qt("rows().indexes()","row().index()",function(){return this.iterator("row",function(e,t){return t},1)}),Qt("rows().remove()","row().remove()",function(){var e=this;return this.iterator("row",function(t,i,s){var r=t.aoData;r.splice(i,1);for(var a=0,o=r.length;o>a;a++)null!==r[a].nTr&&(r[a].nTr._DT_RowIndex=a);n.inArray(i,t.aiDisplay);N(t.aiDisplayMaster,i),N(t.aiDisplay,i),N(e[s],i,!1),Wt(t)})}),Xt("rows.add()",function(e){var t=this.iterator("table",function(t){var i,n,s,r=[];for(n=0,s=e.length;s>n;n++)i=e[n],r.push(i.nodeName&&"TR"===i.nodeName.toUpperCase()?w(t,i)[0]:_(t,i));return r},1),i=this.rows(-1);return i.pop(),i.push.apply(i,t.toArray()),i}),Xt("row()",function(e,t){return Ni(this.rows(e,t))}),Xt("row().data()",function(e){var t=this.context;return e===i?t.length&&this.length?t[0].aoData[this[0]]._aData:i:(t[0].aoData[this[0]]._aData=e,M(t[0],this[0],"data"),this)}),Xt("row().node()",function(){var e=this.context;return e.length&&this.length?e[0].aoData[this[0]].nTr||null:null}),Xt("row.add()",function(e){e instanceof n&&e.length&&(e=e[0]);var t=this.iterator("table",function(t){return e.nodeName&&"TR"===e.nodeName.toUpperCase()?w(t,e)[0]:_(t,e)});return this.row(t[0])});var Fi=function(e,t,i,s){var r=[],a=function(t,i){if(t.nodeName&&"tr"===t.nodeName.toLowerCase())r.push(t);else{var s=n("<tr><td/></tr>").addClass(i);n("td",s).addClass(i).html(t)[0].colSpan=m(e),r.push(s[0])}};if(n.isArray(i)||i instanceof n)for(var o=0,l=i.length;l>o;o++)a(i[o],s);else a(i,s);t._details&&t._details.remove(),t._details=n(r),t._detailsShow&&t._details.insertAfter(t.nTr)},Oi=function(e,t){var n=e.context;if(n.length){var s=n[0].aoData[t!==i?t:e[0]];s._details&&(s._details.remove(),s._detailsShow=i,s._details=i)}},Hi=function(e,t){var i=e.context;if(i.length&&e.length){var n=i[0].aoData[e[0]];n._details&&(n._detailsShow=t,t?n._details.insertAfter(n.nTr):n._details.detach(),Ri(i[0]))}},Ri=function(e){var t=new Kt(e),i=".dt.DT_details",n="draw"+i,s="column-visibility"+i,r="destroy"+i,a=e.aoData;t.off(n+" "+s+" "+r),di(a,"_details").length>0&&(t.on(n,function(i,n){e===n&&t.rows({page:"current"}).eq(0).each(function(e){var t=a[e];t._detailsShow&&t._details.insertAfter(t.nTr)})}),t.on(s,function(t,i){if(e===i)for(var n,s=m(i),r=0,o=a.length;o>r;r++)n=a[r],n._details&&n._details.children("td[colspan]").attr("colspan",s)}),t.on(r,function(i,n){if(e===n)for(var s=0,r=a.length;r>s;s++)a[s]._details&&Oi(t,s)}))},Li="",ji=Li+"row().child",Ui=ji+"()";Xt(Ui,function(e,t){var n=this.context;return e===i?n.length&&this.length?n[0].aoData[this[0]]._details:i:(e===!0?this.child.show():e===!1?Oi(this):n.length&&this.length&&Fi(n[0],n[0].aoData[this[0]],e,t),this)}),Xt([ji+".show()",Ui+".show()"],function(){return Hi(this,!0),this}),Xt([ji+".hide()",Ui+".hide()"],function(){return Hi(this,!1),this}),Xt([ji+".remove()",Ui+".remove()"],function(){return Oi(this),this}),Xt(ji+".isShown()",function(){var e=this.context;return e.length&&this.length?e[0].aoData[this[0]]._detailsShow||!1:!1});var zi=/^(.+):(name|visIdx|visible)$/,Wi=function(e,t,i,n,s){for(var r=[],a=0,o=s.length;o>a;a++)r.push(D(e,s[a],t));return r},$i=function(e,t,i){var s=e.aoColumns,r=di(s,"sName"),a=di(s,"nTh");return Ii(t,function(t){var o=oi(t);if(""===t)return pi(s.length);if(null!==o)return[o>=0?o:s.length+o];if("function"==typeof t){var l=Mi(e,i);return n.map(s,function(i,n){return t(n,Wi(e,n,0,0,l),a[n])?n:null})}var u="string"==typeof t?t.match(zi):"";if(!u)return n(a).filter(t).map(function(){return n.inArray(this,a)}).toArray();switch(u[2]){case"visIdx":case"visible":var c=parseInt(u[1],10);if(0>c){var h=n.map(s,function(e,t){return e.bVisible?t:null});return[h[h.length+c]]}return[p(e,c)];case"name":return n.map(r,function(e,t){return e===u[1]?t:null})}})},Bi=function(e,t,s,r){var a,o,l,u,c=e.aoColumns,h=c[t],d=e.aoData;if(s===i)return h.bVisible;if(h.bVisible!==s){if(s){var p=n.inArray(!0,di(c,"bVisible"),t+1);for(o=0,l=d.length;l>o;o++)u=d[o].nTr,a=d[o].anCells,u&&u.insertBefore(a[t],a[p]||null)}else n(di(e.aoData,"anCells",t)).detach();h.bVisible=s,R(e,e.aoHeader),R(e,e.aoFooter),(r===i||r)&&(f(e),(e.oScroll.sX||e.oScroll.sY)&&mt(e)),zt(e,null,"column-visibility",[e,t,s]),Et(e)}};Xt("columns()",function(e,t){e===i?e="":n.isPlainObject(e)&&(t=e,e=""),t=Ai(t);var s=this.iterator("table",function(i){return $i(i,e,t)},1);return s.selector.cols=e,s.selector.opts=t,s}),Qt("columns().header()","column().header()",function(){return this.iterator("column",function(e,t){return e.aoColumns[t].nTh},1)}),Qt("columns().footer()","column().footer()",function(){return this.iterator("column",function(e,t){return e.aoColumns[t].nTf},1)}),Qt("columns().data()","column().data()",function(){return this.iterator("column-rows",Wi,1)}),Qt("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(e,t){return e.aoColumns[t].mData},1)}),Qt("columns().cache()","column().cache()",function(e){return this.iterator("column-rows",function(t,i,n,s,r){return fi(t.aoData,r,"search"===e?"_aFilterData":"_aSortData",i)},1)}),Qt("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(e,t,i,n,s){return fi(e.aoData,s,"anCells",t)},1)}),Qt("columns().visible()","column().visible()",function(e,t){return this.iterator("column",function(n,s){return e===i?n.aoColumns[s].bVisible:void Bi(n,s,e,t)})}),Qt("columns().indexes()","column().index()",function(e){return this.iterator("column",function(t,i){return"visible"===e?g(t,i):i},1)}),Xt("columns.adjust()",function(){return this.iterator("table",function(e){f(e)},1)}),Xt("column.index()",function(e,t){if(0!==this.context.length){var i=this.context[0];if("fromVisible"===e||"toData"===e)return p(i,t);if("fromData"===e||"toVisible"===e)return g(i,t)}}),Xt("column()",function(e,t){return Ni(this.columns(e,t))});var qi=function(e,t,s){var r,a,o,l,u,c,h,d=e.aoData,f=Mi(e,s),p=gi(fi(d,f,"anCells")),g=n([].concat.apply([],p)),m=e.aoColumns.length;return Ii(t,function(t){var s="function"==typeof t;if(null===t||t===i||s){for(a=[],o=0,l=f.length;l>o;o++)for(r=f[o],u=0;m>u;u++)c={row:r,column:u},s?(h=e.aoData[r],t(c,D(e,r,u),h.anCells[u])&&a.push(c)):a.push(c);return a}return n.isPlainObject(t)?[t]:g.filter(t).map(function(e,t){return r=t.parentNode._DT_RowIndex,{row:r,column:n.inArray(t,d[r].anCells)}}).toArray()})};Xt("cells()",function(e,t,s){if(n.isPlainObject(e)&&(typeof e.row!==i?(s=t,t=null):(s=e,e=null)),n.isPlainObject(t)&&(s=t,t=null),null===t||t===i)return this.iterator("table",function(t){return qi(t,e,Ai(s))});var r,a,o,l,u,c=this.columns(t,s),h=this.rows(e,s),d=this.iterator("table",function(e,t){for(r=[],a=0,o=h[t].length;o>a;a++)for(l=0,u=c[t].length;u>l;l++)r.push({row:h[t][a],column:c[t][l]});return r},1);return n.extend(d.selector,{cols:t,rows:e,opts:s}),d}),Qt("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(e,t,n){var s=e.aoData[t].anCells;return s?s[n]:i},1)}),Xt("cells().data()",function(){return this.iterator("cell",function(e,t,i){return D(e,t,i)},1)}),Qt("cells().cache()","cell().cache()",function(e){return e="search"===e?"_aFilterData":"_aSortData",this.iterator("cell",function(t,i,n){return t.aoData[i][e][n]},1)}),Qt("cells().render()","cell().render()",function(e){return this.iterator("cell",function(t,i,n){return D(t,i,n,e)},1)}),Qt("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(e,t,i){return{row:t,column:i,columnVisible:g(e,i)}},1)}),Qt("cells().invalidate()","cell().invalidate()",function(e){return this.iterator("cell",function(t,i,n){M(t,i,e,n)})}),Xt("cell()",function(e,t,i){return Ni(this.cells(e,t,i))}),Xt("cell().data()",function(e){var t=this.context,n=this[0];return e===i?t.length&&n.length?D(t[0],n[0].row,n[0].column):i:(C(t[0],n[0].row,n[0].column,e),M(t[0],n[0].row,"data",n[0].column),this)}),Xt("order()",function(e,t){var s=this.context;return e===i?0!==s.length?s[0].aaSorting:i:("number"==typeof e?e=[[e,t]]:n.isArray(e[0])||(e=Array.prototype.slice.call(arguments)),this.iterator("table",function(t){t.aaSorting=e.slice()}))}),Xt("order.listener()",function(e,t,i){return this.iterator("table",function(n){At(n,e,t,i)})}),Xt(["columns().order()","column().order()"],function(e){var t=this;return this.iterator("table",function(i,s){var r=[];n.each(t[s],function(t,i){r.push([i,e])}),i.aaSorting=r})}),Xt("search()",function(e,t,s,r){var a=this.context;return e===i?0!==a.length?a[0].oPreviousSearch.sSearch:i:this.iterator("table",function(i){i.oFeatures.bFilter&&J(i,n.extend({},i.oPreviousSearch,{sSearch:e+"",bRegex:null===t?!1:t,bSmart:null===s?!0:s,bCaseInsensitive:null===r?!0:r}),1)})}),Qt("columns().search()","column().search()",function(e,t,s,r){return this.iterator("column",function(a,o){var l=a.aoPreSearchCols;return e===i?l[o].sSearch:void(a.oFeatures.bFilter&&(n.extend(l[o],{sSearch:e+"",bRegex:null===t?!1:t,bSmart:null===s?!0:s,bCaseInsensitive:null===r?!0:r}),J(a,a.oPreviousSearch,1)))})}),Xt("state()",function(){return this.context.length?this.context[0].oSavedState:null}),Xt("state.clear()",function(){return this.iterator("table",function(e){e.fnStateSaveCallback.call(e.oInstance,e,{})})}),Xt("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null}),Xt("state.save()",function(){return this.iterator("table",function(e){Et(e)})}),Vt.versionCheck=Vt.fnVersionCheck=function(e){for(var t,i,n=Vt.version.split("."),s=e.split("."),r=0,a=s.length;a>r;r++)if(t=parseInt(n[r],10)||0,i=parseInt(s[r],10)||0,t!==i)return t>i;return!0},Vt.isDataTable=Vt.fnIsDataTable=function(e){var t=n(e).get(0),i=!1;return n.each(Vt.settings,function(e,n){(n.nTable===t||n.nScrollHead===t||n.nScrollFoot===t)&&(i=!0)}),i},Vt.tables=Vt.fnTables=function(e){return n.map(Vt.settings,function(t){return!e||e&&n(t.nTable).is(":visible")?t.nTable:void 0})},Vt.util={throttle:bt,escapeRegex:et},Vt.camelToHungarian=r,Xt("$()",function(e,t){var i=this.rows(t).nodes(),s=n(i);return n([].concat(s.filter(e).toArray(),s.find(e).toArray()))}),n.each(["on","one","off"],function(e,t){Xt(t+"()",function(){var e=Array.prototype.slice.call(arguments);e[0].match(/\.dt\b/)||(e[0]+=".dt");var i=n(this.tables().nodes());return i[t].apply(i,e),this})}),Xt("clear()",function(){return this.iterator("table",function(e){A(e)})}),Xt("settings()",function(){return new Kt(this.context,this.context)}),Xt("data()",function(){return this.iterator("table",function(e){return di(e.aoData,"_aData")}).flatten()}),Xt("destroy()",function(t){return t=t||!1,this.iterator("table",function(i){var s,r=i.nTableWrapper.parentNode,a=i.oClasses,o=i.nTable,l=i.nTBody,u=i.nTHead,c=i.nTFoot,h=n(o),d=n(l),f=n(i.nTableWrapper),p=n.map(i.aoData,function(e){return e.nTr});i.bDestroying=!0,zt(i,"aoDestroyCallback","destroy",[i]),t||new Kt(i).columns().visible(!0),f.unbind(".DT").find(":not(tbody *)").unbind(".DT"),n(e).unbind(".DT-"+i.sInstance),o!=u.parentNode&&(h.children("thead").detach(),h.append(u)),c&&o!=c.parentNode&&(h.children("tfoot").detach(),h.append(c)),h.detach(),f.detach(),i.aaSorting=[],i.aaSortingFixed=[],Nt(i),n(p).removeClass(i.asStripeClasses.join(" ")),n("th, td",u).removeClass(a.sSortable+" "+a.sSortableAsc+" "+a.sSortableDesc+" "+a.sSortableNone),i.bJUI&&(n("th span."+a.sSortIcon+", td span."+a.sSortIcon,u).detach(),n("th, td",u).each(function(){var e=n("div."+a.sSortJUIWrapper,this);n(this).append(e.contents()),e.detach()})),!t&&r&&r.insertBefore(o,i.nTableReinsertBefore),d.children().detach(),d.append(p),h.css("width",i.sDestroyWidth).removeClass(a.sTable),s=i.asDestroyStripes.length,s&&d.children().each(function(e){n(this).addClass(i.asDestroyStripes[e%s])});var g=n.inArray(i,Vt.settings);-1!==g&&Vt.settings.splice(g,1)})}),Vt.version="1.10.4",Vt.settings=[],Vt.models={},Vt.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0},Vt.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null},Vt.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},Vt.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(e){try{return JSON.parse((-1===e.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+e.sInstance+"_"+location.pathname))}catch(t){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(e,t){try{(-1===e.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+e.sInstance+"_"+location.pathname,JSON.stringify(t))}catch(i){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:n.extend({},Vt.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null},s(Vt.defaults),Vt.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},s(Vt.defaults.column),Vt.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:i,oAjaxData:i,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==Bt(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==Bt(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var e=this._iDisplayLength,t=this._iDisplayStart,i=t+e,n=this.aiDisplay.length,s=this.oFeatures,r=s.bPaginate;return s.bServerSide?r===!1||-1===e?t+n:Math.min(t+e,this._iRecordsDisplay):!r||i>n||-1===e?n:i},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{}},Vt.ext=Jt={classes:{},errMode:"alert",feature:[],search:[],internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:Vt.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:Vt.version},n.extend(Jt,{afnFiltering:Jt.search,aTypes:Jt.type.detect,ofnSearch:Jt.type.search,oSort:Jt.type.order,afnSortData:Jt.order,aoFeatures:Jt.feature,oApi:Jt.internal,oStdClasses:Jt.classes,oPagination:Jt.pager}),n.extend(Vt.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""}),function(){var e="";e="";var t=e+"ui-state-default",i=e+"css_right ui-icon ui-icon-",s=e+"fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix";n.extend(Vt.ext.oJUIClasses,Vt.ext.classes,{sPageButton:"fg-button ui-button "+t,sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:t+" sorting_asc",sSortDesc:t+" sorting_desc",sSortable:t+" sorting",sSortableAsc:t+" sorting_asc_disabled",sSortableDesc:t+" sorting_desc_disabled",sSortableNone:t+" sorting_disabled",sSortJUIAsc:i+"triangle-1-n",sSortJUIDesc:i+"triangle-1-s",sSortJUI:i+"carat-2-n-s",sSortJUIAscAllowed:i+"carat-1-n",sSortJUIDescAllowed:i+"carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead "+t,sScrollFoot:"dataTables_scrollFoot "+t,sHeaderTH:t,sFooterTH:t,sJUIHeader:s+" ui-corner-tl ui-corner-tr",sJUIFooter:s+" ui-corner-bl ui-corner-br"})}();var Yi=Vt.ext.pager;n.extend(Yi,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},simple_numbers:function(e,t){return["previous",qt(e,t),"next"]},full_numbers:function(e,t){return["first","previous",qt(e,t),"next","last"]},_numbers:qt,numbers_length:7}),n.extend(!0,Vt.ext.renderer,{pageButton:{_:function(e,i,s,r,a,o){var l,u,c=e.oClasses,h=e.oLanguage.oPaginate,d=0,f=function(t,i){var r,p,g,m,v=function(t){dt(e,t.data.action,!0)};for(r=0,p=i.length;p>r;r++)if(m=i[r],n.isArray(m)){var y=n("<"+(m.DT_el||"div")+"/>").appendTo(t);f(y,m)}else{switch(l="",u="",m){case"ellipsis":t.append("<span>&hellip;</span>");break;case"first":l=h.sFirst,u=m+(a>0?"":" "+c.sPageButtonDisabled);break;case"previous":l=h.sPrevious,u=m+(a>0?"":" "+c.sPageButtonDisabled);break;case"next":l=h.sNext,u=m+(o-1>a?"":" "+c.sPageButtonDisabled);break;case"last":l=h.sLast,u=m+(o-1>a?"":" "+c.sPageButtonDisabled);break;default:l=m+1,u=a===m?c.sPageButtonActive:""}l&&(g=n("<a>",{"class":c.sPageButton+" "+u,"aria-controls":e.sTableId,"data-dt-idx":d,tabindex:e.iTabIndex,id:0===s&&"string"==typeof m?e.sTableId+"_"+m:null}).html(l).appendTo(t),jt(g,{action:m},v),d++)}};try{var p=n(t.activeElement).data("dt-idx");f(n(i).empty(),r),null!==p&&n(i).find("[data-dt-idx="+p+"]").focus()}catch(g){}}}}),n.extend(Vt.ext.type.detect,[function(e,t){var i=t.oLanguage.sDecimal;return ui(e,i)?"num"+i:null},function(e){if(!(!e||e instanceof Date||ii.test(e)&&ni.test(e)))return null;var t=Date.parse(e);return null!==t&&!isNaN(t)||ai(e)?"date":null},function(e,t){var i=t.oLanguage.sDecimal;return ui(e,i,!0)?"num-fmt"+i:null},function(e,t){var i=t.oLanguage.sDecimal;return hi(e,i)?"html-num"+i:null},function(e,t){var i=t.oLanguage.sDecimal;return hi(e,i,!0)?"html-num-fmt"+i:null},function(e){return ai(e)||"string"==typeof e&&-1!==e.indexOf("<")?"html":null}]),n.extend(Vt.ext.type.search,{html:function(e){return ai(e)?e:"string"==typeof e?e.replace(ei," ").replace(ti,""):""},string:function(e){return ai(e)?e:"string"==typeof e?e.replace(ei," "):e}});var Gi=function(e,t,i,n){return 0===e||e&&"-"!==e?(t&&(e=li(e,t)),e.replace&&(i&&(e=e.replace(i,"")),n&&(e=e.replace(n,""))),1*e):-1/0};return n.extend(Jt.type.order,{"date-pre":function(e){return Date.parse(e)||0},"html-pre":function(e){return ai(e)?"":e.replace?e.replace(/<.*?>/g,"").toLowerCase():e+""},"string-pre":function(e){return ai(e)?"":"string"==typeof e?e.toLowerCase():e.toString?e.toString():""},"string-asc":function(e,t){return t>e?-1:e>t?1:0},"string-desc":function(e,t){return t>e?1:e>t?-1:0}}),Yt(""),n.extend(!0,Vt.ext.renderer,{header:{_:function(e,t,i,s){n(e.nTable).on("order.dt.DT",function(n,r,a,o){if(e===r){var l=i.idx;t.removeClass(i.sSortingClass+" "+s.sSortAsc+" "+s.sSortDesc).addClass("asc"==o[l]?s.sSortAsc:"desc"==o[l]?s.sSortDesc:i.sSortingClass)}})},jqueryui:function(e,t,i,s){n("<div/>").addClass(s.sSortJUIWrapper).append(t.contents()).append(n("<span/>").addClass(s.sSortIcon+" "+i.sSortingClassJUI)).appendTo(t),n(e.nTable).on("order.dt.DT",function(n,r,a,o){if(e===r){var l=i.idx;t.removeClass(s.sSortAsc+" "+s.sSortDesc).addClass("asc"==o[l]?s.sSortAsc:"desc"==o[l]?s.sSortDesc:i.sSortingClass),t.find("span."+s.sSortIcon).removeClass(s.sSortJUIAsc+" "+s.sSortJUIDesc+" "+s.sSortJUI+" "+s.sSortJUIAscAllowed+" "+s.sSortJUIDescAllowed).addClass("asc"==o[l]?s.sSortJUIAsc:"desc"==o[l]?s.sSortJUIDesc:i.sSortingClassJUI)
}})}}}),Vt.render={number:function(e,t,i,n){return{display:function(s){var r=0>s?"-":"";s=Math.abs(parseFloat(s));var a=parseInt(s,10),o=i?t+(s-a).toFixed(i).substring(2):"";return r+(n||"")+a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,e)+o}}}},n.extend(Vt.ext.internal,{_fnExternApiFunc:Gt,_fnBuildAjax:$,_fnAjaxUpdate:B,_fnAjaxParameters:q,_fnAjaxUpdateDraw:Y,_fnAjaxDataSrc:G,_fnAddColumn:h,_fnColumnOptions:d,_fnAdjustColumnSizing:f,_fnVisibleToColumnIndex:p,_fnColumnIndexToVisible:g,_fnVisbleColumns:m,_fnGetColumns:v,_fnColumnTypes:y,_fnApplyColumnDefs:b,_fnHungarianMap:s,_fnCamelToHungarian:r,_fnLanguageCompat:a,_fnBrowserDetect:u,_fnAddData:_,_fnAddTr:w,_fnNodeToDataIndex:x,_fnNodeToColumnIndex:k,_fnGetCellData:D,_fnSetCellData:C,_fnSplitObjNotation:S,_fnGetObjectDataFn:T,_fnSetObjectDataFn:P,_fnGetDataMaster:I,_fnClearTable:A,_fnDeleteIndex:N,_fnInvalidate:M,_fnGetRowElements:E,_fnCreateTr:F,_fnBuildHead:H,_fnDrawHead:R,_fnDraw:L,_fnReDraw:j,_fnAddOptionsHtml:U,_fnDetectHeader:z,_fnGetUniqueThs:W,_fnFeatureHtmlFilter:V,_fnFilterComplete:J,_fnFilterCustom:K,_fnFilterColumn:X,_fnFilter:Q,_fnFilterCreateSearch:Z,_fnEscapeRegex:et,_fnFilterData:tt,_fnFeatureHtmlInfo:st,_fnUpdateInfo:rt,_fnInfoMacros:at,_fnInitialise:ot,_fnInitComplete:lt,_fnLengthChange:ut,_fnFeatureHtmlLength:ct,_fnFeatureHtmlPaginate:ht,_fnPageChange:dt,_fnFeatureHtmlProcessing:ft,_fnProcessingDisplay:pt,_fnFeatureHtmlTable:gt,_fnScrollDraw:mt,_fnApplyToChildren:vt,_fnCalculateColumnWidths:yt,_fnThrottle:bt,_fnConvertToWidth:_t,_fnScrollingWidthAdjust:wt,_fnGetWidestNode:xt,_fnGetMaxLenString:kt,_fnStringToCss:Dt,_fnScrollBarWidth:Ct,_fnSortFlatten:St,_fnSort:Tt,_fnSortAria:Pt,_fnSortListener:It,_fnSortAttachListener:At,_fnSortingClasses:Nt,_fnSortData:Mt,_fnSaveState:Et,_fnLoadState:Ft,_fnSettingsFromNode:Ot,_fnLog:Ht,_fnMap:Rt,_fnBindAction:jt,_fnCallbackReg:Ut,_fnCallbackFire:zt,_fnLengthOverflow:Wt,_fnRenderer:$t,_fnDataSource:Bt,_fnRowAttributes:O,_fnCalculateEnd:function(){}}),n.fn.dataTable=Vt,n.fn.dataTableSettings=Vt.settings,n.fn.dataTableExt=Vt.ext,n.fn.DataTable=function(e){return n(this).dataTable(e).api()},n.each(Vt,function(e,t){n.fn.DataTable[e]=t}),n.fn.dataTable})}(window,document),function($){$.fn.editable=function(e,t){if("disable"==e)return void $(this).data("disabled.editable",!0);if("enable"==e)return void $(this).data("disabled.editable",!1);if("destroy"==e)return void $(this).unbind($(this).data("event.editable")).removeData("disabled.editable").removeData("event.editable");var i=$.extend({},$.fn.editable.defaults,{target:e},t),n=$.editable.types[i.type].plugin||function(){},s=$.editable.types[i.type].submit||function(){},r=$.editable.types[i.type].buttons||$.editable.types.defaults.buttons,a=$.editable.types[i.type].content||$.editable.types.defaults.content,o=$.editable.types[i.type].element||$.editable.types.defaults.element,l=$.editable.types[i.type].reset||$.editable.types.defaults.reset,u=i.callback||function(){},c=i.onedit||function(){},h=i.onsubmit||function(){},d=i.onreset||function(){},f=i.onerror||l;return i.tooltip&&$(this).attr("title",i.tooltip),i.autowidth="auto"==i.width,i.autoheight="auto"==i.height,this.each(function(){var e=this,t=$(e).width(),p=$(e).height();$(this).data("event.editable",i.event),$.trim($(this).html())||$(this).html(i.placeholder),$(this).bind(i.event,function(d){if(!0!==$(this).data("disabled.editable")&&!e.editing&&!1!==c.apply(this,[i,e])){d.preventDefault(),d.stopPropagation(),i.tooltip&&$(e).removeAttr("title"),0==$(e).width()?(i.width=t,i.height=p):("none"!=i.width&&(i.width=i.autowidth?$(e).width():i.width),"none"!=i.height&&(i.height=i.autoheight?$(e).height():i.height)),$(this).html().toLowerCase().replace(/(;|"|\/)/g,"")==i.placeholder.toLowerCase().replace(/(;|"|\/)/g,"")&&$(this).html(""),e.editing=!0,e.revert=$(e).html(),$(e).html("");var g=$("<form />");i.cssclass&&("inherit"==i.cssclass?g.attr("class",$(e).attr("class")):g.attr("class",i.cssclass)),i.style&&("inherit"==i.style?(g.attr("style",$(e).attr("style")),g.css("display",$(e).css("display"))):g.attr("style",i.style));var m,v=o.apply(g,[i,e]);if(i.loadurl){var y=setTimeout(function(){v.disabled=!0,a.apply(g,[i.loadtext,i,e])},100),b={};b[i.id]=e.id,$.isFunction(i.loaddata)?$.extend(b,i.loaddata.apply(e,[e.revert,i])):$.extend(b,i.loaddata),$.ajax({type:i.loadtype,url:i.loadurl,data:b,async:!1,success:function(e){window.clearTimeout(y),m=e,v.disabled=!1}})}else i.data?(m=i.data,$.isFunction(i.data)&&(m=i.data.apply(e,[e.revert,i]))):m=e.revert;a.apply(g,[m,i,e]),v.attr("name",i.name),r.apply(g,[i,e]),$(e).append(g),n.apply(g,[i,e]),$(":input:visible:enabled:first",g).focus(),i.select&&v.select(),v.keydown(function(t){27==t.keyCode&&(t.preventDefault(),l.apply(g,[i,e]))});var y;v.blur("cancel"==i.onblur?function(){y=setTimeout(function(){l.apply(g,[i,e])},500)}:"submit"==i.onblur?function(){y=setTimeout(function(){g.submit()},200)}:$.isFunction(i.onblur)?function(){i.onblur.apply(e,[v.val(),i])}:function(){}),g.submit(function(t){if(y&&clearTimeout(y),t.preventDefault(),!1!==h.apply(g,[i,e])&&!1!==s.apply(g,[i,e]))if($.isFunction(i.target)){var n=i.target.apply(e,[v.val(),i]);$(e).html(n),e.editing=!1,u.apply(e,[e.innerHTML,i]),$.trim($(e).html())||$(e).html(i.placeholder)}else{var r={};r[i.name]=v.val(),r[i.id]=e.id,$.isFunction(i.submitdata)?$.extend(r,i.submitdata.apply(e,[e.revert,i])):$.extend(r,i.submitdata),"PUT"==i.method&&(r._method="put"),$(e).html(i.indicator);var a={type:"POST",data:r,dataType:"html",url:i.target,success:function(t){"html"==a.dataType&&$(e).html(t),e.editing=!1,u.apply(e,[t,i]),$.trim($(e).html())||$(e).html(i.placeholder)},error:function(t){f.apply(g,[i,e,t])}};$.extend(a,i.ajaxoptions),$.ajax(a)}return $(e).attr("title",i.tooltip),!1})}}),this.reset=function(t){this.editing&&!1!==d.apply(t,[i,e])&&($(e).html(e.revert),e.editing=!1,$.trim($(e).html())||$(e).html(i.placeholder),i.tooltip&&$(e).attr("title",i.tooltip))}})},$.editable={types:{defaults:{element:function(){var e=$('<input type="hidden"></input>');return $(this).append(e),e},content:function(e){$(":input:first",this).val(e)},reset:function(e,t){t.reset(this)},buttons:function(e,t){var i=this;if(e.submit){if(e.submit.match(/>$/))var n=$(e.submit).click(function(){"submit"!=n.attr("type")&&i.submit()});else{var n=$('<button type="submit" />');n.html(e.submit)}$(this).append(n)}if(e.cancel){if(e.cancel.match(/>$/))var s=$(e.cancel);else{var s=$('<button type="cancel" />');s.html(e.cancel)}$(this).append(s),$(s).click(function(){if($.isFunction($.editable.types[e.type].reset))var n=$.editable.types[e.type].reset;else var n=$.editable.types.defaults.reset;return n.apply(i,[e,t]),!1})}}},text:{element:function(e){var t=$("<input />");return"none"!=e.width&&t.width(e.width),"none"!=e.height&&t.height(e.height),t.attr("autocomplete","off"),$(this).append(t),t}},textarea:{element:function(e){var t=$("<textarea />");return e.rows?t.attr("rows",e.rows):"none"!=e.height&&t.height(e.height),e.cols?t.attr("cols",e.cols):"none"!=e.width&&t.width(e.width),$(this).append(t),t}},select:{element:function(){var e=$("<select />");return $(this).append(e),e},content:function(data,settings,original){if(String==data.constructor)eval("var json = "+data);else var json=data;for(var key in json)if(json.hasOwnProperty(key)&&"selected"!=key){var option=$("<option />").val(key).append(json[key]);$("select",this).append(option)}if($("select",this).children().each(function(){($(this).val()==json.selected||$(this).text()==$.trim(original.revert))&&$(this).attr("selected","selected")}),!settings.submit){var form=this;$("select",this).change(function(){form.submit()})}}}},addInputType:function(e,t){$.editable.types[e]=t}},$.fn.editable.defaults={name:"value",id:"id",type:"text",width:"auto",height:"auto",event:"click.editable",onblur:"cancel",loadtype:"GET",loadtext:"Loading...",placeholder:"Click to edit",loaddata:{},submitdata:{},ajaxoptions:{}}}(jQuery),function(e,t,i){function n(e){var t={},n=/^jQuery\d+$/;return i.each(e.attributes,function(e,i){i.specified&&!n.test(i.name)&&(t[i.name]=i.value)}),t}function s(e,t){var n=this,s=i(n);if(n.value==s.attr("placeholder")&&s.hasClass("placeholder"))if(s.data("placeholder-password")){if(s=s.hide().next().show().attr("id",s.removeAttr("id").data("placeholder-id")),e===!0)return s[0].value=t;s.focus()}else n.value="",s.removeClass("placeholder"),n==a()&&n.select()}function r(){var e,t=this,r=i(t),a=this.id;if(""==t.value){if("password"==t.type){if(!r.data("placeholder-textinput")){try{e=r.clone().attr({type:"text"})}catch(o){e=i("<input>").attr(i.extend(n(this),{type:"text"}))}e.removeAttr("name").data({"placeholder-password":r,"placeholder-id":a}).bind("focus.placeholder",s),r.data({"placeholder-textinput":e,"placeholder-id":a}).before(e)}r=r.removeAttr("id").hide().prev().attr("id",a).show()}r.addClass("placeholder"),r[0].value=r.attr("placeholder")}else r.removeClass("placeholder")}function a(){try{return t.activeElement}catch(e){}}var o,l,u="[object OperaMini]"==Object.prototype.toString.call(e.operamini),c="placeholder"in t.createElement("input")&&!u,h="placeholder"in t.createElement("textarea")&&!u,d=i.fn,f=i.valHooks,p=i.propHooks;c&&h?(l=d.placeholder=function(){return this},l.input=l.textarea=!0):(l=d.placeholder=function(){var e=this;return e.filter((c?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":s,"blur.placeholder":r}).data("placeholder-enabled",!0).trigger("blur.placeholder"),e},l.input=c,l.textarea=h,o={get:function(e){var t=i(e),n=t.data("placeholder-password");return n?n[0].value:t.data("placeholder-enabled")&&t.hasClass("placeholder")?"":e.value},set:function(e,t){var n=i(e),o=n.data("placeholder-password");return o?o[0].value=t:n.data("placeholder-enabled")?(""==t?(e.value=t,e!=a()&&r.call(e)):n.hasClass("placeholder")?s.call(e,!0,t)||(e.value=t):e.value=t,n):e.value=t}},c||(f.input=o,p.value=o),h||(f.textarea=o,p.value=o),i(function(){i(t).delegate("form","submit.placeholder",function(){var e=i(".placeholder",this).each(s);setTimeout(function(){e.each(r)},10)})}),i(e).bind("beforeunload.placeholder",function(){i(".placeholder").each(function(){this.value=""})}))}(this,document,jQuery),function(e){function t(e){return e=decodeURIComponent(e),e=e.replace("+"," ")}function i(e){var t=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,i=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],n=t.exec(e||""),s={};return i.forEach(function(e,t){s[e]=n[t]||""}),s}function n(e){var t,i,n,s,r,a,o=[];if("undefined"==typeof e||null===e||""===e)return o;for(0===e.indexOf("?")&&(e=e.substring(1)),i=e.toString().split(/[&;]/),t=0;t<i.length;t++)n=i[t],s=n.split("="),r=s[0],a=-1===n.indexOf("=")?null:null===s[1]?"":s[1],o.push([r,a]);return o}function s(e){this.uriParts=i(e),this.queryPairs=n(this.uriParts.query),this.hasAuthorityPrefixUserPref=null}Array.prototype.forEach||(Array.prototype.forEach=function(e,t){for(var i=0,n=this.length;n>i;++i)e.call(t||this,this[i],i,this)}),["protocol","userInfo","host","port","path","anchor"].forEach(function(e){s.prototype[e]=function(t){return"undefined"!=typeof t&&(this.uriParts[e]=t),this.uriParts[e]}}),s.prototype.hasAuthorityPrefix=function(e){return"undefined"!=typeof e&&(this.hasAuthorityPrefixUserPref=e),null===this.hasAuthorityPrefixUserPref?-1!==this.uriParts.source.indexOf("//"):this.hasAuthorityPrefixUserPref},s.prototype.query=function(e){var t,i,s="";for("undefined"!=typeof e&&(this.queryPairs=n(e)),t=0;t<this.queryPairs.length;t++)i=this.queryPairs[t],s.length>0&&(s+="&"),s+=null===i[1]?i[0]:i.join("=");return s.length>0?"?"+s:s},s.prototype.getQueryParamValue=function(e){var i,n;for(n=0;n<this.queryPairs.length;n++)if(i=this.queryPairs[n],t(e)===t(i[0]))return i[1]},s.prototype.getQueryParamValues=function(e){var i,n,s=[];for(i=0;i<this.queryPairs.length;i++)n=this.queryPairs[i],t(e)===t(n[0])&&s.push(n[1]);return s},s.prototype.deleteQueryParam=function(e,i){var n,s,r,a,o=[];for(n=0;n<this.queryPairs.length;n++)s=this.queryPairs[n],r=t(s[0])===t(e),a=t(s[1])===t(i),(1===arguments.length&&!r||2===arguments.length&&!r&&!a)&&o.push(s);return this.queryPairs=o,this},s.prototype.addQueryParam=function(e,t,i){return 3===arguments.length&&-1!==i?(i=Math.min(i,this.queryPairs.length),this.queryPairs.splice(i,0,[e,t])):arguments.length>0&&this.queryPairs.push([e,t]),this},s.prototype.replaceQueryParam=function(e,i,n){var s,r,a=-1;if(3===arguments.length){for(s=0;s<this.queryPairs.length;s++)if(r=this.queryPairs[s],t(r[0])===t(e)&&decodeURIComponent(r[1])===t(n)){a=s;break}this.deleteQueryParam(e,n).addQueryParam(e,i,a)}else{for(s=0;s<this.queryPairs.length;s++)if(r=this.queryPairs[s],t(r[0])===t(e)){a=s;break}this.deleteQueryParam(e),this.addQueryParam(e,i,a)}return this},["protocol","hasAuthorityPrefix","userInfo","host","port","path","query","anchor"].forEach(function(e){var t="set"+e.charAt(0).toUpperCase()+e.slice(1);s.prototype[t]=function(t){return this[e](t),this}}),s.prototype.scheme=function(){var e="";return this.protocol()?(e+=this.protocol(),this.protocol().indexOf(":")!==this.protocol().length-1&&(e+=":"),e+="//"):this.hasAuthorityPrefix()&&this.host()&&(e+="//"),e},s.prototype.origin=function(){var e=this.scheme();return this.userInfo()&&this.host()&&(e+=this.userInfo(),this.userInfo().indexOf("@")!==this.userInfo().length-1&&(e+="@")),this.host()&&(e+=this.host(),this.port()&&(e+=":"+this.port())),e},s.prototype.toString=function(){var e=this.origin();return this.path()?e+=this.path():this.host()&&(this.query().toString()||this.anchor())&&(e+="/"),this.query().toString()&&(0!==this.query().toString().indexOf("?")&&(e+="?"),e+=this.query().toString()),this.anchor()&&(0!==this.anchor().indexOf("#")&&(e+="#"),e+=this.anchor()),e},s.prototype.clone=function(){return new s(this.toString())},"undefined"==typeof module?e.Uri=s:module.exports=s}(this),function(e,t,i,n){"use strict";function s(t,i){t||(i=i?": "+i:"",e.error("Fancytree assertion failed"+i))}function r(e,i){var n,s,r=t.console?t.console[e]:null;if(r)try{r.apply(t.console,i)}catch(a){for(s="",n=0;n<i.length;n++)s+=i[n];r(s)}}function a(e){return!(!e.tree||e.statusNodeType===n)}function o(t){var i,n,s,r=e.map(e.trim(t).split("."),function(e){return parseInt(e,10)}),a=e.map(Array.prototype.slice.call(arguments,1),function(e){return parseInt(e,10)});for(i=0;i<a.length;i++)if(n=r[i]||0,s=a[i]||0,n!==s)return n>s;return!0}function l(e,t,i,n,s){var r=function(){var i=t[e],r=n[e],a=t.ext[s],o=function(){return i.apply(t,arguments)};return function(){var e=t._local,i=t._super;try{return t._local=a,t._super=o,r.apply(t,arguments)}finally{t._local=e,t._super=i}}}();return r}function u(t,i,n,s){for(var r in n)"function"==typeof n[r]?"function"==typeof t[r]?t[r]=l(r,t,i,n,s):"_"===r.charAt(0)?t.ext[s][r]=l(r,t,i,n,s):e.error("Could not override tree."+r+". Use prefix '_' to create tree."+s+"._"+r):"options"!==r&&(t.ext[s][r]=n[r])}function c(t,i){return t===n?e.Deferred(function(){this.resolve()}).promise():e.Deferred(function(){this.resolveWith(t,i)}).promise()}function h(t,i){return t===n?e.Deferred(function(){this.reject()}).promise():e.Deferred(function(){this.rejectWith(t,i)}).promise()}function d(e,t){return function(){e.resolveWith(t)}}function f(t){var i=e.extend({},t.data()),n=i.json;return delete i.fancytree,n&&(delete i.json,i=e.extend(i,n)),i}function p(e){return e=e.toLowerCase(),function(t){return t.title.toLowerCase().indexOf(e)>=0}}function g(e){var t=new RegExp("^"+e,"i");return function(e){return t.test(e.title)}}function m(t,i){var n,r,a,o;for(this.parent=t,this.tree=t.tree,this.ul=null,this.li=null,this.statusNodeType=null,this._isLoading=!1,this._error=null,this.data={},n=0,r=k.length;r>n;n++)a=k[n],this[a]=i[a];i.data&&e.extend(this.data,i.data);for(a in i)D[a]||e.isFunction(i[a])||C[a]||(this.data[a]=i[a]);null==this.key?this.tree.options.defaultKey?(this.key=this.tree.options.defaultKey(this),s(this.key,"defaultKey() must return a unique key")):this.key="_"+b._nextNodeKey++:this.key=""+this.key,i.active&&(s(null===this.tree.activeNode,"only one active node allowed"),this.tree.activeNode=this),i.selected&&(this.tree.lastSelectedNode=this),this.children=null,o=i.children,o&&o.length&&this._setChildren(o),this.tree._callHook("treeRegisterNode",this.tree,!0,this)}function v(t){this.widget=t,this.$div=t.element,this.options=t.options,this.options&&e.isFunction(this.options.lazyload)&&(e.isFunction(this.options.lazyLoad)||(this.options.lazyLoad=function(){b.warn("The 'lazyload' event is deprecated since 2014-02-25. Use 'lazyLoad' (with uppercase L) instead."),t.options.lazyload.apply(this,arguments)})),this.options&&e.isFunction(this.options.loaderror)&&e.error("The 'loaderror' event was renamed since 2014-07-03. Use 'loadError' (with uppercase E) instead."),this.ext={},this.data=f(this.$div),this._id=e.ui.fancytree._nextId++,this._ns=".fancytree-"+this._id,this.activeNode=null,this.focusNode=null,this._hasFocus=null,this.lastSelectedNode=null,this.systemFocusElement=null,this.lastQuicksearchTerm="",this.lastQuicksearchTime=0,this.statusClassPropName="span",this.ariaPropName="li",this.nodeContainerAttrName="li",this.$div.find(">ul.fancytree-container").remove();var i,n={tree:this};this.rootNode=new m(n,{title:"root",key:"root_"+this._id,children:null,expanded:!0}),this.rootNode.parent=null,i=e("<ul>",{"class":"ui-fancytree fancytree-container"}).appendTo(this.$div),this.$container=i,this.rootNode.ul=i[0],null==this.options.debugLevel&&(this.options.debugLevel=b.debugLevel),this.$container.attr("tabindex",this.options.tabbable?"0":"-1"),this.options.aria&&this.$container.attr("role","tree").attr("aria-multiselectable",!0)}if(e.ui&&e.ui.fancytree)return void e.ui.fancytree.warn("Fancytree: ignored duplicate include");s(e.ui,"Fancytree requires jQuery UI (http://jqueryui.com)");var y,b=null,_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},w="active expanded focus folder hideCheckbox lazy selected unselectable".split(" "),x={},k="expanded extraClasses folder hideCheckbox key lazy refKey selected title tooltip unselectable".split(" "),D={},C={active:!0,children:!0,data:!0,focus:!0};for(y=0;y<w.length;y++)x[w[y]]=!0;for(y=0;y<k.length;y++)D[k[y]]=!0;m.prototype={_findDirectChild:function(e){var t,i,n=this.children;if(n)if("string"==typeof e){for(t=0,i=n.length;i>t;t++)if(n[t].key===e)return n[t]}else{if("number"==typeof e)return this.children[e];if(e.parent===this)return e}return null},_setChildren:function(e){s(e&&(!this.children||0===this.children.length),"only init supported"),this.children=[];for(var t=0,i=e.length;i>t;t++)this.children.push(new m(this,e[t]))},addChildren:function(t,i){var n,r,a,o=null,l=[];for(e.isPlainObject(t)&&(t=[t]),this.children||(this.children=[]),n=0,r=t.length;r>n;n++)l.push(new m(this,t[n]));return o=l[0],null==i?this.children=this.children.concat(l):(i=this._findDirectChild(i),a=e.inArray(i,this.children),s(a>=0,"insertBefore must be an existing child"),this.children.splice.apply(this.children,[a,0].concat(l))),(!this.parent||this.parent.ul||this.tr)&&this.render(),3===this.tree.options.selectMode&&this.fixSelection3FromEndNodes(),o},addNode:function(e,t){switch((t===n||"over"===t)&&(t="child"),t){case"after":return this.getParent().addChildren(e,this.getNextSibling());case"before":return this.getParent().addChildren(e,this);case"firstChild":var i=this.children?this.children[0]:null;return this.addChildren(e,i);case"child":case"over":return this.addChildren(e)}s(!1,"Invalid mode: "+t)},appendSibling:function(e){return this.addNode(e,"after")},applyPatch:function(t){if(null===t)return this.remove(),c(this);var i,n,s,r={children:!0,expanded:!0,parent:!0};for(i in t)s=t[i],r[i]||e.isFunction(s)||(D[i]?this[i]=s:this.data[i]=s);return t.hasOwnProperty("children")&&(this.removeChildren(),t.children&&this._setChildren(t.children)),this.isVisible()&&(this.renderTitle(),this.renderStatus()),n=t.hasOwnProperty("expanded")?this.setExpanded(t.expanded):c(this)},collapseSiblings:function(){return this.tree._callHook("nodeCollapseSiblings",this)},copyTo:function(e,t,i){return e.addNode(this.toDict(!0,i),t)},countChildren:function(e){var t,i,n,s=this.children;if(!s)return 0;if(n=s.length,e!==!1)for(t=0,i=n;i>t;t++)n+=s[t].countChildren();return n},debug:function(){this.tree.options.debugLevel>=2&&(Array.prototype.unshift.call(arguments,this.toString()),r("log",arguments))},discard:function(){return this.warn("FancytreeNode.discard() is deprecated since 2014-02-16. Use .resetLazy() instead."),this.resetLazy()},findAll:function(t){t=e.isFunction(t)?t:p(t);var i=[];return this.visit(function(e){t(e)&&i.push(e)}),i},findFirst:function(t){t=e.isFunction(t)?t:p(t);var i=null;return this.visit(function(e){return t(e)?(i=e,!1):void 0}),i},_changeSelectStatusAttrs:function(e){var t=!1;switch(e){case!1:t=this.selected||this.partsel,this.selected=!1,this.partsel=!1;break;case!0:t=!this.selected||!this.partsel,this.selected=!0,this.partsel=!0;break;case n:t=this.selected||!this.partsel,this.selected=!1,this.partsel=!0;break;default:s(!1,"invalid state: "+e)}return t&&this.renderStatus(),t},fixSelection3AfterClick:function(){var e=this.isSelected();this.visit(function(t){t._changeSelectStatusAttrs(e)}),this.fixSelection3FromEndNodes()},fixSelection3FromEndNodes:function(){function e(t){var i,s,r,a,o,l,u,c=t.children;if(c&&c.length){for(l=!0,u=!1,i=0,s=c.length;s>i;i++)r=c[i],a=e(r),a!==!1&&(u=!0),a!==!0&&(l=!1);o=l?!0:u?n:!1}else o=!!t.selected;return t._changeSelectStatusAttrs(o),o}s(3===this.tree.options.selectMode,"expected selectMode 3"),e(this),this.visitParents(function(e){var t,i,s,r,a=e.children,o=!0,l=!1;for(t=0,i=a.length;i>t;t++)s=a[t],(s.selected||s.partsel)&&(l=!0),s.unselectable||s.selected||(o=!1);r=o?!0:l?n:!1,e._changeSelectStatusAttrs(r)})},fromDict:function(t){for(var i in t)D[i]?this[i]=t[i]:"data"===i?e.extend(this.data,t.data):e.isFunction(t[i])||C[i]||(this.data[i]=t[i]);t.children&&(this.removeChildren(),this.addChildren(t.children)),this.renderTitle()},getChildren:function(){return this.hasChildren()===n?n:this.children},getFirstChild:function(){return this.children?this.children[0]:null},getIndex:function(){return e.inArray(this,this.parent.children)},getIndexHier:function(t){t=t||".";var i=[];return e.each(this.getParentList(!1,!0),function(e,t){i.push(t.getIndex()+1)}),i.join(t)},getKeyPath:function(e){var t=[],i=this.tree.options.keyPathSeparator;return this.visitParents(function(e){e.parent&&t.unshift(e.key)},!e),i+t.join(i)},getLastChild:function(){return this.children?this.children[this.children.length-1]:null},getLevel:function(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e},getNextSibling:function(){if(this.parent){var e,t,i=this.parent.children;for(e=0,t=i.length-1;t>e;e++)if(i[e]===this)return i[e+1]}return null},getParent:function(){return this.parent},getParentList:function(e,t){for(var i=[],n=t?this:this.parent;n;)(e||n.parent)&&i.unshift(n),n=n.parent;return i},getPrevSibling:function(){if(this.parent){var e,t,i=this.parent.children;for(e=1,t=i.length;t>e;e++)if(i[e]===this)return i[e-1]}return null},hasChildren:function(){return this.lazy?null==this.children?n:0===this.children.length?!1:1===this.children.length&&this.children[0].isStatusNode()?n:!0:!(!this.children||!this.children.length)},hasFocus:function(){return this.tree.hasFocus()&&this.tree.focusNode===this},info:function(){this.tree.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),r("info",arguments))},isActive:function(){return this.tree.activeNode===this},isChildOf:function(e){return this.parent&&this.parent===e},isDescendantOf:function(e){if(!e||e.tree!==this.tree)return!1;for(var t=this.parent;t;){if(t===e)return!0;t=t.parent}return!1},isExpanded:function(){return!!this.expanded},isFirstSibling:function(){var e=this.parent;return!e||e.children[0]===this},isFolder:function(){return!!this.folder},isLastSibling:function(){var e=this.parent;return!e||e.children[e.children.length-1]===this},isLazy:function(){return!!this.lazy},isLoaded:function(){return!this.lazy||this.hasChildren()!==n},isLoading:function(){return!!this._isLoading},isRoot:function(){return this.isRootNode()},isRootNode:function(){return this.tree.rootNode===this},isSelected:function(){return!!this.selected},isStatusNode:function(){return!!this.statusNodeType},isTopLevel:function(){return this.tree.rootNode===this.parent},isUndefined:function(){return this.hasChildren()===n},isVisible:function(){var e,t,i=this.getParentList(!1,!1);for(e=0,t=i.length;t>e;e++)if(!i[e].expanded)return!1;return!0},lazyLoad:function(e){return this.warn("FancytreeNode.lazyLoad() is deprecated since 2014-02-16. Use .load() instead."),this.load(e)},load:function(e){var t,i,n=this;return s(this.isLazy(),"load() requires a lazy node"),e||this.isUndefined()?(this.isLoaded()&&this.resetLazy(),i=this.tree._triggerNodeEvent("lazyLoad",this),i===!1?c(this):(s("boolean"!=typeof i,"lazyLoad event must return source in data.result"),t=this.tree._callHook("nodeLoadChildren",this,i),this.expanded&&t.always(function(){n.render()}),t)):c(this)},makeVisible:function(t){var i,n=this,s=[],r=new e.Deferred,a=this.getParentList(!1,!1),o=a.length,l=!(t&&t.noAnimation===!0),u=!(t&&t.scrollIntoView===!1);for(i=o-1;i>=0;i--)s.push(a[i].setExpanded(!0,t));return e.when.apply(e,s).done(function(){u?n.scrollIntoView(l).done(function(){r.resolve()}):r.resolve()}),r.promise()},moveTo:function(t,i,r){(i===n||"over"===i)&&(i="child");var a,o=this.parent,l="child"===i?t:t.parent;if(this!==t){if(!this.parent)throw"Cannot move system root";if(l.isDescendantOf(this))throw"Cannot move a node to its own descendant";if(1===this.parent.children.length){if(this.parent===l)return;this.parent.children=this.parent.lazy?[]:null,this.parent.expanded=!1}else a=e.inArray(this,this.parent.children),s(a>=0),this.parent.children.splice(a,1);if(this.parent=l,l.hasChildren())switch(i){case"child":l.children.push(this);break;case"before":a=e.inArray(t,l.children),s(a>=0),l.children.splice(a,0,this);break;case"after":a=e.inArray(t,l.children),s(a>=0),l.children.splice(a+1,0,this);break;default:throw"Invalid mode "+i}else l.children=[this];r&&t.visit(r,!0),this.tree!==t.tree&&(this.warn("Cross-tree moveTo is experimantal!"),this.visit(function(e){e.tree=t.tree},!0)),o.isDescendantOf(l)||o.render(),l.isDescendantOf(o)||l===o||l.render()}},navigate:function(t,i){function n(n){if(n){try{n.makeVisible()}catch(s){}return e(n.span).is(":visible")?i===!1?n.setFocus():n.setActive():(n.debug("Navigate: skipping hidden node"),void n.navigate(t,i))}}var s,r,a=!0,o=e.ui.keyCode,l=null;switch(t){case o.BACKSPACE:this.parent&&this.parent.parent&&n(this.parent);break;case o.LEFT:this.expanded?(this.setExpanded(!1),n(this)):this.parent&&this.parent.parent&&n(this.parent);break;case o.RIGHT:this.expanded||!this.children&&!this.lazy?this.children&&this.children.length&&n(this.children[0]):(this.setExpanded(),n(this));break;case o.UP:for(l=this.getPrevSibling();l&&!e(l.span).is(":visible");)l=l.getPrevSibling();for(;l&&l.expanded&&l.children&&l.children.length;)l=l.children[l.children.length-1];!l&&this.parent&&this.parent.parent&&(l=this.parent),n(l);break;case o.DOWN:if(this.expanded&&this.children&&this.children.length)l=this.children[0];else for(r=this.getParentList(!1,!0),s=r.length-1;s>=0;s--){for(l=r[s].getNextSibling();l&&!e(l.span).is(":visible");)l=l.getNextSibling();if(l)break}n(l);break;default:a=!1}},remove:function(){return this.parent.removeChild(this)},removeChild:function(e){return this.tree._callHook("nodeRemoveChild",this,e)},removeChildren:function(){return this.tree._callHook("nodeRemoveChildren",this)},render:function(e,t){return this.tree._callHook("nodeRender",this,e,t)},renderTitle:function(){return this.tree._callHook("nodeRenderTitle",this)},renderStatus:function(){return this.tree._callHook("nodeRenderStatus",this)},resetLazy:function(){this.removeChildren(),this.expanded=!1,this.lazy=!0,this.children=n,this.renderStatus()},scheduleAction:function(e,t){this.tree.timer&&clearTimeout(this.tree.timer),this.tree.timer=null;var i=this;switch(e){case"cancel":break;case"expand":this.tree.timer=setTimeout(function(){i.tree.debug("setTimeout: trigger expand"),i.setExpanded(!0)},t);break;case"activate":this.tree.timer=setTimeout(function(){i.tree.debug("setTimeout: trigger activate"),i.setActive(!0)},t);break;default:throw"Invalid mode "+e}},scrollIntoView:function(r,o){o!==n&&a(o)&&(this.warn("scrollIntoView() with 'topNode' option is deprecated since 2014-05-08. Use 'options.topNode' instead."),o={topNode:o});var l,u,c,h,d=e.extend({effects:r===!0?{duration:200,queue:!1}:r,scrollOfs:this.tree.options.scrollOfs,scrollParent:this.tree.options.scrollParent||this.tree.$container,topNode:null},o),f=new e.Deferred,p=this,g=e(this.span).height(),m=e(d.scrollParent),v=d.scrollOfs.top||0,y=d.scrollOfs.bottom||0,b=m.height(),_=m.scrollTop(),w=m,x=m[0]===t,k=d.topNode||null,D=null;return s(e(this.span).is(":visible"),"scrollIntoView node is invisible"),x?(u=e(this.span).offset().top,l=k&&k.span?e(k.span).offset().top:0,w=e("html,body")):(s(m[0]!==i&&m[0]!==i.body,"scrollParent should be an simple element or `window`, not document or body."),h=m.offset().top,u=e(this.span).offset().top-h+_,l=k?e(k.span).offset().top-h+_:0,c=Math.max(0,m.innerHeight()-m[0].clientHeight),b-=c),_+v>u?D=u-v:u+g>_+b-y&&(D=u+g-b+y,k&&(s(k.isRoot()||e(k.span).is(":visible"),"topNode must be visible"),D>l&&(D=l-v))),null!==D?d.effects?(d.effects.complete=function(){f.resolveWith(p)},w.stop(!0).animate({scrollTop:D},d.effects)):(w[0].scrollTop=D,f.resolveWith(this)):f.resolveWith(this),f.promise()},setActive:function(e,t){return this.tree._callHook("nodeSetActive",this,e,t)},setExpanded:function(e,t){return this.tree._callHook("nodeSetExpanded",this,e,t)},setFocus:function(e){return this.tree._callHook("nodeSetFocus",this,e)},setSelected:function(e){return this.tree._callHook("nodeSetSelected",this,e)},setStatus:function(e,t,i){return this.tree._callHook("nodeSetStatus",this,e,t,i)},setTitle:function(e){this.title=e,this.renderTitle()},sortChildren:function(e,t){var i,n,s=this.children;if(s){if(e=e||function(e,t){var i=e.title.toLowerCase(),n=t.title.toLowerCase();return i===n?0:i>n?1:-1},s.sort(e),t)for(i=0,n=s.length;n>i;i++)s[i].children&&s[i].sortChildren(e,"$norender$");"$norender$"!==t&&this.render()}},toDict:function(t,i){var n,s,r,a={},o=this;if(e.each(k,function(e,t){(o[t]||o[t]===!1)&&(a[t]=o[t])}),e.isEmptyObject(this.data)||(a.data=e.extend({},this.data),e.isEmptyObject(a.data)&&delete a.data),i&&i(a),t&&this.hasChildren())for(a.children=[],n=0,s=this.children.length;s>n;n++)r=this.children[n],r.isStatusNode()||a.children.push(r.toDict(!0,i));return a},toggleExpanded:function(){return this.tree._callHook("nodeToggleExpanded",this)},toggleSelected:function(){return this.tree._callHook("nodeToggleSelected",this)},toString:function(){return"<FancytreeNode(#"+this.key+", '"+this.title+"')>"},visit:function(e,t){var i,n,s=!0,r=this.children;if(t===!0&&(s=e(this),s===!1||"skip"===s))return s;if(r)for(i=0,n=r.length;n>i&&(s=r[i].visit(e,!0),s!==!1);i++);return s},visitAndLoad:function(t,i,n){var s,r,a,o=this;return t&&i===!0&&(r=t(o),r===!1||"skip"===r)?n?r:c():o.children||o.lazy?(s=new e.Deferred,a=[],o.load().done(function(){for(var i=0,n=o.children.length;n>i;i++){if(r=o.children[i].visitAndLoad(t,!0,!0),r===!1){s.reject();break}"skip"!==r&&a.push(r)}e.when.apply(this,a).then(function(){s.resolve()})}),s.promise()):c()},visitParents:function(e,t){if(t&&e(this)===!1)return!1;for(var i=this.parent;i;){if(e(i)===!1)return!1;i=i.parent}return!0},warn:function(){Array.prototype.unshift.call(arguments,this.toString()),r("warn",arguments)
}},v.prototype={_makeHookContext:function(t,i,s){var r,a;return t.node!==n?(i&&t.originalEvent!==i&&e.error("invalid args"),r=t):t.tree?(a=t.tree,r={node:t,tree:a,widget:a.widget,options:a.widget.options,originalEvent:i}):t.widget?r={node:null,tree:t,widget:t.widget,options:t.widget.options,originalEvent:i}:e.error("invalid args"),s&&e.extend(r,s),r},_callHook:function(t,i){var n=this._makeHookContext(i),s=this[t],r=Array.prototype.slice.call(arguments,2);return e.isFunction(s)||e.error("_callHook('"+t+"') is not a function"),r.unshift(n),s.apply(this,r)},_requireExtension:function(t,i,n,r){n=!!n;var a=this._local.name,o=this.options.extensions,l=e.inArray(t,o)<e.inArray(a,o),u=i&&null==this.ext[t],c=!u&&null!=n&&n!==l;return s(a&&a!==t),u||c?(r||(u||i?(r="'"+a+"' extension requires '"+t+"'",c&&(r+=" to be registered "+(n?"before":"after")+" itself")):r="If used together, `"+t+"` must be registered "+(n?"before":"after")+" `"+a+"`"),e.error(r),!1):!0},activateKey:function(e){var t=this.getNodeByKey(e);return t?t.setActive():this.activeNode&&this.activeNode.setActive(!1),t},applyPatch:function(t){var i,n,r,a,o,l,u=t.length,c=[];for(n=0;u>n;n++)r=t[n],s(2===r.length,"patchList must be an array of length-2-arrays"),a=r[0],o=r[1],l=null===a?this.rootNode:this.getNodeByKey(a),l?(i=new e.Deferred,c.push(i),l.applyPatch(o).always(d(i,l))):this.warn("could not find node with key '"+a+"'");return e.when.apply(e,c).promise()},count:function(){return this.rootNode.countChildren()},debug:function(){this.options.debugLevel>=2&&(Array.prototype.unshift.call(arguments,this.toString()),r("log",arguments))},findNextNode:function(t,i){var n=null,s=i.parent.children,r=null,a=function(e,t,i){var n,s,r=e.children,o=r.length,l=r[t];if(l&&i(l)===!1)return!1;if(l&&l.children&&l.expanded&&a(l,0,i)===!1)return!1;for(n=t+1;o>n;n++)if(a(e,n,i)===!1)return!1;return s=e.parent,s?a(s,s.children.indexOf(e)+1,i):a(e,0,i)};return t="string"==typeof t?g(t):t,i=i||this.getFirstChild(),a(i.parent,s.indexOf(i),function(s){return s===n?!1:(n=n||s,e(s.span).is(":visible")?t(s)&&(r=s,r!==i)?!1:void 0:void s.debug("quicksearch: skipping hidden node"))}),r},generateFormElements:function(t,i){var n,s=t!==!1?"ft_"+this._id+"[]":t,r=i!==!1?"ft_"+this._id+"_active":i,a="fancytree_result_"+this._id,o=e("#"+a);o.length?o.empty():o=e("<div>",{id:a}).hide().insertAfter(this.$container),s&&(n=this.getSelectedNodes(3===this.options.selectMode),e.each(n,function(t,i){o.append(e("<input>",{type:"checkbox",name:s,value:i.key,checked:!0}))})),r&&this.activeNode&&o.append(e("<input>",{type:"radio",name:r,value:this.activeNode.key,checked:!0}))},getActiveNode:function(){return this.activeNode},getFirstChild:function(){return this.rootNode.getFirstChild()},getFocusNode:function(){return this.focusNode},getNodeByKey:function(e,t){var n,s;return!t&&(n=i.getElementById(this.options.idPrefix+e))?n.ftnode?n.ftnode:null:(t=t||this.rootNode,s=null,t.visit(function(t){return t.key===e?(s=t,!1):void 0},!0),s)},getRootNode:function(){return this.rootNode},getSelectedNodes:function(e){var t=[];return this.rootNode.visit(function(i){return i.selected&&(t.push(i),e===!0)?"skip":void 0}),t},hasFocus:function(){return!!this._hasFocus},info:function(){this.options.debugLevel>=1&&(Array.prototype.unshift.call(arguments,this.toString()),r("info",arguments))},loadKeyPath:function(t,i,s){function r(e,t,n){i.call(v,t,"loading"),t.load().done(function(){v.loadKeyPath.call(v,h[e],i,t).always(d(n,v))}).fail(function(){v.warn("loadKeyPath: error loading: "+e+" (parent: "+p+")"),i.call(v,t,"error"),n.reject()})}var a,o,l,u,c,h,f,p,g,m=this.options.keyPathSeparator,v=this;for(e.isArray(t)||(t=[t]),h={},l=0;l<t.length;l++)for(p=s||this.rootNode,u=t[l],u.charAt(0)===m&&(u=u.substr(1)),g=u.split(m);g.length;){if(c=g.shift(),f=p._findDirectChild(c),!f){this.warn("loadKeyPath: key not found: "+c+" (parent: "+p+")"),i.call(this,c,"error");break}if(0===g.length){i.call(this,f,"ok");break}if(f.lazy&&f.hasChildren()===n){i.call(this,f,"loaded"),h[c]?h[c].push(g.join(m)):h[c]=[g.join(m)];break}i.call(this,f,"loaded"),p=f}a=[];for(c in h)f=p._findDirectChild(c),o=new e.Deferred,a.push(o),r(c,f,o);return e.when.apply(e,a).promise()},reactivate:function(e){var t=this.activeNode;t&&(this.activeNode=null,t.setActive(),e&&t.setFocus())},reload:function(e){return this._callHook("treeClear",this),this._callHook("treeLoad",this,e)},render:function(e,t){return this.rootNode.render(e,t)},setFocus:function(e){return this._callHook("treeSetFocus",this,e)},toDict:function(e,t){var i=this.rootNode.toDict(!0,t);return e?i:i.children},toString:function(){return"<Fancytree(#"+this._id+")>"},_triggerNodeEvent:function(e,t,i,s){var r=this._makeHookContext(t,i,s),a=this.widget._trigger(e,i,r);return a!==!1&&r.result!==n?r.result:a},_triggerTreeEvent:function(e,t,i){var s=this._makeHookContext(this,t,i),r=this.widget._trigger(e,t,s);return r!==!1&&s.result!==n?s.result:r},visit:function(e){return this.rootNode.visit(e,!1)},warn:function(){Array.prototype.unshift.call(arguments,this.toString()),r("warn",arguments)}},e.extend(v.prototype,{nodeClick:function(e){var t,i,n=e.targetType,s=e.node;if("expander"===n)this._callHook("nodeToggleExpanded",e);else if("checkbox"===n)this._callHook("nodeToggleSelected",e),e.options.focusOnSelect&&this._callHook("nodeSetFocus",e,!0);else{if(i=!1,t=!0,s.folder)switch(e.options.clickFolderMode){case 2:i=!0,t=!1;break;case 3:t=!0,i=!0}t&&(this.nodeSetFocus(e),this._callHook("nodeSetActive",e,!0)),i&&this._callHook("nodeToggleExpanded",e)}},nodeCollapseSiblings:function(e,t){var i,n,s,r=e.node;if(r.parent)for(i=r.parent.children,n=0,s=i.length;s>n;n++)i[n]!==r&&i[n].expanded&&this._callHook("nodeSetExpanded",i[n],!1,t)},nodeDblclick:function(e){"title"===e.targetType&&4===e.options.clickFolderMode&&this._callHook("nodeToggleExpanded",e),"title"===e.targetType&&e.originalEvent.preventDefault()},nodeKeydown:function(t){var i,n,s,r=t.originalEvent,a=t.node,o=t.tree,l=t.options,u=r.which,c=String.fromCharCode(u),h=!(r.altKey||r.ctrlKey||r.metaKey||r.shiftKey),d=e(r.target),f=!0,p=!(r.ctrlKey||!l.autoActivate),g=e.ui.keyCode;if(a||(this.getFirstChild().setFocus(),a=t.node=this.focusNode,a.debug("Keydown force focus on first node")),l.quicksearch&&h&&/\w/.test(c)&&!d.is(":input:enabled"))return n=(new Date).getTime(),n-o.lastQuicksearchTime>500&&(o.lastQuicksearchTerm=""),o.lastQuicksearchTime=n,o.lastQuicksearchTerm+=c,i=o.findNextNode(o.lastQuicksearchTerm,o.getActiveNode()),i&&i.setActive(),void r.preventDefault();switch(u){case g.NUMPAD_ADD:case 187:o.nodeSetExpanded(t,!0);break;case g.NUMPAD_SUBTRACT:case 189:o.nodeSetExpanded(t,!1);break;case g.SPACE:l.checkbox?o.nodeToggleSelected(t):o.nodeSetActive(t,!0);break;case g.ENTER:o.nodeSetActive(t,!0);break;case g.BACKSPACE:case g.LEFT:case g.RIGHT:case g.UP:case g.DOWN:s=a.navigate(r.which,p);break;default:f=!1}f&&r.preventDefault()},nodeLoadChildren:function(t,i){var n,r,a,o=t.tree,l=t.node;return e.isFunction(i)&&(i=i()),i.url&&(n=e.extend({},t.options.ajax,i),n.debugDelay?(r=n.debugDelay,e.isArray(r)&&(r=r[0]+Math.random()*(r[1]-r[0])),l.debug("nodeLoadChildren waiting debug delay "+Math.round(r)+"ms"),n.debugDelay=!1,a=e.Deferred(function(t){setTimeout(function(){e.ajax(n).done(function(){t.resolveWith(this,arguments)}).fail(function(){t.rejectWith(this,arguments)})},r)})):a=e.ajax(n),i=new e.Deferred,a.done(function(n){var s,r;if("string"==typeof n&&e.error("Ajax request returned a string (did you get the JSON dataType wrong?)."),t.options.postProcess){if(r=o._triggerNodeEvent("postProcess",t,t.originalEvent,{response:n,error:null,dataType:this.dataType}),r.error)return s=e.isPlainObject(r.error)?r.error:{message:r.error},s=o._makeHookContext(l,null,s),void i.rejectWith(this,[s]);n=e.isArray(r)?r:n}else n&&n.hasOwnProperty("d")&&t.options.enableAspx&&(n="string"==typeof n.d?e.parseJSON(n.d):n.d);i.resolveWith(this,[n])}).fail(function(e,t,n){var s=o._makeHookContext(l,null,{error:e,args:Array.prototype.slice.call(arguments),message:n,details:e.status+": "+n});i.rejectWith(this,[s])})),e.isFunction(i.promise)&&(s(!l.isLoading()),o.nodeSetStatus(t,"loading"),i.done(function(){o.nodeSetStatus(t,"ok")}).fail(function(e){var i;i=e.node&&e.error&&e.message?e:o._makeHookContext(l,null,{error:e,args:Array.prototype.slice.call(arguments),message:e?e.message||e.toString():""}),o._triggerNodeEvent("loadError",i,null)!==!1&&o.nodeSetStatus(t,"error",i.message,i.details)})),e.when(i).done(function(t){var i;e.isPlainObject(t)&&(s(e.isArray(t.children),"source must contain (or be) an array of children"),s(l.isRoot(),"source may only be an object for root nodes"),i=t,t=t.children,delete i.children,e.extend(o.data,i)),s(e.isArray(t),"expected array of children"),l._setChildren(t),o._triggerNodeEvent("loadChildren",l)})},nodeLoadKeyPath:function(){},nodeRemoveChild:function(t,i){var n,r=t.node,a=t.options,o=e.extend({},t,{node:i}),l=r.children;return 1===l.length?(s(i===l[0]),this.nodeRemoveChildren(t)):(this.activeNode&&(i===this.activeNode||this.activeNode.isDescendantOf(i))&&this.activeNode.setActive(!1),this.focusNode&&(i===this.focusNode||this.focusNode.isDescendantOf(i))&&(this.focusNode=null),this.nodeRemoveMarkup(o),this.nodeRemoveChildren(o),n=e.inArray(i,l),s(n>=0),i.visit(function(e){e.parent=null},!0),this._callHook("treeRegisterNode",this,!1,i),a.removeNode&&a.removeNode.call(t.tree,{type:"removeNode"},o),void l.splice(n,1))},nodeRemoveChildMarkup:function(t){var i=t.node;i.ul&&(i.isRoot()?e(i.ul).empty():(e(i.ul).remove(),i.ul=null),i.visit(function(e){e.li=e.ul=null}))},nodeRemoveChildren:function(t){var i,n=t.tree,s=t.node,r=s.children,a=t.options;r&&(this.activeNode&&this.activeNode.isDescendantOf(s)&&this.activeNode.setActive(!1),this.focusNode&&this.focusNode.isDescendantOf(s)&&(this.focusNode=null),this.nodeRemoveChildMarkup(t),i=e.extend({},t),s.visit(function(e){e.parent=null,n._callHook("treeRegisterNode",n,!1,e),a.removeNode&&(i.node=e,a.removeNode.call(t.tree,{type:"removeNode"},i))}),s.children=s.lazy?[]:null,this.nodeRenderStatus(t))},nodeRemoveMarkup:function(t){var i=t.node;i.li&&(e(i.li).remove(),i.li=null),this.nodeRemoveChildMarkup(t)},nodeRender:function(t,n,r,a,o){var l,u,c,h,d,f,p,g=t.node,m=t.tree,v=t.options,y=v.aria,b=!1,_=g.parent,w=!_,x=g.children;if(w||_.ul){if(s(w||_.ul,"parent UL must exist"),w||(g.li&&(n||g.li.parentNode!==g.parent.ul)&&(g.li.parentNode!==g.parent.ul&&this.warn("unlink "+g+" (must be child of "+g.parent+")"),this.nodeRemoveMarkup(t)),g.li?this.nodeRenderStatus(t):(b=!0,g.li=i.createElement("li"),g.li.ftnode=g,g.key&&v.generateIds&&(g.li.id=v.idPrefix+g.key),g.span=i.createElement("span"),g.span.className="fancytree-node",y&&e(g.span).attr("aria-labelledby","ftal_"+g.key),g.li.appendChild(g.span),this.nodeRenderTitle(t),v.createNode&&v.createNode.call(m,{type:"createNode"},t)),v.renderNode&&v.renderNode.call(m,{type:"renderNode"},t)),x){if(w||g.expanded||r===!0){for(g.ul||(g.ul=i.createElement("ul"),(a===!0&&!o||!g.expanded)&&(g.ul.style.display="none"),y&&e(g.ul).attr("role","group"),g.li?g.li.appendChild(g.ul):g.tree.$div.append(g.ul)),h=0,d=x.length;d>h;h++)p=e.extend({},t,{node:x[h]}),this.nodeRender(p,n,r,!1,!0);for(l=g.ul.firstChild;l;)c=l.ftnode,c&&c.parent!==g?(g.debug("_fixParent: remove missing "+c,l),f=l.nextSibling,l.parentNode.removeChild(l),l=f):l=l.nextSibling;for(l=g.ul.firstChild,h=0,d=x.length-1;d>h;h++)u=x[h],c=l.ftnode,u!==c?g.ul.insertBefore(u.li,c.li):l=l.nextSibling}}else g.ul&&(this.warn("remove child markup for "+g),this.nodeRemoveChildMarkup(t));w||b&&_.ul.appendChild(g.li)}},nodeRenderTitle:function(e,t){var i,s,r,a,o,l,u=e.node,c=e.tree,h=e.options,d=h.aria,f=u.getLevel(),p=[],g=u.data.icon;t!==n&&(u.title=t),u.span&&(f<h.minExpandLevel?(u.lazy||(u.expanded=!0),f>1&&p.push(d?"<span role='button' class='fancytree-expander fancytree-expander-fixed'></span>":"<span class='fancytree-expander fancytree-expander-fixed''></span>")):p.push(d?"<span role='button' class='fancytree-expander'></span>":"<span class='fancytree-expander'></span>"),h.checkbox&&u.hideCheckbox!==!0&&!u.isStatusNode()&&p.push(d?"<span role='checkbox' class='fancytree-checkbox'></span>":"<span class='fancytree-checkbox'></span>"),a=d?" role='img'":"",(g===!0||g!==!1&&h.icons!==!1)&&(g&&"string"==typeof g?(g="/"===g.charAt(0)?g:(h.imagePath||"")+g,p.push("<img src='"+g+"' class='fancytree-icon' alt='' />")):(s=h.iconClass&&h.iconClass.call(c,u,e)||u.data.iconclass||null,p.push(s?"<span "+a+" class='fancytree-custom-icon "+s+"'></span>":"<span "+a+" class='fancytree-icon'></span>"))),r="",h.renderTitle&&(r=h.renderTitle.call(c,{type:"renderTitle"},e)||""),r||(l=u.tooltip?" title='"+b.escapeHtml(u.tooltip)+"'":"",i=d?" id='ftal_"+u.key+"'":"",a=d?" role='treeitem'":"",o=h.titlesTabbable?" tabindex='0'":"",r="<span "+a+" class='fancytree-title'"+i+l+o+">"+u.title+"</span>"),p.push(r),u.span.innerHTML=p.join(""),this.nodeRenderStatus(e))},nodeRenderStatus:function(t){var i=t.node,n=t.tree,s=t.options,r=i.hasChildren(),a=i.isLastSibling(),o=s.aria,l=e(i.span).find(".fancytree-title"),u=s._classNames,c=[],h=i[n.statusClassPropName];h&&(c.push(u.node),n.activeNode===i&&c.push(u.active),n.focusNode===i?(c.push(u.focused),o&&l.attr("aria-activedescendant",!0)):o&&l.removeAttr("aria-activedescendant"),i.expanded?(c.push(u.expanded),o&&l.attr("aria-expanded",!0)):o&&l.removeAttr("aria-expanded"),i.folder&&c.push(u.folder),r!==!1&&c.push(u.hasChildren),a&&c.push(u.lastsib),i.lazy&&null==i.children&&c.push(u.lazy),i.partsel&&c.push(u.partsel),i.unselectable&&c.push(u.unselectable),i._isLoading&&c.push(u.loading),i._error&&c.push(u.error),i.selected?(c.push(u.selected),o&&l.attr("aria-selected",!0)):o&&l.attr("aria-selected",!1),i.extraClasses&&c.push(i.extraClasses),c.push(r===!1?u.combinedExpanderPrefix+"n"+(a?"l":""):u.combinedExpanderPrefix+(i.expanded?"e":"c")+(i.lazy&&null==i.children?"d":"")+(a?"l":"")),c.push(u.combinedIconPrefix+(i.expanded?"e":"c")+(i.folder?"f":"")),h.className=c.join(" "),i.li&&(i.li.className=a?u.lastsib:""))},nodeSetActive:function(t,i,n){n=n||{};var r,a=t.node,o=t.tree,l=t.options,u=n.noEvents===!0,d=a===o.activeNode;return i=i!==!1,d===i?c(a):i&&!u&&this._triggerNodeEvent("beforeActivate",a,t.originalEvent)===!1?h(a,["rejected"]):void(i?(o.activeNode&&(s(o.activeNode!==a,"node was active (inconsistency)"),r=e.extend({},t,{node:o.activeNode}),o.nodeSetActive(r,!1),s(null===o.activeNode,"deactivate was out of sync?")),l.activeVisible&&a.makeVisible({scrollIntoView:!1}),o.activeNode=a,o.nodeRenderStatus(t),o.nodeSetFocus(t),u||o._triggerNodeEvent("activate",a,t.originalEvent)):(s(o.activeNode===a,"node was not active (inconsistency)"),o.activeNode=null,this.nodeRenderStatus(t),u||t.tree._triggerNodeEvent("deactivate",a,t.originalEvent)))},nodeSetExpanded:function(t,i,s){s=s||{};var r,a,o,l,u,d,f=t.node,p=t.tree,g=t.options,m=s.noAnimation===!0,v=s.noEvents===!0;if(i=i!==!1,f.expanded&&i||!f.expanded&&!i)return c(f);if(i&&!f.lazy&&!f.hasChildren())return c(f);if(!i&&f.getLevel()<g.minExpandLevel)return h(f,["locked"]);if(!v&&this._triggerNodeEvent("beforeExpand",f,t.originalEvent)===!1)return h(f,["rejected"]);if(m||f.isVisible()||(m=s.noAnimation=!0),a=new e.Deferred,i&&!f.expanded&&g.autoCollapse){u=f.getParentList(!1,!0),d=g.autoCollapse;try{for(g.autoCollapse=!1,o=0,l=u.length;l>o;o++)this._callHook("nodeCollapseSiblings",u[o],s)}finally{g.autoCollapse=d}}return a.done(function(){i&&g.autoScroll&&!m?f.getLastChild().scrollIntoView(!0,{topNode:f}).always(function(){v||t.tree._triggerNodeEvent(i?"expand":"collapse",t)}):v||t.tree._triggerNodeEvent(i?"expand":"collapse",t)}),r=function(n){var s,r,a,o;if(f.expanded=i,p._callHook("nodeRender",t,!1,!1,!0),f.ul)if(a="none"!==f.ul.style.display,o=!!f.expanded,a===o)f.warn("nodeSetExpanded: UL.style.display already set");else{if(g.fx&&!m)return s=g.fx.duration||200,r=g.fx.easing,void e(f.ul).animate(g.fx,s,r,function(){n()});f.ul.style.display=f.expanded||!parent?"":"none"}n()},i&&f.lazy&&f.hasChildren()===n?f.load().done(function(){a.notifyWith&&a.notifyWith(f,["loaded"]),r(function(){a.resolveWith(f)})}).fail(function(e){r(function(){a.rejectWith(f,["load failed ("+e+")"])})}):r(function(){a.resolveWith(f)}),a.promise()},nodeSetFocus:function(t,i){var n,s=t.tree,r=t.node;if(i=i!==!1,s.focusNode){if(s.focusNode===r&&i)return;n=e.extend({},t,{node:s.focusNode}),s.focusNode=null,this._triggerNodeEvent("blur",n),this._callHook("nodeRenderStatus",n)}i&&(this.hasFocus()||(r.debug("nodeSetFocus: forcing container focus"),this._callHook("treeSetFocus",t,!0,!0)),r.makeVisible({scrollIntoView:!1}),s.focusNode=r,this._triggerNodeEvent("focus",t),t.options.autoScroll&&r.scrollIntoView(),this._callHook("nodeRenderStatus",t))},nodeSetSelected:function(e,t){var i=e.node,n=e.tree,s=e.options;if(t=t!==!1,i.debug("nodeSetSelected("+t+")",e),!i.unselectable){if(i.selected&&t||!i.selected&&!t)return!!i.selected;if(this._triggerNodeEvent("beforeSelect",i,e.originalEvent)===!1)return!!i.selected;t&&1===s.selectMode?n.lastSelectedNode&&n.lastSelectedNode.setSelected(!1):3===s.selectMode&&(i.selected=t,i.fixSelection3AfterClick()),i.selected=t,this.nodeRenderStatus(e),n.lastSelectedNode=t?i:null,n._triggerNodeEvent("select",e)}},nodeSetStatus:function(t,i,n,s){function r(){var e=o.children?o.children[0]:null;if(e&&e.isStatusNode()){try{o.ul&&(o.ul.removeChild(e.li),e.li=null)}catch(t){}1===o.children.length?o.children=[]:o.children.shift()}}function a(t,i){var n=o.children?o.children[0]:null;return n&&n.isStatusNode()?(e.extend(n,t),l._callHook("nodeRenderTitle",n)):(t.key="_statusNode",o._setChildren([t]),o.children[0].statusNodeType=i,l.render()),o.children[0]}var o=t.node,l=t.tree;switch(i){case"ok":r(),o._isLoading=!1,o._error=null,o.renderStatus();break;case"loading":o.parent||a({title:l.options.strings.loading+(n?" ("+n+") ":""),tooltip:s,extraClasses:"fancytree-statusnode-wait"},i),o._isLoading=!0,o._error=null,o.renderStatus();break;case"error":a({title:l.options.strings.loadError+(n?" ("+n+") ":""),tooltip:s,extraClasses:"fancytree-statusnode-error"},i),o._isLoading=!1,o._error={message:n,details:s},o.renderStatus();break;default:e.error("invalid node status "+i)}},nodeToggleExpanded:function(e){return this.nodeSetExpanded(e,!e.node.expanded)},nodeToggleSelected:function(e){return this.nodeSetSelected(e,!e.node.selected)},treeClear:function(e){var t=e.tree;t.activeNode=null,t.focusNode=null,t.$div.find(">ul.fancytree-container").empty(),t.rootNode.children=null},treeCreate:function(){},treeDestroy:function(){},treeInit:function(e){this.treeLoad(e)},treeLoad:function(t,i){var n,s,r,a=t.tree,o=t.widget.element,l=e.extend({},t,{node:this.rootNode});if(a.rootNode.children&&this.treeClear(t),i=i||this.options.source)"string"==typeof i&&e.error("Not implemented");else switch(n=o.data("type")||"html"){case"html":s=o.find(">ul:first"),s.addClass("ui-fancytree-source ui-helper-hidden"),i=e.ui.fancytree.parseHtml(s),this.data=e.extend(this.data,f(s));break;case"json":i=e.parseJSON(o.text()),i.children&&(i.title&&(a.title=i.title),i=i.children);break;default:e.error("Invalid data-type: "+n)}return r=this.nodeLoadChildren(l,i).done(function(){a.render(),3===t.options.selectMode&&a.rootNode.fixSelection3FromEndNodes(),a._triggerTreeEvent("init",null,{status:!0})}).fail(function(){a.render(),a._triggerTreeEvent("init",null,{status:!1})})},treeRegisterNode:function(){},treeSetFocus:function(e,t){t=t!==!1,t!==this.hasFocus()&&(this._hasFocus=t,this.$container.toggleClass("fancytree-treefocus",t),this._triggerTreeEvent(t?"focusTree":"blurTree"))}}),e.widget("ui.fancytree",{options:{activeVisible:!0,ajax:{type:"GET",cache:!1,dataType:"json"},aria:!1,autoActivate:!0,autoCollapse:!1,autoScroll:!1,checkbox:!1,clickFolderMode:4,debugLevel:null,disabled:!1,enableAspx:!0,extensions:[],fx:{height:"toggle",duration:200},generateIds:!1,icons:!0,idPrefix:"ft_",focusOnSelect:!1,keyboard:!0,keyPathSeparator:"/",minExpandLevel:1,quicksearch:!1,scrollOfs:{top:0,bottom:0},scrollParent:null,selectMode:2,strings:{loading:"Loading&#8230;",loadError:"Load error!"},tabbable:!0,titlesTabbable:!1,_classNames:{node:"fancytree-node",folder:"fancytree-folder",combinedExpanderPrefix:"fancytree-exp-",combinedIconPrefix:"fancytree-ico-",hasChildren:"fancytree-has-children",active:"fancytree-active",selected:"fancytree-selected",expanded:"fancytree-expanded",lazy:"fancytree-lazy",focused:"fancytree-focused",partsel:"fancytree-partsel",unselectable:"fancytree-unselectable",lastsib:"fancytree-lastsib",loading:"fancytree-loading",error:"fancytree-error"},lazyLoad:null,postProcess:null},_create:function(){this.tree=new v(this),this.$source=this.source||"json"===this.element.data("type")?this.element:this.element.find(">ul:first");var t,i,r,a=this.options.extensions,o=this.tree;for(r=0;r<a.length;r++)i=a[r],t=e.ui.fancytree._extensions[i],t||e.error("Could not apply extension '"+i+"' (it is not registered, did you forget to include it?)"),this.tree.options[i]=e.extend(!0,{},t.options,this.tree.options[i]),s(this.tree.ext[i]===n,"Extension name must not exist as Fancytree.ext attribute: '"+i+"'"),this.tree.ext[i]={},u(this.tree,o,t,i),o=t;this.tree._callHook("treeCreate",this.tree)},_init:function(){this.tree._callHook("treeInit",this.tree),this._bind()},_setOption:function(t,i){var n=!0,s=!1;switch(t){case"aria":case"checkbox":case"icons":case"minExpandLevel":case"tabbable":this.tree._callHook("treeCreate",this.tree),s=!0;break;case"source":n=!1,this.tree._callHook("treeLoad",this.tree,i)}this.tree.debug("set option "+t+"="+i+" <"+typeof i+">"),n&&e.Widget.prototype._setOption.apply(this,arguments),s&&this.tree.render(!0,!1)},destroy:function(){this._unbind(),this.tree._callHook("treeDestroy",this.tree),this.tree.$div.find(">ul.fancytree-container").remove(),this.$source&&this.$source.removeClass("ui-helper-hidden"),e.Widget.prototype.destroy.call(this)},_unbind:function(){var t=this.tree._ns;this.element.unbind(t),this.tree.$container.unbind(t),e(i).unbind(t)},_bind:function(){var e=this,t=this.options,i=this.tree,n=i._ns;this._unbind(),i.$container.on("focusin"+n+" focusout"+n,function(e){var t=b.getNode(e),n="focusin"===e.type;t?i._callHook("nodeSetFocus",t,n):i._callHook("treeSetFocus",i,n)}).on("selectstart"+n,"span.fancytree-title",function(e){e.preventDefault()}).on("keydown"+n,function(e){if(t.disabled||t.keyboard===!1)return!0;var n,s=i.focusNode,r=i._makeHookContext(s||i,e),a=i.phase;try{return i.phase="userEvent",n=s?i._triggerNodeEvent("keydown",s,e):i._triggerTreeEvent("keydown",e),"preventNav"===n?n=!0:n!==!1&&(n=i._callHook("nodeKeydown",r)),n}finally{i.phase=a}}).on("click"+n+" dblclick"+n,function(i){if(t.disabled)return!0;var n,s=b.getEventTarget(i),r=s.node,a=e.tree,o=a.phase;if(!r)return!0;n=a._makeHookContext(r,i);try{switch(a.phase="userEvent",i.type){case"click":return n.targetType=s.type,a._triggerNodeEvent("click",n,i)===!1?!1:a._callHook("nodeClick",n);case"dblclick":return n.targetType=s.type,a._triggerNodeEvent("dblclick",n,i)===!1?!1:a._callHook("nodeDblclick",n)}}finally{a.phase=o}})},getActiveNode:function(){return this.tree.activeNode},getNodeByKey:function(e){return this.tree.getNodeByKey(e)},getRootNode:function(){return this.tree.rootNode},getTree:function(){return this.tree}}),b=e.ui.fancytree,e.extend(e.ui.fancytree,{version:"2.6.0",buildType:"production",debugLevel:1,_nextId:1,_nextNodeKey:1,_extensions:{},_FancytreeClass:v,_FancytreeNodeClass:m,jquerySupports:{positionMyOfs:o(e.ui.version,1,9)},assert:function(e,t){return s(e,t)},debounce:function(e,t,i,n){var s;return 3===arguments.length&&"boolean"!=typeof i&&(n=i,i=!1),function(){var r=arguments;n=n||this,i&&!s&&t.apply(n,r),clearTimeout(s),s=setTimeout(function(){i||t.apply(n,r),s=null},e)}},debug:function(){e.ui.fancytree.debugLevel>=2&&r("log",arguments)},error:function(){r("error",arguments)},escapeHtml:function(e){return(""+e).replace(/[&<>"'\/]/g,function(e){return _[e]})},unescapeHtml:function(e){var t=i.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue},getEventTargetType:function(e){return this.getEventTarget(e).type},getEventTarget:function(t){var i=t&&t.target?t.target.className:"",s={node:this.getNode(t.target),type:n};return/\bfancytree-title\b/.test(i)?s.type="title":/\bfancytree-expander\b/.test(i)?s.type=s.node.hasChildren()===!1?"prefix":"expander":/\bfancytree-checkbox\b/.test(i)||/\bfancytree-radio\b/.test(i)?s.type="checkbox":/\bfancytree-icon\b/.test(i)?s.type="icon":/\bfancytree-node\b/.test(i)?s.type="title":t&&t.target&&e(t.target).closest(".fancytree-title").length&&(s.type="title"),s},getNode:function(e){if(e instanceof m)return e;for(e.selector!==n?e=e[0]:e.originalEvent!==n&&(e=e.target);e;){if(e.ftnode)return e.ftnode;e=e.parentNode}return null},info:function(){e.ui.fancytree.debugLevel>=1&&r("info",arguments)},parseHtml:function(t){var i,s,r,a,o,l,u,c,h=t.find(">li"),d=[];return h.each(function(){var h,p=e(this),g=p.find(">span:first",this),m=g.length?null:p.find(">a:first"),v={tooltip:null,data:{}};for(g.length?v.title=g.html():m&&m.length?(v.title=m.html(),v.data.href=m.attr("href"),v.data.target=m.attr("target"),v.tooltip=m.attr("title")):(v.title=p.html(),a=v.title.search(/<ul/i),a>=0&&(v.title=v.title.substring(0,a))),v.title=e.trim(v.title),s=0,r=w.length;r>s;s++)v[w[s]]=n;for(u=this.className.split(" "),i=[],s=0,r=u.length;r>s;s++)c=u[s],x[c]?v[c]=!0:i.push(c);if(v.extraClasses=i.join(" "),o=p.attr("title"),o&&(v.tooltip=o),o=p.attr("id"),o&&(v.key=o),h=f(p),h&&!e.isEmptyObject(h)){for(s=0,r=k.length;r>s;s++)o=k[s],l=h[o],null!=l&&(delete h[o],v[o]=l);e.extend(v.data,h)}t=p.find(">ul:first"),v.children=t.length?e.ui.fancytree.parseHtml(t):v.lazy?n:null,d.push(v)}),d},registerExtension:function(t){s(null!=t.name,"extensions must have a `name` property."),s(null!=t.version,"extensions must have a `version` property."),e.ui.fancytree._extensions[t.name]=t},warn:function(){r("warn",arguments)}})}(jQuery,window,document),function(e,t,i){var n=window.matchMedia;"undefined"!=typeof module&&module.exports?module.exports=i(n):"function"==typeof define&&define.amd?define(function(){return t[e]=i(n)}):t[e]=i(n)}("enquire",this,function(e){"use strict";function t(e,t){var i,n=0,s=e.length;for(n;s>n&&(i=t(e[n],n),i!==!1);n++);}function i(e){return"[object Array]"===Object.prototype.toString.apply(e)}function n(e){return"function"==typeof e}function s(e){this.options=e,!e.deferSetup&&this.setup()}function r(t,i){this.query=t,this.isUnconditional=i,this.handlers=[],this.mql=e(t);var n=this;this.listener=function(e){n.mql=e,n.assess()},this.mql.addListener(this.listener)}function a(){if(!e)throw new Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!e("only all").matches}return s.prototype={setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(e){return this.options===e||this.options.match===e}},r.prototype={addHandler:function(e){var t=new s(e);this.handlers.push(t),this.matches()&&t.on()},removeHandler:function(e){var i=this.handlers;t(i,function(t,n){return t.equals(e)?(t.destroy(),!i.splice(n,1)):void 0})},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){t(this.handlers,function(e){e.destroy()}),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var e=this.matches()?"on":"off";t(this.handlers,function(t){t[e]()})}},a.prototype={register:function(e,s,a){var o=this.queries,l=a&&this.browserIsIncapable;return o[e]||(o[e]=new r(e,l)),n(s)&&(s={match:s}),i(s)||(s=[s]),t(s,function(t){n(t)&&(t={match:t}),o[e].addHandler(t)}),this},unregister:function(e,t){var i=this.queries[e];return i&&(t?i.removeHandler(t):(i.clear(),delete this.queries[e])),this}},new a}),"undefined"==typeof Deki)var Deki={};_(Deki).extend({jsLibLoaded:!0,$:$,provide:function(e){"use strict";for(var t=window,i=e.split("."),n=0,s=i.length;s>n;n++)t[i[n]]=t[i[n]]||{},t=t[i[n]];return t},Log:function(e){"use strict";"undefined"!=typeof console&&console.log&&console.log(e)}}),Deki.provide("Deki.Special");var DekiWiki;if(DekiWiki=Deki,_.mixin(_.string.exports()),function(e,t){function i(e){return function(){return this[e]}}function n(e,t){var i=e.split("."),n=et;!(i[0]in n)&&n.execScript&&n.execScript("var "+i[0]);for(var s;i.length&&(s=i.shift());)i.length||void 0===t?n=n[s]?n[s]:n[s]={}:n[s]=t}function s(e){return e.call.apply(e.bind,arguments)}function r(e,t){if(!e)throw Error();if(2<arguments.length){var i=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,i),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function a(){return a=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?s:r,a.apply(Q,arguments)}function o(e,t){this.G=e,this.v=t||e,this.z=this.v.document}function l(e,i,n){e=e.z.getElementsByTagName(i)[0],e||(e=t.documentElement),e&&e.lastChild&&e.insertBefore(n,e.lastChild)}function u(e,t){for(var i=e.className.split(/\s+/),n=0,s=i.length;s>n;n++)if(i[n]==t)return;i.push(t),e.className=i.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function c(e,t){for(var i=e.className.split(/\s+/),n=[],s=0,r=i.length;r>s;s++)i[s]!=t&&n.push(i[s]);e.className=n.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function h(e,t){for(var i=e.className.split(/\s+/),n=0,s=i.length;s>n;n++)if(i[n]==t)return X;return Z}function d(e){var t=e.v.location.protocol;return"about:"==t&&(t=e.G.location.protocol),"https:"==t?"https:":"http:"}function f(e,t){var i=e.createElement("link",{rel:"stylesheet",href:t}),n=Z;i.onload=function(){n||(n=X)},i.onerror=function(){n||(n=X)},l(e,"head",i)}function p(t,i,n,s){var r=t.z.getElementsByTagName("head")[0];if(r){var a=t.createElement("script",{src:i}),o=Z;return a.onload=a.onreadystatechange=function(){o||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(o=X,n&&n(Q),a.onload=a.onreadystatechange=Q,"HEAD"==a.parentNode.tagName&&r.removeChild(a))},r.appendChild(a),e.setTimeout(function(){o||(o=X,n&&n(Error("Script load timeout")))},s||5e3),a}return Q}function g(e,t,i){this.M=e,this.U=t,this.Aa=i}function m(e,t,i,n){this.d=e!=Q?e:Q,this.o=t!=Q?t:Q,this.aa=i!=Q?i:Q,this.f=n!=Q?n:Q}function v(e){e=it.exec(e);var t=Q,i=Q,n=Q,s=Q;return e&&(e[1]!==Q&&e[1]&&(t=parseInt(e[1],10)),e[2]!==Q&&e[2]&&(i=parseInt(e[2],10)),e[3]!==Q&&e[3]&&(n=parseInt(e[3],10)),e[4]!==Q&&e[4]&&(s=/^[0-9]+$/.test(e[4])?parseInt(e[4],10):e[4])),new m(t,i,n,s)}function y(e,t,i,n,s,r,a,o,l,u,c){this.K=e,this.Ga=t,this.za=i,this.fa=n,this.Ea=s,this.ea=r,this.wa=a,this.Fa=o,this.va=l,this.da=u,this.k=c}function b(e,t){this.a=e,this.I=t}function _(e){var t=k(e.a,/(iPod|iPad|iPhone|Android|Windows Phone|BB\d{2}|BlackBerry)/,1);return""!=t?(/BB\d{2}/.test(t)&&(t="BlackBerry"),t):(e=k(e.a,/(Linux|Mac_PowerPC|Macintosh|Windows|CrOS)/,1),""!=e?("Mac_PowerPC"==e&&(e="Macintosh"),e):"Unknown")}function w(e){var t=k(e.a,/(OS X|Windows NT|Android) ([^;)]+)/,2);if(t||(t=k(e.a,/Windows Phone( OS)? ([^;)]+)/,2))||(t=k(e.a,/(iPhone )?OS ([\d_]+)/,2)))return t;if(t=k(e.a,/(?:Linux|CrOS) ([^;)]+)/,1))for(var t=t.split(/\s/),i=0;i<t.length;i+=1)if(/^[\d\._]+$/.test(t[i]))return t[i];return(e=k(e.a,/(BB\d{2}|BlackBerry).*?Version\/([^\s]*)/,2))?e:"Unknown"}function x(e){var t=_(e),i=w(e),n=v(i),s=k(e.a,/AppleWeb(?:K|k)it\/([\d\.\+]+)/,1),r=v(s),a="Unknown",o=new m,l="Unknown",u=Z;return/OPR\/[\d.]+/.test(e.a)?a="Opera":-1!=e.a.indexOf("Chrome")||-1!=e.a.indexOf("CrMo")||-1!=e.a.indexOf("CriOS")?a="Chrome":/Silk\/\d/.test(e.a)?a="Silk":"BlackBerry"==t||"Android"==t?a="BuiltinBrowser":-1!=e.a.indexOf("PhantomJS")?a="PhantomJS":-1!=e.a.indexOf("Safari")?a="Safari":-1!=e.a.indexOf("AdobeAIR")&&(a="AdobeAIR"),"BuiltinBrowser"==a?l="Unknown":"Silk"==a?l=k(e.a,/Silk\/([\d\._]+)/,1):"Chrome"==a?l=k(e.a,/(Chrome|CrMo|CriOS)\/([\d\.]+)/,2):-1!=e.a.indexOf("Version/")?l=k(e.a,/Version\/([\d\.\w]+)/,1):"AdobeAIR"==a?l=k(e.a,/AdobeAIR\/([\d\.]+)/,1):"Opera"==a?l=k(e.a,/OPR\/([\d.]+)/,1):"PhantomJS"==a&&(l=k(e.a,/PhantomJS\/([\d.]+)/,1)),o=v(l),u="AdobeAIR"==a?2<o.d||2==o.d&&5<=o.o:"BlackBerry"==t?10<=n.d:"Android"==t?2<n.d||2==n.d&&1<n.o:526<=r.d||525<=r.d&&13<=r.o,new y(a,o,l,"AppleWebKit",r,s,t,n,i,D(e.I),new g(u,536>r.d||536==r.d&&11>r.o,"iPhone"==t||"iPad"==t||"iPod"==t||"Macintosh"==t))
}function k(e,t,i){return(e=e.match(t))&&e[i]?e[i]:""}function D(e){return e.documentMode?e.documentMode:void 0}function C(e){this.ua=e||"-"}function S(e,t){this.K=e,this.V=4,this.L="n";var i=(t||"n4").match(/^([nio])([1-9])$/i);i&&(this.L=i[1],this.V=parseInt(i[2],10))}function T(e){return e.L+e.V}function P(e){var t=4,i="n",n=Q;return e&&((n=e.match(/(normal|oblique|italic)/i))&&n[1]&&(i=n[1].substr(0,1).toLowerCase()),(n=e.match(/([1-9]00|normal|bold)/i))&&n[1]&&(/bold/i.test(n[1])?t=7:/[1-9]00/.test(n[1])&&(t=parseInt(n[1].substr(0,1),10)))),i+t}function I(e,t,i){this.c=e,this.h=t,this.O=i,this.j="wf",this.g=new C("-")}function A(e){c(e.h,e.g.f(e.j,"loading")),h(e.h,e.g.f(e.j,"active"))||u(e.h,e.g.f(e.j,"inactive")),N(e,"inactive")}function N(e,t,i){e.O[t]&&(i?e.O[t](i.getName(),T(i)):e.O[t]())}function M(){this.w={}}function E(e,t){this.c=e,this.C=t,this.s=this.c.createElement("span",{"aria-hidden":"true"},this.C)}function F(e,t){var i;i=[];for(var n=t.K.split(/,\s*/),s=0;s<n.length;s++){var r=n[s].replace(/['"]/g,"");i.push(-1==r.indexOf(" ")?r:"'"+r+"'")}i=i.join(","),n="normal",s=t.V+"00","o"===t.L?n="oblique":"i"===t.L&&(n="italic"),e.s.style.cssText="position:absolute;top:-999px;left:-999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+i+";"+("font-style:"+n+";font-weight:"+s+";")}function O(e){l(e.c,"body",e.s)}function H(e,t,i,n,s,r,a,o){this.W=e,this.sa=t,this.c=i,this.q=n,this.C=o||"BESbswy",this.k=s,this.F={},this.T=r||5e3,this.Z=a||Q,this.B=this.A=Q,e=new E(this.c,this.C),O(e);for(var l in st)st.hasOwnProperty(l)&&(F(e,new S(st[l],T(this.q))),this.F[st[l]]=e.s.offsetWidth);e.remove()}function R(e,t,i){for(var n in st)if(st.hasOwnProperty(n)&&t===e.F[st[n]]&&i===e.F[st[n]])return X;return Z}function L(e){var t=e.A.s.offsetWidth,i=e.B.s.offsetWidth;t===e.F.serif&&i===e.F["sans-serif"]||e.k.U&&R(e,t,i)?tt()-e.xa>=e.T?e.k.U&&R(e,t,i)&&(e.Z===Q||e.Z.hasOwnProperty(e.q.getName()))?j(e,e.W):j(e,e.sa):setTimeout(a(function(){L(this)},e),25):j(e,e.W)}function j(e,t){e.A.remove(),e.B.remove(),t(e.q)}function U(e,t,i,n){this.c=t,this.t=i,this.P=0,this.ba=this.Y=Z,this.T=n,this.k=e.k}function z(e,t,i,n,s){if(0===t.length&&s)A(e.t);else for(e.P+=t.length,s&&(e.Y=s),s=0;s<t.length;s++){var r=t[s],o=i[r.getName()],l=e.t,c=r;u(l.h,l.g.f(l.j,c.getName(),T(c).toString(),"loading")),N(l,"fontloading",c),new H(a(e.ga,e),a(e.ha,e),e.c,r,e.k,e.T,n,o).start()}}function W(e){0==--e.P&&e.Y&&(e.ba?(e=e.t,c(e.h,e.g.f(e.j,"loading")),c(e.h,e.g.f(e.j,"inactive")),u(e.h,e.g.f(e.j,"active")),N(e,"active")):A(e.t))}function $(e){this.G=e,this.u=new M,this.ya=new b(e.navigator.userAgent,e.document),this.a=this.ya.parse(),this.Q=this.R=0}function B(e,t,i){this.N=e?e:t+rt,this.p=[],this.S=[],this.ca=i||""}function q(e){this.p=e,this.$=[],this.J={}}function Y(e,i){this.a=new b(navigator.userAgent,t).parse(),this.c=e,this.e=i}function G(e,t){this.c=e,this.e=t,this.m=[]}function V(e,t){this.c=e,this.e=t,this.m=[]}function J(e,t){this.c=e,this.e=t,this.m=[]}function K(e,t){this.c=e,this.e=t}var X=!0,Q=null,Z=!1,et=this,tt=Date.now||function(){return+new Date};o.prototype.createElement=function(e,t,i){if(e=this.z.createElement(e),t)for(var n in t)t.hasOwnProperty(n)&&("style"==n?e.style.cssText=t[n]:e.setAttribute(n,t[n]));return i&&e.appendChild(this.z.createTextNode(i)),e},n("webfont.BrowserInfo",g),g.prototype.pa=i("M"),g.prototype.hasWebFontSupport=g.prototype.pa,g.prototype.qa=i("U"),g.prototype.hasWebKitFallbackBug=g.prototype.qa,g.prototype.ra=i("Aa"),g.prototype.hasWebKitMetricsBug=g.prototype.ra;var it=/^([0-9]+)(?:[\._-]([0-9]+))?(?:[\._-]([0-9]+))?(?:[\._+-]?(.*))?$/;m.prototype.toString=function(){return[this.d,this.o||"",this.aa||"",this.f||""].join("")},n("webfont.UserAgent",y),y.prototype.getName=i("K"),y.prototype.getName=y.prototype.getName,y.prototype.oa=i("za"),y.prototype.getVersion=y.prototype.oa,y.prototype.ka=i("fa"),y.prototype.getEngine=y.prototype.ka,y.prototype.la=i("ea"),y.prototype.getEngineVersion=y.prototype.la,y.prototype.ma=i("wa"),y.prototype.getPlatform=y.prototype.ma,y.prototype.na=i("va"),y.prototype.getPlatformVersion=y.prototype.na,y.prototype.ja=i("da"),y.prototype.getDocumentMode=y.prototype.ja,y.prototype.ia=i("k"),y.prototype.getBrowserInfo=y.prototype.ia;var nt=new y("Unknown",new m,"Unknown","Unknown",new m,"Unknown","Unknown",new m,"Unknown",void 0,new g(Z,Z,Z));b.prototype.parse=function(){var e;if(-1!=this.a.indexOf("MSIE")||-1!=this.a.indexOf("Trident/")){e=_(this);var t=w(this),i=v(t),n=Q,s=Q,r=Q,a=Q,o=k(this.a,/Trident\/([\d\w\.]+)/,1),l=D(this.I),n=-1!=this.a.indexOf("MSIE")?k(this.a,/MSIE ([\d\w\.]+)/,1):k(this.a,/rv:([\d\w\.]+)/,1),s=v(n);""!=o?(r="Trident",a=v(o)):(r="Unknown",a=new m,o="Unknown"),e=new y("MSIE",s,n,r,a,o,e,i,t,l,new g("Windows"==e&&6<=s.d||"Windows Phone"==e&&8<=i.d,Z,Z))}else if(-1!=this.a.indexOf("Opera"))e:if(e="Unknown",t=k(this.a,/Presto\/([\d\w\.]+)/,1),i=v(t),n=w(this),s=v(n),r=D(this.I),i.d!==Q?e="Presto":(-1!=this.a.indexOf("Gecko")&&(e="Gecko"),t=k(this.a,/rv:([^\)]+)/,1),i=v(t)),-1!=this.a.indexOf("Opera Mini/"))a=k(this.a,/Opera Mini\/([\d\.]+)/,1),o=v(a),e=new y("OperaMini",o,a,e,i,t,_(this),s,n,r,new g(Z,Z,Z));else{if(-1!=this.a.indexOf("Version/")&&(a=k(this.a,/Version\/([\d\.]+)/,1),o=v(a),o.d!==Q)){e=new y("Opera",o,a,e,i,t,_(this),s,n,r,new g(10<=o.d,Z,Z));break e}a=k(this.a,/Opera[\/ ]([\d\.]+)/,1),o=v(a),e=o.d!==Q?new y("Opera",o,a,e,i,t,_(this),s,n,r,new g(10<=o.d,Z,Z)):new y("Opera",new m,"Unknown",e,i,t,_(this),s,n,r,new g(Z,Z,Z))}else/OPR\/[\d.]+/.test(this.a)?e=x(this):/AppleWeb(K|k)it/.test(this.a)?e=x(this):-1!=this.a.indexOf("Gecko")?(e="Unknown",t=new m,i="Unknown",n=w(this),s=v(n),r=Z,-1!=this.a.indexOf("Firefox")?(e="Firefox",i=k(this.a,/Firefox\/([\d\w\.]+)/,1),t=v(i),r=3<=t.d&&5<=t.o):-1!=this.a.indexOf("Mozilla")&&(e="Mozilla"),a=k(this.a,/rv:([^\)]+)/,1),o=v(a),r||(r=1<o.d||1==o.d&&9<o.o||1==o.d&&9==o.o&&2<=o.aa||a.match(/1\.9\.1b[123]/)!=Q||a.match(/1\.9\.1\.[\d\.]+/)!=Q),e=new y(e,t,i,"Gecko",o,a,_(this),s,n,D(this.I),new g(r,Z,Z))):e=nt;return e},C.prototype.f=function(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t].replace(/[\W_]+/g,"").toLowerCase());return e.join(this.ua)},S.prototype.getName=i("K"),E.prototype.remove=function(){var e=this.s;e.parentNode&&e.parentNode.removeChild(e)};var st={Da:"serif",Ca:"sans-serif",Ba:"monospace"};H.prototype.start=function(){this.A=new E(this.c,this.C),O(this.A),this.B=new E(this.c,this.C),O(this.B),this.xa=tt(),F(this.A,new S(this.q.getName()+",serif",T(this.q))),F(this.B,new S(this.q.getName()+",sans-serif",T(this.q))),L(this)},U.prototype.ga=function(e){var t=this.t;c(t.h,t.g.f(t.j,e.getName(),T(e).toString(),"loading")),c(t.h,t.g.f(t.j,e.getName(),T(e).toString(),"inactive")),u(t.h,t.g.f(t.j,e.getName(),T(e).toString(),"active")),N(t,"fontactive",e),this.ba=X,W(this)},U.prototype.ha=function(e){var t=this.t;c(t.h,t.g.f(t.j,e.getName(),T(e).toString(),"loading")),h(t.h,t.g.f(t.j,e.getName(),T(e).toString(),"active"))||u(t.h,t.g.f(t.j,e.getName(),T(e).toString(),"inactive")),N(t,"fontinactive",e),W(this)},$.prototype.load=function(e){var t=e.context||this.G;this.c=new o(this.G,t);var t=new I(this.c,t.document.documentElement,e),i=[],n=e.timeout;u(t.h,t.g.f(t.j,"loading")),N(t,"loading");var s,i=this.u,r=this.c,l=[];for(s in e)if(e.hasOwnProperty(s)){var c=i.w[s];c&&l.push(c(e[s],r))}for(i=l,this.Q=this.R=i.length,e=new U(this.a,this.c,t,n),s=0,n=i.length;n>s;s++)r=i[s],r.H(this.a,a(this.ta,this,r,t,e))},$.prototype.ta=function(e,t,i,n){var s=this;n?e.load(function(e,t,n){var r=0==--s.R;setTimeout(function(){z(i,e,t||{},n||Q,r)},0)}):(e=0==--this.R,this.Q--,e&&0==this.Q&&A(t),z(i,[],{},Q,e))};var rt="//fonts.googleapis.com/css";B.prototype.f=function(){if(0==this.p.length)throw Error("No fonts to load!");if(-1!=this.N.indexOf("kit="))return this.N;for(var e=this.p.length,t=[],i=0;e>i;i++)t.push(this.p[i].replace(/ /g,"+"));return e=this.N+"?family="+t.join("%7C"),0<this.S.length&&(e+="&subset="+this.S.join(",")),0<this.ca.length&&(e+="&text="+encodeURIComponent(this.ca)),e};var at={latin:"BESbswy",cyrillic:"&#1081;&#1103;&#1046;",greek:"&#945;&#946;&#931;",khmer:"&#x1780;&#x1781;&#x1782;",Hanuman:"&#x1780;&#x1781;&#x1782;"},ot={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},lt={i:"i",italic:"i",n:"n",normal:"n"},ut=RegExp("^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$");q.prototype.parse=function(){for(var e=this.p.length,t=0;e>t;t++){var i=this.p[t].split(":"),n=i[0].replace(/\+/g," "),s=["n4"];if(2<=i.length){var r,a=i[1];if(r=[],a)for(var a=a.split(","),o=a.length,l=0;o>l;l++){var u;if(u=a[l],u.match(/^[\w-]+$/)){u=ut.exec(u.toLowerCase());var c=void 0;if(u==Q)c="";else{if(c=void 0,c=u[1],c==Q||""==c)c="4";else var h=ot[c],c=h?h:isNaN(c)?"4":c.substr(0,1);c=[u[2]==Q||""==u[2]?"n":lt[u[2]],c].join("")}u=c}else u="";u&&r.push(u)}0<r.length&&(s=r),3==i.length&&(i=i[2],r=[],i=i?i.split(","):r,0<i.length&&(i=at[i[0]])&&(this.J[n]=i))}for(this.J[n]||(i=at[n])&&(this.J[n]=i),i=0;i<s.length;i+=1)this.$.push(new S(n,s[i]))}};var ct={Arimo:X,Cousine:X,Tinos:X};Y.prototype.H=function(e,t){t(e.k.M)},Y.prototype.load=function(e){var t=this.c;if("MSIE"==this.a.getName()&&this.e.blocking!=X){var i=a(this.X,this,e),n=function(){t.z.body?i():setTimeout(n,0)};n()}else this.X(e)},Y.prototype.X=function(e){for(var t=this.c,i=new B(this.e.api,d(t),this.e.text),n=this.e.families,s=n.length,r=0;s>r;r++){var a=n[r].split(":");3==a.length&&i.S.push(a.pop());var o="";2==a.length&&""!=a[1]&&(o=":"),i.p.push(a.join(o))}n=new q(n),n.parse(),f(t,i.f()),e(n.$,n.J,ct)},G.prototype.D=function(e){return d(this.c)+(this.e.api||"//f.fontdeck.com/s/css/js/")+(this.c.v.location.hostname||this.c.G.location.hostname)+"/"+e+".js"},G.prototype.H=function(e,t){var i=this.e.id,n=this.c.v,s=this;i?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[i]=function(e,i){for(var n=0,r=i.fonts.length;r>n;++n){var a=i.fonts[n];s.m.push(new S(a.name,P("font-weight:"+a.weight+";font-style:"+a.style)))}t(e)},p(this.c,this.D(i),function(e){e&&t(Z)})):t(Z)},G.prototype.load=function(e){e(this.m)},V.prototype.D=function(e){var t=d(this.c);return(this.e.api||t+"//use.typekit.net")+"/"+e+".js"},V.prototype.H=function(e,t){var i=this.e.id,n=this.e,s=this.c.v,r=this;i?(s.__webfonttypekitmodule__||(s.__webfonttypekitmodule__={}),s.__webfonttypekitmodule__[i]=function(i){i(e,n,function(e,i,n){for(var s=0;s<i.length;s+=1){var a=n[i[s]];if(a)for(var o=0;o<a.length;o+=1)r.m.push(new S(i[s],a[o]));else r.m.push(new S(i[s]))}t(e)})},p(this.c,this.D(i),function(e){e&&t(Z)},2e3)):t(Z)},V.prototype.load=function(e){e(this.m)},J.prototype.H=function(e,t){var i=this,n=i.e.projectId,s=i.e.version;if(n){var r=i.c.v;p(this.c,i.D(n,s),function(s){if(s)t(Z);else{if(r["__mti_fntLst"+n]&&(s=r["__mti_fntLst"+n]()))for(var a=0;a<s.length;a++)i.m.push(new S(s[a].fontfamily));t(e.k.M)}}).id="__MonotypeAPIScript__"+n}else t(Z)},J.prototype.D=function(e,t){var i=d(this.c),n=(this.e.api||"fast.fonts.net/jsapi").replace(/^.*http(s?):(\/\/)?/,"");return i+"//"+n+"/"+e+".js"+(t?"?v="+t:"")},J.prototype.load=function(e){e(this.m)},K.prototype.load=function(e){var t,i,n=this.e.urls||[],s=this.e.families||[],r=this.e.testStrings||{};for(t=0,i=n.length;i>t;t++)f(this.c,n[t]);for(n=[],t=0,i=s.length;i>t;t++){var a=s[t].split(":");if(a[1])for(var o=a[1].split(","),l=0;l<o.length;l+=1)n.push(new S(a[0],o[l]));else n.push(new S(a[0]))}e(n,r)},K.prototype.H=function(e,t){return t(e.k.M)};var ht=new $(et);ht.u.w.custom=function(e,t){return new K(t,e)},ht.u.w.fontdeck=function(e,t){return new G(t,e)},ht.u.w.monotype=function(e,t){return new J(t,e)},ht.u.w.typekit=function(e,t){return new V(t,e)},ht.u.w.google=function(e,t){return new Y(t,e)},et.WebFont||(et.WebFont={},et.WebFont.load=a(ht.load,ht),et.WebFontConfig&&ht.load(et.WebFontConfig))}(this,document),function(){"use strict";Deki.provide("Deki.Xhr"),_(Deki.Xhr).extend({extendXhr:function(e){return _(e).extend({getStatusText:function(){switch(this.status){case 100:return"Continue";case 101:return"Switching Protocols";case 200:return"Ok";case 201:return"Created";case 202:return"Accepted";case 203:return"Non-Authoritative Information";case 204:return"No Content";case 205:return"Reset Content";case 206:return"Partial Content";case 207:return"Multi-Status";case 300:return"Multiple Choices";case 301:return"Moved Permanently";case 302:return"Found";case 303:return"See Other";case 304:return"Not Modified";case 305:return"Use Proxy";case 306:return"(Reserved)";case 307:return"Temporary Redirect";case 400:return"Bad Request";case 401:return"Unauthorized";case 402:return"Payment Required";case 403:return"Forbidden";case 404:return"Not Found";case 405:return"Method Not Allowed";case 406:return"Not Acceptable";case 407:return"Proxy Authentication";case 408:return"Request Timeout";case 409:return"Conflict";case 410:return"Gone";case 411:return"Length Required";case 412:return"Precondition Failed";case 413:return"Request Entity Too Large";case 414:return"Request-URI Too Long";case 415:return"Unsupported Media Type";case 416:return"Requested Range Not Satisfiable";case 417:return"Expectation Failed";case 422:return"Unprocessable Entity";case 423:return"Locked";case 424:return"Failed Dependency";case 500:return"Internal Server Error";case 501:return"Not Implemented";case 502:return"Bad Gateway";case 503:return"Service Unavailable";case 504:return"Gateway Timeout";case 505:return"HTTP Version Not Supported";case 507:return"Insufficient Storage"}return"(Unknown)"},isSuccess:function(){return this.status>=200&&this.status<300||304===this.status},getETag:function(){var e=this.getResponseHeader("ETag"),t=this.getResponseHeader("Content-Encoding");return t&&t.length>0&&(e=e.replace("-"+t,"")),e},errorMessage:function(e){return(e||"Request failed")+" (status: "+this.status+" - "+this.getStatusText()+")"},getError:function(){if(this.isSuccess())throw"The response was successful, requesting an error in not a valid operation";var e=this.isJson()?this.getJson():{};return{code:this.status,exception:e.exception||null,message:e.message||this.errorMessage(),data:e.data||{}}},isJson:function(){var e="application/json",t=this.getResponseHeader("Content-Type")||"";return t.substr(0,e.length)===e},getJson:function(){if(!this.isJson())throw new Error("Response is not JSON (Content-Type: "+this.getResponseHeader("Content-Type")+")");return JSON.parse(this.responseText)}})}})}(),function(e){"use strict";Deki.provide("Deki.Comments"),_(Deki.Comments).extend({ViewingAll:!1,_commentsUrl:"/deki/gui/comments.php",HookSubmitOnclick:function(){var t=this;e("#comments").find("input[name=commentSubmit]").click(function(i){i.preventDefault();var n=e("#wpCommentNum");n&&n.value>0||t.PostComment(this)})},PostComment:function(t,i){var n=e(t).parents("form").find("textarea").val(),s=this;e.ajax({type:"POST",url:this._commentsUrl,data:{action:"post",titleId:Deki.PageId,comment:n,showAll:s.ViewingAll,commentNum:i?i:null},success:function(e){s.SetComment(e)},dataType:"html"})},ShowComment:function(t){var i=e("#commentTextForm"+t),n=e("#commentText"+t);return i&&n?(n.show(),i.hide(),!0):!1},EditComment:function(t){var i=e("#commentTextForm"+t),n=e("#commentText"+t);if(!i||!n)return!1;var s=this;return""===i.html()&&e.ajax({url:this._commentsUrl,data:{action:"edit",titleId:Deki.PageId,commentNum:t},success:function(n){i.html(n);var r=e("#commentEditForm").find("textarea[name=wpComment]");r.focus();var a=r.val();e("#commentCancel"+t).click(function(){return r.val(a),s.ShowComment(t),!1}),i.find("input[name=commentSubmit]").click(function(){return s.PostComment(this,t),!1})},dataType:"html"}),e(".comment").find("textarea.commentText:visible").each(function(){var i=e(this).parents(".comment").find("input[name=wpCommentNum]").val();i!==t&&s.ShowComment(i)}),n.hide(),i.show(),!1},DeleteComment:function(t){return window.confirm(Deki.loc("comment-delete"))&&e.ajax({url:this._commentsUrl,data:{action:"delete",titleId:Deki.PageId,commentNum:t},success:function(i){e("#comment"+t).html(i)},dataType:"html"}),!1},GetComments:function(t){var i=this;return"all"===t&&(i.ViewingAll=!0),e.ajax({url:this._commentsUrl,data:{action:"show",titleId:Deki.PageId,commentCount:t},success:function(e){i.SetComment(e)},dataType:"html"}),!1},SetComment:function(t){e("#comments").html(t)}}),e(function(){Deki.Comments.HookSubmitOnclick()}),window.MTComments=Deki.Comments}(jQuery),function(e){"use strict";Deki.provide("Deki.CssPreview"),_(Deki.CssPreview).extend({getPreviewId:function(t){var i=new e.Deferred,n=new Deki.Plug(Deki.BaseHref+"/").at("@cp","css","preview.json");return n.post(t.serialize(),Deki.Utility.formRequestType,function(e){if(e.isSuccess()){var t=e.getJson();i.resolve(t)}else i.reject(e)}),i.promise()},getCustomCss:function(t,i,n){var s=this,r=sessionStorage.getItem(t);if(r){var a=new Deki.Plug(Deki.BaseHref+"/").at("@app","css","skin.css"),o=e("body").spinner({size:"xlarge",messageText:"Loading custom css"});a.get(function(t){t.isSuccess()&&(e("head").append('<style type="text/css">'+t.responseText+"</style>"),e("head").append('<style type="text/css">'+r+"</style>"),e("#mt-custom-css").remove(),e("#mt-screen-css").remove()),s.showCSSHeader(i),o.spinner("hideSpinner")},"",{async:!0})}else""===r&&(s.showCSSHeader(i),Deki.Ui.Flash(n||"Preview Id has expired","warning"))},showCSSHeader:function(t){var i='<div class="mt-css-preview-bar-container"><div id="mt-css-preview-bar">'+(t||"CSS PREVIEW MODE")+"</div></div>";e("body").prepend(i)}})}(jQuery),function(e){"use strict";Deki.provide("Deki.DelayedSearch"),_(Deki.DelayedSearch).extend({_previousSearchQuery:"",_options:{},init:function(e,t,i){i&&(this._options=i),this._options.callBack=t,this._options.$elm=e,e.on("keyup",this.triggerSearch())},triggerSearch:function(){var t=null,i=this._options,n=i.reference,s=this._previousSearchQuery,r=i.$elm,a=i.progress?i.progress:null,o=i.customelement?i.customelement:null,l=i.customclass?i.customclass:null,u=i.timeout?i.timeout:400,c=i.minimum?i.minimum:4;return function(){var h=_.trim(r.val()).replace(/\s+/g," "),d=n?n:this,f=arguments;return""===_.trim(r.val()).replace(/\s+/g," ")||_.trim(s).replace(/\s+/g," ")===h||h.length<c?void(s=r.val()):(s=r.val(),a&&a.show(),o&&l&&o.addClass(l),clearTimeout(t),void(t=setTimeout(function(){e.when(i.callBack.apply(d,f)).done(function(){a&&a.hide(),o&&l&&o.removeClass(l)})},u)))}}})}(jQuery),function(e){"use strict";Deki.provide("Deki.Gui"),_(Deki.Gui).extend({Status:{ERROR:0,OK:200,ERROR_LOGIN:401,ERROR_COMMERCIAL:402,ERROR_PERMISSIONS:403},AjaxRequest:function(t){t.type=t.type||"get",t.timeout=t.timeout||3e4,t.dataType=t.dataType||"json";var i=null;t.success&&(i=t.success),t.success=function(e,n,s){Deki.Gui.handleResponse(e,s,t)&&i&&i(e,n,s)},"undefined"==typeof t.error&&(t.error=function(){Deki.Ui.EmptyFlash(),Deki.Ui.Flash(Deki.loc("error")+"<br />"+Deki.loc("internal-error"))}),e.ajax(t)},handleResponse:function(t,i,n){if("xml"===n.dataType){var s=e(t);if(s.find("formatter[success=1]").length)return!0;Deki.Ui.Flash(s.find("formatter").attr("message")+"<br />"+s.find("body").val())}else{if(t.success)return!0;var r=t.body?t.body:"";Deki.Ui.EmptyFlash(),Deki.Ui.Flash(t.message+"<br />"+r)}return!1}})}(jQuery),"undefined"==typeof Rollbar)var Rollbar=null;!function(e){"use strict";Deki.provide("Deki.Logger"),_(Deki.Logger).extend({_logger:e,deprecatedModule:function(e){this.info("Deprecated module: "+e,{module:e})},deprecatedFunction:function(e){this.info("Deprecated function: "+e,{func:e})},info:function(e,t){null!==this._logger&&this._logger.info(e,t)}})}(Rollbar),function(e,t){"use strict";Deki.provide("Deki.Plug"),Deki.Plug=function(e,i){if(!e)throw new Error("missing url argument");i=i||{},this.headers=i.headers||{},this.suppressOriginParam=i.suppressOriginParam===!0,t.extend(this,"string"==typeof e?s(e):e,i)},e.Plug=Deki.Plug;var i=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))(?:[^\/@]*)?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(#.*)?)/,n=["original","protocol","authority","userInfo","user","password","hostname","port","relative","path","directory","file","query","fragment"],s=function(e){if(!e)return{original:"",protocol:null,authority:null,userInfo:null,user:null,password:null,hostname:null,port:null,relative:null,path:null,directory:null,file:null,query:null,params:null,fragment:null,segments:[]};for(var t=i.exec(e),s={},r=0;r<n.length;++r)s[n[r]]=t[r]||null;if(s.fragment=null===s.fragment?null:decodeURIComponent(s.fragment.substr(1)),s.trailingSlash=s.path?"/"===s.path[s.path.length-1]:!1,s.params=e.indexOf("?")<0?null:function(){var e={};if(null!==s.query)for(var t=s.query.split("&"),i=0;i<t.length;++i)if(t[i]){var n=t[i].split("=");e[n[0]]=n.length>1?decodeURIComponent(n[1]):null}return e}(),s.segments=function(){var e=s.path.replace(/^\//,"").replace(/\/$/,"").split("/");if(1===e.length&&0===e[0].length)e=[];else for(var t=0;t<e.length;++t)e[t]=decodeURIComponent(e[t]);return e}(),s.protocol=s.protocol||null,s.hostname=s.protocol?s.hostname||"":null,s.implicitPort=null===s.port,s.implicitPort&&s.protocol){switch(s.protocol){case"http":s.port="80";break;case"https":s.port="443";break;case"ftp":s.port="21";break;case"file":s.port=null;break;default:s.port=0}var a=s.protocol+"://"+s.hostname+":";s.implicitPort=e.substr(0,a.length)!==a}return s};_(Deki.Plug.prototype).extend({getUrl:function(){var e="";this.protocol&&(e+=this.protocol+"://"+this.hostname),!this.implicitPort&&this.port&&(e+=":"+this.port);for(var i=0;i<this.segments.length;++i)e+="/"+encodeURIComponent(this.segments[i]);if(this.trailingSlash&&(e+="/"),!this.suppressOriginParam){var n={origin:Deki.isF1Request?"mt-f1":"mt-web"};this.params=this.params?_(this.params).extend(n):n}if(this.params){e+="?";var s=!0;t.each(this.params,function(t,i){s||(e+="&"),s=!1,e+=encodeURIComponent(t),null!==i&&(e+="="+encodeURIComponent(i.toString()))})}return null!==this.fragment&&(e+="#"+encodeURIComponent(this.fragment)),e},get:function(e,i,n){var s=null!==e,r={context:this,async:s,url:this.getUrl(),type:i||"GET",cache:!1,beforeSend:this._beforeSend,complete:s&&function(t){e(Deki.Xhr.extendXhr(t))}};n&&_(r).extend(n);var a=t.ajax(r);return s?void 0:Deki.Xhr.extendXhr(a)},post:function(e,i,n,s){var r=null!==n,a=t.ajax(_({context:this,async:r,url:this.getUrl(),type:"POST",data:e||"",contentType:i,processData:!1,beforeSend:this._beforeSend,complete:r&&function(e){n(Deki.Xhr.extendXhr(e))}}).extend(s));return r?void 0:Deki.Xhr.extendXhr(a)},put:function(e,t,i){return this.withHeader("X-HTTP-Method-Override","PUT").post(e,t,i)},head:function(e){return this.get(e,"HEAD")},options:function(e){return this.get(e,"OPTIONS")},del:function(e){return this.withHeader("X-HTTP-Method-Override","DELETE").post(null,null,e)},at:function(){for(var e=0;e<arguments.length;++e)if(null===arguments[e])throw new Error("argument "+(e+1)+" is null");var i=[];return t.each(this.segments,function(e,t){i.push(t.toString())}),t.each(arguments,function(e,t){_(t).isArray()?_(t).each(function(e){i.push(e.toString())}):i.push(t.toString())}),new Deki.Plug(this,t.extend({},this.options,{segments:i,trailingSlash:!1}))},withParam:function(e,i){var n=t.extend({},this.params);return n[e]=i,new Deki.Plug(this,t.extend({},this.options,{params:n}))},withParams:function(e){var i=t.extend({},this.params,e);return new Deki.Plug(this,t.extend({},this.options,{params:i}))},withoutParam:function(e){var i=t.extend({},this.params);return delete i[e],new Deki.Plug(this,t.extend({},this.options,{params:i}))},withTrailingSlash:function(){return new Deki.Plug(this,t.extend({},this.options,{trailingSlash:!0}))},withoutTrailingSlash:function(){return new Deki.Plug(this,t.extend({},this.options,{trailingSlash:!0}))},withHeader:function(e,i){var n=t.extend({},this.headers);return n[e]=i,new Deki.Plug(this,t.extend({},this.options,{headers:n}))},withHeaders:function(e){var i=t.extend({},this.headers,e);return new Deki.Plug(this,t.extend({},this.options,{headers:i}))},withoutHeader:function(e){var i=t.extend({},this.headers);return delete i[e],new Deki.Plug(this,t.extend({},this.options,{headers:i}))},_beforeSend:function(e){return this.headers&&t.each(this.headers,function(t,i){"object"!=typeof i&&"function"!=typeof i&&e.setRequestHeader(t,i)}),"https"===this.protocol&&e.setRequestHeader("Front-End-Https","On"),!0}})}(this,jQuery),function(e){"use strict";Deki.provide("Deki.Plugin"),_(Deki.Plugin).extend({AJAX_URL:"/deki/gui/plugin.php",GetAjaxHookUrl:function(t){var i="";return t&&t.formatter&&(i=this.AJAX_URL+"?"+e.param(t)),i},AjaxRequest:function(e,t){t.url=t.url||this.AJAX_URL,"xml"===t.dataType&&(t.data.format="xml");var i=t.data||{};i.formatter=e,i.language||(i.language=Deki.PageLanguageCode||"en-us"),t.data=i,Deki.Gui.AjaxRequest(t)},Subscribe:function(t,i){e(document).bind(t,i)},Unsubscribe:function(t,i){e(document).unbind(t,i)},Publish:function(t,i){e(document).trigger(t,i)}})}(jQuery),function(){"use strict";Deki.Time=moment,moment.fn.defaults={dateTimeFormat:"HH:mm, D MMM YYYY",dateFormat:"D MMM YYYY",timeFormat:"HH:mm",apiFormat:"YYYYMMDDHHmmss"},moment.fn.getDate=function(){return moment(this).format(this.defaults.dateFormat)},moment.fn.getAPIDateTime=function(){return moment(this).format(this.defaults.apiFormat)},moment.fn.getTime=function(){return moment(this).format(this.defaults.timeFormat)},moment.fn.getDateTime=function(){return moment(this).format(this.defaults.dateTimeFormat)},moment.fn.range=function(e,t,i){if(!moment.isMoment(this)||!moment.isMoment(e))throw"end must be a moment object";i=i||"d",t=t||1;for(var n=[],s=this.clone();!s.isAfter(e);)n.push(s.clone()),s.add(moment.duration(t,i));return n}}(),function(e){"use strict";Deki.provide("Deki.Ui"),window.MTMessage={Show:function(e,t,i){Deki.Log("MTMessage.Show() is deprecated.  Use Deki.Ui.Flash() directly.");var n=t;e&&(n=e+"<br />"+n);var s=i||"error";Deki.Ui.Flash(n,s)},Hide:function(e){Deki.Log("MTMessage.Hide() is deprecated.  Use Deki.Ui.EmptyFlash() directly."),e=e||"error",Deki.Ui.EmptyFlash(e)}},_(Deki.Ui).extend({_messageFadeOut:function(t){t.animate({height:"hide",opacity:"hide",queue:!1},500,function(){t.remove(),e(document).trigger(Deki.Ui.Events.Flash.Hide)})},Flash:function(t,i,n){if(!_(t).isEmpty()){var s=_("<li><%= data.flashMsg %></li>").template(null,{variable:"data"}),r=_('<div id="<%= data.type %>Msg" class="<%= data.type %>msg systemmsg ui-helper-hidden"><button class="ui-button-icon delete-msg mt-icon-delete-msg" title="Close message">Close message</button><div class="inner mt-icon-flash-message"><ul><%= data.innerList %></ul></div></div>').template(null,{variable:"data"});i=i||"error";var a=_.extend({timeout:"success"===i},n),o=a.target||"",l=i+"msg",u=""===o?e("#flash-messages").find(".dekiFlash"):e("#"+o),c=u.find("."+l),h=s({flashMsg:t});if(0===c.length)c=e('<div id="'+i+'Msg" class="'+l+' systemmsg"><button class="ui-button-icon delete-msg mt-icon-delete-msg" title="Close message">Close message</button><div class="inner mt-icon-flash-message"><ul></ul></div></div>'),c=e(r({flashMsg:t,innerList:h,type:i})),u.append(c);else{var d=c.find("ul");e(h).appendTo(d)}c.show(),n&&n.scrollTop===!0&&e("html, body").animate({scrollTop:0},"fast"),e(document).trigger(Deki.Ui.Events.Flash.Show),e("#flash-messages").find(".delete-msg").focus()}},FlashReload:function(e,t){var i=Deki.Utility.fetch("mindtouch-flash-message");i=i||[],i.push({text:e,type:t}),Deki.Utility.store("mindtouch-flash-message",i)},EmptyFlash:function(t){t=t||"error","all"===t?(Deki.Ui.EmptyFlash("success"),Deki.Ui.EmptyFlash("error"),Deki.Ui.EmptyFlash("info")):e("."+t+"msg").remove()},Message:function(e,t){Deki.Log("Deki.Ui.Message() is deprecated.  Use Deki.Ui.Flash() directly."),Deki.Ui.Flash(e+"<br />"+t,null,null)},DisabledMessage:function(){Deki.Ui.Flash(Deki.loc("error-permission-denied")+".  "+Deki.loc("error-permission-details"),null,null)},PageRefresh:function(e){if(e){var t=new Deki.Plug(window.location.toString());window.location.href=t.withParams(e).getUrl()}else window.location.reload(!0)},redirectTo:function(e){var t=parent?parent.window:window;t.location.href=e},SelectCheckboxes:function(t){Deki.Logger.deprecatedFunction("Deki.Ui.SelectCheckboxes()");var i=e(":checkbox",e(t).parents("form"));return e(t).is(":checked")?i.prop("checked",!0):i.prop("checked",!1)},ToggleChangesTable:function(t){return Deki.Logger.deprecatedFunction("Deki.Ui.ToggleChangesTable()"),e("#showlink-"+t).toggle(),e("#hidelink-"+t).toggle(),e("."+t).toggle(),!1},appendPageHtml:function(t,i,n){n.empty();var s=new Deki.Page(Deki.PageId);i.rawResponse=!0,s.getHtmlTemplate(t,i).done(function(t){var i=t.data.body;_(i).isArray()&&(i=_.without(i,function(e){return _.isObject(e)}),i=i[0]),e(i).each(function(){var t=e(this);t.is("script")?e("head").append(t):n.append(t)})})}}),e(function(){e(document).on("click",".delete-msg",function(){Deki.Ui._messageFadeOut(e(this).parent())});var t="mindtouch-flash-message",i=Deki.Utility.fetch(t);_(i).each(function(e){Deki.Ui.Flash(e.text,e.type)}),Deki.Utility.clearStorage(t),e("input, textarea").placeholder(),e.ajaxPrefilter(function(t,i,n){if(!t.crossDomain){var s=e('meta[name="csrf-token"]').attr("content");s&&n.setRequestHeader("X-CSRF-Token",s)}}),Deki.CDNHostname&&Deki._disableCdn&&(e(".mt-cdn").each(function(){var t="src",i=e(this).attr(t);i||(t="href",i=e(this).attr(t)),i&&e(this).attr(t,Deki._disableCdn(i))}),Deki.EditorConfigUri&&(Deki.EditorConfigUri=Deki._disableCdn(Deki.EditorConfigUri)),Deki.EditorStylesUri&&(Deki.EditorStylesUri=Deki._disableCdn(Deki.EditorStylesUri))),e(document).on("submit",".mt-ignore-form",function(e){e.preventDefault()})})}(jQuery),function(){"use strict";Deki.Uri=window.Uri,_(Deki.Uri.prototype).extend({getUriHash:function(){return new Deki.UriHash(this.anchor())},addQueryParams:function(e){var t=this;return _(e).each(function(e,i){t.addQueryParam(i,e)}),t}})}(),function(){"use strict";Deki.provide("Deki.UriHash"),Deki.UriHash=function(e){_(e).startsWith("#")&&(e=e.substr(1)),this._hashStr=e||"",this._params=Deki.Utility.getStringParams(e)},_(Deki.UriHash.prototype).extend({getQueryParams:function(){return this._params},replaceParams:function(e){return new Deki.UriHash(_(this._hashStr).strLeft("?")+Deki.Utility.buildQueryString(e))},withParam:function(e,t){var i=this._params;return i[e]=t,this.replaceParams(i)},withoutParam:function(e){var t=this._params;return delete t[e],this.replaceParams(t)},getParam:function(e){return this._params[e]},toHashString:function(){return"#"+this._hashStr}})}(),function(){"use strict";Deki.provide("Deki.Utility"),_(Deki.Utility).extend({_restrictedPasswordWords:["password"],getProtocol:function(){return window.location.protocol.replace(":","")},getOrigin:function(e){var t=window.location;return e&&(t=document.createElement("a"),t.href=e),t.origin||t.protocol+"//"+t.hostname+(t.port?":"+t.port:"")},xmlRequestType:"application/xml; charset=utf-8",textRequestType:"text/plain; charset=utf-8",jsonRequestType:"application/json; charset=utf-8",formRequestType:"application/x-www-form-urlencoded",formatNumber:function(e,t,i){t=t||".",i=i||",",e+="";for(var n=e.split(t),s=n[0],r=n.length>1?t+n[1]:"",a=/(\d+)(\d{3})/;a.test(s);)s=s.replace(a,"$1"+i+"$2");return s+r},formatF1Uri:function(e){if(Deki.isF1Request){var t=document.createElement("a");t.href=e;var i=t.pathname;return i&&"/"!==i[0]&&(i="/"+i),t.protocol+"//"+t.host.replace(/^(www\.)?(?:f1\.)?/g,"$1f1.")+i+(t.search||"")+t.hash
}return e},formatBytes:function(e){var t=0;switch(e>1228&&(t+=1,e/=1024),e>1228&&(t+=1,e/=1024),e>1228&&(t+=1,e/=1024),t){case 0:return this.formatNumber(Math.round(e))+" bytes";case 1:return this.formatNumber(Math.round(e))+" KiB";case 2:return this.formatNumber(Math.round(10*e)/10)+" MiB";case 3:return this.formatNumber(Math.round(100*e)/100)+" GiB";default:return this.formatNumber(Math.round(e))+" bytes"}},pad:function(e){return(10>e?"0":"")+e},getMonthName:function(e){Deki.Logger.deprecatedFunction("Deki.Utility.getMonthName()");var t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];return t[e]},formatDate:function(e,t,i){Deki.Logger.deprecatedFunction("Deki.Utility.formatDate()"),t="undefined"==typeof t||t!==!1,i="undefined"==typeof i||i!==!1;var n=new Date(e);if(_(n).isNaN()){var s=e.replace(/T(\d{2}:\d{2}:\d{2})Z/,"T$1.000Z").split(/\D/);n=new Date(Date.UTC(s[0],--s[1],s[2],s[3],s[4],s[5],s[6]))}if(!_(n).isDate())return e;var r="";return i===!0&&(r+=this.pad(n.getUTCHours())+":"+this.pad(n.getMinutes()),t&&(r+=", ")),t===!0&&(r+=n.getUTCDate()+" "+this.getMonthName(n.getUTCMonth())+" "+n.getFullYear()),r},compareDate:function(e,t,i){var n=new Date(e),s=new Date(t),r=!1;if(_(n).isDate()&&_(s).isDate())switch(i){case"day":r=n.getDate()===s.getDate()&&n.getMonth()===s.getMonth()&&n.getFullYear()===s.getFullYear();break;case"month":r=n.getFullYear()===s.getFullYear()&&n.getMonth()===s.getMonth();break;case"year":r=n.getFullYear()===s.getFullYear();break;default:r=n===s}return r},formatLocalization:function(e){window.aLt&&e in window.aLt&&(e=window.aLt[e]);for(var t=0;t<arguments.length;t++){var i=new RegExp("\\{"+t+"\\}","g");e=e.replace(i,arguments[t+1])}return e},store:function(e,t){try{return window.localStorage.setItem(e,JSON.stringify(t)),!0}catch(i){return!1}},fetch:function(e){var t;try{t=window.localStorage.getItem(e)}catch(i){return null}var n=null;return t?n=JSON.parse(t):null},clearStorage:function(e){window.localStorage.removeItem(e)},isValidEmail:function(e){return new RegExp("^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$").test(e)},searchEscape:function(e){var t=e;return _(["\\","+","-","&","|","!","(",")","{","}","[","]","^",'"',"~","*","?",":"]).each(function(e){var i=new RegExp("\\"+e,"g");t=t.replace(i,"\\"+e)}),t},getPasswordStrength:function(e){var t=this,i={rating:!0,lengthOk:!0,matchVerify:!0,freeOfRestrictedWords:!0};e.password.length<e.minLength&&(i.lengthOk=!1),e.matchPassword.length>0&&e.matchPassword!==e.password&&(i.matchVerify=!1);var n=0;e.password.match(/[a-z]+/)&&n++,e.password.match(/[A-Z]+/)&&n++,e.password.match(/[0-9]+/)&&n++,e.password.match(/[^a-zA-Z0-9]+/)&&n++,n<e.minRating&&(i.rating=!1);var s=e.password.toLowerCase(),r=_(t._restrictedPasswordWords).find(function(e){return _.str.include(s,e)});return r&&(i.freeOfRestrictedWords=!1),i},makeArray:function(e){return e="undefined"==typeof e?[]:e,_(e).isArray()?e:[e]},makeString:function(e){if(_.isString(e))return e;if(_.isObject(e)&&"#text"in e)return e["#text"];throw"No string or string-containing object found"},getCachedJavascript:function(e){return $.ajax({type:"GET",url:this.getCacheUrl(e),cache:!0,dataType:"script"})},getCacheUrl:function(e){return Deki.CDNHostname&&!Deki._disableCdn?window.location.protocol+"//"+Deki.CDNHostname+e+"?_="+Deki.CacheFingerprint:e},finishDeferred:function(e){return function(t){var i=!1;_(t).has("success")&&(i=t.success,delete t.success),i?e.resolve(t):e.reject(t)}},getStringParams:function(e){if(!_(e).include("?"))return{};var t={};return _(e).chain().strRight("?").words("&").each(function(e){var i=e.split("=");i[0]&&(t[decodeURIComponent(i[0])]=decodeURIComponent(i[1]))}),t},buildQueryString:function(e){return _(e).reduce(function(e,t,i){var n=e.querystring+e.delim+encodeURIComponent(i)+"=";return t&&(n+=encodeURIComponent(t)),{querystring:n,delim:"&"}},{querystring:"",delim:"?"}).querystring},guid:function(){function e(e){var t=(Math.random().toString(16)+"000000000").substr(2,8);return e?"-"+t.substr(0,4)+"-"+t.substr(4,4):t}return e()+e(!0)+e(!0)+e()},getPagesWithClassifications:function(e,t){if(!e)return[];_(e).isArray()||(e=[e]);var i=[];return _(e).each(function(e){e.tags.tag=e.tags.tag||[],_(e.tags.tag).isArray()||(e.tags.tag=[e.tags.tag]);var n=e;_(t).each(function(t){var i=_(e.tags.tag).find(function(e){return _(e["@value"]).startsWith(t.prefix+":")});if(i&&t.tags){var s=_(t.tags).find(function(e){return t.prefix+":"+e.tag===i.title});s&&(n[t.prefix]=s)}}),i.push(n)}),i},buildSearchConstraint:function(e){var t=[];if(e.namespace="main",t.push("+namespace:"+Deki.Utility.searchEscape(e.namespace)),"path"in e){var i=e.path;_.startsWith(i,"/")&&(i=_.ltrim(i,"/")),_.isBlank(i)||t.push("+path.ancestor:"+Deki.Utility.searchEscape(i))}if("tags"in e){var n=e.tags;_.isString(n)&&!_.isBlank(n)&&(n=n.split(",")),_.each(n,function(e){t.push('+tag:"'+Deki.Utility.searchEscape(e)+'"')})}return"+("+t.join(" ")+")"}}),_(Deki).extend({loc:Deki.Utility.formatLocalization})}(),function(){"use strict";Deki.provide("Deki.WindowHistory"),_.extend(Deki.WindowHistory,{_hasPushState:window.history&&window.history.pushState,generateHistoryUri:function(e,t){var i="",n=$.param(e,!0);return n=n.replace(/\+/g,"%20"),t=t?t:window.location.pathname,i=t+"?"+n},getParametersFromQuery:function(e){e=e||"all";var t={},i="",n=[],s=window.location.hash.substr(1);return"hash"!==e?(i=window.location.search.substr(1),"all"!==e||_.isBlank(s)||(i+="&"+window.location.hash.substr(1))):_.isBlank(s)||(i+="&"+window.location.hash.substr(1)),n=i.split("&"),_.isBlank(n)||_.each(n,function(e){var i=e.split("=");""!==i[1]&&(t[i[0]]=decodeURIComponent(i[1].replace(/\+/g," ")))}),t},pushHistory:function(e,t,i){if(this._hasPushState)window.history.pushState(e,t,i);else{var n=i.split("?"),s=n.length>1?n[1]:"";window.location.hash="#"+s}}})}(),function(e){"use strict";Deki.provide("Deki.Ui.Dialog.Alert"),_(Deki.Ui.Dialog.Alert).extend({alertDialogTmpl:_.template('<div title="<%= data.title %>"><div class="mt-dialog-alert"<p><%= data.message %></p></div><div class="ui-dialog-buttonset"><button id="mt-dialog-alert-ok" type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button"><span class="ui-button-text"><%= data.okButton %></span></button></div></div>',null,{variable:"data"}),init:function(t){var i=this.alertDialogTmpl(t),n=e(i).dialog({width:450,modal:!0,resizable:!1,dialogClass:"mt-dialog",create:function(){e("#mt-dialog-alert-ok").on("click",function(){n.remove()})}})}})}(jQuery),function(){"use strict";Deki.provide("Deki.Feedback"),_(Deki.Feedback).extend({_plug:new Deki.Plug(Deki.BaseHref+"/").at("@api","deki","workflow","submit-feedback").withParam("dream.out.format","json"),submit:function(e){var t=new $.Deferred,i=e.path||_(window.location.pathname).ltrim("/"),n=e.userEmail,s=e.pageTitle,r=e.siteUrl,a=JSON.stringify({_path:encodeURIComponent(i),userEmail:n,pageTitle:s,siteUrl:r,content:e.content,contactAllowed:e.contactAllowed});return this._plug.post(a,Deki.Utility.jsonRequestType,function(e){if(e.isSuccess()){var i=JSON.parse(e.responseText);t.resolve(i)}else t.reject(e.getStatusText())}),t.promise()},getRatingsForPages:function(e){var t=new $.Deferred,i=new Deki.Plug(Deki.BaseHref+"/").at("@api","deki","pages","ratings").withParam("dream.out.format","json").withParams({pageids:e.join(",")});return i.get(function(e){if(e.isSuccess()){var i=e.getJson();t.resolve("@count"in i&&parseInt(i["@count"],10)>0?Deki.Utility.makeArray(i.page):[])}else t.reject()}),t.promise()}})}(),function(){"use strict";Deki.provide("Deki.PageFile"),Deki.PageFile=function(e,t){this._id=e||0,this.defaultParams=t},_(Deki.PageFile.prototype).extend({_pagePlug:new Deki.Plug(Deki.BaseHref+"/").at("@api","deki","pages").withParam("dream.out.format","json"),_asyncFile:null,setId:function(e){this._id=e},getData:function(e){var t=new $.Deferred,i=this;return e=e||{},this._pagePlug.at(this._id,"files").withParams(_(e).defaults(i.defaultParams)).get(function(e){if(e.isSuccess()){var i=e.getJson();"0"===i["@count"]&&(i.file=[]),t.resolve(_(i.file).isArray()?i.file:[i.file])}else t.reject(e.getStatusText())}),t.promise()},getPageFiles:function(e,t,i){window.console.warn("Deki.PageFile.getPagesFiles() is deprecated.  You should use Deki.PageFile.getData() instead."),e=e||function(){},t=t||{},this._pagePlug.at(this._id,"files").withParams(t).get(function(t){if(t.isSuccess()){var n=t.getJson();i&&i===!0||(n=new JDoc(n)),e({success:!0,data:n})}else e({success:!1,error:{type:"error.pageFiles.listingFetch",status:t.getStatusText()}})})}})}(),function(){"use strict";Deki.provide("Deki.Fonts"),Deki.provide("Deki.WebFontConfig"),_(Deki.Fonts).extend({$visibleElements:[],elementSearchArray:[],setConfig:function(e){Deki.WebFontConfig=e},addGoogleFontFamily:function(e){var t=Deki.provide("Deki.WebFontConfig.google"),i=t.families||[];i.push(e),Deki.WebFontConfig.google.families=i},getFontElements:function(){return this.elementSearchArray},setFontElements:function(e){this.elementSearchArray=_(e).isArray()?e:[]},addFontElements:function(e){var t=this;e.length>0&&(t.elementSearchArray=_(t.elementSearchArray).union(e))},removeFontElements:function(e){var t=this;e.length>0&&(t.elementSearchArray=_(t.elementSearchArray).difference(e))},loadFonts:function(){var e=this,t=_(e.elementSearchArray.toString()).trim(",");WebFont.load(_(Deki.WebFontConfig).extend({timeout:3e3,loading:function(){e.$visibleElements=$(".wf-loading").find(t).filter(":visible"),e.$visibleElements.css("visibility","hidden")},active:function(){e.$visibleElements.css("visibility","visible")},inactive:function(){e.$visibleElements.css("visibility","visible")}}))}})}(),function(e){"use strict";Deki.provide("Deki.Group"),Deki.Group=function(e){this._id=e||0},_(Deki.Group).extend({_groupPlug:new Deki.Plug(Deki.BaseHref+"/").at("@api","deki","groups").withParam("dream.out.format","json"),getGroups:function(t){t=t||{};var i=e.Deferred();return this._groupPlug.withParams(t).get(function(e){if(e.isSuccess()){var t=null;try{t=e.getJson()}catch(n){return void i.reject({error:{type:"error.groups.parse",status:e.getStatusText()}})}if(!t)return void i.reject({error:{type:"error.groups.fetch",status:e.getStatusText()}});t.group&&!_(t.group).isArray()&&(t.group=[t.group]),i.resolve({data:t})}else{var s=null;try{s=e.getJson()}catch(n){}i.reject({error:{response:s||{},type:"error.groups.search",status:e.getStatusText()}})}}),i.promise()}})}(jQuery),function(){"use strict";var e=function(t){if(2===arguments.length){if(!(this instanceof e))return new e(arguments[0],arguments[1]);var i=arguments[0],n=arguments[1];this._list=i,this._index=n}else{if(!(this instanceof e))return new e(t);this._list=null!==t?[t]:[],this._index=0}};e.VERSION="0.2.0",window.jDoc=e,window.JDoc=e;var t=new e(null),i=function(e,t){var i;if("object"==typeof t&&"number"==typeof t.length)for(i=0;i<t.length;++i)e.push(t[i]);else e.push(t)},n=function(t,s,r,a){t.each(function(t){var o,l=t.value();for(o in l){var u=l[o];"function"!=typeof u&&(s(o)&&i(a,u),r&&"object"==typeof u&&("number"==typeof u.length?n(new e(u,0),s,r,a):n(new e(u),s,r,a)))}})},s=function(e){return"function"==typeof e?e:e instanceof RegExp?function(t){return e.test(t)}:function(t){return t===e}},r={},a=function(e){if("string"!=typeof e||""===e)throw new Error("invalid selector");var t,i=e.split("/"),n=!1,s="this";for(t=0;t<i.length;++t){var r=i[t];switch(r){case"":if(0===t)continue;if(n)throw new Error("invalid selector");n=!0;continue;case".":break;case"..":throw new Error("unsupported .. operation in selector");case"*":s+=n?".match(/^[^@#].*$/, true)":".match(/^[^@#].*$/)";break;case"@*":s+=n?".match(/^@.+$/, true)":".match(/^@.+$/)";break;default:s+=n?'.match("'+r.replace('"','\\"')+'", true)':'.match("'+r.replace('"','\\"')+'")'}n=!1}if(n)throw new Error("invalid selector");return s};e.prototype.any=function(){return this._list.length>0},e.prototype.first=function(){return new e(this._list,0)},e.prototype.next=function(){if(!this.exists())return this;var i=this._index+1;return i<this._list.length?new e(this._list,i):t},e.prototype.each=function(t,i){var n,s;for(n=0,s=this._list[0];"undefined"!=typeof s&&t.call(i,new e(s))!==!1;s=this._list[++n]);},e.prototype.count=function(){return this._list.length},e.prototype.get=function(i){return i>=0&&i<this._list.length?new e([this._list[i]],0):t},e.prototype.where=function(t,n){var s=[];return this.each(function(e){t.call(n,e)&&i(s,e.value())}),new e(s,0)},e.prototype.union=function(t){return this.any()?t.any()?new e(this._list.concat(t._list),0):this:t},e.prototype.map=function(e,t){var i=[];return this.each(function(n){i.push(e.call(t,n))}),i},e.prototype.exists=e.prototype.hasValue=function(e){var t=this;return"string"==typeof e&&(t=this.select(e)),t._index<t._list.length},e.prototype.value=function(e){var t=this;return"string"==typeof e&&(t=this.select(e)),t.exists()?t._list[this._index]:null},e.prototype.text=function(e){for(var t=this.value(e);null!==t;)switch(typeof t){case"boolean":case"number":return t.toString();case"string":return t;case"object":if("undefined"==typeof t.length){var i=t["#text"];return"undefined"!=typeof i?i:null}if(!(t.length>0))return null;t=t[0];break;default:return null}return null},e.prototype.match=function(t,i){if(!this.exists())return this;var r=[];return n(this,s(t),i||!1,r),new e(r,0)},e.prototype.attributes=function(){return this.match(/^@.+$/)},e.prototype.elements=function(){return this.match(/^[^@#].*$/)},e.prototype.select=function(e){var t;return"undefined"==typeof(t=r[e])&&(r[e]=t=new Function("return "+a(e))),t.call(this)}}(),function(e){"use strict";e.fn.extend({check:function(){return Deki.Logger.deprecatedFunction("$().check()"),this.each(function(){this.checked=!0})},uncheck:function(){return Deki.Logger.deprecatedFunction("$().uncheck()"),this.each(function(){this.checked=!1})}}),e.extend({htmlEncode:function(e){return Deki.Logger.deprecatedFunction("$.htmlEncode()"),e?(e=e.replace(/&/g,"&amp;"),e=e.replace(/</g,"&lt;"),e=e.replace(/>/g,"&gt;")):""},htmlDecode:function(e){return Deki.Logger.deprecatedFunction("$.htmlDecode()"),e?(e=e.replace(/&gt;/g,">"),e=e.replace(/&lt;/g,"<"),e=e.replace(/&amp;/g,"&")):""},extendClass:function(e,t){Deki.Logger.deprecatedFunction("$.extendClass()");var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor===Object.prototype.constructor&&(t.prototype.constructor=t)}}),e.fn.defaultValue=function(){Deki.Logger.deprecatedFunction("$().defaultValue()");var t=this,i=arguments;return t.each(function(t){var n=e(this),s=i[t]||n.attr("title"),r="deki-default-value";(""===n.val()||n.val()===s)&&n.val(s).addClass(r),n.focus(function(){n.hasClass(r)&&n.val("").removeClass(r)}).blur(function(){""===n.val()&&n.val(s).addClass(r)}).parents("form:first").submit(function(){n.hasClass(r)&&n.val("")})})}}(jQuery),function(e){"use strict";Deki.provide("Deki.Plugin.PageContentRating"),_(Deki.Plugin.PageContentRating).extend({_formatter:"page_content_rating",_$lastClicked:null,_attachEvents:function(){e(".deki-page-rating-buttons.disabled a").removeAttr("onclick"),e(".deki-page-rating-buttons a").each(function(){e(this).data("pagerating.events")||(e(this).data("pagerating.events",!0),e(this).on("click",function(){e(this).off("click"),Deki.Plugin.PageContentRating._$lastClicked=e(this);var t=e(this).hasClass("content-rate-up")?1:0;return Deki.Plugin.PageContentRating._rate(t),!1}))})},_updatePage:function(t){e("#deki-page-rating-score").text(t.score_text),e(".deki-page-rating-buttons").replaceWith(t.button_html),Deki.Plugin.PageContentRating._attachEvents()},_rate:function(t){Deki.UserIsAnonymous||Deki.Plugin.AjaxRequest(Deki.Plugin.PageContentRating._formatter,{data:{action:"rate",pageId:Deki.PageId,rating:t},success:function(t){if(0===parseInt(t.body.userRating,10)){var i={context:"content_rating",pageid:Deki.PageId};e(document).trigger(Deki.Ui.Events.Rating.NegativeFeedbackLeft,i)}Deki.Plugin.PageContentRating._updatePage(t.body)},context:Deki.Plugin.PageContentRating._$lastClicked})}}),e(function(){Deki.Plugin.PageContentRating._attachEvents()})}(jQuery),function(){"use strict";var e=this,t=function(e){return e instanceof t?e:this instanceof t?void(this._wrapped=e):new t(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=t),exports.MT=t):e.MT=t,t._val=function(e,t){return t in e?e[t]:"@"+t in e?(Object.defineProperty(e,t,{get:function(){return e["@"+t]},set:function(i){e["@"+t]=i}}),e["@"+t]):null},t.num=function(t,i){return parseInt(e.MT._val(t,i),10)},t.string=function(t,i){return e.MT._val(t,i).toString()},t.array=function(t,i){var n=e.MT._val(t,i);return n instanceof Array?n:[n]}}.call(this),function(e){"use strict";Deki.provide("Deki.Page"),Deki.Page=function(e){if(this._id=0,_(e).isNumber())this._id=e;else{var t=Number(e);_(t).isNaN()?_(e).isString()&&(this._id="home"===e.toLowerCase()?"home":"="+encodeURIComponent(e)):this._id=t}},_(Deki.Page.prototype).extend({_pagePlug:new Deki.Plug(Deki.BaseHref+"/").at("@api","deki","pages").withParam("dream.out.format","json"),_doGet:function(t,i,n,s){var r=new e.Deferred;if(_(n).isFunction())s=s||{};else{if(n&&!_(n).isObject())throw"Error: The callback parameter must be an object or function";s=n||{},n=Deki.Utility.finishDeferred(r)}var a=!0;return s.rawResponse===!0&&(a=!1,delete s.rawResponse),this._pagePlug.at(this._id,t).withParams(s).get(function(e){if(e.isSuccess()){var t=null;try{t=JSON.parse(e.responseText),a&&(t=new JDoc(t))}catch(s){return void n({success:!1,error:{type:"error.response.parse",status:e.getStatusText()}})}n({success:!0,data:t})}else n({success:!1,error:{type:i,status:e.getStatusText()}})}),r.promise()},setId:function(e){this._id=e},getFullInfo:function(t,i){var n=new e.Deferred;if(_(t).isFunction())i=i||{};else{if(t&&!_(t).isObject())throw"Error: The second parameter to getHtmlTemplate must be an object or function";i=t||{},t=Deki.Utility.finishDeferred(n)}var s=!0;return i.rawResponse===!0&&(s=!1,delete i.rawResponse),this._pagePlug.at(this._id).get(function(e){if(e.isSuccess()){var i=null;try{i=JSON.parse(e.responseText),s&&(i=new JDoc(i))}catch(n){return void t({success:!1,error:{type:"error.response.parse",status:e.getStatusText()}})}t({success:!0,info:i})}else t({success:!1,error:{type:"error.fullInfo.fetch",status:e.getStatusText()}})}),n.promise()},getInfo:function(e,t){var i={exclude:"revision"};return!t&&_(e).isObject()?e=e?_(e).defaults(i):i:t=t?_(t).defaults(i):i,this._doGet("info","error.simpleInfo.fetch",e,t)},getContents:function(e,t){return this._doGet("contents","error.contents.fetch",e,t)},getSubpages:function(e,t){return this._doGet("subpages","error.subpages.fetch",e,t)},getTree:function(e,t){return this._doGet("tree","error.tree.fetch",e,t)},getTreeIds:function(){var t=new e.Deferred;return this._pagePlug.at(this._id,"tree").withParams({format:"ids"}).get(function(e){e.isSuccess()?t.resolve(_(e.responseText).words(",")):t.reject(e.getError())}),t.promise()},getTags:function(e,t){return this._doGet("tags","error.tags.fetch",e,t)},getJsonTemplate:function(e,t,i){i=i||{},t=t||function(){};var n="="+encodeURIComponent(encodeURIComponent(e)),s=_(i).extend({pageid:this._id.toString(),format:"text"});this._pagePlug.at(n,"contents").withParams(s).get(function(e){if(e.isSuccess())try{var i=JSON.parse(e.responseText);t({success:!0,data:i})}catch(n){t({success:!1,error:{type:"error.template.json.parse",status:e.getStatusText()}})}else t({success:!1,error:{type:"error.template.json.fetch",status:e.getStatusText()}})})},getHtmlTemplate:function(t,i,n){var s=new e.Deferred;if(_(i).isFunction())n=n||{};else{if(i&&!_(i).isObject())throw"Error: The second parameter to getHtmlTemplate must be an object or function";n=i||{},i=Deki.Utility.finishDeferred(s)}var r=!0;n.rawResponse===!0&&(r=!1,delete n.rawResponse);var a="="+encodeURIComponent(encodeURIComponent(t)),o=_(n).extend({pageid:this._id.toString()});return this._pagePlug.at(a,"contents").withParams(o).get(function(t){if(t.isSuccess()){var n=t.getJson();r&&(n=new JDoc(n)),i({success:!0,data:n}),e(Deki).trigger(Deki.Ui.Events.Template.Loaded)}else i({success:!1,error:{type:"error.template.html.fetch",status:t.getStatusText()}})}),s.promise()},logPageView:function(){var t=new e.Deferred,i=new Deki.Plug(Deki.BaseHref+"/").at("@api","deki","events","page-view",this._id).withParam("uri",encodeURIComponent(document.location.href));return i.post(JSON.stringify({_uri:document.location.href}),Deki.Utility.jsonRequestType,function(i){i.isSuccess()?(t.resolve(),e(Deki).trigger(Deki.Ui.Events.Template.Loaded)):t.reject({error:{type:"error.template.html.fetch",status:i.getStatusText()}})}),t.promise()},getOverview:function(){var t=new e.Deferred;return this._pagePlug.at(this._id,"overview").get(function(e){e.isSuccess()?t.resolve(e.getJson()):t.reject({error:{type:"error.overview.fetch",status:e.getStatusText()}})}),t.promise()},getUserRating:function(){var t=new e.Deferred;return this._pagePlug.at(this._id,"ratings").get(function(e){if(e.isSuccess()){var i=e.getJson();t.resolve("user.ratedby"in i?i["user.ratedby"]:{})}else t.reject({error:{type:"error.userrating.fetch",status:e.getStatusText()}})}),t.promise()},rate:function(t){var i=new e.Deferred;return this._pagePlug.at(this._id,"ratings").withParams({score:t}).post(Deki.Utility.textRequestType,"",function(e){e.isSuccess()?i.resolve():i.reject({error:{type:"error.userrating.set",status:e.getStatusText()}})}),i.promise()},pdf:function(t){var i=new e.Deferred;return t.dryrun=t.dryrun===!1?t.dryrun:!0,this._pagePlug.at(this._id,"pdf").withParams(t).get(function(e){if(e.isSuccess())!_(e.responseText).isEmpty()&&t.dryrun?i.resolve(JSON.parse(e.responseText)):i.resolve();else{var n={};400===e.status?(n.type="export.too-many-pages",n.info=JSON.parse(e.responseText)):n.type="export.general",i.reject(n)}}),i.promise()}})}(jQuery),function(){"use strict";Deki.provide("Deki.PageComment"),Deki.PageComment=function(e){this._pageId=e},_(Deki.PageComment.prototype).extend({_pagePlug:new Deki.Plug(Deki.BaseHref+"/").at("@api","deki","pages").withParam("dream.out.format","json"),_sitePlug:new Deki.Plug(Deki.BaseHref+"/").at("@api","deki","site").withParam("dream.out.format","json"),getComments:function(e,t){e=e||{};var i=!0;e.rawResponse===!0&&(i=!1,delete e.rawResponse),this._pagePlug.at(this._pageId,"comments").withParams(e).get(function(e){if(e.isSuccess()){var n=e.getJson();"0"===n["@count"]?n.comment=[]:"1"===n["@count"]&&(n.comment=[n.comment]),i&&(n=new JDoc(n)),t({success:!0,data:n})}else t({success:!1,error:{type:"error.comment.jsonFetch",status:e.getStatusText()}})})},deleteComment:function(e,t){t=t||function(){},this._pagePlug.at(this._pageId,"comments",e).del(function(e){t({status:e.isSuccess()})})}})}(),function(){"use strict";Deki.provide("Deki.PageHierarchy"),Deki.PageHierarchy=function(){},_(Deki.PageHierarchy.prototype).extend({filterByArticleTypes:[],_plug:new Deki.Plug(Deki.BaseHref+"/").at("@api","deki","pages").withParam("dream.out.format","json"),getRoot:function(e){var t=new $.Deferred;return e=e||"home",this._plug.at(e).get(function(e){if(e.isSuccess()){var i=JSON.parse(e.responseText);t.resolve(Deki.Utility.makeArray(i))}else t.reject(e.getStatusText())}),t.promise()},getChildren:function(e){var t=new $.Deferred;e=e||"home";var i=this._plug.at(e,"subpages");return _(this.filterByArticleTypes).isEmpty()||(i=i.withParam("article",this.filterByArticleTypes.join(","))),i.get(function(e){if(e.isSuccess()){var i=JSON.parse(e.responseText);t.resolve(Deki.Utility.makeArray(i["page.subpage"]))}else t.reject(e.getStatusText())}),t.promise()},getRootAndChildren:function(e){var t=new $.Deferred;return $.when(this.getRoot(e),this.getChildren(e)).done(function(e,i){e[0]["@subpages"]=i.length>0?"true":"false",t.resolve(e)}),t.promise()}})}(jQuery),function(){"use strict";Deki.provide("Deki.PageProperty"),Deki.PageProperty=function(e){this._id=e||0},_(Deki.PageProperty.prototype).extend({_pagePlug:new Deki.Plug(Deki.BaseHref+"/").at("@api","deki","pages").withParam("dream.out.format","json"),setId:function(e){this._id=e},getProperties:function(e,t,i,n,s){e=e||function(){};var r={};n&&(r.depth=n),i&&(r.contentcutoff=i);var a="";if(t&&_.isArray(t)&&t.length>0)for(var o=0;o<t.length;o++)a+=t[o]+",";r.names=a,this._pagePlug.at(this._id,"properties").withParams(r).get(function(t){if(t.isSuccess()){var i=t.getJson();s&&s.rawResponse===!0||(i=new JDoc(i)),e({success:!0,data:i})}else e({success:!1,error:{type:"error.property.jsonFetch",status:t.getStatusText()}})})},getProperty:function(e,t,i){this.getProperties(t,[e],null,null,i)},getPageProperties:function(e){var t=new $.Deferred,i={};return e.depth&&(i.depth=e.depth),e.maxContentSize&&(i.contentcutoff=e.maxContentSize),e.names.length>0&&(i.names=e.names.toString()),this._pagePlug.at(this._id,"properties").withParams(i).get(function(e){e.isSuccess()?t.resolve(e.getJson()):t.reject({error:{type:"error.property.jsonFetch",status:e.getStatusText()}})}),t.promise()},getRawProperty:function(e,t){t=t||function(){},this._pagePlug.at(this._id,"properties",e).get(function(e){t(e.isSuccess()?{success:!0,contents:e.responseText}:{success:!1,error:{type:"error.property.jsonFetch"}})})},getJsonProperty:function(e,t){var i=new $.Deferred;return t=t||Deki.Utility.finishDeferred(i),this.getRawProperty(e,function(e){if(e.success){var i=JSON.parse(e.contents);t({success:!0,data:i})}else t(e)}),i.promise()}})}(),function(e){"use strict";Deki.provide("Deki.RatingResultsData"),Deki.RatingResultsData=function(e,t,i,n){t=t||{},t.q=e||"",t.constraint=(t.constraint?t.constraint+" ":"type:wiki +namespace:main ")+"+date.edited:20*",this._plug=new Deki.Plug(Deki.BaseHref+"/").at("@api","deki","site","search").withParam("dream.out.format","json").withParams(t),this._offset=n||0,this._limit=i||40,this._sort=null,this._dataKey="page"},_(Deki.RatingResultsData.prototype).extend({getData:function(t){var i=this,n=new e.Deferred;return t=t||{},t=_(t).defaults({limit:i._limit}),i._sort&&(t.sortby=i._sort),i._plug.withParams(t).withParam("offset",i._offset).get(function(e){if(e.isSuccess()){var t=e.getJson();i._offset=i._offset+parseInt(t["@count"],10),t[i._dataKey]&&!_(t[i._dataKey]).isArray()&&(t[i._dataKey]=[t[i._dataKey]]),n.resolve(t)}else n.reject(e)}),n.promise()},reset:function(){this._offset=0},sort:function(e){this._sort=e},limit:function(e){return void 0!==e&&(this._limit=e),this._limit}})}(jQuery),function(){"use strict";Deki.provide("Deki.Search"),_(Deki.Search).extend({_searchPlug:new Deki.Plug(Deki.BaseHref+"/").at("@api","deki","site","query").withParam("dream.out.format","json"),doQuery:function(e,t,i,n){i=i||function(){},e=e||"",n=n||{},_(t).extend({q:e}),this._searchPlug.withParams(t).get(function(e){if(e.isSuccess()){var t=e.getJson();n&&n.rawResponse===!0||(t=new JDoc(t)),i({success:!0,data:t})}else i({success:!1,error:{type:"error.search.query",status:e.getStatusText()}})})}}),Deki.provide("Deki.SiteSearch"),Deki.SiteSearch=function(e){e=e||"query",this._searchPlug=new Deki.Plug(Deki.BaseHref+"/").at("@api","deki","site",e).withParam("dream.out.format","json")},_(Deki.SiteSearch.prototype).extend({query:function(e,t){var i=new $.Deferred;return t=t||Deki.Utility.finishDeferred(i),this._searchPlug.withParams(e).get(function(e){var i={};e.isJson()&&(i=e.getJson()),t(e.isSuccess()?{success:!0,data:i}:{success:!1,data:i})}),i.promise()}})}(),function(e){"use strict";Deki.provide("Deki.Site"),Deki.Site=function(){},_(Deki.Site).extend({_sitePlug:new Deki.Plug(Deki.BaseHref+"/").at("@api","deki","site").withParams({"dream.out.format":"json"}),getRoles:function(){var t=e.Deferred();return this._sitePlug.at("roles").get(function(e){if(e.isSuccess()){var i=JSON.parse(e.responseText);t.resolve({data:i})}else t.reject({error:{type:"error.roles.fetch",status:e.getStatusText()}})}),t.promise()},getTag:function(t,i){var n=new e.Deferred;if(_(t).isEmpty())return n.reject({error:{type:"error.tags.empty"}}).promise();i=i||{},_(t).isArray()||(t=[t]);var s=_(t).map(function(e){return"="+window.encodeURIComponent(e)});return this._sitePlug.at("tags",s).withParams(i).get(function(e){if(e.isSuccess()){var t=JSON.parse(e.responseText);n.resolve({data:t})}else n.reject({error:{type:"error.tags.fetch",status:e.getStatusText()}})}),n.promise()},getResourceString:function(t){var i=new e.Deferred;if(t.key){var n=this._sitePlug.at("localization",t.key);t.lang&&(n=n.withParam("lang",t.lang)),n.get(function(e){e.isSuccess()?i.resolve(e.responseText):i.reject(e.getError())})}else e.error("The resource key is missing.");return i.promise()}}),_(Deki.Site.prototype).extend({_sitePlug:Deki.Site._sitePlug,_feedbackTemplate:_('<?xml version="1.0"?><feedback><body><%- data.comment %></body><% if (data.title) { %><title><%= data.title %></title><% } %><metadata><% _(data.metadata).each(function(value, key) { %><<%= key %>><%= value %></<%= key %>><% }); %></metadata></feedback>').template(null,{variable:"data"}),sendFeedback:function(e,t){t=t||function(){};var i=this._feedbackTemplate(e);this._sitePlug.at("feedback").post(i,Deki.Utility.xmlRequestType,function(e){t(e.isSuccess()?{success:!0}:{success:!1,error:{type:"error.feedback.send",status:e.getStatusText()}})})},getTags:function(e,t){t=t||function(){},this._sitePlug.at("tags").withParams(e).get(function(e){if(e.isSuccess()){var i=JSON.parse(e.responseText);t({success:!0,data:i})}else t({success:!1,error:{type:"error.tags.fetch",status:e.getStatusText()}})})}})}(jQuery),function(e,t){"use strict";Deki.provide("Deki.Skin"),_(Deki.Skin).extend({_plug:new Deki.Plug(Deki.BaseHref+"/").at("@app","skin"),registerMatchMediaHtmlContent:function(i,n,s){var r=this;i.split(",").forEach(function(i){t.register(i,function(){r._getContent(s).done(function(t){e(n).html(t.body)})})})},_getContent:function(t){var i=new Deki.Uri(window.location.href),n=new e.Deferred,s=this._plug;return(t+".json").split("/").forEach(function(e){s=s.at(e)}),s.withParams({contextpath:i.path().substring(1),contextquery:i.query().substring(1)}).get(function(e){if(e.isSuccess()){var t=e.getJson();n.resolve(t)}else n.reject(e)}),n.promise()}})}(jQuery,enquire),function(){"use strict";var e=function(e,t){if(e>="a"&&"z">=e||e>="A"&&"Z">=e||e>="0"&&"9">=e)return!0;switch(e){case"'":case"(":case")":case"*":case"-":case".":case"_":case"!":return!0}switch(t){case 3:switch(e){case"#":return!0}case 2:switch(e){case"/":case":":case"~":case"$":case",":case";":case"|":return!0}case 1:switch(e){case"@":case"^":return!0}break;case 0:switch(e){case"&":case"=":return!0}}return!1},t=function(e){return 9>=e?e+48:e-10+97},i=function(i,n){n=n||"segment";for(var s=[],r=i.encodeUtf8().toBytes(),a=0;a<r.length;++a){var o=r[a],l=String.fromCharCode(o);e(l,n)?s.push(r[a]):" "===l?s.push(43):(s.push(37),s.push(t(o>>4&15)),s.push(t(15&o)))}return String.fromCharCode.apply(null,s)};_.extend(String.prototype,{encodeUtf8:function(){Deki.Logger.deprecatedFunction("String.encodeUtf8()");for(var e="",t=0;t<this.length;t++){var i=this.charCodeAt(t);128>i?e+=String.fromCharCode(i):i>127&&2048>i?(e+=String.fromCharCode(i>>6|192),e+=String.fromCharCode(63&i|128)):(e+=String.fromCharCode(i>>12|224),e+=String.fromCharCode(i>>6&63|128),e+=String.fromCharCode(63&i|128))}return e},decodeUtf8:function(){Deki.Logger.deprecatedFunction("String.decodeUtf8()");for(var e="",t=0,i=0,n=0,s=0;t<this.length;)i=this.charCodeAt(t),128>i?(e+=String.fromCharCode(i),t++):i>191&&224>i?(n=this.charCodeAt(t+1),e+=String.fromCharCode((31&i)<<6|63&n),t+=2):(n=this.charCodeAt(t+1),s=this.charCodeAt(t+2),e+=String.fromCharCode((15&i)<<12|(63&n)<<6|63&s),t+=3);return e},encodeBase64:function(){if(Deki.Logger.deprecatedFunction("String.encodeBase64()"),/([^\u0000-\u00ff])/.test(this))throw new Error("Can't base64 encode non-ASCII characters.");for(var e,t,i,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,r=[];s<this.length;){switch(e=this.charCodeAt(s),i=s%3){case 0:r.push(n.charAt(e>>2));
break;case 1:r.push(n.charAt((3&t)<<4|e>>4));break;case 2:r.push(n.charAt((15&t)<<2|e>>6)),r.push(n.charAt(63&e))}t=e,s++}return 0==i?(r.push(n.charAt((3&t)<<4)),r.push("==")):1==i&&(r.push(n.charAt((15&t)<<2)),r.push("=")),r.join("")},decodeBase64:function(){Deki.Logger.deprecatedFunction("String.decodeBase64()");var e=this;if(e=e.replace(/\s/g,""),!/^[a-z0-9\+\/\s]+\={0,2}$/i.test(e)||e.length%4>0)throw new Error("Not a base64-encoded string.");var t,i,n,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0,a=[];for(e=e.replace(/=/g,"");r<e.length;){switch(t=s.indexOf(e.charAt(r)),n=r%4){case 1:a.push(String.fromCharCode(i<<2|t>>4));break;case 2:a.push(String.fromCharCode((15&i)<<4|t>>2));break;case 3:a.push(String.fromCharCode((3&i)<<6|t))}i=t,r++}return a.join("")},toBytes:function(){Deki.Logger.deprecatedFunction("String.toBytes()");for(var e,t,i=[],n=0;n<this.length;n++){e=this.charCodeAt(n),t=[];do t.push(255&e),e>>=8;while(e);i=i.concat(t.reverse())}return i},encodeUrlFragment:function(){return Deki.Logger.deprecatedFunction("String.encodeUrlFragment()"),i(this,3)},encodeUrlQuery:function(){return Deki.Logger.deprecatedFunction("String.encodeUrlQuery()"),i(this,2)},encodeUrlSegment:function(){return Deki.Logger.deprecatedFunction("String.encodeUrlSegment()"),i(this,1)},encodeUrlUserInfo:function(){return Deki.Logger.deprecatedFunction("String.encodeUrlUserInfo()"),i(this,0)},htmlSpecialChars:function(){return Deki.Logger.deprecatedFunction("String.htmlSpecialChars()"),this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},utf8URL:function(){Deki.Logger.deprecatedFunction("String.utf8URL()");var e=this,t=this.replace(/[ \?%\+&=#\.\u0080-\uFFFF]/g,function(t){switch(t){case" ":return"_";case"+":return"%2B";default:return escape(e.charToUtf8(t.charCodeAt(0)))}});return t},charToUtf8:function(e){return Deki.Logger.deprecatedFunction("String.charToUtf8()"),128>e?String.fromCharCode(e):2048>e?String.fromCharCode(e>>6&63|192,63&e|128):65536>e?String.fromCharCode(e>>12&15|224,e>>6&63|128,63&e|128):1114112>e?String.fromCharCode(e>>18&7|240,e>>12&63|128,e>>6&63|128,63&e|128):String.fromCharCode(e)}})}(jQuery),function(e){"use strict";Deki.provide("Deki.SupportAgentUserHistory"),Deki.SupportAgentUserHistory=function(e,t,i,n){if(this._id=e||"",isNaN(parseInt(this._id,10))){var s=this._id.split(":");2===s.length&&isNaN(parseInt(s[0],10))||(this._id="="+encodeURIComponent(this._id))}this._plug=new Deki.Plug(Deki.BaseHref+"/").at("@api","deki","events","support-agent").withParam("dream.out.format","json").withParam("include","page,file"),this._lastRequestId=i,this._limit=t||200,this._logSize=n||1e3,this._log=[],this._dataKey="event"},_(Deki.SupportAgentUserHistory.prototype).extend({getLogData:function(){var e=this;return e._log},getData:function(t){var i=this,n=new e.Deferred;return t=t||{},i._lastRequestId&&(t.upto=i._lastRequestId),t=_(t).defaults({limit:i._limit}),""===i._id?n.reject():i._plug.at(_(i._id).trim()).withParams(t).get(function(e){if(e.isSuccess()){var t=e.getJson();parseInt(t["@count"],10)>0&&(i._lastRequestId=t["@since"]),t[i._dataKey]&&!_(t[i._dataKey]).isArray()&&(t[i._dataKey]=[t[i._dataKey]]),n.resolve(t),i._addToLog(t[i._dataKey])}else n.reject(e)}),n.promise()},_addToLog:function(e){var t=this;t._log=t._log.concat(e),t._log.length>t._logSize&&(t._log=t._log.slice(t._log.length-t._logSize,t._log.length))},resetDataPoint:function(){this._lastRequestId=null},limit:function(e){return void 0!==e&&(this._limit=e),this._limit}})}(jQuery),function(e){"use strict";Deki.provide("Deki.Ui.FileAttachments"),_(Deki.Ui.FileAttachments).extend({descriptionCharLimit:500,currentCount:0,extensionList:["jpg","jpeg","jpe","gif","png","sh","txt","doc","zip","pdf","xls","csv","xlsx","xlsm","xltx","xltm","xlsb","xlam","ppt","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","doc","rtf","txt","docx","docm","dotx","dotm","fla","swf","tar","rar","gzip","html","htm","shtml","wmv","avi","mov","mpg","mp4","mpeg","dwg","msg","dwf"],transIcon:Deki.Utility.getCacheUrl("/skins/common/icons/icon-trans.gif"),filenameTemplate:_('<div class="file-name-row"><span class="icon mt-icon-<%= data.extension %>"><img src="<%= Deki.Ui.FileAttachments.transIcon %>" class="mt-ext-<%= data.extension %>" alt="<%= data.extension %>" /></span><a class="file-name-link" href="<%= data.href %>" title="<%- data.title %>" target="_blank"><%- data.filename %></a><% if(data.editable) { %><div class="file-attachment-actions"><a class="ui-icon ui-icon-transferthick-e-w file-move-button file-attachment-action" title="<%= data.moveMsg %>" href="#"></a><a class="ui-icon ui-icon-arrowthick-1-n file-revision-launcher file-attachment-action" title="<%= data.uploadMsg %>" href="#" data-file-info="<%= data.dataAttr %>"></a><a class="ui-icon ui-icon-close file-delete-button file-attachment-action" title="<%= data.deleteMsg %>" href="#"></a></div><% } %></div><div class="file-row-description"><span class="file-row-description-display"><%= data.displayDescription %></span><% if(data.editable) { %><div class="file-description-actions"><a href="#" class="ui-icon ui-icon-pencil file-row-description-edit"></a></div><div class="file-row-description-editor"><input class="file-row-description-text" /><div class="file-row-description-buttons"><a href="#" class="ui-button ui-button-primary file-row-description-save"><%= data.buttonText %></a><a href="#" class="ui-button file-row-description-cancel"><%= data.cancelText %></a><span class="note file-row-description-charlimit"> <%= data.charLimitText %></span></div></div><% } %></div>').template(null,{variable:"data"}),transformRow:function(e){var t=this,i=e.filename,n=_(i).strRightBack(".").toLowerCase();_(t.extensionList).contains(n)||(n="unknown");var s=_(e.description).unescapeHTML();s=_(s).isBlank()?'<span class="note">'+Deki.loc("Article.Attach.table-description-blank")+"</span>":_(s.substring(0,t.descriptionCharLimit)).escapeHTML();var r=new Date("date.created"in e?e["date.created"]:e.date);return{id:parseInt("@id"in e?e["@id"]:e.id,10),filename:i,revision:parseInt("@revision"in e?e["@revision"]:e.revision,10),size:"contents"in e?e.contents["@size"]:e.rawSize,date:Deki.Time.utc(r).zone(t.options.attachFileUserTz),extension:n.toLowerCase(),user:"user.createdby"in e?e["user.createdby"].username:e.user,uri:"contents"in e?e.contents["@href"]:e.uri,revisions:e.revisions,description:e.description,descriptionText:s}},getDescriptionWarning:function(e){var t="",i=Deki.Ui.FileAttachments.descriptionCharLimit-e;return Deki.loc("Article.Attach.table-description-character",i),0>i?t=Deki.loc("Article.Attach.table-description-character-warning",_(-1*i).numberFormat(0)):50>=i&&(t=Deki.loc("Article.Attach.table-description-character",_(i).numberFormat(0))),t},setUpGrid:function(){var t=this,i={paginate:!1,showInfo:!1,enableSpinner:!0,emptyGridText:Deki.loc("Article.Attach.grid.empty-grid-text"),searchText:Deki.loc("Article.Attach.table-search-text"),dataSource:new Deki.PageFile(Deki.PageId,{limit:t.options.attachFileMax}),colDefs:[{title:'<span class="mt-datatables-header-title">'+Deki.loc("Article.Attach.table-header-file")+"</span>","class":"file-name",width:"51%",formatter:function(e){var i=e.description,n={filename:e.filename,extension:e.extension,title:Deki.loc("Article.Attach.table-file-title",e.filename,e.user),href:new Deki.Plug(e.uri).withParams({origin:"mt-web"}).getUrl(),displayDescription:e.descriptionText,description:i,buttonText:Deki.loc("Article.Attach.table-description-button"),cancelText:Deki.loc("Article.Attach.table-description-cancel"),charLimitText:t.getDescriptionWarning(i.length),moveMsg:Deki.loc("Article.Attach.menu.move"),uploadMsg:Deki.loc("Article.Attach.menu.attachnew"),deleteMsg:Deki.loc("Article.Attach.menu.delete"),dataAttr:_(JSON.stringify(e)).escapeHTML(),editable:Deki.PageEditable};return t.filenameTemplate(n)}},{title:'<span class="mt-datatables-header-title">'+Deki.loc("Article.Attach.table-header-date")+"</span>","class":"file-date",width:"18%",searchable:!1,formatter:function(e,t){if("display"===t){var i=e.date.getDateTime();if(1!==e.revision&&1!==e.count&&Deki.PageEditable){var n=Deki.loc("Article.Attach.table-version-link");return'<div class="file-revision-wrapper"><a href="#" title="'+n+'" class="file-version-link">'+i+"</a></div>"}return"<div>"+i+"</div>"}return e.date.unix()}},{title:'<span class="mt-datatables-header-title">'+Deki.loc("Article.Attach.table-header-size")+"</span>","class":"file-size",width:"12%",searchable:!1,formatter:function(e,t){return"display"===t?Deki.Utility.formatBytes(e.size):window.parseInt(e.size,10)}},{title:'<span class="mt-datatables-header-title">'+Deki.loc("Article.Attach.table-header-addedby")+"</span>","class":"file-addedby",width:"18%",searchable:!1,formatter:function(e){return e.user}},{title:"hidden description column",width:"0",searchable:!0,visible:!1,formatter:function(e){return e.description}}],onRowAdd:function(t,i){e(t).data("id",i.id)},onGridDraw:function(){_(t.updateCountInfo).isFunction()&&t.updateCountInfo()},transformData:function(e){return e&&!_(e).isArray()&&(e=[e]),"0"===e["@size"]?[]:_(e).map(function(e){return t.transformRow(e)})}};t.$grid.grid(i)}}),e(function(){var t=Deki.Ui.FileAttachments;t.$grid=e("#fileAttachTable"),0!==t.$grid.length&&0!==Deki.PageId&&(t.options=t.$grid.data(),t.setUpGrid(),0===t.$grid.length&&e(".dataTables_scrollHeadInner").css("width","100% !important"))})}(jQuery),function(e){"use strict";Deki.provide("Deki.Ui.Dialog"),Deki.provide("Deki.Ui.Dialogs"),e(function(){e(".feedback-popup-trigger").on("click",function(t){t.preventDefault();var i=JSON.parse(e(this).attr("feedbackparams"))||{};e("<div></div>").modal({width:450,naming:"PageFeedback",load:function(){Deki.Ui.Dialog.PageFeedback.init(_(i).defaults({context:"generic"}))},params:i})}),e(document).on(Deki.Ui.Events.Rating.NegativeFeedbackLeft,function(t,i){e("<div></div>").modal({width:450,naming:"PageFeedback",load:function(){Deki.Ui.Dialog.PageFeedback.init(_(i).defaults({context:"generic"}))},params:i})}),e(".page-pdf-export-launcher").on("click",function(t){t.preventDefault();var i=e(this).attr("href");e("<div></div>").modal({width:425,naming:{template:"MindTouch/Controls/Dialogs/PdfExport",javascript:"dialog.pdfExport",namespace:"PagePdfExport"},load:function(){Deki.Ui.Dialog.PagePdfExport.init({uri:i})}})})})}(jQuery),function(){"use strict";Deki.provide("Deki.Ui.Events"),_(Deki.Ui.Events).extend({TreeBrowser:{LinkPicked:"Deki.Ui.Events.TreeBrowser.LinkPicked"},Tags:{TagAdded:"Deki.Ui.Events.Tags.TagAdded",TagRemoved:"Deki.Ui.Events.Tags.TagRemoved"},Rating:{NegativeFeedbackLeft:"Deki.Ui.Events.Rating.NegativeFeedbackLeft"},Files:{UploadComplete:"Deki.Ui.Events.Files.UploadComplete",UploadProgress:"Deki.Ui.Events.Files.UploadProgress",VersionUploaded:"Deki.Ui.Events.Files.VersionUploaded",RevisionUploadRequested:"Deki.Ui.Events.Files.RevisionUploadRequested"},Nav:{Loaded:"Deki.Ui.Events.Nav.Loaded"},Flash:{Show:"Deki.Ui.Events.Flash.Show",Hide:"Deki.Ui.Events.Flash.Hide"},Template:{Loaded:"Deki.Ui.Events.Template.Loaded"},PageThumbnail:{Added:"Deki.Ui.Events.PageThumbnail.Added",Removed:"Deki.Ui.Events.PageThumbnail.Removed"},LSF:{Guide:{TabAdded:"Deki.Ui.Events.LSF.Guide.TabAdded"}}})}();var DekiExpandableNav=null;!function(){"use strict";Deki.FullNav=function(){this.treePlug=new Deki.Plug(Deki.BaseHref+"/").at("@api","deki","site","nav").withParams({"dream.out.format":"json",type:"expandable","dream.in.scheme":Deki.Utility.getProtocol()});var e=new Deki.Site;if($("#siteNavTree").length>0){var t=Deki.PageId>0?Deki.PageId:"="+window.encodeURIComponent(Deki.PageTitle),i=this;e._sitePlug.at("nav",t,"full").get(function(e){$("#siteNavTree").html(JSON.parse(e.responseText)),$(document).trigger(Deki.Ui.Events.Nav.Loaded);var t=$("div.nav");t.length>0&&(i._collapsedWidth=t.width(),$("<div></div>").attr("id","dummy-nav-panel").addClass("nav-dummy").height(t.height()).insertBefore("div.nav"),t.addClass("animated"),t.hover(function(){var e=DekiExpandableNav._calcExpandWidth();e>DekiExpandableNav._collapsedWidth&&DekiExpandableNav._expandNavPanel(e)},function(){DekiExpandableNav._collapseNavPanel()}))})}},_(Deki.FullNav.prototype).extend({Toggle:function(e){$(e).hasClass("icon")&&this._getChildren(e)},_getChildren:function(e){var t=$(e).parents(".node:first"),i=/\d+/.exec(t.attr("id"));if(0!==i.length){var n=i[0];if(void 0!==t.attr("hasChildren")||t.hasClass("selected")||t.hasClass("ancestor"))t.children("ul").toggle(),this._toggleParentClass(t,t.hasClass("parentOpen")),this._adjustNavPanelDimensions();else{var s=this;s.treePlug.at(n,"children").get(function(e){var i=JSON.parse(e.responseText),n=$(i.children.html);n.length>0&&(t.attr("hasChildren","true"),n.each(function(e,i){t.append(i)}),s._toggleParentClass(t,!1)),s._adjustNavPanelDimensions()})}}},_toggleParentClass:function(e,t){(e.hasClass("parentOpen")||e.hasClass("parentClosed"))&&(t?e.removeClass("parentOpen").addClass("parentClosed"):e.removeClass("parentClosed").addClass("parentOpen"))},_calcExpandWidth:function(){var e=$("div.nav").clone().removeClass("animated").insertBefore("div.nav").height("0").width("auto"),t=e.width()+1;return e.remove(),t},_expandNavPanel:function(e){$("#siteNavTree").addClass("shadow"),$("div.nav").width(e)},_collapseNavPanel:function(){$("div.nav").width(DekiExpandableNav._collapsedWidth+"px"),$("#siteNavTree").removeClass("shadow")},_adjustExpandWidth:function(){var e=this._calcExpandWidth();e>DekiExpandableNav._collapsedWidth?this._expandNavPanel(e):this._collapseNavPanel()},_adjustNavPanelDimensions:function(){$("#dummy-nav-panel").height($("div.nav").height()),this._adjustExpandWidth()}}),$(function(){DekiExpandableNav=new Deki.FullNav})}(),function(e){"use strict";Deki.provide("Deki.Ui.NewFeatures"),_(Deki.Ui.NewFeatures).extend({markedAsRead:function(){new Deki.Plug(Deki.BaseHref+"/@app/newfeatures/update").post("","",function(){e(".mt-new-features-container").slideUp(800),e("#mt-new-features-bar").remove()})}}),e(function(){e(document).on("click",".mt-new-features-close",Deki.Ui.NewFeatures.markedAsRead)})}(jQuery),function(e){"use strict";Deki.provide("Deki.Ui.PageRatingFeedback"),_(Deki.Ui.PageRatingFeedback).extend({buttonClick:function(e,t){var i=this,n=e.hasClass("mt-selected");t!==!0||n||i.showFeedback(),i.elements.allButtons.removeClass("mt-selected"),n||e.addClass("mt-selected")},showFeedback:function(){var e=this;e.elements.feedbackForm.show(),e.elements.feedbackTextArea.focus()},getRating:function(){var e=this;e.pageApi.getUserRating().done(function(t){if("@score"in t){var i=window.parseInt(t["@score"],10);0===i?e.buttonClick(e.elements.noButton):i>0&&e.buttonClick(e.elements.yesButton),e.setRatedDate(new Date(t["@date"]))}})},rate:function(e){var t=this;t.pageApi.rate(e).done(function(){""===e?t.elements.lastRating.empty():t.setRatedDate(new Date)})},setRatedDate:function(e){var t=this,i=Deki.Time(e);t.elements.lastRating.text(Deki.loc("Page.FeedbackRating.label.last-rated",i.getDate()))}}),Deki.isDraftRequest||e(function(){if(e(".mt-feedback-rating-container").is(":visible")){var t=Deki.Ui.PageRatingFeedback;if(_(Deki.PageId).isUndefined()||0===Deki.PageId)return;t.pageApi=new Deki.Page(Deki.PageId),t.elements={yesButton:e(".mt-rating-button-yes"),noButton:e(".mt-rating-button-no"),allButtons:e(".mt-feedback-rating-button"),lastRating:e(".mt-last-rating-date"),feedbackForm:e(".mt-feedback-form"),feedbackTextArea:e(".mt-feedback-improve-description"),feedbackSubmit:e(".mt-feedback-submit")},t.elements.yesButton.on("click keypress",function(){var i=e(this),n="1";i.hasClass("mt-selected")&&(n=""),t.rate(n),t.buttonClick(i,!0)}),t.elements.noButton.on("click keypress",function(){var i=e(this),n="0";i.hasClass("mt-selected")&&(n=""),t.rate(n),t.buttonClick(e(this),!0)}),e(".mt-feedback-button").on("click keypress",function(){t.showFeedback()}),t.elements.feedbackSubmit.on("click",function(){var i=e(".mt-feedback-consent-checkbox").prop("checked"),n=_(t.elements.feedbackTextArea.val()).trim(),s=t.elements.feedbackForm.data(),r=s.userEmail,a=s.pageTitle,o=s.siteUrl,l=s.path;if(!_(n).isBlank()){var u={target:"mt-feedback-flash-message"};Deki.Feedback.submit({content:n,userEmail:r,pageTitle:a,siteUrl:o,path:l,contactAllowed:Deki.loc(i?"Page.FeedbackRating.message.contact.yes":"Page.FeedbackRating.message.contact.no")}).done(function(){t.elements.feedbackForm.hide(),t.elements.feedbackTextArea.val(""),Deki.Ui.Flash(Deki.loc("Page.FeedbackRating.message.submit.success"),"success",u)}).fail(function(){Deki.Ui.Flash(Deki.loc("Page.FeedbackRating.message.submit.error"),"error",u)})}}),t.elements.feedbackTextArea.on("keyup",function(){var i=_(e(this).val()).trim();_(i).isBlank()?t.elements.feedbackSubmit.addClass("mt-disabled"):t.elements.feedbackSubmit.removeClass("mt-disabled")}),Deki.Ui.PageRatingFeedback.getRating()}})}(jQuery),function(e){"use strict";Deki.provide("Deki.Ui.Tooltips"),_(Deki.Ui.Tooltips).extend({toolTipTemplate:_('<div class="tooltip-wrapper"><div class="tooltip-arrow <%= data.position %>"></div><div class="clear"></div><div class="tooltip" ><div class="tooltip-text-container"><span class="tooltip-text"><%= data.message %></span></div></div></div>').template(null,{variable:"data"}),show:function(t,i){e(".tooltip-wrapper").remove();var n=t.offset(),s=t.outerHeight(),r={position:t.hasClass("left")||t.parent().hasClass("left")?"left":"right",message:i},a=e(Deki.Ui.Tooltips.toolTipTemplate(r));e("body").append(a);var o=n.left+"px";if("right"===r.position){var l=n.left-a.width()+t.width();o=l+"px"}a.css({top:n.top+s+"px",left:o})}}),e(function(){e(document).on("click",function(t){var i=e(t.target);i.hasClass("disabled-login")||0!==i.parents(".disabled-login").length||i.hasClass("disabled-permissions")||0!==i.parents(".disabled-permissions").length||e(".tooltip-wrapper").remove()}),e(".disabled-login a, a.disabled-login").on("click",function(t){t.preventDefault(),Deki.Ui.Tooltips.show(e(this),Deki.loc("login-required"))}),e(".disabled-permissions a, a.disabled-permissions").on("click",function(t){t.preventDefault(),Deki.Ui.Tooltips.show(e(this),Deki.loc("error-permission-details"))})})}(jQuery),function(e){"use strict";e(function(){e.widget("mt.carousel",{options:{items:5,scroll:{items:5},prev:null,next:null,circular:!1,auto:!1,align:"left",width:"100%",height:"auto",infinite:!1,responsive:!1,carouselLibPath:"/deki/javascript/out/jquery.carouFredSel.min.js",beforeCreate:null,afterCreate:null,beforeRefresh:null,afterRefresh:null,beforeDestroy:null,afterDestroy:null},_create:function(){var t=this;return t._trigger("beforeCreate"),t.element.addClass("mt-carousel").hide(),e.fn.caroufredsel?(t.element.show().carouFredSel(t.options),void t._trigger("afterCreate")):void e.getScript((Deki.BaseHref||"")+t.options.carouselLibPath,function(){t._create()})},_destroy:function(){var e=this;e._trigger("beforeDestory"),e._super(),e.element.removeClass("mt-carousel"),e._trigger("afterDestory")}})})}(jQuery),function(e){"use strict";e.widget("mt.collapsibleSection",{options:{titleKey:"Section",titleTemplate:_('<button class="mt-toggle mt-summary-toggle ui-button-icon <%= data.collapsedClass %>"><%- data.title %></button>').template(null,{variable:"data"}),collapsed:!1},_create:function(){var t=this;_(t.options).extend(t.element.data()),delete t.options.mtCollapsibleSection;var i=t.options.title||Deki.loc(t.options.titleKey);t.element.addClass("mt-toggle-container").prepend(t.options.titleTemplate({title:i,collapsedClass:t.options.collapsed?"mt-toggle-expand":"mt-toggle-collapse"})),t.element.find(".mt-summary-toggle").on("click",function(){e(this).toggleClass("mt-toggle-collapse mt-toggle-expand"),e(this).nextAll().slideToggle("fast")})}})}(jQuery),function(e){"use strict";e.widget("deki.expandablelist",{options:{dataSource:null,moreText:function(e){return e+" more"},moreLinkTmpl:_('<li class="mt-expandablelist-morelink"><a href="#"><%= data.moreText %></a></li>').template(null,{variable:"data"}),listItemTmpl:_("<li><%= data.item %></li>").template(null,{variable:"data"}),beforeCreate:null,afterCreate:null,beforeDestroy:null,afterDestroy:null},_create:function(){var t=this;if(t._generatedElements=[],t._list=t.element,t._trigger("beforeCreate"),t.element.is("div")){var i=e("<ul></ul>");t.element.append(i),t._generatedElements.push(i),t._list=i}else if(!t.element.is("ul")&&!t.element.is("ol")&&!t.element.is("dl"))throw"ERROR: The element should be a div, ul, ol or dl";var n=_(t.element.data()).clone();delete n.expandablelist,_(t.options).extend(t.element.data()),t.element.addClass("deki-expandablelist"),t._trigger("afterCreate")},_init:function(){var e=this;e.options.dataSource&&e._askForData()},_askForData:function(){var t=this;t.options.dataSource.getData().done(function(i){var n=_(i.list).isArray()?i.list:[i.list];if(!_(n).isEmpty()&&(_(n).each(function(i){var n=e(t.options.listItemTmpl({item:i}));t._generatedElements.push(n),t._list.append(n)}),null!==i.itemsLeft&&i.itemsLeft>0)){var s=e(t.options.moreLinkTmpl({moreText:t.options.moreText(i.itemsLeft)}));t._generatedElements.push(s),t._list.append(s),s.on("click",function(i){i.preventDefault(),e(this).remove(),t._askForData()})}})},_destroy:function(){var t=this;t._trigger("beforeDestroy"),e.each(t._generatedElements,function(e){e.remove()}),t.element.removeClass("deki-expandablelist"),t._trigger("afterDestroy")},_setOptions:function(t){var i=this;e.each(t,function(e,t){i._setOption(e,t)})},_setOption:function(){var t=this;e.Widget.prototype._setOption.apply(t,arguments)}})}(jQuery),function(e){"use strict";e.widget("mt.grid",{options:{sortingOrder:[0,"asc"],emptyGridText:"No Data Available.",spinnerText:"Processing...",spinnerSize:"large",enableSpinner:!1,spinnerElement:null,paginate:!0,infiniteScroll:!1,scrollTriggerPixels:600,showInfo:!0,enableFilter:!0,data:[],domFormat:null,colDefs:[],separate:!1,separator:{sticky:!1,describe:"row-separator"},dataSource:null,serverSideSorting:!1,serverSideSortingTemplates:{"default":"css_right ui-icon ui-icon-carat-2-n-s",asc:"ui-icon-triangle-1-n",desc:"ui-icon-triangle-1-s"},onRowAdd:null,onGridDraw:null,onInfiniteScroll:null,onAjaxLoaded:null,onAjaxFail:function(e,t){Deki.Ui.Flash("status"in t&&403===t.status?Deki.loc("Article.Common.page-is-restricted-login"):"message"in t?t.message:"An unknown error has occurred.")},beforeCreate:null,afterCreate:null,beforeDestroy:null,afterDestroy:null},_create:function(){var t=this;if(t._trigger("beforeCreate"),!e.isFunction(jQuery.fn.dataTable))throw"Error: You need the dataTable plugin to use the MT Grid Widget.";t.element.is("table")?(t.element.addClass("mt-grid-table ui-table").wrap('<div class="mt-grid"></div>'),t.$grid=t.element,t.element=t.element.parent()):(t.element.empty(),t.element.addClass("mt-grid"),t.$grid=e("<table>",{"class":"mt-grid-table ui-table"}).appendTo(t.element)),t.options.colDefs.length&&!t.options.aoColumnDefs&&(t.options.aoColumnDefs=t._getColumnDefinitions()),t.options.aoColumnDefs=_.map(t.options.aoColumnDefs,function(e,t){return _(e).defaults({aTargets:[t],bSearchable:!0,bSortable:!0,bVisible:!0,bAutoWidth:!1})}),t.options.enableSpinner===!0&&(t.options.spinnerElement=t.options.spinnerElement||t.element,t.options.spinnerElement.spinner({messageText:t.options.spinnerText,show:!1,size:t.options.spinnerSize})),t.gridSettings=e.extend(!0,{aaSorting:t.options.serverSideSorting?[]:[t.options.sortingOrder],bJQueryUI:!0,bPaginate:t.options.infiniteScroll?!1:t.options.paginate,bScrollInfinite:t.options.infiniteScroll,bInfo:t.options.showInfo,bFilter:t.options.enableFilter,aaData:t.options.data,oLanguage:{},oScroll:{},bRetrieve:!0},t.options,{fnCreatedRow:function(e,i){t._onNewRow(e,i),_(t.options.fnCreatedRow).isFunction()&&t.options.fnCreatedRow(e,i)},fnRowCallback:function(e,i){_(t.options.fnRowCallback).isFunction()&&t.options.fnRowCallback(e,i)},fnInitComplete:function(i,n){if(_(t.options.fnInitComplete).isFunction()&&t.options.fnInitComplete(i,n),t.options.serverSideSorting)for(var s=function(){var i=e(this).find("span:visible");i.hasClass(t.options.serverSideSortingTemplates.asc)||i.hasClass(t.options.serverSideSortingTemplates.desc)?(i.toggleClass(t.options.serverSideSortingTemplates.asc),i.toggleClass(t.options.serverSideSortingTemplates.desc)):(t.$header.find("."+t.options.serverSideSortingTemplates.asc).removeClass(t.options.serverSideSortingTemplates.asc),t.$header.find("."+t.options.serverSideSortingTemplates.desc).removeClass(t.options.serverSideSortingTemplates.desc),i.toggleClass(t.options.serverSideSortingTemplates.asc));var n=e(this).data("colDef");t.resetGrid(i.hasClass(t.options.serverSideSortingTemplates.desc)?n.sortOn:"-"+n.sortOn)},r=0;r<t.gridSettings.aoColumnDefs.length;r++){var a=t.gridSettings.aoColumnDefs[r];if(a.sortOn){var o=t.$header.find("."+a.sClass.replace(/ /g,".")).data("colDef",a).off("click").on("click",s),l=o.find(".DataTables_sort_wrapper");l.find(".DataTables_sort_icon.css_right.ui-icon").hide(),l.append(e(document.createElement("span")).addClass(t.options.serverSideSortingTemplates["default"])),t.options.sortingOrder&&r===t.options.sortingOrder[0]&&(t.options.dataSource.sort("asc"===t.options.sortingOrder[1]?a.sortOn:"-"+a.sortOn),o.find("span:visible").addClass("asc"===t.options.sortingOrder[1]?t.options.serverSideSortingTemplates.asc:t.options.serverSideSortingTemplates.desc))}}t.options.dataSource&&t.getData()},fnDrawCallback:function(e){t.dt||(t.dt=this),t._trigger("onGridDraw",null,{settings:e}),_(t.options.fnDrawCallback).isFunction()&&t.options.fnDrawCallback(e),t._injectSeparators(),"$body"in t||(t.$body=t.element.find(".dataTables_scrollBody").removeAttr("style")),"$header"in t||(t.$header=t.element.find(".dataTables_scrollHead").removeAttr("style")),t.$bodyTable=t.$body.find("table"),t.$bodyHeight=t.$body.height(),t.doScroll=!0,t.$body.removeAttr("style"),t.$header.removeAttr("style")}}),_(t.gridSettings.oLanguage).defaults({sZeroRecords:t.options.emptyGridText,sSearch:t.options.searchText}),_(t.gridSettings.oScroll).defaults({bInfinite:t.options.infiniteScroll}),t.gridSettings.bProcessing=!1,!t.gridSettings.sDom&&t.gridSettings.domFormat&&(t.gridSettings.sDom=t.gridSettings.domFormat),""!==t.gridSettings.sScrollY&&(t.gridSettings.sScrollY="400px"),_(t.options.filterData).isFunction()&&e.fn.dataTableExt.afnFiltering.push(t.options.filterData),t.$grid.dataTable(t.gridSettings),t.processing=t.element.find(".dataTables_processing"),t.previousPlaceholders=[],t._makeScrollable(),t._makeSticky(),t.separators=[],t._trigger("afterCreate")},_makeScrollable:function(){var e=this;e.options.infiniteScroll&&(e.doScroll=!0,e.$body.on("scroll",function(){e.isEmpty()||e._infiniteScroll(!0)}))},_makeSticky:function(){var e=this;e.options.separator.sticky&&(e.element.addClass("mt-sticky-headers"),e.$body.on("scroll",function(t){if(t.originalEvent){for(var i=e.element.find(".separator-placeholder"),n=e.$body.offset().top,s=[],r=0;r<e.separators.length;r++)n>=e.separators[r].offset().top&&s.push(e.separators[r]);s.length&&i.replaceWith(s[s.length-1].clone().addClass("separator-placeholder").get())}}))},_destroy:function(){var e=this;e._trigger("beforeDestroy"),e.clearGrid(),e.$grid.fnDestroy(),e.$grid.remove(),e.element.removeClass("mt-grid"),e._trigger("afterDestroy")},_setOption:function(e,t){var i=this;switch(e){case"dataSource":i.clearGrid();break;case"emptyGridText":var n=i.$grid.fnSettings();n.oLanguage.sEmptyTable=t,i.$grid.fnDraw()}i._superApply(arguments)},_getColumnDefinitions:function(){for(var e=this,t=[],i=0;i<e.options.colDefs.length;i++){var n=e.options.colDefs[i];t.push({sTitle:n.title,sClass:n["class"],bSortable:n.sortable,mDataProp:n.formatter,sortOn:n.sortOn,sWidth:n.width,sDefaultContent:n.defaultContent,bVisible:n.visible})}return t},_insertPlaceholder:function(){var t=this;if(!t.element.find(".separator-placeholder").length){var i=e(t.options.separator.template({data:t.firstRowData}));t.$header.find("table").append(e(document.createElement("tbody")).append(i.addClass(t.options.separator.describe+" separator-placeholder first-separator")))}},_injectSeparators:function(){var t=this;t.options.separate&&!t.isEmpty()&&(t.separators=[],t.$grid.find("."+t.options.separator.describe).remove(),t.$grid.find("tr["+t.options.separator.describe+"]").each(function(){var i=e(this),n=i.data(t.options.separator.describe),s=e(t.options.separator.template({data:n})).insertBefore(i).addClass(t.options.separator.describe+" row-separator");t.separators.push(s)}),t._insertPlaceholder())},_onNewRow:function(t,i){var n=this,s=e(t);n.options.separate&&(n.previousRow?n.options.separator.checkWith(n.previousRow,i)&&(s.attr(n.options.separator.describe,!0),s.data(n.options.separator.describe,i)):(s.attr(n.options.separator.describe,!0),s.data(n.options.separator.describe,i),s.addClass("first-row"),n.firstRowData=i),n.previousRow=i),n._trigger("onRowAdd",null,{tr:t,data:i})},_infiniteScroll:function(){var e=this,t=e.$bodyTable.height()-e.options.scrollTriggerPixels-e.$bodyHeight;e.doScroll&&e.$body.scrollTop()>t&&(e.options.enableSpinner&&!e.options.spinnerElement.hasClass("mt-spinner-bottom")&&(e.options.spinnerElement.addClass("mt-spinner-bottom"),e.options.spinnerElement.spinner("option","size","small")),e.doScroll=!1,e.getData())},getData:function(e){var t=this;t.options.enableSpinner===!0&&t.options.spinnerElement.spinner("showSpinner"),t.options.dataSource.getData(e).always(function(){t.options.enableSpinner===!0&&t.options.spinnerElement.spinner("hideSpinner")}).done(function(e){var i=t.$body.scrollTop();t.addData(e,!0),t.$body.scrollTop(i-1),t._trigger("onAjaxLoaded",null,e)}).fail(function(e){t._trigger("onAjaxFail",null,e)})},addData:function(e,t){if(e){var i=this;_(i.options.transformData).isFunction()&&(e=i.options.transformData.call(this,e)),e&&e.length&&i.dt.fnAddData(e,t)}},getDataSource:function(){var e=this;return e.options.dataSource},clearGrid:function(){var e=this;e.isEmpty()||(e.element.find(".separator-placeholder").remove(),e.$body.find("tr").remove(),e.previousRow=null,e.separators=[],e.dt.fnClearTable(!0))},resetGrid:function(t){var i=this;i.clearGrid(),i.options.dataSource&&e.isFunction(i.options.dataSource.reset)&&i.options.dataSource.reset(),e.isFunction(i.options.dataSource.sort)&&i.options.dataSource.sort(t),i.options.spinnerElement&&(i.options.spinnerElement.removeClass("mt-spinner-bottom"),i.options.spinnerElement.spinner("option","size","large")),i.getData()},redrawGrid:function(e){var t=this;t.$grid.fnDraw(e)},isEmpty:function(){var e=this;return!e.dt.fnGetData().length},processingIndicator:function(e){var t=this;t.element.spinner(e)},getRowData:function(e){var t=this;return e instanceof jQuery&&(e=e[0]),t.$grid.fnGetData(e)},getGridData:function(){var e=this;return e.$grid.fnGetData()},setRowData:function(e,t){var i=this;return e instanceof jQuery&&(e=e[0]),i.$grid.fnUpdate(t,e)},deleteRow:function(e){var t=this;return e instanceof jQuery&&(e=e[0]),t.$grid.fnDeleteRow(e)},_getStates:function(e){var t=this,i=t._located(e,!0,[25,0,0,0]),n=e.data("this_state");return i===n?[n,i]:(e.data("last_state",n),e.data("this_state",i),[n,i])}})}(jQuery),function(e){"use strict";e.widget("mt.inputRedirect",{options:{url:"/",key:"query",params:{},label:"Query",placeholder:"Search",button:null,buttontext:"Search",val:"",beforeCreate:null,afterCreate:null,beforeRefresh:null,afterRefresh:null,beforeDestroy:null,afterDestroy:null},_create:function(){this._trigger("beforeCreate");var t=this,i=_(t.element.data()).clone();if(delete i.inputRedirect,_(t.options).extend(t.element.data()),t.element.is("input"))t.$input=t.element,t.$form=t.$input.wrap("<form></form>").parent(),t.$element=t.$form.wrap("<div></div>").parent();else{if(!t.element.is("div"))throw"ERROR: This inputRedirect widget can only be constructed on an <div> or <input> element.";t.element.empty(),t.$element=t.element,t.$input=e(document.createElement("input")),t.$form=e(document.createElement("form")),t.$form.append(t.$input),t.$element.append(t.$form)
}t.$input.wrap('<fieldset class="ui-dform-fieldset"><div class="mt-field"></div></fieldset>'),t.$input.parents(".mt-field").prepend(e('<label for="mt-inputRedirect-input" class="mt-inputRedirect-label ui-dform-label">'.toLowerCase()+t.options.label+"</label>")),t.options.button!==!1&&(t.$button=t.options.button?e(t.options.button):e(document.createElement("button")).html(t.options.buttontext).addClass("mt-inputRedirect-button".toLowerCase()).appendTo(t.$input.parents(".mt-field")).button()),t.$element.addClass("mt-inputRedirect".toLowerCase()),t.$form.addClass("ui-dform mt-inputRedirect-form".toLowerCase()).attr("autocomplete","off"),t.$input.addClass("mt-inputRedirect-input ui-dform-input".toLowerCase()).attr("placeholder",t.options.placeholder),t.$input.val(t.$input.attr("value")||t.options.val),t._on(t.$form,{submit:function(e){e.preventDefault(),t.search()}}),t._on(t.$button,{click:function(){t.search()}}),t._trigger("afterCreate")},destroy:function(){var e=this;e._trigger("beforeDestroy"),e.element.is("div")?e.element.removeClass("mt-inputRedirect".toLowerCase()).empty():e.element.is("input")&&(e.element.appendTo(this.$element.parent()),e.$element.remove()),e._trigger("afterDestroy")},search:function(){var e=this,t=e.$input.val();if(!_.isBlank(t)){e.options.params[e.options.key]=t;var i="";_(e.options.params).keys().length>0&&(i=Deki.Utility.buildQueryString(e.options.params)),window.location=e.options.url+i}}})}(jQuery),function(e){"use strict";e.widget("mt.modal",e.ui.dialog,{options:{dialogClass:"mt-dialog",modal:!0,width:400,resizable:!1,draggable:!0,tabs:!1,naming:null,params:{},close:function(){e(this).remove()},load:null,beforeCreate:null,afterCreate:null,beforeDestroy:null,afterDestroy:null},_create:function(){var t=this;t._trigger("beforeCreate");var i=_(t.element.data()).clone();delete i.inputRedirect,_(t.options).extend(t.element.data()),null===t.options.naming&&e.error("naming construction option is necessary"),t.element.addClass("mt-modal"),t.options.tabs&&t.element.addClass("with-tabs"),t.templateSpace=_(t.options.naming).isString()?{template:"MindTouch/Controls/Dialogs/"+t.options.naming.charAt(0).toUpperCase()+t.options.naming.slice(1),javascript:"dialog."+(t.options.naming.charAt(0).toLowerCase()+t.options.naming.slice(1)),namespace:t.options.naming.charAt(0).toUpperCase()+t.options.naming.slice(1)}:t.options.naming,t.options.load=t.options.load||function(){Deki.Ui.Dialog[t.templateSpace.namespace].init()},t._super(arguments),t._trigger("afterCreate")},open:function(){var e=this;e.widget().trigger("focusin"),e._super(),e.load()},close:function(){var e=this;e._super(),e._destroy()},load:function(){var e=this;if(e.templateSpace.javascript&&!Deki.Ui.Dialog[e.templateSpace.namespace]){var t="/deki/javascript/out/"+e.templateSpace.javascript+".min.js";Deki.Utility.getCachedJavascript(t).then(function(){e._loadUi(e.templateSpace.template,e.options.params)})}else e._loadUi(e.templateSpace.template,e.options.params)},_loadUi:function(t,i){var n=this,s=new Deki.Page(Deki.PageId),r="Template:"+t;i.rawResponse=!0,s.getHtmlTemplate(r,i).done(function(t){var i=e(t.data.body);if(i.each(function(){var t=e(this);t.hasClass("mt-dialog-root")?(n.options.tabs?t.parent().find(".ui-dialog-titlebar-close").prependTo("#link-picker-tabs").closest(".ui-dialog").children(".ui-dialog-titlebar").remove():n._setOption("title",t.attr("title")),n.$wrapper=t.appendTo(n.element).parents(".ui-dialog").addClass("mt-modal-wrapper")):t.is("script")&&e("body").append(t)}),n._trigger("load"),n.options.tabs&&n.$wrapper&&"auto"===n.options.height){var s=n.$wrapper.outerHeight(),r=n.$wrapper.addClass("mt-modal-wrapper-tabs").find(".ui-dialog-titlebar").outerHeight();n.element.css("top",-1*r),n.$wrapper.height(s-r)}n.option("position",{my:"center",at:"center",of:window})}).fail(function(){Deki.Site.getResourceString({key:"Dialog.Common.error.load"}).then(function(e){Deki.Ui.Flash(Deki.loc(e,r))})})},_destroy:function(){var t=this;t._trigger("beforeDestroy"),t.element.removeClass("mt-modal"),e(document).off(".mt-modal"),t._super(),t.$wrapper&&t.$wrapper.length&&t.$wrapper.remove(),t._trigger("afterDestroy")}})}(jQuery),function(e){"use strict";e.widget("mt.revealListing",{options:{showCount:5,showSelector:"li",showLinkLabel:Deki.loc("MindTouch.IDF3.label.reveal.showAll"),hideLinkLabel:Deki.loc("MindTouch.IDF3.label.reveal.showLess"),allowCollapse:!0,showLinkTemplate:_('<button href="#" class="mt-icon-expand-collapse mt-reveal-listing-expand-link" title="<%- data.label %>"><%- data.label %></button>').template(null,{variable:"data"})},_create:function(){var t=this;t.element.addClass("mt-reveal-listing");var i=t.element.find(t.options.showSelector).length;i>t.options.showCount&&(t.expandLink=e(t.options.showLinkTemplate({label:t.options.showLinkLabel})).on("click",function(e){e.preventDefault(),t.collapsed?t.expand():t.options.allowCollapse&&t.collapse()}).insertAfter(t.element),t.collapse(),t.collapsed=!0)},collapse:function(){var t=this;t.element.find(t.options.showSelector).each(function(i){var n=e(this);i<t.options.showCount?n.show():n.hide()}),t.collapsed=!0,t.expandLink.text(t.options.showLinkLabel).prop("title",t.options.showLinkLabel)},expand:function(){var e=this;e.element.find(e.options.showSelector).show(),e.collapsed=!1,e.options.allowCollapse?e.expandLink.text(e.options.hideLinkLabel).prop("title",e.options.hideLinkLabel):e.expandLink.remove()},toggleReveal:function(e){e.preventDefault();var t=this,i=t.collapsed?"expand":"collapse";t.call(i)}})}(jQuery),$.blockUI.defaults.css={},function(e){"use strict";e.widget("mt.blocker",{options:{message:null,draggable:!1,show:!0,messageText:"",messageTemplate:_('<div class="mt-block-text"><%= data.message %></div>').template(null,{variable:"data"}),beforeCreate:null,afterCreate:null,beforeRefresh:null,afterRefresh:null,beforeDestroy:null,afterDestroy:null,onBlock:null},_create:function(t){var i=this;i._trigger("beforeCreate"),e.isFunction(jQuery.fn.block)||e.error("You need the block UI plugin to be available before you can use the MT spinner plugin."),i.element.addClass("mt-blocker"),i.halt(t),i._trigger("afterCreate")},_setOption:function(e,t){var i=this;"messageText"===e&&i.options.messageTemplate!==!1&&(e="message",t=i.options.messageTemplate({message:t})),i._super(e,t)},halt:function(e){var t=this;e&&t._setOptions(e);var i=_(t.options).clone();i.onBlock=function(){"onBlock"in t.options&&_(t.options.onBlock).isFunction()&&t.options.onBlock.call(t)},e.show!==!1&&t.element.block(i)},unblock:function(){this.element.unblock()}})}(jQuery),function(e){"use strict";e.widget("mt.spinner",e.mt.blocker,{options:{message:null,draggable:!1,size:"large",sizes:{small:{radius:8,lines:13},large:{radius:25,lines:24},xlarge:{radius:110,lines:90}},messageTemplate:_('<div class="mt-spinner-container"><div class="mt-spinner-text"><%= data.message %></div><div class="mt-spinner-image"></div> </div>').template(null,{variable:"data"}),beforeCreate:null,afterCreate:null,beforeRefresh:null,afterRefresh:null,beforeDestroy:null,afterDestroy:null},_create:function(){var e=this;e._trigger("beforeCreate"),e.spinner=new Spinner(e.options.sizes[e.options.size]).spin().el,e.element.addClass("mt-spinner"),e.options.messageTemplate!==!1&&(e.options.message=e.options.messageTemplate({message:e.options.messageText})),e._super({show:e.options.show}),e.options.show!==!1&&e.showSpinner(),e._trigger("afterCreate")},_setOption:function(e,t){var i=this;"messageText"===e&&i.options.messageTemplate!==!1?(e="message",t=i.options.messageTemplate({message:t})):"size"===e&&(i.spinner=new Spinner(i.options.sizes[t]).spin().el),i._super(e,t)},showSpinner:function(e){var t=this;e&&t._setOptions(e);var i=_(t.options).clone();i.onBlock=function(){"onBlock"in t.options&&_(t.options.onBlock).isFunction()&&t.options.onBlock.call(t)},t.element.block(i),t.element.find(".mt-spinner-image").append(t.spinner)},hideSpinner:function(){this.unblock()}})}(jQuery),function(e){"use strict";e.widget("mt.tabbedContent",e.ui.tabs,{_create:function(){var e=this;e.element.addClass("mt-tabbed-content"),_(e.options).extend(e.element.data()),e._super()}}),e.widget("mt.draggableTabbedContent",e.mt.tabbedContent,{_create:function(){var e=this;e._super(),e.element.addClass("mt-draggable-tabbed-content").find("ul").addClass("mt-draggable-tabs").sortable({cursor:"move",tolerance:"pointer",axis:"x",update:function(){e.tabsSorted()}})},enableDragging:function(){var e=this;e.element.find(".mt-draggable-tabs").sortable("enable")},disableDragging:function(){var e=this;e.element.find(".mt-draggable-tabs").sortable("disable")},tabsSorted:function(){}})}(jQuery),function(e){"use strict";e.widget("mt.tree",{options:{lazy:!0,dataSource:null,singleRootMode:!0,rootKey:null,expandRoot:!0,initialKey:null,idPath:null,transformNode:function(e){return e},selectNode:function(){return!0}},_create:function(){var e=this;if(!e.options.dataSource)throw new Error("Data source must be set");e.element.addClass("mt-tree"),e._tree=e.element.fancytree({minExpandLevel:2,source:e.options.singleRootMode?e.options.dataSource.getRootAndChildren(e.options.rootKey):e.options.dataSource.getChildren(e.options.rootKey),init:function(t,i){if(e.options.idPath)i.tree.loadKeyPath(e.options.idPath,function(e,t){"ok"===t&&(e.setActive(),e.setExpanded())});else if(e.options.singleRootMode&&e.options.expandRoot){var n=i.tree.getFirstChild();n.load().done(function(){n.setActive(),n.setExpanded()})}},lazyLoad:function(t,i){i.result=e.options.dataSource.getChildren(i.node.key)},loadChildren:function(t,i){_(i.node.children).each(function(t){t=e.options.transformNode(t),t.title=_(t.title).escapeHTML(),t.lazy=e.options.lazy})},activate:function(t,i){e._trigger("nodeSelected",t,i.node)},click:function(t,i){return"title"===i.targetType||"icon"===i.targetType?e.options.selectNode(i.node):void 0}})},getActiveNode:function(){var e=this,t=e.element.fancytree("getActiveNode");return t}})}(jQuery),function(e){"use strict";Deki.provide("Deki.User"),Deki.User=function(e){this._id=e||0},_(Deki.User).extend({_userPlug:new Deki.Plug(Deki.BaseHref+"/").at("@api","deki","users").withParam("dream.out.format","json"),searchUsers:function(t){t=t||{};var i=e.Deferred();return this._userPlug.at("search").withParams(t).get(function(e){if(e.isSuccess()){var t=null;try{t=e.getJson()}catch(n){return void i.reject({error:{type:"error.users.search.parse",status:e.getStatusText()}})}if(!t)return void i.reject({error:{type:"error.users.search.fetch",status:e.getStatusText()}});t.user&&!_(t.user).isArray()&&(t.user=[t.user]),i.resolve({data:t})}else{var s=null;try{s=e.getJson()}catch(n){}var r=s||{};i.reject({error:{response:r,type:"timeout"===e.statusText?"error.users.search.timeout":r["@error-code"]||"error.users.search.generic",status:e.getStatusText()}})}},null,{timeout:3e4}),i.promise()},getCurrentUser:function(t){var i=this,n=new e.Deferred,s=this._userPlug.at("current");return t&&_(t).isArray()&&t.length&&(s=s.withParam("exclude",t.join())),s.get(function(e){if(e.isSuccess()){var t=i.newUserFromResponseJSON(e.getJson());n.resolve(t)}else n.reject({error:{type:"error.user.get",status:e.getStatusText()}})}),n.promise()},newUserFromResponseJSON:function(e){return new Deki.User(e["@id"])}}),_(Deki.User.prototype).extend({_userPlug:Deki.User._userPlug,isAnonymous:function(){return 2===parseInt(this._id,10)},getProperties:function(e){e=e||function(){},this._userPlug.at(this._id,"properties").get(function(t){if(t.isSuccess()){var i=null;try{i=t.getJson()}catch(n){return void e({success:!1,error:{type:"error.response.parse",status:t.getStatusText()}})}if(!i)return void e({success:!1,error:{type:"error.response.fetch",status:t.getStatusText()}});e({success:!0,data:i})}else e({success:!1,error:{type:"error.response.fetch",status:t.getStatusText()}})})},getProperty:function(e,t){t=t||function(){},this._userPlug.at(this._id,"properties",e).get(function(e){t(e.isSuccess()?{success:!0,contents:e.responseText}:{success:!1,error:{type:"error.property.fetch",status:e.getStatusText()}})})},getJsonProperty:function(e,t){t=t||function(){},this.getProperty(e,function(e){if(e.success){var i=null;try{i=JSON.parse(e.contents)}catch(n){return void t({success:!1,error:{type:"error.response.parse",status:e.getStatusText()}})}if(!i)return void t({success:!1,error:{type:"error.response.fetch",status:e.getStatusText()}});t({success:!0,data:i})}else t({success:!1,error:{type:"error.property.fetch",status:e.getStatusText()}})})},setProperty:function(e,t,i,n,s){i=i||function(){},s=s||Deki.Utility.textRequestType;var r={};n&&_.isString(n)&&!_.isEmpty(n)&&(r.abort=n),this._userPlug.at(this._id,"properties",e).withParams(r).put(t,s,function(e){if(e.isSuccess()){var t=null;try{t=e.getJson()}catch(n){i({success:!1,error:{type:"error.property.set.parse",status:e.getStatusText()}})}if(!t)return void i({success:!1,error:{type:"error.property.set.fetch",status:e.getStatusText()}});i({success:!0,data:t})}else i({success:!1,error:{type:"error.property.set",status:e.getStatusText()}})})},logUserSearch:function(t){var i=new e.Deferred,n=new Deki.Plug(Deki.BaseHref+"/").at("@api","deki","events","search","current");return n.post(JSON.stringify(t),Deki.Utility.jsonRequestType,function(e){e.isSuccess()?i.resolve():i.reject({error:{type:"error.activity.set",status:e.getStatusText()}})}),i.promise()}})}(jQuery);