!function(n){function i(n,t){for(var i=window,r=(n||"").split(".");i&&r.length;)i=i[r.shift()];return"function"==typeof i?i:(t.push(n),Function.constructor.apply(null,t))}function u(n){return"GET"===n||"POST"===n}function e(n,t){u(t)||n.setRequestHeader("X-HTTP-Method-Override",t)}function o(t,i,r){var u;r.indexOf("application/x-javascript")===-1&&(u=(t.getAttribute("data-ajax-mode")||"").toUpperCase(),n(t.getAttribute("data-ajax-update")).each(function(t,r){switch(u){case"BEFORE":n(r).prepend(i);break;case"AFTER":n(r).append(i);break;case"REPLACE-WITH":n(r).replaceWith(i);break;default:n(r).html(i)}}))}function f(t,r){var c,l,f,a,s,h;(c=t.getAttribute("data-ajax-confirm"),!c||window.confirm(c))&&(l=n(t.getAttribute("data-ajax-loading")),a=parseInt(t.getAttribute("data-ajax-loading-duration"),10)||0,n.extend(r,{type:t.getAttribute("data-ajax-method")||void 0,url:t.getAttribute("data-ajax-url")||void 0,cache:"true"===(t.getAttribute("data-ajax-cache")||"").toLowerCase(),beforeSend:function(n){var r;return e(n,f),r=i(t.getAttribute("data-ajax-begin"),["xhr"]).apply(t,arguments),r!==!1&&l.show(a),r},complete:function(){l.hide(a);i(t.getAttribute("data-ajax-complete"),["xhr","status"]).apply(t,arguments)},success:function(n,r,u){o(t,n,u.getResponseHeader("Content-Type")||"text/html");i(t.getAttribute("data-ajax-success"),["data","status","xhr"]).apply(t,arguments)},error:function(){i(t.getAttribute("data-ajax-failure"),["xhr","status","error"]).apply(t,arguments)}}),r.data.push({name:"X-Requested-With",value:"XMLHttpRequest"}),f=r.type.toUpperCase(),u(f)||(r.type="POST",r.data.push({name:"X-HTTP-Method-Override",value:f})),s=n(t),s.is("form")&&"multipart/form-data"==s.attr("enctype")&&(h=new FormData,n.each(r.data,function(n,t){h.append(t.name,t.value)}),n("input[type=file]",s).each(function(){var t=this;n.each(t.files,function(n,i){h.append(t.name,i)})}),n.extend(r,{processData:!1,contentType:!1,data:h})),n.ajax(r))}function s(t){var i=n(t).data(h);return!i||!i.validate||i.validate()}var t="unobtrusiveAjaxClick",r="unobtrusiveAjaxClickTarget",h="unobtrusiveValidation";n(document).on("click","a[data-ajax=true]",function(n){n.preventDefault();f(this,{url:this.href,type:"GET",data:[]})});n(document).on("click","form[data-ajax=true] input[type=image]",function(i){var r=i.target.name,u=n(i.target),f=n(u.parents("form")[0]),e=u.offset();f.data(t,[{name:r+".x",value:Math.round(i.pageX-e.left)},{name:r+".y",value:Math.round(i.pageY-e.top)}]);setTimeout(function(){f.removeData(t)},0)});n(document).on("click","form[data-ajax=true] :submit",function(i){var f=i.currentTarget.name,e=n(i.target),u=n(e.parents("form")[0]);u.data(t,f?[{name:f,value:i.currentTarget.value}]:[]);u.data(r,e);setTimeout(function(){u.removeData(t);u.removeData(r)},0)});n(document).on("submit","form[data-ajax=true]",function(i){var e=n(this).data(t)||[],u=n(this).data(r),o=u&&(u.hasClass("cancel")||void 0!==u.attr("formnovalidate"));i.preventDefault();(o||s(this))&&f(this,{url:this.action,type:this.method||"GET",data:e.concat(n(this).serializeArray())})})}(jQuery),function(n){n.fn.hoverIntent=function(t,i,r){var u={interval:100,sensitivity:7,timeout:0};u=typeof t=="object"?n.extend(u,t):n.isFunction(i)?n.extend(u,{over:t,out:i,selector:r}):n.extend(u,{over:t,out:t,selector:i});var f,e,o,s,h=function(n){f=n.pageX;e=n.pageY},c=function(t,i){if(i.hoverIntent_t=clearTimeout(i.hoverIntent_t),Math.abs(o-f)+Math.abs(s-e)<u.sensitivity)return n(i).off("mousemove.hoverIntent",h),i.hoverIntent_s=1,u.over.apply(i,[t]);o=f;s=e;i.hoverIntent_t=setTimeout(function(){c(t,i)},u.interval)},a=function(n,t){return t.hoverIntent_t=clearTimeout(t.hoverIntent_t),t.hoverIntent_s=0,u.out.apply(t,[n])},l=function(t){var r=jQuery.extend({},t),i=this;if(i.hoverIntent_t&&(i.hoverIntent_t=clearTimeout(i.hoverIntent_t)),t.type=="mouseenter"){o=r.pageX;s=r.pageY;n(i).on("mousemove.hoverIntent",h);i.hoverIntent_s!=1&&(i.hoverIntent_t=setTimeout(function(){c(r,i)},u.interval))}else n(i).off("mousemove.hoverIntent",h),i.hoverIntent_s==1&&(i.hoverIntent_t=setTimeout(function(){a(r,i)},u.timeout))};return this.on({"mouseenter.hoverIntent":l,"mouseleave.hoverIntent":l},u.selector)}}(jQuery),function(n){n.cluetip={version:"1.2.10",template:'<div><div class="cluetip-outer"><h3 class="cluetip-title ui-widget-header ui-cluetip-header"><\/h3><div class="cluetip-inner ui-widget-content ui-cluetip-content"><\/div><\/div><div class="cluetip-extra"><\/div><\/div>',setup:{insertionType:"appendTo",insertionElement:"body"},defaults:{multiple:!1,width:275,height:"auto",cluezIndex:1035,positionBy:"auto",topOffset:15,leftOffset:15,snapToEdge:!1,local:!1,localPrefix:null,localIdSuffix:null,hideLocal:!0,attribute:"rel",titleAttribute:"title",splitTitle:"",escapeTitle:!1,showTitle:!0,cluetipClass:"default",hoverClass:"",waitImage:!0,cursor:"help",arrows:!1,dropShadow:!0,dropShadowSteps:6,sticky:!1,mouseOutClose:!1,delayedClose:50,activation:"hover",clickThrough:!0,tracking:!1,closePosition:"top",closeText:"Close",truncate:0,fx:{open:"show",openSpeed:""},hoverIntent:{sensitivity:3,interval:50,timeout:0},onActivate:function(){return!0},onShow:function(){},onHide:function(){},ajaxCache:!0,ajaxProcess:function(n){return n.replace(/<(script|style|title)[^<]+<\/(script|style|title)>/gm,"").replace(/<(link|meta)[^>]+>/g,"")},ajaxSettings:{dataType:"html"},debug:!1}};var t,f="cluetip ui-widget ui-widget-content ui-cluetip",i={},u=0,r=0,e=function(n){return n.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;")};n.fn.attrProp=n.fn.prop||n.fn.attr;n.fn.cluetip=function(o,s){function tt(t,i){var r=t||"";return i=i||"",typeof i=="object"?n.each(i,function(n,t){r+="-"+n+"-"+t}):typeof i=="string"&&(r+=i),r}function it(t,i){var o="",r=i.dropShadow&&i.dropShadowSteps?+i.dropShadowSteps:0,s,f,e,u;if(n.cluetip.boxShadow)return r&&(o="1px 1px "+r+"px rgba(0,0,0,0.5)"),s=r===0?"0 0 ":"1px 1px ",t.css(n.cluetip.boxShadow,o),!1;if(f=t.find(".cluetip-drop-shadow"),r==f.length)return f;for(f.remove(),e=[],u=0;u<r;)e[u++]='<div style="top:'+u+"px;left:"+u+'px;"><\/div>';return n(e.join("")).css({position:"absolute",backgroundColor:"#000",zIndex:p-1,opacity:.1}).addClass("cluetip-drop-shadow").prependTo(t)}var h,c,w,v,y,a,g;if(typeof o=="object"&&(s=o,o=null),o=="destroy")return this.each(function(){var i=n(this),t=i.data("cluetip");t&&(n(t.selector).remove(),n.removeData(this,"title"),n.removeData(this,"cluetip"));t.title&&i.attrProp("title",t.title);i.unbind(".cluetip").unbind("cluetipMoc")}),n('[id^="cluetip"]').length||n(document).unbind(".cluetip"),this;s=n.extend(!0,{},n.cluetip.defaults,s||{});u++;var p,nt=n.cluetip.backCompat||!s.multiple?"cluetip":"cluetip-"+u,k="#"+nt,l=n.cluetip.backCompat?"#":".",b=n.cluetip.setup.insertionType,d=n.cluetip.setup.insertionElement||"body";return b=/appendTo|prependTo|insertBefore|insertAfter/.test(b)?b:"appendTo",h=n(k),h.length||(h=n(n.cluetip.template)[b](d).attr("id",nt).css({position:"absolute",display:"none"}),p=+s.cluezIndex,w=h.find(l+"cluetip-outer").css({position:"relative",zIndex:p}),c=h.find(l+"cluetip-inner"),v=h.find(l+"cluetip-title"),h.bind("mouseenter mouseleave",function(t){n(this).data("entered",t.type==="mouseenter")})),t=n("#cluetip-waitimage"),!t.length&&s.waitImage&&(t=n("<div><\/div>").attr("id","cluetip-waitimage").css({position:"absolute"}),t.insertBefore(h).hide()),g=(parseInt(h.css("paddingLeft"),10)||0)+(parseInt(h.css("paddingRight"),10)||0),this.each(function(u){function wi(){return!1}function bi(n,t){var i=n.status;t.beforeSend(n.xhr,t);i=="error"?t[i](n.xhr,n.textStatus):i=="success"&&t[i](n.data,n.textStatus,n.xhr);t.complete(n.xhr,t.textStatus)}var vi,ft=this,nt=n(this),b=n.extend(!0,{},s,n.metadata?nt.metadata():n.meta?nt.data():nt.data("cluetip")||{}),wt=!1,ni=!1,vt=null,et=b[b.attribute]||(b.attribute=="href"?nt.attr(b.attribute):nt.attrProp(b.attribute)||nt.attr(b.attribute)),ri=b.cluetipClass,bt,hi;if(p=+b.cluezIndex,nt.data("cluetip",{title:ft.title,zIndex:p,selector:k,cursor:ft.style.cursor||""}),b.arrows&&!h.find(".cluetip-arrows").length&&h.append('<div class="cluetip-arrows ui-state-default"><\/div>'),!et&&!b.splitTitle&&!o)return!0;b.local&&b.localPrefix&&(et=b.localPrefix+et);b.local&&b.hideLocal&&et&&n(et+":first").hide();var ut=parseInt(b.topOffset,10),pt=parseInt(b.leftOffset,10),ht,ci,oi=isNaN(parseInt(b.height,10))?"auto":/\D/g.test(b.height)?b.height:b.height+"px",ui,li,yi,lt,ct,kt,fi,ai=parseInt(b.width,10)||275,ot=ai+g+b.dropShadowSteps,dt=this.offsetWidth,at,rt,st,ti,gt,yt=b.attribute!="title"?nt.attr(b.titleAttribute)||"":"";b.escapeTitle&&(yt=e(yt));b.splitTitle&&(gt=yt.split(b.splitTitle),yt=b.showTitle||gt[0]===""?gt.shift():"");nt.bind("mouseenter mouseleave",function(n){var t=nt.data("cluetip");t.entered=n.type==="entered";nt.data("cluetip",t)});bt=function(f){var e,ht,a,oi=b.onActivate.call(ft,f),p,g,ct,it;if(oi===!1)return!1;if(ni=!0,h=n(k).css({position:"absolute"}),w=h.find(l+"cluetip-outer"),c=h.find(l+"cluetip-inner"),v=h.find(l+"cluetip-title"),y=h.find(l+"cluetip-arrows"),h.removeClass().css({width:ai}),et==nt.attr("href")&&nt.css("cursor",b.cursor),b.hoverClass&&nt.addClass(b.hoverClass),li=lt=nt.offset().top,yi=li+nt.innerHeight(),at=nt.offset().left,n(d).css("position")==="relative"&&(at-=n(d)[0].getBoundingClientRect().left),dt=nt.innerWidth(),f.type!=focus&&(b.positionBy!="mouse"||f.pageX)?(st=f.pageX,kt=f.pageY):(st=at+dt/2+pt,h.css({left:rt}),kt=lt+ut),ft.tagName.toLowerCase()!="area"&&(ui=n(document).scrollTop(),ti=n(window).width()),b.positionBy=="fixed"?(rt=dt+at+pt,h.css({left:rt})):(rt=dt>at&&at>ot||at+dt+ot+pt>ti?at-ot-pt:dt+at+pt,(ft.tagName.toLowerCase()=="area"||b.positionBy=="mouse"||dt+ot>ti)&&(st+20+ot>ti?(h.addClass("cluetip-"+ri),rt=st-ot-pt>=0?st-ot-pt-parseInt(h.css("marginLeft"),10)+parseInt(c.css("marginRight"),10):st-ot/2):rt=st+pt),e=rt<0?f.pageY+ut:f.pageY,(rt<0||b.positionBy=="bottomTop"||b.positionBy=="topBottom")&&(rt=st+ot/2>ti?ti/2-ot/2:Math.max(st-ot/2,0))),y.css({zIndex:nt.data("cluetip").zIndex+1}),h.css({left:rt,zIndex:nt.data("cluetip").zIndex}),ci=n(window).height(),o)vi=typeof o=="function"?o.call(ft):o,c.html(vi),ii(e);else if(gt){if(p=gt.length,c.html(p?gt[0]:""),p>1)for(g=1;g<p;g++)c.append('<div class="split-body">'+gt[g]+"<\/div>");ii(e)}else if(b.local||et.indexOf("#")===0)b.local&&(it=n(et+(/^#\S+$/.test(et)?"":":eq("+u+")")).clone(!0).show(),b.localIdSuffix&&it.attr("id",it[0].id+b.localIdSuffix),c.html(it),ii(e));else if(/\.(jpe?g|tiff?|gif|png)(?:\?.*)?$/i.test(et))c.html('<img src="'+et+'" alt="'+yt+'" />'),ii(e);else{var vt=b.ajaxSettings.beforeSend,bt=b.ajaxSettings.error,fi=b.ajaxSettings.success,ei=b.ajaxSettings.complete;a=tt(et,b.ajaxSettings.data);ct={cache:b.ajaxCache,url:et,beforeSend:function(n,i){vt&&vt.call(ft,n,h,c,i);w.children().empty();b.waitImage&&t.css({top:kt+20,left:st+20,zIndex:nt.data("cluetip").zIndex-1}).show()},error:function(n,t){s.ajaxCache&&!i[a]&&(i[a]={status:"error",textStatus:t,xhr:n});ni&&(bt?bt.call(ft,n,t,h,c):c.html("<i>sorry, the contents could not be loaded<\/i>"))},success:function(n,t,r){s.ajaxCache&&!i[a]&&(i[a]={status:"success",data:n,textStatus:t,xhr:r});wt=b.ajaxProcess.call(ft,n);typeof wt=="object"&&wt!==null&&(yt=wt.title,wt=wt.content);ni&&(fi&&fi.call(ft,n,t,h,c),c.html(wt))},complete:function(i,u){var f,o,s;for(ei&&ei.call(ft,i,u,h,c),f=c[0].getElementsByTagName("img"),r=f.length,o=0,s=f.length;o<s;o++)f[o].complete&&r--;r?n(f).bind("load.ct error.ct",function(){r--;r===0&&(t.hide(),n(f).unbind(".ct"),ni&&ii(e))}):(t.hide(),ni&&ii(e))}};ht=n.extend(!0,{},b.ajaxSettings,ct);i[a]?bi(i[a],ht):n.ajax(ht)}};nt.unbind("showCluetip.cluetip",bt).bind("showCluetip.cluetip",bt);var ii=function(t){var u,e,o,l=yt||b.showTitle&&"&nbsp;",r="",i="",s=!1,p={bottom:function(n){n.appendTo(c)},top:function(n){n.prependTo(c)},title:function(n){n.prependTo(v)}},k;h.addClass("cluetip-"+ri);b.truncate&&(k=c.text().slice(0,b.truncate)+"...",c.html(k));l?v.show().html(l):v.hide();b.sticky&&(p[b.closePosition]&&(u=n('<div class="cluetip-close"><a href="#">'+b.closeText+"<\/a><\/div>"),p[b.closePosition](u),u.bind("click.cluetip",function(){return ei(),!1})),b.mouseOutClose&&(nt.unbind("mouseleave.cluetipMoc"),h.unbind("mouseleave.cluetipMoc"),(b.mouseOutClose=="both"||b.mouseOutClose=="cluetip"||b.mouseOutClose===!0)&&h.bind("mouseleave.cluetipMoc",pi),(b.mouseOutClose=="both"||b.mouseOutClose=="link")&&nt.bind("mouseleave.cluetipMoc",pi)));w.css({zIndex:nt.data("cluetip").zIndex,overflow:oi=="auto"?"visible":"auto",height:oi});ht=oi=="auto"?Math.max(h.outerHeight(),h.height()):parseInt(oi,10);ct=lt;fi=ui+ci;s=rt<st&&Math.max(rt,0)+ot>st;b.positionBy=="fixed"?ct=lt-b.dropShadowSteps+ut:b.positionBy=="topBottom"||b.positionBy=="bottomTop"||s?(b.positionBy=="topBottom"?i=lt+ht+ut<fi&&kt-ui<ht+ut?"bottom":"top":(b.positionBy=="bottomTop"||s)&&(i=lt+ht+ut>fi&&kt-ui>ht+ut?"top":"bottom"),b.snapToEdge?i=="top"?ct=li-ht-ut:i=="bottom"&&(ct=yi+ut):i=="top"?ct=kt-ht-ut:i=="bottom"&&(ct=kt+ut)):ct=lt+ht+ut>fi?ht>=ci?ui:fi-ht-ut:nt.css("display")=="block"||ft.tagName.toLowerCase()=="area"||b.positionBy=="mouse"?t-ut:lt-b.dropShadowSteps;i===""&&(i=rt<at?"left":"right");e=" clue-"+i+"-"+ri+" cluetip-"+ri;ri=="rounded"&&(e+=" ui-corner-all");h.css({top:ct+"px"}).attrProp({className:f+e});b.arrows?(/(left|right)/.test(i)&&(o=h.height()-y.height(),r=rt>=0&&t>0?lt-ct-b.dropShadowSteps:0,r=(o>r?r:o)+"px"),y.css({top:r}).show()):y.hide();a=it(h,b);a&&a.length&&a.hide().css({height:ht,width:ai,zIndex:nt.data("cluetip").zIndex-1}).show();vt||h.hide();clearTimeout(vt);vt=null;h[b.fx.open](b.fx.openSpeed||0);n.fn.bgiframe&&h.bgiframe();b.onShow.call(ft,h,c)},si=function(){ni=!1;t.hide();(!b.sticky||/click|toggle/.test(b.activation))&&(b.delayedClose>0?(clearTimeout(vt),vt=null,vt=setTimeout(ei,b.delayedClose)):(ei(),clearTimeout(vt)));b.hoverClass&&nt.removeClass(b.hoverClass)},ei=function(t){var i=t&&t.data("cluetip")?t:nt,u=i.data("cluetip")&&i.data("cluetip").selector,f=u||"div.cluetip",r=n(f),e=r.find(l+"cluetip-inner"),o=r.find(l+"cluetip-arrows");r.hide().removeClass();b.onHide.call(i[0],r,e);u&&(i.removeClass("cluetip-clicked"),nt.css("cursor",nt.data("cluetip").cursor));u&&yt&&i.attrProp(b.titleAttribute,yt);b.arrows&&o.css({top:""});a&&a.hide()},pi=function(){var n=this;clearTimeout(vt);vt=setTimeout(function(){var i=nt.data("cluetip").entered,r=h.data("entered"),t=!1;b.mouseOutClose=="both"&&(i||r)?t=!0:(b.mouseOutClose===!0||b.mouseOutClose=="cluetip")&&r?t=!0:b.mouseOutClose=="link"&&i&&(t=!0);t||ei.call(n)},b.delayedClose)};n(document).unbind("hideCluetip.cluetip").bind("hideCluetip.cluetip",function(t){ei(n(t.target))});/click|toggle/.test(b.activation)?nt.bind("click.cluetip",function(t){return h.is(":hidden")||!nt.is(".cluetip-clicked")?(bt(t),n(".cluetip-clicked").removeClass("cluetip-clicked"),nt.addClass("cluetip-clicked")):si(t),!1}):b.activation=="focus"?(nt.bind("focus.cluetip",function(n){nt.attrProp("title","");bt(n)}),nt.bind("blur.cluetip",function(n){nt.attrProp("title",nt.data("cluetip").title);si(n)})):(nt[b.clickThrough?"unbind":"bind"]("click.cluetip",wi),hi=function(n){if(b.tracking){var t=rt-n.pageX,i=ct?ct-n.pageY:lt-n.pageY;nt.bind("mousemove.cluetip",function(n){h.css({left:n.pageX+t,top:n.pageY+i})})}},n.fn.hoverIntent&&b.hoverIntent?nt.hoverIntent({sensitivity:b.hoverIntent.sensitivity,interval:b.hoverIntent.interval,over:function(n){bt(n);hi(n)},timeout:b.hoverIntent.timeout,out:function(n){si(n);nt.unbind("mousemove.cluetip")}}):nt.bind("mouseenter.cluetip",function(n){bt(n);hi(n)}).bind("mouseleave.cluetip",function(n){si(n);nt.unbind("mousemove.cluetip")}),nt.bind("mouseover.cluetip",function(){nt.attrProp("title","")}).bind("mouseleave.cluetip",function(){nt.attrProp("title",nt.data("cluetip").title)}))}),this},function(){var r,e,t,u,i,o;n.support=n.support||{};var s=document.createElement("div"),h=s.style,c=["boxShadow"],f=["moz","Moz","webkit","o"];for(r=0,e=c.length;r<e;r++){if(t=c[r],u=t.charAt(0).toUpperCase()+t.slice(1),typeof h[t]!="undefined")n.cluetip[t]=t;else for(i=0,o=f.length;i<o;i++)if(typeof h[f[i]+u]!="undefined"){n.cluetip[t]=f[i]+u;break}n.support[t]||(n.support[t]=n.cluetip[t])}s=null}();n.fn.cluetip.defaults=n.cluetip.defaults}(jQuery),function(n,t){typeof define=="function"&&define.amd?define([],t):typeof exports=="object"?module.exports=t():n.Autolinker=t()}(this,function(){var n=function(t){var r,i;if(t=t||{},this.version=n.version,this.urls=this.normalizeUrlsCfg(t.urls),this.email=typeof t.email=="boolean"?t.email:!0,this.phone=typeof t.phone=="boolean"?t.phone:!0,this.hashtag=t.hashtag||!1,this.mention=t.mention||!1,this.newWindow=typeof t.newWindow=="boolean"?t.newWindow:!0,this.stripPrefix=this.normalizeStripPrefixCfg(t.stripPrefix),this.stripTrailingSlash=typeof t.stripTrailingSlash=="boolean"?t.stripTrailingSlash:!0,r=this.mention,r!==!1&&r!=="twitter"&&r!=="instagram")throw new Error("invalid `mention` cfg - see docs");if(i=this.hashtag,i!==!1&&i!=="twitter"&&i!=="facebook"&&i!=="instagram")throw new Error("invalid `hashtag` cfg - see docs");this.truncate=this.normalizeTruncateCfg(t.truncate);this.className=t.className||"";this.replaceFn=t.replaceFn||null;this.context=t.context||this;this.htmlParser=null;this.matchers=null;this.tagBuilder=null};return n.link=function(t,i){var r=new n(i);return r.link(t)},n.parse=function(t,i){var r=new n(i);return r.parse(t)},n.version="1.2.1",n.prototype={constructor:n,normalizeUrlsCfg:function(n){return n==null&&(n=!0),typeof n=="boolean"?{schemeMatches:n,wwwMatches:n,tldMatches:n}:{schemeMatches:typeof n.schemeMatches=="boolean"?n.schemeMatches:!0,wwwMatches:typeof n.wwwMatches=="boolean"?n.wwwMatches:!0,tldMatches:typeof n.tldMatches=="boolean"?n.tldMatches:!0}},normalizeStripPrefixCfg:function(n){return n==null&&(n=!0),typeof n=="boolean"?{scheme:n,www:n}:{scheme:typeof n.scheme=="boolean"?n.scheme:!0,www:typeof n.www=="boolean"?n.www:!0}},normalizeTruncateCfg:function(t){return typeof t=="number"?{length:t,location:"end"}:n.Util.defaults(t||{},{length:Number.POSITIVE_INFINITY,location:"end"})},parse:function(n){for(var t,f,o,s=this.getHtmlParser(),e=s.parse(n),r=0,i=[],u=0,h=e.length;u<h;u++)t=e[u],f=t.getType(),f==="element"&&t.getTagName()==="a"?t.isClosing()?r=Math.max(r-1,0):r++:f==="text"&&r===0&&(o=this.parseText(t.getText(),t.getOffset()),i.push.apply(i,o));return i=this.compactMatches(i),this.removeUnwantedMatches(i)},compactMatches:function(n){var t,i,r;for(n.sort(function(n,t){return n.getOffset()-t.getOffset()}),t=0;t<n.length-1;t++)for(i=n[t],r=i.getOffset()+i.getMatchedText().length;t+1<n.length&&n[t+1].getOffset()<=r;)n.splice(t+1,1);return n},removeUnwantedMatches:function(t){var i=n.Util.remove;return this.hashtag||i(t,function(n){return n.getType()==="hashtag"}),this.email||i(t,function(n){return n.getType()==="email"}),this.phone||i(t,function(n){return n.getType()==="phone"}),this.mention||i(t,function(n){return n.getType()==="mention"}),this.urls.schemeMatches||i(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="scheme"}),this.urls.wwwMatches||i(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="www"}),this.urls.tldMatches||i(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="tld"}),t},parseText:function(n,t){var e,u,f,o,i,r,s;for(t=t||0,e=this.getMatchers(),u=[],f=0,o=e.length;f<o;f++){for(i=e[f].parseMatches(n),r=0,s=i.length;r<s;r++)i[r].setOffset(t+i[r].getOffset());u.push.apply(u,i)}return u},link:function(n){var r,e,t;if(!n)return"";var f=this.parse(n),i=[],u=0;for(r=0,e=f.length;r<e;r++)t=f[r],i.push(n.substring(u,t.getOffset())),i.push(this.createMatchReturnVal(t)),u=t.getOffset()+t.getMatchedText().length;return i.push(n.substring(u)),i.join("")},createMatchReturnVal:function(t){var i,r;return this.replaceFn&&(i=this.replaceFn.call(this.context,t)),typeof i=="string"?i:i===!1?t.getMatchedText():i instanceof n.HtmlTag?i.toAnchorString():(r=t.buildTag(),r.toAnchorString())},getHtmlParser:function(){var t=this.htmlParser;return t||(t=this.htmlParser=new n.htmlParser.HtmlParser),t},getMatchers:function(){if(this.matchers)return this.matchers;var t=n.matcher,i=this.getTagBuilder(),r=[new t.Hashtag({tagBuilder:i,serviceName:this.hashtag}),new t.Email({tagBuilder:i}),new t.Phone({tagBuilder:i}),new t.Mention({tagBuilder:i,serviceName:this.mention}),new t.Url({tagBuilder:i,stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash})];return this.matchers=r},getTagBuilder:function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new n.AnchorTagBuilder({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t}},n.match={},n.matcher={},n.htmlParser={},n.truncate={},n.Util={abstractMethod:function(){throw"abstract";},trimRegex:/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,assign:function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return n},defaults:function(n,t){for(var i in t)t.hasOwnProperty(i)&&n[i]===undefined&&(n[i]=t[i]);return n},extend:function(t,i){var f=t.prototype,e=function(){},r,u;return e.prototype=f,r=i.hasOwnProperty("constructor")?i.constructor:function(){f.constructor.apply(this,arguments)},u=r.prototype=new e,u.constructor=r,u.superclass=f,delete i.constructor,n.Util.assign(u,i),r},ellipsis:function(n,t,i){return n.length>t&&(i=i==null?"..":i,n=n.substring(0,t-i.length)+i),n},indexOf:function(n,t){if(Array.prototype.indexOf)return n.indexOf(t);for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1},remove:function(n,t){for(var i=n.length-1;i>=0;i--)t(n[i])===!0&&n.splice(i,1)},splitAndCapture:function(n,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var r=[],u=0,i;i=t.exec(n);)r.push(n.substring(u,i.index)),r.push(i[0]),u=i.index+i[0].length;return r.push(n.substring(u)),r},trim:function(n){return n.replace(this.trimRegex,"")}},n.HtmlTag=n.Util.extend(Object,{whitespaceRegex:/\s+/,constructor:function(t){n.Util.assign(this,t);this.innerHtml=this.innerHtml||this.innerHTML},setTagName:function(n){return this.tagName=n,this},getTagName:function(){return this.tagName||""},setAttr:function(n,t){var i=this.getAttrs();return i[n]=t,this},getAttr:function(n){return this.getAttrs()[n]},setAttrs:function(t){var i=this.getAttrs();return n.Util.assign(i,t),this},getAttrs:function(){return this.attrs||(this.attrs={})},setClass:function(n){return this.setAttr("class",n)},addClass:function(t){for(var u=this.getClass(),f=this.whitespaceRegex,e=n.Util.indexOf,i=u?u.split(f):[],o=t.split(f),r;r=o.shift();)e(i,r)===-1&&i.push(r);return this.getAttrs()["class"]=i.join(" "),this},removeClass:function(t){for(var u=this.getClass(),f=this.whitespaceRegex,o=n.Util.indexOf,i=u?u.split(f):[],s=t.split(f),e,r;i.length&&(e=s.shift());)r=o(i,e),r!==-1&&i.splice(r,1);return this.getAttrs()["class"]=i.join(" "),this},getClass:function(){return this.getAttrs()["class"]||""},hasClass:function(n){return(" "+this.getClass()+" ").indexOf(" "+n+" ")!==-1},setInnerHtml:function(n){return this.innerHtml=n,this},getInnerHtml:function(){return this.innerHtml||""},toAnchorString:function(){var t=this.getTagName(),n=this.buildAttrsStr();return n=n?" "+n:"",["<",t,n,">",this.getInnerHtml(),"<\/",t,">"].join("")},buildAttrsStr:function(){var n,i,t;if(!this.attrs)return"";n=this.getAttrs();i=[];for(t in n)n.hasOwnProperty(t)&&i.push(t+'="'+n[t]+'"');return i.join(" ")}}),n.RegexLib=function(){var n="A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꞭꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ﬀ-ﬆﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼＡ-Ｚａ-ｚｦ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ0-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯෦-෯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹０-９",t=new RegExp("["+n+".\\-]*["+n+"\\-]");return{alphaNumericCharsStr:n,domainNameRegex:t,tldRegex:/(?:travelersinsurance|sandvikcoromant|kerryproperties|cancerresearch|weatherchannel|kerrylogistics|spreadbetting|international|wolterskluwer|lifeinsurance|construction|pamperedchef|scholarships|versicherung|bridgestone|creditunion|kerryhotels|investments|productions|blackfriday|enterprises|lamborghini|photography|motorcycles|williamhill|playstation|contractors|barclaycard|accountants|redumbrella|engineering|management|telefonica|protection|consulting|tatamotors|creditcard|vlaanderen|schaeffler|associates|properties|foundation|republican|bnpparibas|boehringer|eurovision|extraspace|industries|immobilien|university|technology|volkswagen|healthcare|restaurant|cuisinella|vistaprint|apartments|accountant|travelers|homedepot|institute|vacations|furniture|fresenius|insurance|christmas|bloomberg|solutions|barcelona|firestone|financial|kuokgroup|fairwinds|community|passagens|goldpoint|equipment|lifestyle|yodobashi|aquarelle|marketing|analytics|education|amsterdam|statefarm|melbourne|allfinanz|directory|microsoft|stockholm|montblanc|accenture|lancaster|landrover|everbank|istanbul|graphics|grainger|ipiranga|softbank|attorney|pharmacy|saarland|catering|airforce|yokohama|mortgage|frontier|mutuelle|stcgroup|memorial|pictures|football|symantec|cipriani|ventures|telecity|cityeats|verisign|flsmidth|boutique|cleaning|firmdale|clinique|clothing|redstone|infiniti|deloitte|feedback|services|broadway|plumbing|commbank|training|barclays|exchange|computer|brussels|software|delivery|barefoot|builders|business|bargains|engineer|holdings|download|security|helsinki|lighting|movistar|discount|hdfcbank|supplies|marriott|property|diamonds|capetown|partners|democrat|jpmorgan|bradesco|budapest|rexroth|zuerich|shriram|academy|science|support|youtube|singles|surgery|alibaba|statoil|dentist|schwarz|android|cruises|cricket|digital|markets|starhub|systems|courses|coupons|netbank|country|domains|corsica|network|neustar|realtor|lincoln|limited|schmidt|yamaxun|cooking|contact|auction|spiegel|liaison|leclerc|latrobe|lasalle|abogado|compare|lanxess|exposed|express|company|cologne|college|avianca|lacaixa|fashion|recipes|ferrero|komatsu|storage|wanggou|clubmed|sandvik|fishing|fitness|bauhaus|kitchen|flights|florist|flowers|watches|weather|temasek|samsung|bentley|forsale|channel|theater|frogans|theatre|okinawa|website|tickets|jewelry|gallery|tiffany|iselect|shiksha|brother|organic|wedding|genting|toshiba|origins|philips|hyundai|hotmail|hoteles|hosting|rentals|windows|cartier|bugatti|holiday|careers|whoswho|hitachi|panerai|caravan|reviews|guitars|capital|trading|hamburg|hangout|finance|stream|family|abbott|health|review|travel|report|hermes|hiphop|gratis|career|toyota|hockey|dating|repair|google|social|soccer|reisen|global|otsuka|giving|unicom|casino|photos|center|broker|rocher|orange|bostik|garden|insure|ryukyu|bharti|safety|physio|sakura|oracle|online|jaguar|gallup|piaget|tienda|futbol|pictet|joburg|webcam|berlin|office|juegos|kaufen|chanel|chrome|xihuan|church|tennis|circle|kinder|flickr|bayern|claims|clinic|viajes|nowruz|xperia|norton|yachts|studio|coffee|camera|sanofi|nissan|author|expert|events|comsec|lawyer|tattoo|viking|estate|villas|condos|realty|yandex|energy|emerck|virgin|vision|durban|living|school|coupon|london|taobao|natura|taipei|nagoya|luxury|walter|aramco|sydney|madrid|credit|maison|makeup|schule|market|anquan|direct|design|swatch|suzuki|alsace|vuelos|dental|alipay|voyage|shouji|voting|airtel|mutual|degree|supply|agency|museum|mobily|dealer|monash|select|mormon|active|moscow|racing|datsun|quebec|nissay|rodeo|email|gifts|works|photo|chloe|edeka|cheap|earth|vista|tushu|koeln|glass|shoes|globo|tunes|gmail|nokia|space|kyoto|black|ricoh|seven|lamer|sener|epson|cisco|praxi|trust|citic|crown|shell|lease|green|legal|lexus|ninja|tatar|gripe|nikon|group|video|wales|autos|gucci|party|nexus|guide|linde|adult|parts|amica|lixil|boats|azure|loans|locus|cymru|lotte|lotto|stada|click|poker|quest|dabur|lupin|nadex|paris|faith|dance|canon|place|gives|trade|skype|rocks|mango|cloud|boots|smile|final|swiss|homes|honda|media|horse|cards|deals|watch|bosch|house|pizza|miami|osaka|tours|total|xerox|coach|sucks|style|delta|toray|iinet|tools|money|codes|beats|tokyo|salon|archi|movie|baidu|study|actor|yahoo|store|apple|world|forex|today|bible|tmall|tirol|irish|tires|forum|reise|vegas|vodka|sharp|omega|weber|jetzt|audio|promo|build|bingo|chase|gallo|drive|dubai|rehab|press|solar|sale|beer|bbva|bank|band|auto|sapo|sarl|saxo|audi|asia|arte|arpa|army|yoga|ally|zara|scor|scot|sexy|seat|zero|seek|aero|adac|zone|aarp|maif|meet|meme|menu|surf|mini|mobi|mtpc|porn|desi|star|ltda|name|talk|navy|love|loan|live|link|news|limo|like|spot|life|nico|lidl|lgbt|land|taxi|team|tech|kred|kpmg|sony|song|kiwi|kddi|jprs|jobs|sohu|java|itau|tips|info|immo|icbc|hsbc|town|host|page|toys|here|help|pars|haus|guru|guge|tube|goog|golf|gold|sncf|gmbh|gift|ggee|gent|gbiz|game|vana|pics|fund|ford|ping|pink|fish|film|fast|farm|play|fans|fail|plus|skin|pohl|fage|moda|post|erni|dvag|prod|doha|prof|docs|viva|diet|luxe|site|dell|sina|dclk|show|qpon|date|vote|cyou|voto|read|coop|cool|wang|club|city|chat|cern|cash|reit|rent|casa|cars|care|camp|rest|call|cafe|weir|wien|rich|wiki|buzz|wine|book|bond|room|work|rsvp|shia|ruhr|blue|bing|shaw|bike|safe|xbox|best|pwc|mtn|lds|aig|boo|fyi|nra|nrw|ntt|car|gal|obi|zip|aeg|vin|how|one|ong|onl|dad|ooo|bet|esq|org|htc|bar|uol|ibm|ovh|gdn|ice|icu|uno|gea|ifm|bot|top|wtf|lol|day|pet|eus|wtc|ubs|tvs|aco|ing|ltd|ink|tab|abb|afl|cat|int|pid|pin|bid|cba|gle|com|cbn|ads|man|wed|ceb|gmo|sky|ist|gmx|tui|mba|fan|ski|iwc|app|pro|med|ceo|jcb|jcp|goo|dev|men|aaa|meo|pub|jlc|bom|jll|gop|jmp|mil|got|gov|win|jot|mma|joy|trv|red|cfa|cfd|bio|moe|moi|mom|ren|biz|aws|xin|bbc|dnp|buy|kfh|mov|thd|xyz|fit|kia|rio|rip|kim|dog|vet|nyc|bcg|mtr|bcn|bms|bmw|run|bzh|rwe|tel|stc|axa|kpn|fly|krd|cab|bnl|foo|crs|eat|tci|sap|srl|nec|sas|net|cal|sbs|sfr|sca|scb|csc|edu|new|xxx|hiv|fox|wme|ngo|nhk|vip|sex|frl|lat|yun|law|you|tax|soy|sew|om|ac|hu|se|sc|sg|sh|sb|sa|rw|ru|rs|ro|re|qa|py|si|pw|pt|ps|sj|sk|pr|pn|pm|pl|sl|sm|pk|sn|ph|so|pg|pf|pe|pa|zw|nz|nu|nr|np|no|nl|ni|ng|nf|sr|ne|st|nc|na|mz|my|mx|mw|mv|mu|mt|ms|mr|mq|mp|mo|su|mn|mm|ml|mk|mh|mg|me|sv|md|mc|sx|sy|ma|ly|lv|sz|lu|lt|ls|lr|lk|li|lc|lb|la|tc|kz|td|ky|kw|kr|kp|kn|km|ki|kh|tf|tg|th|kg|ke|jp|jo|jm|je|it|is|ir|tj|tk|tl|tm|iq|tn|to|io|in|im|il|ie|ad|sd|ht|hr|hn|hm|tr|hk|gy|gw|gu|gt|gs|gr|gq|tt|gp|gn|gm|gl|tv|gi|tw|tz|ua|gh|ug|uk|gg|gf|ge|gd|us|uy|uz|va|gb|ga|vc|ve|fr|fo|fm|fk|fj|vg|vi|fi|eu|et|es|er|eg|ee|ec|dz|do|dm|dk|vn|dj|de|cz|cy|cx|cw|vu|cv|cu|cr|co|cn|cm|cl|ck|ci|ch|cg|cf|cd|cc|ca|wf|bz|by|bw|bv|bt|bs|br|bo|bn|bm|bj|bi|ws|bh|bg|bf|be|bd|bb|ba|az|ax|aw|au|at|as|ye|ar|aq|ao|am|al|yt|ai|za|ag|af|ae|zm|id)\b/}}(),n.AnchorTagBuilder=n.Util.extend(Object,{constructor:function(n){n=n||{};this.newWindow=n.newWindow;this.truncate=n.truncate;this.className=n.className},build:function(t){return new n.HtmlTag({tagName:"a",attrs:this.createAttrs(t),innerHtml:this.processAnchorText(t.getAnchorText())})},createAttrs:function(n){var t={href:n.getAnchorHref()},i=this.createCssClass(n);return i&&(t["class"]=i),this.newWindow&&(t.target="_blank",t.rel="noopener noreferrer"),t},createCssClass:function(n){var i=this.className,r,u,t,f;if(i){for(r=[i],u=n.getCssClassSuffixes(),t=0,f=u.length;t<f;t++)r.push(i+"-"+u[t]);return r.join(" ")}return""},processAnchorText:function(n){return this.doTruncate(n)},doTruncate:function(t){var i=this.truncate,r,u;return!i||!i.length?t:(r=i.length,u=i.location,u==="smart"?n.truncate.TruncateSmart(t,r,".."):u==="middle"?n.truncate.TruncateMiddle(t,r,".."):n.truncate.TruncateEnd(t,r,".."))}}),n.htmlParser.HtmlParser=n.Util.extend(Object,{htmlRegex:function(){var n=/(?:"[^"]*?"|'[^']*?'|[^'"=<>`\s]+)/,t=/[^\s"'>\/=\x00-\x1F\x7F]+/.source+"(?:\\s*=\\s*"+n.source+")?";return new RegExp(["(?:","<(!DOCTYPE)","(?:","\\s+","(?:",t,"|",n.source+")",")*",">",")","|","(?:","<(/)?","(?:",/!--([\s\S]+?)--/.source,"|","(?:","("+/[0-9a-zA-Z][0-9a-zA-Z:]*/.source+")","(?:","(?:\\s+|\\b)",t,")*","\\s*/?",")",")",">",")"].join(""),"gi")}(),htmlCharacterEntitiesRegex:/(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/gi,parse:function(n){for(var c=this.htmlRegex,t,r=0,u,i=[],o;(t=c.exec(n))!==null;){var e=t[0],s=t[3],l=t[1]||t[4],a=!!t[2],f=t.index,h=n.substring(r,f);h&&(u=this.parseTextAndEntityNodes(r,h),i.push.apply(i,u));s?i.push(this.createCommentNode(f,e,s)):i.push(this.createElementNode(f,e,l,a));r=f+e.length}return r<n.length&&(o=n.substring(r),o&&(u=this.parseTextAndEntityNodes(r,o),i.push.apply(i,u))),i},parseTextAndEntityNodes:function(t,i){for(var u,f,e=[],o=n.Util.splitAndCapture(i,this.htmlCharacterEntitiesRegex),r=0,s=o.length;r<s;r+=2)u=o[r],f=o[r+1],u&&(e.push(this.createTextNode(t,u)),t+=u.length),f&&(e.push(this.createEntityNode(t,f)),t+=f.length);return e},createCommentNode:function(t,i,r){return new n.htmlParser.CommentNode({offset:t,text:i,comment:n.Util.trim(r)})},createElementNode:function(t,i,r,u){return new n.htmlParser.ElementNode({offset:t,text:i,tagName:r.toLowerCase(),closing:u})},createEntityNode:function(t,i){return new n.htmlParser.EntityNode({offset:t,text:i})},createTextNode:function(t,i){return new n.htmlParser.TextNode({offset:t,text:i})}}),n.htmlParser.HtmlNode=n.Util.extend(Object,{offset:undefined,text:undefined,constructor:function(t){if(n.Util.assign(this,t),this.offset==null)throw new Error("`offset` cfg required");if(this.text==null)throw new Error("`text` cfg required");},getType:n.Util.abstractMethod,getOffset:function(){return this.offset},getText:function(){return this.text}}),n.htmlParser.CommentNode=n.Util.extend(n.htmlParser.HtmlNode,{comment:"",getType:function(){return"comment"},getComment:function(){return this.comment}}),n.htmlParser.ElementNode=n.Util.extend(n.htmlParser.HtmlNode,{tagName:"",closing:!1,getType:function(){return"element"},getTagName:function(){return this.tagName},isClosing:function(){return this.closing}}),n.htmlParser.EntityNode=n.Util.extend(n.htmlParser.HtmlNode,{getType:function(){return"entity"}}),n.htmlParser.TextNode=n.Util.extend(n.htmlParser.HtmlNode,{getType:function(){return"text"}}),n.match.Match=n.Util.extend(Object,{constructor:function(n){if(n.tagBuilder==null)throw new Error("`tagBuilder` cfg required");if(n.matchedText==null)throw new Error("`matchedText` cfg required");if(n.offset==null)throw new Error("`offset` cfg required");this.tagBuilder=n.tagBuilder;this.matchedText=n.matchedText;this.offset=n.offset},getType:n.Util.abstractMethod,getMatchedText:function(){return this.matchedText},setOffset:function(n){this.offset=n},getOffset:function(){return this.offset},getAnchorHref:n.Util.abstractMethod,getAnchorText:n.Util.abstractMethod,getCssClassSuffixes:function(){return[this.getType()]},buildTag:function(){return this.tagBuilder.build(this)}}),n.match.Email=n.Util.extend(n.match.Match,{constructor:function(t){if(n.match.Match.prototype.constructor.call(this,t),!t.email)throw new Error("`email` cfg required");this.email=t.email},getType:function(){return"email"},getEmail:function(){return this.email},getAnchorHref:function(){return"mailto:"+this.email},getAnchorText:function(){return this.email}}),n.match.Hashtag=n.Util.extend(n.match.Match,{constructor:function(t){if(n.match.Match.prototype.constructor.call(this,t),!t.hashtag)throw new Error("`hashtag` cfg required");this.serviceName=t.serviceName;this.hashtag=t.hashtag},getType:function(){return"hashtag"},getServiceName:function(){return this.serviceName},getHashtag:function(){return this.hashtag},getAnchorHref:function(){var t=this.serviceName,n=this.hashtag;switch(t){case"twitter":return"https://twitter.com/hashtag/"+n;case"facebook":return"https://www.facebook.com/hashtag/"+n;case"instagram":return"https://instagram.com/explore/tags/"+n;default:throw new Error("Unknown service name to point hashtag to: ",t);}},getAnchorText:function(){return"#"+this.hashtag}}),n.match.Phone=n.Util.extend(n.match.Match,{constructor:function(t){if(n.match.Match.prototype.constructor.call(this,t),!t.number)throw new Error("`number` cfg required");if(t.plusSign==null)throw new Error("`plusSign` cfg required");this.number=t.number;this.plusSign=t.plusSign},getType:function(){return"phone"},getNumber:function(){return this.number},getAnchorHref:function(){return"tel:"+(this.plusSign?"+":"")+this.number},getAnchorText:function(){return this.matchedText}}),n.match.Mention=n.Util.extend(n.match.Match,{constructor:function(t){if(n.match.Match.prototype.constructor.call(this,t),!t.serviceName)throw new Error("`serviceName` cfg required");if(!t.mention)throw new Error("`mention` cfg required");this.mention=t.mention;this.serviceName=t.serviceName},getType:function(){return"mention"},getMention:function(){return this.mention},getServiceName:function(){return this.serviceName},getAnchorHref:function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;default:throw new Error("Unknown service name to point mention to: ",this.serviceName);}},getAnchorText:function(){return"@"+this.mention},getCssClassSuffixes:function(){var t=n.match.Match.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&t.push(i),t}}),n.match.Url=n.Util.extend(n.match.Match,{constructor:function(t){if(n.match.Match.prototype.constructor.call(this,t),t.urlMatchType!=="scheme"&&t.urlMatchType!=="www"&&t.urlMatchType!=="tld")throw new Error('`urlMatchType` cfg must be one of: "scheme", "www", or "tld"');if(!t.url)throw new Error("`url` cfg required");if(t.protocolUrlMatch==null)throw new Error("`protocolUrlMatch` cfg required");if(t.protocolRelativeMatch==null)throw new Error("`protocolRelativeMatch` cfg required");if(t.stripPrefix==null)throw new Error("`stripPrefix` cfg required");if(t.stripTrailingSlash==null)throw new Error("`stripTrailingSlash` cfg required");this.urlMatchType=t.urlMatchType;this.url=t.url;this.protocolUrlMatch=t.protocolUrlMatch;this.protocolRelativeMatch=t.protocolRelativeMatch;this.stripPrefix=t.stripPrefix;this.stripTrailingSlash=t.stripTrailingSlash},schemePrefixRegex:/^(https?:\/\/)?/i,wwwPrefixRegex:/^(https?:\/\/)?(www\.)?/i,protocolRelativeRegex:/^\/\//,protocolPrepended:!1,getType:function(){return"url"},getUrlMatchType:function(){return this.urlMatchType},getUrl:function(){var n=this.url;return this.protocolRelativeMatch||this.protocolUrlMatch||this.protocolPrepended||(n=this.url="http://"+n,this.protocolPrepended=!0),n},getAnchorHref:function(){var n=this.getUrl();return n.replace(/&amp;/g,"&")},getAnchorText:function(){var n=this.getMatchedText();return this.protocolRelativeMatch&&(n=this.stripProtocolRelativePrefix(n)),this.stripPrefix.scheme&&(n=this.stripSchemePrefix(n)),this.stripPrefix.www&&(n=this.stripWwwPrefix(n)),this.stripTrailingSlash&&(n=this.removeTrailingSlash(n)),n},stripSchemePrefix:function(n){return n.replace(this.schemePrefixRegex,"")},stripWwwPrefix:function(n){return n.replace(this.wwwPrefixRegex,"$1")},stripProtocolRelativePrefix:function(n){return n.replace(this.protocolRelativeRegex,"")},removeTrailingSlash:function(n){return n.charAt(n.length-1)==="/"&&(n=n.slice(0,-1)),n}}),n.matcher.Matcher=n.Util.extend(Object,{constructor:function(n){if(!n.tagBuilder)throw new Error("`tagBuilder` cfg required");this.tagBuilder=n.tagBuilder},parseMatches:n.Util.abstractMethod}),n.matcher.Email=n.Util.extend(n.matcher.Matcher,{matcherRegex:function(){var t=n.RegexLib.alphaNumericCharsStr,i=new RegExp("["+t+"\\-_';:&=+$.,]+@"),r=n.RegexLib.domainNameRegex,u=n.RegexLib.tldRegex;return new RegExp([i.source,r.source,"\\.",u.source].join(""),"gi")}(),parseMatches:function(t){for(var f=this.matcherRegex,e=this.tagBuilder,u=[],i,r;(i=f.exec(t))!==null;)r=i[0],u.push(new n.match.Email({tagBuilder:e,matchedText:r,offset:i.index,email:r}));return u}}),n.matcher.Hashtag=n.Util.extend(n.matcher.Matcher,{matcherRegex:new RegExp("#[_"+n.RegexLib.alphaNumericCharsStr+"]{1,139}","g"),nonWordCharRegex:new RegExp("[^"+n.RegexLib.alphaNumericCharsStr+"]"),constructor:function(t){n.matcher.Matcher.prototype.constructor.call(this,t);this.serviceName=t.serviceName},parseMatches:function(t){for(var s=this.matcherRegex,h=this.nonWordCharRegex,c=this.serviceName,l=this.tagBuilder,u=[],i,r,f,e,o;(i=s.exec(t))!==null;)r=i.index,f=t.charAt(r-1),(r===0||h.test(f))&&(e=i[0],o=i[0].slice(1),u.push(new n.match.Hashtag({tagBuilder:l,matchedText:e,offset:r,serviceName:c,hashtag:o})));return u}}),n.matcher.Phone=n.Util.extend(n.matcher.Matcher,{matcherRegex:/(?:(\+)?\d{1,3}[-\040.])?\(?\d{3}\)?[-\040.]?\d{3}[-\040.]\d{4}/g,parseMatches:function(t){for(var f=this.matcherRegex,e=this.tagBuilder,r=[],i;(i=f.exec(t))!==null;){var u=i[0],o=u.replace(/\D/g,""),s=!!i[1];r.push(new n.match.Phone({tagBuilder:e,matchedText:u,offset:i.index,number:o,plusSign:s}))}return r}}),n.matcher.Mention=n.Util.extend(n.matcher.Matcher,{matcherRegexes:{twitter:new RegExp("@[_"+n.RegexLib.alphaNumericCharsStr+"]{1,20}","g"),instagram:new RegExp("@[_."+n.RegexLib.alphaNumericCharsStr+"]{1,50}","g")},nonWordCharRegex:new RegExp("[^"+n.RegexLib.alphaNumericCharsStr+"]"),constructor:function(t){n.matcher.Matcher.prototype.constructor.call(this,t);this.serviceName=t.serviceName},parseMatches:function(t){var e=this.matcherRegexes[this.serviceName],h=this.nonWordCharRegex,c=this.serviceName,l=this.tagBuilder,r=[],u,i,o,f,s;if(!e)return r;while((u=e.exec(t))!==null)i=u.index,o=t.charAt(i-1),(i===0||h.test(o))&&(f=u[0].replace(/\.+$/g,""),s=f.slice(1),r.push(new n.match.Mention({tagBuilder:l,matchedText:f,offset:i,serviceName:c,mention:s})));return r}}),n.matcher.Url=n.Util.extend(n.matcher.Matcher,{matcherRegex:function(){var t=n.RegexLib.domainNameRegex,r=n.RegexLib.tldRegex,i=n.RegexLib.alphaNumericCharsStr,u=new RegExp("["+i+"\\-+&@#/%=~_()|'$*\\[\\]?!:,.;✓]*["+i+"\\-+&@#/%=~_()|'$*\\[\\]✓]");return new RegExp(["(?:","(",/(?:[A-Za-z][-.+A-Za-z0-9]*:(?![A-Za-z][-.+A-Za-z0-9]*:\/\/)(?!\d+\/?)(?:\/\/)?)/.source,t.source,")","|","(","(//)?",/(?:www\.)/.source,t.source,")","|","(","(//)?",t.source+"\\.",r.source,")",")","(?:"+u.source+")?"].join(""),"gi")}(),wordCharRegExp:/\w/,openParensRe:/\(/g,closeParensRe:/\)/g,constructor:function(t){if(n.matcher.Matcher.prototype.constructor.call(this,t),t.stripPrefix==null)throw new Error("`stripPrefix` cfg required");if(t.stripTrailingSlash==null)throw new Error("`stripTrailingSlash` cfg required");this.stripPrefix=t.stripPrefix;this.stripTrailingSlash=t.stripTrailingSlash},parseMatches:function(t){for(var a=this.matcherRegex,v=this.stripPrefix,y=this.stripTrailingSlash,p=this.tagBuilder,o=[],r,e,c,l;(r=a.exec(t))!==null;){var i=r[0],u=r[1],w=r[2],b=r[3],k=r[5],f=r.index,s=b||k,h=t.charAt(f-1);n.matcher.UrlMatchValidator.isValid(i,u)&&(f>0&&h==="@"||f>0&&s&&this.wordCharRegExp.test(h)||(this.matchHasUnbalancedClosingParen(i)?i=i.substr(0,i.length-1):(e=this.matchHasInvalidCharAfterTld(i,u),e>-1&&(i=i.substr(0,e))),c=u?"scheme":w?"www":"tld",l=!!u,o.push(new n.match.Url({tagBuilder:p,matchedText:i,offset:f,urlMatchType:c,url:i,protocolUrlMatch:l,protocolRelativeMatch:!!s,stripPrefix:v,stripTrailingSlash:y}))))}return o},matchHasUnbalancedClosingParen:function(n){var r=n.charAt(n.length-1);if(r===")"){var t=n.match(this.openParensRe),i=n.match(this.closeParensRe),u=t&&t.length||0,f=i&&i.length||0;if(u<f)return!0}return!1},matchHasInvalidCharAfterTld:function(n,t){var i,u,r;return n?(i=0,t&&(i=n.indexOf(":"),n=n.slice(i)),u=/^((.?\/\/)?[A-Za-z0-9\u00C0-\u017F\.\-]*[A-Za-z0-9\u00C0-\u017F\-]\.[A-Za-z]+)/,r=u.exec(n),r===null)?-1:(i+=r[1].length,n=n.slice(r[1].length),/^[^.A-Za-z:\/?#]/.test(n))?i:-1:-1}}),n.matcher.UrlMatchValidator={hasFullProtocolRegex:/^[A-Za-z][-.+A-Za-z0-9]*:\/\//,uriSchemeRegex:/^[A-Za-z][-.+A-Za-z0-9]*:/,hasWordCharAfterProtocolRegex:/:[^\s]*?[A-Za-z\u00C0-\u017F]/,ipRegex:/[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/,isValid:function(n,t){return t&&!this.isValidUriScheme(t)||this.urlMatchDoesNotHaveProtocolOrDot(n,t)||this.urlMatchDoesNotHaveAtLeastOneWordChar(n,t)&&!this.isValidIpAddress(n)?!1:!0},isValidIpAddress:function(n){var t=new RegExp(this.hasFullProtocolRegex.source+this.ipRegex.source),i=n.match(t);return i!==null},isValidUriScheme:function(n){var t=n.match(this.uriSchemeRegex)[0].toLowerCase();return t!=="javascript:"&&t!=="vbscript:"},urlMatchDoesNotHaveProtocolOrDot:function(n,t){return!!n&&(!t||!this.hasFullProtocolRegex.test(t))&&n.indexOf(".")===-1},urlMatchDoesNotHaveAtLeastOneWordChar:function(n,t){return n&&t?!this.hasWordCharAfterProtocolRegex.test(n):!1}},n.truncate.TruncateEnd=function(t,i,r){return n.Util.ellipsis(t,i,r)},n.truncate.TruncateMiddle=function(n,t,i){if(n.length<=t)return n;var r=t-i.length,u="";return r>0&&(u=n.substr(-1*Math.floor(r/2))),(n.substr(0,Math.ceil(r/2))+i+u).substr(0,t)},n.truncate.TruncateSmart=function(n,t,i){var p=function(n){var r={},i=n,t=i.match(/^([a-z]+):\/\//i);return t&&(r.scheme=t[1],i=i.substr(t[0].length)),t=i.match(/^(.*?)(?=(\?|#|\/|$))/i),t&&(r.host=t[1],i=i.substr(t[0].length)),t=i.match(/^\/(.*?)(?=(\?|#|$))/i),t&&(r.path=t[1],i=i.substr(t[0].length)),t=i.match(/^\?(.*?)(?=(#|$))/i),t&&(r.query=t[1],i=i.substr(t[0].length)),t=i.match(/^#(.*?)$/i),t&&(r.fragment=t[1]),r},a=function(n){var t="";return n.scheme&&n.host&&(t+=n.scheme+"://"),n.host&&(t+=n.host),n.path&&(t+="/"+n.path),n.query&&(t+="?"+n.query),n.fragment&&(t+="#"+n.fragment),t},s=function(n,t){var r=t/2,e=Math.ceil(r),u=-1*Math.floor(r),f="";return u<0&&(f=n.substr(u)),n.substr(0,e)+i+f},f,r,h,u,e,v,o,y,c,l;if(n.length<=t||(f=t-i.length,r=p(n),r.query&&(h=r.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i),h&&(r.query=r.query.substr(0,h[1].length),n=a(r))),n.length<=t)||(r.host&&(r.host=r.host.replace(/^www\./,""),n=a(r)),n.length<=t))return n;if(u="",r.host&&(u+=r.host),u.length>=f)return r.host.length==t?(r.host.substr(0,t-i.length)+i).substr(0,t):s(u,f).substr(0,t);if(e="",r.path&&(e+="/"+r.path),r.query&&(e+="?"+r.query),e){if((u+e).length>=f)return(u+e).length==t?(u+e).substr(0,t):(v=f-u.length,(u+s(e,v)).substr(0,t));u+=e}if(r.fragment){if(o="#"+r.fragment,(u+o).length>=f)return(u+o).length==t?(u+o).substr(0,t):(y=f-u.length,(u+s(o,y)).substr(0,t));u+=o}return r.scheme&&r.host&&(c=r.scheme+"://",(u+c).length<f)?(c+u).substr(0,t):u.length<=t?u:(l="",f>0&&(l=u.substr(-1*Math.floor(f/2))),(u.substr(0,Math.ceil(f/2))+i+l).substr(0,t))},n}),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):n(jQuery)}(function(n){function i(n){return t.raw?n:encodeURIComponent(n)}function u(n){return t.raw?n:decodeURIComponent(n)}function f(n){return i(t.json?JSON.stringify(n):String(n))}function e(n){n.indexOf('"')===0&&(n=n.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{n=decodeURIComponent(n.replace(o," "))}catch(i){return}try{return t.json?JSON.parse(n):n}catch(i){}}function r(i,r){var u=t.raw?i:e(i);return n.isFunction(r)?r(u):u}var o=/\+/g,t=n.cookie=function(e,o,s){var y,a,h,v,c,p;if(o!==undefined&&!n.isFunction(o))return s=n.extend({},t.defaults,s),typeof s.expires=="number"&&(y=s.expires,a=s.expires=new Date,a.setDate(a.getDate()+y)),document.cookie=[i(e),"=",f(o),s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("");for(h=e?undefined:{},v=document.cookie?document.cookie.split("; "):[],c=0,p=v.length;c<p;c++){var w=v[c].split("="),b=u(w.shift()),l=w.join("=");if(e&&e===b){h=r(l,o);break}e||(l=r(l))===undefined||(h[b]=l)}return h};t.defaults={};n.removeCookie=function(t,i){return n.cookie(t)!==undefined?(n.cookie(t,"",n.extend({},i,{expires:-1})),!0):!1}});typeof JSON!="object"&&(JSON={}),function(){"use strict";function i(n){return n<10?"0"+n:n}function f(n){return o.lastIndex=0,o.test(n)?'"'+n.replace(o,function(n){var t=s[n];return typeof t=="string"?t:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function r(i,e){var s,l,h,a,v=n,c,o=e[i];o&&typeof o=="object"&&typeof o.toJSON=="function"&&(o=o.toJSON(i));typeof t=="function"&&(o=t.call(e,i,o));switch(typeof o){case"string":return f(o);case"number":return isFinite(o)?String(o):"null";case"boolean":case"null":return String(o);case"object":if(!o)return"null";if(n+=u,c=[],Object.prototype.toString.apply(o)==="[object Array]"){for(a=o.length,s=0;s<a;s+=1)c[s]=r(s,o)||"null";return h=c.length===0?"[]":n?"[\n"+n+c.join(",\n"+n)+"\n"+v+"]":"["+c.join(",")+"]",n=v,h}if(t&&typeof t=="object")for(a=t.length,s=0;s<a;s+=1)typeof t[s]=="string"&&(l=t[s],h=r(l,o),h&&c.push(f(l)+(n?": ":":")+h));else for(l in o)Object.prototype.hasOwnProperty.call(o,l)&&(h=r(l,o),h&&c.push(f(l)+(n?": ":":")+h));return h=c.length===0?"{}":n?"{\n"+n+c.join(",\n"+n)+"\n"+v+"}":"{"+c.join(",")+"}",n=v,h}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+i(this.getUTCMonth()+1)+"-"+i(this.getUTCDate())+"T"+i(this.getUTCHours())+":"+i(this.getUTCMinutes())+":"+i(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,u,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},t;typeof JSON.stringify!="function"&&(JSON.stringify=function(i,f,e){var o;if(n="",u="",typeof e=="number")for(o=0;o<e;o+=1)u+=" ";else typeof e=="string"&&(u=e);if(t=f,f&&typeof f!="function"&&(typeof f!="object"||typeof f.length!="number"))throw new Error("JSON.stringify");return r("",{"":i})});typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(n,t){var r,u,i=n[t];if(i&&typeof i=="object")for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(u=walk(i,r),u!==undefined?i[r]=u:delete i[r]);return reviver.call(n,t,i)}var j;if(text=String(text),e.lastIndex=0,e.test(text)&&(text=text.replace(e,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse");})}(),function(n,t){"use strict";var i=n.History=n.History||{},r=n.jQuery;if(typeof i.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");i.Adapter={bind:function(n,t,i){r(n).bind(t,i)},trigger:function(n,t,i){r(n).trigger(t,i)},extractEventData:function(n,i,r){return i&&i.originalEvent&&i.originalEvent[n]||r&&r[n]||t},onDomLoad:function(n){r(n)}};typeof i.init!="undefined"&&i.init()}(window),function(n){"use strict";var i=n.document,u=n.setTimeout||u,f=n.clearTimeout||f,r=n.setInterval||r,t=n.History=n.History||{};if(typeof t.initHtml4!="undefined")throw new Error("History.js HTML4 Support has already been loaded...");t.initHtml4=function(){if(typeof t.initHtml4.initialized!="undefined")return!1;if(t.initHtml4.initialized=!0,t.enabled=!0,t.savedHashes=[],t.isLastHash=function(n){var i=t.getHashByIndex();return n===i},t.isHashEqual=function(n,t){return n=encodeURIComponent(n).replace(/%25/g,"%"),t=encodeURIComponent(t).replace(/%25/g,"%"),n===t},t.saveHash=function(n){return t.isLastHash(n)?!1:(t.savedHashes.push(n),!0)},t.getHashByIndex=function(n){return typeof n=="undefined"?t.savedHashes[t.savedHashes.length-1]:n<0?t.savedHashes[t.savedHashes.length+n]:t.savedHashes[n]},t.discardedHashes={},t.discardedStates={},t.discardState=function(n,i,r){var f=t.getHashByState(n),u;return u={discardedState:n,backState:r,forwardState:i},t.discardedStates[f]=u,!0},t.discardHash=function(n,i,r){var u={discardedHash:n,backState:r,forwardState:i};return t.discardedHashes[n]=u,!0},t.discardedState=function(n){var i=t.getHashByState(n);return t.discardedStates[i]||!1},t.discardedHash=function(n){return t.discardedHashes[n]||!1},t.recycleState=function(n){var i=t.getHashByState(n);return t.discardedState(n)&&delete t.discardedStates[i],!0},t.emulated.hashChange){t.hashChangeInit=function(){t.checkerFunction=null;var f="",s,u,e,o,h=Boolean(t.getHash());return t.isInternetExplorer()?(s="historyjs-iframe",u=i.createElement("iframe"),u.setAttribute("id",s),u.setAttribute("src","#"),u.style.display="none",i.body.appendChild(u),u.contentWindow.document.open(),u.contentWindow.document.close(),e="",o=!1,t.checkerFunction=function(){if(o)return!1;o=!0;var r=t.getHash(),i=t.getHash(u.contentWindow.document);return r!==f?(f=r,i!==r&&(e=i=r,u.contentWindow.document.open(),u.contentWindow.document.close(),u.contentWindow.document.location.hash=t.escapeHash(r)),t.Adapter.trigger(n,"hashchange")):i!==e&&(e=i,h&&i===""?t.back():t.setHash(i,!1)),o=!1,!0}):t.checkerFunction=function(){var i=t.getHash()||"";return i!==f&&(f=i,t.Adapter.trigger(n,"hashchange")),!0},t.intervalList.push(r(t.checkerFunction,t.options.hashChangeInterval)),!0};t.Adapter.onDomLoad(t.hashChangeInit)}if(t.emulated.pushState&&(t.onHashChange=function(i){var e=i&&i.newURL||t.getLocationHref(),u=t.getHashByUrl(e),r=null,o=null,f;return t.isLastHash(u)?(t.busy(!1),!1):(t.doubleCheckComplete(),t.saveHash(u),u&&t.isTraditionalAnchor(u))?(t.Adapter.trigger(n,"anchorchange"),t.busy(!1),!1):(r=t.extractState(t.getFullUrl(u||t.getLocationHref()),!0),t.isLastSavedState(r))?(t.busy(!1),!1):(o=t.getHashByState(r),f=t.discardedState(r),f)?(t.getHashByIndex(-2)===t.getHashByState(f.forwardState)?t.back(!1):t.forward(!1),!1):(t.pushState(r.data,r.title,encodeURI(r.url),!1),!0)},t.Adapter.bind(n,"hashchange",t.onHashChange),t.pushState=function(i,r,u,f){if(u=encodeURI(u).replace(/%25/g,"%"),t.getHashByUrl(u))throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).");if(f!==!1&&t.busy())return t.pushQueue({scope:t,callback:t.pushState,args:arguments,queue:f}),!1;t.busy(!0);var e=t.createStateObject(i,r,u),o=t.getHashByState(e),s=t.getState(!1),h=t.getHashByState(s),c=t.getHash(),l=t.expectedStateId==e.id;return(t.storeState(e),t.expectedStateId=e.id,t.recycleState(e),t.setTitle(e),o===h)?(t.busy(!1),!1):(t.saveState(e),l||t.Adapter.trigger(n,"statechange"),t.isHashEqual(o,c)||t.isHashEqual(o,t.getShortUrl(t.getLocationHref()))||t.setHash(o,!1),t.busy(!1),!0)},t.replaceState=function(i,r,u,f){if(u=encodeURI(u).replace(/%25/g,"%"),t.getHashByUrl(u))throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).");if(f!==!1&&t.busy())return t.pushQueue({scope:t,callback:t.replaceState,args:arguments,queue:f}),!1;t.busy(!0);var e=t.createStateObject(i,r,u),s=t.getHashByState(e),o=t.getState(!1),h=t.getHashByState(o),c=t.getStateByIndex(-2);return t.discardState(o,e,c),s===h?(t.storeState(e),t.expectedStateId=e.id,t.recycleState(e),t.setTitle(e),t.saveState(e),t.Adapter.trigger(n,"statechange"),t.busy(!1)):t.pushState(e.data,e.title,e.url,!1),!0}),t.emulated.pushState&&t.getHash()&&!t.emulated.hashChange)t.Adapter.onDomLoad(function(){t.Adapter.trigger(n,"hashchange")})};typeof t.init!="undefined"&&t.init()}(window),function(n,t){"use strict";var e=n.console||t,r=n.document,o=n.navigator,f=!1,h=n.setTimeout,c=n.clearTimeout,l=n.setInterval,a=n.clearInterval,u=n.JSON,v=n.alert,i=n.History=n.History||{},s=n.history;try{f=n.sessionStorage;f.setItem("TEST","1");f.removeItem("TEST")}catch(y){f=!1}if(u.stringify=u.stringify||u.encode,u.parse=u.parse||u.decode,typeof i.init!="undefined")throw new Error("History.js Core has already been loaded...");i.init=function(){return typeof i.Adapter=="undefined"?!1:(typeof i.initCore!="undefined"&&i.initCore(),typeof i.initHtml4!="undefined"&&i.initHtml4(),!0)};i.initCore=function(){if(typeof i.initCore.initialized!="undefined")return!1;if(i.initCore.initialized=!0,i.options=i.options||{},i.options.hashChangeInterval=i.options.hashChangeInterval||100,i.options.safariPollInterval=i.options.safariPollInterval||500,i.options.doubleCheckInterval=i.options.doubleCheckInterval||500,i.options.disableSuid=i.options.disableSuid||!1,i.options.storeInterval=i.options.storeInterval||1e3,i.options.busyDelay=i.options.busyDelay||250,i.options.debug=i.options.debug||!1,i.options.initialTitle=i.options.initialTitle||r.title,i.options.html4Mode=i.options.html4Mode||!1,i.options.delayInit=i.options.delayInit||!1,i.intervalList=[],i.clearAllIntervals=function(){var n,t=i.intervalList;if(typeof t!="undefined"&&t!==null){for(n=0;n<t.length;n++)a(t[n]);i.intervalList=null}},i.debug=function(){(i.options.debug||!1)&&i.log.apply(i,arguments)},i.log=function(){var s=!(typeof e=="undefined"||typeof e.log=="undefined"||typeof e.log.apply=="undefined"),t=r.getElementById("log"),n,f,h,o,i;for(s?(o=Array.prototype.slice.call(arguments),n=o.shift(),typeof e.debug!="undefined"?e.debug.apply(e,[n,o]):e.log.apply(e,[n,o])):n="\n"+arguments[0]+"\n",f=1,h=arguments.length;f<h;++f){if(i=arguments[f],typeof i=="object"&&typeof u!="undefined")try{i=u.stringify(i)}catch(c){}n+="\n"+i+"\n"}return t?(t.value+=n+"\n-----\n",t.scrollTop=t.scrollHeight-t.clientHeight):s||v(n),!0},i.getInternetExplorerMajorVersion=function(){return i.getInternetExplorerMajorVersion.cached=typeof i.getInternetExplorerMajorVersion.cached!="undefined"?i.getInternetExplorerMajorVersion.cached:function(){for(var n=3,t=r.createElement("div"),i=t.getElementsByTagName("i");(t.innerHTML="<!--[if gt IE "+ ++n+"]><i><\/i><![endif]-->")&&i[0];);return n>4?n:!1}()},i.isInternetExplorer=function(){return i.isInternetExplorer.cached=typeof i.isInternetExplorer.cached!="undefined"?i.isInternetExplorer.cached:Boolean(i.getInternetExplorerMajorVersion())},i.emulated=i.options.html4Mode?{pushState:!0,hashChange:!0}:{pushState:!Boolean(n.history&&n.history.pushState&&n.history.replaceState&&!(/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(o.userAgent)||/AppleWebKit\/5([0-2]|3[0-2])/i.test(o.userAgent))),hashChange:Boolean(!("onhashchange"in n||"onhashchange"in r)||i.isInternetExplorer()&&i.getInternetExplorerMajorVersion()<8)},i.enabled=!i.emulated.pushState,i.bugs={setHash:Boolean(!i.emulated.pushState&&o.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(o.userAgent)),safariPoll:Boolean(!i.emulated.pushState&&o.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(o.userAgent)),ieDoubleCheck:Boolean(i.isInternetExplorer()&&i.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(i.isInternetExplorer()&&i.getInternetExplorerMajorVersion()<7)},i.isEmptyObject=function(n){for(var t in n)if(n.hasOwnProperty(t))return!1;return!0},i.cloneObject=function(n){var i,t;return n?(i=u.stringify(n),t=u.parse(i)):t={},t},i.getRootUrl=function(){var n=r.location.protocol+"//"+(r.location.hostname||r.location.host);return(r.location.port||!1)&&(n+=":"+r.location.port),n+"/"},i.getBaseHref=function(){var t=r.getElementsByTagName("base"),i=null,n="";return t.length===1&&(i=t[0],n=i.href.replace(/[^\/]+$/,"")),n=n.replace(/\/+$/,""),n&&(n+="/"),n},i.getBaseUrl=function(){return i.getBaseHref()||i.getBasePageUrl()||i.getRootUrl()},i.getPageUrl=function(){var n=i.getState(!1,!1),t=(n||{}).url||i.getLocationHref();return t.replace(/\/+$/,"").replace(/[^\/]+$/,function(n){return/\./.test(n)?n:n+"/"})},i.getBasePageUrl=function(){return i.getLocationHref().replace(/[#\?].*/,"").replace(/[^\/]+$/,function(n){return/[^\/]$/.test(n)?"":n}).replace(/\/+$/,"")+"/"},i.getFullUrl=function(n,t){var u=n,r=n.substring(0,1);return t=typeof t=="undefined"?!0:t,/[a-z]+\:\/\//.test(n)||(u=r==="/"?i.getRootUrl()+n.replace(/^\/+/,""):r==="#"?i.getPageUrl().replace(/#.*/,"")+n:r==="?"?i.getPageUrl().replace(/[\?#].*/,"")+n:t?i.getBaseUrl()+n.replace(/^(\.\/)+/,""):i.getBasePageUrl()+n.replace(/^(\.\/)+/,"")),u.replace(/\#$/,"")},i.getShortUrl=function(n){var t=n,r=i.getBaseUrl(),u=i.getRootUrl();return i.emulated.pushState&&(t=t.replace(r,"")),t=t.replace(u,"/"),i.isTraditionalAnchor(t)&&(t="./"+t),t.replace(/^(\.\/)+/g,"./").replace(/\#$/,"")},i.getLocationHref=function(n){return(n=n||r,n.URL===n.location.href)?n.location.href:n.location.href===decodeURIComponent(n.URL)?n.URL:n.location.hash&&decodeURIComponent(n.location.href.replace(/^[^#]+/,""))===n.location.hash?n.location.href:n.URL.indexOf("#")==-1&&n.location.href.indexOf("#")!=-1?n.location.href:n.URL||n.location.href},i.store={},i.idToState=i.idToState||{},i.stateToId=i.stateToId||{},i.urlToId=i.urlToId||{},i.storedStates=i.storedStates||[],i.savedStates=i.savedStates||[],i.normalizeStore=function(){i.store.idToState=i.store.idToState||{};i.store.urlToId=i.store.urlToId||{};i.store.stateToId=i.store.stateToId||{}},i.getState=function(n,t){typeof n=="undefined"&&(n=!0);typeof t=="undefined"&&(t=!0);var r=i.getLastSavedState();return!r&&t&&(r=i.createStateObject()),n&&(r=i.cloneObject(r),r.url=r.cleanUrl||r.url),r},i.getIdByState=function(n){var t=i.extractId(n.url),r;if(!t)if(r=i.getStateString(n),typeof i.stateToId[r]!="undefined")t=i.stateToId[r];else if(typeof i.store.stateToId[r]!="undefined")t=i.store.stateToId[r];else{for(;;)if(t=(new Date).getTime()+String(Math.random()).replace(/\D/g,""),typeof i.idToState[t]=="undefined"&&typeof i.store.idToState[t]=="undefined")break;i.stateToId[r]=t;i.idToState[t]=n}return t},i.normalizeState=function(n){var t,r;return(n&&typeof n=="object"||(n={}),typeof n.normalized!="undefined")?n:(n.data&&typeof n.data=="object"||(n.data={}),t={},t.normalized=!0,t.title=n.title||"",t.url=i.getFullUrl(n.url?n.url:i.getLocationHref()),t.hash=i.getShortUrl(t.url),t.data=i.cloneObject(n.data),t.id=i.getIdByState(t),t.cleanUrl=t.url.replace(/\??\&_suid.*/,""),t.url=t.cleanUrl,r=!i.isEmptyObject(t.data),(t.title||r)&&i.options.disableSuid!==!0&&(t.hash=i.getShortUrl(t.url).replace(/\??\&_suid.*/,""),/\?/.test(t.hash)||(t.hash+="?"),t.hash+="&_suid="+t.id),t.hashedUrl=i.getFullUrl(t.hash),(i.emulated.pushState||i.bugs.safariPoll)&&i.hasUrlDuplicate(t)&&(t.url=t.hashedUrl),t)},i.createStateObject=function(n,t,r){var u={data:n,title:t,url:r};return i.normalizeState(u)},i.getStateById=function(n){return n=String(n),i.idToState[n]||i.store.idToState[n]||t},i.getStateString=function(n){var t,r;return t=i.normalizeState(n),r={data:t.data,title:n.title,url:n.url},u.stringify(r)},i.getStateId=function(n){var t;return t=i.normalizeState(n),t.id},i.getHashByState=function(n){var t;return t=i.normalizeState(n),t.hash},i.extractId=function(n){var i,t,u,r;return r=n.indexOf("#")!=-1?n.split("#")[0]:n,t=/(.*)\&_suid=([0-9]+)$/.exec(r),u=t?t[1]||n:n,i=t?String(t[2]||""):"",i||!1},i.isTraditionalAnchor=function(n){return!/[\/\?\.]/.test(n)},i.extractState=function(n,t){var r=null,u,f;return t=t||!1,u=i.extractId(n),u&&(r=i.getStateById(u)),r||(f=i.getFullUrl(n),u=i.getIdByUrl(f)||!1,u&&(r=i.getStateById(u)),r||!t||i.isTraditionalAnchor(n)||(r=i.createStateObject(null,null,f))),r},i.getIdByUrl=function(n){return i.urlToId[n]||i.store.urlToId[n]||t},i.getLastSavedState=function(){return i.savedStates[i.savedStates.length-1]||t},i.getLastStoredState=function(){return i.storedStates[i.storedStates.length-1]||t},i.hasUrlDuplicate=function(n){var t;return t=i.extractState(n.url),t&&t.id!==n.id},i.storeState=function(n){return i.urlToId[n.url]=n.id,i.storedStates.push(i.cloneObject(n)),n},i.isLastSavedState=function(n){var t=!1,r,u,f;return i.savedStates.length&&(r=n.id,u=i.getLastSavedState(),f=u.id,t=r===f),t},i.saveState=function(n){return i.isLastSavedState(n)?!1:(i.savedStates.push(i.cloneObject(n)),!0)},i.getStateByIndex=function(n){return typeof n=="undefined"?i.savedStates[i.savedStates.length-1]:n<0?i.savedStates[i.savedStates.length+n]:i.savedStates[n]},i.getCurrentIndex=function(){return i.savedStates.length<1?0:i.savedStates.length-1},i.getHash=function(n){var t=i.getLocationHref(n);return i.getHashByUrl(t)},i.unescapeHash=function(n){var t=i.normalizeHash(n);return decodeURIComponent(t)},i.normalizeHash=function(n){return n.replace(/[^#]*#/,"").replace(/#.*/,"")},i.setHash=function(n,t){var u,f;return t!==!1&&i.busy()?(i.pushQueue({scope:i,callback:i.setHash,args:arguments,queue:t}),!1):(i.busy(!0),u=i.extractState(n,!0),u&&!i.emulated.pushState?i.pushState(u.data,u.title,u.url,!1):i.getHash()!==n&&(i.bugs.setHash?(f=i.getPageUrl(),i.pushState(null,null,f+"#"+n,!1)):r.location.hash=n),i)},i.escapeHash=function(t){var r=i.normalizeHash(t);return r=n.encodeURIComponent(r),i.bugs.hashEscape||(r=r.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),r},i.getHashByUrl=function(n){var t=String(n).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return i.unescapeHash(t)},i.setTitle=function(n){var t=n.title,u;t||(u=i.getStateByIndex(0),u&&u.url===n.url&&(t=u.title||i.options.initialTitle));try{r.getElementsByTagName("title")[0].innerHTML=t.replace("<","&lt;").replace(">","&gt;").replace(" & "," &amp; ")}catch(f){}return r.title=t,i},i.queues=[],i.busy=function(n){if(typeof n!="undefined"?i.busy.flag=n:typeof i.busy.flag=="undefined"&&(i.busy.flag=!1),!i.busy.flag){c(i.busy.timeout);var t=function(){var n,r,u;if(!i.busy.flag)for(n=i.queues.length-1;n>=0;--n)(r=i.queues[n],r.length!==0)&&(u=r.shift(),i.fireQueueItem(u),i.busy.timeout=h(t,i.options.busyDelay))};i.busy.timeout=h(t,i.options.busyDelay)}return i.busy.flag},i.busy.flag=!1,i.fireQueueItem=function(n){return n.callback.apply(n.scope||i,n.args||[])},i.pushQueue=function(n){return i.queues[n.queue||0]=i.queues[n.queue||0]||[],i.queues[n.queue||0].push(n),i},i.queue=function(n,t){return typeof n=="function"&&(n={callback:n}),typeof t!="undefined"&&(n.queue=t),i.busy()?i.pushQueue(n):i.fireQueueItem(n),i},i.clearQueue=function(){return i.busy.flag=!1,i.queues=[],i},i.stateChanged=!1,i.doubleChecker=!1,i.doubleCheckComplete=function(){return i.stateChanged=!0,i.doubleCheckClear(),i},i.doubleCheckClear=function(){return i.doubleChecker&&(c(i.doubleChecker),i.doubleChecker=!1),i},i.doubleCheck=function(n){return i.stateChanged=!1,i.doubleCheckClear(),i.bugs.ieDoubleCheck&&(i.doubleChecker=h(function(){return i.doubleCheckClear(),i.stateChanged||n(),!0},i.options.doubleCheckInterval)),i},i.safariStatePoll=function(){var r=i.extractState(i.getLocationHref()),t;if(!i.isLastSavedState(r))return t=r,t||(t=i.createStateObject()),i.Adapter.trigger(n,"popstate"),i},i.back=function(n){return n!==!1&&i.busy()?(i.pushQueue({scope:i,callback:i.back,args:arguments,queue:n}),!1):(i.busy(!0),i.doubleCheck(function(){i.back(!1)}),s.go(-1),!0)},i.forward=function(n){return n!==!1&&i.busy()?(i.pushQueue({scope:i,callback:i.forward,args:arguments,queue:n}),!1):(i.busy(!0),i.doubleCheck(function(){i.forward(!1)}),s.go(1),!0)},i.go=function(n,t){var r;if(n>0)for(r=1;r<=n;++r)i.forward(t);else if(n<0)for(r=-1;r>=n;--r)i.back(t);else throw new Error("History.go: History.go requires a positive or negative integer passed.");return i},i.emulated.pushState){var y=function(){};i.pushState=i.pushState||y;i.replaceState=i.replaceState||y}else i.onPopState=function(t,r){var e=!1,u=!1,o,f;return(i.doubleCheckComplete(),o=i.getHash(),o)?(f=i.extractState(o||i.getLocationHref(),!0),f?i.replaceState(f.data,f.title,f.url,!1):(i.Adapter.trigger(n,"anchorchange"),i.busy(!1)),i.expectedStateId=!1,!1):(e=i.Adapter.extractEventData("state",t,r)||!1,u=e?i.getStateById(e):i.expectedStateId?i.getStateById(i.expectedStateId):i.extractState(i.getLocationHref()),u||(u=i.createStateObject(null,null,i.getLocationHref())),i.expectedStateId=!1,i.isLastSavedState(u))?(i.busy(!1),!1):(i.storeState(u),i.saveState(u),i.setTitle(u),i.Adapter.trigger(n,"statechange"),i.busy(!1),!0)},i.Adapter.bind(n,"popstate",i.onPopState),i.pushState=function(t,r,u,f){if(i.getHashByUrl(u)&&i.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(f!==!1&&i.busy())return i.pushQueue({scope:i,callback:i.pushState,args:arguments,queue:f}),!1;i.busy(!0);var e=i.createStateObject(t,r,u);return i.isLastSavedState(e)?i.busy(!1):(i.storeState(e),i.expectedStateId=e.id,s.pushState(e.id,e.title,e.url),i.Adapter.trigger(n,"popstate")),!0},i.replaceState=function(t,r,u,f){if(i.getHashByUrl(u)&&i.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(f!==!1&&i.busy())return i.pushQueue({scope:i,callback:i.replaceState,args:arguments,queue:f}),!1;i.busy(!0);var e=i.createStateObject(t,r,u);return i.isLastSavedState(e)?i.busy(!1):(i.storeState(e),i.expectedStateId=e.id,s.replaceState(e.id,e.title,e.url),i.Adapter.trigger(n,"popstate")),!0};if(f){try{i.store=u.parse(f.getItem("History.store"))||{}}catch(p){i.store={}}i.normalizeStore()}else i.store={},i.normalizeStore();if(i.Adapter.bind(n,"unload",i.clearAllIntervals),i.saveState(i.storeState(i.extractState(i.getLocationHref(),!0))),f&&(i.onUnload=function(){var n,t,r;try{n=u.parse(f.getItem("History.store"))||{}}catch(o){n={}}n.idToState=n.idToState||{};n.urlToId=n.urlToId||{};n.stateToId=n.stateToId||{};for(t in i.idToState)i.idToState.hasOwnProperty(t)&&(n.idToState[t]=i.idToState[t]);for(t in i.urlToId)i.urlToId.hasOwnProperty(t)&&(n.urlToId[t]=i.urlToId[t]);for(t in i.stateToId)i.stateToId.hasOwnProperty(t)&&(n.stateToId[t]=i.stateToId[t]);i.store=n;i.normalizeStore();r=u.stringify(n);try{f.setItem("History.store",r)}catch(e){if(e.code===DOMException.QUOTA_EXCEEDED_ERR)f.length&&(f.removeItem("History.store"),f.setItem("History.store",r));else throw e;}},i.intervalList.push(l(i.onUnload,i.options.storeInterval)),i.Adapter.bind(n,"beforeunload",i.onUnload),i.Adapter.bind(n,"unload",i.onUnload)),!i.emulated.pushState&&(i.bugs.safariPoll&&i.intervalList.push(l(i.safariStatePoll,i.options.safariPollInterval)),(o.vendor==="Apple Computer, Inc."||(o.appCodeName||"")==="Mozilla")&&(i.Adapter.bind(n,"hashchange",function(){i.Adapter.trigger(n,"popstate")}),i.getHash())))i.Adapter.onDomLoad(function(){i.Adapter.trigger(n,"hashchange")})};i.options&&i.options.delayInit||i.init()}(window),function(n){"use strict";n(["jquery"],function(n){function i(t){return n.isFunction(t)||typeof t=="object"?t:{top:t,left:t}}var t=n.scrollTo=function(t,i,r){return n(window).scrollTo(t,i,r)};return t.defaults={axis:"xy",duration:parseFloat(n.fn.jquery)>=1.3?0:1,limit:!0},t.window=function(){return n(window)._scrollable()},n.fn._scrollable=function(){return this.map(function(){var t=this,r=!t.nodeName||n.inArray(t.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1,i;return r?(i=(t.contentWindow||t).document||t.ownerDocument||t,/webkit/i.test(navigator.userAgent)||i.compatMode=="BackCompat"?i.body:i.documentElement):t})},n.fn.scrollTo=function(r,u,f){return typeof u=="object"&&(f=u,u=0),typeof f=="function"&&(f={onAfter:f}),r=="max"&&(r=9e9),f=n.extend({},t.defaults,f),u=u||f.duration,f.queue=f.queue&&f.axis.length>1,f.queue&&(u/=2),f.offset=i(f.offset),f.over=i(f.over),this._scrollable().each(function(){function l(n){h.animate(o,u,f.easing,n&&function(){n.call(this,e,f)})}var a;if(r!=null){var s=this,h=n(s),e=r,c,o={},v=h.is("html,body");switch(typeof e){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(e)){e=i(e);break}if(e=v?n(e):n(e,this),!e.length)return;case"object":(e.is||e.style)&&(c=(e=n(e)).offset())}a=n.isFunction(f.offset)&&f.offset(s,e)||f.offset;n.each(f.axis.split(""),function(n,i){var p=i=="x"?"Left":"Top",u=p.toLowerCase(),r="scroll"+p,w=s[r],b=t.max(s,i),y;c?(o[r]=c[u]+(v?0:w-h.offset()[u]),f.margin&&(o[r]-=parseInt(e.css("margin"+p))||0,o[r]-=parseInt(e.css("border"+p+"Width"))||0),o[r]+=a[u]||0,f.over[u]&&(o[r]+=e[i=="x"?"width":"height"]()*f.over[u])):(y=e[u],o[r]=y.slice&&y.slice(-1)=="%"?parseFloat(y)/100*b:y);f.limit&&/^\d+$/.test(o[r])&&(o[r]=o[r]<=0?0:Math.min(o[r],b));!n&&f.queue&&(w!=o[r]&&l(f.onAfterFirst),delete o[r])});l(f.onAfter)}}).end()},t.max=function(t,i){var r=i=="x"?"Width":"Height",u="scroll"+r;if(!n(t).is("html,body"))return t[u]-n(t)[r.toLowerCase()]();var f="client"+r,e=t.ownerDocument.documentElement,o=t.ownerDocument.body;return Math.max(e[u],o[u])-Math.min(e[f],o[f])},t})}(typeof define=="function"&&define.amd?define:function(n,t){typeof module!="undefined"&&module.exports?module.exports=t(require("jquery")):t(jQuery)}),function(n,t){function f(n,t,i){var r=h[t.type]||{};return n==null?i||!t.def?null:t.def:(n=r.floor?~~n:parseFloat(n),isNaN(n))?t.def:r.mod?(n+r.mod)%r.mod:0>n?0:r.max<n?r.max:n}function s(t){var f=i(),o=f._rgba=[];return(t=t.toLowerCase(),r(v,function(n,i){var r,s=i.re.exec(t),h=s&&i.parse(s),e=i.space||"rgba";if(h)return r=f[e](h),f[u[e].cache]=r[u[e].cache],o=f._rgba=r._rgba,!1}),o.length)?(o.join()==="0,0,0,0"&&n.extend(o,e.transparent),f):e[t]}function o(n,t,i){return(i=(i+1)%1,i*6<1)?n+(t-n)*i*6:i*2<1?t:i*3<2?n+(t-n)*(2/3-i)*6:n}var a=/^([\-+])=\s*(\d+\.?\d*)/,v=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(n){return[n[1],n[2],n[3],n[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(n){return[n[1]*2.55,n[2]*2.55,n[3]*2.55,n[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(n){return[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(n){return[parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(n){return[n[1],n[2]/100,n[3]/100,n[4]]}}],i=n.Color=function(t,i,r,u){return new n.Color.fn.parse(t,i,r,u)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},h={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},c=i.support={},l=n("<p>")[0],e,r=n.each;l.style.cssText="background-color:rgba(1,1,1,.5)";c.rgba=l.style.backgroundColor.indexOf("rgba")>-1;r(u,function(n,t){t.cache="_"+n;t.props.alpha={idx:3,type:"percent",def:1}});i.fn=n.extend(i.prototype,{parse:function(o,h,c,l){if(o===t)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=n(o).css(h),h=t);var a=this,v=n.type(o),y=this._rgba=[];return(h!==t&&(o=[o,h,c,l],v="array"),v==="string")?this.parse(s(o)||e._default):v==="array"?(r(u.rgba.props,function(n,t){y[t.idx]=f(o[t.idx],t)}),this):v==="object"?(o instanceof i?r(u,function(n,t){o[t.cache]&&(a[t.cache]=o[t.cache].slice())}):r(u,function(t,i){var u=i.cache;r(i.props,function(n,t){if(!a[u]&&i.to){if(n==="alpha"||o[n]==null)return;a[u]=i.to(a._rgba)}a[u][t.idx]=f(o[n],t,!0)});a[u]&&n.inArray(null,a[u].slice(0,3))<0&&(a[u][3]=1,i.from&&(a._rgba=i.from(a[u])))}),this):void 0},is:function(n){var e=i(n),t=!0,f=this;return r(u,function(n,i){var o,u=e[i.cache];return u&&(o=f[i.cache]||i.to&&i.to(f._rgba)||[],r(i.props,function(n,i){if(u[i.idx]!=null)return t=u[i.idx]===o[i.idx]})),t}),t},_space:function(){var n=[],t=this;return r(u,function(i,r){t[r.cache]&&n.push(i)}),n.pop()},transition:function(n,t){var e=i(n),c=e._space(),o=u[c],l=this.alpha()===0?i("transparent"):this,a=l[o.cache]||o.to(l._rgba),s=a.slice();return e=e[o.cache],r(o.props,function(n,i){var c=i.idx,r=a[c],u=e[c],o=h[i.type]||{};u!==null&&(r===null?s[c]=u:(o.mod&&(u-r>o.mod/2?r+=o.mod:r-u>o.mod/2&&(r-=o.mod)),s[c]=f((u-r)*t+r,i)))}),this[c](s)},blend:function(t){if(this._rgba[3]===1)return this;var r=this._rgba.slice(),u=r.pop(),f=i(t)._rgba;return i(n.map(r,function(n,t){return(1-u)*f[t]+u*n}))},toRgbaString:function(){var i="rgba(",t=n.map(this._rgba,function(n,t){return n==null?t>2?1:0:n});return t[3]===1&&(t.pop(),i="rgb("),i+t.join()+")"},toHslaString:function(){var i="hsla(",t=n.map(this.hsla(),function(n,t){return n==null&&(n=t>2?1:0),t&&t<3&&(n=Math.round(n*100)+"%"),n});return t[3]===1&&(t.pop(),i="hsl("),i+t.join()+")"},toHexString:function(t){var i=this._rgba.slice(),r=i.pop();return t&&i.push(~~(r*255)),"#"+n.map(i,function(n){return n=(n||0).toString(16),n.length===1?"0"+n:n}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}});i.fn.parse.prototype=i.fn;u.hsla.to=function(n){if(n[0]==null||n[1]==null||n[2]==null)return[null,null,null,n[3]];var i=n[0]/255,r=n[1]/255,f=n[2]/255,s=n[3],u=Math.max(i,r,f),e=Math.min(i,r,f),t=u-e,o=u+e,h=o*.5,c,l;return c=e===u?0:i===u?60*(r-f)/t+360:r===u?60*(f-i)/t+120:60*(i-r)/t+240,l=t===0?0:h<=.5?t/o:t/(2-o),[Math.round(c)%360,l,h,s==null?1:s]};u.hsla.from=function(n){if(n[0]==null||n[1]==null||n[2]==null)return[null,null,null,n[3]];var r=n[0]/360,u=n[1],t=n[2],e=n[3],i=t<=.5?t*(1+u):t+u-t*u,f=2*t-i;return[Math.round(o(f,i,r+1/3)*255),Math.round(o(f,i,r)*255),Math.round(o(f,i,r-1/3)*255),e]};r(u,function(u,e){var s=e.props,o=e.cache,h=e.to,c=e.from;i.fn[u]=function(u){if(h&&!this[o]&&(this[o]=h(this._rgba)),u===t)return this[o].slice();var l,a=n.type(u),v=a==="array"||a==="object"?u:arguments,e=this[o].slice();return r(s,function(n,t){var i=v[a==="object"?n:t.idx];i==null&&(i=e[t.idx]);e[t.idx]=f(i,t)}),c?(l=i(c(e)),l[o]=e,l):i(e)};r(s,function(t,r){i.fn[t]||(i.fn[t]=function(i){var f=n.type(i),h=t==="alpha"?this._hsla?"hsla":"rgba":u,o=this[h](),s=o[r.idx],e;return f==="undefined"?s:(f==="function"&&(i=i.call(this,s),f=n.type(i)),i==null&&r.empty)?this:(f==="string"&&(e=a.exec(i),e&&(i=s+parseFloat(e[2])*(e[1]==="+"?1:-1))),o[r.idx]=i,this[h](o))})})});i.hook=function(t){var u=t.split(" ");r(u,function(t,r){n.cssHooks[r]={set:function(t,u){var o,f,e="";if(u!=="transparent"&&(n.type(u)!=="string"||(o=s(u)))){if(u=i(o||u),!c.rgba&&u._rgba[3]!==1){for(f=r==="backgroundColor"?t.parentNode:t;(e===""||e==="transparent")&&f&&f.style;)try{e=n.css(f,"backgroundColor");f=f.parentNode}catch(h){}u=u.blend(e&&e!=="transparent"?e:"_default")}u=u.toRgbaString()}try{t.style[r]=u}catch(h){}}};n.fx.step[r]=function(t){t.colorInit||(t.start=i(t.elem,r),t.end=i(t.end),t.colorInit=!0);n.cssHooks[r].set(t.elem,t.start.transition(t.end,t.pos))}})};i.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor");n.cssHooks.borderColor={expand:function(n){var t={};return r(["Top","Right","Bottom","Left"],function(i,r){t["border"+r+"Color"]=n}),t}};e=n.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(n){function i(t){var r,i=n("<div><\/div>").css({width:"100%"});return t.append(i),r=t.width()-i.width(),i.remove(),r}function t(r,u){var o=r.getBoundingClientRect(),s=o.top,h=o.bottom,c=o.left,p=o.right,f=n.extend({tolerance:0,viewport:window},u),e=f.viewport.get?f.viewport:n(f.viewport),l;e.length||(console.warn("isInViewport: The viewport selector you have provided matches no element on page."),console.warn("isInViewport: Defaulting to viewport as window"),e=n(window));var v=e.height(),a=e.width(),y=e.get(0).toString();return(y!=="[object Window]"&&y!=="[object DOMWindow]"&&(l=e.offset(),s=s-l.top,h=h-l.top,c=c-l.left,p=c+a,t.scrollBarWidth=t.scrollBarWidth||i(e),a-=t.scrollBarWidth),f.tolerance=~~Math.round(parseFloat(f.tolerance)),f.tolerance<0&&(f.tolerance=v+f.tolerance),Math.abs(c)>=a)?!1:f.tolerance?!!(s<=f.tolerance&&h>=f.tolerance):!!(h>0&&s<=v)}n.fn.do=function(t){var i,r;if(arguments.length===1&&typeof t=="function"&&(t=[t]),!(t instanceof Array))throw new SyntaxError("isInViewport: Argument(s) passed to .do should be a function or an array of functions");for(i=0;i<t.length;i++){if(typeof t[i]!="function"){console.warn("isInViewport: Argument(s) passed to .do should be a function or an array of functions");console.warn("isInViewport: Ignoring non-function values in array and moving on");continue}for(r=0;r<this.length;r++)t[i].call(n(this[r]))}return this};n.extend(n.expr[":"],{"in-viewport":function(n,i,r){if(!r[3])return t(n);var u=r[3].split(",");return u.length===1&&isNaN(u[0])&&(u[1]=u[0],u[0]=undefined),t(n,{tolerance:u[0]?u[0].trim():undefined,viewport:u[1]?u[1].trim():undefined})}})}(jQuery)