PageSourceSearch

https://baer.tools/theme/c06e77d29f9fca341d68f9138913a5e4/js/captcha/captcha.js?1790263910

js baer.tools collected 2026-09-25 05:08:01 UTC 10,097 bytes, 1 lines download raw bytes

1(()=>{"use strict";var t={156(t){var e=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function s(t,e){return!1!==e.clone&&e.isMergeableObject(t)?a(Array.isArray(t)?[]:{},t,e):t}function n(t,e,i){return t.concat(e).map(function(t){return s(t,i)})}function r(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function o(t,e){try{return e in t}catch(t){return!1}}function a(t,i,l){(l=l||{}).arrayMerge=l.arrayMerge||n,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=s;var c,h,u=Array.isArray(i);return u!==Array.isArray(t)?s(i,l):u?l.arrayMerge(t,i,l):(h={},(c=l).isMergeableObject(t)&&r(t).forEach(function(e){h[e]=s(t[e],c)}),r(i).forEach(function(e){(!o(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(o(t,e)&&c.isMergeableObject(i[e])?h[e]=(function(t,e){if(!e.customMerge)return a;var i=e.customMerge(t);return"function"==typeof i?i:a})(e,c)(t[e],i[e],c):h[e]=s(i[e],c))}),h)}a.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,i){return a(t,i,e)},{})},t.exports=a}},e={};function i(s){var n=e[s];if(void 0!==n)return n.exports;var r=e[s]={exports:{}};return t[s](r,r.exports,i),r.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s=i(156),n=i.n(s);class r{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let i=r.toUpperCamelCase(t,e);return r.lcFirst(i)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>r.ucFirst(t.toLowerCase())).join(""):r.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}class o{constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=new CustomEvent(t,{detail:e,cancelable:i});return this.el.dispatchEvent(s),s}subscribe(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=this,n=t.split("."),r=i.scope?e.bind(i.scope):e;if(i.once&&!0===i.once){let e=r;r=function(i){s.unsubscribe(t),e(i)}}return this.el.addEventListener(n[0],r),this.listeners.push({splitEventName:n,opts:i,cb:r}),!0}unsubscribe(t){arguments.length>1&&"function"==typeof arguments[1]&&console.warn(`[NativeEventEmitter] Unsubscribing by passing the subscriber function as a second argument is not supported. By default, all listeners for the event will be removed. Use a suffix (separated by a dot) on the event name when subscribing/unsubscribing to identify/target your specific listener only, e.g. "${t}.MyCustomPlugin"`);let e=t.split(".");return this.listeners=this.listeners.reduce((t,i)=>([...i.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):t.push(i),t),[]),!0}reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}}class a{constructor(t,e={},i=!1){if(!(t instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${i}".`);return}this.el=t,this.$emitter=new o(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}destroy(){}
1_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let e=[this.constructor.options,this.options,t];return e.push(this._getConfigFromDataAttribute()),e.push(this._getOptionsFromDataAttribute()),n().all(e.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_getConfigFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=r.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${e}-config`);return i?window.PluginConfigManager.get(this._pluginName,i):t}_getOptionsFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=r.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${e}-options`);if(i)try{return JSON.parse(i)}catch(t){console.error(`The data attribute "data-${e}-options" could not be parsed to json: ${t.message}`)}return t}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(t){return t||(t=this.constructor.name),t}}class l extends a{static #t=this.options={siteKey:null,startMode:null,language:null,apiEndpoint:null,apiVersion:"v1",containerSelector:".frc-captcha",solutionFieldName:"frc-captcha-solution",errorClass:"has-error",successClass:"has-success",invisible:!1,hiddenClass:"frc-captcha-hidden",invisibleShowAfterLongWaitMs:5e3};init(){if(this._createCallbacks(),this._form="FORM"===this.el.nodeName?this.el:this.el.closest("form"),this._invisibleShowTimeout=null,this._form&&this.options.siteKey&&(this._container=this.el.querySelector(this.options.containerSelector),this._container)){if("v2"===(this.options.apiVersion||"v1").toLowerCase()){this._initV2();return}this._initV1()}}_initV1(){!window.friendlyChallenge||this._widget?.valid||(this._form.addEventListener("submit",this._callbacks.onFormSubmit),this._widget=new window.friendlyChallenge.WidgetInstance(this._container,{siteKey:this.options.siteKey,startMode:this.options.startMode,language:this.options.language,doneCallback:this._callbacks.onV1Done,readyCallback:this._callbacks.onV1Ready}))}_initV2(){if(!window.frcaptcha)return;this.options.apiEndpoint&&(this._container.dataset.apiEndpoint=this.options.apiEndpoint);let t=window.frcaptcha.attach([this._container])||[];this._widget=t[0]||window.frcaptcha.getAllWidgets().find(t=>t.getElement&&t.getElement()===this._container),this._widget&&(this._setSolutionInputValidation(),this._form.addEventListener("submit",this._callbacks.onFormSubmit),this._widget.addEventListener("frc:widget.statechange",this._callbacks.onV2StateChange))}_onFormSubmit(){if(this._setSolutionInputValidation(),!this._isWidgetValid()){this._clearSolutionInput(),this._container.classList.add(this.options.errorClass);return}this._container.classList.remove(this.options.errorClass)}_onV1Done(t){t&&(this._container.classList.remove(this.options.errorClass),this._container.classList.add(this.options.successClass))}_onV1Ready(){this._setSolutionInputValidation(!0)}_onV2StateChange(t){let e=t?.detail?.state,i=t?.detail?.mode;this._setSolutionInputValidation(),"completed"!==e&&this._clearSolutionInput(),this._container.classList.remove(this.options.errorClass),this._container.classList.remove(this.options.successClass),"completed"===e&&this._container.classList.add(this.options.successClass),"error"===e&&this._container.classList.add(this.options.errorClass),this.options.invisible&&"interactive"===i&&this._showCaptchaWidget(),this.options.invisible&&"requesting"===e&&(this._clearInvisibleCaptchaTimeout(),this._invisibleShowTimeout=window.setTimeout(()=>{this._showCaptchaWidget()},this.options.invisibleShowAfterLongWaitMs)),this.options.invisible&&"completed"===e&&this._clearInvisibleCaptchaTimeout(),this.options.invisible&&("error"===e||"expired"===e)&&(this._clearInvisibleCaptchaTimeout(),this._showCaptchaWidget())}_isWidgetValid(){if(!this._widget)return!1;if("boolean"==typeof this._widget.valid)return this._widget.valid;if("function"==typeof this._widget.getState)return"completed"===this._widget.getState();let t=this._getSolutionInput();return!!t?.value}_setSolutionInputValidation(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._getSolutionInput();e&&(t&&(e.value=""),e.setAttribute("data-validate-hidden",!0),e.setAttribute("required",!0),e.setAttribute("type","text"))}_getSolutionInput(){return this.el.querySelector(`[name="${this.options.solutionFieldName}"]`)}_clearSolutionInput(){let t=this._getSolutionInput();t&&(t.value="")}_removeListeners(){this._form&&this._callbacks?.onFormSubmit&&this._form.removeEventListener("submit",this._callbacks.onFormSubmit),this._widget&&this._callbacks?.onV2StateChange&&this._widget.removeEventListener("frc:widget.statechange",this._callbacks.onV2StateChange)}destroy(){this._removeListeners(),this._clearInvisibleCaptchaTimeout(),this._clearSolutionInput(),this._clearStateClasses(),this._widget&&"function"==typeof this._widget.dis
1pose&&this._widget.dispose(),this._widget=null,this._container=null,this._form=null,this._callbacks=null}_createCallbacks(){this._callbacks={onFormSubmit:this._onFormSubmit.bind(this),onV1Done:this._onV1Done.bind(this),onV1Ready:this._onV1Ready.bind(this),onV2StateChange:this._onV2StateChange.bind(this)}}_clearStateClasses(){this._container&&(this._container.classList.remove(this.options.errorClass),this._container.classList.remove(this.options.successClass))}_showCaptchaWidget(){this._container&&this._container.classList.remove(this.options.hiddenClass)}_clearInvisibleCaptchaTimeout(){this._invisibleShowTimeout&&(window.clearTimeout(this._invisibleShowTimeout),this._invisibleShowTimeout=null)}}let c=window.PluginManager;window.friendlyCaptchaActive&&c.register("FriendlyCaptcha",l,"[data-friendly-captcha]")})();

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.