PageSourceSearch

https://www.reserveafricainesigean.fr/content/themes/sigean-theme/build/module-popup-b9520736.js

js reserveafricainesigean.fr collected 2026-09-24 09:59:28 UTC 3,114 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunksigean_theme=self.webpackChunksigean_theme||[]).push([[6598],{1737:function(t,e,s){s.r(e),s.d(e,{default:function(){return i}});var a=s(9978),o=s(6975);class i extends o.A{constructor(){super(...arguments),this._modalClass=null,this._popupList=null,this._displayablePopups=[]}getName(){return"popup"}getDependencies(){return{bsModal:{}}}getDefaultConfig(){return{popupsSelector:'[id^="alpha-popup-"]',localStorage:{keyFormat:"alpha-popup-%id%-shown",defaultExpiry:a.A.getTimeConstants().dayInMilliseconds},timeouts:{minPopupDelay:2e3,rousquillePopupCheckDelay:1e3}}}_onLoad(){super._onLoad(),this._handlePopups()}_handlePopups(){const t=this.getConfig(),e=this.getPopupList();if(e){const s=this._getManager().getModule("bsModal");if(s){this._modalClass=s.getModalClass(),Object.keys(e).forEach((t=>{const e=this._getPopupEl(t);e&&this._canShowPopup(e)&&this._displayablePopups.push(e)}));const o=()=>{if(0===this._displayablePopups.length)return;const e=this._displayablePopups.shift(),s=this.getPopupModalInstance(e.id);if(s){const i=()=>{if("time"===e.getAttribute("data-trigger-type"))e.dataset.delay?setTimeout((()=>{s.show()}),e.dataset.delay):s.show();else s.show();const t=e.querySelector(".modal-dialog");if(t){const s=e.dataset.width;t.style.setProperty("--bs-modal-width",`${s}px`)}const o=this._getLocalStorageKey(e),i=e.dataset.cookieExpiration*a.A.getTimeConstants().dayInMilliseconds;a.A.setLocalStorageItemWithExpiry(o,!0,i)};let d=Number(e.getAttribute("data-delay")||0);d=Math.max(d,t.timeouts.minPopupDelay),e.setAttribute("data-delay",d),setTimeout((()=>{document.querySelector('[id="rousquilleRoot"]:not(.answered)')?document.addEventListener("rsq.banner.panel.close",(()=>{i()})):i()}),t.timeouts.rousquillePopupCheckDelay),e.addEventListener("hidden.bs.modal",o)}};o()}}}_canShowPopup(t){const e=this._getLocalStorageKey(t);let s=!1,o=!1;const i=new Date;return void 0!==t.dataset.displaystartdate&&(s=new Date(t.dataset.displaystartdate)),void 0!==t.dataset.displayenddate&&(o=new Date(t.dataset.displayenddate)),!(!(s&&i>s)&&s)&&(!(!(o&&i<o)&&o)&&(null===a.A.getLocalStorageItemWithExpiry(e)&&!t.classList.contains("show")))}_getModalClass(){return this._modalClass}_getPopupEl(t){const e=this.getPopupList();return void 0!==e[t]?e[t]:null}getPopupList(){const t=this.getConfig();if(!this._popupList){this._popupList=[];const e=document.querySelectorAll(t.popupsSelector);if(e){const t=[];e.forEach((e=>{t.push(e)})),t.sort(((t,e)=>{let s=!1,a=!1;return void 0!==t.dataset.displayenddate&&(s=new Date(t.dataset.displayenddate)),void 0!==e.dataset.displayenddate&&(a=new Date(e.dataset.displayenddate)),s?!a||s<a?-1:s>a?1:0:a?-1:0})),t.forEach((t=>{this._popupList[t.id]=t}))}}return this._popupList}getPopupModalInstance(t){const e=this.getPopupList();if(void 0!==e[t]){const s=this._getModalClass();return s?s.getOrCreateInstance(e[t]):null}return!1}_getLocalStorageKey(t){return void 0!==t.dataset.cookieId?t.dataset.cookieId:this.getConfig().localStorage.keyFormat.replace("%id%",t.id)}_sortByEndDate}}}]);
2//# sourceMappingURL=module-popup-b9520736.js.map

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.