1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 2(function(_,$,Drupal,drupalSettings){'use strict';var Bootstrap={processedOnce:{},settings:drupalSettings.bootstrap||{}};Bootstrap.checkPlain=function(str){return str&&Drupal.checkPlain(str)||'';};Bootstrap.createPlugin=function(id,plugin,noConflict){if($.fn[id]!==void 0)return this.fatal('Specified jQuery plugin identifier already exists: @id. Use Drupal.bootstrap.replacePlugin() instead.',{'@id':id});if(typeof plugin!=='function')return this.fatal('You must provide a constructor function to create a jQuery plugin "@id": @plugin',{'@id':id,'@plugin':plugin});this.pluginNoConflict(id,plugin,noConflict);$.fn[id]=plugin;};Bootstrap.diffObjects=function(objects){var args=Array.prototype.slice.call(arguments);return _.pick(args[0],_.difference.apply(_,_.map(args,function(obj){return Object.keys(obj);})));};Bootstrap.eventMap={Event:/^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,MouseEvent:/^(?:click|dblclick|mouse(?:down|enter|leave|up|over|move|out))$/,KeyboardEvent:/^(?:key(?:down|press|up))$/,TouchEvent:/^(?:touch(?:start|end|move|cancel))$/};Bootstrap.extendPlugin=function(id,callback){if(typeof $.fn[id]!=='function')return this.fatal('Specified jQuery plugin identifier does not exist: @id',{'@id':id});if(typeof callback!=='function')return this.fatal('You must provide a callback function to extend the jQuery plugin "@id": @callback',{'@id':id,'@callback':callback});var constructor=$.fn[id]&&$.fn[id].Constructor||$.fn[id];var plugin=callback.apply(constructor,[this.settings]);if(!$.isPlainObject(plugin))return this.fatal('Returned value from callback is not a plain object that can be used to extend the jQuery plugin "@id": @obj',{'@obj':plugin});this.wrapPluginConstructor(constructor,plugin,true);return $.fn[id];};Bootstrap.superWrapper=function(parent,fn){return function(){var previousSuper=this.super;this.super=parent;var ret=fn.apply(this,arguments);if(previousSuper)this.super=previousSuper;else delete this.super;return ret;};};Bootstrap.fatal=function(message,args){if(this.settings.dev&&console.warn){for(var name in args)if(args.hasOwnProperty(name)&&typeof args[name]==='object')args[name]=JSON.stringify(args[name]);Drupal.throwError(new Error(Drupal.formatString(message,args)));}return false;};Bootstrap.intersectObjects=function(objects){var args=Array.prototype.slice.call(arguments);return _.pick(args[0],_.intersection.apply(_,_.map(args,function(obj){return Object.keys(obj);})));};Bootstrap.normalizeObject=function(obj){if(!$.isPlainObject(obj))return obj;for(var k in obj)if(typeof obj[k]==='string')if(obj[k]==='true')obj[k]=true;else if(obj[k]==='false')obj[k]=false;
2else{if(obj[k].match(/^[\d-.]$/))obj[k]=parseFloat(obj[k]);}else{if($.isPlainObject(obj[k]))obj[k]=Bootstrap.normalizeObject(obj[k]);}return obj;};Bootstrap.once=function(id,callback){if(this.processedOnce[id])return this;callback.call(this,this.settings);this.processedOnce[id]=true;return this;};Bootstrap.option=function(key,value){var options=$.isPlainObject(key)?$.extend({},key):{};if(arguments.length===0)return $.extend({},this.options);if(typeof key==="string"){var parts=key.split('.');key=parts.shift();var obj=options;if(parts.length){for(var i=0;i<parts.length-1;i++){obj[parts[i]]=obj[parts[i]]||{};obj=obj[parts[i]];}key=parts.pop();}if(arguments.length===1)return obj[key]===void 0?null:obj[key];obj[key]=value;}$.extend(true,this.options,options);};Bootstrap.pluginNoConflict=function(id,plugin,noConflict){if(plugin.noConflict===void 0&&(noConflict===void 0||noConflict)){var old=$.fn[id];plugin.noConflict=function(){$.fn[id]=old;return this;};}};Bootstrap.relayEvent=function(target,name,stopPropagation){return function(e){if(stopPropagation===void 0||stopPropagation)e.stopPropagation();var $target=$(target);var parts=name.split('.').filter(Boolean);var type=parts.shift();e.target=$target[0];e.currentTarget=$target[0];e.namespace=parts.join('.');e.type=type;$target.trigger(e);};};Bootstrap.replacePlugin=function(id,callback,noConflict){if(typeof $.fn[id]!=='function')return this.fatal('Specified jQuery plugin identifier does not exist: @id',{'@id':id});if(typeof callback!=='function')return this.fatal('You must provide a valid callback function to replace a jQuery plugin: @callback',{'@callback':callback});var constructor=$.fn[id]&&$.fn[id].Constructor||$.fn[id];var plugin=callback.apply(constructor,[this.settings]);if(typeof plugin!=='function')return this.fatal('Returned value from callback is not a usable function to replace a jQuery plugin "@id": @plugin',{'@id':id,'@plugin':plugin});this.wrapPluginConstructor(constructor,plugin);this.pluginNoConflict(id,plugin,noConflict);$.fn[id]=plugin;};Bootstrap.simulate=function(element,type,options){var ret=true;if(element instanceof $){element.each(function(){if(!Bootstrap.simulate(this,type,options))ret=false;});return ret;}if(!(element instanceof HTMLElement))this.fatal('Passed element must be an instance of HTMLElement, got "@type" instead.',{'@type':typeof element});if(typeof $.simulate==='function'){new $.simulate(element,type,options);return true;}var event;var ctor;var types=[].concat(type);for(var i=0,l=types.length;i<l;i++){type=types[i];for(var name in this.eventMap)if(this.eventMap[name].test(type)){ctor=name;break;}if(!ctor)throw new SyntaxError('Only rudimentary HTMLEvents, KeyboardEvents and MouseEvents are supported: '+type);var opts={bubbles:true,cancelable:true};if(ctor==='KeyboardEvent'||ctor==='MouseEvent')$.extend(opts,{ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1});if(ctor==='MouseEvent')$.extend(opts,{button:0,pointerX:0,pointerY:0,view:window});if(options)$.extend(opts,options);if(typeof window[ctor]==='function'){event=new window[ctor](type,opts);if(!element.dispatchEvent(event))ret=false;}else if(document.createEvent){event=document.createEvent(ctor);event.initEvent(type,opts.bubbles,opts.cancelable);if(!element.dispatchEvent(event))ret=false;}else if(typeof element.fireEvent==='function'){event=$.extend(document.createEventObject(),opts);if(!element.fireEvent('on'+type,event))ret=false;}else{if(typeof element[type])element[type]();}}return ret;};Bootstrap.stripHtml=function(html){if(html instanceof $)html=html.html();else{if(html instanceof Element)html=html.innerHTML;}var tmp=document.createElement('DIV');tmp.innerHTML=html;return (tmp.textContent||tmp.innerText||'').replace(/^[\s\n\t]*|[\s\n\t]*$/,'');};Bootstrap.unsupported=function(type,name,value){Bootstrap.warn('Unsupported by Drupal Bootstrap: (@type) @name -> @value',{'@type':type,'@name':name,'@value':typeof value==='object'?JSON.stringify(value):value});};Bootstrap.warn=function(message,args){if(this.settings.dev&&console.warn)console.warn(Drupal.formatString(message,args));};Bootstrap.wrapPluginConstructor=function(constructor,plugin,extend){var proto=constructor.prototype;var option=this.option;if(proto.option===void (0))proto.option=function(){return option.apply(this,arguments);};if(extend){if(plugin.prototype!==void 0)for(var key in plugin.prototype){if(!plugin.prototype.hasOwnProperty(key))continue;var value=plugin.prototype[key];if(typeof value==='function')proto[key]=this.superWrapper(proto[key]||function(){},value);else proto[key]=$.isPlainObject(value)?$.extend(true,{},proto[key],value):value;}delete plugin.prototype;for(key in plugin){if(!plugin.hasOwnProperty(key))continue;value=plugin[key];if(typeof value==='function')constructor[key]=this.superWrapper(constructor[key]||function(){},value);else constructor[key]=$.isPlainObject(value)?$.extend(true,{},constructor[key],value):value;}}};Drupal.bootstrap=Drupal.bootstrap||Bootstrap;})(window._,window.jQuery,window.Drupal,window.drupalSettings);; 3(function($,_){var Attributes=function(attributes){this.data={};this.data['class']=[];
3this.merge(attributes);};Attributes.prototype.toString=function(){var output='';var name,value;var checkPlain=function(str){return str&&str.toString().replace(/&/g,'&').replace(/"/g,'"').replace(/</g,'<').replace(/>/g,'>')||'';};var data=this.getData();for(name in data){if(!data.hasOwnProperty(name))continue;value=data[name];if(_.isFunction(value))value=value();if(_.isObject(value))value=_.values(value);if(_.isArray(value))value=value.join(' ');output+=' '+checkPlain(name)+'="'+checkPlain(value)+'"';}return output;};Attributes.prototype.toPlainObject=function(){var object={};var name,value;var data=this.getData();for(name in data){if(!data.hasOwnProperty(name))continue;value=data[name];if(_.isFunction(value))value=value();if(_.isObject(value))value=_.values(value);if(_.isArray(value))value=value.join(' ');object[name]=value;}return object;};Attributes.prototype.addClass=function(value){var args=Array.prototype.slice.call(arguments);this.data['class']=this.sanitizeClasses(this.data['class'].concat(args));return this;};Attributes.prototype.exists=function(name){return this.data[name]!==void (0)&&this.data[name]!==null;};Attributes.prototype.get=function(name,defaultValue){if(!this.exists(name))this.data[name]=defaultValue;return this.data[name];};Attributes.prototype.getData=function(){return _.extend({},this.data);};Attributes.prototype.getClasses=function(){return this.get('class',[]);};Attributes.prototype.hasClass=function(className){className=this.sanitizeClasses(Array.prototype.slice.call(arguments));var classes=this.getClasses();for(var i=0,l=className.length;i<l;i++)if(_.indexOf(classes,className[i])===-1)return false;return true;};Attributes.prototype.merge=function(object,recursive){if(!object)return this;if(object instanceof $)object=object[0];if(object instanceof Node)object=Array.prototype.slice.call(object.attributes).reduce(function(attributes,attribute){attributes[attribute.name]=attribute.value;return attributes;},{});else if(object instanceof Attributes)object=object.getData();else object=_.extend({},object);if(!$.isPlainObject(object)){setTimeout(function(){throw new Error('Passed object is not supported: '+object);});return this;}if(object&&object['class']!==void 0){this.addClass(object['class']);delete object['class'];}if(recursive===void 0||recursive)this.data=$.extend(true,{},this.data,object);else this.data=$.extend({},this.data,object);return this;};Attributes.prototype.remove=function(name){if(this.exists(name))delete this.data[name];return this;};Attributes.prototype.removeClass=function(className){var remove=this.sanitizeClasses(Array.prototype.slice.apply(arguments));this.data['class']=_.without(this.getClasses(),remove);return this;};Attributes.prototype.replaceClass=function(oldValue,newValue){var classes=this.getClasses();var i=_.indexOf(this.sanitizeClasses(oldValue),classes);if(i>=0){classes[i]=newValue;this.set('class',classes);}return this;};Attributes.prototype.sanitizeClasses=function(classes){return _.chain(Array.prototype.slice.call(arguments)).flatten().map(function(string){return string.split(' ');}).flatten().filter().map(function(value){return Attributes.cleanClass(value);}).uniq().value();};Attributes.prototype.set=function(name,value){var obj=$.isPlainObject(name)?name:{};if(typeof name==='string')obj[name]=value;return this.merge(obj);};Attributes.cleanClass=function(identifier,filter){filter=filter||{' ':'-','_':'-','/':'-','[':'-',']':''};identifier=identifier.toLowerCase();if(filter['__']===void 0)identifier=identifier.replace('__','#DOUBLE_UNDERSCORE#');identifier=identifier.replace(Object.keys(filter),Object.keys(filter).map(function(key){return filter[key];}));if(filter['__']===void 0)identifier=identifier.replace('#DOUBLE_UNDERSCORE#','__');
3identifier=identifier.replace(/[^\u002D\u0030-\u0039\u0041-\u005A\u005F\u0061-\u007A\u00A1-\uFFFF]/g,'');identifier=identifier.replace(['/^[0-9]/','/^(-[0-9])|^(--)/'],['_','__']);return identifier;};Attributes.create=function(attributes){return new Attributes(attributes);};window.Attributes=Attributes;})(window.jQuery,window._);; 4(function($,Drupal,Bootstrap,Attributes){if(!Drupal.icon)Drupal.icon={bundles:{}};if(!Drupal.theme.icon||Drupal.theme.prototype.icon)$.extend(Drupal.theme,{icon:function(bundle,icon,attributes){if(!Drupal.icon.bundles[bundle])return '';attributes=Attributes.create(attributes).addClass('icon').set('aria-hidden','true');icon=Drupal.icon.bundles[bundle](icon,attributes);return '<span'+attributes+'></span>';}});Drupal.icon.bundles.bootstrap=function(icon,attributes){attributes.addClass(['glyphicon','glyphicon-'+icon]);};$.extend(Drupal.theme,{ajaxThrobber:function(){return Drupal.theme('bootstrapIcon','refresh',{'class':['ajax-throbber','glyphicon-spin']});},button:function(attributes){attributes=Attributes.create(attributes).addClass('btn');var context=attributes.get('context','default');var label=attributes.get('value','');attributes.remove('context').remove('value');if(!attributes.hasClass(['btn-default','btn-primary','btn-success','btn-info','btn-warning','btn-danger','btn-link']))attributes.addClass('btn-'+Bootstrap.checkPlain(context));if(!attributes.exists('type'))attributes.set('type',attributes.hasClass('form-submit')?'submit':'button');return '<button'+attributes+'>'+label+'</button>';},btn:function(attributes){return Drupal.theme('button',attributes);},'btn-block':function(attributes){return Drupal.theme('button',Attributes.create(attributes).addClass('btn-block'));},'btn-lg':function(attributes){return Drupal.theme('button',Attributes.create(attributes).addClass('btn-lg'));},'btn-sm':function(attributes){return Drupal.theme('button',Attributes.create(attributes).addClass('btn-sm'));},'btn-xs':function(attributes){return Drupal.theme('button',Attributes.create(attributes).addClass('btn-xs'));},bootstrapIcon:function(name,attributes){return Drupal.theme('icon','bootstrap',name,attributes);}});})(window.jQuery,window.Drupal,window.Drupal.bootstrap,window.Attributes);; 5(function($,Drupal,debounce){$.fn.drupalGetSummary=function(){const callback=this.data('summaryCallback');if(!this[0]||!callback)return '';const result=callback(this[0]);return result?result.trim():'';};$.fn.drupalSetSummary=function(callback){const self=this;if(typeof callback!=='function'){const val=callback;callback=function(){return val;};}return (this.data('summaryCallback',callback).off('formUpdated.summary').on('formUpdated.summary',()=>{self.trigger('summaryUpdated');}).trigger('summaryUpdated'));};Drupal.behaviors.formSingleSubmit={attach(){function onFormSubmit(e){const $form=$(e.currentTarget);const formValues=new URLSearchParams(new FormData(e.target)).toString();const previousValues=$form.attr('data-drupal-form-submit-last');if(previousValues===formValues)e.preventDefault();else $form.attr('data-drupal-form-submit-last',formValues);}$(once('form-single-submit','body')).on('submit.singleSubmit','form:not([method~="GET"])',onFormSubmit);}};function triggerFormUpdated(element){$(element).trigger('formUpdated');}function fieldsList(form){return [].map.call(form.querySelectorAll('[name][id]'),(el)=>el.id);}Drupal.behaviors.formUpdated={attach(context){const $context=$(context);const contextIsForm=context.tagName==='FORM';const $forms=$(once('form-updated',contextIsForm?$context:$context.find('form')));let formFields;if($forms.length)$.makeArray($forms).forEach((form)=>{const events='change.formUpdated input.formUpdated ';const eventHandler=debounce((event)=>{triggerFormUpdated(event.target);},300);formFields=fieldsList(form).join(',');form.setAttribute('data-drupal-form-fields',formFields);$(form).on(events,eventHandler);});if(contextIsForm){formFields=fieldsList(context).join(',');const currentFields=$(context).attr('data-drupal-form-fields');if(formFields!==currentFields)triggerFormUpdated(context);}},detach(context,settings,trigger){const $context=$(context);const contextIsForm=context.tagName==='FORM';if(trigger==='unload')once.remove('form-updated',contextIsForm?$context:$context.find('form')).forEac
5h((form)=>{form.removeAttribute('data-drupal-form-fields');$(form).off('.formUpdated');});}};Drupal.behaviors.fillUserInfoFromBrowser={attach(context,settings){const userInfo=['name','mail','homepage'];const $forms=$(once('user-info-from-browser','[data-user-info-from-browser]'));if($forms.length)userInfo.forEach((info)=>{const $element=$forms.find(`[name=${info}]`);const browserData=localStorage.getItem(`Drupal.visitor.${info}`);if(!$element.length)return;const emptyValue=$element[0].value==='';const defaultValue=$element.attr('data-drupal-default-value')===$element[0].value;if(browserData&&(emptyValue||defaultValue))$element.each(function(index,item){item.value=browserData;});});$forms.on('submit',()=>{userInfo.forEach((info)=>{const $element=$forms.find(`[name=${info}]`);if($element.length)localStorage.setItem(`Drupal.visitor.${info}`,$element[0].value);});});}};const handleFragmentLinkClickOrHashChange=(e)=>{let url;if(e.type==='click')url=e.currentTarget.location?e.currentTarget.location:e.currentTarget;else url=window.location;const hash=url.hash.substring(1);if(hash){const $target=$(`#${hash}`);$('body').trigger('formFragmentLinkClickOrHashChange',[$target]);setTimeout(()=>$target.trigger('focus'),300);}};const debouncedHandleFragmentLinkClickOrHashChange=debounce(handleFragmentLinkClickOrHashChange,300,true);$(window).on('hashchange.form-fragment',debouncedHandleFragmentLinkClickOrHashChange);
5$(document).on('click.form-fragment','a[href*="#"]',debouncedHandleFragmentLinkClickOrHashChange);})(jQuery,Drupal,Drupal.debounce);; 6(function($,window,Drupal,drupalSettings,once){Drupal.behaviors.bootstrapForm={attach:function(context){if(drupalSettings.bootstrap&&drupalSettings.bootstrap.forms_has_error_value_toggle){var $context=$(context);$(once('error','.form-item.has-error:not(.form-type-password.has-feedback)',context)).each(function(){var $formItem=$(this);var $input=$formItem.find(':input');$input.on('keyup focus blur',function(){if(this.defaultValue!==void 0){$formItem[this.defaultValue!==this.value?'removeClass':'addClass']('has-error');$input[this.defaultValue!==this.value?'removeClass':'addClass']('error');}});});}}};})(jQuery,this,Drupal,drupalSettings,once);; 7(($,Drupal)=>{function DetailsSummarizedContent(node){this.$node=$(node);this.setupSummary();}$.extend(DetailsSummarizedContent,{instances:[]});$.extend(DetailsSummarizedContent.prototype,{setupSummary(){this.$detailsSummarizedContentWrapper=$(Drupal.theme('detailsSummarizedContentWrapper'));this.$node.on('summaryUpdated',this.onSummaryUpdated.bind(this)).trigger('summaryUpdated').find('> summary').append(this.$detailsSummarizedContentWrapper);},onSummaryUpdated(){const text=this.$node.drupalGetSummary();this.$detailsSummarizedContentWrapper.html(Drupal.theme('detailsSummarizedContentText',text));}});Drupal.behaviors.detailsSummary={attach(context){DetailsSummarizedContent.instances=DetailsSummarizedContent.instances.concat(once('details','details',context).map((details)=>new DetailsSummarizedContent(details)));}};Drupal.DetailsSummarizedContent=DetailsSummarizedContent;Drupal.theme.detailsSummarizedContentWrapper=()=>`<span class="summary"></span>`;Drupal.theme.detailsSummarizedContentText=(text)=>text?` (${text})`:'';})(jQuery,Drupal);; 8(function($,Drupal){Drupal.behaviors.detailsAria={attach(){$(once('detailsAria','body')).on('click.detailsAria','summary',(event)=>{const $summary=$(event.currentTarget);const open=$(event.currentTarget.parentNode).attr('open')==='open'?'false':'true';$summary.attr({'aria-expanded':open});});}};})(jQuery,Drupal);; 9(function($){const handleFragmentLinkClickOrHashChange=(e,$target)=>{$target.parents('details').not('[open]').find('> summary').trigger('click');};$('body').on('formFragmentLinkClickOrHashChange.details',handleFragmentLinkClickOrHashChange);window.addEventListener('invalid',(event)=>{if(event.target.matches('details input[required]'))handleFragmentLinkClickOrHashChange(event,$(event.target));},{capture:true});})(jQuery);; 10(function($,Drupal,debounce){const cache={right:0,left:0,bottom:0,top:0};const cssVarPrefix='--drupal-displace-offset';const documentStyle=document.documentElement.style;const offsetKeys=Object.keys(cache);const offsetProps={};offsetKeys.forEach((edge)=>{offsetProps[edge]={enumerable:true,get(){return cache[edge];},set(value){if(value!==cache[edge])documentStyle.setProperty(`${cssVarPrefix}-${edge}`,`${value}px`);cache[edge]=value;}};});const offsets=Object.seal(Object.defineProperties({},offsetProps));function getRawOffset(el,edge){const $el=$(el);const documentElement=document.documentElement;let displacement=0;const horizontal=edge==='left'||edge==='right';let placement=$el.offset()[horizontal?'left':'top'];placement-=window[`scroll${horizontal?'X':'Y'}`]||document.documentElement[`scroll${horizontal?'Left':'Top'}`]||0;switch(edge){case 'top':displacement=placement+$el.outerHeight();break;case 'left':displacement=placement+$el.outerWidth();break;case 'bottom':displacement=documentElement.clientHeight-placement;break;case 'right':displacement=documentElement.clientWidth-placement;break;default:displacement=0;}return displacement;}function calculateOffset(edge){let edgeOffset=0;const displacingElements=document.querySelectorAll(`[data-offset-${edge}]`);const n=displacingElements.length;for(let i=0;i<n;i++){const el=displacingElements[i];if(el.style.display==='none')continue;let displacement=parseInt(el.getAttribute(`data-offset-${edge}`),10);if(isNaN(displacement))displacement=getRawOffset(el,edge);edgeOffset=Math.max(edgeOffset,displacement);}return edgeOffset;}function displace(broadcast=true){const newOffsets={};offsetKeys.forEach((edge)=>{newOffsets[edge]=calculateOffset(edge);});offsetKeys.forEach((edge)=>{offsets[edge]=newOffsets[edge];});if(broadcast)$(document).trigger('drupalViewportOffsetChange',offsets);return offsets;}Drupal.behaviors.drupalDisplace={attach(){if(this.displaceProcessed)return;this.displaceProcessed=true;$(window).on('resize.drupalDisplace',debounce(displace,200));}};Drupal.displace=displace;Object.defineProperty(Drupal.displace,'offsets',{value:offsets,writable:false});Drupal.displace.calculateOffset=calculateOffset;})(jQuery,Drupal,Drupal.debounce);; 11(($,Drupal,{isTabbable})=>{$.extend($.expr[':'],{tabbable(element){Drupal.deprecationError({message:'The :tabbable selector is deprecated
11in Drupal 9.2.0 and will be removed in Drupal 11.0.0. Use the core/tabbable library instead. See https://www.drupal.org/node/3183730'});return isTabbable(element);}});})(jQuery,Drupal,window.tabbable);; 12(($)=>{let cachedScrollbarWidth=null;const {max,abs}=Math;const regexHorizontal=/left|center|right/;const regexVertical=/top|center|bottom/;const regexOffset=/[+-]\d+(\.[\d]+)?%?/;const regexPosition=/^\w+/;const _position=$.fn.position;function getOffsets(offsets,width,height){return [parseFloat(offsets[0])*(typeof offsets[0]==='string'&&offsets[0].endsWith('%')?width/100:1),parseFloat(offsets[1])*(typeof offsets[1]==='string'&&offsets[1].endsWith('%')?height/100:1)];}function parseCss(element,property){return parseInt(window.getComputedStyle(element)[property],10)||0;}function getDimensions(elem){const raw=elem[0];if(raw.nodeType===9)return {width:elem.width(),height:elem.height(),offset:{top:0,left:0}};if(!!raw&&raw===raw.window)return {width:elem.width(),height:elem.height(),offset:{top:elem.scrollTop(),left:elem.scrollLeft()}};if(raw.preventDefault)return {width:0,height:0,offset:{top:raw.pageY,left:raw.pageX}};return {width:elem.outerWidth(),height:elem.outerHeight(),offset:elem.offset()};}const collisions={fit:{left(position,data){const {within}=data;const withinOffset=within.isWindow?within.scrollLeft:within.offset.left;const outerWidth=within.width;const collisionPosLeft=position.left-data.collisionPosition.marginLeft;const overLeft=withinOffset-collisionPosLeft;const overRight=collisionPosLeft+data.collisionWidth-outerWidth-withinOffset;let newOverRight;if(data.collisionWidth>outerWidth)if(overLeft>0&&overRight<=0){newOverRight=position.left+overLeft+data.collisionWidth-outerWidth-withinOffset;position.left+=overLeft-newOverRight;}else if(overRight>0&&overLeft<=0)position.left=withinOffset;else if(overLeft>overRight)position.left=withinOffset+outerWidth-data.collisionWidth;else position.left=withinOffset;else if(overLeft>0)position.left+=overLeft;else if(overRight>0)position.left-=overRight;else position.left=max(position.left-collisionPosLeft,position.left);},top(position,data){const {within}=data;const withinOffset=within.isWindow?within.scrollTop:within.offset.top;const outerHeight=data.within.height;const collisionPosTop=position.top-data.collisionPosition.marginTop;const overTop=withinOffset-collisionPosTop;const overBottom=collisionPosTop+data.collisionHeight-outerHeight-withinOffset;let newOverBottom;if(data.collisionHeight>outerHeight)if(overTop>0&&overBottom<=0){newOverBottom=position.top+overTop+data.collisionHeight-outerHeight-withinOffset;position.top+=overTop-newOverBottom;}else if(overBottom>0&&overTop<=0)position.top=withinOffset;else if(overTop>overBottom)position.top=withinOffset+outerHeight-data.collisionHeight;else position.top=withinOffset;else if(overTop>0)position.top+=overTop;else if(overBottom>0)position.top-=overBottom;else position.top=max(position.top-collisionPosTop,position.top);}},flip:{left(position,data){const {within}=data;const withinOffset=within.offset.left+within.scrollLeft;const outerWidth=within.width;const offsetLeft=within.isWindow?within.scrollLeft:within.offset.left;const collisionPosLeft=position.left-data.collisionPosition.marginLeft;const overLeft=collisionPosLeft-offsetLeft;const overRight=collisionPosLeft+data.collisionWidth-outerWidth-offsetLeft;const myOffset=data.my[0]==='left'?-data.elemWidth:data.my[0]==='right'?data.elemWidth:0;const atOffset=data.at[0]==='left'?data.targetWidth:data.at[0]==='right'?-data.targetWidth:0;const offset=-2*data.offset[0];let newOverRight;let newOverLeft;if(overLeft<0){newOverRight=position.left+myOffset+atOffset+offset+data.collisionWidth-outerWidth-withinOffset;if(newOverRight<0||newOverRight<abs(overLeft))position.left+=myOffset+atOffset+offset;}else{if(overRight>0){newOverLeft=position.left-data.collisionPosition.marginLeft+myOffset+atOffset+offset-offsetLeft;if(newOverLeft>0||abs(newOverLeft)<overRight)position.left+=myOffset+atOffset+offset;}}},top(position,data){const {within}=data;const withinOffset=within.offset.top+within.scrollTop;const outerHeight=within.height;const offsetTop=within.isWindow?within.scrollTop:within.offset.top;const collisionPosTop=position.top-data.collisionPosition.marginTop;const overTop=collisionPosTop-offsetTop;const overBottom=collisionPosTop+data.collisionHeight-outerHeight-offsetTop;const top=data.my[1]==='top';const myOffset=top?-data.elemHeight:data.my[1]==='bottom'?data.elemHeight:0;const atOffset=data.at[1]==='top'?data.targetHeight:data.at[1]==='bottom'?-data.targetHeight:0;const offset=-2*data.offset[1];let newOverTop;let newOverBottom;if(overTop<0){newOverBottom=position.top+myOffset+atOffset+offset+data.collisionHeight-outerHeight-withinOffset;if(newOverBottom<0||newOverBottom<abs(overTop))position.top+=myOffset+atOffset+offset;}else{if(overBottom>0){newOverTop=position.top-data.collisionPosition.marginTop+myOffset+atOffset+offset-offsetTop;if(newOverTop>0||abs(newOverTop)<overBottom)position.top+=myOffset+atOffset+offset;}}}},flipfit:{left(...args){collisions.flip.left.apply(this,args);collisions.fit.left.apply(this,args);},top(...args){collisions.flip.top.apply(this,args);collisions.fit.top.apply(this,args);}}};$.position={scrollbarWidth(){if(cachedScrollbarWidth!==undefined)return cachedScrollbarWidth;const div=$('<div '+"style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>"+"<div style='height:100px;width:auto;'></div></div>");const innerDiv=div.children()[0];$('body').append(div);const w1=innerDiv.offsetWidth;div[0].style.overflow='scroll';let w2=innerDiv.offsetWidth;if(w1===w2)w2=div[0].clientWidth;div.remove();cachedScrollbarWidth=w1-w2;return cachedScrollbarWidth;},getScrollInfo(within){const overflowX=within.isWindow||within.isDocument?'':window.getComputedStyle(within.element[0])['overflow-x'];const overflowY=within.isWindow||within.isDocument?'':window.getComputedStyle(within.element[0])['overflow-y'];const hasOverflowX=overflowX==='scroll'||(overflowX==='auto'&&within.width<within.element[0].scrollWidth);const hasOverflowY=overflowY==='scroll'||(overflowY==='auto'&&within.height<within.element[0].scrollHeight);return {width:hasOverflowY?$.position.scrollbarWidth():0,height:hasOverflowX?$.position.scrollbarWidth():0};},getWithinInfo(element){const withinElement=$(element||window);const isWindow=!!withinElement[0]&&withinElement[0]===withinElement[0].window;const isDocument=!!withinElement[0]&&withinElement[0].nodeType===9;const hasOffset=!isWindow&&!isDocument;return {element:withinElement,isWindow,isDocument,offset:hasOffset?$(element).offset():{left:0,top:0},scrollLeft:withinElement.scrollLeft(),scrollTop:withinElement.scrollTop(),width:withinElement.outerWidth(),height:withinElement.outerHeight()};}};$.fn.position=function(options){if(!options||!options.of)return _position.apply(this,arguments);options=$.extend({},options);const within=$.position.getWithinInfo(options.within);const scrollInfo=$.position.getScrollInfo(within);const collision=(options.collision||'flip').split(' ');const offsets={};const target=typeof options.of==='string'?$(document).find(options.of):$(options.of);const dimensions=getDimensions(target);const targetWidth=dimensions.width;const targetHeight=dimensions.height;const targetOffset=dimensions.offset;if(target[0].preventDefault)options.at='left top';const basePosition=$.extend({},targetOffset);$.each(['my','at'],function(){let pos=(options[this]||'').split(' ');
12if(pos.length===1)pos=regexHorizontal.test(pos[0])?pos.concat(['center']):regexVertical.test(pos[0])?['center'].concat(pos):['center','center'];pos[0]=regexHorizontal.test(pos[0])?pos[0]:'center';pos[1]=regexVertical.test(pos[1])?pos[1]:'center';const horizontalOffset=regexOffset.exec(pos[0]);const verticalOffset=regexOffset.exec(pos[1]);offsets[this]=[horizontalOffset?horizontalOffset[0]:0,verticalOffset?verticalOffset[0]:0];options[this]=[regexPosition.exec(pos[0])[0],regexPosition.exec(pos[1])[0]];});if(collision.length===1)collision[1]=collision[0];if(options.at[0]==='right')basePosition.left+=targetWidth;else{if(options.at[0]==='center')basePosition.left+=targetWidth/2;}if(options.at[1]==='bottom')basePosition.top+=targetHeight;else{if(options.at[1]==='center')basePosition.top+=targetHeight/2;}const atOffset=getOffsets(offsets.at,targetWidth,targetHeight);basePosition.left+=atOffset[0];basePosition.top+=atOffset[1];return this.each(function(){let using;const elem=$(this);const elemWidth=elem.outerWidth();const elemHeight=elem.outerHeight();const marginLeft=parseCss(this,'marginLeft');const marginTop=parseCss(this,'marginTop');const collisionWidth=elemWidth+marginLeft+parseCss(this,'marginRight')+scrollInfo.width;const collisionHeight=elemHeight+marginTop+parseCss(this,'marginBottom')+scrollInfo.height;const position=$.extend({},basePosition);const myOffset=getOffsets(offsets.my,elem.outerWidth(),elem.outerHeight());if(options.my[0]==='right')position.left-=elemWidth;else{if(options.my[0]==='center')position.left-=elemWidth/2;}if(options.my[1]==='bottom')position.top-=elemHeight;else{if(options.my[1]==='center')position.top-=elemHeight/2;}position.left+=myOffset[0];position.top+=myOffset[1];const collisionPosition={marginLeft,marginTop};$.each(['left','top'],function(i,dir){if(collisions[collision[i]])collisions[collision[i]][dir](position,{targetWidth,targetHeight,elemWidth,elemHeight,collisionPosition,collisionWidth,collisionHeight,offset:[atOffset[0]+myOffset[0],atOffset[1]+myOffset[1]],my:options.my,at:options.at,within,elem});});if(options.using)using=function(props){const left=targetOffset.left-position.left;const right=left+targetWidth-elemWidth;const top=targetOffset.top-position.top;const bottom=top+targetHeight-elemHeight;const feedback={target:{element:target,left:targetOffset.left,top:targetOffset.top,width:targetWidth,height:targetHeight},element:{element:elem,left:position.left,top:position.top,width:elemWidth,height:elemHeight},horizontal:right<0?'left':left>0?'right':'center',vertical:bottom<0?'top':top>0?'bottom':'middle'};if(targetWidth<elemWidth&&abs(left+right)<targetWidth)feedback.horizontal='center';if(targetHeight<elemHeight&&abs(top+bottom)<targetHeight)feedback.vertical='middle';if(max(abs(left),abs(right))>max(abs(top),abs(bottom)))feedback.important='horizontal';else feedback.important='vertical';options.using.call(this,props,feedback);};elem.offset($.extend(position,{using}));});};if(!$.hasOwnProperty('ui'))$.ui={};$.ui.position=collisions;})(jQuery);; 13(function($,Drupal,Bootstrap,Attributes){'use strict';var $document=$(document);Bootstrap.modalFindFocusableElement=function(modal){return modal.$dialogBody.find(':input,:button,.btn').not('.visually-hidden,.sr-only');};$document.on('shown.bs.modal',function(e){var $modal=$(e.target);var modal=$modal.data('bs.modal');var $ckeditor=$modal.find('[data-ckeditor5-id]');if($ckeditor.length){$('.ck-body-wrapper').appendTo($modal);$('.ck-body-wrapper .ck-body>div').each(function(){$(this).css('margin-top',-window.scrollY+'px');});}if(modal&&modal.options.focusInput){var $focusable=Bootstrap.modalFindFocusableElement(modal);if($focusable&&$focusable[0]){var $input=$focusable.filter(':visible:first').focus();if(modal.options.selectText&&$input.is(':text'))$input[0].setSelectionRange(0,$input[0].value.length);}else{if(modal.$close.is(':visible'))modal.$close.focus();}}});Bootstrap.once('modal',function(settings){Bootstrap.replacePlugin('modal',function(){var BootstrapModal=this;Bootstrap.Modal=function(element,options){this.$body=$(document.body);this.$element=$(element);
13this.$dialog=this.$element.find('.modal-dialog');this.$header=this.$dialog.find('.modal-header');this.$title=this.$dialog.find('.modal-title');this.$close=this.$header.find('.close');this.$footer=this.$dialog.find('.modal-footer');this.$content=this.$dialog.find('.modal-content');this.$dialogBody=this.$dialog.find('.modal-body');this.$backdrop=null;this.isShown=null;this.originalBodyPad=null;this.scrollbarWidth=0;this.ignoreBackdropClick=false;this.options=this.mapDialogOptions(options);};Bootstrap.Modal.DEFAULTS=$.extend({},BootstrapModal.DEFAULTS,{animation:!!settings.modal_animation,backdrop:settings.modal_backdrop==='static'?'static':!!settings.modal_backdrop,focusInput:!!settings.modal_focus_input,selectText:!!settings.modal_select_text,keyboard:!!settings.modal_keyboard,remote:null,show:!!settings.modal_show,size:settings.modal_size});Bootstrap.Modal.prototype=BootstrapModal.prototype;Bootstrap.Modal.prototype.destroy=function(){this.hide();Drupal.detachBehaviors(this.$element[0]);this.$element.removeData('bs.modal').remove();};Bootstrap.Modal.prototype.init=function(){if(this.options.remote)this.$content.load(this.options.remote,$.proxy(function(){this.$element.trigger('loaded.bs.modal');},this));};Bootstrap.Modal.prototype.mapDialogOptions=function(options){return options||{};};var Plugin=function(){var args=Array.prototype.slice.call(arguments);var method=args[0];var options=args[1]||{};var relatedTarget=args[2]||null;if($.isPlainObject(method)){relatedTarget=options||null;options=method;method=null;}var ret=void 0;this.each(function(){var $this=$(this);var data=$this.data('bs.modal');var initialize=false;var showMethods=['open','show','toggle'];if(!data&&method&&showMethods.indexOf(method)===-1)return;options=Bootstrap.normalizeObject($.extend({},Bootstrap.Modal.DEFAULTS,data&&data.options,$this.data(),options));delete options['bs.modal'];if(!data){$this.data('bs.modal',(data=new Bootstrap.Modal(this,options)));initialize=true;}if(initialize||(!method&&!args.length))data.init();if(method)if(typeof data[method]==='function')try{ret=data[method].apply(data,args.slice(1));}catch(e){Drupal.throwError(e);}else Bootstrap.unsupported('method',method);else{data.option(options);if(options.show&&!data.isShown)data.show(relatedTarget);}});return this.length===1&&ret!==void 0?ret:this;};Plugin.Constructor=Bootstrap.Modal;$document.off('click.bs.modal.data-api').on('click.bs.modal.data-api','[data-toggle="modal"]',function(e){var $this=$(this);var href=$this.attr('href');var target=$this.attr('data-target')||(href&&href.replace(/.*(?=#[^\s]+$)/,''));var $target=$document.find(target);var options=$target.data('bs.modal')?'toggle':$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data());if($this.is('a'))e.preventDefault();$target.one('show.bs.modal',function(showEvent){if(showEvent.isDefaultPrevented())return;$target.one('hidden.bs.modal',function(){$this.is(':visible')&&$this.trigger('focus');});});$target.modal(options,this);});return Plugin;});$.extend(Drupal.theme,{bootstrapModal:function(variables){var output='';var settings=drupalSettings.bootstrap||{};var defaults={attributes:{class:['modal'],tabindex:-1,role:'dialog'},body:'',closeButton:true,description:{attributes:{class:['help-block']},content:null,position:'before'},footer:'',id:'drupal-modal',size:settings.modal_size?settings.modal_size:'',title:{attributes:{class:['modal-title']},content:Drupal.t('Loading...'),html:false,tag:'h4'}};variables=$.extend(true,{},defaults,variables);var attributes=Attributes.create(defaults.attributes).merge(variables.attributes);attributes.set('id',attributes.get('id',variables.id));if(settings.modal_animation)attributes.addClass('fade');output+='<div'+attributes+'>';output+=Drupal.theme('bootstrapModalDialog',_.omit(variables,'attributes'));output+='</div>';return output;},bootstrapModalDialog:function(variables){var output='';var defaults={attributes:{class:['modal-dialog'],role:'document'},id:'drupal-modal'};variables=$.extend(true,{},defaults,variables);var attributes=Attributes.create(defaults.attributes).merge(variables.attributes);attributes.set('id',attributes.get('id',variables.id+'--dialog'));if(variables.size)attributes.addClass(variables.size);output+='<div'+attributes+'>';output+=Drupal.theme('bootstrapModalContent',_.omit(variables,'attributes'));output+='</div>';return output;},bootstrapModalContent:function(variables){var output='';var defaults={attributes:{class:['modal-content']},id:'drupal-modal'};variables=$.extend(true,{},defaults,variables);var attributes=Attributes.create(defaults.attributes).merge(variables.attributes);attributes.set('id',attributes.get('id',variables.id+'--content'));output+='<div'+attributes+'>';variables=_.omit(variables,'attributes');output+=Drupal.theme('bootstrapModalHeader',variables);output+=Drupal.theme('bootstrapModalBody',variables);output+=Drupal.theme('bootstrapModalFooter',variables);output+='</div>';return output;},bootstrapModalBody:function(variables){var output='';var defaults={attributes:{class:['modal-body']},body:'',description:{attributes:{class:['help-block']},content:null,position:'before'},id:'drupal-modal'};variables=$.extend(true,{},defaults,variables);var attributes=Attributes.create(defaults.attributes).merge(variables.attributes);attributes.set('id',attributes.get('id',variables.id+'--body'));output+='<div'+attributes+'>';if(typeof variables.description==='string')variables.description=$.extend({},defaults.description,{content:variables.description});var description=variables.description;description.attributes=Attributes.create(defaults.description.attributes).merge(description.attributes);if(description.content&&description.position==='invisible')description.attributes.addClass('sr-only');if(description.content&&description.position==='before')output+='<p'+description.attributes+'>'+description.content+'</p>';output+=variables.body;if(description.content&&(description.position==='after'||description.position==='invisible'))output+='<p'+description.attributes+'>'+description.content+'</p>';output+='</div>';return output;},bootstrapModalClose:function(variables){var defaults={attributes:{'aria-label':Drupal.t('Close'),class:['close'],'data-dismiss':'modal',type:'button'}};variables=$.extend(true,{},defaults,variables);var attributes=Attributes.create(defaults.attributes).merge(variables.attributes);return '<button'+attributes+'><span aria-hidden="true">×</span></button>';},bootstrapModalFooter:function(variables,force){var output='';var defaults={attributes:{class:['modal-footer']},footer:'',id:'drupal-modal'};variables=$.extend(true,{},defaults,variables);if(force||variables.footer){var attributes=Attributes.create(defaults.attributes).merge(variables.attributes);attributes.set('id',attributes.get('id',variables.id+'--footer'));output+='<div'+attributes+'>';output+=variables.footer;output+='</div>';}return output;},bootstrapModalHeader:function(variables){var output='';var defaults={attributes:{class:['modal-header']}
13,closeButton:true,id:'drupal-modal',title:{attributes:{class:['modal-title']},content:Drupal.t('Loading...'),html:false,tag:'h4'}};variables=$.extend(true,{},defaults,variables);if(typeof variables.title==='string')variables.title=$.extend({},defaults.title,{content:variables.title});var title=Drupal.theme('bootstrapModalTitle',variables.title);if(title){var attributes=Attributes.create(defaults.attributes).merge(variables.attributes);attributes.set('id',attributes.get('id',variables.id+'--header'));output+='<div'+attributes+'>';if(variables.closeButton)output+=Drupal.theme('bootstrapModalClose',_.omit(variables,'attributes'));output+=title;output+='</div>';}return output;},bootstrapModalTitle:function(variables){var output='';var defaults={attributes:{class:['modal-title']},closeButton:true,id:'drupal-modal',content:Drupal.t('Loading...'),html:false,tag:'h4'};if(typeof variables==='string')variables=$.extend({},defaults,{content:title});variables=$.extend(true,{},defaults,variables);var attributes=Attributes.create(defaults.attributes).merge(variables.attributes);attributes.set('id',attributes.get('id',variables.id+'--title'));output+='<'+Drupal.checkPlain(variables.tag)+Attributes.create(defaults.attributes).merge(variables.attributes)+'>';if(variables.closeButton)output+=Drupal.theme('bootstrapModalClose',_.omit(variables,'attributes'));output+=(variables.html?variables.content:Drupal.checkPlain(variables.content));output+='</'+Drupal.checkPlain(variables.tag)+'>';return output;}});});})(window.jQuery,window.Drupal,window.Drupal.bootstrap,window.Attributes);; 14(function($,Drupal,Bootstrap,Attributes){Bootstrap.Dialog=Bootstrap.Dialog||{};Bootstrap.Dialog.handlers={};Bootstrap.Dialog.Handler=function(type,data){this.ctor=$.fn.modal;this.extend=null;this.plugin='modal';this.prefix='modal';this.themeHooks={modal:'bootstrapModal',dialog:'bootstrapModalDialog',header:'bootstrapModalHeader',title:'bootstrapModalTitle',close:'bootstrapModalClose',content:'bootstrapModalContent',body:'bootstrapModalBody',footer:'bootstrapModalFooter'};this.type=type;this.selectors={dialog:'.modal-dialog',header:'.modal-header',title:'.modal-title',close:'.close',content:'.modal-content',body:'.modal-body',footer:'.modal-footer',buttons:'.modal-buttons'};$.extend(this,data);if(this.extend)Bootstrap.extend(this.plugin,this.extend);};Bootstrap.Dialog.Handler.get=function(type){if(type instanceof $)type=type[0];if(type instanceof HTMLElement)type=type.dialogType;if(!type)type='modal';if(!Bootstrap.Dialog.handlers[type])Bootstrap.Dialog.handlers[type]=new Bootstrap.Dialog.Handler();return Bootstrap.Dialog.handlers[type];};Bootstrap.Dialog.Handler.register=function(type,data){Bootstrap.Dialog.handlers[type]=new Bootstrap.Dialog.Handler(type,data);};Bootstrap.Dialog.Handler.prototype.invoke=function(context){var args=Array.prototype.slice.call(arguments);return this.ctor.apply(context,args.slice(1));};Bootstrap.Dialog.Handler.prototype.theme=function(hook){var args=Array.prototype.slice.call(arguments);return $(Drupal.theme.apply(Drupal.theme,[this.themeHooks[hook]].concat(args.slice(1))));};Bootstrap.Dialog.Handler.prototype.ensureModalStructure=function(element,options){var $element=$(element);if($element.is('[data-drupal-theme="'+this.themeHooks.modal+'"]'))return;var attributes=Attributes.create(element).remove('style').set('data-drupal-theme',this.themeHooks.modal);if(options.$trigger&&options.$trigger[0]){var trigger=options.$trigger[0];var data={};for(var i=0,l=trigger.attributes.length;i<l;i++){var name=trigger.attributes[i].name;if(name&&name.substring(0,5)==='data-')data[name]=trigger.getAttribute(name);}attributes.merge(data);}options=$.extend(true,{},options,{attributes});var $modal=this.theme('modal',options);var $body=$element.find(this.selectors.body);var $existing=$body[0]?$body.contents():$element.contents();$element.attr(Attributes.create($modal).toPlainObject());$element.append($modal.html());$element.find(this.selectors.body).append($existing);};})(jQuery,Drupal,Drupal.bootstrap,Attributes);; 15(function($,Drupal,Bootstrap,Attributes,drupalSettings){'use strict';Bootstrap.once('modal.jquery.ui.bridge',function(settings){var rtl=document.documentElement.getAttribute('dir').toLowerCase()==='rtl';$(function(){drupalSettings.dialog.buttonClass='btn';drupalSettings.dialog.buttonPrimaryClass='btn-primary';});Bootstrap.Dialog.Bridge=function(options){var args=Array.prototype.slice.call(arguments);var $element=$(this);var type=options&&options.dialogType||$element[0].dialogType||'modal';$element[0].dialogType=type;var handler=Bootstrap.Dialog.Handler.get(type);if(args.length===1&&typeof options==='object'){this.each(function(){handler.ensureModalStructure(this,options);});return handler.invoke(this,{dialogOptions:options,jQueryUiBridge:true});}var ret;try{ret=handler.invoke.apply(handler,[this].concat(args));}catch(e){Bootstrap.warn(e);}return this.length===1&&ret!==void 0?ret:this;};Bootstrap.createPlugin('dialog',Bootstrap.Dialog.Bridge);Bootstrap.Modal.Bridge=function(){var Modal=this;return {DEFAULTS:{jQueryUiBridge:false},prototype:{close:function(){var _this=this;this.hide.apply(this,arguments);setTimeout(function(){if(!_this.isShown&&_this.$backdrop)_this.hideModal();},(Modal.TRANSITION_DURATION!==void 0?Modal.TRANSITION_DURATION:300)+10);},createButtons:function(){var handler=Bootstrap.Dialog.Handler.get(this.$element);this.$footer.find(handler.selectors.buttons).remove();var buttons=this.options.dialogOptions&&this.options.dialogOptions.buttons||[];if(!Array.isArray(buttons)){var array=[];for(var k in buttons)if(typeof buttons[k]==='function')array.push({label:k,click:buttons[k]});else if(buttons[k].text||buttons[k].label){Bootstrap.warn('Malformed jQuery UI dialog button: @key. The button object should be inside an array.',{'@key':k});array.push(buttons[k]);}else Bootstrap.unsupported('button',k,buttons[k]);buttons=array;}
15if(buttons.length){var $buttons=$('<div class="modal-buttons"/>').appendTo(this.$footer);for(var i=0,l=buttons.length;i<l;i++){var button=buttons[i];var $button=$(Drupal.theme('bootstrapModalDialogButton',button));if(typeof button.create==='function')button.create.call($button[0]);if(typeof button.click==='function')$button.on('click',button.click.bind(this.$element));$buttons.append($button);}}this.$footer[this.$footer.children()[0]?'show':'hide']();},init:function(){var handler=Bootstrap.Dialog.Handler.get(this.$element);if(!this.$dialog)this.$dialog=this.$element.find(handler.selectors.dialog);this.$dialog.addClass('js-drupal-dialog');if(!this.$header)this.$header=this.$dialog.find(handler.selectors.header);if(!this.$title)this.$title=this.$dialog.find(handler.selectors.title);if(!this.$close)this.$close=this.$header.find(handler.selectors.close);if(!this.$footer)this.$footer=this.$dialog.find(handler.selectors.footer);if(!this.$content)this.$content=this.$dialog.find(handler.selectors.content);if(!this.$dialogBody)this.$dialogBody=this.$dialog.find(handler.selectors.body);if(this.options.jQueryUiBridge){this.$element.on('hide.bs.modal',Bootstrap.relayEvent(this.$element,'dialogbeforeclose',false));this.$element.on('hidden.bs.modal',Bootstrap.relayEvent(this.$element,'dialogclose',false));this.$element.on('show.bs.modal',Bootstrap.relayEvent(this.$element,'dialogcreate',false));this.$element.on('shown.bs.modal',Bootstrap.relayEvent(this.$element,'dialogopen',false));}if(!this.$footer[0])this.$footer=handler.theme('footer',{},true).insertAfter(this.$dialogBody);$.extend(true,this.options,this.mapDialogOptions(this.options));this.createButtons();this.super();if(this.options.dialogOptions&&this.options.dialogOptions.autoResize&&this.options.dialogOptions.position)this.position(this.options.dialogOptions.position);if(this.options.jQueryUiBridge&&this.options.show&&!this.isShown)this.show();},instance:function(){Bootstrap.unsupported('method','instance',arguments);},isOpen:function(){return !!this.isShown;},mapDialogOptions:function(options){var handler=Bootstrap.Dialog.Handler.get(this.$element);var mappedOptions={};var dialogOptions=options.dialogOptions||{};delete options.dialogOptions;for(var k in options)if(Modal.DEFAULTS.hasOwnProperty(k))mappedOptions[k]=options[k];else dialogOptions[k]=options[k];var cssUnitRegExp=/^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)?$/;var parseCssUnit=function(value,defaultUnit){var parts=(''+value).match(cssUnitRegExp);return parts&&parts[1]!==void 0?parts[1]+(parts[2]||defaultUnit||'px'):null;};var styles={};var cssProperties=['height','maxHeight','maxWidth','minHeight','minWidth','width'];for(var i=0,l=cssProperties.length;i<l;i++){var prop=cssProperties[i];if(dialogOptions[prop]!==void 0){var value=parseCssUnit(dialogOptions[prop]);if(value){styles[prop]=value;if(dialogOptions.autoResize&&(prop==='height'||prop==='maxHeight')){styles.display='flex';styles.flexDirection='column';this.$dialogBody.css('overflow','scroll');}}}}this.$content.css(styles);var classesMap={'ui-dialog':'modal-content','ui-dialog-titlebar':'modal-header','ui-dialog-title':'modal-title','ui-dialog-titlebar-close':'close','ui-dialog-content':'modal-body','ui-dialog-buttonpane':'modal-footer'};if(dialogOptions.dialogClass){if(dialogOptions.classes===void 0)dialogOptions.classes={};if(dialogOptions.classes['ui-dialog']===void 0)dialogOptions.classes['ui-dialog']='';var dialogClass=dialogOptions.classes['ui-dialog'].split(' ');dialogClass.push(dialogOptions.dialogClass);dialogOptions.classes['ui-dialog']=dialogClass.join(' ');delete dialogOptions.dialogClass;}for(k in classesMap)this.$element.find('.'+classesMap[k]).addClass(k);var events=['beforeClose','close','create','drag','dragStart','dragStop','focus','open','resize','resizeStart','resizeStop'];for(i=0,l=events.length;i<l;i++){var event=events[i].toLowerCase();if(dialogOptions[event]===void 0||typeof dialogOptions[event]!=='function')continue;this.$element.on('dialog'+event,dialogOptions[event]);}var title;if((dialogOptions.title===null||dialogOptions.title===void 0)&&(title=this.$element.attr('title')))dialogOptions.title=title;
15for(var name in dialogOptions){if(!dialogOptions.hasOwnProperty(name)||dialogOptions[name]===void 0)continue;switch(name){case 'appendTo':Bootstrap.unsupported('option',name,dialogOptions.appendTo);break;case 'autoOpen':mappedOptions.show=dialogOptions.show=!!dialogOptions.autoOpen;break;case 'classes':if(dialogOptions.classes)for(var key in dialogOptions.classes)if(dialogOptions.classes.hasOwnProperty(key)&&classesMap[key]!==void 0){var attributes=Attributes.create().addClass(dialogOptions.classes[key]).toPlainObject();var selector='.'+classesMap[key];this.$element.find(selector).addClass(attributes['class']);}break;case 'closeOnEscape':mappedOptions.keyboard=!!dialogOptions.closeOnEscape;if(!dialogOptions.closeOnEscape&&dialogOptions.modal)mappedOptions.backdrop='static';break;case 'closeText':Bootstrap.unsupported('option',name,dialogOptions.closeText);break;case 'draggable':this.$content.draggable({handle:handler.selectors.header,drag:Bootstrap.relayEvent(this.$element,'dialogdrag'),start:Bootstrap.relayEvent(this.$element,'dialogdragstart'),end:Bootstrap.relayEvent(this.$element,'dialogdragend')}).draggable(dialogOptions.draggable?'enable':'disable');break;case 'hide':if(dialogOptions.hide===false||dialogOptions.hide===true){this.$element[dialogOptions.hide?'addClass':'removeClass']('fade');mappedOptions.animation=dialogOptions.hide;}else Bootstrap.unsupported('option',name+' (complex animation)',dialogOptions.hide);break;case 'modal':if(!dialogOptions.closeOnEscape&&dialogOptions.modal)mappedOptions.backdrop='static';else mappedOptions.backdrop=dialogOptions.modal;if(!dialogOptions.modal&&!dialogOptions.position)this.position({my:'center',of:window});break;case 'position':this.position(dialogOptions.position);break;case 'resizable':this.$content.resizable({resize:Bootstrap.relayEvent(this.$element,'dialogresize'),start:Bootstrap.relayEvent(this.$element,'dialogresizestart'),end:Bootstrap.relayEvent(this.$element,'dialogresizeend')}).resizable(dialogOptions.resizable?'enable':'disable');break;case 'show':if(dialogOptions.show===false||dialogOptions.show===true){this.$element[dialogOptions.show?'addClass':'removeClass']('fade');mappedOptions.animation=dialogOptions.show;}else Bootstrap.unsupported('option',name+' (complex animation)',dialogOptions.show);break;case 'title':this.$title.text(dialogOptions.title);break;}}mappedOptions.dialogOptions=dialogOptions;return mappedOptions;},moveToTop:function(){Bootstrap.unsupported('method','moveToTop',arguments);},option:function(){var clone={options:{}};this.super.apply(clone,arguments);$.extend(true,this.options,this.mapDialogOptions(clone.options));this.createButtons();},position:function(position){this.$element.css({bottom:'initial',overflow:'visible',right:'initial'});this.$element.position(position);},open:function(){this.show.apply(this,arguments);},widget:function(){return this.$element;}}};};Bootstrap.extendPlugin('modal',Bootstrap.Modal.Bridge);Bootstrap.Dialog.Handler.register('dialog');Bootstrap.Dialog.Handler.register('modal');$.extend(Drupal.theme,{bootstrapModalDialogButton:function(button){var attributes=Attributes.create();var icon='';var iconPosition=button.iconPosition||'beginning';iconPosition=(iconPosition==='end'&&!rtl)||(iconPosition==='beginning'&&rtl)?'after':'before';if(button.bootstrapIcon)icon=Drupal.theme('icon','bootstrap',button.icon);else{if(button.icon){var iconAttributes=Attributes.create().addClass(['ui-icon',button.icon]).set('aria-hidden','true');icon='<span'+iconAttributes+'></span>';}}var value=button.label||button.text;if(icon&&((button.showLabel!==void 0&&!button.showLabel)||(button.text!==void 0&&!button.text)))value='<span'+Attributes.create().addClass('sr-only')+'>'+value+'</span>';attributes.set('value',iconPosition==='before'?icon+value:value+icon);attributes[button.disabled?'set':'remove']('disabled','disabled');if(button.classes)attributes.addClass(Object.keys(button.classes).map(function(key){return button.classes[key];}));if(button['class'])attributes.addClass(button['class']);if(button.primary)attributes.addClass('btn-primary');return Drupal.theme('button',attributes);}});});})(window.jQuery,window.Drupal,window.Drupal.bootstrap,window.Attributes,window.drupalSettings);;
16(function($,Drupal,once){if(once('drupal-dialog-deprecation-listener','html').length){const eventSpecial={handle($event){const $element=$($event.target);const event=$event.originalEvent;const dialog=event.dialog;const dialogArguments=[$event,dialog,$element,event?.settings];$event.handleObj.handler.apply(this,dialogArguments);}};$.event.special['dialog:beforecreate']=eventSpecial;$.event.special['dialog:aftercreate']=eventSpecial;$.event.special['dialog:beforeclose']=eventSpecial;$.event.special['dialog:afterclose']=eventSpecial;const listenDialogEvent=(event)=>{const windowEvents=$._data(window,'events');const isWindowHasDialogListener=windowEvents[event.type];if(isWindowHasDialogListener)Drupal.deprecationError({message:`jQuery event ${event.type} is deprecated in 10.3.0 and is removed from Drupal:12.0.0. See https://www.drupal.org/node/3422670`});};['dialog:beforecreate','dialog:aftercreate','dialog:beforeclose','dialog:afterclose'].forEach((e)=>window.addEventListener(e,listenDialogEvent));}})(jQuery,Drupal,once);; 17class DrupalDialogEvent extends Event{constructor(type,dialog,settings=null){super(`dialog:${type}`,{bubbles:true});this.dialog=dialog;this.settings=settings;}}(function($,Drupal,drupalSettings,bodyScrollLock){drupalSettings.dialog={autoOpen:true,dialogClass:'',buttonClass:'button',buttonPrimaryClass:'button--primary',close(event){Drupal.dialog(event.target).close();Drupal.detachBehaviors(event.target,null,'unload');}};Drupal.dialog=function(element,options){let undef;const $element=$(element);const domElement=$element.get(0);const dialog={open:false,returnValue:undef};function openDialog(settings){settings=$.extend({},drupalSettings.dialog,options,settings);const event=new DrupalDialogEvent('beforecreate',dialog,settings);domElement.dispatchEvent(event);$element.dialog(event.settings);dialog.open=true;if(settings.modal)bodyScrollLock.lock(domElement);domElement.dispatchEvent(new DrupalDialogEvent('aftercreate',dialog,settings));}function closeDialog(value){domElement.dispatchEvent(new DrupalDialogEvent('beforeclose',dialog));bodyScrollLock.clearBodyLocks();$element.dialog('close');dialog.returnValue=value;dialog.open=false;domElement.dispatchEvent(new DrupalDialogEvent('afterclose',dialog));}dialog.show=()=>{openDialog({modal:false});};dialog.showModal=()=>{openDialog({modal:true});};dialog.close=closeDialog;return dialog;};})(jQuery,Drupal,drupalSettings,bodyScrollLock);; 18(function($,Drupal,drupalSettings,debounce,displace){drupalSettings.dialog=$.extend({autoResize:true,maxHeight:'95%'},drupalSettings.dialog);function resetPosition(options){const offsets=displace.offsets;const left=offsets.left-offsets.right;const top=offsets.top-offsets.bottom;const leftString=`${(left>0?'+':'-')+Math.abs(Math.round(left/2))}px`;const topString=`${(top>0?'+':'-')+Math.abs(Math.round(top/2))}px`;options.position={my:`center${left!==0?leftString:''} center${top!==0?topString:''}`,of:window};return options;}function resetSize(event){const positionOptions=['width','height','minWidth','minHeight','maxHeight','maxWidth','position'];let adjustedOptions={};let windowHeight=$(window).height();let option;let optionValue;let adjustedValue;for(let n=0;n<positionOptions.length;n++){option=positionOptions[n];optionValue=event.data.settings[option];if(optionValue)if(typeof optionValue==='string'&&optionValue.endsWith('%')&&/height/i.test(option)){windowHeight-=displace.offsets.top+displace.offsets.bottom;adjustedValue=parseInt(0.01*parseInt(optionValue,10)*windowHeight,10);if(option==='height'&&event.data.$element.parent().outerHeight()<adjustedValue)adjustedValue='auto';adjustedOptions[option]=adjustedValue;}}if(!event.data.settings.modal)adjustedOptions=resetPosition(adjustedOptions);event.data.$element.dialog('option',adjustedOptions);event.data.$element?.get(0)?.dispatchEvent(new CustomEvent('dialogContentResize',{bubbles:true}));}window.addEventListener('dialog:aftercreate',(e)=>{const autoResize=debounce(resetSize,20);const $element=$(e.target);const {settings}=e;const eventData={settings,$element};if(settings.autoResize===true||settings.autoResize==='true'){const uiDialog=$element.dialog('option',{resizable:false,draggable:false}).dialog('widget');uiDialog[0].style.position='fixed';$(window).on('resize.dialogResize scroll.dialogResize',eventData,autoResize).trigger('resize.dialogResize');$(document).on('drupalViewportOffsetChange.dialogResize',eventData,autoResize);}});window.addEventListener('dialog:beforeclose',()=>{$(window).off('.dialogResize');$(document).off('.dialogResize');});})(jQuery,Drupal,drupalSettings,Drupal.debounce,Drupal.displace);; 19(function($,once){'use strict';var recalcularImporte=function recalcularImporte(){var descuento_aplicad
19o=0;var precio_original=parseFloat($("input[name='precio']").first().val());var moneda=$("input[name='moneda']").first().val();$("div[name='ic-div-descuento']").remove();$("input[id^='edit-descuentos-']:checked").each(function(i,el){var item=$(el);var porcentaje_item=item.data('porcentaje');descuento_aplicado+=porcentaje_item;var precio_descontado=precio_original*(porcentaje_item)/100.0;$("<div name='ic-div-descuento' class='order-total-line order-total-line__adjustment order-total-line__adjustment--promotion'> <span class='order-total-line-label'>Descuento: </span><span name='ic-descuento' class='order-total-line-value'>-"+precio_descontado.toFixed(2).replace('.',',')+" "+moneda+"</span> </div>").insertBefore("div[name='ic-div-total']");});var precio_descuento=precio_original*(100-descuento_aplicado)/100.0;$("span[name='ic-total']").text(precio_descuento.toFixed(2).replace('.',',')+" "+moneda);};var borrarMensajesPrevios=function borrarMensajesPrevios(){var elementos=$("div[name='mensaje-dinamico']");elementos.hide('slow',function(){elementos.remove();});};Drupal.behaviors.compra={attach:function(context,settings){once("edit-descuentos","input[id^='edit-descuentos-']",context).forEach((el)=>{el.addEventListener('change',(event)=>{$("input[id^='edit-descuentos-']").attr('disabled','disabled');var order_tag=$("form[id^='views-form-commerce-cart-form-default-']").first();var order_id=parseInt(order_tag.attr('id').replace('views-form-commerce-cart-form-default-',''));var descuento_maximo=100;var descuento_maximo_cursos=parseInt($("input[name='maximo_descuento_cursos']").first().val());var descuento_maximo_examenes=parseInt($("input[name='maximo_descuento_examenes']").first().val());var tipo_producto=$(this).data('tipo');if(tipo_producto=='Exámenes')descuento_maximo=descuento_maximo_examenes;else descuento_maximo=descuento_maximo_cursos;var id_descuento=parseInt($(this).data('descuento'));var porcentaje=parseInt($(this).data('porcentaje'));var id_cupon=parseInt($(this).data('cupon'));var base_url=document.location.origin;if(!this.checked)$.ajax({url:base_url+"/remove_descuento/"+order_id+"/"+id_cupon,success:function(respuesta){var resultado_op=respuesta["data"]["#result"];if(resultado_op){borrarMensajesPrevios();$("<div name='mensaje-dinamico' class='messages__wrapper'><div class='alert alert-info alert-dismissible' role='alert' aria-label='Mensaje de advertencia'> <button type='button' role='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>Ã</span></button> <p class='sr-only'>Mensaje de advertencia</p> <p>"+Drupal.t('Descuento borrado')+"</p> </div></div>").insertBefore("div[id='edit-descuentos']").hide().show('slow');recalcularImporte();}else{$("<div name='mensaje-dinamico' class='messages__wrapper'><div class='alert alert-info alert-dismissible' role='alert' aria-label='Mensaje de advertencia'> <button type='button' role='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>Ã</span></button> <p class='sr-only'>Mensaje de advertencia</p> <p>"+Drupal.t('Error: No se puede quitar el descuento')+"</p> </div></div>").insertBefore("div[id='edit-descuentos']").hide().show('slow');$("input[id='edit-descuentos-"+id_descuento+"']").prop("checked",true);}},error:function(){}});else $.ajax({url:base_url+"/descuento_actual/"+order_id,success:function(respuesta){var valor_descuento_actual=respuesta["data"]["#value"];if(valor_descuento_actual+porcentaje<=descuento_maximo)$.ajax({url:base_url+"/descuento/"+order_id+"/"+id_cupon+"/"+descuento_maximo,success:function(respuesta){var resultado_op=respuesta["data"]["#result"];if(resultado_op){borrarMensajesPrevios();$("<div name='mensaje-dinamico' class='messages__wrapper'><div class='alert alert-info alert-dismissible' role='alert' aria-label='Mensaje de advertencia'> <button type='button' role='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>Ã</span></button> <p class='sr-only'>Mensaje de advertencia</p> <p>"+Drupal.t('Descuento seleccionado')+"</p> </div></div>").insertBefore("div[id='edit-descuentos']").hide().show('slow');recalcularImporte();}else $("<div name='mensaje-dinamico' class='messages__wrapper'><div class='alert alert-info alert-dismissible' role='alert' aria-label='Mensaje de advertencia'> <button type='button' role='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>Ã</span></button> <p class='sr-only'>Mensaje de advertencia</p> <p>"+Drupal.t('Con este descuento se supera el máximo, no puede seleccionar')+"</p> </div></div>").insertBefore("div[id='edit-descuentos']").hide().show('slow');},error:function(){}});else{$("<div name='mensaje-dinamico' class='messages__wrapper'><div class='alert alert-info alert-dismissible' role='alert' aria-label='Mensaje de advertencia'> <button type='button' role='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>Ã</span></button> <p class='sr-only'>Mensaje de advertencia</p> <p>"+Drupal.t('Con este descuento se supera el máximo, no puede seleccionar')+"</p> </div></div>").insertBefore("div[id='edit-descuentos']").hide().show('slow');$("input[id='edit-descuentos-"+id_descuento+"']").prop("checked",false);}},error:function(){}});$("input[id^='edit-descuentos-']").removeAttr('disabled','disabled');});});}};})(jQuery,once);;
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.