var busy=false;var isUpgrade=false;var isExtension=false;var licenseId=0;var couponAmount=1;var coupon;var duration=[30,90,180,365,-1];function pricesOverlayOn(name,id,price){if(!valid){window.location.href="/login";return;} var curId=-5;if(license_state){if(license=='basic')curId=0;else if(license=='premium')curId=1;else if(license=='starter')curId=-1;} var tempId=id;if(tempId==2)tempId=-1;if(curId>tempId){alertify.success('Already have a plan 🤗');return;} isUpgrade=license!=undefined&&Date.now()9?'':'0')+mm,'/',(dd>9?'':'0')+dd].join('');};function calculateDisplayPrice(){var prices=[6,12,3.36];var mult=[1,3,6,12,30];var disc=[1,0.90,0.80,0.70,1];var deduction=0;if(isUpgrade){var curId=0;if(license=='basic')curId=0;else if(license=='premium')curId=1;else if(license=='starter')curId=2;var days=days_between(Date.now(),new Date(expires));if(days>30)days=30;deduction=prices[curId]/30*days;deduction=deduction*0.9;deduction=deduction.toFixed(2);$('#prices-upgrade-deduction').text('- $'+deduction);} var price=(((prices[licenseId]*mult[$('#timeId').val()]*disc[$('#timeId').val()]-deduction)*couponAmount)).toFixed(2);$('#total-price-display').text('$'+price);if($('#timeId').val()==4){$('#prices-overlay-date').text(`(No future payments)`);$('#subscription-option').fadeOut();$('#one-time-option').fadeOut();}else{$('#subscription-option').fadeIn();$('#one-time-option').fadeIn();setDate();}} function setDate(){var date=isExtension?new Date(expires):new Date();date.setDate(date.getDate()+(duration[$('#timeId').val()]));$('#prices-overlay-date').text(`(${$("input[name='sub-type-group']:checked").val()=="subscription"?'Next payment ':'Expires on'} ${date.yyyymmdd()})`);} function days_between(date1,date2){var ONE_DAY=1000*60*60*24;var date1_ms=date1;var date2_ms=date2;var difference_ms=Math.abs(date1_ms-date2_ms);return Math.round(difference_ms/ONE_DAY);} setTimeout(function(){if(navigator.platform.indexOf('Win')==-1){alertify.delay(30000).error("We have detected your operating system to be non-windows,
please do note that we do not natively support that operating system and you will be unable to use our authenticator,
however you can use clients that have integrated our API.
Please join the support discord if you'd like more information on this.",0);}},2000);function billingRecurranceOption(option){if(option==='sub'){setDate();}}