/* @license GNU-GPL-2.0-or-later https://www.drupal.org/licensing/faq */ ((Drupal,$)=>{Drupal.behaviors.spamspan={attach:(context)=>{$("span.spamspan",context).each(function(){if($("span.o",this).length)$("span.o",this).replaceWith(".");const _mail=`${$("span.u",this).text()}@${$("span.d",this).text()}`.replace(/\s+/g,"");let _mailto=`mailto:${_mail}`;if($("span.h",this).length){const _headerText=$("span.h",this).text().replace(/^ ?\((.*)\) ?$/,"$1");const _headers=$.map(_headerText.split(/, /),(n)=>n.replace(/: /,"="));const _headerString=_headers.join("&");if(_headerString)_mailto+=`?${_headerString}`;}let _anchorContent=$("span.t",this).html();if(_anchorContent){_anchorContent=_anchorContent.replace(/^ ?\(([^]*)\) ?$/,"$1");_anchorContent=_anchorContent.replaceAll("[at]","@").replaceAll("[dot]",".");}let _attributes='';$.each(this.attributes,function(){if(this.specified&&this.name.startsWith("data-spamspan-"))_attributes+=`${this.name.substring("data-spamspan-".length)}="${this.value}" `;});let _tag="";if(_attributes)_tag=``;$(this).after($(_tag).attr("href",_mailto).html(_anchorContent||_mail).addClass("spamspan")).remove();});}};})(Drupal,jQuery);; (function($,drupalSettings){setTimeout(()=>{$.ajax({type:'POST',cache:false,url:drupalSettings.statistics.url,data:drupalSettings.statistics.data});});})(jQuery,drupalSettings);; (function($,Drupal,debounce){$.fn.drupalGetSummary=function(){const callback=this.data('summaryCallback');if(!this[0]||!callback)return '';const result=callback(this[0]);return result?result.trim():'';};$.fn.drupalSetSummary=function(callback){const self=this;if(typeof callback!=='function'){const val=callback;callback=function(){return val;};}return (this.data('summaryCallback',callback).off('formUpdated.summary').on('formUpdated.summary',()=>{self.trigger('summaryUpdated');}).trigger('summaryUpdated'));};Drupal.behaviors.formSingleSubmit={attach(){function onFormSubmit(e){const $form=$(e.currentTarget);const formValues=$form.serialize();const previousValues=$form.attr('data-drupal-form-submit-last');if(previousValues===formValues)e.preventDefault();else $form.attr('data-drupal-form-submit-last',formValues);}$(once('form-single-submit','body')).on('submit.singleSubmit','form:not([method~="GET"])',onFormSubmit);}};function triggerFormUpdated(element){$(element).trigger('formUpdated');}function fieldsList(form){return [].map.call(form.querySelectorAll('[name][id]'),(el)=>el.id);}Drupal.behaviors.formUpdated={attach(context){const $context=$(context);const contextIsForm=context.tagName==='FORM';const $forms=$(once('form-updated',contextIsForm?$context:$context.find('form')));let formFields;if($forms.length)$.makeArray($forms).forEach((form)=>{const events='change.formUpdated input.formUpdated ';const eventHandler=debounce((event)=>{triggerFormUpdated(event.target);},300);formFields=fieldsList(form).join(',');form.setAttribute('data-drupal-form-fields',formFields);$(form).on(events,eventHandler);});if(contextIsForm){formFields=fieldsList(context).join(',');const currentFields=$(context).attr('data-drupal-form-fields');if(formFields!==currentFields)triggerFormUpdated(context);}},detach(context,settings,trigger){const $context=$(context);const contextIsForm=context.tagName==='FORM';if(trigger==='unload')once.remove('form-updated',contextIsForm?$context:$context.find('form')).forEach((form)=>{form.removeAttribute('data-drupal-form-fields');$(form).off('.formUpdated');});}};Drupal.behaviors.fillUserInfoFromBrowser={attach(context,settings){const userInfo=['name','mail','homepage'];const $forms=$(once('user-info-from-browser','[data-user-info-from-browser]'));if($forms.length)userInfo.forEach((info)=>{const $element=$forms.find(`[name=${info}]`);const browserData=localStorage.getItem(`Drupal.visitor.${info}`);if(!$element.length)return;const emptyValue=$element[0].value==='';const defaultValue=$element.attr('data-drupal-default-value')===$element[0].value;if(browserData&&(emptyValue||defaultValue))$element.each(function(index,item){item.value=browserData;});});$forms.on('submit',()=>{userInfo.forEach((info)=>{const $element=$forms.find(`[name=${info}]`);if($element.length)localStorage.setItem(`Drupal.visitor.${info}`,$element[0].value);});});}};const handleFragmentLinkClickOrHashChange=(e)=>{let url;if(e.type==='click')url=e.currentTarget.location?e.currentTarget.location:e.currentTarget;else url=window.location;const hash=url.hash.substring(1);if(hash){const $target=$(`#${hash}`);$('body').trigger('formFragmentLinkClickOrHashChange',[$target]);setTimeout(()=>$target.trigger('focus'),300);}};const debouncedHandleFragmentLinkClickOrHashChange=debounce(handleFragmentLinkClickOrHashChange,300,true);$(window).on('hashchange.form-fragment',debouncedHandleFragmentLinkClickOrHashChange);$(document).on('click.form-fragment','a[href*="#"]',debouncedHandleFragmentLinkClickOrHashChange);})(jQuery,Drupal,Drupal.debounce);; (function(Drupal,drupalSettings){"use strict";Drupal.antibot={};Drupal.behaviors.antibot={attach:function(context){drupalSettings.antibot.human=false;document.body.addEventListener('mousemove',function(){Drupal.antibot.unlockForms();});document.body.addEventListener('touchmove',function(){Drupal.antibot.unlockForms();});document.body.addEventListener('keydown',function(e){if((e.code=='Tab')||(e.code=='Enter'))Drupal.antibot.unlockForms();});}};Drupal.antibot.unlockForms=function(){if(!drupalSettings.antibot.human){if(drupalSettings.antibot.forms!=undefined)Object.values(drupalSettings.antibot.forms).forEach(function(config){const form=document.getElementById(config.id);if(form){form.setAttribute('action',form.getAttribute('data-action'));const input=form.querySelector('input[name="antibot_key"]');if(input)input.value=config.key.split("").reverse().join("").match(/.{1,2}/g).map((value)=>value.split("").reverse().join("")).join("");}});drupalSettings.antibot.human=true;}};})(Drupal,drupalSettings);;