1/*! IconCaptcha v4.0.1 | (c) 2023, Fabian Wennink (fabianwennink.nl) | fabianwennink.nl/projects/IconCaptcha-Widget/license */ 2"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var IconCaptchaPolyfills=function(){var e={extend:function(e){e=e||{};for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n)for(var a in n)n.hasOwnProperty(a)&&("object"===_typeof(n[a])?n[a]instanceof Array?e[a]=n[a].slice(0):e[a]=IconCaptchaPolyfills.extend(e[a],n[a]):e[a]=n[a])}return e},ajax:function(){var t=(t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{})||{},n=new XMLHttpRequest;if(n.open(t.type||"get",t.url,t.async||!0),t.success&&(n.onload=function(){if(200===n.status)try{t.success(JSON.parse(n.responseText))}catch(e){t.success(n.responseText)}else t.error&&t.error({message:"Request returned ".concat(n.status,".")})}),t.error&&(n.onerror=function(e){return t.error(e)}),t.headers)for(var e in t.headers)n.setRequestHeader(e,t.headers[e]);if(n.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.data)if(t.processData=t.processData||!0,t.data instanceof FormData||t.processData){if(t.data=t.data||{},t.processData&&"object"===_typeof(t.data)){var a,o=new FormData;for(a in t.data)o.append(a,t.data[a]);t.data=o}n.send(t.data)}else n.setRequestHeader("Content-Type","application/json"),n.send(JSON.stringify(t.data));else n.send()},trigger:function(e,t,n){var a=null;window.CustomEvent&&"function"==typeof window.CustomEvent?a=new CustomEvent(t,{detail:n}):(a=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(a)},empty:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},offset:function(e){if(!e.getClientRects().length)return{top:0,left:0};var t=e.getBoundingClientRect(),e=e.ownerDocument.defaultView;return{top:t.top+e.pageYOffset,left:t.left+e.pageXOffset}},width:function(e){return parseFloat(getComputedStyle(e,null).width.replace("px",""))}};return e}();function ownKeys(t,e){var n,a=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,n)),a}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _createForOfIteratorHelper(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var a=0,t=function(){};return{s:t,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t}}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 o,i=!0,r=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){r=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(r)throw o}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var IconCaptcha=function(){var e={}
2,r={general:{endpoint:null,fontFamily:null,showCredits:!0},security:{interactionDelay:1500,hoverProtection:!0,displayInitialMessage:!0,initializationDelay:500,incorrectSelectionResetDelay:3e3,loadingAnimationDuration:1e3},locale:{initialization:{loading:"Loading challenge...",verify:"Verify that you are human."},header:"Select the image displayed the <u>least</u> amount of times",correct:"Verification complete.",incorrect:{title:"Uh oh.",subtitle:"You've selected the wrong image."},timeout:{title:"Please wait.",subtitle:"You made too many incorrect selections."}}},k="https://www.fabianwennink.nl/projects/IconCaptcha",x="IconCaptcha by Fabian Wennink";e.$init=function(e,t){return n(this,e,t)},e.init=function(e,t){e=Array.from(document.querySelectorAll(e));return n(this,e,t)},e.reset=function(t){return void 0===this.instances?console.error("IconCaptcha has not yet been initialized. Cannot use 'reset' yet."):a(this.instances,function(e){void 0!==t&&e.id!==t||null!=e&&e.reset()}),this},e.bind=function(t,n){return void 0===this.instances?console.error("IconCaptcha has not yet been initialized. Cannot use 'bind' yet."):a(this.instances,function(e){e.element.addEventListener(t,n)}),this};var n=function(e,t,n){if(void 0===e.instances||!t.some(function(e){return null!==e.querySelector(".iconcaptcha-modal")})){void 0===e.instances&&(e.instances={});var a=IconCaptchaPolyfills.extend({},r,n||{}),o=Object.values(e.instances).length;e.instances[o]=[];for(var i=0;i<t.length;i++)e.instances[o].push(l(t[i],i,a));return c(e.instances[o])}console.error("IconCaptcha has already been initialized on one or more elements in this list:",t)},a=function(e,t){for(var n=0,a=Object.values(e);n<a.length;n++)for(var o=a[n],i=0,r=Object.values(o);i<r.length;i++)t(r[i])},c=function(o){var e={reset:function(e){var t,n=_createForOfIteratorHelper(o);try{for(n.s();!(t=n.n()).done;){var a=t.value;void 0!==e&&a.id!==e||null!=a&&a.reset()}}catch(e){n.e(e)}finally{n.f()}return this},bind:function(e,t){var n,a=_createForOfIteratorHelper(o);try{for(a.s();!(n=a.n()).done;)n.value.element.addEventListener(e,t)}catch(e){a.e(e)}finally{a.f()}return this}};return e},l=function(e,t,i){var r,n,c,a,o,l=e,s=!1,d=null,u=0,p=!1,f=0,h=!1,y=!1,v=Date.now();if(i.general.endpoint)return m(),{id:c,element:e,reset:function(){a=void 0,O(),y=h=p=s=!1,IconCaptchaPolyfills.trigger(l,"reset",{captchaId:c}),m()}};function m(){c=c||function(){for(var e,t="",n=0;n<32;n++)8!==n&&12!==n&&16!==n&&20!==n||(t+="-"),e=16*Math.random()|0,t+=(12===n?4:16===n?3&e|8:e).toString(16);return t}(),o=null===(t=document.querySelector('input[name="_iconcaptcha-token"]'))||void 0===t?void 0:t.value;var e,t,n=l.getAttribute("data-theme")||"light";if(l.classList.add("iconcaptcha-theme-"+n),i.general.fontFamily&&(l.style.fontFamily=i.general.fontFamily),!s&&i.security.displayInitialMessage)return i.security.displayInitialMessage&&l.addEventListener("click",function(e){s||e.target instanceof HTMLAnchorElement||(s=!0,l.querySelector(".iconcaptcha-modal__body-circle").style.animationDuration="2s",l.querySelector(".iconcaptcha-modal__body-title").innerText=i.locale.initialization.loading,setTimeout(function(){l.classList.remove("iconcaptcha-init"),m()},i.security.initializationDelay))}),e=["<div class='iconcaptcha-modal'>","<div class='iconcaptcha-modal__body'>","<div class='iconcaptcha-modal__body-circle'></div>","<div class='iconcaptcha-modal__body-title'>".concat(i.locale.initialization.verify,"</div>"),"</div>","</div>"],t=i.general.showCredits?"":"display: none",e.splice(4,0,"<div class='iconcaptcha-modal__body-info' style='".concat(t,"'>"),"<a href='".concat(k,"' target='_blank' rel='follow' title='").concat(x,"'>IconCaptcha ©</a>"),"</div>"),l.classList.add("iconcaptcha-init"),l.classList.remove("iconcaptcha-error","iconcaptcha-success"),void(l.innerHTML=e.join(""));p||function(){var e=[];e.push("<div class='iconcaptcha-modal'>","<div class='iconcaptcha-modal__header'>","<span>".concat(i.locale.header,"</span>"),"</div>","<div class='iconcaptcha-modal__body'>","<canvas class='iconcaptcha-modal__body-icons'></canvas>","</div>","<div class='iconcaptcha-modal__footer'>");var t=i.general.showCredits?"":"display: none";e.push("<span style='".concat(t,"'><a href='").concat(k,"' target='_blank' rel='follow' title='").concat(x,"'>IconCaptcha</a> ©</span>")),e.push("</div>","<div class='iconcaptcha-modal__fields'>","<input type='hidden' name='ic-rq' value='1' required style='display:none;' />");for(var n=0,a=["wid","cid","hp"];n<a.length;n++){var o=a[n];e.push("<input type='hidden' name='ic-".concat(o,"' required style='display:none;' />"))}
2e.push("</div></div>"),l.innerHTML=e.join(""),r=l.querySelector(".iconcaptcha-modal__body")}(),I(),i.security.loadingAnimationDuration&&0<i.security.loadingAnimationDuration&&!i.security.displayInitialMessage?setTimeout(function(){return g(n)},i.security.loadingAnimationDuration):g(n)}function g(e){e=T({widgetId:c,action:"LOAD",theme:e,token:o});IconCaptchaPolyfills.ajax({url:i.general.endpoint,type:"POST",headers:L(o),data:{payload:e},success:function(e){if(e&&"string"==typeof e){var t=j(e);if(a=t.identifier,t.error)return void A(t.error,t.data);if(t.completed&&!t.challenge)return O(),void w();null!==(e=l.querySelector('input[name="ic-cid"]'))&&void 0!==e&&e.setAttribute("value",a),null!==(e=l.querySelector('input[name="ic-wid"]'))&&void 0!==e&&e.setAttribute("value",c);e=r.querySelector(".iconcaptcha-modal__body-icons");!function(t,e,n){var a=window.getComputedStyle(t);t.width=a.getPropertyValue("width").replace("px",""),t.height=a.getPropertyValue("height").replace("px","");var o=new Image;o.src="data:image/png;base64,".concat(e),o.onload=function(){var e;null!==(e=t.getContext("2d"))&&void 0!==e&&e.drawImage(o,0,0),n()},o.complete&&o.onload(this)}(e,t.challenge,function(){!function(){var e;r.classList.remove("captcha-opacity");var t=r.querySelector(".captcha-loader");null==t||null!==(e=t.parentNode)&&void 0!==e&&e.removeChild(t)}()}),e.parentNode.insertAdjacentHTML("beforeend",'<div class="iconcaptcha-modal__body-selection"><i></i></div>'),n=r.querySelector(".iconcaptcha-modal__body-selection > i"),function(e){for(var t in e._ic_listeners={click:function(e){var t,n,a;new Date-f<=i.security.interactionDelay||i.security.hoverProtection&&!y||(t=IconCaptchaPolyfills.offset(e.currentTarget),n=e.pageX-t.left,a=e.pageY-t.top,n&&a&&(r.classList.contains("captcha-opacity")||(IconCaptchaPolyfills.trigger(l,"selected",{captchaId:c}),i.security.loadingAnimationDuration&&0<i.security.loadingAnimationDuration?(I(),setTimeout(function(){return _(n,a)},i.security.loadingAnimationDuration)):_(n,a))))},mousemove:function(e){y&&!h&&p&&q(e)},mouseenter:function(e){n.style.display="inline",q(e),y=!0},mouseleave:function(){n.style.display="none",y=!1}},e._ic_listeners)e.addEventListener(t,e._ic_listeners[t])}(l.querySelector(".iconcaptcha-modal__body-selection")),p||IconCaptchaPolyfills.trigger(l,"init",{captchaId:c});e=r.querySelector(".iconcaptcha-modal__body-selection");return u=Math.round(IconCaptchaPolyfills.width(e)),f=new Date,p=!0,void(null!=t&&t.expiredAt&&(t=t.expiredAt-Date.now(),d=setTimeout(S,t)))}P(!0,"The IconCaptcha could not be loaded.","Invalid data was returned by the captcha back-end service. Make sure IconCaptcha is installed/configured properly.")},error:function(){return A(-1)}})}function b(){l.classList.remove("iconcaptcha-error"),IconCaptchaPolyfills.empty(r),r.insertAdjacentHTML("beforeend","<canvas class='iconcaptcha-modal__body-icons'></canvas>"),m(),IconCaptchaPolyfills.trigger(l,"refreshed",{captchaId:c})}function _(e,t){void 0!==e&&void 0!==t&&(h=!0,O(),e=Math.round(e),t=Math.round(t),n.style.display="none",t=T({widgetId:c,challengeId:a,action:"SELECTION",x:e,y:t,width:u,token:o}),IconCaptchaPolyfills.ajax({url:i.general.endpoint,type:"POST",headers:L(o),data:{payload:t},success:function(e){e=j(e);e.completed?w(e):C()},error:function(){return A(-1)}}))}function w(e){r.classList.remove("captcha-opacity"),D(l.querySelector(".iconcaptcha-modal__body-selection")),null!=e&&e.expiredAt&&(o=e.expiredAt-Date.now(),d=setTimeout(S,o));var t,n=_createForOfIteratorHelper(l.querySelectorAll(".iconcaptcha-modal__header, .iconcaptcha-modal__footer, .iconcaptcha-modal__body"));try{for(n.s();!(t=n.n()).done;){var a=t.value;a.parentNode.removeChild(a)}}catch(e){n.e(e)}finally{n.f()}l.classList.add("iconcaptcha-success");var e='<div class="iconcaptcha-modal__body">'+'<div class="iconcaptcha-modal__body-title">'.concat(i.locale.correct,"</div>")+'<div class="iconcaptcha-modal__body-checkmark">'.concat('<svg viewBox="0 0 98.5 98.5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path class="checkmark" d="M81.7 17.8C73.5 9.3 62 4 49.2 4 24.3 4 4 24.3 4 49.2s20.3 45.2 45.2 45.2 45.2-20.3 45.2-45.2c0-8.6-2.4-16.6-6.5-23.4L45.6 68.2 24.7 47.3" fill="none" stroke-miterlimit="10" stroke-width="8"/></svg>',"</div>"),o=i.general.showCredits?"":"display: none";e+="<div class='iconcaptcha-modal__body-info' style='".concat(o,"'>")+"<a href='".concat(k,"' target='_blank' rel='follow' title='").concat(x,"'>IconCaptcha ©</a>")+"</div>",e+="</div>",l.querySelector(".iconcaptcha-modal").innerHTML+=e,h=!1,IconCaptchaPolyfills.trigger(l,"success",{captchaId:c})}
2function C(e,t,n){n=!(2<arguments.length&&void 0!==n)||n;r.classList.remove("captcha-opacity"),D(l.querySelector(".iconcaptcha-modal__body-selection")),e=e||i.locale.incorrect.title,t=t||i.locale.incorrect.subtitle,l.classList.add("iconcaptcha-error"),r.innerHTML='<div class="iconcaptcha-modal__body-title">'.concat(e,"</div>")+'<div class="iconcaptcha-modal__body-subtitle">'.concat(t,"</div>"),h=!1,IconCaptchaPolyfills.trigger(l,"error",{captchaId:c}),n&&setTimeout(b,i.security.incorrectSelectionResetDelay)}function I(){r.classList.add("captcha-opacity"),r.insertAdjacentHTML("beforeend",'<div class="captcha-loader"></div>')}function S(){a=void 0,s=p=!1,b(),IconCaptchaPolyfills.trigger(l,"invalidated",{captchaId:c})}function O(){null!==d&&(clearTimeout(d),d=null)}function A(e,t){switch(e){case"too-many-attempts":C(i.locale.timeout.title,i.locale.timeout.subtitle,!1);var n=l.querySelector(".iconcaptcha-modal__header");n.parentNode.removeChild(n),IconCaptchaPolyfills.trigger(l,"timeout",{captchaId:c}),setTimeout(S,t);break;case"invalid-form-token":P(!0,"Captcha form token is missing or incorrect.","A server request was made without including a captcha token, however this option is enabled.");break;default:P(!0,"An unexpected error occurred.","An unexpected error occurred while IconCaptcha performed an action.")}}function P(e,t,n){n=2<arguments.length&&void 0!==n?n:"";C("Captcha Error",t,!1),console.error(n),e&&IconCaptchaPolyfills.trigger(l,"error",{captchaId:c})}function T(e){return btoa(JSON.stringify(_objectSpread(_objectSpread({},e),{},{timestamp:Date.now(),initTimestamp:v})))}function j(e){return JSON.parse(atob(e))}function L(e){return e?{"X-IconCaptcha-Token":e}:{}}function D(e){if(e&&e._ic_listeners)for(var t in e._ic_listeners)e.removeEventListener(t,e._ic_listeners[t])}function q(e){var t;null!=e.currentTarget&&(t=IconCaptchaPolyfills.offset(e.currentTarget),n.style.left=Math.round(e.pageX-t.left)-8+"px",n.style.top=Math.round(e.pageY-t.top)-7+"px")}P(!0,"IconCaptcha was configured incorrectly","The IconCaptcha option `general.endpoint` has not been set.")};return e}();null!=window.jQuery&&function(t){t.fn.extend({iconCaptcha:function(e){var n=[];return t.each(this,function(e,t){n.push(t)}),IconCaptcha.$init(n,e)}})}(jQuery);
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.