PageSourceSearch

https://www.refugelobadanaki.ca/js/dist/form.bundle.js

js refugelobadanaki.ca collected 2026-09-30 03:25:03 UTC 9,878 bytes, 1 lines download raw bytes

1!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(()=>(()=>{"use strict";var e=!1;function t(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,a=function(){};return{s:a,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){s=!0,i=e},f:function(){try{l||null==r.return||r.return()}finally{if(s)throw i}}}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var r=function(e){return/<[^<]+>/.test(e)},o=!1;return new Promise((function(t){e?t(e):fetch("/_bentobox.form.getTokens",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({siteId:BentoBox.siteSettings.siteId})}).then((function(e){return 200==e.status?e.json():e.json().then((function(e){alert(e.message)}))})).then((function(n){e=n,BentoBox.loadScript("/js/editor/dist/recaptcha.bundle.js",{className:"ws-captcha",attr:{"data-google-site-key":n.recaptchaKey,"data-h-site-key":n.hcatpchaKey}}).then((function(){t(e)}))}))})).then((function(e){o=e})).then((function(){BentoBox.loadScript("/js/dist/dialog.bundle.js")})),BentoBox.loadScript("/js/editor/dist/countries.bundle.js").then((function(){document.querySelectorAll(".bb-form").forEach((function(e){var n=parseInt(e.dataset.formid||0);if(n){var a=e.querySelectorAll(".bb-form-country");a.length&&(a.forEach((function(e){e.querySelector("option").innerText="Loading..."})),function(e){if(void 0!==window.countries){var t="";for(var n in window.countries)t+='<option value="'.concat(n,'">').concat(window.countries[n].name,"</option>");e.forEach((function(e){var n=e.dataset.placeholder;e.innerHTML='<option value="">'+n+"</option>"+t,e.addEventListener("change",(function(t){var n=t.target.value,r=e.parentElement.parentElement.nextElementSibling.querySelector(".form-control");if(n.length&&r&&r.classList.contains("bb-form-state")){var o="",a=window.countries[n].regions,i=!1,l=[];for(var s in a){var c=a[s];l.push(c)}l.sort();for(var d=0,u=l;d<u.length;d++){var f=u[d];o+='<option value="'.concat(f,'">').concat(f,"</option>"),i=!0}var p=r.dataset.placeholder;r.innerHTML='<option value="">'+p+"</option>"+o;var v=r.nextElementSibling;i?(r.classList.remove("hidden"),r.disabled=!1,v.classList.add("hidden"),v.disabled=!0,"true"==r.dataset.required&&(r.setAttribute("required","required"),v.removeAttribute("required"))):(r.classList.add("hidden"),r.disabled=!0,v.classList.remove("hidden"),v.disabled=!1,"true"==r.dataset.required&&(r.removeAttribute("required"),v.setAttribute("required","required")))}}))}))}}(a)),e.querySelectorAll("input,textarea").forEach((function(e){e.addEventListener("blur",(function(){e.setAttribute("aria-invalid",!e.validity.valid)})),e.addEventListener("input",(function(){"TEXTAREA"==e.tagName&&(e.style.height="",e.style.height=Math.min(e.scrollHeight,300)+"px"),e.parentNode.querySelectorAll(".invalid-tooltip").forEach((function(e){return e.remove()}))}))})),e.addEventListener("submit",(function(a){a.preventDefault(),e.querySelectorAll(".invalid-tooltip").forEach((function(e){return e.remove()}));var i=document.querySelector("#bb-form-"+n);i=i?JSON.parse(i.textContent):{};var l=[],s=!1,c=[];if(e.querySelectorAll("input:not(.bb-form-checkbox,.bb-form-radio,[disabled]),textarea").forEach((function(e){var t,n=String(e.value).trim(),o=e.dataset.type;if("hp"==o&&n&&(s=!0),!s){var a=e.dataset.rule,i=!1,d=e;if(a)try{!new RegExp(e.dataset.rule).test(a)||(i="Invalid input format")}catch(e){i="Failed regular expression validation."}if(o)if(n)if("message"==o||"textarea"==o)r(n)&&(i="Please enter valid text content");else if("email"==o)((t=n).includes("!#$%^&*£")||!/^(([^<>()\[\]\\.,;:\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,}
1))$/.test(String(t).toLowerCase()))&&(i="Please enter a valid email");else if("phone"==o)/^[+]*[(]{0,1}[0-9]{1,3}[)]{0,1}[-\s\./0-9]*$/g.test(String(n).toLowerCase())||(i="Please enter a valid phone");else if("phoneNum"==o){var u=window.intlTelInputGlobals.getInstance(e);u&&(n=u.getNumber())}else(r(n)||/select |update |delete |insert |procedure |drop /i.test(n))&&(i="Please enter a valid input");else e.required&&(i="Required Field");i?l.push({target:d,message:i}):c.push({data:{fieldId:parseInt(e.dataset.id),value:n}})}})),e.querySelectorAll(".bb-form-country").forEach((function(e){var t=e.required,n=!1,r=e.value;t&&!r.length&&(n="Please select a country/region"),n?l.push({target:e,message:n}):c.push({data:{fieldId:parseInt(e.dataset.id),value:r}})})),e.querySelectorAll(".bb-form-state:not([disabled])").forEach((function(e){var t=e.required,n=!1,r=e.value;t&&!r.length&&(n="Please select a province/state"),n?l.push({target:e,message:n}):c.push({data:{fieldId:parseInt(e.dataset.id),value:r}})})),e.querySelectorAll(".bb-form-dropdown").forEach((function(e){var t=e.required,n=!1,r=e.value;t&&!r.length&&(n="Please select an option"),n?l.push({target:e,message:n}):c.push({data:{fieldId:parseInt(e.dataset.id),value:r}})})),e.querySelectorAll(".bb-form-checkboxes").forEach((function(e){var n,r=JSON.parse(e.dataset.required),o=!1,a=[],i=t(e.querySelectorAll(".bb-form-checkbox"));try{for(i.s();!(n=i.n()).done;){var s=n.value;s.checked&&a.push(s)}}catch(e){i.e(e)}finally{i.f()}var d=a.length>0;if(r&&!d&&(o="Please check one or more options"),o)l.push({target:e.previousElementSibling,message:o});else if(d){var u,f={fieldId:parseInt(a[0].dataset.id)},p=t(a);try{for(p.s();!(u=p.n()).done;){var v=u.value;f.value?f.value+="|"+v.value:f.value=v.value}}catch(e){p.e(e)}finally{p.f()}c.push({data:f})}})),e.querySelectorAll(".bb-form-radios").forEach((function(e){var n,r=JSON.parse(e.dataset.required),o=!1,a=null,i=t(e.querySelectorAll(".bb-form-radio"));try{for(i.s();!(n=i.n()).done;){var s=n.value;if(s.checked){a=s;break}}}catch(e){i.e(e)}finally{i.f()}var d=null!=a;r&&!d&&(o="Please check one of the options"),o?l.push({target:e.previousElementSibling,message:o}):d&&c.push({data:{fieldId:parseInt(a.dataset.id),value:a.value}})})),!s){if(l.length)return void function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"form_validation_error";e.length&&(e.forEach((function(e){if(e.target.parentElement.querySelectorAll(".invalid-tooltip").forEach((function(e){return e.remove()})),e.target.setAttribute("aria-invalid","true"),e.message){var n=document.createElement("div");n.className="invalid-tooltip font-weight-bold",n.style.color="red",n.style.fontSize="0.8em",n.innerHTML=e.message,e.target.parentNode.insertBefore(n,e.target.nextSibling),"undefined"!=typeof gtag&&BentoBox.siteSettings.hasGALinks&&gtag("event",t,{event_category:"form",event_label:e.message,value:location.origin+location.pathname,send_to:"builder"})}})),e[0].target.focus())}(l);if(c.length)if(o&&BentoBox.Dialog){var d=!1,u=function(t){var r=o.formHost,a=BentoBox.Dialog({loading:"Submitting Form..."}),i=function(e,t){a.querySelector(".bb-dialog-loading").setAttribute("data-message",""),a.querySelector(".bb-dialog-title").innerHTML=e,a.querySelector(".bb-dialog-body").innerHTML="<div>"+t+"</div>"};fetch("https://"+r+"/_bentobox.form",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json; charset=utf-8"},body:JSON.stringify({formId:n,siteId:BentoBox.siteSettings.siteId,cfid:o.cfid,cftoken:o.cftoken,fields:c,captcha:t,isFromComingSoon:e.dataset.comingsoon?1:0,formData:{location:location.origin+location.pathname,name:e.getAttribute("aria-label")},HTTP_HOST:o.HTTP_HOST})}).then((function(e){if(!e.ok)throw d=e,new Error(e);return e.json()})).then((function(t){if("undefined"!=typeof gtag&&BentoBox.siteSettings.hasGALinks&&gtag("event","form_submission",{event_category:"form",event_label:e.getAttribute("aria-label"),value:location.origin+location.pathname}),e.reset(),t.section){var n=e.closest(".bb-section").querySelector(".form-completed");if(n){for(var r=[],o=n.parentNode.firstChild;o;)1===o.nodeType&&o!==n&&r.push(o),o=o.nextSibling;r.forEach((function(e){return e.remove()})),n.style.display="block";var l=n.querySelector(".bb-section-title"),s=n.querySelector(".bb-section-desc");l&&(l.textContent=t.section.title),s&&(s.textContent=t.section.desc)}a.remove()}else if(t.redirectURL)t.anchor&&localStorage.setItem("bb-anchor",t.anchor),window.location=t.redirectURL;
1else if(t.title&&t.message)i(t.title,t.message);else{var c=e.dataset.slug,d=new RegExp("/$").test(location.href);new RegExp("/"+c+"/?$").test(location.href)?window.location=location.href+(d?"":"/")+"form-completed/"+t.key+"/":window.location=location.href+(d?"":"/")+c+"/form-completed/"+t.key+"/"}})).catch((function(e){var t="Unable to submit form.",n="Form was not submitted. Please try again later.";d?d.json().then((function(e){e.message&&(n=e.message),i(t,n)})):(i(t,n),BentoBox.logError&&BentoBox.logError(e.message))}))};e.dataset.captcha?Recaptcha.invisible(u):u()}else alert("Connecting to Secure Webform...")}})),e.querySelector('[type="submit"]').removeAttribute("disabled")}}))})),{}})()));

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.