// ***************************
// js.compressed/jquery/jquery.qtip.min.js
// ***************************
/*
* qTip2 - Pretty powerful tooltips
* http://craigsworks.com/projects/qtip2/
*
* Version: nightly
* Copyright 2009-2010 Craig Michael Thompson - http://craigsworks.com
*
* Dual licensed under MIT or GPLv2 licenses
*   http://en.wikipedia.org/wiki/MIT_License
*   http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Mon Dec 19 15:43:28.0000000000 2011
*//*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true *//*global window: false, jQuery: false, console: false */(function(a,b,c){function E(b){var c=this,d=b.elements,e=d.tooltip,f=".bgiframe-"+b.id;a.extend(c,{init:function(){d.bgiframe=a('<iframe class="ui-tooltip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';"  style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0); -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";"></iframe>'),d.bgiframe.appendTo(e),e.bind("tooltipmove"+f,c.adjust)},adjust:function(){var a=b.get("dimensions"),c=b.plugins.tip,f=d.tip,g,h;h=parseInt(e.css("border-left-width"),10)||0,h={left:-h,top:-h},c&&f&&(g=c.corner.precedance==="x"?["width","left"]:["height","top"],h[g[1]]-=f[g[0]]()),d.bgiframe.css(h).css(a)},destroy:function(){d.bgiframe.remove(),e.unbind(f)}}),c.init()}function D(c){var f=this,g=c.options.show.modal,i=c.elements,j=i.tooltip,k="#qtip-overlay",l=".qtipmodal",m=l+c.id,o="is-modal-qtip",q=a(document.body),r;c.checks.modal={"^show.modal.(on|blur)$":function(){f.init(),i.overlay.toggle(j.is(":visible"))}},a.extend(f,{init:function(){if(!g.on)return f;r=f.create(),j.attr(o,d).css("z-index",h.modal.zindex+a(n+"["+o+"]").length).unbind(l).unbind(m).bind("tooltipshow"+l+" tooltiphide"+l,function(b,c,d){var e=b.originalEvent;if(e&&b.type==="tooltiphide"&&/mouse(leave|enter)/.test(e.type)&&a(e.relatedTarget).closest(r[0]).length)try{b.preventDefault()}catch(g){}else(!e||e&&!e.solo)&&f[b.type.replace("tooltip","")](b,d)}).bind("tooltipfocus"+l,function(b){if(!b.isDefaultPrevented()){var c=a(n).filter("["+o+"]"),d=h.modal.zindex+c.length,e=parseInt(j[0].style.zIndex,10);r[0].style.zIndex=d-1,c.each(function(){this.style.zIndex>e&&(this.style.zIndex-=1)}),c.end().filter("."+p).qtip("blur",b.originalEvent),j.addClass(p)[0].style.zIndex=d;try{b.preventDefault()}catch(f){}}}).bind("tooltiphide"+l,function(b){a("["+o+"]").filter(":visible").not(j).last().qtip("focus",b)}),g.escape&&a(b).unbind(m).bind("keydown"+m,function(a){a.keyCode===27&&j.hasClass(p)&&c.hide(a)}),g.blur&&i.overlay.unbind(m).bind("click"+m,function(a){j.hasClass(p)&&c.hide(a)});return f},create:function(){var c=a(k);if(c.length)return i.overlay=c.insertAfter(a(n).last());r=i.overlay=a("<div />",{id:k.substr(1),html:"<div></div>",mousedown:function(){return e}}).insertAfter(a(n).last()),a(b).unbind(l).bind("resize"+l,function(){r.css({height:a(b).height(),width:a(b).width()})}).triggerHandler("resize");return r},toggle:function(b,c,h){if(b&&b.isDefaultPrevented())return f;var i=g.effect,k=c?"show":"hide",l=r.is(":visible"),p=a("["+o+"]").filter(":visible").not(j),s;r||(r=f.create());if(r.is(":animated")&&l===c||!c&&p.length)return f;c?(r.css({left:0,top:0}),r.toggleClass("blurs",g.blur),q.bind("focusin"+m,function(b){var c=a(b.target),d=c.closest(".qtip"),f=d.length<1?e:parseInt(d[0].style.zIndex,10)>parseInt(j[0].style.zIndex,10);!f&&a(b.target).closest(n)[0]!==j[0]&&j.find("input:visible").filter(":first").focus()})):q.undelegate("*","focusin"+m),r.stop(d,e),a.isFunction(i)?i.call(r,c):i===e?r[k]():r.fadeTo(parseInt(h,10)||90,c?1:0,function(){c||a(this).hide()}),c||r.queue(function(a){r.css({left:"",top:""}),a()});return f},show:function(a,b){return f.toggle(a,d,b)},hide:function(a,b){return f.toggle(a,e,b)},destroy:function(){var d=r;d&&(d=a("["+o+"]").not(j).length<1,d?(i.overlay.remove(),a(b).unbind(l)):i.overlay.unbind(l+c.id),q.undelegate("*","focusin"+m));return j.removeAttr(o).unbind(l)}}),f.init()}function C(b,g){function w(a){var b=a.precedance==="y",c=n[b?"width":"height"],d=n[b?"height":"width"],e=a.string().indexOf("center")>-1,f=c*(e?.5:1),g=Math.pow,h=Math.round,i,j,k,l=Math.sqrt(g(f,2)+g(d,2)),m=[p/f*l,p/d*l];m[2]=Math.sqrt(g(m[0],2)-g(p,2)),m[3]=Math.sqrt(g(m[1],2)-g(p,2)),i=l+m[2]+m[3]+(e?0:m[0]),j=i/l,k=[h(j*d),h(j*c)];return{height:k[b?0:1],width:k[b?1:0]}}function v(b){var c=k.titlebar&&b.y==="top",d=c?k.titlebar:k.content,e=a.browser.mozilla,f=e?"-moz-":a.browser.webkit?"-webkit-":"",g=b.y+(e?"":"-")+b.x,h=f+(e?"border-radius-"+g:"border-"+g+"-radius");return parseInt(d.css(h),10)||parseInt(l.css(h),10)||0}function u(a,b,c){b=b?b:a[a.precedance];var d=l.hasClass(r),e=k.titlebar&&a.y==="top",f=e?k.titlebar:k.content,g="border-"+b+"-width",h;l.addClass(r),h=parseInt(f.css(g),10),h=(c?h||parseInt(l.css(g),10):h)||0,l.toggleClass(r,d);return h}function t(a,f,g,h){if(k.tip){var l=i.corner.clone(),n=g.adjusted,o=b.options.position.adjust.method.split(" "),p=o[0],q=o[1]||o[0],r={left:e,top:e,x:0,y:0},s,t={},u;i.corner.fixed!==d&&(p==="shift"&&l.precedance==="x"&&n.left&&l.y!=="center"?l.precedance=l.precedance==="x"?"y":"x":p==="flip"&&n.left&&(l.x=l.x==="center"?n.left>0?"left":"right":l.x==="left"?"right":"left"),q==="shift"&&l.precedance==="y"&&n.top&&l.x!=="center"?l.precedance=l.precedance==="y"?"x":"y":q==="flip"&&n.top&&(l.y=l.y==="center"?n.top>0?"top":"bottom":l.y==="top"?"bottom":"top"),l.string()!==m.corner.string()&&(m.top!==n.top||m.left!==n.left)&&i.update(l,e)),s=i.position(l,n),s.right!==c&&(s.left=-s.right),s.bottom!==c&&(s.top=-s.bottom),s.user=Math.max(0,j.offset);if(r.left=p==="shift"&&!!n.left)l.x==="center"?t["margin-left"]=r.x=s["margin-left"]-n.left:(u=s.right!==c?[n.left,-s.left]:[-n.left,s.left],(r.x=Math.max(u[0],u[1]))>u[0]&&(g.left-=n.left,r.left=e),t[s.right!==c?"right":"left"]=r.x);if(r.top=q==="shift"&&!!n.top)l.y==="center"?t["margin-top"]=r.y=s["margin-top"]-n.top:(u=s.bottom!==c?[n.top,-s.top]:[-n.top,s.top],(r.y=Math.max(u[0],u[1]))>u[0]&&(g.top-=n.top,r.top=e),t[s.bottom!==c?"bottom":"top"]=r.y);k.tip.css(t).toggle(!(r.x&&r.y||l.x==="center"&&r.y||l.y==="center"&&r.x)),g.left-=s.left.charAt?s.user:p!=="shift"||r.top||!r.left&&!r.top?s.left:0,g.top-=s.top.charAt?s.user:q!=="shift"||r.left||!r.left&&!r.top?s.top:0,m.left=n.left,m.top=n.top,m.corner=l.clone()}}var i=this,j=b.options.style.tip,k=b.elements,l=k.tooltip,m={top:0,left:0},n={width:j.width,height:j.height},o={},p=j.border||0,q=".qtip-tip",s=!!(a("<canvas />")[0]||{}).getContext;i.mimic=i.corner=f,i.border=p,i.offset=j.offset,i.size=n,b.checks.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){i.init()||i.destroy(),b.reposition()},"^style.tip.(height|width)$":function(){n={width:j.width,height:j.height},i.create(),i.update(),b.reposition()},"^content.title.text|style.(classes|widget)$":function(){k.tip&&i.update()}},a.extend(i,{init:function(){var b=i.detectCorner()&&(s||a.browser.msie);b&&(i.create(),i.update(),l.unbind(q).bind("tooltipmove"+q,t));return b},detectCorner:function(){var a=j.corner,c=b.options.position,f=c.at,g=c.my.string?c.my.string():c.my;if(a===e||g===e&&f===e)return e;a===d?i.corner=new h.Corner(g):a.string||(i.corner=new h.Corner(a),i.corner.fixed=d);return i.corner.string()!=="centercenter"},detectColours:function(c){var d,e,f,g=k.tip.css("cssText",""),h=c||i.corner,m=h[h.precedance],p="border-"+m+"-color",q="border"+m.charAt(0)+m.substr(1)+"Color",s=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,t="background-color",u="transparent",v=" !important",w=a(document.body).css("color"),x=b.elements.content.css("color"),y=k.titlebar&&(h.y==="top"||h.y==="center"&&g.position().top+n.height/2+j.offset<k.titlebar.outerHeight(1)),z=y?k.titlebar:k.content;l.addClass(r),o.fill=e=g.css(t),o.border=f=g[0].style[q]||g.css(p)||l.css(p);if(!e||s.test(e))o.fill=z.css(t)||u,s.test(o.fill)&&(o.fill=l.css(t)||e);if(!f||s.test(f)||f===w)o.border=z.css(p)||u,s.test(o.border)&&(o.border=f);a("*",g).add(g).css("cssText",t+":"+u+v+";border:0"+v+";"),l.removeClass(r)},create:function(){var b=n.width,c=n.height,d;k.tip&&k.tip.remove(),k.tip=a("<div />",{"class":"ui-tooltip-tip"}).css({width:b,height:c}).prependTo(l),s?a("<canvas />").appendTo(k.tip)[0].getContext("2d").save():(d='<vml:shape coordorigin="0,0" style="display:inline-block; position:absolute; behavior:url(#default#VML);"></vml:shape>',k.tip.html(d+d),a("*",k.tip).bind("click mousedown",function(a){a.stopPropagation()}))},update:function(b,c){var g=k.tip,l=g.children(),q=n.width,r=n.height,t="px solid ",v="px dashed transparent",x=j.mimic,y=Math.round,z,A,C,D,E;b||(b=m.corner||i.corner),x===e?x=b:(x=new h.Corner(x),x.precedance=b.precedance,x.x==="inherit"?x.x=b.x:x.y==="inherit"?x.y=b.y:x.x===x.y&&(x[b.precedance]=b[b.precedance])),z=x.precedance,i.detectColours(b),o.border!=="transparent"&&o.border!=="#123456"?(p=u(b,f,d),j.border===0&&p>0&&(o.fill=o.border),i.border=p=j.border!==d?j.border:p):i.border=p=0,C=B(x,q,r),i.size=E=w(b),g.css(E),b.precedance==="y"?D=[y(x.x==="left"?p:x.x==="right"?E.width-q-p:(E.width-q)/2),y(x.y==="top"?E.height-r:0)]:D=[y(x.x==="left"?E.width-q:0),y(x.y==="top"?p:x.y==="bottom"?E.height-r-p:(E.height-r)/2)],s?(l.attr(E),A=l[0].getContext("2d"),A.restore(),A.save(),A.clearRect(0,0,3e3,3e3),A.translate(D[0],D[1]),A.beginPath(),A.moveTo(C[0][0],C[0][1]),A.lineTo(C[1][0],C[1][1]),A.lineTo(C[2][0],C[2][1]),A.closePath(),A.fillStyle=o.fill,A.strokeStyle=o.border,A.lineWidth=p*2,A.lineJoin="miter",A.miterLimit=100,p&&A.stroke(),A.fill()):(C="m"+C[0][0]+","+C[0][1]+" l"+C[1][0]+","+C[1][1]+" "+C[2][0]+","+C[2][1]+" xe",D[2]=p&&/^(r|b)/i.test(b.string())?parseFloat(a.browser.version,10)===8?2:1:0,l.css({antialias:""+(x.string().indexOf("center")>-1),left:D[0]-D[2]*Number(z==="x"),top:D[1]-D[2]*Number(z==="y"),width:q+p,height:r+p}).each(function(b){var c=a(this);c[c.prop?"prop":"attr"]({coordsize:q+p+" "+(r+p),path:C,fillcolor:o.fill,filled:!!b,stroked:!b}).css({display:p||b?"block":"none"}),!b&&c.html()===""&&c.html('<vml:stroke weight="'+p*2+'px" color="'+o.border+'" miterlimit="1000" joinstyle="miter"  style="behavior:url(#default#VML); display:inline-block;" />')})),c!==e&&i.position(b)},position:function(b){var c=k.tip,f={},g=Math.max(0,j.offset),h,l,m;if(j.corner===e||!c)return e;b=b||i.corner,h=b.precedance,l=w(b),m=[b.x,b.y],h==="x"&&m.reverse(),a.each(m,function(a,c){var e,i;c==="center"?(e=h==="y"?"left":"top",f[e]="50%",f["margin-"+e]=-Math.round(l[h==="y"?"width":"height"]/2)+g):(e=u(b,c,d),i=v(b),f[c]=a?p?u(b,c):0:g+(i>e?i:0))}),f[b[h]]-=l[h==="x"?"width":"height"],c.css({top:"",bottom:"",left:"",right:"",margin:""}).css(f);return f},destroy:function(){k.tip&&k.tip.remove(),l.unbind(q)}}),m.corner=new h.Corner(i.init())}function B(a,b,c){var d=Math.ceil(b/2),e=Math.ceil(c/2),f={bottomright:[[0,0],[b,c],[b,0]],bottomleft:[[0,0],[b,0],[0,c]],topright:[[0,c],[b,0],[b,c]],topleft:[[0,0],[0,c],[b,c]],topcenter:[[0,c],[d,0],[b,c]],bottomcenter:[[0,0],[b,0],[d,c]],rightcenter:[[0,0],[b,e],[0,c]],leftcenter:[[b,0],[b,c],[0,e]]};f.lefttop=f.bottomright,f.righttop=f.bottomleft,f.leftbottom=f.topright,f.rightbottom=f.topleft;return f[a.string()]}function A(b){var c=this,f=b.elements.tooltip,g=b.options.content.ajax,h=".qtip-ajax",i=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,j=d;b.checks.ajax={"^content.ajax":function(a,b,d){b==="ajax"&&(g=d),b==="once"?c.init():g&&g.url?c.load():f.unbind(h)}},a.extend(c,{init:function(){g&&g.url&&f.unbind(h)[g.once?"one":"bind"]("tooltipshow"+h,c.load);return c},load:function(d,f){function p(a,c,d){a.status!==0&&b.set("content.text",c+": "+d)}function o(c){k&&(c=a("<div/>").append(c.replace(i,"")).find(k)),b.set("content.text",c)}function n(){l&&(b.show(d.originalEvent),f=e),a.isFunction(g.complete)&&g.complete.apply(this,arguments)}var h=g.url.indexOf(" "),j=g.url,k,l=g.once&&!g.loading&&f;if(l)try{d.preventDefault()}catch(m){}else if(d&&d.isDefaultPrevented())return c;h>-1&&(k=j.substr(h),j=j.substr(0,h)),a.ajax(a.extend({success:o,error:p,context:b},g,{url:j,complete:n}))}}),c.init()}function z(b,c){var i,j,k,l,m,n=a(this),o=a(document.body),p=this===document?o:n,q=n.metadata?n.metadata(c.metadata):f,r=c.metadata.type==="html5"&&q?q[c.metadata.name]:f,s=n.data(c.metadata.name||"qtipopts");try{s=typeof s==="string"?(new Function("return "+s))():s}catch(t){w("Unable to parse HTML5 attribute data: "+s)}l=a.extend(d,{},g.defaults,c,typeof s==="object"?x(s):f,x(r||q)),j=l.position,l.id=b;if("boolean"===typeof l.content.text){k=n.attr(l.content.attr);if(l.content.attr!==e&&k)l.content.text=k;else{w("Unable to locate content for tooltip! Aborting render of tooltip on element: ",n);return e}}j.container.length||(j.container=o),j.target===e&&(j.target=p),l.show.target===e&&(l.show.target=p),l.show.solo===d&&(l.show.solo=o),l.hide.target===e&&(l.hide.target=p),l.position.viewport===d&&(l.position.viewport=j.container),j.at=new h.Corner(j.at),j.my=new h.Corner(j.my);if(a.data(this,"qtip"))if(l.overwrite)n.qtip("destroy");else if(l.overwrite===e)return e;l.suppress&&(m=a.attr(this,"title"))&&a(this).removeAttr("title").attr(u,m),i=new y(n,l,b,!!k),a.data(this,"qtip",i),n.bind("remove.qtip-"+b,function(){i.destroy()});return i}function y(s,t,w,y){function R(){var c=[t.show.target[0],t.hide.target[0],z.rendered&&G.tooltip[0],t.position.container[0],t.position.viewport[0],b,document];z.rendered?a([]).pushStack(a.grep(c,function(a){return typeof a==="object"})).unbind(F):t.show.target.unbind(F+"-create")}function Q(){function p(a){E.is(":visible")&&z.reposition(a)}function o(a){if(E.hasClass(m))return e;clearTimeout(z.timers.inactive),z.timers.inactive=setTimeout(function(){z.hide(a)},t.hide.inactive)}function l(b){if(E.hasClass(m)||C||D)return e;var d=a(b.relatedTarget||b.target),g=d.closest(n)[0]===E[0],h=d[0]===f.show[0];clearTimeout(z.timers.show),clearTimeout(z.timers.hide);if(c.target==="mouse"&&g||t.hide.fixed&&(/mouse(out|leave|move)/.test(b.type)&&(g||h)))try{b.preventDefault(),b.stopImmediatePropagation()}catch(i){}else t.hide.delay>0?z.timers.hide=setTimeout(function(){z.hide(b)},t.hide.delay):z.hide(b)}function k(a){if(E.hasClass(m))return e;clearTimeout(z.timers.show),clearTimeout(z.timers.hide);var b=function(){z.toggle(d,a)};t.show.delay>0?z.timers.show=setTimeout(b,t.show.delay):b()}var c=t.position,f={show:t.show.target,hide:t.hide.target,viewport:a(c.viewport),document:a(document),body:a(document.body),window:a(b)},h={show:a.trim(""+t.show.event).split(" "),hide:a.trim(""+t.hide.event).split(" ")},j=a.browser.msie&&parseInt(a.browser.version,10)===6;E.bind("mouseenter"+F+" mouseleave"+F,function(a){var b=a.type==="mouseenter";b&&z.focus(a),E.toggleClass(q,b)}),t.hide.fixed&&(f.hide=f.hide.add(E),E.bind("mouseover"+F,function(){E.hasClass(m)||clearTimeout(z.timers.hide)})),/mouse(out|leave)/i.test(t.hide.event)?t.hide.leave==="window"&&f.window.bind("mouseout"+F+" blur"+F,function(a){/select|option/.test(a.target)&&!a.relatedTarget&&z.hide(a)}):/mouse(over|enter)/i.test(t.show.event)&&f.hide.bind("mouseleave"+F,function(a){clearTimeout(z.timers.show)}),(""+t.hide.event).indexOf("unfocus")>-1&&f.body.bind("mousedown"+F,function(b){var c=a(b.target),d=!E.hasClass(m)&&E.is(":visible");c[0]!==E[0]&&c.parents(n).length===0&&c.add(s).length>1&&!c.attr("disabled")&&z.hide(b)}),"number"===typeof t.hide.inactive&&(f.show.bind("qtip-"+w+"-inactive",o),a.each(g.inactiveEvents,function(a,b){f.hide.add(G.tooltip).bind(b+F+"-inactive",o)})),a.each(h.hide,function(b,c){var d=a.inArray(c,h.show),e=a(f.hide);d>-1&&e.add(f.show).length===e.length||c==="unfocus"?(f.show.bind(c+F,function(a){E.is(":visible")?l(a):k(a)}),delete h.show[d]):f.hide.bind(c+F,l)}),a.each(h.show,function(a,b){f.show.bind(b+F,k)}),"number"===typeof t.hide.distance&&f.show.add(E).bind("mousemove"+F,function(a){var b=H.origin||{},c=t.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&z.hide(a)}),c.target==="mouse"&&(f.show.bind("mousemove"+F,function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),c.adjust.mouse&&(t.hide.event&&E.bind("mouseleave"+F,function(a){(a.relatedTarget||a.target)!==f.show[0]&&z.hide(a)}),f.document.bind("mousemove"+F,function(a){!E.hasClass(m)&&E.is(":visible")&&z.reposition(a||i)}))),(c.adjust.resize||f.viewport.length)&&(a.event.special.resize?f.viewport:f.window).bind("resize"+F,p),(f.viewport.length||j&&E.css("position")==="fixed")&&f.viewport.bind("scroll"+F,p)}function P(b,d){function g(b){function i(c){c&&(delete h[c.src],clearTimeout(z.timers.img[c.src]),a(c).unbind(F)),a.isEmptyObject(h)&&(z.redraw(),d!==e&&z.reposition(H.event),b())}var g,h={};if((g=f.find("img:not([height]):not([width])")).length===0)return i();g.each(function(b,d){if(h[d.src]===c){var e=0,f=3;(function g(){if(d.height||d.width||e>f)return i(d);e+=1,z.timers.img[d.src]=setTimeout(g,700)})(),a(d).bind("error"+F+" load"+F,function(){i(this)}),h[d.src]=d}})}var f=G.content;if(!z.rendered||!b)return e;a.isFunction(b)&&(b=b.call(s,H.event,z)||""),b.jquery&&b.length>0?f.empty().append(b.css({display:"block"})):f.html(b),z.rendered<0?E.queue("fx",g):(D=0,g(a.noop));return z}function O(b,c){var d=G.title;if(!z.rendered||!b)return e;a.isFunction(b)&&(b=b.call(s,H.event,z));if(b===e)return K(e);b.jquery&&b.length>0?d.empty().append(b.css({display:"block"})):d.html(b),z.redraw(),c!==e&&z.rendered&&E.is(":visible")&&z.reposition(H.event)}function N(a){var b=G.button,c=G.title;if(!z.rendered)return e;a?(c||M(),L()):b.remove()}function M(){var b=B+"-title";G.titlebar&&K(),G.titlebar=a("<div />",{"class":k+"-titlebar "+(t.style.widget?"ui-widget-header":"")}).append(G.title=a("<div />",{id:b,"class":k+"-title","aria-atomic":d})).insertBefore(G.content).delegate(".ui-tooltip-close","mousedown keydown mouseup keyup mouseout",function(b){a(this).toggleClass("ui-state-active ui-state-focus",b.type.substr(-4)==="down")}).delegate(".ui-tooltip-close","mouseover mouseout",function(b){a(this).toggleClass("ui-state-hover",b.type==="mouseover")}),t.content.title.button?L():z.rendered&&z.redraw()}function L(){var b=t.content.title.button,c=typeof b==="string",d=c?b:"Close tooltip";G.button&&G.button.remove(),b.jquery?G.button=b:G.button=a("<a />",{"class":"ui-state-default ui-tooltip-close "+(t.style.widget?"":k+"-icon"),title:d,"aria-label":d}).prepend(a("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"})),G.button.appendTo(G.titlebar).attr("role","button").click(function(a){E.hasClass(m)||z.hide(a);return e}),z.redraw()}function K(a){G.title&&(G.titlebar.remove(),G.titlebar=G.title=G.button=f,a!==e&&z.reposition())}function J(){var a=t.style.widget;E.toggleClass(l,a).toggleClass(o,t.style["default"]&&!a),G.content.toggleClass(l+"-content",a),G.titlebar&&G.titlebar.toggleClass(l+"-header",a),G.button&&G.button.toggleClass(k+"-icon",!a)}function I(a){var b=0,c,d=t,e=a.split(".");while(d=d[e[b++]])b<e.length&&(c=d);return[c||t,e.pop()]}var z=this,A=document.body,B=k+"-"+w,C=0,D=0,E=a(),F=".qtip-"+w,G,H;z.id=w,z.rendered=e,z.elements=G={target:s},z.timers={img:{}},z.options=t,z.checks={},z.plugins={},z.cache=H={event:{},target:a(),disabled:e,attr:y},z.checks.builtin={"^id$":function(b,c,f){var h=f===d?g.nextid:f,i=k+"-"+h;h!==e&&h.length>0&&!a("#"+i).length&&(E[0].id=i,G.content[0].id=i+"-content",G.title[0].id=i+"-title")},"^content.text$":function(a,b,c){P(c)},"^content.title.text$":function(a,b,c){if(!c)return K();!G.title&&c&&M(),O(c)},"^content.title.button$":function(a,b,c){N(c)},"^position.(my|at)$":function(a,b,c){"string"===typeof c&&(a[b]=new h.Corner(c))},"^position.container$":function(a,b,c){z.rendered&&E.appendTo(c)},"^show.ready$":function(){z.rendered?z.toggle(d):z.render(1)},"^style.classes$":function(a,b,c){E.attr("class",k+" qtip ui-helper-reset "+c)},"^style.widget|content.title":J,"^events.(render|show|move|hide|focus|blur)$":function(b,c,d){E[(a.isFunction(d)?"":"un")+"bind"]("tooltip"+c,d)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){var a=t.position;E.attr("tracking",a.target==="mouse"&&a.adjust.mouse),R(),Q()}},a.extend(z,{render:function(b){if(z.rendered)return z;var c=t.content.text,f=t.content.title.text,g=t.position,i=a.Event("tooltiprender");a.attr(s[0],"aria-describedby",B),E=G.tooltip=a("<div/>",{id:B,"class":k+" qtip ui-helper-reset "+o+" "+t.style.classes+" "+k+"-pos-"+t.position.my.abbrev(),width:t.style.width||"",height:t.style.height||"",tracking:g.target==="mouse"&&g.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":e,"aria-describedby":B+"-content","aria-hidden":d}).toggleClass(m,H.disabled).data("qtip",z).appendTo(t.position.container).append(G.content=a("<div />",{"class":k+"-content",id:B+"-content","aria-atomic":d})),z.rendered=-1,C=D=1,f&&(M(),a.isFunction(f)||O(f,e)),a.isFunction(c)||P(c,e),z.rendered=d,J(),a.each(t.events,function(b,c){a.isFunction(c)&&E.bind(b==="toggle"?"tooltipshow tooltiphide":"tooltip"+b,c)}),a.each(h,function(){this.initialize==="render"&&this(z)}),Q(),E.queue("fx",function(a){i.originalEvent=H.event,E.trigger(i,[z]),C=D=0,z.redraw(),(t.show.ready||b)&&z.toggle(d,H.event,e),a()});return z},get:function(a){var b,c;switch(a.toLowerCase()){case"dimensions":b={height:E.outerHeight(),width:E.outerWidth()};break;case"offset":b=h.offset(E,t.position.container);break;default:c=I(a.toLowerCase()),b=c[0][c[1]],b=b.precedance?b.string():b}return b},set:function(b,c){function m(a,b){var c,d,e;for(c in k)for(d in k[c])if(e=(new RegExp(d,"i")).exec(a))b.push(e),k[c][d].apply(z,b)}var g=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,h=/^content\.(title|attr)|style/i,i=e,j=e,k=z.checks,l;"string"===typeof b?(l=b,b={},b[l]=c):b=a.extend(d,{},b),a.each(b,function(c,d){var e=I(c.toLowerCase()),f;f=e[0][e[1]],e[0][e[1]]="object"===typeof d&&d.nodeType?a(d):d,b[c]=[e[0],e[1],d,f],i=g.test(c)||i,j=h.test(c)||j}),x(t),C=D=1,a.each(b,m),C=D=0,E.is(":visible")&&z.rendered&&(i&&z.reposition(t.position.target==="mouse"?f:H.event),j&&z.redraw());return z},toggle:function(b,c){function q(){b?(a.browser.msie&&E[0].style.removeAttribute("filter"),E.css("overflow",""),"string"===typeof h.autofocus&&a(h.autofocus,E).focus(),p=a.Event("tooltipvisible"),p.originalEvent=c?H.event:f,E.trigger(p,[z]),h.target.trigger("qtip-"+w+"-inactive")):E.css({display:"",visibility:"",opacity:"",left:"",top:""})}if(!z.rendered)return b?z.render(1):z;var g=b?"show":"hide",h=t[g],j=E.is(":visible"),k=!c||t[g].target.length<2||H.target[0]===c.target,l=t.position,m=t.content,o,p;(typeof b).search("boolean|number")&&(b=!j);if(!E.is(":animated")&&j===b&&k)return z;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(H.event.type)&&c.target===t.show.target[0]&&E.has(c.relatedTarget).length)return z;H.event=a.extend({},c)}p=a.Event("tooltip"+g),p.originalEvent=c?H.event:f,E.trigger(p,[z,90]);if(p.isDefaultPrevented())return z;a.attr(E[0],"aria-hidden",!b),b?(H.origin=a.extend({},i),z.focus(c),a.isFunction(m.text)&&P(m.text,e),a.isFunction(m.title.text)&&O(m.title.text,e),!v&&l.target==="mouse"&&l.adjust.mouse&&(a(document).bind("mousemove.qtip",function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),v=d),z.reposition(c,arguments[2]),(p.solo=!!h.solo)&&a(n,h.solo).not(E).qtip("hide",p)):(clearTimeout(z.timers.show),delete H.origin,v&&!a(n+'[tracking="true"]:visible',h.solo).not(E).length&&(a(document).unbind("mousemove.qtip"),v=e),z.blur(c)),k&&E.stop(0,1),h.effect===e?(E[g](),q.call(E)):a.isFunction(h.effect)?(h.effect.call(E,z),E.queue("fx",function(a){q(),a()})):E.fadeTo(90,b?1:0,q),b&&h.target.trigger("qtip-"+w+"-inactive");return z},show:function(a){return z.toggle(d,a)},hide:function(a){return z.toggle(e,a)},focus:function(b){if(!z.rendered)return z;var c=a(n),d=parseInt(E[0].style.zIndex,10),e=g.zindex+c.length,f=a.extend({},b),h,i;E.hasClass(p)||(i=a.Event("tooltipfocus"),i.originalEvent=f,E.trigger(i,[z,e]),i.isDefaultPrevented()||(d!==e&&(c.each(function(){this.style.zIndex>d&&(this.style.zIndex=this.style.zIndex-1)}),c.filter("."+p).qtip("blur",f)),E.addClass(p)[0].style.zIndex=e));return z},blur:function(b){var c=a.extend({},b),d;E.removeClass(p),d=a.Event("tooltipblur"),d.originalEvent=c,E.trigger(d,[z]);return z},reposition:function(c,d){if(!z.rendered||C)return z;C=1;var f=t.position.target,g=t.position,j=g.my,l=g.at,m=g.adjust,n=m.method.split(" "),o=E.outerWidth(),p=E.outerHeight(),q=0,r=0,s=a.Event("tooltipmove"),u=E.css("position")==="fixed",v=g.viewport,w={left:0,top:0},x=g.container,y=e,B=z.plugins.tip,D={horizontal:n[0],vertical:n[1]=n[1]||n[0],enabled:v.jquery&&f[0]!==b&&f[0]!==A&&m.method!=="none",left:function(a){var b=D.horizontal==="shift",c=-x.offset.left+v.offset.left+v.scrollLeft,d=j.x==="left"?o:j.x==="right"?-o:-o/2,e=l.x==="left"?q:l.x==="right"?-q:-q/2,f=B&&B.size?B.size.width||0:0,g=B&&B.corner&&B.corner.precedance==="x"&&!b?f:0,h=c-a+g,i=a+o-v.width-c+g,k=d-(j.precedance==="x"||j.x===j.y?e:0),n=j.x==="center";b?(g=B&&B.corner&&B.corner.precedance==="y"?f:0,k=(j.x==="left"?1:-1)*d-g,w.left+=h>0?h:i>0?-i:0,w.left=Math.max(-x.offset.left+v.offset.left+(g&&B.corner.x==="center"?B.offset:0),a-k,Math.min(Math.max(-x.offset.left+v.offset.left+v.width,a+k),w.left))):(h>0&&(j.x!=="left"||i>0)?w.left-=k:i>0&&(j.x!=="right"||h>0)&&(w.left-=n?-k:k),w.left!==a&&n&&(w.left-=m.x),w.left<c&&-w.left>i&&(w.left=a));return w.left-a},top:function(a){var b=D.vertical==="shift",c=-x.offset.top+v.offset.top+v.scrollTop,d=j.y==="top"?p:j.y==="bottom"?-p:-p/2,e=l.y==="top"?r:l.y==="bottom"?-r:-r/2,f=B&&B.size?B.size.height||0:0,g=B&&B.corner&&B.corner.precedance==="y"&&!b?f:0,h=c-a+g,i=a+p-v.height-c+g,k=d-(j.precedance==="y"||j.x===j.y?e:0),n=j.y==="center";b?(g=B&&B.corner&&B.corner.precedance==="x"?f:0,k=(j.y==="top"?1:-1)*d-g,w.top+=h>0?h:i>0?-i:0,w.top=Math.max(-x.offset.top+v.offset.top+(g&&B.corner.x==="center"?B.offset:0),a-k,Math.min(Math.max(-x.offset.top+v.offset.top+v.height,a+k),w.top))):(h>0&&(j.y!=="top"||i>0)?w.top-=k:i>0&&(j.y!=="bottom"||h>0)&&(w.top-=n?-k:k),w.top!==a&&n&&(w.top-=m.y),w.top<0&&-w.top>i&&(w.top=a));return w.top-a}},F;if(a.isArray(f)&&f.length===2)l={x:"left",y:"top"},w={left:f[0],top:f[1]};else if(f==="mouse"&&(c&&c.pageX||H.event.pageX))l={x:"left",y:"top"},c=(c&&(c.type==="resize"||c.type==="scroll")?H.event:c&&c.pageX&&c.type==="mousemove"?c:i&&i.pageX&&(m.mouse||!c||!c.pageX)?{pageX:i.pageX,pageY:i.pageY}:!m.mouse&&H.origin&&H.origin.pageX?H.origin:c)||c||H.event||i||{},w={top:c.pageY,left:c.pageX};else{f==="event"?c&&c.target&&c.type!=="scroll"&&c.type!=="resize"?f=H.target=a(c.target):f=H.target:H.target=a(f),f=a(f).eq(0);if(f.length===0)return z;f[0]===document||f[0]===b?(q=h.iOS?b.innerWidth:f.width(),r=h.iOS?b.innerHeight:f.height(),f[0]===b&&(w={top:u||h.iOS?(v||f).scrollTop():0,left:u||h.iOS?(v||f).scrollLeft():0})):f.is("area")&&h.imagemap?w=h.imagemap(f,l,D.enabled?n:e):f[0].namespaceURI==="http://www.w3.org/2000/svg"&&h.svg?w=h.svg(f,l):(q=f.outerWidth(),r=f.outerHeight(),w=h.offset(f,x)),w.offset&&(q=w.width,r=w.height,y=w.flipoffset,w=w.offset);if(h.iOS<4.1&&h.iOS>3.1||h.iOS==4.3||!h.iOS&&u)F=a(b),w.left-=F.scrollLeft(),w.top-=F.scrollTop();w.left+=l.x==="right"?q:l.x==="center"?q/2:0,w.top+=l.y==="bottom"?r:l.y==="center"?r/2:0}w.left+=m.x+(j.x==="right"?-o:j.x==="center"?-o/2:0),w.top+=m.y+(j.y==="bottom"?-p:j.y==="center"?-p/2:0),D.enabled?(v={elem:v,height:v[(v[0]===b?"h":"outerH")+"eight"](),width:v[(v[0]===b?"w":"outerW")+"idth"](),scrollLeft:u?0:v.scrollLeft(),scrollTop:u?0:v.scrollTop(),offset:v.offset()||{left:0,top:0}},x={elem:x,scrollLeft:x.scrollLeft(),scrollTop:x.scrollTop(),offset:x.offset()||{left:0,top:0}},w.adjusted={left:D.horizontal!=="none"?D.left(w.left):0,top:D.vertical!=="none"?D.top(w.top):0},w.adjusted.left+w.adjusted.top&&E.attr("class",E[0].className.replace(/ui-tooltip-pos-\w+/i,k+"-pos-"+j.abbrev())),y&&w.adjusted.left&&(w.left+=y.left),y&&w.adjusted.top&&(w.top+=y.top)):w.adjusted={left:0,top:0},s.originalEvent=a.extend({},c),E.trigger(s,[z,w,v.elem||v]);if(s.isDefaultPrevented())return z;delete w.adjusted,d===e||isNaN(w.left)||isNaN(w.top)||f==="mouse"||!a.isFunction(g.effect)?E.css(w):a.isFunction(g.effect)&&(g.effect.call(E,z,a.extend({},w)),E.queue(function(b){a(this).css({opacity:"",height:""}),a.browser.msie&&this.style.removeAttribute("filter"),b()})),C=0;return z},redraw:function(){if(z.rendered<1||D)return z;var a=t.position.container,b,c,d,e;D=1,t.style.height&&E.css("height",t.style.height),t.style.width?E.css("width",t.style.width):(E.css("width","").addClass(r),c=E.width()+1,d=E.css("max-width")||"",e=E.css("min-width")||"",b=(d+e).indexOf("%")>-1?a.width()/100:0,d=(d.indexOf("%")>-1?b:1)*parseInt(d,10)||c,e=(e.indexOf("%")>-1?b:1)*parseInt(e,10)||0,c=d+e?Math.min(Math.max(c,e),d):c,E.css("width",Math.round(c)).removeClass(r)),D=0;return z},disable:function(b){"boolean"!==typeof b&&(b=!E.hasClass(m)&&!H.disabled),z.rendered?(E.toggleClass(m,b),a.attr(E[0],"aria-disabled",b)):H.disabled=!!b;return z},enable:function(){return z.disable(e)},destroy:function(){var b=s[0],c=a.attr(b,u),d=s.data("qtip");z.rendered&&(E.remove(),a.each(z.plugins,function(){this.destroy&&this.destroy()})),clearTimeout(z.timers.show),clearTimeout(z.timers.hide),R();if(!d||z===d)a.removeData(b,"qtip"),t.suppress&&c&&(a.attr(b,"title",c),s.removeAttr(u)),s.removeAttr("aria-describedby");s.unbind(".qtip-"+w),delete j[z.id];return s}})}function x(b){var c;if(!b||"object"!==typeof b)return e;if(b.metadata===f||"object"!==typeof b.metadata)b.metadata={type:b.metadata};if("content"in b){if(b.content===f||"object"!==typeof b.content||b.content.jquery)b.content={text:b.content};c=b.content.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.text=e);if("title"in b.content){if(b.content.title===f||"object"!==typeof b.content.title)b.content.title={text:b.content.title};c=b.content.title.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.title.text=e)}}if("position"in b)if(b.position===f||"object"!==typeof b.position)b.position={my:b.position,at:b.position};if("show"in b)if(b.show===f||"object"!==typeof b.show)b.show.jquery?b.show={target:b.show}:b.show={event:b.show};if("hide"in b)if(b.hide===f||"object"!==typeof b.hide)b.hide.jquery?b.hide={target:b.hide}:b.hide={event:b.hide};if("style"in b)if(b.style===f||"object"!==typeof b.style)b.style={classes:b.style};a.each(h,function(){this.sanitize&&this.sanitize(b)});return b}function w(){w.history=w.history||[],w.history.push(arguments);if("object"===typeof console){var a=console[console.warn?"warn":"log"],b=Array.prototype.slice.call(arguments),c;typeof arguments[0]==="string"&&(b[0]="qTip2: "+b[0]),c=a.apply?a.apply(console,b):a(b)}}"use strict";var d=!0,e=!1,f=null,g,h,i,j={},k="ui-tooltip",l="ui-widget",m="ui-state-disabled",n="div.qtip."+k,o=k+"-default",p=k+"-focus",q=k+"-hover",r=k+"-fluid",s="-31000px",t="_replacedByqTip",u="oldtitle",v;g=a.fn.qtip=function(b,h,i){var j=(""+b).toLowerCase(),k=f,l=a.makeArray(arguments).slice(1),m=l[l.length-1],n=this[0]?a.data(this[0],"qtip"):f;if(!arguments.length&&n||j==="api")return n;if("string"===typeof b){this.each(function(){var b=a.data(this,"qtip");if(!b)return d;m&&m.timeStamp&&(b.cache.event=m);if(j!=="option"&&j!=="options"||!h)b[j]&&b[j].apply(b[j],l);else if(a.isPlainObject(h)||i!==c)b.set(h,i);else{k=b.get(h);return e}});return k!==f?k:this}if("object"===typeof b||!arguments.length){n=x(a.extend(d,{},b));return g.bind.call(this,n,m)}},g.bind=function(b,f){return this.each(function(k){function r(b){function d(){p.render(typeof b==="object"||l.show.ready),m.show.add(m.hide).unbind(o)}if(p.cache.disabled)return e;p.cache.event=a.extend({},b),p.cache.target=b?a(b.target):[c],l.show.delay>0?(clearTimeout(p.timers.show),p.timers.show=setTimeout(d,l.show.delay),n.show!==n.hide&&m.hide.bind(n.hide,function(){clearTimeout(p.timers.show)})):d()}var l,m,n,o,p,q;q=a.isArray(b.id)?b.id[k]:b.id,q=!q||q===e||q.length<1||j[q]?g.nextid++:j[q]=q,o=".qtip-"+q+"-create",p=z.call(this,q,b);if(p===e)return d;l=p.options,a.each(h,function(){this.initialize==="initialize"&&this(p)}),m={show:l.show.target,hide:l.hide.target},n={show:a.trim(""+l.show.event).replace(/ /g,o+" ")+o,hide:a.trim(""+l.hide.event).replace(/ /g,o+" ")+o},/mouse(over|enter)/i.test(n.show)&&!/mouse(out|leave)/i.test(n.hide)&&(n.hide+=" mouseleave"+o),m.show.bind("mousemove"+o,function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),m.show.bind(n.show,r),(l.show.ready||l.prerender)&&r(f)})},h=g.plugins={Corner:function(a){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase();var b=a.charAt(0);this.precedance=b==="t"||b==="b"?"y":"x",this.string=function(){return this.precedance==="y"?this.y+this.x:this.x+this.y},this.abbrev=function(){var a=this.x.substr(0,1),b=this.y.substr(0,1);return a===b?a:a==="c"||a!=="c"&&b!=="c"?b+a:a+b},this.clone=function(){return{x:this.x,y:this.y,precedance:this.precedance,string:this.string,abbrev:this.abbrev,clone:this.clone}}},offset:function(a,b){function i(a,b){c.left+=b*a.scrollLeft(),c.top+=b*a.scrollTop()}var c=a.offset(),d=b,e=0,f=document.body,g,h;if(d){do{d.css("position")!=="static"&&(g=d[0]===f?{left:parseInt(d.css("left"),10)||0,top:parseInt(d.css("top"),10)||0}:d.position(),c.left-=g.left+(parseInt(d.css("borderLeftWidth"),10)||0)+(parseInt(d.css("marginLeft"),10)||0),c.top-=g.top+(parseInt(d.css("borderTopWidth"),10)||0),h=d.css("overflow"),(h==="scroll"||h==="auto")&&++e);if(d[0]===f)break}while(d=d.offsetParent());b[0]!==f&&e&&i(b,1)}return c},iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_","."))||e,fn:{attr:function(b,c){if(this.length){var d=this[0],e="title",f=a.data(d,"qtip");if(b===e&&f&&"object"===typeof f&&f.options.suppress){if(arguments.length<2)return a.attr(d,u);f&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",c);return this.attr(u,c)}}return a.fn["attr"+t].apply(this,arguments)},clone:function(b){var c=a([]),d="title",e=a.fn["clone"+t].apply(this,arguments);b||e.filter("["+u+"]").attr("title",function(){return a.attr(this,u)}).removeAttr(u);return e},remove:a.ui?f:function(b,c){a.ui||a(this).each(function(){c||(!b||a.filter(b,[this]).length)&&a("*",this).add(this).each(function(){a(this).triggerHandler("remove")})})}}},a.each(h.fn,function(b,c){if(!c||a.fn[b+t])return d;var e=a.fn[b+t]=a.fn[b];a.fn[b]=function(){return c.apply(this,arguments)||e.apply(this,arguments)}}),g.version="nightly",g.nextid=0,g.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),g.zindex=15e3,g.defaults={prerender:e,id:e,overwrite:d,suppress:d,content:{text:d,attr:"title",title:{text:e,button:e}},position:{my:"top left",at:"bottom right",target:e,container:e,viewport:e,adjust:{x:0,y:0,mouse:d,resize:d,method:"flip flip"},effect:function(b,c,d){a(this).animate(c,{duration:200,queue:e})}},show:{target:e,event:"mouseenter",effect:d,delay:90,solo:e,ready:e,autofocus:e},hide:{target:e,event:"mouseleave",effect:d,delay:0,fixed:e,inactive:e,leave:"window",distance:e},style:{classes:"",widget:e,width:e,height:e,"default":d},events:{render:f,move:f,show:f,hide:f,toggle:f,visible:f,focus:f,blur:f}},h.ajax=function(a){var b=a.plugins.ajax;return"object"===typeof b?b:a.plugins.ajax=new A(a)},h.ajax.initialize="render",h.ajax.sanitize=function(a){var b=a.content,c;b&&"ajax"in b&&(c=b.ajax,typeof c!=="object"&&(c=a.content.ajax={url:c}),"boolean"!==typeof c.once&&c.once&&(c.once=!!c.once))},a.extend(d,g.defaults,{content:{ajax:{loading:d,once:d}}}),h.imagemap=function(b,c,d){function n(a,b,c){var d=0,e=1,f=1,g=0,h=0,i=a.width,j=a.height;while(i>0&&j>0&&e>0&&f>0){i=Math.floor(i/2),j=Math.floor(j/2),c.x==="left"?e=i:c.x==="right"?e=a.width-i:e+=Math.floor(i/2),c.y==="top"?f=j:c.y==="bottom"?f=a.height-j:f+=Math.floor(j/2),d=b.length;while(d--){if(b.length<2)break;g=b[d][0]-a.offset.left,h=b[d][1]-a.offset.top,(c.x==="left"&&g>=e||c.x==="right"&&g<=e||c.x==="center"&&(g<e||g>a.width-e)||c.y==="top"&&h>=f||c.y==="bottom"&&h<=f||c.y==="center"&&(h<f||h>a.height-f))&&b.splice(d,1)}}return{left:b[0][0],top:b[0][1]}}b.jquery||(b=a(b));var e=(b[0].shape||b.attr("shape")).toLowerCase(),f=(b[0].coords||b.attr("coords")).split(","),g=[],h=a('img[usemap="#'+b.parent("map").attr("name")+'"]'),i=h.offset(),j={width:0,height:0,offset:{top:1e10,right:0,bottom:0,left:1e10}},k=0,l=0,m;i.left+=Math.ceil((h.outerWidth()-h.width())/2),i.top+=Math.ceil((h.outerHeight()-h.height())/2);if(e==="poly"){k=f.length;while(k--)l=[parseInt(f[--k],10),parseInt(f[k+1],10)],l[0]>j.offset.right&&(j.offset.right=l[0]),l[0]<j.offset.left&&(j.offset.left=l[0]),l[1]>j.offset.bottom&&(j.offset.bottom=l[1]),l[1]<j.offset.top&&(j.offset.top=l[1]),g.push(l)}else g=a.map(f,function(a){return parseInt(a,10)});switch(e){case"rect":j={width:Math.abs(g[2]-g[0]),height:Math.abs(g[3]-g[1]),offset:{left:Math.min(g[0],g[2]),top:Math.min(g[1],g[3])}};break;case"circle":j={width:g[2]+2,height:g[2]+2,offset:{left:g[0],top:g[1]}};break;case"poly":a.extend(j,{width:Math.abs(j.offset.right-j.offset.left),height:Math.abs(j.offset.bottom-j.offset.top)}),c.string()==="centercenter"?j.offset={left:j.offset.left+j.width/2,top:j.offset.top+j.height/2}:(j.offset=n(j,g.slice(),c),d&&(d[0]==="flip"||d[1]==="flip")&&(j.flipoffset=n(j,g.slice(),{x:c.x==="left"?"right":c.x==="right"?"left":"center",y:c.y==="top"?"bottom":c.y==="bottom"?"top":"center"}),j.flipoffset.left-=j.offset.left,j.flipoffset.top-=j.offset.top)),j.width=j.height=0}j.offset.left+=i.left,j.offset.top+=i.top;return j},h.tip=function(a){var b=a.plugins.tip;return"object"===typeof b?b:a.plugins.tip=new C(a)},h.tip.initialize="render",h.tip.sanitize=function(a){var b=a.style,c;b&&"tip"in b&&(c=a.style.tip,typeof c!=="object"&&(a.style.tip={corner:c}),/string|boolean/i.test(typeof c.corner)||(c.corner=d),typeof c.width!=="number"&&delete c.width,typeof c.height!=="number"&&delete c.height,typeof c.border!=="number"&&c.border!==d&&delete c.border,typeof c.offset!=="number"&&delete c.offset)},a.extend(d,g.defaults,{style:{tip:{corner:d,mimic:e,width:6,height:6,border:d,offset:0}}}),h.svg=function(b,c){var d=a(document),e=b[0],f={width:0,height:0,offset:{top:1e10,left:1e10}},g,h,i,j,k;if(e.getBBox&&e.parentNode){g=e.getBBox(),h=e.getScreenCTM(),i=e.farthestViewportElement||e;if(!i.createSVGPoint)return f;j=i.createSVGPoint(),j.x=g.x,j.y=g.y,k=j.matrixTransform(h),f.offset.left=k.x,f.offset.top=k.y,j.x+=g.width,j.y+=g.height,k=j.matrixTransform(h),f.width=k.x-f.offset.left,f.height=k.y-f.offset.top,f.offset.left+=d.scrollLeft(),f.offset.top+=d.scrollTop()}return f},h.modal=function(a){var b=a.plugins.modal;return"object"===typeof b?b:a.plugins.modal=new D(a)},h.modal.initialize="render",h.modal.sanitize=function(a){a.show&&(typeof a.show.modal!=="object"?a.show.modal={on:!!a.show.modal}:typeof a.show.modal.on==="undefined"&&(a.show.modal.on=d))},h.modal.zindex=g.zindex+1e3,a.extend(d,g.defaults,{show:{modal:{on:e,effect:d,blur:d,escape:d}}}),h.bgiframe=function(b){var c=a.browser,d=b.plugins.bgiframe;if(a("select, object").length<1||(!c.msie||(""+c.version).charAt(0)!=="6"))return e;return"object"===typeof d?d:b.plugins.bgiframe=new E(b)},h.bgiframe.initialize="render"})(jQuery,window);

// ***************************
// js.compressed/qtip.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.5.2
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2019 MH Sub I, LLC dba vBulletin. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["no_preview_text_available","working_ellipsis"]);window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=$.merge(window.vBulletin.options.precache,["threadpreview"]);(function(){(function(){function B(F,E){var D=E.elements.tooltip;window.setTimeout(function(){var M=parseInt(D.css("left"),10),G=$(window).scrollLeft();if(M<G){D.css("left",G+1)}else{var L=D.outerWidth(),I=$(window).width(),J=M+L,H=G+I;if(J>H){var N=J-H,K=M-N;D.css("left",K-1)}}},0)}var C=$.fn.qtip;$.fn.qtip=function(){if(typeof arguments[0]=="object"){if(typeof arguments[0].events=="undefined"){arguments[0].events={}}if(typeof arguments[0].events.move=="function"){arguments[0].events.move=vBulletin.runBeforeCallback(arguments[0].events.move,B)}else{arguments[0].events.move=B}}return C.apply(this,arguments)}})();$(".js-tooltip[title]").qtip({style:{classes:"ui-tooltip-shadow"}});if(vBulletin.options.get("threadpreview")>0&&(($(".channel-content-widget").length>0&&$(".channel-content-widget").eq(0).attr("data-canviewtopiccontent"))||$(".search-results-widget").length>0)){var A=function(){var B=$(this);if(B.data("vb-qtip-preview-initialized")=="1"){return }B.data("vb-qtip-preview-initialized","1");var D=B.closest(".topic-item").attr("data-node-id")||B.closest(".js-post").attr("data-node-id"),C=vBulletin.isRtl();D=parseInt(D);B.qtip({content:{text:function(H,G){var F=function(I){var I='<div class="b-topicpreview__previewtext">'+I+"</div>";G.set("content.text",I);return I};var E=function(){return F(vBulletin.phrase.get("no_preview_text_available"))};if(D){vBulletin.AJAX({call:"/ajax/fetch-node-preview?nodeid="+D,data:{},success:function(I){if(typeof (I)!="string"&&typeof (I[0])=="string"){I=I[0]}if($.trim(I)!=""){F(I)}else{E()}},api_error:E,emptyResponse:E,error:function(K,I,J){F(I+": "+J)}});return vBulletin.phrase.get("working_ellipsis")}else{return E()}}},show:{delay:500},position:{my:"top "+(C?"right":"left"),at:"bottom "+(C?"left":"right"),viewport:$(window)},style:{classes:"ui-tooltip-shadow ui-tooltip-rounded b-topicpreview"}});B.trigger("mouseover")};$(document).off("mouseover",".topic-list-container .topic-title, .conversation-list .post-title, .conversation-list .b-post__title").on("mouseover",".topic-list-container .topic-title, .conversation-list .post-title, .conversation-list .b-post__title",A)}})();;

// ***************************
// js.compressed/tag-editor.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.5.2
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2019 MH Sub I, LLC dba vBulletin. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["add_tags","error","error_adding_search_tips_code_x","error_adding_tags_code_x","error_fetching_popular_tags","invalid_server_response_please_try_again","invalid_x_tag_length","loading","popular_tags_cloud","tag_cloud","you_may_add_one_more_tag","you_may_add_x_more_tags","you_may_not_add_any_more_tags"]);window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=$.merge(window.vBulletin.options.precache,["tagforcelower","tagmaxlen","tagminlen"]);(function(B){var A={};vBulletin.tagEditor=vBulletin.tagEditor||{};vBulletin.tagEditor.instance=function(M,T,e){var V=this,Q,X=false,b=false,a=window.vBulletin.options.get("tagmaxlen")||25,H=window.vBulletin.options.get("tagminlen")||3,D=0,L=0,O=false,h=B(M),I=h.closest(".tag-editor-container"),G=h.closest(".tag-editor-wrapper"),N=I.data("node-id")||0,d=false,K=h.attr("placeholder")?h.attr("placeholder"):"",J=K?K.length:10,g=function(){if(h.length==0){return false}h.attr("maxlength",a);d=new vBulletin_Autocomplete(h,{apiClass:"Tags",containerClass:(e||"")+" entry-field h-clearfix",placeholderText:K,editorContext:{type:"tags",context:V},minLength:H,beforeAdd:function(j,k){X=b?true:false;if(i()==0){return false}return true},afterAdd:function(j,k){var l=c();if(l==0){h.hide()}h.attr("placeholder","");f(I.find(".tagcloudlink"),I)},afterDelete:function(k,l){X=b?true:false;var m=c();if(T||m>0){h.show();setTimeout(function(){h[0].focus()},10)}h.attr("placeholder",function(){var n=C();return(!n||n.length==0)?K:""});if(h.attr("placeholder")){h.placeholder()}var j=I.find(".tag-cloud .tagcloudlink");if(j.length==0){j=B(".ui-tooltip-popular-tags{0} .tag-cloud .tagcloudlink".format(G.data("tag-editor-class")?"."+G.data("tag-editor-class"):""))}j.each(function(){if(B(this).data("tag")==k){B(this).removeClass("added")}})}});h=d.getInputField();if(h.attr("placeholder")){h.placeholder()}G.data("autocomplete-instance",d)},W=function(j){if(window.vBulletin.options.get("tagforcelower")==1){j=j.toLowerCase()}if(j.length>a){j=j.substr(0,a)}return j},Y=function(m,k){if(!d){return false}if(typeof k=="undefined"||k<1){k=pageData.userid}var j=d.getMinLength();if(m.length<j){vBulletin.warning("error",["invalid_x_tag_length",j]);return false}m=W(m);var l=d.addElement(m,k);h.val("");c();return l},P=function(l){var j=l.length,k;for(k=0;k<j;++k){Y(l[k])}},Z=function(j){if(!d){return false}d.clearElements();P(j)},S=function(){h.attr("size",J);var j=JShtmlEncode(B.trim(h.val()));if(j==""||(j==K&&K)){return false}var k="Adding tag: "+j;if(i()>0){setTimeout(function(){Y(j)},10);k+=" (Tag added)"}console.log(k)},i=function(){if(T||(D==0&&L==0)){return true}var n=d.countElements(),j=B(d.getElements()).filter(function(o,p){return(pageData.userid==0||p.value==pageData.userid)}).size(),m=D>0?D-n:L-n,l=L==0?m:L-j,k=Math.min(l,m);console.log(["tagCount: "+n,"userTagCount: "+j,"maxTags: "+D,"maxUserTags: "+L,"totalCanAdd: "+m,"userCanAdd: "+l,"canAdd: "+k]);return k},c=function(){var k=I.find(".you-may-add-x-tags"),l=i(),j;if(l===true){return true}else{if(l>1){j=["you_may_add_x_more_tags",l]}else{if(l==1){j="you_may_add_one_more_tag"}else{j="you_may_not_add_any_more_tags";l=0}}}k.toggleClass("warning",(l==0)).html(vBulletin.phrase.get(j));return l},U=function(){d.clearElements()},C=function(){if(!d){return false}return d.getLabels()},F=function(j){if(T){h[0].focus();return }else{if(!A[j]){A[j]={}}else{D=A[j].maxTags;L=A[j].maxUserTags;O=A[j].canManageTags;R();return }}vBulletin.AJAX({call:"/ajax/api/tags/getNodeTags",data:{nodeid:j},success:function(k){if(B.isArray(k.tags)){D=parseInt(k.maxtags,10);L=parseInt(k.maxusertags,10);O=k.canmanagetags;A[j]={maxTags:D,maxUserTags:L,canManageTags:O};R()}},api_error:B.noop,error:B.noop,})};this.addTag=function(k,j){Y(k,j)};this.addTags=function(j){P(j)};this.setTags=function(j){Z(j)};this.removeAllTags=function(){U()};this.getTags=function(){return C()};this.getTagEditor=function(){return h};if(G.data("initialized")){console.log("Tag Editor is already initialized.");return }else{G.attr("data-initialized",true)}g();h.off("keydown").on("keydown",function(k){var j=B(k.target).val().length;B(k.target).attr("size",(j>J?j:J));if(k.which==13){X=b?true:false;S();k.preventDefault();return false}});h.off("blur").on("blur",function(j){b=window.setTimeout(function(){if(!X){S()}X=false;b=false},0)});h.off("click").on("click",function(j){if(!B(j.target).hasClass("tag-input")){B(".tag-input",B(this)).focus();X=b?true:false}return false});h.each(function(){var j=B(this);j.closest("form").submit(function(){S()})});var R=function(){var k=I.find(".you-may-add-text");if(!D&&!L){k.addClass("h-hide")}else{var j;if(D&&!L){j=D}else{if(!D&&L){j=L}else{j=Math.min(D,L)}}k.find("span").text(j)}if(!i()){h.hide()}else{if(h.is(":visible")){h[0].focus()}}};B(".tag-cloud-text.inline-tag-cloud .popular-tags-link",I).off("click").on("click",function(){var j=I.find(".tag-cloud");vBulletin.tagEditor.fetchPopularTags({type:"nodes",noformat:1,success:function(k){j.html(k);f(j.find(".tagcloudlink"),I)},error:function(k){j.html('<span class="error">{0}</span>'.format(k))}})});B(".tag-cloud-text:not(.inline-tag-cloud) .popular-tags-link",I).qtip({content:{text:vBulletin.phrase.get("loading")+"...",ajax:{url:vBulletin.getAjaxBaseurl()+"/search/fetchTagCloud",data:({type:"nodes",noformat:1}),type:"POST",dataType:"json",success:function(j,m,l){console.log("/search/fetchTagCloud successful, response: "+JSON.stringify(j));if(j){if(j.errors){this.set("content.text",'<span class="error">{0} {1}</span>'.format(vBulletin.phrase.get("error_fetching_popular_tags"),vBulletin.phrase.get(j.errors[0][0])))}else{this.set("content.text",'<div class="tag-cloud">{0}</div>'.format(j));B(".ui-tooltip-popular-tags").delegate(".tag-cloud .tagcloudlink label","click",E);var k=B(".ui-tooltip-popular-tags{0} .tag-cloud .tagcloudlink".format(G.data("tag-editor-id")?"."+G.data("tag-editor-id"):""));f(k,G)}}else{this.set("content.text",'<span class="error">{0}</span>'.format(vBulletin.phrase.get("error_fetching_popular_tags")))}},error:function(l,k,j){console.log("/search/fetchTagCloud failed, error: "+j);this.set("content.text",'<span class="error">{0}</span>'.format(vBulletin.phrase.get("error_fetching_popular_tags")))}},title:{text:vBulletin.phrase.get("tag_cloud"),button:false}},position:{at:"bottom center",my:"top center",viewport:B(window),effect:false},show:{event:"click",solo:true},hide:"unfocus",style:{classes:"ui-tooltip-shadow ui-tooltip-light ui-tooltip-rounded ui-tooltip-popular-tags "+(G.data("tag-editor-class")||""),width:280},events:{show:function(l,k){var j=B(".ui-tooltip-popular-tags{0} .tag-cloud .tagcloudlink".format(G.data("tag-editor-class")?"."+G.data("tag-editor-class"):""));f(j,G)}}});var E=function(k){var j=B(this);if(!j.parent().hasClass("added")&&Y(j.text())){j.parent().addClass("added");if(h.is(":visible")){h[0].focus()}}return false};var f=function(j,k){if(j.length>0){var l=(k.find(".tag-input").val()||"").split(",");B.each(l,function(m,n){var o=B.trim(n);j.each(function(){if(B(this).data("tag")==o){B(this).addClass("added")}})})}};I.delegate(".tag-cloud .tagcloudlink label","click",E);G.delegate(".add-tag-link","click",function(k){k.stopPropagation();var j=B(this);var l=G.find(".tag-editor-container");if(l.length==1){l.dialog({title:vBulletin.phrase.get("add_tags"),autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,width:500,dialogClass:"dialog-container tag-editor-dialog-container dialog-box",open:function(){U();var m=G.find(".tag-input").val();if(m){var p=m.split(",");for(var o in p){Y(B.trim(p[o]))}}else{if(K&&!h.attr("placeholder")){h.attr("placeholder",K)}}var q=c();if(q>0){h.show()}F(j.data("node-id"));var n=B(".tag-cloud",l);vBulletin.tagEditor.fetchPopularTags({type:G.data("type")||"nodes",noformat:1,success:function(r){n.html(r);f(n.find(".tagcloudlink"),G)},error:function(r){n.html('<span class="error">{0}</span>'.format(r))}})},close:function(){var m=G.data("autocomplete-instance");m.close()}}).dialog("open");j.data("tag-dialog",l);l.data("parent",j.closest("form, .search-controls-tags, .form_row"))}else{l=j.data("tag-dialog")||B();l.dialog("open")}return false})};vBulletin.tagEditor.fetchPopularTags=function(E){E=E||{};E.type=E.type!="search"?"nodes":E.type;var D=(typeof E.error=="function")?E.error:B.noop;var C=function(){D(vBulletin.phrase.get("error_fetching_popular_tags"))};vBulletin.AJAX({call:"/search/fetchTagCloud",data:({type:E.type,noformat:E.noformat}),success:function(F,H,G){if(typeof E.success=="function"){E.success(F,H,G)}},api_error:function(F){D("{0} {1}".format(vBulletin.phrase.get("error_fetching_popular_tags"),vBulletin.phrase.get(F[0])))},emptyResponse:C,error:C,})};B(document).ready(function(){B(document).off("click",".tag-editor-container .cancel-tag-btn").on("click",".tag-editor-container .cancel-tag-btn",function(){B(".tag-editor-container").dialog("close")});B(document).off("click",".tag-editor-container .save-tag-btn").on("click",".tag-editor-container .save-tag-btn",function(){var F=B(this).closest(".tag-editor-container"),E=F.find(".tag-input").val(),C=E.replace(/\,/g,", "),D=F.data("parent");D.find(".tag-list span").html(C);D.find(".tag-input").val(E);D.find(".tag-list").toggleClass("h-hide",!E);F.dialog("close")});B(document).off("mousedown",".tag-editor-container .autocomplete-container").on("mousedown",".tag-editor-container .autocomplete-container",function(){var C=this;setTimeout(function(){var D=B(".autocompleteHelper:visible",C);if(D.length>0){D[0].focus()}},10);return false});if(B(".js-content-entry-tag-editor").length>0&&vBulletin.tagEditor){new vBulletin.tagEditor.instance(".js-content-entry-tag-editor")}})})(jQuery);;

// ***************************
// js.compressed/flatpickr/flatpickr.min.js
// ***************************
/* flatpickr v4.4.4,, @license MIT */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.flatpickr=t()}(this,function(){"use strict";var Z=function(e){return("0"+e).slice(-2)},Q=function(e){return!0===e?1:0};function X(n,a,i){var o;return void 0===i&&(i=!1),function(){var e=this,t=arguments;null!==o&&clearTimeout(o),o=window.setTimeout(function(){o=null,i||n.apply(e,t)},a),i&&!o&&n.apply(e,t)}}var ee=function(e){return e instanceof Array?e:[e]},e=function(){},te=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},D={D:e,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*Q(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t){var n=parseInt(t);return new Date(e.getFullYear(),0,2+7*(n-1),0,0,0,0)},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:e,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},w:e,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},ne={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},c={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[c.w(e,t,n)]},F:function(e,t,n){return te(c.n(e,t,n)-1,!1,t)},G:function(e,t,n){return Z(c.h(e,t,n))},H:function(e){return Z(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[Q(11<e.getHours())]},M:function(e,t){return te(e.getMonth(),!0,t)},S:function(e){return Z(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(e){return Z(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return Z(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return Z(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},ae={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(3<t&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},ie=function(e){var t=e.config,o=void 0===t?b:t,n=e.l10n,r=void 0===n?ae:n;return function(a,e,t){if(void 0!==o.formatDate)return o.formatDate(a,e);var i=t||r;return e.split("").map(function(e,t,n){return c[e]&&"\\"!==n[t-1]?c[e](a,i,o):"\\"!==e?e:""}).join("")}},oe=function(e){var t=e.config,h=void 0===t?b:t,n=e.l10n,v=void 0===n?ae:n;return function(e,t,n){if(0===e||e){var a,i=e;if(e instanceof Date)a=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)a=new Date(e);else if("string"==typeof e){var o=t||(h||b).dateFormat,r=String(e).trim();if("today"===r)a=new Date,n=!0;else if(/Z$/.test(r)||/GMT$/.test(r))a=new Date(e);else if(h&&h.parseDate)a=h.parseDate(e,o);else{a=h&&h.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var c,l=[],d=0,s=0,u="";d<o.length;d++){var f=o[d],m="\\"===f,g="\\"===o[d-1]||m;if(ne[f]&&!g){u+=ne[f];var p=new RegExp(u).exec(e);p&&(c=!0)&&l["Y"!==f?"push":"unshift"]({fn:D[f],val:p[++s]})}else m||(u+=".");l.forEach(function(e){var t=e.fn,n=e.val;return a=t(a,n,v)||a})}a=c?a:void 0}}if(a instanceof Date)return!0===n&&a.setHours(0,0,0,0),a;h.errorHandler(new Error("Invalid date provided: "+i))}}};function re(e,t,n){return void 0===n&&(n=!0),!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var ce=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},le={DAY:864e5},b={_disable:[],_enable:[],allowInput:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enable:[],enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function de(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function se(e,t,n){var a=window.document.createElement(e);return t=t||"",n=n||"",a.className=t,void 0!==n&&(a.textContent=n),a}function ue(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function fe(e,t){var n=se("div","numInputWrapper"),a=se("input","numInput "+e),i=se("span","arrowUp"),o=se("span","arrowDown");if(a.type="text",a.pattern="\\d*",void 0!==t)for(var r in t)a.setAttribute(r,t[r]);return n.appendChild(a),n.appendChild(i),n.appendChild(o),n}"function"!=typeof Object.assign&&(Object.assign=function(n){if(!n)throw TypeError("Cannot convert undefined or null to object");for(var e=arguments.length,t=new Array(1<e?e-1:0),a=1;a<e;a++)t[a-1]=arguments[a];for(var i=function(t){t&&Object.keys(t).forEach(function(e){return n[e]=t[e]})},o=0;o<t.length;o++){i(t[o])}return n});var me=300;function r(s,u){var D={config:Object.assign({},ge.defaultConfig),l10n:ae};function f(e){return e.bind(D)}function t(){if(void 0!==D.daysContainer){D.calendarContainer.style.visibility="hidden",D.calendarContainer.style.display="block";var e=(D.days.offsetWidth+1)*D.config.showMonths;D.daysContainer.style.width=e+"px",D.calendarContainer.style.width=e+"px",void 0!==D.weekWrapper&&(D.calendarContainer.style.width=e+D.weekWrapper.offsetWidth+"px"),D.calendarContainer.style.removeProperty("visibility"),D.calendarContainer.style.removeProperty("display")}}function d(e){0!==D.selectedDates.length&&(!function(e){e.preventDefault();var t="keydown"===e.type,n=e.target;void 0!==D.amPM&&e.target===D.amPM&&(D.amPM.textContent=D.l10n.amPM[Q(D.amPM.textContent===D.l10n.amPM[0])]);var a=parseFloat(n.getAttribute("data-min")),i=parseFloat(n.getAttribute("data-max")),o=parseFloat(n.getAttribute("data-step")),r=parseInt(n.value,10),c=e.delta||(t?38===e.which?1:-1:0),l=r+o*c;if(void 0!==n.value&&2===n.value.length){var d=n===D.hourElement,s=n===D.minuteElement;l<a?(l=i+l+Q(!d)+(Q(d)&&Q(!D.amPM)),s&&h(void 0,-1,D.hourElement)):i<l&&(l=n===D.hourElement?l-i-Q(!D.amPM):a,s&&h(void 0,1,D.hourElement)),D.amPM&&d&&(1===o?l+r===23:Math.abs(l-r)>o)&&(D.amPM.textContent=D.l10n.amPM[Q(D.amPM.textContent===D.l10n.amPM[0])]),n.value=Z(l)}}(e),"input"!==e.type?(m(),G()):setTimeout(function(){m(),G()},me))}function m(){if(void 0!==D.hourElement&&void 0!==D.minuteElement){var e,t,n=(parseInt(D.hourElement.value.slice(-2),10)||0)%24,a=(parseInt(D.minuteElement.value,10)||0)%60,i=void 0!==D.secondElement?(parseInt(D.secondElement.value,10)||0)%60:0;void 0!==D.amPM&&(e=n,t=D.amPM.textContent,n=e%12+12*Q(t===D.l10n.amPM[1]));var o=void 0!==D.config.minTime||D.config.minDate&&D.minDateHasTime&&D.latestSelectedDateObj&&0===re(D.latestSelectedDateObj,D.config.minDate,!0);if(void 0!==D.config.maxTime||D.config.maxDate&&D.maxDateHasTime&&D.latestSelectedDateObj&&0===re(D.latestSelectedDateObj,D.config.maxDate,!0)){var r=void 0!==D.config.maxTime?D.config.maxTime:D.config.maxDate;(n=Math.min(n,r.getHours()))===r.getHours()&&(a=Math.min(a,r.getMinutes())),a===r.getMinutes()&&(i=Math.min(i,r.getSeconds()))}if(o){var c=void 0!==D.config.minTime?D.config.minTime:D.config.minDate;(n=Math.max(n,c.getHours()))===c.getHours()&&(a=Math.max(a,c.getMinutes())),a===c.getMinutes()&&(i=Math.max(i,c.getSeconds()))}l(n,a,i)}}function g(e){var t=e||D.latestSelectedDateObj;t&&l(t.getHours(),t.getMinutes(),t.getSeconds())}function l(e,t,n){void 0!==D.latestSelectedDateObj&&D.latestSelectedDateObj.setHours(e%24,t,n||0,0),D.hourElement&&D.minuteElement&&!D.isMobile&&(D.hourElement.value=Z(D.config.time_24hr?e:(12+e)%12+12*Q(e%12==0)),D.minuteElement.value=Z(t),void 0!==D.amPM&&(D.amPM.textContent=D.l10n.amPM[Q(12<=e)]),void 0!==D.secondElement&&(D.secondElement.value=Z(n)))}function n(e){var t=parseInt(e.target.value)+(e.delta||0);4!==t.toString().length&&"Enter"!==e.key||(e.target.blur(),/[^\d]/.test(t.toString())||S(t))}function o(t,n,a,i){return n instanceof Array?n.forEach(function(e){return o(t,e,a,i)}):t instanceof Array?t.forEach(function(e){return o(e,n,a,i)}):(t.addEventListener(n,a,i),void D._handlers.push({element:t,event:n,handler:a}))}function a(t){return function(e){1===e.which&&t(e)}}function p(){U("onChange")}function i(e){var t=void 0!==e?D.parseDate(e):D.latestSelectedDateObj||(D.config.minDate&&D.config.minDate>D.now?D.config.minDate:D.config.maxDate&&D.config.maxDate<D.now?D.config.maxDate:D.now);try{void 0!==t&&(D.currentYear=t.getFullYear(),D.currentMonth=t.getMonth())}catch(e){e.message="Invalid date supplied: "+t,D.config.errorHandler(e)}D.redraw()}function r(e){~e.target.className.indexOf("arrow")&&h(e,e.target.classList.contains("arrowUp")?1:-1)}function h(e,t,n){var a=e&&e.target,i=n||a&&a.parentNode&&a.parentNode.firstChild,o=q("increment");o.delta=t,i&&i.dispatchEvent(o)}function v(e,t,n,a){var i,o=P(t,!0),r=se("span","flatpickr-day "+e,t.getDate().toString());return r.dateObj=t,r.$i=a,r.setAttribute("aria-label",D.formatDate(t,D.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===re(t,D.now)&&((D.todayDateElem=r).classList.add("today"),r.setAttribute("aria-current","date")),o?(r.tabIndex=-1,$(t)&&(r.classList.add("selected"),D.selectedDateElem=r,"range"===D.config.mode&&(de(r,"startRange",D.selectedDates[0]&&0===re(t,D.selectedDates[0],!0)),de(r,"endRange",D.selectedDates[1]&&0===re(t,D.selectedDates[1],!0)),"nextMonthDay"===e&&r.classList.add("inRange")))):r.classList.add("disabled"),"range"===D.config.mode&&(i=t,!("range"!==D.config.mode||D.selectedDates.length<2)&&0<=re(i,D.selectedDates[0])&&re(i,D.selectedDates[1])<=0&&!$(t)&&r.classList.add("inRange")),D.weekNumbers&&1===D.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&D.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+D.config.getWeek(t)+"</span>"),U("onDayCreate",r),r}function b(e){e.focus(),"range"===D.config.mode&&A(e)}function w(e){for(var t=0<e?0:D.config.showMonths-1,n=0<e?D.config.showMonths:-1,a=t;a!=n;a+=e)for(var i=D.daysContainer.children[a],o=0<e?0:i.children.length-1,r=0<e?i.children.length:-1,c=o;c!=r;c+=e){var l=i.children[c];if(-1===l.className.indexOf("hidden")&&P(l.dateObj))return l}}function M(e,t){var n=_(document.activeElement),a=void 0!==e?e:n?document.activeElement:void 0!==D.selectedDateElem&&_(D.selectedDateElem)?D.selectedDateElem:void 0!==D.todayDateElem&&_(D.todayDateElem)?D.todayDateElem:w(0<t?1:-1);return void 0===a?D._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():D.currentMonth,a=0<t?D.config.showMonths:-1,i=0<t?1:-1,o=n-D.currentMonth;o!=a;o+=i)for(var r=D.daysContainer.children[o],c=n-D.currentMonth===o?e.$i+t:t<0?r.children.length-1:0,l=r.children.length,d=c;0<=d&&d<l&&d!=(0<t?l:-1);d+=i){var s=r.children[d];if(-1===s.className.indexOf("hidden")&&P(s.dateObj)&&Math.abs(e.$i-d)>=Math.abs(t))return b(s)}D.changeMonth(i),M(w(i),0)}(a,t):b(a)}function c(e,t){for(var n=(new Date(e,t,1).getDay()-D.l10n.firstDayOfWeek+7)%7,a=D.utils.getDaysInMonth((t-1+12)%12),i=D.utils.getDaysInMonth(t),o=window.document.createDocumentFragment(),r=1<D.config.showMonths,c=r?"prevMonthDay hidden":"prevMonthDay",l=r?"nextMonthDay hidden":"nextMonthDay",d=a+1-n,s=0;d<=a;d++,s++)o.appendChild(v(c,new Date(e,t-1,d),d,s));for(d=1;d<=i;d++,s++)o.appendChild(v("",new Date(e,t,d),d,s));for(var u=i+1;u<=42-n&&(1===D.config.showMonths||s%7!=0);u++,s++)o.appendChild(v(l,new Date(e,t+1,u%i),u,s));var f=se("div","dayContainer");return f.appendChild(o),f}function C(){if(void 0!==D.daysContainer){ue(D.daysContainer),D.weekNumbers&&ue(D.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<D.config.showMonths;t++){var n=new Date(D.currentYear,D.currentMonth,1);n.setMonth(D.currentMonth+t),e.appendChild(c(n.getFullYear(),n.getMonth()))}D.daysContainer.appendChild(e),D.days=D.daysContainer.firstChild}}function y(){var e=se("div","flatpickr-month"),t=window.document.createDocumentFragment(),n=se("span","cur-month");n.title=D.l10n.scrollTitle;var a=fe("cur-year",{tabindex:"-1"}),i=a.childNodes[0];i.title=D.l10n.scrollTitle,i.setAttribute("aria-label",D.l10n.yearAriaLabel),D.config.minDate&&i.setAttribute("data-min",D.config.minDate.getFullYear().toString()),D.config.maxDate&&(i.setAttribute("data-max",D.config.maxDate.getFullYear().toString()),i.disabled=!!D.config.minDate&&D.config.minDate.getFullYear()===D.config.maxDate.getFullYear());var o=se("div","flatpickr-current-month");return o.appendChild(n),o.appendChild(a),t.appendChild(o),e.appendChild(t),{container:e,yearElement:i,monthElement:n}}function x(){ue(D.monthNav),D.monthNav.appendChild(D.prevMonthNav);for(var e=D.config.showMonths;e--;){var t=y();D.yearElements.push(t.yearElement),D.monthElements.push(t.monthElement),D.monthNav.appendChild(t.container)}D.monthNav.appendChild(D.nextMonthNav)}function E(){D.weekdayContainer?ue(D.weekdayContainer):D.weekdayContainer=se("div","flatpickr-weekdays");for(var e=D.config.showMonths;e--;){var t=se("div","flatpickr-weekdaycontainer");D.weekdayContainer.appendChild(t)}return T(),D.weekdayContainer}function T(){var e=D.l10n.firstDayOfWeek,t=D.l10n.weekdays.shorthand.concat();0<e&&e<t.length&&(t=t.splice(e,t.length).concat(t.splice(0,e)));for(var n=D.config.showMonths;n--;)D.weekdayContainer.children[n].innerHTML="\n      <span class=flatpickr-weekday>\n        "+t.join("</span><span class=flatpickr-weekday>")+"\n      </span>\n      "}function k(e,t){void 0===t&&(t=!0);var n=t?e:e-D.currentMonth;n<0&&!0===D._hidePrevMonthArrow||0<n&&!0===D._hideNextMonthArrow||(D.currentMonth+=n,(D.currentMonth<0||11<D.currentMonth)&&(D.currentYear+=11<D.currentMonth?1:-1,D.currentMonth=(D.currentMonth+12)%12,U("onYearChange")),C(),U("onMonthChange"),z())}function I(e){return!(!D.config.appendTo||!D.config.appendTo.contains(e))||D.calendarContainer.contains(e)}function O(t){if(D.isOpen&&!D.config.inline){var e=I(t.target),n=t.target===D.input||t.target===D.altInput||D.element.contains(t.target)||t.path&&t.path.indexOf&&(~t.path.indexOf(D.input)||~t.path.indexOf(D.altInput)),a="blur"===t.type?n&&t.relatedTarget&&!I(t.relatedTarget):!n&&!e,i=!D.config.ignoredFocusElements.some(function(e){return e.contains(t.target)});a&&i&&(D.close(),"range"===D.config.mode&&1===D.selectedDates.length&&(D.clear(!1),D.redraw()))}}function S(e){if(!(!e||D.config.minDate&&e<D.config.minDate.getFullYear()||D.config.maxDate&&e>D.config.maxDate.getFullYear())){var t=e,n=D.currentYear!==t;D.currentYear=t||D.currentYear,D.config.maxDate&&D.currentYear===D.config.maxDate.getFullYear()?D.currentMonth=Math.min(D.config.maxDate.getMonth(),D.currentMonth):D.config.minDate&&D.currentYear===D.config.minDate.getFullYear()&&(D.currentMonth=Math.max(D.config.minDate.getMonth(),D.currentMonth)),n&&(D.redraw(),U("onYearChange"))}}function P(e,t){void 0===t&&(t=!0);var n=D.parseDate(e,void 0,t);if(D.config.minDate&&n&&re(n,D.config.minDate,void 0!==t?t:!D.minDateHasTime)<0||D.config.maxDate&&n&&0<re(n,D.config.maxDate,void 0!==t?t:!D.maxDateHasTime))return!1;if(0===D.config.enable.length&&0===D.config.disable.length)return!0;if(void 0===n)return!1;for(var a,i=0<D.config.enable.length,o=i?D.config.enable:D.config.disable,r=0;r<o.length;r++){if("function"==typeof(a=o[r])&&a(n))return i;if(a instanceof Date&&void 0!==n&&a.getTime()===n.getTime())return i;if("string"==typeof a&&void 0!==n){var c=D.parseDate(a,void 0,!0);return c&&c.getTime()===n.getTime()?i:!i}if("object"==typeof a&&void 0!==n&&a.from&&a.to&&n.getTime()>=a.from.getTime()&&n.getTime()<=a.to.getTime())return i}return!i}function _(e){return void 0!==D.daysContainer&&(-1===e.className.indexOf("hidden")&&D.daysContainer.contains(e))}function F(e){e.stopPropagation();var t=e.target===D._input,n=I(e.target),a=D.config.allowInput,i=D.isOpen&&(!a||!t),o=D.config.inline&&t&&!a;if(13===e.keyCode&&t){if(a)return D.setDate(D._input.value,!0,e.target===D.altInput?D.config.altFormat:D.config.dateFormat),e.target.blur();D.open()}else if(n||i||o){var r=!!D.timeContainer&&D.timeContainer.contains(e.target);switch(e.keyCode){case 13:r?G():R(e);break;case 27:e.preventDefault(),W();break;case 8:case 46:t&&!D.config.allowInput&&(e.preventDefault(),D.clear());break;case 37:case 39:if(r)D.hourElement&&D.hourElement.focus();else if(e.preventDefault(),void 0!==D.daysContainer&&!1===D.config.allowInput){var c=39===e.keyCode?1:-1;e.ctrlKey?(k(c),M(w(1),0)):M(void 0,c)}break;case 38:case 40:e.preventDefault();var l=40===e.keyCode?1:-1;D.daysContainer?e.ctrlKey?(S(D.currentYear-l),M(w(1),0)):r||M(void 0,7*l):D.config.enableTime&&(!r&&D.hourElement&&D.hourElement.focus(),d(e),D._debouncedChange());break;case 9:e.target===D.hourElement?(e.preventDefault(),D.minuteElement.select()):e.target===D.minuteElement&&(D.secondElement||D.amPM)?(e.preventDefault(),void 0!==D.secondElement?D.secondElement.focus():void 0!==D.amPM&&D.amPM.focus()):e.target===D.secondElement&&D.amPM&&(e.preventDefault(),D.amPM.focus())}switch(e.key){case D.l10n.amPM[0].charAt(0):case D.l10n.amPM[0].charAt(0).toLowerCase():void 0!==D.amPM&&e.target===D.amPM&&(D.amPM.textContent=D.l10n.amPM[0],m(),G());break;case D.l10n.amPM[1].charAt(0):case D.l10n.amPM[1].charAt(0).toLowerCase():void 0!==D.amPM&&e.target===D.amPM&&(D.amPM.textContent=D.l10n.amPM[1],m(),G())}U("onKeyDown",e)}}function A(o){if(1===D.selectedDates.length&&o.classList.contains("flatpickr-day")&&!o.classList.contains("disabled")){for(var r=o.dateObj.getTime(),c=D.parseDate(D.selectedDates[0],void 0,!0).getTime(),e=Math.min(r,D.selectedDates[0].getTime()),t=Math.max(r,D.selectedDates[0].getTime()),n=D.daysContainer.children,a=n[0].children[0].dateObj.getTime(),i=n[n.length-1].lastChild.dateObj.getTime(),l=!1,d=0,s=0,u=a;u<i;u+=le.DAY)P(new Date(u),!0)||(l=l||e<u&&u<t,u<c&&(!d||d<u)?d=u:c<u&&(!s||u<s)&&(s=u));for(var f=0;f<D.config.showMonths;f++)for(var m=D.daysContainer.children[f],g=D.daysContainer.children[f-1],p=function(e,t){var n=m.children[e],a=n.dateObj.getTime(),i=0<d&&a<d||0<s&&s<a;return i?(n.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){n.classList.remove(e)}),"continue"):l&&!i?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){n.classList.remove(e)}),o.classList.add(r<D.selectedDates[0].getTime()?"startRange":"endRange"),void(!m.contains(o)&&0<f&&g&&g.lastChild.dateObj.getTime()>=a||(c<r&&a===c?n.classList.add("startRange"):r<c&&a===c&&n.classList.add("endRange"),d<=a&&(0===s||a<=s)&&ce(a,c,r)&&n.classList.add("inRange"))))},h=0,v=m.children.length;h<v;h++)p(h)}}function N(){!D.isOpen||D.config.static||D.config.inline||H()}function j(a){return function(e){var t=D.config["_"+a+"Date"]=D.parseDate(e,D.config.dateFormat),n=D.config["_"+("min"===a?"max":"min")+"Date"];void 0!==t&&(D["min"===a?"minDateHasTime":"maxDateHasTime"]=0<t.getHours()||0<t.getMinutes()||0<t.getSeconds()),D.selectedDates&&(D.selectedDates=D.selectedDates.filter(function(e){return P(e)}),D.selectedDates.length||"min"!==a||g(t),G()),D.daysContainer&&(L(),void 0!==t?D.currentYearElement[a]=t.getFullYear().toString():D.currentYearElement.removeAttribute(a),D.currentYearElement.disabled=!!n&&void 0!==t&&n.getFullYear()===t.getFullYear())}}function Y(){"object"!=typeof D.config.locale&&void 0===ge.l10ns[D.config.locale]&&D.config.errorHandler(new Error("flatpickr: invalid locale "+D.config.locale)),D.l10n=Object.assign({},ge.l10ns.default,"object"==typeof D.config.locale?D.config.locale:"default"!==D.config.locale?ge.l10ns[D.config.locale]:void 0),ne.K="("+D.l10n.amPM[0]+"|"+D.l10n.amPM[1]+"|"+D.l10n.amPM[0].toLowerCase()+"|"+D.l10n.amPM[1].toLowerCase()+")",D.formatDate=ie(D)}function H(e){if(void 0!==D.calendarContainer){U("onPreCalendarPosition");var t=e||D._positionElement,n=Array.prototype.reduce.call(D.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),a=D.calendarContainer.offsetWidth,i=D.config.position,o=t.getBoundingClientRect(),r=window.innerHeight-o.bottom,c="above"===i||"below"!==i&&r<n&&o.top>n,l=window.pageYOffset+o.top+(c?-n-2:t.offsetHeight+2);if(de(D.calendarContainer,"arrowTop",!c),de(D.calendarContainer,"arrowBottom",c),!D.config.inline){var d=window.pageXOffset+o.left,s=window.document.body.offsetWidth-o.right,u=d+a>window.document.body.offsetWidth;de(D.calendarContainer,"rightMost",u),D.config.static||(D.calendarContainer.style.top=l+"px",u?(D.calendarContainer.style.left="auto",D.calendarContainer.style.right=s+"px"):(D.calendarContainer.style.left=d+"px",D.calendarContainer.style.right="auto"))}}}function L(){D.config.noCalendar||D.isMobile||(z(),C())}function W(){D._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(D.close,0):D.close()}function R(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,a=D.latestSelectedDateObj=new Date(n.dateObj.getTime()),i=(a.getMonth()<D.currentMonth||a.getMonth()>D.currentMonth+D.config.showMonths-1)&&"range"!==D.config.mode;if(D.selectedDateElem=n,"single"===D.config.mode)D.selectedDates=[a];else if("multiple"===D.config.mode){var o=$(a);o?D.selectedDates.splice(parseInt(o),1):D.selectedDates.push(a)}else"range"===D.config.mode&&(2===D.selectedDates.length&&D.clear(!1),D.selectedDates.push(a),0!==re(a,D.selectedDates[0],!0)&&D.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(m(),i){var r=D.currentYear!==a.getFullYear();D.currentYear=a.getFullYear(),D.currentMonth=a.getMonth(),r&&U("onYearChange"),U("onMonthChange")}if(z(),C(),D.config.minDate&&D.minDateHasTime&&D.config.enableTime&&0===re(a,D.config.minDate)&&g(D.config.minDate),G(),D.config.enableTime&&setTimeout(function(){return D.showTimeInput=!0},50),"range"===D.config.mode&&(1===D.selectedDates.length?A(n):z()),i||"range"===D.config.mode||1!==D.config.showMonths?D.selectedDateElem&&D.selectedDateElem.focus():b(n),void 0!==D.hourElement&&setTimeout(function(){return void 0!==D.hourElement&&D.hourElement.select()},451),D.config.closeOnSelect){var c="single"===D.config.mode&&!D.config.enableTime,l="range"===D.config.mode&&2===D.selectedDates.length&&!D.config.enableTime;(c||l)&&W()}p()}}D.parseDate=oe({config:D.config,l10n:D.l10n}),D._handlers=[],D._bind=o,D._setHoursFromDate=g,D.changeMonth=k,D.changeYear=S,D.clear=function(e){void 0===e&&(e=!0);D.input.value="",void 0!==D.altInput&&(D.altInput.value="");void 0!==D.mobileInput&&(D.mobileInput.value="");D.selectedDates=[],D.latestSelectedDateObj=void 0,!(D.showTimeInput=!1)===D.config.enableTime&&(void 0!==D.config.minDate?g(D.config.minDate):l(D.config.defaultHour,D.config.defaultMinute,D.config.defaultSeconds));D.redraw(),e&&U("onChange")},D.close=function(){D.isOpen=!1,D.isMobile||(D.calendarContainer.classList.remove("open"),D._input.classList.remove("active"));U("onClose")},D._createElement=se,D.destroy=function(){void 0!==D.config&&U("onDestroy");for(var e=D._handlers.length;e--;){var t=D._handlers[e];t.element.removeEventListener(t.event,t.handler)}D._handlers=[],D.mobileInput?(D.mobileInput.parentNode&&D.mobileInput.parentNode.removeChild(D.mobileInput),D.mobileInput=void 0):D.calendarContainer&&D.calendarContainer.parentNode&&D.calendarContainer.parentNode.removeChild(D.calendarContainer);D.altInput&&(D.input.type="text",D.altInput.parentNode&&D.altInput.parentNode.removeChild(D.altInput),delete D.altInput);D.input&&(D.input.type=D.input._type,D.input.classList.remove("flatpickr-input"),D.input.removeAttribute("readonly"),D.input.value="");["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete D[e]}catch(e){}})},D.isEnabled=P,D.jumpToDate=i,D.open=function(e,t){void 0===t&&(t=D._input);if(!0===D.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),setTimeout(function(){void 0!==D.mobileInput&&D.mobileInput.click()},0),void U("onOpen");if(D._input.disabled||D.config.inline)return;var n=D.isOpen;D.isOpen=!0,n||(D.calendarContainer.classList.add("open"),D._input.classList.add("active"),U("onOpen"),H(t));!0===D.config.enableTime&&!0===D.config.noCalendar&&(0===D.selectedDates.length&&(D.setDate(void 0!==D.config.minDate?new Date(D.config.minDate.getTime()):(new Date).setHours(D.config.defaultHour,D.config.defaultMinute,D.config.defaultSeconds,0),!1),m(),G()),setTimeout(function(){return D.hourElement.select()},50))},D.redraw=L,D.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(D.config,e):(D.config[e]=t,void 0!==J[e]&&J[e].forEach(function(e){return e()}));D.redraw(),i()},D.setDate=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=D.config.dateFormat);if(0!==e&&!e)return D.clear(t);K(e,n),D.showTimeInput=0<D.selectedDates.length,D.latestSelectedDateObj=D.selectedDates[0],D.redraw(),i(),g(),G(t),t&&U("onChange")},D.toggle=function(){if(D.isOpen)return D.close();D.open()};var J={locale:[Y,T],showMonths:[x,t,E]};function K(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return D.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[D.parseDate(e,t)];else if("string"==typeof e)switch(D.config.mode){case"single":n=[D.parseDate(e,t)];break;case"multiple":n=e.split(D.config.conjunction).map(function(e){return D.parseDate(e,t)});break;case"range":n=e.split(D.l10n.rangeSeparator).map(function(e){return D.parseDate(e,t)})}else D.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));D.selectedDates=n.filter(function(e){return e instanceof Date&&P(e,!1)}),"range"===D.config.mode&&D.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function B(e){return e.map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?D.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:D.parseDate(e.from,void 0),to:D.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function U(e,t){var n=D.config[e];if(void 0!==n&&0<n.length)for(var a=0;n[a]&&a<n.length;a++)n[a](D.selectedDates,D.input.value,D,t);"onChange"===e&&(D.input.dispatchEvent(q("change")),D.input.dispatchEvent(q("input")))}function q(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function $(e){for(var t=0;t<D.selectedDates.length;t++)if(0===re(D.selectedDates[t],e))return""+t;return!1}function z(){D.config.noCalendar||D.isMobile||!D.monthNav||(D.yearElements.forEach(function(e,t){var n=new Date(D.currentYear,D.currentMonth,1);n.setMonth(D.currentMonth+t),D.monthElements[t].textContent=te(n.getMonth(),D.config.shorthandCurrentMonth,D.l10n)+" ",e.value=n.getFullYear().toString()}),D._hidePrevMonthArrow=void 0!==D.config.minDate&&(D.currentYear===D.config.minDate.getFullYear()?D.currentMonth<=D.config.minDate.getMonth():D.currentYear<D.config.minDate.getFullYear()),D._hideNextMonthArrow=void 0!==D.config.maxDate&&(D.currentYear===D.config.maxDate.getFullYear()?D.currentMonth+1>D.config.maxDate.getMonth():D.currentYear>D.config.maxDate.getFullYear()))}function G(e){if(void 0===e&&(e=!0),0===D.selectedDates.length)return D.clear(e);void 0!==D.mobileInput&&D.mobileFormatStr&&(D.mobileInput.value=void 0!==D.latestSelectedDateObj?D.formatDate(D.latestSelectedDateObj,D.mobileFormatStr):"");var t="range"!==D.config.mode?D.config.conjunction:D.l10n.rangeSeparator;D.input.value=D.selectedDates.map(function(e){return D.formatDate(e,D.config.dateFormat)}).join(t),void 0!==D.altInput&&(D.altInput.value=D.selectedDates.map(function(e){return D.formatDate(e,D.config.altFormat)}).join(t)),!1!==e&&U("onValueUpdate")}function V(e){var t=D.prevMonthNav.contains(e.target),n=D.nextMonthNav.contains(e.target);t||n?k(t?-1:1):0<=D.yearElements.indexOf(e.target)?(e.preventDefault(),e.target.select()):e.target.classList.contains("arrowUp")?D.changeYear(D.currentYear+1):e.target.classList.contains("arrowDown")&&D.changeYear(D.currentYear-1)}return function(){D.element=D.input=s,D.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],n=Object.assign({},u,JSON.parse(JSON.stringify(s.dataset||{}))),a={};D.config.parseDate=n.parseDate,D.config.formatDate=n.formatDate,Object.defineProperty(D.config,"enable",{get:function(){return D.config._enable},set:function(e){D.config._enable=B(e)}}),Object.defineProperty(D.config,"disable",{get:function(){return D.config._disable},set:function(e){D.config._disable=B(e)}}),!n.dateFormat&&n.enableTime&&(a.dateFormat=n.noCalendar?"H:i"+(n.enableSeconds?":S":""):ge.defaultConfig.dateFormat+" H:i"+(n.enableSeconds?":S":"")),n.altInput&&n.enableTime&&!n.altFormat&&(a.altFormat=n.noCalendar?"h:i"+(n.enableSeconds?":S K":" K"):ge.defaultConfig.altFormat+" h:i"+(n.enableSeconds?":S":"")+" K"),Object.defineProperty(D.config,"minDate",{get:function(){return D.config._minDate},set:j("min")}),Object.defineProperty(D.config,"maxDate",{get:function(){return D.config._maxDate},set:j("max")});var i=function(t){return function(e){D.config["min"===t?"_minTime":"_maxTime"]=D.parseDate(e,"H:i")}};Object.defineProperty(D.config,"minTime",{get:function(){return D.config._minTime},set:i("min")}),Object.defineProperty(D.config,"maxTime",{get:function(){return D.config._maxTime},set:i("max")}),Object.assign(D.config,a,n);for(var o=0;o<e.length;o++)D.config[e[o]]=!0===D.config[e[o]]||"true"===D.config[e[o]];for(var r=t.length;r--;)void 0!==D.config[t[r]]&&(D.config[t[r]]=ee(D.config[t[r]]||[]).map(f));"time"===D.config.mode&&(D.config.noCalendar=!0,D.config.enableTime=!0);for(var c=0;c<D.config.plugins.length;c++){var l=D.config.plugins[c](D)||{};for(var d in l)~t.indexOf(d)?D.config[d]=ee(l[d]).map(f).concat(D.config[d]):void 0===n[d]&&(D.config[d]=l[d])}D.isMobile=!D.config.disableMobile&&!D.config.inline&&"single"===D.config.mode&&!D.config.disable.length&&!D.config.enable.length&&!D.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),U("onParseConfig")}(),Y(),function(){if(D.input=D.config.wrap?s.querySelector("[data-input]"):s,!D.input)return D.config.errorHandler(new Error("Invalid input element specified"));D.input._type=D.input.type,D.input.type="text",D.input.classList.add("flatpickr-input"),D._input=D.input,D.config.altInput&&(D.altInput=se(D.input.nodeName,D.input.className+" "+D.config.altInputClass),D._input=D.altInput,D.altInput.placeholder=D.input.placeholder,D.altInput.disabled=D.input.disabled,D.altInput.required=D.input.required,D.altInput.tabIndex=D.input.tabIndex,D.altInput.type="text",D.input.type="hidden",!D.config.static&&D.input.parentNode&&D.input.parentNode.insertBefore(D.altInput,D.input.nextSibling)),D.config.allowInput||D._input.setAttribute("readonly","readonly"),D._positionElement=D.config.positionElement||D._input}(),function(){D.selectedDates=[],D.now=D.parseDate(D.config.now)||new Date;var e=D.config.defaultDate||D.input.value;e&&K(e,D.config.dateFormat);var t=0<D.selectedDates.length?D.selectedDates[0]:D.config.minDate&&D.config.minDate.getTime()>D.now.getTime()?D.config.minDate:D.config.maxDate&&D.config.maxDate.getTime()<D.now.getTime()?D.config.maxDate:D.now;D.currentYear=t.getFullYear(),D.currentMonth=t.getMonth(),0<D.selectedDates.length&&(D.latestSelectedDateObj=D.selectedDates[0]),void 0!==D.config.minTime&&(D.config.minTime=D.parseDate(D.config.minTime,"H:i")),void 0!==D.config.maxTime&&(D.config.maxTime=D.parseDate(D.config.maxTime,"H:i")),D.minDateHasTime=!!D.config.minDate&&(0<D.config.minDate.getHours()||0<D.config.minDate.getMinutes()||0<D.config.minDate.getSeconds()),D.maxDateHasTime=!!D.config.maxDate&&(0<D.config.maxDate.getHours()||0<D.config.maxDate.getMinutes()||0<D.config.maxDate.getSeconds()),Object.defineProperty(D,"showTimeInput",{get:function(){return D._showTimeInput},set:function(e){D._showTimeInput=e,D.calendarContainer&&de(D.calendarContainer,"showTimeInput",e),D.isOpen&&H()}})}(),D.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=D.currentMonth),void 0===t&&(t=D.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:D.l10n.daysInMonth[e]}},D.isMobile||function(){var e=window.document.createDocumentFragment();if(D.calendarContainer=se("div","flatpickr-calendar"),D.calendarContainer.tabIndex=-1,!D.config.noCalendar){if(e.appendChild((D.monthNav=se("div","flatpickr-months"),D.yearElements=[],D.monthElements=[],D.prevMonthNav=se("span","flatpickr-prev-month"),D.prevMonthNav.innerHTML=D.config.prevArrow,D.nextMonthNav=se("span","flatpickr-next-month"),D.nextMonthNav.innerHTML=D.config.nextArrow,x(),Object.defineProperty(D,"_hidePrevMonthArrow",{get:function(){return D.__hidePrevMonthArrow},set:function(e){D.__hidePrevMonthArrow!==e&&(de(D.prevMonthNav,"disabled",e),D.__hidePrevMonthArrow=e)}}),Object.defineProperty(D,"_hideNextMonthArrow",{get:function(){return D.__hideNextMonthArrow},set:function(e){D.__hideNextMonthArrow!==e&&(de(D.nextMonthNav,"disabled",e),D.__hideNextMonthArrow=e)}}),D.currentYearElement=D.yearElements[0],z(),D.monthNav)),D.innerContainer=se("div","flatpickr-innerContainer"),D.config.weekNumbers){var t=function(){D.calendarContainer.classList.add("hasWeeks");var e=se("div","flatpickr-weekwrapper");e.appendChild(se("span","flatpickr-weekday",D.l10n.weekAbbreviation));var t=se("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),n=t.weekWrapper,a=t.weekNumbers;D.innerContainer.appendChild(n),D.weekNumbers=a,D.weekWrapper=n}D.rContainer=se("div","flatpickr-rContainer"),D.rContainer.appendChild(E()),D.daysContainer||(D.daysContainer=se("div","flatpickr-days"),D.daysContainer.tabIndex=-1),C(),D.rContainer.appendChild(D.daysContainer),D.innerContainer.appendChild(D.rContainer),e.appendChild(D.innerContainer)}D.config.enableTime&&e.appendChild(function(){D.calendarContainer.classList.add("hasTime"),D.config.noCalendar&&D.calendarContainer.classList.add("noCalendar"),D.timeContainer=se("div","flatpickr-time"),D.timeContainer.tabIndex=-1;var e=se("span","flatpickr-time-separator",":"),t=fe("flatpickr-hour");D.hourElement=t.childNodes[0];var n=fe("flatpickr-minute");if(D.minuteElement=n.childNodes[0],D.hourElement.tabIndex=D.minuteElement.tabIndex=-1,D.hourElement.value=Z(D.latestSelectedDateObj?D.latestSelectedDateObj.getHours():D.config.time_24hr?D.config.defaultHour:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(D.config.defaultHour)),D.minuteElement.value=Z(D.latestSelectedDateObj?D.latestSelectedDateObj.getMinutes():D.config.defaultMinute),D.hourElement.setAttribute("data-step",D.config.hourIncrement.toString()),D.minuteElement.setAttribute("data-step",D.config.minuteIncrement.toString()),D.hourElement.setAttribute("data-min",D.config.time_24hr?"0":"1"),D.hourElement.setAttribute("data-max",D.config.time_24hr?"23":"12"),D.minuteElement.setAttribute("data-min","0"),D.minuteElement.setAttribute("data-max","59"),D.timeContainer.appendChild(t),D.timeContainer.appendChild(e),D.timeContainer.appendChild(n),D.config.time_24hr&&D.timeContainer.classList.add("time24hr"),D.config.enableSeconds){D.timeContainer.classList.add("hasSeconds");var a=fe("flatpickr-second");D.secondElement=a.childNodes[0],D.secondElement.value=Z(D.latestSelectedDateObj?D.latestSelectedDateObj.getSeconds():D.config.defaultSeconds),D.secondElement.setAttribute("data-step",D.minuteElement.getAttribute("data-step")),D.secondElement.setAttribute("data-min",D.minuteElement.getAttribute("data-min")),D.secondElement.setAttribute("data-max",D.minuteElement.getAttribute("data-max")),D.timeContainer.appendChild(se("span","flatpickr-time-separator",":")),D.timeContainer.appendChild(a)}return D.config.time_24hr||(D.amPM=se("span","flatpickr-am-pm",D.l10n.amPM[Q(11<(D.latestSelectedDateObj?D.hourElement.value:D.config.defaultHour))]),D.amPM.title=D.l10n.toggleTitle,D.amPM.tabIndex=-1,D.timeContainer.appendChild(D.amPM)),D.timeContainer}()),de(D.calendarContainer,"rangeMode","range"===D.config.mode),de(D.calendarContainer,"animate",!0===D.config.animate),de(D.calendarContainer,"multiMonth",1<D.config.showMonths),D.calendarContainer.appendChild(e);var i=void 0!==D.config.appendTo&&void 0!==D.config.appendTo.nodeType;if((D.config.inline||D.config.static)&&(D.calendarContainer.classList.add(D.config.inline?"inline":"static"),D.config.inline&&(!i&&D.element.parentNode?D.element.parentNode.insertBefore(D.calendarContainer,D._input.nextSibling):void 0!==D.config.appendTo&&D.config.appendTo.appendChild(D.calendarContainer)),D.config.static)){var o=se("div","flatpickr-wrapper");D.element.parentNode&&D.element.parentNode.insertBefore(o,D.element),o.appendChild(D.element),D.altInput&&o.appendChild(D.altInput),o.appendChild(D.calendarContainer)}D.config.static||D.config.inline||(void 0!==D.config.appendTo?D.config.appendTo:window.document.body).appendChild(D.calendarContainer)}(),function(){if(D.config.wrap&&["open","close","toggle","clear"].forEach(function(t){Array.prototype.forEach.call(D.element.querySelectorAll("[data-"+t+"]"),function(e){return o(e,"click",D[t])})}),D.isMobile)return function(){var e=D.config.enableTime?D.config.noCalendar?"time":"datetime-local":"date";D.mobileInput=se("input",D.input.className+" flatpickr-mobile"),D.mobileInput.step=D.input.getAttribute("step")||"any",D.mobileInput.tabIndex=1,D.mobileInput.type=e,D.mobileInput.disabled=D.input.disabled,D.mobileInput.required=D.input.required,D.mobileInput.placeholder=D.input.placeholder,D.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",0<D.selectedDates.length&&(D.mobileInput.defaultValue=D.mobileInput.value=D.formatDate(D.selectedDates[0],D.mobileFormatStr)),D.config.minDate&&(D.mobileInput.min=D.formatDate(D.config.minDate,"Y-m-d")),D.config.maxDate&&(D.mobileInput.max=D.formatDate(D.config.maxDate,"Y-m-d")),D.input.type="hidden",void 0!==D.altInput&&(D.altInput.type="hidden");try{D.input.parentNode&&D.input.parentNode.insertBefore(D.mobileInput,D.input.nextSibling)}catch(e){}o(D.mobileInput,"change",function(e){D.setDate(e.target.value,!1,D.mobileFormatStr),U("onChange"),U("onClose")})}();var e=X(N,50);D._debouncedChange=X(p,me),D.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&o(D.daysContainer,"mouseover",function(e){"range"===D.config.mode&&A(e.target)}),o(window.document.body,"keydown",F),D.config.static||o(D._input,"keydown",F),D.config.inline||D.config.static||o(window,"resize",e),void 0!==window.ontouchstart&&o(window.document,"touchstart",O),o(window.document,"mousedown",a(O)),o(window.document,"focus",O,{capture:!0}),!0===D.config.clickOpens&&(o(D._input,"focus",D.open),o(D._input,"mousedown",a(D.open))),void 0!==D.daysContainer&&(o(D.monthNav,"mousedown",a(V)),o(D.monthNav,["keyup","increment"],n),o(D.daysContainer,"mousedown",a(R))),void 0!==D.timeContainer&&void 0!==D.minuteElement&&void 0!==D.hourElement&&(o(D.timeContainer,["input","increment"],d),o(D.timeContainer,"mousedown",a(r)),o(D.timeContainer,["input","increment"],D._debouncedChange,{passive:!0}),o([D.hourElement,D.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==D.secondElement&&o(D.secondElement,"focus",function(){return D.secondElement&&D.secondElement.select()}),void 0!==D.amPM&&o(D.amPM,"mousedown",a(function(e){d(e),p()})))}(),(D.selectedDates.length||D.config.noCalendar)&&(D.config.enableTime&&g(D.config.noCalendar?D.latestSelectedDateObj||D.config.minDate:void 0),G(!1)),t(),D.showTimeInput=0<D.selectedDates.length||D.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!D.isMobile&&e&&H(),U("onReady")}(),D}function n(e,t){for(var n=Array.prototype.slice.call(e),a=[],i=0;i<n.length;i++){var o=n[i];try{if(null!==o.getAttribute("data-fp-omit"))continue;void 0!==o._flatpickr&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=r(o,t||{}),a.push(o._flatpickr)}catch(e){console.error(e)}}return 1===a.length?a[0]:a}"undefined"!=typeof HTMLElement&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return n(this,e)},HTMLElement.prototype.flatpickr=function(e){return n([this],e)});var ge=function(e,t){return e instanceof NodeList?n(e,t):n("string"==typeof e?window.document.querySelectorAll(e):[e],t)};return ge.defaultConfig=b,ge.l10ns={en:Object.assign({},ae),default:Object.assign({},ae)},ge.localize=function(e){ge.l10ns.default=Object.assign({},ge.l10ns.default,e)},ge.setDefaults=function(e){ge.defaultConfig=Object.assign({},ge.defaultConfig,e)},ge.parseDate=oe({}),ge.formatDate=ie({}),ge.compareDates=re,"undefined"!=typeof jQuery&&(jQuery.fn.flatpickr=function(e){return n(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},ge});;

// ***************************
// js.compressed/flatpickr.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.5.2
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2019 MH Sub I, LLC dba vBulletin. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["january","february","march","april","may","june","july","august","september","october","november","december","january_short","february_short","march_short","april_short","may_short","june_short","july_short","august_short","september_short","october_short","november_short","december_short","sunday","monday","tuesday","wednesday","thursday","friday","saturday","sunday_short","monday_short","tuesday_short","wednesday_short","thursday_short","friday_short","saturday_short","datepicker_am","datepicker_clicktotoggle","datepicker_pm","datepicker_rangeseparator","datepicker_scrolltoincrement","datepicker_weekabbreviation","datepicker_year",]);window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=$.merge(window.vBulletin.options.precache,["pickerdateformat",]);(function(G){function P(b,Y){var X=["january","february","march","april","may","june","july","august","september","october","november","december"],c=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],Z=(Y=="long")?"":"_short",W=(b=="month")?X:c,a=[];G.each(W,function(d,e){a.push(vBulletin.phrase.get(e+Z))});return a}function M(){var a=vBulletin.options.get("pickerdateformat"),X="",b="";if(pageData.user_lang_pickerdateformatoverride){a=pageData.user_lang_pickerdateformatoverride}var d="",g=null,c=null,Y=null,W=null,Z=false,f=false;G.each(a.split(""),function(h,k){var j=!!k.match(/[GHhiSsK]/),l=!!k.match(/[a-z]/i),i=l&&!j;if(d!="\\"){if(j){if(k==="K"){Z=true}if(k==="h"){f=true}if(g===null){g=h}c=h}else{if(i){if(Y===null){Y=h}W=h}}}d=k});if(c<Y){var e=c+1;b=a.slice(0,e);X=a.slice(e)}else{if(W<g){var e=W+1;X=a.slice(0,e);b=a.slice(e)}else{X=a;b=a}}return{datetime:a,date:X,time:b,use24hour:!(Z||f)}}function K(X){var W="m/d/Y",b="H:i",Z=M(),a;var Y={time_24hr:Z.use24hour,onReady:D,onOpen:H,onChange:Q,onPreCalendarPosition:U,altInput:true,locale:{weekdays:{shorthand:P("weekday","short"),longhand:P("weekday","long"),},months:{shorthand:P("month","short"),longhand:P("month","long"),},rangeSeparator:vBulletin.phrase.get("datepicker_rangeseparator"),weekAbbreviation:vBulletin.phrase.get("datepicker_weekabbreviation"),scrollTitle:vBulletin.phrase.get("datepicker_scrolltoincrement"),toggleTitle:vBulletin.phrase.get("datepicker_clicktotoggle"),amPM:[vBulletin.phrase.get("datepicker_am"),vBulletin.phrase.get("datepicker_pm"),],yearAriaLabel:vBulletin.phrase.get("datepicker_year"),firstDayOfWeek:(parseInt(pageData.user_startofweek,10)||1)-1,},};if(vBulletin.isRtl()){Y.nextArrow="<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>";Y.prevArrow="<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>"}switch(X){case"date":Y.enableTime=false;Y.noCalendar=false;Y.dateFormat=W;Y.altFormat=Z.date;break;case"time":Y.enableTime=true;Y.noCalendar=true;Y.dateFormat=b;Y.altFormat=Z.time;break;case"datetime":Y.enableTime=true;Y.noCalendar=false;Y.dateFormat=W+" "+b;Y.altFormat=Z.datetime;break}return Y}function A(Y,X){var W=["onChange","onClose","onOpen","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"];G.each(W,function(Z,a){if(typeof X[a]=="function"){X[a]=[X[a]]}if(typeof Y[a]=="function"){Y[a]=[Y[a]]}});return G.extend(true,{},Y,X)}function E(Y,X,W){X=X||{};X=A(K(W),X);Y.flatpickr(X);Y.attr("data-vb-flatpicker-initialized",W);Y.trigger("vb-flatpicker-initialized")}function B(X,W){var Y=S(X),Z=X.val();if(!Y){return }Y.destroy();E(X,null,W);Y=S(X);Y.setDate(Z)}function F(X,W){E(X,W,"date")}function O(X,W){E(X,W,"time")}function T(X,W){E(X,W,"datetime")}function V(b){var Z=b.find(".js-daterange--min[data-vb-flatpicker-initialized]"),Y=b.find(".js-daterange--max[data-vb-flatpicker-initialized]");if(b.data("vb-daterange-initialized")){return true}if(!Z.length){G(".js-daterange--min",b).one("vb-flatpicker-initialized",function(){V(b)});return true}if(!Y.length){G(".js-daterange--max",b).one("vb-flatpicker-initialized",function(){V(b)});return true}if(Z.length&&Y.length){var c=vBulletin.flatpickr.getInstance(Z),d=vBulletin.flatpickr.getInstance(Y);if(!c||!d){return true}var e=c.config.onChange,X=(function(){var f=false;return function(i,h,g,j){if(!f){f=true;if(h){d.set("minDate",h)}f=false}}})(),W=d.config.onChange,a=(function(){var f=false;return function(i,h,g,j){if(!f){f=true;if(h){c.set("maxDate",h)}f=false}}})();e.push(X);c.set("onChange",e);W.push(a);d.set("onChange",W)}b.attr("data-vb-daterange-initialized",1)}function C(){G(".js-datepicker").each(function(){F(G(this))});G(".js-timepicker").each(function(){O(G(this))});G(".js-datetimepicker").each(function(){T(G(this))});G(".js-daterange").each(function(){V(G(this))})}function S(W){try{return W.get(0)._flatpickr}catch(X){}return null}function J(W){var X=S(W);if(X){W.data("vb-flatpickr-disabled","1");X.clear();X.close()}}function L(W){var X=S(W);if(X){W.data("vb-flatpickr-disabled","0")}}function I(d){if(!vBulletin.isRtl()){return }if(!(d&&d.calendarContainer&&d._positionElement)){return }var a=d.calendarContainer,W=d._positionElement,b=a.offsetWidth,Y=W.offsetWidth,Z=W.getBoundingClientRect(),X=window.pageXOffset+Z.left,c=window.document.body.offsetWidth-Z.right,e=X+Y<b;if(!e){G(a).addClass("rightMost").css({left:"auto",right:c+"px"})}}function D(Y,X,W,Z){I(W)}function H(Z,X,W,a){var Y=G(W.element);I(W);if(Y.data("vb-flatpickr-disabled")=="1"){W.close()}}function Q(Z,X,W,a){var Y=G(W.element);Y.change();I(W)}function U(Y,X,W,Z){window.setTimeout(function(){I(W);var e=G(W.calendarContainer),b=e.find(".flatpickr-days"),f=b.find(".dayContainer"),d=b.outerWidth(),a=f.outerWidth(),c=e.closest(".flatpickr-calendar");if(d&&a&&d>a){c.width(a-1)}},0)}function N(){C()}function R(){G(N);vBulletin.flatpickr=vBulletin.flatpickr||{};vBulletin.flatpickr.initPickers=C;vBulletin.flatpickr.getInstance=S;vBulletin.flatpickr.disablePicker=J;vBulletin.flatpickr.enablePicker=L;vBulletin.flatpickr.initDatePicker=F;vBulletin.flatpickr.initTimePicker=O;vBulletin.flatpickr.initDateTimePicker=T;vBulletin.flatpickr.changePickerType=B}R()})(jQuery);;

// ***************************
// js.compressed/sb_search.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.5.2
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2019 MH Sub I, LLC dba vBulletin. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["error","error_adding_search_tips_code_x","invalid_json_string","invalid_search_syntax","invalid_server_response_please_try_again","search_tag_cloud","please_select_past_date","please_select_valid_date_range","content_type_Text","content_type_Gallery","content_type_Link","content_type_Photo","content_type_Poll","content_type_PrivateMessage","content_type_Video","save_as_search_module","saved_search_module_as_x","search_module_already_exists","search_module_not_found","please_enter_search_module_name","error_saving_search_module_x"]);(function(A){var B=[".search-fields-widget",".search-results-widget","#search-config-dialog"];if(!vBulletin.pageHasSelectors(B)){return false}window.vBulletin.search=window.vBulletin.search||{};window.vBulletin.search.SearchControl=function(G){var C=A(G),F=false,D=false;function K(){var Q=C.find(".searchSwitchToAdvanced"),O=C.find(".searchSwitchToForm"),M=Q.is(":visible"),P=O.is(":visible");if(M==P){Q.toggle(true);O.toggle(false);C.find(".form_row.form-row-json").addClass("h-hide-imp").nextAll().show()}Q.off("click").on("click",function(){var R=J();if(!R){return false}var S=JSON.stringify(R);C.find(".searchFields_searchJSON").val(S);C.find(".form_row.form-row-json").removeClass("h-hide-imp").nextAll().hide();Q.toggle(false);O.toggle(true)});O.off("click").on("click",function(){if(I(C.find(".searchFields_searchJSON").val())){Q.toggle(true);O.toggle(false);C.find(".form_row.form-row-json").addClass("h-hide-imp").nextAll().show()}});var N=C.find(".advSearchForm");if(N.length>0){N.submit(H)}F=new vBulletin.tagEditor.instance("{0}-searchFields_tag".format(G.replace(/\#/g,".")),true);var L=C.find(".searchFields_author");if(L.length>0){D=new vBulletin_Autocomplete(L,{apiClass:"user",containerClass:"entry-field h-clearfix"})}C.find(".js-search-keywords").off("keydown").on("keydown",function(R){if(R.which==13){if(N.length>0){N.submit()}}});C.find(".searchFields_last_visit").off("click").on("click",function(R){C.find(".datefield").prop("disabled",A(this).prop("checked"));if(A(this).is(":checked")){vBulletin.flatpickr.disablePicker(C.find(".searchFields_from_date"));vBulletin.flatpickr.disablePicker(C.find(".searchFields_to_date"))}else{vBulletin.flatpickr.enablePicker(C.find(".searchFields_from_date"));vBulletin.flatpickr.enablePicker(C.find(".searchFields_to_date"))}});C.find(".searchFields_channel_param").off("click").on("click",function(R){if(A(this).prop("checked")){C.find(".searchFields_channel").selectBox("disable")}else{C.find(".searchFields_channel").selectBox("enable")}});C.find(".search-tips").off("click").on("click",function(R){A(".search-tips-dialog").first().dialog({title:vBulletin.phrase.get("search_tips"),autoOpen:false,modal:true,resizable:false,closeOnEscape:true,showCloseButton:true,width:500,dialogClass:"dialog-container search-tips-dialog-container dialog-box"}).dialog("open");R.stopPropagation();return false});C.find(".searchFields_channel").selectBox();C.find(".searchFields_order_field").selectBox();C.find(".searchFields_order_direction").selectBox();C.find(".searchFields_view").selectBox()}function H(M){if(!C.find(".searchAdvancedFields").is(":visible")){var L=J();if(!L){return false}if(!L.author&&!L.channel&&!L.keywords&&!L.tag&&!L.type&&!L.date&&!L.last_visit&&!L.my_following&&!L.eventstartdate){vBulletin.warning("error","error_no_criteria");return false}C.find(".searchFields_searchJSON").val(JSON.stringify(L));C.find("form.advSearchForm").append(A('input[name^="humanverify"]').clone().attr("type","hidden"))}}function J(){var P={};if(C.find(".searchSwitchToForm").is(":visible")){P=JSON.parse(C.find(".searchFields_searchJSON").val()||"{}");if(P.length==0){vBulletin.warning("error","invalid_json_string");return }return P}C.find("input[placeholder].placeholder").each(function(){if(A(this).val()==A(this).attr("placeholder")){A(this).val("")}});var q=C.find(".js-search-keywords");if(q.length>0&&A.trim(q.val()).length>0){P.keywords=A.trim(q.val())}if(C.find(".searchFields_title_only:checked").length>0){P.title_only=1}if(C.find(".searchFields_starter_only:checked").length>0){P.starter_only=1}if(C.find(".searchFields_myFriends:checked").length>0){P.author="myFriends"}else{if(C.find(".searchFields_iFollow:checked").length>0){P.author="iFollow"}else{if(D){var p=D.getLabels();if(p.length>0){P.author=p}}}}var Z=C.find(".tag-input");if(Z.length>0){var N=C.find(".tag-input").val();if(N.length>0){var c=N.split(",");if(c.length>0){P.tag=c}}}if(C.find(".searchFields_last_visit:checked").length>0){P.date="lastVisit"}else{var M={},R=C.find(".searchFields_from_days");if(R.length>0&&A.trim(R.val()).length>0){M.from=A.trim(R.val())}else{var k=C.find(".searchFields_from_date"),l=Date.now();if(k.length>0&&A.trim(k.val()).length>0){var a=Date.parse(k.val());if(a<=0){vBulletin.warning("error","invalid_start_date");return false}else{if(a>l){vBulletin.warning("error","please_select_past_date");return false}}M.from=A.trim(k.val())}var d=C.find(".searchFields_to_date");if(d.length>0&&A.trim(d.val()).length>0){var X=Date.parse(d.val());if(X<=0){vBulletin.warning("error","invalid_end_date");return false}else{if(X>l){vBulletin.warning("error","please_select_past_date");return false}}if(a&&a>X){vBulletin.warning("error","please_select_valid_date_range");return false}M.to=A.trim(d.val())}}if(!A.isEmptyObject(M)){P.date=M}}var f=["eventstartdate","eventenddate"],j=f.length;for(var h=0;h<j;h++){var O=f[h],W=C.find('[name="searchFields['+O+'][from]"]'),r=W.length&&W.val().trim()||"",m=C.find('[name="searchFields['+O+'][to]"]'),L=m.length&&m.val().trim()||"",Y={};if(r){Y.from=r}if(L){Y.to=L}if(!A.isEmptyObject(Y)){P.eventstartdate=Y}}var e=C.find(".searchFields_featured");if(e.length>0&&e.prop("checked")){P.featured=1}var V=C.find(".searchFields_my_following");if(V.length>0&&V.prop("checked")){P.my_following=1}var b=[];C.find(".searchFields_type:checked").each(function(i,s){b.push(A(s).val())});if(A(b).length>0){P.type=b}if(C.find(".searchFields_channel_param:checked").length>0){P.channel={param:"channelid"}}else{var n=C.find("select.searchFields_channel");if(n.length>0){var S=n.val();if(S){P.channel=S}}}var Q=C.find(".searchFields_order_field"),U=C.find(".searchFields_order_direction");if(Q.length>0&&U.length>0&&Q.val()!=""){P.sort=Q.val();if(U.val()!=""){P.sort={};P.sort[Q.val()]=U.val()}}var T=C.find(".searchFields_view");if(T.length>0){P.view=T.val()}var o=C.find(".searchFields_exclude");if(o.length>0&&A.trim(o.val()).length>0){P.exclude=A.trim(o.val()).split(",")}var g=C.find(".searchFields_exclude_type");if(g.length>0&&A.trim(g.val()).length>0){P.exclude_type=A.trim(g.val()).split(",")}return P}function I(O,a,L,p){var m=O;if(typeof O=="string"){try{O=JSON.parse(O||"{}");if(O.length==0){vBulletin.warning("error","invalid_json_string");return false}}catch(R){vBulletin.warning("error","invalid_json_string");return false}}else{m=JSON.stringify(O)}var Y=C.find(".js-search-keywords");if(Y.length>0){Y.val(O.keywords||"");delete O.keywords}var S={".searchFields_myFriends":"myFriends",".searchFields_iFollow":"iFollow"};A.each(S,function(i,v){var w=C.find(i);if(w.length>0){var x=(O.author&&O.author==v);if(x){delete O.author}w.prop("checked",x)}});var P=C.find(".searchFields_author");if(P.length>0){var t=false;if(A.isArray(O.author)){t=O.author}else{if(O.exactname){t=[O.author]}}if(t){D.setElements(t);delete O.author;delete O.exactname}}var u=C.find(".tag-input");if(u.length>0){var c=O.tag||[];if(!Array.isArray(c)){c=[c]}u.val(c);F.setTags(c);C.find(".tag-list span").html(c.join(", "));delete O.tag}var j=C.find(".searchFields_last_visit"),Z=(O.date&&O.date&&O.date=="lastVisit");if(j.length>0){j.prop("checked",Z);if(Z){delete O.date}}var e={".searchFields_from_date":"from",".searchFields_to_date":"to",".searchFields_from_days":"from"};A.each(e,function(i,x){var y=C.find(i);if(y.length>0){if(vBulletin.flatpickr){var w=vBulletin.flatpickr.getInstance(y);if(w){if(j.is(":checked")){vBulletin.flatpickr.disablePicker(y)}else{vBulletin.flatpickr.enablePicker(y)}}}if(!Z){var v="";if(O.date&&O.date[x]){v=O.date[x];delete O.date[x]}y.val(v)}}});if(A.isEmptyObject(O.date)){delete O.date}var h=["eventstartdate","eventenddate"],l=h.length;for(var k=0;k<l;k++){var N=h[k],V=C.find('[name="searchFields['+N+'][from]"]'),q=C.find('[name="searchFields['+N+'][to]"]');if(O[N]){if(O[N]["to"]&&q.length){q.val(O[N]["to"])}if(O[N]["from"]&&V.length){V.val(O[N]["from"])}}delete O[N]}var U={".searchFields_featured":"featured",".searchFields_my_following":"my_following",".searchFields_starter_only":"starter_only",".searchFields_title_only":"title_only"};A.each(U,function(i,v){var w=C.find(i);if(w.length>0){w.prop("checked",(O[v]?true:false));delete O[v]}});var W=C.find(".searchFields_type_container");if(W.length>0){if(a){var d=W.find(".field-desc");d.prevAll().remove();A.each(a,function(v,i){if(v!="vBForum_PrivateMessage"){d.before(A('<label><input type="checkbox" name="searchFields[type][]" class="searchFields_type" value="'+v+'" /><span>'+vBulletin.phrase.get("content_type_"+i["class"])+"</span></label>"))}})}C.find(".searchFields_type").val(O.type||[]);delete O.type;delete O.exclude_type}var b=C.find(".searchFields_channel_param"),o=false;if(b.length>0){if(typeof O.channel=="object"&&O.channel.param){o=true;delete O.channel}b.prop("checked",o)}function f(i){i.selectBox("destroy");i.removeData("selectBoxControl");i.removeData("selectBoxSettings");i.selectBox()}var s=C.find(".searchFields_channel");if(s.length>0){var Q=false;if(b.length>0){s.prop("disabled",o)}if(L){s.children().remove();E(L,s);Q=true}if(!o){s.val(O.channel||"");delete O.channel;Q=true}if(Q){f(s)}}var n=C.find("select.searchFields_order_direction"),T=C.find("select.searchFields_order_field"),M="",g="";if(O.sort){if(typeof O.sort=="string"){M=O.sort}else{if(typeof O.sort=="object"){A.each(O.sort,function(i,v){M=i;g=v})}}delete O.sort}if(n.length>0){n.val(g);f(n)}if(T.length>0){T.val(M);f(T)}var X=C.find("select.searchFields_view");if(X.length>0){X.val(O.view||"");f(X);delete O.view}if(!A.isEmptyObject(O)){var r=C.find(".searchSwitchToAdvanced");if(r.length>0){C.find(".form_row.form-row-json").removeClass("h-hide-imp").nextAll().hide();r.hide();C.find(".searchSwitchToForm").show();C.find(".searchFields_searchJSON").val(m)}return false}return true}function E(L,M){A.each(L,function(O,N){M.append(A("<option></option>").val(O).html(str_repeat("&nbsp;",N.depth*3).concat(N.htmltitle)));if(N.channels){E(N.channels,M)}})}this.load=function(){return J()};this.set=function(O,M,L,N){return I(O,M,L,N)};K()};A(document).ready(function(){var D=A("#advancedSearchFields"),J=A(".search-results-widget");vBulletin.truncatePostContent(J);if(D.length>0){var K=D.find(".searchFields_from_date"),C=D.find(".searchFields_to_date"),M=(new Date());if(K.data("vb-flatpicker-initialized")){vBulletin.flatpickr.getInstance(K).set("maxDate",M)}else{K.one("vb-flatpicker-initialized",function(){vBulletin.flatpickr.getInstance(A(this)).set("maxDate",M)})}if(C.data("vb-flatpicker-initialized")){vBulletin.flatpickr.getInstance(C).set("maxDate",M)}else{C.one("vb-flatpicker-initialized",function(){vBulletin.flatpickr.getInstance(A(this)).set("maxDate",M)})}var E=new vBulletin.search.SearchControl(D.selector);searchJSONStr=D.find(".searchFields_searchJSON").val();if(searchJSONStr.length>0&&searchJSONStr!=D.find(".searchFields_searchJSON").attr("placeholder")){E.set(searchJSONStr,false,false,true)}}var L=A(".sort-controls",J);if(L.length>0){L.find(".searchFields_order_field").selectBox().change(function(){var R=O.find(".searchResults_searchJSON").val()||"{}",Q=JSON.parse(R);Q.sort={};Q.sort[A(this).val()]=L.find(".searchFields_order_direction").selectBox().val();O.find(".searchResults_searchJSON").val(JSON.stringify(Q));A(".resultSearchForm").submit()});L.find(".searchFields_order_direction").selectBox().change(function(){var R=O.find(".searchResults_searchJSON").val()||"{}",Q=JSON.parse(R);Q.sort={};Q.sort[L.find(".searchFields_order_field").selectBox().val()]=A(this).val();O.find(".searchResults_searchJSON").val(JSON.stringify(Q));A(".resultSearchForm").submit()});L.removeClass("h-invisible")}var O=A(".search-controls",J);if(O.length>0){var I=false,P=false,F=O.find(".searchFields_author");if(F.length>0){I=new vBulletin_Autocomplete(F,{apiClass:"user",containerClass:"entry-field h-clearfix"});O.find(".search-controls-members .removable-element .element-text").each(function(R,Q){I.addElement(A(Q).html())})}if(O.find(".searchResultTagEditor").length>0){P=new vBulletin.tagEditor.instance(".search-controls .searchResultTagEditor",true);O.find(".search-controls-tags .removable-element .element-text").each(function(R,Q){P.addTag(A(Q).html())})}O.find("button").off("click").on("click",function(S){var T=O.find(".searchResults_searchJSON").val()||"{}",Q=JSON.parse(T),R=A(this).val();switch(R){case"keywords":Q.keywords=O.find(".js-search-keywords").val();Q.title_only=O.find(".searchFields_title_only").is(":checked");break;case"author":Q.author=I.getLabels();Q.starter_only=O.find(".searchFields_starter_only").is(":checked");break;case"tags":Q.tag=P.getTags();break;default:return ;break}O.find(".searchResults_searchJSON").val(JSON.stringify(Q));A(".resultSearchForm").submit()});O.find(".removable-element .element-x").off("click").on("click",function(U){var V=O.find(".searchResults_searchJSON").val()||"{}",R=JSON.parse(V),T=A(this).parents(".search-control-popup");if(T.hasClass("search-controls-members")){A(this).parents(".removable-element").remove();var Q=[];T.find(".removable-element .element-text").each(function(X,W){Q.push(A(W).html())});R.author=Q;if(Q.length==0){delete R.author}}if(T.hasClass("search-controls-tags")){A(this).parents(".removable-element").remove();var S=[];T.find(".removable-element .element-text").each(function(X,W){S.push(A(W).html())});R.tag=S;if(S.length==0){delete R.tag}}O.find(".searchResults_searchJSON").val(JSON.stringify(R));A(".resultSearchForm").submit()})}if(vBulletin.inlinemod&&typeof vBulletin.inlinemod.init=="function"){vBulletin.inlinemod.init(J)}J.off("click",".js-post-control__ip-address").on("click",".js-post-control__ip-address",vBulletin.conversation.showIp);J.off("click",".js-post-control__vote").on("click",".js-post-control__vote",function(Q){if(A(Q.target).closest(".js-bubble-flyout").length==1){vBulletin.conversation.showWhoVoted.apply(Q.target,[Q])}else{vBulletin.conversation.votePost.apply(this,[Q])}return false});J.off("click",".js-post-control__edit").on("click",".js-post-control__edit",vBulletin.conversation.editPost);J.off("click",".js-post-control__flag").on("click",".js-post-control__flag",vBulletin.conversation.flagPost);J.off("click",".js-post-control__comment").on("click",".js-post-control__comment",vBulletin.conversation.toggleCommentBox);J.off("click",".js-comment-entry__post").on("click",".js-comment-entry__post",function(Q){vBulletin.conversation.postComment.apply(this,[Q,function(R){location.reload()}])});var G=(typeof J.data("keywords")!="undefined")?J.data("keywords").toString():"";if(G.length>0){var N;A(G.split(" ")).each(function(R,Q){N=Q.toUpperCase();if(N=="OR"||N=="AND"){return }A(".post-header",J).highlight(Q);if(!A(".searchFields_title_only",J).attr("checked")){A(".post-content",J).highlight(Q)}})}if(J.length==1){var H=A(".pagenav-form",J).attr("action");if(H){A(".js-pagenav .js-pagenav-button",J).each(function(){var R=A(this),Q=R.prop("href");if(!Q||(pageData.baseurl&&Q==pageData.baseurl)){R.prop("href",H+"&p="+parseInt(R.data("page"),10))}})}}})})(jQuery);;

