1"use strict";var BookingFormModule=function(t){this.$form=t.$form,this.$locationCountry=t.$locationCountry,this.$locationCity=t.$locationCity,this.$locationCityOptions=t.$locationCityOptions,this.$locationCityFilteredOptions=this.$locationCityOptions,this.$locationBuilding=t.$locationBuilding,this.$locationBuildingOptions=t.$locationBuildingOptions,this.$locationBuildingFilteredOptions=this.$locationBuildingOptions,this.$locationCountryContactUs=t.$locationCountryContactUs,this.$locationCityContactUs=t.$locationCityContactUs,this.$locationCityContactUsOptions=t.$locationCityContactUsOptions,this.$locationCityContactUsFilteredOptions=this.$locationCityContactUsOptions,this.$locationBuildingContactUs=t.$locationBuildingContactUs,this.$locationBuildingContactUsOptions=t.$locationBuildingContactUsOptions,this.$locationBuildingContactUsFilteredOptions=this.$locationBuildingContactUsOptions,this._countriesCache=null,this._citiesCache=null,this._locationsCache=null,this._presetCountryId=0,this._presetCityId=0,this._presetLocationId=0,this._pageId=t.pageId||0,this._prePageId=t.prePageId||0,this._locationCode=t.locationCode||"",this._productType=t.productType||"",this._surfaceController=t.surfaceController||"GeneralEnquiryFormSurface";var e=document.getElementById("hdfLanguage");this._lang=e?e.value:document.documentElement.lang||"en-US"};function isExternalCheckoutUrl(t){if(!t)return!1;var e=t.toLowerCase();return-1!==e.indexOf("checkout.servcorp.com")||-1!==e.indexOf("checkout.coworking.servcorp.com")}function appendCurrentQueryParams(t){if(!t||isExternalCheckoutUrl(t))return t;var e=(document.documentElement.getAttribute("lang")||"en").toLowerCase(),o=new URLSearchParams(window.location.search),n=new URL(t,window.location.origin),a=o.get("locationCode"),i=o.get("productType"),r=o.get("prePageId"),l=n.pathname.split("/").filter(function(t){return t.length>0});return l.length>0&&/^[a-z]{2}(?:-[a-z]{2})?$/i.test(l[0])?l[0]=e:l.unshift(e),n.pathname="/"+l.join("/")+"/",a&&n.searchParams.set("locationCode",a),-1!==window.location.pathname.indexOf("book-a-meeting-room")||-1!==window.location.pathname.indexOf("reserver-une-salle-de-reunion")||-1!==window.location.pathname.indexOf("reserveer-een-vergaderzaal")||-1!==window.location.pathname.indexOf("bir-oda-rezerve-edin")?"ms"==document.documentElement.getAttribute("lang")?n.searchParams.set("productType","Bilik Mesyuarat"):n.searchParams.set("productType","Meeting Rooms"):i&&n.searchParams.set("productType",i),a?n.searchParams.delete("prePageId"):r&&n.searchParams.set("prePageId",r),n.pathname+n.search+n.hash}function applyContactTouchPointQueryParams(){document.querySelectorAll('[data-ctp="enquiry"]').forEach(function(t){t.href=appendCurrentQueryParams(t.href)}),document.querySelectorAll('[data-ctp="signup"]').forEach(function(t){t.href=appendCurrentQueryParams(t.href)})}function initContactTouchPoints(){if("undefined"!=typeof $&&0!==$(".form-module.book-now, .form-module.book-tour, .form-module.general-enquiry, .modal-form.contact-form").length)if(window.__contactTouchPointsInited)applyContactTouchPointQueryParams();else{window.__contactTouchPointsInited=!0;var t=new URLSearchParams(window.location.search),e=t.get("prePageId"),o=t.get("locationCode"),n=t.get("productType"),a=$(".form-module.book-now, .form-module.book-tour, .form-module.general-enquiry, .modal-form.contact-form").first(),i=parseInt(a.attr("data-page-id")||$("#contact-points").attr("data-page-id"),10)||0,r=($("#hdfCountryTheme").val()||"").trim(),l={pageId:i,prePageId:e||"",productType:n||"",lang:document.documentElement.getAttribute("lang")||"en",country:r};o&&o.indexOf("@")<0&&o.indexOf("{")<0&&(l.locationCode=o),l.isMeetingRoom=-1!==window.location.pathname.indexOf("book-a-meeting-room")||-1!==window.location.pathname.indexOf("reserver-une-salle-de-reunion")||-1!==window.location.pathname.indexOf("reserveer-een-vergaderzaal")||-1!==window.location.pathname.indexOf("bir-oda-rezerve-edin"),$.ajax({url:"/umbraco/surface/ContactUsForm/GetContactTouchPoints",type:"GET",data:l,dataType:"json",cache:!1}).done(function(t){if(t&&!t.error){for(var e=document.querySelectorAll('[data-ctp="phone"]'),o=0;o<e.length;o++)t.phoneLink&&e[o].setAttribute("href",t.phoneLink),t.phoneClass&&(e[o].className=t.phoneClass),t.phoneNumber&&i(e[o],t.phoneNumber);if(t.phoneNumber)for(var n=document.querySelectorAll(".submit-form-phone-number"),a=0;a<n.length;a++)n[a].textContent=t.phoneNumber;(t.signUpUrl||t.signUpName)&&document.querySelectorAll('[data-ctp="signup"]').forEach(function(e){if(t.signUpName&&i(e,t.signUpName),t.signUpUrl){isExternalCheckoutUrl(t.signUpUrl)?e.classList.add("signup-color"):e.classList.remove("signup-color");var o=(e.getAttribute("href")||"").trim();o&&"#"!==o&&0!==o.indexOf("javascript:")&&"modal"!==e.getAttribute("data-toggle")&&(isExternalCheckoutUrl(t.signUpUrl)?e.href=t.signUpUrl:e.href=appendCurrentQueryParams(t.signUpUrl))}}),void 0!==t.whatsApp&&document.querySelectorAll('[data-ctp="whatsapp"]').forEach(function(e){if(t.whatsApp){e.href=t.whatsApp;var o=e.closest("li")||e.closest('.col-xs-1, [class*="col-xs-"]')||e.parentElement;o&&o.style&&(o.style.display="")}else{var n=e.closest("li")||e.parentElement;n&&n.style&&(n.style.display="none")}}),void 0!==t.weComMessage&&document.querySelectorAll('[data-ctp="wecom-message"]').forEach(function(e){e.innerHTML=t.weComMessage||""}),void 0!==t.weComQrUrl&&document.querySelectorAll('[data-ctp="wecom-qr"]').forEach(function(e){t.weComQrUrl?(e.setAttribute("src",t.weComQrUrl),e.style.display=""):(e.removeAttribute("src"),e.style.display="none")})}function i(t,e){if(t){var o=t.querySelector("span, img"),n=o?o.outerHTML:"";t.innerHTML=n+(e||"")}}}),applyContactTouchPointQueryParams()}}function initFormModuleInstances(){function t(){return $(window).width()<=767}$(".form-module.book-now, .form-module.book-tour, .form-module.general-enquiry, .modal
1-form.contact-form, .product-filters-mobile").each(function(){var t=$(this),e=$("form",t),o="GeneralEnquiryFormSurface";t.hasClass("book-now")?o="BookRoomFormSurface":t.hasClass("book-tour")&&(o="BookTourFormSurface"),new BookingFormModule({surfaceController:o,pageId:parseInt(t.attr("data-page-id"),10)||0,prePageId:parseInt(new URLSearchParams(window.location.search).get("prePageId"),10)||0,locationCode:new URLSearchParams(window.location.search).get("locationCode")||"",productType:new URLSearchParams(window.location.search).get("productType")||"",$form:e,$locationCountry:$("#LocationCountry",e),$locationCity:$("#LocationCity",e),$locationCityOptions:$("#LocationCity > option",e),$locationBuilding:$("#LocationBuilding",e),$locationBuildingOptions:$("#LocationBuilding > option",e),$locationCountryContactUs:$("#LocationCountryContactUs",e),$locationCityContactUs:$("#LocationCityContactUs",e),$locationCityContactUsOptions:$("#LocationCityContactUs > option",e),$locationBuildingContactUs:$("#LocationBuildingContactUs",e),$locationBuildingContactUsOptions:$("#LocationBuildingContactUs > option",e)}).init(),setTimeout(function(){null!=$("#LocationCity",e).val()&&""!==$("#LocationCity",e).val()||$("#LocationCountry",e).trigger("change"),""===$("#LocationBuilding",e).val()&&""!==$("#LocationCity",e).val()&&$("#LocationCity",e).trigger("change")},1e3)}),$("#LocationCountryContactUs.select2").each(function(){t()||$("#LocationCountryContactUs.select2").select2({dropdownParent:$(this).parent()})}),$("#LocationCountryContactUs.select2").on("select2:open",function(t){$(this).valid()}),$("#LocationCityContactUs.select2").each(function(){t()||$("#LocationCityContactUs.select2").select2({dropdownParent:$(this).parent()})}),$("#LocationCityContactUs.select2").on("select2:open",function(t){$(this).valid()}),$("#LocationBuildingContactUs.select2").each(function(){t()||$("#LocationBuildingContactUs.select2").select2({dropdownParent:$(this).parent()})}),$("#LocationBuildingContactUs.select2").on("select2:open",function(t){$(this).valid()}),$("#InterestContactUs.select2").each(function(){t()||$("#InterestContactUs.select2").select2({dropdownParent:$(this).parent()})}),$("#InterestContactUs.select2").on("select2:open",function(t){$(this).valid()}),$("#LocationCity.select2").each(function(){t()||$("#LocationCity.select2").select2({dropdownParent:$(this).parent()})}),$("#LocationCity.select2").on("select2:open",function(t){$(this).valid()}),$("#LocationBuilding.select2").each(function(){t()||$("#LocationBuilding.select2").select2({dropdownParent:$(this).parent()})}),$("#LocationBuilding.select2").on("select2:open",function(t){$(this).valid()}),$("#Interest.select2").each(function(){t()||$("#Interest.select2").select2({dropdownParent:$(this).parent()})}),$("#Interest.select2").on("select2:open",function(t){$(this).valid()}),$(".modal-form select.form-control").on("change",function(){$(this).css({color:"#503216"})}),$(".box-date-time").length>0&&$("#datepicker").datepicker(),$(document).on("click, focus",".fr-booking input.form-control, .fr-booking select.form-control, .fr-booking textarea.form-control, .fr-booking a.lstOff, .select2",function(){$(this).siblings(".input-group-before").addClass("active")}),$(".modal.modal-form").on("show.bs.modal",function(){$(".box-step-1, .box-step-2, .box-step-3").removeClass("active"),$(".box-step-1").addClass("active"),$(this).find(".input-group-before").removeClass("active"),$(this).find("#LocationCity").val("").trigger("change.select2"),$(this).find("#LocationBuilding").val("").trigger("change.select2"),$(this).find("#Interest").val("").trigger("change.select2"),$(this).find("label.error-message").css("display","none"),$(this).find(".form-control").val(""),$("#fr-contact-us").removeClass("hidden"),$(".contact-fr-booking").addClass("hidden"),$(".contact-fr-booking-error").addClass("hidden"),null!=$("#formContactModal").find(".sub-title")&&$("#formContactModal").find(".sub-title").removeClass("hidden")}),$("#formContactModal.modal").on("show.bs.modal",function(){$("#fr-contact-us").closest("form").find("select").val("").trigger("change"),null!=$("#LocationCountryContactUs").val()&&-1!=$("#hdfCountryId").val()&&$("#LocationCountryContactUs").val($("#hdfCountryId").val()).trigger("change"),null!=$("#LocationCityContactUs").val()&&-1!=$("#hdfCityId").val()&&$("#LocationCityContactUs").val($("#hdfCityId").val()).trigger("change"),null!=$("#LocationBuildingContactUs").val()&&-1!=$("#hdfLocationId").val()&&$("#LocationBuildingContactUs").val($("#hdfLocationId").val()).trigger("change");var t=$("#formModal.modal");null!=t&&t.modal("hide"),$("#main-menu").is(":visible")&&$("#main-menu-link").click()}),$("#formModal.modal").on("show.bs.modal",function(){var t=$("#formContactModal.modal");null!=t&&t.modal("hide")}),$("#frm-arrange-to-visit-modal.modal").on("show.bs.modal",function(){$("#Time").val("10:00");var t=new Date;t.setDate(t.getDate()+1);var e=document.getElementById("datepickerMobile"),o=document.getElementById("datepicker"),n=document.getElementById("hfDateFormat");null!=n&&("dd/mm/yy"==n.value||"dd/mm/yyyy"==n.value||"DD/MM/YY"==n.value||"dd/MM/yy"==n.value?(e.value=t.toLocaleDateString("vi"),o.value=t.toLocaleDateString("vi"),e.placeholder=t.toLocaleDateString("vi")):"mm/dd/yy"==n.value||"mm/dd/yyyy"==n.value||"MM/DD/YY"==n.value||"MM/dd/yy"==n.value?(e.value=t.toLocaleDateString("en-US"),o.value=t.toLocaleDateString("en-US"),e.placeholder=t.toLocaleDateString("en-US")):(e.value=t.toLocaleDateString(),o.value=t.toLocaleDateString(),e.placeholder=t.toLocaleDateString()))}),$(".fr-booking .radio").each(function(){$(this).attr("data-spy")&&($(this).find("input").prop("checked")?$(".fr-booking .box-date-time").slideDown():$(".fr-booking .box-date-time").slideUp())}),$(".fr-booking .radio").on("click",function(){$(this).attr("data-spy")?$(".fr-booking .box-date-time").slideDown():$(".fr-booking .box-date-time").slideUp()}),$("#fr-contact-us, #fr-contact-times, #fr-agency-referral,#fr-finders-fee-referral,#fr-client-referral,#frm-arrange-to-visit").validation(),$("#fr-booking-visit, #fr-check-times,#fr-contact-us-mobile").validation(),$("#fr-booking-visit").on("submit",function(t){t.preventDefault(),$(this).val
1id()&&($(this).removeClass("active"),$(".box-step-2").addClass("active"))}),$("#fr-contact-us").on("submit",function(t){t.preventDefault(),grecaptcha.ready(function(){grecaptcha.execute($("#reCaptcha").val(),{action:"submit"}).then(function(t){$("#fr-contact-us").find("button[type=submit]").prop("disabled",!0);var e=new Object;e.Name=$("#txtContactFullName").val(),e.Phone=$("#txtContactPhoneNumber").val(),e.Email=$("#txtContactEmail").val(),e.Comments=$("#contact_message").val(),e.GAUserID=$("#GAUserID").val(),e.CountryTheme=$("#hdfCountryTheme").val(),e.Token=t,$("#fr-contact-us").find(".icon-loading").removeClass("hidden"),$.post("/umbraco/surface/ContactUsForm/SubmitJs",{model:e}).done(function(t){var e;($("#fr-contact-us").find(".icon-loading").addClass("hidden"),t.IsSuccess)?((e=document.getElementById("tkContactUsPopup")).classList.toggle("show"),e.parentNode.classList.add("overlowOff"),SendDataToGA(JSON.parse(t.Result))):((e=document.getElementById("tkPopup")).classList.toggle("show"),e.parentNode.classList.add("overlowOff"))})})})}),$("#fr-check-times").on("submit",function(t){t.preventDefault();var e=$(this);
1if($(this).valid()){var o=new Date,n=new Date;0==n.getDay()&&n.setDate(n.getDate()+1),5==n.getDay()&&n.setDate(n.getDate()+3),6==n.getDay()&&n.setDate(n.getDate()+2);var a=null,i=null;if("Other"==$("input[type=radio]:checked").val()?(a=(a=$("#datepicker").val()+" "+$("#Time").find("option:selected").val()).replace("-","/").replace("-","/").replace("-","/"),i=new Date(a)):(1==document.getElementById("dateTimeOptA").checked&&(a=document.getElementById("dateTimeOptA").value,i=new Date(a)),1==document.getElementById("dateTimeOptB").checked&&(a=document.getElementById("dateTimeOptB").value,i=new Date(a)),1==document.getElementById("dateTimeOptC").checked&&(a=document.getElementById("dateTimeOptC").value,i=new Date(a))),null!=i&&null!=i&&o>i)return void alert("Invalid date. Please try again.");$("#fr-check-times").find("button[type=submit]").prop("disabled",!0);var r=new Object;if(r.LocationId=parseInt($("#hdfLocationId").val()),-1==r.LocationId&&(r.LocationId=parseInt($("#LocationBuilding").val())),r.FullName=$("#fullName").val(),r.Phone=$("#phoneNumber").val(),r.Email=$("#txtEmail").val(),r.LocalTimeZone=Intl.DateTimeFormat().resolvedOptions().timeZone,r.CountryTheme=$("#CountryTheme").val(),r.Interest=$("#Interest").val(),"Other"==$("input[type=radio]:checked").val())r.Date=$("#datepicker").val(),r.Time=$("#Time").find("option:selected").val();else{var l="AM";i.getHours()>=12&&(l="PM"),r.Date=i.toLocaleDateString("en-US"),r.Time=i.getHours()+":00 "+l}r.Comments=$("#companyName").val(),r.GAUserID=$("#GAUserID").val(),r.CountryTheme=$("#hdfCountryTheme").val(),e.find(".
1icon-loading").removeClass("hidden"),$.post("/umbraco/surface/BookTourFormSurface/BookATour",{model:r}).done(function(t){e.find(".icon-loading").addClass("hidden"),t.IsSuccess?(e.removeClass("active"),$(".box-step-3").addClass("active"),SendDataToGA(JSON.parse(t.Result))):(e.removeClass("active"),$(".box-step-3").addClass("active"))})}else $("#fr-check-times").find("button[type=submit]").prop("disabled",!1)}),$("#frm-arrange-to-visit").on("submit",function(t){t.preventDefault();var e=$(this);$("#frm-arrange-to-visit").find("button[type=submit]").prop("disabled",!0);var o=new Object;o.LocationId=parseInt($("#hdfLocationId").val()),-1==o.LocationId&&(o.LocationId=parseInt($("#LocationBuilding").val())),o.FullName=$("#txtArrangeFullName").val(),o.Phone=$("#txtArrangePhoneNumber").val(),o.Email=$("#txtArrangeEmail").val(),o.LocalTimeZone=Intl.DateTimeFormat().resolvedOptions().timeZone,o.Interest=$("#Interest").val(),o.Date=$("#datepicker").val(),o.Time=$("#Time").find("option:selected").val(),o.Comments=$("#companyName").val(),o.GAUserID=$("#GAUserID").val(),o.CountryTheme=$("#hdfCountryTheme").val(),e.find(".
1icon-loading").removeClass("hidden"),$.post("/umbraco/surface/ArrangeToVisitForm/TakeAVisit",{model:o}).done(function(t){var o;(e.find(".icon-loading").addClass("hidden"),t.IsSuccess)?((o=document.getElementById("tkPopup")).classList.toggle("show"),o.parentNode.classList.add("overlowOff"),SendDataToGA(JSON.parse(t.Result))):((o=document.getElementById("tkPopup")).classList.toggle("show"),o.parentNode.classList.add("overlowOff"))})}),$("#fr-agency-referral").on("submit",function(t){t.preventDefault();var e=$(this);if($(this).valid()){$("#fr-agency-referral").find("button[type=submit]").prop("disabled",!0);var o=new Object;o.AgentName=$("#AgentName").val(),o.AgentAgency=$("#AgentAgency").val(),o.AgentLocation=$("#AgentLocation").val(),o.AgentPhoneNumber=$("#AgentPhoneNumber").val(),o.AgentEmail=$("#AgentEmail").val(),o.Fname=$("#fname").val(),o.Lname=$("#lname").val(),o.CompanyName=$("#CompanyName").val(),o.Location=$("#location").val(),o.Areacode=$("#areacode").val(),o.Phone=$("#phone").val(),o.Email=$("#email").val(),o.Requirements=$("#requirements").val(),o.Comments=$("#comments").val(),o.GAUserID=$("#GAUserID").val(),o.Subject=$("#subject").val(),o.Contact=$("#contact").val(),o.Source=$("#source").val(),o.EnquirySource=$("#EnquirySource").val(),o.InterestEnquiryType=$("#InterestEnquiryType").val(),o.ServcorpCountry=$("#ServcorpCountry").val(),o.CountryTheme=$("#CountryTheme").val(),e.find(".
1icon-loading").removeClass("hidden"),$.post("/umbraco/surface/GenericAction/SubmitAgencyReferrals",{model:o}).done(function(t){e.find(".icon-loading").addClass("hidden"),t.IsSuccess?confirmAgencyReferalAction(!0):confirmAgencyReferalAction(!1)})}else $("#fr-check-times").find("button[type=submit]").prop("disabled",!1)}),$("#fr-client-referral").on("submit",function(t){t.preventDefault();var e=$(this);if($(this).valid()){$("#fr-client-referral").find("button[type=submit]").prop("disabled",!0);var o=new Object;o.AgentName=$("#AgentName").val(),o.AgentAgency=$("#AgentAgency").val(),o.AgentLocation=$("#AgentLocation").val(),o.AgentPhoneNumber=$("#AgentPhoneNumber").val(),o.AgentEmail=$("#AgentEmail").val(),o.Fname=$("#fname").val(),o.Lname=$("#lname").val(),o.CompanyName=$("#CompanyName").val(),o.Location=$("#location").val(),o.Areacode=$("#areacode").val(),o.Phone=$("#phone").val(),o.Email=$("#email").val(),o.Requirements=$("#requirements").val(),o.Comments=$("#comments").val(),o.GAUserID=$("#GAUserID").val(),o.Subject=$("#subject").val(),o.Contact=$("#contact").val(),o.Source=$("#source").val(),o.EnquirySource=$("#EnquirySource").val(),o.InterestEnquiryType=$("#InterestEnquiryType").val(),o.ServcorpCountry=$("#ServcorpCountry").val(),o.CountryTheme=$("#CountryTheme").val(),e.find(".
1icon-loading").removeClass("hidden"),$.post("/umbraco/surface/GenericAction/SubmitReferrals",{model:o}).done(function(t){e.find(".icon-loading").addClass("hidden"),t.IsSuccess?confirmAgencyReferalAction(!0):confirmAgencyReferalAction(!1)})}else $("#fr-check-times").find("button[type=submit]").prop("disabled",!1)}),$("#fr-finders-fee-referral").on("submit",function(t){t.preventDefault();var e=$(this);if($(this).valid()){$("#fr-finders-fee-referral").find("button[type=submit]").prop("disabled",!0);var o=new Object;o.AgentName=$("#AgentName").val(),o.AgentAgency=$("#AgentAgency").val(),o.AgentLocation=$("#AgentLocation").val(),o.AgentPhoneNumber=$("#AgentPhoneNumber").val(),o.AgentEmail=$("#AgentEmail").val(),o.Fname=$("#fname").val(),o.Lname=$("#lname").val(),o.CompanyName=$("#CompanyName").val(),o.Location=$("#location").val(),o.Areacode=$("#areacode").val(),o.Phone=$("#phone").val(),o.Email=$("#email").val(),o.Requirements=$("#requirements").val(),o.Comments=$("#comments").val(),o.GAUserID=$("#GAUserID").val(),o.Subject=$("#subject").val(),o.Contact=$("#contact").val(),o.Source=$("#source").val(),o.EnquirySource=$("#EnquirySource").val(),o.InterestEnquiryType=$("#InterestEnquiryType").val(),o.ServcorpCountry=$("#ServcorpCountry").val(),o.CountryTheme=$("#CountryTheme").val(),e.find(".
1icon-loading").removeClass("hidden"),$.post("/umbraco/surface/GenericAction/SubmitFindersFeeReferrals",{model:o}).done(function(t){e.find(".icon-loading").addClass("hidden"),t.IsSuccess?confirmAgencyReferalAction(!0):confirmAgencyReferalAction(!1)})}else $("#fr-check-times").find("button[type=submit]").prop("disabled",!1)}),$("#fr-contact-us-mobile").on("submit",function(t){t.preventDefault(),grecaptcha.ready(function(){grecaptcha.execute($("#reCaptcha").val(),{action:"submit"}).then(function(t){$("#fr-contact-us-mobile").find("button[type=submit]").prop("disabled",!0);var e=new Object;$("button[name='contact']").hasClass("active")?(e.Name=$("#txtFullNameMobile").val(),e.Phone=$("#FullPhone").val(),e.Email=$("#txtEmailMobile").val(),e.Comments=$("#contact_message_Mobile").val(),e.GAUserID=$("#GAUserID").val(),e.LocationCountry=$("#LocationCountry option:selected").val(),e.LocationCity=$("#LocationCity option:selected").val(),e.LocationBuilding=$("#LocationBuilding option:selected").val(),e.Token=t,$("#fr-contact-us-mobile").find(".icon-loading").removeClass("hidden"),$.post("/umbraco/surface/ContactUsForm/SubmitJs",{model:e}).done(function(t){($("#fr-contact-us-mobile").find(".icon-loading").addClass("hidden"),t.IsSuccess)?(document.getElementById("sendSuccessContact").classList.toggle("show"),$("#resultName").html(e.Name),$("#fr-contact-us-mobile").css("display","none"),SendDataToGA(JSON.parse(t.Result))):(document.getElementById("sendFaile").classList.toggle("show"),$("#resultName").html(e.Name))})):$("button[name='arrange']").hasClass("active")&&(e.FullName=$("#txtFullNameMobile").val(),e.Phone=$("#FullPhone").val(),e.Email=$("#txtEmailMobile").val(),e.Comments=$("#contact_message_Mobile").val(),e.GAUserID=$("#GAUserID").val(),e.LocationCountry=$("#LocationCountry option:selected").val(),e.LocationCity=$("#LocationCity option:selected").val(),e.LocationId=$("#LocationBuilding option:selected").val(),e.Interest=$("#Interest").val(),e.LocalTimeZone=Intl.DateTimeFormat().resolvedOptions().timeZone,e.Date=$("#date-picker").val(),e.Time=$("#Time").find("option:selected").val(),$("#fr-contact-us-mobile").find(".icon-loading").removeClass("hidden"),$.post("/umbraco/surface/ArrangeToVisitForm/TakeAVisit",{model:e}).done(function(t){($("#fr-contact-us-mobile").find(".icon-loading").addClass("hidden"),t.IsSuccess)?(document.getElementById("sendSuccessArrange").classList.toggle("show"),$("#resultName").html(e.Name),$("#fr-contact-us-mobile").css("display","none"),SendDataToGA(JSON.parse(t.Result))):(document.getElementById("sendFaile").classList.toggle("show"),$("#resultName").html(e.Name))}))})})})}function initPhoneInputs(){window.__phoneInputsInited||(window.__phoneInputsInited=!0,$("input[data-phone-error]").each(function(){var t=$(this);if(!t.data("phone-initialized")){t.data("phone-initialized",!0);var e=t.next(".error-message"),o=$("#FullPhone",t.closest("form")),n=t.attr("data-phone-error")||"Invalid phone number",a=$("#hdfCountryTheme").val()||"us",i=a?a.split("_")[0].toLowerCase():"us";"uk"===i&&(i="gb");var r=window.intlTelInput(t[0],{initialCountry:"auto",separateDialCode:!0,autoPlaceholder:"off",geoIpLookup:function(t){fetch("https://www.cloudflare.com/cdn-cgi/trace").then(t=>t.text()).then(e=>{var o=e.match(/loc=([\w]+)/);t(o?o[1].toLowerCase():i)}).catch(()=>t(i))},utilsScript:"/js/utils.js"});t.on("input countrychange blur",function(){var a,i;t.val((a=t.val()||"",i="٠١٢٣٤٥٦٧٨٩",a.replace(/[٠-٩۰-۹]/g,function(t){return-1!==i.indexOf(t)?i.indexOf(t):"۰۱۲۳۴۵۶۷۸۹".indexOf(t)})));var l=t.val().trim();if(e.html(""),l)if(r.isValidNumber())o.val(r.getNumber()),t.removeClass("input-validation-error");else{e.html('<span class="field-validation-error">'+n+"</span>");var c=r.getNumber();if(!c){var s=r.getSelectedCountryData().dialCode||"";if(s)c="+"+s+l.replace(/[\s\-\.\(\)]/g,"").replace(/^\+/,"");else c=l}o.val(c),t.addClass("input-validation-error")}else o.val("")})}}))}BookingFormModule.prototype._populateCountries=function(t,e){var o=t.data("placeholder")||"Country";t.empty(),t.append($("<option>",{value:"",text:o}
1)),e&&e.length&&(e.sort(function(t,e){return(t.Name||"").localeCompare(e.Name||"")}),$.each(e,function(e,o){t.append($("<option>",{value:o.Id,text:o.Name}))}))},BookingFormModule.prototype._populateCities=function(t,e){var o=t.data("placeholder")||"City";t.empty(),t.append($("<option>",{value:"",text:o})),e&&e.length&&(e.sort(function(t,e){return(t.Name||"").localeCompare(e.Name||"")}),$.each(e,function(e,o){t.append($("<option>",{value:o.Id,text:o.Name}))}))},BookingFormModule.prototype._populateLocations=function(t,e){var o=t.data("placeholder")||"Location";t.empty(),t.append($("<option>",{value:"",text:o})),e&&e.length&&(e.sort(function(t,e){return(t.Name||"").localeCompare(e.Name||"")}),$.each(e,function(e,o){t.append($("<option>",{value:o.Id,text:o.Name}))}))},BookingFormModule.prototype._setLocationSelectsLoading=function(t,e,o){var n="Loading locations...";t.prop("disabled",!0),t.empty().append($("<option>",{value:"",text:n})),e&&e.length&&(e.prop("disabled",!0),e.empty().append($("<option>",{value:"",text:n}))),o&&o.length&&(o.prop("disabled",!0),o.empty().append($("<option>",{value:"",text:n})))},BookingFormModule.prototype._showLocationLoadError=function(t,e,o,n){var a=e&&e.data("placeholder")||"City",i=o&&o.data("placeholder")||"Location";t.prop("disabled",!1),t.empty().append($("<option>",{value:"",text:"Unable to load locations. Click to retry."})),e&&e.length&&(e.prop("disabled",!0),e.empty().append($("<option>",{value:"",text:a}))),o&&o.length&&(o.prop("disabled",!0),o.empty().append($("<option>",{value:"",text:i}))),t.off("mousedown.locationRetry click.locationRetry").on("mousedown.locationRetry click.locationRetry",function(e){e.preventDefault(),t.off("mousedown.locationRetry click.locationRetry"),"function"==typeof n&&n()})},BookingFormModule.prototype.loadCountries=function(t,e){var o=this;return e=e||1,o._countriesCache?(o._populateCountries(t,o._countriesCache),$.Deferred().resolve({presetCountryId:o._presetCountryId,presetCityId:o._presetCityId,presetLocationId:o._presetLocationId}).promise()):$.ajax({url:"/umbraco/surface/GeneralEnquiryFormSurface/GetFormLocationData",data:{lang:o._lang,pageId:o._pageId,prePageId:o._prePageId,locationCode:o._locationCode},dataType:"json",cache:!1,timeout:15e3}).then(function(e){if(!e||e.error||!Array.isArray(e.Countries)||!Array.isArray(e.Cities))throw new Error("Invalid location data");try{return o._countriesCache=e.Countries||[],o._citiesCache=e.Cities||[],o._locationsCache=e.Locations||[],o._presetCountryId=e.PresetCountryId||0,o._presetCityId=e.PresetCityId||0,o._presetLocationId=e.PresetLocationId||0,o._populateCountries(t,o._countriesCache),t.prop("disabled",!1),{presetCountryId:o._presetCountryId,presetCityId:o._presetCityId,presetLocationId:o._presetLocationId}}catch(t){return o._countriesCache=null,o._citiesCache=null,o._locationsCache=null,$.Deferred().reject(t).promise()}},function(){if(e<3){var n=Math.min(1e3*Math.pow(2,e-1),4e3),a=$.Deferred();return window.setTimeout(function(){o.loadCountries(t,e+1).then(a.resolve,a.reject)},n),a.promise()}return $.Deferred().reject().promise()})},BookingFormModule.prototype.loadCitiesByCountry=function(t,e){var o=this,n=o._citiesCache||[],a=n.filter(function(t){return(null!=t.CountryId?t.CountryId:t.countryId)===e});if(0===a.length&&o._countriesCache){var i=o._countriesCache.filter(function(t){return t.Id===e})[0];i&&(a=n.filter(function(t){return t.Country===i.Name}))}return o._populateCities(t,a),$.Deferred().resolve().promise()},BookingFormModule.prototype.loadLocationsByCity=function(t,e){var o=(this._locationsCache||[]).filter(function(t){return(null!=t.CityId?t.CityId:t.cityId)===e});return this._populateLocations(t,o),$.Deferred().resolve().promise()},BookingFormModule.prototype._initFormChain=function(t){var e=this,o=t.$country,n=t.$city,a=t.$building,i=null,r=null,l=null;o.data("placeholder",o.data("placeholder")||o.find("option:first").text()),n.data("placeholder",n.data("placeholder")||n.find("option:first").text()),a.length&&a.data("placeholder",a.data("placeholder")||a.find("option:first").text());var c=function(){e._countriesCache=null,e._citiesCache=null,e._locationsCache=null,e._setLocationSelectsLoading(o,n,a),e.loadCountries(o).then(function(t){i=t&&t.presetCountryId||null,r=t&&t.presetCityId||null,l=t&&t.presetLocationId||null,i&&o.val(i),function(){if(e._productType){var t=$("#Interest",e.$form);if(t.length){var o=e._productType.trim();0===o.toLowerCase().indexOf("ortak calisma alani")&&(o="Ortak ÃalıÅma Alanı");var n=null,a=o;(a.endsWith("s")||a.endsWith("S"))&&(a=a.substring(0,a.length-1)),t.find("option").each(function(){var t=($(this).text()||"").trim(),e=($(this).val()||"").trim();if(0===t.localeCompare(o,void 0,{sensitivity:"base"})||0===e.localeCompare(o,void 0,{sensitivity:"base"}))return n=$(this).val(),!1;if(a){var i=t.trim();if((i.endsWith("s")||i.endsWith("S"))&&(i=i.substring(0,i.length-1)),0===i.localeCompare(a,void 0,{sensitivity:"base"}))return n=$(this).val(),!1}}),null!==n&&t.val(n)}}}(),o.trigger("change")},function(){e._showLocationLoadError(o,n,a,c)})};o.off("change.booking").on("change.booking",function(){var t=parseInt($(this).val(),10);t?e.loadCitiesByCountry(n,t).then(function(){n.prop("disabled",!1),r&&n.val(r),n.trigger("change")}):(e._populateCities(n,[]),n.prop("disabled",!0),a.length&&(e._populateLocations(a,[]),a.prop("disabled",!0)))}),n.off("change.booking").on("change.booking",function(){var t=parseInt($(this).val(),10);a.length&&(t?e.loadLocationsByCity(a,t).then(function(){a.prop("disabled",!1),l&&a.val(l)}):(e._populateLocations(a,[]),a.prop("disabled",!0)))}),c()},BookingFormModule.prototype.init=function(){var t=this;t.$locationCountry.length>0&&t._initFormChain({$country:t.$locationCountry,$city:t.$locationCity,$building:t.$locationBuilding}),t.$locationCountryContactUs.length>0&&t._initFormChain({$country:t.$locationCountryContactUs,$city:t.$locationCityContactUs,$building:t.$locationBuildingContactUs}),$("date-picker-format").html($("#date-format").html());var e=new Date,o=new Date;if(o.setDate(e.getDate()+1),$("#datepicker").datepicker({minDate:o,beforeShowDay:$.datepicker.noWeekends,autoclose:!0,todayHighlight:!0,toggleActive:!0,todayBtn:!0,startDate:"d"}),"date"!==$("#date-picker").prop("type")){"ar"==$("html")[0].lang&&($.datepicker.regional.ar={closeText:"Ø¥ØºÙØ§Ù",prevText:"<Ø§ÙØ³Ø§Ø¨Ù",nextText:"Ø§ÙØªØ§ÙÙ>",currentText:"اÙÙÙÙ
",monthNames:["ÙÙØ§Ùر","ÙØ¨Ø±Ø§Ùر","Ù
ارس","أبرÙÙ","Ù
اÙÙ","ÙÙÙÙÙ","ÙÙÙÙÙ","أغسطس","سبتÙ
بر","Ø£ÙØªÙبر","ÙÙÙÙ
بر","Ø¯ÙØ³Ù
بر"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1ay","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Ø£Ø³Ø¨ÙØ¹",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!0,showMonthAfterYear:!1,yearSuffix:"",minDate:new Date},$.datepicker.setDefaults($.datepicker.regional.ar));var n="";"mm/dd/yyyy"==$("#date-format").html()?($("#date-picker").datepicker({dateFormat:"mm/dd/yy",minDate:o,beforeShowDay:$.datepicker.noWeekends}),n=("0"+(e.getMonth()+1)).slice(-2)+"/"+("0"+e.getDate()).slice(-2)+"/"+e.getFullYear(),$("#date-picker").val(n)):"dd/mm/yyyy"==$("#date-format").html()?($("#date-picker").datepicker({dateFormat:"dd/mm/yy",minDate:o,beforeShowDay:$.datepicker.noWeekends}),n=("0"+e.getDate()).slice(-2)+"/"+("0"+(e.getMonth()+1)).slice(-2)+"/"+e.getFullYear(),$("#date-picker").val(n)):"yyyy/mm/dd"==$("#date-format").html()&&($("#date-picker").datepicker({dateFormat:"yy/mm/dd",minDate:o,beforeShowDay:$.datepicker.noWeekends}),n=e.getFullYear()+"/"+("0"+(e.getMonth()+1)).slice(-2)+"/"+("0"+e.getDate()).slice(-2),$("#date-picker").val(n))}},BookingFormModule.prototype.presetFormFields=function(){var t=$("#preset-country",this.$form).html(),e=$("#preset-city",this.$form).html(),o=$("#preset-location",this.$form).html();t&&this.$locationCountry.val(t),e&&(this.$locationCity.val(e),o&&this.$locationBuilding.val(o))},BookingFormModule.prototype.toggleCities=function(t){null==t?this.$locationCity.prop("disabled",!0):this.$locationCity.prop("disabled",!1)},BookingFormModule.prototype.toggleCitiesForContactUs=function(t){null==t?this.$locationCityContactUs.prop("disabled",!0):this.$locationCityContactUs.prop("disabled",!1)},BookingFormModule.prototype.toggleLocations=function(t){null==t?this.$locationBuilding.prop("disabled",!0):this.$locationBuilding.prop("disabled",!1)},BookingFormModule.prototype.toggleLocationsForContactUs=function(t){null==t?this.$locationBuildingContactUs.prop("disabled",!0):this.$locationBuildingContactUs.prop("disabled",!1)},BookingFormModule.prototype.filterCities=function(t){var e=this;this.$locationCityOptions=this.$locationCityFilteredOptions,this.$locationCityOptions.each(function(o){0===o||$(this).data("country-name")===t?e.$locationCity.append($(this)):$(this).remove()})},BookingFormModule.prototype.filterCitiesForContactUs=function(t){var e=this;this.$locationCityContactUsOptions=this.$locationCityContactUsFilteredOptions,this.$locationCityContactUsOptions.each(function(o){0===o||$(this).data("country-name")===t?e.$locationCityContactUs.append($(this)):$(this).remove()})},BookingFormModule.prototype.filterLocations=function(t){var e=this;this.$locationBuildingOptions=this.$locationBuildingFilteredOptions,this.$locationBuildingOptions.each(function(o){0===o||$(this).data("city-id")===t?e.$locationBuilding.append($(this)):$(this).remove()})},BookingFormModule.prototype.filterLocationsForContactUs=function(t){var e=this;this.$locationBuildingContactUsOptions=this.$locationBuildingContactUsFilteredOptions,this.$locationBuildingContactUsOptions.each(function(o){0===o||$(this).data("city-id")===t?e.$locationBuildingContactUs.append($(this)):$(this).remove()})},BookingFormModule.prototype.setCityFirstItem=function(){this.$locationCity.val(this.$locationCityOptions.first().val())},BookingFormModule.prototype.setCityContactUsFirstItem=function(){this.$locationCityContactUs.val(this.$locationCityContactUsOptions.first().val())},BookingFormModule.prototype.setBuildingFirstItem=function(){this.$locationBuilding.val(this.$locationBuildingOptions.first().val())},BookingFormModule.prototype.setBuildingContactUsFirstItem=function(){this.$locationBuildingContactUs.val(this.$locationBuildingContactUsOptions.first().val())},"loading"!==document.readyState?(initFormModuleInstances(),initContactTouchPoints(),initPhoneInputs()):$(document).ready(function(){initFormModuleInstances(),initContactTouchPoints(),initPhoneInputs()}),window.addEventListener("load",function(){document.getElementById("LocationCountry")&&document.getElementById("LocationCountry").options.length<=1&&initFormModuleInstances(),initContactTouchPoints(),window.__phoneInputsInited||initPhoneInputs()});
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.