import PNotify from"./PNotify.js";function data(){return Object.assign({_notice:null,_options:{}},PNotify.modules.History.defaults)}var methods={initModule(t){if(this.set(t),this.get().history){const{_notice:t}=this.get();t.get().destroy&&t.set({destroy:!1})}},beforeOpen(){const{maxInStack:t,_options:o}=this.get();if(t===1/0)return;const e=o.stack;if(!1!==e&&PNotify.notices&&PNotify.notices.length>t){const o="top"===e.push,i=[];let s=0;for(let n=o?0:PNotify.notices.length-1;o?n=0;o?n++:n--)-1!==["opening","open"].indexOf(PNotify.notices[n].get()._state)&&PNotify.notices[n].get().stack===e&&(s>=t?i.push(PNotify.notices[n]):s++);for(let t=0;tnew t({target:document.body})),t.showLast=(t=>{if(void 0===t&&(t=PNotify.defaultStack),!1===t)return;const o="top"===t.push;let e,i=o?0:PNotify.notices.length-1;do{if(!(e=PNotify.notices[i]))return;i+=o?1:-1}while(e.get().stack!==t||!e.get()._modules.History.get().history||"opening"===e.get()._state||"open"===e.get()._state);e.open()}),t.showAll=(t=>{if(void 0===t&&(t=PNotify.defaultStack),!1!==t)for(let o=0;o