1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 2/* core/misc/progress.js */ 3(function($,Drupal){Drupal.theme.progressBar=function(id){const escapedId=Drupal.checkPlain(id);return(`<div id="${escapedId}" class="progress" aria-live="polite">`+'<div class="progress__label"> </div>'+'<div class="progress__track"><div class="progress__bar"></div></div>'+'<div class="progress__percentage"></div>'+'<div class="progress__description"> </div>'+'</div>');};Drupal.ProgressBar=function(id,updateCallback,method,errorCallback){this.id=id;this.method=method||'GET';this.updateCallback=updateCallback;this.errorCallback=errorCallback;this.element=$(Drupal.theme('progressBar',id));};$.extend(Drupal.ProgressBar.prototype,{setProgress(percentage,message,label){if(percentage>=0&&percentage<=100){$(this.element).find('div.progress__bar').each(function(){this.style.width=`${percentage}%`;});$(this.element).find('div.progress__percentage').html(`${percentage}%`);} 4$('div.progress__description',this.element).html(message);$('div.progress__label',this.element).html(label);if(this.updateCallback){this.updateCallback(percentage,message,this);}},startMonitoring(uri,delay){this.delay=delay;this.uri=uri;this.sendPing();},stopMonitoring(){clearTimeout(this.timer);this.uri=null;},sendPing(){if(this.timer){clearTimeout(this.timer);} 5if(this.uri){const pb=this;let uri=this.uri;if(!uri.includes('?')){uri+='?';}else{uri+='&';} 6uri+='_format=json';$.ajax({type:this.method,url:uri,data:'',dataType:'json',success(progress){if(progress.status===0){pb.displayError(progress.data);return;} 7pb.setProgress(progress.percentage,progress.message,progress.label,);pb.timer=setTimeout(()=>{pb.sendPing();},pb.delay);},error(xmlhttp){const e=new Drupal.AjaxError(xmlhttp,pb.uri);pb.displayError(`<pre>${e.message}</pre>`);},});}},displayError(string){const error=$('<div class="messages messages--error"></div>').html(string,);$(this.element).before(error).hide();if(this.errorCallback){this.errorCallback(this);}},},);})(jQuery,Drupal); 8/* !core/misc/progress.js */; 9/* @license MIT https://raw.githubusercontent.com/muicss/loadjs/4.3.0/LICENSE.txt */ 10loadjs=function(){var h=function(){},o={},c={},f={};function u(e,n){if(e){var t=f[e];if(c[e]=n,t)for(;t.length;)t[0](e,n),t.splice(0,1)}}function l(e,n){e.call&&(e={success:e}),n.length?(e.error||h)(n):(e.success||h)(e)}function p(t,r,i,s){var o,e,u,n=document,c=i.async,f=(i.numRetries||0)+1,l=i.before||h,a=t.replace(/[\?|#].*$/,""),d=t.replace(/^(css|img|module|nomodule)!/,"");if(s=s||0,/(^css!|\.css$)/.test(a))(u=n.createElement("link")).rel="stylesheet",u.href=d,(o="hideFocus"in u)&&u.relList&&(o=0,u.rel="preload",u.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(a))(u=n.createElement("img")).src=d;else if((u=n.createElement("script")).src=d,u.async=void 0===c||c,e="noModule"in u,/^module!/.test(a)){if(!e)return r(t,"l");u.type="module"}else if(/^nomodule!/.test(a)&&e)return r(t,"l");!(u.onload=u.onerror=u.onbeforeload=function(e){var n=e.type[0];if(o)try{u.sheet.cssText.length||(n="e")}catch(e){18!=e.code&&(n="e")}if("e"==n){if((s+=1)<f)return p(t,r,i,s)}else if("preload"==u.rel&&"style"==u.as)return u.rel="stylesheet";r(t,n,e.defaultPrevented)})!==l(t,u)&&n.head.appendChild(u)}function t(e,n,t){var r,i;if(n&&n.trim&&(r=n),i=(r?t:n)||{},r){if(r in o)throw"LoadJS";o[r]=!0}function s(n,t){!function(e,r,n){var t,i,s=(e=e.push?e:[e]).length,o=s,u=[];for(t=function(e,n,t){if("e"==n&&u.push(e),"b"==n){if(!t)return;u.push(e)}--s||r(u)},i=0;i<o;i++)p(e[i],t,n)}(e,function(e){l(i,e),n&&l({success:n,error:t},e),u(r,e)},i)}if(i.returnPromise)return new Promise(s);s()}return t.ready=function(e,n){return function(e,t){e=e.push?e:[e];var n,r,i,s=[],o=e.length,u=o;
10for(n=function(e,n){n.length&&s.push(e),--u||t(s)};o--;)r=e[o],(i=c[r])?n(r,i):(f[r]=f[r]||[]).push(n)}(e,function(e){l(n,e)}),t},t.done=function(e){u(e,[])},t.reset=function(){o={},c={},f={}},t.isDefined=function(e){return e in o},t}();; 11/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 12/* core/misc/debounce.js */ 13Drupal.debounce=function(func,wait,immediate){let timeout;let result;return function(...args){const context=this;const later=function(){timeout=null;if(!immediate){result=func.apply(context,args);}};const callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,wait);if(callNow){result=func.apply(context,args);} 14return result;};}; 15/* !core/misc/debounce.js */; 16/* core/misc/announce.js */ 17(function(Drupal,debounce){let liveElement;const announcements=[];Drupal.behaviors.drupalAnnounce={attach(context){if(!liveElement){liveElement=document.createElement('div');liveElement.id='drupal-live-announce';liveElement.className='visually-hidden';liveElement.setAttribute('aria-live','polite');liveElement.setAttribute('aria-busy','false');document.body.appendChild(liveElement);}},};function announce(){const text=[];let priority='polite';let announcement;const il=announcements.length;for(let i=0;i<il;i++){announcement=announcements.pop();text.unshift(announcement.text);if(announcement.priority==='assertive'){priority='assertive';}} 18if(text.length){liveElement.innerHTML='';liveElement.setAttribute('aria-busy','true');liveElement.setAttribute('aria-live',priority);liveElement.innerHTML=text.join('\n');liveElement.setAttribute('aria-busy','false');}} 19Drupal.announce=function(text,priority){announcements.push({text,priority,});return debounce(announce,200)();};})(Drupal,Drupal.debounce); 20/* !core/misc/announce.js */; 21/* core/misc/message.js */ 22((Drupal)=>{Drupal.Message=class{constructor(messageWrapper=null){if(!messageWrapper){this.messageWrapper=Drupal.Message.defaultWrapper();}else{this.messageWrapper=messageWrapper;}} 23static defaultWrapper(){let wrapper=document.querySelector('[data-drupal-messages]')||document.querySelector('[data-drupal-messages-fallback]');if(!wrapper){wrapper=document.createElement('div');document.body.appendChild(wrapper);} 24if(wrapper.hasAttribute('data-drupal-messages-fallback')){wrapper.removeAttribute('data-drupal-messages-fallback');wrapper.classList.remove('hidden');} 25wrapper.setAttribute('data-drupal-messages','');return wrapper.innerHTML===''?Drupal.Message.messageInternalWrapper(wrapper):wrapper.firstElementChild;} 26static getMessageTypeLabels(){return{status:Drupal.t('Status message'),error:Drupal.t('Error message'),warning:Drupal.t('Warning message'),};} 27add(message,options={}){if(!options.hasOwnProperty('type')){options.type='status';} 28if(typeof message!=='string'){throw new Error('Message must be a string.');} 29Drupal.Message.announce(message,options);options.id=options.id?String(options.id):`${options.type}-${Math.random().toFixed(15).replace('0.', '')}`;if(!Drupal.Message.getMessageTypeLabels().hasOwnProperty(options.type)){const{type}=options;throw new Error(`The message type, ${type}, is not present in Drupal.Message.getMessageTypeLabels().`,);} 30this.messageWrapper.appendChild(Drupal.theme('message',{text:message},options),);return options.id;} 31select(id){return this.messageWrapper.querySelector(`[data-drupal-message-id^="${id}"]`,);} 32remove(id){return this.messageWrapper.removeChild(this.select(id));} 33clear(){this.messageWrapper.querySelectorAll('[data-drupal-message-id]').forEach((message)=>{this.messageWrapper.removeChild(message);});} 34static announce(message,options){if(!options.priority&&(options.type==='warning'||options.type==='error')){options.priority='assertive';} 35if(options.announce!==''){Drupal.announce(options.announce||message,options.priority);}} 36static messageInternalWrapper(messageWrapper){const innerWrapper=document.createElement('div');innerWrapper.setAttribute('class','messages__wrapper');messageWrapper.insertAdjacentElement('afterbegin',innerWrapper);return innerWrapper;}};Drupal.theme.message=({text},{type,id})=>
36{const messagesTypes=Drupal.Message.getMessageTypeLabels();const messageWrapper=document.createElement('div');messageWrapper.setAttribute('class',`messages messages--${type}`);messageWrapper.setAttribute('role',type==='error'||type==='warning'?'alert':'status',);messageWrapper.setAttribute('data-drupal-message-id',id);messageWrapper.setAttribute('data-drupal-message-type',type);messageWrapper.setAttribute('aria-label',messagesTypes[type]);messageWrapper.innerHTML=`${text}`;return messageWrapper;};})(Drupal); 37/* !core/misc/message.js */; 38/* core/misc/ajax.js */ 39(function($,window,Drupal,drupalSettings,loadjs,{isFocusable,tabbable},){Drupal.behaviors.AJAX={attach(context,settings){function loadAjaxBehavior(base){const elementSettings=settings.ajax[base];if(typeof elementSettings.selector==='undefined'){elementSettings.selector=`#${base}`;} 40once('drupal-ajax',$(elementSettings.selector)).forEach((el)=>{elementSettings.element=el;elementSettings.base=base;Drupal.ajax(elementSettings);});} 41Object.keys(settings.ajax||{}).forEach(loadAjaxBehavior);Drupal.ajax.bindAjaxLinks(document.body);once('ajax','.use-ajax-submit').forEach((el)=>{const elementSettings={url:$(el.form).attr('action'),setClick:true,event:'click',progress:{type:'throbber'},base:el.id,element:el,};Drupal.ajax(elementSettings);});},detach(context,settings,trigger){if(trigger==='unload'){Drupal.ajax.expired().forEach((instance)=>{Drupal.ajax.instances[instance.instanceIndex]=null;});}},};Drupal.AjaxError=function(xmlhttp,uri,customMessage){let statusCode;let statusText;let responseText;if(xmlhttp.status){statusCode=`\n${Drupal.t('An AJAX HTTP error occurred.')}\n${Drupal.t( 42 'HTTP Result Code: !status', 43 { 44 '!status': xmlhttp.status, 45 }, 46 )}`;}else{statusCode=`\n${Drupal.t( 47 'An AJAX HTTP request terminated abnormally.', 48 )}`;} 49statusCode+=`\n${Drupal.t('Debugging information follows.')}`;const pathText=`\n${Drupal.t('Path: !uri', { '!uri': uri })}`;statusText='';try{statusText=`\n${Drupal.t('StatusText: !statusText', { 50 '!statusText': xmlhttp.statusText.trim(), 51 })}`;}catch(e){} 52responseText='';try{responseText=`\n${Drupal.t('ResponseText: !responseText', { 53 '!responseText': xmlhttp.responseText.trim(), 54 })}`;}catch(e){} 55responseText=responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi,'');responseText=responseText.replace(/[\n]+\s+/g,'\n');const readyStateText=xmlhttp.status===0?`\n${Drupal.t('ReadyState: !readyState', { 56 '!readyState': xmlhttp.readyState, 57 })}`:'';customMessage=customMessage?`\n${Drupal.t('CustomMessage: !customMessage', { 58 '!customMessage': customMessage, 59 })}`:'';this.message=statusCode+ 60pathText+ 61statusText+ 62customMessage+ 63responseText+ 64readyStateText;this.name='AjaxError';if(!Drupal.AjaxError.messages){Drupal.AjaxError.messages=new Drupal.Message();} 65Drupal.AjaxError.messages.add(Drupal.t("Oops, something went wrong. Check your browser's developer console for more details.",),{type:'error',},);};Drupal.AjaxError.prototype=new Error();Drupal.AjaxError.prototype.constructor=Drupal.AjaxError;Drupal.ajax=function(settings){if(arguments.length!==1){throw new Error('Drupal.ajax() function must be called with one configuration object only',);} 66const base=settings.base||false;const element=settings.element||false;delete settings.base;delete settings.element;if(!settings.progress&&!element){settings.progress=false;} 67const ajax=new Drupal.Ajax(base,element,settings);ajax.instanceIndex=Drupal.ajax.instances.length;Drupal.ajax.instances.push(ajax);return ajax;};Drupal.ajax.instances=[];Drupal.ajax.expired=function(){return Drupal.ajax.instances.filter((instance)=>instance&&instance.element!==false&&!document.body.contains(instance.element),);};Drupal.ajax.bindAjaxLinks=(element)=>{once('ajax','.use-ajax',element).forEach((ajaxLink)=>{const $linkElement=$(ajaxLink);const elementSettings={progress:{type:'throbber'},dialogType:$linkElement.data('dialog-type'),dialog:$linkElement.data('dialog-options'),dialogRenderer:$linkElement.data('dialog-renderer'),base:$linkElement.attr('id'),element:ajaxLink,};const href=$linkElement.attr('href');if(href){elementSettings.url=href;elementSettings.event='click';} 68const httpMethod=$linkElement.data('ajax-http-method');if(httpMethod){elementSettings.httpMethod=httpMethod;} 69Drupal.ajax(elementSettings);});};Drupal.Ajax=function(base,element,elementSettings){const defaults={httpMethod:'POST',event:element?'mousedown':null,keypress:true,selector:base?`#${base}`:null,effect:'none',speed:'none',method:'replaceWith',progress:{type:'throbber',message:Drupal.t('Processing...'),},submit:{js:true,},};$.extend(this,defaults,elementSettings);this.commands=new Drupal.AjaxCommands();this.instanceIndex=false;if(this.wrapper){this.wrapper=`#${this.wrapper}`;} 70this.element=element;this.preCommandsFocusedElementSelector=null;this.elementSettings=elementSettings;if(this.element?.form){this.$form=$(this.element.form);} 71if(!this.url){const $element=$(this.element);if(this.element.tagName==='A'){this.url=$element.attr('href');}else if(this.element&&element.form){this.url=this.$form.attr('action');}} 72const originalUrl=this.url;this.url=this.url.replace(/\/nojs(\/|$|\?|#)/,'/ajax$1');if(drupalSettings.ajaxTrustedUrl.hasOwnProperty(originalUrl)){drupalSettings.ajaxTrustedUrl[this.url]=true;} 73const ajax=this;ajax.options={url:ajax.url,data:ajax.submit,isInProgress(){return ajax.ajaxing;},beforeSerialize(elementSettings,options){return ajax.beforeSerialize(elementSettings,options);},beforeSubmit(formValues,elementSettings,options){ajax.ajaxing=true;ajax.preCommandsFocusedElementSelector=null;return ajax.beforeSubmit(formValues,elementSettings,options);},beforeSend(xmlhttprequest,options){ajax.ajaxing=true;return ajax.beforeSend(xmlhttprequest,options);},success(response,status,xmlhttprequest){ajax.preCommandsFocusedElementSelector=document.activeElement.getAttribute('data-drupal-selector');if(typeof response==='string'){response=JSON.parse(response);} 74if(response!==null&&!drupalSettings.ajaxTrustedUrl.hasOwnProperty(ajax.url)){if(xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token')!=='1'){const customMessage=Drupal.t('The response failed verification so will not be processed.',);return ajax.error(xmlhttprequest,ajax.url,customMessage);}} 75return(Promise.resolve(ajax.success(response,status)).then(()=>{ajax.ajaxing=false;
75$(document).trigger('ajaxSuccess',[xmlhttprequest,this]);$(document).trigger('ajaxComplete',[xmlhttprequest,this]);if(--$.active===0){$(document).trigger('ajaxStop');}}));},error(xmlhttprequest,status,error){ajax.ajaxing=false;},complete(xmlhttprequest,status){if(status==='error'||status==='parsererror'){return ajax.error(xmlhttprequest,ajax.url);}},dataType:'json',jsonp:false,method:ajax.httpMethod,};if(elementSettings.dialog){ajax.options.data.dialogOptions=elementSettings.dialog;} 76if(!ajax.options.url.includes('?')){ajax.options.url+='?';}else{ajax.options.url+='&';} 77let wrapper=`drupal_${elementSettings.dialogType || 'ajax'}`;if(elementSettings.dialogRenderer){wrapper+=`.${elementSettings.dialogRenderer}`;} 78ajax.options.url+=`${Drupal.ajax.WRAPPER_FORMAT}=${wrapper}`;$(ajax.element).on(elementSettings.event,function(event){if(!drupalSettings.ajaxTrustedUrl.hasOwnProperty(ajax.url)&&!Drupal.url.isLocal(ajax.url)){throw new Error(Drupal.t('The callback URL is not local and not trusted: !url',{'!url':ajax.url,}),);} 79return ajax.eventResponse(this,event);});if(elementSettings.keypress){$(ajax.element).on('keypress',function(event){return ajax.keypressResponse(this,event);});} 80if(elementSettings.prevent){$(ajax.element).on(elementSettings.prevent,false);}};Drupal.ajax.WRAPPER_FORMAT='_wrapper_format';Drupal.Ajax.AJAX_REQUEST_PARAMETER='_drupal_ajax';Drupal.Ajax.prototype.execute=function(){if(this.ajaxing){return;} 81try{this.beforeSerialize(this.element,this.options);return $.ajax(this.options);}catch(e){this.ajaxing=false;window.alert(`An error occurred while attempting to process ${this.options.url}: ${e.message}`,);return $.Deferred().reject();}};Drupal.Ajax.prototype.keypressResponse=function(element,event){const ajax=this;if(event.which===13||(event.which===32&&element.type!=='text'&&element.type!=='textarea'&&element.type!=='tel'&&element.type!=='number')){event.preventDefault();event.stopPropagation();$(element).trigger(ajax.elementSettings.event);}};Drupal.Ajax.prototype.eventResponse=function(element,event){event.preventDefault();event.stopPropagation();const ajax=this;if(ajax.ajaxing){return;} 82try{if(ajax.$form){if(ajax.setClick){element.form.clk=element;} 83ajax.$form.ajaxSubmit(ajax.options);}else{ajax.beforeSerialize(ajax.element,ajax.options);$.ajax(ajax.options);}}catch(e){ajax.ajaxing=false;window.alert(`An error occurred while attempting to process ${ajax.options.url}: ${e.message}`,);}};Drupal.Ajax.prototype.beforeSerialize=function(element,options){if(this.$form&&document.body.contains(this.$form.get(0))){const settings=this.settings||drupalSettings;Drupal.detachBehaviors(this.$form.get(0),settings,'serialize');} 84options.data[Drupal.Ajax.AJAX_REQUEST_PARAMETER]=1;const pageState=drupalSettings.ajaxPageState;options.data['ajax_page_state[theme]']=pageState.theme;options.data['ajax_page_state[theme_token]']=pageState.theme_token;options.data['ajax_page_state[libraries]']=pageState.libraries;};Drupal.Ajax.prototype.beforeSubmit=function(formValues,element,options){};Drupal.Ajax.prototype.beforeSend=function(xmlhttprequest,options){if(this.$form){options.extraData=options.extraData||{};options.extraData.ajax_iframe_upload='1';const v=$.fieldValue(this.element);if(v!==null){options.extraData[this.element.name]=v;}} 85$(this.element).prop('disabled',true);if(!this.progress||!this.progress.type){return;} 86const progressIndicatorMethod=`setProgressIndicator${this.progress.type 87 .slice(0, 1) 88 .toUpperCase()}${this.progress.type.slice(1).toLowerCase()}`;if(progressIndicatorMethod in this&&typeof this[progressIndicatorMethod]==='function'){this[progressIndicatorMethod].call(this);}};Drupal.theme.ajaxProgressThrobber=(message)=>{const messageMarkup=typeof message==='string'?Drupal.theme('ajaxProgressMessage',message):'';const throbber='<div class="throbber"> </div>';return`<div class="ajax-progress ajax-progress-throbber">${throbber}${messageMarkup}</div>`;};Drupal.theme.ajaxProgressIndicatorFullscreen=()=>'<div class="ajax-progress ajax-progress-fullscreen"> </div>';Drupal.theme.ajaxProgressMessage=(message)=>`<div class="message">${message}</div>`;Drupal.theme.ajaxProgressBar=($element)=>$('<div class="ajax-progress ajax-progress-bar"></div>').append($element);Drupal.Ajax.prototype.setProgressIndicatorBar=function(){const progressBar=new Drupal.ProgressBar(`ajax-progress-${this.element.i
88d}`,$.noop,this.progress.method,$.noop,);if(this.progress.message){progressBar.setProgress(-1,this.progress.message);} 89if(this.progress.url){progressBar.startMonitoring(this.progress.url,this.progress.interval||1500,);} 90this.progress.element=$(Drupal.theme('ajaxProgressBar',progressBar.element),);this.progress.object=progressBar;$(this.element).after(this.progress.element);};Drupal.Ajax.prototype.setProgressIndicatorThrobber=function(){this.progress.element=$(Drupal.theme('ajaxProgressThrobber',this.progress.message),);if($(this.element).closest('[data-drupal-ajax-container]').length){$(this.element).closest('[data-drupal-ajax-container]').after(this.progress.element);}else{$(this.element).after(this.progress.element);}};Drupal.Ajax.prototype.setProgressIndicatorFullscreen=function(){this.progress.element=$(Drupal.theme('ajaxProgressIndicatorFullscreen'));$('body').append(this.progress.element);};Drupal.Ajax.prototype.commandExecutionQueue=function(response,status){const ajaxCommands=this.commands;return Object.keys(response||{}).reduce((executionQueue,key)=>executionQueue.then(()=>{const{command}=response[key];if(command&&ajaxCommands[command]){return ajaxCommands[command](this,response[key],status);}}),Promise.resolve(),);};Drupal.Ajax.prototype.success=function(response,status){if(this.progress.element){$(this.progress.element).remove();} 91if(this.progress.object){this.progress.object.stopMonitoring();} 92$(this.element).prop('disabled',false);const elementParents=$(this.element).parents('[data-drupal-selector]').addBack().toArray();const focusChanged=Object.keys(response||{}).some((key)=>{const{command,method}=response[key];return(command==='focusFirst'||command==='openDialog'||(command==='invoke'&&method==='focus'));});return(this.commandExecutionQueue(response,status).then(()=>{if(!focusChanged){let target=false;if(this.element){if($(this.element).data('refocus-blur')&&this.preCommandsFocusedElementSelector){target=document.querySelector(`[data-drupal-selector="${this.preCommandsFocusedElementSelector}"]`,);} 93if(!target&&!$(this.element).data('disable-refocus')){for(let n=elementParents.length-1;!target&&n>=0;n--){target=document.querySelector(`[data-drupal-selector="${elementParents[n].getAttribute( 94 'data-drupal-selector', 95 )}"]`,);}}} 96if(target){$(target).trigger('focus');}} 97if(this.$form&&document.body.contains(this.$form.get(0))){const settings=this.settings||drupalSettings;Drupal.attachBehaviors(this.$form.get(0),settings);} 98this.settings=null;}).catch((error)=>console.error(Drupal.t('An error occurred during the execution of the Ajax response: !error',{'!error':error,},),),));};Drupal.Ajax.prototype.getEffect=function(response){const type=response.effect||this.effect;const speed=response.speed||this.speed;const effect={};if(type==='none'){effect.showEffect='show';effect.hideEffect='hide';effect.showSpeed='';}else if(type==='fade'){effect.showEffect='fadeIn';effect.hideEffect='fadeOut';effect.showSpeed=speed;}else{effect.showEffect=`${type}Toggle`;effect.hideEffect=`${type}Toggle`;effect.showSpeed=speed;} 99return effect;};Drupal.Ajax.prototype.error=function(xmlhttprequest,uri,customMessage){if(this.progress.element){$(this.progress.element).remove();} 100if(this.progress.object){this.progress.object.stopMonitoring();} 101$(this.wrapper).show();$(this.element).prop('disabled',false);if(this.$form&&document.body.contains(this.$form.get(0))){const settings=this.settings||drupalSettings;Drupal.attachBehaviors(this.$form.get(0),settings);} 102throw new Drupal.AjaxError(xmlhttprequest,uri,customMessage);};Drupal.theme.ajaxWrapperNewContent=($newContent,ajax,response)=>(response.effect||ajax.effect)!=='none'&&$newContent.filter((i)=>!(($newContent[i].nodeName==='#comment'||($newContent[i].nodeName==='#text'&&/^(\s|\n|\r)*$/.test($newContent[i].textContent)))),).length>1?Drupal.theme('ajaxWrapperMultipleRootElements',$newContent):$newContent;Drupal.theme.ajaxWrapperMultipleRootElements=($elements)=>$('<div></div>').append($elements);Drupal.AjaxCommands=function(){};Drupal.AjaxCommands.prototype={insert(ajax,response){const $wrapper=response.selector?$(response.selector):$(ajax.wrapper);const method=response.method||ajax.method;const effect=ajax.getEffect(response);const settings=response.settings||ajax.settings||drupalSettings;const parseHTML=(htmlString)=>{const fragment=document.createDocumentFragment();const template=fragment.appendChild(document.createElement('template'),);template.innerHTML=htmlString;return template.content.childNodes;};let $newContent=$(parseHTML(response.data));
102$newContent=Drupal.theme('ajaxWrapperNewContent',$newContent,ajax,response,);switch(method){case'html':case'replaceWith':case'replaceAll':case'empty':case'remove':Drupal.detachBehaviors($wrapper.get(0),settings);break;default:break;} 103$wrapper[method]($newContent);if(effect.showEffect!=='show'){$newContent.hide();} 104const $ajaxNewContent=$newContent.find('.ajax-new-content');if($ajaxNewContent.length){$ajaxNewContent.hide();$newContent.show();$ajaxNewContent[effect.showEffect](effect.showSpeed);}else if(effect.showEffect!=='show'){$newContent[effect.showEffect](effect.showSpeed);} 105$newContent.each((index,element)=>{if(element.nodeType===Node.ELEMENT_NODE&&document.documentElement.contains(element)){Drupal.attachBehaviors(element,settings);}});},remove(ajax,response,status){const settings=response.settings||ajax.settings||drupalSettings;$(response.selector).each(function(){Drupal.detachBehaviors(this,settings);}).remove();},changed(ajax,response,status){const $element=$(response.selector);if(!$element.hasClass('ajax-changed')){$element.addClass('ajax-changed');if(response.asterisk){$element.find(response.asterisk).append(` <abbr class="ajax-changed" title="${Drupal.t( 106 'Changed', 107 )}">*</abbr> `,);}}},alert(ajax,response,status){window.alert(response.text);},announce(ajax,response){if(response.priority){Drupal.announce(response.text,response.priority);}else{Drupal.announce(response.text);}},redirect(ajax,response,status){window.location=response.url;},css(ajax,response,status){$(response.selector).css(response.argument);},settings(ajax,response,status){const ajaxSettings=drupalSettings.ajax;if(ajaxSettings){Drupal.ajax.expired().forEach((instance)=>{if(instance.selector){const selector=instance.selector.replace('#','');if(selector in ajaxSettings){delete ajaxSettings[selector];}}});} 108if(response.merge){$.extend(true,drupalSettings,response.settings);}else{ajax.settings=response.settings;}},data(ajax,response,status){$(response.selector).data(response.name,response.value);},focusFirst(ajax,response,status){let focusChanged=false;const container=document.querySelector(response.selector);if(container){const tabbableElements=tabbable(container);if(tabbableElements.length){tabbableElements[0].focus();focusChanged=true;}else if(isFocusable(container)){container.focus();focusChanged=true;}} 109if(ajax.hasOwnProperty('element')&&!focusChanged){ajax.element.focus();}},invoke(ajax,response,status){const $element=$(response.selector);$element[response.method](...response.args);},restripe(ajax,response,status){$(response.selector).find('> tbody > tr:visible, > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even');},update_build_id(ajax,response,status){document.querySelectorAll(`input[name="form_build_id"][value="${response.old}"]`,).forEach((item)=>{item.value=response.new;});},add_css(ajax,response,status){const allUniqueBundleIds=response.data.map(function(style){const uniqueBundleId=style.href;if(!loadjs.isDefined(uniqueBundleId)){loadjs(`css!${style.href}`,uniqueBundleId,{before(path,styleEl){Object.keys(style).forEach((attributeKey)=>{styleEl.setAttribute(attributeKey,style[attributeKey]);});},});} 110return uniqueBundleId;});return new Promise((resolve,reject)=>{loadjs.ready(allUniqueBundleIds,{success(){resolve();},error(depsNotFound){const message=Drupal.t(`The following files could not be loaded: @dependencies`,{'@dependencies':depsNotFound.join(', ')},);reject(message);},});});},message(ajax,response){const messages=new Drupal.Message(document.querySelector(response.messageWrapperQuerySelector),);if(response.clearPrevious){messages.clear();} 111messages.add(response.message,response.messageOptions);},add_js(ajax,response,status){const parentEl=document.querySelector(response.selector||'body');const settings=ajax.settings||drupalSettings;const allUniqueBundleIds=response.data.map((script)=>{const uniqueBundleId=script.src;if(!loadjs.isDefined(uniqueBundleId)){loadjs(script.src,uniqueBundleId,{async:false,before(path,scriptEl){Object.keys(script).forEach((attributeKey)=>{scriptEl.setAttribute(attributeKey,script[attributeKey]);});parentEl.appendChild(scriptEl);return false;},});} 112return uniqueBundleId;});return new Promise((resolve,reject)=>{loadjs.ready(allUniqueBundleIds,{success(){Drupal.attachBehaviors(parentEl,settings);resolve();},error(depsNotFound){const message=Drupal.t(`The following files could not be loaded: @dependencies`,{'@dependencies':depsNotFound.join(', ')},);reject(message);},});});},scrollTop(ajax,response){document.querySelector(response.selector)?.scrollIntoView();},};const stopEvent=(xhr,settings)=>{return(xhr.getResponseHeader('X-Drupal-Ajax-Token')==='1'&&typeof settings.isInProgress==='function'&&settings.isInProgress());};$.extend(true,$.event.special,{ajaxSuccess:{trigger(event,xhr,settings){if(stopEvent(xhr,settings)){return false;}},},ajaxComplete:{trigger(event,xhr,settings){if(stopEvent(xhr,settings)){$.active++;return false;}},},});})(jQuery,window,Drupal,drupalSettings,loadjs,window.tabbable); 113/* !core/misc/ajax.js */; 114/* libraries/magnific-popup/dist/jquery.magnific-popup.min.js */
vendor: 20,735 bytes, line 115
115!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(window.jQuery||window.Zepto)}(function(c){function e(){}function d(e,t){m.ev.on(x+e+I,t)}function p(e,t,n,o){var i=document.createElement("div");return i.className="mfp-"+e,n&&(i.innerHTML=n),o?t&&t.appendChild(i):(i=c(i),t&&i.appendTo(t)),i}function u(e,t){m.ev.triggerHandler(x+e,t),m.st.callbacks&&(e=e.charAt(0).toLowerCase()+e.slice(1),m.st.callbacks[e])&&m.st.callbacks[e].apply(m,Array.isArray(t)?t:[t])}function f(e){return e===A&&m.currTemplate.closeBtn||(m.currTemplate.closeBtn=c(m.st.closeMarkup.replace("%title%",m.st.tClose)),A=e),m.currTemplate.closeBtn}function r(){c.magnificPopup.instance||((m=new e).init(),c.magnificPopup.instance=m)}function a(){y&&(v.after(y.addClass(l)).detach(),y=null)}function i(){n&&c(document.body).removeClass(n)}function t(){i(),m.req&&m.req.abort()}var m,o,g,s,h,A,l,v,y,n,w="Close",F="BeforeClose",C="MarkupParse",b="Open",j="Change",x="mfp",I="."+x,T="mfp-ready",N="mfp-removing",k="mfp-prevent-close",P=!!window.jQuery,_=c(window),S=(c.magnificPopup={instance:null,proto:e.prototype={constructor:e,init:function(){var e=navigator.appVersion;m.isLowIE=m.isIE8=document.all&&!document.addEventListener,m.isAndroid=/android/gi.test(e),m.isIOS=/iphone|ipad|ipod/gi.test(e),m.supportsTransition=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1}(),m.probablyMobile=m.isAndroid||m.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),g=c(document),m.popupsCache={}},open:function(e){if(!1===e.isObj){m.items=e.items.toArray(),m.index=0;for(var t,n=e.items,o=0;o<n.length;o++)if((t=(t=n[o]).parsed?t.el[0]:t)===e.el[0]){m.index=o;break}}else m.items=Array.isArray(e.items)?e.items:[e.items],m.index=e.index||0;if(!m.isOpen){m.types=[],h="",e.mainEl&&e.mainEl.length?m.ev=e.mainEl.eq(0):m.ev=g,e.key?(m.popupsCache[e.key]||(m.popupsCache[e.key]={}),m.currTemplate=m.popupsCache[e.key]):m.currTemplate={},m.st=c.extend(!0,{},c.magnificPopup.defaults,e),m.fixedContentPos="auto"===m.st.fixedContentPos?!m.probablyMobile:m.st.fixedContentPos,m.st.modal&&(m.st.closeOnContentClick=!1,m.st.closeOnBgClick=!1,m.st.showCloseBtn=!1,m.st.enableEscapeKey=!1),m.bgOverlay||(m.bgOverlay=p("bg").on("click"+I,function(){m.close()}),m.wrap=p("wrap").attr("tabindex",-1).on("click"+I,function(e){m._checkIfClose(e.target)&&m.close()}),m.container=p("container",m.wrap)),m.contentContainer=p("content"),m.st.preloader&&(m.preloader=p("preloader",m.container,m.st.tLoading));var i=c.magnificPopup.modules;for(o=0;o<i.length;o++){var r=(r=i[o]).charAt(0).toUpperCase()+r.slice(1);m["init"+r].call(m)}u("BeforeOpen"),m.st.showCloseBtn&&(m.st.closeBtnInside?(d(C,function(e,t,n,o){n.close_replaceWith=f(o.type)}),h+=" mfp-close-btn-in"):m.wrap.append(f())),m.st.alignTop&&(h+=" mfp-align-top"),m.fixedContentPos?m.wrap.css({overflow:m.st.overflowY,overflowX:"hidden",overflowY:m.st.overflowY}):m.wrap.css({top:_.scrollTop(),position:"absolute"}),!1!==m.st.fixedBgPos&&("auto"!==m.st.fixedBgPos||m.fixedContentPos)||m.bgOverlay.css({height:g.height(),position:"absolute"}),m.st.enableEscapeKey&&g.on("keyup"+I,function(e){27===e.keyCode&&m.close()}),_.on("resize"+I,function(){m.updateSize()}),m.st.closeOnContentClick||(h+=" mfp-auto-cursor"),h&&m.wrap.addClass(h);var a=m.wH=_.height(),s={},l=(m.fixedContentPos&&m._hasScrollBar(a)&&(l=m._getScrollbarSize())&&(s.marginRight=l),m.fixedContentPos&&(m.isIE7?c("body, html").css("overflow","hidden"):s.overflow="hidden"),m.st.mainClass);return m.isIE7&&(l+=" mfp-ie7"),l&&m._addClassToMFP(l),m.updateItemHTML(),u("BuildControls"),c("html").css(s),m.bgOverlay.add(m.wrap).prependTo(m.st.prependTo||c(document.body)),m._lastFocusedEl=document.activeElement,setTimeout(function(){m.content?(m._addClassToMFP(T),m._setFocus()):m.bgOverlay.addClass(T),g.on("focusin"+I,m._onFocusIn)},16),m.isOpen=!0,m.updateSize(a),u(b),e}m.updateItemHTML()},close:function(){m.isOpen&&(u(F),m.isOpen=!1,m.st.removalDelay&&!m.isLowIE&&m.supportsTransition?(m._addClassToMFP(N),setTimeout(function(){m._close()},m.st.removalDelay)):m._close())},_close:function(){u(w);var e=N+" "+T+" ";m.bgOverlay.detach(),m.wrap.detach(),m.container.empty(),m.st.mainClass&&(e+=m.st.mainClass+" "),m._removeClassFromMFP(e),m.fixedContentPos&&(e={marginRight:""},m.isIE7?c("body, html").css("overflow",""):e.overflow="",c("html").css(e)),g.off("keyup.mfp focusin"+I),m.ev.off(I),m.wrap.attr("class","mfp-wrap").removeAttr("style"),m.bgOverlay.attr("class","mfp-bg"),m.container.attr("class","mfp-container"),!m.st.showCloseBtn||m.st.closeBtnInside&&!0!==m.currTemplate[m.currItem.type]||m.currTemplate.closeBtn&&m.currTemplate.closeBtn.detach(),m.st.autoFocusLast&&m._lastFocusedEl&&c(m._lastFocusedEl).trigger("focus"),m.currItem=null,m.content=null,m.currTemplate=null,m.prevHeight=0,u("AfterClose")},updateSize:function(e){var t;m.isIOS?(t=document.documentElement.clientWidth/window.innerWidth,t=window.innerHeight*t,m.wrap.css("height",t),m.wH=t):m.wH=e||_.height(),m.fixedContentPos||m.wrap.css("height",m.wH),u("Resize")},updateItemHTML:function(){var e=m.items[m.index],t=(m.contentContainer.detach(),m.content&&m.content.detach(),(e=e.parsed?e:m.parseEl(m.index)).type),n=(u("BeforeChange",[m.currItem?m.currItem.type:"",t]),m.currItem=e,m.currTemplate[t]||(n=!!m.st[t]&&m.st[t].markup,u("FirstMarkupParse",n),m.currTemplate[t]=!n||c(n)),s&&s!==e.type&&m.container.removeClass("mfp-"+s+"-holder"),m["get"+t.charAt(0).toUpperCase()+t.slice(1)](e,m.currTemplate[t]));m.appendContent(n,t),e.preloaded=!0,u(j,e),s=e.type,m.container.prepend(m.contentContainer),u("AfterChange")},appendContent:function(e,t){(m.content=e)?m.st.showCloseBtn&&m.st.closeBtnInside&&!0===m.currTemplate[t]?m.content.find(".mfp-close").length||m.content.append(f()):m.content=e:m.content="",u("BeforeAppend"),m.container.addClass("mfp-"+t+"-holder"),m.contentContainer.append(m.content)},parseEl:function(e){var t,n=m.items[e];if((n=n.tagName?{el:c(n)}:(t=n.type,{data:n,src:n.src})).el){for(var o=m.types,i=0;i<o.length;i++)if(n.el.hasClass("mfp-"+o[i])){t=o[i];break}n.src=n.el.attr("data-mfp-src"),n.src||(n.src=n.el.attr("href"))}return n.type=t||m.st.type||"inline",n.index=e,n.parsed=!0,m.items[e]=n,u("ElementParse",n),m.items[e]},addGroup:function(t,n){function e(e){e.mfpEl=this,m._openClick(e,t,n)}var o="click.magnificPopup";(n=n||{}).mainEl=t,n.items?(n.isObj=!0,t.off(o).on(o,e)):(n.isObj=!1,n.delegate?t.off(o).on(o,n.delegate,e):(n.items=t).off(o).on(o,e))},_openClick:function(e,t,n){var o=(void 0!==n.midClick?n:c.magnificPopup.defaults).midClick;if(o||!(2===e.which||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)){o=(void 0!==n.disableOn?n:c.magnificPopup.defaults).disableOn;if(o)if("function"==typeof o){if(!o.call(m))return!0}else if(_.width()<o)return!0;e.type&&(e.preventDefault(),m.isOpen)&&e.stopPropagation(),n.el=c(e.mfpEl),n.delegate&&(n.items=t.find(n.delegate)),m.open(n)}},updateStatus:function(e,t){var n;m.preloader&&(o!==e&&m.container.removeClass("mfp-s-"+o),n={status:e,text:t=t||"loading"!==e?t:m.st.tLoading},u("UpdateStatus",n),e=n.status,t=n.text,m.st.allowHTMLInStatusIndicator?m.preloader.html(t):m.preloader.text(t),m.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),m.container.addClass("mfp-s-"+e),o=e)},_checkIfClose:function(e){if(!c(e).closest("."+k).length){var t=m.st.closeOnContentClick,n=m.st.closeOnBgClick;if(t&&n)return!0;if(!m.content||c(e).closest(".mfp-close").length||m.preloader&&e===m.preloader[0])return!0;if(e===m.content[0]||c.contains(m.content[0],e)){if(t)return!0}else if(n&&c.contains(document,e))return!0;return!1}},_addClassToMFP:function(e){m.bgOverlay.addClass(e),m.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),m.wrap.removeClass(e)},_hasScrollBar:function(e){return(m.isIE7?g.height():document.body.scrollHeight)>(e||_.height())},_setFocus:function(){(m.st.focus?m.content.find(m.st.focus).eq(0):m.wrap).trigger("focus")},_onFocusIn:function(e){if(e.target!==m.wrap[0]&&!c.contains(m.wrap[0],e.target))return m._setFocus(),!1},_parseMarkup:function(i,e,t){var r;t.data&&(e=c.extend(t.data,e)),u(C,[i,e,t]),c.each(e,function(e,t){if(void 0===t||!1===t)return!0;var n,o;1<(r=e.split("_")).length?0<(n=i.find(I+"-"+r[0])).length&&("replaceWith"===(o=r[1])?n[0]!==t[0]&&n.replaceWith(t):"img"===o?n.is("img")?n.attr("src",t):n.replaceWith(c("<img>").attr("src",t).attr("class",n.attr("class"))):n.attr(r[1],t)):m.st.allowHTMLInTemplate?i.find(I+"-"+e).html(t):i.find(I+"-"+e).text(t)})},_getScrollbarSize:function(){var e;return void 0===m.scrollbarSize&&((e=document.createElement("div")).style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),m.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),m.scrollbarSize}},modules:[],open:function(e,t){return r(),(e=e?c.extend(!0,{},e):{}).isObj=!0,e.index=t||0,this.instance.open(e)},close:function(){return c.magnificPopup.instance&&c.magnificPopup.instance.close()},registerModule:function(e,t){t.options&&(c.magnificPopup.defaults[e]=t.options),c.extend(this.proto,t.proto),this.modules.push(e)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0,allowHTMLInStatusIndicator:!1,allowHTMLInTemplate:!1}},c.fn.magnificPopup=function(e){r();var t,n,o,i=c(this);return"string"==typeof e?"open"===e?(t=P?i.data("magnificPopup"):i[0].magnificPopup,n=parseInt(arguments[1],10)||0,o=t.items?t.items[n]:(o=i,(o=t.delegate?o.find(t.delegate):o).eq(n)),m._openClick({mfpEl:o},i,t)):m.isOpen&&m[e].apply(m,Array.prototype.slice.call(arguments,1)):(e=c.extend(!0,{},e),P?i.data("magnificPopup",e):i[0].magnificPopup=e,m.addGroup(i,e)),i},"inline"),E=(c.magnificPopup.registerModule(S,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){m.types.push(S),d(w+"."+S,function(){a()})},getInline:function(e,t){var n,o,i;return a(),e.src?(n=m.st.inline,(o=c(e.src)).length?((i=o[0].parentNode)&&i.tagName&&(v||(l=n.hiddenClass,v=p(l),l="mfp-"+l),y=o.after(v).detach().removeClass(l)),m.updateStatus("ready")):(m.updateStatus("error",n.tNotFound),o=c("<div>")),e.inlineElement=o):(m.updateStatus("ready"),m._parseMarkup(t,{},e),t)}}}),"ajax");c.magnificPopup.registerModule(E,{options:{settings:null,cursor:"mfp-ajax-cur",tError:"The content could not be loaded."},proto:{initAjax:function(){m.types.push(E),n=m.st.ajax.cursor,d(w+"."+E,t),d("BeforeChange."+E,t)},getAjax:function(o){n&&c(document.body).addClass(n),m.updateStatus("loading");var e=c.extend({url:o.src,success:function(e,t,n){e={data:e,xhr:n};u("ParseAjax",e),m.appendContent(c(e.data),E),o.finished=!0,i(),m._setFocus(),setTimeout(function(){m.wrap.addClass(T)},16),m.updateStatus("ready"),u("AjaxContentAdded")},error:function(){i(),o.finished=o.loadError=!0,m.updateStatus("error",m.st.ajax.tError.replace("%url%",o.src))}},m.st.ajax.settings);return m.req=c.ajax(e),""}}});var z;c.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:"The image could not be loaded."},proto:{initImage:function(){var e=m.st.image,t=".image";m.types.push("image"),d(b+t,function(){"image"===m.currItem.type&&e.cursor&&c(document.body).addClass(e.cursor)}),d(w+t,function(){e.cursor&&c(document.body).removeClass(e.cursor),_.off("resize"+I)}),d("Resize"+t,m.resizeImage),m.isLowIE&&d("AfterChange",m.resizeImage)},resizeImage:function(){var e,t=m.currItem;t&&t.img&&m.st.image.verticalFit&&(e=0,m.isLowIE&&(e=parseInt(t.img.css("padding-top"),10)+parseInt(t.img.css("padding-bottom"),10)),t.img.css("max-height",m.wH-e))},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,z&&clearInterval(z),e.isCheckingImgSize=!1,u("ImageHasSize",e),e.imgHidden)&&(m.content&&m.content.removeClass("mfp-loading"),e.imgHidden=!1)},findImageSize:function(t){function n(e){z&&clearInterval(z),z=setInterval(function(){0<i.naturalWidth?m._onImageHasSize(t):(200<o&&clearInterval(z),3===++o?n(10):40===o?n(50):100===o&&n(500))},e)}var o=0,i=t.img[0];n(1)},getImage:function(e,t){function n(){e&&(e.img.off(".mfploader"),e===m.currItem&&(m._onImageHasSize(e),m.updateStatus("error",a.tError.replace("%url%",e.src))),e.hasSize=!0,e.loaded=!0,e.loadError=!0)}function o(){e&&(e.img[0].complete?(e.img.off(".mfploader"),e===m.currItem&&(m._onImageHasSize(e),m.updateStatus("ready")),e.hasSize=!0,e.loaded=!0,u("ImageLoadComplete")):++r<200?setTimeout(o,100):n())}var i,r=0,a=m.st.image,s=t.find(".mfp-img");return s.length&&((i=document.createElement("img")).className="mfp-img",e.el&&e.el.find("img").length&&(i.alt=e.el.find("img").attr("alt")),e.img=c(i).on("load.mfploader",o).on("error.mfploader",n),i.src=e.src,s.is("img")&&(e.img=e.img.clone()),0<(i=e.img[0]).naturalWidth?e.hasSize=!0:i.width||(e.hasSize=!1)),m._parseMarkup(t,{title:function(e){if(e.data&&void 0!==e.data.title)return e.data.title;var t=m.st.image.titleSrc;if(t){if("function"==typeof t)return t.call(m,e);if(e.el)return e.el.attr(t)||""}return""}(e),img_replaceWith:e.img},e),m.resizeImage(),e.hasSize?(z&&clearInterval(z),e.loadError?(t.addClass("mfp-loading"),m.updateStatus("error",a.tError.replace("%url%",e.src))):(t.removeClass("mfp-loading"),m.updateStatus("ready"))):(m.updateStatus("loading"),e.loading=!0,e.hasSize||(e.imgHidden=!0,t.addClass("mfp-loading"),m.findImageSize(e))),t}}});function O(e){var t;m.currTemplate[L]&&(t=m.currTemplate[L].find("iframe")).length&&(e||(t[0].src="//about:blank"),m.isIE8)&&t.css("display",e?"block":"none")}function M(e){var t=m.items.length;return t-1<e?e-t:e<0?t+e:e}function D(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)}c.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,t,n,o,i,r,a=m.st.zoom,s=".zoom";a.enabled&&m.supportsTransition&&(t=a.duration,n=function(e){var e=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),t="all "+a.duration/1e3+"s "+a.easing,n={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},o="transition";return n["-webkit-"+o]=n["-moz-"+o]=n["-o-"+o]=n[o]=t,e.css(n),e},o=function(){m.content.css("visibility","visible")},d("BuildControls"+s,function(){m._allowZoom()&&(clearTimeout(i),m.content.css("visibility","hidden"),(e=m._getItemToZoom())?((r=n(e)).css(m._getOffset()),m.wrap.append(r),i=setTimeout(function(){r.css(m._getOffset(!0)),i=setTimeout(function(){o(),setTimeout(function(){r.remove(),e=r=null,u("ZoomAnimationEnded")},16)},t)},16)):o())}),d(F+s,function(){if(m._allowZoom()){if(clearTimeout(i),m.st.removalDelay=t,!e){if(!(e=m._getItemToZoom()))return;r=n(e)}r.css(m._getOffset(!0)),m.wrap.append(r),m.content.css("visibility","hidden"),setTimeout(function(){r.css(m._getOffset())},16)}}),d(w+s,function(){m._allowZoom()&&(o(),r&&r.remove(),e=null)}))},_allowZoom:function(){return"image"===m.currItem.type},_getItemToZoom:function(){return!!m.currItem.hasSize&&m.currItem.img},_getOffset:function(e){var e=e?m.currItem.img:m.st.zoom.opener(m.currItem.el||m.currItem),t=e.offset(),n=parseInt(e.css("padding-top"),10),o=parseInt(e.css("padding-bottom"),10),e=(t.top-=c(window).scrollTop()-n,{width:e.width(),height:(P?e.innerHeight():e[0].offsetHeight)-o-n});return(B=void 0===B?void 0!==document.createElement("p").style.MozTransform:B)?e["-moz-transform"]=e.transform="translate("+t.left+"px,"+t.top+"px)":(e.left=t.left,e.top=t.top),e}}});var B,L="iframe",H=(c.magnificPopup.registerModule(L,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){m.types.push(L),d("BeforeChange",function(e,t,n){t!==n&&(t===L?O():n===L&&O(!0))}),d(w+"."+L,function(){O()})},getIframe:function(e,t){var n=e.src,o=m.st.iframe,i=(c.each(o.patterns,function(){if(-1<n.indexOf(this.index))return this.id&&(n="string"==typeof this.id?n.substr(n.lastIndexOf(this.id)+this.id.length,n.length):this.id.call(this,n)),n=this.src.replace("%id%",n),!1}),{});return o.srcAction&&(i[o.srcAction]=n),m._parseMarkup(t,i,e),m.updateStatus("ready"),t}}}),c.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%",langDir:null,loop:!0},proto:{initGallery:function(){var r=m.st.gallery,e=".mfp-gallery";if(m.direction=!0,!r||!r.enabled)return!1;r.langDir||(r.langDir=document.dir||"ltr"),h+=" mfp-gallery",d(b+e,function(){r.navigateByImgClick&&m.wrap.on("click"+e,".mfp-img",function(){if(1<m.items.length)return m.next(),!1}),g.on("keydown"+e,function(e){37===e.keyCode?"rtl"===r.langDir?m.next():m.prev():39===e.keyCode&&("rtl"===r.langDir?m.prev():m.next())}),m.updateGalleryButtons()}),d("UpdateStatus"+e,function(){m.updateGalleryButtons()}),d("UpdateStatus"+e,function(e,t){t.text&&(t.text=D(t.text,m.currItem.index,m.items.length))}),d(C+e,function(e,t,n,o){var i=m.items.length;n.counter=1<i?D(r.tCounter,o.index,i):""}),d("BuildControls"+e,function(){var e,t,n,o,i;1<m.items.length&&r.arrows&&!m.arrowLeft&&(t="rtl"===r.langDir?(o=r.tNext,e=r.tPrev,i="next","prev"):(o=r.tPrev,e=r.tNext,i="prev","next"),n=r.arrowMarkup,o=m.arrowLeft=c(n.replace(/%title%/gi,o).replace(/%action%/gi,i).replace(/%dir%/gi,"left")).addClass(k),i=m.arrowRight=c(n.replace(/%title%/gi,e).replace(/%action%/gi,t).replace(/%dir%/gi,"right")).addClass(k),"rtl"===r.langDir?(m.arrowNext=o,m.arrowPrev=i):(m.arrowNext=i,m.arrowPrev=o),o.on("click",function(){"rtl"===r.langDir?m.next():m.prev()}),i.on("click",function(){"rtl"===r.langDir?m.prev():m.next()}),m.container.append(o.add(i)))}),d(j+e,function(){m._preloadTimeout&&clearTimeout(m._preloadTimeout),m._preloadTimeout=setTimeout(function(){m.preloadNearbyImages(),m._preloadTimeout=null},16)}),d(w+e,function(){g.off(e),m.wrap.off("click"+e),m.arrowRight=m.arrowLeft=null})},next:function(){var e=M(m.index+1);if(!m.st.gallery.loop&&0===e)return!1;m.direction=!0,m.index=e,m.updateItemHTML()},prev:function(){var e=m.index-1;if(!m.st.gallery.loop&&e<0)return!1;m.direction=!1,m.index=M(e),m.updateItemHTML()},goTo:function(e){m.direction=e>=m.index,m.index=e,m.updateItemHTML()},preloadNearbyImages:function(){for(var e=m.st.gallery.preload,t=Math.min(e[0],m.items.length),n=Math.min(e[1],m.items.length),o=1;o<=(m.direction?n:t);o++)m._preloadItem(m.index+o);for(o=1;o<=(m.direction?t:n);o++)m._preloadItem(m.index-o)},_preloadItem:function(e){var t;e=M(e),m.items[e].preloaded||((t=m.items[e]).parsed||(t=m.parseEl(e)),u("LazyLoad",t),"image"===t.type&&(t.img=c('<img class="mfp-img" />').on("load.mfploader",function(){t.hasSize=!0}).on("error.mfploader",function(){t.hasSize=!0,t.loadError=!0,u("LazyLoadError",t)}).attr("src",t.src)),t.preloaded=!0)},updateGalleryButtons:function(){m.st.gallery.loop||"object"!=typeof m.arrowPrev||null===m.arrowPrev||(0===m.index?m.arrowPrev.hide():m.arrowPrev.show(),m.index===m.items.length-1?m.arrowNext.hide():m.arrowNext.show())}}}),"retina");c.magnificPopup.registerModule(H,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){var n,o;1<window.devicePixelRatio&&(n=m.st.retina,o=n.ratio,1<(o=isNaN(o)?o():o))&&(d("ImageHasSize."+H,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/o,width:"100%"})}),d("ElementParse."+H,function(e,t){t.src=n.replaceSrc(t,o)}))}}}),r()});
115 116/* !libraries/magnific-popup/dist/jquery.magnific-popup.min.js */; 117/* modules/glyanec/ajax_forms/js/ajax_forms.js */ 118(function($,Drupal,drupalSettings){'use strict';Drupal.AjaxCommands.prototype.magnificPopup=function(ajax,response,status){var options={items:{src:response.html,type:'inline'},mainClass:'mfp-zoom-in',removalDelay:400,fixedContentPos:true,fixedBgPos:('ontouchstart'in window)?false:true,autoFocusLast:false,callbacks:{close:function(){Drupal.detachBehaviors(this.content[0],drupalSettings);}}} 119for(var option in response.options){options[option]=response.options[option]} 120$.magnificPopup.open(options);Drupal.attachBehaviors();};var ajaxFormPromise=new Promise(function(resolve,reject){if(typeof $.magnificPopup==='undefined'){setTimeout(function(){if(typeof $.magnificPopup==='undefined'){reject();} 121else{resolve();}},1000);} 122else{resolve();}});ajaxFormPromise.then(function(){var mfpOpen=$.magnificPopup.instance.open;var mfp_checkIfClose=$.magnificPopup.instance._checkIfClose;$.magnificPopup.instance.open=function(data){mfpOpen.apply(this,arguments);var mfp=$.magnificPopup.instance;if(mfp.bgOverlay){mfp.wrap.on('mousedown.mfp',function(e){if(mfp._checkIfClose(e.target,true)){mfp.close();}});}} 123$.magnificPopup.instance._checkIfClose=function(target,isRun){var mfp=$.magnificPopup.instance;if(!mfp.content||$(target).hasClass('mfp-close')||(mfp.preloader&&target===mfp.preloader[0])){return true;} 124if(isRun){return mfp_checkIfClose.apply(this,arguments);}} 125$.magnificPopup.instance._onFocusIn=function(e){if($(e.target).hasClass('select2-search__field')){return true;} 126$.magnificPopup.proto._onFocusIn.call(this,e);};}).catch(function(error){});function ajaxForms(element,form_id){var langPath=drupalSettings.path.baseUrl+drupalSettings.path.pathPrefix;var currentPath=drupalSettings.path.currentPath.split('/');var entity_id_attribute=element.getAttribute('entity_id');var entity_id='';if(entity_id_attribute){entity_id='/'+entity_id_attribute;}else if(currentPath[0]==='node'){entity_id='/'+currentPath[1];}else{entity_id_attribute=element.getAttribute('data-entity-id');if(entity_id_attribute){entity_id='/'+entity_id_attribute;}} 127let post=element.getAttribute('data-post');if(post){post=JSON.parse(post);} 128else{post={'__ajax':true};} 129Drupal.ajax({url:langPath+'api/ajax_forms/link/'+form_id+entity_id+'?destination=/'+drupalSettings.path.currentPath,element:element,submit:post,progress:{type:'fullscreen'}}).execute();} 130$(document).ready(function(){if(typeof drupalSettings.ajax_forms!=='undefined'){for(var selector in drupalSettings.ajax_forms.links){(function(form_id,selector){$('body').off('click.ajax_forms',selector).on('click.ajax_forms',selector,function(e){e.preventDefault();ajaxForms(this,form_id);});})(drupalSettings.ajax_forms.links[selector],selector);}}});})(jQuery,Drupal,drupalSettings); 131/* !modules/glyanec/ajax_forms/js/ajax_forms.js */; 132/* libraries/lazysizes/lazysizes.min.js */ 133/*! lazysizes - v5.3.2 */!function(e){var t=function(u,D,f){"use strict";var k,H;if(function(){var e;var t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:true,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:true,ricTimeout:0,throttleDelay:125};H=u.lazySizesConfig||u.lazysizesConfig||{};for(e in t){if(!(e in H)){H[e]=t[e]}}}(),!D||!D.getElementsByClassName){return{init:function(){},cfg:H,noSupport:true}}var O=D.documentElement,i=u.HTMLPictureElement,P="addEventListener",$="getAttribute",q=u[P].bind(u),I=u.setTimeout,U=u.requestAnimationFrame||I,o=u.requestIdleCallback,j=/^picture$/i,r=["load","error","lazyincluded","_lazyloaded"],a={},G=Array.prototype.forEach,J=function(e,t){if(!a[t]){a[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")}return a[t].test(e[$]("class")||"")&&a[t]},K=function(e,t){if(!J(e,t)){e.setAttribute("class",(e[$]("class")||"").trim()+" "+t)}},Q=function(e,t){var a;if(a=J(e,t)){e.setAttribute("class",(e[$]("class")||"").replace(a," "))}},V=function(t,a,e){var i=e?P:"removeEventListener";if(e){V(t,a)}r.forEach(function(e){t[i](e,a)})},X=function(e,t,a,i,r){var n=D.createEvent("Event");
vendor: 5,660 bytes, line 133
133if(!a){a={}}a.instance=k;n.initEvent(t,!i,!r);n.detail=a;e.dispatchEvent(n);return n},Y=function(e,t){var a;if(!i&&(a=u.picturefill||H.pf)){if(t&&t.src&&!e[$]("srcset")){e.setAttribute("srcset",t.src)}a({reevaluate:true,elements:[e]})}else if(t&&t.src){e.src=t.src}},Z=function(e,t){return(getComputedStyle(e,null)||{})[t]},s=function(e,t,a){a=a||e.offsetWidth;while(a<H.minSize&&t&&!e._lazysizesWidth){a=t.offsetWidth;t=t.parentNode}return a},ee=function(){var a,i;var t=[];var r=[];var n=t;var s=function(){var e=n;n=t.length?r:t;a=true;i=false;while(e.length){e.shift()()}a=false};var e=function(e,t){if(a&&!t){e.apply(this,arguments)}else{n.push(e);if(!i){i=true;(D.hidden?I:U)(s)}}};e._lsFlush=s;return e}(),te=function(a,e){return e?function(){ee(a)}:function(){var e=this;var t=arguments;ee(function(){a.apply(e,t)})}},ae=function(e){var a;var i=0;var r=H.throttleDelay;var n=H.ricTimeout;var t=function(){a=false;i=f.now();e()};var s=o&&n>49?function(){o(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(a){return}a=true;t=r-(f.now()-i);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ie=function(e){var t,a;var i=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-a;if(e<i){I(n,i-e)}else{(o||r)(r)}};return function(){a=f.now();if(!t){t=I(n,i)}}},e=function(){var v,m,c,h,e;var y,z,g,p,C,b,A;var n=/^img$/i;var d=/^iframe$/i;var E="onscroll"in u&&!/(gle|ing)bot/.test(navigator.userAgent);var _=0;var w=0;var M=0;var N=-1;var L=function(e){M--;if(!e||M<0||!e.target){M=0}};var x=function(e){if(A==null){A=Z(D.body,"visibility")=="hidden"}return A||!(Z(e.parentNode,"visibility")=="hidden"&&Z(e,"visibility")=="hidden")};var W=function(e,t){var a;var i=e;var r=x(e);g-=t;b+=t;p-=t;C+=t;while(r&&(i=i.offsetParent)&&i!=D.body&&i!=O){r=(Z(i,"opacity")||1)>0;if(r&&Z(i,"overflow")!="visible"){a=i.getBoundingClientRect();r=C>a.left&&p<a.right&&b>a.top-1&&g<a.bottom+1}}return r};var t=function(){var e,t,a,i,r,n,s,o,l,u,f,c;var d=k.elements;if((h=H.loadMode)&&M<8&&(e=d.length)){t=0;N++;for(;t<e;t++){if(!d[t]||d[t]._lazyRace){continue}if(!E||k.prematureUnveil&&k.prematureUnveil(d[t])){R(d[t]);continue}if(!(o=d[t][$]("data-expand"))||!(n=o*1)){n=w}if(!u){u=!H.expand||H.expand<1?O.clientHeight>500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w<f&&M<1&&N>2&&h>2&&!D.hidden){w=f;N=0}else if(h>1&&N>1&&M<6){w=u}else{w=_}}if(l!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;l=n}a=d[t].getBoundingClientRect();if((b=a.bottom)>=s&&(g=a.top)<=z&&(C=a.right)>=s*c&&(p=a.left)<=y&&(b||C||p||g)&&(H.loadHidden||x(d[t]))&&(m&&M<3&&!o&&(h<3||N<4)||W(d[t],n))){R(d[t]);r=true;if(M>9){break}}else if(!r&&m&&!i&&M<4&&N<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!o&&(b||C||p||g||d[t][$](H.sizesAttr)!="auto"))){i=v[0]||d[t]}}if(i&&!r){R(i)}}};var a=ae(t);var S=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}L(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,B);X(t,"lazyloaded")};var i=te(S);var B=function(e){i({target:e.target})};var T=function(e,t){var a=e.getAttribute("data-load-mode")||H.iframeLoadMode;if(a==0){e.contentWindow.location.replace(t)}else if(a==1){e.src=t}};var F=function(e){var t;var a=e[$](H.srcsetAttr);if(t=H.customMedia[e[$]("data-media")||e[$]("media")]){e.setAttribute("media",t)}if(a){e.setAttribute("srcset",a)}};var s=te(function(t,e,a,i,r){var n,s,o,l,u,f;if(!(u=X(t,"lazybeforeunveil",e)).defaultPrevented){if(i){if(a){K(t,H.autosizesClass)}else{t.setAttribute("sizes",i)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){o=t.parentNode;l=o&&j.test(o.nodeName||"")}f=e.firesLoad||"src"in t&&(s||n||l);u={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(L,2500);V(t,B,true)}if(l){G.call(o.getElementsByTagName("source"),F)}if(s){t.setAttribute("srcset",s)}else if(n&&!l){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||l)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,H.fastLoadedClass)}S(u);t._lazyCache=true;I(function(){if("_lazyCache"in t){delete t._lazyCache}},9)}if(t.loading=="lazy"){M--}},true)});var R=function(e){if(e._lazyRace){return}var t;var a=n.test(e.nodeName);var i=a&&(e[$](H.sizesAttr)||e[$]("sizes"));var r=i=="auto";if((r||!m)&&a&&(e[$]("src")||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,"lazyunveilread").detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;M++;s(e,t,r,i,a)};var r=ie(function(){H.loadMode=3;a()});var o=function(){if(H.loadMode==3){H.loadMode=2}r()};var l=function(){if(m){return}if(f.now()-e<999){I(l,999);return}m=true;H.loadMode=3;a();q("scroll",o,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+" "+H.preloadClass);q("scroll",a,true);q("resize",a,true);q("pageshow",function(e){if(e.persisted){var t=D.querySelectorAll("."+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(a).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P]("DOMNodeInserted",a,true);O[P]("DOMAttrModified",a,true);setInterval(a,999)}q("hashchange",a,true);["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){D[P](e,a,true)});if(/d$|^c/.test(D.readyState)){l()}else{q("load",l);D[P]("DOMContentLoaded",a);I(l,2e4)}if(k.elements.length){t();ee._lsFlush()}else{a()}},checkElems:a,unveil:R,_aLSL:o}}(),re=function(){var a;var n=te(function(e,t,a,i){var r,n,s;e._lazysizesWidth=i;i+="px";e.setAttribute("sizes",i);
133if(j.test(t.nodeName||"")){r=t.getElementsByTagName("source");for(n=0,s=r.length;n<s;n++){r[n].setAttribute("sizes",i)}}if(!a.detail.dataAttr){Y(e,a.detail)}});var i=function(e,t,a){var i;var r=e.parentNode;if(r){a=s(e,r,a);i=X(e,"lazybeforesizes",{width:a,dataAttr:!!t});if(!i.defaultPrevented){a=i.detail.width;if(a&&a!==e._lazysizesWidth){n(e,r,i,a)}}}};var e=function(){var e;var t=a.length;if(t){e=0;for(;e<t;e++){i(a[e])}}};var t=ie(e);return{_:function(){a=D.getElementsByClassName(H.autosizesClass);q("resize",t)},checkElems:t,updateElem:i}}(),t=function(){if(!t.i&&D.getElementsByClassName){t.i=true;re._();e._()}};return I(function(){H.init&&t()}),k={cfg:H,autoSizer:re,loader:e,init:t,uP:Y,aC:K,rC:Q,hC:J,fire:X,gW:s,rAF:ee}}(e,e.document,Date);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:{}); 134/* !libraries/lazysizes/lazysizes.min.js */; 135/* themes/ux/przedszkola/modules/m_libraries/misc/sticky/jquery.sticky.js */ 136(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof module==='object'&&module.exports){module.exports=factory(require('jquery'));}else{factory(jQuery);}}(function($){var slice=Array.prototype.slice;var splice=Array.prototype.splice;var defaults={topSpacing:0,bottomSpacing:0,className:'is-sticky',wrapperClassName:'sticky-wrapper',center:false,getWidthFrom:'',widthFromWrapper:true,responsiveWidth:false,zIndex:'inherit'},$window=$(window),$document=$(document),sticked=[],windowHeight=$window.height(),scroller=function(){var scrollTop=$window.scrollTop(),documentHeight=$document.height(),dwh=documentHeight-windowHeight,extra=(scrollTop>dwh)?dwh-scrollTop:0;for(var i=0,l=sticked.length;i<l;i++){var s=sticked[i],elementTop=s.stickyWrapper.offset().top,etse=elementTop-s.topSpacing-extra;s.stickyWrapper.css('height',s.stickyElement.outerHeight());if(scrollTop<=etse){if(s.currentTop!==null){s.stickyElement.css({'width':'','position':'','top':'','z-index':''});s.stickyElement.parent().removeClass(s.className);s.stickyElement.trigger('sticky-end',[s]);s.currentTop=null;}} 137else{var newTop=documentHeight-s.stickyElement.outerHeight() 138-s.topSpacing-s.bottomSpacing-scrollTop-extra;if(newTop<0){newTop=newTop+s.topSpacing;}else{newTop=s.topSpacing;} 139if(s.currentTop!==newTop){var newWidth;if(s.getWidthFrom){padding=s.stickyElement.innerWidth()-s.stickyElement.width();newWidth=$(s.getWidthFrom).width()-padding||null;}else if(s.widthFromWrapper){newWidth=s.stickyWrapper.width();} 140if(newWidth==null){newWidth=s.stickyElement.width();} 141s.stickyElement.css('width',newWidth).css('position','fixed').css('top',newTop).css('z-index',s.zIndex);s.stickyElement.parent().addClass(s.className);if(s.currentTop===null){s.stickyElement.trigger('sticky-start',[s]);}else{s.stickyElement.trigger('sticky-update',[s]);} 142if(s.currentTop===s.topSpacing&&s.currentTop>newTop||s.currentTop===null&&newTop<s.topSpacing){s.stickyElement.trigger('sticky-bottom-reached',[s]);}else if(s.currentTop!==null&&newTop===s.topSpacing&&s.currentTop<newTop){s.stickyElement.trigger('sticky-bottom-unreached',[s]);} 143s.currentTop=newTop;} 144var stickyWrapperContainer=s.stickyWrapper.parent();var unstick=(s.stickyElement.offset().top+s.stickyElement.outerHeight()>=stickyWrapperContainer.offset().top+stickyWrapperContainer.outerHeight())&&(s.stickyElement.offset().top<=s.topSpacing);if(unstick){s.stickyElement.css('position','absolute').css('top','').css('bottom',0).css('z-index','');}else{s.stickyElement.css('position','fixed').css('top',newTop).css('bottom','').css('z-index',s.zIndex);}}}},resizer=function(){windowHeight=$window.height();for(var i=0,l=sticked.length;i<l;i++){var s=sticked[i];var newWidth=null;if(s.getWidthFrom){if(s.responsiveWidth){newWidth=$(s.getWidthFrom).width();}}else if(s.widthFromWrapper){newWidth=s.stickyWrapper.width();} 145if(newWidth!=null){s.stickyElement.css('width',newWidth);}}},methods={init:function(options){return this.each(function(){var o=$.extend({},defaults,options);var stickyElement=$(this);var stickyId=stickyElement.attr('id');var wrapperId=stickyId?stickyId+'-'+defaults.wrapperClassName:defaults.wrapperClassName;var wrapper=$('<div></div>').attr('id',wrapperId).addClass(o.wrapperClassName);stickyElement.wrapAll(function(){if($(this).parent("#"+wrapperId).length==0){return wrapper;}});var stickyWrapper=stickyElement.parent();if(o.center){stickyWrapper.css({width:stickyElement.outerWidth(),marginLeft:"auto",marginRight:"auto"});} 146if(stickyElement.css("float")==="right"){stickyElement.css({"float":"none"}).parent().css({"float":"right"});} 147o.stickyElement=stickyElement;o.stickyWrapper=stickyWrapper;o.currentTop=null;sticked.push(o);methods.setWrapperHeight(this);methods.setupChangeListeners(this);});},setWrapperHeight:function(stickyElement){var element=$(stickyElement);var stickyWrapper=element.parent();if(stickyWrapper){stickyWrapper.css('height',element.outerHeight());}},setupChangeListeners:function(stickyElement){if(window.MutationObserver){var mutationObserver=new window.MutationObserver(function(mutations){if(mutations[0].addedNodes.length||mutations[0].removedNodes.length){methods.setWrapperHeight(stickyElement);}});mutationObserver.observe(stickyElement,{subtree:true,childList:true});}else{if(window.addEventListener){stickyElement.addEventListener('DOMNodeInserted',function(){methods.setWrapperHeight(stickyElement);},false);stickyElement.addEventListener('DOMNodeRemoved',function(){methods.setWrapperHeight(stickyElement);},false);}else if(window.attachEvent){stickyElement.attachEvent('onDOMNodeInserted',function(){methods.setWrapperHeight(stickyElement);});stickyElement.attachEvent('onDOMNodeRemoved',function(){methods.setWrapperHeight(stickyElement);});}}},update:scroller,unstick:function(options){return this.each(function(){var that=this;var unstickyElement=$(that);var removeIdx=-1;var i=sticked.length;while(i-->0){if(sticked[i].stickyElement.get(0)===that){splice.call(sticked,i,1);removeIdx=i;}} 148if(removeIdx!==-1){unstickyElement.unwrap();unstickyElement.css({'width':'','position':'','top':'','float':'','z-index':''});}});}};if(window.addEventListener){window.addEventListener('scroll',scroller,false);window.addEventListener('resize',resizer,false);}else if(window.attachEvent){window.attachEvent('onscroll',scroller);window.attachEvent('onresize',resizer);} 149$.fn.sticky=function(method){if(methods[method]){return methods[method].apply(this,slice.call(arguments,1
149));}else if(typeof method==='object'||!method){return methods.init.apply(this,arguments);}else{$.error('Method '+method+' does not exist on jQuery.sticky');}};$.fn.unstick=function(method){if(methods[method]){return methods[method].apply(this,slice.call(arguments,1));}else if(typeof method==='object'||!method){return methods.unstick.apply(this,arguments);}else{$.error('Method '+method+' does not exist on jQuery.sticky');}};$(function(){setTimeout(scroller,0);});})); 150/* !themes/ux/przedszkola/modules/m_libraries/misc/sticky/jquery.sticky.js */; 151/* themes/ux/church/js/once.js */ 152(function($){if(!$.fn.once){$.fn.once=function($name){let $this=this;if($this.length){try{let elements=once($name,$this.get());return $(elements);} 153catch(e){}} 154return $this;}}})(jQuery); 155/* !themes/ux/church/js/once.js */; 156/* themes/ux/church/js/common.js */ 157(function($,Drupal){function scrollToDiv(target,offset){if(typeof(target)!='object'||target.length===0)return undefined 158animateFinish=false;$('html, body').stop().animate({scrollTop:target.offset().top-offset},500,function(){animateFinish=true;});return false;} 159function debounce(fn,delay){var timer=null;return function(){var context=this;var args=arguments;clearTimeout(timer);timer=setTimeout(function(){fn.apply(context,args);},delay);};} 160Drupal.behaviors.default={attach:function(context,settings){if($.fn.select2){$('select').on("select2:open",function(e){setTimeout(function(){$('.select2-search__field')[0].focus();},0);});$('select:not([name^=field_comment_rate])').once('personal_select').each(function(){var placeholder=$(this).find('option').eq(0);switch($(this).attr('name')){case'novaposhta_fields[region]':case'novaposhta_fields[point]':case'novaposhta_fields[city]':case'intime_fields[region]':case'intime_fields[city]':case'delivery_auto_fields[region]':case'delivery_auto_fields[city]':var search=20;break;default:var search=-1;} 161switch($(this).attr('name')){case'model[0]':case'model[1]':case'model[2]':var allowClear=true;break;} 162if(allowClear){if(!isMobile){$(this).select2({minimumResultsForSearch:search,dropdownAutoWidth:true,width:'100%',placeholder:placeholder,allowClear:true,language:{noResults:function(){return Drupal.t('No result found');},},}).on("select2:unselecting",function(e){$(this).data('state','unselected');}).on("select2:open",function(e){if($(this).data('state')==='unselected'){$(this).removeData('state');var self=$(this);self.select2('close');}});}}else{$(this).select2({minimumResultsForSearch:search,dropdownAutoWidth:true,width:'100%',placeholder:placeholder,language:{noResults:function(){return Drupal.t('No result found');},},})}});}}} 163$(document).ready(function(){let $scrollTop=$('<div class="scroll-top"></div>').appendTo('.site-footer');$scrollTop.on('click',function(){scrollToDiv($('.site-page'),0);});function throttle(fn,wait){var time=Date.now();return function(){if((time+wait-Date.now())<0){fn();time=Date.now();}}} 164let windowHeight=$(window).height();let footerHeight=$('.site-footer').outerHeight();function syncHeaderSideTop(){var headerHeight=$('.site-header').outerHeight()||0;$('.site-header__side').css('top',headerHeight+'px');} 165function handleWindowResize(){windowHeight=$(window).height();footerHeight=$('.site-footer').outerHeight();syncHeaderSideTop();if($(window).width()>1200){$('.region-header-right').appendTo('.site-header__top>.l');}else{$('.region-header-right').appendTo('.site-header__side--bottom');}} 166var debouncedHandleWindowResize=debounce(handleWindowResize,100);$(window).off('resize.thisCommon').on('resize.thisCommon',debouncedHandleWindowResize);function scrollTopPosition(){if($(window).scrollTop()>windowHeight / 2){$scrollTop.addClass('is-visible');let bottomOffset=$(document).height()-windowHeight-$(window).scrollTop();if(bottomOffset+45<footerHeight){$scrollTop.addClass('is-sticky')}else{$scrollTop.removeClass('is-sticky');}}else{$scrollTop.removeClass('is-visible');}} 167$(window).scroll(throttle(scrollTopPosition,10));if($(window).scrollTop()>windowHeight / 2){$scrollTop.addClass('is-visible');let bottomOffset=$(document).height()-windowHeight-$(window).scrollTop();if(bottomOffset+65<footerHeight){$scrollTop.addClass('is-sticky')}else{$scrollTop.removeClass('is-sticky');}} 168setTimeout(function(){$('body').removeClass('wait-load');},0);$('a, img').on('dragstart',function(e){e.preventDefault();});syncHeaderSideTop();$('body').on('click','.js-menu-btn',function(e){e.preventDefault();var $this=$(this);var $header=$('.site-header__side');var $body=$('body');if($header.hasClass('is-open')){$this.removeClass('is-open');$header.removeClass('is-open');$body.removeClass('is-hiden');$(document).off('click.menu');$('#header-overlay').removeClass('is-open');}else{syncHeaderSideTop();$this.addClass('is-open');$header.addClass('is-open');$body.addClass('is-hiden');var firstClick=true;$(document).on('click.menu',function(e){if(!firstClick&&$(e.target).closest($header).length==0){$this.removeClass('is-open');$header.removeClass('is-open');$body.removeClass('is-hiden');$(document).off('click.menu');$('#header-overlay').removeClass('is-open');} 169firstClick=false;});}});
169function setKeyboardMenuItemState($item,expanded){$item.toggleClass('is-keyboard-open',expanded);$item.children('.link-wrapper').children('a, [role="button"]').first().attr('aria-expanded',expanded?'true':'false');} 170$('.menu--main').each(function(){var $menu=$(this);var $itemsWithSubmenu=$menu.find('.menu-item--expanded').filter(function(){return $(this).children('.menu').length>0;});$itemsWithSubmenu.each(function(){var $trigger=$(this).children('.link-wrapper').children('a').first();if(!$trigger.length){$trigger=$(this).children('.link-wrapper').children('span').first().attr({'role':'button','tabindex':'0'});} 171$trigger.attr({'aria-haspopup':'true','aria-expanded':'false'});});function openKeyboardMenuPath($currentItem){var $openPath=$currentItem.parents('.menu-item--expanded').addBack('.menu-item--expanded').filter(function(){return $(this).children('.menu').length>0;});$itemsWithSubmenu.each(function(){setKeyboardMenuItemState($(this),$openPath.is(this));});} 172$menu.off('focusin.keyboardMenu').on('focusin.keyboardMenu','a, [role="button"]',function(){if($(window).width()<=1200){return;} 173openKeyboardMenuPath($(this).closest('.menu-item'));}).off('focusout.keyboardMenu').on('focusout.keyboardMenu',function(e){if($(window).width()<=1200){return;} 174if(!e.relatedTarget||!$.contains(this,e.relatedTarget)){$itemsWithSubmenu.each(function(){setKeyboardMenuItemState($(this),false);});}}).off('keydown.keyboardMenu').on('keydown.keyboardMenu','[role="button"][aria-haspopup="true"]',function(e){if($(window).width()<=1200||(e.key!=='Enter'&&e.key!==' ')){return;} 175e.preventDefault();var $currentItem=$(this).closest('.menu-item');var $firstSubmenuItem=$currentItem.children('.menu').find('a, [role="button"]').first();openKeyboardMenuPath($currentItem);if($firstSubmenuItem.length){$firstSubmenuItem.trigger('focus');}});});function syncSearchState($block,focusInput){var isOpen=$block.hasClass('is-open');var $form=$block.find('.b-search-block__form');$block.find('.js-search-btn').attr('aria-expanded',isOpen?'true':'false');$form.attr('aria-hidden',isOpen?'false':'true');$form.off('transitionend.keyboardSearch');if(isOpen&&focusInput){var focusSearchInput=function(){if($block.hasClass('is-open')){$block.find('input[name="q"]').trigger('focus');}};if($form.css('visibility')==='visible'){focusSearchInput();} 176else{$form.one('transitionend.keyboardSearch',focusSearchInput);}}} 177$('.b-search-block').each(function(){syncSearchState($(this),false);});$('body').off('click.keyboardSearch','.js-search-btn').on('click.keyboardSearch','.js-search-btn',function(){var $block=$(this).closest('.b-search-block');syncSearchState($block,$block.hasClass('is-open'));}).off('keydown.keyboardSearch','.b-search-block').on('keydown.keyboardSearch','.b-search-block',function(e){if(e.key==='Escape'&&$(this).hasClass('is-open')){e.preventDefault();var $block=$(this);var $button=$block.find('.js-search-btn');$block.removeClass('is-open');syncSearchState($block,false);$button.trigger('focus');}});function setLanguageListState($current,expanded){var $items=$current.siblings('.language-list__items').first();$current.toggleClass('is-open',expanded).attr('aria-expanded',expanded?'true':'false');$items.toggleClass('is-open',expanded).attr('aria-hidden',expanded?'false':'true');} 178$('.language-list').each(function(){setLanguageListState($(this).find('.language-list__current').first(),false);});$('body').off('focusin.keyboardLanguage','.language-list__current').on('focusin.keyboardLanguage','.language-list__current',function(){var $current=$(this);if($current.data('suppressFocusOpen')){$current.removeData('suppressFocusOpen');return;} 179if(!$current.hasClass('is-open')){$current.data('openedByFocus',true);setLanguageListState($current,true);}}).off('click.keyboardLanguage','.language-list__current').on('click.keyboardLanguage','.language-list__current',function(e){e.preventDefault();var $current=$(this);if($current.data('openedByFocus')){$current.removeData('openedByFocus');return;} 180setLanguageListState($current,!$current.hasClass('is-open'));}).off('focusout.keyboardLanguage','.language-list').on('focusout.keyboardLanguage','.language-list',function(e){if(!e.relatedTarget||!$.contains(this,e.relatedTarget)){var $current=$(this).find('.language-list__current').first();$current.removeData('openedByFocus');setLanguageListState($current,false);}}).off('keydown.keyboardLanguage','.language-list').on('keydown.keyboardLanguage','.language-list',function(e){if(e.key==='Escape'){e.preventDefault();var $current=$(this).find('.language-list__current').first();$current.removeData('openedByFocus');$current.data('suppressFocusOpen',true);setLanguageListState($current,false);$current.trigger('focus');}});$(document).off('click.languageList touchstart.languageList').on('click.languageList touchstart.languageList',function(e){$('.language-list').each(function(){if(!$(this).is(e.target)&&$(this).has(e.target).length===0){var $current=$(this).find('.language-list__current').first();$current.removeData('openedByFocus');setLanguageListState($current,false);}});});handleWindowResize();setTimeout(function(){$(window).scroll();$(window).resize();},0);});$('.js-personal-back').on('click',function(){history.back();})})(jQuery,Drupal); 181/* !themes/ux/church/js/common.js */; 182/* modules/glyanec/drupal_noty_messages/misc/js/drupal_noty_messages.js */ 183(function($){let NotyGenerate=function(){this.type=drupalSettings.drupalNotyMessagesPlugin??null;this.plugins=[];};NotyGenerate.prototype={run:function(){if(drupalSettings.drupal_noty_messages&&this.plugins){if(drupalSettings.drupal_noty_messages.items&&drupalSettings.drupal_noty_messages.items.length){for(i in drupalSettings.drupal_noty_messages.items){if(typeof drupalSettings.drupal_noty_messages.items[i].content!=''){this.noty(drupalSettings.drupal_noty_messages.items[i].type,drupalSettings.drupal_noty_messages.items[i].content);}} 184delete drupalSettings.drupal_noty_messages.items;}}},noty:function(type,mess){if(this.plugins[this.type]){this.plugins[this.type].noty(type,mess);}},setPlugin:function(name,plugin){this.plugins[name]=plugin;}}
vendor: 4,132 bytes, lines 185-189
185Drupal.NotyGenerate=new NotyGenerate();Drupal.behaviors.drupal_noty_messages={attach:function(context,settings){Drupal.NotyGenerate.run();},detach:function(context,settings){Drupal.NotyGenerate.run();}} 186$.fn.NotyGenerate=function(type,text){Drupal.NotyGenerate.noty(type,text);};})(jQuery); 187/* !modules/glyanec/drupal_noty_messages/misc/js/drupal_noty_messages.js */; 188/* libraries/notyf/notyf.min.js */ 189var Notyf=function(){"use strict";var e,o=function(){return(o=Object.assign||function(t){for(var i,e=1,n=arguments.length;e<n;e++)for(var o in i=arguments[e])Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o]);return t}).apply(this,arguments)},n=(t.prototype.on=function(t,i){var e=this.listeners[t]||[];this.listeners[t]=e.concat([i])},t.prototype.triggerEvent=function(t,i){var e=this;(this.listeners[t]||[]).forEach(function(t){return t({target:e,event:i})})},t);function t(t){this.options=t,this.listeners={}}(i=e=e||{})[i.Add=0]="Add",i[i.Remove=1]="Remove";var f,i,s=(a.prototype.push=function(t){this.notifications.push(t),this.updateFn(t,e.Add,this.notifications)},a.prototype.splice=function(t,i){i=this.notifications.splice(t,i)[0];return this.updateFn(i,e.Remove,this.notifications),i},a.prototype.indexOf=function(t){return this.notifications.indexOf(t)},a.prototype.onUpdate=function(t){this.updateFn=t},a);function a(){this.notifications=[]}(i=f=f||{}).Dismiss="dismiss";var r={types:[{type:"success",className:"notyf__toast--success",backgroundColor:"#3dc763",icon:{className:"notyf__icon--success",tagName:"i"}},{type:"error",className:"notyf__toast--error",backgroundColor:"#ed3d3d",icon:{className:"notyf__icon--error",tagName:"i"}}],duration:2e3,ripple:!0,position:{x:"right",y:"bottom"},dismissible:!(i.Click="click")},c=(p.prototype.on=function(t,i){var e;this.events=o(o({},this.events),((e={})[t]=i,e))},p.prototype.update=function(t,i){i===e.Add?this.addNotification(t):i===e.Remove&&this.removeNotification(t)},p.prototype.removeNotification=function(t){var i,e,n=this,t=this._popRenderedNotification(t);t&&((e=t.node).classList.add("notyf__toast--disappear"),e.addEventListener(this.animationEndEventName,i=function(t){t.target===e&&(e.removeEventListener(n.animationEndEventName,i),n.container.removeChild(e))}))},p.prototype.addNotification=function(t){var i=this._renderNotification(t);this.notifications.push({notification:t,node:i}),this._announce(t.options.message||"Notification")},p.prototype._renderNotification=function(t){var i=this._buildNotificationCard(t),e=t.options.className;return e&&(t=i.classList).add.apply(t,e.split(" ")),this.container.appendChild(i),i},p.prototype._popRenderedNotification=function(t){for(var i=-1,e=0;e<this.notifications.length&&i<0;e++)this.notifications[e].notification===t&&(i=e);if(-1!==i)return this.notifications.splice(i,1)[0]},p.prototype.getXPosition=function(t){return(null===(t=null==t?void 0:t.position)||void 0===t?void 0:t.x)||"right"},p.prototype.getYPosition=function(t){return(null===(t=null==t?void 0:t.position)||void 0===t?void 0:t.y)||"bottom"},p.prototype.adjustContainerAlignment=function(t){var i=this.X_POSITION_FLEX_MAP[this.getXPosition(t)],e=this.Y_POSITION_FLEX_MAP[this.getYPosition(t)],t=this.container.style;t.setProperty("justify-content",e),t.setProperty("align-items",i)},p.prototype._buildNotificationCard=function(n){var o=this,t=n.options,i=t.icon;this.adjustContainerAlignment(t);var e=this._createHTMLElement({tagName:"div",className:"notyf__toast"}),s=this._createHTMLElement({tagName:"div",className:"notyf__ripple"}),a=this._createHTMLElement({tagName:"div",className:"notyf__wrapper"}),r=this._createHTMLElement({tagName:"div",className:"notyf__message"});r.innerHTML=t.message||"";var c,p,d,l,u=t.background||t.backgroundColor;i&&(c=this._createHTMLElement({tagName:"div",className:"notyf__icon"}),("string"==typeof i||i instanceof String)&&(c.innerHTML=new String(i).valueOf()),"object"==typeof i&&(p=i.tagName,d=i.className,l=i.text,i=void 0===(i=i.color)?u:i,l=this._createHTMLElement({tagName:void 0===p?"i":p,className:d,text:l}),i&&(l.style.color=i),c.appendChild(l)),a.appendChild(c)),a.appendChild(r),e.a
189ppendChild(a),u&&(t.ripple?(s.style.background=u,e.appendChild(s)):e.style.background=u),t.dismissible&&(s=this._createHTMLElement({tagName:"div",className:"notyf__dismiss"}),u=this._createHTMLElement({tagName:"button",className:"notyf__dismiss-btn"}),s.appendChild(u),a.appendChild(s),e.classList.add("notyf__toast--dismissible"),u.addEventListener("click",function(t){var i,e;null!==(e=(i=o.events)[f.Dismiss])&&void 0!==e&&e.call(i,{target:n,event:t}),t.stopPropagation()})),e.addEventListener("click",function(t){var i,e;return null===(e=(i=o.events)[f.Click])||void 0===e?void 0:e.call(i,{target:n,event:t})});t="top"===this.getYPosition(t)?"upper":"lower";return e.classList.add("notyf__toast--"+t),e},p.prototype._createHTMLElement=function(t){var i=t.tagName,e=t.className,t=t.text,i=document.createElement(i);return e&&(i.className=e),i.textContent=t||null,i},p.prototype._createA11yContainer=function(){var t=this._createHTMLElement({tagName:"div",className:"notyf-announcer"});t.setAttribute("aria-atomic","true"),t.setAttribute("aria-live","polite"),t.style.border="0",t.style.clip="rect(0 0 0 0)",t.style.height="1px",t.style.margin="-1px",t.style.overflow="hidden",t.style.padding="0",t.style.position="absolute",t.style.width="1px",t.style.outline="0",document.body.appendChild(t),this.a11yContainer=t},p.prototype._announce=function(t){var i=this;this.a11yContainer.textContent="",setTimeout(function(){i.a11yContainer.textContent=t},100)},p.prototype._getAnimationEndEventName=function(){var t,i=document.createElement("_fake"),e={MozTransition:"animationend",OTransition:"oAnimationEnd",WebkitTransition:"webkitAnimationEnd",transition:"animationend"};for(t in e)if(void 0!==i.style[t])return e[t];return"animationend"},p);function p(){this.notifications=[],this.events={},this.X_POSITION_FLEX_MAP={left:"flex-start",center:"center",right:"flex-end"},this.Y_POSITION_FLEX_MAP={top:"flex-start",center:"center",bottom:"flex-end"};var t=document.createDocumentFragment(),i=this._createHTMLElement({tagName:"div",className:"notyf"});t.appendChild(i),document.body.appendChild(t),this.container=i,this.animationEndEventName=this._getAnimationEndEventName(),this._createA11yContainer()}function d(t){var e=this;this.dismiss=this._removeNotification,this.notifications=new s,this.view=new c;var i=this.registerTypes(t);this.options=o(o({},r),t),this.options.types=i,this.notifications.onUpdate(function(t,i){return e.view.update(t,i)}),this.view.on(f.Dismiss,function(t){var i=t.target,t=t.event;e._removeNotification(i),i.triggerEvent(f.Dismiss,t)}),this.view.on(f.Click,function(t){var i=t.target,t=t.event;return i.triggerEvent(f.Click,t)})}return d.prototype.error=function(t){t=this.normalizeOptions("error",t);return this.open(t)},d.prototype.success=function(t){t=this.normalizeOptions("success",t);return this.open(t)},d.prototype.open=function(i){var t=this.options.types.find(function(t){return t.type===i.type})||{},t=o(o({},t),i);this.assignProps(["ripple","position","dismissible"],t);t=new n(t);return this._pushNotification(t),t},d.prototype.dismissAll=function(){for(;this.notifications.splice(0,1););},d.prototype.assignProps=function(t,i){var e=this;t.forEach(function(t){i[t]=(null==i[t]?e.options:i)[t]})},d.prototype._pushNotification=function(t){var i=this;this.notifications.push(t);var e=(void 0!==t.options.duration?t:this).options.duration;e&&setTimeout(function(){return i._removeNotification(t)},e)},d.prototype._removeNotification=function(t){t=this.notifications.indexOf(t);-1!==t&&this.notifications.splice(t,1)},d.prototype.normalizeOptions=function(t,i){t={type:t};return"string"==typeof i?t.message=i:"object"==typeof i&&(t=o(o({},t),i)),t},d.prototype.registerTypes=function(t){var i=(t&&t.types||[]).slice();return r.types.map(function(e){var n=-1;i.forEach(function(t,i){t.type===e.type&&(n=i)});var t=-1!==n?i.splice(n,1)[0]:{};return o(o({},e),t)}).concat(i)},d}(); 190/* !libraries/notyf/notyf.min.js */; 191/* modules/glyanec/drupal_noty_messages/misc/js/notyf.js */ 192(function($){let NotyF=function(){this.notyf=new Notyf(drupalSettings.notyf);this.noty=function(type,mess){if(type==='status'){type='success';} 193if(!drupalSettings.notyf.isType[type]){type='info';} 194this.notyf.open({type:type,message:mess});}};if(drupalSettings.notyf){Drupal.NotyGenerate.setPlugin('notyf',new NotyF());Drupal.NotyGenerate.run();}})(jQuery); 195/* !modules/glyanec/drupal_noty_messages/misc/js/notyf.js */; 196/* modules/glyanec/gchat/js/gchat.js */ 197(function(Drupal,drupalSettings){'use strict';function GChat(){this.settings=drupalSettings.gchat;this.enabled=this.settings.chat_enabled;this.timezone=this.settings.timezone?this.settings.timezone:0;const event=new CustomEvent('GChat:init',{detail:{gchat:this}});document.dispatchEvent(event);if(!this.enabled){return;} 198try{this.init();}catch(error){return;}} 199GChat.prototype={init:function(){this.checkSchedule();},destroy:function(){document.getElementById('online-chat-wrapper').remove();throw'Destroy';},setStatus:function(state){this.status=state;if(document.getElementById('online-chat-status')){document.getElementById('online-chat-status').innerHTML=this.settings.texts[state];}},checkSchedule:function(){var date=new Date();var day=date.getDay();var days={0:'sun',1:'mon',2:'tue',3:'wed',4:'thu',5:'fri',6:'sut',} 200this.currentSchedule=this.settings.schedule[days[day]];if(!this.currentSchedule.enabled){this.setStatus('day_off');return;} 201var openTime=new Date('1970-01-01T'+this.currentSchedule.open.time+'Z');var closeTime=new Date('1970-01-01T'+this.currentSchedule.close.time+'Z');var currentTime=new Date();currentTime.setUTCSeconds(currentTime.getUTCSeconds()+this.settings.timezone);var hours=openTime.getUTCHours()-currentTime.getUTCHours();var minutes=openTime.getUTCMinutes()-currentTime.getUTCMinutes();if(hours>0||(hours===0&&minutes>0)){this.setStatus('close');return;} 202var hours=closeTime.getUTCHours()-currentTime.getUTCHours();var minutes=closeTime.getUTCMinutes()-currentTime.getUTCMinutes();if(hours<0||(hours===0&&minutes<0)){this.setStatus('close');return;} 203this.setStatus('open');},render:function(){this.html=this.createHtml();this.applyTransform();document.body.append(this.html);this.initEvents();},createHtml:function(){var markup='<div class="b-callback__inner">';if(this.settings.image_url){markup+=' <div class="chat-button b-callback__image"> <img class="no-chat-button" src="'+this.settings.image_url+'" style="border-radius: 50%;" alt="Callback"> </div>';} 204markup+=' <div class="b-callback__title">'+(this.settings.texts['title']?this.settings.texts['title']:Drupal.t('Online chat'))+'</div> <div class="b-callback__text" id="online-chat-status">'+this.settings.texts[this.status]+'</div> </div> <div class="b-callback__icons">';for(var network in this.settings.networks){if(this.settings.networks[network].enabled&&(this.settings.networks[network].data||this.settings.networks[network].raw)){markup+=this.getNetworkTemplate(network);}} 205markup+='</div>';var wrapper=document.createElement('div');wrapper.id='online-chat-wrapper';wrapper.classList.add('b-callback');wrapper.innerHTML=markup;if(this.status==='close'){wrapper.classList.add('offline');} 206else{wrapper.classList.add('online');} 207return wrapper;},networkTemplates:{binotel:function(raw=false){if(raw){return'<div class="b-callback__icon"> <a title="Chat" href="'+raw+'" target="_blank"> <div class="icon chat_dialog chat_dialog_advanced binotel_dialog_advanced"></div> </a> </div>';} 208return'<div class="b-callback__icon"> <a title="Chat" href="javascript:void(0)"> <div class="icon chat_dialog chat_dialog_advanced binotel_dialog_advanced" id="binotel-chat-button"></div> </a> </div>';},replain:function(raw=false){if(raw){return'<div class="b-callback__icon"> <a title="Chat" href="'+raw+'" target="_blank"> <div class="icon chat_dialog chat_dialog_advanced"></div> </a> </div>';} 209return'<div class="b-callback__icon"> <a title="Chat" href="javascript:void(0)"> <div class="icon chat_dialog chat_dialog_advanced" id="glyanec-chat-button"></div> </a> </div>';},tawk_to:function(raw=false){if(raw){return'<div class="b-callback__icon"> <a title="Chat" href="'+raw+'" target="_blank"> <div class="icon chat_dialog chat_dialog_advanced"></div> </a> </div>';} 210return'<div class="b-callback__icon"> <a title="Chat" href="javascript:void(0)"> <div class="icon chat_dialog chat_dialog_advanced" id="tawk_to-chat-button"></div> </a> </div>';},viber:function(raw=false){if(raw){return'<div class="b-callback__icon"> <a title="Viber" href="'+raw+'" class="link_viber" target="_blank"> <div class="icon viber_dialog viber_dialog_advanced"></div> </a> </div>';} 211if(this.isMobile()){var link='<a title="Viber" href="viber://add?number='+this.settings.networks.viber.data+'" class="link_viber link_mobile">';}else{var link='<a title="Viber" href="viber://chat?number=%2B'+this.settings.networks.viber.data+'" class="link_viber link_pc">';} 212return'<div class="b-callback__icon"> '+link+' <div class="icon viber_dialog viber_dialog_advanced"></div> </a> </div>';},whatsapp:function(raw=false){if(raw){return'<div class="b-callback__icon"> <a title="WhatsApp" href="'+raw+'" target="_blank"> <div class="icon whatsapp_dialog whatsapp_dialog_advanced"></div> </a> </div>';} 213return'<div class="b-callback__icon">
213 <a title="WhatsApp" href="https://api.whatsapp.com/send?phone='+this.settings.networks.whatsapp.data+'" target="_blank"> <div class="icon whatsapp_dialog whatsapp_dialog_advanced"></div> </a> </div>';},telegram:function(raw=false){if(raw){return'<div class="b-callback__icon"> <a title="Telegram" href="'+raw+'" target="_blank"> <div class="icon telegram_dialog telegram_dialog_advanced"></div> </a> </div>';} 214return'<div class="b-callback__icon"> <a title="Telegram" href="tg://resolve?domain='+this.settings.networks.telegram.data+'"> <div class="icon telegram_dialog telegram_dialog_advanced"></div> </a> </div>';},messenger:function(raw=false){if(raw){return'<div class="b-callback__icon"> <a title="Facebook" href="'+raw+'" target="_blank"> <div class="icon fb_dialog_fb_dialog_advanced"></div> </a> </div>';} 215return'<div class="b-callback__icon"> <a title="Facebook" target="_blank" href="https://m.me/'+this.settings.networks.messenger.data+'"> <div class="icon fb_dialog_fb_dialog_advanced" id="glyanec-fb-button"></div> </a> </div>';},skype:function(raw=false){if(raw){return'<div class="b-callback__icon"> <a title="Skype" href="'+raw+'" target="_blank"> <div class="icon viber_skype skyper_dialog_advanced"></div> </a> </div>';} 216return'<div class="b-callback__icon"> <a title="Skype" href="skype:'+this.settings.networks.skype.data+'?chat" class="link_skype"> <div class="icon viber_skype skyper_dialog_advanced"></div> </a> </div>';},},getNetworkTemplate:function(network){const data=this.settings.networks[network];const raw=data.raw;const title=data.title||network;const imageUrl=data.image_url||'';if(network in this.networkTemplates){return this.networkTemplates[network].call(this,raw);} 217let markup='<div class="b-callback__icon">';if(raw){markup+=imageUrl?'<a title="'+title+'" href="'+raw+'" target="_blank"><img src="'+imageUrl+'" class="custom-chat-image" alt="'+title+'"></a>':'<a title="'+title+'" href="'+raw+'" target="_blank"><div class="icon chat_dialog dialog_custom dialog_'+network+'"></div></a>';} 218markup+='</div>';return markup;},isMobile:function(){if(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i)){return true;}else{return false;}},initEvents:function(){document.getElementById('online-chat-wrapper').onclick=function(e){e.ignore_doc_click_buttons=true;if(document.querySelectorAll('.b-callback__icon').length>1){if(this.classList.contains('hover')){this.classList.remove('hover');}else{this.classList.add('hover');}}else{this.getElementsByClassName('icon')[0].click();}} 219document.onclick=function(e){if(!e.ignore_doc_click_buttons){document.getElementById('online-chat-wrapper').classList.remove('hover');}}},applyTransform:function(){var icons=this.html.getElementsByClassName('b-callback__icon');if(!icons.length){return;} 220var transforms={desktop:{3:{x:-20,y:50,},2:{x:10,y:40,},1:{x:25,y:20,},}} 221var margins={desktop:{3:{horizontal:90,vertical:-40,},2:{horizontal:47,vertical:-25,},1:{horizontal:10,vertical:-5,}},desktopEven:{3:{horizontal:90,vertical:-40,},2:{horizontal:72,vertical:-35,},1:{horizontal:30,vertical:-15,},},} 222if(icons.length / 2!==parseInt(icons.length / 2,10)){var evenCount=false;var pack='desktop';} 223else{var evenCount=true;var pack='desktopEven';} 224if(icons.length>2){for(var i=0;i<Math.floor(icons.length / 2);i++){var offset=Math.floor(icons.length / 2)-i;if(evenCount){offset-=1;} 225if(!(offset in transforms.desktop)){continue;} 226icons[i].style.transform='translate('+transforms.desktop[offset].x+'px,'+transforms.desktop[offset].y+'px)';icons[i].style.marginLeft=margins[pack][offset].horizontal+'px';icons[i].style.marginBottom=margins[pack][offset].vertical+'px';} 227for(var i=Math.ceil(icons.length / 2);i<icons.length;i++){var offset=i-Math.floor(icons.length / 2);if(!(offset in transforms.desktop)){continue;} 228icons[i].style.transform='translate('+transforms.desktop[offset].x+'px,-'+transforms.desktop[offset].y+'px)';icons[i].style.marginLeft=margins[pack][offset].horizontal+'px';icons[i].style.marginTop=margins[pack][offset].vertical+'px';}} 229if(evenCount){icons[Math.floor(icons.length / 2)-1].style.transform='translate(25px, 10px)';icons[Math.floor(icons.length / 2)-1].style.marginBottom='-3px';icons[Math.floor(icons.length / 2)].style.transform='translate(25px, -10px)';} 230else{icons[Math.floor(icons.length / 2)].style.transform='translate(25px, 0)';}},initReplain:function(){if(!this.settings.networks.replain.enabled||!this.settings.networks.replain.data||this.settings.networks.replain.raw){return;} 231var script=document.createElement('script');script.innerHTML=this.settings.networks.replain.data;document.body.appendChild(script);var chatButton=document.getElementById('glyanec-chat-button');function OnSubtreeModified(){if(document.getElementById('__replain_widget')){document.body.removeEventListener('DOMSubtreeModified',OnSubtreeModified);var widget=document.getElementById('__replain_widget');if('MutationObserver'in window){var observer=new MutationObserver(function(mutations){mutations.forEach(function(mutation){if(mutation.attributeName==='style'){if(mutation.target.offsetWidth>100){widget.style.pointerEvents='auto';}else{widget.style.pointerEvents='none';}}});});var observerConfig={attributes:true,attributeFilter:["style"]};observer.observe(widget,observerConfig);} 232var iframe=document.getElementById('__replain_widget_iframe');iframe.onload=function(){var doc=iframe.contentDocument;if(typeof doc!=='undefined'){var style=doc.createElement('style');
232style.innerHTML='.single-message .notification{display: none !important;}.btn-img{display:none;}.btn{box-shadow: none !important; pointer-events: none;}.unreaded-count{display: none !important;} .notification{pointer-events: auto !important;}';doc.head.appendChild(style);setTimeout(function(){var messages=doc.getElementsByClassName('message');if(messages.length<2){doc.getElementById('app').classList.add('single-message');}},10000);setTimeout(function(){var btn=doc.getElementsByClassName('btn-img');chatButton.addEventListener('click',function(e){e.preventDefault();btn[0].click();doc.getElementById('app').classList.remove('single-message');},500);});}}}} 233document.body.addEventListener('DOMSubtreeModified',OnSubtreeModified);},initTawkTo:function(){if(!this.settings.networks.tawk_to.enabled||!this.settings.networks.tawk_to.data||this.settings.networks.tawk_to.raw){return;} 234var script=document.createElement('script');script.innerHTML=this.settings.networks.tawk_to.data;document.body.appendChild(script);var chatButton=document.getElementById('tawk_to-chat-button');var chatWrap=document.getElementById('online-chat-wrapper');window.Tawk_API=window.Tawk_API||{};if(typeof window.Tawk_API!=='undefined'){window.Tawk_API.onLoad=function(){window.Tawk_API.minimize();window.Tawk_API.hideWidget();setTimeout(function(){if(window.Tawk_API.isChatMaximized()){chatWrap.classList.add('hide');}},300);};chatButton.addEventListener('click',function(e){window.Tawk_API.showWidget();window.Tawk_API.maximize();chatWrap.classList.add('hide');},500);window.Tawk_API.onChatMinimized=function(){chatWrap.classList.remove('hide');window.Tawk_API.hideWidget();};}},initBinotel:function(){if(!this.settings.networks.binotel.enabled||!this.settings.networks.binotel.data||this.settings.networks.binotel.raw){return;} 235var fbjs=document.createElement('script');fbjs.type='text/javascript';fbjs.text+=" (function(d, w, s) { var widgetHash = '"+this.settings.networks.binotel.data+"', gcw = d.createElement(s); gcw.type = 'text/javascript'; gcw.async = true; gcw.src = '//widgets.binotel.com/getcall/widgets/'+ widgetHash +'.js'; var sn = d.getElementsByTagName(s)[0]; sn.parentNode.insertBefore(gcw, sn); })(document, window, 'script');";document.head.append(fbjs);document.getElementById('binotel-chat-button').onclick=function(e){for(var i in window.BinotelGetCall){window.BinotelGetCall[i].openPassiveForm();}};},initFB:function(){if(!this.settings.networks.messenger.enabled||!this.settings.networks.messenger.data||this.settings.networks.messenger.raw){return;} 236return;var fbroot=document.createElement('div');fbroot.id='fb-root';document.body.append(fbroot);var fbjs=document.createElement('script');fbjs.type='text/javascript';fbjs.text="window.fbAsyncInit = function() { FB.init({ xfbml: true, version: 'v6.0' }); };";fbjs.text+="(function(d, s, id) { var lang = 'en_US'; if ( d.documentElement.lang == 'uk' ){ lang = 'uk_UA'; } else if ( d.documentElement.lang == 'ru' ){ lang = 'ru_RU'; } var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = 'https://connect.facebook.net/' + lang + '/sdk/xfbml.customerchat.js'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));";document.head.append(fbjs);var fbdiv=document.createElement('div');fbdiv.classList='fb-customerchat';fbdiv.setAttribute('attribution','setup_tool');fbdiv.setAttribute('page_id',this.settings.networks.messenger.data);fbdiv.setAttribute('logged_in_greeting',Drupal.t("Hi! We're here to answer any questions you may have."));fbdiv.setAttribute('logged_out_greeting',Drupal.t("Hi! We're here to answer any questions you may have."));fbdiv.setAttribute('greeting_dialog_display','hide');document.body.append(fbdiv);document.getElementById('glyanec-fb-button').onclick=function(e){FB.CustomerChat.show();};var interval=false;interval=setInterval(function(){if(window.FB&&FB.CustomerChat&&typeof FB.CustomerChat.show=='function'){document.getElementById('glyanec-fb-button').style.display='block';clearInterval(interval);}},500);}} 237document.addEventListener('DOMContentLoaded',function(){Drupal.GChat=new GChat;if(Drupal.GChat.status==='close'&&Drupal.GChat.settings.hide_chat){} 238else if(Drupal.GChat.enabled){Drupal.GChat.render();Drupal.GChat.initReplain();Drupal.GChat.initTawkTo();Drupal.GChat.initFB();Drupal.GChat.initBinotel();const event=new CustomEvent('GChat:post_init',{detail:{gchat:Drupal.GChat}});document.dispatchEvent(event);}});})(Drupal,drupalSettings); 239/* !modules/glyanec/gchat/js/gchat.js */; 240/* modules/contrib/geolocation/js/MapCenter/fitlocations.js */ 241(function(Drupal){"use strict";Drupal.geolocation=Drupal.geolocation||{};Drupal.geolocation.mapCenter=Drupal.geolocation.mapCenter||{};Drupal.geolocation.mapCenter.fit_bounds=function(map,centerOption){if(typeof map.mapMarkers==="undefined"){return false;} 242if(map.mapMarkers.length===0){return false;} 243map.fitMapToMarkers();
243if(centerOption.settings.reset_zoom){map.setZoom(undefined,true);}else if(centerOption.settings.min_zoom){map.getZoom().then(function(zoom){if(centerOption.settings.min_zoom<zoom){map.setZoom(centerOption.settings.min_zoom);}});} 244return true;};})(Drupal); 245/* !modules/contrib/geolocation/js/MapCenter/fitlocations.js */; 246/* modules/contrib/geolocation/js/MapCenter/static-location.js */ 247(function(Drupal){"use strict";Drupal.geolocation=Drupal.geolocation||{};Drupal.geolocation.mapCenter=Drupal.geolocation.mapCenter||{};Drupal.geolocation.mapCenter.location_plugins=function(map,centerOption){if(typeof centerOption.success!=="undefined"&¢erOption.success){return true;} 248return false;};})(Drupal); 249/* !modules/contrib/geolocation/js/MapCenter/static-location.js */; 250/* modules/contrib/geolocation/js/geolocation-api.js */ 251(function($,Drupal){"use strict";Drupal.geolocation=Drupal.geolocation||{};Drupal.geolocation.maps=Drupal.geolocation.maps||[];Drupal.geolocation.mapCenter=Drupal.geolocation.mapCenter||{};function GeolocationMapBase(mapSettings){this.settings=mapSettings.settings||{};this.wrapper=mapSettings.wrapper;this.container=mapSettings.wrapper.find(".geolocation-map-container").first();if(this.container.length!==1){throw"Geolocation - Map container not found";} 252this.initialized=false;this.populated=false;this.lat=mapSettings.lat;this.lng=mapSettings.lng;if(typeof mapSettings.id==="undefined"){this.id="map"+Math.floor(Math.random()*10000);}else{this.id=mapSettings.id;} 253this.mapCenter=mapSettings.map_center;this.mapMarkers=this.mapMarkers||[];this.mapShapes=this.mapShapes||[];return this;} 254GeolocationMapBase.prototype={addControl:function(element){},removeControls:function(){},getZoom:function(){},setZoom:function(zoom,defer){},getCenter:function(){},setCenter:function(){if(typeof this.wrapper.data("preserve-map-center")!=="undefined"){return;} 255this.setZoom();this.setCenterByCoordinates({lat:this.lat,lng:this.lng});if(typeof this.mapCenter!=="undefined"){var that=this;var centerOptions=Object.keys(that.mapCenter).map(function(item){return that.mapCenter[item];}).sort(function(a,b){return a.weight-b.weight;});centerOptions.some(function(centerOption){if(typeof Drupal.geolocation.mapCenter[centerOption.map_center_id]==="function"){return Drupal.geolocation.mapCenter[centerOption.map_center_id](that,centerOption);}});}},setCenterByCoordinates:function(coordinates,accuracy,identifier){this.centerUpdatedCallback(coordinates,accuracy,identifier);},setMapMarker:function(marker){this.mapMarkers.push(marker);this.markerAddedCallback(marker);},removeMapMarker:function(marker){var that=this;$.each(this.mapMarkers,function(index,item){if(item===marker){that.markerRemoveCallback(marker);that.mapMarkers.splice(Number(index),1);}});},removeMapMarkers:function(){this.mapMarkers.filter(item=>typeof item!=='undefined').forEach(marker=>this.removeMapMarker(marker));},addShape:function(shape){this.mapShapes.push(shape);},removeShape:function(shape){var that=this;$.each(this.mapShapes,function(index,item){if(item===shape){that.mapShapes.splice(Number(index),1);}});},removeShapes:function(){this.mapShapes.filter(item=>typeof item!=='undefined').forEach(shape=>this.removeShape(shape));},fitMapToMarkers:function(markers,identifier){var boundaries=this.getMarkerBoundaries();if(boundaries===false){return false;} 256this.fitBoundaries(boundaries,identifier);},getMarkerBoundaries:function(markers){},fitBoundaries:function(boundaries,identifier){this.centerUpdatedCallback(this.getCenter(),null,identifier);},clickCallback:function(location){this.clickCallbacks=this.clickCallbacks||[];$.each(this.clickCallbacks,function(index,callback){callback(location);});},addClickCallback:function(callback){this.clickCallbacks=this.clickCallbacks||[];this.clickCallbacks.push(callback);},doubleClickCallback:function(location){this.doubleClickCallbacks=this.doubleClickCallbacks||[];$.each(this.doubleClickCallbacks,function(index,callback){callback(location);});},addDoubleClickCallback:function(callback){this.doubleClickCallbacks=this.doubleClickCallbacks||[];this.doubleClickCallbacks.push(callback);},contextClickCallback:function(location){this.contextClickCallbacks=this.contextClickCallbacks||[];$.each(this.contextClickCallbacks,function(index,callback){callback(location);});},addContextClickCallback:function(callback){this.contextClickCallbacks=this.contextClickCallbacks||[];this.contextClickCallbacks.push(callback);},initializedCallback:function(){this.initializedCallbacks=this.initializedCallbacks||[];while(this.initializedCallbacks.length>0){this.initializedCallbacks.shift()(this);} 257this.initialized=true;},addInitializedCallback:function(callback){if(this.initialized){callback(this);}else{this.initializedCallbacks=this.initializedCallbacks||[];this.initializedCallbacks.push(callback);}},updatedCallback:function(mapSettings){var that=this;this.updatedCallbacks=this.updatedCallbacks||[];this.updatedCallbacks.forEach(function(callback){callback(that,mapSettings);});},addUpdatedCallback:function(callback){this.updatedCallbacks=this.updatedCallbacks||[];this.updatedCallbacks.push(callback);}
257,boundsChangedCallback:function(bounds){this.boundsChangedCallbacks=this.boundsChangedCallbacks||[];$.each(this.boundsChangedCallbacks,function(index,callback){callback(bounds);});},addBoundsChangedCallback:function(callback){this.boundsChangedCallbacks=this.boundsChangedCallbacks||[];this.boundsChangedCallbacks.push(callback);},centerUpdatedCallback:function(coordinates,accuracy,identifier){this.centerUpdatedCallbacks=this.centerUpdatedCallbacks||[];$.each(this.centerUpdatedCallbacks,function(index,callback){callback(coordinates,accuracy,identifier);});},addCenterUpdatedCallback:function(callback){this.centerUpdatedCallbacks=this.centerUpdatedCallbacks||[];this.centerUpdatedCallbacks.push(callback);},markerAddedCallback:function(marker){this.markerAddedCallbacks=this.markerAddedCallbacks||[];$.each(this.markerAddedCallbacks,function(index,callback){callback(marker);});},addMarkerAddedCallback:function(callback,existing){existing=existing||true;if(existing){$.each(this.mapMarkers,function(index,marker){callback(marker);});} 258this.markerAddedCallbacks=this.markerAddedCallbacks||[];this.markerAddedCallbacks.push(callback);},markerRemoveCallback:function(marker){this.markerRemoveCallbacks=this.markerRemoveCallbacks||[];$.each(this.markerRemoveCallbacks,function(index,callback){callback(marker);});},addMarkerRemoveCallback:function(callback){this.markerRemoveCallbacks=this.markerRemoveCallbacks||[];this.markerRemoveCallbacks.push(callback);},populatedCallback:function(){this.populatedCallbacks=this.populatedCallbacks||[];while(this.populatedCallbacks.length>0){this.populatedCallbacks.shift()(this);} 259this.populated=true;},addPopulatedCallback:function(callback){if(this.populated){callback(this);}else{this.populatedCallbacks=this.populatedCallbacks||[];this.populatedCallbacks.push(callback);}},loadMarkersFromContainer:function(){var locations=[];this.wrapper.find(".geolocation-location").each(function(index,locationWrapperElement){var locationWrapper=$(locationWrapperElement);var position={lat:Number(locationWrapper.data("lat")),lng:Number(locationWrapper.data("lng")),};var location={position:position,title:locationWrapper.find(".location-title").text().trim(),setMarker:true,locationWrapper:locationWrapper,};if(typeof locationWrapper.data("icon")!=="undefined"){location.icon=locationWrapper.data("icon").toString();} 260if(typeof locationWrapper.data("label")!=="undefined"){location.label=locationWrapper.data("label").toString();} 261if(locationWrapper.data("set-marker")==="false"){location.setMarker=false;} 262locations.push(location);});return locations;},loadShapesFromContainer:function(){var shapes=[];this.wrapper.find(".geolocation-shape").each(function(index,shapeWrapperElement){var shapeWrapper=$(shapeWrapperElement);var meta=shapeWrapper.find('span[typeof="GeoShape"] meta').first();if(meta.length===0){return;} 263var type=meta.attr("property").toString();var coordinates=[];$.each(meta.attr("content").toString().split(" "),function(index,rawCoordinate){var coordinate=rawCoordinate.split(",");if(coordinate[0].length===0||coordinate[1].length===0){return;} 264coordinates.push({lat:parseFloat(coordinate[0]),lng:parseFloat(coordinate[1]),});});var shape={coordinates:coordinates,shape:type,shapeWrapper:shapeWrapper,};switch(type){case"line":shape.title=shapeWrapper.find(".polyline-title").text().trim();break;case"polygon":shape.title=shapeWrapper.find(".polygon-title").text().trim();if(typeof shapeWrapper.data("fillColor")!=="undefined"){shape.fillColor=shapeWrapper.data("fillColor").toString();} 265if(typeof shapeWrapper.data("fillOpacity")!=="undefined"){shape.fillOpacity=parseFloat(shapeWrapper.data("fillOpacity").toString());} 266break;} 267if(typeof shapeWrapper.data("strokeColor")!=="undefined"){shape.strokeColor=shapeWrapper.data("strokeColor").toString();} 268if(typeof shapeWrapper.data("strokeWidth")!=="undefined"){shape.strokeWidth=parseInt(shapeWrapper.data("strokeWidth").toString());} 269if(typeof shapeWrapper.data("strokeOpacity")!=="undefined"){shape.strokeOpacity=parseFloat(shapeWrapper.data("strokeOpacity").toString());} 270shapes.push(shape);});return shapes;}
270,boundariesNormalized:function(boundaries){if(typeof boundaries.north==="number"&&typeof boundaries.east==="number"&&typeof boundaries.south==="number"&&typeof boundaries.west==="number"){return true;} 271return false;},normalizeBoundaries:function(boundaries){var that=this;if(that.boundariesNormalized(boundaries)){return boundaries;} 272if(typeof boundaries.north!=="undefined"&&typeof boundaries.south!=="undefined"&&typeof boundaries.east!=="undefined"&&typeof boundaries.west!=="undefined"){var castBoundaries={north:Number(boundaries.north),east:Number(boundaries.east),south:Number(boundaries.south),west:Number(boundaries.west),};if(that.boundariesNormalized(castBoundaries)){return castBoundaries;}} 273$.each(Drupal.geolocation.MapProviders,function(type,name){if(typeof Drupal.geolocation[name].prototype.normalizeBoundaries!=="undefined"){var normalizedBoundaries=Drupal.geolocation[name].prototype.normalizeBoundaries.call(null,boundaries);} 274if(that.boundariesNormalized(normalizedBoundaries)){boundaries=normalizedBoundaries;return false;}});if(that.boundariesNormalized(boundaries)){return boundaries;} 275return false;},};Drupal.geolocation.GeolocationMapBase=GeolocationMapBase;function Factory(mapSettings,reset){reset=reset||false;mapSettings.type=mapSettings.type||"google_maps";var map=null;var existingMap=Drupal.geolocation.getMapById(mapSettings.id);if(reset===true||!existingMap){if(typeof Drupal.geolocation[Drupal.geolocation.MapProviders[mapSettings.type]]!=="undefined"){var mapProvider=Drupal.geolocation[Drupal.geolocation.MapProviders[mapSettings.type]];map=new mapProvider(mapSettings);Drupal.geolocation.maps.push(map);}}else{map=existingMap;map.updatedCallback(mapSettings);} 276if(!map){console.error("Map could not be initialized.");return false;} 277if(typeof map.container==="undefined"){console.error("Map container not set.");return false;} 278if(map.container.length!==1){console.error("Map container not unique.");return false;} 279return map;} 280Drupal.geolocation.Factory=Factory;Drupal.geolocation.MapProviders={};Drupal.geolocation.addMapProvider=function(type,name){Drupal.geolocation.MapProviders[type]=name;};Drupal.geolocation.getMapById=function(id){var map=false;$.each(Drupal.geolocation.maps,function(index,currentMap){if(currentMap.id===id){map=currentMap;}});if(!map){return false;} 281if(typeof map.container==="undefined"){console.error("Existing map container not set.");return false;} 282if(map.container.length!==1){console.error("Existing map container not unique.");return false;} 283return map;};Drupal.geolocation.executeFeatureOnAllMaps=function(featureId,callback,drupalSettings){if(typeof drupalSettings.geolocation==="undefined"){return false;} 284$.each(drupalSettings.geolocation.maps,function(mapId,mapSettings){if(typeof mapSettings[featureId]==="undefined"){return;} 285if(!mapSettings[featureId].enable){return;} 286var map=Drupal.geolocation.getMapById(mapId);if(!map){return;} 287map.features=map.features||{};map.features[featureId]=map.features[featureId]||{};if(typeof map.features[featureId].executed==="undefined"){map.features[featureId].executed=false;} 288if(map.features[featureId].executed){return;} 289map.addPopulatedCallback(function(map){if(map.features[featureId].executed){return;} 290var result=callback(map,mapSettings[featureId]);if(result===true){map.features[featureId].executed=true;}});});};})(jQuery,Drupal); 291/* !modules/contrib/geolocation/js/geolocation-api.js */; 292/* modules/contrib/geolocation/js/geolocation-map.js */ 293(function($,Drupal){"use strict";Drupal.behaviors.geolocationMap={attach:function(context,drupalSettings){$(once("geolocation-map-processed",".geolocation-map-wrapper")).each(function(index,item){var mapWrapper=$(item);var mapSettings={};var reset=false;mapSettings.id=mapWrapper.attr("id");mapSettings.wrapper=mapWrapper;if(mapWrapper.length===0){return;} 294mapSettings.lat=0;mapSettings.lng=0;if(mapWrapper.data("centre-lat")&&mapWrapper.data("centre-lng")){mapSettings.lat=Number(mapWrapper.data("centre-lat"));mapSettings.lng=Number(mapWrapper.data("centre-lng"));} 295if(mapWrapper.data("map-type")){mapSettings.type=mapWrapper.data("map-type");} 296if(typeof drupalSettings.geolocation==="undefined"){console.error("Bailing out for lack of settings.");return;} 297$.each(drupalSettings.geolocation.maps,function(mapId,currentSettings){if(mapId===mapSettings.id){mapSettings=$.extend(currentSettings,mapSettings);}});if(mapWrapper.parent().hasClass("preview-section")){if(mapWrapper.parentsUntil("#views-live-preview").length){reset=true;}} 298var map=Drupal.geolocation.Factory(mapSettings,reset);if(!map){once.removeOnce("geolocation-map-processed",mapWrapper);return;} 299map.addInitializedCallback(function(map){map.removeControls();$(".geolocation-map-controls > *",map.wrapper).each(function(index,control){map.addControl(control);});map.removeMapMarkers();var locations=map.loadMarkersFromContainer();$.each(locations,function(index,location){map.setMapMarker(location);});map.removeShapes();var shapes=map.loadShapesFromContainer();$.each(shapes,function(index,shape){map.addShape(shape);});map.setCenter();map.wrapper.find(".geolocation-location").hide();});map.addUpdatedCallback(function(map,mapSettings){map.settings=$.extend(map.settings,mapSettings.settings);map.wrapper=mapSettings.wrapper;mapSettings.wrapper.find(".geolocation-map-container").replaceWith(map.container);map.lat=mapSettings.lat;map.lng=mapSettings.lng;if(typeof mapSettings.map_center!=="undefined"){map.mapCenter=mapSettings.map_center;}});});},detach:function(context,drupalSettings){},};})(jQuery,Drupal); 300/* !modules/contrib/geolocation/js/geolocation-map.js */; 301/* modules/contrib/geolocation/js/geolocation-common-map.js */ 302(function($,window,Drupal){"use strict";Drupal.behaviors.geolocationCommonMap={attach:function(context,drupalSettings){if(typeof drupalSettings.geolocation==="undefined"){return;} 303$.each(drupalSettings.geolocation.commonMap,function(mapId,commonMapSett
303ings){var map=Drupal.geolocation.getMapById(mapId);if(!map){return;} 304if(typeof commonMapSettings.dynamic_map!=="undefined"&&commonMapSettings.dynamic_map.enable&&commonMapSettings.dynamic_map.hide_form&&typeof commonMapSettings.dynamic_map.parameter_identifier!=="undefined"){var exposedForm=$("form#views-exposed-form-"+ 305commonMapSettings.dynamic_map.update_view_id.replace(/_/g,"-")+"-"+ 306commonMapSettings.dynamic_map.update_view_display_id.replace(/_/g,"-"));if(exposedForm.length===1){exposedForm.find('input[name^="'+ 307commonMapSettings.dynamic_map.parameter_identifier+'"]').each(function(index,item){$(item).parent().hide();});if(exposedForm.find("input:visible:not(.form-submit), select:visible").length===0){exposedForm.hide();}}}});},detach:function(context,drupalSettings){},};Drupal.geolocation.commonMap=Drupal.geolocation.commonMap||{};Drupal.geolocation.commonMap.dynamicMapViewsAjaxSettings=function(commonMapSettings){var view=$(".view-id-"+ 308commonMapSettings.dynamic_map.update_view_id+".view-display-id-"+ 309commonMapSettings.dynamic_map.update_view_display_id);if(view.length===0){console.error("Geolocation - No common map container found.");return;} 310if(typeof commonMapSettings.dynamic_map.boundary_filter==="undefined"){return;} 311var matches=/(js-view-dom-id-\w+)/.exec(view.attr("class").toString());var currentViewId=matches[1].replace("js-view-dom-id-","views_dom_id:");var viewInstance=Drupal.views.instances[currentViewId];var ajaxSettings=$.extend(true,{},viewInstance.element_settings);ajaxSettings.progress.type="none";var exposedForm=$("form#views-exposed-form-"+ 312commonMapSettings.dynamic_map.update_view_id.replace(/_/g,"-")+"-"+ 313commonMapSettings.dynamic_map.update_view_display_id.replace(/_/g,"-"));if(exposedForm.length){jQuery.each(exposedForm.serializeArray(),function(index,field){var add={};add[field.name]=field.value;ajaxSettings.submit=$.extend(ajaxSettings.submit,add);});} 314ajaxSettings.submit=$.extend(ajaxSettings.submit,{geolocation_common_map_dynamic_view:true,});return ajaxSettings;};})(jQuery,window,Drupal); 315/* !modules/contrib/geolocation/js/geolocation-common-map.js */; 316/* modules/contrib/geolocation/modules/geolocation_leaflet/js/geolocation-leaflet-api.js */ 317(function($,Drupal){'use strict';function GeolocationLeafletMap(mapSettings){var leafletPromise=new Promise(function(resolve,reject){if(typeof L==='undefined'){setTimeout(function(){if(typeof L==='undefined'){reject();} 318else{resolve();}},1000);} 319else{resolve();}});this.type='leaflet';Drupal.geolocation.GeolocationMapBase.call(this,mapSettings);var defaultLeafletSettings={zoom:10};this.settings.leaflet_settings=$.extend(defaultLeafletSettings,this.settings.leaflet_settings);this.container.css({height:this.settings.leaflet_settings.height,width:this.settings.leaflet_settings.width});var that=this;leafletPromise.then(function(){var leafletMapSettings=that.settings.leaflet_settings;leafletMapSettings.center=[that.lat,that.lng];leafletMapSettings.zoomControl=false;leafletMapSettings.attributionControl=false;leafletMapSettings.crs=L.CRS[that.settings.leaflet_settings.crs];var leafletMap=L.map(that.container.get(0),leafletMapSettings);var markerLayer=L.layerGroup().addTo(leafletMap);var tileLayer=L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(leafletMap);that.leafletMap=leafletMap;that.markerLayer=markerLayer;that.tileLayer=tileLayer;that.addPopulatedCallback(function(map){var singleClick;map.leafletMap.on('click',function(e){singleClick=setTimeout(function(){map.clickCallback({lat:e.latlng.lat,lng:e.latlng.lng});},500);});map.leafletMap.on('dblclick',function(e){clearTimeout(singleClick);map.doubleClickCallback({lat:e.latlng.lat,lng:e.latlng.lng});});map.leafletMap.on('contextmenu',function(e){map.contextClickCallback({lat:e.latlng.lat,lng:e.latlng.lng});});map.leafletMap.on('moveend',function(e){map.boundsChangedCallback(map.leafletMap.getBounds());});});that.initializedCallback();that.populatedCallback();}).catch(function(error){console.error(error);});} 320GeolocationLeafletMap.prototype=Object.create(Drupal.geolocation.GeolocationMapBase.prototype);GeolocationLeafletMap.prototype.constructor=GeolocationLeafletMap;GeolocationLeafletMap.prototype.getZoom=function(){var that=this;return new Promise(function(resolve,reject){resolve(that.leafletMap.getZoom());});};GeolocationLeafletMap.prototype.setZoom=function(zoom,defer){if(typeof zoom==='undefined'){zoom=this.settings.leaflet_settings.zoom;} 321zoom=parseInt(zoom);this.leafletMap.setZoom(zoom);};GeolocationLeafletMap.prototype.setCenterByCoordinates=function(coordinates,accuracy,identifier){Drupal.geolocation.GeolocationMapBase.prototype.setCenterByCoordinates.call(this,coordinates,accuracy,identifier);if(typeof accuracy==='undefined'){this.leafletMap.panTo(coordinates);return;} 322var circle=this.addAccuracyIndicatorCircle(coordinates,accuracy);this.leafletMap.fitBounds(circle.getBounds());setInterval(fadeCityCircles,300);function fadeCityCircles(){var fillOpacity=circle.options.fillOpacity;fillOpacity-=0.03;var opacity=circle.options.opacity;opacity-=0.06;if(opacity>0&&fillOpacity>0){circle.setStyle({fillOpacity:fillOpacity,stroke:opacity});} 323else{circle.remove()}}};GeolocationLeafletMap.prototype.addAccuracyIndicatorCircle=function(location,accuracy){return L.circle(location,accuracy,{interactive:false,color:'#4285F4',opacity:0.3,fillColor:'#4285F4',fillOpacity:0.15}).addTo(this.leafletMap);};
323GeolocationLeafletMap.prototype.setMapMarker=function(markerSettings){if(typeof markerSettings.setMarker!=='undefined'){if(markerSettings.setMarker===false){return;}} 324if(typeof markerSettings.icon==='string'){markerSettings.icon=L.icon({iconUrl:markerSettings.icon});} 325var currentMarker=L.marker([parseFloat(markerSettings.position.lat),parseFloat(markerSettings.position.lng)],markerSettings).addTo(this.markerLayer);currentMarker.locationWrapper=markerSettings.locationWrapper;if(typeof markerSettings.label==='string'){currentMarker.bindTooltip(markerSettings.label,{permanent:true,direction:'top'});} 326Drupal.geolocation.GeolocationMapBase.prototype.setMapMarker.call(this,currentMarker);return currentMarker;};GeolocationLeafletMap.prototype.removeMapMarker=function(marker){Drupal.geolocation.GeolocationMapBase.prototype.removeMapMarker.call(this,marker);this.markerLayer.removeLayer(marker);};GeolocationLeafletMap.prototype.addShape=function(shapeSettings){if(typeof shapeSettings==='undefined'){return;} 327var coordinates=[];$.each(shapeSettings.coordinates,function(index,coordinate){coordinates.push([coordinate.lat,coordinate.lng]);});var shape;switch(shapeSettings.shape){case'line':shape=L.polyline(coordinates,{color:shapeSettings.strokeColor,opacity:shapeSettings.strokeOpacity,weight:shapeSettings.strokeWidth});if(shapeSettings.title){shape.bindTooltip(shapeSettings.title);} 328break;case'polygon':shape=L.polygon(coordinates,{color:shapeSettings.strokeColor,opacity:shapeSettings.strokeOpacity,weight:shapeSettings.strokeWidth,fillColor:shapeSettings.fillColor,fillOpacity:shapeSettings.fillOpacity});if(shapeSettings.title){shape.bindTooltip(shapeSettings.title);} 329break;} 330shape.addTo(this.leafletMap);Drupal.geolocation.GeolocationMapBase.prototype.addShape.call(this,shape);return shape;};GeolocationLeafletMap.prototype.removeShape=function(shape){if(typeof shape==='undefined'){return;} 331Drupal.geolocation.GeolocationMapBase.prototype.removeShape.call(this,shape);shape.remove();};GeolocationLeafletMap.prototype.getMarkerBoundaries=function(locations){locations=locations||this.mapMarkers;if(locations.length===0){return;} 332var group=new L.featureGroup(locations);return group.getBounds();};GeolocationLeafletMap.prototype.getCenter=function(){var center=this.leafletMap.getCenter();return{lat:center.lat,lng:center.lng};};GeolocationLeafletMap.prototype.normalizeBoundaries=function(boundaries){if(boundaries instanceof L.LatLngBounds){return{north:boundaries.getNorth(),east:boundaries.getEast(),south:boundaries.getSouth(),west:boundaries.getWest()};} 333return false;};GeolocationLeafletMap.prototype.denormalizeBoundaries=function(boundaries){if(typeof boundaries==='undefined'){return false;} 334if(boundaries instanceof L.LatLngBounds){return boundaries;} 335if(Drupal.geolocation.GeolocationMapBase.prototype.boundariesNormalized.call(this,boundaries)){return L.latLngBounds([[boundaries.south,boundaries.west],[boundaries.north,boundaries.east]]);} 336else{boundaries=Drupal.geolocation.GeolocationMapBase.prototype.normalizeBoundaries.call(this,boundaries);if(boundaries){return L.latLngBounds([[boundaries.south,boundaries.west],[boundaries.north,boundaries.east]]);}} 337return false;};GeolocationLeafletMap.prototype.fitBoundaries=function(boundaries,identifier){boundaries=this.denormalizeBoundaries(boundaries);if(!boundaries){return;} 338if(!this.leafletMap.getBounds().equals(boundaries)){this.leafletMap.fitBounds(boundaries);Drupal.geolocation.GeolocationMapBase.prototype.fitBoundaries.call(this,boundaries,identifier);}};GeolocationLeafletMap.prototype.addControl=function(element){this.leafletMap.controls=this.leafletMap.controls||[];var controlElement=new(L.Control.extend({options:{position:typeof element.dataset.controlPosition==='undefined'?'topleft':element.dataset.controlPosition},onAdd:function(map){element.style.display='block';L.DomEvent.disableClickPropagation(element);return element;}}));controlElement.addTo(this.leafletMap);this.leafletMap.controls.push(controlElement);};GeolocationLeafletMap.prototype.removeControls=function(){this.leafletMap.controls=this.leafletMap.controls||[];var that=this;$.each(this.leafletMap.controls,function(index,control){that.leafletMap.removeControl(control);});};Drupal.geolocation.GeolocationLeafletMap=GeolocationLeafletMap;Drupal.geolocation.addMapProvider('leaflet','GeolocationLeafletMap');})(jQuery,Drupal); 339/* !modules/contrib/geolocation/modules/geolocation_leaflet/js/geolocation-leaflet-api.js */; 340/* modules/ukraine/m_map/misc/m_map.geolocation.js */ 341(function($,Drupal){Drupal.geolocation.GeolocationLeafletMap.prototype.fitBoundaries=function(bou
341ndaries,identifier){boundaries=this.denormalizeBoundaries(boundaries);if(!boundaries){return;} 342if(!this.leafletMap.getBounds().equals(boundaries)){this.leafletMap.fitBounds(boundaries,{padding:[40,40]});Drupal.geolocation.GeolocationMapBase.prototype.fitBoundaries.call(this,boundaries,identifier);}};})(jQuery,Drupal) 343/* !modules/ukraine/m_map/misc/m_map.geolocation.js */; 344/* modules/contrib/geolocation/modules/geolocation_leaflet/js/geolocation-common-map-leaflet.js */ 345(function($,Drupal){'use strict';Drupal.behaviors.geolocationCommonMapLeaflet={attach:function(context,drupalSettings){$.each(drupalSettings.geolocation.commonMap,function(mapId,commonMapSettings){if(typeof commonMapSettings.dynamic_map!=='undefined'&&commonMapSettings.dynamic_map.enable){var map=Drupal.geolocation.getMapById(mapId);if(!map){return;} 346if(map.container.hasClass('geolocation-common-map-leaflet-processed')){return;} 347map.container.addClass('geolocation-common-map-leaflet-processed');if(map.container.length&&map.type==='leaflet'){map.addPopulatedCallback(function(map){var geolocationMapIdleTimer;map.leafletMap.on('moveend zoomend',function(e){clearTimeout(geolocationMapIdleTimer);geolocationMapIdleTimer=setTimeout(function(){var ajaxSettings=Drupal.geolocation.commonMap.dynamicMapViewsAjaxSettings(commonMapSettings);var currentBounds=map.leafletMap.getBounds();var bound_parameters={};bound_parameters[commonMapSettings['dynamic_map']['parameter_identifier']+'[lat_north_east]']=currentBounds.getNorthEast().lat;bound_parameters[commonMapSettings['dynamic_map']['parameter_identifier']+'[lng_north_east]']=currentBounds.getNorthEast().lng;bound_parameters[commonMapSettings['dynamic_map']['parameter_identifier']+'[lat_south_west]']=currentBounds.getSouthWest
347().lat;bound_parameters[commonMapSettings['dynamic_map']['parameter_identifier']+'[lng_south_west]']=currentBounds.getSouthWest().lng;ajaxSettings.submit=$.extend(ajaxSettings.submit,bound_parameters);Drupal.ajax(ajaxSettings).execute();},commonMapSettings.dynamic_map.views_refresh_delay);});});}}});},detach:function(context,drupalSettings){}};})(jQuery,Drupal); 348/* !modules/contrib/geolocation/modules/geolocation_leaflet/js/geolocation-common-map-leaflet.js */; 349/* modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-control-attribution.js */ 350(function(Drupal){'use strict';Drupal.behaviors.leafletControlAttribution={attach:function(context,drupalSettings){Drupal.geolocation.executeFeatureOnAllMaps('leaflet_control_attribution',function(map,featureSettings){L.control.attribution({prefix:featureSettings.prefix+' | © <a href="https://osm.org/copyright">OpenStreetMap</a> contributors',position:featureSettings.position}).addTo(map.leafletMap);return true;},drupalSettings);},detach:function(context,drupalSettings){}};})(Drupal); 351/* !modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-control-attribution.js */; 352/* modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-control-zoom.js */ 353(function(Drupal){'use strict';Drupal.behaviors.leafletControlZoom={attach:function(context,drupalSettings){Drupal.geolocation.executeFeatureOnAllMaps('leaflet_control_zoom',function(map,featureSettings){L.control.zoom({position:featureSettings.position}).addTo(map.leafletMap);return true;},drupalSettings);},detach:function(context,drupalSettings){}};})(Drupal); 354/* !modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-control-zoom.js */; 355/* modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-gesture-handling.js */ 356(function(Drupal){'use strict';Drupal.behaviors.leafletGestureHandling={attach:function(context,drupalSettings){Drupal.geolocation.executeFeatureOnAllMaps('leaflet_gesture_handling',function(map,featureSettings){L.Util.setOptions(map.leafletMap,{gestureHandlingOptions:{duration:1000}});map.leafletMap['gestureHandling'].enable();return true;},drupalSettings);},detach:function(context,drupalSettings){}};})(Drupal); 357/* !modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-gesture-handling.js */; 358/* modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-marker-clusterer.js */ 359(function(Drupal){'use strict';Drupal.behaviors.leafletMarkerClusterer={attach:function(context,drupalSettings){Drupal.geolocation.executeFeatureOnAllMaps('leaflet_marker_clusterer',function(map,featureSettings){var options={showCoverageOnHover:false,zoomToBoundsOnClick:false,disableClusteringAtZoom:null};if(featureSettings.zoomToBoundsOnClick){options.zoomToBoundsOnClick=true;} 360if(featureSettings.showCoverageOnHover){options.showCoverageOnHover=true;} 361if(featureSettings.disableClusteringAtZoom){options.disableClusteringAtZoom=featureSettings.disableClusteringAtZoom;} 362if(featureSettings.customMarkerSettings){options.iconCreateFunction=function(cluster){var childCount=cluster.getChildCount();var customMarkers=featureSettings.customMarkerSettings;var className=' marker-cluster-';var radius=40;for(var size in customMarkers){if(childCount<customMarkers[size].limit){className+=size;radius=customMarkers[size].radius;break;}} 363return new L.DivIcon({html:'<div><span>'+childCount+'</span></div>',className:'marker-cluster'+className,iconSize:new L.Point(radius,radius)});};} 364var cluster=L.markerClusterGroup(options);map.leafletMap.removeLayer(map.markerLayer);cluster.addLayer(map.markerLayer);map.leafletMap.addLayer(cluster);map.addMarkerAddedCallback(function(currentMarker){cluster.addLayer(currentMarker);});map.addMarkerRemoveCallback(function(marker){cluster.removeLayer(marker);});return true;},drupalSettings);},detach:function(context,drupalSettings){}};})(Drupal); 365/* !modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-marker-clusterer.js */; 366/* modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-marker-popup.js */ 367(function($,Drupal){'use strict';Drupal.behaviors.leafletMarkerPopup={attach:function(context,drupalSettings){Drupal.geolocation.executeFeatureOnAllMaps('leaflet_marker_popup',function(map,featureSettings){var geolocationLeafletPopupHandler=function(currentMarker){if(typeof(currentMarker.locationWrapper)==='undefined'){return;} 368var content=currentMarker.locationWrapper.find('.location-content');if(content.length<1){return;} 369var popupOptions={};if(featureSettings.maxWidth){popupOptions.maxWidth=Math.round(featureSettings.maxWidth);} 370if(featureSettings.minWidth){popupOptions.minWidth=Math.round(featureSettings.minWidth);} 371if(featureSettings.maxHeight){popupOptions.maxHeight=Math.round(featureSettings.maxHeight);} 372if(typeof featureSettings.autoPan!=="undefined"){popupOptions.autoPan=featureSettings.autoPan;} 373if(typeof featureSettings.keepInView!=="undefined"){popupOptions.keepInView=featureSettings.keepInView;} 374if(typeof featureSettings.closeButton!=="undefined"){popupOptions.closeButton=featureSettings.closeButton;} 375if(typeof featureSettings.autoClose!=="undefined"){popupOptions.autoClose=featureSettings.autoClose;} 376if(typeof featureSettings.closeOnEscapeKey!=="undefined"){popupOptions.closeOnEscapeKey=featureSettings.closeOnEscapeKey;} 377if(featureSettings.className){popupOptions.className=featureSettings.className;} 378currentMarker.bindPopup(content.html(),popupOptions);if(featureSettings.infoAutoDisplay){currentMarker.openPopup();}};map.addPopulatedCallback(function(map){$.each(map.mapMarkers,function(index,currentMarker){geolocationLeafletPopupHandler(currentMarker);});});map.addMarkerAddedCallback(function(currentMarker){geolocationLeafletPopupHandler(currentMarker);});return true;},drupalSettings);},detach:function(context,drupalSettings){}};})(jQuery,Drupal); 379/* !modules/contrib/geolocation/modules/geolocation_leaflet/js/MapFeature/geolocation-marker-popup.js */; 380/* modules/ukraine/ux_search/misc/search.js */ 381(function($,Drupal){$(document).ready(function(){$('.js-search-btn').on('click',function(e){e.preventDefault();$(this).closest('.b-search-block').toggleClass('is-open');})});})(jQuery,Drupal); 382/* !modules/ukraine/ux_search/misc/search.js */; 383/* modules/ukraine/ux_search/misc/search.voice.js */ 384(function($){'use strict';if(!('webkitSpeechRecognition'in window))return;var defaultPatienceThreshold=3;function capitalize(str){return str.charAt(0).toUpperCase()+str.slice(1);} 385Drupal.behaviors.search_voice={attach:function(context){var inputEls=once('input','.speech-input');var talkMsg=$(inputEls).data('speech_text');$(inputEls).parents('form:first').find('.form-actions').hide();[].forEach.call(inputEls,function(inputEl){var patience=parseInt(inputEl.dataset.patience,10)||defaultPatienceThreshold;var micBtn,micIcon,holderIcon,newWrapper;var shouldCapitalize=true;var nextNode=inputEl.nextSibling;var parent=inputEl.parentNode;var inputRightBorder=parseInt(getComputedStyle(inputEl).borderRightWidth,10);var buttonSize=0.8*(inputEl.dataset.buttonsize||inputEl.offsetHeight);if(!inputEl.dataset.buttonsize&&inputEl.tagName==='TEXTAREA'&&buttonSize>26){buttonSize=26;} 386var wrapper=inputEl.parentNode;if(!wrapper.classList.contains('si-wrapper')){wrapper=document.createElement('div');wrapper.classList.add('si-wrapper');wrapper.appendChild(parent.removeChild(inputEl));newWrapper=true;} 387micBtn=wrapper.querySelector('.si-btn');if(!micBtn){micBtn=document.createElement('button');micBtn.type='button';micBtn.classList.add('si-btn');micBtn.textContent='speech input';micIcon=document.createElement('span');holderIcon=document.createElement('span');micIcon.classList.add('si-mic');holderIcon.classList.add('si-holder');micBtn.appendChild(micIcon);micBtn.appendChild(holderIcon);wrapper.appendChild(micBtn);} 388var clearBtn=$('<span class="clear">X</span>');$(inputEl).parents('div:first').append(clearBtn);if(inputEl.value=='')clearBtn.hide();else $(micBtn).hide();if(newWrapper)parent.insertBefore(wrapper,nextNode);var prefix='';var isSentence;var recognizing=false;var timeout;var oldPlaceholder=null;var recognition=new webkitSpeechRecognition();recognition.continuous=true;recognition.interimResults=true;if(inputEl.lang){recognition.lang=inputEl.lang}else{recognition.lang=document.getElementsByTagName('html')[0].lang} 389function restartTimer(tims){timeout=setTimeout(function(){recognition.stop();},tims*1000);} 390recognition.onstart=function(){oldPlaceholder=inputEl.placeholder;inputEl.placeholder=inputEl.dataset.ready||talkMsg;$(inputEl).focus();recognizing=true;micBtn.classList.add('listening');restartTimer(patience);};recognition.onend=function(){recognizing=false;clearTimeout(timeout);micBtn.classList.remove('listening');if(oldPlaceholder!==null)inputEl.placeholder=oldPlaceholder;if(inputEl.value==''){$(inputEl).blur();}}
390;recognition.onresult=function(event){clearTimeout(timeout);var resultList=event.results;var finalTranscript='';var interimTranscript='';for(var i=event.resultIndex;i<resultList.length;++i){var result=resultList[i];var firstAlternative=result[0];if(result.isFinal){finalTranscript=firstAlternative.transcript;}else{interimTranscript+=firstAlternative.transcript;}} 391var transcript=finalTranscript||interimTranscript;transcript=!prefix||isSentence?capitalize(transcript):transcript;inputEl.value=transcript;inputEl.focus();if(inputEl.tagName==='INPUT'){inputEl.scrollLeft=inputEl.scrollWidth;}else{inputEl.scrollTop=inputEl.scrollHeight;} 392$(inputEl).keyup();restartTimer(1);};$(inputEl).keyup(function(){if(inputEl.value==''){$(micBtn).show();clearBtn.hide();}else{$(micBtn).hide();clearBtn.show();}});micBtn.addEventListener('click',function(event){event.preventDefault();if(recognizing){recognition.stop();return;} 393var endsWithWhitespace=inputEl.value.slice(-1).match(/\s/);prefix=!inputEl.value||endsWithWhitespace?inputEl.value:inputEl.value+' ';isSentence=prefix.trim().slice(-1).match(/[\.\?\!]/);recognition.start();},false);clearBtn.click(function(){clearBtn.hide();$(micBtn).show();inputEl.value='';});});}}})(jQuery); 394/* !modules/ukraine/ux_search/misc/search.voice.js */; 395/* modules/ukraine/ux_search/misc/search.speech-input.js */ 396(function($){'use strict';if(!('webkitSpeechRecognition'in window))return;var defaultPatienceThreshold=3;function capitalize(str){return str.charAt(0).toUpperCase()+str.slice(1);} 397var inputEls=document.getElementsByClassName('speech-input');var talkMsg=$(inputEls).data('speech_text');$(inputEls).parents('form:first').find('.form-actions').hide();[].forEach.call(inputEls,function(inputEl){var patience=parseInt(inputEl.dataset.patience,10)||defaultPatienceThreshold;var micBtn,micIcon,holderIcon,newWrapper;var shouldCapitalize=true;var nextNode=inputEl.nextSibling;var parent=inputEl.parentNode;var inputRightBorder=parseInt(getComputedStyle(inputEl).borderRightWidth,10);var buttonSize=0.8*(inputEl.dataset.buttonsize||inputEl.offsetHeight);if(!inputEl.dataset.buttonsize&&inputEl.tagName==='TEXTAREA'&&buttonSize>26){buttonSize=26;} 398var wrapper=inputEl.parentNode;if(!wrapper.classList.contains('si-wrapper')){wrapper=document.createElement('div');wrapper.classList.add('si-wrapper');wrapper.appendChild(parent.removeChild(inputEl));newWrapper=true;} 399micBtn=wrapper.querySelector('.si-btn');if(!micBtn){micBtn=document.createElement('button');micBtn.type='button';micBtn.classList.add('si-btn');micBtn.textContent='speech input';micIcon=document.createElement('span');holderIcon=document.createElement('span');micIcon.classList.add('si-mic');holderIcon.classList.add('si-holder');micBtn.appendChild(micIcon);micBtn.appendChild(holderIcon);wrapper.appendChild(micBtn);} 400var clearBtn=$('<span class="clear">X</span>');$(inputEl).parents('div:first').append(clearBtn);if(inputEl.value=='')clearBtn.hide();else $(micBtn).hide();if(newWrapper)parent.insertBefore(wrapper,nextNode);var prefix='';var isSentence;var recognizing=false;var timeout;var oldPlaceholder=null;var recognition=new webkitSpeechRecognition();recognition.continuous=true;recognition.interimResults=true;if(inputEl.lang)recognition.lang=inputEl.lang;function restartTimer(tims){timeout=setTimeout(function(){recognition.stop();},tims*1000);} 401recognition.onstart=function(){oldPlaceholder=inputEl.placeholder;inputEl.placeholder=inputEl.dataset.ready||talkMsg;$(inputEl).focus();recognizing=true;micBtn.classList.add('listening');restartTimer(patience);};recognition.onend=function(){recognizing=false;clearTimeout(timeout);micBtn.classList.remove('listening');if(oldPlaceholder!==null)inputEl.placeholder=oldPlaceholder;if(inputEl.value==''){$(inputEl).blur();}};recognition.onresult=function(event){clearTimeout(timeout);var resultList=event.results;var finalTranscript='';var interimTranscript='';for(var i=event.resultIndex;i<resultList.length;++i){var result=resultList[i];var firstAlternative=result[0];if(result.isFinal){finalTranscript=firstAlternative.transcript;}else{interimTranscript+=firstAlternative.transcript;}} 402var transcript=finalTranscript||interimTranscript;transcript=!prefix||isSentence?capitalize(transcript):transcript;inputEl.value=transcript;inputEl.focus();if(inputEl.tagName==='INPUT'){inputEl.scrollLeft=inputEl.scrollWidth;}else{inputEl.scrollTop=inputEl.scrollHeight;} 403$(inputEl).keyup();restartTimer(1);};$(inputEl).keyup(function(){if(inputEl.value==''){$(micBtn).show();clearBtn.hide();}else{$(micBtn).hide();clearBtn.show();}});micBtn.addEventListener('click',function(event){event.preventDefault();if(recognizing){recognition.stop();return;} 404var endsWithWhitespace=inputEl.value.slice(-1).match(/\s/);prefix=!inputEl.value||endsWithWhitespace?inputEl.value:inputEl.value+' ';isSentence=prefix.trim().slice(-1).match(/[\.\?\!]/);recognition.start();},false);clearBtn.click(function(){clearBtn.hide();$(micBtn).show();inputEl.value='';});});})(jQuery); 405/* !modules/ukraine/ux_search/misc/search.speech-input.js */; 406/* @license GPL-2.0-or-later https://raw.githubusercontent.com/jquery-form/form/master/LICENSE */ 407/* core/misc/jquery.form.js */ 408/*! 409 * jQuery Form Plugin 410 * version: 4.3.0 411 * Requires jQuery v1.7.2 or later 412 * Project repository: https://github.com/jquery-form/form 413 414 * Copyright 2017 Kevin Morris 415 * Copyright 2006 M. Alsup 416 417 * Dual licensed under the LGPL-2.1+ or MIT licenses 418 * https://github.com/jquery-form/form#license 419 420 * This library is free software; you can redistribute it and/or 421 * modify it under the terms of the GNU Lesser General Public
422 * License as published by the Free Software Foundation; either 423 * version 2.1 of the License, or (at your option) any later version. 424 * This library is distributed in the hope that it will be useful, 425 * but WITHOUT ANY WARRANTY; without even the implied warranty of 426 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 427 * Lesser General Public License for more details. 428 */ 429(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory);}else if(typeof module==='object'&&module.exports){module.exports=function(root,jQuery){if(typeof jQuery==='undefined'){if(typeof window!=='undefined'){jQuery=require('jquery');} 430else{jQuery=require('jquery')(root);}} 431factory(jQuery);return jQuery;};}else{factory(jQuery);}}(function($){'use strict';var rCRLF=/\r?\n/g;var feature={};feature.fileapi=$('<input type="file">').get(0).files!==undefined;feature.formdata=(typeof window.FormData!=='undefined');var hasProp=!!$.fn.prop;$.fn.attr2=function(){if(!hasProp){return this.attr.apply(this,arguments);} 432var val=this.prop.apply(this,arguments);if((val&&val.jquery)||typeof val==='string'){return val;} 433return this.attr.apply(this,arguments);};$.fn.ajaxSubmit=function(options,data,dataType,onSuccess){if(!this.length){log('ajaxSubmit: skipping submit process - no element selected');return this;} 434var method,action,url,isMsie,iframeSrc,$form=this;if(typeof options==='function'){options={success:options};}else if(typeof options==='string'||(options===false&&arguments.length>0)){options={'url':options,'data':data,'dataType':dataType};if(typeof onSuccess==='function'){options.success=onSuccess;}}else if(typeof options==='undefined'){options={};} 435method=options.method||options.type||this.attr2('method');action=options.url||this.attr2('action');url=(typeof action==='string')?action.trim():'';url=url||window.location.href||'';if(url){url=(url.match(/^([^#]+)/)||[])[1];} 436isMsie=/(MSIE|Trident)/.test(navigator.userAgent||'');iframeSrc=(isMsie&&/^https/i.test(window.location.href||''))?'javascript:false':'about:blank';options=$.extend(true,{url:url,success:$.ajaxSettings.success,type:method||$.ajaxSettings.type,iframeSrc:iframeSrc},options);var veto={};this.trigger('form-pre-serialize',[this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this;} 437if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log('ajaxSubmit: submit aborted via beforeSerialize callback');return this;} 438var traditional=options.traditional;if(typeof traditional==='undefined'){traditional=$.ajaxSettings.traditional;} 439var elements=[];var qx,a=this.formToArray(options.semantic,elements,options.filtering);if(options.data){var optionsData=typeof(options.data)==="function"?options.data(a):options.data;options.extraData=optionsData;qx=$.param(optionsData,traditional);} 440if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log('ajaxSubmit: submit aborted via beforeSubmit callback');return this;} 441this.trigger('form-submit-validate',[a,this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this;} 442var q=$.param(a,traditional);if(qx){q=(q?(q+'&'+qx):qx);} 443if(options.type.toUpperCase()==='GET'){options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;options.data=null;}else{options.data=q;} 444var callbacks=[];if(options.resetForm){callbacks.push(function(){$form.resetForm();});} 445if(options.clearForm){callbacks.push(function(){$form.clearForm(options.includeHidden);});} 446if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data,textStatus,jqXHR){var successArguments=arguments,fn=options.replaceTarget?'replaceWith':'html';$(options.target)[fn](data).each(function(){oldSuccess.apply(this,successArguments);});});}else if(options.success){if(Array.isArray(options.success)){callbacks=callbacks.concat(options.success);}else{callbacks.push(options.success);}} 447options.success=function(data,status,xhr){var context=options.context||this;for(var i=0,max=callbacks.length;i<max;i++){callbacks[i].apply(context,[data,status,xhr||$form,$form]);}};if(options.error){var oldError=options.error;options.error=function(xhr,status,error){var context=options.context||this;oldError.apply(context,[xhr,status,error,$form]);};} 448if(options.complete){var oldComplete=options.complete;options.complete=function(xhr,status){var context=options.context||this;oldComplete.apply(context,[xhr,status,$form]);};} 449var fileInputs=$('input[type=file]:enabled',this).filter(function(){return $(this).val()!=='';});var hasFileInputs=fileInputs.length>0;var mp='multipart/form-data';var multipart=($form.attr('enctype')===mp||$form.attr('encoding')===mp);var fileAPI=feature.fileapi&&feature.formdata;log('fileAPI :'+fileAPI);var shouldUseFrame=(hasFileInputs||multipart)&&!fileAPI;var jqxhr;if(options.iframe!==false&&(options.iframe||shouldUseFrame)){if(options.closeKeepAlive){$.get(options.closeKeepAlive,function(){jqxhr=fileUploadIframe(a);});}else{jqxhr=fileUploadIframe(a);}}else if((hasFileInputs||multipart)&&fileAPI){jqxhr=fileUploadXhr(a);}else{jqxhr=$.ajax(options);} 450$form.removeData('jqxhr').data('jqxhr',jqxhr);for(var k=0;k<elements.length;k++){elements[k]=null;} 451this.trigger('form-submit-notify',[this,options]);return this;function deepSerialize(extraData){var serialized=$.param(extraData,options.traditional).split('&');var len=serialized.length;var result=[];var i,part;for(i=0;i<len;i++){serialized[i]=serialized[i].replace(/\+/g,' ');part=serialized[i].split('=');result.push([decodeURIComponent(part[0]),decodeURIComponent(part[1])]);} 452return result;} 453function fileUploadXhr(a){var formdata=new FormData();for(var i=0;i<a.length;i++){formdata.append(a[i].name,a[i].value);} 454if(options.extraData){var serializedData=deepSerialize(options.extraData);for(i=0;i<serializedData.length;i++){if(serializedData[i]){formdata.append(serializedData[i][0],serializedData[i][1]);}}} 455options.data=null;var s=$.extend(true,{},$.ajaxSettings,options,{contentType:false,processData:false,cache:false,type:method||'POST'});if(options.uploadProgress){s.xhr=function(){var xhr=$.ajaxSettings.xhr();if(xhr.upload){xhr.upload.addEventListener('progress',function(event){var percent=0;var position=event.loaded||event.position;var total=event.total;if(event.lengthComputable){percent=Math.ceil(position / total*100);} 456options.uploadProgress(event,position,total,percent);},false);} 457return xhr;};} 458s.data=null;var beforeSend=s.beforeSend;s.beforeSend=function(xhr,o){if(options.formData){o.data=options.formData;}else{o.data=formdata;}
459if(beforeSend){beforeSend.call(this,xhr,o);}};return $.ajax(s);} 460function fileUploadIframe(a){var form=$form[0],el,i,s,g,id,$io,io,xhr,sub,n,timedOut,timeoutHandle;var deferred=$.Deferred();deferred.abort=function(status){xhr.abort(status);};if(a){for(i=0;i<elements.length;i++){el=$(elements[i]);if(hasProp){el.prop('disabled',false);}else{el.removeAttr('disabled');}}} 461s=$.extend(true,{},$.ajaxSettings,options);s.context=s.context||s;id='jqFormIO'+new Date().getTime();var ownerDocument=form.ownerDocument;var $body=$form.closest('body');if(s.iframeTarget){$io=$(s.iframeTarget,ownerDocument);n=$io.attr2('name');if(!n){$io.attr2('name',id);}else{id=n;}}else{$io=$('<iframe name="'+id+'" src="'+s.iframeSrc+'" />',ownerDocument);$io.css({position:'absolute',top:'-1000px',left:'-1000px'});} 462io=$io[0];xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(status){var e=(status==='timeout'?'timeout':'aborted');log('aborting upload... '+e);this.aborted=1;try{if(io.contentWindow.document.execCommand){io.contentWindow.document.execCommand('Stop');}}catch(ignore){} 463$io.attr('src',s.iframeSrc);xhr.error=e;if(s.error){s.error.call(s.context,xhr,e,status);} 464if(g){$.event.trigger('ajaxError',[xhr,s,e]);} 465if(s.complete){s.complete.call(s.context,xhr,e);}}};g=s.global;if(g&&$.active++===0){$.event.trigger('ajaxStart');} 466if(g){$.event.trigger('ajaxSend',[xhr,s]);} 467if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){if(s.global){$.active--;} 468deferred.reject();return deferred;} 469if(xhr.aborted){deferred.reject();return deferred;} 470sub=form.clk;if(sub){n=sub.name;if(n&&!sub.disabled){s.extraData=s.extraData||{};s.extraData[n]=sub.value;if(sub.type==='image'){s.extraData[n+'.x']=form.clk_x;s.extraData[n+'.y']=form.clk_y;}}} 471var CLIENT_TIMEOUT_ABORT=1;var SERVER_ABORT=2;function getDoc(frame){var doc=null;try{if(frame.contentWindow){doc=frame.contentWindow.document;}}catch(err){log('cannot get iframe.contentWindow document: '+err);} 472if(doc){return doc;} 473try{doc=frame.contentDocument?frame.contentDocument:frame.document;}catch(err){log('cannot get iframe.contentDocument: '+err);doc=frame.document;} 474return doc;} 475var csrf_token=$('meta[name=csrf-token]').attr('content');var csrf_param=$('meta[name=csrf-param]').attr('content');if(csrf_param&&csrf_token){s.extraData=s.extraData||{};s.extraData[csrf_param]=csrf_token;} 476function doSubmit(){var t=$form.attr2('target'),a=$form.attr2('action'),mp='multipart/form-data',et=$form.attr('enctype')||$form.attr('encoding')||mp;form.setAttribute('target',id);if(!method||/post/i.test(method)){form.setAttribute('method','POST');} 477if(a!==s.url){form.setAttribute('action',s.url);} 478if(!s.skipEncodingOverride&&(!method||/post/i.test(method))){$form.attr({encoding:'multipart/form-data',enctype:'multipart/form-data'});} 479if(s.timeout){timeoutHandle=setTimeout(function(){timedOut=true;cb(CLIENT_TIMEOUT_ABORT);},s.timeout);} 480function checkState(){try{var state=getDoc(io).readyState;log('state = '+state);if(state&&state.toLowerCase()==='uninitialized'){setTimeout(checkState,50);}}catch(e){log('Server abort: ',e,' (',e.name,')');cb(SERVER_ABORT);if(timeoutHandle){clearTimeout(timeoutHandle);} 481timeoutHandle=undefined;}} 482var extraInputs=[];try{if(s.extraData){for(var n in s.extraData){if(s.extraData.hasOwnProperty(n)){if($.isPlainObject(s.extraData[n])&&s.extraData[n].hasOwnProperty('name')&&s.extraData[n].hasOwnProperty('value')){extraInputs.push($('<input type="hidden" name="'+s.extraData[n].name+'">',ownerDocument).val(s.extraData[n].value).appendTo(form)[0]);}else{extraInputs.push($('<input type="hidden" name="'+n+'">',ownerDocument).val(s.extraData[n]).appendTo(form)[0]);}}}} 483if(!s.iframeTarget){$io.appendTo($body);} 484if(io.attachEvent){io.attachEvent('onload',cb);}else{io.addEventListener('load',cb,false);} 485setTimeout(checkState,15);try{form.submit();}catch(err){var submitFn=document.createElement('form').submit;submitFn.apply(form);}}finally{form.setAttribute('action',a);form.setAttribute('enctype',et);if(t){form.setAttribute('target',t);}else{$form.removeAttr('target');} 486$(extraInputs).remove();}} 487if(s.forceSync){doSubmit();}else{setTimeout(doSubmit,10);} 488var data,doc,domCheckCount=50,callbackProcessed;function cb(e){if(xhr.aborted||callbackProcessed){return;} 489doc=getDoc(io);if(!doc){log('cannot access response document');e=SERVER_ABORT;} 490if(e===CLIENT_TIMEOUT_ABORT&&xhr){xhr.abort('timeout');deferred.reject(xhr,'timeout');return;} 491if(e===SERVER_ABORT&&xhr){xhr.abort('server abort');deferred.reject(xhr,'error','server abort');return;} 492if(!doc||doc.location.href===s.iframeSrc){if(!timedOut){return;}} 493if(io.detachEvent){io.detachEvent('onload',cb);}else{io.removeEventListener('load',cb,false);} 494var status='success',errMsg;
494try{if(timedOut){throw'timeout';} 495var isXml=s.dataType==='xml'||doc.XMLDocument||$.isXMLDoc(doc);log('isXml='+isXml);if(!isXml&&window.opera&&(doc.body===null||!doc.body.innerHTML)){if(--domCheckCount){log('requeing onLoad callback, DOM not available');setTimeout(cb,250);return;}} 496var docRoot=doc.body?doc.body:doc.documentElement;xhr.responseText=docRoot?docRoot.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(isXml){s.dataType='xml';} 497xhr.getResponseHeader=function(header){var headers={'content-type':s.dataType};return headers[header.toLowerCase()];};if(docRoot){xhr.status=Number(docRoot.getAttribute('status'))||xhr.status;xhr.statusText=docRoot.getAttribute('statusText')||xhr.statusText;} 498var dt=(s.dataType||'').toLowerCase();var scr=/(json|script|text)/.test(dt);if(scr||s.textarea){var ta=doc.getElementsByTagName('textarea')[0];if(ta){xhr.responseText=ta.value;xhr.status=Number(ta.getAttribute('status'))||xhr.status;xhr.statusText=ta.getAttribute('statusText')||xhr.statusText;}else if(scr){var pre=doc.getElementsByTagName('pre')[0];var b=doc.getElementsByTagName('body')[0];if(pre){xhr.responseText=pre.textContent?pre.textContent:pre.innerText;}else if(b){xhr.responseText=b.textContent?b.textContent:b.innerText;}}}else if(dt==='xml'&&!xhr.responseXML&&xhr.responseText){xhr.responseXML=toXml(xhr.responseText);} 499try{data=httpData(xhr,dt,s);}catch(err){status='parsererror';xhr.error=errMsg=(err||status);}}catch(err){log('error caught: ',err);status='error';xhr.error=errMsg=(err||status);} 500if(xhr.aborted){log('upload aborted');status=null;} 501if(xhr.status){status=((xhr.status>=200&&xhr.status<300)||xhr.status===304)?'success':'error';} 502if(status==='success'){if(s.success){s.success.call(s.context,data,'success',xhr);} 503deferred.resolve(xhr.responseText,'success',xhr);if(g){$.event.trigger('ajaxSuccess',[xhr,s]);}}else if(status){if(typeof errMsg==='undefined'){errMsg=xhr.statusText;} 504if(s.error){s.error.call(s.context,xhr,status,errMsg);} 505deferred.reject(xhr,'error',errMsg);if(g){$.event.trigger('ajaxError',[xhr,s,errMsg]);}} 506if(g){$.event.trigger('ajaxComplete',[xhr,s]);} 507if(g&&!--$.active){$.event.trigger('ajaxStop');} 508if(s.complete){s.complete.call(s.context,xhr,status);} 509callbackProcessed=true;if(s.timeout){clearTimeout(timeoutHandle);} 510setTimeout(function(){if(!s.iframeTarget){$io.remove();}else{$io.attr('src',s.iframeSrc);} 511xhr.responseXML=null;},100);} 512var toXml=$.parseXML||function(s,doc){if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s);}else{doc=(new DOMParser()).parseFromString(s,'text/xml');} 513return(doc&&doc.documentElement&&doc.documentElement.nodeName!=='parsererror')?doc:null;};var httpData=function(xhr,type,s){var ct=xhr.getResponseHeader('content-type')||'',xml=((type==='xml'||!type)&&ct.indexOf('xml')>=0),data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.nodeName==='parsererror'){if($.error){$.error('parsererror');}} 514if(s&&s.dataFilter){data=s.dataFilter(data,type);} 515if(typeof data==='string'){if((type==='json'||!type)&&ct.indexOf('json')>=0){data=JSON.parse(data);}else if((type==='script'||!type)&&ct.indexOf('javascript')>=0){$.globalEval(data);}} 516return data;};return deferred;}};$.fn.ajaxForm=function(options,data,dataType,onSuccess){if(typeof options==='string'||(options===false&&arguments.length>0)){options={'url':options,'data':data,'dataType':dataType};if(typeof onSuccess==='function'){options.success=onSuccess;}} 517options=options||{};options.delegation=options.delegation&&typeof $.fn.on==='function';if(!options.delegation&&this.length===0){var o={s:this.selector,c:this.context};if(!$.isReady&&o.s){log('DOM not ready, queuing ajaxForm');$(function(){$(o.s,o.c).ajaxForm(options);});return this;} 518log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));return this;} 519if(options.delegation){$(document).off('submit.form-plugin',this.selector,doAjaxSubmit).off('click.form-plugin',this.selector,captureSubmittingElement).on('submit.form-plugin',this.selector,options,doAjaxSubmit).on('click.form-plugin',this.selector,options,captureSubmittingElement);return this;} 520if(options.beforeFormUnbind){options.beforeFormUnbind(this,options);} 521return this.ajaxFormUnbind().on('submit.form-plugin',options,doAjaxSubmit).on('click.form-plugin',options,captureSubmittingElement);};function doAjaxSubmit(e){var options=e.data;if(!e.isDefaultPrevented()){e.preventDefault();$(e.target).closest('form').ajaxSubmit(options);}} 522function captureSubmittingElement(e){var target=e.target;var $el=$(target);if(!$el.is('[type=submit],[type=image]')){var t=$el.closest('[type=submit]');if(t.length===0){return;} 523target=t[0];} 524var form=target.form;form.clk=target;if(target.type==='image'){if(typeof e.offsetX!=='undefined'){form.clk_x=e.offsetX;form.clk_y=e.offsetY;}else if(typeof $.fn.offset==='function'){var offset=$el.offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top;}else{form.clk_x=e.pageX-target.offsetLeft;form.clk_y=e.pageY-target.offsetTop;}} 525setTimeout(function(){form.clk=form.clk_x=form.clk_y=null;},100);} 526$.fn.ajaxFormUnbind=function(){return this.off('submit.form-plugin click.form-plugin');};$.fn.formToArray=function(semantic,elements,filtering){var a=[];if(this.length===0){return a;} 527var form=this[0];var formId=this.attr('id');var els=(semantic||typeof form.elements==='undefined')?form.getElementsByTagName('*'):form.elements;var els2;if(els){els=$.makeArray(els);} 528if(formId&&(semantic||/(Edge|Trident)\//.test(navigator.userAgent))){els2=$(':input[form="'+formId+'"]').get();if(els2.length){els=(els||[]).concat(els2);}} 529if(!els||!els.length){return a;} 530if(typeof(filtering)==="function"){els=$.map(els,filtering);} 531var i,j,n,v,el,max,jmax;for(i=0,max=els.length;i<max;i++){el=els[i];n=el.name;if(!n||el.disabled){continue;} 532if(semantic&&form.clk&&el.type==='image'){if(form.clk===el){a.push({name:n,value:$(el).val(),type:el.type});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});} 533continue;} 534v=$.fieldValue(el,true);if(v&&v.constructor===Array){if(elements){elements.push(el);} 535for(j=0,jmax=v.length;j<jmax;j++){a.push({name:n,value:v[j]});}}else if(feature.fileapi&&el.type==='file'){if(elements){elements.push(el);} 536var files=el.files;if(files.length){for(j=0;j<files.length;j++){a.push({name:n,value:files[j],type:el.type});}}else{a.push({name:n,value:'',type:el.type});}}else if(v!==null&&typeof v!=='undefined'){if(elements){elements.push(el);} 537a.push({name:n,value:v,type:el.type,required:el.required});}} 538if(!semantic&&form.clk){var $input=$(form.clk),input=$input[0];n=input.name;if(n&&!input.disabled&&input.type==='image'){a.push({name:n,value:$input.val()});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}} 539return a;};
539$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic));};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n){return;} 540var v=$.fieldValue(this,successful);if(v&&v.constructor===Array){for(var i=0,max=v.length;i<max;i++){a.push({name:n,value:v[i]});}}else if(v!==null&&typeof v!=='undefined'){a.push({name:this.name,value:v});}});return $.param(a);};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v==='undefined'||(v.constructor===Array&&!v.length)){continue;} 541if(Array.isArray(v)){val=val.concat(v);}else{val.push(v);}} 542return val;};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(typeof successful==='undefined'){successful=true;} 543if(successful&&(!n||el.disabled||t==='reset'||t==='button'||(t==='checkbox'||t==='radio')&&!el.checked||(t==='submit'||t==='image')&&el.form&&el.form.clk!==el||tag==='select'&&el.selectedIndex===-1)){return null;} 544if(tag==='select'){var index=el.selectedIndex;if(index<0){return null;} 545var a=[],ops=el.options;var one=(t==='select-one');var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected&&!op.disabled){var v=op.value;if(!v){v=(op.attributes&&op.attributes.value&&!(op.attributes.value.specified))?op.text:op.value;} 546if(one){return v;} 547a.push(v);}} 548return a;} 549return $(el).val().replace(rCRLF,'\r\n');};$.fn.clearForm=function(includeHidden){return this.each(function(){$('input,select,textarea',this).clearFields(includeHidden);});};$.fn.clearFields=$.fn.clearInputs=function(includeHidden){var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(re.test(t)||tag==='textarea'){this.value='';}else if(t==='checkbox'||t==='radio'){this.checked=false;}else if(tag==='select'){this.selectedIndex=-1;}else if(t==='file'){if(/MSIE/.test(navigator.userAgent)){$(this).replaceWith($(this).clone(true));}else{$(this).val('');}}else if(includeHidden){if((includeHidden===true&&/hidden/.test(t))||(typeof includeHidden==='string'&&$(this).is(includeHidden))){this.value='';}}});};$.fn.resetForm=function(){return this.each(function(){var el=$(this);var tag=this.tagName.toLowerCase();switch(tag){case'input':this.checked=this.defaultChecked;case'textarea':this.value=this.defaultValue;return true;case'option':case'optgroup':var select=el.parents('select');if(select.length&&select[0].multiple){if(tag==='option'){this.selected=this.defaultSelected;}else{el.find('option').resetForm();}}else{select.resetForm();} 550return true;case'select':el.find('option').each(function(i){this.selected=this.defaultSelected;if(this.defaultSelected&&!el[0].multiple){el[0].selectedIndex=i;return false;}});return true;case'label':var forEl=$(el.attr('for'));var list=el.find('input,select,textarea');if(forEl[0]){list.unshift(forEl[0]);} 551list.resetForm();return true;case'form':if(typeof this.reset==='function'||(typeof this.reset==='object'&&!this.reset.nodeType)){this.reset();} 552return true;default:el.find('form,input,label,select,textarea').resetForm();return true;}});};$.fn.enable=function(b){if(typeof b==='undefined'){b=true;} 553return this.each(function(){this.disabled=!b;});};$.fn.selected=function(select){if(typeof select==='undefined'){select=true;} 554return this.each(function(){var t=this.type;if(t==='checkbox'||t==='radio'){this.checked=select;}else if(this.tagName.toLowerCase()==='option'){var $sel=$(this).parent('select');if(select&&$sel[0]&&$sel[0].type==='select-one'){$sel.find('option').selected(false);} 555this.selected=select;}});};$.fn.ajaxSubmit.debug=false;function log(){if(!$.fn.ajaxSubmit.debug){return;} 556var msg='[jquery.form] '+Array.prototype.join.call(arguments,'');if(window.console&&window.console.log){window.console.log(msg);}else if(window.opera&&window.opera.postError){window.opera.postError(msg);}}})); 557/* !core/misc/jquery.form.js */; 558/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 559/* core/modules/views/js/base.js */ 560(function($,Drupal,drupalSettings){Drupal.Views={};Drupal.Views.parseQueryString=function(query){const args={};if(query.includes('?')){query=query.substring(query.indexOf('?')+1);} 561let pair;const pairs=query.split('&');for(let i=0;i<pairs.length;i++){pair=pairs[i].split('=');if(pair[0]!=='q'){if(pair[1]){args[decodeURIComponent(pair[0].replace(/\+/g,' '))]=decodeURIComponent(pair[1].replace(/\+/g,' '));}else{args[decodeURIComponent(pair[0].replace(/\+/g,' '))]='';}}} 562return args;};Drupal.Views.parseViewArgs=function(href,viewPath){const returnObj={};const path=Drupal.Views.getPath(href);const viewHref=Drupal.url(viewPath).substring(drupalSettings.path.baseUrl.length,);if(viewHref&&path.startsWith(`${viewHref}/`)){returnObj.view_args=decodeURIComponent(path.substring(viewHref.length+1,path.length),);returnObj.view_path=path;} 563return returnObj;};Drupal.Views.pathPortion=function(href){const protocol=window.location.protocol;if(href.startsWith(protocol)){href=href.substring(href.indexOf('/',protocol.length+2));} 564return href;};Drupal.Views.getPath=function(href){href=Drupal.Views.pathPortion(href);href=href.substring(drupalSettings.path.baseUrl.length,href.length);if(href.startsWith('?q=')){href=href.substring(3,href.length);} 565const chars=['#','?','&'];for(let i=0;i<chars.length;i++){if(href.includes(chars[i])){href=href.substring(0,href.indexOf(chars[i]));}} 566return href;};})(jQuery,Drupal,drupalSettings); 567/* !core/modules/views/js/base.js */; 568/* core/modules/views/js/ajax_view.js */ 569(function($,Drupal,drupalSettings){Drupal.behaviors.ViewsAjaxView={};Drupal.behaviors.ViewsAjaxView.attach=function(context,settings){if(settings?.views?.ajaxViews){const{views:{ajaxViews},}=settings;Object.keys(ajaxViews||{}
569).forEach((i)=>{Drupal.views.instances[i]=new Drupal.views.ajaxView(ajaxViews[i]);});}};Drupal.behaviors.ViewsAjaxView.detach=(context,settings,trigger)=>{if(trigger==='unload'){if(settings?.views?.ajaxViews){const{views:{ajaxViews},}=settings;Object.keys(ajaxViews||{}).forEach((i)=>{const selector=`.js-view-dom-id-${ajaxViews[i].view_dom_id}`;if($(selector,context).length){delete Drupal.views.instances[i];delete settings.views.ajaxViews[i];}});}}};Drupal.views={};Drupal.views.instances={};Drupal.views.ajaxView=function(settings){const selector=`.js-view-dom-id-${settings.view_dom_id}`;this.$view=$(selector);this.$exposed_form=$(`form#views-exposed-form-${settings.view_name.replace( 570 /_/g, 571 '-', 572 )}-${settings.view_display_id.replace(/_/g, '-')}`,);let ajaxPath=drupalSettings.views.ajax_path;if(ajaxPath.constructor.toString().includes('Array')){ajaxPath=ajaxPath[0];} 573let queryString=window.location.search||'';if(queryString!==''){queryString=queryString.slice(1);const params=decodeURI(queryString).split('&').filter((param)=>{const[name,value]=param.split('=');return(this.$exposed_form.find(`input[name="${name}"]`).length===0&&!['page','reset','sort','order','q','render'].includes(name));});queryString=encodeURI(params.join('&'));if(queryString!==''){queryString=(ajaxPath.includes('?')?'&':'?')+queryString;}} 574this.element_settings={url:ajaxPath+queryString,submit:settings,httpMethod:'GET',setClick:true,event:'click',selector,progress:{type:'fullscreen'},};this.settings=settings;once('exposed-form',this.$exposed_form).forEach(this.attachExposedFormAjax.bind(this),);once('ajax-pager',this.$view.filter(this.filterNestedViews.bind(this)),).forEach(this.attachPagerAjax.bind(this));const selfSettings=$.extend({},this.element_settings,{event:'RefreshView',base:this.selector,httpMethod:'GET',element:this.$view.get(0),});this.refreshViewAjax=Drupal.ajax(selfSettings);};Drupal.views.ajaxView.prototype.attachExposedFormAjax=function(){const that=this;this.exposedFormAjax=[];$('input[type=submit], button[type=submit], input[type=image]',this.$exposed_form,).not('[data-drupal-selector=edit-reset]').each(function(index){const selfSettings=$.extend({},that.element_settings,{base:$(this).attr('id'),element:this,});that.exposedFormAjax[index]=Drupal.ajax(selfSettings);});};Drupal.views.ajaxView.prototype.filterNestedViews=function(){return!this.$view.parents('.view').length;};Drupal.views.ajaxView.prototype.attachPagerAjax=function(){this.$view.find('.js-pager__items a, th.views-field a, .attachment .views-summary a',).each(this.attachPagerLinkAjax.bind(this));};Drupal.views.ajaxView.prototype.attachPagerLinkAjax=function(id,link){const $link=$(link);const viewData={};const href=$link.attr('href');$.extend(viewData,this.settings,Drupal.Views.parseQueryString(href),Drupal.Views.parseViewArgs(href,this.settings.view_base_path),);const selfSettings=$.extend({},this.element_settings,{submit:viewData,base:false,element:link,httpMethod:'GET',});this.pagerAjax=Drupal.ajax(selfSettings);};Drupal.AjaxCommands.prototype.setBrowserUrl=(ajax,response)=>{if(ajax.element&&!ajax.element.closest('.ui-dialog-content')){window.history.replaceState(null,'',response.url);}};})(jQuery,Drupal,drupalSettings); 575/* !core/modules/views/js/ajax_view.js */;
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.