PageSourceSearch

https://tan-flamingo-901884.hostingersite.com/wp-content/plugins/e…/assets/scripts/main.js?ver=1.0.0

js tan-flamingo-901884.hostingersite.com collected 2026-10-03 04:56:57 UTC 11,548 bytes, 353 lines download raw bytes

1"use strict";
2
3function removeRequiredAttributes(target) {
4  jQuery(target).find("input,select,textarea").removeAttr("required");
5}
6
7function addRequiredAttributes(target) {
8  jQuery(target).find("input,select,textarea").attr("required", "true");
9}
10
11jQuery(function ($) {
12  jQuery(document).ready(function () {
13    var totalSteps = 7;
14    var currentStep = 1;
15    var nextButton = jQuery("#next-btn");
16    var previousButton = jQuery("#previous-btn");
17    var submitAppButton = jQuery("#submit-application-btn");
18    var policyLink = jQuery("#policy-link");
19    var policyCloseBnt = jQuery(".policy-container .close-btn"); //Initializing Elements
20    //Initializing form validation Plugin
21
22    jQuery("[data-parsley]").parsley();
23    initializeCustomFields();
24    nextButton.on("click", function () {
25      if (currentStep > 6) {
26        return;
27      }
28
29      var currentForm = jQuery("#step-" + currentStep); // console.log(jQuery(currentForm).parsley().validate());
30
31      if (jQuery(currentForm).parsley().validate()) {
32        currentStep++;
33        showStep(currentStep);
34        advanceProgress(Math.round(((currentStep - 1) / totalSteps) * 100));
35      }
36    });
37    previousButton.on("click", function () {
38      if (currentStep <= 1) {
39        return;
40      }
41
42      currentStep--;
43      showStep(currentStep);
44    });
45    jQuery(".step").on("submit", function (e) {
46      e.preventDefault();
47      return false;
48    });
49    submitAppButton.on("click", function () {
50      if (jQuery("#step-7").parsley().validate()) {
51        console.log("Start processing", jQuery("#step-7").parsley().validate());
52        processApplication();
53      }
54    });
55    policyLink.on("click", showPolicy);
56    policyCloseBnt.on("click", hidePolicy);
57    jQuery("#terms").on("change", function (e) {
58      displaySubmitIfValid();
59    });
60    jQuery("#SUBMIT_INITIALS").keyup(function () {
61      displaySubmitIfValid();
62    });
63    jQuery("#SUBMIT_INITIALS").on("change", function () {
64      displaySubmitIfValid();
65    });
66  });
67
68  var showStep = function showStep(stepNumber) {
69    jQuery("html,body").animate({
70      scrollTop: jQuery(".wizard").offset().top - 100,
71    });
72
73    if (stepNumber === 7) {
74      jQuery("#next-btn").addClass("hidden");
75      var result = grecaptcha.reset();
76
77      displaySubmitIfValid();
78    } else {
79      jQuery("#next-btn").removeClass("hidden");
80      jQuery("#submit-application-btn").addClass("hidden-block");
81    }
82
83    if (stepNumber > 1) {
84      jQuery("#previous-btn").removeClass("hidden-block");
85    } else {
86      jQuery("#previous-btn").addClass("hidden-block");
87    }
88
89    jQuery("#sidebar-navigation").find("li").removeClass("active");
90    jQuery("#step-" + (stepNumber - 1) + "-link").addClass("completed");
91    jQuery("#step-" + stepNumber + "-link").addClass("active"); // console.log(jQuery("#step-"+stepNumber+"-link").html());
92
93    jQuery(".step").hide(function () {
94      jQuery("#step-" + stepNumber).show();
95    });
96  };
97
98  function displaySubmitIfValid() {
99    if (finalFieldsCompleted()) {
100      jQuery("#submit-application-btn").removeClass("hidden-block");
101    } else {
102      jQuery("#submit-application-btn").addClass("hidden-block");
103    }
104  }
105
106  var finalFieldsCompleted = function finalFieldsCompleted() {
107    var termsAgreementInput = jQuery("#terms")[0].checked;
108    var intialsInput = jQuery("#SUBMIT_INITIALS").val() !== "";
109    var captchaInput = jQuery("#recaptchainput").val() !== "";
110
111    return termsAgreementInput && intialsInput && captchaInput;
112  };
113
114  var processApplication = function processApplication() {
115    var applicationValues = [];
116    var requestData = [];
117    jQuery("html,body").animate({
118      scrollTop: jQuery(".wizard").offset().top - 100,
119    });
120
121    jQuery("#esapplication-form")
122      .hide()
123      .promise()
124      .done(function () {
125        jQuery("#esapplication-status").show();
126      });
127    requestData =
128      jQuery(".step").serialize() + "&action=esapp_submit_user_esapplication"; // $.ajax({
129
130    var form = requestData;
131
132    $.post(esapplication_obj.ajax_url, form).always(function (response) {
133      console.log("This is the response", response);
134      var message = "";
135      var title = "";
136
137      if (response.status == 2 || response.status == 200) {
138        jQuery(".circle-loader")
139          .removeClass("load-error")
140          .addClass("load-complete");
141        jQuery(".checkmark").addClass("draw").toggle();
142        advanceProgress(100);
143        message =
144          "Thank you so much for applying with Exact Staff! Please contact your local Exact Staff office in order to schedule your “Interview” and to continue your registration process. Please keep the following reference number for your records: <strong style='font-size: 2em;'>" +
145          response.POST_ID +
146          "</strong>";
147        title = "Success!";
148      } else {
149        jQuery(".circle-loader")
150          .removeClass("load-complete")
151          .toggleClass("load-error");
152        jQuery(".checkmark").removeClass("draw").addClass("error");
153        message =
154          "Unable to submit application. Please contact the nearest branch.";
155        title = "Oops something went wrong!"; // jQuery("#esapplication-form").show();
156      }
157
158      jQuery("#locations-btn").show();
159      jQuery("#esapplication-status").find(".title").find("h1").text(title);
160      jQuery("#esapplication-status")
161        .find(".description")
162        .html("<p>" + message + "</p>");
163    });
164  };
165
166  var showPolicy = function showPolicy(e) {
167    e.preventDefault;
168    jQuery(".policy-element").removeClass("hidden");
169  };
170
171  var hidePolicy = function hidePolicy(e) {
172    e.preventDefault;
173    jQuery(".policy-element").addClass("hidden");
174  };
175
176  var initializeCustomFields = function initializeCustomFields() {
177    jQuery(".phone-field").mask("000-000-0000");
178    jQuery(".zip-code").mask("00000");
179    jQuery("#EM_USER_DEF1_CONCAT").mask("00/00/0000");
180  };
181
182  function objectifyForm(formArray) {
183    //serialize data function
184    var returnArray = {};
185
186    for (var i = 0; i < formArray.length; i++) {
187      returnArray[formArray[i]["name"]] = formArray[i]["value"];
188    }
189
190    return returnArray;
191  }
192
193  function showStep(stepNumber) {
194    jQuery("html,body").animate({
195      scrollTop: jQuery(".wizard").offset().top - 100,
196    });
197
198    if (stepNumber === 7) {
199      jQuery("#next-btn").addClass("hidden");
200      var result = grecaptcha.reset();
201
202      displaySubmitIfValid();
203    } else {
204      jQuery("#next-btn").removeClass("hidden");
205      jQuery("#submit-application-btn").addClass("hidden-block");
206    }
207
208    if (stepNumber > 1) {
209      jQuery("#previous-btn").removeClass("hidden-block");
210    } else {
211      jQuery("#previous-btn").addClass("hidden-block");
212    }
213
214    jQuery("#sidebar-navigation").find("li").removeClass("active");
215    jQuery("#step-" + (stepNumber - 1) + "-link").addClass("completed");
216    jQuery("#step-" + stepNumber + "-link").addClass("active"); // console.log(jQuery("#step-"+stepNumber+"-link").html());
217
218    jQuery(".step").hide(function () {
219      jQuery("#step-" + stepNumber).show();
220    });
221  }
222
223  function advanceProgress(percentage) {
224    jQuery("#application-progress").attr("value", percentage);
225  }
226
227  function displaySubmitIfValid() {
228    if (finalFieldsCompleted()) {
229      jQuery("#submit-application-btn").removeClass("hidden-block");
230    } else {
231      jQuery("#submit-application-btn").addClass("hidden-block");
232    }
233  }
234
235  function finalFieldsCompleted() {
236    var termsAgreementInput = jQuery("#terms")[0].checked;
237    var intialsInput = jQuery("#SUBMIT_INITIALS").val() !== "";
238    var captchaInput = jQuery("#recaptchainput").val() !== "";
239    console.log(termsAgreementInput, intialsInput, captchaInput);
240    return termsAgreementInput && intialsInput && captchaInput;
241  }
242
243  function processApplication() {
244    var applicationValues = [];
245    var requestData = [];
246    jQuery("html,body").animate({
247      scrollTop: jQuery(".wizard").offset().top - 100,
248    });
249
250    jQuery("#esapplication-form")
251      .hide()
252      .promise()
253      .done(function () {
254        console.log("Worked");
255        jQuery("#esapplication-status").show();
256      });
257    requestData =
258      jQuery(".step").serialize() + "&action=esapp_submit_user_esapplication";
259
260    var form = requestData;
261
262    // Add timeout and better error handling to the AJAX request
263    $.ajax({
264      url: esapplication_obj.ajax_url,
265      type: "POST",
266      data: form,
267      timeout: 30000, // 30 second timeout
268      success: function (response) {
269        console.log("This is the response", response);
270        var message = "";
271        var title = "";
272
273        if (response.status == 2 || response.status == 200) {
274          jQuery(".circle-loader")
275            .removeClass("load-error")
276            .addClass("load-complete");
277          jQuery(".checkmark").addClass("draw").toggle();
278          message =
279            "Thank you so much for applying with Exact Staff! You will be contacted within approximately 48 hours by an Exact Staff representative. If you wish to expedite this process please click the link below to locate and call a branch near you. Please keep the following reference number for your records: <strong style='font-size: 2em;'>" +
280            response.POST_ID +
281            "</strong>";
282          title = "Success!";
283        } else {
284          jQuery(".circle-loader")
285            .removeClass("load-complete")
286            .toggleClass("load-error");
287          jQuery(".checkmark").removeClass("draw").addClass("error");
288          message =
289            "Unable to submit application. Please contact the nearest branch.";
290          title = "Oops something went wrong!";
291        }
292
293        jQuery("#locations-btn").show();
294        jQuery("#esapplication-status").find(".title").find("h1").text(title);
295        jQuery("#esapplication-status")
296          .find(".description")
297          .html("<p>" + message + "</p>");
298      },
299      error: function (xhr, status, error) {
300        console.log("AJAX Error:", status, error);
301
302        jQuery(".circle-loader")
303          .removeClass("load-complete")
304          .addClass("load-error");
305        jQuery(".checkmark").removeClass("draw").addClass("error");
306
307        var message = "";
308        var title = "Connection Error";
309
310        if (status === "timeout") {
311          message =
312            "Your application is being processed. Please wait a moment and check back, or contact the nearest branch if you don't receive confirmation.";
313        } else {
314          message =
315            "Unable to submit application due to connection issues. Please try again or contact the nearest branch.";
316        }
317
318        jQuery("#locations-btn").show();
319        jQuery("#esapplication-status").find(".title").find("h1").text(title);
320        jQuery("#esapplication-status")
321          .find(".description")
322          .html("<p>" + message + "</p>");
323      },
324    });
325  }
326
327  function showPolicy(e) {
328    e.preventDefault;
329    jQuery(".policy-element").removeClass("hidden");
330  }
331
332  function hidePolicy(e) {
333    e.preventDefault;
334    jQuery(".policy-element").addClass("hidden");
335  }
336
337  function initializeCustomFields() {
338    jQuery(".phone-field").mask("000-000-0000");
339    jQuery(".zip-code").mask("00000");
340    jQuery("#EM_USER_DEF1_CONCAT").mask("00/00/0000");
341  }
342
343  function objectifyForm(formArray) {
344    //serialize data function
345    var returnArray = {};
346
347    for (var i = 0; i < formArray.length; i++) {
348      returnArray[formArray[i]["name"]] = formArray[i]["value"];
349    }
350
351    return returnArray;
352  }
353});

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.