PageSourceSearch

https://www.michaeljfox.org/sites/default/files/js/js_Tru3xp6wi47V…Ekmy1z0U-4hNJqslEo0n4GSDRyyRYPZYdD72zuEqsXj

js michaeljfox.org collected 2026-09-24 08:26:59 UTC 43,927 bytes, 18 lines download raw bytes

1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
2((Drupal,once)=>{let inertedByUs=[];const firstFocusable=(root)=>{const candidates=root.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), select, textarea, [tabindex]:not([tabindex="-1"])');return Array.from(candidates).find((el)=>el.offsetParent!==null)||null;};const closeItem=(item)=>{const link=item.querySelector('.nav-primary-link');if(!link)return;link.click();requestAnimationFrame(()=>{if(item.classList.contains('nav-primary-item_expanded'))console.error('bluefox:header — clicking .nav-primary-link did not close the open submenu. Fox nav.js may no longer toggle an open item closed; the focusout and Escape behaviour is now broken.');});};const setPageInert=(header,on)=>{if(on){inertedByUs=Array.from(document.body.children).filter((child)=>!child.contains(header)&&child.id!=='toolbar-administration');inertedByUs.forEach((child)=>{child.inert=true;});return;}inertedByUs.forEach((child)=>{child.inert=false;});inertedByUs=[];};const sync=(header,state)=>{const flyout=header.querySelector('.nav-flyout');const nav=header.querySelector('.nav');const toggle=header.querySelector('.header__menu');if(!flyout||!nav)return;const isMobile=window.getComputedStyle(flyout).position==='fixed';const isOpen=nav.classList.contains('nav_expanded');flyout.inert=isMobile&&!isOpen;setPageInert(header,isMobile&&isOpen);if(isMobile&&state.wasMobile&&isOpen!==state.wasOpen)if(isOpen)requestAnimationFrame(()=>{const target=firstFocusable(flyout);if(target)target.focus();});else{if(toggle&&header.contains(document.activeElement))toggle.focus();}state.wasMobile=isMobile;state.wasOpen=isOpen;};const init=(header)=>{const state={wasMobile:false,wasOpen:false};let queued=false;const queueSync=()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;sync(header,state);});};new MutationObserver(queueSync).observe(header,{attributes:true,attributeFilter:['class'],childList:true,subtree:true});window.addEventListener('resize',queueSync);header.addEventListener('focusout',(event)=>{const flyout=header.querySelector('.nav-flyout');if(flyout&&window.getComputedStyle(flyout).position==='fixed')return;const item=event.target.closest('.nav-primary-item');
2if(!item||!item.classList.contains('nav-primary-item_expanded')||item.contains(event.relatedTarget))return;closeItem(item);});header.addEventListener('keydown',(event)=>{if(event.key!=='Escape')return;const item=event.target.closest('.nav-primary-item');if(!item||!item.classList.contains('nav-primary-item_expanded'))return;const link=item.querySelector('.nav-primary-link');event.stopPropagation();closeItem(item);if(link)link.focus();});sync(header,state);};Drupal.behaviors.bluefoxHeaderA11y={attach(context){once('bluefox-header-a11y','.header',context).forEach(init);}};})(Drupal,once);;
3((Drupal,once)=>{Drupal.behaviors.smallPromoOverlap={attach(context){once('small-promo-overlap','.small-promo',context).forEach((promo)=>{const pill=promo.querySelector('.small-promo__pill');if(!pill)return;const next=promo.nextElementSibling;new ResizeObserver(([entry])=>{const size=entry.borderBoxSize[0].blockSize;const overlap=`${size/2}px`;promo.style.setProperty('--small-promo-overlap',overlap);if(next&&next.classList.contains('agnq-section'))next.style.setProperty('--small-promo-overlap',overlap);}).observe(pill);});}};})(Drupal,once);;
4((Drupal,once)=>{Drupal.behaviors.spotlightStorySlider={attach(context){once('spotlight-story-slider','.spotlight-story-slider',context).forEach((gallery)=>{const viewport=gallery.querySelector('.spotlight-story-slider__viewport');const slides=Array.from(gallery.querySelectorAll('.spotlight-story-slider-item'));const status=gallery.querySelector('.spotlight-story-slider__status');if(!viewport||slides.length<2)return;const smooth=!window.matchMedia('(prefers-reduced-motion: reduce)').matches;let index=0;const setActive=(focusDirection)=>{slides.forEach((slide,i)=>{const inactive=i!==index;slide.inert=inactive;if(inactive)slide.setAttribute('aria-hidden','true');else slide.removeAttribute('aria-hidden');const prev=slide.querySelector('[data-spotlight-story-slider-nav="prev"]');const next=slide.querySelector('[data-spotlight-story-slider-nav="next"]');if(prev)prev.disabled=index===0;if(next)next.disabled=index===slides.length-1;});if(status)status.textContent=Drupal.t('Slide @n of @total',{'@n':index+1,'@total':slides.length});if(focusDirection){const slide=slides[index];const wanted=slide.querySelector(`[data-spotlight-story-slider-nav="${focusDirection}"]`);const target=wanted&&!wanted.disabled?wanted:slide.querySelector('[data-spotlight-story-slider-nav]:not([disabled])');if(target)target.focus({preventScroll:true});}};const goTo=(target,focusDirection)=>{const next=Math.max(0,Math.min(target,slides.length-1));
4if(next!==index){index=next;viewport.scrollTo({left:slides[index].offsetLeft,behavior:smooth?'smooth':'auto'});}setActive(focusDirection);};slides.forEach((slide)=>{const prev=slide.querySelector('[data-spotlight-story-slider-nav="prev"]');const next=slide.querySelector('[data-spotlight-story-slider-nav="next"]');if(prev)prev.addEventListener('click',()=>{goTo(index-1,'prev');});if(next)next.addEventListener('click',()=>{goTo(index+1,'next');});});let settle;viewport.addEventListener('scroll',()=>{clearTimeout(settle);settle=setTimeout(()=>{const center=viewport.scrollLeft+viewport.clientWidth/2;const nearest=slides.reduce((best,slide,i)=>{const offset=Math.abs(slide.offsetLeft+slide.offsetWidth/2-center);const bestOffset=Math.abs(slides[best].offsetLeft+slides[best].offsetWidth/2-center);return offset<bestOffset?i:best;},0);if(nearest!==index){index=nearest;setActive(null);}},120);},{passive:true});let resize;window.addEventListener('resize',()=>{clearTimeout(resize);resize=setTimeout(()=>{viewport.scrollTo({left:slides[index].offsetLeft,behavior:'auto'});},150);},{passive:true});setActive(null);});}};})(Drupal,once);;
5(function(Drupal,drupalSettings){Drupal.behaviors.activeLinks={attach(context){const path=drupalSettings.path;const queryString=JSON.stringify(path.currentQuery);const querySelector=queryString?`[data-drupal-link-query="${CSS.escape(queryString)}"]`:':not([data-drupal-link-query])';const originalSelectors=[`[data-drupal-link-system-path="${CSS.escape(path.currentPath)}"]`];let selectors;if(path.isFront)originalSelectors.push('[data-drupal-link-system-path="<front>"]');selectors=[].concat(originalSelectors.map((selector)=>`${selector}:not([data-drupal-language]):not([hreflang])`),originalSelectors.map((selector)=>`li${selector}[data-drupal-language="${path.currentLanguage}"]`),originalSelectors.map((selector)=>`a${selector}[hreflang="${path.currentLanguage}"]`));selectors=selectors.map((current)=>current+querySelector);context.querySelectorAll(selectors.join(',')).forEach((activeLink)=>{activeLink.classList.add('is-active');activeLink.setAttribute('aria-current','page');});},detach(context,settings,trigger){if(trigger==='unload')context.querySelectorAll('[data-drupal-link-system-path].is-active').forEach((activeLink)=>{activeLink.classList.remove('is-active');activeLink.removeAttribute('aria-current');});}};})(Drupal,drupalSettings);;
6(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">&nbsp;</div>'+'<div class="progress__track"><div class="progress__bar"></div></div>'+'<div class="progress__percentage"></div>'+'<div class="progress__description">&nbsp;</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}%`);}$('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);if(this.uri){const pb=this;let uri=this.uri;if(!uri.includes('?'))uri+='?';else uri+='&';uri+='_format=json';$.ajax({type:this.method,url:uri,data:'',dataType:'json',success(progress){if(progress.status===0){pb.displayError(progress.data);return;}pb.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);;
7/* @license MIT https://raw.githubusercontent.com/muicss/loadjs/4.3.0/LICENSE.txt */
8loadjs=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}
8function 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;for(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}();;
9/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
10Drupal.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);return result;};};;
11(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';}if(text.length){liveElement.innerHTML='';liveElement.setAttribute('aria-busy','true');liveElement.setAttribute('aria-live',priority);liveElement.innerHTML=text.join('\n');liveElement.setAttribute('aria-busy','false');}}Drupal.announce=function(text,priority){announcements.push({text,priority});return debounce(announce,200)();};})(Drupal,Drupal.debounce);;
12((Drupal)=>{Drupal.Message=class{constructor(messageWrapper=null){if(!messageWrapper)this.messageWrapper=Drupal.Message.defaultWrapper();else this.messageWrapper=messageWrapper;}static defaultWrapper(){let wrapper=document.querySelector('[data-drupal-messages]')||document.querySelector('[data-drupal-messages-fallback]');if(!wrapper){wrapper=document.createElement('div');document.body.appendChild(wrapper);}if(wrapper.hasAttribute('data-drupal-messages-fallback')){wrapper.removeAttribute('data-drupal-messages-fallback');wrapper.classList.remove('hidden');}wrapper.setAttribute('data-drupal-messages','');return wrapper.innerHTML===''?Drupal.Message.messageInternalWrapper(wrapper):wrapper.firstElementChild;}static getMessageTypeLabels(){return {status:Drupal.t('Status message'),error:Drupal.t('Error message'),warning:Drupal.t('Warning message')};}add(message,options={}){if(!options.hasOwnProperty('type'))options.type='status';if(typeof message!=='string')throw new Error('Message must be a string.');Drupal.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().`);}this.messageWrapper.appendChild(Drupal.theme('message',{text:message},options));return options.id;}select(id){return this.messageWrapper.querySelector(`[data-drupal-message-id^="${id}"]`);}remove(id){return this.messageWrapper.removeChild(this.select(id));}clear(){this.messageWrapper.querySelectorAll('[data-drupal-message-id]').forEach((message)=>{this.messageWrapper.removeChild(message);});}static announce(message,options){if(!options.priority&&(options.type==='warning'||options.type==='error'))options.priority='assertive';if(options.announce!=='')Drupal.announce(options.announce||message,options.priority);}static messageInternalWrapper(messageWrapper){const innerWrapper=document.createElement('div');innerWrapper.setAttribute('class','messages__wrapper');messageWrapper.insertAdjacentElement('afterbegin',innerWrapper);return innerWrapper;}};Drupal.theme.message=({text},{type,id})=>
12{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);;
13(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}`;once('drupal-ajax',$(elementSettings.selector)).forEach((el)=>{elementSettings.element=el;elementSettings.base=base;Drupal.ajax(elementSettings);});}Object.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('HTTP Result Code: !status',{'!status':xmlhttp.status})}`;else statusCode=`\n${Drupal.t('An AJAX HTTP request terminated abnormally.')}`;statusCode+=`\n${Drupal.t('Debugging information follows.')}`;const pathText=`\n${Drupal.t('Path: !uri',{'!uri':uri})}`;statusText='';try{statusText=`\n${Drupal.t('StatusText: !statusText',{'!statusText':xmlhttp.statusText.trim()})}`;}catch(e){}responseText='';try{responseText=`\n${Drupal.t('ResponseText: !responseText',{'!responseText':xmlhttp.responseText.trim()})}`;}catch(e){}responseText=responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi,'');responseText=responseText.replace(/[\n]+\s+/g,'\n');const readyStateText=xmlhttp.status===0?`\n${Drupal.t('ReadyState: !readyState',{'!readyState':xmlhttp.readyState})}`:'';customMessage=customMessage?`\n${Drupal.t('CustomMessage: !customMessage',{'!customMessage':customMessage})}`:'';this.message=statusCode+pathText+statusText+customMessage+responseText+readyStateText;this.name='AjaxError';if(!Drupal.AjaxError.messages)Drupal.AjaxError.messages=new Drupal.Message();Drupal.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');const base=settings.base||false;const element=settings.element||false;delete settings.base;delete settings.element;if(!settings.progress&&!element)settings.progress=false;const 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';}const httpMethod=$linkElement.data('ajax-http-method');if(httpMethod)elementSettings.httpMethod=httpMethod;Drupal.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}`;this.element=element;this.preCommandsFocusedElementSelector=null;this.elementSettings=elementSettings;if(this.element?.form)this.$form=$(this.element.form);if(!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');}}const originalUrl=this.url;this.url=this.url.replace(/\/nojs(\/|$|\?|#)/,'/ajax$1');if(drupalSettings.ajaxTrustedUrl.hasOwnProperty(originalUrl))drupalSettings.ajaxTrustedUrl[this.url]=true;const 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);if(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);}return (Promise.resolve(ajax.success(response,status)).then(()=>{ajax.ajaxing=false;
13$(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;if(!ajax.options.url.includes('?'))ajax.options.url+='?';else ajax.options.url+='&';let wrapper=`drupal_${elementSettings.dialogType||'ajax'}`;if(elementSettings.dialogRenderer)wrapper+=`.${elementSettings.dialogRenderer}`;ajax.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}));return ajax.eventResponse(this,event);});if(elementSettings.keypress)$(ajax.element).on('keypress',function(event){return ajax.keypressResponse(this,event);});if(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;try{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;try{if(ajax.$form){if(ajax.setClick)element.form.clk=element;ajax.$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');}options.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;}$(this.element).prop('disabled',true);if(!this.progress||!this.progress.type)return;const progressIndicatorMethod=`setProgressIndicator${this.progress.type.slice(0,1).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">&nbsp;</div>';return `<div class="ajax-progress ajax-progress-throbber">${throbber}${messageMarkup}</div>`;};Drupal.theme.ajaxProgressIndicatorFullscreen=()=>'<div class="ajax-progress ajax-progress-fullscreen">&nbsp;</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
13d}`,$.noop,this.progress.method,$.noop);if(this.progress.message)progressBar.setProgress(-1,this.progress.message);if(this.progress.url)progressBar.startMonitoring(this.progress.url,this.progress.interval||1500);this.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();if(this.progress.object)this.progress.object.stopMonitoring();$(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}"]`);if(!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('data-drupal-selector')}"]`);}}if(target)$(target).trigger('focus');}if(this.$form&&document.body.contains(this.$form.get(0))){const settings=this.settings||drupalSettings;Drupal.attachBehaviors(this.$form.get(0),settings);}this.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;}return effect;};Drupal.Ajax.prototype.error=function(xmlhttprequest,uri,customMessage){if(this.progress.element)$(this.progress.element).remove();if(this.progress.object)this.progress.object.stopMonitoring();$(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);}throw 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));
13$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;}$wrapper[method]($newContent);if(effect.showEffect!=='show')$newContent.hide();const $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);}$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('Changed')}">*</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];}});if(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;}}}if(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]);});}});return 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();messages.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;}});return 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);;
14(function(Drupal){Drupal.theme.ajaxProgressBar=function($element){return $element.addClass('ajax-progress ajax-progress-bar');};})(Drupal);;
15(function(Drupal){Drupal.AjaxCommands.prototype.gtagEvent=function(ajax,response){gtag('event',response.event_name,response.data);};})(Drupal);;
16(function($,Drupal,window,document,once){const cookies={get:function(name){const escapedName=name.replace(/[.*+?^${}()|[\]\\]/g,'\\$&');const match=document.cookie.match(new RegExp(`(?:^|; )${escapedName}=([^;]*)`));return match?decodeURIComponent(match[1]):undefined;},set:function(name,value){document.cookie=`${name}=${encodeURIComponent(value)}; path=/`;},remove:function(name){document.cookie=`${name}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`;}};Drupal.behaviors.mjffLibraryModal={attach:function(context,settings){$(context).ready(function(){const nli_nid=cookies.get('nli_nid');if(typeof nli_nid!=='undefined'){bookmarkAjaxActionAddafterLogin(nli_nid,0);cookies.remove('nli_nid');}});$(once('mjff-library-modal-once',context===document?'html':context)).on('click',function(event){const menutargetDiv=$('.view-library-options',context);const menuButtontargetDiv=$('.library-button-top',context);const mobileMenuButtontargetDiv=$('.library-button-top-mobile',context);if(!menutargetDiv.is(event.target)&&menutargetDiv.has(event.target).length===0&&!menuButtontargetDiv.is(event.target)&&menuButtontargetDiv.has(event.target).length===0&&!mobileMenuButtontargetDiv.is(event.target)&&mobileMenuButtontargetDiv.has(event.target).length===0&&menutargetDiv.is(':visible'))menuButtontargetDiv.trigger('click');});const registrationField=$('#user-register-form #field_connection_to_disease',context);if(registrationField.length>0)registrationField.val('_none');const userField=$('#user-form #field_connection_to_disease',context);if(userField.length>0){const dropDownSpandiv=userField.closest('.dropdown').find('.dropdown-trigger span');if(dropDownSpandiv.length){const placeholder=dropDownSpandiv.text().trim();if(placeholder!=='Make a Selection'&&placeholder!=='')userField.val(placeholder);else userField.val('_none');}}if(context==document){$(once('bookmark-article',context===document?'html':context)).on('click','.add-bookmark',function(e){e.preventDefault();const $this=$(this);const {type,action,folderid,bookmarkid}=$this.data();if($this.prop('disabled'))return;$this.prop('disabled',true);if(action==="create-bookmark")bookmarkAjaxActionAdd(bookmarkid,folderid,$this);else bookmarkAjaxActionRemoveWhileAdd(bookmarkid,$this);});$(once('bookmark-article-non-loggedin',context===document?'html':context)).on('click','.non-loggedin-add-bookmark',function(e){const $this=$(this);let nid=$this.attr('data-bookmarkid');cookies.set('nli_nid',nid);});}
16function bookmarkAjaxActionAddafterLogin(bid,fid){bid=String(bid??'').trim();fid=String(fid??'').trim();const url=`/bookmark/add/${bid}/${fid}`;const $this=$('[data-bookmarkid="'+bid+'"]');const loginButton=$('body .btn-login',context);if(document.referrer==="https://mjff.us.auth0.com/"&&!loginButton.length)$.ajax({url,type:'GET',success:function(data){if(typeof $this!=='undefined')if(String(data.status??'').trim()==='success'){addButtonTextChange($this,'saved');updateStickybutton($this,'saved');}},error:function(){alert('Error occurred while performing the action');}});}function bookmarkAjaxActionAdd(bid,fid,$popObj){bid=String(bid??'').trim();fid=String(fid??'').trim();const url=`/bookmark/add/${bid}/${fid}`;$.ajax({url,type:'GET',success:function(data){if(String(data.status??'').trim()==='success'){addButtonTextChange($popObj,'saved');updateStickybutton($popObj,'saved');$popObj.prop('disabled',false);}else{alert('Something went wrong.');$popObj.prop('disabled',false);}},error:function(){alert('Error occurred while performing the action');}});}function bookmarkAjaxActionRemoveWhileAdd(id,$popObj){const url=`/bookmark/remove/${id}/content_id`;$.ajax({url,type:'GET',success:function(data){if(String(data.status??'').trim()==='success'){addButtonTextChange($popObj,'notsaved');updateStickybutton($popObj,'notsaved');$popObj.prop('disabled',false);}else{alert('Something went wrong.');$popObj.prop('disabled',false);}},error:function(){alert('Error occurred while performing the action');}});}function updateStickybutton($popObj,type){if($popObj.closest('.hero-content').length){const stickyNavAddbookmark=$('.stickyNav').find('.bookmark-article');if(stickyNavAddbookmark.length)addButtonTextChange(stickyNavAddbookmark,type);}if($popObj.closest('.stickyNav').length){const titleAddbookmark=$('.hero-content').find('.bookmark-article');if(titleAddbookmark.length)addButtonTextChange(titleAddbookmark,type);}}function addButtonTextChange($popObj,type){const $textNode=$popObj.contents().filter(function(){return this.nodeType===3;});if(type==='saved'){if($textNode.length>0)$textNode.each(function(index){if(this.textContent.trim()!=='')$textNode[index].nodeValue='Saved';});$popObj.data('action','delete');$popObj.find('svg').attr('class','icon icon_check-mark icon_13 icon_16Lg icon_fillOrange3');$popObj.find('use').attr('xlink:href','/themes/custom/fox/assets/icons/sprites/icons.svg#check-mark');}else{if($textNode.length>0)$textNode.each(function(index){if(this.textContent.trim()!=='')$textNode[index].nodeValue='Save for later';});$popObj.data('action','create-bookmark');$popObj.find('svg').attr('class','icon icon_bookmarks icon_13 icon_16Lg');$popObj.find('use').attr('xlink:href','/themes/custom/fox/assets/icons/sprites/icons.svg#bookmarks');}}}};})(jQuery,Drupal,window,document,once);;
17(function($){Drupal.behaviors.MJFFScientificPublicationsCommon={attach(context){const tabsLi=$('.tabs_borderless .tabs-item',context);if(tabsLi.length>0)$.each(tabsLi,function(index,element){const tabData=element.getAttribute('data-tab-id');if(tabData==='clinician-articles')$(element).find('button').trigger('click');});}};})(jQuery);;
18(function(){const cookieName='mjff_tracking';const cookies={get:function(name){const escapedName=name.replace(/[.*+?^${}()|[\]\\]/g,'\\$&');const match=document.cookie.match(new RegExp(`(?:^|; )${escapedName}=([^;]*)`));return match?decodeURIComponent(match[1]):undefined;}};function setCookie(cookieData){const date=new Date();const cookieDurationInDays=30;date.setTime(date.getTime()+cookieDurationInDays*24*60*60*1000);const expires=`; expires=${date.toUTCString()}`;document.cookie=`${cookieName}=${JSON.stringify(cookieData)||''}${expires}; path=/`;}function getTrackingParameter(fallback){let fallbackParam=null;if(fallback&&fallback.param)fallbackParam=fallback.param;const urlParams=new URLSearchParams(window.location.search);const paramsIn=['os_cid','ps_cid','em_cid','smcid','ad_cid','cn_cid','pn_cid','om_cid','er_cid','o_cid'];let paramInUrlName=null;let paramInUrlValue=null;paramsIn.every((paramIn)=>{paramInUrlName=paramIn;paramInUrlValue=urlParams.get(paramIn);return !paramInUrlName||!paramInUrlValue;});if(!paramInUrlName||!paramInUrlValue)return fallbackParam;return paramInUrlName;}
18function getValueFromUrlParameter(parameter){const urlParams=new URLSearchParams(window.location.search);return urlParams.get(parameter);}window.addEventListener('DOMContentLoaded',()=>{const paramIn=getTrackingParameter(null);const paramValue=getValueFromUrlParameter(paramIn);if(!paramIn||!paramValue)return;const cookieData={param:paramIn,value:paramValue};setCookie(cookieData);});const isExternalLink=(url)=>{const tmp=document.createElement('a');tmp.href=url;return tmp.host!==window.location.host;};function applies(href,paramIn){if(!href.includes('/donate')&&!isExternalLink(href))return false;if(href.slice(0,7)==='/donate')href=window.location.host+href;const urlModifiers={evidation:{appliesTo:['ppmi.study.myachievement.com'],paramOut:'mjff'},rallyBound:{appliesTo:['topgolf.michaeljfox.org','fundraise.michaeljfox.org','runwalk.michaeljfox.org','tourdefox.michaeljfox.org'],paramOut:null},classy:{appliesTo:['www.michaeljfox.org','give.michaeljfox.org','www.classy.org','staging.michaeljfox.org','dev.michaeljfox.org','mjff.lndo.site','michaeljfox.ddev.site','tugboatqa.com'],paramOut:'c_src'}};let matchingUrl=null;let paramOut=null;Object.keys(urlModifiers).every((urlModifierKey)=>{const urlModifier=urlModifiers[urlModifierKey];const {appliesTo}=urlModifier;appliesTo.every((url)=>{if(href.includes(url))matchingUrl=url;return !matchingUrl;});if(!matchingUrl)return true;paramOut=urlModifier.paramOut?urlModifier.paramOut:paramIn;});return paramOut;}document.addEventListener('mousedown',(e)=>{if(![0,1].includes(e.button))return;const origin=e.target.closest('a');let cookieData=null;if(!origin)return;try{cookieData=JSON.parse(cookies.get(cookieName));}catch(er){}if(origin.getAttribute('data-tracking-altered'))return;const {href}=origin;const paramIn=getTrackingParameter(cookieData);if(!paramIn)return;const paramOut=applies(href,paramIn);const valueFromUrlParameter=getValueFromUrlParameter(paramIn);const value=valueFromUrlParameter||cookieData.value;if(!value||!paramOut)return;const appendSymbol=origin.href.indexOf('?')===-1?'?':'&';origin.setAttribute('data-tracking-altered',1);origin.href=`${href}${appendSymbol}${paramOut}=${value}`;});})();;

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.