function scrollToGatewayInputError(){var t=jQuery(".gateway-errors,.assisted-cc-input-feedback").first(),e=t.closest("form");e||(e=jQuery("form").first()),e.find('button[type="submit"],input[type="submit"]').prop("disabled",!1).removeClass("disabled").find("i.fas,i.far,i.fal,i.fab").removeAttr("class").addClass("fas fa-arrow-circle-right").find("span").toggle(),t.length&&elementOutOfViewPort(t[0])&&jQuery("html, body").animate({scrollTop:t.offset().top-50},500)}function elementOutOfViewPort(t){var e=t.getBoundingClientRect(),n={};return n.top=e.top<0,n.left=e.left<0,n.bottom=e.bottom>(window.innerHeight||document.documentElement.clientHeight),n.right=e.right>(window.innerWidth||document.documentElement.clientWidth),n.any=n.top||n.left||n.bottom||n.right,n.any}function disableFields(t,e){"."!=t[0]&&(t="."+t);var n=jQuery(t);n.prop("disabled",e),e?n.addClass("disabled"):n.removeClass("disabled")}function checkAll(t,e){"."!=t[0]&&(t="."+t),jQuery(t).removeAttr("checked"),jQuery(e).is(":checked")&&jQuery(t).click()}function clickableSafeRedirect(t,e,n){var i=t.target.tagName.toLowerCase(),r=t.target.parentNode.tagName.toLowerCase(),o=t.target.parentNode.parentNode.parentNode;return!jQuery(o).hasClass("collapsed")&&(("i"!==i||!jQuery(t.target).hasClass("ssl-required"))&&void("button"!=i&&"a"!=i&&"button"!=r&&"a"!=r&&(n?window.open(e):window.location.href=e)))}function popupWindow(t,e,n,i,r){var o=(screen.width-n)/2,a=(screen.height-i)/2;o<0&&(o=0),a<0&&(a=0);var s="height="+i+",";s+="width="+n+",",s+="top="+a+",",s+="left="+o+",",s+=r,win=window.open(t,e,s),win.window.focus()}function addRenewalToCart(t,e){jQuery("#domainRow"+t).attr("disabled","disabled"),jQuery("#domainRow"+t).find("select,button").attr("disabled","disabled"),jQuery(e).html(' Adding...');var n=jQuery("#renewalPeriod"+t).val();WHMCS.http.jqClient.post("clientarea.php","addRenewalToCart=1&token="+csrfToken+"&renewID="+t+"&period="+n,function(t){jQuery("#cartItemCount").html(1*jQuery("#cartItemCount").html()+1),jQuery(e).html(' Added'),jQuery("#btnCheckout").fadeIn()})}function selectChangeNavigate(t){window.location.href=$(t).val()}function extraTicketAttachment(){jQuery("#fileUploadsContainer").append('')}function getStats(t){WHMCS.http.jqClient.post("serverstatus.php","getstats=1&num="+t,function(e){jQuery("#load"+t).html(e.load),jQuery("#uptime"+t).html(e.uptime)},"json")}function checkPort(t,e){WHMCS.http.jqClient.post("serverstatus.php","ping=1&num="+t+"&port="+e,function(n){jQuery("#port"+e+"_"+t).html(n)})}function getticketsuggestions(){currentcheckcontent=jQuery("#message").val(),currentcheckcontent!=lastcheckcontent&&""!=currentcheckcontent&&(WHMCS.http.jqClient.post("submitticket.php",{action:"getkbarticles",text:currentcheckcontent},function(t){t&&(jQuery("#searchresults").html(t),jQuery("#searchresults").hide().removeClass("hidden").slideDown())}),lastcheckcontent=currentcheckcontent),setTimeout("getticketsuggestions();",3e3)}function refreshCustomFields(t){jQuery("#customFieldsContainer").load("submitticket.php",{action:"getcustomfields",deptid:$(t).val()})}function autoSubmitFormByContainer(t){"undefined"!=typeof noAutoSubmit&&noAutoSubmit!==!1||jQuery("#"+t).find("form:first").submit()}function useDefaultWhois(t){jQuery("."+t.substr(0,t.length-1)+"customwhois").attr("disabled",!0),jQuery("."+t.substr(0,t.length-1)+"defaultwhois").attr("disabled",!1),jQuery("#"+t.substr(0,t.length-1)+"1").attr("checked","checked")}function useCustomWhois(t){jQuery("."+t.substr(0,t.length-1)+"customwhois").attr("disabled",!1),jQuery("."+t.substr(0,t.length-1)+"defaultwhois").attr("disabled",!0),jQuery("#"+t.substr(0,t.length-1)+"2").attr("checked","checked")}function showNewBillingAddressFields(){jQuery("#newBillingAddress").slideDown()}function hideNewBillingAddressFields(){jQuery("#newBillingAddress").slideUp()}function showNewCardInputFields(){jQuery(".cc-details").hasClass("hidden")&&jQuery(".cc-details").hide().removeClass("hidden"),jQuery(".cc-details").slideDown(),jQuery("#billingAddressChoice").slideDown().find('input[name="billingcontact"]').first().iCheck("check")}function showNewAccountInputFields(){jQuery(".bank-details").hasClass("hidden")&&jQuery(".bank-details").hide().removeClass("hidden"),jQuery(".bank-details").slideDown(),jQuery("#billingAddressChoice").slideDown().find('input[name="billingcontact"]').first().iCheck("check")}function hideNewCardInputFields(){hideNewBillingAddressFields(),jQuery(".cc-details").slideUp(),jQuery("#billingAddressChoice").slideUp();var t=jQuery('input[name="ccinfo"]:checked').data("billing-contact-id");void 0!=t&&jQuery("#billingAddressChoice label.billing-contact-"+t).iCheck("check")}function hideNewAccountInputFields(){hideNewBillingAddressFields(),jQuery(".bank-details").slideUp(),jQuery("#billingAddressChoice").slideUp();var t=jQuery('input[name="paymethod"]:checked'),e=jQuery(t).data("billing-contact-id"),n=jQuery('.billing-contact-info[data-billing-contact-id="'+e+'"]');n.length&&(jQuery(".billing-contact-info").hide(),jQuery(n).show())}function getTicketSuggestions(){var t=jQuery("#inputMessage").val();t!=lastTicketMsg&&""!=t&&(WHMCS.http.jqClient.post("submitticket.php",{action:"getkbarticles",text:t},function(t){t&&(jQuery("#autoAnswerSuggestions").html(t),jQuery("#autoAnswerSuggestions").is(":visible")||jQuery("#autoAnswerSuggestions").hide().removeClass("hidden").slideDown())}),lastTicketMsg=t),setTimeout("getTicketSuggestions()",3e3)}function smoothScroll(t){$("html, body").animate({scrollTop:$(t).offset().top},500)}function irtpSubmit(){allowSubmit=!0;var t=0,e=jQuery("#modalIrtpOptOut"),n=jQuery("#modalReason"),i=jQuery("#irtpOptOut"),r=jQuery("#irtpOptOutReason");e.is(":checked")&&(t=1),i.val(t),r.val(n.val()),jQuery("#frmDomainContactModification").submit()}function showOverlay(t){jQuery("#fullpage-overlay .msg").html(t),jQuery("#fullpage-overlay").removeClass("hidden").show()}function hideOverlay(){jQuery("#fullpage-overlay").hide()}function getSslAttribute(t,e){return t.data(e)?t.data(e):t.parent("td").data(e)}function openModal(t,e,n,i,r,o,a,s,d,l){if(jQuery("#modalAjax .modal-title").html(n),i&&jQuery("#modalAjax").children('div[class="modal-dialog"]').addClass(i),r&&jQuery("#modalAjax").addClass(r),r&&jQuery("#modalAjax").addClass(r),o?(jQuery("#modalAjax .modal-submit").show().html(o),a&&jQuery("#modalAjax .modal-submit").attr("id",a)):jQuery("#modalAjax .modal-submit").hide(),d&&jQuery("#modalAjaxClose").hide(),s&&jQuery("#modalAjax .modal-submit").removeClass("btn-primary").addClass("btn-"+s),jQuery("#modalAjax .modal-body").html(""),jQuery("#modalSkip").hide(),jQuery("#modalAjax .modal-submit").prop("disabled",!0),jQuery("#modalAjax").modal("show"),WHMCS.http.jqClient.post(t,e,function(t){updateAjaxModal(t)},"json").fail(function(){jQuery("#modalAjax .modal-body").html("An error occurred while communicating with the server. Please try again."),jQuery("#modalAjax .loader").fadeOut()}).always(function(){var t=jQuery("#modalAjax").find("form");a&&t.submit(function(t){return submitIdAjaxModalClickEvent(),!1}),l&&t.data("successDataTable",l)}),a){var u=jQuery("#"+a);u.off("click"),u.on("click",submitIdAjaxModalClickEvent)}}function submitIdAjaxModalClickEvent(){if(!jQuery(this).hasClass("disabled")){var t=!0,e=jQuery(this);if(e.addClass("disabled"),jQuery("#modalAjax .loader").show(),ajaxModalSubmitEvents.length&&jQuery.each(ajaxModalSubmitEvents,function(e,n){var i=window[n];t&&"function"==typeof i&&(t=i())}),!t)return e.removeClass("disabled"),void jQuery("#modalAjax .loader").hide();var n=jQuery("#modalAjax").find("form"),i=jQuery("#modalAjax .modal-body"),r=jQuery(i).find(".admin-modal-error");jQuery(r).slideUp();WHMCS.http.jqClient.post(n.attr("action"),n.serialize(),function(t){n.data("successDataTable")&&(t.successDataTable=n.data("successDataTable")),ajaxModalPostSubmitEvents.length&&jQuery.each(ajaxModalPostSubmitEvents,function(e,i){var r=window[i];"function"==typeof r&&r(t,n)}),updateAjaxModal(t)},"json").fail(function(t){var e=t.responseJSON,n="An error occurred while communicating with the server. Please try again.";e&&e.data?(e=e.data,e.errorMsg?r.length>0?jQuery(r).html(e.errorMsg).slideDown():jQuery.growl.warning({title:e.errorMsgTitle,message:e.errorMsg}):e.data.body?jQuery(i).html(e.body):jQuery(i).html(n)):jQuery(i).html(n),jQuery("#modalAjax .loader").fadeOut()}).always(function(){e.removeClass("disabled")})}}function updateAjaxModal(t){if(t.reloadPage)return void("string"==typeof t.reloadPage?window.location=t.reloadPage:window.location.reload());if(t.successDataTable&&WHMCS.ui.dataTable.getTableById(t.successDataTable,void 0).ajax.reload(),t.redirect&&(window.location=t.redirect),t.successWindow&&"function"==typeof window[t.successWindow]&&window[t.successWindow](),t.dismiss&&dialogClose(),t.successMsg&&jQuery.growl.notice({title:t.successMsgTitle,message:t.successMsg}),t.errorMsg){var e=jQuery("#modalAjax .modal-body .admin-modal-error");e.length>0&&!t.dismiss?jQuery(e).html(t.errorMsg).slideDown():jQuery.growl.warning({title:t.errorMsgTitle,message:t.errorMsg})}if(t.title&&jQuery("#modalAjax .modal-title").html(t.title),t.body?jQuery("#modalAjax .modal-body").html(t.body):t.url&&WHMCS.http.jqClient.post(t.url,"",function(t){jQuery("#modalAjax").find(".modal-body").html(t.body)},"json").fail(function(){jQuery("#modalAjax").find(".modal-body").html("An error occurred while communicating with the server. Please try again."),jQuery("#modalAjax").find(".loader").fadeOut()}),t.submitlabel&&(jQuery("#modalAjax .modal-submit").html(t.submitlabel).show(),t.submitId&&jQuery("#modalAjax").find(".modal-submit").attr("id",t.submitId)),t.submitId){var n=jQuery("#"+t.submitId);n.off("click"),n.on("click",submitIdAjaxModalClickEvent)}t.disableSubmit?disableSubmit():enableSubmit(),t.hideSubmit&&ajaxModalHideSubmit()}function dialogSubmit(){jQuery("#modalAjax .modal-submit").prop("disabled",!0),jQuery("#modalAjax .loader").show();var t=jQuery("#modalAjax").find("form").attr("action");WHMCS.http.jqClient.post(t,jQuery("#modalAjax").find("form").serialize(),function(t){updateAjaxModal(t)},"json").fail(function(){jQuery("#modalAjax .modal-body").html("An error occurred while communicating with the server. Please try again."),jQuery("#modalAjax .loader").fadeOut()})}function dialogClose(){jQuery("#modalAjax").modal("hide")}function addAjaxModalSubmitEvents(t){t&&ajaxModalSubmitEvents.push(t)}function removeAjaxModalSubmitEvents(t){if(t){var e=ajaxModalSubmitEvents.indexOf(t);e>=0&&ajaxModalSubmitEvents.splice(e,1)}}function addAjaxModalPostSubmitEvents(t){t&&ajaxModalPostSubmitEvents.push(t)}function removeAjaxModalPostSubmitEvents(t){if(t){var e=ajaxModalPostSubmitEvents.indexOf(t);e>=0&&ajaxModalPostSubmitEvents.splice(e,1)}}function disableSubmit(){jQuery("#modalAjax .modal-submit").prop("disabled",!0),jQuery("#modalAjax .loader").show()}function enableSubmit(){jQuery("#modalAjax .loader").fadeOut(),jQuery("#modalAjax .modal-submit").removeProp("disabled")}function ajaxModalHideSubmit(){jQuery("#modalAjax .modal-submit").hide()}if(function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function n(t){var e=!!t&&"length"in t&&t.length,n=pt.type(t);return"function"!==n&&!pt.isWindow(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function i(t,e,n){if(pt.isFunction(e))return pt.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return pt.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(xt.test(e))return pt.filter(e,t,n);e=pt.filter(e,t)}return pt.grep(t,function(t){return pt.inArray(t,e)>-1!==n})}function r(t,e){do t=t[e];while(t&&1!==t.nodeType);return t}function o(t){var e={};return pt.each(t.match(jt)||[],function(t,n){e[n]=!0}),e}function a(){it.addEventListener?(it.removeEventListener("DOMContentLoaded",s),t.removeEventListener("load",s)):(it.detachEvent("onreadystatechange",s),t.detachEvent("onload",s))}function s(){(it.addEventListener||"load"===t.event.type||"complete"===it.readyState)&&(a(),pt.ready())}function d(t,e,n){if(void 0===n&&1===t.nodeType){var i="data-"+e.replace(Et,"-$1").toLowerCase();if(n=t.getAttribute(i),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Nt.test(n)?pt.parseJSON(n):n)}catch(t){}pt.data(t,e,n)}else n=void 0}return n}function l(t){var e;for(e in t)if(("data"!==e||!pt.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function u(t,e,n,i){if(Lt(t)){var r,o,a=pt.expando,s=t.nodeType,d=s?pt.cache:t,l=s?t[a]:t[a]&&a;if(l&&d[l]&&(i||d[l].data)||void 0!==n||"string"!=typeof e)return l||(l=s?t[a]=nt.pop()||pt.guid++:a),d[l]||(d[l]=s?{}:{toJSON:pt.noop}),"object"!=typeof e&&"function"!=typeof e||(i?d[l]=pt.extend(d[l],e):d[l].data=pt.extend(d[l].data,e)),o=d[l],i||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pt.camelCase(e)]=n),"string"==typeof e?(r=o[e],null==r&&(r=o[pt.camelCase(e)])):r=o,r}}function c(t,e,n){if(Lt(t)){var i,r,o=t.nodeType,a=o?pt.cache:t,s=o?t[pt.expando]:pt.expando;if(a[s]){if(e&&(i=n?a[s]:a[s].data)){pt.isArray(e)?e=e.concat(pt.map(e,pt.camelCase)):e in i?e=[e]:(e=pt.camelCase(e),e=e in i?[e]:e.split(" ")),r=e.length;for(;r--;)delete i[e[r]];if(n?!l(i):!pt.isEmptyObject(i))return}(n||(delete a[s].data,l(a[s])))&&(o?pt.cleanData([t],!0):ct.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function h(t,e,n,i){var r,o=1,a=20,s=i?function(){return i.cur()}:function(){return pt.css(t,e,"")},d=s(),l=n&&n[3]||(pt.cssNumber[e]?"":"px"),u=(pt.cssNumber[e]||"px"!==l&&+d)&&Pt.exec(pt.css(t,e));if(u&&u[3]!==l){l=l||u[3],n=n||[],u=+d||1;do o=o||".5",u/=o,pt.style(t,e,u+l);while(o!==(o=s()/d)&&1!==o&&--a)}return n&&(u=+u||+d||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=l,i.start=u,i.end=r)),r}function p(t){var e=Ut.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}function f(t,e){var n,i,r=0,o="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):void 0;if(!o)for(o=[],n=t.childNodes||t;null!=(i=n[r]);r++)!e||pt.nodeName(i,e)?o.push(i):pt.merge(o,f(i,e));return void 0===e||e&&pt.nodeName(t,e)?pt.merge([t],o):o}function g(t,e){for(var n,i=0;null!=(n=t[i]);i++)pt._data(n,"globalEval",!e||pt._data(e[i],"globalEval"))}function m(t){Qt.test(t.type)&&(t.defaultChecked=t.checked)}function $(t,e,n,i,r){for(var o,a,s,d,l,u,c,h=t.length,$=p(e),v=[],y=0;y"!==c[1]||Gt.test(a)?0:d:d.firstChild,o=a&&a.childNodes.length;o--;)pt.nodeName(u=a.childNodes[o],"tbody")&&!u.childNodes.length&&a.removeChild(u);for(pt.merge(v,d.childNodes),d.textContent="";d.firstChild;)d.removeChild(d.firstChild);d=$.lastChild}else v.push(e.createTextNode(a));for(d&&$.removeChild(d),ct.appendChecked||pt.grep(f(v,"input"),m),y=0;a=v[y++];)if(i&&pt.inArray(a,i)>-1)r&&r.push(a);else if(s=pt.contains(a.ownerDocument,a),d=f($.appendChild(a),"script"),s&&g(d),n)for(o=0;a=d[o++];)Bt.test(a.type||"")&&n.push(a);return d=null,$}function v(){return!0}function y(){return!1}function b(){try{return it.activeElement}catch(t){}}function C(t,e,n,i,r,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(i=i||n,n=void 0);for(s in e)C(t,s,n,i,e[s],o);return t}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),r===!1)r=y;else if(!r)return t;return 1===o&&(a=r,r=function(t){return pt().off(t),a.apply(this,arguments)},r.guid=a.guid||(a.guid=pt.guid++)),t.each(function(){pt.event.add(this,e,r,i,n)})}function w(t,e){return pt.nodeName(t,"table")&&pt.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function x(t){return t.type=(null!==pt.find.attr(t,"type"))+"/"+t.type,t}function S(t){var e=re.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function T(t,e){if(1===e.nodeType&&pt.hasData(t)){var n,i,r,o=pt._data(t),a=pt._data(e,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(i=0,r=s[n].length;i1&&"string"==typeof p&&!ct.checkClone&&ie.test(p))return t.each(function(r){var o=t.eq(r);g&&(e[0]=p.call(this,r,o.html())),D(o,e,n,i)});if(c&&(l=$(e,t[0].ownerDocument,!1,t,i),r=l.firstChild,1===l.childNodes.length&&(l=r),r||i)){for(s=pt.map(f(l,"script"),x),a=s.length;u")).appendTo(e.documentElement),e=(de[0].contentWindow||de[0].contentDocument).document,e.write(),e.close(),n=j(t,e),de.detach()),le[t]=n),n}function A(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function L(t){if(t in Se)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=xe.length;n--;)if(t=xe[n]+e,t in Se)return t}function N(t,e){for(var n,i,r,o=[],a=0,s=t.length;a=0&&n=0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},isPlainObject:function(t){var e;if(!t||"object"!==pt.type(t)||t.nodeType||pt.isWindow(t))return!1;try{if(t.constructor&&!ut.call(t,"constructor")&&!ut.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}if(!ct.ownFirst)for(e in t)return ut.call(t,e);for(e in t);return void 0===e||ut.call(t,e)},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?dt[lt.call(t)]||"object":typeof t},globalEval:function(e){e&&pt.trim(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(t){return t.replace(gt,"ms-").replace(mt,$t)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var i,r=0;if(n(t))for(i=t.length;rw.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[R]=!0,t}function r(t){var e=L.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var n=t.split("|"),i=n.length;i--;)w.attrHandle[n[i]]=e}function a(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||G)-(~t.sourceIndex||G);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function s(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function d(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function l(t){return i(function(e){return e=+e,i(function(n,i){for(var r,o=t([],n.length,e),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function u(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function c(){}function h(t){for(var e=0,n=t.length,i="";e1?function(e,n,i){for(var r=t.length;r--;)if(!t[r](e,n,i))return!1;return!0}:t[0]}function g(t,n,i){for(var r=0,o=n.length;r-1&&(i[l]=!(a[l]=c))}}else y=m(y===a?y.splice(f,y.length):y),o?o(null,a,y,d):Z.apply(a,y)})}function v(t){for(var e,n,i,r=t.length,o=w.relative[t[0].type],a=o||w.relative[" "],s=o?1:0,d=p(function(t){return t===e},a,!0),l=p(function(t){return tt(e,t)>-1},a,!0),u=[function(t,n,i){var r=!o&&(i||n!==_)||((e=n).nodeType?d(t,n,i):l(t,n,i));return e=null,r}];s1&&f(u),s>1&&h(t.slice(0,s-1).concat({value:" "===t[s-2].type?"*":""})).replace(st,"$1"),n,s0,o=t.length>0,a=function(i,a,s,d,l){var u,c,h,p=0,f="0",g=i&&[],$=[],v=_,y=i||o&&w.find.TAG("*",l),b=F+=null==v?1:Math.random()||.1,C=y.length;for(l&&(_=a===L||a||l);f!==C&&null!=(u=y[f]);f++){if(o&&u){for(c=0,a||u.ownerDocument===L||(A(u),s=!E);h=t[c++];)if(h(u,a||L,s)){d.push(u);break}l&&(F=b)}r&&((u=!h&&u)&&p--,i&&g.push(u))}if(p+=f,r&&f!==p){for(c=0;h=n[c++];)h(g,$,a,s);if(i){if(p>0)for(;f--;)g[f]||$[f]||($[f]=J.call(d));$=m($)}Z.apply(d,$),l&&!i&&$.length>0&&p+n.length>1&&e.uniqueSort(d)}return l&&(F=b,_=v),g};return r?i(a):a}var b,C,w,x,S,T,k,D,_,j,I,A,L,N,E,M,P,O,H,R="sizzle"+1*new Date,Q=t.document,F=0,B=0,W=n(),U=n(),q=n(),z=function(t,e){return t===e&&(I=!0),0},G=1<<31,V={}.hasOwnProperty,K=[],J=K.pop,X=K.push,Z=K.push,Y=K.slice,tt=function(t,e){for(var n=0,i=t.length;n+~]|"+nt+")"+nt+"*"),ut=new RegExp("="+nt+"*([^\\]'\"]*?)"+nt+"*\\]","g"),ct=new RegExp(ot),ht=new RegExp("^"+it+"$"),pt={ID:new RegExp("^#("+it+")"),CLASS:new RegExp("^\\.("+it+")"),TAG:new RegExp("^("+it+"|[*])"),ATTR:new RegExp("^"+rt),PSEUDO:new RegExp("^"+ot),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},ft=/^(?:input|select|textarea|button)$/i,gt=/^h\d$/i,mt=/^[^{]+\{\s*\[native \w/,$t=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,vt=/[+~]/,yt=/'|\\/g,bt=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),Ct=function(t,e,n){var i="0x"+e-65536;return i!==i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},wt=function(){A()};try{Z.apply(K=Y.call(Q.childNodes),Q.childNodes),K[Q.childNodes.length].nodeType}catch(t){Z={apply:K.length?function(t,e){X.apply(t,Y.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}C=e.support={},S=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},A=e.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:Q;return i!==L&&9===i.nodeType&&i.documentElement?(L=i,N=L.documentElement,E=!S(L),(n=L.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",wt,!1):n.attachEvent&&n.attachEvent("onunload",wt)),C.attributes=r(function(t){return t.className="i",!t.getAttribute("className")}),C.getElementsByTagName=r(function(t){return t.appendChild(L.createComment("")),!t.getElementsByTagName("*").length}),C.getElementsByClassName=mt.test(L.getElementsByClassName),C.getById=r(function(t){return N.appendChild(t).id=R,!L.getElementsByName||!L.getElementsByName(R).length}),C.getById?(w.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&E){var n=e.getElementById(t);return n?[n]:[]}},w.filter.ID=function(t){var e=t.replace(bt,Ct);return function(t){return t.getAttribute("id")===e}}):(delete w.find.ID,w.filter.ID=function(t){var e=t.replace(bt,Ct);return function(t){var n="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}}),w.find.TAG=C.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):C.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},w.find.CLASS=C.getElementsByClassName&&function(t,e){if("undefined"!=typeof e.getElementsByClassName&&E)return e.getElementsByClassName(t)},P=[],M=[],(C.qsa=mt.test(L.querySelectorAll))&&(r(function(t){N.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&M.push("[*^$]="+nt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||M.push("\\["+nt+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+R+"-]").length||M.push("~="),t.querySelectorAll(":checked").length||M.push(":checked"),t.querySelectorAll("a#"+R+"+*").length||M.push(".#.+[+~]")}),r(function(t){var e=L.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&M.push("name"+nt+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||M.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),M.push(",.*:")})),(C.matchesSelector=mt.test(O=N.matches||N.webkitMatchesSelector||N.mozMatchesSelector||N.oMatchesSelector||N.msMatchesSelector))&&r(function(t){C.disconnectedMatch=O.call(t,"div"),O.call(t,"[s!='']:x"),P.push("!=",ot)}),M=M.length&&new RegExp(M.join("|")),P=P.length&&new RegExp(P.join("|")),e=mt.test(N.compareDocumentPosition),H=e||mt.test(N.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},z=e?function(t,e){if(t===e)return I=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n?n:(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!C.sortDetached&&e.compareDocumentPosition(t)===n?t===L||t.ownerDocument===Q&&H(Q,t)?-1:e===L||e.ownerDocument===Q&&H(Q,e)?1:j?tt(j,t)-tt(j,e):0:4&n?-1:1)}:function(t,e){if(t===e)return I=!0,0;var n,i=0,r=t.parentNode,o=e.parentNode,s=[t],d=[e];if(!r||!o)return t===L?-1:e===L?1:r?-1:o?1:j?tt(j,t)-tt(j,e):0;if(r===o)return a(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)d.unshift(n);for(;s[i]===d[i];)i++;return i?a(s[i],d[i]):s[i]===Q?-1:d[i]===Q?1:0},L):L},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==L&&A(t),n=n.replace(ut,"='$1']"),C.matchesSelector&&E&&!q[n+" "]&&(!P||!P.test(n))&&(!M||!M.test(n)))try{var i=O.call(t,n);if(i||C.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return e(n,L,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==L&&A(t),H(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==L&&A(t);var n=w.attrHandle[e.toLowerCase()],i=n&&V.call(w.attrHandle,e.toLowerCase())?n(t,e,!E):void 0;return void 0!==i?i:C.attributes||!E?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,r=0;if(I=!C.detectDuplicates,j=!C.sortStable&&t.slice(0),t.sort(z),I){for(;e=t[r++];)e===t[r]&&(i=n.push(r));for(;i--;)t.splice(n[i],1)}return j=null,t},x=e.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=x(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=x(e);return n},w=e.selectors={cacheLength:50,createPseudo:i,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(bt,Ct),t[3]=(t[3]||t[4]||t[5]||"").replace(bt,Ct),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return pt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&ct.test(n)&&(e=T(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(bt,Ct).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=W[t+" "];return e||(e=new RegExp("(^|"+nt+")"+t+"("+nt+"|$)"))&&W(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(r){var o=e.attr(r,t);return null==o?"!="===n:!n||(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(at," ")+" ").indexOf(i)>-1:"|="===n&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,n,i,r){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,d){var l,u,c,h,p,f,g=o!==a?"nextSibling":"previousSibling",m=e.parentNode,$=s&&e.nodeName.toLowerCase(),v=!d&&!s,y=!1;if(m){if(o){for(;g;){for(h=e;h=h[g];)if(s?h.nodeName.toLowerCase()===$:1===h.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[a?m.firstChild:m.lastChild],a&&v){for(h=m,c=h[R]||(h[R]={}),u=c[h.uniqueID]||(c[h.uniqueID]={}),l=u[t]||[],p=l[0]===F&&l[1],y=p&&l[2],h=p&&m.childNodes[p];h=++p&&h&&h[g]||(y=p=0)||f.pop();)if(1===h.nodeType&&++y&&h===e){u[t]=[F,p,y];break}}else if(v&&(h=e,c=h[R]||(h[R]={}),u=c[h.uniqueID]||(c[h.uniqueID]={}),l=u[t]||[],p=l[0]===F&&l[1],y=p),y===!1)for(;(h=++p&&h&&h[g]||(y=p=0)||f.pop())&&((s?h.nodeName.toLowerCase()!==$:1!==h.nodeType)||!++y||(v&&(c=h[R]||(h[R]={}),u=c[h.uniqueID]||(c[h.uniqueID]={}),u[t]=[F,y]),h!==e)););return y-=r,y===i||y%i===0&&y/i>=0}}},PSEUDO:function(t,n){var r,o=w.pseudos[t]||w.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[R]?o(n):o.length>1?(r=[t,t,"",n],w.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,r=o(t,n),a=r.length;a--;)i=tt(t,r[a]),t[i]=!(e[i]=r[a])}):function(t){return o(t,0,r)}):o}},pseudos:{not:i(function(t){var e=[],n=[],r=k(t.replace(st,"$1"));return r[R]?i(function(t,e,n,i){for(var o,a=r(t,null,i,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(t){return t=t.replace(bt,Ct),function(e){return(e.textContent||e.innerText||x(e)).indexOf(t)>-1}}),lang:i(function(t){return ht.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(bt,Ct).toLowerCase(),function(e){var n;do if(n=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===N},focus:function(t){return t===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!w.pseudos.empty(t)},header:function(t){return gt.test(t.nodeName)},input:function(t){return ft.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:l(function(){return[0]}),last:l(function(t,e){return[e-1]}),eq:l(function(t,e,n){return[n<0?n+e:n]}),even:l(function(t,e){for(var n=0;n=0;)t.push(i);return t}),gt:l(function(t,e,n){for(var i=n<0?n+e:n;++i2&&"ID"===(a=o[0]).type&&C.getById&&9===e.nodeType&&E&&w.relative[o[1].type]){if(e=(w.find.ID(a.matches[0].replace(bt,Ct),e)||[])[0],!e)return n;l&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(r=pt.needsContext.test(t)?0:o.length;r--&&(a=o[r],!w.relative[s=a.type]);)if((d=w.find[s])&&(i=d(a.matches[0].replace(bt,Ct),vt.test(o[0].type)&&u(e.parentNode)||e))){if(o.splice(r,1),t=i.length&&h(o),!t)return Z.apply(n,i),n;break}}return(l||k(t,c))(i,e,!E,n,!e||vt.test(t)&&u(e.parentNode)||e),n},C.sortStable=R.split("").sort(z).join("")===R,C.detectDuplicates=!!I,A(),C.sortDetached=r(function(t){return 1&t.compareDocumentPosition(L.createElement("div"))}),r(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),C.attributes&&r(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),r(function(t){return null==t.getAttribute("disabled")})||o(et,function(t,e,n){var i;if(!n)return t[e]===!0?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(t);pt.find=vt,pt.expr=vt.selectors,pt.expr[":"]=pt.expr.pseudos,pt.uniqueSort=pt.unique=vt.uniqueSort,pt.text=vt.getText,pt.isXMLDoc=vt.isXML,pt.contains=vt.contains;var yt=function(t,e,n){for(var i=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&pt(t).is(n))break;i.push(t)}return i},bt=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},Ct=pt.expr.match.needsContext,wt=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,xt=/^.[^:#\[\.,]*$/;pt.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?pt.find.matchesSelector(i,t)?[i]:[]:pt.find.matches(t,pt.grep(e,function(t){return 1===t.nodeType}))},pt.fn.extend({find:function(t){var e,n=[],i=this,r=i.length;if("string"!=typeof t)return this.pushStack(pt(t).filter(function(){for(e=0;e1?pt.unique(n):n),n.selector=this.selector?this.selector+" "+t:t,n},filter:function(t){return this.pushStack(i(this,t||[],!1))},not:function(t){return this.pushStack(i(this,t||[],!0))},is:function(t){return!!i(this,"string"==typeof t&&Ct.test(t)?pt(t):t||[],!1).length}});var St,Tt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,kt=pt.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||St,"string"==typeof t){if(i="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:Tt.exec(t),!i||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof pt?e[0]:e,pt.merge(this,pt.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:it,!0)),wt.test(i[1])&&pt.isPlainObject(e))for(i in e)pt.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}if(r=it.getElementById(i[2]),r&&r.parentNode){if(r.id!==i[2])return St.find(t);this.length=1,this[0]=r}return this.context=it,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):pt.isFunction(t)?"undefined"!=typeof n.ready?n.ready(t):t(pt):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),pt.makeArray(t,this))};kt.prototype=pt.fn,St=pt(it);var Dt=/^(?:parents|prev(?:Until|All))/,_t={children:!0,contents:!0,next:!0,prev:!0};pt.fn.extend({has:function(t){var e,n=pt(t,this),i=n.length;return this.filter(function(){for(e=0;e-1:1===n.nodeType&&pt.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?pt.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?pt.inArray(this[0],pt(t)):pt.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(pt.uniqueSort(pt.merge(this.get(),pt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),pt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return yt(t,"parentNode")},parentsUntil:function(t,e,n){return yt(t,"parentNode",n)},next:function(t){return r(t,"nextSibling")},prev:function(t){return r(t,"previousSibling")},nextAll:function(t){return yt(t,"nextSibling")},prevAll:function(t){return yt(t,"previousSibling")},nextUntil:function(t,e,n){return yt(t,"nextSibling",n)},prevUntil:function(t,e,n){return yt(t,"previousSibling",n)},siblings:function(t){return bt((t.parentNode||{}).firstChild,t)},children:function(t){return bt(t.firstChild)},contents:function(t){return pt.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:pt.merge([],t.childNodes)}},function(t,e){pt.fn[t]=function(n,i){var r=pt.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=pt.filter(i,r)),this.length>1&&(_t[t]||(r=pt.uniqueSort(r)),Dt.test(t)&&(r=r.reverse())),this.pushStack(r)}});var jt=/\S+/g;pt.Callbacks=function(t){t="string"==typeof t?o(t):pt.extend({},t);var e,n,i,r,a=[],s=[],d=-1,l=function(){for(r=t.once,i=e=!0;s.length;d=-1)for(n=s.shift();++d-1;)a.splice(n,1),n<=d&&d--}),this},has:function(t){return t?pt.inArray(t,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return r=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return r=!0,n||u.disable(),this},locked:function(){return!!r},fireWith:function(t,n){return r||(n=n||[],n=[t,n.slice?n.slice():n],s.push(n),e||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},pt.extend({Deferred:function(t){var e=[["resolve","done",pt.Callbacks("once memory"),"resolved"],["reject","fail",pt.Callbacks("once memory"),"rejected"],["notify","progress",pt.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var t=arguments;return pt.Deferred(function(n){pt.each(e,function(e,o){var a=pt.isFunction(t[e])&&t[e];r[o[1]](function(){var t=a&&a.apply(this,arguments);t&&pt.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===i?n.promise():this,a?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?pt.extend(t,i):i}},r={};return i.pipe=i.then,pt.each(e,function(t,o){var a=o[2],s=o[3];i[o[1]]=a.add,s&&a.add(function(){n=s},e[1^t][2].disable,e[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?i:this,arguments),this},r[o[0]+"With"]=a.fireWith}),i.promise(r),t&&t.call(r,r),r},when:function(t){var e,n,i,r=0,o=rt.call(arguments),a=o.length,s=1!==a||t&&pt.isFunction(t.promise)?a:0,d=1===s?t:pt.Deferred(),l=function(t,n,i){return function(r){n[t]=this,i[t]=arguments.length>1?rt.call(arguments):r,i===e?d.notifyWith(n,i):--s||d.resolveWith(n,i)}};if(a>1)for(e=new Array(a),n=new Array(a),i=new Array(a);r0||(It.resolveWith(it,[pt]),pt.fn.triggerHandler&&(pt(it).triggerHandler("ready"),pt(it).off("ready"))))}}),pt.ready.promise=function(e){if(!It)if(It=pt.Deferred(),"complete"===it.readyState||"loading"!==it.readyState&&!it.documentElement.doScroll)t.setTimeout(pt.ready);else if(it.addEventListener)it.addEventListener("DOMContentLoaded",s),t.addEventListener("load",s);else{it.attachEvent("onreadystatechange",s),t.attachEvent("onload",s);var n=!1;try{n=null==t.frameElement&&it.documentElement}catch(t){}n&&n.doScroll&&!function e(){if(!pt.isReady){try{n.doScroll("left")}catch(n){return t.setTimeout(e,50)}a(),pt.ready()}}()}return It.promise(e)},pt.ready.promise();var At;for(At in pt(ct))break;ct.ownFirst="0"===At,ct.inlineBlockNeedsLayout=!1,pt(function(){var t,e,n,i;n=it.getElementsByTagName("body")[0],n&&n.style&&(e=it.createElement("div"),i=it.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(e),"undefined"!=typeof e.style.zoom&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",ct.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(n.style.zoom=1)),n.removeChild(i))}),function(){var t=it.createElement("div");ct.deleteExpando=!0;try{delete t.test}catch(t){ct.deleteExpando=!1}t=null}();var Lt=function(t){var e=pt.noData[(t.nodeName+" ").toLowerCase()],n=+t.nodeType||1;return(1===n||9===n)&&(!e||e!==!0&&t.getAttribute("classid")===e)},Nt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Et=/([A-Z])/g;pt.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return t=t.nodeType?pt.cache[t[pt.expando]]:t[pt.expando],!!t&&!l(t)},data:function(t,e,n){return u(t,e,n)},removeData:function(t,e){return c(t,e)},_data:function(t,e,n){return u(t,e,n,!0)},_removeData:function(t,e){return c(t,e,!0)}}),pt.fn.extend({data:function(t,e){var n,i,r,o=this[0],a=o&&o.attributes;if(void 0===t){if(this.length&&(r=pt.data(o),1===o.nodeType&&!pt._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(i=a[n].name,0===i.indexOf("data-")&&(i=pt.camelCase(i.slice(5)),d(o,i,r[i])));pt._data(o,"parsedAttrs",!0)}return r}return"object"==typeof t?this.each(function(){pt.data(this,t)}):arguments.length>1?this.each(function(){pt.data(this,t,e)}):o?d(o,t,pt.data(o,t)):void 0},removeData:function(t){return this.each(function(){pt.removeData(this,t)})}}),pt.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=pt._data(t,e),n&&(!i||pt.isArray(n)?i=pt._data(t,e,pt.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=pt.queue(t,e),i=n.length,r=n.shift(),o=pt._queueHooks(t,e),a=function(){pt.dequeue(t,e)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return pt._data(t,n)||pt._data(t,n,{empty:pt.Callbacks("once memory").add(function(){pt._removeData(t,e+"queue"),pt._removeData(t,n)})})}}),pt.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length
a",ct.leadingWhitespace=3===t.firstChild.nodeType,ct.tbody=!t.getElementsByTagName("tbody").length,ct.htmlSerialize=!!t.getElementsByTagName("link").length,ct.html5Clone="<:nav>"!==it.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,e.appendChild(n),ct.appendChecked=n.checked,t.innerHTML="",ct.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,e.appendChild(t),n=it.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ct.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,ct.noCloneEvent=!!t.addEventListener,t[pt.expando]=1,ct.attributes=!t.getAttribute(pt.expando)}();var qt={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:ct.htmlSerialize?[0,"",""]:[1,"X
","
"]};qt.optgroup=qt.option,qt.tbody=qt.tfoot=qt.colgroup=qt.caption=qt.thead,qt.th=qt.td;var zt=/<|&#?\w+;/,Gt=/-1&&(f=p.split("."),p=f.shift(),f.sort()),a=p.indexOf(":")<0&&"on"+p, e=e[pt.expando]?e:new pt.Event(p,"object"==typeof e&&e),e.isTrigger=r?2:3,e.namespace=f.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),n=null==n?[e]:pt.makeArray(n,[e]),l=pt.event.special[p]||{},r||!l.trigger||l.trigger.apply(i,n)!==!1)){if(!r&&!l.noBubble&&!pt.isWindow(i)){for(d=l.delegateType||p,Xt.test(d+p)||(s=s.parentNode);s;s=s.parentNode)h.push(s),u=s;u===(i.ownerDocument||it)&&h.push(u.defaultView||u.parentWindow||t)}for(c=0;(s=h[c++])&&!e.isPropagationStopped();)e.type=c>1?d:l.bindType||p,o=(pt._data(s,"events")||{})[e.type]&&pt._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&Lt(s)&&(e.result=o.apply(s,n),e.result===!1&&e.preventDefault());if(e.type=p,!r&&!e.isDefaultPrevented()&&(!l._default||l._default.apply(h.pop(),n)===!1)&&Lt(i)&&a&&i[p]&&!pt.isWindow(i)){u=i[a],u&&(i[a]=null),pt.event.triggered=p;try{i[p]()}catch(t){}pt.event.triggered=void 0,u&&(i[a]=u)}return e.result}},dispatch:function(t){t=pt.event.fix(t);var e,n,i,r,o,a=[],s=rt.call(arguments),d=(pt._data(this,"events")||{})[t.type]||[],l=pt.event.special[t.type]||{};if(s[0]=t,t.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,t)!==!1){for(a=pt.event.handlers.call(this,t,d),e=0;(r=a[e++])&&!t.isPropagationStopped();)for(t.currentTarget=r.elem,n=0;(o=r.handlers[n++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(o.namespace)||(t.handleObj=o,t.data=o.data,i=((pt.event.special[o.origType]||{}).handle||o.handler).apply(r.elem,s),void 0!==i&&(t.result=i)===!1&&(t.preventDefault(),t.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,i,r,o,a=[],s=e.delegateCount,d=t.target;if(s&&d.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;d!=this;d=d.parentNode||this)if(1===d.nodeType&&(d.disabled!==!0||"click"!==t.type)){for(i=[],n=0;n-1:pt.find(r,this,null,[d]).length),i[r]&&i.push(o);i.length&&a.push({elem:d,handlers:i})}return s]","i"),ee=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ne=/\s*$/g,ae=p(it),se=ae.appendChild(it.createElement("div"));pt.extend({htmlPrefilter:function(t){return t.replace(ee,"<$1>")},clone:function(t,e,n){var i,r,o,a,s,d=pt.contains(t.ownerDocument,t);if(ct.html5Clone||pt.isXMLDoc(t)||!te.test("<"+t.nodeName+">")?o=t.cloneNode(!0):(se.innerHTML=t.outerHTML,se.removeChild(o=se.firstChild)),!(ct.noCloneEvent&&ct.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||pt.isXMLDoc(t)))for(i=f(o),s=f(t),a=0;null!=(r=s[a]);++a)i[a]&&k(r,i[a]);if(e)if(n)for(s=s||f(t),i=i||f(o),a=0;null!=(r=s[a]);a++)T(r,i[a]);else T(t,o);return i=f(o,"script"),i.length>0&&g(i,!d&&f(t,"script")),i=s=r=null,o},cleanData:function(t,e){for(var n,i,r,o,a=0,s=pt.expando,d=pt.cache,l=ct.attributes,u=pt.event.special;null!=(n=t[a]);a++)if((e||Lt(n))&&(r=n[s],o=r&&d[r])){if(o.events)for(i in o.events)u[i]?pt.event.remove(n,i):pt.removeEvent(n,i,o.handle);d[r]&&(delete d[r],l||"undefined"==typeof n.removeAttribute?n[s]=void 0:n.removeAttribute(s),nt.push(r))}}}),pt.fn.extend({domManip:D,detach:function(t){return _(this,t,!0)},remove:function(t){return _(this,t)},text:function(t){return Rt(this,function(t){return void 0===t?pt.text(this):this.empty().append((this[0]&&this[0].ownerDocument||it).createTextNode(t))},null,t,arguments.length)},append:function(){return D(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=w(this,t);e.appendChild(t)}})},prepend:function(){return D(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=w(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return D(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return D(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&pt.cleanData(f(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&pt.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return pt.clone(this,t,e)})},html:function(t){return Rt(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(Yt,""):void 0;if("string"==typeof t&&!ne.test(t)&&(ct.htmlSerialize||!te.test(t))&&(ct.leadingWhitespace||!Wt.test(t))&&!qt[(Ft.exec(t)||["",""])[1].toLowerCase()]){t=pt.htmlPrefilter(t);try{for(;nt",l.childNodes[0].style.borderCollapse="separate",e=l.getElementsByTagName("td"),e[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===e[0].offsetHeight,o&&(e[0].style.display="",e[1].style.display="none",o=0===e[0].offsetHeight)),c.removeChild(d)}var n,i,r,o,a,s,d=it.createElement("div"),l=it.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",ct.opacity="0.5"===l.style.opacity,ct.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",ct.clearCloneStyle="content-box"===l.style.backgroundClip,d=it.createElement("div"),d.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",d.appendChild(l),ct.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,pt.extend(ct,{reliableHiddenOffsets:function(){return null==n&&e(),o},boxSizingReliable:function(){return null==n&&e(),r},pixelMarginRight:function(){return null==n&&e(),i},pixelPosition:function(){return null==n&&e(),n},reliableMarginRight:function(){return null==n&&e(),a},reliableMarginLeft:function(){return null==n&&e(),s}}))}();var fe,ge,me=/^(top|right|bottom|left)$/;t.getComputedStyle?(fe=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)},ge=function(t,e,n){var i,r,o,a,s=t.style;return n=n||fe(t),a=n?n.getPropertyValue(e)||n[e]:void 0,""!==a&&void 0!==a||pt.contains(t.ownerDocument,t)||(a=pt.style(t,e)),n&&!ct.pixelMarginRight()&&ce.test(a)&&ue.test(e)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o),void 0===a?a:a+""}):pe.currentStyle&&(fe=function(t){return t.currentStyle},ge=function(t,e,n){var i,r,o,a,s=t.style;return n=n||fe(t),a=n?n[e]:void 0,null==a&&s&&s[e]&&(a=s[e]),ce.test(a)&&!me.test(e)&&(i=s.left,r=t.runtimeStyle,o=r&&r.left,o&&(r.left=t.currentStyle.left),s.left="fontSize"===e?"1em":a,a=s.pixelLeft+"px",s.left=i,o&&(r.left=o)),void 0===a?a:a+""||"auto"});var $e=/alpha\([^)]*\)/i,ve=/opacity\s*=\s*([^)]*)/i,ye=/^(none|table(?!-c[ea]).+)/,be=new RegExp("^("+Mt+")(.*)$","i"),Ce={position:"absolute",visibility:"hidden",display:"block"},we={letterSpacing:"0",fontWeight:"400"},xe=["Webkit","O","Moz","ms"],Se=it.createElement("div").style;pt.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=ge(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:ct.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,a,s=pt.camelCase(e),d=t.style;if(e=pt.cssProps[s]||(pt.cssProps[s]=L(s)||s),a=pt.cssHooks[e]||pt.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(r=a.get(t,!1,i))?r:d[e];if(o=typeof n,"string"===o&&(r=Pt.exec(n))&&r[1]&&(n=h(t,e,r),o="number"),null!=n&&n===n&&("number"===o&&(n+=r&&r[3]||(pt.cssNumber[s]?"":"px")),ct.clearCloneStyle||""!==n||0!==e.indexOf("background")||(d[e]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(t,n,i)))))try{d[e]=n}catch(t){}}},css:function(t,e,n,i){var r,o,a,s=pt.camelCase(e);return e=pt.cssProps[s]||(pt.cssProps[s]=L(s)||s),a=pt.cssHooks[e]||pt.cssHooks[s],a&&"get"in a&&(o=a.get(t,!0,n)),void 0===o&&(o=ge(t,e,i)),"normal"===o&&e in we&&(o=we[e]),""===n||n?(r=parseFloat(o),n===!0||isFinite(r)?r||0:o):o}}),pt.each(["height","width"],function(t,e){pt.cssHooks[e]={get:function(t,n,i){if(n)return ye.test(pt.css(t,"display"))&&0===t.offsetWidth?he(t,Ce,function(){return P(t,e,i)}):P(t,e,i)},set:function(t,n,i){var r=i&&fe(t);return E(t,n,i?M(t,e,i,ct.boxSizing&&"border-box"===pt.css(t,"boxSizing",!1,r),r):0)}}}),ct.opacity||(pt.cssHooks.opacity={get:function(t,e){return ve.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var n=t.style,i=t.currentStyle,r=pt.isNumeric(e)?"alpha(opacity="+100*e+")":"",o=i&&i.filter||n.filter||"";n.zoom=1,(e>=1||""===e)&&""===pt.trim(o.replace($e,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===e||i&&!i.filter)||(n.filter=$e.test(o)?o.replace($e,r):o+" "+r)}}),pt.cssHooks.marginRight=A(ct.reliableMarginRight,function(t,e){if(e)return he(t,{display:"inline-block"},ge,[t,"marginRight"])}),pt.cssHooks.marginLeft=A(ct.reliableMarginLeft,function(t,e){if(e)return(parseFloat(ge(t,"marginLeft"))||(pt.contains(t.ownerDocument,t)?t.getBoundingClientRect().left-he(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}):0))+"px"}),pt.each({margin:"",padding:"",border:"Width"},function(t,e){pt.cssHooks[t+e]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];i<4;i++)r[t+Ot[i]+e]=o[i]||o[i-2]||o[0];return r}},ue.test(t)||(pt.cssHooks[t+e].set=E)}),pt.fn.extend({css:function(t,e){return Rt(this,function(t,e,n){var i,r,o={},a=0;if(pt.isArray(e)){for(i=fe(t),r=e.length;a1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Ht(this)?pt(this).show():pt(this).hide()})}}),pt.Tween=O,O.prototype={constructor:O,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||pt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(pt.cssNumber[n]?"":"px")},cur:function(){var t=O.propHooks[this.prop];return t&&t.get?t.get(this):O.propHooks._default.get(this)},run:function(t){var e,n=O.propHooks[this.prop];return this.options.duration?this.pos=e=pt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=pt.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){pt.fx.step[t.prop]?pt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[pt.cssProps[t.prop]]&&!pt.cssHooks[t.prop]?t.elem[t.prop]=t.now:pt.style(t.elem,t.prop,t.now+t.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},pt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},pt.fx=O.prototype.init,pt.fx.step={};var Te,ke,De=/^(?:toggle|show|hide)$/,_e=/queueHooks$/;pt.Animation=pt.extend(W,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return h(n.elem,t,Pt.exec(e),n),n}]},tweener:function(t,e){pt.isFunction(t)?(e=t,t=["*"]):t=t.match(jt);for(var n,i=0,r=t.length;i
a",t=n.getElementsByTagName("a")[0],e.setAttribute("type","checkbox"),n.appendChild(e),t=n.getElementsByTagName("a")[0],t.style.cssText="top:1px",ct.getSetAttribute="t"!==n.className,ct.style=/top/.test(t.getAttribute("style")),ct.hrefNormalized="/a"===t.getAttribute("href"),ct.checkOn=!!e.value,ct.optSelected=r.selected,ct.enctype=!!it.createElement("form").enctype,i.disabled=!0,ct.optDisabled=!r.disabled,e=it.createElement("input"),e.setAttribute("value",""),ct.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),ct.radioValue="t"===e.value}();var je=/\r/g,Ie=/[\x20\t\r\n\f]+/g;pt.fn.extend({val:function(t){var e,n,i,r=this[0];{if(arguments.length)return i=pt.isFunction(t),this.each(function(n){var r;1===this.nodeType&&(r=i?t.call(this,n,pt(this).val()):t,null==r?r="":"number"==typeof r?r+="":pt.isArray(r)&&(r=pt.map(r,function(t){return null==t?"":t+""})),e=pt.valHooks[this.type]||pt.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))});if(r)return e=pt.valHooks[r.type]||pt.valHooks[r.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(je,""):null==n?"":n)}}}),pt.extend({valHooks:{option:{get:function(t){var e=pt.find.attr(t,"value");return null!=e?e:pt.trim(pt.text(t)).replace(Ie," ")}},select:{get:function(t){for(var e,n,i=t.options,r=t.selectedIndex,o="select-one"===t.type||r<0,a=o?null:[],s=o?r+1:i.length,d=r<0?s:o?r:0;d-1)try{i.selected=n=!0}catch(t){i.scrollHeight}else i.selected=!1;return n||(t.selectedIndex=-1),r}}}}),pt.each(["radio","checkbox"],function(){pt.valHooks[this]={set:function(t,e){if(pt.isArray(e))return t.checked=pt.inArray(pt(t).val(),e)>-1}},ct.checkOn||(pt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Ae,Le,Ne=pt.expr.attrHandle,Ee=/^(?:checked|selected)$/i,Me=ct.getSetAttribute,Pe=ct.input;pt.fn.extend({attr:function(t,e){return Rt(this,pt.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){pt.removeAttr(this,t)})}}),pt.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof t.getAttribute?pt.prop(t,e,n):(1===o&&pt.isXMLDoc(t)||(e=e.toLowerCase(),r=pt.attrHooks[e]||(pt.expr.match.bool.test(e)?Le:Ae)),void 0!==n?null===n?void pt.removeAttr(t,e):r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):r&&"get"in r&&null!==(i=r.get(t,e))?i:(i=pt.find.attr(t,e),null==i?void 0:i))},attrHooks:{type:{set:function(t,e){if(!ct.radioValue&&"radio"===e&&pt.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i,r=0,o=e&&e.match(jt);if(o&&1===t.nodeType)for(;n=o[r++];)i=pt.propFix[n]||n,pt.expr.match.bool.test(n)?Pe&&Me||!Ee.test(n)?t[i]=!1:t[pt.camelCase("default-"+n)]=t[i]=!1:pt.attr(t,n,""),t.removeAttribute(Me?n:i)}}),Le={set:function(t,e,n){return e===!1?pt.removeAttr(t,n):Pe&&Me||!Ee.test(n)?t.setAttribute(!Me&&pt.propFix[n]||n,n):t[pt.camelCase("default-"+n)]=t[n]=!0,n}},pt.each(pt.expr.match.bool.source.match(/\w+/g),function(t,e){var n=Ne[e]||pt.find.attr;Pe&&Me||!Ee.test(e)?Ne[e]=function(t,e,i){var r,o;return i||(o=Ne[e],Ne[e]=r,r=null!=n(t,e,i)?e.toLowerCase():null,Ne[e]=o),r}:Ne[e]=function(t,e,n){if(!n)return t[pt.camelCase("default-"+e)]?e.toLowerCase():null}}),Pe&&Me||(pt.attrHooks.value={set:function(t,e,n){return pt.nodeName(t,"input")?void(t.defaultValue=e):Ae&&Ae.set(t,e,n)}}),Me||(Ae={set:function(t,e,n){var i=t.getAttributeNode(n);if(i||t.setAttributeNode(i=t.ownerDocument.createAttribute(n)),i.value=e+="","value"===n||e===t.getAttribute(n))return e}},Ne.id=Ne.name=Ne.coords=function(t,e,n){var i;if(!n)return(i=t.getAttributeNode(e))&&""!==i.value?i.value:null},pt.valHooks.button={get:function(t,e){var n=t.getAttributeNode(e);if(n&&n.specified)return n.value},set:Ae.set},pt.attrHooks.contenteditable={set:function(t,e,n){Ae.set(t,""!==e&&e,n)}},pt.each(["width","height"],function(t,e){pt.attrHooks[e]={set:function(t,n){if(""===n)return t.setAttribute(e,"auto"),n}}})),ct.style||(pt.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var Oe=/^(?:input|select|textarea|button|object)$/i,He=/^(?:a|area)$/i;pt.fn.extend({prop:function(t,e){return Rt(this,pt.prop,t,e,arguments.length>1)},removeProp:function(t){return t=pt.propFix[t]||t,this.each(function(){try{this[t]=void 0,delete this[t]}catch(t){}})}}),pt.extend({prop:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pt.isXMLDoc(t)||(e=pt.propFix[e]||e,r=pt.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=pt.find.attr(t,"tabindex");return e?parseInt(e,10):Oe.test(t.nodeName)||He.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ct.hrefNormalized||pt.each(["href","src"],function(t,e){pt.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),ct.optSelected||(pt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),pt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pt.propFix[this.toLowerCase()]=this}),ct.enctype||(pt.propFix.enctype="encoding");var Re=/[\t\r\n\f]/g;pt.fn.extend({addClass:function(t){var e,n,i,r,o,a,s,d=0;if(pt.isFunction(t))return this.each(function(e){pt(this).addClass(t.call(this,e,U(this)))});if("string"==typeof t&&t)for(e=t.match(jt)||[];n=this[d++];)if(r=U(n),i=1===n.nodeType&&(" "+r+" ").replace(Re," ")){for(a=0;o=e[a++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");s=pt.trim(i),r!==s&&pt.attr(n,"class",s)}return this},removeClass:function(t){var e,n,i,r,o,a,s,d=0;if(pt.isFunction(t))return this.each(function(e){pt(this).removeClass(t.call(this,e,U(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(jt)||[];n=this[d++];)if(r=U(n),i=1===n.nodeType&&(" "+r+" ").replace(Re," ")){for(a=0;o=e[a++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");s=pt.trim(i),r!==s&&pt.attr(n,"class",s)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):pt.isFunction(t)?this.each(function(n){pt(this).toggleClass(t.call(this,n,U(this),e),e)}):this.each(function(){var e,i,r,o;if("string"===n)for(i=0,r=pt(this),o=t.match(jt)||[];e=o[i++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else void 0!==t&&"boolean"!==n||(e=U(this),e&&pt._data(this,"__className__",e),pt.attr(this,"class",e||t===!1?"":pt._data(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+U(n)+" ").replace(Re," ").indexOf(e)>-1)return!0;return!1}}),pt.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){pt.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),pt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}});var Qe=t.location,Fe=pt.now(),Be=/\?/,We=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pt.parseJSON=function(e){if(t.JSON&&t.JSON.parse)return t.JSON.parse(e+"");var n,i=null,r=pt.trim(e+"");return r&&!pt.trim(r.replace(We,function(t,e,r,o){return n&&e&&(i=0),0===i?t:(n=r||e,i+=!o-!r,"")}))?Function("return "+r)():pt.error("Invalid JSON: "+e)},pt.parseXML=function(e){var n,i;if(!e||"string"!=typeof e)return null;try{t.DOMParser?(i=new t.DOMParser,n=i.parseFromString(e,"text/xml")):(n=new t.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(e))}catch(t){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pt.error("Invalid XML: "+e),n};var Ue=/#.*$/,qe=/([?&])_=[^&]*/,ze=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ge=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ve=/^(?:GET|HEAD)$/,Ke=/^\/\//,Je=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Xe={},Ze={},Ye="*/".concat("*"),tn=Qe.href,en=Je.exec(tn.toLowerCase())||[];pt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:tn,type:"GET",isLocal:Ge.test(en[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ye,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText", json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pt.parseJSON,"text xml":pt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?G(G(t,pt.ajaxSettings),e):G(pt.ajaxSettings,t)},ajaxPrefilter:q(Xe),ajaxTransport:q(Ze),ajax:function(e,n){function i(e,n,i,r){var o,c,v,y,C,x=n;2!==b&&(b=2,d&&t.clearTimeout(d),u=void 0,s=r||"",w.readyState=e>0?4:0,o=e>=200&&e<300||304===e,i&&(y=V(h,w,i)),y=K(h,y,w,o),o?(h.ifModified&&(C=w.getResponseHeader("Last-Modified"),C&&(pt.lastModified[a]=C),C=w.getResponseHeader("etag"),C&&(pt.etag[a]=C)),204===e||"HEAD"===h.type?x="nocontent":304===e?x="notmodified":(x=y.state,c=y.data,v=y.error,o=!v)):(v=x,!e&&x||(x="error",e<0&&(e=0))),w.status=e,w.statusText=(n||x)+"",o?g.resolveWith(p,[c,x,w]):g.rejectWith(p,[w,x,v]),w.statusCode($),$=void 0,l&&f.trigger(o?"ajaxSuccess":"ajaxError",[w,h,o?c:v]),m.fireWith(p,[w,x]),l&&(f.trigger("ajaxComplete",[w,h]),--pt.active||pt.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=void 0),n=n||{};var r,o,a,s,d,l,u,c,h=pt.ajaxSetup({},n),p=h.context||h,f=h.context&&(p.nodeType||p.jquery)?pt(p):pt.event,g=pt.Deferred(),m=pt.Callbacks("once memory"),$=h.statusCode||{},v={},y={},b=0,C="canceled",w={readyState:0,getResponseHeader:function(t){var e;if(2===b){if(!c)for(c={};e=ze.exec(s);)c[e[1].toLowerCase()]=e[2];e=c[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return b||(t=y[n]=y[n]||t,v[t]=e),this},overrideMimeType:function(t){return b||(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(b<2)for(e in t)$[e]=[$[e],t[e]];else w.always(t[w.status]);return this},abort:function(t){var e=t||C;return u&&u.abort(e),i(0,e),this}};if(g.promise(w).complete=m.add,w.success=w.done,w.error=w.fail,h.url=((e||h.url||tn)+"").replace(Ue,"").replace(Ke,en[1]+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=pt.trim(h.dataType||"*").toLowerCase().match(jt)||[""],null==h.crossDomain&&(r=Je.exec(h.url.toLowerCase()),h.crossDomain=!(!r||r[1]===en[1]&&r[2]===en[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(en[3]||("http:"===en[1]?"80":"443")))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=pt.param(h.data,h.traditional)),z(Xe,h,n,w),2===b)return w;l=pt.event&&h.global,l&&0===pt.active++&&pt.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Ve.test(h.type),a=h.url,h.hasContent||(h.data&&(a=h.url+=(Be.test(a)?"&":"?")+h.data,delete h.data),h.cache===!1&&(h.url=qe.test(a)?a.replace(qe,"$1_="+Fe++):a+(Be.test(a)?"&":"?")+"_="+Fe++)),h.ifModified&&(pt.lastModified[a]&&w.setRequestHeader("If-Modified-Since",pt.lastModified[a]),pt.etag[a]&&w.setRequestHeader("If-None-Match",pt.etag[a])),(h.data&&h.hasContent&&h.contentType!==!1||n.contentType)&&w.setRequestHeader("Content-Type",h.contentType),w.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Ye+"; q=0.01":""):h.accepts["*"]);for(o in h.headers)w.setRequestHeader(o,h.headers[o]);if(h.beforeSend&&(h.beforeSend.call(p,w,h)===!1||2===b))return w.abort();C="abort";for(o in{success:1,error:1,complete:1})w[o](h[o]);if(u=z(Ze,h,n,w)){if(w.readyState=1,l&&f.trigger("ajaxSend",[w,h]),2===b)return w;h.async&&h.timeout>0&&(d=t.setTimeout(function(){w.abort("timeout")},h.timeout));try{b=1,u.send(v,i)}catch(t){if(!(b<2))throw t;i(-1,t)}}else i(-1,"No Transport");return w},getJSON:function(t,e,n){return pt.get(t,e,n,"json")},getScript:function(t,e){return pt.get(t,void 0,e,"script")}}),pt.each(["get","post"],function(t,e){pt[e]=function(t,n,i,r){return pt.isFunction(n)&&(r=r||i,i=n,n=void 0),pt.ajax(pt.extend({url:t,type:e,dataType:r,data:n,success:i},pt.isPlainObject(t)&&t))}}),pt._evalUrl=function(t){return pt.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},pt.fn.extend({wrapAll:function(t){if(pt.isFunction(t))return this.each(function(e){pt(this).wrapAll(t.call(this,e))});if(this[0]){var e=pt(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(t){return pt.isFunction(t)?this.each(function(e){pt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=pt(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=pt.isFunction(t);return this.each(function(n){pt(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){pt.nodeName(this,"body")||pt(this).replaceWith(this.childNodes)}).end()}}),pt.expr.filters.hidden=function(t){return ct.reliableHiddenOffsets()?t.offsetWidth<=0&&t.offsetHeight<=0&&!t.getClientRects().length:X(t)},pt.expr.filters.visible=function(t){return!pt.expr.filters.hidden(t)};var nn=/%20/g,rn=/\[\]$/,on=/\r?\n/g,an=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;pt.param=function(t,e){var n,i=[],r=function(t,e){e=pt.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=pt.ajaxSettings&&pt.ajaxSettings.traditional),pt.isArray(t)||t.jquery&&!pt.isPlainObject(t))pt.each(t,function(){r(this.name,this.value)});else for(n in t)Z(n,t[n],e,r);return i.join("&").replace(nn,"+")},pt.fn.extend({serialize:function(){return pt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=pt.prop(this,"elements");return t?pt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!pt(this).is(":disabled")&&sn.test(this.nodeName)&&!an.test(t)&&(this.checked||!Qt.test(t))}).map(function(t,e){var n=pt(this).val();return null==n?null:pt.isArray(n)?pt.map(n,function(t){return{name:e.name,value:t.replace(on,"\r\n")}}):{name:e.name,value:n.replace(on,"\r\n")}}).get()}}),pt.ajaxSettings.xhr=void 0!==t.ActiveXObject?function(){return this.isLocal?tt():it.documentMode>8?Y():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Y()||tt()}:Y;var dn=0,ln={},un=pt.ajaxSettings.xhr();t.attachEvent&&t.attachEvent("onunload",function(){for(var t in ln)ln[t](void 0,!0)}),ct.cors=!!un&&"withCredentials"in un,un=ct.ajax=!!un,un&&pt.ajaxTransport(function(e){if(!e.crossDomain||ct.cors){var n;return{send:function(i,r){var o,a=e.xhr(),s=++dn;if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)a[o]=e.xhrFields[o];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(o in i)void 0!==i[o]&&a.setRequestHeader(o,i[o]+"");a.send(e.hasContent&&e.data||null),n=function(t,i){var o,d,l;if(n&&(i||4===a.readyState))if(delete ln[s],n=void 0,a.onreadystatechange=pt.noop,i)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{d=a.statusText}catch(t){d=""}o||!e.isLocal||e.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&r(o,d,l,a.getAllResponseHeaders())},e.async?4===a.readyState?t.setTimeout(n):a.onreadystatechange=ln[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return pt.globalEval(t),t}}}),pt.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),pt.ajaxTransport("script",function(t){if(t.crossDomain){var e,n=it.head||pt("head")[0]||it.documentElement;return{send:function(i,r){e=it.createElement("script"),e.async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,n){(n||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,n||r(200,"success"))},n.insertBefore(e,n.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}});var cn=[],hn=/(=)\?(?=&|$)|\?\?/;pt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=cn.pop()||pt.expando+"_"+Fe++;return this[t]=!0,t}}),pt.ajaxPrefilter("json jsonp",function(e,n,i){var r,o,a,s=e.jsonp!==!1&&(hn.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&hn.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=pt.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(hn,"$1"+r):e.jsonp!==!1&&(e.url+=(Be.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||pt.error(r+" was not called"),a[0]},e.dataTypes[0]="json",o=t[r],t[r]=function(){a=arguments},i.always(function(){void 0===o?pt(t).removeProp(r):t[r]=o,e[r]&&(e.jsonpCallback=n.jsonpCallback,cn.push(r)),a&&pt.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),pt.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||it;var i=wt.exec(t),r=!n&&[];return i?[e.createElement(i[1])]:(i=$([t],e,r),r&&r.length&&pt(r).remove(),pt.merge([],i.childNodes))};var pn=pt.fn.load;pt.fn.load=function(t,e,n){if("string"!=typeof t&&pn)return pn.apply(this,arguments);var i,r,o,a=this,s=t.indexOf(" ");return s>-1&&(i=pt.trim(t.slice(s,t.length)),t=t.slice(0,s)),pt.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(r="POST"),a.length>0&&pt.ajax({url:t,type:r||"GET",dataType:"html",data:e}).done(function(t){o=arguments,a.html(i?pt("
").append(pt.parseHTML(t)).find(i):t)}).always(n&&function(t,e){a.each(function(){n.apply(this,o||[t.responseText,e,t])})}),this},pt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){pt.fn[e]=function(t){return this.on(e,t)}}),pt.expr.filters.animated=function(t){return pt.grep(pt.timers,function(e){return t===e.elem}).length},pt.offset={setOffset:function(t,e,n){var i,r,o,a,s,d,l,u=pt.css(t,"position"),c=pt(t),h={};"static"===u&&(t.style.position="relative"),s=c.offset(),o=pt.css(t,"top"),d=pt.css(t,"left"),l=("absolute"===u||"fixed"===u)&&pt.inArray("auto",[o,d])>-1,l?(i=c.position(),a=i.top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(d)||0),pt.isFunction(e)&&(e=e.call(t,n,pt.extend({},s))),null!=e.top&&(h.top=e.top-s.top+a),null!=e.left&&(h.left=e.left-s.left+r),"using"in e?e.using.call(t,h):c.css(h)}},pt.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){pt.offset.setOffset(this,t,e)});var e,n,i={top:0,left:0},r=this[0],o=r&&r.ownerDocument;if(o)return e=o.documentElement,pt.contains(e,r)?("undefined"!=typeof r.getBoundingClientRect&&(i=r.getBoundingClientRect()),n=et(o),{top:i.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:i.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):i},position:function(){if(this[0]){var t,e,n={top:0,left:0},i=this[0];return"fixed"===pt.css(i,"position")?e=i.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),pt.nodeName(t[0],"html")||(n=t.offset()),n.top+=pt.css(t[0],"borderTopWidth",!0),n.left+=pt.css(t[0],"borderLeftWidth",!0)),{top:e.top-n.top-pt.css(i,"marginTop",!0),left:e.left-n.left-pt.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&!pt.nodeName(t,"html")&&"static"===pt.css(t,"position");)t=t.offsetParent;return t||pe})}}),pt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n=/Y/.test(e);pt.fn[t]=function(i){return Rt(this,function(t,i,r){var o=et(t);return void 0===r?o?e in o?o[e]:o.document.documentElement[i]:t[i]:void(o?o.scrollTo(n?pt(o).scrollLeft():r,n?r:pt(o).scrollTop()):t[i]=r)},t,i,arguments.length,null)}}),pt.each(["top","left"],function(t,e){pt.cssHooks[e]=A(ct.pixelPosition,function(t,n){if(n)return n=ge(t,e),ce.test(n)?pt(t).position()[e]+"px":n})}),pt.each({Height:"height",Width:"width"},function(t,e){pt.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){pt.fn[i]=function(i,r){var o=arguments.length&&(n||"boolean"!=typeof i),a=n||(i===!0||r===!0?"margin":"border");return Rt(this,function(e,n,i){var r;return pt.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===i?pt.css(e,n,a):pt.style(e,n,i,a)},e,o?i:void 0,o,null)}})}),pt.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}}),pt.fn.size=function(){return this.length},pt.fn.andSelf=pt.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return pt});var fn=t.jQuery,gn=t.$;return pt.noConflict=function(e){return t.$===pt&&(t.$=gn),e&&t.jQuery===pt&&(t.jQuery=fn),pt},e||(t.jQuery=t.$=pt),pt}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",function(){n=!0});var r=function(){n||t(i).trigger(t.support.transition.end)};return setTimeout(r,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),r=n.data("bs.alert");r||n.data("bs.alert",r=new i(this)),"string"==typeof e&&r[e].call(n)})}var n='[data-dismiss="alert"]',i=function(e){t(e).on("click",n,this.close)};i.VERSION="3.4.1",i.TRANSITION_DURATION=150,i.prototype.close=function(e){function n(){a.detach().trigger("closed.bs.alert").remove()}var r=t(this),o=r.attr("data-target");o||(o=r.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),o="#"===o?[]:o;var a=t(document).find(o);e&&e.preventDefault(),a.length||(a=r.closest(".alert")),a.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(a.removeClass("in"),t.support.transition&&a.hasClass("fade")?a.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var r=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=r,this},t(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.button"),o="object"==typeof e&&e;r||i.data("bs.button",r=new n(this,o)),"toggle"==e?r.toggle():e&&r.setState(e)})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.4.1",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",i=this.$element,r=i.is("input")?"val":"html",o=i.data();e+="Text",null==o.resetText&&i.data("resetText",i[r]()),setTimeout(t.proxy(function(){i[r](null==o[e]?this.options[e]:o[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=t(n.target).closest(".btn");e.call(i,"toggle"),t(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),i.is("input,button")?i.trigger("focus"):i.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.carousel"),o=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e),a="string"==typeof e?e:o.slide;r||i.data("bs.carousel",r=new n(this,o)),"number"==typeof e?r.to(e):a?r[a]():o.interval&&r.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.4.1",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e),i="prev"==t&&0===n||"next"==t&&n==this.$items.length-1;if(i&&!this.options.wrap)return e;var r="prev"==t?-1:1,o=(n+r)%this.$items.length;return this.$items.eq(o)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(e,i){var r=this.$element.find(".item.active"),o=i||this.getItemForDirection(e,r),a=this.interval,s="next"==e?"left":"right",d=this;if(o.hasClass("active"))return this.sliding=!1;var l=o[0],u=t.Event("slide.bs.carousel",{relatedTarget:l,direction:s});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var c=t(this.$indicators.children()[this.getItemIndex(o)]);c&&c.addClass("active")}var h=t.Event("slid.bs.carousel",{relatedTarget:l,direction:s});return t.support.transition&&this.$element.hasClass("slide")?(o.addClass(e),"object"==typeof o&&o.length&&o[0].offsetWidth,r.addClass(s),o.addClass(s),r.one("bsTransitionEnd",function(){o.removeClass([e,s].join(" ")).addClass("active"),r.removeClass(["active",s].join(" ")),d.sliding=!1,setTimeout(function(){d.$element.trigger(h)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(r.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(h)),a&&this.cycle(),this}};var i=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this};var r=function(n){var i=t(this),r=i.attr("href");r&&(r=r.replace(/.*(?=#[^\s]+$)/,""));var o=i.attr("data-target")||r,a=t(document).find(o);if(a.hasClass("carousel")){var s=t.extend({},a.data(),i.data()),d=i.attr("data-slide-to");d&&(s.interval=!1),e.call(a,s),d&&a.data("bs.carousel").to(d),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(jQuery),+function(t){"use strict";function e(e){var n,i=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(document).find(i)}function n(e){return this.each(function(){var n=t(this),r=n.data("bs.collapse"),o=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);!r&&o.toggle&&/show|hide/.test(e)&&(o.toggle=!1),r||n.data("bs.collapse",r=new i(this,o)),"string"==typeof e&&r[e]()})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.4.1",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(r&&r.length&&(e=r.data("bs.collapse"),e&&e.transitioning))){var o=t.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){r&&r.length&&(n.call(r,"hide"),e||r.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return s.call(this);var d=t.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",t.proxy(s,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[a](this.$element[0][d])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[n](0).one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(i.TRANSITION_DURATION):r.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return t(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,i){var r=t(i);this.addAriaAndCollapsedClass(e(r),r)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var r=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=r,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var r=t(this);r.attr("data-target")||i.preventDefault();var o=e(r),a=o.data("bs.collapse"),s=a?"toggle":r.data();n.call(o,s)})}(jQuery),+function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=e.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==n?t(document).find(n):null;return i&&i.length?i:e.parent()}function n(n){n&&3===n.which||(t(r).remove(),t(o).each(function(){var i=t(this),r=e(i),o={relatedTarget:this};r.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(r[0],n.target)||(r.trigger(n=t.Event("hide.bs.dropdown",o)),n.isDefaultPrevented()||(i.attr("aria-expanded","false"),r.removeClass("open").trigger(t.Event("hidden.bs.dropdown",o)))))}))}function i(e){return this.each(function(){var n=t(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new a(this)),"string"==typeof e&&i[e].call(n)})}var r=".dropdown-backdrop",o='[data-toggle="dropdown"]',a=function(e){t(e).on("click.bs.dropdown",this.toggle)};a.VERSION="3.4.1",a.prototype.toggle=function(i){var r=t(this);if(!r.is(".disabled, :disabled")){var o=e(r),a=o.hasClass("open");if(n(),!a){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var s={relatedTarget:this};if(o.trigger(i=t.Event("show.bs.dropdown",s)),i.isDefaultPrevented())return;r.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger(t.Event("shown.bs.dropdown",s))}return!1}},a.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=t(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var r=e(i),a=r.hasClass("open");if(!a&&27!=n.which||a&&27==n.which)return 27==n.which&&r.find(o).trigger("focus"),i.trigger("click");var s=" li:not(.disabled):visible a",d=r.find(".dropdown-menu"+s);if(d.length){var l=d.index(n.target);38==n.which&&l>0&&l--,40==n.which&&ldocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:s},u.prototype.init=function(e,n,i){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(document).find(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),o=r.length;o--;){var a=r[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",d="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(d+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},u.prototype.getDefaults=function(){return u.DEFAULTS},u.prototype.getOptions=function(e){var i=this.$element.data();for(var o in i)i.hasOwnProperty(o)&&t.inArray(o,r)!==-1&&delete i[o];return e=t.extend({},this.getDefaults(),i,e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e.sanitize&&(e.template=n(e.template,e.whiteList,e.sanitizeFn)),e},u.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,i){n[t]!=i&&(e[t]=i)}),e},u.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},u.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},u.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue())return clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},u.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var i=this,r=this.tip(),o=this.getUID(this.type);this.setContent(),r.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,d=s.test(a);d&&(a=a.replace(s,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?r.appendTo(t(document).find(this.options.container)):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),c=r[0].offsetWidth,h=r[0].offsetHeight;if(d){var p=a,f=this.getPosition(this.$viewport);a="bottom"==a&&l.bottom+h>f.bottom?"top":"top"==a&&l.top-hf.width?"left":"left"==a&&l.left-ca.top+a.height&&(r.top=a.top+a.height-d)}else{var l=e.left-o,u=e.left+o+n;la.right&&(r.left=a.left+a.width-u)}return r},u.prototype.getTitle=function(){var t,e=this.$element,n=this.options;return t=e.attr("data-original-title")||("function"==typeof n.title?n.title.call(e[0]):n.title)},u.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},u.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},u.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},u.prototype.enable=function(){this.enabled=!0},u.prototype.disable=function(){this.enabled=!1},u.prototype.toggleEnabled=function(){this.enabled=!this.enabled},u.prototype.toggle=function(e){var n=this;e&&(n=t(e.currentTarget).data("bs."+this.type),n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},u.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},u.prototype.sanitizeHtml=function(t){return n(t,this.options.whiteList,this.options.sanitizeFn)};var c=t.fn.tooltip;t.fn.tooltip=i,t.fn.tooltip.Constructor=u,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=c,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.popover"),o="object"==typeof e&&e;!r&&/destroy|hide/.test(e)||(r||i.data("bs.popover",r=new n(this,o)),"string"==typeof e&&r[e]())})}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.4.1",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();if(this.options.html){var i=typeof n;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===i&&(n=this.sanitizeHtml(n))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===i?"html":"append"](n)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(n);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(jQuery),+function(t){"use strict";function e(n,i){this.$body=t(document.body),this.$scrollElement=t(t(n).is(document.body)?window:n),this.options=t.extend({},e.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var i=t(this),r=i.data("bs.scrollspy"),o="object"==typeof n&&n;r||i.data("bs.scrollspy",r=new e(this,o)),"string"==typeof n&&r[n]()})}e.VERSION="3.4.1",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),r=e.data("target")||e.attr("href"),o=/^#./.test(r)&&t(r);return o&&o.length&&o.is(":visible")&&[[o[n]().top+i,r]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),r=this.offsets,o=this.targets,a=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=i)return a!=(t=o[o.length-1])&&this.activate(t);if(a&&e=r[t]&&(void 0===r[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),r&&r()}var a=i.find("> .active"),s=r&&t.support.transition&&(a.length&&a.hasClass("fade")||!!i.find("> .fade").length);a.length&&s?a.one("bsTransitionEnd",o).emulateTransitionEnd(n.TRANSITION_DURATION):o(),a.removeClass("in")};var i=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,this};var r=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.affix"),o="object"==typeof e&&e;r||i.data("bs.affix",r=new n(this,o)),"string"==typeof e&&r[e]()})}var n=function(e,i){this.options=t.extend({},n.DEFAULTS,i);var r=this.options.target===n.DEFAULTS.target?t(this.options.target):t(document).find(this.options.target);this.$target=r.on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.4.1",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,i){var r=this.$target.scrollTop(),o=this.$element.offset(),a=this.$target.height();if(null!=n&&"top"==this.affixed)return r=t-i&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),i=this.options.offset,r=i.top,o=i.bottom,a=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(o=r=i),"function"==typeof r&&(r=i.top(this.$element)),"function"==typeof o&&(o=i.bottom(this.$element));var s=this.getState(a,e,r,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var d="affix"+(s?"-"+s:""),l=t.Event(d+".bs.affix");if(this.$element.trigger(l),l.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(d).trigger(d.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:a-e-o})}};var i=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),e.call(n,i)})})}(jQuery),function(t){function e(t,e,r){var o=t[0],a=/er/.test(r)?m:/bl/.test(r)?f:h,s=r==$?{checked:o[h],disabled:o[f],indeterminate:"true"==t.attr(m)||"false"==t.attr(g)}:o[a];if(/^(ch|di|in)/.test(r)&&!s)n(t,a);else if(/^(un|en|de)/.test(r)&&s)i(t,a);else if(r==$)for(var d in s)s[d]?n(t,d,!0):i(t,d,!0);else e&&"toggle"!=r||(e||t[x]("ifClicked"),s?o[v]!==c&&i(t,a):n(t,a))}function n(e,n,r){var u=e[0],$=e.parent(),y=n==h,b=n==m,x=n==f,S=b?g:y?p:"enabled",k=o(e,S+a(u[v])),D=o(e,n+a(u[v]));if(u[n]!==!0){if(!r&&n==h&&u[v]==c&&u.name){var _=e.closest("form"),j='input[name="'+u.name+'"]';j=_.length?_.find(j):t(j),j.each(function(){this!==u&&t(this).data(d)&&i(t(this),n)})}b?(u[n]=!0,u[h]&&i(e,h,"force")):(r||(u[n]=!0),y&&u[m]&&i(e,m,!1)),s(e,y,n,r)}u[f]&&o(e,T,!0)&&$.find("."+l).css(T,"default"),$[C](D||o(e,n)||""),$.attr("role")&&!b&&$.attr("aria-"+(x?f:h),"true"),$[w](k||o(e,S)||"")}function i(t,e,n){var i=t[0],r=t.parent(),d=e==h,u=e==m,c=e==f,$=u?g:d?p:"enabled",y=o(t,$+a(i[v])),b=o(t,e+a(i[v]));i[e]!==!1&&(!u&&n&&"force"!=n||(i[e]=!1),s(t,d,$,n)),!i[f]&&o(t,T,!0)&&r.find("."+l).css(T,"pointer"),r[w](b||o(t,e)||""),r.attr("role")&&!u&&r.attr("aria-"+(c?f:h),"false"),r[C](y||o(t,$)||"")}function r(e,n){e.data(d)&&(e.parent().html(e.attr("style",e.data(d).s||"")),n&&e[x](n),e.off(".i").unwrap(),t(S+'[for="'+e[0].id+'"]').add(e.closest(S)).off(".i"))}function o(t,e,n){if(t.data(d))return t.data(d).o[e+(n?"":"Class")]}function a(t){return t.charAt(0).toUpperCase()+t.slice(1)}function s(t,e,n,i){i||(e&&t[x]("ifToggled"),t[x]("ifChanged")[x]("if"+a(n)))}var d="iCheck",l=d+"-helper",u="checkbox",c="radio",h="checked",p="un"+h,f="disabled",g="determinate",m="in"+g,$="update",v="type",y="click",b="touchbegin.i touchend.i",C="addClass",w="removeClass",x="trigger",S="label",T="cursor",k=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);t.fn[d]=function(o,a){var s='input[type="'+u+'"], input[type="'+c+'"]',p=t(),g=function(e){e.each(function(){var e=t(this);p=e.is(s)?p.add(e):p.add(e.find(s))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(o))return o=o.toLowerCase(),g(this),p.each(function(){var n=t(this);"destroy"==o?r(n,"ifDestroyed"):e(n,!0,o),t.isFunction(a)&&a()});if("object"!=typeof o&&o)return this;var T=t.extend({checkedClass:h,disabledClass:f,indeterminateClass:m,labelHover:!0},o),D=T.handle,_=T.hoverClass||"hover",j=T.focusClass||"focus",I=T.activeClass||"active",A=!!T.labelHover,L=T.labelHoverClass||"hover",N=0|(""+T.increaseArea).replace("%","");return D!=u&&D!=c||(s='input[type="'+D+'"]'),N<-50&&(N=-50),g(this),p.each(function(){var o=t(this);r(o);var a,s=this,p=s.id,g=-N+"%",m=100+2*N+"%",D={position:"absolute",top:g,left:g,display:"block",width:m,height:m,margin:0,padding:0,background:"#fff",border:0,opacity:0},E=k?{position:"absolute",visibility:"hidden"}:N?D:{position:"absolute",opacity:0},M=s[v]==u?T.checkboxClass||"i"+u:T.radioClass||"i"+c,P=t(S+'[for="'+p+'"]').add(o.closest(S)),O=!!T.aria,H=d+"-"+Math.random().toString(36).substr(2,6),R='
")[x]("ifCreated").parent().append(T.insert),a=t('').css(D).appendTo(R),o.data(d,{o:T,s:o.attr("style")}).css(E),!!T.inheritClass&&R[C](s.className||""),!!T.inheritID&&p&&R.attr("id",d+"-"+p),"static"==R.css("position")&&R.css("position","relative"),e(o,!0,$),P.length&&P.on(y+".i mouseover.i mouseout.i "+b,function(n){var i=n[v],r=t(this);if(!s[f]){if(i==y){if(t(n.target).is("a"))return;e(o,!1,!0)}else A&&(/ut|nd/.test(i)?(R[w](_),r[w](L)):(R[C](_),r[C](L)));if(!k)return!1;n.stopPropagation()}}),o.on(y+".i focus.i blur.i keyup.i keydown.i keypress.i",function(t){var e=t[v],r=t.keyCode;return e!=y&&("keydown"==e&&32==r?(s[v]==c&&s[h]||(s[h]?i(o,h):n(o,h)),!1):void("keyup"==e&&s[v]==c?!s[h]&&n(o,h):/us|ur/.test(e)&&R["blur"==e?w:C](j)))}),a.on(y+" mousedown mouseup mouseover mouseout "+b,function(t){var n=t[v],i=/wn|up/.test(n)?I:_;if(!s[f]){if(n==y?e(o,!1,!0):(/wn|er|in/.test(n)?R[C](i):R[w](i+" "+I),P.length&&A&&i==_&&P[/ut|nd/.test(n)?w:C](L)),!k)return!1;t.stopPropagation()}})})}}(window.jQuery||window.Zepto),function(t,e){"object"!=typeof t.WHMCS&&(t.WHMCS=e)}(window,{hasModule:function(t){return"undefined"!=typeof WHMCS[t]&&Object.getOwnPropertyNames(WHMCS[t]).length>0},loadModule:function(t,e){if(!this.hasModule(t))if(WHMCS[t]={},"function"==typeof e)e.apply(WHMCS[t]);else for(var n in e)e.hasOwnProperty(n)&&(WHMCS[t][n]={},e[n].apply(WHMCS[t][n]))}}),jQuery(document).ready(function(){jQuery(document).on("click",".disable-on-click",function(){if(jQuery(this).addClass("disabled"),jQuery(this).hasClass("spinner-on-click")){var t=$(this).find("i.fas,i.far,i.fal,i.fab");jQuery(t).removeAttr("class").addClass("fas fa-spinner fa-spin")}})}),function(t){WHMCS.hasModule("authn")||WHMCS.loadModule("authn",t)}({provider:function(){var t=!1;return this.feedbackContainer=function(){return jQuery(".providerLinkingFeedback")},this.btnContainer=function(){return jQuery(".providerPreLinking")},this.feedbackMessage=function(t){"undefined"==typeof t&&(t="complete_sign_in");var e=jQuery("p.providerLinkingMsg-preLink-"+t);return e.length?e.first().html():""},this.showProgressMessage=function(e){this.feedbackContainer().fadeIn("fast",function(){"function"!=typeof e||t||(t=!0,e())})},this.preLinkInit=function(t){var e=' ';this.feedbackContainer().removeClass("alert-danger alert-success").addClass("alert alert-info").html(e+this.feedbackMessage()).hide();var n=this.btnContainer();if(n.length)if(n.data("hideOnPrelink")){var i=this;n.fadeOut("false",function(){i.showProgressMessage(t)})}else n.data("disableOnPrelink")?(n.find(".btn").addClass("disabled"),this.showProgressMessage(t)):this.showProgressMessage(t);else this.showProgressMessage(t)},this.displayError=function(t,e,n){jQuery("#providerLinkingMessages .provider-name").html(t);var i=this.feedbackMessage("connect_error");if(e){var r=this.feedbackMessage(e);r&&(i=r)}n&&$(".btn-logged-in-admin").length>0&&(i+=" Error: "+n),this.feedbackContainer().removeClass("alert-info alert-success").addClass("alert alert-danger").html(i).slideDown()},this.displaySuccess=function(t,e,n){var i=n.icon,r=e.htmlTarget,o=e.targetLogin,a=e.targetRegister,s=n.name,d="";switch(t.result){case"logged_in":case"2fa_needed":d=this.feedbackMessage("2fa_needed"),this.feedbackContainer().removeClass("alert-danger alert-warning alert-success").addClass("alert alert-info").html(d),window.location=t.redirect_url?decodeURIComponent(t.redirect_url):decodeURIComponent(e.redirectUrl);break;case"linking_complete":var l="";l=t.remote_account.email?t.remote_account.email:t.remote_account.firstname+" "+t.remote_account.lastname,l=l.trim(),d=this.feedbackMessage("linking_complete").trim().replace(":displayName",s),l&&(d=d.replace(/\.$/," ("+l+").")),this.feedbackContainer().removeClass("alert-danger alert-warning alert-info").addClass("alert alert-success").html(i+d);break;case"login_to_link":if(r===o)d=this.feedbackMessage("login_to_link-signin-required"),this.feedbackContainer().removeClass("alert-danger alert-success alert-info").addClass("alert alert-warning").html(i+d);else{var u=jQuery("input[name=email]"),c=jQuery("input[name=firstname]"),h=jQuery("input[name=lastname]");if(""===u.val()&&u.val(t.remote_account.email),""===c.val()&&c.val(t.remote_account.firstname),""===h.val()&&h.val(t.remote_account.lastname),r===a)"object"==typeof WHMCS.client.registration&&WHMCS.client.registration.prefillPassword(),d=this.feedbackMessage("login_to_link-registration-required"),this.feedbackContainer().fadeOut("slow",function(){$(this).removeClass("alert-danger alert-success alert-info").addClass("alert alert-warning").html(i+d).fadeIn("fast")});else{"object"==typeof WHMCS.client.registration&&WHMCS.client.registration.prefillPassword();var p=this;this.feedbackContainer().each(function(t,e){var n=$(e),r=n.siblings("div .providerPreLinking").data("linkContext");n.fadeOut("slow",function(){d="checkout-new"===r?p.feedbackMessage("checkout-new"):p.feedbackMessage("login_to_link-signin-required"),n.removeClass("alert-danger alert-success alert-info").addClass("alert alert-warning").html(i+d).fadeIn("fast")})})}}break;case"other_user_exists":d=this.feedbackMessage("other_user_exists"),this.feedbackContainer().removeClass("alert-info alert-success").addClass("alert alert-danger").html(i+d).slideDown();break;case"already_linked":d=this.feedbackMessage("already_linked"),this.feedbackContainer().removeClass("alert-info alert-success").addClass("alert alert-danger").html(i+d).slideDown();break;default:d=this.feedbackMessage("default"),this.feedbackContainer().removeClass("alert-info alert-success").addClass("alert alert-danger").html(i+d).slideDown()}},this.signIn=function(t,e,n,i,r){jQuery.ajax(t).done(function(t){i(),WHMCS.authn.provider.displaySuccess(t,e,n);var r=jQuery("#tableLinkedAccounts");r.length&&WHMCS.ui.dataTable.getTableById("tableLinkedAccounts").ajax.reload()}).error(function(){r(),WHMCS.authn.provider.displayError()})},this}}),function(t){WHMCS.hasModule("client")||WHMCS.loadModule("client",t)}({registration:function(){return this.prefillPassword=function(t){if(t=t||{},"undefined"==typeof t.hideContainer){var e=jQuery("#inputSecurityQId").attr("id")?"#containerPassword":"#containerNewUserSecurity";t.hideContainer=jQuery(e),t.hideInputs=!0}else"string"==typeof t.hideContainer&&t.hideContainer.length&&(t.hideContainer=jQuery(t.hideContainer));"undefined"==typeof t.form&&(t.form={password:[{id:"inputNewPassword1"},{id:"inputNewPassword2"}]});var n=function(){for(var e=WHMCS.utils.simpleRNG(),n=0,i=t.form.password.length;npl',paging:!1,lengthChange:!1,searching:!1,ordering:!0,info:!1,autoWidth:!0,language:{emptyTable:i.data("lang-empty-table")?i.data("lang-empty-table"):"No records found"}});var r=i.data("ajax-url");"undefined"!=typeof r&&(e.ajax={url:r});var o=i.data("dom");"undefined"!=typeof o&&(e.dom=o);var a=i.data("searching");"undefined"!=typeof a&&(e.searching=a);var s=i.data("responsive");"undefined"!=typeof s&&(e.responsive=s);var d=i.data("ordering");"undefined"!=typeof d&&(e.ordering=d);var l=i.data("order");"undefined"!=typeof l&&l&&(e.order=l);var u=i.data("columns");"undefined"!=typeof u&&u&&(e.columns=u);var c=i.data("auto-width");"undefined"!=typeof c&&(e.autoWidth=c);var h=i.data("paging");"undefined"!=typeof h&&(e.paging=h);var p=i.data("length-change");"undefined"!=typeof p&&(e.lengthChange=p);var f=i.data("page-length");"undefined"!=typeof f&&(e.pageLength=f),n.tables[t]=n.initTable(i,e)}else if("undefined"!=typeof e){var g=n.tables[t],m=g.init(),$=jQuery.extend(m,e);g.destroy(),n.tables[t]=n.initTable(i,$)}return n.tables[t]},this.initTable=function(t,e){var n=t.DataTable(e),i=this;return t.data("on-draw")?n.on("draw.dt",function(e,n){var i=t.data("on-draw");"function"==typeof window[i]&&window[i](e,n)}):t.data("on-draw-rebind-confirmation")&&n.on("draw.dt",function(t){i.rebindConfirmation(t)}),n},this.rebindConfirmation=function(t){for(var e=this,n=t.target.id,i=WHMCS.ui.confirmation.register(),r=0,o=i.length;r").css("position","fixed").css("opacity","0").css("width","1px").css("height","1px").val($(n).val());i.append(r),r.focus().select(),document.execCommand("copy")}finally{r.remove()}e.tooltip({trigger:"click",placement:"bottom"}),WHMCS.ui.toolTip.setTip(e,"Copied!"),WHMCS.ui.toolTip.hideTip(e)},this},toolTip:function(){this.setTip=function(t,e){var n=t.data("bs.tooltip");return"in"!==n.hoverState&&(n.hoverState="in"),t.attr("data-original-title",e),n.show(),n},this.hideTip=function(t){return setTimeout(function(){t.data("bs.tooltip").hide()},2e3)}},jsonForm:function(){return this.managedElements="input,textarea,select",this.initFields=function(t){var e=this;$(t).find(e.managedElements).each(function(){var t=this;$(t).on("keypress change",function(){e.fieldHasError(t)&&e.clearFieldError(t)})})},this.init=function(t){var e=this;e.initFields(t),$(t).on("submit",function(n){n.preventDefault(),n.stopPropagation(),e.clearErrors(t);var i=$(t).parents('.modal[role="dialog"]').first();$(i).length&&($(i).on("show.bs.modal hidden.bs.modal",function(){e.clearErrors(t)}),$(i).on("show.bs.modal",function(){$(t)[0].reset()})),WHMCS.http.client.post({url:$(t).attr("action"),data:$(t).serializeArray()}).done(function(n){e.onSuccess(t,n)}).fail(function(n){e.onError(t,n)}).always(function(n){e.onRequestComplete(t,n)})})},this.initAll=function(){var t=this;$('form[data-role="json-form"]').each(function(){var e=this;t.init(e)})},this.markFieldErrors=function(t,e){var n,i,r=this,o=null;for(var a in e)e.hasOwnProperty(a)&&(o=e[a]),i=r.managedElements.split(",").map(function(t){return t+'[name="'+a+'"]'}).join(","),n=$(t).find(i),o&&($(n).parents(".form-group").addClass("has-error"),$(n).attr("title",o),$(n).tooltip());$(t).find(".form-group.has-error input[title]").first().tooltip("show")},this.fieldHasError=function(t){return $(t).parents(".form-group").hasClass("has-error")},this.clearFieldError=function(t){try{$(t).tooltip("dispose")}catch(e){$(t).tooltip("destroy")}$(t).parents(".form-group").removeClass("has-error")},this.onSuccess=function(t,e){var n=$(t).data("on-success");"function"==typeof n&&n(e.data)},this.onError=function(t,e){e.responseJSON&&e.responseJSON.fields&&"object"==typeof e.responseJSON.fields?this.markFieldErrors(t,e.responseJSON.fields):console.log("Unknown error - please try again later.");var n=$(t).data("on-error");"function"==typeof n&&n(e)},this.clearErrors=function(t){var e=this;$(t).find(e.managedElements).each(function(){e.clearFieldError(this)})},this.onRequestComplete=function(t,e){},this},effects:function(){this.errorShake=function(t){e=e||{};var e=$.extend({direction:"left",distance:8,times:3,speed:90},e);return t.each(function(){var t=$(this),n={position:t.css("position"),top:t.css("top"),bottom:t.css("bottom"),left:t.css("left"),right:t.css("right")};t.css("position","relative");var i="up"===e.direction||"down"===e.direction?"top":"left",r="up"===e.direction||"left"===e.direction?"pos":"neg",o={},a={},s={};o[i]=("pos"===r?"-=":"+=")+e.distance,a[i]=("pos"===r?"+=":"-=")+2*e.distance,s[i]=("pos"===r?"-=":"+=")+2*e.distance,t.animate(o,e.speed);for(var d=1;d
'),d=u.find("#"+s)),n||d.data("toggle","tooltip").data("placement","bottom").data("trigger","manual").attr("title",a).hide();var c=r.find("input[name='submit']");if(c.length){var h=r.prop("action");r.prop("action",h+"&submit=1"),c.remove()}var p=s+"Callback";window[p]=function(){n&&r.submit()},n?(recaptchaType="invisible",r.on("submit.recaptcha",function(t){var e=r.find(".g-recaptcha").data("recaptcha-id");grecaptcha.getResponse(e).trim()?recaptchaValidationComplete=!0:(t.preventDefault(),grecaptcha.execute(e),recaptchaValidationComplete=!1)})):(t.push(function(){d.slideDown("fast",function(){d.find(":first").addClass("center-block")})}),t.push(function(){d.find(":first").addClass("center-block")}))}),window.recaptchaLoadCallback=function(){jQuery(".g-recaptcha").each(function(t,e){var n=jQuery(e),i=n.closest("form"),r=i.find(".btn-recaptcha"),o=n.attr("id").substring(1),a=grecaptcha.render(e,{sitekey:recaptchaSiteKey,size:r.hasClass("btn-recaptcha-invisible")?"invisible":"normal",callback:o+"Callback"});n.data("recaptcha-id",a)})},e.length){var i="https://www.google.com/recaptcha/api.js?onload=recaptchaLoadCallback&render=explicit";jQuery.getScript(i,function(){for(var e=t.length-1;e>=0;e--)t[e]()})}recaptchaLoadComplete=!0}},this}),function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():t.MicroPlugin=e()}(this,function(){var t={};t.mixin=function(t){t.plugins={},t.prototype.initializePlugins=function(t){var n,i,r,o=this,a=[];if(o.plugins={names:[],settings:{},requested:{},loaded:{}},e.isArray(t))for(n=0,i=t.length;n0)&&i.items.push({score:n,id:r})}):a.iterator(a.items,function(t,e){i.items.push({score:1,id:e})}),r=a.getSortFunction(i,e),r&&i.items.sort(r),i.total=i.items.length,"number"==typeof e.limit&&(i.items=i.items.slice(0,e.limit)),i};var e=function(t,e){return"number"==typeof t&&"number"==typeof e?t>e?1:te?1:e>t?-1:0)},n=function(t,e){var n,i,r,o;for(n=1,i=arguments.length;n.5?btoa(v).substr(0,4):v,Math.random()>.5&&(i+=t.substr(Math.floor(13*Math.random()),1));return i},this.getRouteUrl=function(t){return whmcsBaseUrl+"/index.php?rp="+t},this.validateBaseUrl=function(){"undefined"==typeof window.whmcsBaseUrl?(console.log("Warning: The WHMCS Base URL definition is missing from your active template. Please refer to https://docs.whmcs.com/WHMCS_Base_URL_Template_Variable for more information and details of how to resolve this warning."),window.whmcsBaseUrl=this.autoDetermineBaseUrl(),window.whmcsBaseUrlAutoSet=!0):""===window.whmcsBaseUrl&&"undefined"!=typeof window.whmcsBaseUrlAutoSet&&window.whmcsBaseUrlAutoSet===!0&&(window.whmcsBaseUrl=this.autoDetermineBaseUrl())},this.autoDetermineBaseUrl=function(){var t=window.location.href,e=-1;if("undefined"!=typeof t&&(e=t.indexOf(".php")),e===-1&&(t=jQuery("#Primary_Navbar-Home a").attr("href"),"undefined"!=typeof t&&(e=t.indexOf(".php"))),e!==-1){t=t.substring(0,e);var n=t.lastIndexOf("/");if(n!==!1)return t.substring(0,n)}return""},this.normaliseStringValue=function(t){return t?t.toLowerCase().replace(/\s/g,"-"):""},this.generatePassword=function(t){for(var e=this.getPasswordCharacterSet(),n="",i=0;t>i;i++)n+=e[this.randomInt(e.length)];return n},this.getPasswordCharacterSet=function(){for(var t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%()*+,-.:;=@_|{ldelim}{rdelim}~",e=[],n=0;t.length>n;n++){var i=t.charCodeAt(n);{if(!(55296>i||i>=57344)){if(56320>i&&t.length>n+1){var r=t.charCodeAt(n+1);if(r>=56320&&57344>r){var o=t.substring(n,n+2);n++,e.indexOf(o)==-1&&e.push(o);continue}}throw"Invalid UTF-16"}var o=t.charAt(n);e.indexOf(o)==-1&&e.push(o)}}return e},this.randomInt=function(t){var e=this.randomIntMathRandom(t);return e=(e+this.randomIntBrowserCrypto(t))%t},this.randomIntMathRandom=function(t){var e=Math.floor(Math.random()*t);if(0>e||e>=t)throw"Arithmetic exception";return e},this.randomIntBrowserCrypto=function(t){var e=null;if("crypto"in window)e=crypto;else{if(!("msCrypto"in window))return 0;e=msCrypto}if("getRandomValues"in e&&"Uint32Array"in window&&"function"==typeof Uint32Array||(e=null),null==e)return 0;var n=new Uint32Array(1);do e.getRandomValues(n);while(n[0]-n[0]%t>4294967296-t);return n[0]%t},this}),WHMCS.utils.validateBaseUrl(),jQuery(document).ready(function(){function t(t,e,n){n=n||saving;var i=/[^\s]+/g,r=[],o=0,a=0;if(t&&(r=t.match(i),a=t.split(/\\r\\n|\\r|\\n/).length),r)for(var s=0;s=19968?r[s].length:1;return'
lines: '+a+"   words: "+o+(e?'   '+n+"":"")+"
"}function e(){o>=0&&(0==o&&jQuery("span.markdown-save").html(saved),o--,setTimeout(e,1e3))}if(jQuery("#languageChooser").popover({container:"body",placement:"bottom",template:'',html:!0,content:function(){return jQuery("#languageChooserContent").html()}}),jQuery("#loginOrRegister").popover({container:"body",placement:"bottom",template:'',html:!0,content:function(){return jQuery("#loginOrRegisterContent").html()}}),jQuery("#accountNotifications").popover({container:"body",placement:"bottom",template:'',html:!0,content:function(){return jQuery("#accountNotificationsContent").html()}}),jQuery(".panel-sidebar .truncate").each(function(){jQuery(this).attr("title",jQuery(this).text()).attr("data-toggle","tooltip").attr("data-placement","bottom")}),jQuery('[data-toggle="popover"]').popover({html:!0}),jQuery(function(t){t("body").tooltip({selector:'[data-toggle="tooltip"]'})}),jQuery("body").on("click",function(t){jQuery('[data-toggle="popover"]').each(function(){jQuery(this).is(t.target)||0!==jQuery(this).has(t.target).length||0!==jQuery(".popover").has(t.target).length||jQuery(this).popover("hide")})}),jQuery(".list-group-tab-nav a").click(function(){if(jQuery(this).hasClass("disabled"))return!1;jQuery(".list-group-tab-nav a").removeClass("active"),jQuery(this).addClass("active");var t=this.href.split("#")[1];t&&(window.location.hash="#"+t)}),jQuery(".panel-minimise").click(function(t){t.preventDefault(),jQuery(this).hasClass("minimised")?(jQuery(this).parents(".panel").find(".panel-body, .list-group").slideDown(),jQuery(this).removeClass("minimised")):(jQuery(this).parents(".panel").find(".panel-body, .list-group").slideUp(),jQuery(this).addClass("minimised"))}),jQuery(".container").width()<=720&&(jQuery(".panel-sidebar").find(".panel-body, .list-group").hide(),jQuery(".panel-sidebar").find(".panel-minimise").addClass("minimised")),""!=jQuery(location).attr("hash").substr(1)){var n=jQuery(location).attr("hash");jQuery(".tab-pane").removeClass("active"),jQuery(n).removeClass("fade").addClass("active"),jQuery(".list-group-tab-nav a").removeClass("active"),jQuery('a[href="'+n+'"]').addClass("active"),setTimeout(function(){window.scrollTo(0,0)},1)}jQuery.prototype.bootstrapSwitch&&jQuery(".toggle-switch-success").bootstrapSwitch({onColor:"success"}),jQuery(".panel-collapsable .panel-heading").click(function(t){var e=jQuery(this);e.parents(".panel").hasClass("panel-collapsed")?(e.parents(".panel").removeClass("panel-collapsed").find(".panel-body").slideDown(),e.find(".collapse-icon i").removeClass("fa-plus").addClass("fa-minus")):(e.parents(".panel").addClass("panel-collapsed").find(".panel-body").slideUp(),e.find(".collapse-icon i").removeClass("fa-minus").addClass("fa-plus"))}),"#frmLogin".length>0&&jQuery("#frmLogin input:text:visible:first").focus(),"#twofaactivation".length>0&&jQuery("#twofaactivation input:text:visible:first,#twofaactivation input:password:visible:first").focus(),jQuery("#inputSubaccountActivate").click(function(){null!=jQuery("#inputSubaccountActivate:checked").val()?jQuery("#subacct-container").removeClass("hidden"):jQuery("#subacct-container").addClass("hidden")}),jQuery(".setBulkAction").click(function(t){t.preventDefault();var e=jQuery(this).attr("id").replace("Link",""),n=jQuery("#domainForm");if("renewDomains"===e)n.attr("action",WHMCS.utils.getRouteUrl("/cart/domain/renew"));else{if(0!==jQuery("#"+e).length){var i=n.attr("action");n.attr("action",i+"#"+e)}jQuery("#bulkaction").val(e)}n.submit()}),jQuery(".stopEventBubble").click(function(t){t.stopPropagation()}),jQuery(".tabControlLink").on("click",function(t){t.preventDefault();var e=jQuery(this).attr("href");jQuery("a[href='/"+e+"']").click()}),jQuery(document).on("click",".delete-cc-email",function(){var t=jQuery(this),e=t.data("email"),n=jQuery("#divCcEmailFeedback");n.is(":visible")&&n.slideUp("fast"),WHMCS.http.jqClient.jsonPost({url:window.location.href,data:{action:"delete",email:e,token:csrfToken},success:function(e){e.success&&(t.closest(".ticket-cc-email").parent("div").slideUp("fast").remove(),n.slideUp("fast").removeClass("alert-danger hidden").addClass("alert-success").html(e.message).slideDown("fast"))},error:function(t){t&&n.slideUp("fast").removeClass("alert-success hidden").addClass("alert-danger").html(t).slideDown("fast")}})}).on("submit","#frmAddCcEmail",function(t){t.preventDefault();var e=jQuery(this),n=jQuery("#ccCloneRow").clone().removeAttr("id"),i=jQuery("#inputAddCcEmail"),r=jQuery("#divCcEmailFeedback");r.is(":visible")&&r.slideUp("fast"),WHMCS.http.jqClient.jsonPost({url:e.attr("action"),data:e.serialize(),success:function(t){t.success&&(n.find("span.email").html(i.val()).find("button").data("email",i.val()).end(),n.removeClass("hidden").appendTo(jQuery("#sidebarTicketCc").find(".list-group")),i.val(""),r.slideUp("fast").removeClass("alert-danger hidden").addClass("alert-success").html(t.message).slideDown("fast"))},error:function(t){t&&r.slideUp("fast").removeClass("alert-success hidden").addClass("alert-danger").html(t).slideDown("fast")}})}),jQuery(".ticket-reply .rating span.star").click(function(t){window.location="viewticket.php?tid="+jQuery(this).parent(".rating").attr("ticketid")+"&c="+jQuery(this).parent(".rating").attr("ticketkey")+"&rating=rate"+jQuery(this).parent(".rating").attr("ticketreplyid")+"_"+jQuery(this).attr("rate")}),jQuery("a.autoLinked").click(function(t){if(t.preventDefault(),jQuery(this).hasClass("disabled"))return!1;var e=window.open();e.opener=null,e.location=t.target.href}),jQuery("#inputAllowSso").on("switchChange.bootstrapSwitch",function(t,e){e?(jQuery("#ssoStatusTextEnabled").removeClass("hidden").show(),jQuery("#ssoStatusTextDisabled").hide()):(jQuery("#ssoStatusTextDisabled").removeClass("hidden").show(),jQuery("#ssoStatusTextEnabled").hide()),WHMCS.http.jqClient.post("clientarea.php",jQuery("#frmSingleSignOn").serialize())}),jQuery(".btn-service-sso").on("click",function(t){t.preventDefault();var e=jQuery(this),n=e.parents("form");if(0===n.length&&(n=e.find("form")),!n.hasClass("disabled")&&!e.hasClass("disabled")){var i=n.data("href");i||(i=window.location.href),e.attr("disabled","disabled").addClass("disabled"),e.find(".loading").removeClass("hidden").show().end(),WHMCS.http.jqClient.post(i,n.serialize(),function(t){e.find(".loading").hide().end().removeAttr("disabled"),n.find(".login-feedback").html(""),t.error&&n.find(".login-feedback").html(t.error).hide().removeClass("hidden").slideDown(),void 0!==t.redirect&&"window|"===t.redirect.substr(0,7)&&window.open(t.redirect.substr(7),"_blank")},"json").always(function(){e.removeAttr("disabled").removeClass("disabled"),e.find(".loading").hide().end()})}}),jQuery(".btn-sidebar-form-submit").on("click",function(t){t.preventDefault(),jQuery(this).find(".loading").removeClass("hidden").show().end().attr("disabled","disabled");var e=jQuery(this).parents("form");0==e.length&&(e=jQuery(this).find("form")),0!==e.length&&e.hasClass("disabled")===!1?e.submit():jQuery(this).find(".loading").hide().end().removeAttr("disabled")}),jQuery(".back-to-top").click(function(t){t.preventDefault(),jQuery("body,html").animate({scrollTop:0},500)}),jQuery(".choose-language").click(function(t){t.preventDefault()}),jQuery(".copy-to-clipboard").click(WHMCS.ui.clipboard.copy),jQuery(".generate-password").click(function(t){jQuery("#frmGeneratePassword").submit(),jQuery("#modalGeneratePassword").data("targetfields",jQuery(this).data("targetfields")).modal("show")}),jQuery("#frmGeneratePassword").submit(function(t){t.preventDefault();var e=parseInt(jQuery("#inputGeneratePasswordLength").val(),10);return e<8||e>64?void jQuery("#generatePwLengthError").removeClass("hidden").show():void jQuery("#inputGeneratePasswordOutput").val(WHMCS.utils.generatePassword(e))}),jQuery("#btnGeneratePasswordInsert").click(WHMCS.ui.clipboard.copy).click(function(t){jQuery(this).closest(".modal").modal("hide");var e=jQuery(this).closest(".modal").data("targetfields");e=e.split(",");for(var n=0;n',autofocus:!1,savable:!1,resize:"vertical",iconlibrary:"glyph",language:locale,onShow:function(e){var n="",i=!1;"undefined"!=typeof Storage&&(n=localStorage.getItem(a),i=!0,n&&"undefined"!=typeof n&&e.setContent(n)),jQuery("#"+s).html(t(n,i,saved))},onChange:function(n){var i=n.getContent(),r=!1;"undefined"!=typeof Storage&&(o=3,r=!0,localStorage.setItem(a,i),e()),jQuery("#"+s).html(t(i,r))},onPreview:function(t){var e,n=t.getContent();return jQuery.ajax({url:"clientarea.php",async:!1,data:{token:csrfToken,action:"parseMarkdown",content:n},dataType:"json",success:function(t){e=t}}),e.body?e.body:""},additionalButtons:[[{name:"groupCustom",data:[{name:"cmdHelp",title:"Help",hotkey:"Ctrl+F1",btnClass:"btn open-modal",icon:{glyph:"fas fa-question-circle",fa:"fas fa-question-circle","fa-3":"icon-question-sign"},callback:function(t){t.$editor.removeClass("md-fullscreen-mode")}}]}]],hiddenButtons:["cmdImage"]}),jQuery('button[data-handler="bootstrap-markdown-cmdHelp"]').attr("data-modal-title",markdownGuide).attr("href","submitticket.php?action=markdown"),jQuery(this).closest("form").bind({submit:function(){"undefined"!=typeof Storage&&localStorage.removeItem(a)}})});var a=jQuery(".btn-resend-verify-email");jQuery(a).click(function(){$(this).prop("disabled",!0).find(".loader").removeClass("hidden").show(),WHMCS.http.jqClient.post(jQuery(this).data("uri"),{token:csrfToken}).done(function(t){a.find(".loader").hide(),t.success?a.text(a.data("email-sent")):a.text(a.data("error-msg"))})}),jQuery("#btnEmailVerificationClose").click(function(t){t.preventDefault(),WHMCS.http.jqClient.post(jQuery(this).data("uri"),{token:csrfToken}),jQuery(".email-verification").hide()});var s=jQuery("input[name=2fasetup]").parent("form");s.submit(function(t){t.preventDefault(),openModal(s.attr("action"),s.serialize(),"Loading...")}),$.fn.setInputError=function(t){return this.parents(".form-group").addClass("has-error").find(".field-error-msg").text(t),this},jQuery.fn.showInputError=function(){return this.parents(".form-group").addClass("has-error").find(".field-error-msg").show(),this},jQuery("#frmPayment").on("submit",function(){var t=jQuery("#btnSubmit");t.find("span").toggle(),t.prop("disabled",!0).addClass("disabled")}),jQuery(".btn-resend-approver-email").click(function(){WHMCS.http.jqClient.post(jQuery(this).data("url"),{addonId:jQuery(this).data("addonid"),serviceId:jQuery(this).data("serviceid")},function(t){1==t.success?jQuery(".alert-table-ssl-manage").addClass("alert-success").text("Approver Email Resent").removeClass("hidden"):jQuery(".alert-table-ssl-manage").addClass("alert-danger").text("Error: "+t.message).removeClass("hidden")})}),jQuery(".tld-filters a").click(function(t){t.preventDefault();var e=jQuery(".tld-row.no-tlds");jQuery(this).hasClass("badge-success")?jQuery(this).removeClass("badge-success"):jQuery(this).addClass("badge-success"),e.is(":visible")&&e.hide(),jQuery(".tld-row").removeClass("filtered-row"),jQuery(".tld-filters a.badge-success").each(function(t){var e=jQuery(this).data("category");jQuery('.tld-row[data-category*="'+e+'"]').addClass("filtered-row")}),jQuery(".filtered-row:even").removeClass("highlighted"),jQuery(".filtered-row:odd").addClass("highlighted");var n=jQuery('.tld-row:not(".filtered-row")');n.fadeOut("fast"),n.promise().done(function(){0===jQuery(".filtered-row").length?e.show():jQuery(".tld-row.filtered-row").show()})}),jQuery(".filtered-row:even").removeClass("highlighted"),jQuery(".filtered-row:odd").addClass("highlighted"),WHMCS.ui.dataTable.register(),WHMCS.ui.jsonForm.initAll(),jQuery("#frmReply").submit(function(t){jQuery("#frmReply").find('input[type="submit"]').addClass("disabled").prop("disabled",!0)}),jQuery("#frmDomainContactModification").on("submit",function(){if(!allowSubmit){var t=!1;if(jQuery(".irtp-field").each(function(){var e=jQuery(this).val(),n=jQuery(this).data("original-value");e!==n&&(t=!0)}),t)return jQuery("#modalIRTPConfirmation").modal("show"),!1}return!0}),jQuery(".ssl-state.ssl-sync").each(function(){var t=jQuery(this),e=getSslAttribute(t,"type"),n=getSslAttribute(t,"domain");WHMCS.http.jqClient.post(WHMCS.utils.getRouteUrl("/domain/ssl-check"),{type:e,domain:n,token:csrfToken},function(e){if(e.invalid)t.hide();else{var n="",i="";t.attr("width")&&(n=' width="'+t.attr("width")+'"'),t.data("showlabel")&&(i=" "+e.statusDisplayLabel),t.replaceWith('"),"active"===e.ssl.status?(jQuery("#ssl-startdate").text(e.ssl.startDate),jQuery("#ssl-expirydate").text(e.ssl.expiryDate),jQuery("#ssl-issuer").text(e.ssl.issuer)):(jQuery("#ssl-startdate").parent("div").hide(),jQuery("#ssl-expirydate").parent("div").hide(),jQuery("#ssl-issuer").parent("div").hide()),jQuery("#statusDisplayLabel").text(i)}})}),jQuery(document).on("click",".ssl-state.ssl-inactive",function(t){t.preventDefault(),window.location.href=WHMCS.utils.getRouteUrl("/ssl-purchase")}),WHMCS.recaptcha.register();var d=jQuery("#divDynamicRecaptcha"),l=jQuery(d).length>0,u=l&&"invisible"===jQuery(d).data("size"),c=jQuery("#frmDomainHomepage");jQuery(c).find("#btnTransfer").click(function(){jQuery(c).find('input[name="transfer"]').val("1")}),l&&!u&&jQuery("section#home-banner").addClass("with-recaptcha"),jQuery(".domainchecker-homepage-captcha").length&&!u&&jQuery(c).submit(function(t){ var e=(jQuery(c).find('input[name="domain"]'),jQuery("#divDynamicRecaptcha")),n=jQuery("#g-recaptcha-response"),i=jQuery("#inputCaptcha");return n.length&&!n.val()?(e.tooltip("show"),void t.preventDefault()):i.length&&!i.val()?(i.tooltip("show"),void t.preventDefault()):void 0}),$(".icheck-button").iCheck({inheritID:!0,checkboxClass:"icheckbox_square-blue",radioClass:"iradio_square-blue",increaseArea:"20%"}),jQuery("#inputNoStore").on("switchChange.bootstrapSwitch",function(t,e){var n=jQuery("#inputDescription");e||n.prop("disabled",!0).addClass("disabled"),e&&n.removeClass("disabled").prop("disabled",!1)}),jQuery(document).on("click","#btnConfirmModalConfirmBtn",function(){var t=jQuery(this),e=t.closest("div.modal"),n=t.data("target-url"),i=t.closest('table.dataTable[data-on-draw-rebind-confirmation-modal="true"]');WHMCS.http.jqClient.jsonPost({url:n,data:{token:csrfToken},success:function(t){"success"!==t.status&&"okay"!==t.status||i.length>0&&i.DataTable().ajax.reload()}}),e.modal("toggle")})});var lastTicketMsg,ajaxModalSubmitEvents=[],ajaxModalPostSubmitEvents=[];jQuery(document).ready(function(){jQuery(document).on("click",".open-modal",function(t){t.preventDefault();var e=jQuery(this).attr("href"),n=jQuery(this).data("modal-size"),i=jQuery(this).data("modal-class"),r=jQuery(this).data("modal-title"),o=jQuery(this).data("btn-submit-id"),a=jQuery(this).data("btn-submit-label"),s=jQuery(this).data("btn-submit-color"),d=jQuery(this).data("btn-close-hide"),l=jQuery(this).attr("disabled"),u=jQuery(this).data("datatable-reload-success");l||openModal(e,"",r,n,i,a,o,s,d,u)}),jQuery("#modalAjax").on("hidden.bs.modal",function(t){if(jQuery(this).hasClass("modal-feature-highlights")){var e=jQuery("#cbFeatureHighlightsDismissForVersion").is(":checked");WHMCS.http.jqClient.post("whatsnew.php",{dismiss:"1",until_next_update:e?"1":"0",token:csrfToken})}jQuery("#modalAjax").find(".modal-body").empty(),jQuery("#modalAjax").children("div.modal-dialog").removeClass("modal-lg"),jQuery("#modalAjax").removeClass().addClass("modal whmcs-modal fade"),jQuery("#modalAjax .modal-title").html("Title"),jQuery("#modalAjax .modal-submit").html("Submit").removeClass().addClass("btn btn-primary modal-submit").removeAttr("id").removeAttr("disabled"),jQuery("#modalAjax .loader").show()})}),function(t,e){if("function"==typeof define&&define.amd)define(["jquery"],e);else if("undefined"!=typeof exports)e(require("jquery"));else{var n={exports:{}};e(t.jquery),t.bootstrapSwitch=n.exports}}(this,function(t){"use strict";function e(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=e(t),r=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};n(this,t),this.$element=a(e),this.options=a.extend({},a.fn.bootstrapSwitch.defaults,this._getElementOptions(),r),this.prevOptions={},this.$wrapper=a("
",{class:function(){var t=[];return t.push(i.options.state?"on":"off"),i.options.size&&t.push(i.options.size),i.options.disabled&&t.push("disabled"),i.options.readonly&&t.push("readonly"),i.options.indeterminate&&t.push("indeterminate"),i.options.inverse&&t.push("inverse"),i.$element.attr("id")&&t.push("id-"+i.$element.attr("id")),t.map(i._getClass.bind(i)).concat([i.options.baseClass],i._getClasses(i.options.wrapperClass)).join(" ")}}),this.$container=a("
",{class:this._getClass("container")}),this.$on=a("",{html:this.options.onText,class:this._getClass("handle-on")+" "+this._getClass(this.options.onColor)}),this.$off=a("",{html:this.options.offText,class:this._getClass("handle-off")+" "+this._getClass(this.options.offColor)}),this.$label=a("",{html:this.options.labelText,class:this._getClass("label")}),this.$element.on("init.bootstrapSwitch",this.options.onInit.bind(this,e)),this.$element.on("switchChange.bootstrapSwitch",function(){for(var t=arguments.length,n=Array(t),r=0;r0&&void 0!==arguments[0]?arguments[0]:this.options.state;arguments[1];this.$container.css("margin-left",function(){var n=[0,"-"+t._handleWidth+"px"];return t.options.indeterminate?"-"+t._handleWidth/2+"px":e?t.options.inverse?n[1]:n[0]:t.options.inverse?n[0]:n[1]})}},{key:"_init",value:function(){var t=this,e=function(){t.setPrevOptions(),t._width(),t._containerPosition(),setTimeout(function(){if(t.options.animate)return t.$wrapper.addClass(t._getClass("animate"))},50)};if(this.$wrapper.is(":visible"))return void e();var n=window.setInterval(function(){if(t.$wrapper.is(":visible"))return e(),window.clearInterval(n)},50)}},{key:"_elementHandlers",value:function(){var t=this;return this.$element.on({"setPreviousOptions.bootstrapSwitch":this.setPrevOptions.bind(this),"previousState.bootstrapSwitch":function(){t.options=t.prevOptions,t.options.indeterminate&&t.$wrapper.addClass(t._getClass("indeterminate")),t.$element.prop("checked",t.options.state).trigger("change.bootstrapSwitch",!0)},"change.bootstrapSwitch":function(e,n){e.preventDefault(),e.stopImmediatePropagation();var i=t.$element.is(":checked");t._containerPosition(i),i!==t.options.state&&(t.options.state=i,t.$wrapper.toggleClass(t._getClass("off")).toggleClass(t._getClass("on")),n||(t.$element.is(":radio")&&a('[name="'+t.$element.attr("name")+'"]').not(t.$element).prop("checked",!1).trigger("change.bootstrapSwitch",!0),t.$element.trigger("switchChange.bootstrapSwitch",[i])))},"focus.bootstrapSwitch":function(e){e.preventDefault(),t.$wrapper.addClass(t._getClass("focused"))},"blur.bootstrapSwitch":function(e){e.preventDefault(),t.$wrapper.removeClass(t._getClass("focused"))},"keydown.bootstrapSwitch":function(e){!e.which||t.options.disabled||t.options.readonly||37!==e.which&&39!==e.which||(e.preventDefault(),e.stopImmediatePropagation(),t.state(39===e.which))}})}},{key:"_handleHandlers",value:function(){var t=this;return this.$on.on("click.bootstrapSwitch",function(e){return e.preventDefault(),e.stopPropagation(),t.state(!1),t.$element.trigger("focus.bootstrapSwitch")}),this.$off.on("click.bootstrapSwitch",function(e){return e.preventDefault(),e.stopPropagation(),t.state(!0),t.$element.trigger("focus.bootstrapSwitch")})}},{key:"_labelHandlers",value:function(){var t=this,e={click:function(t){t.stopPropagation()},"mousedown.bootstrapSwitch touchstart.bootstrapSwitch":function(e){t._dragStart||t.options.disabled||t.options.readonly||(e.preventDefault(),e.stopPropagation(),t._dragStart=(e.pageX||e.originalEvent.touches[0].pageX)-parseInt(t.$container.css("margin-left"),10),t.options.animate&&t.$wrapper.removeClass(t._getClass("animate")),t.$element.trigger("focus.bootstrapSwitch"))},"mousemove.bootstrapSwitch touchmove.bootstrapSwitch":function(e){if(null!=t._dragStart){var n=(e.pageX||e.originalEvent.touches[0].pageX)-t._dragStart;e.preventDefault(),n<-t._handleWidth||n>0||(t._dragEnd=n,t.$container.css("margin-left",t._dragEnd+"px"))}},"mouseup.bootstrapSwitch touchend.bootstrapSwitch":function(e){if(t._dragStart){if(e.preventDefault(),t.options.animate&&t.$wrapper.addClass(t._getClass("animate")),t._dragEnd){var n=t._dragEnd>-(t._handleWidth/2);t._dragEnd=!1,t.state(t.options.inverse?!n:n)}else t.state(!t.options.state);t._dragStart=!1}},"mouseleave.bootstrapSwitch":function(){t.$label.trigger("mouseup.bootstrapSwitch")}};this.$label.on(e)}},{key:"_externalLabelHandler",value:function(){var t=this,e=this.$element.closest("label");e.on("click",function(n){n.preventDefault(),n.stopImmediatePropagation(),n.target===e[0]&&t.toggleState()})}},{key:"_formHandler",value:function(){var t=this.$element.closest("form");t.data("bootstrap-switch")||t.on("reset.bootstrapSwitch",function(){window.setTimeout(function(){t.find("input").filter(function(){return a(this).data("bootstrap-switch")}).each(function(){return a(this).bootstrapSwitch("state",this.checked)})},1)}).data("bootstrap-switch",!0)}},{key:"_getClass",value:function(t){return this.options.baseClass+"-"+t}},{key:"_getClasses",value:function(t){return a.isArray(t)?t.map(this._getClass.bind(this)):[this._getClass(t)]}}]),t}();a.fn.bootstrapSwitch=function(t){function e(e,n){var r=a(n),o=r.data("bootstrap-switch"),d=o||new s(n,t);return o||r.data("bootstrap-switch",d),"string"==typeof t?d[t].apply(d,i):e}for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r",{class:"btn-group"});for(l=0;l"),h.text(" "+this.__localize($)).addClass("btn-default btn-sm").addClass(v),v.match(/btn\-(primary|success|info|warning|danger|link)/)&&h.removeClass("btn-default"),h.attr({type:"button",title:this.__localize(f.title)+C,tabindex:y,"data-provider":r,"data-handler":g,"data-hotkey":b}),f.toggle===!0&&h.attr("data-toggle","button"),p=t(""),p.addClass(m),p.prependTo(h),c.append(h),o.push(g),a.push(f.callback)}n.append(c)}}return n},__setListener:function(){var t="undefined"!=typeof this.$textarea.attr("rows"),e=this.$textarea.val().split("\n").length>5?this.$textarea.val().split("\n").length:"5",n=t?this.$textarea.attr("rows"):e;this.$textarea.attr("rows",n),this.$options.resize&&this.$textarea.css("resize",this.$options.resize),this.$textarea.data("markdown",this)},__setEventListeners:function(){this.$textarea.on({focus:t.proxy(this.focus,this),keyup:t.proxy(this.keyup,this),change:t.proxy(this.change,this),select:t.proxy(this.select,this)}),this.eventSupported("keydown")&&this.$textarea.on("keydown",t.proxy(this.keydown,this)),this.eventSupported("keypress")&&this.$textarea.on("keypress",t.proxy(this.keypress,this))},__handle:function(e){var n=t(e.currentTarget),i=this.$handler,r=this.$callback,o=n.attr("data-handler"),a=i.indexOf(o),s=r[a];t(e.currentTarget).focus(),s(this),this.change(this),o.indexOf("cmdSave")<0&&this.$textarea.focus(),e.preventDefault()},__localize:function(e){var n=t.fn.markdown.messages,i=this.$options.language;return"undefined"!=typeof n&&"undefined"!=typeof n[i]&&"undefined"!=typeof n[i][e]?n[i][e]:e},__getIcon:function(t){if("object"==typeof t){var e=this.$options.customIcons[t.name];return"undefined"==typeof e?t.icon[this.$options.iconlibrary]:e}return t},setFullscreen:function(e){var n=this.$editor,i=this.$textarea;e===!0?(n.addClass("md-fullscreen-mode"),t("body").addClass("md-nooverflow"),this.$options.onFullscreen(this)):(n.removeClass("md-fullscreen-mode"),t("body").removeClass("md-nooverflow"),this.$options.onFullscreenExit(this),this.$isPreview===!0&&this.hidePreview().showPreview()),this.$isFullscreen=e,i.focus()},showEditor:function(){var e,n=this,i=this.$ns,r=this.$element,o=(r.css("height"),r.css("width"),this.$editable),a=this.$handler,s=this.$callback,d=this.$options,l=t("
",{class:"md-editor",click:function(){n.focus()}});if(null===this.$editor){var u=t("
",{class:"md-header btn-toolbar"}),c=[];if(d.buttons.length>0&&(c=c.concat(d.buttons[0])),d.additionalButtons.length>0&&t.each(d.additionalButtons[0],function(e,n){var i=t.grep(c,function(t,e){return t.name===n.name});i.length>0?i[0].data=i[0].data.concat(n.data):c.push(d.additionalButtons[0][e])}),d.reorderButtonGroups.length>0&&(c=c.filter(function(t){return d.reorderButtonGroups.indexOf(t.name)>-1}).sort(function(t,e){return d.reorderButtonGroups.indexOf(t.name)d.reorderButtonGroups.indexOf(e.name)?1:0})),c.length>0&&(u=this.__buildButtons([c],u)),d.fullscreen.enable&&u.append('
').on("click",".md-control-fullscreen",function(t){t.preventDefault(),n.setFullscreen(!0)}),l.append(u),r.is("textarea"))r.before(l),e=r,e.addClass("md-input"),l.append(e);else{var h="function"==typeof toMarkdown?toMarkdown(r.html()):r.html(),p=t.trim(h);e=t("