PageSourceSearch

https://www.simpletix.com/blog/wp-content/themes/simpletix/assets/js/new/simpletix.js?ver=6.2.2

js simpletix.com collected 2026-09-24 08:57:58 UTC 51,440 bytes, 1,252 lines download raw bytes

1var landingpages;
2var landingPagesData = landingpages ? landingpages : [];
3
4var SHOW_CALENDAR = false;
5var landingCode = '', landingTitle = '', landingRate = '', landingExtraFeePerOrder = '', landingPricePgImage = '', serviceFee = 0.02, centPrice = 0.79;
6var ctrAbr = {};
7ctrAbr['IN'] = "in";
8ctrAbr['SZ'] = "ch";
9ctrAbr['NL'] = "nl";
10ctrAbr['ES'] = "es";
11ctrAbr['SE'] = "se";
12ctrAbr['FR'] = "fr";
13ctrAbr['DE'] = "de";
14ctrAbr['IT'] = "it";
15ctrAbr['BE'] = "be";
16ctrAbr['GB'] = "co.uk";
17ctrAbr['AT'] = "at";
18ctrAbr['NZ'] = "co.nz";
19ctrAbr['CA'] = "ca";
20ctrAbr['CO'] = "co";
21ctrAbr['IE'] = "ie";
22ctrAbr['ZA'] = "co.za";
23ctrAbr['MX'] = "mx";
24
25var getUrlParameter = function getUrlParameter(sParam) {
26    var sPageURL = decodeURIComponent(window.location.search.substring(1)),
27        sURLVariables = sPageURL.split('&'),
28        sParameterName,
29        i;
30
31    for (i = 0; i < sURLVariables.length; i++) {
32        sParameterName = sURLVariables[i].split('=');
33        if (sParameterName.length > 2) {
34            sParameterName[1] = sURLVariables[i].split('=').slice(1).join('=');
35        }
36        if (sParameterName[0].toLowerCase() === sParam.toLowerCase()) {
37            return sParameterName[1] === undefined ? true : sParameterName[1];
38        }
39    }
40};
41
42function readCookie(name) {
43    var nameEQ = name + "=";
44    var ca = document.cookie.split(';');
45    for (var i = 0; i < ca.length; i++) {
46        var c = ca[i];
47        while (c.charAt(0) == ' ') c = c.substring(1, c.length);
48        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
49    }
50    return null;
51}
52
53var existingAccount = false;
54var existingUserId = "";
55var state = "";
56var fullDomain = "";
57
58// sticky header
59$(document).ready(function () {
60    $("#dvSpinLoaderStep2").hide();
61    $("#step2AccountText").show();
62
63    $("#domainSection").hide();
64
65    $(window).on("scroll load", function () {
66        if ($(this).scrollTop() > 10)
67            $(".header").addClass("sticky-top");
68        else $(".header").removeClass("sticky-top");
69    });
70    $(".domain-control").hide();
71    $(".edit-dname").click(function () {
72        $(".domain-control").show();
73        $(".brand-name").hide();
74        $("#domainSection").hide();
75    });
76
77    var checkEventPageUrlApiUrl = "https://api.prod.simpletix.com/cloudsite/Sites/GetDomainAvailability?subDomain={0}&parentDomain={1}";
78    var accountEmailExist = "https://api.prod.simpletix.com/cloudsite/Signup/DoesUserAccountExist?email={0}";
79    var signupFirstStep = "https://api.prod.simpletix.com/cloudsite/Signup/SignUpFirstStep?email={0}&country={1}";
80    var signUpURL = "https://api.prod.simpletix.com/cloudsite/Signup/SignUpEvent";
81    var parentDomain = "simpletix.com";
82    var managerPanelUrl = "http://manager.simpletix.com/";
83    var existingAccountEmailUrl = "https://api.prod.simpletix.com/cloudsite/Signup/ExistingAccountEmail";
84
85    if (false) {
86        checkEventPageUrlApiUrl = "https://api.dev.simpletix.com/cloudsite/Sites/GetDomainAvailability?subDomain={0}&parentDomain={1}";
87        accountEmailExist = "https://api.dev.simpletix.com/cloudsite/Signup/DoesUserAccountExist?email={0}";
88        signupFirstStep = "https://api.dev.simpletix.com/cloudsite/Signup/SignUpFirstStep?email={0}&country={1}";
89        signUpURL = "https://api.dev.simpletix.com/cloudsite/Signup/SignUpEvent";
90        parentDomain = "simpletix.us";
91        managerPanelUrl = "http://manager.simpletix.us/";
92        existingAccountEmailUrl = "https://api.dev.simpletix.com/cloudsite/Signup/ExistingAccountEmail";
93    }
94    else if (location.href.indexOf('simpletix.us') > -1) {
95        checkEventPageUrlApiUrl = "https://api.dev.simpletix.com/cloudsite/Sites/GetDomainAvailability?subDomain={0}&parentDomain={1}";
96        accountEmailExist = "https://api.dev.simpletix.com/cloudsite/Signup/DoesUserAccountExist?email={0}";
97        signupFirstStep = "https://api.dev.simpletix.com/cloudsite/Signup/SignUpFirstStep?email={0}&country={1}";
98        signUpURL = "https://api.dev.simpletix.com/cloudsite/Signup/SignUpEvent";
99        parentDomain = "simpletix.us";
100        managerPanelUrl = "http://manager.simpletix.us/";
101        existingAccountEmailUrl = "https://api.dev.simpletix.com/cloudsite/Signup/ExistingAccountEmail";
102    }
103    else if (location.href.indexOf('localhost') > -1) {
104        checkEventPageUrlApiUrl = "http://localhost:40542/cloudsite/Sites/GetDomainAvailability?subDomain={0}&parentDomain={1}";
105        accountEmailExist = "http://localhost:40542/cloudsite/Signup/DoesUserAccountExist?email={0}";
106        signupFirstStep = "http://localhost:40542/cloudsite/Signup/SignUpFirstStep?email={0}&country={1}";
107        signUpURL = "http://localhost:40542/cloudsite/Signup/SignUpEvent";
108        parentDomain = "simpletix.us";
109        managerPanelUrl = "http://localhost:4200/";
110        existingAccountEmailUrl = "http://localhost:40542/cloudsite/Signup/ExistingAccountEmail";
111    }
112
113    setParentDomain();
114    setStartUpPage();
115
116    var filteredDivs = $("#field-account").filter(function () {
117        var reg = new RegExp(getUrlParameter("p"), "ig");
118        return reg.test($(this).text());
119    });
120
121    if ($("#field-account").length && typeof getUrlParameter("p") !== "undefined" && getUrlParameter("p") !== null && filteredDivs.length === 1) {
122        $("#field-account").val(getUrlParameter("p")).trigger("change");
123    }
124
125    if (typeof getUrlParameter("email") !== "undefined" && getUrlParameter("email") !== null && typeof $("#emailId") !== "undefined" && $("#emailId") !== null) {
126        $("#emailId").val(getUrlParameter("email"));
127    }
128
129    setTimeout(function () {
130        if (typeof readCookie("utm_campaign") !== "undefined" && readCookie("utm_campaign") !== null && readCookie("utm_campaign") !== "") {
131            if (readCookie("utm_campaign").toLowerCase().includes("square")) {
132                $("#field-account").val("Square").trigger("change");
133            } else if (readCookie("utm_campaign").toLowerCase().includes("stripe")) {
134                $("#field-account").val("Stripe").trigger("change");
135            } else if (readCookie("utm_campaign").toLowerCase().includes("paypal")) {
136                $("#field-account").val("PayPal").trigger("change");
137            } else if (readCookie("utm_campaign").toLowerCase().includes("auth")) {
138                $("#field-account").val("Authorize").trigger("change");
139            } else if (readCookie("utm_campaign").toLowerCase().includes("brain")) {
140                $("#field-account").val("BrainTree").trigger("change");
141            }
142        }
143    }, 1000);
144
145    // for signup
146    $("#frmSignUp").validate({
147        showErrors: function (errorMap, errorList) {
148            this.defaultShowErrors();
149            $(this.currentForm).find('label[for=subDomain]').addClass("focused");
150        },
151        rules: {
152            emailId: {
153                required: true,
154                maxlength: 50,
155                minlength: 5,
156                email: true,
157            },
158            password: {
159                required: true,
160                maxlength: 30,
161                minlength: 7
162            },
163            businessName: {
164                required: true,
165                maxlength: 150,
166            }
167        },
168        messages: {
169            emailId: {
170                required: "Email is required.",
171                maxlength: "Email address accept only 50 characters.",
172                email: "Email Address must be valid."
173            },
174            password: {
175                required: "Password is required.",
176                maxlength: "Password accept only 30 characters.",
177                minlength: 'Password must be atleast 7 characters.'
178            },
179            businessName: 'Please provide your organization name.'
180        }
181    });
182
183    $("#frmSignUp").submit(function (e) {
184        if ($("#isAlreadyThere").val() == "true") {
185            $("#subDomainMsg").text("Please add valid website name.");
186            $("#subDomainMsg").css("margin-top", "5px").show();
187            return false;
188        } else if ($("#isAlreadyRegistered").val() == "true") {
189            $("#subDomainMsg").text("Please pick another website name, this name is already registered");
190            $("#subDomainMsg").css("margin-top", "5px").show();
191            return false;
192        } else {
193            $("#subDomainMsg").hide();
194        }
195
196        if (!$("#frmSignUp").valid()) {
197            return false;
198        }
199
200        var url = signupFirstStep.replace("{0}", encodeURIComponent($("#emailId").val())).replace("{1}", encodeURIComponent($("#country").val())).replace("{2}");
201
202        $("#btnSignInContinue").attr("disabled", 'disabled');
203        $("#dvSpinLoader").show();
204
205        var gotoStep2 = false;
206        $.ajax({
207            type: "GET",
208            url: url,
209            async: false,
210            success: function (data) {
211                $("#firststepvalue").val(data);
212                $("#country_name").val($("#country option:selected").text());
213                $("#state").val(state);
214
215                if (data == "0") {
216                    //Account does not exists, so show second wizard page
217                    $("#dvCountryNotAvailable").hide();
218                    $("#dvAlreadyAccount").hide();
219                    $("#dvThankYou").hide();
220                    $("#dvNewOrgAccount").show();
221                    setParentDomain();
222                    gotoStep2 = true;
223                    //document.getElementById("frmSignUp").submit();
224                }
225                else if (data == "1") {
226                    //Already have an account
227                    $("#dvThankYou").hide();
228                    $("#dvCountryNotAvailable").hide();
229                    $("#dvNewOrgAccount").hide();
230                    $("#dvAlreadyAccount").show();
231                    $("#alreadyExistEmail").html("");
232                    $("#alreadyExistEmail").html($('#emailId').val());
233                    sendexistingAccountEmail();
234                    //document.getElementById("frmSignUp").submit();
235                    gotoStep2 = true;
236                }
237                else if (data == "2") {
238                    //Country not available
239                    $("#dvThankYou").hide();
240                    $("#dvAlreadyAccount").hide();
241                    $("#dvNewOrgAccount").hide();
242                    $("#countryNotSupported1").html("");
243                    $("#countryNotSupported2").html("");
244                    $("#countryNotSupported3").html("");
245                    $("#countryNotSupported1").html($('#country option:selected').text());
246                    $("#countryNotSupported2").html($('#country option:selected').text());
247                    $("#countryNotSupported3").html($('#country option:selected').text());
248                    $("#dvCountryNotAvailable").show();
249                    //document.getElementById("frmSignUp").submit();
250                    gotoStep2 = true;
251                }
252                else {
253                    //not valid email
254                    if ($("#emailErrorMessage")) {
255                        $("#emailErrorMessage").remove();
256                        $("#emailId").css("border-color", "#00ca72");
257                    }
258                    $("#emailId").parent().append(
259                        $('<label id="emailErrorMessage" class="error">Please provide valid email address.</label>')
260                    );
261                    $("#emailId").css("border", "1px solid #f75a5e");
262                    $("#btnSignInContinue").removeAttr("disabled"); 
263                    $("#dvSpinLoader").hide();
264                }
265                if (data != "3") {
266                    $("#createaccount").modal('hide');
267                    $("#btnSignInContinue").removeAttr("disabled"); 
268                    $("#dvSpinLoader").hide();
269                }
270
271                $("#headerResponse").text("");
272                $("#frmCreateOrganization #inValidForm").html("");
273                $("#btnSubmit").removeAttr("disabled");
274                $("#dvSpinLoaderStep2").hide();
275                $("#step2AccountText").show();
276            },
277            error: function (jqXHR, exception) { }
278        });
279
280        if (gotoStep2 == false) {
281            e.preventDefault(); // avoid to execute the actual submit of the form.
282        }
283        else {
284            document.forms["frmSignUp"].submit();
285            //return true;
286        }
287    });
288
289    function sendexistingAccountEmail() {
290        if (typeof $("#emailId") !== "undefined" && $("#emailId") !== null && $("#emailId").val().length > 0) {
291            var jsonArray = {
292                Email: $("#emailId").val()
293            };
294            $.ajax({
295                type: "POST",
296                contentType: "application/json",
297                url: existingAccountEmailUrl,
298                async: false,
299                data: JSON.stringify(jsonArray),
300                success: function (data) { },
301                error: function (jqXHR, exception) { }
302            });
303        }
304    }
305
306    $("#createAccountModal,#createAccountModalGetStarted,#createAccountModal2, #createAccountModal22, #createAccountModalGetStarted2, #createAccountModalFooter, #createEventHeaderBlog, #createEventFooterBlog, #newsletter-createaccount").click(function () {
307        ipLookUp();
308        $("#btnSignInContinue").removeAttr("disabled");
309        $("#frmSignUp")[0].reset();
310        $("#frmSignUp").data('validator').resetForm();
311        $("#frmSignUp").find('.error').removeClass("error");
312        $("#subDomainMsg").text("");
313        $("#dvSpinLoader").hide();
314        $("#dvSpinLoaderStep2").hide();
315        $("#step2AccountText").show();
316        $("#domainSection").hide();
317        $(".toggle-password").removeClass("la-eye");
318        $(".toggle-password").addClass("la-eye-slash");
319        $("#password").attr("type", "password");
320        $("#emailId").css("border-color", "#e2e2e2");
321    });
322
323    //for create orgranization
324    $("#frmCreateOrganization").validate({
325        rules: {
326            txtFirstName: {
327                required: true,
328                maxlength: 20
329            },
330            txtLastName: {
331                required: true,
332                maxlength: 20,
333            },
334            phoneNumber: {
335                required: true,
336                number: true,
337                minlength: 5,
338                maxlength: 20
339            },
340            businessName: {
341                required: true,
342                maxlength: 150,
343            }
344        },
345        messages: {
346            txtFirstName: 'Please provide your First name.',
347            txtLastName: 'Please provide your Last name.',
348            phoneNumber: {
349                required: "Please provide Phone number"
350            },
351            businessName: 'Please provide your organization name.'
352        }
353    });
354
355    $("#frmCreateOrganization").submit(function (e) {
356        if (existingAccount) {
357            if ($("#isAlreadyThere").val() == "true") {
358                $("#subDomainMsg").text("Please add valid website name.");
359                $("#subDomainMsg").css("margin-top", "5px").show();
360                return false;
361            } else if ($("#isAlreadyRegistered").val() == "true") {
362                $("#subDomainMsg").text("Please pick another website name, this name is already registered");
363                $("#subDomainMsg").css("margin-top", "5px").show();
364                return false;
365            } else {
366                $("#subDomainMsg").hide();
367            }
368        }
369
370        if (!$("#frmCreateOrganization").valid()) {
371            return false;
372        }
373
374        fullDomain = "https://" + $("#subDomain").val() + "." + parentDomain;
375
376        var jsonArray = {
377            Email: $("#emailId").val(),
378            Password: $("#userPassword").val(),
379            Country: $("#country").val(),
380            FirstName: $("#txtFirstName").val(),
381            LastName: $("#txtLastName").val(),
382            BusinessPhoneNumber: $("#phoneNumber").val(),
383            PersonalBusinessName: $("#personalBusinessName").val(),
384            BusinessCategory: $("#businessCategory").val(),
385            SignUpUserIpInfo: $("#signUpUserIpInfo").val(),
386            State: $("#state").val(),
387            NextEventTime: $("#NextEventTime").val(),
388            TimeZone: $("#ddltimezone").val(),
389            SubDomain: $("#subDomain").val(),
390            BusinessName: $("#businessName").val(),
391            ParentDomain: parentDomain,
392            HiddenField: JSON.stringify(bindhdnData()),
393            ExistingAccount: existingAccount,
394            ExistingUserId: existingUserId,
395        };
396
397        $("#btnSubmit").attr("disabled", 'disabled');
398        $("#dvSpinLoaderStep2").show();
399        $("#step2AccountText").hide();
400        $.ajax({
401            type: "POST",
402            contentType: "application/json",
403            url: signUpURL,
404            data: JSON.stringify(jsonArray),
405            success: function (data) {
406                var response = jQuery.parseJSON(data);
407                if (response.Success == true && response.ResponseCode == 200) {
408                    if (typeof response.ManagerPanelRedirectUrl !== "undefined" && response.ManagerPanelRedirectUrl != null && response.ManagerPanelRedirectUrl !== "") {
409                        if (SHOW_CALENDAR) {
410                            //initCalendly();
411                            localStorage.setItem("email", $("#emailId").val());
412                            showThankYou();
413                            return;
414                        } else {
415                            localStorage.setItem("email", $("#emailId").val());
416                            showThankYou();
417                            return;
418                        }
419                    }
420                    showThankYou();
421                } else {
422                    var reason = response.ResponseReason;
423                    $("#headerResponse").text("Failed registration");
424                    $("#frmCreateOrganization #inValidForm").html("");
425                    $("#frmCreateOrganization #inValidForm").html("<p>Sorry for inconvenience, reason for failed: " + reason + "</p>");
426                }
427                $("#dvSpinLoaderStep2").hide();
428                $("#step2AccountText").show();
429            },
430            error: function (jqXHR, exception) {
431                var message = "";
432                if (typeof jqXHR !== "undefined" && typeof jqXHR.responseText !== "undefined") {
433                    message = jqXHR.responseText;
434                    if (typeof message !== "undefined") {
435                        $("#frmCreateOrganization #inValidForm").html("");
436                        $("#frmCreateOrganization #inValidForm").html("<div class='alert alert-danger' id='ErrorClose'>" + message + "</div>");
437                    }
438                }
439                $("#dvSpinLoaderStep2").hide();
440                $("#step2AccountText").show();
441            }
442        });
443
444        e.preventDefault(); // avoid to execute the actual submit of the form.
445    });
446
447    $("#emailId").focus(function () {
448        if ($("#emailErrorMessage")) {
449            $("#emailErrorMessage").remove();
450            $("#emailId").css("border-color", "#00ca72");
451        }
452    });
453
454    $("#emailId").focusout(function () {
455        $("#emailId").css("border-color", "#e2e2e2");
456    });
457
458    $(".sub-domain").keyup(function () {
459        $(this).val($(this).val().replace(/[^a-zA-Z0-9-]+/ig, ''));
460        var s = $(this).val();
461        if (s.length > 25)
462            $(this).val(s.substring(0, 25))
463        checkDomain(true, false);
464    });
465
466    $("#businessName").keyup(function () {
467        $("#businessName").css({ "border": "1px solid #e2e2e2" });
468        $("#businessNameError").text("");
469        $("#businessNameError").hide();
470        if ($(this).val().startsWith(" ") || $(this).val().startsWith("#") || $(this).val().startsWith("&") || $(this).val().startsWith("-") || $(this).val().startsWith("+")) {
471            $("#businessName").css({ "border": "1px solid #f75a5e" });
472            $("#businessNameError").text("Please provide your organization name.");
473            $("#businessNameError").css("margin-top", "5px").show();
474            return;
475        }
476        if ($(".sub-domain").val().length > 25) {
477            $(".sub-domain").val($(".sub-domain").val().substring(0, 25));
478        }
479        if ($("#subDomainName").text().length > 25) {
480            $("#subDomainName").text($("#subDomainName").text().substring(0, 25));
481        }
482        setParentDomain();
483        checkDomain(true, true);
484        if (!$(".edit-dname").is(":visible") && !$("#subDomainSection").is(":visible")) {
485            $("#domainSection").show();
486        }
487    });
488
489    $('.form-field').keyup(function () {
490        var s = $(this).val();
491        if (s.length > 30)
492            $(this).val(s.substring(0, 30))
493    });
494
495    $('.email-form-field').keyup(function () {
496        var s = $(this).val();
497        if (s.length > 50)
498            $(this).val(s.substring(0, 50))
499    });
500
501    $('.name-field').keyup(function () {
502        var s = $(this).val();
503        if (s.length > 20)
504            $(this).val(s.substring(0, 20))
505    });
506
507     function checkDomain(isAsync, isBusinessNameKeyUp) {
508        $("#subDomain").removeClass('error');
509        $(".sub-domain").css({ "border": "1px solid #e2e2e2" });
510        $("#subDomainMsg").text("");
511        $("#subDomainMsg").hide();
512        var checkAlphabets = new RegExp("^[a-zA-Z0-9-]*$");
513        var value = $("#subDomain").val();
514        if (isBusinessNameKeyUp) {
515            value = $("#businessName").val();
516        }
517        if (!isBusinessNameKeyUp) {
518            if (typeof value === "undefined" || value.length === 0) {
519                $("#isAlreadyThere").val("true");
520                $("#isAlreadyRegistered").val("false");
521                $("#subDomainMsg").text("Website name is required.");
522                $(".sub-domain").css({ "border": "1px solid #f75a5e" });
523                $("#subDomainMsg").css("margin-top", "5px").show();
524                return;
525            } else if (value.length < 3 || value.length > 25) {
526                $("#isAlreadyThere").val("true");
527                $("#isAlreadyRegistered").val("false");
528                $("#subDomainMsg").text("Website name range must be between 3 to 25.");
529                $(".sub-domain").css({ "border": "1px solid #f75a5e" });
530                $("#subDomainMsg").css("margin-top", "5px").show();
531                return;
532            } else if (value[0].toLowerCase() === value[0].toUpperCase() || !value.match(checkAlphabets) ||
533                value[value.length - 1] === "-") {
534                $("#isAlreadyThere").val("true");
535                $("#isAlreadyRegistered").val("false");
536                $("#subDomainMsg").text("Your website name should have alphabets, numeric and hyphen (-) and must start with alphabets and not end with hyphen (-).");
537                $(".sub-domain").css({ "border": "1px solid #f75a5e" });
538                $("#subDomainMsg").css("margin-top", "5px").show();
539                return;
540            } else {
541                $("#isAlreadyThere").val("false");
542                $("#isAlreadyRegistered").val("false");
543                $("#subDomainMsg").text("");
544                $("#subDomainMsg").hide();
545            }
546        }
547
548        var url = checkEventPageUrlApiUrl.replace("{0}", value);
549        url = url.replace("{1}", parentDomain);
550        $.ajax({
551            type: "GET",
552            url: url,
553            async: typeof isAsync === "undefined" ? true : isAsync,
554            success: function (data) {
555                if (data.isDomainAvailable == false) {
556                    if (!$(".edit-dname").is(":visible") && !isBusinessNameKeyUp) {
557                        $("#isAlreadyThere").val("false");
558                        $("#isAlreadyRegistered").val("true");
559                        $("#subDomainMsg").text("This website name is already registered or not valid.");
560                        $("#subDomainMsg").css("margin-top", "5px").show();
561                        $(".sub-domain").css({ "border": "1px solid #f75a5e" });
562                    }
563                }
564                else {
565                    $("#isAlreadyThere").val("false");
566                    $("#isAlreadyRegistered").val("false");
567                    $(".sub-domain").css({ "border": "1px solid #e2e2e2" });
568                    $("#subDomain").removeClass('error');
569                    $("#subDomainMsg").hide();
570                }
571                if ($(".edit-dname").is(":visible")) {
572                    $("#subDomainName").html(data.recommendedDomain);
573                    $("#subDomain").val(data.recommendedDomain);
574                    if ($(".sub-domain").val().length > 25) {
575                        $(".sub-domain").val($(".sub-domain").val().substring(0, 25));
576                    }
577                    if ($("#subDomainName").text().length > 25) {
578                        $("#subDomainName").text($("#subDomainName").text().substring(0, 25));
579                    }
580                } else if (isBusinessNameKeyUp && !$(".edit-dname").is(":visible")){
581                    $("#subDomain").val(data.recommendedDomain);
582                    if ($(".sub-domain").val().length > 25) {
583                        $(".sub-domain").val($(".sub-domain").val().substring(0, 25));
584                    }
585                }
586            }
587        });
588    }
589
590    function slugify(str) {
591        var map = {
592            '-': '¡|¿',
593            'a': 'á|à|ã|â|ä|À|Á|Ã|Â|Ä',
594            'e': 'é|è|ê|ë|É|È|Ê|Ë',
595            'i': 'í|ì|î|ï|Í|Ì|Î|Ï',
596            'o': 'ó|ò|ô|õ|ö|Ó|Ò|Ô|Õ|Ö',
597            'u': 'ú|ù|û|ü|Ú|Ù|Û|Ü',
598            'c': 'ç|Ç',
599            'n': 'ñ|Ñ'
600        };
601
602        for (var pattern in map) {
603            str = str.replace(new RegExp(map[pattern], 'g'), pattern);
604        };
605
606        return str;
607    };
608
609    $('#country').change(function () {
610        setParentDomain();
611    })
612
613    function bindhdnData() {
614        var hdnFields = {
615            utm_source: $("#utm_source").val(),
616            utm_medium: $("#utm_medium").val(),
617            utm_campaign: $("#utm_campaign").val(),
618            utm_content: $("#utm_content").val(),
619            a: $("#a").val(),
620            gclid: $("#gclid").val(),
621            utm_term: $("#utm_term").val(),
622            utm_id: $("#utm_id").val(),
623            fbclid: $("#fbclid").val()
624        };
625        return hdnFields;
626    }
627
628    var restrictedCountry = ["ID", "RU", "CN", "KP", "NG", "KE", "BD"];
629    function ipLookUp() {
630        $.get("https://api.ipdata.co/?api-key=db08914aa3ee4afdb3d163644a5ad171b21efe42bf30f5c421ea533b", function (response) {
631            var deserializeJson = $.parseJSON(JSON.stringify(response, null, 4));
632            if (restrictedCountry.includes(deserializeJson.country_code)) {
633                $("#dvThankYou").hide();
634                $("#dvAlreadyAccount").hide();
635                $("#dvNewOrgAccount").hide();
636                $("#countryNotSupported1").html("");
637                $("#countryNotSupported2").html("");
638                $("#countryNotSupported3").html("");
639                $("#countryNotSupported1").html(deserializeJson.country_name);
640                $("#countryNotSupported2").html(deserializeJson.country_name);
641                $("#countryNotSupported3").html(deserializeJson.country_name);
642                $("#dvCountryNotAvailable").show();
643            } else {
644                $("#signUpUserIpInfo").val(JSON.stringify(response, null, 4));
645                $("#country").each(function () {
646                    var $this = $(this);
647                    $this.val(deserializeJson.country_code)
648                });
649                if (typeof deserializeJson !== "undefined" && typeof deserializeJson.time_zone !== "undefined" && typeof deserializeJson.time_zone.name !== "undefined") {
650                    $('#ddltimezone').val(deserializeJson.time_zone.name);
651                    $('#ddltimezone').trigger('change');
652                }
653                if (typeof deserializeJson !== "undefined" && typeof deserializeJson.region !== "undefined") {
654                    state = deserializeJson.region;
655                }
656                setParentDomain();
657            }
658        }, "jsonp");
659    }
660
661    function setParentDomain() {
662        if (signupFirstStep.includes('stg') || signupFirstStep.includes('prod')) {
663            parentDomain = "simpletix.com";
664        } else {
665            parentDomain = "simpletix.us";
666        }
667        if (parentDomain === "simpletix.com" && typeof ctrAbr[$("#country").val()] !== "undefined" && ctrAbr[$("#country").val()].length > 0) {
668            parentDomain = "simpletix." + ctrAbr[$("#country").val()];
669            $(".parentDomain").html(parentDomain);
670            $("#parentDomainName").html(parentDomain);
671        } else {
672            $(".parentDomain").html(parentDomain);
673            $("#parentDomainName").html(parentDomain);
674        }
675    }
676
677    landingPrices();
678    if (window.location.href.includes('sign-up')) {
679        $('#createAccountModal').hide();
680        ipLookUp();
681    } else if (window.location.href.includes('step2.php')) {
682        ipLookUp();
683    }
684
685    function widget_popup_func(){
686        var email = $('#email_id').val();
687        var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
688        $('#email-error-massage').remove();
689        $('#email_id').removeClass('error');
690        if(regex.test(email)){
691          $('#emailId').val($('#email_id').val());
692          ipLookUp();
693          $("#btnSignInContinue").removeAttr("disabled");
694          $("#frmSignUp")[0].reset();
695          $("#frmSignUp").data('validator').resetForm();
696          $("#frmSignUp").find('.error').removeClass("error");
697          $("#subDomainMsg").text("");
698          $("#dvSpinLoader").hide();
699          $("#dvSpinLoaderStep2").hide();
700          $("#step2AccountText").show();
701          $("#domainSection").hide();
702          $(".toggle-password").removeClass("la-eye");
703          $(".toggle-password").addClass("la-eye-slash");
704          $("#password").attr("type", "password");
705          $("#emailId").css("border-color", "#e2e2e2");
706          $('#createaccount').modal('show');
707        }else{    
708          $('#email_id').addClass('error');
709          var massage = '';
710          if(email !== ''){
711            massage = 'Email is required.'
712          }else{
713            massage = 'Email Address must be valid.';
714          }
715          $('<label id="email-error-massage" class="error">'+massage+'</label>').insertAfter('#email_id');
716        }
717      }
718      $('#createaccount_click').on('click', function(e){
719        e.preventDefault();
720        widget_popup_func();
721      });
722      
723      $('#get_started_now').on('submit', function(e){
724        e.preventDefault();
725        widget_popup_func();
726      });
727      
728});
729
730
731function landingPrices() {
732    if (window.location.href.includes('landing.php')) {
733        var isQueryParmas = false;
734        let searchParams = new URLSearchParams(window.location.search)
735        landingPagesData.forEach(function (item) {
736            if (searchParams.has(item.code) || searchParams.has((item.code).toLowerCase())) {
737                isQueryParmas = true;
738                document.cookie = "landing = " + item.code;
739                $('.landing-title').each(function () {
740                    var $this = $(this);
741                    $this.text("");
742                    $this.text(item.title);
743                });
744                $('.landing-rate').text("");
745                $('.landing-rate').text(item.rate * 100);
746
747                $('.landing-extra-fee').text("");
748                $('.landing-extra-fee').text(item.extraFeePerOrder);
749                centPrice = item.rate;
750                serviceFee = item.extraFeePerOrder / 100;
751
752                if (item.extraFeePerOrder == 0) {
753                    $('.hidden-zero-rate').hide();
754                }
755            }
756        });
757
758        if (!isQueryParmas) {
759            var cookies = document.cookie.split(";");
760            if (cookies && cookies.length > 0) {
761                for (let i = 0; i < cookies.length; i++) {
762                    if (cookies[i].includes('landing')) {
763                        var landingCookie = cookies[i].split("=");
764                        var landingItem = landingPagesData.filter(f => f.code == landingCookie[1].trim());
765                        if (landingItem && landingItem.length == 1 && landingItem[0].title && landingItem[0].pricePgImage) {
766
767                            $('.landing-title').each(function () {
768                                var $this = $(this);
769                                $this.text("");
770                                $this.text(landingItem[0].title);
771                            });
772                            $('.landing-rate').text("");
773                            $('.landing-rate').text(landingItem[0].rate * 100);
774            
775                            $('.landing-extra-fee').text("");
776                            $('.landing-extra-fee').text(landingItem[0].extraFeePerOrder);
777                            centPrice = landingItem[0].rate;
778                            serviceFee = landingItem[0].extraFeePerOrder / 100;
779            
780                            if (landingItem[0].extraFeePerOrder == 0) {
781                                $('.hidden-zero-rate').hide();
782                            }
783                        }
784                    }
785                }
786            }
787        }
788    }
789
790    if (window.location.href.includes('pricing.php')) {
791        var cookies = document.cookie.split(";");
792        if (cookies && cookies.length > 0) {
793            for (let i = 0; i < cookies.length; i++) {
794                if (cookies[i].includes('landing')) {
795                    var landingCookie = cookies[i].split("=");
796                    var landingItem = landingPagesData.filter(f => f.code == landingCookie[1].trim());
797                    if (landingItem && landingItem.length == 1 && landingItem[0].title && landingItem[0].pricePgImage) {
798
799                        landingCode = landingItem[0].code;
800                        landingTitle = landingItem[0].title;
801                        landingRate = landingItem[0].rate;
802                        landingExtraFeePerOrder = landingItem[0].extraFeePerOrder;
803                        landingPricePgImage = landingItem[0].pricePgImage;
804
805                        $('.landing-title').text("");
806                        $('.landing-title').text(landingItem[0].title);
807
808                        $('.pricing-landing-img').attr('src', landingItem[0].pricePgImage);
809                    }
810                }
811            }
812        }
813    }
814}
815
816var myModalEl = document.getElementById('createaccount')
817myModalEl.addEventListener('hidden.bs.modal', function (event) {
818    $(".domain-control").hide();
819    $(".brand-name").show();
820})
821
822
823// Create our number formatter.
824var formatter = new Intl.NumberFormat('en-US', {
825    style: 'currency',
826    currency: 'USD',
827    maximumFractionDigits: 0
828});
829
830formatter.format(2500); /* $2,500.00 */
831
832function formatCurrency(value, precisionVal) {
833    return formatter.format(value);
834}
835
836$(function () {
837    $('.range-wrapper').each(function () {
838        var $this = $(this);
839        var $target = $this.find('input');
840
841        var $company1 = $('#eventbrite');
842        var $company2 = $('#ticketleap');
843        var $company3 = $('#brownpapertickets');
844
845        var $attendeesperevent = $('#attendeesperevent');
846        var $eventsperyear = $('#eventsperyear');
847        var $averageprice = $('#averageprice');
848
849        var $minSave = $('.result-min');
850        var $maxSave = $('.result-max');
851        var totalTix = $attendeesperevent.val() * $eventsperyear.val();
852
853        var revenue = totalTix * $averageprice.val();
854        var company1Val;
855        var company2Val;
856        var company3Val;
857        var company4Val;
858
859        var ticketPrice = $averageprice.val();
860
861        function updatePrices(sliderVal) {
862            var maxCap = 9.99;
863            var totalFee = (centPrice + (serviceFee * ticketPrice));
864            if (ticketPrice <= 5) {
865                totalFee = 0.25;
866            }
867            if (totalFee > maxCap) {
868                totalFee = maxCap;
869            }
870
871            company1Val = parseInt(totalTix * 1.59 + revenue * 0.035);
872            company2Val = parseInt(totalTix + revenue * 0.03);
873            company3Val = parseInt(totalTix * 0.99 + revenue * 0.05);
874            company4Val = parseFloat(totalTix * totalFee);
875
876            var company1Save = company1Val - company4Val;
877            var company2Save = company2Val - company4Val;
878            var company3Save = company3Val - company4Val;
879
880            $company1.text(formatCurrency(company1Save, 0));
881            $company2.text(formatCurrency(company2Save, 0));
882            $company3.text(formatCurrency(company3Save, 0));
883
884            $minSave.text(formatCurrency(Math.min(company1Save, company2Save, company3Save), 0));
885            $maxSave.text(formatCurrency(Math.max(company1Save, company2Save, company3Save), 0));
886        }
887
888        updatePrices();
889
890        $target.on('change', function () {
891            eventsPerYear = $('#eventsperyear').val();
892            totalTix = $('#attendeesperevent').val() * $('#eventsperyear').val();
893            revenue = totalTix * $('#averageprice').val();
894            ticketPrice = $('#averageprice').val();
895            updatePrices($target.val());
896        });
897    });
898
899    $(".tooltip-range-wrapper .ui-slider-handle").append("<span class='currency-symbol'>$</span>");
900});
901
902//for pricing page
903function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
904function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
905function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
906
907var Calculator = function () {
908    function Calculator() {
909        _classCallCheck(this, Calculator);
910
911        this.currentCurrency = 'usd';
912        this.priceElements = $('.js-price');
913        this.priceCardElements = $('.js-price-card');
914        this.priceReceiveElements = $('.js-price-receive');
915        this.pricePayElements = $('.js-price-pay');
916        this.flatRateEl = $('.js-flat-rate');
917        this.flatFeesCheckbox = $('.js-fees');
918    }
919
920    _createClass(Calculator, [{
921        key: "switchCurrency",
922        value: function switchCurrency(currency) {
923            this.currentCurrency = currency;
924            this.updatePricing();
925        }
926    },
927    {
928        key: 'formatCurrency',
929        value: function formatCurrency(value, currency) {
930            if (currency !== "kr") {
931                return currency + value;
932            }
933            else if (currency == '$' && value < 1) {
934                return (value * 100) + '¢';
935            }
936            return value + currency;
937        }
938    },
939    {
940        key: "updatePricing",
941        value: function updatePricing() {
942            var _this = this;
943
944            var fees = [
945                { "currency": "usd", "symbol": "$", "flatFee": 0.79, "percentFee": 0.02, "cappedFee": 9.99 },
946                { "currency": "aud", "symbol": "$", "flatFee": 0.99, "percentFee": 0.02, "cappedFee": 9.99 },
947                { "currency": "gbp", "symbol": "£", "flatFee": 0.79, "percentFee": 0.02, "cappedFee": 9.99 },
948                { "currency": "cad", "symbol": "$", "flatFee": 0.99, "percentFee": 0.02, "cappedFee": 9.99 },
949                { "currency": "eur", "symbol": "€", "flatFee": 0.79, "percentFee": 0.02, "cappedFee": 9.99 },
950                { "currency": "nok", "symbol": "kr", "flatFee": 20, "percentFee": 0.02, "cappedFee": 99 },
951            ];
952
953            var selectedCurrency = fees.filter(obj => { return obj.currency === _this.currentCurrency })[0];
954
955            if ($(".currency-symbol")) {
956                $(".currency-symbol").html(selectedCurrency.symbol);
957            } else {
958                $(".tooltip-range-wrapper .ui-slider-handle").append("<span class='currency-symbol'>" + selectedCurrency.symbol + " </span>");
959            }
960            var ticketPrice = Number($(".range-slider").val());
961            var totalFee = selectedCurrency.flatFee + (ticketPrice * selectedCurrency.percentFee);
962
963            if (totalFee > selectedCurrency.cappedFee) {
964                totalFee = selectedCurrency.cappedFee;
965            }
966
967            $(".capped-price").text(_this.formatCurrency(selectedCurrency.cappedFee, selectedCurrency.symbol));
968
969            if (landingCode) {
970                if (_this.currentCurrency == 'usd') {
971                    $('.landing-rate').text('');
972                    $('.landing-rate').text(landingRate * 100 + '¢');
973
974                    $('.landing-flat-rate').text('');
975                    $('.landing-flat-rate').text('$' + landingRate);
976                } else if (_this.currentCurrency == 'nok') {
977                    $('.landing-rate').text('');
978                    $('.landing-rate').text(landingRate * 100 + 'kr');
979
980                    $('.landing-flat-rate').text('');
981                    $('.landing-flat-rate').text(landingRate + 'kr');
982                } else {
983                    $('.landing-rate').text('');
984                    $('.landing-rate').text(selectedCurrency.symbol + landingRate);
985
986                    $('.landing-flat-rate').text('');
987                    $('.landing-flat-rate').text(selectedCurrency.symbol + landingRate);
988                }
989                $('.landing-extra-fee').text('');
990                $('.landing-extra-fee').text(landingExtraFeePerOrder);
991
992                if (landingExtraFeePerOrder == 0) {
993                    $('.hidden-zero-rate').hide();
994                }
995            } else {
996                this.priceElements.each(function (index, el) {
997                    var $el = $(el);
998                    var newPrice = $el.data(_this.currentCurrency);
999                    $el.text(newPrice);
1000                });
1001            }
1002
1003            $(".js-fee").text(_this.formatCurrency(totalFee.toFixed(2), selectedCurrency.symbol));
1004
1005            var isFeesOn = this.flatFeesCheckbox.prop('checked');
1006            var cardPrice = Number((ticketPrice + totalFee) * 0.029 + .30);
1007            var payPrice = (ticketPrice + totalFee + cardPrice).toFixed(2);
1008            var receivePrice = ticketPrice;
1009
1010            if (!isFeesOn) {
1011                payPrice = ticketPrice;
1012                receivePrice = (ticketPrice - cardPrice - totalFee).toFixed(2);
1013            }
1014
1015            if (this.currentCurrency != 'nok') {
1016                updateCurrencySymbol(true, selectedCurrency.symbol);
1017                this.priceCardElements.text(this.priceCardElements.data(this.currentCurrency) + cardPrice.toFixed(2));
1018                this.priceReceiveElements.text(this.priceReceiveElements.data(this.currentCurrency) + receivePrice);
1019                this.pricePayElements.text(this.pricePayElements.data(this.currentCurrency) + payPrice);
1020            } else {
1021                updateCurrencySymbol(false, selectedCurrency.symbol);
1022                this.priceCardElements.text(cardPrice.toFixed(2) + this.priceCardElements.data(this.currentCurrency));
1023                this.priceReceiveElements.text(receivePrice + this.priceReceiveElements.data(this.currentCurrency));
1024                this.pricePayElements.text(payPrice + this.pricePayElements.data(this.currentCurrency));
1025            }
1026
1027            if (selectedCurrency.currency == 'aud' || selectedCurrency.currency == 'cad') {
1028                $(".currency-notice").removeClass("hide");
1029                $(".currency-notice").text("*Fees listed in " + selectedCurrency.currency.toUpperCase())
1030            } else {
1031                $(".currency-notice").addClass("hide");
1032            }
1033        }
1034    }]);
1035
1036    return Calculator;
1037}();
1038
1039function updateCurrencySymbol(appendFirst = false, currencySymbol = '$') {
1040    if (appendFirst) {
1041        if ($(".currency-symbol")) {
1042            $(".ui-slider-handle").removeClass('ui-slider-title');
1043            $(".currency-symbol").removeClass('shift-right');
1044            $(".currency-symbol").html(currencySymbol);
1045        } else {
1046            $(".tooltip-range-wrapper .ui-slider-handle").append("<span class='currency-symbol'>" + currencySymbol + " </span>");
1047        }
1048    } else {
1049        if ($(".currency-symbol")) {
1050            $(".ui-slider-handle").addClass('ui-slider-title');
1051            $(".currency-symbol").addClass('shift-right');
1052            $(".currency-symbol").html(currencySymbol);
1053        } else {
1054            $(".tooltip-range-wrapper .ui-slider-handle").append("<span class='currency-symbol shift-right'>" + currencySymbol + " </span>");
1055        }
1056    }
1057}
1058
1059var $currencyContainer = $('.list-currency');
1060var $currency = $currencyContainer.find('.currency');
1061var calculator = new Calculator();
1062$currency.on('click', function (event) {
1063    var $this = $(this);
1064    var currency = $(this).data('currency');
1065    var currencyClass = 'currency-' + currency;
1066    calculator.switchCurrency($this.data('currency'));
1067    $('.range-slider-calculator').removeClass().addClass('range-slider-calculator ' + currencyClass);
1068});
1069$('.js-fees').on('change', function () {
1070    calculator.updatePricing();
1071});
1072
1073$(function () {
1074    $('.range-wrapper').each(function () {
1075        var $this = $(this);
1076        var $target = $this.find('input');
1077        $target.on('change', function () {
1078            calculator.updatePricing();
1079        });
1080    });
1081});
1082
1083function showThankYou() {
1084    $("#dvCountryNotAvailable").hide();
1085    $("#dvAlreadyAccount").hide();
1086    $("#dvNewOrgAccount").hide();
1087    $("#dvThankYou").show();
1088}
1089
1090function setStartUpPage() {
1091    if (typeof getUrlParameter("ExistingAccount") && getUrlParameter("ExistingAccount") !== null && getUrlParameter("ExistingAccount") === "1"
1092        && typeof getUrlParameter("UserId") !== "undefined" && getUrlParameter("UserId") !== null) {
1093        existingAccount = true;
1094        existingUserId = decodeURIComponent(getUrlParameter("UserId"));
1095        $("#dvCountryNotAvailable").hide();
1096        $("#dvThankYou").hide();
1097        $("#dvAlreadyAccount").hide();
1098        $("#dvNewOrgAccount").show();
1099    }
1100}
1101
1102$(".toggle-password").click(function() {
1103    $(this).toggleClass("la-eye la-eye-slash");
1104    var input = $($(this).attr("toggle"));
1105    if (input.attr("type") == "password") {
1106      input.attr("type", "text");
1107    } else {
1108      input.attr("type", "password");
1109    }
1110});
1111// Calendly needs to be removed
1112/*
1113function initCalendly() {
1114    Calendly.initInlineWidget({
1115        url: "https://calendly.com/simpletix/on-boarding?hide_event_type_details=1",
1116        parentElement: document.getElementById("dvCalendlyEmbed"),
1117        prefill: {
1118            name: $("#txtFirstName").val() + " " + $("#txtLastName").val(),
1119            email: $("#emailId").val(),
1120            customAnswers: {
1121                a1: fullDomain
1122            }
1123        },
1124        utm: {
1125            utmCampaign: $("#utm_campaign").val(),
1126            utmSource: $("#utm_source").val(),
1127            utmMedium: $("#utm_medium").val(),
1128            utmContent: $("#utm_content").val(),
1129            utmTerm: $("#utm_term").val()
1130        }
1131    });
1132
1133    window.addEventListener(
1134        'message',
1135        function (e) {
1136            if (isCalendlyEvent(e)) {
1137                if (e.data.event === "calendly.event_scheduled") {
1138                    showThankYou();
1139                }
1140            }
1141        }
1142    );
1143}
1144
1145function isCalendlyEvent(e) {
1146    return e.data.event &&
1147        e.data.event.indexOf('calendly') === 0;
1148};
1149*/
1150
1151$(document).ready(function () {
1152    if (window.location.href.includes('thankyou.php')) {
1153        $("#userEmailId").text(localStorage.getItem("email"));
1154        setTimeout(function () {
1155            localStorage.removeItem("email");
1156            $("#loader").hide();
1157            $("#dvAccountConfirm").css("display", "block");
1158        }, 3000);
1159    }
1160    if (calculator) {
1161        calculator.updatePricing();
1162    }
1163});
1164
1165$("#btnSkip").click(function () {
1166    window.location.href = '/sign-up/thankyou.php';
1167});
1168
1169$("#btnSignIn").click(function () {
1170    window.location.href = managerPanelUrl + "?suggest=CreateNewSite";
1171});
1172
1173$("#btnSignInDone").click(function () {
1174    window.location.href = managerPanelUrl;
1175});
1176function category_search_clear_filter(){
1177    $('#category-search-input').on('click', function(){
1178        $('#category-search-input').on('search', function(){
1179            if(!this.value){
1180                $('#default-categories').show();
1181                $('#search-categories').html('');
1182            }
1183        });
1184        setTimeout(function() {
1185            $('#category-search-input').off('search');
1186        }, 1);
1187    });
1188}
1189
1190
1191jQuery(document).ready(function($) {
1192    $('#category-search-form').on('submit', function(e) {
1193        e.preventDefault();
1194        var searchTerm = $('#category-search-input').val();
1195        if(searchTerm.length >= 3 ){
1196            
1197            $.ajax({
1198                url: ajax_object.ajaxurl, // 'ajaxurl' is a global variable in WordPress for AJAX endpoint
1199                type: 'POST',
1200                data: {
1201                    action: 'category_search',
1202                    search_term: searchTerm
1203                },
1204                success: function(response) {
1205                    if (response.success) {
1206                        category_search_clear_filter();
1207                        // $('#category-search-input').val('');
1208                        $('#search-categories').html('');
1209                        $.each(response.data, function(index, category) {
1210                            $('#search-categories').append('<li><a href="' + category.url + '">' + category.name + '</a></li>');
1211                        });
1212                    } else {
1213                        $('#search-categories').html('<p>' + response.data + '</p>');
1214                    }
1215                    $('#default-categories').hide();
1216                    $('#search-categories').show();
1217
1218                }
1219            });
1220        }
1221    });
1222});
1223
1224
1225
1226
1227$(document).ready(function() {
1228    // Get the current URL path and query string
1229    var currentUrl = window.location.pathname + window.location.search;
1230
1231    if(currentUrl.includes('SiteNotFound')){
1232
1233        // Remove trailing slash if it exists
1234        if (currentUrl.endsWith('/')) {
1235            currentUrl = currentUrl.slice(0, -1);
1236        }
1237        
1238        // Define the redirect mapping
1239        var redirects = {
1240            '/SiteNotFound.php?http://coachkclinic.simpletix.com': 'http://vaultermagazine.simpletix.com/',
1241            '/SiteNotFound/?https://bronnerbros.simpletix.com': 'https://bbshow.simpletix.com/Event-List/',
1242            '/SiteNotFound/?http://blog.simpletix.com': 'https://www.simpletix.com/blog/',
1243            '/SiteNotFound/?https://signup.simpletix.com': 'https://www.simpletix.com/sign-up/',
1244            '/SiteNotFound': 'https://bbshow.simpletix.com'
1245        };
1246        
1247        // Redirect if the current URL matches any pattern
1248        if (redirects.hasOwnProperty(currentUrl)) {
1249            window.location.href = redirects[currentUrl];
1250        }
1251    }
1252});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.