cdn.typicaltrues.com
Open in
urlscan Pro
172.67.187.88
Public Scan
URL:
https://cdn.typicaltrues.com/FormJSAuto/autoform.min.js
Submission: On November 05 via api from US — Scanned from US
Submission: On November 05 via api from US — Scanned from US
Form analysis
0 forms found in the DOMText Content
var Form=new function(){this.init=function(){if(this.submit_count=0,this.form_container=$(".form-container"),this.country_input_val="",this.validationCountries=["gb","ie"],this.messages=TRANSLATE[lang].messages,this.timeout,this.truePhone,this.trueEmail,this.preloadButton='<svg viewBox="0 0 125 125" width="40" height="25" xmlns="http://www.w3.org/2000/svg" fill="#fff"><rect y="10" width="15" height="120" rx="6"><animate attributeName="height" begin="0.5s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"/><animate attributeName="y" begin="0.5s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/></rect><rect x="30" y="10" width="15" height="120" rx="6"><animate attributeName="height" begin="0.25s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"/><animate attributeName="y" begin="0.25s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/></rect><rect x="60" width="15" height="140" rx="6"><animate attributeName="height" begin="0s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"/><animate attributeName="y" begin="0s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/></rect><rect x="90" y="10" width="15" height="120" rx="6"><animate attributeName="height" begin="0.25s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"/><animate attributeName="y" begin="0.25s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/></rect><rect x="120" y="10" width="15" height="120" rx="6"><animate attributeName="height" begin="0.5s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"/><animate attributeName="y" begin="0.5s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/></rect></svg>',this.comment="",this.trackResponse="",this.queryParams=this.getQueryParams(document.location.search),-1!==document.referrer.indexOf(window.location.host)){var t=new URL(document.referrer);Object.keys(this.getQueryParams(t.search)).length&&(this.queryParams=this.getQueryParams(t.search))}return this.columns={firstName:"first_name",lastName:"last_name",phone:"phone",emailAddress:"email_address",countryISO:"countryISO",affiliateId:"affiliate_id",offerId:"offer_id",affSub:"aff_sub",transactionId:"transaction_id",sourceId:"source_id",tsid:"tsid",bcampId:"bcamp_id",plid:"plid",buid:"buid",registration:"registration",redirectTarget:"redirectTarget",domain:"domain"},this.api="https://api."+this.getDomainName(),this.blacklist=["af","ca","ht","ir","il","kp","ly","mm","so","sy","tj","tm","us","ua"],this.initFormData(),this.changeHistory(),this.createNewWindow(),$.ajaxSetup({global:!0,headers:{"Content-Type":"application/json"}}),this},this.getDomainName=function(){for(var t=0,e=document.domain,i=e.split("."),a="_gd"+(new Date).getTime();t<i.length-1&&-1==document.cookie.indexOf(a+"="+a);)e=i.slice(-1-++t).join("."),document.cookie=a+"="+a+";domain="+e+";";return document.cookie=a+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain="+e+";",e},this.initElem=function(){this.main_modal=$(".main-modal"),this.post_modal=$("#postModal"),this.congrats_modal=$(".congrats"),this.congrats_alert=$(".congrats-left__text"),this.alert=$("#postModal .alert"),this.affiliateId=$('input[name="affid"]'),this.affSub=$('input[name="subid"]'),this.offerId=$('input[name="offerid"]'),this.transactionId=$('input[name="transactionid"]'),this.plid=$('input[name="plid"]'),this.tsid=$('input[name="tsid"]'),this.buid=$('input[name="buid"]'),this.bcampId=$('input[name="bcamp_id"]'),this.waitWindow=$(".wait-window"),this.hiddenParamForm=$("#hiddenParamForm"),this.telInput=$("input[name=phone]"),this.firstname=$("input[name=firstname]"),this.lastname=$("input[name=lastname]"),this.fullname=$("input[name=fullname]"),this.code=$("input[name=code]"),this.email=$("input[name=email]"),this.domainInput=$('input[name="domain"]'),this.domainInput.val(this.domain)},this.changeInputDirection=function(){this.telInput.attr("dir","ltr"),this.email.attr("dir","ltr"),this.code.attr("dir","ltr"),this.firstname.attr("dir","rtl"),this.lastname.attr("dir","rtl"),this.fullname.attr("dir","rtl")},this.initFormData=function(){this.getConfig(),this.saveTrack?(this.createMessengers(),this.initElem(),this.saveTrackSubmit()):(this.createForms(),this.initElem(),this.hideInputs(),this.addUrlData()),"ar"===lang&&this.changeInputDirection()},this.DOMReady=function(){this.saveTrack||(this.validationOnInput(),this.stopHoverValidation||this.validationOnHover(),this.submitForm(),this.initCountrySelect()),this.form_container.find("button[type=submit]").attr("disabled","disabled")},this.getConfig=function(){this.config=CONFIG,this.forms=this.config.forms,this.style=this.config.style,this.template=this.config["main-template"],this.inputs=this.config["inputs-template"],this.modal=this.config["modal-template"],this.sourceId=this.config["source-id"],this.registration=this.config.registration,this.iframe=this.config.iframe,this.iframeTemplate=this.config["iframe-template"],this.externalTrackers=this.config.externalTrackers,this.externalTrackerEvents=this.config.externalTrackerEvents,this.backOffer=this.config.backOffer,this.backOfferEnabled=this.config.backOfferEnabled,this.secondOffer=this.config.secondOffer,this.secondOfferEnabled=this.config.secondOfferEnabled,this.defaultAffiliateID=this.config.defaultAffiliateID,this.defaultOfferID=this.config.defaultOfferID,this.emailValidation=this.config.emailValidation,this.phoneValidation=this.config.phoneValidation,this.redirectTarget=this.config.redirectTarget,this.config.validationCountries&&(this.validationCountries=this.config.validationCountries),this.saveTrack=this.config.saveTrack,this.messengers=this.config.messengers,this.enableAgentGenderSelector=this.config.enableAgentGenderSelector,this.registerRedirectDelay=this.config.registerRedirectDelay,this.preferredCountryList=this.config.preferredCountryList,this.mainDomain=this.config.mainDomain||this.api,this.inputsAdditional=this.config["inputs-additional"],this.commentTemplate=this.config.commentTemplate,this.trackUrl=this.config.trackUrl||this.api+"/fetch?",this.domain=this.config.domain||(location.host+("/"!==location.pathname?location.pathname.replace(/\/\w+.(html|php)/,""):"")).slice(0,50),this.config.trackParams&&(this.trackParams="string"==typeof this.config.trackParams?this.config.trackParams:this.toQueryString(this.config.trackParams)),this.stopHoverValidation=this.config.stopHoverValidation,this.trackersTemplates=this.config.trackersTemplates,this.pixelsIds={facebook:this.config.pixelKey&&this.queryParams[this.toCamelCase(this.config.pixelKey)]||this.config.pixelId,google:this.config.googleKey&&this.queryParams[this.toCamelCase(this.config.googleKey)],yandex:this.config.yandexKey&&this.queryParams[this.toCamelCase(this.config.yandexKey)],tiktok:this.config.tiktokKey&&this.queryParams[this.toCamelCase(this.config.tiktokKey)],matomo:this.config.matomoKey&&this.queryParams[this.toCamelCase(this.config.matomoKey)]},this.requestErrorTimeout=this.config.requestErrorTimeout||20,this.disableCommentUserInfo=this.config.disableCommentUserInfo,this.changeConfig()},this.changeConfig=function(){this.queryParams.reg&&(this.registration=this.queryParams.reg),"1"===this.queryParams.bo&&(this.backOfferEnabled=!0),"1"===this.queryParams.so&&(this.secondOfferEnabled=!0)},this.changeHistory=function(){this.backOfferEnabled&&(window.history.pushState({link:window.location.href},null,window.location.href),window.onpopstate=function(t){var e=document.createElement("a");e.href=Form.backOffer,document.body.appendChild(e),e.click()})},this.createNewWindow=function(){this.secondOfferEnabled&&window.open(this.secondOffer,"_blank")},this.createForms=function(){for(var t in this.inputs)this.form_container.append(this.inputs[t]);for(var t in this.inputsAdditional)this.form_container.append(this.inputsAdditional[t]);this.form_container.append("<style>"+this.style+"</style>",this.template),$("body").append(this.modal,this.iframeTemplate)},this.createMessengers=function(){var t="";for(var e in this.messengers)t+='<a href="#" style="margin-left:5px" class="messeger-link" data-link="'+this.messengers[e].link+'" ><img src="'+this.messengers[e].image+'" alt="'+this.messengers[e].name+'" ></a>';this.form_container.append('<div style="display:flex;justify-content: space-between;" class="messeger-wrap">'+t+"</div>"),$("body").append(this.modal,this.iframeTemplate)},this.saveTrackSubmit=function(){this.form_container.find(".messeger-link").on("click",function(t){var e=$(this).data("link"),i={},a=Form.columns;for(var n in Form.sourceId&&(i[a.sourceId]=Form.sourceId),Form.queryParams)i[a[n]]&&i[a[n]].val(Form.queryParams[n]);return Form.queryParams.offerId||(i[a.offerId]=Form.defaultOfferID.toString()),Form.queryParams.affiliateId||(i[a.affiliateId]=Form.defaultAffiliateID.toString()),$.post(Form.mainDomain+"/msgwebhook/savetrack",JSON.stringify(i),function(t){window.location.assign(e+t.key)}).fail(function(t){Form.alert.addClass("alert-danger").text(t.error),Form.toggleModal()}),!1})},this.loadExternalTrackers=function(){if(this.externalTrackers){!window.fbq&&this.pixelsIds.facebook&&this.initTrackerThroughImage("facebook");for(var t=0;t<=this.externalTrackers.length-1;t++)"head"===this.externalTrackers[t].position?$("head").append("<script>"+this.externalTrackers[t].code+"<\/script>"):$("body").append("<script>"+this.externalTrackers[t].code+"<\/script>")}},this.fireExternalEvents=function(t){if(!this.blacklist.includes(this.country_input_val)){if(this.externalTrackerEvents)for(var e=0;e<=this.externalTrackerEvents.length-1;e++)this.externalTrackerEvents[e].event===t&&$("body").append("<script>"+this.externalTrackerEvents[e].code+"<\/script>");if(this.trackersTemplates&&Array.isArray(this.trackersTemplates)&&this.trackersTemplates.length)for(e=0;e<=this.trackersTemplates.length-1;e++){var i=this.trackersTemplates[e],a=i.name,n=i.events,r=i.enabled;if(Object.keys(this.pixelsIds).includes(a)&&r&&Array.isArray(n)&&n.length)for(var u=0;u<=n.length-1;u++)n[u].name===t&&$("body").append("<script>"+n[u].code+"<\/script>")}}},this.initTrackerThroughImage=function(t,e){var i=this.pixelsIds[t]||e,a={facebook:"fbq",yandex:"ym"};window[a[t]]=i?function(e,a){var n=new Image(1,1);switch(t){case"facebook":n.src="https://www.facebook.com/tr?id="+i+"&ev="+(a||e)+"&noscript=1",n.setAttribute("style","display:none");break;case"yandex":n.src="https://mc.yandex.ru/watch/"+i,n.setAttribute("style","position:absolute; left:-9999px;")}n.setAttribute("referrerPolicy","no-referrer"),document.body.appendChild(n)}:function(e,i){console.warn(t+" pixel ID is not set",{method:e,event:i})}},this.setTrackers=function(){if(this.trackersTemplates&&Array.isArray(this.trackersTemplates)&&this.trackersTemplates.length)for(var t=0;t<=this.trackersTemplates.length-1;t++){var e=this.trackersTemplates[t],i=e.name,a=this.pixelsIds[i]||e.id;if(e.enabled)switch(i){case"facebook":this.initTrackerThroughImage(i,a),fbq("track","PageView");break;case"yandex":$("head").prepend('<script>(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");<\/script>'),ym(a,"init",{clickmap:!0,trackLinks:!0,accurateTrackBounce:!0,webvisor:!0});break;case"google":$("head").prepend("<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');<\/script>"),ga("create",a,"auto"),ga("send","pageview");break;case"tiktok":$("head").prepend('<script> !function (w, d, t) {w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var i="https://analytics.tiktok.com/i18n/pixel/events.js";ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=i,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=i+"?sdkid="+e+"&lib="+t;e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(n,e)};ttq.load("'+a+'");ttq.page();}(window, document, "ttq");<\/script>');break;case"matomo":$("head").prepend("<script>var _paq = window._paq = window._paq || [];_paq.push(['trackPageView']);_paq.push(['enableLinkTracking']);(function() {var u= $.FormJS('get', 'setting').external['url:first'].split('.').slice(1).join('.') + '/ajax/';_paq.push(['setTrackerUrl', '//api.'+u]);_paq.push(['setSiteId', '"+a+"']);var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];g.type='text/javascript'; g.async=true; g.src='//cdn.'+u+'lib.js'; s.parentNode.insertBefore(g,s);})();<\/script>");break;default:console.warn(i+" - tracker does not exist")}}},this.hideInputs=function(){for(var t in this.forms){var e=$("#"+t);for(var i in this.forms[t].hidden)e.find("input[name="+i+"]").attr({type:"hidden",value:"country"!==i?this.forms[t].hidden[i]:""}).siblings("label").hide(),["age","conditions","phone"].includes(i)&&e.find("input[name="+i+"]").parent().hide();var a=e.find(".close-form");this.forms[t].modal?a.show():a.hide()}},this.changeOffers=function(t){var e=t.split("?"),i=e[0],a=e[1],n=Form.getQueryParams("?"+a);for(var r in n)this[r].val()&&(n[r]=this[r].val());return i+"?"+(n=Form.toQueryString(n))},this.getTrackUrl=function(){var t=this.getQueryParams("?"+this.trackParams,"default");for(var e in t)if(t[e]&&t[e].includes("|"))for(var i=t[e].slice(1,-1).split("|"),a=0;a<=i.length-2;a++){if(n=this.queryParams[this.toCamelCase(i[a])]){t[e]=n;break}t[e]=i.slice(-1)}else if(t[e]&&t[e].includes("{")){var n;(n=this.queryParams[this.toCamelCase(t[e].slice(1,-1))])&&(t[e]=n)}var r=this.getQueryParams(document.location.search,"default");for(var e in r)r[e]||delete r[e],"affiliate_id"===e?t.aff_id&&r.affiliate_id&&(t.aff_id=r.affiliate_id,delete r.affiliate_id):t[e]&&r[e]&&(t[e]=r[e],delete r[e]);if(Object.keys(r).length){var u=this.toQueryString(t)?"o="+btoa(this.toQueryString(t)+"&"+this.toQueryString(r)):"o="+btoa(this.toQueryString(r));this.trackUrl+=u}else this.trackUrl=this.trackUrl+"o="+btoa(this.toQueryString(t));function s(t){Form.trackResponse=Form.getQueryParams("?"+t,"default");var e=Form.getQueryParams("?"+t);for(var i in e)Form[i]&&!Form[i].val()&&!e[i].includes("{")&&Form[i].val(e[i])}return new Promise(function(t,e){var i=function(t){let e=document.cookie.match(new RegExp("(?:^|; )"+t.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return e?decodeURIComponent(e[1]):void 0}("trackParams");i?(s(i),t()):$.get(Form.trackUrl,function(e){e&&(document.cookie="trackParams="+encodeURIComponent(e)+"; max-age=1800",s(e)),t()}).fail(function(t){e(t)})})},this.addUrlData=function(){if(this.hiddenParamForm&&this.hiddenParamForm.length>0){var t=this.hiddenParamForm.html();$(".form-container .form_group--hidden").html(t)}else{for(var e in Form.queryParams)this[e]&&this[e].val&&this[e].val(Form.queryParams[e]);if(this.trackParams||window.location.search)this.getTrackUrl().then(function(){if(!Form.offerId.val()&&Form.offerId.val(Form.defaultOfferID),!Form.affiliateId.val()&&Form.affiliateId.val(Form.defaultAffiliateID),Form.backOfferEnabled&&Form.backOffer){var t=Form.changeOffers(Form.backOffer);""!==t&&(Form.backOffer=t)}if(Form.secondOfferEnabled&&Form.secondOffer){var e=Form.changeOffers(Form.secondOffer);""!==e&&(Form.secondOffer=e)}}).catch(function(t){throw new Error(t)});else{if(!Form.offerId.val()&&Form.offerId.val(Form.defaultOfferID),!Form.affiliateId.val()&&Form.affiliateId.val(Form.defaultAffiliateID),Form.backOfferEnabled&&Form.backOffer){var i=Form.changeOffers(Form.backOffer);""!==i&&(Form.backOffer=i)}if(Form.secondOfferEnabled&&Form.secondOffer){var a=Form.changeOffers(Form.secondOffer);""!==a&&(Form.secondOffer=a)}}}},this.checkValidationRemote=function(t){return new Promise(function(e,i){var a;switch(t.name){case"email":a={email_address:t.value};break;case"phone":a={phone:t.value}}clearTimeout(n);var n=setTimeout(function(){i()},1e3*+Form.requestErrorTimeout);$.post(Form.mainDomain+"/check/"+t.name,JSON.stringify(a),function(t){try{var a=JSON.parse(t);e(a.success)}catch(t){i(t)}clearTimeout(n)}).fail(function(t){clearTimeout(n),i(t)})})},this.checkPhoneRemote=function(t){return new Promise(function(e,i){var a={phone:t};clearTimeout(n);var n=setTimeout(function(){i()},1e3*+Form.requestErrorTimeout);$.post(Form.mainDomain+"/check/validate-phone",JSON.stringify(a),function(t){try{var a=JSON.parse(t);e(a.success)}catch(t){i(t)}clearTimeout(n)}).fail(function(t){clearTimeout(n),i(t)})})},this.checkCodeRemote=function(){return new Promise(function(t,e){var i={phone:Form.truePhone,code:$("input[name=code]").val()};clearTimeout(a);var a=setTimeout(function(){e()},1e3*+Form.requestErrorTimeout);$.post(Form.mainDomain+"/check/code",JSON.stringify(i),function(i){try{var n=JSON.parse(i);t(n.success)}catch(t){e(t)}clearTimeout(a)}).fail(function(t){clearTimeout(a),e(t)})})},this.check_required_inputs=function(t){var e=!0;return $(t[0].form).find(".invalid").length>0&&(e=!1),$(t[0].form).find("input[required]:not([name=code]):not([type=checkbox]):not([type=hidden]), select").each(function(){""===$(this).val()&&(e=!1)}),$(t[0].form).find("input[type=checkbox]").each(function(){$(this).prop("checked")||(e=!1)}),e},this.validInput=function(t,e){"phone"===e?t.removeClass("invalid").addClass("valid").parent().siblings(".error").text("").siblings(".validation").fadeOut(200):t.removeClass("invalid").addClass("valid").siblings(".error").text("").siblings(".validation").fadeOut(200),Form.check_required_inputs(t)&&t.parents(".form-container").find("button[type=submit]").removeAttr("disabled")},this.invalidInput=function(t,e){"phone"===e?t.removeClass("valid").addClass("invalid").parent().siblings(".error").html(Form.messages[e]||Form.messages.required).siblings(".validation").fadeIn(200):t.removeClass("valid").addClass("invalid").siblings(".error").html(Form.messages[e]||Form.messages.required).siblings(".validation").fadeIn(200),t.parents(".form-container").find("button[type=submit]").attr("disabled","disabled")},this.validCheckbox=function(t){t.removeClass("invalid").addClass("valid").parent().siblings(".error").text("").siblings(".validation").fadeOut(200),Form.check_required_inputs(t)&&t.parents(".form-container").find("button[type=submit]").removeAttr("disabled")},this.invalidCheckbox=function(t,e){t.parent().siblings(".error").html(Form.messages[e]).siblings(".validation").fadeIn(200),t.parents(".form-container").find("button[type=submit]").attr("disabled","disabled")},this.check_validation=function(t){var e=t,i=e.data("validation-type"),a=e.val();switch(i){case"firstname":case"lastname":case"fullname":var n=/(^[(a-zA-Zа-ÑÐ-Я\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC-`. )]{2,26})$/;"fullname"===i?("hidden"!==this.firstname.attr("type")&&"hidden"!==this.lastname.attr("type")&&(n=/(^[(Ñ‘ÐЇїІіЄєÒÒ‘a-zA-Zа-ÑÐ-Я\u0621-\u064A\u0660-\u0669-`. )]{2,26})(\s)([(Ñ‘ÐЇїІіЄєÒÒ‘a-zA-Zа-ÑÐ-Я\u0621-\u064A\u0660-\u0669-`. )]{2,26})?(\s)?([(Ñ‘ÐЇїІіЄєÒÒ‘a-zA-Zа-ÑÐ-Я\u0621-\u064A\u0660-\u0669-`. )]{2,26})?(\s)?([(Ñ‘ÐЇїІіЄєÒÒ‘a-zA-Zа-ÑÐ-Я\u0621-\u064A\u0660-\u0669-`. )]{2,26})$/),a=a.trim()):a=a.split(" ").join(""),a&&n.test(a)?this.validInput(e):this.invalidInput(e,i);break;case"email":var r=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;0===this.emailValidation?Form.validInput(e):1===this.emailValidation||void 0===this.emailValidation?a&&r.test(a)?Form.validInput(e):Form.invalidInput(e,i):2===this.emailValidation&&(a&&r.test(a)?(clearTimeout(this.timeout),this.timeout=setTimeout(function(){Form.checkValidationRemote({name:"email",value:a}).then(function(t){Form.trueEmail=a,t?Form.validInput(e):Form.invalidInput(e,i)}).catch(function(t){Form.validInput(e,i)})},1e3)):Form.invalidInput(e,i));break;case"phone":var u=Form.telInput.intlTelInput("getSelectedCountryData").iso2,s=/^([- _().:=+]?\d[- _().:=+]?){2,14}(\s*)?$/;0===this.phoneValidation?Form.validInput(e,i):1===this.phoneValidation?e.intlTelInput("isValidNumber")&&$.trim(a)&&s.test(a)?Form.validInput(e,i):Form.invalidInput(e,i):3===this.phoneValidation||this.validationCountries.includes(u)?e.intlTelInput("isValidNumber")&&$.trim(a)&&s.test(a)?(a=e.intlTelInput("getNumber",intlTelInputUtils.numberFormat.E164),clearTimeout(this.timeout),this.timeout=setTimeout(function(){Form.checkPhoneRemote(a).then(function(t){t&&a===e.intlTelInput("getNumber",intlTelInputUtils.numberFormat.E164)?(Form.truePhone=a,Form.validInput(e,i),e.parents("form").find(".form_input--group.code").show().find("input").attr("type","number"),e.attr("disabled","disabled")):Form.invalidInput(e,i)}).catch(function(t){e.intlTelInput("isValidNumber")&&$.trim(a)&&s.test(a)?Form.validInput(e,i):Form.invalidInput(e,i)})},500)):Form.invalidInput(e,i):2!==this.phoneValidation&&void 0!==this.phoneValidation||(e.intlTelInput("isValidNumber")&&$.trim(a)&&s.test(a)?(a=e.intlTelInput("getNumber",intlTelInputUtils.numberFormat.E164),clearTimeout(this.timeout),this.timeout=setTimeout(function(){Form.checkValidationRemote({name:"phone",value:a}).then(function(t){t&&a===e.intlTelInput("getNumber",intlTelInputUtils.numberFormat.E164)?(Form.truePhone=a,Form.validInput(e,i)):Form.invalidInput(e,i)}).catch(function(t){e.intlTelInput("isValidNumber")&&$.trim(a)&&s.test(a)?Form.validInput(e,i):Form.invalidInput(e,i)})},500)):Form.invalidInput(e,i));break;case"age":case"conditions":e.prop("checked")?Form.validCheckbox(e):Form.invalidCheckbox(e,"conditions");break;case"code":4===a.length?(clearTimeout(this.timeout),this.timeout=setTimeout(function(){Form.checkCodeRemote().then(function(t){t?(Form.validInput(e),e.attr("disabled","disabled")):Form.invalidInput(e,i)}).catch(function(t){Form.validInput(e,i)})},500)):Form.invalidInput(e,i);break;default:e.length>0&&a?Form.validInput(e):Form.invalidInput(e,i)}},this.validationOnInput=function(){this.form_container.find("input, textarea, select").on("input",function(t){Form.check_validation($(t.target))})},this.validationOnHover=function(){this.form_container.find(".form_group--button").on("mouseover touchstart",function(t){for(var e=Form.form_container.find("input, textarea, select").not(".valid").not(":hidden"),i=0;i<=e.length-1;i++)Form.check_validation($(e[i]))})},this.registrationFrame=function(t,e){var i=t.message,a=document.getElementById("iframe");a.src=i.replace("http:","https:"),a.onload=function(){window.location.replace("app.php?username="+e[Form.columns.firstName]+" "+e[Form.columns.lastName]+"&email="+e[Form.columns.emailAddress])}},this.registrationTrue=function(t,e){1===t.code?this.iframe?(this.waitWindow.show(),Form.alert.addClass("alert-success").text(Form.messages[t.code]),setTimeout(function(){this.registrationFrame(t,e)},Form.registerRedirectDelay||5e3)):(this.waitWindow.show(),Form.alert.addClass("alert-success").text(Form.messages[t.code]),setTimeout(function(){window.location.assign(t.message)},Form.registerRedirectDelay||5e3)):Form.alert.addClass("alert-success").text(Form.messages[t.code])},this.removeEmptySpaces=function(t){return t?t.split(" ").filter(function(t){return t}).join(" "):""},this.createJSON=function(t){var e=this.columns,i=Form.telInput.intlTelInput("getSelectedCountryData"),a={},n=this.removeEmptySpaces(t.find('input[name="fullname"]').val()).split(" "),r=n.length>1?n.slice(0,-1).join(" "):n[0],u=n.length>1?n[n.length-1]:"";for(var s in a[e.firstName]=r||this.removeEmptySpaces(t.find('input[name="firstname"]').val()),a[e.lastName]=u||this.removeEmptySpaces(t.find('input[name="lastname"]').val())||"Trader",a[e.emailAddress]=this.trueEmail||t.find('input[name="email"]').val()||this.generateEmail(),a[e.phone]=this.truePhone||t.find('input[name="phone"]').intlTelInput("getNumber",intlTelInputUtils.numberFormat.E164),a[e.countryISO]=i.iso2,a[e.affiliateId]=t.find('input[name="affid"]').val(),a[e.offerId]=t.find('input[name="offerid"]').val(),a[e.sourceId]=this.sourceId,a[e.registration]=this.registration,this.redirectTarget&&(a[e.redirectTarget]=this.redirectTarget),t.find('input[name="subid"]').val()&&(a[e.affSub]=t.find('input[name="subid"]').val()),t.find('input[name="transactionid"]').val()&&(a[e.transactionId]=t.find('input[name="transactionid"]').val()),t.find('input[name="plid"]').val()&&(a[e.plid]=t.find('input[name="plid"]').val()),t.find('input[name="tsid"]').val()&&(a[e.tsid]=t.find('input[name="tsid"]').val()),t.find('input[name="buid"]').val()&&(a[e.buid]=t.find('input[name="buid"]').val()),t.find('input[name="bcamp_id"]').val()&&(a[e.bcampId]=t.find('input[name="bcamp_id"]').val()),t.find('input[name="domain"]').val()&&(a[e.domain]=t.find('input[name="domain"]').val()),this.commentTemplate){var o=t.find('[name="'+this.commentTemplate[s].slice(1,-1)+'"]').val()||(Form.trackResponse?Form.trackResponse[this.commentTemplate[s].slice(1,-1)]:"");o&&(this.comment+=s+":"+o+", ")}if(!this.disableCommentUserInfo){try{this.comment+=`${(new Date).toString().match(/([A-Z]+[\+-][0-9]+.*)/)[1]}, `}catch(t){console.warn(t)}try{this.comment+=`${window.navigator.language}, `}catch(t){console.warn(t)}try{this.comment+=`${/\(([^)]+)\)/.exec(window.navigator.userAgent)[1]}`}catch(t){console.warn(t)}}return this.comment&&(a.comment=this.comment),this.comment="",a},this.sendForm=function(t,e){var i=t.find("button[type=submit]"),a=i.html();function n(t,e){Form.alert.addClass(e?"alert-success":"alert-danger").text(t||Form.messages.error),Form.toggleModal(),i.html(a),i.removeAttr("disabled")}i.html(Form.preloadButton),i.attr("disabled","disabled"),clearTimeout(r);var r=setTimeout(function(){Form.fireExternalEvents("registration"),n(TRANSLATE[lang].messages.success,"expire")},1e3*+Form.requestErrorTimeout);$.post(Form.mainDomain+"/sendForm",JSON.stringify(e),function(t){try{var u=JSON.parse(t);Form.registration?Form.registrationTrue(u,e):Form.congrats_alert.html(Form.messages[u.code]),congrats(),!0===u.success&&Form.fireExternalEvents("registration"),i.html(a),i.removeAttr("disabled"),Form.main_modal&&$().modal&&Form.main_modal.modal("hide")}catch(t){n()}clearTimeout(r),Form.submit_count++}).fail(function(t){try{var e=JSON.parse(t.responseJSON);2!==e.code&&5!==e.code&&3!==e.code||Form.submit_count++,5===e.code||3===e.code?(Form.congrats_alert.html(Form.messages[0]),congrats(),i.html(a),i.removeAttr("disabled")):n(Form.messages[e.code])}catch(t){n()}clearTimeout(r),+t.status>=500&&Form.fireExternalEvents("registration")})},this.sendWithPopup=function(t){this.comment+="Perferred sales agent gender: "+t+"; ";var e=this.createJSON(this.form_container);this.sendForm(this.form_container,e)},this.submitForm=function(){this.form_container.submit(function(t){if(t.preventDefault(),Form.submit_count<3){if($(this).find(".invalid").length)return!1;if(Form.enableAgentGenderSelector&&$.FormJS)$.FormJS("saleagent").open();else{var e=Form.createJSON($(this));Form.sendForm($(this),e)}}else Form.alert.addClass("alert-danger").text(Form.messages.limit),Form.toggleModal()})},this.toggleModal=function(){if($().modal){this.main_modal&&this.main_modal.modal("hide"),clearTimeout(t);var t=setTimeout(function(){Form.post_modal.modal("show")},500)}},this.getPreferredCountryList=function(){return"en"!==lang&&Form.preferredCountryList&&Form.preferredCountryList.length?Form.preferredCountryList.join(",").toLowerCase().split(","):TRANSLATE[lang].preferredCountryList},this.initCountrySelect=function(){function t(t){if(Form.telInput.on("countrychange",function(t,e){e.iso2&&Form.telInput.intlTelInput("setCountry",e.iso2),Form.check_validation($(this))}),!Form.blacklist.includes(Form.country_input_val)){if(t&&!(200==+t||+t>=500))return!1;Form.setTrackers(),Form.loadExternalTrackers(),Form.fireExternalEvents("load")}}if(Form.telInput.intlTelInput({initialCountry:TRANSLATE[lang].country,preferredCountries:this.getPreferredCountryList()}),""===this.country_input_val){clearTimeout(e);var e=setTimeout(function(){t()},1e3*+Form.requestErrorTimeout);$.post(Form.mainDomain+"/geoip",function(i){Form.country_input_val=i.toLowerCase(),Form.telInput.intlTelInput("setCountry",Form.country_input_val),t(),clearTimeout(e)}).fail(function(i){t(i.status),clearTimeout(e)})}else Form.telInput.intlTelInput("setCountry",Form.country_input_val),t()},this.getQueryParams=function(t,e){t=t.split("?")[1];for(var i,a={},n=/[?&]?([^=]+)=([^&]*)/g;i=n.exec(t);)a[decodeURIComponent(i[1])]=decodeURIComponent(i[2]);return a=Form.mapKeys(a,function(t,i){return e?i:Form.toCamelCase(i)})},this.mapKeys=function(t,e){return Object.keys(t).reduce(function(i,a){return i[e(t[a],a,t)]=t[a],i},{})},this.toCamelCase=function(t){var e=t&&t.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).map(function(t){return t.slice(0,1).toUpperCase()+t.slice(1).toLowerCase()}).join("");return e.slice(0,1).toLowerCase()+e.slice(1)},this.generateEmail=function(){return"nomail_"+Array.apply(0,Array(5)).map(function(){return(t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz").charAt(Math.floor(Math.random()*t.length));var t}).join("")+Date.now()+"@mail.com"},this.toQueryString=function(t){return Object.keys(t).map(function(e){return e+"="+encodeURIComponent(t[e])}).join("&")}};Form.init(),$(document).ready(function(){Form.DOMReady()});