1"use strict";(self.tcthemejsonpFunction=self.tcthemejsonpFunction||[]).push([[9603],{9905(e,t,r){var a=r(4692),i=r.n(a),s=(r(960),r(8823)),o=r.n(s),n=r(5056),l=r(8972),c=r(948);const{QJ:d,dh:h}=l.iW,{fireEvent:f}=l.Wp;var u=function(e){this.init(e)};window.validationMessages&&i().extend(i().validator.messages,window.validationMessages),u.prototype={init:function(e){if(this.$form=i()(e),this.loading=!1,this.modal={$el:this.$form.find(".dialog").appendTo("body")},!this.modal.$el.length)return console.warn(".dialog is missing in the form",this.$form),!1;this.modal.$dialog=i()(this.modal.$el[0]),this.messages={error:this.$form.find(".template-error").html(),success:this.$form.find(".template-success").html()},this.$message=this.modal.$el.find(".js-message"),this.$form.validate({showErrors:function(e){if(e){var t=this;i().extend(this.errorMap,e),this.errorList=i().map(this.errorMap,function(e,r){return{message:d.forms.addLabelToValidationMessage(t.findByName(r)[0],e),element:t.findByName(r)[0]}}),this.successList=i().grep(this.successList,function(t){return!(t.name in e)}),Object.getOwnPropertyNames(e).length&&f("event.error.formSubmission",e)}this.defaultShowErrors()},errorPlacement:function(e,t){var r=t.attr("type");"checkbox"==r||"radio"==r?t.closest(".form-group--horizontal, .form-group").append(e):t.is("select")?e.insertAfter(t.parent()):"file"==r?(t.parent().parent().children(".f-input").addClass("error"),e.insertAfter(t.closest(".file-upload-wrapper"))):e.insertAfter(t),e.attr("role","alert")},submitHandler:e=>{"1"===e.dataset.enableRecaptcha&&window.GoogleAPIs.hasRecaptcha()?window.GoogleAPIs.recaptcha(t=>this.submitForm(e,t)):this.submitForm(e)}});let t=i()(this.$form.find('input[name="form_recipients[]"]')[0]),r=t.val();this.$form.find(".js-form-recipient").on("change",function(e){let a=i()(e.currentTarget).val(),s=i()(e.currentTarget.selectedOptions)[0].disabled,o=i()(e.currentTarget.selectedOptions)[0].textContent;t.val(r),a?.length>0&&t.val(a),o?.length>0&&!s&&i()(this.$form.find('input[class="js-form-selected-property"]')[0]).val(o)}.bind(this))},submitForm:function(e,t=null){if(this.loading)return!1;this.changeLoading(!0);let r="success",a=0,s=this.$form.find('input[type="file"]'),o=e.dataset.formType;const l=new FormData(e);let d=this.$form[0]?.id;s.each(function(e){if(this.files.length)return a=1}),t&&i()(e).prepend(`<input type="hidden" name="g-recaptcha-response" value="${t}">`);let h=e.querySelectorAll(".js-form-recipient.js-property-recipient"),u=e.querySelectorAll('input[name="form_recipients[]"]')[0],m=!h?.[0]?.hasAttribute("data-placeholder")||!1,g=e.querySelectorAll(".js-form-selected-property")?.[0];m&&""==g?.value&&(g.value=h?.[0]?.[0]?.innerText,h?.[0]?.[0]?.value&&u&&(u.value=h?.[0]?.[0]?.value));let v=new FormData(e);window.GalaxyHelpers.sendLead(v).then(()=>{}).catch(e=>{console.error(e),r="error",document.querySelector(".error-message-container")?.classList.remove("hide")}).finally(()=>{if(this.changeLoading(!1),this.$message.html(this.messages[r]),"success"==r){window.enableResponseMessageInSamePage[d]?p({entriesFormDataObj:l,formIdToShow:d}):(n.A.open(this.modal.$dialog,{touch:!1}),this.modal.$dialog.on("click",".js-dialog-close",()=>{n.A.close()})),e.reset(),i()(e).find(".js-form-selected-property").val("");let t=i()(e).find("select.select2");t.val(t?.find("option")?.eq(0)?.val()).trigger("change"),s.val(""),i()(e).find(".file-name").text("No file selected"),i()(e).find(".file-upload").addClass("hidden"),f("event.formSubmission",o),c.A.clear()}else window.enableResponseMessageInSamePage[d]&&w(d);t&&i()(e).find('[name="g-recaptcha-response"]').remove()})},changeLoading:function(e=!0){e?this.$form.addClass("loading"):this.$form.removeClass("loading"),this.loading=e}};const m=(e,t,r,a)=>{let i=r.getAttribute("type"),s=e+"-"+a;"hidden"!==i&&"radio"!==i&&(r.setAttribute("id",s),t.querySelectorAll("label, .label, .form-label").forEach((e,t)=>{e.setAttribute("for",s)}))},p=({entriesFormDataObj:e,formIdToShow:t})=>{const r=[];let a=0;for(const[t,i]of e)if(t.startsWith("section_")||t.startsWith("label_","")||t.startsWith("label-value_","")){const s=t.startsWith("section_")?"section":t,o=t.startsWith("section_")?t:t.replace("label_","").replace("label-value_",""),n=""!==e.getAll(o).join(", ")?e.getAll(o).join(", "):e.getAll(o+"[]").join(", ");"section"===s?r.push({key:s,toHide:a>=5,value:n}):""!==n&&(a++,r.push({key:i,toHide:a>5,value:n}))}window.submissionSummaryDataArray||(window.submissionSummaryDataArray=[]),window.submissionSummaryDataArray[t]=r,v(t),y(t),window.dispatchEvent(new Event(`submissionDataExecuted-${t}`)),b(t)},g=e=>{let t=e.id.split("-");return"id-"+t[t.length-1]},v=e=>{let t=e;
1document.querySelectorAll(".js-lead").forEach(e=>{const r=g(e);t===r&&e.classList.add("hide")}),document.querySelectorAll(".box__title-before").forEach(e=>{t===e.id&&e.classList.add("hide")}),document.querySelectorAll(".success-message-container").forEach(e=>{const r=g(e);t===r&&e.classList.remove("hide")})},w=e=>{let t=e;document.querySelectorAll(".error-message-container").forEach(e=>{const r=g(e);t===r&&e.classList.remove("hide")})},y=e=>{let t=e;document.querySelectorAll(".js-new-form").forEach(r=>{r.id===t&&r.addEventListener("click",()=>{document.querySelectorAll(".js-lead").forEach(e=>{t===e.id&&e.classList.remove("hide")}),document.querySelectorAll(".box__title-before").forEach(e=>{t===e.id&&e.classList.remove("hide")}),document.querySelectorAll(".success-message-container").forEach(r=>{const a=g(r);t===a&&(r.classList.add("hide"),window.dispatchEvent(new Event(`hideSuccessMessage-${e}`)))})})}),document.querySelectorAll(".js-back-to-home").forEach(e=>{e.addEventListener("click",()=>{window.location.href="/"})})},b=e=>{let t=e;document.querySelectorAll(".success-message-header").forEach(e=>{t===e.id&&e.scrollIntoView({behavior:"smooth",block:"center"})})},A={init:function(){i()(".form-group").each(function(e,t){let r=i()(t).find("input.form-input, select, textarea").attr("id");if(!r){r="form-input-"+(0,l.bD)();let e=t.querySelectorAll(".checkbox-radio-custom");e.length?e.forEach((e,t)=>{e.querySelectorAll("input, select, textarea").forEach((a,i)=>{m(r,e,a,t)})}):t.querySelectorAll("input, select, textarea").forEach((e,a)=>{m(r,t,e,a)})}}),i()(".js-lead").each(function(){new u(this)}),i()(".file-upload-wrapper").each(function(){i()(this).on("change",function(){const e=i()(this),t=e.children(".f-input"),r=e.find(".file-upload"),a=e.find(".file-name");let s=t.attr("data-default");if(e.find(".uploadBtn")[0].files.length>0){const i=e.find(".uploadBtn")[0].files[0].name;t.removeClass("error").attr("aria-label",`${t.data("selected")}: ${i}`),a.text(i),r.removeClass("hidden").attr("aria-label",`${r.data("clear")} ${i}`),e.parent().find('.error[role="alert"]').hide(),e.find(".uploadBtn").focus(),r.on("click",function(){a.text(s),r.addClass("hidden"),e.find('input[type="file"]').val("")})}else{a.text(s),r.addClass("hidden"),t.addClass("error").attr("aria-label",t.data("default"));let i=e.parent().children(".form-label").text().replace(/\*/g,"").replace(/ *\([^)]*\) */g,"").trim();e.parent().find('.error[role="alert"]').show().text(i+" "+validationMessages.required)}}),i()(this).find(".fileUpload").on("click",function(){i()(this).next().trigger("click")})});let e=[];const t="rtl"==i()("html").attr("dir"),r=(new Date).getFullYear(),a=[r-100,r+100],s=(e,t)=>(0,l.w$)(e).format(t);i()(".datepicker").each(function(r,n){e[r]=new(o())({field:n,container:n.parentElement,format:i()(this).data("date-format"),firstDay:i()(this).data("first-day"),theme:i()(this).data("theme"),minDate:1===i()(this).data("min-date")?new Date:null,i18n:h().getAll(),keyboardInput:!0,isRTL:t,yearRange:a,toString:s,onDraw:e=>{e.el.querySelector(".pika-next").innerHTML='<svg class="icon" aria-hidden="true"><use href="#icon-arrow-right"></svg>',e.el.querySelector(".pika-prev").innerHTML='<svg class="icon" aria-hidden="true"><use href="#icon-arrow-left"></svg>'}})})}};r.d(t,["default",0,A])}}]);
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.