1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[68595],{2188(t,e,i){i.d(e,{A:()=>r});var a=i(4335);class r extends a.A{init(){let t=document.getElementById("recaptcha-script");if(t){if(!t.hasAttribute("src")){let e=t.getAttribute("data-src");e&&this._isValidUrl(e)&&t.setAttribute("src",encodeURI(e))}window.grecaptcha&&"function"==typeof window.grecaptcha.ready&&window.grecaptcha.ready(this._executeGoogleReCaptchaInitialization.bind(this))}}_executeGoogleReCaptchaInitialization(){if(this._getForm(),this._form){if(this.grecaptchaInput=this.el.querySelector(this.options.grecaptchaInputSelector),!this.grecaptchaInput)throw Error("Input field for Google reCAPTCHA is missing!");if(this.grecaptcha=window.grecaptcha,!this.grecaptcha||"function"!=typeof this.grecaptcha.render&&"function"!=typeof this.grecaptcha.execute)throw Error("Google reCAPTCHA object (window.grecaptcha) methods (render/execute) not available.");this._formSubmitting=!1,this.formPluginInstances=window.PluginManager.getPluginInstancesFromElement(this._form),this._setGoogleReCaptchaHandleSubmit(),this._registerEvents()}}getGreCaptchaInfo(){}onFormSubmit(){}_getForm(){return this.el&&"FORM"===this.el.nodeName?(this._form=this.el,!0):(this._form=this.el.closest("form"),this._form)}_registerEvents(){this._form.addEventListener("submit",this._onFormSubmitCallback.bind(this))}_submitInvisibleForm(){if(!this._form.checkValidity()){this._formSubmitting=!1;return}this.$emitter.publish("beforeGreCaptchaFormSubmit",{info:this.getGreCaptchaInfo(),token:this.grecaptchaInput.value});let t=!1;for(let e of this.formPluginInstances.values())"function"==typeof e.sendAjaxFormSubmit&&!1!==e.options.useAjax&&(t=!0,e.sendAjaxFormSubmit());t||this._form.submit()}_onFormSubmitCallback(t){this._formSubmitting||(t.preventDefault(),this._formSubmitting=!0,this.onFormSubmit())}_setGoogleReCaptchaHandleSubmit(){for(let t of this.formPluginInstances.values())"function"==typeof t.sendAjaxFormSubmit&&!1!==t.options.useAjax&&(t.formSubmittedByCaptcha=!0)}_isValidUrl(t){try{let e=new URL(t);return["http:","https:"].includes(e.protocol)}catch(t){return!1}}}},8595(t,e,i){i.r(e),i.d(e,{default:()=>r});var a=i(2188);class r extends a.A{static #t=this.options={grecaptchaInputSelector:".grecaptcha-v2-input",checkboxContainer:".grecaptcha-v2-container",grecaptchaIframeHasErrorClassSelector:"has-error",siteKey:null,invisible:!1};init(){this.grecaptchaContainer=this.el.querySelector(this.options.checkboxContainer),this.grecaptchaContainerIframe=null,this.grecaptchaWidgetId=null,this.currentToken=null,super.init()}_executeGoogleReCaptchaInitialization(){super._executeGoogleReCaptchaInitialization(),this.grecaptcha?this._renderV2Captcha():console.error("GoogleReCaptchaV2Plugin: Cannot render V2 captcha.")}_renderV2Captcha(){this.grecaptcha.ready(this._onGreCaptchaReady.bind(this))}getGreCaptchaInfo(){return{version:"GoogleReCaptchaV2",invisible:this.options.invisible}}onFormSubmit(){this.options.invisible?null!==this.grecaptchaWidgetId&&this.grecaptcha.execute(this.grecaptchaWidgetId).then(()=>{this._formSubmitting=!1,null!==this.currentToken&&this.grecaptchaInput.value===this.currentToken&&this._submitInvisibleForm()}):(this.$emitter.publish("beforeGreCaptchaFormSubmit",{info:this.getGreCaptchaInfo(),token:this.grecaptchaInput.value}),this.grecaptchaInput.value?this._submitInvisibleForm():(this._formSubmitting=!1,this.grecaptchaContainerIframe=this.el.querySelector("iframe"),this.grecaptchaContainerIframe.classList.add(this.options.grecaptchaIframeHasErrorClassSelector)))}_onCaptchaTokenResponse(t){this.$emitter.publish("onGreCaptchaTokenResponse",{info:this.getGreCaptchaInfo(),token:t}),this.currentToken=t,this.grecaptchaInput.value=t,this.options.invisible?this._submitInvisibleForm():this.grecaptchaContainerIframe.classList.remove(this.options.grecaptchaIframeHasErrorClassSelector)}_onGreCaptchaReady(){this.grecaptchaWidgetId=this.grecaptcha.render(this.grecaptchaContainer,{sitekey:this.options.siteKey,size:this.options.invisible?"invisible":"normal",callback:this._onCaptchaTokenResponse.bind(this),"expired-callback":this._onGreCaptchaExpire.bind(this),"error-callback":this._onGreCaptchaError.bind(this)}),this.grecaptchaContainerIframe=this.el.querySelector("iframe")}_onGreCaptchaExpire(){this.$emitter.publish("onGreCaptchaExpire",{info:this.getGreCaptchaInfo()}),this.grecaptcha.reset(this.grecaptchaWidgetId),this.grecaptchaInput.value=""}_onGreCaptchaError(){this.$emitter.publish("onGreCaptchaError",{info:this.getGreCaptchaInfo()})}}}}]);
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.