let PNotify,posTimer,onDocumentLoaded=()=>{PNotify.defaultStack.context=document.body,window.addEventListener("resize",()=>{posTimer&&clearTimeout(posTimer),posTimer=setTimeout(()=>{PNotify.positionAll()},10)})},createStackOverlay=e=>{const t=document.createElement("div");t.classList.add("ui-pnotify-modal-overlay"),e.context!==document.body&&(t.style.height=e.context.scrollHeight+"px",t.style.width=e.context.scrollWidth+"px"),t.addEventListener("click",()=>{e.overlayClose&&PNotify.closeStack(e)}),e.overlay=t},insertStackOverlay=e=>{e.overlay.parentNode!==e.context&&(e.overlay=e.context.insertBefore(e.overlay,e.context.firstChild))},removeStackOverlay=e=>{e.overlay.parentNode&&e.overlay.parentNode.removeChild(e.overlay)};const getDefaultArgs=(e,t)=>("object"!=typeof e&&(e={text:e}),t&&(e.type=t),{target:document.body,data:e});function _styles({styling:e}){return"object"==typeof e?e:PNotify.styling[e]}function _icons({icons:e}){return"object"==typeof e?e:PNotify.icons[e]}function _widthStyle({width:e}){return"string"==typeof e?"width: "+e+";":""}function _minHeightStyle({minHeight:e}){return"string"==typeof e?"min-height: "+e+";":""}function data(){const e=Object.assign({_state:"initializing",_timer:null,_animTimer:null,_animating:!1,_animatingClass:"",_moveClass:"",_timerHide:!1,_moduleClasses:[],_moduleIsNoticeOpen:!1,_modules:{},_modulesPrependContainer:PNotify.modulesPrependContainer,_modulesAppendContainer:PNotify.modulesAppendContainer},PNotify.defaults);return e.modules=Object.assign({},PNotify.defaults.modules),e}var methods={runModules(e){if("init"===e){for(let e in PNotify.modules)if(PNotify.modules.hasOwnProperty(e)&&"function"==typeof PNotify.modules[e].init){const t=PNotify.modules[e].init(this);this.initModule(t)}}else{const{_modules:t}=this.get();for(let i in t){if(!t.hasOwnProperty(i))continue;const o=Object.assign({_notice:this,_options:this.get()},this.get().modules[i]);t[i].set(o),"function"==typeof t[i][e]&&t[i][e]()}}},initModule(e){const{modules:t}=this.get();t.hasOwnProperty(e.constructor.key)||(t[e.constructor.key]={});const i=Object.assign({_notice:this,_options:this.get()},t[e.constructor.key]);e.initModule(i);const{_modules:o}=this.get();o[e.constructor.key]=e},update(e){const t=this.get().hide,i=this.get().icon;this.set(e),this.runModules("update"),this.get().hide?t||this.queueClose():this.cancelClose(),this.queuePosition();const{icon:o}=this.get();return o!==i&&(!0===o&&"fontawesome5"===this.get().icons||"string"==typeof o&&o.match(/(^| )fa[srlb]($| )/))&&(this.set({icon:!1}),this.set({icon:o})),this},open(){const{_state:e,hide:t}=this.get();if("opening"===e)return;if("open"===e)return void(t&&this.queueClose());this.set({_state:"opening",_animatingClass:"ui-pnotify-initial-hidden"}),this.runModules("beforeOpen");let{stack:i}=this.get();if(!this.refs.elem.parentNode||i&&i.context&&i.context!==this.refs.elem.parentNode)if(i&&i.context)i.context.appendChild(this.refs.elem);else{if(!document.body)throw new Error("No context to open this notice in.");document.body.appendChild(this.refs.elem)}return setTimeout(()=>{i&&(i.animation=!1,PNotify.positionAll(),i.animation=!0),this.animateIn(()=>{this.get().hide&&this.queueClose(),this.set({_state:"open"}),this.runModules("afterOpen")})},0),this},remove(e){return this.close(e)},close(e){const{_state:t}=this.get();if("closing"===t||"closed"===t)return;this.set({_state:"closing",_timerHide:!!e}),this.runModules("beforeClose");const{_timer:i}=this.get();return i&&clearTimeout&&(clearTimeout(i),this.set({_timer:null})),this.animateOut(()=>{if(this.set({_state:"closed"}),this.runModules("afterClose"),this.queuePosition(),this.get().remove&&this.refs.elem.parentNode.removeChild(this.refs.elem),this.runModules("beforeDestroy"),this.get().destroy&&null!==PNotify.notices){const e=PNotify.notices.indexOf(this);-1!==e&&PNotify.notices.splice(e,1)}this.runModules("afterDestroy")}),this},animateIn(e){this.set({_animating:"in"});const t=()=>{this.refs.elem.removeEventListener("transitionend",t);const{_animTimer:i,_animating:o,_moduleIsNoticeOpen:n}=this.get();if(i&&clearTimeout(i),"in"!==o)return;let s=n;if(!s){const e=this.refs.elem.getBoundingClientRect();for(let t in e)if(e[t]>0){s=!0;break}}s?(e&&e.call(),this.set({_animating:!1})):this.set({_animTimer:setTimeout(t,40)})};"fade"===this.get().animation?(this.refs.elem.addEventListener("transitionend",t),this.set({_animatingClass:"ui-pnotify-in"}),this.refs.elem.style.opacity,this.set({_animatingClass:"ui-pnotify-in ui-pnotify-fade-in"}),this.set({_animTimer:setTimeout(t,650)})):(this.set({_animatingClass:"ui-pnotify-in"}),t())},animateOut(e){this.set({_animating:"out"});const t=()=>{this.refs.elem.removeEventListener("transitionend",t);const{_animTimer:i,_animating:o,_moduleIsNoticeOpen:n}=this.get();if(i&&clearTimeout(i),"out"!==o)return;let s=n;if(!s){const e=this.refs.elem.getBoundingClientRect();for(let t in e)if(e[t]>0){s=!0;break}}if(this.refs.elem.style.opacity&&"0"!==this.refs.elem.style.opacity&&s)this.set({_animTimer:setTimeout(t,40)});else{this.set({_animatingClass:""});const{stack:t}=this.get();if(t&&t.overlay){let e=!1;for(let i=0;io||("left"===e.dir1||"right"===e.dir1)&&a>n)&&(e.nextpos1=e.firstpos1,e.nextpos2+=e.addpos2+(void 0===e.spacing2?25:e.spacing2),e.addpos2=0),"number"==typeof e.nextpos2&&(t.style[s]=e.nextpos2+"px",e.animation||t.style[s]),e.dir2){case"down":case"up":t.offsetHeight+(parseFloat(t.style.marginTop,10)||0)+(parseFloat(t.style.marginBottom,10)||0)>e.addpos2&&(e.addpos2=t.offsetHeight);break;case"left":case"right":t.offsetWidth+(parseFloat(t.style.marginLeft,10)||0)+(parseFloat(t.style.marginRight,10)||0)>e.addpos2&&(e.addpos2=t.offsetWidth)}}else if(e.dir1){let i,n;switch(e.dir1){case"down":case"up":n=["left","right"],i=e.context.scrollWidth/2-t.offsetWidth/2;break;case"left":case"right":n=["top","bottom"],i=o/2-t.offsetHeight/2}t.style[n[0]]=i+"px",t.style[n[1]]="auto",e.animation||t.style[n[0]]}if(e.dir1)switch("number"==typeof e.nextpos1&&(t.style[i]=e.nextpos1+"px",e.animation||t.style[i]),e.dir1){case"down":case"up":e.nextpos1+=t.offsetHeight+(void 0===e.spacing1?25:e.spacing1);break;case"left":case"right":e.nextpos1+=t.offsetWidth+(void 0===e.spacing1?25:e.spacing1)}else{let i=n/2-t.offsetWidth/2,s=o/2-t.offsetHeight/2;t.style.left=i+"px",t.style.top=s+"px",e.animation||t.style.left}return this},queuePosition(e){return posTimer&&clearTimeout(posTimer),e||(e=10),posTimer=setTimeout(()=>{PNotify.positionAll()},e),this},cancelRemove(){return this.cancelClose()},cancelClose(){const{_timer:e,_animTimer:t,_state:i,animation:o}=this.get();return e&&clearTimeout(e),t&&clearTimeout(t),"closing"===i&&this.set({_state:"open",_animating:!1,_animatingClass:"fade"===o?"ui-pnotify-in ui-pnotify-fade-in":"ui-pnotify-in"}),this},queueRemove(){return this.queueClose()},queueClose(){return this.cancelClose(),this.set({_timer:setTimeout(()=>this.close(!0),isNaN(this.get().delay)?0:this.get().delay)}),this},addModuleClass(...e){const{_moduleClasses:t}=this.get();for(let i=0;i{if(this.get().mouseReset&&"out"===this.get()._animating){if(!this.get()._timerHide)return;this.cancelClose()}this.get().hide&&this.get().mouseReset&&this.cancelClose()}),this.on("mouseleave",e=>{this.get().hide&&this.get().mouseReset&&"out"!==this.get()._animating&&this.queueClose(),PNotify.positionAll()});let{stack:e}=this.get();e&&"top"===e.push?PNotify.notices.splice(0,0,this):PNotify.notices.push(this),this.runModules("init"),this.set({_state:"closed"}),this.get().autoDisplay&&this.open()}function setup(e){(PNotify=e).VERSION="4.0.0-alpha.3",PNotify.defaultStack={dir1:"down",dir2:"left",firstpos1:25,firstpos2:25,spacing1:36,spacing2:36,push:"bottom",context:window&&document.body},PNotify.defaults={title:!1,titleTrusted:!1,text:!1,textTrusted:!1,styling:"brighttheme",icons:"brighttheme",addClass:"",cornerClass:"",autoDisplay:!0,width:"360px",minHeight:"16px",type:"notice",icon:!0,animation:"fade",animateSpeed:"normal",shadow:!0,hide:!0,delay:8e3,mouseReset:!0,remove:!0,destroy:!0,stack:PNotify.defaultStack,modules:{}},PNotify.notices=[],PNotify.modules={},PNotify.modulesPrependContainer=[],PNotify.modulesAppendContainer=[],PNotify.alert=(e=>new PNotify(getDefaultArgs(e))),PNotify.notice=(e=>new PNotify(getDefaultArgs(e,"notice"))),PNotify.info=(e=>new PNotify(getDefaultArgs(e,"info"))),PNotify.success=(e=>new PNotify(getDefaultArgs(e,"success"))),PNotify.error=(e=>new PNotify(getDefaultArgs(e,"error"))),PNotify.removeAll=(()=>{PNotify.closeAll()}),PNotify.closeAll=(()=>{for(let e=0;e{PNotify.closeStack(e)}),PNotify.closeStack=(e=>{if(!1!==e)for(let t=0;t{if(posTimer&&clearTimeout(posTimer),posTimer=null,PNotify.notices.length>0){for(let e=0;e .ui-pnotify{position:fixed;z-index:100040}body > .ui-pnotify.ui-pnotify-modal{z-index:100042}.ui-pnotify{position:absolute;height:auto;z-index:1;display:none}.ui-pnotify.ui-pnotify-modal{z-index:3}.ui-pnotify.ui-pnotify-in{display:block}.ui-pnotify.ui-pnotify-initial-hidden{display:block;visibility:hidden}.ui-pnotify.ui-pnotify-move{transition:left .5s ease, top .5s ease, right .5s ease, bottom .5s ease}.ui-pnotify.ui-pnotify-fade-slow{transition:opacity .4s linear;opacity:0}.ui-pnotify.ui-pnotify-fade-slow.ui-pnotify.ui-pnotify-move{transition:opacity .4s linear, left .5s ease, top .5s ease, right .5s ease, bottom .5s ease}.ui-pnotify.ui-pnotify-fade-normal{transition:opacity .25s linear;opacity:0}.ui-pnotify.ui-pnotify-fade-normal.ui-pnotify.ui-pnotify-move{transition:opacity .25s linear, left .5s ease, top .5s ease, right .5s ease, bottom .5s ease}.ui-pnotify.ui-pnotify-fade-fast{transition:opacity .1s linear;opacity:0}.ui-pnotify.ui-pnotify-fade-fast.ui-pnotify.ui-pnotify-move{transition:opacity .1s linear, left .5s ease, top .5s ease, right .5s ease, bottom .5s ease}.ui-pnotify.ui-pnotify-fade-in{opacity:1}.ui-pnotify .ui-pnotify-shadow{-webkit-box-shadow:0px 6px 28px 0px rgba(0,0,0,0.1);-moz-box-shadow:0px 6px 28px 0px rgba(0,0,0,0.1);box-shadow:0px 6px 28px 0px rgba(0,0,0,0.1)}.ui-pnotify-container{background-position:0 0;padding:.8em;height:100%;margin:0}.ui-pnotify-container:after{content:" ";visibility:hidden;display:block;height:0;clear:both}.ui-pnotify-container.ui-pnotify-sharp{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ui-pnotify-title{display:block;white-space:pre-line;margin-bottom:.4em;margin-top:0}.ui-pnotify.ui-pnotify-with-icon .ui-pnotify-title,.ui-pnotify.ui-pnotify-with-icon .ui-pnotify-text{margin-left:24px}[dir=rtl] .ui-pnotify.ui-pnotify-with-icon .ui-pnotify-title,[dir=rtl] .ui-pnotify.ui-pnotify-with-icon .ui-pnotify-text{margin-right:24px;margin-left:0}.ui-pnotify-title-bs4{font-size:1.2rem}.ui-pnotify-text{display:block;white-space:pre-line}.ui-pnotify-icon,.ui-pnotify-icon span{display:block;float:left}[dir=rtl] .ui-pnotify-icon,[dir=rtl] .ui-pnotify-icon span{float:right}.ui-pnotify-icon-bs3 > span{position:relative;top:2px}.ui-pnotify-icon-bs4 > span{position:relative;top:4px}.ui-pnotify-modal-overlay{background-color:rgba(0, 0, 0, .4);top:0;left:0;position:absolute;height:100%;width:100%;z-index:2}body > .ui-pnotify-modal-overlay{position:fixed;z-index:100041}',appendNode(e,document.head)}function create_main_fragment(e,t){var i,o,n,s,r,a,c,l,f,d=[],u=blankObject(),h=[],m=blankObject(),p=t._modulesPrependContainer;const y=e=>e.module.key;for(var _=0;_e.module.key;for(_=0;_{oncreate.call(this),this.fire("update",{changed:assignTrue({},this._state),current:this._state})}),e.target&&(this._fragment.c(),this._mount(e.target,e.anchor),this._lock=!0,callAll(this._beforecreate),callAll(this._oncreate),callAll(this._aftercreate),this._lock=!1)}function createElement(e){return document.createElement(e)}function appendNode(e,t){t.appendChild(e)}function blankObject(){return Object.create(null)}function createText(e){return document.createTextNode(e)}function setAttribute(e,t,i){e.setAttribute(t,i)}function addListener(e,t,i){e.addEventListener(t,i,!1)}function insertNode(e,t,i){t.insertBefore(e,i)}function updateKeyedEach(e,t,i,o,n,s,r,a,c,l,f,d,u,h){for(var m=e.length,p=r.length,y=m,_={};y--;)_[e[y].key]=y;var g=[],b={},v={};for(y=p;y--;){var N=h(s,r,y),x=o(N),k=a[x];k?n&&k.p(i,N):(k=f(t,x,N)).c(),g[y]=b[x]=k,x in _&&(v[x]=Math.abs(y-_[x]))}var C={},w={};function P(e){e[d](c,u),a[e.key]=e,u=e.first,p--}for(;m&&p;){var T=g[p-1],L=e[m-1],S=T.key,A=L.key;T===L?(u=T.first,m--,p--):b[A]?!a[S]||C[S]?P(T):w[A]?m--:v[S]>v[A]?(w[S]=!0,P(T)):(C[A]=!0,m--):(l(L,a),m--)}for(;m--;){b[(L=e[m]).key]||l(L,a)}for(;p;)P(g[p-1]);return g}function destroyBlock(e,t){e.d(1),t[e.key]=null}function detachNode(e){e.parentNode.removeChild(e)}function removeListener(e,t,i){e.removeEventListener(t,i,!1)}function createComment(){return document.createComment("")}function detachBetween(e,t){for(;e.nextSibling&&e.nextSibling!==t;)e.parentNode.removeChild(e.nextSibling)}function init(e,t){e._handlers=blankObject(),e._bind=t._bind,e.options=t,e.root=t.root||e,e.store=e.root.store||t.store}function assign(e,t){for(var i in t)e[i]=t[i];return e}function assignTrue(e,t){for(var i in t)e[i]=1;return e}function callAll(e){for(;e&&e.length;)e.shift()()}function destroy(e){this.destroy=noop,this.fire("destroy"),this.set=noop,this._fragment.d(!1!==e),this._fragment=null,this._state={}}function get(){return this._state}function fire(e,t){var i=e in this._handlers&&this._handlers[e].slice();if(i)for(var o=0;o