PageSourceSearch

https://www.santepubliquefrance.fr/sites/default/files/js/js_y6SIl…-bfFJ-G951fe6chGBSX6dMeyqm_pBy_LHpW2L56XqDA

js santepubliquefrance.fr collected 2026-09-24 08:36:46 UTC 30,889 bytes, 3 lines download raw bytes

1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
2(function(Drupal,once){'use strict';function initializePiano(settings){if(!window.pa){setTimeout(()=>initializePiano(settings),100);return;}const paConfigurations={};if(settings.site)paConfigurations.site=settings.site;if(settings.collect_domain)paConfigurations.collectDomain=settings.collect_domain;try{window.pa.setConfigurations(paConfigurations);}catch(e){console.error('Error configuring Piano Analytics:',e);}}Drupal.behaviors.pianoAnalyticsInit={attach:function(context,settings){once('spf_piano_analytics_init','html',context).forEach(()=>{if(settings.pianoanalytics&&window.pa.consent.getMode()!=='opt-out')initializePiano(settings.pianoanalytics);});}};})(Drupal,once);;
3(function(Drupal,once,drupalSettings){'use strict';Drupal.behaviors.pianoAnalytics={attach:function(context,settings){const siteEnv=drupalSettings.pianoanalytics.site_env;const isOptOut=window?.pa?.consent.getMode()==='opt-out';once('spf_piano_analytics_tac_accept_all','html',context).forEach(()=>{document.addEventListener('click',function(event){const target=event.target;const acceptButton=target.closest('.tarteaucitronAllow');if(acceptButton){if(!window?.pa?.consent){if(siteEnv!=='production')console.warn('Piano Analytics consent API not available');return;}if(window.pa.consent.setAllPurposes){window.pa.consent.setAllPurposes('opt-in');window.location.reload();}}});});once('spf_piano_analytics_tagging','.pa-btn-opt-out',context).forEach((optOutElement)=>{optOutElement.setAttribute('role','checkbox');if(!isOptOut){optOutElement.classList.add('is-active');optOutElement.setAttribute('aria-checked','true');}optOutElement.addEventListener('click',function(e){e.preventDefault();if(!isDefined(window.pa))return;optOutElement.classList.toggle('is-active');optOutElement.toggleAttribute('aria-checked');if(!isOptOut)window.pa.consent.setAllPurposes('opt-out');else window.pa.consent.setAllPurposes('opt-in');window.location.reload();});});if(document.body.classList.contains('user-logged-in')||(isOptOut))return;const PA_EVENT_TYPE={CLICK:"click.action",SCROLL:"page.scroll",DISPLAY:"page.display"};const thresholds=[25,50,75];let reached=[];const mark=(e)=>{};function $(queryString=''){if(!queryString)return;const element=document.querySelector(queryString);return (element)?element:null;}function isDefined(o){const isNullOrUndefined=["Null","Undefined"].some((udefString)=>Object.prototype.toString.call(o).indexOf(udefString)>=0);return !isNullOrUndefined;}function isEmptyString(o){if(!isString(o))throw new Error('Invalid type for isEmptyString: expected string, got '+typeof o+'.');return o.length<=0;}function isObject(o){return strContains(Object.prototype.toString.call(o),'object');}function isString(o){return strContains(Object.prototype.toString.call(o),'string');}function isFunction(o){return strContains(Object.prototype.toString.call(o),'function');}function isEmptyObject(o){if(!isObject(o))throw new Error('Invalid type for isEmptyObject: expected object, got '+typeof o+'.');return Object.keys(o).length<=0;}function findFirstParentWithTitle(element,recurseCount=0,found=false){if(!isDefined(element))return null;const MAX_RECURSION=3;if(found)return element;if(recurseCount>MAX_RECURSION)return null;const parentElement=element.parentElement;const _found=['h1','h2','h3','h4','h5','h6'].some((titleTag)=>isDefined(parentElement?.querySelector(titleTag)));return findFirstParentWithTitle(parentElement,++recurseCount,_found);}function findFirstTitleElementInBlock(block){if(!isDefined(block))return null;const MAX_TITLE_LEVEL=6;let titleLevel=1;let titleElement=null;let found=false;while(!found&&titleLevel<=MAX_TITLE_LEVEL){titleElement=block.querySelector(`h${titleLevel}`);found=isDefined(titleElement);titleLevel++;}return isDefined(titleElement)?titleElement:null;}function parseFormItem(formItem){return [formItem.querySelector('label'),formItem.querySelector('input')];}function getFormItemLabel(formItem){const [labelElement]=parseFormItem(formItem);return labelElement.innerText.replace(/\s*\([^)]*\)\s*/g,'').trim();}function isFormItemChecked(formItem){const [_,inputElement]=parseFormItem(formItem);return inputElement?.checked;}function strContains(str,substr,caseSensitive=false){return (!caseSensitive)?str.toLocaleLowerCase().indexOf(substr.toLocaleLowerCase())!==-1:str.indexOf(substr)!==-1;}function lastItemStrSplit(string,fieldSeparator){const split=string.split(fieldSeparator);return split[split.length-1]??'';}function firstItemStrSplit(string,fieldSeparator){const split=string.split(fieldSeparator);return split[0]??'';}function getDOMElementsForPianoEntry(pianoEntry){if(pianoEntry.cssSelectors.indexOf("")===0)return [];return document.querySelectorAll(pianoEntry.cssSelectors.join());}function preparePianoEntryEvent(pianoEntry){const canPrepareEntryEvent=(isValidPianoEntryObject(pianoEntry))||(pianoEntry.autoPrepare===false);
3if(!canPrepareEntryEvent)return;if(isFunction(pianoEntry.customPrepareEntryEvent))return pianoEntry.customPrepareEntryEvent(pianoEntry);const elements=getDOMElementsForPianoEntry(pianoEntry);elements.forEach((element)=>{mark(element);switch(pianoEntry.type){case PA_EVENT_TYPE.CLICK:prepareClickEvent(element,pianoEntry);break;case PA_EVENT_TYPE.SCROLL:prepareScrollEvent(pianoEntry);break;case PA_EVENT_TYPE.DISPLAY:prepareDisplayEvent(pianoEntry);break;default:break;}});}function prepareClickEvent(element,pianoEntry){element.addEventListener('click',function(clickEvent){const entryPayload=pianoEntry.createPayload(pianoEntry,element,clickEvent);if(!isDefined(entryPayload))return;sendPianoEvent(pianoEntry,entryPayload);});}function prepareScrollEvent(pianoEntry){window.addEventListener('scroll',function(scrollEvent){const payload=pianoEntry.onScrollEvent(pianoEntry,scrollEvent);if(!!payload)sendPianoEvent(pianoEntry,payload);});}function prepareDisplayEvent(pianoEntry){const entryPayload=pianoEntry.createPayload(pianoEntry);if(!isDefined(entryPayload))return;sendPianoEvent(pianoEntry,entryPayload);}function isValidPianoEntryObject(pianoEntryObject){const missingFields=[];const requiredFields=['name','type','cssSelectors','createPayload','autoPrepare'];const allRequiredFieldsExist=requiredFields.every((field)=>{if(field in pianoEntryObject)return true;missingFields.push(field);return false;});if(allRequiredFieldsExist)return true;console.warn(`[Piano Event::ignored] Entry Object is not valid for "${pianoEntryObject.name}". Missings fields: `+missingFields.join(',')+'.');return false;}function sendPianoEvent(entry,entryPayload){const fullPayload=getFullEventPayload(entry,entryPayload);const promiseSendEvent=new Promise((resolve,reject)=>{try{window?.pa.sendEvent(entry.type,fullPayload);resolve();}catch(e){reject(e);}});if(siteEnv!=='production')promiseSendEvent.then(()=>console.info(`[Piano Event] ${entry.name}`,JSON.stringify(fullPayload))).catch((e)=>console.error(`Error: [Piano Event]: While sending event ${entry.name}`,e));}function getFullEventPayload(entry,entryPayload={}){return ({...getPianoEventCommonPayload(entry),...entryPayload});}function getPianoEventCommonPayload(entry){return {page_url:window.location.pathname,site_env:siteEnv,...(entry.type!==PA_EVENT_TYPE.DISPLAY&&{click:entry.name})};}function findPianoEntryByName(entryName){return pianoEntries.find((entry)=>entry.name===entryName)??null;}function getPageType(){let pageType='other';const targets={error:'.path-_04',home:'.page-node-type-homepage',hub_region:'.page-hub--regions',hub_theme:'.page-hub--themes',list_job:'.page-list--job-offers',list_news:'.page-list--news',list_press:'.page-list--press-releases',list_projects:'.page-list--call-for-projects',search:'.path-recherche',single_job:'.page-node-type-job-offer',single_news:'.page-article--news',single_notice:'.notice__content',single_press:'.page-node-type-press-release',tab_theme:'[data-piano-theme] .hub-tab--container',tab_region:'[data-piano-region] .hub-tab--container'};for(const [key,selector] of Object.entries(targets))if(document.querySelector(selector))pageType=key;return pageType;}function getUrlChapters(){const {pathname}=window.location;const parts=pathname.split('/').filter(Boolean).filter((part)=>part!=='en');const result={};parts.forEach((part,index)=>{result[`page_chapter${index+1}`]=part;});return result;}function getTrimText(el){if(!el)return '';const target=el.querySelector('[data-piano-tag-title]');if(target)return target.textContent.trim();if(getComputedStyle(el).display==='none')return '';if('INPUT'===el.tagName)return el.value.trim();if(el.hasAttribute('data-piano-tag-title'))return el.textContent.trim();let text='';el.childNodes.forEach((child)=>{if(child.classList&&child.hasAttribute('data-piano-ignore'))return;if(child.nodeType===Node.TEXT_NODE)text+=child.textContent;else{if(child.nodeType===Node.ELEMENT_NODE)text+=getTrimText(child);}});return text.replace(/\s*\n\s*/g,' ').trim();}function getSearchFilters(container,formItemSelector,filterName){if(!container)return;const fieldsetsWrapper=container.querySelector('.form-fieldset');const formItems=Array.from(fieldsetsWrapper.querySelectorAll(`${formItemSelector}`)).filter(isFormItemChecked).map(getFormItemLabel).filter((val,idx,arr)=>arr.indexOf(val)===idx);if(formItems.length===0)return null;return {[filterName]:formItems};}function getFilterThemeOrRegionName(){let themeOrRegionName='';if(document.body.dataset.pianoTheme)themeOrRegionName={'filter_themes':[document.body.dataset.pianoTheme]};else{if(document.body.dataset.pianoRegion)themeOrRegionName={'filter_regions':[document.body.dataset.pianoRegion]};}return themeOrRegionName;}function getPianoTerms(){const pageHeader=document.getElementById('SPF-header');if(!pageHeader)return;const terms={};const thematics=JSON.parse(pageHeader.dataset.pianoThematics||'[]');if(thematics.length)terms.thematic_name=thematics;const regions=JSON.parse(pageHeader.dataset.pianoRegions||'[]');if(regions.length)terms.region_name=regions;const documentTypes=JSON.parse(pageHeader.dataset.pianoDocumentTypes||'[]');if(documentTypes.length)terms.document_type=documentTypes;return terms;}const pianoEntries=[{name:'Page courante',type:PA_EVENT_TYPE.DISPLAY,autoPrepare:true,cssSelectors:['.SPF--body'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){const pageTitle=document.querySelector('h1');const searchSpan=pageTitle.querySelector('.search-page__body__results');return {page:searchSpan?pageTitle.textContent.replace(searchSpan?.textContent||'','').trim():getTrimText(pageTitle),page_type:getPageType(),langue_env_1:document.documentElement.lang,...getUrlChapters(),...getPianoTerms()};}},{name:'Header - Documents de prévention',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.pa-header-cta-prevention'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){return {};}},{name:'Header - Odissé',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.pa-header-cta-odisse'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){return {};}}
3,{name:'Header - Espace presse',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.pa-header-espace-presse'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){return {};}},{name:'Header - Portail documentaire',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.pa-header-portail-doc'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){return {};}},{name:'Header - Contenu accessible',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.pa-header-contenu-accessible'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){return {};}},{name:'Header - Français',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.language-link[hreflang="fr"]'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){return {};}},{name:'Header - English',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.language-link[hreflang="en"]'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){return {};}},{name:'Menu Principal - Niveau 1',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.menu--main .nav-level-0 > .nav-item > a'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){return {'menu_title':firstItemStrSplit(targetElement.innerText,'\n')};}},{name:'Menu Principal - Niveau 2',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.menu-letter > .menu-item > .menu_link_content > a','.menu-level-1 > .menu-item > a'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){const menu_parent=targetElement.closest('.nav-item');return {'menu_title':getTrimText(menu_parent.querySelector('.nav-link')),'submenu_title':firstItemStrSplit(targetElement.innerText,'\n')};}},{name:'Menu Principal - Niveau 3',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.menu-letter > .menu-item > ul a','.menu-level-2 > .menu-item > a'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){const menu_parent=targetElement.closest('.nav-item');const submenu_parent=targetElement.closest('.menu-item');return {'menu_title':getTrimText(menu_parent.querySelector('.nav-link')),'submenu_title':getTrimText(submenu_parent.querySelector('.menu_link_content > a')),'submenu_title2':firstItemStrSplit(targetElement.innerText,'\n')};}},{name:'Footer - Services',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.pa-footer-services-link'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){const serviceName=targetElement.querySelector('[class*="service-name"]')?.innerText;return {'service_name':serviceName.trim().replaceAll('\n','')};}},{name:'Footer - Réseaux sociaux',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.menu--reseaux-sociaux a:not(.pa-footer-cta-newsletter)'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){return {'social_media':targetElement.innerText};}},{name:'Footer - Newsletter',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.pa-footer-cta-newsletter'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){return {};}},{name:'Hub région - Click - Push mini header',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['[data-piano-region] .push-mini'],customPrepareEntryEvent:null,createPayload:function(thisEntry,pushMiniElement,clickEvent){if(!isDefined(pushMiniElement))return null;return {'region_title':document.body.dataset.pianoRegion,'push_title':pushMiniElement.dataset.pianoPushTitle};}},{name:'Hub - Région Onglets',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['[data-piano-region] .tabs__list > .tab'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){return {'tab_title':getTrimText(targetElement),'region_name':[document.body.dataset.pianoRegion]};}},{name:'Hub - Thématique Onglets',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['[data-piano-theme] .tabs__list > .tab .tab__link'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){return {'tab_title':getTrimText(targetElement),'thematic_name':[document.body.dataset.pianoTheme]};}},{name:'Hub - Accueil du dossier - Flèche Rose',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.hub__page-content .see-more__link'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){const replaceClass={'brief':'En bref','health':'Enjeux de santé','disease':'Maladie','action':'Notre action','data':'Données','tools':'Outils de com','publications':'Publications'};const clickedItem=targetElement.closest('article').className.replace('summary--','');return {'tab_title':replaceClass[clickedItem]||clickedItem};}},{name:'Hub thématique - Click - Push mini header',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['[data-
3piano-theme] .push-mini'],customPrepareEntryEvent:null,createPayload:function(thisEntry,pushMiniElement,clickEvent){if(!isDefined(pushMiniElement))return null;return {'theme_title':document.body.dataset.pianoTheme,'push_title':pushMiniElement.dataset.pianoPushTitle};}},{name:'Onglet - Filtres - Types de publications',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.SPF--tab-list form'],customPrepareEntryEvent:function(thisEntry){const form=$(thisEntry.cssSelectors[0]);mark(form);if(!isDefined(form))return;form.addEventListener('submit',function(submitEvent){const fieldsetTheme=$('#edit-publications--wrapper');const payload=thisEntry.createPayload(thisEntry,fieldsetTheme,submitEvent);if(payload.filter_publications)sendPianoEvent(thisEntry,payload);});},createPayload:function(thisEntry,fieldset,submitBtn){return {'tab_title':getTrimText(document.querySelector('.tab--active')),...getFilterThemeOrRegionName(),...getSearchFilters(fieldset,'.form-type-checkbox','filter_publications')};}},{name:'Onglet - Filtres - Régions',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.SPF--tab-list form'],customPrepareEntryEvent:function(thisEntry){const form=$(thisEntry.cssSelectors[0]);mark(form);if(!isDefined(form))return;form.addEventListener('submit',function(submitEvent){const fieldsetTheme=$('#edit-regions--wrapper');const payload=thisEntry.createPayload(thisEntry,fieldsetTheme,submitEvent);if(payload.filter_regions)sendPianoEvent(thisEntry,payload);});},createPayload:function(thisEntry,fieldset,submitBtn){return {'tab_title':getTrimText(document.querySelector('.tab--active')),...getFilterThemeOrRegionName(),...getSearchFilters(fieldset,'.form-type-checkbox','filter_regions')};}},{name:'Onglet - Filtres - Thèmes',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.SPF--tab-list form'],customPrepareEntryEvent:function(thisEntry){const form=$(thisEntry.cssSelectors[0]);mark(form);if(!isDefined(form))return;form.addEventListener('submit',function(submitEvent){const fieldsetTheme=$('#edit-themes--wrapper');const payload=thisEntry.createPayload(thisEntry,fieldsetTheme,submitEvent);if(payload.filter_themes)sendPianoEvent(thisEntry,payload);});},createPayload:function(thisEntry,fieldset,submitBtn){return {'tab_title':getTrimText(document.querySelector('.tab--active')),...getFilterThemeOrRegionName(),...getSearchFilters(fieldset,'.form-type-checkbox','filter_themes')};}},{name:'Onglet - Filtres - Formats',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.SPF--tab-tools form'],customPrepareEntryEvent:function(thisEntry){const form=$(thisEntry.cssSelectors[0]);mark(form);if(!isDefined(form))return;form.addEventListener('submit',function(submitEvent){const fieldsetTheme=$('#edit-formats--wrapper');const payload=thisEntry.createPayload(thisEntry,fieldsetTheme,submitEvent);if(payload.filter_formats)sendPianoEvent(thisEntry,payload);});},createPayload:function(thisEntry,fieldset,submitBtn){return {'tab_title':getTrimText(document.querySelector('.tab--active')),...getFilterThemeOrRegionName(),...getSearchFilters(fieldset,'.form-type-checkbox','filter_formats')};}},{name:'Onglet - Filtres - Populations',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.SPF--tab-tools form'],customPrepareEntryEvent:function(thisEntry){const form=$(thisEntry.cssSelectors[0]);mark(form);if(!isDefined(form))return;form.addEventListener('submit',function(submitEvent){const fieldsetTheme=$('#edit-populations--wrapper');const payload=thisEntry.createPayload(thisEntry,fieldsetTheme,submitEvent);if(payload.filter_populations)sendPianoEvent(thisEntry,payload);});},createPayload:function(thisEntry,fieldset,submitBtn){return {'tab_title':getTrimText(document.querySelector('.tab--active')),...getFilterThemeOrRegionName(),...getSearchFilters(fieldset,'.form-type-checkbox','filter_populations')};}},{name:'Onglet - Filtres - Média',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.SPF--tab-tools form'],customPrepareEntryEvent:function(thisEntry){const form=$(thisEntry.cssSelectors[0]);mark(form);if(!isDefined(form))return;form.addEventListener('submit',function(submitEvent){const fieldsetTheme=$('#edit-media--wrapper');const payload=thisEntry.createPayload(thisEntry,fieldsetTheme,submitEvent);if(payload.filter_media)sendPianoEvent(thisEntry,payload);});},createPayload:function(thisEntry,fieldset,submitBtn){return {'tab_title':getTrimText(document.querySelector('.tab--active')),...getFilterThemeOrRegionName(),...getSearchFilters(fieldset,'.form-type-checkbox','filter_media')};}},{name:'Onglet - Données Odissé',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.pa-onglet-hub-thematique'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){const text=targetElement?.innerText;if(!isDefined(text)||isEmptyString(text))return null;return {'tab_title':text};}},{name:'Hub - Données Téléchargement',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.hub-thematic .download-l
3ink','.node--type-hub a[href$="pdf"]'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){return {'data_title':targetElement.innerText};}},{name:'Actualités - Filtres - Régions',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.view-list-news form'],customPrepareEntryEvent:function(thisEntry){const form=$(thisEntry.cssSelectors[0]);mark(form);if(!isDefined(form))return;form.addEventListener('submit',function(submitEvent){const fieldsetTheme=$('#edit-regions--wrapper');const payload=thisEntry.createPayload(thisEntry,fieldsetTheme,submitEvent);sendPianoEvent(thisEntry,payload);});},createPayload:function(thisEntry,fieldset,clickEvent){return getSearchFilters(fieldset,'.js-form-type-checkbox','filter_regions');}},{name:'Actualités - Filtres - Thèmes',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.view-list-news form'],customPrepareEntryEvent:function(thisEntry){const form=$(thisEntry.cssSelectors[0]);mark(form);if(!isDefined(form))return;form.addEventListener('submit',function(submitEvent){const fieldsetTheme=$('#edit-themes--wrapper');const payload=thisEntry.createPayload(thisEntry,fieldsetTheme,submitEvent);sendPianoEvent(thisEntry,payload);});},createPayload:function(thisEntry,fieldset,clickEvent){return getSearchFilters(fieldset,'.js-form-type-checkbox','filter_themes');}},{name:'Presse - Filtres - Régions',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.view-list-press form'],customPrepareEntryEvent:function(thisEntry){const form=$(thisEntry.cssSelectors[0]);mark(form);if(!isDefined(form))return;form.addEventListener('submit',function(submitEvent){const fieldsetTheme=$('#edit-regions--wrapper');const payload=thisEntry.createPayload(thisEntry,fieldsetTheme,submitEvent);sendPianoEvent(thisEntry,payload);});},createPayload:function(thisEntry,fieldset,clickEvent){return getSearchFilters(fieldset,'.js-form-type-checkbox','filter_regions');}},{name:'Presse - Filtres - Thèmes',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.view-list-press form'],customPrepareEntryEvent:function(thisEntry){const form=$(thisEntry.cssSelectors[0]);mark(form);if(!isDefined(form))return;form.addEventListener('submit',function(submitEvent){const fieldsetTheme=$('#edit-themes--wrapper');const payload=thisEntry.createPayload(thisEntry,fieldsetTheme,submitEvent);sendPianoEvent(thisEntry,payload);});},createPayload:function(thisEntry,fieldset,clickEvent){return getSearchFilters(fieldset,'.js-form-type-checkbox','filter_themes');}},{name:'Document - Téléchargement',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.pa-cta-download','[href$=".pdf"]','[href$=".epub"]','[href$=".doc"]','[href$=".docx"]','[href$=".xls"]','[href$=".xlsx"]','[href$=".ppt"]','[href$=".pptx"]','[href$=".zip"]','[href$=".rar"]','[download]'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){const href=targetElement.getAttribute('href');const filename=lastItemStrSplit(href,'/');return {'DL_TemplateName':filename};}},{name:'Lien Listing - En savoir plus',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.pa-cta-link'],createPayload:function(thisEntry,targetElement,clickEvent){const block=findFirstParentWithTitle(targetElement?.parentElement);const title=findFirstTitleElementInBlock(block);if(!isDefined(title))return null;return {'DL_TemplateName':title?.innerText};}},{name:'Recherche - Suggestions',type:PA_EVENT_TYPE.CLICK,autoPrepare:false,cssSelectors:['.search-autocomplete__item'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){const titleArray=Array.from(targetElement.children);const title=titleArray.map((element)=>element.innerText).join(' ');return {'search_suggestion':title};}},{name:'Recherche - Populaire',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.search-presets__term'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){return {'search_keyword':clickEvent.target.innerText};}},{name:'Recherche - Soumission',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['#spf-search-form'],customPrepareEntryEvent:function(thisEntry){const form=$('#spf-search-form');mark(form);if(!isDefined(form))return;form.addEventListener('submit',function(submitEvent){const payload=thisEntry.createPayload(thisEntry,submitEvent);sendPianoEvent(thisEntry,payload);});},createPayload:function(thisEntry,targetElement,clickEvent){const userInput=$('#edit-search');return {'search_keyword':userInput?.value??''};}},{name:'Scroll Vertical',type:PA_EVENT_TYPE.SCROLL,autoPrepare:true,cssSelectors:['html'],customPrepareEntryEvent:null,createPayload:null,onScrollEvent:function(pianoEntry,scrollEvent){let scrollPercent;const percent=(window.scrollY/(document.body.scrollHeight-window.innerHeight))*100;thresholds.forEach((t)=>{if(percent>=t&&!reached.includes(t)){reached.push(t);scrollPercent={'scroll2':t};}});return scrollPercent;}},{name:'Clic - Back to Top',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['#backtotop-button'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){return {};}},{name:'Clic - Accès Thématique - Dossier de crise',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.node--type-crisis-file .record a'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){return {};}},{name:'Recherche - Filtres - Langues',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.search-page__filters form'],customPrepareEntryEvent:function(thisEntry){const filterContainer=$(thisEntry.cssSelectors[0]);if(!filterContainer)return;mark(filterContainer);filterContainer.addEventListener('submit',function(submitEvent){const fieldsetTheme=$('#edit-language--wrapper');const payload=thisEntry.createPayload(thisEntry,fieldsetTheme,submitEvent);const hasPayload=!!payload&&!isEmptyObject(payload);if(!hasPayload)return;sendPianoEvent(thisEntry,payload);});},createPayload:function(thisEntry,fieldset,submitEvent){return getSearchFilters(fieldset,'.form-item','filter_langues');}},{name:'Recherche - Filtres - Thèmes',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.search-page__filters form'],customPrepareEntryEvent:function(thisEntry){const filterContainer=$(thisEntry.cssSelectors[0]);if(!filterContainer)return;mark(filterContainer);filterContainer.addEventListener('submit',function(submitEvent){const fieldsetTheme=$('#edit-themes--wrapper');const payload=thisEntry.createPayload(thisEntry,fieldsetTheme,submitEvent);const hasPayload=!!payload&&!isEmptyObject(payload);if(!hasPayload)return;sendPianoEvent(thisEntry,payload);});},createPayload:function(thisEntry,fieldset,submitEvent){return getSearchFilters(fieldset,'.form-item','filter_themes');}},{name:'Recherche - Filtres - Types de publications',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.search-page__filters form'],customPrepareEntryEvent:function(thisEntry){const filterContainer=$(thisEntry.cssSelectors[0]);if(!filterContainer)return;mark(filterContainer);filterContainer.addEventListener('submit',function(submitEvent){const fieldsetTheme=$('#edit-document-types--wrapper');const payload=thisEntry.createPayload(thisEntry,fieldsetTheme,submitEvent);const hasPayload=!!payload&&!isEmptyObject(payload);if(!hasPayload)return;sendPianoEvent(thisEntry,payload);});},createPayload:function(thisEntry,fieldset,submitEvent){return getSearchFilters(fieldset,'.form-item','filter_publications');}},{name:'Recherche - Filtres - Populations',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.search-page__filters form'],customPrepareEntryEvent:function(thisEntry){const filterContainer=$(thisEntry.cssSelectors[0]);if(!filterContainer)return;mark(filterContainer);filterContainer.addEventListener('submit',function(submitEvent){const fieldsetTheme=$('#edit-populations--wrapper');const payload=thisEntry.createPayload(thisEntry,fieldsetTheme,submitEvent);const hasPayload=!!payload&&!isEmptyObject(payload);if(!hasPayload)return;sendPianoEvent(thisEntry,payload);});},createPayload:function(thisEntry,fieldset,submitEvent){return getSearchFilters(fieldset,'.form-item','filter_populations');}},{name:'Recherche - Filtres - Régions',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.search-page__filters form'],customPrepareEntryEvent:function(thisEntry){const filterContainer=$(thisEntry.cssSelectors[0]);if(!filterContainer)return;mark(filterContainer);filterContainer.addEventListener('submit',function(submitEvent){const fieldsetTheme=$('#edit-regions--wrapper');const payload=thisEntry.createPayload(thisEntry,fieldsetTheme,submitEvent);const hasPayload=!!payload&&!isEmptyObject(payload);if(!hasPayload)return;sendPianoEvent(thisEntry,payload);});},createPayload:function(thisEntry,fieldset,submitEvent){return getSearchFilters(fieldset,'.form-item','filter_regions');}},{name:'Notices - Click CTA',type:PA_EVENT_TYPE.CLICK,autoPrepare:true,cssSelectors:['.content__buttons a'],customPrepareEntryEvent:null,createPayload:function(thisEntry,targetElement,clickEvent){return {'notice_cta_title':getTrimText(targetElement)};}}];once('spf_piano_analytics_tagging','html',context).forEach(()=>
3{pianoEntries.forEach(preparePianoEntryEvent);});once('spf_piano_analytics_tagging','.search-autocomplete__list',context).forEach((containerAutocompleteSearch)=>{containerAutocompleteSearch.addEventListener('click',function(clickEvent){const liElement=clickEvent.target.closest('.search-autocomplete__item');if(!liElement)return;const pianoEntry=findPianoEntryByName('Recherche - Suggestions');if(!pianoEntry)return;const payload=pianoEntry.createPayload(pianoEntry,liElement,clickEvent);sendPianoEvent(pianoEntry,payload);});});}};})(Drupal,once,drupalSettings);;

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.