function searchToolbar(n,t,i,r){this.action=n;this.targetupdateList="#"+t;this.labelStatus="#"+i;this.toolbarId="#searchQuery";r!=null&&(r.companyId!=null&&(this.companyId=r.companyId),r.agencyName!=null&&(this.agencyName=r.agencyName),r.crewAccountId!=null&&(this.crewAccountId=r.crewAccountId),r.crewId!=null&&(this.crewId=r.crewId),r.agencyId!=null&&(this.agencyId=r.agencyId),r.toolbarId!=null&&(this.toolbarId="#"+r.toolbarId));this.initialize=function(){var t=this,n=$(this.toolbarId);$("#mySelectlist").selectlist("selectByIndex","1");$("#mySortlist").selectlist("selectByIndex","1");$("#mySearch").search();$("#mySearch").on("searched.fu.search",function(){n.data("searchvalue",$("#searchInput").val());n.data("searchterm",$("#mySelectListInput").val());t.updateList()});$("#mySearch").on("cleared.fu.search",function(){n.data("searchterm","*");n.data("searchvalue","*");t.updateList()});$(document).on("click",".pagination a",function(i){i.preventDefault();n.data("action",$(this).attr("href"));t.updateList()});$(document).on("click",".btn-tag button",function(){n.data("tag-searchvalue",$(this).data("tagsearchvalue"));n.data("tag-searchterm",$(this).data("tagsearchterm"));$(this).data("tagsearchterm")=="*"&&(n.data("searchterm","*"),n.data("searchvalue","*"),$("#searchInput").val(""),$("#btnMySearch").removeClass("glyphicon-remove").addClass("glyphicon-search"));t.updateList()});$("#mySortlist").on("changed.fu.selectlist",function(){n.data("sortby",$("#mySortListInput").val());n.data("sortdirection","asc");t.updateList()});n.data("action",this.action)};this.updateAction=function(){var n=$(this.toolbarId);n.data("action",this.action)};this.updateList=function(){var t=$(this.toolbarId),i=this.targetupdateList,r=this.labelStatus,n={};this.companyId!=null&&(n.companyId=this.companyId);this.agencyName!=null&&(n.agencyName=this.agencyName);this.crewId!=null&&(n.crewId=this.crewId);this.agencyId!=null&&(n.agencyId=this.agencyId);this.crewAccountId!=null&&(n.crewAccountId=this.crewAccountId);n.searchTerm=t.data("searchterm");n.searchValue=t.data("searchvalue");n.tagsearchTerm=t.data("tag-searchterm");n.tagsearchValue=t.data("tag-searchvalue");n.sortBy=t.data("sortby");n.sortDirection=t.data("sortdirection");$.ajax({url:t.data("action"),data:n,type:"get",beforeSend:function(){$("#alertBox").css("display","none");$("#lblStatus").empty().html("<strong>Loading...<\/strong>");$(".indicator").addClass("show")},success:function(n){n=="TYPEERROR"?($("#alertBox").css("display","block"),$(r).empty().html("<strong>Search Error!<\/strong> Entered search query is invalid.")):$(i).empty().append(n)},complete:function(){$(".indicator").removeClass("show")}})}}if(!function(n,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=n.document?t(n,!0):function(n){if(!n.document)throw new Error("jQuery requires a window with a document");return t(n)}:t(n)}("undefined"!=typeof window?window:this,function(n,t){function ri(n){var t=n.length,r=i.type(n);return"function"===r||i.isWindow(n)?!1:1===n.nodeType&&t?!0:"array"===r||0===t||"number"==typeof t&&t>0&&t-1 in n}function ui(n,t,r){if(i.isFunction(t))return i.grep(n,function(n,i){return!!t.call(n,i,n)!==r});if(t.nodeType)return i.grep(n,function(n){return n===t!==r});if("string"==typeof t){if(ue.test(t))return i.filter(t,n,r);t=i.filter(t,n)}return i.grep(n,function(n){return i.inArray(n,t)>=0!==r})}function hr(n,t){do n=n[t];while(n&&1!==n.nodeType);return n}function oe(n){var t=fi[n]={};return i.each(n.match(h)||[],function(n,i){t[i]=!0}),t}function cr(){u.addEventListener?(u.removeEventListener("DOMContentLoaded",a,!1),n.removeEventListener("load",a,!1)):(u.detachEvent("onreadystatechange",a),n.detachEvent("onload",a))}function a(){(u.addEventListener||"load"===event.type||"complete"===u.readyState)&&(cr(),i.ready())}function yr(n,t,r){if(void 0===r&&1===n.nodeType){var u="data-"+t.replace(vr,"-$1").toLowerCase();if(r=n.getAttribute(u),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:ar.test(r)?i.parseJSON(r):r}catch(f){}i.data(n,t,r)}else r=void 0}return r}function ei(n){for(var t in n)if(("data"!==t||!i.isEmptyObject(n[t]))&&"toJSON"!==t)return!1;return!0}function pr(n,t,r,u){if(i.acceptData(n)){var s,e,h=i.expando,l=n.nodeType,o=l?i.cache:n,f=l?n[h]:n[h]&&h;if(f&&o[f]&&(u||o[f].data)||void 0!==r||"string"!=typeof t)return f||(f=l?n[h]=c.pop()||i.guid++:h),o[f]||(o[f]=l?{}:{toJSON:i.noop}),("object"==typeof t||"function"==typeof t)&&(u?o[f]=i.extend(o[f],t):o[f].data=i.extend(o[f].data,t)),e=o[f],u||(e.data||(e.data={}),e=e.data),void 0!==r&&(e[i.camelCase(t)]=r),"string"==typeof t?(s=e[t],null==s&&(s=e[i.camelCase(t)])):s=e,s}}function wr(n,t,u){if(i.acceptData(n)){var o,s,h=n.nodeType,f=h?i.cache:n,e=h?n[i.expando]:i.expando;if(f[e]){if(t&&(o=u?f[e]:f[e].data)){for(i.isArray(t)?t=t.concat(i.map(t,i.camelCase)):(t in o)?t=[t]:(t=i.camelCase(t),t=(t in o)?[t]:t.split(" ")),s=t.length;s--;)delete o[t[s]];if(u?!ei(o):!i.isEmptyObject(o))return}(u||(delete f[e].data,ei(f[e])))&&(h?i.cleanData([n],!0):r.deleteExpando||f!=f.window?delete f[e]:f[e]=null)}}}function vt(){return!0}function it(){return!1}function dr(){try{return u.activeElement}catch(n){}}function gr(n){var i=nu.split("|"),t=n.createDocumentFragment();if(t.createElement)while(i.length)t.createElement(i.pop());return t}function f(n,t){var e,u,s=0,r=typeof n.getElementsByTagName!==o?n.getElementsByTagName(t||"*"):typeof n.querySelectorAll!==o?n.querySelectorAll(t||"*"):void 0;if(!r)for(r=[],e=n.childNodes||n;null!=(u=e[s]);s++)!t||i.nodeName(u,t)?r.push(u):i.merge(r,f(u,t));return void 0===t||t&&i.nodeName(n,t)?i.merge([n],r):r}function be(n){oi.test(n.type)&&(n.defaultChecked=n.checked)}function eu(n,t){return i.nodeName(n,"table")&&i.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?n.getElementsByTagName("tbody")[0]||n.appendChild(n.ownerDocument.createElement("tbody")):n}function ou(n){return n.type=(null!==i.find.attr(n,"type"))+"/"+n.type,n}function su(n){var t=ye.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function li(n,t){for(var u,r=0;null!=(u=n[r]);r++)i._data(u,"globalEval",!t||i._data(t[r],"globalEval"))}function hu(n,t){if(1===t.nodeType&&i.hasData(n)){var u,f,o,s=i._data(n),r=i._data(t,s),e=s.events;if(e){delete r.handle;r.events={};for(u in e)for(f=0,o=e[u].length;o>f;f++)i.event.add(t,u,e[u][f])}r.data&&(r.data=i.extend({},r.data))}}function ke(n,t){var u,e,f;if(1===t.nodeType){if(u=t.nodeName.toLowerCase(),!r.noCloneEvent&&t[i.expando]){f=i._data(t);for(e in f.events)i.removeEvent(t,e,f.handle);t.removeAttribute(i.expando)}"script"===u&&t.text!==n.text?(ou(t).text=n.text,su(t)):"object"===u?(t.parentNode&&(t.outerHTML=n.outerHTML),r.html5Clone&&n.innerHTML&&!i.trim(t.innerHTML)&&(t.innerHTML=n.innerHTML)):"input"===u&&oi.test(n.type)?(t.defaultChecked=t.checked=n.checked,t.value!==n.value&&(t.value=n.value)):"option"===u?t.defaultSelected=t.selected=n.defaultSelected:("input"===u||"textarea"===u)&&(t.defaultValue=n.defaultValue)}}function cu(t,r){var u=i(r.createElement(t)).appendTo(r.body),f=n.getDefaultComputedStyle?n.getDefaultComputedStyle(u[0]).display:i.css(u[0],"display");return u.detach(),f}function lu(n){var r=u,t=ai[n];return t||(t=cu(n,r),"none"!==t&&t||(ot=(ot||i("<iframe frameborder='0' width='0' height='0'/>")).appendTo(r.documentElement),r=(ot[0].contentWindow||ot[0].contentDocument).document,r.write(),r.close(),t=cu(n,r),ot.detach()),ai[n]=t),t}function vu(n,t){return{get:function(){var i=n();if(null!=i)return i?void delete this.get:(this.get=t).apply(this,arguments)}}}function wu(n,t){if(t in n)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),u=t,i=pu.length;i--;)if(t=pu[i]+r,t in n)return t;return u}function bu(n,t){for(var f,r,o,e=[],u=0,s=n.length;s>u;u++)r=n[u],r.style&&(e[u]=i._data(r,"olddisplay"),f=r.style.display,t?(e[u]||"none"!==f||(r.style.display=""),""===r.style.display&&et(r)&&(e[u]=i._data(r,"olddisplay",lu(r.nodeName)))):e[u]||(o=et(r),(f&&"none"!==f||!o)&&i._data(r,"olddisplay",o?f:i.css(r,"display"))));for(u=0;s>u;u++)r=n[u],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?e[u]||"":"none"));return n}function ku(n,t,i){var r=to.exec(t);return r?Math.max(0,r[1]-(i||0))+(r[2]||"px"):t}function du(n,t,r,u,f){for(var e=r===(u?"border":"content")?4:"width"===t?1:0,o=0;4>e;e+=2)"margin"===r&&(o+=i.css(n,r+w[e],!0,f)),u?("content"===r&&(o-=i.css(n,"padding"+w[e],!0,f)),"margin"!==r&&(o-=i.css(n,"border"+w[e]+"Width",!0,f))):(o+=i.css(n,"padding"+w[e],!0,f),"padding"!==r&&(o+=i.css(n,"border"+w[e]+"Width",!0,f)));return o}function gu(n,t,u){var o=!0,f="width"===t?n.offsetWidth:n.offsetHeight,e=k(n),s=r.boxSizing()&&"border-box"===i.css(n,"boxSizing",!1,e);if(0>=f||null==f){if(f=d(n,t,e),(0>f||null==f)&&(f=n.style[t]),yt.test(f))return f;o=s&&(r.boxSizingReliable()||f===n.style[t]);f=parseFloat(f)||0}return f+du(n,t,u||(s?"border":"content"),o,e)+"px"}function e(n,t,i,r,u){return new e.prototype.init(n,t,i,r,u)}function tf(){return setTimeout(function(){rt=void 0}),rt=i.now()}function bt(n,t){var r,i={height:n},u=0;for(t=t?1:0;4>u;u+=2-t)r=w[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function rf(n,t,i){for(var u,f=(st[t]||[]).concat(st["*"]),r=0,e=f.length;e>r;r++)if(u=f[r].call(i,t,n))return u}function eo(n,t,u){var f,l,p,a,o,b,y,w,c=this,v={},s=n.style,h=n.nodeType&&et(n),e=i._data(n,"fxshow");u.queue||(o=i._queueHooks(n,"fx"),null==o.unqueued&&(o.unqueued=0,b=o.empty.fire,o.empty.fire=function(){o.unqueued||b()}),o.unqueued++,c.always(function(){c.always(function(){o.unqueued--;i.queue(n,"fx").length||o.empty.fire()})}));1===n.nodeType&&("height"in t||"width"in t)&&(u.overflow=[s.overflow,s.overflowX,s.overflowY],y=i.css(n,"display"),w=lu(n.nodeName),"none"===y&&(y=w),"inline"===y&&"none"===i.css(n,"float")&&(r.inlineBlockNeedsLayout&&"inline"!==w?s.zoom=1:s.display="inline-block"));u.overflow&&(s.overflow="hidden",r.shrinkWrapBlocks()||c.always(function(){s.overflow=u.overflow[0];s.overflowX=u.overflow[1];s.overflowY=u.overflow[2]}));for(f in t)if(l=t[f],uo.exec(l)){if(delete t[f],p=p||"toggle"===l,l===(h?"hide":"show")){if("show"!==l||!e||void 0===e[f])continue;h=!0}v[f]=e&&e[f]||i.style(n,f)}if(!i.isEmptyObject(v)){e?"hidden"in e&&(h=e.hidden):e=i._data(n,"fxshow",{});p&&(e.hidden=!h);h?i(n).show():c.done(function(){i(n).hide()});c.done(function(){var t;i._removeData(n,"fxshow");for(t in v)i.style(n,t,v[t])});for(f in v)a=rf(h?e[f]:0,f,c),f in e||(e[f]=a.start,h&&(a.end=a.start,a.start="width"===f||"height"===f?1:0))}}function oo(n,t){var r,f,e,u,o;for(r in n)if(f=i.camelCase(r),e=t[f],u=n[r],i.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function uf(n,t,r){var h,e,o=0,l=wt.length,f=i.Deferred().always(function(){delete c.elem}),c=function(){if(e)return!1;for(var s=rt||tf(),t=Math.max(0,u.startTime+u.duration-s),h=t/u.duration||0,i=1-h,r=0,o=u.tweens.length;o>r;r++)u.tweens[r].run(i);return f.notifyWith(n,[u,i,t]),1>i&&o?t:(f.resolveWith(n,[u]),!1)},u=f.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:rt||tf(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(e)return this;for(e=!0;r>i;i++)u.tweens[i].run(1);return t?f.resolveWith(n,[u,t]):f.rejectWith(n,[u,t]),this}}),s=u.props;for(oo(s,u.opts.specialEasing);l>o;o++)if(h=wt[o].call(u,n,s,u.opts))return h;return i.map(s,rf,u),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),i.fx.timer(i.extend(c,{elem:n,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 vf(n){return function(t,r){"string"!=typeof t&&(r=t,t="*");var u,f=0,e=t.toLowerCase().match(h)||[];if(i.isFunction(r))while(u=e[f++])"+"===u.charAt(0)?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function yf(n,t,r,u){function e(s){var h;return f[s]=!0,i.each(n[s]||[],function(n,i){var s=i(t,r,u);return"string"!=typeof s||o||f[s]?o?!(h=s):void 0:(t.dataTypes.unshift(s),e(s),!1)}),h}var f={},o=n===bi;return e(t.dataTypes[0])||!f["*"]&&e("*")}function ki(n,t){var u,r,f=i.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((f[r]?n:u||(u={}))[r]=t[r]);return u&&i.extend(!0,n,u),n}function vo(n,t,i){for(var o,e,u,f,s=n.contents,r=n.dataTypes;"*"===r[0];)r.shift(),void 0===e&&(e=n.mimeType||t.getResponseHeader("Content-Type"));if(e)for(f in s)if(s[f]&&s[f].test(e)){r.unshift(f);break}if(r[0]in i)u=r[0];else{for(f in i){if(!r[0]||n.converters[f+" "+r[0]]){u=f;break}o||(o=f)}u=u||o}if(u)return(u!==r[0]&&r.unshift(u),i[u])}function yo(n,t,i,r){var h,u,f,s,e,o={},c=n.dataTypes.slice();if(c[1])for(f in n.converters)o[f.toLowerCase()]=n.converters[f];for(u=c.shift();u;)if(n.responseFields[u]&&(i[n.responseFields[u]]=t),!e&&r&&n.dataFilter&&(t=n.dataFilter(t,n.dataType)),e=u,u=c.shift())if("*"===u)u=e;else if("*"!==e&&e!==u){if(f=o[e+" "+u]||o["* "+u],!f)for(h in o)if(s=h.split(" "),s[1]===u&&(f=o[e+" "+s[0]]||o["* "+s[0]])){f===!0?f=o[h]:o[h]!==!0&&(u=s[0],c.unshift(s[1]));break}if(f!==!0)if(f&&n.throws)t=f(t);else try{t=f(t)}catch(l){return{state:"parsererror",error:f?l:"No conversion from "+e+" to "+u}}}return{state:"success",data:t}}function di(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||wo.test(n)?u(n,i):di(n+"["+("object"==typeof i?t:"")+"]",i,r,u)});else if(r||"object"!==i.type(t))u(n,t);else for(f in t)di(n+"["+f+"]",t[f],r,u)}function wf(){try{return new n.XMLHttpRequest}catch(t){}}function ns(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function bf(n){return i.isWindow(n)?n:9===n.nodeType?n.defaultView||n.parentWindow:!1}var c=[],l=c.slice,ir=c.concat,ti=c.push,rr=c.indexOf,ct={},gf=ct.toString,tt=ct.hasOwnProperty,ii="".trim,r={},ur="1.11.0",i=function(n,t){return new i.fn.init(n,t)},ne=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,te=/^-ms-/,ie=/-([\da-z])/gi,re=function(n,t){return t.toUpperCase()},p,or,sr,h,fi,lt,o,lr,ar,vr,ot,ai,ff,of,sf,dt,gi,ni,nr,tr,kf,df;i.fn=i.prototype={jquery:ur,constructor:i,selector:"",length:0,toArray:function(){return l.call(this)},get:function(n){return null!=n?0>n?this[n+this.length]:this[n]:l.call(this)},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t.context=this.context,t},each:function(n,t){return i.each(this,n,t)},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(0>n?i:0);return this.pushStack(t>=0&&i>t?[this[t]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:ti,sort:c.sort,splice:c.splice};i.extend=i.fn.extend=function(){var r,e,t,f,o,s,n=arguments[0]||{},u=1,c=arguments.length,h=!1;for("boolean"==typeof n&&(h=n,n=arguments[u]||{},u++),"object"==typeof n||i.isFunction(n)||(n={}),u===c&&(n=this,u--);c>u;u++)if(null!=(o=arguments[u]))for(f in o)r=n[f],t=o[f],n!==t&&(h&&t&&(i.isPlainObject(t)||(e=i.isArray(t)))?(e?(e=!1,s=r&&i.isArray(r)?r:[]):s=r&&i.isPlainObject(r)?r:{},n[f]=i.extend(h,s,t)):void 0!==t&&(n[f]=t));return n};i.extend({expando:"jQuery"+(ur+Math.random()).replace(/\D/g,""),isReady:!0,error:function(n){throw new Error(n);},noop:function(){},isFunction:function(n){return"function"===i.type(n)},isArray:Array.isArray||function(n){return"array"===i.type(n)},isWindow:function(n){return null!=n&&n==n.window},isNumeric:function(n){return n-parseFloat(n)>=0},isEmptyObject:function(n){for(var t in n)return!1;return!0},isPlainObject:function(n){var t;if(!n||"object"!==i.type(n)||n.nodeType||i.isWindow(n))return!1;try{if(n.constructor&&!tt.call(n,"constructor")&&!tt.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(u){return!1}if(r.ownLast)for(t in n)return tt.call(n,t);for(t in n);return void 0===t||tt.call(n,t)},type:function(n){return null==n?n+"":"object"==typeof n||"function"==typeof n?ct[gf.call(n)]||"object":typeof n},globalEval:function(t){t&&i.trim(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(n){return n.replace(te,"ms-").replace(ie,re)},nodeName:function(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()},each:function(n,t,i){var u,r=0,f=n.length,e=ri(n);if(i){if(e){for(;f>r;r++)if(u=t.apply(n[r],i),u===!1)break}else for(r in n)if(u=t.apply(n[r],i),u===!1)break}else if(e){for(;f>r;r++)if(u=t.call(n[r],r,n[r]),u===!1)break}else for(r in n)if(u=t.call(n[r],r,n[r]),u===!1)break;return n},trim:ii&&!ii.call("﻿ ")?function(n){return null==n?"":ii.call(n)}:function(n){return null==n?"":(n+"").replace(ne,"")},makeArray:function(n,t){var r=t||[];return null!=n&&(ri(Object(n))?i.merge(r,"string"==typeof n?[n]:n):ti.call(r,n)),r},inArray:function(n,t,i){var r;if(t){if(rr)return rr.call(t,n,i);for(r=t.length,i=i?0>i?Math.max(0,r+i):i:0;r>i;i++)if(i in t&&t[i]===n)return i}return-1},merge:function(n,t){for(var r=+t.length,i=0,u=n.length;r>i;)n[u++]=t[i++];if(r!==r)while(void 0!==t[i])n[u++]=t[i++];return n.length=u,n},grep:function(n,t,i){for(var u,f=[],r=0,e=n.length,o=!i;e>r;r++)u=!t(n[r],r),u!==o&&f.push(n[r]);return f},map:function(n,t,i){var u,r=0,e=n.length,o=ri(n),f=[];if(o)for(;e>r;r++)u=t(n[r],r,i),null!=u&&f.push(u);else for(r in n)u=t(n[r],r,i),null!=u&&f.push(u);return ir.apply([],f)},guid:1,proxy:function(n,t){var u,r,f;return"string"==typeof t&&(f=n[t],t=n,n=f),i.isFunction(n)?(u=l.call(arguments,2),r=function(){return n.apply(t||this,u.concat(l.call(arguments)))},r.guid=n.guid=n.guid||i.guid++,r):void 0},now:function(){return+new Date},support:r});i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(n,t){ct["[object "+t+"]"]=t.toLowerCase()});p=function(n){function u(n,t,i,u){var w,h,c,v,k,y,d,a,nt,g;if((t?t.ownerDocument||t:s)!==e&&p(t),t=t||e,i=i||[],!n||"string"!=typeof n)return i;if(1!==(v=t.nodeType)&&9!==v)return[];if(l&&!u){if(w=or.exec(n))if(c=w[1]){if(9===v){if(h=t.getElementById(c),!h||!h.parentNode)return i;if(h.id===c)return i.push(h),i}else if(t.ownerDocument&&(h=t.ownerDocument.getElementById(c))&&et(t,h)&&h.id===c)return i.push(h),i}else{if(w[2])return b.apply(i,t.getElementsByTagName(n)),i;if((c=w[3])&&r.getElementsByClassName&&t.getElementsByClassName)return b.apply(i,t.getElementsByClassName(c)),i}if(r.qsa&&(!o||!o.test(n))){if(a=d=f,nt=t,g=9===v&&n,1===v&&"object"!==t.nodeName.toLowerCase()){for(y=vt(n),(d=t.getAttribute("id"))?a=d.replace(sr,"\\$&"):t.setAttribute("id",a),a="[id='"+a+"'] ",k=y.length;k--;)y[k]=a+yt(y[k]);nt=gt.test(n)&&ii(t.parentNode)||t;g=y.join(",")}if(g)try{return b.apply(i,nt.querySelectorAll(g)),i}catch(tt){}finally{d||t.removeAttribute("id")}}}return vr(n.replace(lt,"$1"),t,i,u)}function ni(){function n(r,u){return i.push(r+" ")>t.cacheLength&&delete n[i.shift()],n[r+" "]=u}var i=[];return n}function h(n){return n[f]=!0,n}function c(n){var t=e.createElement("div");try{return!!n(t)}catch(i){return!1}finally{t.parentNode&&t.parentNode.removeChild(t);t=null}}function ti(n,i){for(var u=n.split("|"),r=n.length;r--;)t.attrHandle[u[r]]=i}function pi(n,t){var i=t&&n,r=i&&1===n.nodeType&&1===t.nodeType&&(~t.sourceIndex||li)-(~n.sourceIndex||li);if(r)return r;if(i)while(i=i.nextSibling)if(i===t)return-1;return n?1:-1}function hr(n){return function(t){var i=t.nodeName.toLowerCase();return"input"===i&&t.type===n}}function cr(n){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===n}}function tt(n){return h(function(t){return t=+t,h(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ii(n){return n&&typeof n.getElementsByTagName!==ut&&n}function wi(){}function vt(n,i){var e,f,s,o,r,h,c,l=hi[n+" "];if(l)return i?0:l.slice(0);for(r=n,h=[],c=t.preFilter;r;){(!e||(f=nr.exec(r)))&&(f&&(r=r.slice(f[0].length)||r),h.push(s=[]));e=!1;(f=tr.exec(r))&&(e=f.shift(),s.push({value:e,type:f[0].replace(lt," ")}),r=r.slice(e.length));for(o in t.filter)(f=at[o].exec(r))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),r=r.slice(e.length));if(!e)break}return i?r.length:r?u.error(n):hi(n,h).slice(0)}function yt(n){for(var t=0,r=n.length,i="";r>t;t++)i+=n[t].value;return i}function ri(n,t,i){var r=t.dir,u=i&&"parentNode"===r,e=bi++;return t.first?function(t,i,f){while(t=t[r])if(1===t.nodeType||u)return n(t,i,f)}:function(t,i,o){var s,h,c=[a,e];if(o){while(t=t[r])if((1===t.nodeType||u)&&n(t,i,o))return!0}else while(t=t[r])if(1===t.nodeType||u){if(h=t[f]||(t[f]={}),(s=h[r])&&s[0]===a&&s[1]===e)return c[2]=s[2];if(h[r]=c,c[2]=n(t,i,o))return!0}}}function ui(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function pt(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=null!=t;s>f;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function fi(n,t,i,r,u,e){return r&&!r[f]&&(r=fi(r)),u&&!u[f]&&(u=fi(u,e)),h(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,k=f||ar(t||"*",o.nodeType?[o]:o,[]),v=!n||!f&&t?k:pt(k,p,n,o,s),h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=pt(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?nt.call(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=pt(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):b.apply(e,h)})}function ei(n){for(var s,u,r,o=n.length,h=t.relative[n[0].type],c=h||t.relative[" "],i=h?1:0,l=ri(function(n){return n===s},c,!0),a=ri(function(n){return nt.call(s,n)>-1},c,!0),e=[function(n,t,i){return!h&&(i||t!==ht)||((s=t).nodeType?l(n,t,i):a(n,t,i))}];o>i;i++)if(u=t.relative[n[i].type])e=[ri(ui(e),u)];else{if(u=t.filter[n[i].type].apply(null,n[i].matches),u[f]){for(r=++i;o>r;r++)if(t.relative[n[r].type])break;return fi(i>1&&ui(e),i>1&&yt(n.slice(0,i-1).concat({value:" "===n[i-2].type?"*":""})).replace(lt,"$1"),u,r>i&&ei(n.slice(i,r)),o>r&&ei(n=n.slice(r)),o>r&&yt(n))}e.push(u)}return ui(e)}function lr(n,i){var r=i.length>0,f=n.length>0,o=function(o,s,h,c,l){var y,d,w,k=0,v="0",g=o&&[],p=[],nt=ht,tt=o||f&&t.find.TAG("*",l),it=a+=null==nt?1:Math.random()||.1,rt=tt.length;for(l&&(ht=s!==e&&s);v!==rt&&null!=(y=tt[v]);v++){if(f&&y){for(d=0;w=n[d++];)if(w(y,s,h)){c.push(y);break}l&&(a=it)}r&&((y=!w&&y)&&k--,o&&g.push(y))}if(k+=v,r&&v!==k){for(d=0;w=i[d++];)w(g,p,s,h);if(o){if(k>0)while(v--)g[v]||p[v]||(p[v]=di.call(c));p=pt(p)}b.apply(c,p);l&&!o&&p.length>0&&k+i.length>1&&u.uniqueSort(c)}return l&&(a=it,ht=nt),g};return r?h(o):o}function ar(n,t,i){for(var r=0,f=t.length;f>r;r++)u(n,t[r],i);return i}function vr(n,i,u,f){var s,e,o,c,a,h=vt(n);if(!f&&1===h.length){if(e=h[0]=h[0].slice(0),e.length>2&&"ID"===(o=e[0]).type&&r.getById&&9===i.nodeType&&l&&t.relative[e[1].type]){if(i=(t.find.ID(o.matches[0].replace(k,d),i)||[])[0],!i)return u;n=n.slice(e.shift().value.length)}for(s=at.needsContext.test(n)?0:e.length;s--;){if(o=e[s],t.relative[c=o.type])break;if((a=t.find[c])&&(f=a(o.matches[0].replace(k,d),gt.test(e[0].type)&&ii(i.parentNode)||i))){if(e.splice(s,1),n=f.length&&yt(e),!n)return b.apply(u,f),u;break}}}return wt(n,h)(f,i,!l,u,gt.test(n)&&ii(i.parentNode)||i),u}var it,r,t,st,oi,wt,ht,y,rt,p,e,v,l,o,g,ct,et,f="sizzle"+-new Date,s=n.document,a=0,bi=0,si=ni(),hi=ni(),ci=ni(),bt=function(n,t){return n===t&&(rt=!0),0},ut="undefined",li=-2147483648,ki={}.hasOwnProperty,w=[],di=w.pop,gi=w.push,b=w.push,ai=w.slice,nt=w.indexOf||function(n){for(var t=0,i=this.length;i>t;t++)if(this[t]===n)return t;return-1},kt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",i="[\\x20\\t\\r\\n\\f]",ft="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",vi=ft.replace("w","w#"),yi="\\["+i+"*("+ft+")"+i+"*(?:([*^$|!~]?=)"+i+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+vi+")|)|)"+i+"*\\]",dt=":("+ft+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+yi.replace(3,8)+")*)|.*)\\)|)",lt=new RegExp("^"+i+"+|((?:^|[^\\\\])(?:\\\\.)*)"+i+"+$","g"),nr=new RegExp("^"+i+"*,"+i+"*"),tr=new RegExp("^"+i+"*([>+~]|"+i+")"+i+"*"),ir=new RegExp("="+i+"*([^\\]'\"]*?)"+i+"*\\]","g"),rr=new RegExp(dt),ur=new RegExp("^"+vi+"$"),at={ID:new RegExp("^#("+ft+")"),CLASS:new RegExp("^\\.("+ft+")"),TAG:new RegExp("^("+ft.replace("w","w*")+")"),ATTR:new RegExp("^"+yi),PSEUDO:new RegExp("^"+dt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+i+"*(even|odd|(([+-]|)(\\d*)n|)"+i+"*(?:([+-]|)"+i+"*(\\d+)|))"+i+"*\\)|)","i"),bool:new RegExp("^(?:"+kt+")$","i"),needsContext:new RegExp("^"+i+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+i+"*((?:-\\d)?\\d*)"+i+"*\\)|)(?=[^-]|$)","i")},fr=/^(?:input|select|textarea|button)$/i,er=/^h\d$/i,ot=/^[^{]+\{\s*\[native \w/,or=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,gt=/[+~]/,sr=/'|\\/g,k=new RegExp("\\\\([\\da-f]{1,6}"+i+"?|("+i+")|.)","ig"),d=function(n,t,i){var r="0x"+t-65536;return r!==r||i?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{b.apply(w=ai.call(s.childNodes),s.childNodes);w[s.childNodes.length].nodeType}catch(yr){b={apply:w.length?function(n,t){gi.apply(n,ai.call(t))}:function(n,t){for(var i=n.length,r=0;n[i++]=t[r++];);n.length=i-1}}}r=u.support={};oi=u.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?"HTML"!==t.nodeName:!1};p=u.setDocument=function(n){var a,u=n?n.ownerDocument||n:s,h=u.defaultView;return u!==e&&9===u.nodeType&&u.documentElement?(e=u,v=u.documentElement,l=!oi(u),h&&h!==h.top&&(h.addEventListener?h.addEventListener("unload",function(){p()},!1):h.attachEvent&&h.attachEvent("onunload",function(){p()})),r.attributes=c(function(n){return n.className="i",!n.getAttribute("className")}),r.getElementsByTagName=c(function(n){return n.appendChild(u.createComment("")),!n.getElementsByTagName("*").length}),r.getElementsByClassName=ot.test(u.getElementsByClassName)&&c(function(n){return n.innerHTML="<div class='a'><\/div><div class='a i'><\/div>",n.firstChild.className="i",2===n.getElementsByClassName("i").length}),r.getById=c(function(n){return v.appendChild(n).id=f,!u.getElementsByName||!u.getElementsByName(f).length}),r.getById?(t.find.ID=function(n,t){if(typeof t.getElementById!==ut&&l){var i=t.getElementById(n);return i&&i.parentNode?[i]:[]}},t.filter.ID=function(n){var t=n.replace(k,d);return function(n){return n.getAttribute("id")===t}}):(delete t.find.ID,t.filter.ID=function(n){var t=n.replace(k,d);return function(n){var i=typeof n.getAttributeNode!==ut&&n.getAttributeNode("id");return i&&i.value===t}}),t.find.TAG=r.getElementsByTagName?function(n,t){if(typeof t.getElementsByTagName!==ut)return t.getElementsByTagName(n)}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if("*"===n){while(i=u[f++])1===i.nodeType&&r.push(i);return r}return u},t.find.CLASS=r.getElementsByClassName&&function(n,t){if(typeof t.getElementsByClassName!==ut&&l)return t.getElementsByClassName(n)},g=[],o=[],(r.qsa=ot.test(u.querySelectorAll))&&(c(function(n){n.innerHTML="<select t=''><option selected=''><\/option><\/select>";n.querySelectorAll("[t^='']").length&&o.push("[*^$]="+i+"*(?:''|\"\")");n.querySelectorAll("[selected]").length||o.push("\\["+i+"*(?:value|"+kt+")");n.querySelectorAll(":checked").length||o.push(":checked")}),c(function(n){var t=u.createElement("input");t.setAttribute("type","hidden");n.appendChild(t).setAttribute("name","D");n.querySelectorAll("[name=d]").length&&o.push("name"+i+"*[*^$|!~]?=");n.querySelectorAll(":enabled").length||o.push(":enabled",":disabled");n.querySelectorAll("*,:x");o.push(",.*:")})),(r.matchesSelector=ot.test(ct=v.webkitMatchesSelector||v.mozMatchesSelector||v.oMatchesSelector||v.msMatchesSelector))&&c(function(n){r.disconnectedMatch=ct.call(n,"div");ct.call(n,"[s!='']:x");g.push("!=",dt)}),o=o.length&&new RegExp(o.join("|")),g=g.length&&new RegExp(g.join("|")),a=ot.test(v.compareDocumentPosition),et=a||ot.test(v.contains)?function(n,t){var r=9===n.nodeType?n.documentElement:n,i=t&&t.parentNode;return n===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):n.compareDocumentPosition&&16&n.compareDocumentPosition(i)))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},bt=a?function(n,t){if(n===t)return rt=!0,0;var i=!n.compareDocumentPosition-!t.compareDocumentPosition;return i?i:(i=(n.ownerDocument||n)===(t.ownerDocument||t)?n.compareDocumentPosition(t):1,1&i||!r.sortDetached&&t.compareDocumentPosition(n)===i?n===u||n.ownerDocument===s&&et(s,n)?-1:t===u||t.ownerDocument===s&&et(s,t)?1:y?nt.call(y,n)-nt.call(y,t):0:4&i?-1:1)}:function(n,t){if(n===t)return rt=!0,0;var i,r=0,o=n.parentNode,h=t.parentNode,f=[n],e=[t];if(!o||!h)return n===u?-1:t===u?1:o?-1:h?1:y?nt.call(y,n)-nt.call(y,t):0;if(o===h)return pi(n,t);for(i=n;i=i.parentNode;)f.unshift(i);for(i=t;i=i.parentNode;)e.unshift(i);while(f[r]===e[r])r++;return r?pi(f[r],e[r]):f[r]===s?-1:e[r]===s?1:0},u):e};u.matches=function(n,t){return u(n,null,null,t)};u.matchesSelector=function(n,t){if((n.ownerDocument||n)!==e&&p(n),t=t.replace(ir,"='$1']"),!(!r.matchesSelector||!l||g&&g.test(t)||o&&o.test(t)))try{var i=ct.call(n,t);if(i||r.disconnectedMatch||n.document&&11!==n.document.nodeType)return i}catch(f){}return u(t,e,null,[n]).length>0};u.contains=function(n,t){return(n.ownerDocument||n)!==e&&p(n),et(n,t)};u.attr=function(n,i){(n.ownerDocument||n)!==e&&p(n);var f=t.attrHandle[i.toLowerCase()],u=f&&ki.call(t.attrHandle,i.toLowerCase())?f(n,i,!l):void 0;return void 0!==u?u:r.attributes||!l?n.getAttribute(i):(u=n.getAttributeNode(i))&&u.specified?u.value:null};u.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};u.uniqueSort=function(n){var u,f=[],t=0,i=0;if(rt=!r.detectDuplicates,y=!r.sortStable&&n.slice(0),n.sort(bt),rt){while(u=n[i++])u===n[i]&&(t=f.push(i));while(t--)n.splice(f[t],1)}return y=null,n};st=u.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=st(n)}else if(3===t||4===t)return n.nodeValue}else while(r=n[u++])i+=st(r);return i};t=u.selectors={cacheLength:50,createPseudo:h,match:at,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(k,d),n[3]=(n[4]||n[5]||"").replace(k,d),"~="===n[2]&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),"nth"===n[1].slice(0,3)?(n[3]||u.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*("even"===n[3]||"odd"===n[3])),n[5]=+(n[7]+n[8]||"odd"===n[3])):n[3]&&u.error(n[0]),n},PSEUDO:function(n){var i,t=!n[5]&&n[2];return at.CHILD.test(n[0])?null:(n[3]&&void 0!==n[4]?n[2]=n[4]:t&&rr.test(t)&&(i=vt(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){var t=n.replace(k,d).toLowerCase();return"*"===n?function(){return!0}:function(n){return n.nodeName&&n.nodeName.toLowerCase()===t}},CLASS:function(n){var t=si[n+" "];return t||(t=new RegExp("(^|"+i+")"+n+"("+i+"|$)"))&&si(n,function(n){return t.test("string"==typeof n.className&&n.className||typeof n.getAttribute!==ut&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(r){var f=u.attr(r,n);return null==f?"!="===t:t?(f+="","="===t?f===i:"!="===t?f!==i:"^="===t?i&&0===f.indexOf(i):"*="===t?i&&f.indexOf(i)>-1:"$="===t?i&&f.slice(-i.length)===i:"~="===t?(" "+f+" ").indexOf(i)>-1:"|="===t?f===i||f.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r,u){var s="nth"!==n.slice(0,3),o="last"!==n.slice(-4),e="of-type"===t;return 1===r&&0===u?function(n){return!!n.parentNode}:function(t,i,h){var v,k,c,l,y,w,b=s!==o?"nextSibling":"previousSibling",p=t.parentNode,g=e&&t.nodeName.toLowerCase(),d=!h&&!e;if(p){if(s){while(b){for(c=t;c=c[b];)if(e?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;w=b="only"===n&&!w&&"nextSibling"}return!0}if(w=[o?p.firstChild:p.lastChild],o&&d){for(k=p[f]||(p[f]={}),v=k[n]||[],y=v[0]===a&&v[1],l=v[0]===a&&v[2],c=y&&p.childNodes[y];c=++y&&c&&c[b]||(l=y=0)||w.pop();)if(1===c.nodeType&&++l&&c===t){k[n]=[a,y,l];break}}else if(d&&(v=(t[f]||(t[f]={}))[n])&&v[0]===a)l=v[1];else while(c=++y&&c&&c[b]||(l=y=0)||w.pop())if((e?c.nodeName.toLowerCase()===g:1===c.nodeType)&&++l&&(d&&((c[f]||(c[f]={}))[n]=[a,l]),c===t))break;return l-=u,l===r||l%r==0&&l/r>=0}}},PSEUDO:function(n,i){var e,r=t.pseudos[n]||t.setFilters[n.toLowerCase()]||u.error("unsupported pseudo: "+n);return r[f]?r(i):r.length>1?(e=[n,n,"",i],t.setFilters.hasOwnProperty(n.toLowerCase())?h(function(n,t){for(var u,f=r(n,i),e=f.length;e--;)u=nt.call(n,f[e]),n[u]=!(t[u]=f[e])}):function(n){return r(n,0,e)}):r}},pseudos:{not:h(function(n){var i=[],r=[],t=wt(n.replace(lt,"$1"));return t[f]?h(function(n,i,r,u){for(var e,o=t(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(i[f]=e))}):function(n,u,f){return i[0]=n,t(i,null,f,r),!r.pop()}}),has:h(function(n){return function(t){return u(n,t).length>0}}),contains:h(function(n){return function(t){return(t.textContent||t.innerText||st(t)).indexOf(n)>-1}}),lang:h(function(n){return ur.test(n||"")||u.error("unsupported lang: "+n),n=n.replace(k,d).toLowerCase(),function(t){var i;do if(i=l?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===n||0===i.indexOf(n+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===v},focus:function(n){return n===e.activeElement&&(!e.hasFocus||e.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:function(n){return n.disabled===!1},disabled:function(n){return n.disabled===!0},checked:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&!!n.checked||"option"===t&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeType<6)return!1;return!0},parent:function(n){return!t.pseudos.empty(n)},header:function(n){return er.test(n.nodeName)},input:function(n){return fr.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&"button"===n.type||"button"===t},text:function(n){var t;return"input"===n.nodeName.toLowerCase()&&"text"===n.type&&(null==(t=n.getAttribute("type"))||"text"===t.toLowerCase())},first:tt(function(){return[0]}),last:tt(function(n,t){return[t-1]}),eq:tt(function(n,t,i){return[0>i?i+t:i]}),even:tt(function(n,t){for(var i=0;t>i;i+=2)n.push(i);return n}),odd:tt(function(n,t){for(var i=1;t>i;i+=2)n.push(i);return n}),lt:tt(function(n,t,i){for(var r=0>i?i+t:i;--r>=0;)n.push(r);return n}),gt:tt(function(n,t,i){for(var r=0>i?i+t:i;++r<t;)n.push(r);return n})}};t.pseudos.nth=t.pseudos.eq;for(it in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[it]=hr(it);for(it in{submit:!0,reset:!0})t.pseudos[it]=cr(it);return wi.prototype=t.filters=t.pseudos,t.setFilters=new wi,wt=u.compile=function(n,t){var r,u=[],e=[],i=ci[n+" "];if(!i){for(t||(t=vt(n)),r=t.length;r--;)i=ei(t[r]),i[f]?u.push(i):e.push(i);i=ci(n,lr(e,u))}return i},r.sortStable=f.split("").sort(bt).join("")===f,r.detectDuplicates=!!rt,p(),r.sortDetached=c(function(n){return 1&n.compareDocumentPosition(e.createElement("div"))}),c(function(n){return n.innerHTML="<a href='#'><\/a>","#"===n.firstChild.getAttribute("href")})||ti("type|href|height|width",function(n,t,i){if(!i)return n.getAttribute(t,"type"===t.toLowerCase()?1:2)}),r.attributes&&c(function(n){return n.innerHTML="<input/>",n.firstChild.setAttribute("value",""),""===n.firstChild.getAttribute("value")})||ti("value",function(n,t,i){if(!i&&"input"===n.nodeName.toLowerCase())return n.defaultValue}),c(function(n){return null==n.getAttribute("disabled")})||ti(kt,function(n,t,i){var r;if(!i)return n[t]===!0?t.toLowerCase():(r=n.getAttributeNode(t))&&r.specified?r.value:null}),u}(n);i.find=p;i.expr=p.selectors;i.expr[":"]=i.expr.pseudos;i.unique=p.uniqueSort;i.text=p.getText;i.isXMLDoc=p.isXML;i.contains=p.contains;var fr=i.expr.match.needsContext,er=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ue=/^.[^:#\[\.,]*$/;i.filter=function(n,t,r){var u=t[0];return r&&(n=":not("+n+")"),1===t.length&&1===u.nodeType?i.find.matchesSelector(u,n)?[u]:[]:i.find.matches(n,i.grep(t,function(n){return 1===n.nodeType}))};i.fn.extend({find:function(n){var t,r=[],u=this,f=u.length;if("string"!=typeof n)return this.pushStack(i(n).filter(function(){for(t=0;f>t;t++)if(i.contains(u[t],this))return!0}));for(t=0;f>t;t++)i.find(n,u[t],r);return r=this.pushStack(f>1?i.unique(r):r),r.selector=this.selector?this.selector+" "+n:n,r},filter:function(n){return this.pushStack(ui(this,n||[],!1))},not:function(n){return this.pushStack(ui(this,n||[],!0))},is:function(n){return!!ui(this,"string"==typeof n&&fr.test(n)?i(n):n||[],!1).length}});var ft,u=n.document,fe=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ee=i.fn.init=function(n,t){var r,f;if(!n)return this;if("string"==typeof n){if(r="<"===n.charAt(0)&&">"===n.charAt(n.length-1)&&n.length>=3?[null,n,null]:fe.exec(n),!r||!r[1]&&t)return!t||t.jquery?(t||ft).find(n):this.constructor(t).find(n);if(r[1]){if(t=t instanceof i?t[0]:t,i.merge(this,i.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:u,!0)),er.test(r[1])&&i.isPlainObject(t))for(r in t)i.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(f=u.getElementById(r[2]),f&&f.parentNode){if(f.id!==r[2])return ft.find(n);this.length=1;this[0]=f}return this.context=u,this.selector=n,this}return n.nodeType?(this.context=this[0]=n,this.length=1,this):i.isFunction(n)?"undefined"!=typeof ft.ready?ft.ready(n):n(i):(void 0!==n.selector&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))};ee.prototype=i.fn;ft=i(u);or=/^(?:parents|prev(?:Until|All))/;sr={children:!0,contents:!0,next:!0,prev:!0};i.extend({dir:function(n,t,r){for(var f=[],u=n[t];u&&9!==u.nodeType&&(void 0===r||1!==u.nodeType||!i(u).is(r));)1===u.nodeType&&f.push(u),u=u[t];return f},sibling:function(n,t){for(var i=[];n;n=n.nextSibling)1===n.nodeType&&n!==t&&i.push(n);return i}});i.fn.extend({has:function(n){var t,r=i(n,this),u=r.length;return this.filter(function(){for(t=0;u>t;t++)if(i.contains(this,r[t]))return!0})},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=fr.test(n)||"string"!=typeof n?i(n,t||this.context):0;o>f;f++)for(r=this[f];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(e?e.index(r)>-1:1===r.nodeType&&i.find.matchesSelector(r,n))){u.push(r);break}return this.pushStack(u.length>1?i.unique(u):u)},index:function(n){return n?"string"==typeof n?i.inArray(this[0],i(n)):i.inArray(n.jquery?n[0]:n,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){return this.pushStack(i.unique(i.merge(this.get(),i(n,t))))},addBack:function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))}});i.each({parent:function(n){var t=n.parentNode;return t&&11!==t.nodeType?t:null},parents:function(n){return i.dir(n,"parentNode")},parentsUntil:function(n,t,r){return i.dir(n,"parentNode",r)},next:function(n){return hr(n,"nextSibling")},prev:function(n){return hr(n,"previousSibling")},nextAll:function(n){return i.dir(n,"nextSibling")},prevAll:function(n){return i.dir(n,"previousSibling")},nextUntil:function(n,t,r){return i.dir(n,"nextSibling",r)},prevUntil:function(n,t,r){return i.dir(n,"previousSibling",r)},siblings:function(n){return i.sibling((n.parentNode||{}).firstChild,n)},children:function(n){return i.sibling(n.firstChild)},contents:function(n){return i.nodeName(n,"iframe")?n.contentDocument||n.contentWindow.document:i.merge([],n.childNodes)}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return"Until"!==n.slice(-5)&&(u=r),u&&"string"==typeof u&&(f=i.filter(u,f)),this.length>1&&(sr[n]||(f=i.unique(f)),or.test(n)&&(f=f.reverse())),this.pushStack(f)}});h=/\S+/g;fi={};i.Callbacks=function(n){n="string"==typeof n?fi[n]||oe(n):i.extend({},n);var o,u,h,f,e,c,t=[],r=!n.once&&[],l=function(i){for(u=n.memory&&i,h=!0,e=c||0,c=0,f=t.length,o=!0;t&&f>e;e++)if(t[e].apply(i[0],i[1])===!1&&n.stopOnFalse){u=!1;break}o=!1;t&&(r?r.length&&l(r.shift()):u?t=[]:s.disable())},s={add:function(){if(t){var r=t.length;!function e(r){i.each(r,function(r,u){var f=i.type(u);"function"===f?n.unique&&s.has(u)||t.push(u):u&&u.length&&"string"!==f&&e(u)})}(arguments);o?f=t.length:u&&(c=r,l(u))}return this},remove:function(){return t&&i.each(arguments,function(n,r){for(var u;(u=i.inArray(r,t,u))>-1;)t.splice(u,1),o&&(f>=u&&f--,e>=u&&e--)}),this},has:function(n){return n?i.inArray(n,t)>-1:!(!t||!t.length)},empty:function(){return t=[],f=0,this},disable:function(){return t=r=u=void 0,this},disabled:function(){return!t},lock:function(){return r=void 0,u||s.disable(),this},locked:function(){return!r},fireWith:function(n,i){return!t||h&&!r||(i=i||[],i=[n,i.slice?i.slice():i],o?r.push(i):l(i)),this},fire:function(){return s.fireWith(this,arguments),this},fired:function(){return!!h}};return s};i.extend({Deferred:function(n){var u=[["resolve","done",i.Callbacks("once memory"),"resolved"],["reject","fail",i.Callbacks("once memory"),"rejected"],["notify","progress",i.Callbacks("memory")]],f="pending",r={state:function(){return f},always:function(){return t.done(arguments).fail(arguments),this},then:function(){var n=arguments;return i.Deferred(function(f){i.each(u,function(u,e){var o=i.isFunction(n[u])&&n[u];t[e[1]](function(){var n=o&&o.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().done(f.resolve).fail(f.reject).progress(f.notify):f[e[0]+"With"](this===r?f.promise():this,o?[n]:arguments)})});n=null}).promise()},promise:function(n){return null!=n?i.extend(n,r):r}},t={};return r.pipe=r.then,i.each(u,function(n,i){var e=i[2],o=i[3];r[i[1]]=e.add;o&&e.add(function(){f=o},u[1^n][2].disable,u[2][2].lock);t[i[0]]=function(){return t[i[0]+"With"](this===t?r:this,arguments),this};t[i[0]+"With"]=e.fireWith}),r.promise(t),n&&n.call(t,t),t},when:function(n){var t=0,u=l.call(arguments),r=u.length,e=1!==r||n&&i.isFunction(n.promise)?r:0,f=1===e?n:i.Deferred(),h=function(n,t,i){return function(r){t[n]=this;i[n]=arguments.length>1?l.call(arguments):r;i===o?f.notifyWith(t,i):--e||f.resolveWith(t,i)}},o,c,s;if(r>1)for(o=new Array(r),c=new Array(r),s=new Array(r);r>t;t++)u[t]&&i.isFunction(u[t].promise)?u[t].promise().done(h(t,s,u)).fail(f.reject).progress(h(t,c,o)):--e;return e||f.resolveWith(s,u),f.promise()}});i.fn.ready=function(n){return i.ready.promise().done(n),this};i.extend({isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){if(n===!0?!--i.readyWait:!i.isReady){if(!u.body)return setTimeout(i.ready);i.isReady=!0;n!==!0&&--i.readyWait>0||(lt.resolveWith(u,[i]),i.fn.trigger&&i(u).trigger("ready").off("ready"))}}});i.ready.promise=function(t){if(!lt)if(lt=i.Deferred(),"complete"===u.readyState)setTimeout(i.ready);else if(u.addEventListener)u.addEventListener("DOMContentLoaded",a,!1),n.addEventListener("load",a,!1);else{u.attachEvent("onreadystatechange",a);n.attachEvent("onload",a);var r=!1;try{r=null==n.frameElement&&u.documentElement}catch(e){}r&&r.doScroll&&!function f(){if(!i.isReady){try{r.doScroll("left")}catch(n){return setTimeout(f,50)}cr();i.ready()}}()}return lt.promise(t)};o="undefined";for(lr in i(r))break;r.ownLast="0"!==lr;r.inlineBlockNeedsLayout=!1;i(function(){var t,n,i=u.getElementsByTagName("body")[0];i&&(t=u.createElement("div"),t.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",n=u.createElement("div"),i.appendChild(t).appendChild(n),typeof n.style.zoom!==o&&(n.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(r.inlineBlockNeedsLayout=3===n.offsetWidth)&&(i.style.zoom=1)),i.removeChild(t),t=n=null)}),function(){var n=u.createElement("div");if(null==r.deleteExpando){r.deleteExpando=!0;try{delete n.test}catch(t){r.deleteExpando=!1}}n=null}();i.acceptData=function(n){var t=i.noData[(n.nodeName+" ").toLowerCase()],r=+n.nodeType||1;return 1!==r&&9!==r?!1:!t||t!==!0&&n.getAttribute("classid")===t};ar=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/;vr=/([A-Z])/g;i.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(n){return n=n.nodeType?i.cache[n[i.expando]]:n[i.expando],!!n&&!ei(n)},data:function(n,t,i){return pr(n,t,i)},removeData:function(n,t){return wr(n,t)},_data:function(n,t,i){return pr(n,t,i,!0)},_removeData:function(n,t){return wr(n,t,!0)}});i.fn.extend({data:function(n,t){var f,u,e,r=this[0],o=r&&r.attributes;if(void 0===n){if(this.length&&(e=i.data(r),1===r.nodeType&&!i._data(r,"parsedAttrs"))){for(f=o.length;f--;)u=o[f].name,0===u.indexOf("data-")&&(u=i.camelCase(u.slice(5)),yr(r,u,e[u]));i._data(r,"parsedAttrs",!0)}return e}return"object"==typeof n?this.each(function(){i.data(this,n)}):arguments.length>1?this.each(function(){i.data(this,n,t)}):r?yr(r,n,i.data(r,n)):void 0},removeData:function(n){return this.each(function(){i.removeData(this,n)})}});i.extend({queue:function(n,t,r){var u;if(n)return(t=(t||"fx")+"queue",u=i._data(n,t),r&&(!u||i.isArray(r)?u=i._data(n,t,i.makeArray(r)):u.push(r)),u||[])},dequeue:function(n,t){t=t||"fx";var r=i.queue(n,t),e=r.length,u=r.shift(),f=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};"inprogress"===u&&(u=r.shift(),e--);u&&("fx"===t&&r.unshift("inprogress"),delete f.stop,u.call(n,o,f));!e&&f&&f.empty.fire()},_queueHooks:function(n,t){var r=t+"queueHooks";return i._data(n,r)||i._data(n,r,{empty:i.Callbacks("once memory").add(function(){i._removeData(n,t+"queue");i._removeData(n,r)})})}});i.fn.extend({queue:function(n,t){var r=2;return"string"!=typeof n&&(t=n,n="fx",r--),arguments.length<r?i.queue(this[0],n):void 0===t?this:this.each(function(){var r=i.queue(this,n,t);i._queueHooks(this,n);"fx"===n&&"inprogress"!==r[0]&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,t){var r,f=1,e=i.Deferred(),u=this,o=this.length,s=function(){--f||e.resolveWith(u,[u])};for("string"!=typeof n&&(t=n,n=void 0),n=n||"fx";o--;)r=i._data(u[o],n+"queueHooks"),r&&r.empty&&(f++,r.empty.add(s));return s(),e.promise(t)}});var at=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=["Top","Right","Bottom","Left"],et=function(n,t){return n=t||n,"none"===i.css(n,"display")||!i.contains(n.ownerDocument,n)},b=i.access=function(n,t,r,u,f,e,o){var s=0,c=n.length,h=null==r;if("object"===i.type(r)){f=!0;for(s in r)i.access(n,t,s,r[s],!0,e,o)}else if(void 0!==u&&(f=!0,i.isFunction(u)||(o=!0),h&&(o?(t.call(n,u),t=null):(h=t,t=function(n,t,r){return h.call(i(n),r)})),t))for(;c>s;s++)t(n[s],r,o?u:u.call(n[s],s,t(n[s],r)));return f?n:h?t.call(n):c?t(n[0],r):e},oi=/^(?:checkbox|radio)$/i;!function(){var i=u.createDocumentFragment(),n=u.createElement("div"),t=u.createElement("input");if(n.setAttribute("className","t"),n.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a>",r.leadingWhitespace=3===n.firstChild.nodeType,r.tbody=!n.getElementsByTagName("tbody").length,r.htmlSerialize=!!n.getElementsByTagName("link").length,r.html5Clone="<:nav><\/:nav>"!==u.createElement("nav").cloneNode(!0).outerHTML,t.type="checkbox",t.checked=!0,i.appendChild(t),r.appendChecked=t.checked,n.innerHTML="<textarea>x<\/textarea>",r.noCloneChecked=!!n.cloneNode(!0).lastChild.defaultValue,i.appendChild(n),n.innerHTML="<input type='radio' checked='checked' name='t'/>",r.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked,r.noCloneEvent=!0,n.attachEvent&&(n.attachEvent("onclick",function(){r.noCloneEvent=!1}),n.cloneNode(!0).click()),null==r.deleteExpando){r.deleteExpando=!0;try{delete n.test}catch(f){r.deleteExpando=!1}}i=n=t=null}(),function(){var t,i,f=u.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})i="on"+t,(r[t+"Bubbles"]=i in n)||(f.setAttribute(i,"t"),r[t+"Bubbles"]=f.attributes[i].expando===!1);f=null}();var si=/^(?:input|select|textarea)$/i,se=/^key/,he=/^(?:mouse|contextmenu)|click/,br=/^(?:focusinfocus|focusoutblur)$/,kr=/^([^.]*)(?:\.(.+)|)$/;i.event={global:{},add:function(n,t,r,u,f){var w,y,b,p,s,c,l,a,e,k,d,v=i._data(n);if(v){for(r.handler&&(p=r,r=p.handler,f=p.selector),r.guid||(r.guid=i.guid++),(y=v.events)||(y=v.events={}),(c=v.handle)||(c=v.handle=function(n){if(typeof i!==o&&(!n||i.event.triggered!==n.type))return i.event.dispatch.apply(c.elem,arguments)},c.elem=n),t=(t||"").match(h)||[""],b=t.length;b--;)w=kr.exec(t[b])||[],e=d=w[1],k=(w[2]||"").split(".").sort(),e&&(s=i.event.special[e]||{},e=(f?s.delegateType:s.bindType)||e,s=i.event.special[e]||{},l=i.extend({type:e,origType:d,data:u,handler:r,guid:r.guid,selector:f,needsContext:f&&i.expr.match.needsContext.test(f),namespace:k.join(".")},p),(a=y[e])||(a=y[e]=[],a.delegateCount=0,s.setup&&s.setup.call(n,u,k,c)!==!1||(n.addEventListener?n.addEventListener(e,c,!1):n.attachEvent&&n.attachEvent("on"+e,c))),s.add&&(s.add.call(n,l),l.handler.guid||(l.handler.guid=r.guid)),f?a.splice(a.delegateCount++,0,l):a.push(l),i.event.global[e]=!0);n=null}},remove:function(n,t,r,u,f){var y,o,s,b,p,a,c,l,e,w,k,v=i.hasData(n)&&i._data(n);if(v&&(a=v.events)){for(t=(t||"").match(h)||[""],p=t.length;p--;)if(s=kr.exec(t[p])||[],e=k=s[1],w=(s[2]||"").split(".").sort(),e){for(c=i.event.special[e]||{},e=(u?c.delegateType:c.bindType)||e,l=a[e]||[],s=s[2]&&new RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"),b=y=l.length;y--;)o=l[y],!f&&k!==o.origType||r&&r.guid!==o.guid||s&&!s.test(o.namespace)||u&&u!==o.selector&&("**"!==u||!o.selector)||(l.splice(y,1),o.selector&&l.delegateCount--,c.remove&&c.remove.call(n,o));b&&!l.length&&(c.teardown&&c.teardown.call(n,w,v.handle)!==!1||i.removeEvent(n,e,v.handle),delete a[e])}else for(e in a)i.event.remove(n,e+t[p],r,u,!0);i.isEmptyObject(a)&&(delete v.handle,i._removeData(n,"events"))}},trigger:function(t,r,f,e){var l,a,o,p,c,h,w,y=[f||u],s=tt.call(t,"type")?t.type:t,v=tt.call(t,"namespace")?t.namespace.split("."):[];if(o=h=f=f||u,3!==f.nodeType&&8!==f.nodeType&&!br.test(s+i.event.triggered)&&(s.indexOf(".")>=0&&(v=s.split("."),s=v.shift(),v.sort()),a=s.indexOf(":")<0&&"on"+s,t=t[i.expando]?t:new i.Event(s,"object"==typeof t&&t),t.isTrigger=e?2:3,t.namespace=v.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=f),r=null==r?[t]:i.makeArray(r,[t]),c=i.event.special[s]||{},e||!c.trigger||c.trigger.apply(f,r)!==!1)){if(!e&&!c.noBubble&&!i.isWindow(f)){for(p=c.delegateType||s,br.test(p+s)||(o=o.parentNode);o;o=o.parentNode)y.push(o),h=o;h===(f.ownerDocument||u)&&y.push(h.defaultView||h.parentWindow||n)}for(w=0;(o=y[w++])&&!t.isPropagationStopped();)t.type=w>1?p:c.bindType||s,l=(i._data(o,"events")||{})[t.type]&&i._data(o,"handle"),l&&l.apply(o,r),l=a&&o[a],l&&l.apply&&i.acceptData(o)&&(t.result=l.apply(o,r),t.result===!1&&t.preventDefault());if(t.type=s,!e&&!t.isDefaultPrevented()&&(!c._default||c._default.apply(y.pop(),r)===!1)&&i.acceptData(f)&&a&&f[s]&&!i.isWindow(f)){h=f[a];h&&(f[a]=null);i.event.triggered=s;try{f[s]()}catch(b){}i.event.triggered=void 0;h&&(f[a]=h)}return t.result}},dispatch:function(n){n=i.event.fix(n);var e,f,t,r,o,s=[],h=l.call(arguments),c=(i._data(this,"events")||{})[n.type]||[],u=i.event.special[n.type]||{};if(h[0]=n,n.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,n)!==!1){for(s=i.event.handlers.call(this,n,c),e=0;(r=s[e++])&&!n.isPropagationStopped();)for(n.currentTarget=r.elem,o=0;(t=r.handlers[o++])&&!n.isImmediatePropagationStopped();)(!n.namespace_re||n.namespace_re.test(t.namespace))&&(n.handleObj=t,n.data=t.data,f=((i.event.special[t.origType]||{}).handle||t.handler).apply(r.elem,h),void 0!==f&&(n.result=f)===!1&&(n.preventDefault(),n.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,n),n.result}},handlers:function(n,t){var f,e,u,o,h=[],s=t.delegateCount,r=n.target;if(s&&r.nodeType&&(!n.button||"click"!==n.type))for(;r!=this;r=r.parentNode||this)if(1===r.nodeType&&(r.disabled!==!0||"click"!==n.type)){for(u=[],o=0;s>o;o++)e=t[o],f=e.selector+" ",void 0===u[f]&&(u[f]=e.needsContext?i(f,this).index(r)>=0:i.find(f,this,null,[r]).length),u[f]&&u.push(e);u.length&&h.push({elem:r,handlers:u})}return s<t.length&&h.push({elem:this,handlers:t.slice(s)}),h},fix:function(n){if(n[i.expando])return n;var e,o,s,r=n.type,f=n,t=this.fixHooks[r];for(t||(this.fixHooks[r]=t=he.test(r)?this.mouseHooks:se.test(r)?this.keyHooks:{}),s=t.props?this.props.concat(t.props):this.props,n=new i.Event(f),e=s.length;e--;)o=s[e],n[o]=f[o];return n.target||(n.target=f.srcElement||u),3===n.target.nodeType&&(n.target=n.target.parentNode),n.metaKey=!!n.metaKey,t.filter?t.filter(n,f):n},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(n,t){return null==n.which&&(n.which=null!=t.charCode?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,t){var i,e,r,f=t.button,o=t.fromElement;return null==n.pageX&&null!=t.clientX&&(e=n.target.ownerDocument||u,r=e.documentElement,i=e.body,n.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),n.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),!n.relatedTarget&&o&&(n.relatedTarget=o===n.target?t.toElement:o),n.which||void 0===f||(n.which=1&f?1:2&f?3:4&f?2:0),n}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==dr()&&this.focus)try{return this.focus(),!1}catch(n){}},delegateType:"focusin"},blur:{trigger:function(){if(this===dr()&&this.blur)return(this.blur(),!1)},delegateType:"focusout"},click:{trigger:function(){if(i.nodeName(this,"input")&&"checkbox"===this.type&&this.click)return(this.click(),!1)},_default:function(n){return i.nodeName(n.target,"a")}},beforeunload:{postDispatch:function(n){void 0!==n.result&&(n.originalEvent.returnValue=n.result)}}},simulate:function(n,t,r,u){var f=i.extend(new i.Event,r,{type:n,isSimulated:!0,originalEvent:{}});u?i.event.trigger(f,null,t):i.event.dispatch.call(t,f);f.isDefaultPrevented()&&r.preventDefault()}};i.removeEvent=u.removeEventListener?function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i,!1)}:function(n,t,i){var r="on"+t;n.detachEvent&&(typeof n[r]===o&&(n[r]=null),n.detachEvent(r,i))};i.Event=function(n,t){return this instanceof i.Event?(n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||void 0===n.defaultPrevented&&(n.returnValue===!1||n.getPreventDefault&&n.getPreventDefault())?vt:it):this.type=n,t&&i.extend(this,t),this.timeStamp=n&&n.timeStamp||i.now(),void(this[i.expando]=!0)):new i.Event(n,t)};i.Event.prototype={isDefaultPrevented:it,isPropagationStopped:it,isImmediatePropagationStopped:it,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=vt;n&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=vt;n&&(n.stopPropagation&&n.stopPropagation(),n.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=vt;this.stopPropagation()}};i.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return(!r||r!==f&&!i.contains(f,r))&&(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}});r.submitBubbles||(i.event.special.submit={setup:function(){return i.nodeName(this,"form")?!1:void i.event.add(this,"click._submit keypress._submit",function(n){var r=n.target,t=i.nodeName(r,"input")||i.nodeName(r,"button")?r.form:void 0;t&&!i._data(t,"submitBubbles")&&(i.event.add(t,"submit._submit",function(n){n._submit_bubble=!0}),i._data(t,"submitBubbles",!0))})},postDispatch:function(n){n._submit_bubble&&(delete n._submit_bubble,this.parentNode&&!n.isTrigger&&i.event.simulate("submit",this.parentNode,n,!0))},teardown:function(){return i.nodeName(this,"form")?!1:void i.event.remove(this,"._submit")}});r.changeBubbles||(i.event.special.change={setup:function(){return si.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(i.event.add(this,"propertychange._change",function(n){"checked"===n.originalEvent.propertyName&&(this._just_changed=!0)}),i.event.add(this,"click._change",function(n){this._just_changed&&!n.isTrigger&&(this._just_changed=!1);i.event.simulate("change",this,n,!0)})),!1):void i.event.add(this,"beforeactivate._change",function(n){var t=n.target;si.test(t.nodeName)&&!i._data(t,"changeBubbles")&&(i.event.add(t,"change._change",function(n){!this.parentNode||n.isSimulated||n.isTrigger||i.event.simulate("change",this.parentNode,n,!0)}),i._data(t,"changeBubbles",!0))})},handle:function(n){var t=n.target;if(this!==t||n.isSimulated||n.isTrigger||"radio"!==t.type&&"checkbox"!==t.type)return n.handleObj.handler.apply(this,arguments)},teardown:function(){return i.event.remove(this,"._change"),!si.test(this.nodeName)}});r.focusinBubbles||i.each({focus:"focusin",blur:"focusout"},function(n,t){var r=function(n){i.event.simulate(t,n.target,i.event.fix(n),!0)};i.event.special[t]={setup:function(){var u=this.ownerDocument||this,f=i._data(u,t);f||u.addEventListener(n,r,!0);i._data(u,t,(f||0)+1)},teardown:function(){var u=this.ownerDocument||this,f=i._data(u,t)-1;f?i._data(u,t,f):(u.removeEventListener(n,r,!0),i._removeData(u,t))}}});i.fn.extend({on:function(n,t,r,u,f){var o,e;if("object"==typeof n){"string"!=typeof t&&(r=r||t,t=void 0);for(o in n)this.on(o,t,r,n[o],f);return this}if(null==r&&null==u?(u=t,r=t=void 0):null==u&&("string"==typeof t?(u=r,r=void 0):(u=r,r=t,t=void 0)),u===!1)u=it;else if(!u)return this;return 1===f&&(e=u,u=function(n){return i().off(n),e.apply(this,arguments)},u.guid=e.guid||(e.guid=i.guid++)),this.each(function(){i.event.add(this,n,u,r,t)})},one:function(n,t,i,r){return this.on(n,t,i,r,1)},off:function(n,t,r){var u,f;if(n&&n.preventDefault&&n.handleObj)return u=n.handleObj,i(n.delegateTarget).off(u.namespace?u.origType+"."+u.namespace:u.origType,u.selector,u.handler),this;if("object"==typeof n){for(f in n)this.off(f,t,n[f]);return this}return(t===!1||"function"==typeof t)&&(r=t,t=void 0),r===!1&&(r=it),this.each(function(){i.event.remove(this,n,r,t)})},trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,t){var r=this[0];if(r)return i.event.trigger(n,t,r,!0)}});var nu="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ce=/ jQuery\d+="(?:null|\d+)"/g,tu=new RegExp("<(?:"+nu+")[\\s/>]","i"),hi=/^\s+/,iu=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ru=/<([\w:]+)/,uu=/<tbody/i,le=/<|&#?\w+;/,ae=/<(?:script|style|link)/i,ve=/checked\s*(?:[^=]|=\s*.checked.)/i,fu=/^$|\/(?:java|ecma)script/i,ye=/^true\/(.*)/,pe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,s={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:r.htmlSerialize?[0,"",""]:[1,"X<div>","<\/div>"]},we=gr(u),ci=we.appendChild(u.createElement("div"));s.optgroup=s.option;s.tbody=s.tfoot=s.colgroup=s.caption=s.thead;s.th=s.td;i.extend({clone:function(n,t,u){var e,c,s,o,h,l=i.contains(n.ownerDocument,n);if(r.html5Clone||i.isXMLDoc(n)||!tu.test("<"+n.nodeName+">")?s=n.cloneNode(!0):(ci.innerHTML=n.outerHTML,ci.removeChild(s=ci.firstChild)),!(r.noCloneEvent&&r.noCloneChecked||1!==n.nodeType&&11!==n.nodeType||i.isXMLDoc(n)))for(e=f(s),h=f(n),o=0;null!=(c=h[o]);++o)e[o]&&ke(c,e[o]);if(t)if(u)for(h=h||f(n),e=e||f(s),o=0;null!=(c=h[o]);o++)hu(c,e[o]);else hu(n,s);return e=f(s,"script"),e.length>0&&li(e,!l&&f(n,"script")),e=h=c=null,s},buildFragment:function(n,t,u,e){for(var c,o,b,h,p,w,a,k=n.length,v=gr(t),l=[],y=0;k>y;y++)if(o=n[y],o||0===o)if("object"===i.type(o))i.merge(l,o.nodeType?[o]:o);else if(le.test(o)){for(h=h||v.appendChild(t.createElement("div")),p=(ru.exec(o)||["",""])[1].toLowerCase(),a=s[p]||s._default,h.innerHTML=a[1]+o.replace(iu,"<$1><\/$2>")+a[2],c=a[0];c--;)h=h.lastChild;if(!r.leadingWhitespace&&hi.test(o)&&l.push(t.createTextNode(hi.exec(o)[0])),!r.tbody)for(o="table"!==p||uu.test(o)?"<table>"!==a[1]||uu.test(o)?0:h:h.firstChild,c=o&&o.childNodes.length;c--;)i.nodeName(w=o.childNodes[c],"tbody")&&!w.childNodes.length&&o.removeChild(w);for(i.merge(l,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=v.lastChild}else l.push(t.createTextNode(o));for(h&&v.removeChild(h),r.appendChecked||i.grep(f(l,"input"),be),y=0;o=l[y++];)if((!e||-1===i.inArray(o,e))&&(b=i.contains(o.ownerDocument,o),h=f(v.appendChild(o),"script"),b&&li(h),u))for(c=0;o=h[c++];)fu.test(o.type||"")&&u.push(o);return h=null,v},cleanData:function(n,t){for(var u,e,f,s,a=0,h=i.expando,l=i.cache,v=r.deleteExpando,y=i.event.special;null!=(u=n[a]);a++)if((t||i.acceptData(u))&&(f=u[h],s=f&&l[f])){if(s.events)for(e in s.events)y[e]?i.event.remove(u,e):i.removeEvent(u,e,s.handle);l[f]&&(delete l[f],v?delete u[h]:typeof u.removeAttribute!==o?u.removeAttribute(h):u[h]=null,c.push(f))}}});i.fn.extend({text:function(n){return b(this,function(n){return void 0===n?i.text(this):this.empty().append((this[0]&&this[0].ownerDocument||u).createTextNode(n))},null,n,arguments.length)},append:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=eu(this,n);t.appendChild(n)}})},prepend:function(){return this.domManip(arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=eu(this,n);t.insertBefore(n,t.firstChild)}})},before:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return this.domManip(arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},remove:function(n,t){for(var r,e=n?i.filter(n,this):this,u=0;null!=(r=e[u]);u++)t||1!==r.nodeType||i.cleanData(f(r)),r.parentNode&&(t&&i.contains(r.ownerDocument,r)&&li(f(r,"script")),r.parentNode.removeChild(r));return this},empty:function(){for(var n,t=0;null!=(n=this[t]);t++){for(1===n.nodeType&&i.cleanData(f(n,!1));n.firstChild;)n.removeChild(n.firstChild);n.options&&i.nodeName(n,"select")&&(n.options.length=0)}return this},clone:function(n,t){return n=null==n?!1:n,t=null==t?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return b(this,function(n){var t=this[0]||{},u=0,e=this.length;if(void 0===n)return 1===t.nodeType?t.innerHTML.replace(ce,""):void 0;if(!("string"!=typeof n||ae.test(n)||!r.htmlSerialize&&tu.test(n)||!r.leadingWhitespace&&hi.test(n)||s[(ru.exec(n)||["",""])[1].toLowerCase()])){n=n.replace(iu,"<$1><\/$2>");try{for(;e>u;u++)t=this[u]||{},1===t.nodeType&&(i.cleanData(f(t,!1)),t.innerHTML=n);t=0}catch(o){}}t&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(){var n=arguments[0];return this.domManip(arguments,function(t){n=this.parentNode;i.cleanData(f(this));n&&n.replaceChild(t,this)}),n&&(n.length||n.nodeType)?this:this.remove()},detach:function(n){return this.remove(n,!0)},domManip:function(n,t){n=ir.apply([],n);var h,u,c,o,v,s,e=0,l=this.length,p=this,w=l-1,a=n[0],y=i.isFunction(a);if(y||l>1&&"string"==typeof a&&!r.checkClone&&ve.test(a))return this.each(function(i){var r=p.eq(i);y&&(n[0]=a.call(this,i,r.html()));r.domManip(n,t)});if(l&&(s=i.buildFragment(n,this[0].ownerDocument,!1,this),h=s.firstChild,1===s.childNodes.length&&(s=h),h)){for(o=i.map(f(s,"script"),ou),c=o.length;l>e;e++)u=s,e!==w&&(u=i.clone(u,!0,!0),c&&i.merge(o,f(u,"script"))),t.call(this[e],u,e);if(c)for(v=o[o.length-1].ownerDocument,i.map(o,su),e=0;c>e;e++)u=o[e],fu.test(u.type||"")&&!i._data(u,"globalEval")&&i.contains(v,u)&&(u.src?i._evalUrl&&i._evalUrl(u.src):i.globalEval((u.text||u.textContent||u.innerHTML||"").replace(pe,"")));s=h=null}return this}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,r=0,f=[],e=i(n),o=e.length-1;o>=r;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),ti.apply(f,u.get());return this.pushStack(f)}});ai={};!function(){var t,i,n=u.createElement("div"),f="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";n.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>";t=n.getElementsByTagName("a")[0];t.style.cssText="float:left;opacity:.5";r.opacity=/^0.5/.test(t.style.opacity);r.cssFloat=!!t.style.cssFloat;n.style.backgroundClip="content-box";n.cloneNode(!0).style.backgroundClip="";r.clearCloneStyle="content-box"===n.style.backgroundClip;t=n=null;r.shrinkWrapBlocks=function(){var t,r,n,e;if(null==i){if(t=u.getElementsByTagName("body")[0],!t)return;e="border:0;width:0;height:0;position:absolute;top:0;left:-9999px";r=u.createElement("div");n=u.createElement("div");t.appendChild(r).appendChild(n);i=!1;typeof n.style.zoom!==o&&(n.style.cssText=f+";width:1px;padding:1px;zoom:1",n.innerHTML="<div><\/div>",n.firstChild.style.width="5px",i=3!==n.offsetWidth);t.removeChild(r);t=r=n=null}return i}}();var au=/^margin/,yt=new RegExp("^("+at+")(?!px)[a-z%]+$","i"),k,d,de=/^(top|right|bottom|left)$/;n.getComputedStyle?(k=function(n){return n.ownerDocument.defaultView.getComputedStyle(n,null)},d=function(n,t,r){var e,o,s,u,f=n.style;return r=r||k(n),u=r?r.getPropertyValue(t)||r[t]:void 0,r&&(""!==u||i.contains(n.ownerDocument,n)||(u=i.style(n,t)),yt.test(u)&&au.test(t)&&(e=f.width,o=f.minWidth,s=f.maxWidth,f.minWidth=f.maxWidth=f.width=u,u=r.width,f.width=e,f.minWidth=o,f.maxWidth=s)),void 0===u?u:u+""}):u.documentElement.currentStyle&&(k=function(n){return n.currentStyle},d=function(n,t,i){var o,f,e,r,u=n.style;return i=i||k(n),r=i?i[t]:void 0,null==r&&u&&u[t]&&(r=u[t]),yt.test(r)&&!de.test(t)&&(o=u.left,f=n.runtimeStyle,e=f&&f.left,e&&(f.left=n.currentStyle.left),u.left="fontSize"===t?"1em":r,r=u.pixelLeft+"px",u.left=o,e&&(f.left=e)),void 0===r?r:r+""||"auto"});!function(){function a(){var f,t,r=u.getElementsByTagName("body")[0];r&&(f=u.createElement("div"),t=u.createElement("div"),f.style.cssText=l,r.appendChild(f).appendChild(t),t.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",i.swap(r,null!=r.style.zoom?{zoom:1}:{},function(){c=4===t.offsetWidth}),o=!0,s=!1,h=!0,n.getComputedStyle&&(s="1%"!==(n.getComputedStyle(t,null)||{}).top,o="4px"===(n.getComputedStyle(t,null)||{width:"4px"}).width),r.removeChild(f),t=r=null)}var f,e,c,o,s,h,t=u.createElement("div"),l="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",v="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";t.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>";f=t.getElementsByTagName("a")[0];f.style.cssText="float:left;opacity:.5";r.opacity=/^0.5/.test(f.style.opacity);r.cssFloat=!!f.style.cssFloat;t.style.backgroundClip="content-box";t.cloneNode(!0).style.backgroundClip="";r.clearCloneStyle="content-box"===t.style.backgroundClip;f=t=null;i.extend(r,{reliableHiddenOffsets:function(){if(null!=e)return e;var i,n,f,t=u.createElement("div"),r=u.getElementsByTagName("body")[0];if(r)return t.setAttribute("className","t"),t.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",i=u.createElement("div"),i.style.cssText=l,r.appendChild(i).appendChild(t),t.innerHTML="<table><tr><td><\/td><td>t<\/td><\/tr><\/table>",n=t.getElementsByTagName("td"),n[0].style.cssText="padding:0;margin:0;border:0;display:none",f=0===n[0].offsetHeight,n[0].style.display="",n[1].style.display="none",e=f&&0===n[0].offsetHeight,r.removeChild(i),t=r=null,e},boxSizing:function(){return null==c&&a(),c},boxSizingReliable:function(){return null==o&&a(),o},pixelPosition:function(){return null==s&&a(),s},reliableMarginRight:function(){var r,f,t,i;if(null==h&&n.getComputedStyle){if(r=u.getElementsByTagName("body")[0],!r)return;f=u.createElement("div");t=u.createElement("div");f.style.cssText=l;r.appendChild(f).appendChild(t);i=t.appendChild(u.createElement("div"));i.style.cssText=t.style.cssText=v;i.style.marginRight=i.style.width="0";t.style.width="1px";h=!parseFloat((n.getComputedStyle(i,null)||{}).marginRight);r.removeChild(f)}return h}})}();i.swap=function(n,t,i,r){var f,u,e={};for(u in t)e[u]=n.style[u],n.style[u]=t[u];f=i.apply(n,r||[]);for(u in t)n.style[u]=e[u];return f};var vi=/alpha\([^)]*\)/i,ge=/opacity\s*=\s*([^)]*)/,no=/^(none|table(?!-c[ea]).+)/,to=new RegExp("^("+at+")(.*)$","i"),io=new RegExp("^([+-])=("+at+")","i"),ro={position:"absolute",visibility:"hidden",display:"block"},yu={letterSpacing:0,fontWeight:400},pu=["Webkit","O","Moz","ms"];i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=d(n,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:r.cssFloat?"cssFloat":"styleFloat"},style:function(n,t,u,f){if(n&&3!==n.nodeType&&8!==n.nodeType&&n.style){var o,c,e,s=i.camelCase(t),h=n.style;if(t=i.cssProps[s]||(i.cssProps[s]=wu(h,s)),e=i.cssHooks[t]||i.cssHooks[s],void 0===u)return e&&"get"in e&&void 0!==(o=e.get(n,!1,f))?o:h[t];if(c=typeof u,"string"===c&&(o=io.exec(u))&&(u=(o[1]+1)*o[2]+parseFloat(i.css(n,t)),c="number"),null!=u&&u===u&&("number"!==c||i.cssNumber[s]||(u+="px"),r.clearCloneStyle||""!==u||0!==t.indexOf("background")||(h[t]="inherit"),!(e&&"set"in e&&void 0===(u=e.set(n,u,f)))))try{h[t]="";h[t]=u}catch(l){}}},css:function(n,t,r,u){var s,f,e,o=i.camelCase(t);return t=i.cssProps[o]||(i.cssProps[o]=wu(n.style,o)),e=i.cssHooks[t]||i.cssHooks[o],e&&"get"in e&&(f=e.get(n,!0,r)),void 0===f&&(f=d(n,t,u)),"normal"===f&&t in yu&&(f=yu[t]),""===r||r?(s=parseFloat(f),r===!0||i.isNumeric(s)?s||0:f):f}});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,u){if(r)return 0===n.offsetWidth&&no.test(i.css(n,"display"))?i.swap(n,ro,function(){return gu(n,t,u)}):gu(n,t,u)},set:function(n,u,f){var e=f&&k(n);return ku(n,u,f?du(n,t,f,r.boxSizing()&&"border-box"===i.css(n,"boxSizing",!1,e),e):0)}}});r.opacity||(i.cssHooks.opacity={get:function(n,t){return ge.test((t&&n.currentStyle?n.currentStyle.filter:n.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(n,t){var r=n.style,u=n.currentStyle,e=i.isNumeric(t)?"alpha(opacity="+100*t+")":"",f=u&&u.filter||r.filter||"";r.zoom=1;(t>=1||""===t)&&""===i.trim(f.replace(vi,""))&&r.removeAttribute&&(r.removeAttribute("filter"),""===t||u&&!u.filter)||(r.filter=vi.test(f)?f.replace(vi,e):f+" "+e)}});i.cssHooks.marginRight=vu(r.reliableMarginRight,function(n,t){if(t)return i.swap(n,{display:"inline-block"},d,[n,"marginRight"])});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u="string"==typeof i?i.split(" "):[i];4>r;r++)f[n+w[r]+t]=u[r]||u[r-2]||u[0];return f}};au.test(n)||(i.cssHooks[n+t].set=ku)});i.fn.extend({css:function(n,t){return b(this,function(n,t,r){var f,e,o={},u=0;if(i.isArray(t)){for(f=k(n),e=t.length;e>u;u++)o[t[u]]=i.css(n,t[u],!1,f);return o}return void 0!==r?i.style(n,t,r):i.css(n,t)},n,t,arguments.length>1)},show:function(){return bu(this,!0)},hide:function(){return bu(this)},toggle:function(n){return"boolean"==typeof n?n?this.show():this.hide():this.each(function(){et(this)?i(this).show():i(this).hide()})}});i.Tween=e;e.prototype={constructor:e,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||"swing";this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=e.propHooks[this.prop];return n&&n.get?n.get(this):e.propHooks._default.get(this)},run:function(n){var r,t=e.propHooks[this.prop];return this.pos=r=this.options.duration?i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):n,this.now=(this.end-this.start)*r+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),t&&t.set?t.set(this):e.propHooks._default.set(this),this}};e.prototype.init.prototype=e.prototype;e.propHooks={_default:{get:function(n){var t;return null==n.elem[n.prop]||n.elem.style&&null!=n.elem.style[n.prop]?(t=i.css(n.elem,n.prop,""),t&&"auto"!==t?t:0):n.elem[n.prop]},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.style&&(null!=n.elem.style[i.cssProps[n.prop]]||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}};e.propHooks.scrollTop=e.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2}};i.fx=e.prototype.init;i.fx.step={};var rt,pt,uo=/^(?:toggle|show|hide)$/,nf=new RegExp("^(?:([+-])=|)("+at+")([a-z%]*)$","i"),fo=/queueHooks$/,wt=[eo],st={"*":[function(n,t){var f=this.createTween(n,t),s=f.cur(),r=nf.exec(t),e=r&&r[3]||(i.cssNumber[n]?"":"px"),u=(i.cssNumber[n]||"px"!==e&&+s)&&nf.exec(i.css(f.elem,n)),o=1,h=20;if(u&&u[3]!==e){e=e||u[3];r=r||[];u=+s||1;do o=o||".5",u/=o,i.style(f.elem,n,u+e);while(o!==(o=f.cur()/s)&&1!==o&&--h)}return r&&(u=f.start=+u||+s||0,f.unit=e,f.end=r[1]?u+(r[1]+1)*r[2]:+r[2]),f}]};i.Animation=i.extend(uf,{tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.split(" ");for(var r,u=0,f=n.length;f>u;u++)r=n[u],st[r]=st[r]||[],st[r].unshift(t)},prefilter:function(n,t){t?wt.unshift(n):wt.push(n)}});i.speed=function(n,t,r){var u=n&&"object"==typeof n?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return u.duration=i.fx.off?0:"number"==typeof u.duration?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(null==u.queue||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this);u.queue&&i.dequeue(this,u.queue)},u};i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(et).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,r,u){var o=i.isEmptyObject(n),e=i.speed(t,r,u),f=function(){var t=uf(this,i.extend({},n),e);(o||i._data(this,"finish"))&&t.stop(!0)};return f.finish=f,o||e.queue===!1?this.each(f):this.queue(e.queue,f)},stop:function(n,t,r){var u=function(n){var t=n.stop;delete n.stop;t(r)};return"string"!=typeof n&&(r=t,t=n,n=void 0),t&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var o=!0,t=null!=n&&n+"queueHooks",e=i.timers,f=i._data(this);if(t)f[t]&&f[t].stop&&u(f[t]);else for(t in f)f[t]&&f[t].stop&&fo.test(t)&&u(f[t]);for(t=e.length;t--;)e[t].elem!==this||null!=n&&e[t].queue!==n||(e[t].anim.stop(r),o=!1,e.splice(t,1));(o||!r)&&i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,f=i._data(this),r=f[n+"queue"],e=f[n+"queueHooks"],u=i.timers,o=r?r.length:0;for(f.finish=!0,i.queue(this,n,[]),e&&e.stop&&e.stop.call(this,!0),t=u.length;t--;)u[t].elem===this&&u[t].queue===n&&(u[t].anim.stop(!0),u.splice(t,1));for(t=0;o>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete f.finish})}});i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(bt(t,!0),n,i,u)}});i.each({slideDown:bt("show"),slideUp:bt("hide"),slideToggle:bt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.timers=[];i.fx.tick=function(){var r,n=i.timers,t=0;for(rt=i.now();t<n.length;t++)r=n[t],r()||n[t]!==r||n.splice(t--,1);n.length||i.fx.stop();rt=void 0};i.fx.timer=function(n){i.timers.push(n);n()?i.fx.start():i.timers.pop()};i.fx.interval=13;i.fx.start=function(){pt||(pt=setInterval(i.fx.tick,i.fx.interval))};i.fx.stop=function(){clearInterval(pt);pt=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fn.delay=function(n,t){return n=i.fx?i.fx.speeds[n]||n:n,t=t||"fx",this.queue(t,function(t,i){var r=setTimeout(t,n);i.stop=function(){clearTimeout(r)}})},function(){var i,n,f,e,t=u.createElement("div");t.setAttribute("className","t");t.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>";i=t.getElementsByTagName("a")[0];f=u.createElement("select");e=f.appendChild(u.createElement("option"));n=t.getElementsByTagName("input")[0];i.style.cssText="top:1px";r.getSetAttribute="t"!==t.className;r.style=/top/.test(i.getAttribute("style"));r.hrefNormalized="/a"===i.getAttribute("href");r.checkOn=!!n.value;r.optSelected=e.selected;r.enctype=!!u.createElement("form").enctype;f.disabled=!0;r.optDisabled=!e.disabled;n=u.createElement("input");n.setAttribute("value","");r.input=""===n.getAttribute("value");n.value="t";n.setAttribute("type","radio");r.radioValue="t"===n.value;i=n=f=e=t=null}();ff=/\r/g;i.fn.extend({val:function(n){var t,r,f,u=this[0];return arguments.length?(f=i.isFunction(n),this.each(function(r){var u;1===this.nodeType&&(u=f?n.call(this,r,i(this).val()):n,null==u?u="":"number"==typeof u?u+="":i.isArray(u)&&(u=i.map(u,function(n){return null==n?"":n+""})),t=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,u,"value")||(this.value=u))})):u?(t=i.valHooks[u.type]||i.valHooks[u.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(r=t.get(u,"value"))?r:(r=u.value,"string"==typeof r?r.replace(ff,""):null==r?"":r)):void 0}});i.extend({valHooks:{option:{get:function(n){var t=i.find.attr(n,"value");return null!=t?t:i.text(n)}},select:{get:function(n){for(var o,t,s=n.options,u=n.selectedIndex,f="select-one"===n.type||0>u,h=f?null:[],c=f?u+1:s.length,e=0>u?c:f?u:0;c>e;e++)if(t=s[e],!(!t.selected&&e!==u||(r.optDisabled?t.disabled:null!==t.getAttribute("disabled"))||t.parentNode.disabled&&i.nodeName(t.parentNode,"optgroup"))){if(o=i(t).val(),f)return o;h.push(o)}return h},set:function(n,t){for(var f,r,u=n.options,o=i.makeArray(t),e=u.length;e--;)if(r=u[e],i.inArray(i.valHooks.option.get(r),o)>=0)try{r.selected=f=!0}catch(s){r.scrollHeight}else r.selected=!1;return f||(n.selectedIndex=-1),u}}}});i.each(["radio","checkbox"],function(){i.valHooks[this]={set:function(n,t){if(i.isArray(t))return n.checked=i.inArray(i(n).val(),t)>=0}};r.checkOn||(i.valHooks[this].get=function(n){return null===n.getAttribute("value")?"on":n.value})});var ut,ef,v=i.expr.attrHandle,yi=/^(?:checked|selected)$/i,g=r.getSetAttribute,kt=r.input;i.fn.extend({attr:function(n,t){return b(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})}});i.extend({attr:function(n,t,r){var u,f,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return typeof n.getAttribute===o?i.prop(n,t,r):(1===e&&i.isXMLDoc(n)||(t=t.toLowerCase(),u=i.attrHooks[t]||(i.expr.match.bool.test(t)?ef:ut)),void 0===r?u&&"get"in u&&null!==(f=u.get(n,t))?f:(f=i.find.attr(n,t),null==f?void 0:f):null!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:(n.setAttribute(t,r+""),r):void i.removeAttr(n,t))},removeAttr:function(n,t){var r,u,e=0,f=t&&t.match(h);if(f&&1===n.nodeType)while(r=f[e++])u=i.propFix[r]||r,i.expr.match.bool.test(r)?kt&&g||!yi.test(r)?n[u]=!1:n[i.camelCase("default-"+r)]=n[u]=!1:i.attr(n,r,""),n.removeAttribute(g?r:u)},attrHooks:{type:{set:function(n,t){if(!r.radioValue&&"radio"===t&&i.nodeName(n,"input")){var u=n.value;return n.setAttribute("type",t),u&&(n.value=u),t}}}}});ef={set:function(n,t,r){return t===!1?i.removeAttr(n,r):kt&&g||!yi.test(r)?n.setAttribute(!g&&i.propFix[r]||r,r):n[i.camelCase("default-"+r)]=n[r]=!0,r}};i.each(i.expr.match.bool.source.match(/\w+/g),function(n,t){var r=v[t]||i.find.attr;v[t]=kt&&g||!yi.test(t)?function(n,t,i){var u,f;return i||(f=v[t],v[t]=u,u=null!=r(n,t,i)?t.toLowerCase():null,v[t]=f),u}:function(n,t,r){if(!r)return n[i.camelCase("default-"+t)]?t.toLowerCase():null}});kt&&g||(i.attrHooks.value={set:function(n,t,r){return i.nodeName(n,"input")?void(n.defaultValue=t):ut&&ut.set(n,t,r)}});g||(ut={set:function(n,t,i){var r=n.getAttributeNode(i);return r||n.setAttributeNode(r=n.ownerDocument.createAttribute(i)),r.value=t+="","value"===i||t===n.getAttribute(i)?t:void 0}},v.id=v.name=v.coords=function(n,t,i){var r;if(!i)return(r=n.getAttributeNode(t))&&""!==r.value?r.value:null},i.valHooks.button={get:function(n,t){var i=n.getAttributeNode(t);if(i&&i.specified)return i.value},set:ut.set},i.attrHooks.contenteditable={set:function(n,t,i){ut.set(n,""===t?!1:t,i)}},i.each(["width","height"],function(n,t){i.attrHooks[t]={set:function(n,i){if(""===i)return(n.setAttribute(t,"auto"),i)}}}));r.style||(i.attrHooks.style={get:function(n){return n.style.cssText||void 0},set:function(n,t){return n.style.cssText=t+""}});of=/^(?:input|select|textarea|button|object)$/i;sf=/^(?:a|area)$/i;i.fn.extend({prop:function(n,t){return b(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return n=i.propFix[n]||n,this.each(function(){try{this[n]=void 0;delete this[n]}catch(t){}})}});i.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(n,t,r){var f,u,o,e=n.nodeType;if(n&&3!==e&&8!==e&&2!==e)return o=1!==e||!i.isXMLDoc(n),o&&(t=i.propFix[t]||t,u=i.propHooks[t]),void 0!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:n[t]=r:u&&"get"in u&&null!==(f=u.get(n,t))?f:n[t]},propHooks:{tabIndex:{get:function(n){var t=i.find.attr(n,"tabindex");return t?parseInt(t,10):of.test(n.nodeName)||sf.test(n.nodeName)&&n.href?0:-1}}}});r.hrefNormalized||i.each(["href","src"],function(n,t){i.propHooks[t]={get:function(n){return n.getAttribute(t,4)}}});r.optSelected||(i.propHooks.selected={get:function(n){var t=n.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}});i.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){i.propFix[this.toLowerCase()]=this});r.enctype||(i.propFix.enctype="encoding");dt=/[\t\r\n\f]/g;i.fn.extend({addClass:function(n){var o,t,r,u,s,f,e=0,c=this.length,l="string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,this.className))});if(l)for(o=(n||"").match(h)||[];c>e;e++)if(t=this[e],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(dt," "):" ")){for(s=0;u=o[s++];)r.indexOf(" "+u+" ")<0&&(r+=u+" ");f=i.trim(r);t.className!==f&&(t.className=f)}return this},removeClass:function(n){var o,t,r,u,s,f,e=0,c=this.length,l=0===arguments.length||"string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,this.className))});if(l)for(o=(n||"").match(h)||[];c>e;e++)if(t=this[e],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(dt," "):"")){for(s=0;u=o[s++];)while(r.indexOf(" "+u+" ")>=0)r=r.replace(" "+u+" "," ");f=n?i.trim(r):"";t.className!==f&&(t.className=f)}return this},toggleClass:function(n,t){var r=typeof n;return"boolean"==typeof t&&"string"===r?t?this.addClass(n):this.removeClass(n):this.each(i.isFunction(n)?function(r){i(this).toggleClass(n.call(this,r,this.className,t),t)}:function(){if("string"===r)for(var t,f=0,u=i(this),e=n.match(h)||[];t=e[f++];)u.hasClass(t)?u.removeClass(t):u.addClass(t);else(r===o||"boolean"===r)&&(this.className&&i._data(this,"__className__",this.className),this.className=this.className||n===!1?"":i._data(this,"__className__")||"")})},hasClass:function(n){for(var i=" "+n+" ",t=0,r=this.length;r>t;t++)if(1===this[t].nodeType&&(" "+this[t].className+" ").replace(dt," ").indexOf(i)>=0)return!0;return!1}});i.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(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}});i.fn.extend({hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)},bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return 1===arguments.length?this.off(n,"**"):this.off(t,n||"**",i)}});var pi=i.now(),wi=/\?/,so=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;i.parseJSON=function(t){if(n.JSON&&n.JSON.parse)return n.JSON.parse(t+"");var f,r=null,u=i.trim(t+"");return u&&!i.trim(u.replace(so,function(n,t,i,u){return f&&t&&(r=0),0===r?n:(f=i||t,r+=!u-!i,"")}))?Function("return "+u)():i.error("Invalid JSON: "+t)};i.parseXML=function(t){var r,u;if(!t||"string"!=typeof t)return null;try{n.DOMParser?(u=new DOMParser,r=u.parseFromString(t,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(t))}catch(f){r=void 0}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+t),r};var nt,y,ho=/#.*$/,hf=/([?&])_=[^&]*/,co=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,lo=/^(?:GET|HEAD)$/,ao=/^\/\//,cf=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lf={},bi={},af="*/".concat("*");try{y=location.href}catch(ts){y=u.createElement("a");y.href="";y=y.href}nt=cf.exec(y.toLowerCase())||[];i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:y,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(nt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":af,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":i.parseJSON,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?ki(ki(n,i.ajaxSettings),t):ki(i.ajaxSettings,n)},ajaxPrefilter:vf(lf),ajaxTransport:vf(bi),ajax:function(n,t){function w(n,t,s,h){var v,it,nt,y,w,c=t;2!==e&&(e=2,k&&clearTimeout(k),a=void 0,b=h||"",u.readyState=n>0?4:0,v=n>=200&&300>n||304===n,s&&(y=vo(r,u,s)),y=yo(r,y,u,v),v?(r.ifModified&&(w=u.getResponseHeader("Last-Modified"),w&&(i.lastModified[f]=w),w=u.getResponseHeader("etag"),w&&(i.etag[f]=w)),204===n||"HEAD"===r.type?c="nocontent":304===n?c="notmodified":(c=y.state,it=y.data,nt=y.error,v=!nt)):(nt=c,(n||!c)&&(c="error",0>n&&(n=0))),u.status=n,u.statusText=(t||c)+"",v?g.resolveWith(o,[it,c,u]):g.rejectWith(o,[u,c,nt]),u.statusCode(p),p=void 0,l&&d.trigger(v?"ajaxSuccess":"ajaxError",[u,r,v?it:nt]),tt.fireWith(o,[u,c]),l&&(d.trigger("ajaxComplete",[u,r]),--i.active||i.event.trigger("ajaxStop")))}"object"==typeof n&&(t=n,n=void 0);t=t||{};var s,c,f,b,k,l,a,v,r=i.ajaxSetup({},t),o=r.context||r,d=r.context&&(o.nodeType||o.jquery)?i(o):i.event,g=i.Deferred(),tt=i.Callbacks("once memory"),p=r.statusCode||{},it={},rt={},e=0,ut="canceled",u={readyState:0,getResponseHeader:function(n){var t;if(2===e){if(!v)for(v={};t=co.exec(b);)v[t[1].toLowerCase()]=t[2];t=v[n.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===e?b:null},setRequestHeader:function(n,t){var i=n.toLowerCase();return e||(n=rt[i]=rt[i]||n,it[n]=t),this},overrideMimeType:function(n){return e||(r.mimeType=n),this},statusCode:function(n){var t;if(n)if(2>e)for(t in n)p[t]=[p[t],n[t]];else u.always(n[u.status]);return this},abort:function(n){var t=n||ut;return a&&a.abort(t),w(0,t),this}};if(g.promise(u).complete=tt.add,u.success=u.done,u.error=u.fail,r.url=((n||r.url||y)+"").replace(ho,"").replace(ao,nt[1]+"//"),r.type=t.method||t.type||r.method||r.type,r.dataTypes=i.trim(r.dataType||"*").toLowerCase().match(h)||[""],null==r.crossDomain&&(s=cf.exec(r.url.toLowerCase()),r.crossDomain=!(!s||s[1]===nt[1]&&s[2]===nt[2]&&(s[3]||("http:"===s[1]?"80":"443"))===(nt[3]||("http:"===nt[1]?"80":"443")))),r.data&&r.processData&&"string"!=typeof r.data&&(r.data=i.param(r.data,r.traditional)),yf(lf,r,t,u),2===e)return u;l=r.global;l&&0==i.active++&&i.event.trigger("ajaxStart");r.type=r.type.toUpperCase();r.hasContent=!lo.test(r.type);f=r.url;r.hasContent||(r.data&&(f=r.url+=(wi.test(f)?"&":"?")+r.data,delete r.data),r.cache===!1&&(r.url=hf.test(f)?f.replace(hf,"$1_="+pi++):f+(wi.test(f)?"&":"?")+"_="+pi++));r.ifModified&&(i.lastModified[f]&&u.setRequestHeader("If-Modified-Since",i.lastModified[f]),i.etag[f]&&u.setRequestHeader("If-None-Match",i.etag[f]));(r.data&&r.hasContent&&r.contentType!==!1||t.contentType)&&u.setRequestHeader("Content-Type",r.contentType);u.setRequestHeader("Accept",r.dataTypes[0]&&r.accepts[r.dataTypes[0]]?r.accepts[r.dataTypes[0]]+("*"!==r.dataTypes[0]?", "+af+"; q=0.01":""):r.accepts["*"]);for(c in r.headers)u.setRequestHeader(c,r.headers[c]);if(r.beforeSend&&(r.beforeSend.call(o,u,r)===!1||2===e))return u.abort();ut="abort";for(c in{success:1,error:1,complete:1})u[c](r[c]);if(a=yf(bi,r,t,u)){u.readyState=1;l&&d.trigger("ajaxSend",[u,r]);r.async&&r.timeout>0&&(k=setTimeout(function(){u.abort("timeout")},r.timeout));try{e=1;a.send(it,w)}catch(ft){if(!(2>e))throw ft;w(-1,ft)}}else w(-1,"No Transport");return u},getJSON:function(n,t,r){return i.get(n,t,r,"json")},getScript:function(n,t){return i.get(n,void 0,t,"script")}});i.each(["get","post"],function(n,t){i[t]=function(n,r,u,f){return i.isFunction(r)&&(f=f||u,u=r,r=void 0),i.ajax({url:n,type:t,dataType:f,data:r,success:u})}});i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}});i._evalUrl=function(n){return i.ajax({url:n,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})};i.fn.extend({wrapAll:function(n){if(i.isFunction(n))return this.each(function(t){i(this).wrapAll(n.call(this,t))});if(this[0]){var t=i(n,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]);t.map(function(){for(var n=this;n.firstChild&&1===n.firstChild.nodeType;)n=n.firstChild;return n}).append(this)}return this},wrapInner:function(n){return this.each(i.isFunction(n)?function(t){i(this).wrapInner(n.call(this,t))}:function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()}});i.expr.filters.hidden=function(n){return n.offsetWidth<=0&&n.offsetHeight<=0||!r.reliableHiddenOffsets()&&"none"===(n.style&&n.style.display||i.css(n,"display"))};i.expr.filters.visible=function(n){return!i.expr.filters.hidden(n)};var po=/%20/g,wo=/\[\]$/,pf=/\r?\n/g,bo=/^(?:submit|button|image|reset|file)$/i,ko=/^(?:input|select|textarea|keygen)/i;i.param=function(n,t){var r,u=[],f=function(n,t){t=i.isFunction(t)?t():null==t?"":t;u[u.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(void 0===t&&(t=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){f(this.name,this.value)});else for(r in n)di(r,n[r],t,f);return u.join("&").replace(po,"+")};i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&ko.test(this.nodeName)&&!bo.test(n)&&(this.checked||!oi.test(n))}).map(function(n,t){var r=i(this).val();return null==r?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(pf,"\r\n")}}):{name:t.name,value:r.replace(pf,"\r\n")}}).get()}});i.ajaxSettings.xhr=void 0!==n.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&wf()||ns()}:wf;var go=0,gt={},ht=i.ajaxSettings.xhr();return n.ActiveXObject&&i(n).on("unload",function(){for(var n in gt)gt[n](void 0,!0)}),r.cors=!!ht&&"withCredentials"in ht,ht=r.ajax=!!ht,ht&&i.ajaxTransport(function(n){if(!n.crossDomain||r.cors){var t;return{send:function(r,u){var e,f=n.xhr(),o=++go;if(f.open(n.type,n.url,n.async,n.username,n.password),n.xhrFields)for(e in n.xhrFields)f[e]=n.xhrFields[e];n.mimeType&&f.overrideMimeType&&f.overrideMimeType(n.mimeType);n.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(e in r)void 0!==r[e]&&f.setRequestHeader(e,r[e]+"");f.send(n.hasContent&&n.data||null);t=function(r,e){var s,c,h;if(t&&(e||4===f.readyState))if(delete gt[o],t=void 0,f.onreadystatechange=i.noop,e)4!==f.readyState&&f.abort();else{h={};s=f.status;"string"==typeof f.responseText&&(h.text=f.responseText);try{c=f.statusText}catch(l){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=h.text?200:404}h&&u(s,c,h,f.getAllResponseHeaders())};n.async?4===f.readyState?setTimeout(t):f.onreadystatechange=gt[o]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(n){return i.globalEval(n),n}}}),i.ajaxPrefilter("script",function(n){void 0===n.cache&&(n.cache=!1);n.crossDomain&&(n.type="GET",n.global=!1)}),i.ajaxTransport("script",function(n){if(n.crossDomain){var t,r=u.head||i("head")[0]||u.documentElement;return{send:function(i,f){t=u.createElement("script");t.async=!0;n.scriptCharset&&(t.charset=n.scriptCharset);t.src=n.url;t.onload=t.onreadystatechange=function(n,i){(i||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,i||f(200,"success"))};r.insertBefore(t,r.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}}),gi=[],ni=/(=)\?(?=&|$)|\?\?/,i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=gi.pop()||i.expando+"_"+pi++;return this[n]=!0,n}}),i.ajaxPrefilter("json jsonp",function(t,r,u){var f,o,e,s=t.jsonp!==!1&&(ni.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&ni.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return(f=t.jsonpCallback=i.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(ni,"$1"+f):t.jsonp!==!1&&(t.url+=(wi.test(t.url)?"&":"?")+t.jsonp+"="+f),t.converters["script json"]=function(){return e||i.error(f+" was not called"),e[0]},t.dataTypes[0]="json",o=n[f],n[f]=function(){e=arguments},u.always(function(){n[f]=o;t[f]&&(t.jsonpCallback=r.jsonpCallback,gi.push(f));e&&i.isFunction(o)&&o(e[0]);e=o=void 0}),"script")}),i.parseHTML=function(n,t,r){if(!n||"string"!=typeof n)return null;"boolean"==typeof t&&(r=t,t=!1);t=t||u;var f=er.exec(n),e=!r&&[];return f?[t.createElement(f[1])]:(f=i.buildFragment([n],t,e),e&&e.length&&i(e).remove(),i.merge([],f.childNodes))},nr=i.fn.load,i.fn.load=function(n,t,r){if("string"!=typeof n&&nr)return nr.apply(this,arguments);var u,o,s,f=this,e=n.indexOf(" ");return e>=0&&(u=n.slice(e,n.length),n=n.slice(0,e)),i.isFunction(t)?(r=t,t=void 0):t&&"object"==typeof t&&(s="POST"),f.length>0&&i.ajax({url:n,type:s,dataType:"html",data:t}).done(function(n){o=arguments;f.html(u?i("<div>").append(i.parseHTML(n)).find(u):n)}).complete(r&&function(n,t){f.each(r,o||[n.responseText,t,n])}),this},i.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length},tr=n.document.documentElement,i.offset={setOffset:function(n,t,r){var e,o,s,h,u,c,v,l=i.css(n,"position"),a=i(n),f={};"static"===l&&(n.style.position="relative");u=a.offset();s=i.css(n,"top");c=i.css(n,"left");v=("absolute"===l||"fixed"===l)&&i.inArray("auto",[s,c])>-1;v?(e=a.position(),h=e.top,o=e.left):(h=parseFloat(s)||0,o=parseFloat(c)||0);i.isFunction(t)&&(t=t.call(n,r,u));null!=t.top&&(f.top=t.top-u.top+h);null!=t.left&&(f.left=t.left-u.left+o);"using"in t?t.using.call(n,f):a.css(f)}},i.fn.extend({offset:function(n){if(arguments.length)return void 0===n?this:this.each(function(t){i.offset.setOffset(this,n,t)});var t,f,u={top:0,left:0},r=this[0],e=r&&r.ownerDocument;if(e)return t=e.documentElement,i.contains(t,r)?(typeof r.getBoundingClientRect!==o&&(u=r.getBoundingClientRect()),f=bf(e),{top:u.top+(f.pageYOffset||t.scrollTop)-(t.clientTop||0),left:u.left+(f.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):u},position:function(){if(this[0]){var n,r,t={top:0,left:0},u=this[0];return"fixed"===i.css(u,"position")?r=u.getBoundingClientRect():(n=this.offsetParent(),r=this.offset(),i.nodeName(n[0],"html")||(t=n.offset()),t.top+=i.css(n[0],"borderTopWidth",!0),t.left+=i.css(n[0],"borderLeftWidth",!0)),{top:r.top-t.top-i.css(u,"marginTop",!0),left:r.left-t.left-i.css(u,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent||tr;n&&!i.nodeName(n,"html")&&"static"===i.css(n,"position");)n=n.offsetParent;return n||tr})}}),i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,t){var r=/Y/.test(t);i.fn[n]=function(u){return b(this,function(n,u,f){var e=bf(n);return void 0===f?e?t in e?e[t]:e.document.documentElement[u]:n[u]:void(e?e.scrollTo(r?i(e).scrollLeft():f,r?f:i(e).scrollTop()):n[u]=f)},n,u,arguments.length,null)}}),i.each(["top","left"],function(n,t){i.cssHooks[t]=vu(r.pixelPosition,function(n,r){if(r)return(r=d(n,t),yt.test(r)?i(n).position()[t]+"px":r)})}),i.each({Height:"height",Width:"width"},function(n,t){i.each({padding:"inner"+n,content:t,"":"outer"+n},function(r,u){i.fn[u]=function(u,f){var e=arguments.length&&(r||"boolean"!=typeof u),o=r||(u===!0||f===!0?"margin":"border");return b(this,function(t,r,u){var f;return i.isWindow(t)?t.document.documentElement["client"+n]:9===t.nodeType?(f=t.documentElement,Math.max(t.body["scroll"+n],f["scroll"+n],t.body["offset"+n],f["offset"+n],f["client"+n])):void 0===u?i.css(t,r,o):i.style(t,r,u,o)},t,e?u:void 0,e,null)}})}),i.fn.size=function(){return this.length},i.fn.andSelf=i.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return i}),kf=n.jQuery,df=n.$,i.noConflict=function(t){return n.$===i&&(n.$=df),t&&n.jQuery===i&&(n.jQuery=kf),i},typeof t===o&&(n.jQuery=n.$=i),i}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(n){"use strict";function t(){var i=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in n)if(void 0!==i.style[t])return{end:n[t]};return!1}n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one("bsTransitionEnd",function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this};n(function(){n.support.transition=t();n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery);+function(n){"use strict";function u(i){return this.each(function(){var r=n(this),u=r.data("bs.alert");u||r.data("bs.alert",u=new t(this));"string"==typeof i&&u[i].call(r)})}var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.VERSION="3.2.0";t.prototype.close=function(t){function f(){i.detach().trigger("closed.bs.alert").remove()}var u=n(this),r=u.attr("data-target"),i;r||(r=u.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));i=n(r);t&&t.preventDefault();i.length||(i=u.hasClass("alert")?u:u.parent());i.trigger(t=n.Event("close.bs.alert"));t.isDefaultPrevented()||(i.removeClass("in"),n.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",f).emulateTransitionEnd(150):f())};r=n.fn.alert;n.fn.alert=u;n.fn.alert.Constructor=t;n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.bs.alert.data-api",i,t.prototype.close)}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.button"),f="object"==typeof i&&i;r||u.data("bs.button",r=new t(this,f));"toggle"==i?r.toggle():i&&r.setState(i)})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.isLoading=!1},r;t.VERSION="3.2.0";t.DEFAULTS={loadingText:"loading..."};t.prototype.setState=function(t){var r="disabled",i=this.$element,f=i.is("input")?"val":"html",u=i.data();t+="Text";null==u.resetText&&i.data("resetText",i[f]());i[f](null==u[t]?this.options[t]:u[t]);setTimeout(n.proxy(function(){"loadingText"==t?(this.isLoading=!0,i.addClass(r).attr(r,r)):this.isLoading&&(this.isLoading=!1,i.removeClass(r).removeAttr(r))},this),0)};t.prototype.toggle=function(){var t=!0,i=this.$element.closest('[data-toggle="buttons"]'),n;i.length&&(n=this.$element.find("input"),"radio"==n.prop("type")&&(n.prop("checked")&&this.$element.hasClass("active")?t=!1:i.find(".active").removeClass("active")),t&&n.prop("checked",!this.$element.hasClass("active")).trigger("change"));t&&this.$element.toggleClass("active")};r=n.fn.button;n.fn.button=i;n.fn.button.Constructor=t;n.fn.button.noConflict=function(){return n.fn.button=r,this};n(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var r=n(t.target);r.hasClass("btn")||(r=r.closest(".btn"));i.call(r,"toggle");t.preventDefault()})}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.carousel"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i),e="string"==typeof i?i:f.slide;r||u.data("bs.carousel",r=new t(this,f));"number"==typeof i?r.to(i):e?r[e]():f.interval&&r.pause().cycle()})}var t=function(t,i){this.$element=n(t).on("keydown.bs.carousel",n.proxy(this.keydown,this));this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.paused=this.sliding=this.interval=this.$active=this.$items=null;"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",n.proxy(this.pause,this)).on("mouseleave.bs.carousel",n.proxy(this.cycle,this))},r;t.VERSION="3.2.0";t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0};t.prototype.keydown=function(n){switch(n.which){case 37:this.prev();break;case 39:this.next();break;default:return}n.preventDefault()};t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this};t.prototype.getItemIndex=function(n){return this.$items=n.parent().children(".item"),this.$items.index(n||this.$active)};t.prototype.to=function(t){var r=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1)&&!(0>t))return this.sliding?this.$element.one("slid.bs.carousel",function(){r.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",n(this.$items[t]))};t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};t.prototype.next=function(){if(!this.sliding)return this.slide("next")};t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")};t.prototype.slide=function(t,i){var u=this.$element.find(".item.active"),r=i||u[t](),c=this.interval,f="next"==t?"left":"right",a="next"==t?"first":"last",l=this,e,o,s,h;if(!r.length){if(!this.options.wrap)return;r=this.$element.find(".item")[a]()}return r.hasClass("active")?this.sliding=!1:(e=r[0],o=n.Event("slide.bs.carousel",{relatedTarget:e,direction:f}),(this.$element.trigger(o),!o.isDefaultPrevented())?((this.sliding=!0,c&&this.pause(),this.$indicators.length)&&(this.$indicators.find(".active").removeClass("active"),s=n(this.$indicators.children()[this.getItemIndex(r)]),s&&s.addClass("active")),h=n.Event("slid.bs.carousel",{relatedTarget:e,direction:f}),n.support.transition&&this.$element.hasClass("slide")?(r.addClass(t),r[0].offsetWidth,u.addClass(f),r.addClass(f),u.one("bsTransitionEnd",function(){r.removeClass([t,f].join(" ")).addClass("active");u.removeClass(["active",f].join(" "));l.sliding=!1;setTimeout(function(){l.$element.trigger(h)},0)}).emulateTransitionEnd(1e3*u.css("transition-duration").slice(0,-1))):(u.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(h)),c&&this.cycle(),this):void 0)};r=n.fn.carousel;n.fn.carousel=i;n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=r,this};n(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(t){var o,r=n(this),u=n(r.attr("data-target")||(o=r.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,"")),e,f;u.hasClass("carousel")&&(e=n.extend({},u.data(),r.data()),f=r.attr("data-slide-to"),f&&(e.interval=!1),i.call(u,e),f&&u.data("bs.carousel").to(f),t.preventDefault())});n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.collapse"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i);!r&&f.toggle&&"show"==i&&(i=!i);r||u.data("bs.collapse",r=new t(this,f));"string"==typeof i&&r[i]()})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.transitioning=null;this.options.parent&&(this.$parent=n(this.options.parent));this.options.toggle&&this.toggle()},r;t.VERSION="3.2.0";t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){var n=this.$element.hasClass("width");return n?"width":"height"};t.prototype.show=function(){var f,t,u,r,e,o;if(!this.transitioning&&!this.$element.hasClass("in")&&(f=n.Event("show.bs.collapse"),this.$element.trigger(f),!f.isDefaultPrevented())){if(t=this.$parent&&this.$parent.find("> .panel > .in"),t&&t.length){if(u=t.data("bs.collapse"),u&&u.transitioning)return;i.call(t,"hide");u||t.data("bs.collapse",null)}if(r=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[r](0),this.transitioning=1,e=function(){this.$element.removeClass("collapsing").addClass("collapse in")[r]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")},!n.support.transition)return e.call(this);o=n.camelCase(["scroll",r].join("-"));this.$element.one("bsTransitionEnd",n.proxy(e,this)).emulateTransitionEnd(350)[r](this.$element[0][o])}};t.prototype.hide=function(){var i,t,r;if(!this.transitioning&&this.$element.hasClass("in")&&(i=n.Event("hide.bs.collapse"),this.$element.trigger(i),!i.isDefaultPrevented()))return t=this.dimension(),this.$element[t](this.$element[t]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1,r=function(){this.transitioning=0;this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")},n.support.transition?void this.$element[t](0).one("bsTransitionEnd",n.proxy(r,this)).emulateTransitionEnd(350):r.call(this)};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};r=n.fn.collapse;n.fn.collapse=i;n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=r,this};n(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var o,r=n(this),h=r.attr("data-target")||t.preventDefault()||(o=r.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""),u=n(h),f=u.data("bs.collapse"),c=f?"toggle":r.data(),e=r.attr("data-parent"),s=e&&n(e);f&&f.transitioning||(s&&s.find('[data-toggle="collapse"][data-parent="'+e+'"]').not(r).addClass("collapsed"),r[u.hasClass("in")?"addClass":"removeClass"]("collapsed"));i.call(u,c)})}(jQuery);+function(n){"use strict";function r(t){t&&3===t.which||(n(o).remove(),n(i).each(function(){var i=u(n(this)),r={relatedTarget:this};i.hasClass("open")&&(i.trigger(t=n.Event("hide.bs.dropdown",r)),t.isDefaultPrevented()||i.removeClass("open").trigger("hidden.bs.dropdown",r))}))}function u(t){var i=t.attr("data-target"),r;return i||(i=t.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r=i&&n(i),r&&r.length?r:t.parent()}function e(i){return this.each(function(){var r=n(this),u=r.data("bs.dropdown");u||r.data("bs.dropdown",u=new t(this));"string"==typeof i&&u[i].call(r)})}var o=".dropdown-backdrop",i='[data-toggle="dropdown"]',t=function(t){n(t).on("click.bs.dropdown",this.toggle)},f;t.VERSION="3.2.0";t.prototype.toggle=function(t){var f=n(this),i,o,e;if(!f.is(".disabled, :disabled")){if(i=u(f),o=i.hasClass("open"),r(),!o){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&n('<div class="dropdown-backdrop"/>').insertAfter(n(this)).on("click",r),e={relatedTarget:this},i.trigger(t=n.Event("show.bs.dropdown",e)),t.isDefaultPrevented())return;f.trigger("focus");i.toggleClass("open").trigger("shown.bs.dropdown",e)}return!1}};t.prototype.keydown=function(t){var e,o,s,h,f,r;if(/(38|40|27)/.test(t.keyCode)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=u(e),s=o.hasClass("open"),!s||s&&27==t.keyCode)return 27==t.which&&o.find(i).trigger("focus"),e.trigger("click");h=" li:not(.divider):visible a";f=o.find('[role="menu"]'+h+', [role="listbox"]'+h);f.length&&(r=f.index(f.filter(":focus")),38==t.keyCode&&r>0&&r--,40==t.keyCode&&r<f.length-1&&r++,~r||(r=0),f.eq(r).trigger("focus"))}};f=n.fn.dropdown;n.fn.dropdown=e;n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.bs.dropdown.data-api",r).on("click.bs.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.bs.dropdown.data-api",i,t.prototype.toggle).on("keydown.bs.dropdown.data-api",i+', [role="menu"], [role="listbox"]',t.prototype.keydown)}(jQuery);+function(n){"use strict";function i(i,r){return this.each(function(){var f=n(this),u=f.data("bs.modal"),e=n.extend({},t.DEFAULTS,f.data(),"object"==typeof i&&i);u||f.data("bs.modal",u=new t(this,e));"string"==typeof i?u[i](r):e.show&&u.show(r)})}var t=function(t,i){this.options=i;this.$body=n(document.body);this.$element=n(t);this.$backdrop=this.isShown=null;this.scrollbarWidth=0;this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))},r;t.VERSION="3.2.0";t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(n){return this.isShown?this.hide():this.show(n)};t.prototype.show=function(t){var i=this,r=n.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this)),this.backdrop(function(){var u=n.support.transition&&i.$element.hasClass("fade"),r;i.$element.parent().length||i.$element.appendTo(i.$body);i.$element.show().scrollTop(0);u&&i.$element[0].offsetWidth;i.$element.addClass("in").attr("aria-hidden",!1);i.enforceFocus();r=n.Event("shown.bs.modal",{relatedTarget:t});u?i.$element.find(".modal-dialog").one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(300):i.$element.trigger("focus").trigger(r)}))};t.prototype.hide=function(t){t&&t.preventDefault();t=n.Event("hide.bs.modal");this.$element.trigger(t);this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",n.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())};t.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(n){this.$element[0]===n.target||this.$element.has(n.target).length||this.$element.trigger("focus")},this))};t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",n.proxy(function(n){27==n.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")};t.prototype.hideModal=function(){var n=this;this.$element.hide();this.backdrop(function(){n.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(t){var f=this,u=this.$element.hasClass("fade")?"fade":"",i,r;if(this.isShown&&this.options.backdrop){if(i=n.support.transition&&u,this.$backdrop=n('<div class="modal-backdrop '+u+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",n.proxy(function(n){n.target===n.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),r=function(){f.removeBackdrop();t&&t()},n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",r).emulateTransitionEnd(150):r()):t&&t()};t.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())};t.prototype.setScrollbar=function(){var n=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",n+this.scrollbarWidth)};t.prototype.resetScrollbar=function(){this.$body.css("padding-right","")};t.prototype.measureScrollbar=function(){var n=document.createElement("div"),t;return n.className="modal-scrollbar-measure",this.$body.append(n),t=n.offsetWidth-n.clientWidth,this.$body[0].removeChild(n),t};r=n.fn.modal;n.fn.modal=i;n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=r,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var r=n(this),f=r.attr("href"),u=n(r.attr("data-target")||f&&f.replace(/.*(?=#[^\s]+$)/,"")),e=u.data("bs.modal")?"toggle":n.extend({remote:!/#/.test(f)&&f},u.data(),r.data());r.is("a")&&t.preventDefault();u.one("show.bs.modal",function(n){n.isDefaultPrevented()||u.one("hidden.bs.modal",function(){r.is(":visible")&&r.trigger("focus")})});i.call(u,e,this)})}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f="object"==typeof i&&i;(r||"destroy"!=i)&&(r||u.data("bs.tooltip",r=new t(this,f)),"string"==typeof i&&r[i]())})}var t=function(n,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null;this.init("tooltip",n,t)},i;t.VERSION="3.2.0";t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}};t.prototype.init=function(t,i,r){var f,e,u,o,s;for(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&n(this.options.viewport.selector||this.options.viewport),f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],"click"==u)this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else"manual"!=u&&(o="hover"==u?"mouseenter":"focusin",s="hover"==u?"mouseleave":"focusout",this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this)));this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){return t=n.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show()};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()};t.prototype.show=function(){var h=n.Event("show.bs."+this.type),c,y,s;if(this.hasContent()&&this.enabled){if(this.$element.trigger(h),c=n.contains(document.documentElement,this.$element[0]),h.isDefaultPrevented()||!c)return;var f=this,i=this.tip(),l=this.getUID(this.type);this.setContent();i.attr("id",l);this.$element.attr("aria-describedby",l);this.options.animation&&i.addClass("fade");var t="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,v=a.test(t);v&&(t=t.replace(a,"")||"top");i.detach().css({top:0,left:0,display:"block"}).addClass(t).data("bs."+this.type,this);this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element);var r=this.getPosition(),e=i[0].offsetWidth,o=i[0].offsetHeight;if(v){var p=t,w=this.$element.parent(),u=this.getPosition(w);t="bottom"==t&&r.top+r.height+o-u.scroll>u.height?"top":"top"==t&&r.top-u.scroll-o<0?"bottom":"right"==t&&r.right+e>u.width?"left":"left"==t&&r.left-e<u.left?"right":t;i.removeClass(p).addClass(t)}y=this.getCalculatedOffset(t,r,e,o);this.applyPlacement(y,t);s=function(){f.$element.trigger("shown.bs."+f.type);f.hoverState=null};n.support.transition&&this.$tip.hasClass("fade")?i.one("bsTransitionEnd",s).emulateTransitionEnd(150):s()}};t.prototype.applyPlacement=function(t,i){var r=this.tip(),c=r[0].offsetWidth,e=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10),h,f,u;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top=t.top+o;t.left=t.left+s;n.offset.setOffset(r[0],n.extend({using:function(n){r.css({top:Math.round(n.top),left:Math.round(n.left)})}},t),0);r.addClass("in");h=r[0].offsetWidth;f=r[0].offsetHeight;"top"==i&&f!=e&&(t.top=t.top+e-f);u=this.getViewportAdjustedDelta(i,t,h,f);u.left?t.left+=u.left:t.top+=u.top;var l=u.left?2*u.left-c+h:2*u.top-e+f,a=u.left?"left":"top",v=u.left?"offsetWidth":"offsetHeight";r.offset(t);this.replaceArrow(l,r[0][v],a)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i,n?50*(1-n/t)+"%":"")};t.prototype.setContent=function(){var n=this.tip(),t=this.getTitle();n.find(".tooltip-inner")[this.options.html?"html":"text"](t);n.removeClass("fade in top bottom left right")};t.prototype.hide=function(){function r(){"in"!=t.hoverState&&i.detach();t.$element.trigger("hidden.bs."+t.type)}var t=this,i=this.tip(),u=n.Event("hide.bs."+this.type);return this.$element.removeAttr("aria-describedby"),this.$element.trigger(u),u.isDefaultPrevented()?void 0:(i.removeClass("in"),n.support.transition&&this.$tip.hasClass("fade")?i.one("bsTransitionEnd",r).emulateTransitionEnd(150):r(),this.hoverState=null,this)};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||"string"!=typeof n.attr("data-original-title"))&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(t){t=t||this.$element;var r=t[0],i="BODY"==r.tagName;return n.extend({},"function"==typeof r.getBoundingClientRect?r.getBoundingClientRect():null,{scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop(),width:i?n(window).width():t.outerWidth(),height:i?n(window).height():t.outerHeight()},i?{top:0,left:0}:t.offset())};t.prototype.getCalculatedOffset=function(n,t,i,r){return"bottom"==n?{top:t.top+t.height,left:t.left+t.width/2-i/2}:"top"==n?{top:t.top-r,left:t.left+t.width/2-i/2}:"left"==n?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getViewportAdjustedDelta=function(n,t,i,r){var f={top:0,left:0},e,u,o,s,h,c;return this.$viewport?(e=this.options.viewport&&this.options.viewport.padding||0,u=this.getPosition(this.$viewport),/right|left/.test(n)?(o=t.top-e-u.scroll,s=t.top+e-u.scroll+r,o<u.top?f.top=u.top-o:s>u.top+u.height&&(f.top=u.top+u.height-s)):(h=t.left-e,c=t.left+e+i,h<u.left?f.left=u.left-h:c>u.width&&(f.left=u.left+u.width-c)),f):f};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)};t.prototype.getUID=function(n){do n+=~~(1e6*Math.random());while(document.getElementById(n));return n};t.prototype.tip=function(){return this.$tip=this.$tip||n(this.options.template)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=this;t&&(i=n(t.currentTarget).data("bs."+this.type),i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)));i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){clearTimeout(this.timeout);this.hide().$element.off("."+this.type).removeData("bs."+this.type)};i=n.fn.tooltip;n.fn.tooltip=r;n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f="object"==typeof i&&i;(r||"destroy"!=i)&&(r||u.data("bs.popover",r=new t(this,f)),"string"==typeof i&&r[i]())})}var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.2.0";t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype);t.prototype.constructor=t;t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),i=this.getTitle(),t=this.getContent();n.find(".popover-title")[this.options.html?"html":"text"](i);n.find(".popover-content").empty()[this.options.html?"string"==typeof t?"html":"append":"text"](t);n.removeClass("fade top bottom left right in");n.find(".popover-title").html()||n.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var t=this.$element,n=this.options;return t.attr("data-content")||("function"==typeof n.content?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};t.prototype.tip=function(){return this.$tip||(this.$tip=n(this.options.template)),this.$tip};i=n.fn.popover;n.fn.popover=r;n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(jQuery);+function(n){"use strict";function t(i,r){var u=n.proxy(this.process,this);this.$body=n("body");this.$scrollElement=n(n(i).is("body")?window:i);this.options=n.extend({},t.DEFAULTS,r);this.selector=(this.options.target||"")+" .nav li > a";this.offsets=[];this.targets=[];this.activeTarget=null;this.scrollHeight=0;this.$scrollElement.on("scroll.bs.scrollspy",u);this.refresh();this.process()}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.scrollspy"),f="object"==typeof i&&i;r||u.data("bs.scrollspy",r=new t(this,f));"string"==typeof i&&r[i]()})}t.VERSION="3.2.0";t.DEFAULTS={offset:10};t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)};t.prototype.refresh=function(){var i="offset",r=0,t;n.isWindow(this.$scrollElement[0])||(i="position",r=this.$scrollElement.scrollTop());this.offsets=[];this.targets=[];this.scrollHeight=this.getScrollHeight();t=this;this.$body.find(this.selector).map(function(){var f=n(this),u=f.data("target")||f.attr("href"),t=/^#./.test(u)&&n(u);return t&&t.length&&t.is(":visible")&&[[t[i]().top+r,u]]||null}).sort(function(n,t){return n[0]-t[0]}).each(function(){t.offsets.push(this[0]);t.targets.push(this[1])})};t.prototype.process=function(){var n,r=this.$scrollElement.scrollTop()+this.options.offset,f=this.getScrollHeight(),e=this.options.offset+f-this.$scrollElement.height(),t=this.offsets,i=this.targets,u=this.activeTarget;if(this.scrollHeight!=f&&this.refresh(),r>=e)return u!=(n=i[i.length-1])&&this.activate(n);if(u&&r<=t[0])return u!=(n=i[0])&&this.activate(n);for(n=t.length;n--;)u!=i[n]&&r>=t[n]&&(!t[n+1]||r<=t[n+1])&&this.activate(i[n])};t.prototype.activate=function(t){this.activeTarget=t;n(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=n(r).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active"));i.trigger("activate.bs.scrollspy")};var r=n.fn.scrollspy;n.fn.scrollspy=i;n.fn.scrollspy.Constructor=t;n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=r,this};n(window).on("load.bs.scrollspy.data-api",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.tab");r||u.data("bs.tab",r=new t(this));"string"==typeof i&&r[i]()})}var t=function(t){this.element=n(t)},r;t.VERSION="3.2.0";t.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.data("target"),r,u,f;(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),t.parent("li").hasClass("active"))||(r=e.find(".active:last a")[0],u=n.Event("show.bs.tab",{relatedTarget:r}),(t.trigger(u),u.isDefaultPrevented())||(f=n(i),this.activate(t.closest("li"),e),this.activate(f,f.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:r})})))};t.prototype.activate=function(t,i,r){function f(){u.removeClass("active").find("> .dropdown-menu > .active").removeClass("active");t.addClass("active");e?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade");t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active");r&&r()}var u=i.find("> .active"),e=r&&n.support.transition&&u.hasClass("fade");e?u.one("bsTransitionEnd",f).emulateTransitionEnd(150):f();u.removeClass("in")};r=n.fn.tab;n.fn.tab=i;n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=r,this};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault();i.call(n(this),"show")})}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.affix"),f="object"==typeof i&&i;r||u.data("bs.affix",r=new t(this,f));"string"==typeof i&&r[i]()})}var t=function(i,r){this.options=n.extend({},t.DEFAULTS,r);this.$target=n(this.options.target).on("scroll.bs.affix.data-api",n.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",n.proxy(this.checkPositionWithEventLoop,this));this.$element=n(i);this.affixed=this.unpin=this.pinnedOffset=null;this.checkPosition()},r;t.VERSION="3.2.0";t.RESET="affix affix-top affix-bottom";t.DEFAULTS={offset:0,target:window};t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var n=this.$target.scrollTop(),i=this.$element.offset();return this.pinnedOffset=i.top-n};t.prototype.checkPositionWithEventLoop=function(){setTimeout(n.proxy(this.checkPosition,this),1)};t.prototype.checkPosition=function(){var i,e,o;if(this.$element.is(":visible")){var s=n(document).height(),h=this.$target.scrollTop(),c=this.$element.offset(),r=this.options.offset,f=r.top,u=r.bottom;"object"!=typeof r&&(u=f=r);"function"==typeof f&&(f=r.top(this.$element));"function"==typeof u&&(u=r.bottom(this.$element));i=null!=this.unpin&&h+this.unpin<=c.top?!1:null!=u&&c.top+this.$element.height()>=s-u?"bottom":null!=f&&f>=h?"top":!1;this.affixed!==i&&(null!=this.unpin&&this.$element.css("top",""),e="affix"+(i?"-"+i:""),o=n.Event(e+".bs.affix"),this.$element.trigger(o),o.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(e).trigger(n.Event(e.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:s-this.$element.height()-u})))}};r=n.fn.affix;n.fn.affix=i;n.fn.affix.Constructor=t;n.fn.affix.noConflict=function(){return n.fn.affix=r,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var r=n(this),t=r.data();t.offset=t.offset||{};t.offsetBottom&&(t.offset.bottom=t.offsetBottom);t.offsetTop&&(t.offset.top=t.offsetTop);i.call(r,t)})})}(jQuery),function(n){typeof define=="function"&&define.amd?define(["jquery","bootstrap"],n):n(jQuery)}(function(n){if(typeof n=="undefined")throw new Error("Fuel UX's JavaScript requires jQuery");if(typeof n.fn.dropdown=="undefined"||typeof n.fn.collapse=="undefined")throw new Error("Fuel UX's JavaScript requires Bootstrap");(function(n){var i=n.fn.checkbox,t=function(t,i){this.options=n.extend({},n.fn.checkbox.defaults,i);this.$element=n(t).is('input[type="checkbox"]')?n(t):n(t).find('input[type="checkbox"]:first');this.$label=this.$element.parent();this.$parent=this.$label.parent(".checkbox");this.$toggleContainer=this.$element.attr("data-toggle");this.state={disabled:!1,checked:!1};this.$parent.length===0&&(this.$parent=null);this.$toggleContainer=Boolean(this.$toggleContainer)?n(this.$toggleContainer):null;this.$element.on("change.fu.checkbox",n.proxy(this.itemchecked,this));this.setState()};t.prototype={constructor:t,setState:function(n){n=n||this.$element;this.state.disabled=Boolean(n.prop("disabled"));this.state.checked=Boolean(n.is(":checked"));this._resetClasses();this._toggleCheckedState();this._toggleDisabledState();this.toggleContainer()},enable:function(){this.state.disabled=!1;this.$element.attr("disabled",!1);this._resetClasses();this.$element.trigger("enabled.fu.checkbox")},disable:function(){this.state.disabled=!0;this.$element.attr("disabled",!0);this._setDisabledClass();this.$element.trigger("disabled.fu.checkbox")},check:function(){this.state.checked=!0;this.$element.prop("checked",!0);this._setCheckedClass();this.$element.trigger("checked.fu.checkbox")},uncheck:function(){this.state.checked=!1;this.$element.prop("checked",!1);this._resetClasses();this.$element.trigger("unchecked.fu.checkbox")},isChecked:function(){return this.state.checked},toggle:function(){this.state.checked=!this.state.checked;this._toggleCheckedState()},toggleContainer:function(){Boolean(this.$toggleContainer)&&(this.state.checked?(this.$toggleContainer.removeClass("hide"),this.$toggleContainer.attr("aria-hidden","false")):(this.$toggleContainer.addClass("hide"),this.$toggleContainer.attr("aria-hidden","true")))},itemchecked:function(t){this.setState(n(t.target))},destroy:function(){return this.$parent.remove(),this.$parent[0].outerHTML},_resetClasses:function(){var n=[];this.state.checked||n.push("checked");this.state.disabled||n.push("disabled");n=n.join(" ");this.$label.removeClass(n);this.$parent&&this.$parent.removeClass(n)},_toggleCheckedState:function(){this.state.checked?this.check():this.uncheck()},_toggleDisabledState:function(){this.state.disabled?this.disable():this.enable()},_setCheckedClass:function(){this.$label.addClass("checked");this.$parent&&this.$parent.addClass("checked")},_setDisabledClass:function(){this.$label.addClass("disabled");this.$parent&&this.$parent.addClass("disabled")}};n.fn.checkbox=function(i){var u=Array.prototype.slice.call(arguments,1),r,f=this.each(function(){var e=n(this),f=e.data("fu.checkbox"),o=typeof i=="object"&&i;f||e.data("fu.checkbox",f=new t(this,o));typeof i=="string"&&(r=f[i].apply(f,u))});return r===undefined?f:r};n.fn.checkbox.defaults={};n.fn.checkbox.Constructor=t;n.fn.checkbox.noConflict=function(){return n.fn.checkbox=i,this};n(document).on("mouseover.fu.checkbox.data-api","[data-initialize=checkbox]",function(t){var i=n(t.target).closest(".checkbox").find("[type=checkbox]");i.data("fu.checkbox")||i.checkbox(i.data())});n(function(){n("[data-initialize=checkbox] [type=checkbox]").each(function(){var t=n(this);t.data("fu.checkbox")||t.checkbox(t.data())})})})(n),function(n){var i=n.fn.combobox,t=function(t,i){this.$element=n(t);this.options=n.extend({},n.fn.combobox.defaults,i);this.$dropMenu=this.$element.find(".dropdown-menu");this.$input=this.$element.find("input");this.$button=this.$element.find(".btn");this.$element.on("click.fu.combobox","a",n.proxy(this.itemclicked,this));this.$element.on("change.fu.combobox","input",n.proxy(this.inputchanged,this));this.$element.on("shown.bs.dropdown",n.proxy(this.menuShown,this));this.setDefaultSelection()};t.prototype={constructor:t,destroy:function(){return this.$element.remove(),this.$element.find("input").each(function(){n(this).attr("value",n(this).val())}),this.$element[0].outerHTML},doSelect:function(n){typeof n[0]!="undefined"?(this.$selectedItem=n,this.$input.val(this.$selectedItem.text())):this.$selectedItem=null},menuShown:function(){this.options.autoResizeMenu&&this.resizeMenu()},resizeMenu:function(){var n=this.$element.outerWidth();this.$dropMenu.outerWidth(n)},selectedItem:function(){var r=this.$selectedItem,t={},i;return r?(i=this.$selectedItem.text(),t=n.extend({text:i},this.$selectedItem.data())):t={text:this.$input.val()},t},selectByText:function(t){var i=n([]);this.$element.find("li").each(function(){if((this.textContent||this.innerText||n(this).text()||"").toLowerCase()===(t||"").toLowerCase())return i=n(this),!1});this.doSelect(i)},selectByValue:function(n){var t='li[data-value="'+n+'"]';this.selectBySelector(t)},selectByIndex:function(n){var t="li:eq("+n+")";this.selectBySelector(t)},selectBySelector:function(n){var t=this.$element.find(n);this.doSelect(t)},setDefaultSelection:function(){var t="li[data-selected=true]:first",n=this.$element.find(t);n.length>0&&(this.selectBySelector(t),n.removeData("selected"),n.removeAttr("data-selected"))},enable:function(){this.$element.removeClass("disabled");this.$input.removeAttr("disabled");this.$button.removeClass("disabled")},disable:function(){this.$element.addClass("disabled");this.$input.attr("disabled",!0);this.$button.addClass("disabled")},itemclicked:function(t){this.$selectedItem=n(t.target).parent();this.$input.val(this.$selectedItem.text()).trigger("change",{synthetic:!0});var i=this.selectedItem();this.$element.trigger("changed.fu.combobox",i);t.preventDefault();this.$element.find(".dropdown-toggle").focus()},inputchanged:function(t,i){var u,r;i&&i.synthetic||(u=n(t.target).val(),this.selectByText(u),r=this.selectedItem(),r.text.length===0&&(r={text:u}),this.$element.trigger("changed.fu.combobox",r))}};n.fn.combobox=function(i){var u=Array.prototype.slice.call(arguments,1),r,f=this.each(function(){var e=n(this),f=e.data("fu.combobox"),o=typeof i=="object"&&i;f||e.data("fu.combobox",f=new t(this,o));typeof i=="string"&&(r=f[i].apply(f,u))});return r===undefined?f:r};n.fn.combobox.defaults={autoResizeMenu:!0};n.fn.combobox.Constructor=t;n.fn.combobox.noConflict=function(){return n.fn.combobox=i,this};n(document).on("mousedown.fu.combobox.data-api","[data-initialize=combobox]",function(t){var i=n(t.target).closest(".combobox");i.data("fu.combobox")||i.combobox(i.data())});n(function(){n("[data-initialize=combobox]").each(function(){var t=n(this);t.data("fu.combobox")||t.combobox(t.data())})})}(n),function(n){var e="Invalid Date",u="moment.js is not available so you cannot use this function",i=[],t=!1,s=n.fn.datepicker,o=!1,f=function(){var n,t;for(o=!0,n=0,t=i.length;n<t;n++)i[n].init.call(i[n].scope);i=[]},r;typeof define=="function"&&define.amd?require(["moment"],function(n){t=n;f()},function(n){var t=n.requireModules&&n.requireModules[0];t==="moment"&&f()}):f();r=function(r,u){this.$element=n(r);this.options=n.extend(!0,{},n.fn.datepicker.defaults,u);this.$calendar=this.$element.find(".datepicker-calendar");this.$days=this.$calendar.find(".datepicker-calendar-days");this.$header=this.$calendar.find(".datepicker-calendar-header");this.$headerTitle=this.$header.find(".title");this.$input=this.$element.find("input");this.$wheels=this.$element.find(".datepicker-wheels");this.$wheelsMonth=this.$element.find(".datepicker-wheels-month");this.$wheelsYear=this.$element.find(".datepicker-wheels-year");this.artificialScrolling=!1;this.formatDate=this.options.formatDate||this.formatDate;this.inputValue=null;this.moment=!1;this.momentFormat=null;this.parseDate=this.options.parseDate||this.parseDate;this.preventBlurHide=!1;this.restricted=this.options.restricted||[];this.restrictedParsed=[];this.restrictedText=this.options.restrictedText;this.sameYearOnly=this.options.sameYearOnly;this.selectedDate=null;this.yearRestriction=null;this.$calendar.find(".datepicker-today").on("click.fu.datepicker",n.proxy(this.todayClicked,this));this.$days.on("click.fu.datepicker","tr td button",n.proxy(this.dateClicked,this));this.$element.find(".dropdown-menu").on("mousedown.fu.datepicker",n.proxy(this.dropdownMousedown,this));this.$header.find(".next").on("click.fu.datepicker",n.proxy(this.next,this));this.$header.find(".prev").on("click.fu.datepicker",n.proxy(this.prev,this));this.$headerTitle.on("click.fu.datepicker",n.proxy(this.titleClicked,this));this.$input.on("blur.fu.datepicker",n.proxy(this.inputBlurred,this));this.$input.on("focus.fu.datepicker",n.proxy(this.inputFocused,this));this.$wheels.find(".datepicker-wheels-back").on("click.fu.datepicker",n.proxy(this.backClicked,this));this.$wheels.find(".datepicker-wheels-select").on("click.fu.datepicker",n.proxy(this.selectClicked,this));this.$wheelsMonth.on("click.fu.datepicker","ul button",n.proxy(this.monthClicked,this));this.$wheelsYear.on("click.fu.datepicker","ul button",n.proxy(this.yearClicked,this));this.$wheelsYear.find("ul").on("scroll.fu.datepicker",n.proxy(this.onYearScroll,this));var f=function(){this.checkForMomentJS()&&(t=t||window.moment,this.moment=!0,this.momentFormat=this.options.momentConfig.format,this.setCulture(this.options.momentConfig.culture));this.setRestrictedDates(this.restricted);this.setDate(this.options.date)||(this.$input.val(""),this.inputValue=this.$input.val());this.sameYearOnly&&(this.yearRestriction=this.selectedDate?this.selectedDate.getFullYear():(new Date).getFullYear())};o?f.call(this):i.push({init:f,scope:this})};r.prototype={constructor:r,backClicked:function(){this.changeView("calendar")},changeView:function(n,t){n==="wheels"?(this.$calendar.hide().attr("aria-hidden","true"),this.$wheels.show().removeAttr("aria-hidden",""),t&&this.renderWheel(t)):(this.$wheels.hide().attr("aria-hidden","true"),this.$calendar.show().removeAttr("aria-hidden",""),t&&this.renderMonth(t))},checkForMomentJS:function(){return(n.isFunction(window.moment)||typeof t!="undefined"&&n.isFunction(t))&&n.isPlainObject(this.options.momentConfig)&&this.options.momentConfig.culture&&this.options.momentConfig.format?!0:!1},dateClicked:function(t){var i=n(t.currentTarget).parents("td:first"),r;i.hasClass("restricted")||(this.$days.find("td.selected").removeClass("selected"),i.addClass("selected"),r=new Date(i.attr("data-year"),i.attr("data-month"),i.attr("data-date")),this.selectedDate=r,this.$input.val(this.formatDate(r)),this.inputValue=this.$input.val(),this.$input.focus())},destroy:function(){return this.$element.remove(),this.$days.find("tbody").empty(),this.$wheelsYear.find("ul").empty(),this.$element[0].outerHTML},disable:function(){this.$element.addClass("disabled");this.$element.find("input, button").attr("disabled","disabled");this.$element.find(".input-group-btn").removeClass("open")},dropdownMousedown:function(){var n=this;this.preventBlurHide=!0;setTimeout(function(){n.preventBlurHide=!1},0)},enable:function(){this.$element.removeClass("disabled");this.$element.find("input, button").removeAttr("disabled")},formatDate:function(n){var i=function(n){var t="0"+n;return t.substr(t.length-2)};return this.moment?t(n).format(this.momentFormat):i(n.getMonth()+1)+"/"+i(n.getDate())+"/"+n.getFullYear()},getCulture:function(){if(this.moment)return t.lang();throw u;},getDate:function(){return this.selectedDate?this.selectedDate:new Date(NaN)},getFormat:function(){if(this.moment)return this.momentFormat;throw u;},getFormattedDate:function(){return this.selectedDate?this.formatDate(this.selectedDate):e},getRestrictedDates:function(){return this.restricted},inputBlurred:function(){var t=this.$input.val(),n;t!==this.inputValue&&(n=this.setDate(t),n===null?this.$element.trigger("inputParsingFailed.fu.datepicker",t):n===!1?this.$element.trigger("inputRestrictedDate.fu.datepicker",n):this.$element.trigger("changed.fu.datepicker",n));this.preventBlurHide||this.$element.find(".input-group-btn").removeClass("open")},inputFocused:function(){this.$element.find(".input-group-btn").addClass("open")},isInvalidDate:function(n){var t=n.toString();return t===e||t==="NaN"?!0:!1},isRestricted:function(n,t,i){var e=this.restrictedParsed,f,r,o,u;if(this.sameYearOnly&&this.yearRestriction!==null&&i!==this.yearRestriction)return!0;for(f=0,o=e.length;f<o;f++)if(r=e[f].from,u=e[f].to,(i>r.year||i===r.year&&t>r.month||i===r.year&&t===r.month&&n>=r.date)&&(i<u.year||i===u.year&&t<u.month||i===u.year&&t===u.month&&n<=u.date))return!0;return!1},monthClicked:function(t){this.$wheelsMonth.find(".selected").removeClass("selected");n(t.currentTarget).parent().addClass("selected")},next:function(){var n=this.$headerTitle.attr("data-month"),t=this.$headerTitle.attr("data-year");if(n++,n>11){if(this.sameYearOnly)return;n=0;t++}this.renderMonth(new Date(t,n,1))},onYearScroll:function(t){if(!this.artificialScrolling){var i=n(t.currentTarget),o=i.css("box-sizing")==="border-box"?i.outerHeight():i.height(),f=i.get(0).scrollHeight,e=i.scrollTop(),s=o/(f-e)*100,h=e/f*100,r,u;if(h<5){for(u=parseInt(i.find("li:first").attr("data-year"),10),r=u-1;r>u-11;r--)i.prepend('<li data-year="'+r+'"><button type="button">'+r+"<\/button><\/li>");this.artificialScrolling=!0;i.scrollTop(i.get(0).scrollHeight-f+e);this.artificialScrolling=!1}else if(s>90)for(u=parseInt(i.find("li:last").attr("data-year"),10),r=u+1;r<u+11;r++)i.append('<li data-year="'+r+'"><button type="button">'+r+"<\/button><\/li>")}},parseDate:function(n){var s=this,i,o,u,f,r,e;if(n)if(this.moment)if(u=function(n,i){return i=n==="b"?t(i,s.momentFormat):t(i),i.isValid()===!0?i.toDate():new Date(NaN)},e=typeof n=="string"?["b","a"]:["a","b"],i=u(e[0],n),this.isInvalidDate(i)){if(i=u(e[1],n),!this.isInvalidDate(i))return i}else return i;else if(typeof n=="string")if(i=new Date(Date.parse(n)),this.isInvalidDate(i)){if(n=n.split("T")[0],o=/^\s*(\d{4})-(\d\d)-(\d\d)\s*$/,r=o.exec(n),r&&(f=parseInt(r[2],10),i=new Date(r[1],f-1,r[3]),f===i.getMonth()+1))return i}else return i;else if(i=new Date(n),!this.isInvalidDate(i))return i;return new Date(NaN)},prev:function(){var n=this.$headerTitle.attr("data-month"),t=this.$headerTitle.attr("data-year");if(n--,n<0){if(this.sameYearOnly)return;n=11;t--}this.renderMonth(new Date(t,n,1))},renderMonth:function(t){t=t||new Date;var h=new Date(t.getFullYear(),t.getMonth(),1).getDay(),b=new Date(t.getFullYear(),t.getMonth()+1,0).getDate(),k=new Date(t.getFullYear(),t.getMonth(),0).getDate(),d=this.$headerTitle.find(".month"),c=t.getMonth(),l=new Date,g=l.getDate(),a=l.getMonth(),s=l.getFullYear(),e=this.selectedDate,nt=this.$days.find("tbody"),v=t.getFullYear(),i,r,u,y,p,tt,o,f,w;for(e&&(e={date:e.getDate(),month:e.getMonth(),year:e.getFullYear()}),d.find(".current").removeClass("current"),d.find('span[data-month="'+c+'"]').addClass("current"),this.$headerTitle.find(".year").text(v),this.$headerTitle.attr({"data-month":c,"data-year":v}),nt.empty(),h!==0?(i=k-h+1,o=-1):(i=1,o=0),tt=b<=35-h?5:6,y=0;y<tt;y++){for(w=n("<tr><\/tr>"),p=0;p<7;p++)f=n('<td><span><button type="button" class="datepicker-date">'+i+"<\/button><\/span><\/td>"),o===-1?f.addClass("last-month"):o===1&&f.addClass("next-month"),r=c+o,u=v,r<0?(r=11,u--):r>11&&(r=0,u++),f.attr({"data-date":i,"data-month":r,"data-year":u}),u===s&&r===a&&i===g?f.addClass("current-day"):(u<s||u===s&&r<a||u===s&&r===a&&i<g)&&(f.addClass("past"),this.options.allowPastDates||f.addClass("restricted").attr("title",this.restrictedText)),this.isRestricted(i,r,u)&&f.addClass("restricted").attr("title",this.restrictedText),e&&u===e.year&&r===e.month&&i===e.date&&f.addClass("selected"),i++,o===-1&&i>k?(i=1,o=0):o===0&&i>b&&(i=1,o=1),w.append(f);nt.append(w)}},renderWheel:function(n){var o=n.getMonth(),i=this.$wheelsMonth.find("ul"),e=n.getFullYear(),t=this.$wheelsYear.find("ul"),r,u,f;for(this.sameYearOnly?(this.$wheelsMonth.addClass("full"),this.$wheelsYear.addClass("hide")):(this.$wheelsMonth.removeClass("full"),this.$wheelsYear.removeClass("hide")),i.find(".selected").removeClass("selected"),u=i.find('li[data-month="'+o+'"]'),u.addClass("selected"),i.scrollTop(i.scrollTop()+(u.position().top-i.outerHeight()/2-u.outerHeight(!0)/2)),t.empty(),r=e-10;r<e+11;r++)t.append('<li data-year="'+r+'"><button type="button">'+r+"<\/button><\/li>");f=t.find('li[data-year="'+e+'"]');f.addClass("selected");this.artificialScrolling=!0;t.scrollTop(t.scrollTop()+(f.position().top-t.outerHeight()/2-f.outerHeight(!0)/2));this.artificialScrolling=!1;u.find("button").focus()},selectClicked:function(){var n=this.$wheelsMonth.find(".selected").attr("data-month"),t=this.$wheelsYear.find(".selected").attr("data-year");this.changeView("calendar",new Date(t,n,1))},setCulture:function(n){if(!n)return!1;if(this.moment)t.lang(n);else throw u;},setDate:function(n){var t=this.parseDate(n);return this.isInvalidDate(t)?(this.selectedDate=null,this.renderMonth()):this.isRestricted(t.getDate(),t.getMonth(),t.getFullYear())?(this.selectedDate=!1,this.renderMonth()):(this.selectedDate=t,this.renderMonth(t),this.$input.val(this.formatDate(t))),this.inputValue=this.$input.val(),this.selectedDate},setFormat:function(n){if(!n)return!1;if(this.moment)this.momentFormat=n;else throw u;},setRestrictedDates:function(n){var i=[],f=this,t,r,u=function(n){return n===-Infinity?{date:-Infinity,month:-Infinity,year:-Infinity}:n===Infinity?{date:Infinity,month:Infinity,year:Infinity}:(n=f.parseDate(n),{date:n.getDate(),month:n.getMonth(),year:n.getFullYear()})};for(this.restricted=n,t=0,r=n.length;t<r;t++)i.push({from:u(n[t].from),to:u(n[t].to)});this.restrictedParsed=i},titleClicked:function(){this.changeView("wheels",new Date(this.$headerTitle.attr("data-year"),this.$headerTitle.attr("data-month"),1))},todayClicked:function(){var n=new Date;(n.getMonth()+""!==this.$headerTitle.attr("data-month")||n.getFullYear()+""!==this.$headerTitle.attr("data-year"))&&this.renderMonth(n)},yearClicked:function(t){this.$wheelsYear.find(".selected").removeClass("selected");n(t.currentTarget).parent().addClass("selected")}};n.fn.datepicker=function(t){var u=Array.prototype.slice.call(arguments,1),i,f=this.each(function(){var e=n(this),f=e.data("fu.datepicker"),o=typeof t=="object"&&t;f||e.data("fu.datepicker",f=new r(this,o));typeof t=="string"&&(i=f[t].apply(f,u))});return i===undefined?f:i};n.fn.datepicker.defaults={allowPastDates:!1,date:new Date,formatDate:null,momentConfig:{culture:"en",format:"L"},parseDate:null,restricted:[],restrictedText:"Restricted",sameYearOnly:!1};n.fn.datepicker.Constructor=r;n.fn.datepicker.noConflict=function(){return n.fn.datepicker=s,this};n(document).on("mousedown.fu.datepicker.data-api","[data-initialize=datepicker]",function(t){var i=n(t.target).closest(".datepicker");i.data("datepicker")||i.datepicker(i.data())});n(document).on("click.fu.datepicker.data-api",".datepicker .dropdown-menu",function(t){var i=n(t.target);(!i.is(".datepicker-date")||i.closest(".restricted").length)&&t.stopPropagation()});n(document).on("click.fu.datepicker.data-api",".datepicker input",function(n){n.stopPropagation()});n(function(){n("[data-initialize=datepicker]").each(function(){var t=n(this);t.data("datepicker")||t.datepicker(t.data())})})}(n),function(n){function t(t){n(t).css({visibility:"hidden"});i(t)?t.parent().addClass("dropup"):t.parent().removeClass("dropup");n(t).css({visibility:"visible"})}function i(n){var i=r(n),t={};return(t.parentHeight=n.parent().outerHeight(),t.parentOffsetTop=n.parent().offset().top,t.dropdownHeight=n.outerHeight(),t.containerHeight=i.overflowElement.outerHeight(),t.containerOffsetTop=!i.isWindow?i.overflowElement.offset().top:i.overflowElement.scrollTop(),t.fromTop=t.parentOffsetTop-t.containerOffsetTop,t.fromBottom=t.containerHeight-t.parentHeight-(t.parentOffsetTop-t.containerOffsetTop),t.dropdownHeight<t.fromBottom)?!1:t.dropdownHeight<t.fromTop?!0:t.dropdownHeight>=t.fromTop&&t.dropdownHeight>=t.fromBottom?t.fromTop>=t.fromBottom?!0:!1:void 0}function r(t){var i=window,r=!0;return n.each(t.parents(),function(t,u){if(n(u).css("overflow")!=="visible")return i=u,r=!1,!1}),{overflowElement:n(i),isWindow:r}}n(document.body).on("click.fu.dropdown-autoflip","[data-toggle=dropdown][data-flip]",function(){n(this).data().flip==="auto"&&t(n(this).next(".dropdown-menu"))});n(document.body).on("suggested.fu.pillbox",function(i,r){t(n(r));n(r).parent().addClass("open")});n.fn.dropdownautoflip=function(){}}(n),function(n){var i=n.fn.loader,t=function(t,i){this.$element=n(t);this.options=n.extend({},n.fn.loader.defaults,i);this.begin=this.$element.is("[data-begin]")?parseInt(this.$element.attr("data-begin"),10):1;this.delay=this.$element.is("[data-delay]")?parseFloat(this.$element.attr("data-delay")):150;this.end=this.$element.is("[data-end]")?parseInt(this.$element.attr("data-end"),10):8;this.frame=this.$element.is("[data-frame]")?parseInt(this.$element.attr("data-frame"),10):this.begin;this.isIElt9=!1;this.timeout={};var r=this.msieVersion();r!==!1&&r<9&&(this.$element.addClass("iefix"),this.isIElt9=!0);this.$element.attr("data-frame",this.frame+"");this.play()};t.prototype={constructor:t,destroy:function(){return this.$element.remove(),this.$element[0].outerHTML},ieRepaint:function(){this.isIElt9&&this.$element.addClass("iefix_repaint").removeClass("iefix_repaint")},msieVersion:function(){var n=window.navigator.userAgent,t=n.indexOf("MSIE ");return t>0?parseInt(n.substring(t+5,n.indexOf(".",t)),10):!1},next:function(){this.frame++;this.frame>this.end&&(this.frame=this.begin);this.$element.attr("data-frame",this.frame+"");this.ieRepaint()},pause:function(){clearTimeout(this.timeout)},play:function(){var n=this;clearTimeout(this.timeout);this.timeout=setTimeout(function(){n.next();n.play()},this.delay)},previous:function(){this.frame--;this.frame<this.begin&&(this.frame=this.end);this.$element.attr("data-frame",this.frame+"");this.ieRepaint()},reset:function(){this.frame=this.begin;this.$element.attr("data-frame",this.frame+"");this.ieRepaint()}};n.fn.loader=function(i){var u=Array.prototype.slice.call(arguments,1),r,f=this.each(function(){var e=n(this),f=e.data("fu.loader"),o=typeof i=="object"&&i;f||e.data("fu.loader",f=new t(this,o));typeof i=="string"&&(r=f[i].apply(f,u))});return r===undefined?f:r};n.fn.loader.defaults={};n.fn.loader.Constructor=t;n.fn.loader.noConflict=function(){return n.fn.loader=i,this};n(function(){n("[data-initialize=loader]").each(function(){var t=n(this);t.data("fu.loader")||t.loader(t.data())})})}(n),function(n){var i=n.fn.placard,t=function(t,i){var r=this;this.$element=n(t);this.options=n.extend({},n.fn.placard.defaults,i);this.$accept=this.$element.find(".placard-accept");this.$cancel=this.$element.find(".placard-cancel");this.$field=this.$element.find(".placard-field");this.$footer=this.$element.find(".placard-footer");this.$header=this.$element.find(".placard-header");this.$popup=this.$element.find(".placard-popup");this.actualValue=null;this.clickStamp="_";this.previousValue="";this.options.revertOnCancel===-1&&(this.options.revertOnCancel=this.$accept.length>0?!0:!1);this.$field.on("focus.fu.placard",n.proxy(this.show,this));this.$accept.on("click.fu.placard",n.proxy(this.complete,this,"accept"));this.$cancel.on("click.fu.placard",function(n){n.preventDefault();r.complete("cancel")});this.ellipsis()};t.prototype={constructor:t,complete:function(n){var i=this.options["on"+n[0].toUpperCase()+n.substring(1)],t={previousValue:this.previousValue,value:this.$field.val()};i?(i(t),this.$element.trigger(n,t)):(n==="cancel"&&this.options.revertOnCancel&&this.$field.val(this.previousValue),this.$element.trigger(n,t),this.hide())},destroy:function(){return this.$element.remove(),n(document).off("click.fu.placard.externalClick."+this.clickStamp),this.$element.find("input").each(function(){n(this).attr("value",n(this).val())}),this.$element[0].outerHTML},disable:function(){this.$element.addClass("disabled");this.$field.attr("disabled","disabled");this.hide()},ellipsis:function(){var t,i,n;if(this.$element.attr("data-ellipsis")==="true")if(t=this.$field.get(0),this.$field.is("input"))t.scrollLeft=0;else if(t.scrollTop=0,t.clientHeight<t.scrollHeight){for(this.actualValue=this.$field.val(),this.$field.val(""),n="",i=0;t.clientHeight>=t.scrollHeight;)n+=this.actualValue[i],this.$field.val(n+"..."),i++;n=n.length>0?n.substring(0,n.length-1):"";this.$field.val(n+"...")}},enable:function(){this.$element.removeClass("disabled");this.$field.removeAttr("disabled")},externalClickListener:function(n,t){(t===!0||this.isExternalClick(n))&&this.complete(this.options.externalClickAction)},getValue:function(){return this.actualValue!==null?this.actualValue:this.$field.val()},hide:function(){this.$element.hasClass("showing")&&(this.$element.removeClass("showing"),this.ellipsis(),n(document).off("click.fu.placard.externalClick."+this.clickStamp),this.$element.trigger("hidden.fu.placard"))},isExternalClick:function(t){var f=this.$element.get(0),r=this.options.externalClickExceptions||[],u=n(t.target),i,e;if(t.target===f||u.parents(".placard:first").get(0)===f)return!1;for(i=0,e=r.length;i<e;i++)if(u.is(r[i])||u.parents(r[i]).length>0)return!1;return!0},setValue:function(n){this.$field.val(n);this.$element.hasClass("showing")||this.ellipsis()},show:function(){var t;if(!this.$element.hasClass("showing")){if(t=n(document).find(".placard.showing"),t.length>0){if(t.data("fu.placard")&&t.data("fu.placard").options.explicit)return;t.placard("externalClickListener",{},!0)}if(this.previousValue=this.$field.val(),this.$element.addClass("showing"),this.actualValue!==null&&(this.$field.val(this.actualValue),this.actualValue=null),this.$header.length>0&&this.$popup.css("top","-"+this.$header.outerHeight(!0)+"px"),this.$footer.length>0&&this.$popup.css("bottom","-"+this.$footer.outerHeight(!0)+"px"),this.$element.trigger("shown.fu.placard"),this.clickStamp=(new Date).getTime()+(Math.floor(Math.random()*100)+1),!this.options.explicit)n(document).on("click.fu.placard.externalClick."+this.clickStamp,n.proxy(this.externalClickListener,this))}}};n.fn.placard=function(i){var u=Array.prototype.slice.call(arguments,1),r,f=this.each(function(){var e=n(this),f=e.data("fu.placard"),o=typeof i=="object"&&i;f||e.data("fu.placard",f=new t(this,o));typeof i=="string"&&(r=f[i].apply(f,u))});return r===undefined?f:r};n.fn.placard.defaults={onAccept:undefined,onCancel:undefined,externalClickAction:"cancel",externalClickExceptions:[],explicit:!1,revertOnCancel:-1};n.fn.placard.Constructor=t;n.fn.placard.noConflict=function(){return n.fn.placard=i,this};n(document).on("focus.fu.placard.data-api","[data-initialize=placard]",function(t){var i=n(t.target).closest(".placard");i.data("fu.placard")||i.placard(i.data())});n(function(){n("[data-initialize=placard]").each(function(){var t=n(this);t.data("fu.placard")||t.placard(t.data())})})}(n),function(n){var i=n.fn.radio,t=function(t,i){this.options=n.extend({},n.fn.radio.defaults,i);this.$radio=n(t).is('input[type="radio"]')?n(t):n(t).find('input[type="radio"]:first');this.$label=this.$radio.parent();this.groupName=this.$radio.attr("name");this.$parent=this.$label.parent(".radio");this.$toggleContainer=null;this.$parent.length===0&&(this.$parent=null);var r=this.$radio.attr("data-toggle");r&&(this.$toggleContainer=n(r));this.setState(this.$radio);this.$radio.on("change.fu.radio",n.proxy(this.itemchecked,this))};t.prototype={constructor:t,destroy:function(){return this.$parent.remove(),this.$parent[0].outerHTML},setState:function(n){n=n||this.$radio;var t=n.is(":checked"),i=!!n.prop("disabled");this.$label.removeClass("checked");this.$parent&&this.$parent.removeClass("checked disabled");t===!0&&(this.$label.addClass("checked"),this.$parent&&this.$parent.addClass("checked"));i===!0&&(this.$label.addClass("disabled"),this.$parent&&this.$parent.addClass("disabled"));this.toggleContainer()},resetGroup:function(){var t=n('input[name="'+this.groupName+'"]');t.each(function(){var t=n(this).parent("label");t.removeClass("checked");t.parent(".radio").removeClass("checked")})},enable:function(){this.$radio.attr("disabled",!1);this.$label.removeClass("disabled");this.$parent&&this.$parent.removeClass("disabled")},disable:function(){this.$radio.attr("disabled",!0);this.$label.addClass("disabled");this.$parent&&this.$parent.addClass("disabled")},itemchecked:function(t){var i=n(t.target);this.resetGroup();this.setState(i)},check:function(){this.resetGroup();this.$radio.prop("checked",!0);this.setState(this.$radio)},toggleContainer:function(){var t;this.$toggleContainer&&(this.isChecked()?(t=n('input[name="'+this.groupName+'"]'),t.each(function(){var t=n(this).attr("data-toggle");n(t).addClass("hide");n(t).attr("aria-hidden","true")}),this.$toggleContainer.removeClass("hide"),this.$toggleContainer.attr("aria-hidden","false")):(this.$toggleContainer.addClass("hide"),this.$toggleContainer.attr("aria-hidden","true")))},uncheck:function(){this.$radio.prop("checked",!1);this.setState(this.$radio)},isChecked:function(){return this.$radio.is(":checked")}};n.fn.radio=function(i){var u=Array.prototype.slice.call(arguments,1),r,f=this.each(function(){var e=n(this),f=e.data("fu.radio"),o=typeof i=="object"&&i;f||e.data("fu.radio",f=new t(this,o));typeof i=="string"&&(r=f[i].apply(f,u))});return r===undefined?f:r};n.fn.radio.defaults={};n.fn.radio.Constructor=t;n.fn.radio.noConflict=function(){return n.fn.radio=i,this};n(document).on("mouseover.fu.checkbox.data-api","[data-initialize=radio]",function(t){var i=n(t.target).closest(".radio").find("[type=radio]");i.data("fu.radio")||i.radio(i.data())});n(function(){n("[data-initialize=radio] [type=radio]").each(function(){var t=n(this);t.data("fu.radio")||t.radio(t.data())})})}(n),function(n){var i=n.fn.search,t=function(t,i){this.$element=n(t);this.options=n.extend({},n.fn.search.defaults,i);this.$button=this.$element.find("button");this.$input=this.$element.find("input");this.$icon=this.$element.find(".glyphicon");this.$button.on("click.fu.search",n.proxy(this.buttonclicked,this));this.$input.on("keydown.fu.search",n.proxy(this.keypress,this));this.$input.on("keyup.fu.search",n.proxy(this.keypressed,this));this.activeSearch=""};t.prototype={constructor:t,destroy:function(){return this.$element.remove(),this.$element.find("input").each(function(){n(this).attr("value",n(this).val())}),this.$element[0].outerHTML},search:function(n){this.$icon.hasClass("glyphicon")&&this.$icon.removeClass("glyphicon-search").addClass("glyphicon-remove");this.activeSearch=n;this.$element.addClass("searched");this.$element.trigger("searched.fu.search",n)},clear:function(){this.$icon.hasClass("glyphicon")&&this.$icon.removeClass("glyphicon-remove").addClass("glyphicon-search");this.activeSearch="";this.$input.val("");this.$element.removeClass("searched");this.$element.trigger("cleared.fu.search")},action:function(){var n=this.$input.val(),t=n===""||n===this.activeSearch;this.activeSearch&&t?this.clear():n&&this.search(n)},buttonclicked:function(t){(t.preventDefault(),n(t.currentTarget).is(".disabled, :disabled"))||this.action()},keypress:function(n){n.which===13&&n.preventDefault()},keypressed:function(n){var t,i;n.which===13?(n.preventDefault(),this.action()):(t=this.$input.val(),i=t&&t===this.activeSearch,this.$icon.attr("class",i?"glyphicon glyphicon-remove":"glyphicon glyphicon-search"))},disable:function(){this.$element.addClass("disabled");this.$input.attr("disabled","disabled");this.$button.addClass("disabled")},enable:function(){this.$element.removeClass("disabled");this.$input.removeAttr("disabled");this.$button.removeClass("disabled")}};n.fn.search=function(i){var u=Array.prototype.slice.call(arguments,1),r,f=this.each(function(){var e=n(this),f=e.data("fu.search"),o=typeof i=="object"&&i;f||e.data("fu.search",f=new t(this,o));typeof i=="string"&&(r=f[i].apply(f,u))});return r===undefined?f:r};n.fn.search.defaults={};n.fn.search.Constructor=t;n.fn.search.noConflict=function(){return n.fn.search=i,this};n(document).on("mousedown.fu.search.data-api","[data-initialize=search]",function(t){var i=n(t.target).closest(".search");i.data("fu.search")||i.search(i.data())});n(function(){n("[data-initialize=search]").each(function(){var t=n(this);t.data("fu.search")||t.search(t.data())})})}(n),function(n){var i=n.fn.selectlist,t=function(t,i){this.$element=n(t);this.options=n.extend({},n.fn.selectlist.defaults,i);this.$button=this.$element.find(".btn.dropdown-toggle");this.$hiddenField=this.$element.find(".hidden-field");this.$label=this.$element.find(".selected-label");this.$element.on("click.fu.selectlist",".dropdown-menu a",n.proxy(this.itemClicked,this));this.setDefaultSelection();i.resize==="auto"&&this.resize()};t.prototype={constructor:t,destroy:function(){return this.$element.remove(),this.$element[0].outerHTML},doSelect:function(t){var i;this.$selectedItem=i=t;this.$hiddenField.val(this.$selectedItem.attr("data-value"));this.$label.html(n(this.$selectedItem.children()[0]).html());this.$element.find("li").each(function(){i.is(n(this))?n(this).attr("data-selected",!0):n(this).removeData("selected").removeAttr("data-selected")})},itemClicked:function(t){this.$element.trigger("clicked.fu.selectlist",this.$selectedItem);t.preventDefault();n(t.target).parent().is(this.$selectedItem)||this.itemChanged(t);this.$element.find(".dropdown-toggle").focus()},itemChanged:function(t){this.doSelect(n(t.target).parent());var i=this.selectedItem();this.$element.trigger("changed.fu.selectlist",i)},resize:function(){var i=0,t=n("<div/>").addClass("selectlist-sizer"),r=0;Boolean(n(document).find("html").hasClass("fuelux"))?n(document.body).append(t):n(".fuelux:first").append(t);this.$element.find("a").each(function(){t.text(n(this).text());i=t.outerWidth();i>r&&(r=i)});t.remove();this.$label.width(r)},selectedItem:function(){var t=this.$selectedItem.text();return n.extend({text:t},this.$selectedItem.data())},selectByText:function(t){var i=n([]);this.$element.find("li").each(function(){if((this.textContent||this.innerText||n(this).text()||"").toLowerCase()===(t||"").toLowerCase())return i=n(this),!1});this.doSelect(i)},selectByValue:function(n){var t='li[data-value="'+n+'"]';this.selectBySelector(t)},selectByIndex:function(n){var t="li:eq("+n+")";this.selectBySelector(t)},selectBySelector:function(n){var t=this.$element.find(n);this.doSelect(t)},setDefaultSelection:function(){var n=this.$element.find("li[data-selected=true]").eq(0);n.length===0&&(n=this.$element.find("li").has("a").eq(0));this.doSelect(n)},enable:function(){this.$element.removeClass("disabled");this.$button.removeClass("disabled")},disable:function(){this.$element.addClass("disabled");this.$button.addClass("disabled")}};n.fn.selectlist=function(i){var u=Array.prototype.slice.call(arguments,1),r,f=this.each(function(){var e=n(this),f=e.data("fu.selectlist"),o=typeof i=="object"&&i;f||e.data("fu.selectlist",f=new t(this,o));typeof i=="string"&&(r=f[i].apply(f,u))});return r===undefined?f:r};n.fn.selectlist.defaults={};n.fn.selectlist.Constructor=t;n.fn.selectlist.noConflict=function(){return n.fn.selectlist=i,this};n(document).on("mousedown.fu.selectlist.data-api","[data-initialize=selectlist]",function(t){var i=n(t.target).closest(".selectlist");i.data("fu.selectlist")||i.selectlist(i.data())});n(function(){n("[data-initialize=selectlist]").each(function(){var t=n(this);t.data("fu.selectlist")||t.selectlist(t.data())})})}(n),function(n){var i=n.fn.spinbox,t=function(t,i){this.$element=n(t);this.options=n.extend({},n.fn.spinbox.defaults,i);this.$input=this.$element.find(".spinbox-input");this.$element.on("focusin.fu.spinbox",this.$input,n.proxy(this.changeFlag,this));this.$element.on("focusout.fu.spinbox",this.$input,n.proxy(this.change,this));this.$element.on("keydown.fu.spinbox",this.$input,n.proxy(this.keydown,this));this.$element.on("keyup.fu.spinbox",this.$input,n.proxy(this.keyup,this));if(this.bindMousewheelListeners(),this.mousewheelTimeout={},this.options.hold){this.$element.on("mousedown.fu.spinbox",".spinbox-up",n.proxy(function(){this.startSpin(!0)},this));this.$element.on("mouseup.fu.spinbox",".spinbox-up, .spinbox-down",n.proxy(this.stopSpin,this));this.$element.on("mouseout.fu.spinbox",".spinbox-up, .spinbox-down",n.proxy(this.stopSpin,this));this.$element.on("mousedown.fu.spinbox",".spinbox-down",n.proxy(function(){this.startSpin(!1)},this))}else{this.$element.on("click.fu.spinbox",".spinbox-up",n.proxy(function(){this.step(!0)},this));this.$element.on("click.fu.spinbox",".spinbox-down",n.proxy(function(){this.step(!1)},this))}this.switches={count:1,enabled:!0};this.switches.speed=this.options.speed==="medium"?300:this.options.speed==="fast"?100:500;this.lastValue=this.options.value;this.render();this.options.disabled&&this.disable()};t.prototype={constructor:t,destroy:function(){return this.$element.remove(),this.$element.find("input").each(function(){n(this).attr("value",n(this).val())}),this.$element[0].outerHTML},render:function(){var t=this.parseInput(this.$input.val()),i="";t!==""&&this.options.value===0?this.value(t):this.output(this.options.value);this.options.units.length&&n.each(this.options.units,function(n,t){t.length>i.length&&(i=t)})},output:function(n,t){return n=(n+"").split(".").join(this.options.decimalMark),t=t||!0,t&&this.$input.val(n),n},parseInput:function(n){return(n+"").split(this.options.decimalMark).join(".")},change:function(){var n=this.parseInput(this.$input.val())||"";this.options.units.length||this.options.decimalMark!=="."?n=this.parseValueWithUnit(n):n/1?n=this.options.value=this.checkMaxMin(n/1):(n=this.checkMaxMin(n.replace(/[^0-9.-]/g,"")||""),this.options.value=n/1);this.output(n);this.changeFlag=!1;this.triggerChangedEvent()},changeFlag:function(){this.changeFlag=!0},stopSpin:function(){this.switches.timeout!==undefined&&(clearTimeout(this.switches.timeout),this.switches.count=1,this.triggerChangedEvent())},triggerChangedEvent:function(){var n=this.value();n!==this.lastValue&&(this.lastValue=n,this.$element.trigger("changed.fu.spinbox",this.output(n,!1)))},startSpin:function(t){if(!this.options.disabled){var i=this.switches.count;i===1?(this.step(t),i=1):i=i<3?1.5:i<8?2.5:4;this.switches.timeout=setTimeout(n.proxy(function(){this.iterate(t)},this),this.switches.speed/i);this.switches.count++}},iterate:function(n){this.step(n);this.startSpin(n)},step:function(n){var f,u,r,t,i,e;this.changeFlag&&this.change();r=this.options.value;t=n?this.options.max:this.options.min;(n?r<t:r>t)?(i=r+(n?1:-1)*this.options.step,this.options.step%1!=0&&(f=(this.options.step+"").split(".")[1].length,u=Math.pow(10,f),i=Math.round(i*u)/u),(n?i>t:i<t)?this.value(t):this.value(i)):this.options.cycle&&(e=n?this.options.min:this.options.max,this.value(e))},value:function(n){if(n||n===0){if(this.options.units.length||this.options.decimalMark!==".")return this.output(this.parseValueWithUnit(n+(this.unit||""))),this;if(!isNaN(parseFloat(n))&&isFinite(n))return this.options.value=n/1,this.output(n+(this.unit?this.unit:"")),this}else return this.changeFlag&&this.change(),this.unit?this.options.value+this.unit:this.output(this.options.value,!1)},isUnitLegal:function(t){var i;return n.each(this.options.units,function(n,r){if(r.toLowerCase()===t.toLowerCase())return i=t.toLowerCase(),!1}),i},parseValueWithUnit:function(n){var t=n.replace(/[^a-zA-Z]/g,""),i=n.replace(/[^0-9.-]/g,"");return t&&(t=this.isUnitLegal(t)),this.options.value=this.checkMaxMin(i/1),this.unit=t||undefined,this.options.value+(t||"")},checkMaxMin:function(n){return isNaN(parseFloat(n))?n:(n<=this.options.max&&n>=this.options.min||(n=n>=this.options.max?this.options.max:this.options.min),n)},disable:function(){this.options.disabled=!0;this.$element.addClass("disabled");this.$input.attr("disabled","");this.$element.find("button").addClass("disabled")},enable:function(){this.options.disabled=!1;this.$element.removeClass("disabled");this.$input.removeAttr("disabled");this.$element.find("button").removeClass("disabled")},keydown:function(n){var t=n.keyCode;t===38?this.step(!0):t===40&&this.step(!1)},keyup:function(n){var t=n.keyCode;(t===38||t===40)&&this.triggerChangedEvent()},bindMousewheelListeners:function(){var t=this.$input.get(0);t.addEventListener?(t.addEventListener("mousewheel",n.proxy(this.mousewheelHandler,this),!1),t.addEventListener("DOMMouseScroll",n.proxy(this.mousewheelHandler,this),!1)):t.attachEvent("onmousewheel",n.proxy(this.mousewheelHandler,this))},mousewheelHandler:function(n){var t=window.event||n,i=Math.max(-1,Math.min(1,t.wheelDelta||-t.detail)),r=this;return clearTimeout(this.mousewheelTimeout),this.mousewheelTimeout=setTimeout(function(){r.triggerChangedEvent()},300),i<0?this.step(!0):this.step(!1),t.preventDefault?t.preventDefault():t.returnValue=!1,!1}};n.fn.spinbox=function(i){var u=Array.prototype.slice.call(arguments,1),r,f=this.each(function(){var e=n(this),f=e.data("fu.spinbox"),o=typeof i=="object"&&i;f||e.data("fu.spinbox",f=new t(this,o));typeof i=="string"&&(r=f[i].apply(f,u))});return r===undefined?f:r};n.fn.spinbox.defaults={value:0,min:0,max:999,step:1,hold:!0,speed:"medium",disabled:!1,cycle:!1,units:[],decimalMark:"."};n.fn.spinbox.Constructor=t;n.fn.spinbox.noConflict=function(){return n.fn.spinbox=i,this};n(document).on("mousedown.fu.spinbox.data-api","[data-initialize=spinbox]",function(t){var i=n(t.target).closest(".spinbox");i.data("fu.spinbox")||i.spinbox(i.data())});n(function(){n("[data-initialize=spinbox]").each(function(){var t=n(this);t.data("fu.spinbox")||t.spinbox(t.data())})})}(n),function(n){var i=n.fn.tree,t=function(t,i){this.$element=n(t);this.options=n.extend({},n.fn.tree.defaults,i);this.$element.on("click.fu.tree",".tree-item",n.proxy(function(n){this.selectItem(n.currentTarget)},this));this.$element.on("click.fu.tree",".tree-branch-name",n.proxy(function(n){this.openFolder(n.currentTarget)},this));if(this.options.folderSelect){this.$element.off("click.fu.tree",".tree-branch-name");this.$element.on("click.fu.tree",".icon-caret",n.proxy(function(t){this.openFolder(n(t.currentTarget).parent())},this));this.$element.on("click.fu.tree",".tree-branch-name",n.proxy(function(t){this.selectFolder(n(t.currentTarget))},this))}this.render()};t.prototype={constructor:t,destroy:function(){return this.$element.find("li:not([data-template])").remove(),this.$element.remove(),this.$element[0].outerHTML},render:function(){this.populate(this.$element)},populate:function(t){var r=this,i=t.hasClass("tree")?t:t.parent(),u=i.find(".tree-loader:eq(0)");u.removeClass("hide");this.options.dataSource(this.options.folderSelect?i.data():t.data(),function(f){u.addClass("hide");n.each(f.data,function(u,f){var e,o;f.type==="folder"?(e=r.$element.find("[data-template=treebranch]:eq(0)").clone().removeClass("hide").removeAttr("data-template"),e.data(f),e.find(".tree-branch-name > .tree-label").html(f.name)):f.type==="item"&&(e=r.$element.find("[data-template=treeitem]:eq(0)").clone().removeClass("hide").removeAttr("data-template"),e.find(".tree-item-name > .tree-label").html(f.name),e.data(f));o=f.dataAttributes||[];n.each(o,function(n,t){switch(n){case"class":case"classes":case"className":e.addClass(t);break;case"data-icon":e.find(".icon-item").removeClass().addClass("icon-item "+t);e.attr(n,t);break;case"id":e.attr(n,t);e.attr("aria-labelledby",t+"-label");e.find(".tree-branch-name > .tree-label").attr("id",t+"-label");break;default:e.attr(n,t)}});t.hasClass("tree-branch-header")?i.find(".tree-branch-children:eq(0)").append(e):t.append(e)});r.$element.trigger("loaded.fu.tree",i)})},selectItem:function(t){var i=n(t),f=this.$element.find(".tree-selected"),r=[],u=i.find(".icon-item"),e;this.options.multiSelect?n.each(f,function(t,u){var f=n(u);f[0]!==i[0]&&r.push(n(u).data())}):f[0]!==i[0]&&(f.removeClass("tree-selected").find(".glyphicon").removeClass("glyphicon-ok").addClass("fueluxicon-bullet"),r.push(i.data()));e="selected";i.hasClass("tree-selected")?(e="unselected",i.removeClass("tree-selected"),(u.hasClass("glyphicon-ok")||u.hasClass("fueluxicon-bullet"))&&u.removeClass("glyphicon-ok").addClass("fueluxicon-bullet")):(i.addClass("tree-selected"),(u.hasClass("glyphicon-ok")||u.hasClass("fueluxicon-bullet"))&&u.removeClass("fueluxicon-bullet").addClass("glyphicon-ok"),this.options.multiSelect&&r.push(i.data()));r.length&&this.$element.trigger("selected",{selected:r});i.trigger("updated.fu.tree",{selected:r,item:i,eventType:e})},openFolder:function(t){var r=n(t),i,u,f,e,s,o;this.options.folderSelect||(r=n(t).parent());i=r.closest(".tree-branch");u=i.find(".tree-branch-children");f=u.eq(0);r.find(".glyphicon-folder-close").length?(e="opened",s=".glyphicon-folder-close",o="glyphicon-folder-open",i.addClass("tree-open"),i.attr("aria-expanded","true"),f.removeClass("hide"),u.children().length||this.populate(u)):r.find(".glyphicon-folder-open")&&(e="closed",s=".glyphicon-folder-open",o="glyphicon-folder-close",i.removeClass("tree-open"),i.attr("aria-expanded","false"),f.addClass("hide"),this.options.cacheItems||f.empty());i.find("> .tree-branch-header .icon-folder").eq(0).removeClass("glyphicon-folder-close glyphicon-folder-open").addClass(o);this.$element.trigger(e,i.data())},selectFolder:function(t){var i=n(t),u=i.closest(".tree-branch"),f=this.$element.find(".tree-branch.tree-selected"),r=[],e="selected";u.hasClass("tree-selected")?(e="unselected",u.removeClass("tree-selected")):u.addClass("tree-selected");this.options.multiSelect?(f=this.$element.find(".tree-branch.tree-selected"),n.each(f,function(t,u){var f=n(u);f[0]!==i[0]&&r.push(n(u).data())})):f[0]!==i[0]&&(f.removeClass("tree-selected"),r.push(u.data()));r.length&&this.$element.trigger("selected.fu.tree",{selected:r});i.trigger("updated.fu.tree",{selected:r,item:i,eventType:e})},selectedItems:function(){var i=this.$element.find(".tree-selected"),t=[];return n.each(i,function(i,r){t.push(n(r).data())}),t},collapse:function(){var t=this.options.cacheItems;this.$element.find(".icon-folder-open").each(function(){var r=n(this).removeClass("icon-folder-close icon-folder-open").addClass("icon-folder-close"),u=r.parent().parent(),i=u.children(".tree-branch-children");i.addClass("hide");t||i.empty()})}};n.fn.tree=function(i){var u=Array.prototype.slice.call(arguments,1),r,f=this.each(function(){var e=n(this),f=e.data("fu.tree"),o=typeof i=="object"&&i;f||e.data("fu.tree",f=new t(this,o));typeof i=="string"&&(r=f[i].apply(f,u))});return r===undefined?f:r};n.fn.tree.defaults={dataSource:function(){},multiSelect:!1,cacheItems:!0,folderSelect:!0};n.fn.tree.Constructor=t;n.fn.tree.noConflict=function(){return n.fn.tree=i,this}}(n),function(n){var i=n.fn.wizard,t=function(t,i){var r;this.$element=n(t);this.options=n.extend({},n.fn.wizard.defaults,i);this.options.disablePreviousStep=this.$element.attr("data-restrict")==="previous"?!0:this.options.disablePreviousStep;this.currentStep=this.options.selectedItem.step;this.numSteps=this.$element.find(".steps li").length;this.$prevBtn=this.$element.find("button.btn-prev");this.$nextBtn=this.$element.find("button.btn-next");r=this.$nextBtn.children().detach();this.nextText=n.trim(this.$nextBtn.text());this.$nextBtn.append(r);this.$prevBtn.on("click.fu.wizard",n.proxy(this.previous,this));this.$nextBtn.on("click.fu.wizard",n.proxy(this.next,this));this.$element.on("click.fu.wizard","li.complete",n.proxy(this.stepclicked,this));this.selectedItem(this.options.selectedItem);this.options.disablePreviousStep&&(this.$prevBtn.attr("disabled",!0),this.$element.find(".steps").addClass("previous-disabled"))};t.prototype={constructor:t,destroy:function(){return this.$element.remove(),this.$element[0].outerHTML},addSteps:function(t){var i=[].slice.call(arguments).slice(1),o=this.$element.find(".steps"),s=this.$element.find(".step-content"),r,h,e,c,u,f;for(t=t===-1||t>this.numSteps+1?this.numSteps+1:t,i[0]instanceof Array&&(i=i[0]),u=o.find("li:nth-child("+t+")"),c=s.find(".step-pane:nth-child("+t+")"),u.length<1&&(u=null),r=0,h=i.length;r<h;r++)f=n('<li data-step="'+t+'"><span class="badge badge-info"><\/span><\/li>'),f.append(i[r].label||"").append('<span class="chevron"><\/span>'),f.find(".badge").append(i[r].badge||t),e=n('<div class="step-pane" data-step="'+t+'"><\/div>'),e.append(i[r].pane||""),u?(u.before(f),c.before(e)):(o.append(f),s.append(e)),t++;this.syncSteps();this.numSteps=o.find("li").length;this.setState()},removeSteps:function(t,i){var f="nextAll",e=0,r=this.$element.find(".steps"),o=this.$element.find(".step-content"),u;i=i!==undefined?i:1;t>r.find("li").length?u=r.find("li:last"):(u=r.find("li:nth-child("+t+")").prev(),u.length<1&&(f="children",u=r));u[f]().each(function(){var t=n(this),r=t.attr("data-step");if(e<i)t.remove(),o.find('.step-pane[data-step="'+r+'"]:first').remove();else return!1;e++});this.syncSteps();this.numSteps=r.find("li").length;this.setState()},setState:function(){var p=this.currentStep>1,w=this.currentStep===1,b=this.currentStep===this.numSteps,f,e,c,o,l,s,a,i,h,v,r,u,t,y;this.options.disablePreviousStep||this.$prevBtn.attr("disabled",w===!0||p===!1);f=this.$nextBtn.attr("data-last");f&&(this.lastText=f,e=this.nextText,b===!0?(e=this.lastText,this.$element.addClass("complete")):this.$element.removeClass("complete"),c=this.$nextBtn.children().detach(),this.$nextBtn.text(e).append(c));o=this.$element.find(".steps li");o.removeClass("active").removeClass("complete");o.find("span.badge").removeClass("badge-info").removeClass("badge-success");l=".steps li:lt("+(this.currentStep-1)+")";s=this.$element.find(l);s.addClass("complete");s.find("span.badge").addClass("badge-success");a=".steps li:eq("+(this.currentStep-1)+")";i=this.$element.find(a);i.addClass("active");i.find("span.badge").addClass("badge-info");h=this.$element.find(".step-content");v=i.attr("data-step");h.find(".step-pane").removeClass("active");h.find('.step-pane[data-step="'+v+'"]:first').addClass("active");this.$element.find(".steps").first().attr("style","margin-left: 0");r=0;this.$element.find(".steps > li").each(function(){r+=n(this).outerWidth()});u=0;u=this.$element.find(".actions").length?this.$element.width()-this.$element.find(".actions").first().outerWidth():this.$element.width();r>u&&(t=r-u,this.$element.find(".steps").first().attr("style","margin-left: -"+t+"px"),this.$element.find("li.active").first().position().left<200&&(t+=this.$element.find("li.active").first().position().left-200,t<1?this.$element.find(".steps").first().attr("style","margin-left: 0"):this.$element.find(".steps").first().attr("style","margin-left: -"+t+"px")));typeof this.initialized!="undefined"&&(y=n.Event("changed.fu.wizard"),this.$element.trigger(y,{step:this.currentStep}));this.initialized=!0},stepclicked:function(t){var f=n(t.currentTarget),i=this.$element.find(".steps li").index(f),u=!0,r;if(this.options.disablePreviousStep&&i<this.currentStep&&(u=!1),u){if(r=n.Event("stepclicked.fu.wizard"),this.$element.trigger(r,{step:i+1}),r.isDefaultPrevented())return;this.currentStep=i+1;this.setState()}},syncSteps:function(){var t=1,i=this.$element.find(".steps"),r=this.$element.find(".step-content");i.children().each(function(){var i=n(this),u=i.find(".badge"),f=i.attr("data-step");isNaN(parseInt(u.html(),10))||u.html(t);i.attr("data-step",t);r.find('.step-pane[data-step="'+f+'"]:last').attr("data-step",t);t++})},previous:function(){var i=this.currentStep>1,t;if(this.options.disablePreviousStep&&(i=!1),i){if(t=n.Event("actionclicked.fu.wizard"),this.$element.trigger(t,{step:this.currentStep,direction:"previous"}),t.isDefaultPrevented())return;this.currentStep-=1;this.setState()}this.$prevBtn.is(":disabled")?this.$nextBtn.focus():this.$prevBtn.focus()},next:function(){var i=this.currentStep+1<=this.numSteps,r=this.currentStep===this.numSteps,t;if(i){if(t=n.Event("actionclicked.fu.wizard"),this.$element.trigger(t,{step:this.currentStep,direction:"next"}),t.isDefaultPrevented())return;this.currentStep+=1;this.setState()}else r&&this.$element.trigger("finished.fu.wizard");this.$nextBtn.is(":disabled")?this.$prevBtn.focus():this.$nextBtn.focus()},selectedItem:function(n){var i,t;return n?(t=n.step||-1,t>=1&&t<=this.numSteps?(this.currentStep=t,this.setState()):(t=this.$element.find(".steps li.active:first").attr("data-step"),isNaN(t)||(this.currentStep=parseInt(t,10),this.setState())),i=this):i={step:this.currentStep},i}};n.fn.wizard=function(i){var u=Array.prototype.slice.call(arguments,1),r,f=this.each(function(){var e=n(this),f=e.data("fu.wizard"),o=typeof i=="object"&&i;f||e.data("fu.wizard",f=new t(this,o));typeof i=="string"&&(r=f[i].apply(f,u))});return r===undefined?f:r};n.fn.wizard.defaults={disablePreviousStep:!1,selectedItem:{step:-1}};n.fn.wizard.Constructor=t;n.fn.wizard.noConflict=function(){return n.fn.wizard=i,this};n(document).on("mouseover.fu.wizard.data-api","[data-initialize=wizard]",function(t){var i=n(t.target).closest(".wizard");i.data("fu.wizard")||i.wizard(i.data())});n(function(){n("[data-initialize=wizard]").each(function(){var t=n(this);t.data("fu.wizard")||t.wizard(t.data())})})}(n),function(n){var i=n.fn.infinitescroll,t=function(t,i){this.$element=n(t);this.$element.addClass("infinitescroll");this.options=n.extend({},n.fn.infinitescroll.defaults,i);this.curScrollTop=this.$element.scrollTop();this.curPercentage=this.getPercentage();this.fetchingData=!1;this.$element.on("scroll.fu.infinitescroll",n.proxy(this.onScroll,this));this.onScroll()};t.prototype={constructor:t,destroy:function(){return this.$element.remove(),this.$element.empty(),this.$element[0].outerHTML},disable:function(){this.$element.off("scroll.fu.infinitescroll")},enable:function(){this.$element.on("scroll.fu.infinitescroll",n.proxy(this.onScroll,this))},end:function(t){var i=n('<div class="infinitescroll-end"><\/div>');t?i.append(t):i.append("---------");this.$element.append(i);this.disable()},getPercentage:function(){var n=this.$element.css("box-sizing")==="border-box"?this.$element.outerHeight():this.$element.height(),t=this.$element.get(0).scrollHeight;return t>n?n/(t-this.curScrollTop)*100:0},fetchData:function(t){var u=n('<div class="infinitescroll-load"><\/div>'),i=this,r,f=function(){var r={percentage:i.curPercentage,scrollTop:i.curScrollTop},t=n('<div class="loader"><\/div>');u.append(t);t.loader();i.options.dataSource&&i.options.dataSource(r,function(n){var t;u.remove();n.content&&i.$element.append(n.content);n.end&&(t=n.end!==!0?n.end:undefined,i.end(t));i.fetchingData=!1})};if(this.fetchingData=!0,this.$element.append(u),this.options.hybrid&&t!==!0){r=n('<button type="button" class="btn btn-primary"><\/button>');typeof this.options.hybrid=="object"?r.append(this.options.hybrid.label):r.append('<span class="glyphicon glyphicon-repeat"><\/span>');r.on("click.fu.infinitescroll",function(){r.remove();f()});u.append(r)}else f()},onScroll:function(){this.curScrollTop=this.$element.scrollTop();this.curPercentage=this.getPercentage();!this.fetchingData&&this.curPercentage>=this.options.percentage&&this.fetchData()}};n.fn.infinitescroll=function(i){var u=Array.prototype.slice.call(arguments,1),r,f=this.each(function(){var e=n(this),f=e.data("fu.infinitescroll"),o=typeof i=="object"&&i;f||e.data("fu.infinitescroll",f=new t(this,o));typeof i=="string"&&(r=f[i].apply(f,u))});return r===undefined?f:r};n.fn.infinitescroll.defaults={dataSource:null,hybrid:!1,percentage:95};n.fn.infinitescroll.Constructor=t;n.fn.infinitescroll.noConflict=function(){return n.fn.infinitescroll=i,this}}(n),function(n){var i=n.fn.pillbox,t=function(t,i){this.$element=n(t);this.$moreCount=this.$element.find(".pillbox-more-count");this.$pillGroup=this.$element.find(".pill-group");this.$addItem=this.$element.find(".pillbox-add-item");this.$addItemWrap=this.$addItem.parent();this.$suggest=this.$element.find(".suggest");this.$pillHTML='<li class="btn btn-default pill">\t<span><\/span>\t<span class="glyphicon glyphicon-close">\t\t<span class="sr-only">Remove<\/span>\t<\/span><\/li>';this.options=n.extend({},n.fn.pillbox.defaults,i);this.options.readonly===-1?this.$element.attr("data-readonly")!==undefined&&this.readonly(!0):this.options.readonly&&this.readonly(!0);this.acceptKeyCodes=this._generateObject(this.options.acceptKeyCodes);this.$element.on("click.fu.pillbox",".pill-group > .pill",n.proxy(this.itemClicked,this));this.$element.on("click.fu.pillbox",n.proxy(this.inputFocus,this));this.$element.on("keydown.fu.pillbox",".pillbox-add-item",n.proxy(this.inputEvent,this));if(this.options.onKeyDown)this.$element.on("mousedown.fu.pillbox",".suggest > li",n.proxy(this.suggestionClick,this));if(this.options.edit){this.$element.addClass("pills-editable");this.$element.on("blur.fu.pillbox",".pillbox-add-item",n.proxy(this.cancelEdit,this))}};t.prototype={constructor:t,destroy:function(){return this.$element.remove(),this.$element[0].outerHTML},items:function(){var t=this;return this.$pillGroup.children(".pill").map(function(){return t.getItemData(n(this))}).get()},itemClicked:function(t){var u=this,r=n(t.target),i;if(t.preventDefault(),t.stopPropagation(),this._closeSuggestions(),r.hasClass("pill"))i=r;else if(i=r.parent(),this.$element.attr("data-readonly")===undefined){if(r.hasClass("glyphicon-close")){if(this.options.onRemove)this.options.onRemove(this.getItemData(i,{el:i}),n.proxy(this._removeElement,this));else this._removeElement(this.getItemData(i,{el:i}));return!1}if(this.options.edit){if(i.find(".pillbox-list-edit").length)return!1;this.openEdit(i)}}this.$element.trigger("clicked.fu.pillbox",this.getItemData(i))},readonly:function(n){n?this.$element.attr("data-readonly","readonly"):this.$element.removeAttr("data-readonly");this.options.truncate&&this.truncate(n)},suggestionClick:function(t){var i=n(t.currentTarget);t.preventDefault();this.$addItem.val("");this.addItems({text:i.html(),value:i.data("value")},!0);this._closeSuggestions()},itemCount:function(){return this.$pillGroup.children(".pill").length},addItems:function(){var i=this,t,u,r;if(!isFinite(String(arguments[0]))||arguments[0]instanceof Array?(t=[].slice.call(arguments).slice(0),r=t[1]&&!t[1].text):(t=[].slice.call(arguments).slice(1),u=arguments[0]),t[0]instanceof Array&&(t=t[0]),t.length)if(n.each(t,function(n,r){var u={text:r.text,value:r.value?r.value:r.text,el:i.$pillHTML};t[n]=u}),this.options.edit&&this.currentEdit&&(t[0].el=this.currentEdit.wrap("<div><\/div>").parent().html()),r&&t.pop(1),i.options.onAdd&&r)if(this.options.edit&&this.currentEdit)i.options.onAdd(t[0],n.proxy(i.saveEdit,this));else i.options.onAdd(t[0],n.proxy(i.placeItems,this,!0));else this.options.edit&&this.currentEdit?i.saveEdit(t):u?i.placeItems(u,t):i.placeItems(t,r)},removeItems:function(n,t){var u=this,i,r;if(n)for(t=t?t:1,i=0;i<t;i++)if(r=u.$pillGroup.find("> .pill:nth-child("+n+")"),r)r.remove();else break;else this.$pillGroup.find(".pill").remove(),this._removePillTrigger({method:"removeAll"})},placeItems:function(){var i="",t,r,u,f;!isFinite(String(arguments[0]))||arguments[0]instanceof Array?(t=[].slice.call(arguments).slice(0),f=t[1]&&!t[1].text):(t=[].slice.call(arguments).slice(1),r=arguments[0]);t[0]instanceof Array&&(t=t[0]);t.length&&(n.each(t,function(t,r){var u=n(r.el);u.attr("data-value",r.value);u.find("span:first").html(r.text);i+=u.wrap("<div><\/div>").parent().html()}),this.$pillGroup.children(".pill").length>0?r?(u=this.$pillGroup.find(".pill:nth-child("+r+")"),u.length?u.before(i):this.$pillGroup.children(".pill:last").after(i)):this.$pillGroup.children(".pill:last").after(i):this.$pillGroup.prepend(i),f&&this.$element.trigger("added.fu.pillbox",{text:t[0].text,value:t[0].value}))},inputEvent:function(n){var u=this,t=this.$addItem.val(),f,i,r;if(this.acceptKeyCodes[n.keyCode])return this.options.onKeyDown&&this._isSuggestionsOpen()&&(r=this.$suggest.find(".pillbox-suggest-sel"),r.length&&(t=r.html(),f=r.data("value"))),t.length&&(this._closeSuggestions(),this.$addItem.hide(),this.addItems({text:t,value:f},!0),setTimeout(function(){u.$addItem.show().val("").attr({size:10})},0)),n.preventDefault(),!0;if(n.keyCode===8||n.keyCode===46){if(!t.length)return(n.preventDefault(),this.options.edit&&this.currentEdit)?(this.cancelEdit(),!0):(this._closeSuggestions(),i=this.$pillGroup.children(".pill:last"),i.hasClass("pillbox-highlight")?this._removeElement(this.getItemData(i,{el:i})):i.addClass("pillbox-highlight"),!0)}else t.length>10&&this.$addItem.width()<this.$pillGroup.width()-6&&this.$addItem.attr({size:t.length+3});if(this.$pillGroup.find(".pill").removeClass("pillbox-highlight"),this.options.onKeyDown){if(n.keyCode===9||n.keyCode===38||n.keyCode===40)return this._isSuggestionsOpen()&&this._keySuggestions(n),!0;this.callbackId=n.timeStamp;this.options.onKeyDown({event:n,value:t},function(t){u._openSuggestions(n,t)})}},openEdit:function(n){var i=n.index()+1,t=this.$addItemWrap.detach().hide();this.$pillGroup.find(".pill:nth-child("+i+")").before(t);this.currentEdit=n.detach();t.addClass("editing");this.$addItem.val(n.find("span:first").html());t.show();this.$addItem.focus().select()},cancelEdit:function(n){var t;if(!this.currentEdit)return!1;this._closeSuggestions();n&&this.$addItemWrap.before(this.currentEdit);this.currentEdit=!1;t=this.$addItemWrap.detach();t.removeClass("editing");this.$addItem.val("");this.$pillGroup.append(t)},saveEdit:function(){var t=arguments[0][0];this.currentEdit=n(t.el);this.currentEdit.data("value",t.value);this.currentEdit.find("span:first").html(t.text);this.$addItemWrap.hide();this.$addItemWrap.before(this.currentEdit);this.currentEdit=!1;this.$addItem.val("");this.$addItemWrap.removeClass("editing");this.$pillGroup.append(this.$addItemWrap.detach().show());this.$element.trigger("edited.fu.pillbox",{value:t.value,text:t.text})},removeBySelector:function(){var t=[].slice.call(arguments).slice(0),i=this;n.each(t,function(n,t){i.$pillGroup.find(t).remove()});this._removePillTrigger({method:"removeBySelector",removedSelectors:t})},removeByValue:function(){var t=[].slice.call(arguments).slice(0),i=this;n.each(t,function(n,t){i.$pillGroup.find('> .pill[data-value="'+t+'"]').remove()});this._removePillTrigger({method:"removeByValue",removedValues:t})},removeByText:function(){var t=[].slice.call(arguments).slice(0),i=this;n.each(t,function(n,t){i.$pillGroup.find('> .pill:contains("'+t+'")').remove()});this._removePillTrigger({method:"removeByText",removedText:t})},truncate:function(t){var u=this,o,f,i,r,e;this.$element.removeClass("truncate");this.$addItemWrap.removeClass("truncated");this.$pillGroup.find(".pill").removeClass("truncated");t&&(this.$element.addClass("truncate"),o=this.$element.width(),f=!1,i=0,r=this.$pillGroup.find(".pill").length,e=0,this.$pillGroup.find(".pill").each(function(){var t=n(this);f?t.addClass("truncated"):(i++,u.$moreCount.text(r-i),e+t.outerWidth(!0)+u.$addItemWrap.outerWidth(!0)<=o?e+=t.outerWidth(!0):(u.$moreCount.text(r-i+1),t.addClass("truncated"),f=!0))}),i===r&&this.$addItemWrap.addClass("truncated"))},inputFocus:function(){this.$element.find(".pillbox-add-item").focus()},getItemData:function(t,i){return n.extend({text:t.find("span:first").html()},t.data(),i)},_removeElement:function(n){n.el.remove();delete n.el;this.$element.trigger("removed.fu.pillbox",n)},_removePillTrigger:function(n){this.$element.trigger("removed.fu.pillbox",n)},_generateObject:function(t){var i={};return n.each(t,function(n,t){i[t]=!0}),i},_openSuggestions:function(t,i){var r="";if(this.callbackId!==t.timeStamp)return!1;i.data&&i.data.length&&(n.each(i.data,function(n,t){var i=t.value?t.value:t.text;r+='<li data-value="'+i+'">'+t.text+"<\/li>"}),this.$suggest.html("").append(r),n(document.body).trigger("suggested.fu.pillbox",this.$suggest))},_closeSuggestions:function(){this.$suggest.html("").parent().removeClass("open")},_isSuggestionsOpen:function(){return this.$suggest.parent().hasClass("open")},_keySuggestions:function(n){var t=this.$suggest.find("li.pillbox-suggest-sel"),r=n.keyCode===38,i;n.preventDefault();t.length?(i=r?t.prev():t.next(),i.length||(i=r?this.$suggest.find("li:last"):this.$suggest.find("li:first")),i&&(i.addClass("pillbox-suggest-sel"),t.removeClass("pillbox-suggest-sel"))):(t=this.$suggest.find("li:first"),t.addClass("pillbox-suggest-sel"))}};n.fn.pillbox=function(i){var u=Array.prototype.slice.call(arguments,1),r,f=this.each(function(){var e=n(this),f=e.data("fu.pillbox"),o=typeof i=="object"&&i;f||e.data("fu.pillbox",f=new t(this,o));typeof i=="string"&&(r=f[i].apply(f,u))});return r===undefined?f:r};n.fn.pillbox.defaults={onAdd:undefined,onRemove:undefined,onKeyDown:undefined,edit:!1,readonly:-1,truncate:!1,acceptKeyCodes:[13,188]};n.fn.pillbox.Constructor=t;n.fn.pillbox.noConflict=function(){return n.fn.pillbox=i,this};n(document).on("mousedown.fu.pillbox.data-api","[data-initialize=pillbox]",function(t){var i=n(t.target).closest(".pillbox");i.data("fu.pillbox")||i.pillbox(i.data())});n(function(){n("[data-initialize=pillbox]").each(function(){var t=n(this);t.data("fu.pillbox")||t.pillbox(t.data())})})}(n),function(n){var i=n.fn.repeater,t=function(t,i){var r=this,u;this.$element=n(t);this.$canvas=this.$element.find(".repeater-canvas");this.$count=this.$element.find(".repeater-count");this.$end=this.$element.find(".repeater-end");this.$filters=this.$element.find(".repeater-filters");this.$loader=this.$element.find(".repeater-loader");this.$pageSize=this.$element.find(".repeater-itemization .selectlist");this.$nextBtn=this.$element.find(".repeater-next");this.$pages=this.$element.find(".repeater-pages");this.$prevBtn=this.$element.find(".repeater-prev");this.$primaryPaging=this.$element.find(".repeater-primaryPaging");this.$search=this.$element.find(".repeater-search").find(".search");this.$secondaryPaging=this.$element.find(".repeater-secondaryPaging");this.$start=this.$element.find(".repeater-start");this.$viewport=this.$element.find(".repeater-viewport");this.$views=this.$element.find(".repeater-views");this.eventStamp=(new Date).getTime()+(Math.floor(Math.random()*100)+1);this.currentPage=0;this.currentView=null;this.infiniteScrollingCallback=function(){};this.infiniteScrollingCont=null;this.infiniteScrollingEnabled=!1;this.infiniteScrollingEnd=null;this.infiniteScrollingOptions={};this.lastPageInput=0;this.options=n.extend({},n.fn.repeater.defaults,i);this.pageIncrement=0;this.resizeTimeout={};this.staticHeight=this.options.staticHeight===-1?this.$element.attr("data-staticheight"):this.options.staticHeight;this.$filters.selectlist();this.$pageSize.selectlist();this.$primaryPaging.find(".combobox").combobox();this.$search.search();this.$filters.on("changed.fu.selectlist",n.proxy(this.render,this,{clearInfinite:!0,pageIncrement:null}));this.$nextBtn.on("click.fu.repeater",n.proxy(this.next,this));this.$pageSize.on("changed.fu.selectlist",n.proxy(this.render,this,{pageIncrement:null}));this.$prevBtn.on("click.fu.repeater",n.proxy(this.previous,this));this.$primaryPaging.find(".combobox").on("changed.fu.combobox",function(n,t){r.pageInputChange(t.text)});this.$search.on("searched.fu.search cleared.fu.search",n.proxy(this.render,this,{clearInfinite:!0,pageIncrement:null}));this.$secondaryPaging.on("blur.fu.repeater",function(){r.pageInputChange(r.$secondaryPaging.val())});this.$secondaryPaging.on("change.fu.repeater",function(){r.pageInputChange(r.$secondaryPaging.val())});this.$views.find("input").on("change.fu.repeater",n.proxy(this.viewChanged,this));n(window).on("resize.fu.repeater."+this.eventStamp,function(){clearTimeout(r.resizeTimeout);r.resizeTimeout=setTimeout(function(){r.resize();r.$element.trigger("resized.fu.repeater")},75)});this.$loader.loader();this.$loader.loader("pause");u=this.options.defaultView!==-1?this.options.defaultView:this.$views.find("label.active input").val();this.initViews(function(){r.resize();r.$element.trigger("resized.fu.repeater");r.render({changeView:u})})};t.prototype={constructor:t,clear:function(t){var i=function(t){var r=[];t.children().each(function(){var t=n(this),u=t.attr("data-preserve");u==="deep"?(t.detach(),r.push(t)):u==="shallow"&&(i(t),t.detach(),r.push(t))});t.empty();t.append(r)};t=t||{};t.preserve?(!this.infiniteScrollingEnabled||t.clearInfinite)&&i(this.$canvas):this.$canvas.empty()},destroy:function(){var t;return this.$element.find("input").each(function(){n(this).attr("value",n(this).val())}),this.$canvas.empty(),t=this.$element[0].outerHTML,this.$element.find(".combobox").combobox("destroy"),this.$element.find(".selectlist").selectlist("destroy"),this.$element.find(".search").search("destroy"),this.infiniteScrollingEnabled&&n(this.infiniteScrollingCont).infinitescroll("destroy"),this.$element.remove(),n(window).off("resize.fu.repeater."+this.eventStamp),t},getDataOptions:function(t,i){var r={},f,u;t=t||{};r.filter=this.$filters.selectlist("selectedItem");r.view=this.currentView;this.infiniteScrollingEnabled||(r.pageSize=parseInt(this.$pageSize.selectlist("selectedItem").value,10));t.pageIncrement!==undefined&&(t.pageIncrement===null?this.currentPage=0:this.currentPage+=t.pageIncrement);r.pageIndex=this.currentPage;f=this.$search.find("input").val();f!==""&&(r.search=f);u=n.fn.repeater.views[this.currentView]||{};u=u.dataOptions;u?u.call(this,r,function(n){i(n)}):i(r)},infiniteScrolling:function(n,t){var r=this.$element.find(".repeater-itemization"),u=this.$element.find(".repeater-pagination"),i,f;t=t||{};n?(this.infiniteScrollingEnabled=!0,this.infiniteScrollingEnd=t.end,delete t.dataSource,delete t.end,this.infiniteScrollingOptions=t,r.hide(),u.hide()):(i=this.infiniteScrollingCont,f=i.data(),delete f.infinitescroll,i.off("scroll"),i.removeClass("infinitescroll"),this.infiniteScrollingCont=null,this.infiniteScrollingEnabled=!1,this.infiniteScrollingEnd=null,this.infiniteScrollingOptions={},r.show(),u.show())},infiniteScrollPaging:function(n){var i=this.infiniteScrollingEnd!==!0?this.infiniteScrollingEnd:undefined,t=n.page,r=n.pages;this.currentPage=t!==undefined?t:NaN;this.currentPage+1>=r&&this.infiniteScrollingCont.infinitescroll("end",i)},initInfiniteScrolling:function(){var t=this.$canvas.find('[data-infinite="true"]:first'),i,r;t=t.length<1?this.$canvas:t;t.data("fu.infinitescroll")?t.infinitescroll("enable"):(r=this,i=n.extend({},this.infiniteScrollingOptions),i.dataSource=function(n,t){r.infiniteScrollingCallback=t;r.render({pageIncrement:1})},t.infinitescroll(i),this.infiniteScrollingCont=t)},initViews:function(t){var i=[],u,r,f=function(n){var u=function(){n++;n<r?f(n):t()};i[n].initialize?i[n].initialize.call(this,{},function(){u()}):u()};for(u in n.fn.repeater.views)i.push(n.fn.repeater.views[u]);r=i.length;r>0?f(0):t()},itemization:function(n){this.$count.html(n.count||"");this.$end.html(n.end||"");this.$start.html(n.start||"")},next:function(){var n="disabled";this.$nextBtn.attr(n,n);this.$prevBtn.attr(n,n);this.pageIncrement=1;this.render({pageIncrement:this.pageIncrement})},pageInputChange:function(n){var t;n!==this.lastPageInput&&(this.lastPageInput=n,n=parseInt(n,10)-1,t=n-this.currentPage,this.render({pageIncrement:t}))},pagination:function(n){var i="active",t="disabled",o=n.page,r=n.pages,f,u,e;if(this.currentPage=o!==undefined?o:NaN,this.$primaryPaging.removeClass(i),this.$secondaryPaging.removeClass(i),r<=this.options.dropPagingCap){for(this.$primaryPaging.addClass(i),f=this.$primaryPaging.find(".dropdown-menu"),f.empty(),u=0;u<r;u++)e=u+1,f.append('<li data-value="'+e+'"><a href="#">'+e+"<\/a><\/li>");this.$primaryPaging.find("input.form-control").val(this.currentPage+1)}else this.$secondaryPaging.addClass(i),this.$secondaryPaging.val(this.currentPage+1);this.lastPageInput=this.currentPage+1+"";this.$pages.html(r);this.currentPage+1<r?this.$nextBtn.removeAttr(t):this.$nextBtn.attr(t,t);this.currentPage-1>=0?this.$prevBtn.removeAttr(t):this.$prevBtn.attr(t,t);this.pageIncrement!==0&&(this.pageIncrement>0?this.$nextBtn.is(":disabled")?this.$prevBtn.focus():this.$nextBtn.focus():this.$prevBtn.is(":disabled")?this.$nextBtn.focus():this.$prevBtn.focus())},previous:function(){var n="disabled";this.$nextBtn.attr(n,n);this.$prevBtn.attr(n,n);this.pageIncrement=-1;this.render({pageIncrement:this.pageIncrement})},render:function(t){var i=this,r=!1,u=n.fn.repeater.views[i.currentView]||{},e,f=function(){t.preserve=t.preserve!==undefined?t.preserve:!r;i.clear(t);(!i.infiniteScrollingEnabled||i.infiniteScrollingEnabled&&r)&&i.$loader.show().loader("play");i.getDataOptions(t,function(n){i.options.dataSource(n,function(n){var f=u.renderer;i.infiniteScrollingEnabled?i.infiniteScrollingCallback({}):(i.itemization(n),i.pagination(n));f&&i.runRenderer(i.$canvas,f,n,function(){i.infiniteScrollingEnabled&&((r||t.clearInfinite)&&i.initInfiniteScrolling(),i.infiniteScrollPaging(n,t));i.$loader.hide().loader("pause");i.$element.trigger("loaded.fu.repeater")})})})};t=t||{};t.changeView&&this.currentView!==t.changeView?(e=this.currentView,this.currentView=t.changeView,this.$element.attr("data-currentview",this.currentView),r=!0,this.infiniteScrollingEnabled&&i.infiniteScrolling(!1),u=n.fn.repeater.views[i.currentView]||{},u.selected?u.selected.call(this,{prevView:e},function(){f()}):f()):f()},resize:function(){var i=this.staticHeight,r=n.fn.repeater.views[this.currentView]||{},u,t;i!==undefined?(this.$canvas.addClass("scrolling"),t={bottom:this.$viewport.css("margin-bottom"),top:this.$viewport.css("margin-top")},u=(i==="true"||i===!0?this.$element.height():parseInt(i,10))-this.$element.find(".repeater-header").outerHeight()-this.$element.find(".repeater-footer").outerHeight()-(t.bottom==="auto"?0:parseInt(t.bottom,10))-(t.top==="auto"?0:parseInt(t.top,10)),this.$viewport.outerHeight(u)):this.$canvas.removeClass("scrolling");r.resize&&r.resize.call(this,{height:this.$element.outerHeight(),width:this.$element.outerWidth()},function(){})},runRenderer:function(t,i,r,u){var h=this,o=!1,f,e,s,c,l=function(n){var f={container:t,data:r};i.repeat&&(f.subset=e,f.index=n);e.length<1?u():a(f,function(){n++;n<e.length?l(n):u()})},a=function(u,f){var e="",c={before:function(n){n&&n.skipNested===!0&&(o=!0);s("render",u)},render:function(i){var r=i&&i.action?i.action:"append";i&&i.item!==undefined&&(e=n(i.item),e.length<1&&(e=i.item),r!=="none"&&t[r](e),u.item=e);i&&i.skipNested===!0&&(o=!0);s("after",u)},after:function(f){var l,a=function(n,t){h.runRenderer(n,i.nested[t],r,function(){t++;t<i.nested.length?a(n,t):s("complete",u)})};f&&f.skipNested===!0&&(o=!0);i.nested&&!o?(l=n(e),l=l.attr("data-container")==="true"?l:l.find('[data-container="true"]:first'),l.length<1&&(l=t),a(l,0)):c.complete(null)},complete:function(){f&&f()}},s=function(t,r){r=n.extend({},r);i[t]?i[t].call(h,r,c[t]):c[t](null)};s("before",u)};if(i.repeat)for(f=i.repeat.split("."),f[0]==="data"||f[0]==="this"?(e=f[0]==="this"?this:r,f.shift()):(f=[],e=[""]),s=0,c=f.length;s<c;s++)e=e[f[s]];else e=[""];l(0)},viewChanged:function(t){var i=n(t.target);this.render({changeView:i.val(),pageIncrement:null})}};n.fn.repeater=function(i){var u=Array.prototype.slice.call(arguments,1),r,f=this.each(function(){var e=n(this),f=e.data("fu.repeater"),o=typeof i=="object"&&i;f||e.data("fu.repeater",f=new t(this,o));typeof i=="string"&&(r=f[i].apply(f,u))});return r===undefined?f:r};n.fn.repeater.defaults={dataSource:function(){},defaultView:-1,dropPagingCap:10,staticHeight:-1};n.fn.repeater.views={};n.fn.repeater.Constructor=t;n.fn.repeater.noConflict=function(){return n.fn.repeater=i,this}}(n),function(n){if(n.fn.repeater){n.fn.repeater.Constructor.prototype.clearSelectedItems=function(){this.$canvas.find(".repeater-list-check").remove();this.$canvas.find(".repeater-list-items tr.selected").removeClass("selected")};n.fn.repeater.Constructor.prototype.getSelectedItems=function(){var t=[];return this.$canvas.find(".repeater-list-items tr.selected").each(function(){var i=n(this);t.push({data:i.data("item_data"),element:i})}),t};n.fn.repeater.Constructor.prototype.setSelectedItems=function(t,i){var f=this.options.list_selectable,h=this,e,r,u,o,c=function(){u=n(this);e=u.data("item_data")||{};e[t[r].property]===t[r].value&&s(u,t[r].selected)},s=function(n,t){t=t!==undefined?t:!0;t?(i||f==="multi"||h.clearSelectedItems(),n.hasClass("selected")||(n.addClass("selected"),n.find("td:first").prepend('<div class="repeater-list-check"><span class="glyphicon glyphicon-ok"><\/span><\/div>'))):(n.find(".repeater-list-check").remove(),n.removeClass("selected"))};for(n.isArray(t)||(t=[t]),o=i===!0||f==="multi"?t.length:f?t.length>0?1:0:0,r=0;r<o;r++)t[r].index!==undefined?(u=this.$canvas.find(".repeater-list-items tr:nth-child("+(t[r].index+1)+")"),u.length>0&&s(u,t[r].selected)):t[r].property!==undefined&&t[r].value!==undefined&&this.$canvas.find(".repeater-list-items tr").each(c)};n.fn.repeater.defaults=n.extend({},n.fn.repeater.defaults,{list_columnRendered:null,list_columnSizing:!0,list_columnSyncing:!0,list_infiniteScroll:!1,list_noItemsHTML:"",list_selectable:!1,list_sortClearing:!1,list_rowRendered:null});n.fn.repeater.views.list={dataOptions:function(n,t){this.list_sortDirection&&(n.sortDirection=this.list_sortDirection);this.list_sortProperty&&(n.sortProperty=this.list_sortProperty);t(n)},initialize:function(n,t){this.list_sortDirection=null;this.list_sortProperty=null;t()},selected:function(n,t){var i=this.options.list_infiniteScroll,r;this.list_firstRender=!0;this.$loader.addClass("noHeader");i&&(r=typeof i=="object"?i:{},this.infiniteScrolling(!0,r));t({})},renderer:{complete:function(n,i){t.call(this,n,i)},nested:[{complete:function(t,i){var u=[],e=this,r,f,o,s;if(!this.options.list_columnSizing||this.list_columnsSame)i();else{if(r=0,s=0,t.item.find("td").each(function(){var t=n(this),f=t.next("td").length===0?!0:!1,i;e.list_columns[r].width!==undefined?(i=e.list_columns[r].width,t.outerWidth(i),s+=t.outerWidth(),f?t.outerWidth(""):e.list_columns[r]._auto_width=i):u.push({col:t,index:r,last:f});r++}),f=u.length,f>0)for(o=Math.floor((this.$canvas.width()-s)/f),r=0;r<f;r++)u[r].last||(u[r].col.outerWidth(o),this.list_columns[u[r].index]._auto_width=o);i()}},render:function(n,t){var i=function(n,t){var i,r,u;if(!n)return!0;if(!t)return!1;for(i=0,u=t.length;i<u;i++)if(n[i]){for(r in t[i])if(n[i][r]!==t[i][r])return!0}else return!0;return!1};this.list_firstRender||i(this.list_columns,n.data.columns)?(this.$element.find(".repeater-list-header").remove(),this.list_columns=n.data.columns,this.list_columnsSame=!1,this.list_firstRender=!1,this.$loader.removeClass("noHeader"),t({action:"prepend",item:'<table class="table repeater-list-header" data-preserve="deep" role="grid" aria-readonly="true"><tr data-container="true"><\/tr><\/table>'})):(this.list_columnsSame=!0,t({skipNested:!0}))},nested:[{render:function(t,i){var a="glyphicon-chevron",h=a+"-down",c=a+"-up",u=t.index,f=this,e=t.subset,l,r,s,o;if(l=e[u].cssClass,r=n('<td><span class="glyphicon"><\/span><\/td>'),r.addClass(l!==undefined?l:"").prepend(e[u].label),o=r.find("span.glyphicon:first"),s=e[u].sortable,s){r.addClass("sortable");r.on("click.fu.repeater-list",function(){f.list_sortProperty=typeof s=="string"?s:e[u].property;r.hasClass("sorted")?o.hasClass(c)?(o.removeClass(c).addClass(h),f.list_sortDirection="desc"):f.options.list_sortClearing?(r.removeClass("sorted"),o.removeClass(h),f.list_sortDirection=null,f.list_sortProperty=null):(o.removeClass(h).addClass(c),f.list_sortDirection="asc"):(t.container.find("td").removeClass("sorted"),o.removeClass(h).addClass(c),f.list_sortDirection="asc",r.addClass("sorted"));f.render({clearInfinite:!0,pageIncrement:null})})}(e[u].sortDirection==="asc"||e[u].sortDirection==="desc")&&(t.container.find("td").removeClass("sorted"),r.addClass("sortable sorted"),e[u].sortDirection==="asc"?(o.addClass(c),this.list_sortDirection="asc"):(o.addClass(h),this.list_sortDirection="desc"),this.list_sortProperty=typeof s=="string"?s:e[u].property);i({item:r})},repeat:"data.columns"}]},{after:function(n,t){var i=this.$canvas,r=i.find(".repeater-list-header");this.staticHeight&&n.item.height(i.height()-r.outerHeight());t()},render:function(t,i){var r=this.$canvas.find(".repeater-list-wrapper"),u={},f;r.length>0?u.action="none":r=n('<div class="repeater-list-wrapper" data-infinite="true"><table class="table repeater-list-items" data-container="true" role="grid" aria-readonly="true"><\/table><\/div>');u.item=r;t.data.items.length<1?(u.skipNested=!0,f=n('<tr class="empty"><td><\/td><\/tr>'),f.find("td").append(this.options.list_noItemsHTML),r.find(".repeater-list-items").append(f)):r.find(".repeater-list-items tr.empty:first").remove();i(u)},nested:[{complete:function(n,t){var i={container:n.container};n.item!==undefined&&(i.item=n.item);this.options.list_rowRendered?this.options.list_rowRendered(i,function(){t()}):t()},render:function(t,i){var r=n('<tr data-container="true"><\/tr>'),u=this;if(this.options.list_selectable){r.addClass("selectable");r.attr("tabindex",0);r.data("item_data",t.subset[t.index]);r.on("click.fu.repeater-list",function(){var t=n(this);t.hasClass("selected")?(t.removeClass("selected"),t.find(".repeater-list-check").remove(),u.$element.trigger("itemDeselected.fu.repeater",t)):(u.options.list_selectable!=="multi"&&(u.$canvas.find(".repeater-list-check").remove(),u.$canvas.find(".repeater-list-items tr.selected").each(function(){n(this).removeClass("selected");u.$element.trigger("itemDeselected.fu.repeater",n(this))})),t.addClass("selected"),t.find("td:first").prepend('<div class="repeater-list-check"><span class="glyphicon glyphicon-ok"><\/span><\/div>'),u.$element.trigger("itemSelected.fu.repeater",t))});r.keyup(function(n){n.keyCode===13&&r.trigger("click.fu.repeater-list")})}this.list_curRowIndex=t.index;i({item:r})},repeat:"data.items",nested:[{after:function(n,t){var i={container:n.container};n.item!==undefined&&(i.item=n.item);this.options.list_columnRendered?this.options.list_columnRendered(i,function(){t()}):t()},render:function(t,i){var u=t.subset[t.index].cssClass,e=t.data.items[this.list_curRowIndex][t.subset[t.index].property],r=n("<td><\/td>"),f=t.subset[t.index]._auto_width;r.addClass(u!==undefined?u:"").append(e);f!==undefined&&r.outerWidth(f);i({item:r})},repeat:"this.list_columns"}]}]}]},resize:function(n,i){t.call(this,{data:{items:[""]}},i)}};var t=function(t,i){var u=0,r=[],f,e;!this.options.list_columnSyncing||t.data.items.length<1?i():(f=this.$element.find(".repeater-list-header:first"),e=this.$element.find(".repeater-list-items:first"),e.find("tr:first td").each(function(){r.push(n(this).outerWidth())}),r.pop(),f.find("td").each(function(){r[u]!==undefined&&n(this).outerWidth(r[u]);u++}),i())}}}(n),function(n){n.fn.repeater&&(n.fn.repeater.defaults=n.extend({},n.fn.repeater.defaults,{thumbnail_infiniteScroll:!1,thumbnail_itemRendered:null,thumbnail_template:'<div class="thumbnail repeater-thumbnail" style="background-color: {{color}};"><img height="75" src="{{src}}" width="65"><span>{{name}}<\/span><\/div>'}),n.fn.repeater.views.thumbnail={selected:function(n,t){var i=this.options.thumbnail_infiniteScroll,r;i&&(r=typeof i=="object"?i:{},this.infiniteScrolling(!0,r));t({})},renderer:{render:function(t,i){var r=this.$element.find(".repeater-thumbnail-cont"),u={},f;r.length>0?u.action="none":r=n('<div class="clearfix repeater-thumbnail-cont" data-container="true" data-infinite="true" data-preserve="shallow"><\/div>');u.item=r;t.data.items.length<1?(u.skipNested=!0,f=n('<div class="empty"><\/div>'),f.append(this.options.thumbnail_noItemsHTML),r.append(f)):r.find(".empty:first").remove();i(u)},nested:[{after:function(n,t){var i={container:n.container};n.item!==undefined&&(i.item=n.item);this.options.thumbnail_itemRendered?this.options.thumbnail_itemRendered(i,function(){t()}):t()},render:function(t,i){var r=t.subset[t.index],u=function(t){for(var i=!1,u=function(){var e,u,f;u=t.indexOf("{{");e=t.indexOf("}}",u+2);u>-1&&e>-1?(f=n.trim(t.substring(u+2,e)),f=r[f]!==undefined?r[f]:"",t=t.substring(0,u)+f+t.substring(e+2)):i=!0};!i&&t.search("{{")>=0;)u(t);return t};i({item:u(this.options.thumbnail_template)})},repeat:"data.items"}]}})}(n),function(n){var i=n.fn.scheduler,t=function(t,i){var r=this;this.$element=n(t);this.options=n.extend({},n.fn.scheduler.defaults,i);this.$startDate=this.$element.find(".start-datetime .start-date");this.$startTime=this.$element.find(".start-datetime .start-time");this.$timeZone=this.$element.find(".timezone-container .timezone");this.$repeatIntervalPanel=this.$element.find(".repeat-every-panel");this.$repeatIntervalSelect=this.$element.find(".repeat-options");this.$repeatIntervalSpinbox=this.$element.find(".repeat-every");this.$repeatIntervalTxt=this.$element.find(".repeat-every-text");this.$end=this.$element.find(".repeat-end");this.$endSelect=this.$end.find(".end-options");this.$endAfter=this.$end.find(".end-after");this.$endDate=this.$end.find(".end-on-date");this.$recurrencePanels=this.$element.find(".repeat-panel");this.$repeatIntervalSelect.selectlist();this.$element.find(".selectlist").selectlist();this.$startDate.datepicker();this.$startTime.combobox();this.$startTime.find("input").val()===""&&this.$startTime.combobox("selectByIndex",0);this.$repeatIntervalSpinbox.find("input").val()==="0"?this.$repeatIntervalSpinbox.spinbox({value:1,min:1}):this.$repeatIntervalSpinbox.spinbox({min:1});this.$endAfter.spinbox({value:1,min:1});this.$endDate.datepicker();this.$element.find(".radio-custom").radio();this.$repeatIntervalSelect.on("changed.fu.selectlist",n.proxy(this.repeatIntervalSelectChanged,this));this.$endSelect.on("changed.fu.selectlist",n.proxy(this.endSelectChanged,this));this.$element.find(".repeat-days-of-the-week .btn-group .btn").on("change.fu.scheduler",function(n,t){r.changed(n,t,!0)});this.$element.find(".combobox").on("changed.fu.combobox",n.proxy(this.changed,this));this.$element.find(".datepicker").on("changed.fu.datepicker",n.proxy(this.changed,this));this.$element.find(".selectlist").on("changed.fu.selectlist",n.proxy(this.changed,this));this.$element.find(".spinbox").on("changed.fu.spinbox",n.proxy(this.changed,this));this.$element.find(".repeat-monthly .radio, .repeat-yearly .radio").on("change.fu.scheduler",n.proxy(this.changed,this))};t.prototype={constructor:t,destroy:function(){var t;return this.$element.find("input").each(function(){n(this).attr("value",n(this).val())}),this.$element.find(".datepicker .calendar").empty(),t=this.$element[0].outerHTML,this.$element.find(".combobox").combobox("destroy"),this.$element.find(".datepicker").datepicker("destroy"),this.$element.find(".selectlist").selectlist("destroy"),this.$element.find(".spinbox").spinbox("destroy"),this.$element.find("[type=radio]").radio("destroy"),this.$element.remove(),t},changed:function(t,i,r){r||t.stopPropagation();this.$element.trigger("changed.fu.scheduler",{data:i!==undefined?i:n(t.currentTarget).data(),originalEvent:t,value:this.getValue()})},disable:function(){this.toggleState("disable")},enable:function(){this.toggleState("enable")},endSelectChanged:function(n,t){var r,i;t?i=t.value:(r=this.$endSelect.selectlist("selectedItem"),i=r.value);this.$endAfter.parent().addClass("hide");this.$endAfter.parent().attr("aria-hidden","true");this.$endDate.parent().addClass("hide");this.$endDate.parent().attr("aria-hidden","true");i==="after"?(this.$endAfter.parent().removeClass("hide"),this.$endAfter.parent().attr("aria-hidden","false")):i==="date"&&(this.$endDate.parent().removeClass("hide"),this.$endDate.parent().attr("aria-hidden","false"))},getValue:function(){var o=this.$repeatIntervalSpinbox.spinbox("value"),t="",r=this.$repeatIntervalSelect.selectlist("selectedItem").value,i=this.$startTime.combobox("selectedItem").text.toLowerCase(),s=this.$timeZone.selectlist("selectedItem"),v,h,u,p,w,c,l,f,e,y,a;return v=function(n,t){var r="",i;return r+=n.getFullYear(),r+=t,i=n.getMonth()+1,r+=i<10?"0"+i:i,r+=t,i=n.getDate(),r+(i<10?"0"+i:i)},f=""+v(this.$startDate.datepicker("getDate"),"-"),f+="T",p=i.search("am")>=0,w=i.search("pm")>=0,i=n.trim(i.replace(/am/g,"").replace(/pm/g,"")).split(":"),i[0]=parseInt(i[0],10),i[1]=parseInt(i[1],10),p&&i[0]>11?i[0]=0:w&&i[0]<12&&(i[0]+=12),f+=i[0]<10?"0"+i[0]:i[0],f+=":",f+=i[1]<10?"0"+i[1]:i[1],f+=s.offset==="+00:00"?"Z":s.offset,r==="none"?t="FREQ=DAILY;INTERVAL=1;COUNT=1;":r==="hourly"?t="FREQ=HOURLY;"+("INTERVAL="+o+";"):r==="daily"?(t+="FREQ=DAILY;",t+="INTERVAL="+o+";"):r==="weekdays"?(t+="FREQ=DAILY;",t+="BYDAY=MO,TU,WE,TH,FR;",t+="INTERVAL=1;"):r==="weekly"?(u=[],this.$element.find(".repeat-days-of-the-week .btn-group input:checked").each(function(){u.push(n(this).data().value)}),t+="FREQ=WEEKLY;",t+="BYDAY="+u.join(",")+";",t+="INTERVAL="+o+";"):r==="monthly"?(t+="FREQ=MONTHLY;",t+="INTERVAL="+o+";",e=this.$element.find("input[name=repeat-monthly]:checked").val(),e==="bymonthday"?(h=parseInt(this.$element.find(".repeat-monthly-date .selectlist").selectlist("selectedItem").text,10),t+="BYMONTHDAY="+h+";"):e==="bysetpos"&&(u=this.$element.find(".month-days").selectlist("selectedItem").value,l=this.$element.find(".month-day-pos").selectlist("selectedItem").value,t+="BYDAY="+u+";",t+="BYSETPOS="+l+";")):r==="yearly"&&(t+="FREQ=YEARLY;",e=this.$element.find("input[name=repeat-yearly]:checked").val(),e==="bymonthday"?(c=this.$element.find(".repeat-yearly-date .year-month").selectlist("selectedItem").value,h=this.$element.find(".year-month-day").selectlist("selectedItem").text,t+="BYMONTH="+c+";",t+="BYMONTHDAY="+h+";"):e==="bysetpos"&&(u=this.$element.find(".year-month-days").selectlist("selectedItem").value,l=this.$element.find(".year-month-day-pos").selectlist("selectedItem").value,c=this.$element.find(".repeat-yearly-day .year-month").selectlist("selectedItem").value,t+="BYDAY="+u+";",t+="BYSETPOS="+l+";",t+="BYMONTH="+c+";")),y=this.$endSelect.selectlist("selectedItem").value,a="",r!=="none"&&(y==="after"?a="COUNT="+this.$endAfter.spinbox("value")+";":y==="date"&&(a="UNTIL="+v(this.$endDate.datepicker("getDate"),"")+";")),t+=a,{startDateTime:f,timeZone:{name:s.name,offset:s.offset},recurrencePattern:t}},repeatIntervalSelectChanged:function(n,t){var r,i,u;t?(i=t.value,u=t.text):(r=this.$repeatIntervalSelect.selectlist("selectedItem"),i=r.value,u=r.text);this.$repeatIntervalTxt.text(u);switch(i.toLowerCase()){case"hourly":case"daily":case"weekly":case"monthly":this.$repeatIntervalPanel.removeClass("hide");this.$repeatIntervalPanel.attr("aria-hidden","false");break;default:this.$repeatIntervalPanel.addClass("hide");this.$repeatIntervalPanel.attr("aria-hidden","true")}this.$recurrencePanels.addClass("hide");this.$recurrencePanels.attr("aria-hidden","true");this.$element.find(".repeat-"+i).removeClass("hide");this.$element.find(".repeat-"+i).attr("aria-hidden","false");i==="none"?(this.$end.addClass("hide"),this.$end.attr("aria-hidden","true")):(this.$end.removeClass("hide"),this.$end.attr("aria-hidden","false"))},setValue:function(t){var e,f,u,s,o,h,r,i;if(t.startDateTime&&(i=t.startDateTime.split("T"),this.$startDate.datepicker("setDate",i[0]),i[1]&&(i[1]=i[1].split(":"),e=parseInt(i[1][0],10),o=i[1][1]?parseInt(i[1][1].split("+")[0].split("-")[0].split("Z")[0],10):0,h=e<12?"AM":"PM",e===0?e=12:e>12&&(e-=12),o=o<10?"0"+o:o,i=e+":"+o+" "+h,this.$startTime.find("input").val(i),this.$startTime.combobox("selectByText",i))),u="li[data",t.timeZone?(u+=typeof t.timeZone=="string"?'-name="'+t.timeZone:t.timeZone.name?'-name="'+t.timeZone.name:'-offset="'+t.timeZone.offset,u+='"]',this.$timeZone.selectlist("selectBySelector",u)):t.startDateTime&&(i=t.startDateTime.split("T")[1],i=i?i.search(/\+/)>-1?"+"+n.trim(i.split("+")[1]):i.search(/\-/)>-1?"-"+n.trim(i.split("-")[1]):"+00:00":"+00:00",u+='-offset="'+i+'"]',this.$timeZone.selectlist("selectBySelector",u)),t.recurrencePattern){for(r={},i=t.recurrencePattern.toUpperCase().split(";"),f=0,s=i.length;f<s;f++)i[f]!==""&&(u=i[f].split("="),r[u[0]]=u[1]);if(r.FREQ==="DAILY")u=r.BYDAY==="MO,TU,WE,TH,FR"?"weekdays":r.INTERVAL==="1"&&r.COUNT==="1"?"none":"daily";else if(r.FREQ==="HOURLY")u="hourly";else if(r.FREQ==="WEEKLY"){if(r.BYDAY)for(u=this.$element.find(".repeat-days-of-the-week .btn-group"),u.find("label").removeClass("active"),i=r.BYDAY.split(","),f=0,s=i.length;f<s;f++)u.find('input[data-value="'+i[f]+'"]').parent().addClass("active");u="weekly"}else r.FREQ==="MONTHLY"?(this.$element.find(".repeat-monthly input").removeAttr("checked").removeClass("checked"),this.$element.find(".repeat-monthly label.radio-custom").removeClass("checked"),r.BYMONTHDAY?(i=this.$element.find(".repeat-monthly-date"),i.find("input").addClass("checked").attr("checked","checked"),i.find("label.radio-custom").addClass("checked"),i.find(".selectlist").selectlist("selectByValue",r.BYMONTHDAY)):r.BYDAY&&(i=this.$element.find(".repeat-monthly-day"),i.find("input").addClass("checked").attr("checked","checked"),i.find("label.radio-custom").addClass("checked"),r.BYSETPOS&&i.find(".month-day-pos").selectlist("selectByValue",r.BYSETPOS),i.find(".month-days").selectlist("selectByValue",r.BYDAY)),u="monthly"):r.FREQ==="YEARLY"?(this.$element.find(".repeat-yearly input").removeAttr("checked").removeClass("checked"),this.$element.find(".repeat-yearly label.radio-custom").removeClass("checked"),r.BYMONTHDAY?(i=this.$element.find(".repeat-yearly-date"),i.find("input").addClass("checked").attr("checked","checked"),i.find("label.radio-custom").addClass("checked"),r.BYMONTH&&i.find(".year-month").selectlist("selectByValue",r.BYMONTH),i.find(".year-month-day").selectlist("selectByValue",r.BYMONTHDAY)):r.BYSETPOS&&(i=this.$element.find(".repeat-yearly-day"),i.find("input").addClass("checked").attr("checked","checked"),i.find("label.radio-custom").addClass("checked"),i.find(".year-month-day-pos").selectlist("selectByValue",r.BYSETPOS),r.BYDAY&&i.find(".year-month-days").selectlist("selectByValue",r.BYDAY),r.BYMONTH&&i.find(".year-month").selectlist("selectByValue",r.BYMONTH)),u="yearly"):u="none";r.COUNT?(this.$endAfter.spinbox("value",parseInt(r.COUNT,10)),this.$endSelect.selectlist("selectByValue","after")):r.UNTIL&&(i=r.UNTIL,i.length===8&&(i=i.split(""),i.splice(4,0,"-"),i.splice(7,0,"-"),i=i.join("")),this.$endDate.datepicker("setDate",i),this.$endSelect.selectlist("selectByValue","date"));this.endSelectChanged();r.INTERVAL&&this.$repeatIntervalSpinbox.spinbox("value",parseInt(r.INTERVAL,10));this.$repeatIntervalSelect.selectlist("selectByValue",u);this.repeatIntervalSelectChanged()}},toggleState:function(n){this.$element.find(".combobox").combobox(n);this.$element.find(".datepicker").datepicker(n);this.$element.find(".selectlist").selectlist(n);this.$element.find(".spinbox").spinbox(n);this.$element.find("[type=radio]").radio(n);n=n==="disable"?"addClass":"removeClass";this.$element.find(".repeat-days-of-the-week .btn-group")[n]("disabled")},value:function(n){return n?this.setValue(n):this.getValue()}};n.fn.scheduler=function(i){var u=Array.prototype.slice.call(arguments,1),r,f=this.each(function(){var e=n(this),f=e.data("fu.scheduler"),o=typeof i=="object"&&i;f||e.data("fu.scheduler",f=new t(this,o));typeof i=="string"&&(r=f[i].apply(f,u))});return r===undefined?f:r};n.fn.scheduler.defaults={};n.fn.scheduler.Constructor=t;n.fn.scheduler.noConflict=function(){return n.fn.scheduler=i,this};n(document).on("mousedown.fu.scheduler.data-api","[data-initialize=scheduler]",function(t){var i=n(t.target).closest(".scheduler");i.data("fu.scheduler")||i.scheduler(i.data())});n(function(){n("[data-initialize=scheduler]").each(function(){var t=n(this);t.data("scheduler")||t.scheduler(t.data())})})}(n)})