function disableSourceEdit(){document.onkeydown=function(n){return n.ctrlKey&&(n.keyCode===67||n.keyCode===86||n.keyCode===85||n.keyCode===117)?!1:!0};$(document).keypress("u",function(n){return n.ctrlKey?!1:!0});$(document).keydown(function(n){return n.keyCode==123?!1:n.ctrlKey&&n.shiftKey&&n.keyCode==73?!1:void 0});$(document).bind("contextmenu",function(){return!1})}function alertMesage(n){$.notify({message:n},{type:"success",delay:2e3})}function isEmail(n){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(n)}function NumOnly(n){$("#"+n+"").keypress(function(n){if(n.which!=8&&n.which!=0&&(n.which<48||n.which>57))return!1})}function loadCulture_New(n){if(n=JSON.parse(n),n.hindu.data.length>0)for(var t=0;t<n.hindu.data.length;t++)globalCulture[n.hindu.data[t].key]=n.hindu.data[t].value}function plzWaitPopUp(){$(document).ajaxStart(function(){$("#loaderPlzWait").css("display","block")});$(document).ajaxComplete(function(){$("#loaderPlzWait").css("display","none")})}function Logincheck(){var n=BaseUrl+"Home/checklogin";return getResult(n,{})}function getResult(n,t){var i;return $.ajax({url:n,type:"Get",async:!1,dataType:"json",data:t,contentType:"application/json; charset=utf-8",success:function(n){i=n},error:function(n){n.status==200?$("#divPopUpMessage").modal():n.status==500&&$("#divPopUpMessage1 .content").text("You are in offline mode .");i="Error"}}),i}function getResultasync(n,t){var i;return $.ajax({url:n,type:"Get",async:!0,dataType:"json",data:t,contentType:"application/json; charset=utf-8",success:function(n){i=n},error:function(){i="Error"}}),i}function getResultnew(n,t){var i;return $.ajax({url:n,type:"Get",async:!1,dataType:"json",data:t,contentType:"application/json; charset=utf-8",success:function(n){i=n},error:function(){i="Error"}}),i}function getResultPost(n,t){var i;return $.ajax({url:n,type:"POST",async:!1,dataType:"json",data:t,contentType:"application/json; charset=utf-8",success:function(n){i=n},error:function(){i="Error"}}),i}function date_format(n){var t=n+"api/Login/GetTodayDate";return getResult(t,{})}function encrypt(n,t){var i=n+"api/Login/Encrypt",r={dateval:t};return getResult(i,r)}function translitrate(){var n=$("#txtSearch").val();$.ajax({url:"https://www.google.com/inputtools/request",dataType:"jsonp",jsonp:"cb",data:{text:n,ime:"transliteration_en_kn",num:5,cp:0,cs:1,ie:"utf-8",oe:"utf-8"},success:function(n){$("#txtSearch").val(n[1][0][1][0]+" ")}})}function preloadImages(n){var i,r,t;for(preloadImages.list||(preloadImages.list=[]),i=preloadImages.list,r=0;r<n.length;r++)t=new Image,$(t).attr("class","preload"),t.onload=function(){var n=i.indexOf(this);n!==-1&&i.splice(n,1)},i.push(t),t.src=n[r]}function preloadImages_old(n){var i,r,t;for(preloadImages.list||(preloadImages.list=[]),i=preloadImages.list,r=0;r<n.length;r++)t=new Image,$(t).attr("class","preload"),t.onload=function(){var n=i.indexOf(this);n!==-1&&(i.splice(n,1),TotalImagesDone=TotalImagesDone+1,$("#lblmsg1").text(TotalImagesDone))},i.push(t),t.src=n[r],TotalImages=TotalImages+1,$("#lblmsg").text(TotalImages)}function GoOffline1(){var e=$.cookie("MainEditionId"),i=BaseUrl+"Home/GetAllpages",o=$("#datepicker").datepicker("getFormattedDate"),r={editionid:e,editiondate:o},n=getResult(i,r),u=[],t,f;if(n!=null&&n.length>0){for(t=0;t<n.length;t++){f=n[t].HighResolution;u.push(f);i=BaseUrl+"Home/getStoriesOnPage";r={pageid:n[t].PageId};$.ajax({url:i,type:"Get",async:!0,dataType:"json",data:r,contentType:"application/json; charset=utf-8",success:function(n){var t,i,r;if(n!=null&&n.length>0)for(t=0;t<n.length;t++)i=BaseUrl+"Home/getstorydetail",r={Storyid:n[t].storyid},$.ajax({url:i,type:"Get",async:!0,dataType:"json",data:r,contentType:"application/json; charset=utf-8",success:function(n){var t=n,u=[],i,r,f,e;if(t!=null&&t.length>0){for(i=0;i<t.length;i++)if(i==1)for(res2=t[i],r=0;r<res2.length;r++)f=res2[r].fullpathlinkpic,e=f.replace("_mr","_tn"),u.push(e),u.push(f);var o=t[6],s=BaseUrl+"User/ShowArticleView",h={OrgId:o},t=getResultasync(s,h),c=BaseUrl+"Home/ShareArticle",l={OrgId:o,imageview:0},a=getResultasync(c,l)}preloadImages(u)},error:function(){}})},error:function(n){n.status==200}});var s=BaseUrl+"Home/getingRectangleObject",h={pageid:n[t].PageId},c=getResultasync(s,h)}preloadImages(u)}}function GoOffline(){TotalImagesDone=0;TotalImages=0;isOffline==0?($("#li_offline").text("Go Online"),$("#ancmobile_go_offline").addClass("offlineactive"),isOffline=1,$("#divPopUpMessage2").modal(),setTimeout(function(){GoOffline1()},1e3)):($("#ancmobile_go_offline").removeClass("offlineactive"),$("#li_offline").text("Go Offline"),isOffline=0)}function GoOfflineMobile(){TotalImagesDone=0;TotalImages=0;$("#myBar").css("width","0%");$("#myBar").text("Downloading...");isOffline==0?($("#divPopUpMessage2").modal(),$("body").addClass("offline_mode"),setTimeout(function(){GoOfflineMobile1()},1e3)):($("#imgoffline").show(),$("#imgonline").hide(),$("body").removeClass("offline_mode"),isOffline=0)}function GoOfflineMobile1_old(){var i=$.cookie("MainEditionId"),r=BaseUrl+"Home/GetAllpages",u=$("#datepicker").datepicker("getFormattedDate"),f={editionid:i,editiondate:u},n=getResult(r,f),t;if(n!=null&&n.length>0)for(t=0;t<n.length;t++)var e=BaseUrl+"Home/getingRectangleObject",o={pageid:n[t].PageId},s=getResultasync(e,o);TotalImages=StoryMap1.length;$(StoryMap1).each(function(n,t){var i=BaseUrl+"User/ShowArticleView",r={OrgId:t.Org_Id};$.ajax({url:i,type:"Get",async:!0,dataType:"json",data:r,contentType:"application/json; charset=utf-8",success:function(n){var i=n,r,u,f,e,t;if(i.LinkPicture!=null&&i.LinkPicture.length>0){for(r=0;r<i.LinkPicture.length;r++)res2=i.LinkPicture[r],u=res2.fullpathlinkpic,u=u.replace("_mr","_tn"),f=new Image,e=BaseUrl+"Home/Renderimage?imagepath="+u,f.src=e;TotalImagesDone=TotalImagesDone+1;t=TotalImagesDone/TotalImages*100;t=parseInt(t);$("#myBar").css("width",t+"%");$("#myBar").text(t+"%");TotalImagesDone==TotalImages&&($("#divPopUpMessage2").modal("hide"),$("#imgoffline").hide(),$("#imgonline").show(),isOffline=1)}},error:function(){}})})}function GoOfflineMobile1(){var i=$.cookie("MainEditionId"),r=BaseUrl+"Home/GetAllpages",u=$("#datepicker").datepicker("getFormattedDate"),f={editionid:i,editiondate:u},n=getResult(r,f),t;if(n!=null&&n.length>0)for(t=0;t<n.length;t++)var e=BaseUrl+"Home/getingRectangleObject",o={pageid:n[t].PageId},s=getResultasync(e,o);TotalImages=StoryMap1.length;$(StoryMap1).each(function(n,t){var i=BaseUrl+"User/ShowArticleView",r={OrgId:t.Org_Id};$.ajax({url:i,type:"Get",async:!0,dataType:"json",data:r,contentType:"application/json; charset=utf-8",success:function(n){var i=n,r,u,f,e,t;if(i.LinkPicture!=null&&i.LinkPicture.length>0)for(r=0;r<i.LinkPicture.length;r++)res2=i.LinkPicture[r],u=res2.fullpathlinkpic,u=u.replace("_mr","_tn"),f=new Image,e=BaseUrl+"Home/Renderimage?imagepath="+u,f.src=e;TotalImagesDone=TotalImagesDone+1;t=TotalImagesDone/TotalImages*100;t=parseInt(t);$("#myBar").css("width",t+"%");$("#myBar").text(t+"%");TotalImagesDone==TotalImages&&($("#divPopUpMessage2").modal("hide"),$("#imgoffline").hide(),$("#imgonline").show(),isOffline=1)},error:function(){}})})}function preloadImagesMobile(n){var i,r,t;for(preloadImages.list||(preloadImages.list=[]),i=preloadImages.list,r=0;r<n.length;r++)t=new Image,$(t).attr("class","preload"),t.onload=function(){var n=i.indexOf(this);n!==-1&&(i.splice(n,1),TotalImagesDone=TotalImagesDone+1)},i.push(t),t.src=n[r]}function mostRedArticle(){var n=null,i=BaseUrl+"Home/PopularArticle",f=$("#hdnViewType").val(),r=$.cookie("changeddate"),u={viewType:1,ViewDays:r},t;if(n=getResult(i,u),n.length>0)for(t=0;t<n.length;t++)StoryMapDeskTop.push({Org_Id:n[t].StoryID});mostSharedArticle()}function mostSharedArticle(){var n=null,i=BaseUrl+"Home/PopularArticle",f=$("#hdnViewType").val(),r=$.cookie("changeddate"),u={viewType:3,ViewDays:r},t;if(n=getResult(i,u),n.length>0)for(t=0;t<n.length;t++)StoryMapDeskTop.push({Org_Id:n[t].StoryID});StoryMapDeskTop=jQuery.unique(StoryMapDeskTop)}function GoOfflineDesktop(){TotalImagesDone=0;TotalImages=0;$("#myBarDesktop").css("width","0%");$("#myBarDesktop").text("Downloading...");isOffline==0?($("#ancmobile_go_offline").addClass("offlineactive"),isOffline=1,$("#divPopUpMessage2").modal(),setTimeout(function(){GoOfflineDesktop1()},1e3)):($("#ancmobile_go_offline").removeClass("offlineactive"),$("#li_offline").text("Go Offline"),isOffline=0)}function GoOfflineDesktop1(){var f=$.cookie("MainEditionId"),e=BaseUrl+"Home/GetAllpages",o=$("#datepicker").datepicker("getFormattedDate"),s={editionid:f,editiondate:o},n=getResult(e,s),r=[],t,i;if(StoryMapDeskTop=[],n!=null&&n.length>0){for(t=0;t<n.length;t++){r.push(n[t].HighResolution);var h=BaseUrl+"Home/getingRectangleObject",c={pageid:n[t].PageId},v=getResultasync(h,c),l=BaseUrl+"Home/getStoriesOnPage",a={pageid:n[t].PageId},u=getResult(l,a);for(i=0;i<u.length;i++)StoryMapDeskTop.push({Org_Id:u[i].storyid})}preloadImages(r)}TotalImages=StoryMapDeskTop.length;$(StoryMapDeskTop).each(function(n,t){var r=BaseUrl+"Home/getstorydetail",u={Storyid:t.Org_Id};$.ajax({url:r,type:"Get",async:!0,dataType:"json",data:u,contentType:"application/json; charset=utf-8",success:function(n){var t=n,f=[],u,e,o,r;if(t.LinkPicture!=null&&t.LinkPicture.length>0)for(res2=t[i],u=0;u<t.LinkPicture.length;u++)e=t.LinkPicture[u].fullpathlinkpic,o=e.replace("_mr","_tn"),f.push(o),f.push(e);var s=t.OrgId,h=BaseUrl+"User/ShowArticleView",c={OrgId:s},t=getResultasync(h,c),l=BaseUrl+"Home/ShareArticle",a={OrgId:s,imageview:0},v=getResultasync(l,a);TotalImagesDone=TotalImagesDone+1;r=TotalImagesDone/TotalImages*100;r=parseInt(r);$("#myBarDesktop").css("width",r+"%");$("#myBarDesktop").text(r+"%");TotalImagesDone==TotalImages&&($("#divPopUpMessage2").modal("hide"),$("#imgoffline").hide(),$("#imgonline").show(),$("#li_offline").text("Go Online"),isOffline=1);preloadImages(f)},error:function(){}})})}function AddtoGA(n,t,i,r){try{var u=t.replace("/","-"),f=u.replace("/","-"),e="Epaper/"+n+"/"+f+"/"+i+"/"+r;ga("send","pageview",e)}catch(o){}}function AddtoGAArticle(n,t,i,r,u){try{gtag("config",g_AnalyticsId,{page_title:u,page_path:"/"+n+"/"+t+"/"+i+"/Article/"+r})}catch(f){}}function SetUrl(n){BaseUrl=n}function SetOldSocialSignInType(n){setOldSocialSignInType=n}function SetStaticCdn(n){StaticCdn=n}function Login_UserActionLog(n,t,i,r,u,f){var o=BaseUrl+"Home/UserActionLog",e,s;e=n=="Forgot password"?{useraction:n,id:t,view:i,status:r,remark:u,Email:f,ActionCode:"13"}:{useraction:n,id:t,view:i,status:r,remark:u,Email:f};s=getResultasync(o,e)}function forgotPasswords(){var n=$("#Email1").val();if(n=="")return $("#divforgotpass").text("Please enter registered email address !!"),$("#divforgotpass").show(),$("#Email1").focus(),!1;/^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/.test(n)?($("#divforgotpass").show(),$("#divforgotpass").text("Please wait..."),setTimeout(function(){var i=BaseUrl+"Login/ForgotPassword",r="{'EmailId' :'"+n+"'}",t=getResultPost(i,r);$("#Email1").val("");t.status?(Login_UserActionLog("Forgot password","","","Success","Forgot password done successfully",n),$("#divforgotpass").hide(),$("#forgotpassModal").modal("hide"),alertMesage(t.message)):($("#divforgotpass").text(t.message),$("#divforgotpass").show(),Login_UserActionLog("Forgot password","","","Failed","Forgot password Failed",n))},2e3)):($("#divforgotpass").text("Please enter a valid email address!!"),$("#Email1").focus(),$("#divforgotpass").show())}function forgotPassword(){$("#forgotpassModal").modal("show")}function createGoogleUser(n){$("#Message_mobileno").show();$("#Message_mobileno").html("Registering you, please wait...");$("#divsocialLoginmsg").html("<strong> Registering you, please wait...<\/strong>");$("#divRegistermsg").html("<strong> Registering you, please wait...<\/strong>");var t={obj:n};$.ajax({url:BaseUrl+"Login/createGoogleUser",type:"POST",dataType:"json",data:JSON.stringify(t),contentType:"application/json; charset=utf-8",success:function(t){t.status?GotoHomePage(n.email):alert("Some Technical Error")},error:function(){alert("Some technical error in google user login !! EmailId:  "+n.email)}});$("#Message_mobileno").hide()}function CheckUserRegister(n,t,i){var r={},u;r.username=n;r.email=t;r.password=i;u={obj:r};$("#divsocialLoginmsg").show();$("#divsocialLoginmsg").text("Please wait...");$("#divRegistermsg").show();$("#divRegistermsg").text("Please wait...");var e=BaseUrl+"Login/checkuserexist",o=JSON.stringify(u),f=getResultPost(e,o);f.status?f.IsBlocked?($("#divsocialLoginmsg").text("Your account is temporarily suspended."),$("#divRegistermsg").text("Your account is temporarily suspended.")):($("#divsocialLoginmsg").hide(),$("#divRegistermsg").hide(),GotoHomePage(t)):(objuser=r,$("#Social_login_contactno").modal())}function GotoHomePage(n){var r=BaseUrl+"Login/GotoHomePage",t=$.cookie("keepsignedin"),i;(t=="undefined"||t=="")&&(t=!1);i="<form id='myform' method='POST' action='"+r+"'><input type='hidden' name='EmailId' value="+n+" /><input type='hidden' name='RememberMe' value="+t+" /><\/form>";$(i).appendTo("body").submit()}function GotoWelcomePage(n){var t=BaseUrl+"Login/GotoWelcomePage",i="<form id='myform' method='POST' action='"+t+"'><input type='hidden' name='EmailId' value="+n+" /><\/form>";$(i).appendTo("body").submit()}function SocialLogMobile(n){if(n=="")return $("#Message_mobileno").html("Mobile number can not be blank"),$("#Message_mobileno").show(),!1;$("#Message_mobileno").hide();objuser.MobileNumber=n;$("#txt_soclogmobileno").val("");createGoogleUser(objuser);$("#Social_login_contactno").modal("hide")}function LoginPage(){Logincheck()||(window.location.href=BaseUrl+"login/login")}function LogOut(){window.location.href=BaseUrl+"Login/logoff";sessionStorage.clear();$("#LoginModal").modal("hide")}function admLogin(){var n={};$("#LoginModal").modal("show");var t=$("#txtEmail").val(),u=$("#txtPassword").val(),f=BaseUrl+"Login/Validate_Login";if(t=="")return $("#spnEmail").text("Please enter email"),$("#spnEmail").css("display","block"),!1;if(!isEmail(t))return $("#spnEmail").text("Please enter valid email"),$("#spnEmail").css("display","block"),!1;if(u.trim()=="")return $("#spnPassword").text("Please enter password"),$("#spnPassword").css("display","block"),!1;n.Email=t;n.Password=u;var i={user:n},i=JSON.stringify(i),r=getResultPost(f,i);r!="Error"&&(r.Status?($("#LoginModal").modal("hide"),window.location.href=BaseUrl+"Home/Index"):alertMesage(r.Message))}function LoginPageLoad(){var t,n;$("#loader").hide();t=document.referrer;$("#hd_RequestUrl").val(t);$("#divRegistermsg").hide();$("#divforgotpass").hide();n=$(window).width();n=n>767?600:300;getUrlVars();$("#txtMobileNo").keypress(function(n){if(n.which!=8&&n.which!=0&&(n.which<48||n.which>57))return!1});$("#Name").keypress(function(n){if(n.which>=48&&n.which<=57)return!1});$("#txt_soclogmobileno").keypress(function(n){if(n.which!=8&&n.which!=0&&(n.which<48||n.which>57))return!1});try{$("#PromptUserforActiveSession").dialog({autoOpen:!1,width:320,modal:!0,resizable:!1,minHeight:120,fluid:!0,dialogClass:"base_theme active_session",open:function(){$(".ui-dialog").css("z-index",1050);$(".ui-widget-overlay").css({"z-index":1040,"background-color":"blue !important",opacity:"0.5"})},close:function(){}})}catch(i){console.log(i)}try{$("#PromptUserforRegister").dialog({autoOpen:!1,width:300,modal:!0,resizable:!1,minHeight:120,fluid:!0,dialogClass:"base_theme active_session",open:function(){$(".ui-dialog").css("z-index",1050);$(".ui-widget-overlay").css({"z-index":1040,"background-color":"blue !important",opacity:"0.5"})},close:function(){}})}catch(i){alert("Please accept Terms and Condition and Privacy Policy to register.");console.log(i)}}function autoCity(){var n=$("#txtCityReg").val(),t={City:n},i=BaseUrl+"Login/GetCity";return result=getResult(i,t)}function GetDefaultPage(n){n==undefined&&(n=0);var t=BaseUrl+"Home/GetDefaultDetails",i={edid:n};return getResult(t,i)}function SectionRegisterByUrl(){$("#register-tab").addClass("active show");$("#login-tab").removeClass("active show");$("#register").addClass("active show");$("#login").removeClass("active show")}function getUrlVars(){for(var n,i=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),t=0;t<i.length;t++)n=i[t].split("=");if(n[0].indexOf("promocode")>-1)return n[1];if(n[0].indexOf("register")>-1)SectionRegisterByUrl();else return null}function Loginsection(){window.location.href=BaseUrl+"login"}function Registersection(){window.location.href=BaseUrl+"register"}function fblogout(){FB.logout(function(){window.location.reload()})}function facebooklogin(){try{FB.init({appId:FacebookAppId,cookie:!0,xfbml:!0,version:"v2.8"})}catch(n){}FB.login(function(n){n.authResponse?FB.api("/me",{fields:"name,email"},function(n){n.email!=null&&n.email!=""?CheckUserRegister(n.name,n.email,""):alert("We are unable to get your email address.Please register with another method")}):alert("User cancelled login or did not fully authorize.")},{scope:"email,user_likes"})}function LoginWithPrompt(){var n=BaseUrl+"Login/GotoHomePageByNormal",t="<form id='myform' method='POST' action='"+n+"'><\/form>";$(t).appendTo("body").submit()}var objuser,BaseUrl,Publication,setOldSocialSignInType;(function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.Popper=t()})(this,function(){"use strict";function et(n){return n&&"[object Function]"==={}.toString.call(n)}function r(n,t){if(1!==n.nodeType)return[];var i=getComputedStyle(n,null);return t?i[t]:i}function p(n){return"HTML"===n.nodeName?n:n.parentNode||n.host}function s(n){if(!n)return document.body;switch(n.nodeName){case"HTML":case"BODY":return n.ownerDocument.body;case"#document":return n.body}var t=r(n),i=t.overflow,u=t.overflowX,f=t.overflowY;return/(auto|scroll|overlay)/.test(i+f+u)?n:s(p(n))}function u(n){return 11===n?ui:10===n?fi:ui||fi}function f(n){var e,t,i;if(!n)return document.documentElement;for(e=u(10)?document.body:null,t=n.offsetParent;t===e&&n.nextElementSibling;)t=(n=n.nextElementSibling).offsetParent;return i=t&&t.nodeName,i&&"BODY"!==i&&"HTML"!==i?-1!==["TD","TABLE"].indexOf(t.nodeName)&&"static"===r(t,"position")?f(t):t:n?n.ownerDocument.documentElement:document.documentElement}function oi(n){var t=n.nodeName;return"BODY"!==t&&("HTML"===t||f(n.firstElementChild)===n)}function w(n){return null===n.parentNode?n:w(n.parentNode)}function c(n,t){var i,r;if(!n||!n.nodeType||!t||!t.nodeType)return document.documentElement;var e=n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=e?n:t,s=e?t:n,u=document.createRange();return(u.setStart(o,0),u.setEnd(s,0),i=u.commonAncestorContainer,n!==i&&t!==i||o.contains(s))?oi(i)?i:f(i):(r=w(n),r.host?c(r.host,t):c(n,w(t).host))}function e(n){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"top",t="top"===f?"scrollTop":"scrollLeft",i=n.nodeName,r,u;return"BODY"===i||"HTML"===i?(r=n.ownerDocument.documentElement,u=n.ownerDocument.scrollingElement||r,u[t]):n[t]}function si(n,t){var f=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=e(t,"top"),u=e(t,"left"),i=f?-1:1;return n.top+=r*i,n.bottom+=r*i,n.left+=u*i,n.right+=u*i,n}function ot(n,t){var i="x"===t?"Left":"Top",r="Left"==i?"Right":"Bottom";return parseFloat(n["border"+i+"Width"],10)+parseFloat(n["border"+r+"Width"],10)}function st(n,i,r,f){return t(i["offset"+n],i["scroll"+n],r["client"+n],r["offset"+n],r["scroll"+n],u(10)?r["offset"+n]+f["margin"+("Height"===n?"Top":"Left")]+f["margin"+("Height"===n?"Bottom":"Right")]:0)}function ht(){var t=document.body,n=document.documentElement,i=u(10)&&getComputedStyle(n);return{height:st("Height",t,n,i),width:st("Width",t,n,i)}}function i(t){return n({},t,{right:t.left+t.width,bottom:t.top+t.height})}function b(n){var t={},o,s,h;try{u(10)?(t=n.getBoundingClientRect(),o=e(n,"top"),s=e(n,"left"),t.top+=o,t.left+=s,t.bottom+=o,t.right+=s):t=n.getBoundingClientRect()}catch(r){}var f={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a="HTML"===n.nodeName?ht():{},v=a.width||n.clientWidth||f.right-f.left,y=a.height||n.clientHeight||f.bottom-f.top,c=n.offsetWidth-v,l=n.offsetHeight-y;return(c||l)&&(h=r(n),c-=ot(h,"x"),l-=ot(h,"y"),f.width-=c,f.height-=l),i(f)}function k(n,f){var w=2<arguments.length&&void 0!==arguments[2]&&arguments[2],k=u(10),d="HTML"===f.nodeName,h=b(n),o=b(f),v=s(n),c=r(f),y=parseFloat(c.borderTopWidth,10),p=parseFloat(c.borderLeftWidth,10),e,l,a;return w&&"HTML"===f.nodeName&&(o.top=t(o.top,0),o.left=t(o.left,0)),e=i({top:h.top-o.top-y,left:h.left-o.left-p,width:h.width,height:h.height}),(e.marginTop=0,e.marginLeft=0,!k&&d)&&(l=parseFloat(c.marginTop,10),a=parseFloat(c.marginLeft,10),e.top-=y-l,e.bottom-=y-l,e.left-=p-a,e.right-=p-a,e.marginTop=l,e.marginLeft=a),(k&&!w?f.contains(v):f===v&&"BODY"!==v.nodeName)&&(e=si(e,f)),e}function hi(n){var f=1<arguments.length&&void 0!==arguments[1]&&arguments[1],r=n.ownerDocument.documentElement,u=k(n,r),o=t(r.clientWidth,window.innerWidth||0),s=t(r.clientHeight,window.innerHeight||0),h=f?0:e(r),c=f?0:e(r,"left"),l={top:h-u.top+u.marginTop,left:c-u.left+u.marginLeft,width:o,height:s};return i(l)}function ct(n){var t=n.nodeName;return"BODY"===t||"HTML"===t?!1:"fixed"===r(n,"position")||ct(p(n))}function lt(n){if(!n||!n.parentElement||u())return document.documentElement;for(var t=n.parentElement;t&&"none"===r(t,"transform");)t=t.parentElement;return t||document.documentElement}function d(n,t,i,r){var o=4<arguments.length&&void 0!==arguments[4]&&arguments[4],u={top:0,left:0},h=o?lt(n):c(n,t),e,f;if("viewport"===r)u=hi(h,o);else if("scrollParent"===r?(e=s(p(t)),"BODY"===e.nodeName&&(e=n.ownerDocument.documentElement)):e="window"===r?n.ownerDocument.documentElement:r,f=k(e,h,o),"HTML"!==e.nodeName||ct(h))u=f;else{var l=ht(),a=l.height,v=l.width;u.top+=f.top-f.marginTop;u.bottom=a+f.top;u.left+=f.left-f.marginLeft;u.right=v+f.left}return u.left+=i,u.top+=i,u.right-=i,u.bottom-=i,u}function ci(n){var t=n.width,i=n.height;return t*i}function at(t,i,r,u,f){var l=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var e=d(r,u,l,f),o={top:{width:e.width,height:i.top-e.top},right:{width:e.right-i.right,height:e.height},bottom:{width:e.width,height:e.bottom-i.bottom},left:{width:i.left-e.left,height:e.height}},s=Object.keys(o).map(function(t){return n({key:t},o[t],{area:ci(o[t])})}).sort(function(n,t){return t.area-n.area}),h=s.filter(function(n){var t=n.width,i=n.height;return t>=r.clientWidth&&i>=r.clientHeight}),a=0<h.length?h[0].key:s[0].key,c=t.split("-")[1];return a+(c?"-"+c:"")}function vt(n,t,i){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,u=r?lt(t):c(t,i);return k(i,u,r)}function yt(n){var t=getComputedStyle(n),i=parseFloat(t.marginTop)+parseFloat(t.marginBottom),r=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{width:n.offsetWidth+r,height:n.offsetHeight+i}}function l(n){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return n.replace(/left|right|bottom|top/g,function(n){return t[n]})}function pt(n,t,i){i=i.split("-")[0];var r=yt(n),e={width:r.width,height:r.height},u=-1!==["right","left"].indexOf(i),o=u?"top":"left",f=u?"left":"top",s=u?"height":"width",h=u?"width":"height";return e[o]=t[o]+t[s]/2-r[s]/2,e[f]=i===f?t[f]-r[h]:t[l(f)],e}function h(n,t){return Array.prototype.find?n.find(t):n.filter(t)[0]}function li(n,t,i){if(Array.prototype.findIndex)return n.findIndex(function(n){return n[t]===i});var r=h(n,function(n){return n[t]===i});return n.indexOf(r)}function wt(n,t,r){var u=void 0===r?n:n.slice(0,li(n,"name",r));return u.forEach(function(n){n["function"]&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var r=n["function"]||n.fn;n.enabled&&et(r)&&(t.offsets.popper=i(t.offsets.popper),t.offsets.reference=i(t.offsets.reference),t=r(t,n))}),t}function ai(){if(!this.state.isDestroyed){var n={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};n.offsets.reference=vt(this.state,this.popper,this.reference,this.options.positionFixed);n.placement=at(this.options.placement,n.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding);n.originalPlacement=n.placement;n.positionFixed=this.options.positionFixed;n.offsets.popper=pt(this.popper,n.offsets.reference,n.placement);n.offsets.popper.position=this.options.positionFixed?"fixed":"absolute";n=wt(this.modifiers,n);this.state.isCreated?this.options.onUpdate(n):(this.state.isCreated=!0,this.options.onCreate(n))}}function bt(n,t){return n.some(function(n){var i=n.name,r=n.enabled;return r&&i===t})}function g(n){for(var t,i,u=[!1,"ms","Webkit","Moz","O"],f=n.charAt(0).toUpperCase()+n.slice(1),r=0;r<u.length;r++)if(t=u[r],i=t?""+t+f:n,"undefined"!=typeof document.body.style[i])return i;return null}function vi(){return this.state.isDestroyed=!0,bt(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[g("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function kt(n){var t=n.ownerDocument;return t?t.defaultView:window}function dt(n,t,i,r){var f="BODY"===n.nodeName,u=f?n.ownerDocument.defaultView:n;u.addEventListener(t,i,{passive:!0});f||dt(s(u.parentNode),t,i,r);r.push(u)}function yi(n,t,i,r){i.updateBound=r;kt(n).addEventListener("resize",i.updateBound,{passive:!0});var u=s(n);return dt(u,"scroll",i.updateBound,i.scrollParents),i.scrollElement=u,i.eventsEnabled=!0,i}function pi(){this.state.eventsEnabled||(this.state=yi(this.reference,this.options,this.state,this.scheduleUpdate))}function wi(n,t){return kt(n).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(n){n.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function bi(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=wi(this.reference,this.state))}function nt(n){return""!==n&&!isNaN(parseFloat(n))&&isFinite(n)}function tt(n,t){Object.keys(t).forEach(function(i){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&nt(t[i])&&(r="px");n.style[i]=t[i]+r})}function ki(n,t){Object.keys(t).forEach(function(i){var r=t[i];!1===r?n.removeAttribute(i):n.setAttribute(i,t[i])})}function gt(n,t,i){var u=h(n,function(n){var i=n.name;return i===t}),f=!!u&&n.some(function(n){return n.name===i&&n.enabled&&n.order<u.order}),r;return f||(r="`"+t+"`",console.warn("`"+i+"` modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")),f}function di(n){return"end"===n?"start":"start"===n?"end":n}function ni(n){var r=1<arguments.length&&void 0!==arguments[1]&&arguments[1],t=ut.indexOf(n),i=ut.slice(t+1).concat(ut.slice(0,t));return r?i.reverse():i}function gi(n,r,u,f){var h=n.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+h[1],e=h[2],s,c,l;if(!o)return n;if(0===e.indexOf("%")){switch(e){case"%p":s=u;break;case"%":case"%r":default:s=f}return c=i(s),c[r]/100*o}return"vh"===e||"vw"===e?(l="vh"===e?t(document.documentElement.clientHeight,window.innerHeight||0):t(document.documentElement.clientWidth,window.innerWidth||0),l/100*o):o}function nr(n,t,i,r){var s=[0,0],c=-1!==["right","left"].indexOf(r),u=n.split(/(\+|\-)/).map(function(n){return n.trim()}),f=u.indexOf(h(u,function(n){return-1!==n.search(/,|\s/)})),o,e;return u[f]&&-1===u[f].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead."),o=/\s*,\s*|\s+/,e=-1===f?[u]:[u.slice(0,f).concat([u[f].split(o)[0]]),[u[f].split(o)[1]].concat(u.slice(f+1))],e=e.map(function(n,r){var f=(1===r?!c:c)?"height":"width",u=!1;return n.reduce(function(n,t){return""===n[n.length-1]&&-1!==["+","-"].indexOf(t)?(n[n.length-1]=t,u=!0,n):u?(n[n.length-1]+=t,u=!1,n):n.concat(t)},[]).map(function(n){return gi(n,f,t,i)})}),e.forEach(function(n,t){n.forEach(function(i,r){nt(i)&&(s[t]+=i*("-"===n[r-1]?-1:1))})}),s}function tr(n,t){var r,f=t.offset,o=n.placement,e=n.offsets,i=e.popper,s=e.reference,u=o.split("-")[0];return r=nt(+f)?[+f,0]:nr(f,i,s,u),"left"===u?(i.top+=r[0],i.left-=r[1]):"right"===u?(i.top+=r[0],i.left+=r[1]):"top"===u?(i.left+=r[0],i.top-=r[1]):"bottom"===u&&(i.left+=r[0],i.top+=r[1]),n.popper=i,n}for(var ti=Math.min,it=Math.round,a=Math.floor,t=Math.max,v="undefined"!=typeof window&&"undefined"!=typeof document,ii=["Edge","Trident","Firefox"],ri=0,rt=0;rt<ii.length;rt+=1)if(v&&0<=navigator.userAgent.indexOf(ii[rt])){ri=1;break}var ir=v&&window.Promise,rr=ir?function(n){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1;n()}))}}:function(n){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1;n()},ri))}},ui=v&&!!(window.MSInputMethodContext&&document.documentMode),fi=v&&/MSIE 10/.test(navigator.userAgent),ur=function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");},fr=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),o=function(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n},n=Object.assign||function(n){for(var t,i,r=1;r<arguments.length;r++)for(i in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]);return n},ei=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],ut=ei.slice(3),ft={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},y=function(){function t(i,r){var u=this,f=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},e;ur(this,t);this.scheduleUpdate=function(){return requestAnimationFrame(u.update)};this.update=rr(this.update.bind(this));this.options=n({},t.Defaults,f);this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]};this.reference=i&&i.jquery?i[0]:i;this.popper=r&&r.jquery?r[0]:r;this.options.modifiers={};Object.keys(n({},t.Defaults.modifiers,f.modifiers)).forEach(function(i){u.options.modifiers[i]=n({},t.Defaults.modifiers[i]||{},f.modifiers?f.modifiers[i]:{})});this.modifiers=Object.keys(this.options.modifiers).map(function(t){return n({name:t},u.options.modifiers[t])}).sort(function(n,t){return n.order-t.order});this.modifiers.forEach(function(n){n.enabled&&et(n.onLoad)&&n.onLoad(u.reference,u.popper,u.options,n,u.state)});this.update();e=this.options.eventsEnabled;e&&this.enableEventListeners();this.state.eventsEnabled=e}return fr(t,[{key:"update",value:function(){return ai.call(this)}},{key:"destroy",value:function(){return vi.call(this)}},{key:"enableEventListeners",value:function(){return pi.call(this)}},{key:"disableEventListeners",value:function(){return bi.call(this)}}]),t}();return y.Utils=("undefined"==typeof window?global:window).PopperUtils,y.placements=ei,y.Defaults={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var u=t.placement,l=u.split("-")[0],f=u.split("-")[1];if(f){var e=t.offsets,r=e.reference,s=e.popper,h=-1!==["bottom","top"].indexOf(l),i=h?"left":"top",c=h?"width":"height",a={start:o({},i,r[i]),end:o({},i,r[i]+r[c]-s[c])};t.offsets.popper=n({},s,a[f])}return t}},offset:{order:200,enabled:!0,fn:tr,offset:0},preventOverflow:{order:300,enabled:!0,fn:function(i,r){var h=r.boundariesElement||f(i.instance.popper),s;i.instance.reference===h&&(h=f(h));var c=g("transform"),e=i.instance.popper.style,l=e.top,a=e.left,v=e[c];e.top="";e.left="";e[c]="";s=d(i.instance.popper,i.instance.reference,r.padding,h,i.positionFixed);e.top=l;e.left=a;e[c]=v;r.boundaries=s;var y=r.priority,u=i.offsets.popper,p={primary:function(n){var i=u[n];return u[n]<s[n]&&!r.escapeWithReference&&(i=t(u[n],s[n])),o({},n,i)},secondary:function(n){var t="right"===n?"left":"top",i=u[t];return u[n]>s[n]&&!r.escapeWithReference&&(i=ti(u[t],s[n]-("right"===n?u.width:u.height))),o({},t,i)}};return y.forEach(function(t){var i=-1===["left","top"].indexOf(t)?"secondary":"primary";u=n({},u,p[i](t))}),i.offsets.popper=u,i},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(n){var o=n.offsets,u=o.popper,i=o.reference,s=n.placement.split("-")[0],r=a,f=-1!==["top","bottom"].indexOf(s),e=f?"right":"bottom",t=f?"left":"top",h=f?"width":"height";return u[e]<r(i[t])&&(n.offsets.popper[t]=r(i[t])-u[h]),u[t]>r(i[e])&&(n.offsets.popper[t]=r(i[e])),n}},arrow:{order:500,enabled:!0,fn:function(n,u){var l,e;if(!gt(n.instance.modifiers,"arrow","keepTogether"))return n;if(e=u.element,"string"==typeof e){if(e=n.instance.popper.querySelector(e),!e)return n}else if(!n.instance.popper.contains(e))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),n;var d=n.placement.split("-")[0],b=n.offsets,c=b.popper,s=b.reference,a=-1!==["left","right"].indexOf(d),y=a?"height":"width",p=a?"Top":"Left",f=p.toLowerCase(),g=a?"left":"top",v=a?"bottom":"right",h=yt(e)[y];s[v]-h<c[f]&&(n.offsets.popper[f]-=c[f]-(s[v]-h));s[f]+h>c[v]&&(n.offsets.popper[f]+=s[f]+h-c[v]);n.offsets.popper=i(n.offsets.popper);var nt=s[f]+s[y]/2-h/2,k=r(n.instance.popper),tt=parseFloat(k["margin"+p],10),rt=parseFloat(k["border"+p+"Width"],10),w=nt-n.offsets.popper[f]-tt-rt;return w=t(ti(c[y]-h,w),0),n.arrowElement=e,n.offsets.arrow=(l={},o(l,f,it(w)),o(l,g,""),l),n},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,i){if(bt(t.instance.modifiers,"inner")||t.flipped&&t.placement===t.originalPlacement)return t;var e=d(t.instance.popper,t.instance.reference,i.padding,i.boundariesElement,t.positionFixed),r=t.placement.split("-")[0],o=l(r),u=t.placement.split("-")[1]||"",f=[];switch(i.behavior){case ft.FLIP:f=[r,o];break;case ft.CLOCKWISE:f=ni(r);break;case ft.COUNTERCLOCKWISE:f=ni(r,!0);break;default:f=i.behavior}return f.forEach(function(s,h){if(r!==s||f.length===h+1)return t;r=t.placement.split("-")[0];o=l(r);var v=t.offsets.popper,y=t.offsets.reference,c=a,w="left"===r&&c(v.right)>c(y.left)||"right"===r&&c(v.left)<c(y.right)||"top"===r&&c(v.bottom)>c(y.top)||"bottom"===r&&c(v.top)<c(y.bottom),b=c(v.left)<c(e.left),k=c(v.right)>c(e.right),d=c(v.top)<c(e.top),g=c(v.bottom)>c(e.bottom),nt="left"===r&&b||"right"===r&&k||"top"===r&&d||"bottom"===r&&g,p=-1!==["top","bottom"].indexOf(r),tt=!!i.flipVariations&&(p&&"start"===u&&b||p&&"end"===u&&k||!p&&"start"===u&&d||!p&&"end"===u&&g);(w||nt||tt)&&(t.flipped=!0,(w||nt)&&(r=f[h+1]),tt&&(u=di(u)),t.placement=r+(u?"-"+u:""),t.offsets.popper=n({},t.offsets.popper,pt(t.instance.popper,t.offsets.reference,t.placement)),t=wt(t.instance.modifiers,t,"flip"))}),t},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(n){var u=n.placement,t=u.split("-")[0],f=n.offsets,r=f.popper,o=f.reference,e=-1!==["left","right"].indexOf(t),s=-1===["top","left"].indexOf(t);return r[e?"left":"top"]=o[t]-(s?r[e?"width":"height"]:0),n.placement=l(u),n.offsets.popper=i(r),n}},hide:{order:800,enabled:!0,fn:function(n){if(!gt(n.instance.modifiers,"hide","preventOverflow"))return n;var t=n.offsets.reference,i=h(n.instance.modifiers,function(n){return"preventOverflow"===n.name}).boundaries;if(t.bottom<i.top||t.left>i.right||t.top>i.bottom||t.right<i.left){if(!0===n.hide)return n;n.hide=!0;n.attributes["x-out-of-boundaries"]=""}else{if(!1===n.hide)return n;n.hide=!1;n.attributes["x-out-of-boundaries"]=!1}return n}},computeStyle:{order:850,enabled:!0,fn:function(t,i){var nt=i.x,tt=i.y,u=t.offsets.popper,c=h(t.instance.modifiers,function(n){return"applyStyle"===n.name}).gpuAcceleration,y,p,w;void 0!==c&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var l,v,rt=void 0===c?i.gpuAcceleration:c,ut=f(t.instance.popper),k=b(ut),r={position:u.position},s={left:a(u.left),top:it(u.top),bottom:it(u.bottom),right:a(u.right)},e="bottom"===nt?"top":"bottom",o="right"===tt?"left":"right",d=g("transform");return(v="bottom"==e?-k.height+s.bottom:s.top,l="right"==o?-k.width+s.right:s.left,rt&&d)?(r[d]="translate3d("+l+"px, "+v+"px, 0)",r[e]=0,r[o]=0,r.willChange="transform"):(y="bottom"==e?-1:1,p="right"==o?-1:1,r[e]=v*y,r[o]=l*p,r.willChange=e+", "+o),w={"x-placement":t.placement},t.attributes=n({},w,t.attributes),t.styles=n({},r,t.styles),t.arrowStyles=n({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(n){return tt(n.instance.popper,n.styles),ki(n.instance.popper,n.attributes),n.arrowElement&&Object.keys(n.arrowStyles).length&&tt(n.arrowElement,n.arrowStyles),n},onLoad:function(n,t,i,r,u){var f=vt(u,t,n,i.positionFixed),e=at(i.placement,f,t,n,i.modifiers.flip.boundariesElement,i.modifiers.flip.padding);return t.setAttribute("x-placement",e),tt(t,{position:i.positionFixed?"fixed":"absolute"}),i},gpuAcceleration:void 0}}},y}),function(n,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("jquery"),require("popper.js")):typeof define=="function"&&define.amd?define(["exports","jquery","popper.js"],t):t(n.bootstrap={},n.jQuery,n.Popper)}(this,function(n,t,i){"use strict";function o(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function f(n,t,i){return t&&o(n.prototype,t),i&&o(n,i),n}function s(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n}function u(n){for(var t,i,r=1;r<arguments.length;r++)t=arguments[r]!=null?arguments[r]:{},i=Object.keys(t),typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),i.forEach(function(i){s(n,i,t[i])});return n}function h(n,t){n.prototype=Object.create(t.prototype);n.prototype.constructor=n;n.__proto__=t}t=t&&t.hasOwnProperty("default")?t["default"]:t;i=i&&i.hasOwnProperty("default")?i["default"]:i;var r=function(n){function r(n){return{}.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase()}function u(){return{bindType:i,delegateType:i,handle:function(t){return n(t.target).is(this)?t.handleObj.handler.apply(this,arguments):undefined}}}function f(i){var u=this,r=!1;n(this).one(t.TRANSITION_END,function(){r=!0});return setTimeout(function(){r||t.triggerTransitionEnd(u)},i),this}function e(){n.fn.emulateTransitionEnd=f;n.event.special[t.TRANSITION_END]=u()}var i="transitionend",o=1e6,s=1e3,t={TRANSITION_END:"bsTransitionEnd",getUID:function(n){do n+=~~(Math.random()*o);while(document.getElementById(n));return n},getSelectorFromElement:function(n){var t=n.getAttribute("data-target");t&&t!=="#"||(t=n.getAttribute("href")||"");try{return document.querySelector(t)?t:null}catch(i){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var i=n(t).css("transition-duration"),r=parseFloat(i);return r?(i=i.split(",")[0],parseFloat(i)*s):0},reflow:function(n){return n.offsetHeight},triggerTransitionEnd:function(t){n(t).trigger(i)},supportsTransitionEnd:function(){return Boolean(i)},isElement:function(n){return(n[0]||n).nodeType},typeCheckConfig:function(n,i,u){var f;for(f in u)if(Object.prototype.hasOwnProperty.call(u,f)){var o=u[f],e=i[f],s=e&&t.isElement(e)?"element":r(e);if(!new RegExp(o).test(s))throw new Error(n.toUpperCase()+": "+('Option "'+f+'" provided type "'+s+'" ')+('but expected type "'+o+'".'));}}};return e(),t}(t),c=function(n){var i="alert",h="4.1.3",u="bs.alert",e="."+u,c=n.fn[i],o={CLOSE:"close"+e,CLOSED:"closed"+e,CLICK_DATA_API:"click"+e+".data-api"},s={ALERT:"alert",FADE:"fade",SHOW:"show"},t=function(){function t(n){this._element=n}var i=t.prototype;return i.close=function(n){var t=this._element,i;(n&&(t=this._getRootElement(n)),i=this._triggerCloseEvent(t),i.isDefaultPrevented())||this._removeElement(t)},i.dispose=function(){n.removeData(this._element,u);this._element=null},i._getRootElement=function(t){var u=r.getSelectorFromElement(t),i=!1;return u&&(i=document.querySelector(u)),i||(i=n(t).closest("."+s.ALERT)[0]),i},i._triggerCloseEvent=function(t){var i=n.Event(o.CLOSE);return n(t).trigger(i),i},i._removeElement=function(t){var u=this,i;if(n(t).removeClass(s.SHOW),!n(t).hasClass(s.FADE)){this._destroyElement(t);return}i=r.getTransitionDurationFromElement(t);n(t).one(r.TRANSITION_END,function(n){return u._destroyElement(t,n)}).emulateTransitionEnd(i)},i._destroyElement=function(t){n(t).detach().trigger(o.CLOSED).remove()},t._jQueryInterface=function(i){return this.each(function(){var f=n(this),r=f.data(u);r||(r=new t(this),f.data(u,r));i==="close"&&r[i](this)})},t._handleDismiss=function(n){return function(t){t&&t.preventDefault();n.close(this)}},f(t,null,[{key:"VERSION",get:function(){return h}}]),t}();n(document).on(o.CLICK_DATA_API,{DISMISS:'[data-dismiss="alert"]'}.DISMISS,t._handleDismiss(new t));return n.fn[i]=t._jQueryInterface,n.fn[i].Constructor=t,n.fn[i].noConflict=function(){return n.fn[i]=c,t._jQueryInterface},t}(t),l=function(n){var r="button",c="4.1.3",e="bs.button",o="."+e,s=".data-api",l=n.fn[r],t={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},i={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},h={CLICK_DATA_API:"click"+o+s,FOCUS_BLUR_DATA_API:"focus"+o+s+" "+("blur"+o+s)},u=function(){function r(n){this._element=n}var u=r.prototype;return u.toggle=function(){var f=!0,o=!0,u=n(this._element).closest(i.DATA_TOGGLE)[0],r,e;if(u&&(r=this._element.querySelector(i.INPUT),r)){if(r.type==="radio"&&(r.checked&&this._element.classList.contains(t.ACTIVE)?f=!1:(e=u.querySelector(i.ACTIVE),e&&n(e).removeClass(t.ACTIVE))),f){if(r.hasAttribute("disabled")||u.hasAttribute("disabled")||r.classList.contains("disabled")||u.classList.contains("disabled"))return;r.checked=!this._element.classList.contains(t.ACTIVE);n(r).trigger("change")}r.focus();o=!1}o&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(t.ACTIVE));f&&n(this._element).toggleClass(t.ACTIVE)},u.dispose=function(){n.removeData(this._element,e);this._element=null},r._jQueryInterface=function(t){return this.each(function(){var i=n(this).data(e);i||(i=new r(this),n(this).data(e,i));t==="toggle"&&i[t]()})},f(r,null,[{key:"VERSION",get:function(){return c}}]),r}();n(document).on(h.CLICK_DATA_API,i.DATA_TOGGLE_CARROT,function(r){r.preventDefault();var f=r.target;n(f).hasClass(t.BUTTON)||(f=n(f).closest(i.BUTTON));u._jQueryInterface.call(n(f),"toggle")}).on(h.FOCUS_BLUR_DATA_API,i.DATA_TOGGLE_CARROT,function(r){var u=n(r.target).closest(i.BUTTON)[0];n(u).toggleClass(t.FOCUS,/^focus(in)?$/.test(r.type))});return n.fn[r]=u._jQueryInterface,n.fn[r].Constructor=u,n.fn[r].noConflict=function(){return n.fn[r]=l,u._jQueryInterface},u}(t),a=function(n){var h="carousel",y="4.1.3",l="bs.carousel",e="."+l,v=".data-api",p=n.fn[h],w=37,b=39,k=500,a={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},d={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},i={NEXT:"next",PREV:"prev",LEFT:"left",RIGHT:"right"},o={SLIDE:"slide"+e,SLID:"slid"+e,KEYDOWN:"keydown"+e,MOUSEENTER:"mouseenter"+e,MOUSELEAVE:"mouseleave"+e,TOUCHEND:"touchend"+e,LOAD_DATA_API:"load"+e+v,CLICK_DATA_API:"click"+e+v},t={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"carousel-item-right",LEFT:"carousel-item-left",NEXT:"carousel-item-next",PREV:"carousel-item-prev",ITEM:"carousel-item"},s={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},c=function(){function v(t,i){this._items=null;this._interval=null;this._activeElement=null;this._isPaused=!1;this._isSliding=!1;this.touchTimeout=null;this._config=this._getConfig(i);this._element=n(t)[0];this._indicatorsElement=this._element.querySelector(s.INDICATORS);this._addEventListeners()}var c=v.prototype;return c.next=function(){this._isSliding||this._slide(i.NEXT)},c.nextWhenVisible=function(){!document.hidden&&n(this._element).is(":visible")&&n(this._element).css("visibility")!=="hidden"&&this.next()},c.prev=function(){this._isSliding||this._slide(i.PREV)},c.pause=function(n){n||(this._isPaused=!0);this._element.querySelector(s.NEXT_PREV)&&(r.triggerTransitionEnd(this._element),this.cycle(!0));clearInterval(this._interval);this._interval=null},c.cycle=function(n){n||(this._isPaused=!1);this._interval&&(clearInterval(this._interval),this._interval=null);this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},c.to=function(t){var f=this,r,u;if(this._activeElement=this._element.querySelector(s.ACTIVE_ITEM),r=this._getItemIndex(this._activeElement),!(t>this._items.length-1)&&!(t<0)){if(this._isSliding){n(this._element).one(o.SLID,function(){return f.to(t)});return}if(r===t){this.pause();this.cycle();return}u=t>r?i.NEXT:i.PREV;this._slide(u,this._items[t])}},c.dispose=function(){n(this._element).off(e);n.removeData(this._element,l);this._items=null;this._config=null;this._element=null;this._interval=null;this._isPaused=null;this._isSliding=null;this._activeElement=null;this._indicatorsElement=null},c._getConfig=function(n){return n=u({},a,n),r.typeCheckConfig(h,n,d),n},c._addEventListeners=function(){var t=this;if(this._config.keyboard)n(this._element).on(o.KEYDOWN,function(n){return t._keydown(n)});if(this._config.pause==="hover"){n(this._element).on(o.MOUSEENTER,function(n){return t.pause(n)}).on(o.MOUSELEAVE,function(n){return t.cycle(n)});if("ontouchstart"in document.documentElement)n(this._element).on(o.TOUCHEND,function(){t.pause();t.touchTimeout&&clearTimeout(t.touchTimeout);t.touchTimeout=setTimeout(function(n){return t.cycle(n)},k+t._config.interval)})}},c._keydown=function(n){if(!/input|textarea/i.test(n.target.tagName))switch(n.which){case w:n.preventDefault();this.prev();break;case b:n.preventDefault();this.next()}},c._getItemIndex=function(n){return this._items=n&&n.parentNode?[].slice.call(n.parentNode.querySelectorAll(s.ITEM)):[],this._items.indexOf(n)},c._getItemByDirection=function(n,t){var e=n===i.NEXT,o=n===i.PREV,r=this._getItemIndex(t),s=this._items.length-1,h=o&&r===0||e&&r===s,f,u;return h&&!this._config.wrap?t:(f=n===i.PREV?-1:1,u=(r+f)%this._items.length,u===-1?this._items[this._items.length-1]:this._items[u])},c._triggerSlideEvent=function(t,i){var u=this._getItemIndex(t),f=this._getItemIndex(this._element.querySelector(s.ACTIVE_ITEM)),r=n.Event(o.SLIDE,{relatedTarget:t,direction:i,from:f,to:u});return n(this._element).trigger(r),r},c._setActiveIndicatorElement=function(i){var u,r;this._indicatorsElement&&(u=[].slice.call(this._indicatorsElement.querySelectorAll(s.ACTIVE)),n(u).removeClass(t.ACTIVE),r=this._indicatorsElement.children[this._getItemIndex(i)],r&&n(r).addClass(t.ACTIVE))},c._slide=function(u,f){var y=this,h=this._element.querySelector(s.ACTIVE_ITEM),k=this._getItemIndex(h),e=f||h&&this._getItemByDirection(u,h),d=this._getItemIndex(e),p=Boolean(this._interval),c,l,a,w,v,b;if(u===i.NEXT?(c=t.LEFT,l=t.NEXT,a=i.LEFT):(c=t.RIGHT,l=t.PREV,a=i.RIGHT),e&&n(e).hasClass(t.ACTIVE)){this._isSliding=!1;return}(w=this._triggerSlideEvent(e,a),w.isDefaultPrevented())||h&&e&&(this._isSliding=!0,p&&this.pause(),this._setActiveIndicatorElement(e),v=n.Event(o.SLID,{relatedTarget:e,direction:a,from:k,to:d}),n(this._element).hasClass(t.SLIDE)?(n(e).addClass(l),r.reflow(e),n(h).addClass(c),n(e).addClass(c),b=r.getTransitionDurationFromElement(h),n(h).one(r.TRANSITION_END,function(){n(e).removeClass(c+" "+l).addClass(t.ACTIVE);n(h).removeClass(t.ACTIVE+" "+l+" "+c);y._isSliding=!1;setTimeout(function(){return n(y._element).trigger(v)},0)}).emulateTransitionEnd(b)):(n(h).removeClass(t.ACTIVE),n(e).addClass(t.ACTIVE),this._isSliding=!1,n(this._element).trigger(v)),p&&this.cycle())},v._jQueryInterface=function(t){return this.each(function(){var i=n(this).data(l),r=u({},a,n(this).data()),f;if(typeof t=="object"&&(r=u({},r,t)),f=typeof t=="string"?t:r.slide,i||(i=new v(this,r),n(this).data(l,i)),typeof t=="number")i.to(t);else if(typeof f=="string"){if(typeof i[f]=="undefined")throw new TypeError('No method named "'+f+'"');i[f]()}else r.interval&&(i.pause(),i.cycle())})},v._dataApiClickHandler=function(i){var s=r.getSelectorFromElement(this),f,o,e;s&&(f=n(s)[0],f&&n(f).hasClass(t.CAROUSEL))&&(o=u({},n(f).data(),n(this).data()),e=this.getAttribute("data-slide-to"),e&&(o.interval=!1),v._jQueryInterface.call(n(f),o),e&&n(f).data(l).to(e),i.preventDefault())},f(v,null,[{key:"VERSION",get:function(){return y}},{key:"Default",get:function(){return a}}]),v}();n(document).on(o.CLICK_DATA_API,s.DATA_SLIDE,c._dataApiClickHandler);n(window).on(o.LOAD_DATA_API,function(){for(var t,r=[].slice.call(document.querySelectorAll(s.DATA_RIDE)),i=0,u=r.length;i<u;i++)t=n(r[i]),c._jQueryInterface.call(t,t.data())});return n.fn[h]=c._jQueryInterface,n.fn[h].Constructor=c,n.fn[h].noConflict=function(){return n.fn[h]=p,c._jQueryInterface},c}(t),v=function(n){var e="collapse",v="4.1.3",i="bs.collapse",o="."+i,y=n.fn[e],c={toggle:!0,parent:""},p={toggle:"boolean",parent:"(string|element)"},s={SHOW:"show"+o,SHOWN:"shown"+o,HIDE:"hide"+o,HIDDEN:"hidden"+o,CLICK_DATA_API:"click"+o+".data-api"},t={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},l={WIDTH:"width",HEIGHT:"height"},a={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},h=function(){function h(t,i){var f,u,o;for(this._isTransitioning=!1,this._element=t,this._config=this._getConfig(i),this._triggerArray=n.makeArray(document.querySelectorAll('[data-toggle="collapse"][href="#'+t.id+'"],'+('[data-toggle="collapse"][data-target="#'+t.id+'"]'))),f=[].slice.call(document.querySelectorAll(a.DATA_TOGGLE)),u=0,o=f.length;u<o;u++){var s=f[u],e=r.getSelectorFromElement(s),h=[].slice.call(document.querySelectorAll(e)).filter(function(n){return n===t});e!==null&&h.length>0&&(this._selector=e,this._triggerArray.push(s))}this._parent=this._config.parent?this._getParent():null;this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray);this._config.toggle&&this.toggle()}var o=h.prototype;return o.toggle=function(){n(this._element).hasClass(t.SHOW)?this.hide():this.show()},o.show=function(){var e=this,u,o,c,f;if(!this._isTransitioning&&!n(this._element).hasClass(t.SHOW)&&(this._parent&&(u=[].slice.call(this._parent.querySelectorAll(a.ACTIVES)).filter(function(n){return n.getAttribute("data-parent")===e._config.parent}),u.length===0&&(u=null)),!u||(o=n(u).not(this._selector).data(i),!o||!o._isTransitioning))&&(c=n.Event(s.SHOW),n(this._element).trigger(c),!c.isDefaultPrevented())){u&&(h._jQueryInterface.call(n(u).not(this._selector),"hide"),o||n(u).data(i,null));f=this._getDimension();n(this._element).removeClass(t.COLLAPSE).addClass(t.COLLAPSING);this._element.style[f]=0;this._triggerArray.length&&n(this._triggerArray).removeClass(t.COLLAPSED).attr("aria-expanded",!0);this.setTransitioning(!0);var l=function(){n(e._element).removeClass(t.COLLAPSING).addClass(t.COLLAPSE).addClass(t.SHOW);e._element.style[f]="";e.setTransitioning(!1);n(e._element).trigger(s.SHOWN)},v=f[0].toUpperCase()+f.slice(1),y="scroll"+v,p=r.getTransitionDurationFromElement(this._element);n(this._element).one(r.TRANSITION_END,l).emulateTransitionEnd(p);this._element.style[f]=this._element[y]+"px"}},o.hide=function(){var c=this,f,i,e,u,o,h,l,a,v;if(!this._isTransitioning&&n(this._element).hasClass(t.SHOW)&&(f=n.Event(s.HIDE),n(this._element).trigger(f),!f.isDefaultPrevented())){if(i=this._getDimension(),this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",r.reflow(this._element),n(this._element).addClass(t.COLLAPSING).removeClass(t.COLLAPSE).removeClass(t.SHOW),e=this._triggerArray.length,e>0)for(u=0;u<e;u++)o=this._triggerArray[u],h=r.getSelectorFromElement(o),h!==null&&(l=n([].slice.call(document.querySelectorAll(h))),l.hasClass(t.SHOW)||n(o).addClass(t.COLLAPSED).attr("aria-expanded",!1));this.setTransitioning(!0);a=function(){c.setTransitioning(!1);n(c._element).removeClass(t.COLLAPSING).addClass(t.COLLAPSE).trigger(s.HIDDEN)};this._element.style[i]="";v=r.getTransitionDurationFromElement(this._element);n(this._element).one(r.TRANSITION_END,a).emulateTransitionEnd(v)}},o.setTransitioning=function(n){this._isTransitioning=n},o.dispose=function(){n.removeData(this._element,i);this._config=null;this._parent=null;this._element=null;this._triggerArray=null;this._isTransitioning=null},o._getConfig=function(n){return n=u({},c,n),n.toggle=Boolean(n.toggle),r.typeCheckConfig(e,n,p),n},o._getDimension=function(){var t=n(this._element).hasClass(l.WIDTH);return t?l.WIDTH:l.HEIGHT},o._getParent=function(){var f=this,t=null,i,u;return r.isElement(this._config.parent)?(t=this._config.parent,typeof this._config.parent.jquery!="undefined"&&(t=this._config.parent[0])):t=document.querySelector(this._config.parent),i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',u=[].slice.call(t.querySelectorAll(i)),n(u).each(function(n,t){f._addAriaAndCollapsedClass(h._getTargetFromElement(t),[t])}),t},o._addAriaAndCollapsedClass=function(i,r){if(i){var u=n(i).hasClass(t.SHOW);r.length&&n(r).toggleClass(t.COLLAPSED,!u).attr("aria-expanded",u)}},h._getTargetFromElement=function(n){var t=r.getSelectorFromElement(n);return t?document.querySelector(t):null},h._jQueryInterface=function(t){return this.each(function(){var f=n(this),r=f.data(i),e=u({},c,f.data(),typeof t=="object"&&t?t:{});if(!r&&e.toggle&&/show|hide/.test(t)&&(e.toggle=!1),r||(r=new h(this,e),f.data(i,r)),typeof t=="string"){if(typeof r[t]=="undefined")throw new TypeError('No method named "'+t+'"');r[t]()}})},f(h,null,[{key:"VERSION",get:function(){return v}},{key:"Default",get:function(){return c}}]),h}();n(document).on(s.CLICK_DATA_API,a.DATA_TOGGLE,function(t){t.currentTarget.tagName==="A"&&t.preventDefault();var u=n(this),f=r.getSelectorFromElement(this),e=[].slice.call(document.querySelectorAll(f));n(e).each(function(){var t=n(this),r=t.data(i),f=r?"toggle":u.data();h._jQueryInterface.call(t,f)})});return n.fn[e]=h._jQueryInterface,n.fn[e].Constructor=h,n.fn[e].noConflict=function(){return n.fn[e]=y,h._jQueryInterface},h}(t),y=function(n){var c="dropdown",d="4.1.3",a="bs.dropdown",s="."+a,y=".data-api",g=n.fn[c],v=27,p=32,k=9,w=38,b=40,nt=3,tt=new RegExp(w+"|"+b+"|"+v),e={HIDE:"hide"+s,HIDDEN:"hidden"+s,SHOW:"show"+s,SHOWN:"shown"+s,CLICK:"click"+s,CLICK_DATA_API:"click"+s+y,KEYDOWN_DATA_API:"keydown"+s+y,KEYUP_DATA_API:"keyup"+s+y},t={DISABLED:"disabled",SHOW:"show",DROPUP:"dropup",DROPRIGHT:"dropright",DROPLEFT:"dropleft",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",POSITION_STATIC:"position-static"},o={DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",MENU:".dropdown-menu",NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)"},l={TOP:"top-start",TOPEND:"top-end",BOTTOM:"bottom-start",BOTTOMEND:"bottom-end",RIGHT:"right-start",RIGHTEND:"right-end",LEFT:"left-start",LEFTEND:"left-end"},it={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic"},rt={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string"},h=function(){function h(n,t){this._element=n;this._popper=null;this._config=this._getConfig(t);this._menu=this._getMenuElement();this._inNavbar=this._detectNavbar();this._addEventListeners()}var y=h.prototype;return y.toggle=function(){var u,l,s,c,f;if(!this._element.disabled&&!n(this._element).hasClass(t.DISABLED)&&(u=h._getParentFromElement(this._element),l=n(this._menu).hasClass(t.SHOW),h._clearMenus(),!l)&&(s={relatedTarget:this._element},c=n.Event(e.SHOW,s),n(u).trigger(c),!c.isDefaultPrevented())){if(!this._inNavbar){if(typeof i=="undefined")throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)");f=this._element;this._config.reference==="parent"?f=u:r.isElement(this._config.reference)&&(f=this._config.reference,typeof this._config.reference.jquery!="undefined"&&(f=this._config.reference[0]));this._config.boundary!=="scrollParent"&&n(u).addClass(t.POSITION_STATIC);this._popper=new i(f,this._menu,this._getPopperConfig())}if("ontouchstart"in document.documentElement&&n(u).closest(o.NAVBAR_NAV).length===0)n(document.body).children().on("mouseover",null,n.noop);this._element.focus();this._element.setAttribute("aria-expanded",!0);n(this._menu).toggleClass(t.SHOW);n(u).toggleClass(t.SHOW).trigger(n.Event(e.SHOWN,s))}},y.dispose=function(){n.removeData(this._element,a);n(this._element).off(s);this._element=null;this._menu=null;this._popper!==null&&(this._popper.destroy(),this._popper=null)},y.update=function(){this._inNavbar=this._detectNavbar();this._popper!==null&&this._popper.scheduleUpdate()},y._addEventListeners=function(){var t=this;n(this._element).on(e.CLICK,function(n){n.preventDefault();n.stopPropagation();t.toggle()})},y._getConfig=function(t){return t=u({},this.constructor.Default,n(this._element).data(),t),r.typeCheckConfig(c,t,this.constructor.DefaultType),t},y._getMenuElement=function(){if(!this._menu){var n=h._getParentFromElement(this._element);n&&(this._menu=n.querySelector(o.MENU))}return this._menu},y._getPlacement=function(){var r=n(this._element.parentNode),i=l.BOTTOM;return r.hasClass(t.DROPUP)?(i=l.TOP,n(this._menu).hasClass(t.MENURIGHT)&&(i=l.TOPEND)):r.hasClass(t.DROPRIGHT)?i=l.RIGHT:r.hasClass(t.DROPLEFT)?i=l.LEFT:n(this._menu).hasClass(t.MENURIGHT)&&(i=l.BOTTOMEND),i},y._detectNavbar=function(){return n(this._element).closest(".navbar").length>0},y._getPopperConfig=function(){var i=this,n={},t;return typeof this._config.offset=="function"?n.fn=function(n){return n.offsets=u({},n.offsets,i._config.offset(n.offsets)||{}),n}:n.offset=this._config.offset,t={placement:this._getPlacement(),modifiers:{offset:n,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}},this._config.display==="static"&&(t.modifiers.applyStyle={enabled:!1}),t},h._jQueryInterface=function(t){return this.each(function(){var i=n(this).data(a),r=typeof t=="object"?t:null;if(i||(i=new h(this,r),n(this).data(a,i)),typeof t=="string"){if(typeof i[t]=="undefined")throw new TypeError('No method named "'+t+'"');i[t]()}})},h._clearMenus=function(i){var u,r,l,v,s;if(!i||i.which!==nt&&(i.type!=="keyup"||i.which===k))for(u=[].slice.call(document.querySelectorAll(o.DATA_TOGGLE)),r=0,l=u.length;r<l;r++){var f=h._getParentFromElement(u[r]),y=n(u[r]).data(a),c={relatedTarget:u[r]};(i&&i.type==="click"&&(c.clickEvent=i),y)&&(v=y._menu,n(f).hasClass(t.SHOW))&&(i&&(i.type==="click"&&/input|textarea/i.test(i.target.tagName)||i.type==="keyup"&&i.which===k)&&n.contains(f,i.target)||(s=n.Event(e.HIDE,c),n(f).trigger(s),s.isDefaultPrevented())||("ontouchstart"in document.documentElement&&n(document.body).children().off("mouseover",null,n.noop),u[r].setAttribute("aria-expanded","false"),n(v).removeClass(t.SHOW),n(f).removeClass(t.SHOW).trigger(n.Event(e.HIDDEN,c))))}},h._getParentFromElement=function(n){var t,i=r.getSelectorFromElement(n);return i&&(t=document.querySelector(i)),t||n.parentNode},h._dataApiKeydownHandler=function(i){var f,e,s,u,r;if((/input|textarea/i.test(i.target.tagName)?i.which!==p&&(i.which===v||(i.which===b||i.which===w)&&!n(i.target).closest(o.MENU).length):tt.test(i.which))&&(i.preventDefault(),i.stopPropagation(),!this.disabled&&!n(this).hasClass(t.DISABLED))){if(f=h._getParentFromElement(this),e=n(f).hasClass(t.SHOW),!e&&(i.which!==v||i.which!==p)||e&&(i.which===v||i.which===p)){i.which===v&&(s=f.querySelector(o.DATA_TOGGLE),n(s).trigger("focus"));n(this).trigger("click");return}(u=[].slice.call(f.querySelectorAll(o.VISIBLE_ITEMS)),u.length!==0)&&(r=u.indexOf(i.target),i.which===w&&r>0&&r--,i.which===b&&r<u.length-1&&r++,r<0&&(r=0),u[r].focus())}},f(h,null,[{key:"VERSION",get:function(){return d}},{key:"Default",get:function(){return it}},{key:"DefaultType",get:function(){return rt}}]),h}();n(document).on(e.KEYDOWN_DATA_API,o.DATA_TOGGLE,h._dataApiKeydownHandler).on(e.KEYDOWN_DATA_API,o.MENU,h._dataApiKeydownHandler).on(e.CLICK_DATA_API+" "+e.KEYUP_DATA_API,h._clearMenus).on(e.CLICK_DATA_API,o.DATA_TOGGLE,function(t){t.preventDefault();t.stopPropagation();h._jQueryInterface.call(n(this),"toggle")}).on(e.CLICK_DATA_API,o.FORM_CHILD,function(n){n.stopPropagation()});return n.fn[c]=h._jQueryInterface,n.fn[c].Constructor=h,n.fn[c].noConflict=function(){return n.fn[c]=g,h._jQueryInterface},h}(t,i),p=function(n){var s="modal",a="4.1.3",h="bs.modal",e="."+h,v=n.fn[s],y=27,l={backdrop:!0,keyboard:!0,focus:!0,show:!0},p={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},t={HIDE:"hide"+e,HIDDEN:"hidden"+e,SHOW:"show"+e,SHOWN:"shown"+e,FOCUSIN:"focusin"+e,RESIZE:"resize"+e,CLICK_DISMISS:"click.dismiss"+e,KEYDOWN_DISMISS:"keydown.dismiss"+e,MOUSEUP_DISMISS:"mouseup.dismiss"+e,MOUSEDOWN_DISMISS:"mousedown.dismiss"+e,CLICK_DATA_API:"click"+e+".data-api"},i={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",SHOW:"show"},o={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top"},c=function(){function v(n,t){this._config=this._getConfig(t);this._element=n;this._dialog=n.querySelector(o.DIALOG);this._backdrop=null;this._isShown=!1;this._isBodyOverflowing=!1;this._ignoreBackdropClick=!1;this._scrollbarWidth=0}var c=v.prototype;return c.toggle=function(n){return this._isShown?this.hide():this.show(n)},c.show=function(r){var u=this,f;if(!this._isTransitioning&&!this._isShown&&(n(this._element).hasClass(i.FADE)&&(this._isTransitioning=!0),f=n.Event(t.SHOW,{relatedTarget:r}),n(this._element).trigger(f),!this._isShown&&!f.isDefaultPrevented())){this._isShown=!0;this._checkScrollbar();this._setScrollbar();this._adjustDialog();n(document.body).addClass(i.OPEN);this._setEscapeEvent();this._setResizeEvent();n(this._element).on(t.CLICK_DISMISS,o.DATA_DISMISS,function(n){return u.hide(n)});n(this._dialog).on(t.MOUSEDOWN_DISMISS,function(){n(u._element).one(t.MOUSEUP_DISMISS,function(t){n(t.target).is(u._element)&&(u._ignoreBackdropClick=!0)})});this._showBackdrop(function(){return u._showElement(r)})}},c.hide=function(u){var s=this,f,e,o;(u&&u.preventDefault(),!this._isTransitioning&&this._isShown)&&(f=n.Event(t.HIDE),n(this._element).trigger(f),this._isShown&&!f.isDefaultPrevented())&&(this._isShown=!1,e=n(this._element).hasClass(i.FADE),e&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),n(document).off(t.FOCUSIN),n(this._element).removeClass(i.SHOW),n(this._element).off(t.CLICK_DISMISS),n(this._dialog).off(t.MOUSEDOWN_DISMISS),e?(o=r.getTransitionDurationFromElement(this._element),n(this._element).one(r.TRANSITION_END,function(n){return s._hideModal(n)}).emulateTransitionEnd(o)):this._hideModal())},c.dispose=function(){n.removeData(this._element,h);n(window,document,this._element,this._backdrop).off(e);this._config=null;this._element=null;this._dialog=null;this._backdrop=null;this._isShown=null;this._isBodyOverflowing=null;this._ignoreBackdropClick=null;this._scrollbarWidth=null},c.handleUpdate=function(){this._adjustDialog()},c._getConfig=function(n){return n=u({},l,n),r.typeCheckConfig(s,n,p),n},c._showElement=function(u){var f=this,o=n(this._element).hasClass(i.FADE),s,e,h;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element);this._element.style.display="block";this._element.removeAttribute("aria-hidden");this._element.scrollTop=0;o&&r.reflow(this._element);n(this._element).addClass(i.SHOW);this._config.focus&&this._enforceFocus();s=n.Event(t.SHOWN,{relatedTarget:u});e=function(){f._config.focus&&f._element.focus();f._isTransitioning=!1;n(f._element).trigger(s)};o?(h=r.getTransitionDurationFromElement(this._element),n(this._dialog).one(r.TRANSITION_END,e).emulateTransitionEnd(h)):e()},c._enforceFocus=function(){var i=this;n(document).off(t.FOCUSIN).on(t.FOCUSIN,function(t){document!==t.target&&i._element!==t.target&&n(i._element).has(t.target).length===0&&i._element.focus()})},c._setEscapeEvent=function(){var i=this;if(this._isShown&&this._config.keyboard)n(this._element).on(t.KEYDOWN_DISMISS,function(n){n.which===y&&(n.preventDefault(),i.hide())});else this._isShown||n(this._element).off(t.KEYDOWN_DISMISS)},c._setResizeEvent=function(){var i=this;if(this._isShown)n(window).on(t.RESIZE,function(n){return i.handleUpdate(n)});else n(window).off(t.RESIZE)},c._hideModal=function(){var r=this;this._element.style.display="none";this._element.setAttribute("aria-hidden",!0);this._isTransitioning=!1;this._showBackdrop(function(){n(document.body).removeClass(i.OPEN);r._resetAdjustments();r._resetScrollbar();n(r._element).trigger(t.HIDDEN)})},c._removeBackdrop=function(){this._backdrop&&(n(this._backdrop).remove(),this._backdrop=null)},c._showBackdrop=function(u){var f=this,e=n(this._element).hasClass(i.FADE)?i.FADE:"",s,o,h;if(this._isShown&&this._config.backdrop){this._backdrop=document.createElement("div");this._backdrop.className=i.BACKDROP;e&&this._backdrop.classList.add(e);n(this._backdrop).appendTo(document.body);n(this._element).on(t.CLICK_DISMISS,function(n){if(f._ignoreBackdropClick){f._ignoreBackdropClick=!1;return}n.target===n.currentTarget&&(f._config.backdrop==="static"?f._element.focus():f.hide())});if(e&&r.reflow(this._backdrop),n(this._backdrop).addClass(i.SHOW),!u)return;if(!e){u();return}s=r.getTransitionDurationFromElement(this._backdrop);n(this._backdrop).one(r.TRANSITION_END,u).emulateTransitionEnd(s)}else!this._isShown&&this._backdrop?(n(this._backdrop).removeClass(i.SHOW),o=function(){f._removeBackdrop();u&&u()},n(this._element).hasClass(i.FADE)?(h=r.getTransitionDurationFromElement(this._backdrop),n(this._backdrop).one(r.TRANSITION_END,o).emulateTransitionEnd(h)):o()):u&&u()},c._adjustDialog=function(){var n=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&n&&(this._element.style.paddingLeft=this._scrollbarWidth+"px");this._isBodyOverflowing&&!n&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},c._resetAdjustments=function(){this._element.style.paddingLeft="";this._element.style.paddingRight=""},c._checkScrollbar=function(){var n=document.body.getBoundingClientRect();this._isBodyOverflowing=n.left+n.right<window.innerWidth;this._scrollbarWidth=this._getScrollbarWidth()},c._setScrollbar=function(){var t=this,i,r,u,f;this._isBodyOverflowing&&(i=[].slice.call(document.querySelectorAll(o.FIXED_CONTENT)),r=[].slice.call(document.querySelectorAll(o.STICKY_CONTENT)),n(i).each(function(i,r){var u=r.style.paddingRight,f=n(r).css("padding-right");n(r).data("padding-right",u).css("padding-right",parseFloat(f)+t._scrollbarWidth+"px")}),n(r).each(function(i,r){var u=r.style.marginRight,f=n(r).css("margin-right");n(r).data("margin-right",u).css("margin-right",parseFloat(f)-t._scrollbarWidth+"px")}),u=document.body.style.paddingRight,f=n(document.body).css("padding-right"),n(document.body).data("padding-right",u).css("padding-right",parseFloat(f)+this._scrollbarWidth+"px"))},c._resetScrollbar=function(){var r=[].slice.call(document.querySelectorAll(o.FIXED_CONTENT)),i,t;n(r).each(function(t,i){var r=n(i).data("padding-right");n(i).removeData("padding-right");i.style.paddingRight=r?r:""});i=[].slice.call(document.querySelectorAll(""+o.STICKY_CONTENT));n(i).each(function(t,i){var r=n(i).data("margin-right");typeof r!="undefined"&&n(i).css("margin-right",r).removeData("margin-right")});t=n(document.body).data("padding-right");n(document.body).removeData("padding-right");document.body.style.paddingRight=t?t:""},c._getScrollbarWidth=function(){var n=document.createElement("div"),t;return n.className=i.SCROLLBAR_MEASURER,document.body.appendChild(n),t=n.getBoundingClientRect().width-n.clientWidth,document.body.removeChild(n),t},v._jQueryInterface=function(t,i){return this.each(function(){var r=n(this).data(h),f=u({},l,n(this).data(),typeof t=="object"&&t?t:{});if(r||(r=new v(this,f),n(this).data(h,r)),typeof t=="string"){if(typeof r[t]=="undefined")throw new TypeError('No method named "'+t+'"');r[t](i)}else f.show&&r.show(i)})},f(v,null,[{key:"VERSION",get:function(){return a}},{key:"Default",get:function(){return l}}]),v}();n(document).on(t.CLICK_DATA_API,o.DATA_TOGGLE,function(i){var e=this,f,o=r.getSelectorFromElement(this),s,l;o&&(f=document.querySelector(o));s=n(f).data(h)?"toggle":u({},n(f).data(),n(this).data());(this.tagName==="A"||this.tagName==="AREA")&&i.preventDefault();l=n(f).one(t.SHOW,function(i){if(!i.isDefaultPrevented())l.one(t.HIDDEN,function(){n(e).is(":visible")&&e.focus()})});c._jQueryInterface.call(n(f),s,this)});return n.fn[s]=c._jQueryInterface,n.fn[s].Constructor=c,n.fn[s].noConflict=function(){return n.fn[s]=v,c._jQueryInterface},c}(t),e=function(n){var h="tooltip",y="4.1.3",c="bs.tooltip",t="."+c,p=n.fn[h],a="bs-tooltip",w=new RegExp("(^|\\s)"+a+"\\S+","g"),b={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"},k={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},d={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},s={SHOW:"show",OUT:"out"},g={HIDE:"hide"+t,HIDDEN:"hidden"+t,SHOW:"show"+t,SHOWN:"shown"+t,INSERTED:"inserted"+t,CLICK:"click"+t,FOCUSIN:"focusin"+t,FOCUSOUT:"focusout"+t,MOUSEENTER:"mouseenter"+t,MOUSELEAVE:"mouseleave"+t},e={FADE:"fade",SHOW:"show"},v={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner",ARROW:".arrow"},o={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},l=function(){function p(n,t){if(typeof i=="undefined")throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0;this._timeout=0;this._hoverState="";this._activeTrigger={};this._popper=null;this.element=n;this.config=this._getConfig(t);this.tip=null;this._setListeners()}var l=p.prototype;return l.enable=function(){this._isEnabled=!0},l.disable=function(){this._isEnabled=!1},l.toggleEnabled=function(){this._isEnabled=!this._isEnabled},l.toggle=function(t){if(this._isEnabled)if(t){var r=this.constructor.DATA_KEY,i=n(t.currentTarget).data(r);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),n(t.currentTarget).data(r,i));i._activeTrigger.click=!i._activeTrigger.click;i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(n(this.getTipElement()).hasClass(e.SHOW)){this._leave(null,this);return}this._enter(null,this)}},l.dispose=function(){clearTimeout(this._timeout);n.removeData(this.element,this.constructor.DATA_KEY);n(this.element).off(this.constructor.EVENT_KEY);n(this.element).closest(".modal").off("hide.bs.modal");this.tip&&n(this.tip).remove();this._isEnabled=null;this._timeout=null;this._hoverState=null;this._activeTrigger=null;this._popper!==null&&this._popper.destroy();this._popper=null;this.element=null;this.config=null;this.tip=null},l.show=function(){var t=this,f,l,u,o,a,h,y,c,p;if(n(this.element).css("display")==="none")throw new Error("Please use show on visible elements");if(f=n.Event(this.constructor.Event.SHOW),this.isWithContent()&&this._isEnabled){if(n(this.element).trigger(f),l=n.contains(this.element.ownerDocument.documentElement,this.element),f.isDefaultPrevented()||!l)return;if(u=this.getTipElement(),o=r.getUID(this.constructor.NAME),u.setAttribute("id",o),this.element.setAttribute("aria-describedby",o),this.setContent(),this.config.animation&&n(u).addClass(e.FADE),a=typeof this.config.placement=="function"?this.config.placement.call(this,u,this.element):this.config.placement,h=this._getAttachment(a),this.addAttachmentClass(h),y=this.config.container===!1?document.body:n(document).find(this.config.container),n(u).data(this.constructor.DATA_KEY,this),n.contains(this.element.ownerDocument.documentElement,this.tip)||n(u).appendTo(y),n(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new i(this.element,u,{placement:h,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:v.ARROW},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(n){n.originalPlacement!==n.placement&&t._handlePopperPlacementChange(n)},onUpdate:function(n){t._handlePopperPlacementChange(n)}}),n(u).addClass(e.SHOW),"ontouchstart"in document.documentElement)n(document.body).children().on("mouseover",null,n.noop);c=function(){t.config.animation&&t._fixTransition();var i=t._hoverState;t._hoverState=null;n(t.element).trigger(t.constructor.Event.SHOWN);i===s.OUT&&t._leave(null,t)};n(this.tip).hasClass(e.FADE)?(p=r.getTransitionDurationFromElement(this.tip),n(this.tip).one(r.TRANSITION_END,c).emulateTransitionEnd(p)):c()}},l.hide=function(t){var i=this,u=this.getTipElement(),f=n.Event(this.constructor.Event.HIDE),h=function(){i._hoverState!==s.SHOW&&u.parentNode&&u.parentNode.removeChild(u);i._cleanTipClass();i.element.removeAttribute("aria-describedby");n(i.element).trigger(i.constructor.Event.HIDDEN);i._popper!==null&&i._popper.destroy();t&&t()},c;(n(this.element).trigger(f),f.isDefaultPrevented())||(n(u).removeClass(e.SHOW),"ontouchstart"in document.documentElement&&n(document.body).children().off("mouseover",null,n.noop),this._activeTrigger[o.CLICK]=!1,this._activeTrigger[o.FOCUS]=!1,this._activeTrigger[o.HOVER]=!1,n(this.tip).hasClass(e.FADE)?(c=r.getTransitionDurationFromElement(u),n(u).one(r.TRANSITION_END,h).emulateTransitionEnd(c)):h(),this._hoverState="")},l.update=function(){this._popper!==null&&this._popper.scheduleUpdate()},l.isWithContent=function(){return Boolean(this.getTitle())},l.addAttachmentClass=function(t){n(this.getTipElement()).addClass(a+"-"+t)},l.getTipElement=function(){return this.tip=this.tip||n(this.config.template)[0],this.tip},l.setContent=function(){var t=this.getTipElement();this.setElementContent(n(t.querySelectorAll(v.TOOLTIP_INNER)),this.getTitle());n(t).removeClass(e.FADE+" "+e.SHOW)},l.setElementContent=function(t,i){var r=this.config.html;typeof i=="object"&&(i.nodeType||i.jquery)?r?n(i).parent().is(t)||t.empty().append(i):t.text(n(i).text()):t[r?"html":"text"](i)},l.getTitle=function(){var n=this.element.getAttribute("data-original-title");return n||(n=typeof this.config.title=="function"?this.config.title.call(this.element):this.config.title),n},l._getAttachment=function(n){return k[n.toUpperCase()]},l._setListeners=function(){var t=this,i=this.config.trigger.split(" ");i.forEach(function(i){if(i==="click")n(t.element).on(t.constructor.Event.CLICK,t.config.selector,function(n){return t.toggle(n)});else if(i!==o.MANUAL){var r=i===o.HOVER?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,u=i===o.HOVER?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;n(t.element).on(r,t.config.selector,function(n){return t._enter(n)}).on(u,t.config.selector,function(n){return t._leave(n)})}n(t.element).closest(".modal").on("hide.bs.modal",function(){return t.hide()})});this.config.selector?this.config=u({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},l._fixTitle=function(){var n=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||n!=="string")&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},l._enter=function(t,i){var r=this.constructor.DATA_KEY;if(i=i||n(t.currentTarget).data(r),i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),n(t.currentTarget).data(r,i)),t&&(i._activeTrigger[t.type==="focusin"?o.FOCUS:o.HOVER]=!0),n(i.getTipElement()).hasClass(e.SHOW)||i._hoverState===s.SHOW){i._hoverState=s.SHOW;return}if(clearTimeout(i._timeout),i._hoverState=s.SHOW,!i.config.delay||!i.config.delay.show){i.show();return}i._timeout=setTimeout(function(){i._hoverState===s.SHOW&&i.show()},i.config.delay.show)},l._leave=function(t,i){var r=this.constructor.DATA_KEY;if(i=i||n(t.currentTarget).data(r),i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),n(t.currentTarget).data(r,i)),t&&(i._activeTrigger[t.type==="focusout"?o.FOCUS:o.HOVER]=!1),!i._isWithActiveTrigger()){if(clearTimeout(i._timeout),i._hoverState=s.OUT,!i.config.delay||!i.config.delay.hide){i.hide();return}i._timeout=setTimeout(function(){i._hoverState===s.OUT&&i.hide()},i.config.delay.hide)}},l._isWithActiveTrigger=function(){for(var n in this._activeTrigger)if(this._activeTrigger[n])return!0;return!1},l._getConfig=function(t){return t=u({},this.constructor.Default,n(this.element).data(),typeof t=="object"&&t?t:{}),typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),typeof t.title=="number"&&(t.title=t.title.toString()),typeof t.content=="number"&&(t.content=t.content.toString()),r.typeCheckConfig(h,t,this.constructor.DefaultType),t},l._getDelegateConfig=function(){var t={},n;if(this.config)for(n in this.config)this.constructor.Default[n]!==this.config[n]&&(t[n]=this.config[n]);return t},l._cleanTipClass=function(){var i=n(this.getTipElement()),t=i.attr("class").match(w);t!==null&&t.length&&i.removeClass(t.join(""))},l._handlePopperPlacementChange=function(n){var t=n.instance;this.tip=t.popper;this._cleanTipClass();this.addAttachmentClass(this._getAttachment(n.placement))},l._fixTransition=function(){var t=this.getTipElement(),i=this.config.animation;t.getAttribute("x-placement")===null&&(n(t).removeClass(e.FADE),this.config.animation=!1,this.hide(),this.show(),this.config.animation=i)},p._jQueryInterface=function(t){return this.each(function(){var i=n(this).data(c),r=typeof t=="object"&&t;if((i||!/dispose|hide/.test(t))&&(i||(i=new p(this,r),n(this).data(c,i)),typeof t=="string")){if(typeof i[t]=="undefined")throw new TypeError('No method named "'+t+'"');i[t]()}})},f(p,null,[{key:"VERSION",get:function(){return y}},{key:"Default",get:function(){return d}},{key:"NAME",get:function(){return h}},{key:"DATA_KEY",get:function(){return c}},{key:"Event",get:function(){return g}},{key:"EVENT_KEY",get:function(){return t}},{key:"DefaultType",get:function(){return b}}]),p}();return n.fn[h]=l._jQueryInterface,n.fn[h].Constructor=l,n.fn[h].noConflict=function(){return n.fn[h]=p,l._jQueryInterface},l}(t,i),w=function(n){var i="popover",a="4.1.3",r="bs.popover",t="."+r,v=n.fn[i],s="bs-popover",y=new RegExp("(^|\\s)"+s+"\\S+","g"),p=u({},e.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-header"><\/h3><div class="popover-body"><\/div><\/div>'}),w=u({},e.DefaultType,{content:"(string|element|function)"}),c={FADE:"fade",SHOW:"show"},l={TITLE:".popover-header",CONTENT:".popover-body"},b={HIDE:"hide"+t,HIDDEN:"hidden"+t,SHOW:"show"+t,SHOWN:"shown"+t,INSERTED:"inserted"+t,CLICK:"click"+t,FOCUSIN:"focusin"+t,FOCUSOUT:"focusout"+t,MOUSEENTER:"mouseenter"+t,MOUSELEAVE:"mouseleave"+t},o=function(u){function e(){return u.apply(this,arguments)||this}h(e,u);var o=e.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.addAttachmentClass=function(t){n(this.getTipElement()).addClass(s+"-"+t)},o.getTipElement=function(){return this.tip=this.tip||n(this.config.template)[0],this.tip},o.setContent=function(){var i=n(this.getTipElement()),t;this.setElementContent(i.find(l.TITLE),this.getTitle());t=this._getContent();typeof t=="function"&&(t=t.call(this.element));this.setElementContent(i.find(l.CONTENT),t);i.removeClass(c.FADE+" "+c.SHOW)},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var i=n(this.getTipElement()),t=i.attr("class").match(y);t!==null&&t.length>0&&i.removeClass(t.join(""))},e._jQueryInterface=function(t){return this.each(function(){var i=n(this).data(r),u=typeof t=="object"?t:null;if((i||!/destroy|hide/.test(t))&&(i||(i=new e(this,u),n(this).data(r,i)),typeof t=="string")){if(typeof i[t]=="undefined")throw new TypeError('No method named "'+t+'"');i[t]()}})},f(e,null,[{key:"VERSION",get:function(){return a}},{key:"Default",get:function(){return p}},{key:"NAME",get:function(){return i}},{key:"DATA_KEY",get:function(){return r}},{key:"Event",get:function(){return b}},{key:"EVENT_KEY",get:function(){return t}},{key:"DefaultType",get:function(){return w}}]),e}(e);return n.fn[i]=o._jQueryInterface,n.fn[i].Constructor=o,n.fn[i].noConflict=function(){return n.fn[i]=v,o._jQueryInterface},o}(t),b=function(n){var i="scrollspy",v="4.1.3",s="bs.scrollspy",h="."+s,y=n.fn[i],a={offset:10,method:"auto",target:""},p={offset:"number",method:"string",target:"(string|element)"},c={ACTIVATE:"activate"+h,SCROLL:"scroll"+h,LOAD_DATA_API:"load"+h+".data-api"},e={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active"},t={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},l={OFFSET:"offset",POSITION:"position"},o=function(){function y(i,r){var u=this;this._element=i;this._scrollElement=i.tagName==="BODY"?window:i;this._config=this._getConfig(r);this._selector=this._config.target+" "+t.NAV_LINKS+","+(this._config.target+" "+t.LIST_ITEMS+",")+(this._config.target+" "+t.DROPDOWN_ITEMS);this._offsets=[];this._targets=[];this._activeTarget=null;this._scrollHeight=0;n(this._scrollElement).on(c.SCROLL,function(n){return u._process(n)});this.refresh();this._process()}var o=y.prototype;return o.refresh=function(){var t=this,f=this._scrollElement===this._scrollElement.window?l.OFFSET:l.POSITION,i=this._config.method==="auto"?f:this._config.method,e=i===l.POSITION?this._getScrollTop():0,u;this._offsets=[];this._targets=[];this._scrollHeight=this._getScrollHeight();u=[].slice.call(document.querySelectorAll(this._selector));u.map(function(t){var u,f=r.getSelectorFromElement(t),o;return(f&&(u=document.querySelector(f)),u&&(o=u.getBoundingClientRect(),o.width||o.height))?[n(u)[i]().top+e,f]:null}).filter(function(n){return n}).sort(function(n,t){return n[0]-t[0]}).forEach(function(n){t._offsets.push(n[0]);t._targets.push(n[1])})},o.dispose=function(){n.removeData(this._element,s);n(this._scrollElement).off(h);this._element=null;this._scrollElement=null;this._config=null;this._selector=null;this._offsets=null;this._targets=null;this._activeTarget=null;this._scrollHeight=null},o._getConfig=function(t){if(t=u({},a,typeof t=="object"&&t?t:{}),typeof t.target!="string"){var f=n(t.target).attr("id");f||(f=r.getUID(i),n(t.target).attr("id",f));t.target="#"+f}return r.typeCheckConfig(i,t,p),t},o._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},o._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},o._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},o._process=function(){var t=this._getScrollTop()+this._config.offset,r=this._getScrollHeight(),e=this._config.offset+r-this._getOffsetHeight(),i,u,n,f;if(this._scrollHeight!==r&&this.refresh(),t>=e){i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i);return}if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0){this._activeTarget=null;this._clear();return}for(u=this._offsets.length,n=u;n--;)f=this._activeTarget!==this._targets[n]&&t>=this._offsets[n]&&(typeof this._offsets[n+1]=="undefined"||t<this._offsets[n+1]),f&&this._activate(this._targets[n])},o._activate=function(i){var u,r;this._activeTarget=i;this._clear();u=this._selector.split(",");u=u.map(function(n){return n+'[data-target="'+i+'"],'+(n+'[href="'+i+'"]')});r=n([].slice.call(document.querySelectorAll(u.join(","))));r.hasClass(e.DROPDOWN_ITEM)?(r.closest(t.DROPDOWN).find(t.DROPDOWN_TOGGLE).addClass(e.ACTIVE),r.addClass(e.ACTIVE)):(r.addClass(e.ACTIVE),r.parents(t.NAV_LIST_GROUP).prev(t.NAV_LINKS+", "+t.LIST_ITEMS).addClass(e.ACTIVE),r.parents(t.NAV_LIST_GROUP).prev(t.NAV_ITEMS).children(t.NAV_LINKS).addClass(e.ACTIVE));n(this._scrollElement).trigger(c.ACTIVATE,{relatedTarget:i})},o._clear=function(){var i=[].slice.call(document.querySelectorAll(this._selector));n(i).filter(t.ACTIVE).removeClass(e.ACTIVE)},y._jQueryInterface=function(t){return this.each(function(){var i=n(this).data(s),r=typeof t=="object"&&t;if(i||(i=new y(this,r),n(this).data(s,i)),typeof t=="string"){if(typeof i[t]=="undefined")throw new TypeError('No method named "'+t+'"');i[t]()}})},f(y,null,[{key:"VERSION",get:function(){return v}},{key:"Default",get:function(){return a}}]),y}();n(window).on(c.LOAD_DATA_API,function(){for(var i,r=[].slice.call(document.querySelectorAll(t.DATA_SPY)),f=r.length,u=f;u--;)i=n(r[u]),o._jQueryInterface.call(i,i.data())});return n.fn[i]=o._jQueryInterface,n.fn[i].Constructor=o,n.fn[i].noConflict=function(){return n.fn[i]=y,o._jQueryInterface},o}(t),k=function(n){var u="tab",c="4.1.3",h="bs.tab",e="."+h,l=n.fn[u],o={HIDE:"hide"+e,HIDDEN:"hidden"+e,SHOW:"show"+e,SHOWN:"shown"+e,CLICK_DATA_API:"click"+e+".data-api"},t={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},i={DROPDOWN:".dropdown",NAV_LIST_GROUP:".nav, .list-group",ACTIVE:".active",ACTIVE_UL:"> li > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},s=function(){function u(n){this._element=n}var e=u.prototype;return e.show=function(){var a=this,e,u,f,s,v,h,c,l;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&n(this._element).hasClass(t.ACTIVE)||n(this._element).hasClass(t.DISABLED)||(f=n(this._element).closest(i.NAV_LIST_GROUP)[0],s=r.getSelectorFromElement(this._element),f&&(v=f.nodeName==="UL"?i.ACTIVE_UL:i.ACTIVE,u=n.makeArray(n(f).find(v)),u=u[u.length-1]),h=n.Event(o.HIDE,{relatedTarget:this._element}),c=n.Event(o.SHOW,{relatedTarget:u}),u&&n(u).trigger(h),n(this._element).trigger(c),c.isDefaultPrevented()||h.isDefaultPrevented())||(s&&(e=document.querySelector(s)),this._activate(this._element,f),l=function(){var t=n.Event(o.HIDDEN,{relatedTarget:a._element}),i=n.Event(o.SHOWN,{relatedTarget:u});n(u).trigger(t);n(a._element).trigger(i)},e?this._activate(e,e.parentNode,l):l())},e.dispose=function(){n.removeData(this._element,h);this._element=null},e._activate=function(u,f,e){var l=this,s,h;s=f.nodeName==="UL"?n(f).find(i.ACTIVE_UL):n(f).children(i.ACTIVE);var o=s[0],a=e&&o&&n(o).hasClass(t.FADE),c=function(){return l._transitionComplete(u,o,e)};o&&a?(h=r.getTransitionDurationFromElement(o),n(o).one(r.TRANSITION_END,c).emulateTransitionEnd(h)):c()},e._transitionComplete=function(u,f,e){var o,s,h;f&&(n(f).removeClass(t.SHOW+" "+t.ACTIVE),o=n(f.parentNode).find(i.DROPDOWN_ACTIVE_CHILD)[0],o&&n(o).removeClass(t.ACTIVE),f.getAttribute("role")==="tab"&&f.setAttribute("aria-selected",!1));n(u).addClass(t.ACTIVE);u.getAttribute("role")==="tab"&&u.setAttribute("aria-selected",!0);r.reflow(u);n(u).addClass(t.SHOW);u.parentNode&&n(u.parentNode).hasClass(t.DROPDOWN_MENU)&&(s=n(u).closest(i.DROPDOWN)[0],s&&(h=[].slice.call(s.querySelectorAll(i.DROPDOWN_TOGGLE)),n(h).addClass(t.ACTIVE)),u.setAttribute("aria-expanded",!0));e&&e()},u._jQueryInterface=function(t){return this.each(function(){var r=n(this),i=r.data(h);if(i||(i=new u(this),r.data(h,i)),typeof t=="string"){if(typeof i[t]=="undefined")throw new TypeError('No method named "'+t+'"');i[t]()}})},f(u,null,[{key:"VERSION",get:function(){return c}}]),u}();n(document).on(o.CLICK_DATA_API,i.DATA_TOGGLE,function(t){t.preventDefault();s._jQueryInterface.call(n(this),"show")});return n.fn[u]=s._jQueryInterface,n.fn[u].Constructor=s,n.fn[u].noConflict=function(){return n.fn[u]=l,s._jQueryInterface},s}(t);(function(n){if(typeof n=="undefined")throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=n.fn.jquery.split(" ")[0].split("."),i=9;if(t[0]<2&&t[1]<i||t[0]===1&&t[1]===i&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0");})(t);n.Util=r;n.Alert=c;n.Button=l;n.Carousel=a;n.Collapse=v;n.Dropdown=y;n.Modal=p;n.Popover=w;n.Scrollspy=b;n.Tab=k;n.Tooltip=e;Object.defineProperty(n,"__esModule",{value:!0})}),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?n(require("jquery")):n(jQuery)}(function(n){function i(i,r,u){var r={content:{message:typeof r=="object"?r.message:r,title:r.title?r.title:"",icon:r.icon?r.icon:"",url:r.url?r.url:"#",target:r.target?r.target:"-"}};u=n.extend(!0,{},r,u);this.settings=n.extend(!0,{},t,u);this._defaults=t;this.settings.content.target=="-"&&(this.settings.content.target=this.settings.url_target);this.animations={start:"webkitAnimationStart oanimationstart MSAnimationStart animationstart",end:"webkitAnimationEnd oanimationend MSAnimationEnd animationend"};typeof this.settings.offset=="number"&&(this.settings.offset={x:this.settings.offset,y:this.settings.offset});this.init()}var t={element:"body",position:null,type:"info",allow_dismiss:!0,newest_on_top:!1,showProgressbar:!1,placement:{from:"top",align:"right"},offset:20,spacing:10,z_index:1031,delay:5e3,timer:1e3,url_target:"_blank",mouse_over:null,animate:{enter:"animated fadeInDown",exit:"animated fadeOutUp"},onShow:null,onShown:null,onClose:null,onClosed:null,icon_type:"class",template:'<div data-notify="container" class="col-xs-11 col-sm-4 alert alert-{0}" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss">&times;<\/button><span data-notify="icon"><\/span> <span data-notify="title">{1}<\/span> <span data-notify="message">{2}<\/span><div class="progress" data-notify="progressbar"><div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"><\/div><\/div><a href="{3}" target="{4}" data-notify="url"><\/a><\/div>'};String.format=function(){for(var t=arguments[0],n=1;n<arguments.length;n++)t=t.replace(RegExp("\\{"+(n-1)+"\\}","gm"),arguments[n]);return t};n.extend(i.prototype,{init:function(){var n=this;this.buildNotify();this.settings.content.icon&&this.setIcon();this.settings.content.url!="#"&&this.styleURL();this.placement();this.bind();this.notify={$ele:this.$ele,update:function(t,i){var r={},t,u,f,e;typeof t=="string"?r[t]=i:r=t;for(t in r)switch(t){case"type":this.$ele.removeClass("alert-"+n.settings.type);this.$ele.find('[data-notify="progressbar"] > .progress-bar').removeClass("progress-bar-"+n.settings.type);n.settings.type=r[t];this.$ele.addClass("alert-"+r[t]).find('[data-notify="progressbar"] > .progress-bar').addClass("progress-bar-"+r[t]);break;case"icon":u=this.$ele.find('[data-notify="icon"]');n.settings.icon_type.toLowerCase()=="class"?u.removeClass(n.settings.content.icon).addClass(r[t]):(u.is("img")||u.find("img"),u.attr("src",r[t]));break;case"progress":f=n.settings.delay-n.settings.delay*(r[t]/100);this.$ele.data("notify-delay",f);this.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",r[t]).css("width",r[t]+"%");break;case"url":this.$ele.find('[data-notify="url"]').attr("href",r[t]);break;case"target":this.$ele.find('[data-notify="url"]').attr("target",r[t]);break;default:this.$ele.find('[data-notify="'+t+'"]').html(r[t])}e=this.$ele.outerHeight()+parseInt(n.settings.spacing)+parseInt(n.settings.offset.y);n.reposition(e)},close:function(){n.close()}}},buildNotify:function(){var t=this.settings.content;this.$ele=n(String.format(this.settings.template,this.settings.type,t.title,t.message,t.url,t.target));this.$ele.attr("data-notify-position",this.settings.placement.from+"-"+this.settings.placement.align);this.settings.allow_dismiss||this.$ele.find('[data-notify="dismiss"]').css("display","none");(this.settings.delay<=0&&!this.settings.showProgressbar||!this.settings.showProgressbar)&&this.$ele.find('[data-notify="progressbar"]').remove()},setIcon:function(){this.settings.icon_type.toLowerCase()=="class"?this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon):this.$ele.find('[data-notify="icon"]').is("img")?this.$ele.find('[data-notify="icon"]').attr("src",this.settings.content.icon):this.$ele.find('[data-notify="icon"]').append('<img src="'+this.settings.content.icon+'" alt="Notify Icon" />')},styleURL:function(){this.$ele.find('[data-notify="url"]').css({backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)",height:"100%",left:"0px",position:"absolute",top:"0px",width:"100%",zIndex:this.settings.z_index+1});this.$ele.find('[data-notify="dismiss"]').css({position:"absolute",right:"10px",top:"5px",zIndex:this.settings.z_index+2})},placement:function(){var t=this,i=this.settings.offset.y,r={display:"inline-block",margin:"0px auto",position:this.settings.position?this.settings.position:this.settings.element==="body"?"fixed":"absolute",transition:"all .5s ease-in-out",zIndex:this.settings.z_index},u=!1,f=this.settings;n('[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])').each(function(){return i=Math.max(i,parseInt(n(this).css(f.placement.from))+parseInt(n(this).outerHeight())+parseInt(f.spacing))});this.settings.newest_on_top==!0&&(i=this.settings.offset.y);r[this.settings.placement.from]=i+"px";switch(this.settings.placement.align){case"left":case"right":r[this.settings.placement.align]=this.settings.offset.x+"px";break;case"center":r.left=0;r.right=0}this.$ele.css(r).addClass(this.settings.animate.enter);n.each(Array("webkit","moz","o","ms",""),function(n,i){t.$ele[0].style[i+"AnimationIterationCount"]=1});n(this.settings.element).append(this.$ele);this.settings.newest_on_top==!0&&(i=parseInt(i)+parseInt(this.settings.spacing)+this.$ele.outerHeight(),this.reposition(i));n.isFunction(t.settings.onShow)&&t.settings.onShow.call(this.$ele);this.$ele.one(this.animations.start,function(){u=!0}).one(this.animations.end,function(){n.isFunction(t.settings.onShown)&&t.settings.onShown.call(this)});setTimeout(function(){u||n.isFunction(t.settings.onShown)&&t.settings.onShown.call(this)},600)},bind:function(){var t=this,i;this.$ele.find('[data-notify="dismiss"]').on("click",function(){t.close()});this.$ele.mouseover(function(){n(this).data("data-hover","true")}).mouseout(function(){n(this).data("data-hover","false")});this.$ele.data("data-hover","false");this.settings.delay>0&&(t.$ele.data("notify-delay",t.settings.delay),i=setInterval(function(){var n=parseInt(t.$ele.data("notify-delay"))-t.settings.timer,r;(t.$ele.data("data-hover")==="false"&&t.settings.mouse_over=="pause"||t.settings.mouse_over!="pause")&&(r=(t.settings.delay-n)/t.settings.delay*100,t.$ele.data("notify-delay",n),t.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",r).css("width",r+"%"));n<=-t.settings.timer&&(clearInterval(i),t.close())},t.settings.timer))},close:function(){var t=this,r=parseInt(this.$ele.css(this.settings.placement.from)),i=!1;this.$ele.data("closing","true").addClass(this.settings.animate.exit);t.reposition(r);n.isFunction(t.settings.onClose)&&t.settings.onClose.call(this.$ele);this.$ele.one(this.animations.start,function(){i=!0}).one(this.animations.end,function(){n(this).remove();n.isFunction(t.settings.onClosed)&&t.settings.onClosed.call(this)});setTimeout(function(){if(!i&&(t.$ele.remove(),t.settings.onClosed))t.settings.onClosed(t.$ele)},600)},reposition:function(t){var i=this,r='[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])',u=this.$ele.nextAll(r);this.settings.newest_on_top==!0&&(u=this.$ele.prevAll(r));u.each(function(){n(this).css(i.settings.placement.from,t);t=parseInt(t)+parseInt(i.settings.spacing)+n(this).outerHeight()})}});n.notify=function(n,t){var r=new i(this,n,t);return r.notify};n.notifyDefaults=function(i){return t=n.extend(!0,{},t,i)};n.notifyClose=function(t){typeof t=="undefined"||t=="all"?n("[data-notify]").find('[data-notify="dismiss"]').trigger("click"):n('[data-notify-position="'+t+'"]').find('[data-notify="dismiss"]').trigger("click")}}),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?n(require("jquery")):n(jQuery)}(function(n,t){function f(){return new Date(Date.UTC.apply(Date,arguments))}function s(){var n=new Date;return f(n.getFullYear(),n.getMonth(),n.getDate())}function l(n,t){return n.getUTCFullYear()===t.getUTCFullYear()&&n.getUTCMonth()===t.getUTCMonth()&&n.getUTCDate()===t.getUTCDate()}function h(i,r){return function(){return r!==t&&n.fn.datepicker.deprecated(r),this[i].apply(this,arguments)}}function p(n){return n&&!isNaN(n.getTime())}function w(t,i){function o(n,t){return t.toLowerCase()}var u=n(t).data(),f={},e,s=new RegExp("^"+i.toLowerCase()+"([A-Z])"),r;i=new RegExp("^"+i.toLowerCase());for(r in u)i.test(r)&&(e=r.replace(s,o),f[e]=u[r]);return f}function b(t){var u={},i;if(r[t]||(t=t.split("-")[0],r[t]))return i=r[t],n.each(y,function(n,t){t in i&&(u[t]=i[t])}),u}var a=function(){var t={get:function(n){return this.slice(n)[0]},contains:function(n){for(var i=n&&n.valueOf(),t=0,r=this.length;t<r;t++)if(0<=this[t].valueOf()-i&&this[t].valueOf()-i<864e5)return t;return-1},remove:function(n){this.splice(n,1)},replace:function(t){t&&(n.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t))},clear:function(){this.length=0},copy:function(){var n=new a;return n.replace(this),n}};return function(){var i=[];return i.push.apply(i,arguments),n.extend(i,t),i}}(),u=function(t,r){n.data(t,"datepicker",this);this._process_options(r);this.dates=new a;this.viewDate=this.o.defaultViewDate;this.focusDate=null;this.element=n(t);this.isInput=this.element.is("input");this.inputField=this.isInput?this.element:this.element.find("input");this.component=this.element.hasClass("date")?this.element.find(".add-on, .input-group-addon, .btn"):!1;this.component&&this.component.length===0&&(this.component=!1);this.isInline=!this.component&&this.element.is("div");this.picker=n(i.template);this._check_template(this.o.templates.leftArrow)&&this.picker.find(".prev").html(this.o.templates.leftArrow);this._check_template(this.o.templates.rightArrow)&&this.picker.find(".next").html(this.o.templates.rightArrow);this._buildEvents();this._attachEvents();this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu");this.o.rtl&&this.picker.addClass("datepicker-rtl");this.o.calendarWeeks&&this.picker.find(".datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",function(n,t){return Number(t)+1});this._process_options({startDate:this._o.startDate,endDate:this._o.endDate,daysOfWeekDisabled:this.o.daysOfWeekDisabled,daysOfWeekHighlighted:this.o.daysOfWeekHighlighted,datesDisabled:this.o.datesDisabled});this._allow_update=!1;this.setViewMode(this.o.startView);this._allow_update=!0;this.fillDow();this.fillMonths();this.update();this.isInline&&this.show()},c,v,o,e,y,r,i;u.prototype={constructor:u,_resolveViewName:function(t){return n.each(i.viewModes,function(i,r){if(t===i||n.inArray(t,r.names)!==-1)return t=i,!1}),t},_resolveDaysOfWeek:function(t){return n.isArray(t)||(t=t.split(/[,\s]*/)),n.map(t,Number)},_check_template:function(i){try{if(i===t||i==="")return!1;if((i.match(/[<>]/g)||[]).length<=0)return!0;var r=n(i);return r.length>0}catch(u){return!1}},_process_options:function(t){var u,h,l,o,c;if(this._o=n.extend({},this._o,t),u=this.o=n.extend({},this._o),h=u.language,r[h]||(h=h.split("-")[0],r[h]||(h=e.language)),u.language=h,u.startView=this._resolveViewName(u.startView),u.minViewMode=this._resolveViewName(u.minViewMode),u.maxViewMode=this._resolveViewName(u.maxViewMode),u.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,u.startView)),u.multidate!==!0&&(u.multidate=Number(u.multidate)||!1,u.multidate!==!1&&(u.multidate=Math.max(0,u.multidate))),u.multidateSeparator=String(u.multidateSeparator),u.weekStart%=7,u.weekEnd=(u.weekStart+6)%7,l=i.parseFormat(u.format),u.startDate!==-Infinity&&(u.startDate=u.startDate?u.startDate instanceof Date?this._local_to_utc(this._zero_time(u.startDate)):i.parseDate(u.startDate,l,u.language,u.assumeNearbyYear):-Infinity),u.endDate!==Infinity&&(u.endDate=u.endDate?u.endDate instanceof Date?this._local_to_utc(this._zero_time(u.endDate)):i.parseDate(u.endDate,l,u.language,u.assumeNearbyYear):Infinity),u.daysOfWeekDisabled=this._resolveDaysOfWeek(u.daysOfWeekDisabled||[]),u.daysOfWeekHighlighted=this._resolveDaysOfWeek(u.daysOfWeekHighlighted||[]),u.datesDisabled=u.datesDisabled||[],n.isArray(u.datesDisabled)||(u.datesDisabled=u.datesDisabled.split(",")),u.datesDisabled=n.map(u.datesDisabled,function(n){return i.parseDate(n,l,u.language,u.assumeNearbyYear)}),o=String(u.orientation).toLowerCase().split(/\s+/g),c=u.orientation.toLowerCase(),o=n.grep(o,function(n){return/^auto|left|right|top|bottom$/.test(n)}),u.orientation={x:"auto",y:"auto"},c&&c!=="auto")if(o.length===1)switch(o[0]){case"top":case"bottom":u.orientation.y=o[0];break;case"left":case"right":u.orientation.x=o[0]}else c=n.grep(o,function(n){return/^left|right$/.test(n)}),u.orientation.x=c[0]||"auto",c=n.grep(o,function(n){return/^top|bottom$/.test(n)}),u.orientation.y=c[0]||"auto";if(u.defaultViewDate instanceof Date||typeof u.defaultViewDate=="string")u.defaultViewDate=i.parseDate(u.defaultViewDate,l,u.language,u.assumeNearbyYear);else if(u.defaultViewDate){var a=u.defaultViewDate.year||(new Date).getFullYear(),v=u.defaultViewDate.month||0,y=u.defaultViewDate.day||1;u.defaultViewDate=f(a,v,y)}else u.defaultViewDate=s()},_events:[],_secondaryEvents:[],_applyEvents:function(n){for(var i=0,f,r,u;i<n.length;i++){f=n[i][0];n[i].length===2?(r=t,u=n[i][1]):n[i].length===3&&(r=n[i][1],u=n[i][2]);f.on(u,r)}},_unapplyEvents:function(n){for(var i=0,f,r,u;i<n.length;i++)f=n[i][0],n[i].length===2?(u=t,r=n[i][1]):n[i].length===3&&(u=n[i][1],r=n[i][2]),f.off(r,u)},_buildEvents:function(){var t={keyup:n.proxy(function(t){n.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:n.proxy(this.keydown,this),paste:n.proxy(this.paste,this)};this.o.showOnFocus===!0&&(t.focus=n.proxy(this.show,this));this._events=this.isInput?[[this.element,t]]:this.component&&this.inputField.length?[[this.inputField,t],[this.component,{click:n.proxy(this.show,this)}]]:[[this.element,{click:n.proxy(this.show,this),keydown:n.proxy(this.keydown,this)}]];this._events.push([this.element,"*",{blur:n.proxy(function(n){this._focused_from=n.target},this)}],[this.element,{blur:n.proxy(function(n){this._focused_from=n.target},this)}]);this.o.immediateUpdates&&this._events.push([this.element,{"changeYear changeMonth":n.proxy(function(n){this.update(n.date)},this)}]);this._secondaryEvents=[[this.picker,{click:n.proxy(this.click,this)}],[this.picker,".prev, .next",{click:n.proxy(this.navArrowsClick,this)}],[this.picker,".day:not(.disabled)",{click:n.proxy(this.dayCellClick,this)}],[n(window),{resize:n.proxy(this.place,this)}],[n(document),{"mousedown touchstart":n.proxy(function(n){this.element.is(n.target)||this.element.find(n.target).length||this.picker.is(n.target)||this.picker.find(n.target).length||this.isInline||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents();this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents();this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,r){var u=r||this.dates.get(-1),f=this._utc_to_local(u);this.element.trigger({type:t,date:f,viewMode:this.viewMode,dates:n.map(this.dates,this._utc_to_local),format:n.proxy(function(n,t){arguments.length===0?(n=this.dates.length-1,t=this.o.format):typeof n=="string"&&(t=n,n=this.dates.length-1);t=t||this.o.format;var r=this.dates.get(n);return i.formatDate(r,t,this.o.language)},this)})},show:function(){if(!this.inputField.prop("disabled")&&(!this.inputField.prop("readonly")||this.o.enableOnReadonly!==!1))return this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&n(this.element).blur(),this},hide:function(){return this.isInline||!this.picker.is(":visible")?this:(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.setViewMode(this.o.startView),this.o.forceParse&&this.inputField.val()&&this.setValue(),this._trigger("hide"),this)},destroy:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},paste:function(t){var i;if(t.originalEvent.clipboardData&&t.originalEvent.clipboardData.types&&n.inArray("text/plain",t.originalEvent.clipboardData.types)!==-1)i=t.originalEvent.clipboardData.getData("text/plain");else if(window.clipboardData)i=window.clipboardData.getData("Text");else return;this.setDate(i);this.update();t.preventDefault()},_utc_to_local:function(n){if(!n)return n;var t=new Date(n.getTime()+n.getTimezoneOffset()*6e4);return t.getTimezoneOffset()!==n.getTimezoneOffset()&&(t=new Date(n.getTime()+t.getTimezoneOffset()*6e4)),t},_local_to_utc:function(n){return n&&new Date(n.getTime()-n.getTimezoneOffset()*6e4)},_zero_time:function(n){return n&&new Date(n.getFullYear(),n.getMonth(),n.getDate())},_zero_utc_time:function(n){return n&&f(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate())},getDates:function(){return n.map(this.dates,this._utc_to_local)},getUTCDates:function(){return n.map(this.dates,function(n){return new Date(n)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var n=this.dates.get(-1);return n!==t?new Date(n):null},clearDates:function(){this.inputField.val("");this.update();this._trigger("changeDate");this.o.autoclose&&this.hide()},setDates:function(){var t=n.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,t),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var t=n.isArray(arguments[0])?arguments[0]:arguments;return this.setDates.apply(this,n.map(t,this._utc_to_local)),this},setDate:h("setDates"),setUTCDate:h("setUTCDates"),remove:h("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead"),setValue:function(){var n=this.getFormattedDate();return this.inputField.val(n),this},getFormattedDate:function(r){r===t&&(r=this.o.format);var u=this.o.language;return n.map(this.dates,function(n){return i.formatDate(n,r,u)}).join(this.o.multidateSeparator)},getStartDate:function(){return this.o.startDate},setStartDate:function(n){return this._process_options({startDate:n}),this.update(),this.updateNavArrows(),this},getEndDate:function(){return this.o.endDate},setEndDate:function(n){return this._process_options({endDate:n}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(n){return this._process_options({daysOfWeekDisabled:n}),this.update(),this},setDaysOfWeekHighlighted:function(n){return this._process_options({daysOfWeekHighlighted:n}),this.update(),this},setDatesDisabled:function(n){return this._process_options({datesDisabled:n}),this.update(),this},place:function(){var r,s,h;if(this.isInline)return this;var f=this.picker.outerWidth(),c=this.picker.outerHeight(),e=n(this.o.container),l=e.width(),a=this.o.container==="body"?n(document).scrollTop():e.scrollTop(),v=e.offset(),y=[0];this.element.parents().each(function(){var t=n(this).css("z-index");t!=="auto"&&Number(t)!==0&&y.push(Number(t))});var p=Math.max.apply(Math,y)+this.o.zIndexOffset,u=this.component?this.component.parent().offset():this.element.offset(),w=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),o=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),t=u.left-v.left,i=u.top-v.top;return this.o.container!=="body"&&(i+=a),this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),this.o.orientation.x!=="auto"?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),this.o.orientation.x==="right"&&(t-=f-o)):u.left<0?(this.picker.addClass("datepicker-orient-left"),t-=u.left-10):t+f>l?(this.picker.addClass("datepicker-orient-right"),t+=o-f):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left"),r=this.o.orientation.y,r==="auto"&&(s=-a+i-c,r=s<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+r),r==="top"?i-=c+parseInt(this.picker.css("padding-top")):i+=w,this.o.rtl?(h=l-(t+o),this.picker.css({top:i,right:h,zIndex:p})):this.picker.css({top:i,left:t,zIndex:p}),this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var u=this.dates.copy(),t=[],r=!1;return arguments.length?(n.each(arguments,n.proxy(function(n,i){i instanceof Date&&(i=this._local_to_utc(i));t.push(i)},this)),r=!0):(t=this.isInput?this.element.val():this.element.data("date")||this.inputField.val(),t=t&&this.o.multidate?t.split(this.o.multidateSeparator):[t],delete this.element.data().date),t=n.map(t,n.proxy(function(n){return i.parseDate(n,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),t=n.grep(t,n.proxy(function(n){return!this.dateWithinRange(n)||!n},this),!0),this.dates.replace(t),this.o.updateViewDate&&(this.viewDate=this.dates.length?new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?new Date(this.o.startDate):this.viewDate>this.o.endDate?new Date(this.o.endDate):this.o.defaultViewDate),r?(this.setValue(),this.element.change()):this.dates.length&&String(u)!==String(this.dates)&&r&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&u.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var i=this.o.weekStart,t="<tr>";for(this.o.calendarWeeks&&(t+='<th class="cw">&#160;<\/th>');i<this.o.weekStart+7;)t+='<th class="dow',n.inArray(i,this.o.daysOfWeekDisabled)!==-1&&(t+=" disabled"),t+='">'+r[this.o.language].daysMin[i++%7]+"<\/th>";t+="<\/tr>";this.picker.find(".datepicker-days thead").append(t)}},fillMonths:function(){for(var t=this._utc_to_local(this.viewDate),i="",u,n=0;n<12;n++)u=t&&t.getMonth()===n?" focused":"",i+='<span class="month'+u+'">'+r[this.o.language].monthsShort[n]+"<\/span>";this.picker.find(".datepicker-months td").html(i)},setRange:function(t){t&&t.length?this.range=n.map(t,function(n){return n.valueOf()}):delete this.range;this.fill()},getClassNames:function(t){var i=[],r=this.viewDate.getUTCFullYear(),u=this.viewDate.getUTCMonth(),f=s();return t.getUTCFullYear()<r||t.getUTCFullYear()===r&&t.getUTCMonth()<u?i.push("old"):(t.getUTCFullYear()>r||t.getUTCFullYear()===r&&t.getUTCMonth()>u)&&i.push("new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&i.push("focused"),this.o.todayHighlight&&l(t,f)&&i.push("today"),this.dates.contains(t)!==-1&&i.push("active"),this.dateWithinRange(t)||i.push("disabled"),this.dateIsDisabled(t)&&i.push("disabled","disabled-date"),n.inArray(t.getUTCDay(),this.o.daysOfWeekHighlighted)!==-1&&i.push("highlighted"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&i.push("range"),n.inArray(t.valueOf(),this.range)!==-1&&i.push("selected"),t.valueOf()===this.range[0]&&i.push("range-start"),t.valueOf()===this.range[this.range.length-1]&&i.push("range-end")),i},_fill_yearsView:function(i,r,u,f,e,o,s){for(var w="",c=u/10,b=this.picker.find(i),v=Math.floor(f/u)*u,p=v+c*9,k=Math.floor(this.viewDate.getFullYear()/c)*c,d=n.map(this.dates,function(n){return Math.floor(n.getUTCFullYear()/c)*c}),l,y,h,a=v-c;a<=p+c;a+=c)l=[r],y=null,a===v-c?l.push("old"):a===p+c&&l.push("new"),n.inArray(a,d)!==-1&&l.push("active"),(a<e||a>o)&&l.push("disabled"),a===k&&l.push("focused"),s!==n.noop&&(h=s(new Date(a,0,1)),h===t?h={}:typeof h=="boolean"?h={enabled:h}:typeof h=="string"&&(h={classes:h}),h.enabled===!1&&l.push("disabled"),h.classes&&(l=l.concat(h.classes.split(/\s+/))),h.tooltip&&(y=h.tooltip)),w+='<span class="'+l.join(" ")+'"'+(y?' title="'+y+'"':"")+">"+a+"<\/span>";b.find(".datepicker-switch").text(v+"-"+p);b.find("td").html(w)},fill:function(){var w=new Date(this.viewDate),o=w.getUTCFullYear(),d=w.getUTCMonth(),a=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,ut=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,v=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,ft=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,et=r[this.o.language].today||r.en.today||"",ot=r[this.o.language].clear||r.en.clear||"",st=r[this.o.language].titleFormat||r.en.titleFormat,y,u,e,g,h,c,p,s,b,nt,l,tt;if(!isNaN(o)&&!isNaN(d)){for(this.picker.find(".datepicker-days .datepicker-switch").text(i.formatDate(w,st,this.o.language)),this.picker.find("tfoot .today").text(et).css("display",this.o.todayBtn===!0||this.o.todayBtn==="linked"?"table-cell":"none"),this.picker.find("tfoot .clear").text(ot).css("display",this.o.clearBtn===!0?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display",typeof this.o.title=="string"&&this.o.title!==""?"table-cell":"none"),this.updateNavArrows(),this.fillMonths(),e=f(o,d,0),g=e.getUTCDate(),e.setUTCDate(g-(e.getUTCDay()-this.o.weekStart+7)%7),h=new Date(e),e.getUTCFullYear()<100&&h.setUTCFullYear(e.getUTCFullYear()),h.setUTCDate(h.getUTCDate()+42),h=h.valueOf(),c=[];e.valueOf()<h;){if(p=e.getUTCDay(),p===this.o.weekStart&&(c.push("<tr>"),this.o.calendarWeeks)){var it=new Date(+e+(this.o.weekStart-p-7)%7*864e5),rt=new Date(Number(it)+(11-it.getUTCDay())%7*864e5),k=new Date(Number(k=f(rt.getUTCFullYear(),0,1))+(11-k.getUTCDay())%7*864e5),ht=(rt-k)/6048e5+1;c.push('<td class="cw">'+ht+"<\/td>")}s=this.getClassNames(e);s.push("day");b=e.getUTCDate();this.o.beforeShowDay!==n.noop&&(u=this.o.beforeShowDay(this._utc_to_local(e)),u===t?u={}:typeof u=="boolean"?u={enabled:u}:typeof u=="string"&&(u={classes:u}),u.enabled===!1&&s.push("disabled"),u.classes&&(s=s.concat(u.classes.split(/\s+/))),u.tooltip&&(y=u.tooltip),u.content&&(b=u.content));s=n.isFunction(n.uniqueSort)?n.uniqueSort(s):n.unique(s);c.push('<td class="'+s.join(" ")+'"'+(y?' title="'+y+'"':"")+' data-date="'+e.getTime().toString()+'">'+b+"<\/td>");y=null;p===this.o.weekEnd&&c.push("<\/tr>");e.setUTCDate(e.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(c.join(""));nt=r[this.o.language].monthsTitle||r.en.monthsTitle||"Months";l=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?nt:o).end().find("tbody span").removeClass("active");n.each(this.dates,function(n,t){t.getUTCFullYear()===o&&l.eq(t.getUTCMonth()).addClass("active")});(o<a||o>v)&&l.addClass("disabled");o===a&&l.slice(0,ut).addClass("disabled");o===v&&l.slice(ft+1).addClass("disabled");this.o.beforeShowMonth!==n.noop&&(tt=this,n.each(l,function(i,r){var f=new Date(o,i,1),u=tt.o.beforeShowMonth(f);u===t?u={}:typeof u=="boolean"?u={enabled:u}:typeof u=="string"&&(u={classes:u});u.enabled!==!1||n(r).hasClass("disabled")||n(r).addClass("disabled");u.classes&&n(r).addClass(u.classes);u.tooltip&&n(r).prop("title",u.tooltip)}));this._fill_yearsView(".datepicker-years","year",10,o,a,v,this.o.beforeShowYear);this._fill_yearsView(".datepicker-decades","decade",100,o,a,v,this.o.beforeShowDecade);this._fill_yearsView(".datepicker-centuries","century",1e3,o,a,v,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var u=new Date(this.viewDate),t=u.getUTCFullYear(),f=u.getUTCMonth(),e=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,s=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,o=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,h=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,i,r,n=1;switch(this.viewMode){case 0:i=t<=e&&f<=s;r=t>=o&&f>=h;break;case 4:n*=10;case 3:n*=10;case 2:n*=10;case 1:i=Math.floor(t/n)*n<=e;r=Math.floor(t/n)*n+n>=o}this.picker.find(".prev").toggleClass("disabled",i);this.picker.find(".next").toggleClass("disabled",r)}},click:function(t){t.preventDefault();t.stopPropagation();var r,o,u,e;r=n(t.target);r.hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1);r.hasClass("today")&&!r.hasClass("day")&&(this.setViewMode(0),this._setDate(s(),this.o.todayBtn==="linked"?null:"view"));r.hasClass("clear")&&this.clearDates();r.hasClass("disabled")||(r.hasClass("month")||r.hasClass("year")||r.hasClass("decade")||r.hasClass("century"))&&(this.viewDate.setUTCDate(1),o=1,this.viewMode===1?(e=r.parent().find("span").index(r),u=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(e)):(e=0,u=Number(r.text()),this.viewDate.setUTCFullYear(u)),this._trigger(i.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(f(u,e,o)):(this.setViewMode(this.viewMode-1),this.fill()));this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus();delete this._focused_from},dayCellClick:function(t){var r=n(t.currentTarget),u=r.data("date"),i=new Date(u);this.o.updateViewDate&&(i.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),i.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate));this._setDate(i)},navArrowsClick:function(t){var u=n(t.currentTarget),r=u.hasClass("prev")?-1:1;this.viewMode!==0&&(r*=i.viewModes[this.viewMode].navStep*12);this.viewDate=this.moveMonth(this.viewDate,r);this._trigger(i.viewModes[this.viewMode].e,this.viewDate);this.fill()},_toggle_multidate:function(n){var t=this.dates.contains(n);if(n||this.dates.clear(),t!==-1?(this.o.multidate===!0||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(t):this.o.multidate===!1?(this.dates.clear(),this.dates.push(n)):this.dates.push(n),typeof this.o.multidate=="number")while(this.dates.length>this.o.multidate)this.dates.remove(0)},_setDate:function(n,t){t&&t!=="date"||this._toggle_multidate(n&&new Date(n));(!t&&this.o.updateViewDate||t==="view")&&(this.viewDate=n&&new Date(n));this.fill();this.setValue();t&&t==="view"||this._trigger("changeDate");this.inputField.trigger("change");this.o.autoclose&&(!t||t==="date")&&this.hide()},moveDay:function(n,t){var i=new Date(n);return i.setUTCDate(n.getUTCDate()+t),i},moveWeek:function(n,t){return this.moveDay(n,t*7)},moveMonth:function(n,t){var u;if(!p(n))return this.o.defaultViewDate;if(!t)return n;var i=new Date(n.valueOf()),e=i.getUTCDate(),o=i.getUTCMonth(),s=Math.abs(t),r,f;if(t=t>0?1:-1,s===1)f=t===-1?function(){return i.getUTCMonth()===o}:function(){return i.getUTCMonth()!==r},r=o+t,i.setUTCMonth(r),r=(r+12)%12;else{for(u=0;u<s;u++)i=this.moveMonth(i,t);r=i.getUTCMonth();i.setUTCDate(e);f=function(){return r!==i.getUTCMonth()}}while(f())i.setUTCDate(--e),i.setUTCMonth(r);return i},moveYear:function(n,t){return this.moveMonth(n,t*12)},moveAvailableDate:function(n,t,i){do{if(n=this[i](n,t),!this.dateWithinRange(n))return!1;i="moveDay"}while(this.dateIsDisabled(n));return n},weekOfDateIsDisabled:function(t){return n.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)!==-1},dateIsDisabled:function(t){return this.weekOfDateIsDisabled(t)||n.grep(this.o.datesDisabled,function(n){return l(t,n)}).length>0},dateWithinRange:function(n){return n>=this.o.startDate&&n<=this.o.endDate},keydown:function(n){if(!this.picker.is(":visible")){(n.keyCode===40||n.keyCode===27)&&(this.show(),n.stopPropagation());return}var u=!1,t,i,r=this.focusDate||this.viewDate;switch(n.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide();n.preventDefault();n.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||this.o.daysOfWeekDisabled.length===7)break;t=n.keyCode===37||n.keyCode===38?-1:1;this.viewMode===0?n.ctrlKey?(i=this.moveAvailableDate(r,t,"moveYear"),i&&this._trigger("changeYear",this.viewDate)):n.shiftKey?(i=this.moveAvailableDate(r,t,"moveMonth"),i&&this._trigger("changeMonth",this.viewDate)):n.keyCode===37||n.keyCode===39?i=this.moveAvailableDate(r,t,"moveDay"):this.weekOfDateIsDisabled(r)||(i=this.moveAvailableDate(r,t,"moveWeek")):this.viewMode===1?((n.keyCode===38||n.keyCode===40)&&(t=t*4),i=this.moveAvailableDate(r,t,"moveMonth")):this.viewMode===2&&((n.keyCode===38||n.keyCode===40)&&(t=t*4),i=this.moveAvailableDate(r,t,"moveYear"));i&&(this.focusDate=this.viewDate=i,this.setValue(),this.fill(),n.preventDefault());break;case 13:if(!this.o.forceParse)break;r=this.focusDate||this.dates.get(-1)||this.viewDate;this.o.keyboardNavigation&&(this._toggle_multidate(r),u=!0);this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.setValue();this.fill();this.picker.is(":visible")&&(n.preventDefault(),n.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.fill();this.hide()}u&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))},setViewMode:function(n){this.viewMode=n;this.picker.children("div").hide().filter(".datepicker-"+i.viewModes[this.viewMode].clsName).show();this.updateNavArrows();this._trigger("changeViewMode",new Date(this.viewDate))}};c=function(t,i){n.data(t,"datepicker",this);this.element=n(t);this.inputs=n.map(i.inputs,function(n){return n.jquery?n[0]:n});delete i.inputs;this.keepEmptyValues=i.keepEmptyValues;delete i.keepEmptyValues;o.call(n(this.inputs),i).on("changeDate",n.proxy(this.dateUpdated,this));this.pickers=n.map(this.inputs,function(t){return n.data(t,"datepicker")});this.updateDates()};c.prototype={updateDates:function(){this.dates=n.map(this.pickers,function(n){return n.getUTCDate()});this.updateRanges()},updateRanges:function(){var t=n.map(this.dates,function(n){return n.valueOf()});n.each(this.pickers,function(n,i){i.setRange(t)})},dateUpdated:function(i){var u;if(!this.updating&&(this.updating=!0,u=n.data(i.target,"datepicker"),u!==t)){var r=u.getUTCDate(),s=this.keepEmptyValues,o=n.inArray(i.target,this.inputs),f=o-1,e=o+1,h=this.inputs.length;if(o!==-1){if(n.each(this.pickers,function(n,t){t.getUTCDate()||t!==u&&s||t.setUTCDate(r)}),r<this.dates[f])while(f>=0&&r<this.dates[f])this.pickers[f--].setUTCDate(r);else if(r>this.dates[e])while(e<h&&r>this.dates[e])this.pickers[e++].setUTCDate(r);this.updateDates();delete this.updating}}},destroy:function(){n.map(this.pickers,function(n){n.destroy()});n(this.inputs).off("changeDate",this.dateUpdated);delete this.element.data().datepicker},remove:h("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};v=n.fn.datepicker;o=function(i){var f=Array.apply(null,arguments),r;if(f.shift(),this.each(function(){var s=n(this),t=s.data("datepicker"),h=typeof i=="object"&&i;if(!t){var l=w(this,"date"),a=n.extend({},e,l,h),v=b(a.language),o=n.extend({},e,v,l,h);s.hasClass("input-daterange")||o.inputs?(n.extend(o,{inputs:o.inputs||s.find("input").toArray()}),t=new c(this,o)):t=new u(this,o);s.data("datepicker",t)}typeof i=="string"&&typeof t[i]=="function"&&(r=t[i].apply(t,f))}),r===t||r instanceof u||r instanceof c)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+i+" function)");else return r};n.fn.datepicker=o;e=n.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:n.noop,beforeShowMonth:n.noop,beforeShowYear:n.noop,beforeShowDecade:n.noop,beforeShowCentury:n.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:Infinity,forceParse:!0,format:"mm/dd/yyyy",keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-Infinity,startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"&#x00AB;",rightArrow:"&#x00BB;"},showWeekDays:!0};y=n.fn.datepicker.locale_opts=["format","rtl","weekStart"];n.fn.datepicker.Constructor=u;r=n.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}};i={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(n){if(typeof n.toValue=="function"&&typeof n.toDisplay=="function")return n;var t=n.replace(this.validParts,'\0').split('\0'),i=n.match(this.validParts);if(!t||!t.length||!i||i.length===0)throw new Error("Invalid date format.");return{separators:t,parts:i}},parseDate:function(f,e,o,h){function et(n,t){return t===!0&&(t=10),n<100&&(n+=2e3,n>(new Date).getFullYear()+t&&(n-=100)),n}function tt(){var n=this.slice(0,l[c].length),t=l[c].slice(0,n.length);return n.toLowerCase()===t.toLowerCase()}var it,g,l,y,rt,c,ut,v,ft,b,p;if(!f)return t;if(f instanceof Date)return f;if(typeof e=="string"&&(e=i.parseFormat(e)),e.toValue)return e.toValue(f,e,o);if(it={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},g={yesterday:"-1d",today:"+0d",tomorrow:"+1d"},f in g&&(f=g[f]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(f)){for(l=f.match(/([\-+]\d+)([dmwy])/gi),f=new Date,c=0;c<l.length;c++)y=l[c].match(/([\-+]\d+)([dmwy])/i),rt=Number(y[1]),ut=it[y[2].toLowerCase()],f=u.prototype[ut](f,rt);return u.prototype._zero_utc_time(f)}l=f&&f.match(this.nonpunctuation)||[];var k={},nt=["yyyy","yy","M","MM","m","mm","d","dd"],a={yyyy:function(n,t){return n.setUTCFullYear(h?et(t,h):t)},m:function(n,t){if(isNaN(n))return n;for(t-=1;t<0;)t+=12;for(t%=12,n.setUTCMonth(t);n.getUTCMonth()!==t;)n.setUTCDate(n.getUTCDate()-1);return n},d:function(n,t){return n.setUTCDate(t)}},w,d;if(a.yy=a.yyyy,a.M=a.MM=a.mm=a.m,a.dd=a.d,f=s(),v=e.parts.slice(),l.length!==v.length&&(v=n(v).filter(function(t,i){return n.inArray(i,nt)!==-1}).toArray()),l.length===v.length){for(c=0,ft=v.length;c<ft;c++){if(w=parseInt(l[c],10),y=v[c],isNaN(w))switch(y){case"MM":d=n(r[o].months).filter(tt);w=n.inArray(d[0],r[o].months)+1;break;case"M":d=n(r[o].monthsShort).filter(tt);w=n.inArray(d[0],r[o].monthsShort)+1}k[y]=w}for(c=0;c<nt.length;c++)p=nt[c],p in k&&!isNaN(k[p])&&(b=new Date(f),a[p](b,k[p]),isNaN(b)||(f=b))}return f},formatDate:function(t,u,f){var e,s,o,h;if(!t)return"";if(typeof u=="string"&&(u=i.parseFormat(u)),u.toDisplay)return u.toDisplay(t,u,f);for(e={d:t.getUTCDate(),D:r[f].daysShort[t.getUTCDay()],DD:r[f].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:r[f].monthsShort[t.getUTCMonth()],MM:r[f].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()},e.dd=(e.d<10?"0":"")+e.d,e.mm=(e.m<10?"0":"")+e.m,t=[],s=n.extend([],u.separators),o=0,h=u.parts.length;o<=h;o++)s.length&&t.push(s.shift()),t.push(e[u.parts[o]]);return t.join("")},headTemplate:'<thead><tr><th colspan="7" class="datepicker-title"><\/th><\/tr><tr><th class="prev">'+e.templates.leftArrow+'<\/th><th colspan="5" class="datepicker-switch"><\/th><th class="next">'+e.templates.rightArrow+"<\/th><\/tr><\/thead>",contTemplate:'<tbody><tr><td colspan="7"><\/td><\/tr><\/tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"><\/th><\/tr><tr><th colspan="7" class="clear"><\/th><\/tr><\/tfoot>'};i.template='<div class="datepicker"><div class="datepicker-days"><table class="table-condensed">'+i.headTemplate+"<tbody><\/tbody>"+i.footTemplate+'<\/table><\/div><div class="datepicker-months"><table class="table-condensed">'+i.headTemplate+i.contTemplate+i.footTemplate+'<\/table><\/div><div class="datepicker-years"><table class="table-condensed">'+i.headTemplate+i.contTemplate+i.footTemplate+'<\/table><\/div><div class="datepicker-decades"><table class="table-condensed">'+i.headTemplate+i.contTemplate+i.footTemplate+'<\/table><\/div><div class="datepicker-centuries"><table class="table-condensed">'+i.headTemplate+i.contTemplate+i.footTemplate+"<\/table><\/div><\/div>";n.fn.datepicker.DPGlobal=i;n.fn.datepicker.noConflict=function(){return n.fn.datepicker=v,this};n.fn.datepicker.version="1.7.1";n.fn.datepicker.deprecated=function(n){var t=window.console;t&&t.warn&&t.warn("DEPRECATED: "+n)};n(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var i=n(this);i.data("datepicker")||(t.preventDefault(),o.call(i,"show"))});n(function(){o.call(n('[data-provide="datepicker-inline"]'))})}),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?n(require("jquery")):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{return n=decodeURIComponent(n.replace(o," ")),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.setTime(+a+y*864e5)),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?!1:(n.cookie(t,"",n.extend({},i,{expires:-1})),!n.cookie(t))}}),function(n){n.Jcrop=function(t,i){function h(n){return Math.round(n)+"px"}function ft(n){return r.baseClass+"-"+n}function bi(){return n.fx.step.hasOwnProperty("backgroundColor")}function et(t){var i=n(t).offset();return[i.left,i.top]}function nt(n){return[n.pageX-b[0],n.pageY-b[1]]}function ni(t){typeof t!="object"&&(t={});r=n.extend(r,t);n.each(["onChange","onSelect","onRelease","onDblClick"],function(n,t){typeof r[t]!="function"&&(r[t]=function(){})})}function ti(n,t,i){if(b=et(e),p.setCursor(n==="move"?n:n+"-resize"),n==="move")return p.activateHandlers(di(t),pt,i);var u=s.getFixed(),r=ii(n),f=s.getCorner(ii(r));s.setPressed(s.getCorner(r));s.setCurrent(f);p.activateHandlers(ki(n,u),pt,i)}function ki(n,t){return function(i){if(r.aspectRatio)switch(n){case"e":i[1]=t.y+1;break;case"w":i[1]=t.y+1;break;case"n":i[0]=t.x+1;break;case"s":i[0]=t.x+1}else switch(n){case"e":i[1]=t.y2;break;case"w":i[1]=t.y2;break;case"n":i[0]=t.x2;break;case"s":i[0]=t.x2}s.setCurrent(i);u.update()}}function di(n){var t=n;return gt.watchKeys(),function(n){s.moveOffset([n[0]-t[0],n[1]-t[1]]);t=n;u.update()}}function ii(n){switch(n){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function ri(n){return function(t){return r.disabled?!1:n==="move"&&!r.allowMove?!1:(b=et(e),ut=!0,ti(n,nt(t)),t.stopPropagation(),t.preventDefault(),!1)}}function ui(n,t,i){var r=n.width(),u=n.height();r>t&&t>0&&(r=t,u=t/n.width()*n.height());u>i&&i>0&&(u=i,r=i/n.height()*n.width());l=n.width()/r;a=n.height()/u;n.width(r).height(u)}function ot(n){return{x:n.x*l,y:n.y*a,x2:n.x2*l,y2:n.y2*a,w:n.w*l,h:n.h*a}}function pt(){var n=s.getFixed();n.w>r.minSelect[0]&&n.h>r.minSelect[1]?(u.enableHandles(),u.done()):u.release();p.setCursor(r.allowSelect?"crosshair":"default")}function fi(n){if(r.disabled||!r.allowSelect)return!1;ut=!0;b=et(e);u.disableHandles();p.setCursor("crosshair");var t=nt(n);return s.setPressed(t),u.update(),p.activateHandlers(gi,pt,n.type.substring(0,5)==="touch"),gt.watchKeys(),n.stopPropagation(),n.preventDefault(),!1}function gi(n){s.setCurrent(n);u.update()}function ei(){var t=n("<div><\/div>").addClass(ft("tracker"));return ai&&t.css({opacity:0,backgroundColor:"white"}),t}function nr(n){w.removeClass().addClass(ft("holder")).addClass(n)}function tr(n,t){function b(){window.setTimeout(k,d)}var c=n[0]/l,y=n[1]/a,p=n[2]/l,w=n[3]/a,k;if(!dt){var o=s.flipCoords(c,y,p,w),h=s.getFixed(),e=[h.x,h.y,h.x2,h.y2],i=e,d=r.animationDelay,g=o[0]-e[0],nt=o[1]-e[1],tt=o[2]-e[2],it=o[3]-e[3],f=0,rt=r.swingSpeed;c=i[0];y=i[1];p=i[2];w=i[3];u.animMode(!0);k=function(){return function(){f+=(100-f)/rt;i[0]=Math.round(c+f/100*g);i[1]=Math.round(y+f/100*nt);i[2]=Math.round(p+f/100*tt);i[3]=Math.round(w+f/100*it);f>=99.8&&(f=100);f<100?(si(i),b()):(u.done(),u.animMode(!1),typeof t=="function"&&t.call(v))}}();b()}}function oi(n){si([n[0]/l,n[1]/a,n[2]/l,n[3]/a]);r.onSelect.call(v,ot(s.getFixed()));u.enableHandles()}function si(n){s.setPressed([n[0],n[1]]);s.setCurrent([n[2],n[3]]);u.update()}function ir(){return ot(s.getFixed())}function rr(){return s.getFixed()}function ur(n){ni(n);bt()}function hi(){r.disabled=!0;u.disableHandles();u.setCursor("default");p.setCursor("default")}function ci(){r.disabled=!1;bt()}function fr(){u.done();p.activateHandlers(null,null)}function er(){w.remove();c.show();c.css("visibility","visible");n(t).removeData("Jcrop")}function or(n,t){u.release();hi();var i=new Image;i.onload=function(){var u=i.width,s=i.height,h=r.boxWidth,c=r.boxHeight;e.width(u).height(s);e.attr("src",n);k.attr("src",n);ui(e,h,c);o=e.width();f=e.height();k.width(o).height(f);d.width(o+rt*2).height(f+rt*2);w.width(o).height(f);g.resize(o,f);ci();typeof t=="function"&&t.call(v)};i.src=n}function wt(n,t,i){var u=t||r.bgColor;r.bgFade&&bi()&&r.fadeTime&&!i?n.animate({backgroundColor:u},{queue:!1,duration:r.fadeTime}):n.css("backgroundColor",u)}function bt(n){r.allowResize?n?u.enableOnly():u.enableHandles():u.disableHandles();p.setCursor(r.allowSelect?"crosshair":"default");u.setCursor(r.allowMove?"move":"default");r.hasOwnProperty("trueSize")&&(l=r.trueSize[0]/o,a=r.trueSize[1]/f);r.hasOwnProperty("setSelect")&&(oi(r.setSelect),u.done(),delete r.setSelect);g.refresh();r.bgColor!=pi&&(wt(r.shade?g.getShades():w,r.shade?r.shadeColor||r.bgColor:r.bgColor),pi=r.bgColor);st!=r.bgOpacity&&(st=r.bgOpacity,r.shade?g.refresh():u.setBgOpacity(st));ht=r.maxSize[0]||0;ct=r.maxSize[1]||0;lt=r.minSize[0]||0;at=r.minSize[1]||0;r.hasOwnProperty("outerImage")&&(e.attr("src",r.outerImage),delete r.outerImage);u.refresh()}var r=n.extend({},n.Jcrop.defaults),b,li=navigator.userAgent.toLowerCase(),ai=/msie/.test(li),vi=/msie [1-6]\./.test(li),vt,e,v;typeof t!="object"&&(t=n(t)[0]);typeof i!="object"&&(i={});ni(i);var kt={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},c=n(t),yi=!0;t.tagName=="IMG"?(c[0].width!=0&&c[0].height!=0?(c.width(c[0].width),c.height(c[0].height)):(vt=new Image,vt.src=c[0].src,c.width(vt.width),c.height(vt.height)),e=c.clone().removeAttr("id").css(kt).show(),e.width(c.width()),e.height(c.height()),c.after(e).hide()):(e=c.css(kt).show(),yi=!1,r.shade===null&&(r.shade=!0));ui(e,r.boxWidth,r.boxHeight);var o=e.width(),f=e.height(),w=n("<div />").width(o).height(f).addClass(ft("holder")).css({position:"relative",backgroundColor:r.bgColor}).insertAfter(c).append(e);r.addClass&&w.addClass(r.addClass);var k=n("<div />"),yt=n("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),tt=n("<div />").width("100%").height("100%").css("zIndex",320),it=n("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var n=s.getFixed();r.onDblClick.call(v,n)}).insertBefore(e).append(yt,tt);yi&&(k=n("<img />").attr("src",e.attr("src")).css(kt).width(o).height(f),yt.append(k));vi&&it.css({overflowY:"hidden"});var rt=r.boundary,d=ei().width(o+rt*2).height(f+rt*2).css({position:"absolute",top:h(-rt),left:h(-rt),zIndex:290}).mousedown(fi),pi=r.bgColor,st=r.bgOpacity,ht,ct,lt,at,l,a,ut,dt,wi;b=et(e);var y=function(){function n(){var i={},u=["touchstart","touchmove","touchend"],f=document.createElement("div"),t,n,r;try{for(t=0;t<u.length;t++)n=u[t],n="on"+n,r=n in f,r||(f.setAttribute(n,"return;"),r=typeof f[n]=="function"),i[u[t]]=r;return i.touchstart&&i.touchend&&i.touchmove}catch(e){return!1}}function t(){return r.touchSupport===!0||r.touchSupport===!1?r.touchSupport:n()}return{createDragger:function(n){return function(t){return r.disabled?!1:n==="move"&&!r.allowMove?!1:(b=et(e),ut=!0,ti(n,nt(y.cfilter(t)),!0),t.stopPropagation(),t.preventDefault(),!1)}},newSelection:function(n){return fi(y.cfilter(n))},cfilter:function(n){return n.pageX=n.originalEvent.changedTouches[0].pageX,n.pageY=n.originalEvent.changedTouches[0].pageY,n},isSupported:n,support:t()}}(),s=function(){function p(r){r=h(r);u=n=r[0];i=t=r[1]}function w(n){n=h(n);v=n[0]-u;y=n[1]-i;u=n[0];i=n[1]}function b(){return[v,y]}function k(r){var e=r[0],s=r[1];0>n+e&&(e-=e+n);0>t+s&&(s-=s+t);f<i+s&&(s+=f-(i+s));o<u+e&&(e+=o-(u+e));n+=e;u+=e;t+=s;i+=s}function d(n){var t=s();switch(n){case"ne":return[t.x2,t.y];case"nw":return[t.x,t.y];case"se":return[t.x2,t.y2];case"sw":return[t.x,t.y2]}}function s(){if(!r.aspectRatio)return g();var v=r.aspectRatio,b=r.minSize[0]/l,w=r.maxSize[0]/l,nt=r.maxSize[1]/a,k=u-n,d=i-t,tt=Math.abs(k),it=Math.abs(d),rt=tt/it,s,h,y,p;return w===0&&(w=o*10),nt===0&&(nt=f*10),rt<v?(h=i,y=it*v,s=k<0?n-y:y+n,s<0?(s=0,p=Math.abs((s-n)/v),h=d<0?t-p:p+t):s>o&&(s=o,p=Math.abs((s-n)/v),h=d<0?t-p:p+t)):(s=u,p=tt/v,h=d<0?t-p:t+p,h<0?(h=0,y=Math.abs((h-t)*v),s=k<0?n-y:y+n):h>f&&(h=f,y=Math.abs(h-t)*v,s=k<0?n-y:y+n)),s>n?(s-n<b?s=n+b:s-n>w&&(s=n+w),h=h>t?t+(s-n)/v:t-(s-n)/v):s<n&&(n-s<b?s=n-b:n-s>w&&(s=n-w),h=h>t?t+(n-s)/v:t-(n-s)/v),s<0?(n-=s,s=0):s>o&&(n-=s-o,s=o),h<0?(t-=h,h=0):h>f&&(t-=h-f,h=f),c(e(n,t,s,h))}function h(n){return n[0]<0&&(n[0]=0),n[1]<0&&(n[1]=0),n[0]>o&&(n[0]=o),n[1]>f&&(n[1]=f),[Math.round(n[0]),Math.round(n[1])]}function e(n,t,i,r){var u=n,f=i,e=t,o=r;return i<n&&(u=i,f=n),r<t&&(e=r,o=t),[u,e,f,o]}function g(){var s=u-n,h=i-t,r;return ht&&Math.abs(s)>ht&&(u=s>0?n+ht:n-ht),ct&&Math.abs(h)>ct&&(i=h>0?t+ct:t-ct),at/a&&Math.abs(h)<at/a&&(i=h>0?t+at/a:t-at/a),lt/l&&Math.abs(s)<lt/l&&(u=s>0?n+lt/l:n-lt/l),n<0&&(u-=n,n-=n),t<0&&(i-=t,t-=t),u<0&&(n-=u,u-=u),i<0&&(t-=i,i-=i),u>o&&(r=u-o,n-=r,u-=r),i>f&&(r=i-f,t-=r,i-=r),n>o&&(r=n-f,i-=r,t-=r),t>f&&(r=t-f,i-=r,t-=r),c(e(n,t,u,i))}function c(n){return{x:n[0],y:n[1],x2:n[2],y2:n[3],w:n[2]-n[0],h:n[3]-n[1]}}var n=0,t=0,u=0,i=0,v,y;return{flipCoords:e,setPressed:p,setCurrent:w,getOffset:b,moveOffset:k,getCorner:d,getFixed:s}}(),g=function(){function nt(n,t){i.left.css({height:h(t)});i.right.css({height:h(t)})}function v(){return y(s.getFixed())}function y(n){i.top.css({left:h(n.x),width:h(n.w),height:h(n.y)});i.bottom.css({top:h(n.y2),left:h(n.x),width:h(n.w),height:h(f-n.y2)});i.right.css({left:h(n.x2),width:h(o-n.x2)});i.left.css({width:h(n.x)})}function l(){return n("<div />").css({position:"absolute",backgroundColor:r.shadeColor||r.bgColor}).appendTo(t)}function p(){c||(c=!0,t.insertBefore(e),v(),u.setBgOpacity(1,0,1),k.hide(),b(r.shadeColor||r.bgColor,1),u.isAwake()?a(r.bgOpacity,1):a(1,1))}function b(n,t){wt(g(),n,t)}function d(){c&&(t.remove(),k.show(),c=!1,u.isAwake()?u.setBgOpacity(r.bgOpacity,1,1):(u.setBgOpacity(1,1,1),u.disableHandles()),wt(w,0,1))}function a(n,i){c&&(r.bgFade&&!i?t.animate({opacity:1-n},{queue:!1,duration:r.fadeTime}):t.css({opacity:1-n}))}function tt(){r.shade?p():d();u.isAwake()&&a(r.bgOpacity)}function g(){return t.children()}var c=!1,t=n("<div />").css({position:"absolute",zIndex:240,opacity:0}),i={top:l(),left:l().height(f),right:l().height(f),bottom:l()};return{update:v,updateRaw:y,getShades:g,setBgColor:b,enable:p,disable:d,resize:nt,refresh:tt,opacity:a}}(),u=function(){function nt(t){var i=n("<div />").css({position:"absolute",opacity:r.borderOpacity}).addClass(ft(t));return yt.append(i),i}function c(t,i){var r=n("<div />").mousedown(ri(t)).css({cursor:t+"-resize",position:"absolute",zIndex:i}).addClass("ord-"+t);return y.support&&r.bind("touchstart.jcrop",y.createDragger(t)),tt.append(r),r}function rt(n){var t=r.handleSize,i=c(n,d++).css({opacity:r.handleOpacity}).addClass(ft("handle"));return t&&i.width(t).height(t),i}function ut(n){return c(n,d++).addClass("jcrop-dragbar")}function et(n){for(var t=0;t<n.length;t++)ni[n[t]]=ut(n[t])}function ht(n){for(var t,i=0;i<n.length;i++){switch(n[i]){case"n":t="hline";break;case"s":t="hline bottom";break;case"e":t="vline right";break;case"w":t="vline"}kt[n[i]]=nt(t)}}function ct(n){for(var t=0;t<n.length;t++)gt[n[t]]=rt(n[t])}function lt(n,t){r.shade||k.css({top:h(-t),left:h(-n)});it.css({top:h(t),left:h(n)})}function at(n,t){it.width(Math.round(n)).height(Math.round(t))}function l(){var n=s.getFixed();s.setPressed([n.x,n.y]);s.setCurrent([n.x2,n.y2]);a()}function a(n){if(t)return p(n)}function p(n){var i=s.getFixed();at(i.w,i.h);lt(i.x,i.y);r.shade&&g.updateRaw(i);t||vt();n?r.onSelect.call(v,ot(i)):r.onChange.call(v,ot(i))}function o(n,i,u){(t||i)&&(r.bgFade&&!u?e.animate({opacity:n},{queue:!1,duration:r.fadeTime}):e.css("opacity",n))}function vt(){it.show();r.shade?g.opacity(st):o(st,!0);t=!0}function pt(){i();it.hide();r.shade?g.opacity(1):o(1);t=!1;r.onRelease.call(v)}function wt(){u&&tt.show()}function w(){return u=!0,r.allowResize?(tt.show(),!0):void 0}function i(){u=!1;tt.hide()}function b(n){n?(dt=!0,i()):(dt=!1,w())}function bt(){b(!1);l()}var t,d=370,kt={},gt={},ni={},u=!1,f;return r.dragEdges&&n.isArray(r.createDragbars)&&et(r.createDragbars),n.isArray(r.createHandles)&&ct(r.createHandles),r.drawBorders&&n.isArray(r.createBorders)&&ht(r.createBorders),n(document).bind("touchstart.jcrop-ios",function(t){n(t.currentTarget).hasClass("jcrop-tracker")&&t.stopPropagation()}),f=ei().mousedown(ri("move")).css({cursor:"move",position:"absolute",zIndex:360}),y.support&&f.bind("touchstart.jcrop",y.createDragger("move")),yt.append(f),i(),{updateVisible:a,update:p,release:pt,refresh:l,isAwake:function(){return t},setCursor:function(n){f.css("cursor",n)},enableHandles:w,enableOnly:function(){u=!0},showHandles:wt,disableHandles:i,animMode:b,setBgOpacity:o,done:bt}}(),p=function(){function c(i){d.css({zIndex:450});i?n(document).bind("touchmove.jcrop",p).bind("touchend.jcrop",w):h&&n(document).bind("mousemove.jcrop",o).bind("mouseup.jcrop",t)}function l(){d.css({zIndex:290});n(document).unbind(".jcrop")}function o(n){return i(nt(n)),!1}function t(n){return n.preventDefault(),n.stopPropagation(),ut&&(ut=!1,f(nt(n)),u.isAwake()&&r.onSelect.call(v,ot(s.getFixed())),l(),i=function(){},f=function(){}),!1}function a(n,t,r){return ut=!0,i=n,f=t,c(r),!1}function p(n){return i(nt(y.cfilter(n))),!1}function w(n){return t(y.cfilter(n))}function b(n){d.css("cursor",n)}var i=function(){},f=function(){},h=r.trackDocument;return h||d.mousemove(o).mouseup(t).mouseout(t),e.before(d),{activateHandlers:a,setCursor:b}}(),gt=function(){function f(){r.keySupport&&(t.show(),t.focus())}function o(){t.hide()}function i(n,t,i){r.allowMove&&(s.moveOffset([t,i]),u.updateVisible(!0));n.preventDefault();n.stopPropagation()}function h(n){if(n.ctrlKey||n.metaKey)return!0;wi=n.shiftKey?!0:!1;var t=wi?10:1;switch(n.keyCode){case 37:i(n,-t,0);break;case 39:i(n,t,0);break;case 38:i(n,0,-t);break;case 40:i(n,0,t);break;case 27:r.allowSelect&&u.release();break;case 9:return!0}return!1}var t=n('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),c=n("<div />").css({position:"absolute",overflow:"hidden"}).append(t);return r.keySupport&&(t.keydown(h).blur(o),vi||!r.fixedSupport?(t.css({position:"absolute",left:"-20px"}),c.append(t).insertBefore(e)):t.insertBefore(e)),{watchKeys:f}}();return y.support&&d.bind("touchstart.jcrop",y.newSelection),tt.hide(),bt(!0),v={setImage:or,animateTo:tr,setSelect:oi,setOptions:ur,tellSelect:ir,tellScaled:rr,setClass:nr,disable:hi,enable:ci,cancel:fr,release:u.release,destroy:er,focus:gt.watchKeys,getBounds:function(){return[o*l,f*a]},getWidgetSize:function(){return[o,f]},getScaleFactor:function(){return[l,a]},getOptions:function(){return r},ui:{holder:w,selection:it}},ai&&w.bind("selectstart",function(){return!1}),c.data("Jcrop",v),v};n.fn.Jcrop=function(t,i){var r;return this.each(function(){if(n(this).data("Jcrop")){if(t==="api")return n(this).data("Jcrop");n(this).data("Jcrop").setOptions(t)}else this.tagName=="IMG"?n.Jcrop.Loader(this,function(){n(this).css({display:"block",visibility:"hidden"});r=n.Jcrop(this,t);n.isFunction(i)&&i.call(r)}):(n(this).css({display:"block",visibility:"hidden"}),r=n.Jcrop(this,t),n.isFunction(i)&&i.call(r))}),this};n.Jcrop.Loader=function(t,i,r){function e(){f.complete?(u.unbind(".jcloader"),n.isFunction(i)&&i.call(f)):window.setTimeout(e,50)}var u=n(t),f=u[0];u.bind("load.jcloader",e).bind("error.jcloader",function(){u.unbind(".jcloader");n.isFunction(r)&&r.call(f)});f.complete&&n.isFunction(i)&&(u.unbind(".jcloader"),i.call(f))};n.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}}(jQuery);var TotalImages=0,TotalImagesDone=0,StoryMapDeskTop=[],g_AnalyticsId;objuser={};setOldSocialSignInType=="false"&&$("form").submit(function(){var t=this.id,n=new Date;n.setTime(n.getTime()+31536e6);$("#chkSignIn").is(":checked")?t=="signinform"?($.cookie("SignInType",0,{expires:n}),$.cookie("EId",$("#txtNumber1").val(),{expires:n}),$.cookie("PWD",$("#txtPassword").val(),{expires:n})):t=="fbLoginform"?$.cookie("SignInType",1,{expires:n}):t=="googleLoginform"&&$.cookie("SignInType",2,{expires:n}):($.removeCookie("EId"),$.removeCookie("PWD"),$.removeCookie("SignInType"))})