diff --git a/README.md b/README.md index f8fb1a5..f1e599a 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ [downloads-url]: https://npmjs.org/package/notiflix [jsdelivr-badge]: https://data.jsdelivr.com/v1/package/npm/notiflix/badge?style=rounded [jsdelivr-url]: https://www.jsdelivr.com/package/npm/notiflix -[size-badge]: https://img.badgesize.io/https://unpkg.com/browse/notiflix/dist/notiflix-aio-2.2.1.min.js?compression=gzip -[size-url]: https://unpkg.com/browse/notiflix/dist/notiflix-aio-2.2.1.min.js +[size-badge]: https://img.badgesize.io/https://unpkg.com/browse/notiflix/dist/notiflix-aio-2.3.0.min.js?compression=gzip +[size-url]: https://unpkg.com/browse/notiflix/dist/notiflix-aio-2.3.0.min.js [lic-badge]: https://img.shields.io/github/license/notiflix/Notiflix.svg [lic-url]: https://github.com/notiflix/Notiflix/blob/master/LICENSE @@ -34,7 +34,7 @@ Notiflix is a JavaScript library for client-side non-blocking notifications, popup boxes, loading indicators, and more to that makes your web projects much better. #### Current Version -2.2.1 [*](https://github.com/notiflix/Notiflix/blob/master/ReleaseNotes.md "Release Notes") +2.3.0 [*](https://github.com/notiflix/Notiflix/blob/master/ReleaseNotes.md "Release Notes") #### Website https://www.notiflix.com @@ -42,7 +42,7 @@ https://www.notiflix.com #### Documentation https://www.notiflix.com/documentation -#### Demo +#### Modules (Demo) - **Notiflix Notify** => https://www.notiflix.com/#Notify - **Notiflix Report** => https://www.notiflix.com/#Report - **Notiflix Confirm** => https://www.notiflix.com/#Confirm @@ -84,29 +84,32 @@ import { Notify, Report, Confirm, Loading, Block } from "notiflix"; ##### CSS and JS ```html - + - + ``` ##### or only JS (All in One - Internal CSS) ```html - + ``` - --------- ### Usage -1- Notify Module +#### 1- Notify Module ```js /* * @param1 {string}: Required, message text in String format. -* @param2 {function}: Optional, callback function when the notification element clicked. +* +* @param2 {Object | function}: Optional, extend the initialize options with new options for each notification element. Or, a callback function when the notification element has been clicked. +* +* @param3 {function}: Optional, a callback function when the notification element has been clicked (if the second parameter is an Object). */ +// e.g. Only message Notiflix.Notify.Success('Success message text'); Notiflix.Notify.Failure('Failure message text'); @@ -115,9 +118,28 @@ Notiflix.Notify.Warning('Warning message text'); Notiflix.Notify.Info('Info message text'); -// e.g. with a callback +// e.g. Message with a callback +Notiflix.Notify.Success( + 'Click Me', + function(){ + // callback + }, +); + +// e.g. Message with the new options (v2.3.0 and the next versions) Notiflix.Notify.Success( 'Click Me', + { + timeout: 6000, + }, +); + +// e.g. Message with the new options, and callback (v2.3.0 and the next versions) +Notiflix.Notify.Success( + 'Click Me', + { + timeout: 4000, + }, function(){ // callback }, @@ -127,16 +149,22 @@ Notiflix.Notify.Success( --_--_----_--_----_--_----_--_----_--_----_--_-- -2- Report Module +#### 2- Report Module ```js /* * @param1 {string}: Required, title text in String format. +* * @param2 {string}: Required, message text in String format. +* * @param3 {string}: Required, button text in String format. -* @param4 {function}: Optional, callback function when the button element clicked. +* +* @param4 {Object | function}: Optional, extend the initialize options with new options for each element. Or, a callback function when the button element has been clicked. +* +* @param5 {function}: Optional, a callback function when the button element has been clicked (if the second parameter is an Object). */ +// e.g. Only title, message, and button text Notiflix.Report.Success('Title', 'Message', 'Button Text'); Notiflix.Report.Failure('Title', 'Message', 'Button Text'); @@ -145,7 +173,7 @@ Notiflix.Report.Warning('Title', 'Message', 'Button Text'); Notiflix.Report.Info('Title', 'Message', 'Button Text'); -// e.g. with a callback +// e.g. With a callback Notiflix.Report.Success( 'Title', 'Message', @@ -154,12 +182,37 @@ Notiflix.Report.Success( // callback }, ); + +// e.g. With the new options (v2.3.0 and the next versions) +Notiflix.Report.Success( + 'Title', + 'Message', + 'Button Text', + { + width: '360px', + svgSize: '120px', + }, +); + +// e.g. With the new options, and callback (v2.3.0 and the next versions) +Notiflix.Report.Success( + 'Title', + 'Message', + 'Button Text', + { + width: '360px', + svgSize: '120px', + }, + function(){ + // callback + }, +); ``` --_--_----_--_----_--_----_--_----_--_----_--_-- -3- Confirm Module +#### 3- Confirm Module ```js /* @@ -195,7 +248,7 @@ Notiflix.Confirm.Show( --_--_----_--_----_--_----_--_----_--_----_--_-- -4- Loading Module +#### 4- Loading Module ```js /* @@ -249,7 +302,7 @@ Notiflix.Loading.Custom('Loading...'); --_--_----_--_----_--_----_--_----_--_----_--_-- -5- Block Module +#### 5- Block Module Notiflix Block module can be used to block or unblock elements to prevents users actions during the process (AJAX etc.) without locking the browser or the other elements. diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 010782f..d9b0db8 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,3 +1,44 @@ +@2.3.0 +* **Added:** `Notiflix.Notify.*` module, `optionsOrCallback` parameter has been added. (Recommended by [VirgilioGM](https://github.com/VirgilioGM)) + + - Custom options can be used for each Notify element to extend the initialize settings. + ```js + // Current: + // e.g. Message with a callback + Notiflix.Notify.Success( + 'Click Me', + function(){ + // callback + }, + ); + + // NEW: v2.3.0 and the next versions + // e.g. Message with the new options + Notiflix.Notify.Success( + 'Click Me', + { + timeout: 6000, + }, + ); + + // e.g. Message with the new options, and callback + Notiflix.Notify.Success( + 'Click Me', + { + timeout: 4000, + }, + function(){ + // callback + }, + ); + ``` + +* **Added:** `Notiflix.Report.*` module, `optionsOrCallback` parameter has been added. + +* **Changed:** Code Review. + +----- + @2.2.1 * **Changed:** `Notiflix.Notify.*` module, CSS animation improvements. diff --git a/dist/notiflix-2.2.1.min.js b/dist/notiflix-2.2.1.min.js deleted file mode 100644 index bf8ba66..0000000 --- a/dist/notiflix-2.2.1.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* Notiflix (https://www.notiflix.com) - Version: 2.2.1 - Author: Furkan MT (https://github.com/furcan) - Copyright 2020 Notiflix, MIT Licence (https://opensource.org/licenses/MIT) */ - -(function(t,e){"function"==typeof define&&define.amd?define([],function(){return e(t)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=e(t):t.Notiflix=e(t)})("undefined"==typeof global?"undefined"==typeof window?this:window:global,function(t){'use strict';if("undefined"!=typeof t||"undefined"!=typeof t.document){var e,a,n,i,o,s="-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"",r={wrapID:"NotiflixNotifyWrap",width:"280px",position:"right-top",distance:"10px",opacity:1,borderRadius:"5px",rtl:!1,timeout:3e3,messageMaxLength:110,backOverlay:!1,backOverlayColor:"rgba(0,0,0,0.5)",plainText:!0,showOnlyTheLastOne:!1,clickToClose:!1,ID:"NotiflixNotify",className:"notiflix-notify",zindex:4001,useGoogleFont:!1,fontFamily:"Quicksand",fontSize:"13px",cssAnimation:!0,cssAnimationDuration:400,cssAnimationStyle:"fade",closeButton:!1,useIcon:!0,useFontAwesome:!1,fontAwesomeIconStyle:"basic",fontAwesomeIconSize:"34px",success:{background:"#32c682",textColor:"#fff",childClassName:"success",notiflixIconColor:"rgba(0,0,0,0.2)",fontAwesomeClassName:"fas fa-check-circle",fontAwesomeIconColor:"rgba(0,0,0,0.2)",backOverlayColor:"rgba(50,198,130,0.2)"},failure:{background:"#ff5549",textColor:"#fff",childClassName:"failure",notiflixIconColor:"rgba(0,0,0,0.2)",fontAwesomeClassName:"fas fa-times-circle",fontAwesomeIconColor:"rgba(0,0,0,0.2)",backOverlayColor:"rgba(255,85,73,0.2)"},warning:{background:"#eebf31",textColor:"#fff",childClassName:"warning",notiflixIconColor:"rgba(0,0,0,0.2)",fontAwesomeClassName:"fas fa-exclamation-circle",fontAwesomeIconColor:"rgba(0,0,0,0.2)",backOverlayColor:"rgba(238,191,49,0.2)"},info:{background:"#26c0d3",textColor:"#fff",childClassName:"info",notiflixIconColor:"rgba(0,0,0,0.2)",fontAwesomeClassName:"fas fa-info-circle",fontAwesomeIconColor:"rgba(0,0,0,0.2)",backOverlayColor:"rgba(38,192,211,0.2)"}},l={ID:"NotiflixReportWrap",className:"notiflix-report",width:"320px",backgroundColor:"#f8f8f8",borderRadius:"25px",rtl:!1,zindex:4002,backOverlay:!0,backOverlayColor:"rgba(0,0,0,0.5)",useGoogleFont:!1,fontFamily:"Quicksand",svgSize:"110px",plainText:!0,titleFontSize:"16px",titleMaxLength:34,messageFontSize:"13px",messageMaxLength:400,buttonFontSize:"14px",buttonMaxLength:34,cssAnimation:!0,cssAnimationDuration:360,cssAnimationStyle:"fade",success:{svgColor:"#32c682",titleColor:"#1e1e1e",messageColor:"#242424",buttonBackground:"#32c682",buttonColor:"#fff",backOverlayColor:"rgba(50,198,130,0.2)"},failure:{svgColor:"#ff5549",titleColor:"#1e1e1e",messageColor:"#242424",buttonBackground:"#ff5549",buttonColor:"#fff",backOverlayColor:"rgba(255,85,73,0.2)"},warning:{svgColor:"#eebf31",titleColor:"#1e1e1e",messageColor:"#242424",buttonBackground:"#eebf31",buttonColor:"#fff",backOverlayColor:"rgba(238,191,49,0.2)"},info:{svgColor:"#26c0d3",titleColor:"#1e1e1e",messageColor:"#242424",buttonBackground:"#26c0d3",buttonColor:"#fff",backOverlayColor:"rgba(38,192,211,0.2)"}},c={ID:"NotiflixConfirmWrap",className:"notiflix-confirm",width:"300px",zindex:4003,position:"center",distance:"10px",backgroundColor:"#f8f8f8",borderRadius:"25px",backOverlay:!0,backOverlayColor:"rgba(0,0,0,0.5)",rtl:!1,useGoogleFont:!1,fontFamily:"Quicksand",cssAnimation:!0,cssAnimationStyle:"fade",cssAnimationDuration:300,plainText:!0,titleColor:"#32c682",titleFontSize:"16px",titleMaxLength:34,messageColor:"#1e1e1e",messageFontSize:"14px",messageMaxLength:110,buttonsFontSize:"15px",buttonsMaxLength:34,okButtonColor:"#f8f8f8",okButtonBackground:"#32c682",cancelButtonColor:"#f8f8f8",cancelButtonBackground:"#a9a9a9"},m={ID:"NotiflixLoadingWrap",className:"notiflix-loading",zindex:4e3,backgroundColor:"rgba(0,0,0,0.8)",rtl:!1,useGoogleFont:!1,fontFamily:"Quicksand",cssAnimation:!0,cssAnimationDuration:400,clickToClose:!1,customSvgUrl:null,svgSize:"80px",svgColor:"#32c682",messageID:"NotiflixLoadingMessage",messageFontSize:"15px",messageMaxLength:34,messageColor:"#dcdcdc"},p={ID:"NotiflixBlockWrap",querySelectorLimit:200,className:"notiflix-block",position:"absolute",zindex:1e3,backgroundColor:"rgba(255,255,255,0.9)",rtl:!1,useGoogleFont:!1,fontFamily:"Quicksand",cssAnimation:!0,cssAnimationDuration:300,svgSize:"45px",svgColor:"#383838",messageFontSize:"14px",messageMaxLength:34,messageColor:"#383838"},x=function(){return null},g=function(){if(null!==x()&&!t.document.getElementById("NotiflixInternalCSS")){var e=t.document.createElement("style");e.id="NotiflixInternalCSS",e.innerHTML=x(),t.document.head.appendChild(e)}},d=function(){var t={},e=!1,a=0;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],a++);for(var n=function(a){for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=e&&"[object Object]"===Object.prototype.toString.call(a[n])?d(t[n],a[n]):a[n])};a");t.document.head.appendChild(i);var o=t.document.createRange();o.selectNode(t.document.head);var s=o.createContextualFragment("");t.document.head.appendChild(s)}},b=function(t,e){return console.error("%c "+t+" ","padding:2px;border-radius:20px;color:#fff;background:#ff5549","\n"+e+"\nVisit documentation page to learn more: https://www.notiflix.com/documentation")},y=function(t,e){return console.log("%c "+t+" ","padding:2px;border-radius:20px;color:#fff;background:#26c0d3","\n"+e+"\nVisit documentation page to learn more: https://www.notiflix.com/documentation")},h=function(t,e){t||(t="110px"),e||(e="#32c682");var a="";return a},k=function(t,e){t||(t="110px"),e||(e="#ff5549");var a="";return a},w=function(t,e){t||(t="110px"),e||(e="#eebf31");var a="";return a},v=function(t,e){t||(t="110px"),e||(e="#26c0d3");var a="";return a},N=function(t,e){t||(t="60px"),e||(e="#32c682");var a="";return a},z=function(t,e){t||(t="60px"),e||(e="#32c682");var a=" ";return a},C=function(t,e){t||(t="60px"),e||(e="#32c682");var a="";return a},S=function(t,e){t||(t="60px"),e||(e="#32c682");var a="";return a},I=function(t,e){t||(t="60px"),e||(e="#32c682");var a=" ";return a},X=function(t,e){t||(t="60px"),e||(e="#32c682");var a="";return a},R=function(t,e,a){t||(t="60px"),e||(e="#f8f8f8"),a||(a="#32c682");var n="";return n},L=0,M=0,B=function(a,n,o,l){if(arguments&&4===arguments.length){L++,"function"==typeof n&&M++,"string"!=typeof a&&(a="Notiflix "+l),e.plainText&&(a=f(a)),!e.plainText&&a.length>e.messageMaxLength&&(W.Notify.Merge({closeButton:!0,plainText:!1}),a="HTML Tags Error: Your content length is more than \"messageMaxLength\" option."),a.length>e.messageMaxLength&&(a=a.substring(0,e.messageMaxLength)+"..."),"shadow"===e.fontAwesomeIconStyle&&(o.fontAwesomeIconColor=o.background),e.cssAnimation||(e.cssAnimationDuration=0);var c=t.document.createElement("div");c.id=r.wrapID,c.style.width=e.width,c.style.zIndex=e.zindex,c.style.opacity=e.opacity,"center-center"===e.position?(c.style.left=e.distance,c.style.top=e.distance,c.style.right=e.distance,c.style.bottom=e.distance,c.style.margin="auto",c.classList.add("nx-flex-center-center"),c.style.maxHeight="calc((100vh - "+e.distance+") - "+e.distance+")",c.style.display="flex",c.style.flexWrap="wrap",c.style.flexDirection="column",c.style.justifyContent="center",c.style.alignItems="center",c.style.pointerEvents="none"):"center-top"===e.position?(c.style.left=e.distance,c.style.right=e.distance,c.style.top=e.distance,c.style.bottom="auto",c.style.margin="auto"):"center-bottom"===e.position?(c.style.left=e.distance,c.style.right=e.distance,c.style.bottom=e.distance,c.style.top="auto",c.style.margin="auto"):"right-bottom"===e.position?(c.style.right=e.distance,c.style.bottom=e.distance,c.style.top="auto",c.style.left="auto"):"left-top"===e.position?(c.style.left=e.distance,c.style.top=e.distance,c.style.right="auto",c.style.bottom="auto"):"left-bottom"===e.position?(c.style.left=e.distance,c.style.bottom=e.distance,c.style.top="auto",c.style.right="auto"):(c.style.right=e.distance,c.style.top=e.distance,c.style.left="auto",c.style.bottom="auto");var m;e.backOverlay&&(m=t.document.createElement("div"),m.id=e.ID+"Overlay",m.style.width="100%",m.style.height="100%",m.style.position="fixed",m.style.zIndex=e.zindex,m.style.left=0,m.style.top=0,m.style.right=0,m.style.bottom=0,m.style.background=o.backOverlayColor||e.backOverlayColor,m.className=e.cssAnimation?"with-animation":"",m.style.animationDuration=e.cssAnimation?e.cssAnimationDuration+"ms":"",t.document.getElementById(m.id)?0===M&&(t.document.getElementById(m.id).style.background=o.backOverlayColor||e.backOverlayColor):t.document.body.appendChild(m)),t.document.getElementById(c.id)||t.document.body.appendChild(c);var p=t.document.createElement("div");p.id=e.ID+"-"+L,p.className=e.className+" "+o.childClassName+" "+(e.cssAnimation?"with-animation":"")+" "+(e.useIcon?"with-icon":"")+" nx-"+e.cssAnimationStyle+" "+(e.closeButton&&"function"!=typeof n?"with-close-button":"")+" "+("function"==typeof n?"with-callback":"")+" "+(e.clickToClose?"click-to-close":""),p.style.fontSize=e.fontSize,p.style.color=o.textColor,p.style.background=o.background,p.style.borderRadius=e.borderRadius,p.style.pointerEvents="all",e.rtl&&(p.setAttribute("dir","rtl"),p.classList.add("rtl-on")),p.style.fontFamily="\""+e.fontFamily+"\", "+s,e.cssAnimation&&(p.style.animationDuration=e.cssAnimationDuration+"ms");var x="";if(e.closeButton&&"function"!=typeof n&&(x=""),!e.useIcon)p.innerHTML=""+a+""+(e.closeButton?x:"");else if(e.useFontAwesome)p.innerHTML=""+a+""+(e.closeButton?x:"");else{var g;g="Success"===l?"":"Failure"===l?"":"Warning"===l?"":"Info"===l?"":"",p.innerHTML=g+""+a+""+(e.closeButton?x:"")}if("left-bottom"===e.position||"right-bottom"===e.position){var d=t.document.getElementById(c.id);d.insertBefore(p,d.firstChild)}else t.document.getElementById(c.id).appendChild(p);if(e.useIcon){var u=t.document.getElementById(p.id).querySelectorAll(".nmi")[0],y=40;if(e.useFontAwesome)y=Math.round(parseInt(u.offsetHeight));else{var h=u.getBBox();y=Math.round(parseInt(h.width))}var k=t.document.getElementById(p.id).querySelectorAll("span")[0],w=Math.round(k.offsetHeight);w<=y&&(k.style.paddingTop=(y-w)/2+"px",k.style.paddingBottom=(y-w)/2+"px")}if(t.document.getElementById(p.id)){var v,N=t.document.getElementById(p.id),z=t.document.getElementById(c.id);e.backOverlay&&(v=t.document.getElementById(m.id));var C,S,I=function(){N.classList.add("remove"),e.backOverlay&&0>=z.childElementCount&&v.classList.add("remove"),clearTimeout(C)},X=function(){var a=t.document.getElementById(p.id);a&&null!==N.parentNode&&N.parentNode.removeChild(N),0>=z.childElementCount&&null!==z.parentNode&&(z.parentNode.removeChild(z),e.backOverlay&&null!==v.parentNode&&v.parentNode.removeChild(v)),clearTimeout(S)};if(e.closeButton&&"function"!=typeof n){var R=t.document.getElementById(p.id).querySelectorAll("span.notify-close-button")[0];R.addEventListener("click",function(){I();var t=setTimeout(function(){X(),clearTimeout(t)},e.cssAnimationDuration)})}("function"==typeof n||e.clickToClose)&&N.addEventListener("click",function(){"function"==typeof n&&(M--,n()),I();var t=setTimeout(function(){X(),clearTimeout(t)},e.cssAnimationDuration)}),e.closeButton||"function"==typeof n||(C=setTimeout(function(){I()},e.timeout),S=setTimeout(function(){X()},e.timeout+e.cssAnimationDuration))}if(e.showOnlyTheLastOne&&0
- Albert Einstein":"Failure"===c?n="\"Failure is simply the opportunity to begin again, this time more intelligently.\"

- Henry Ford":"Warning"===c?n="\"The peoples who want to live comfortably without producing and fatigue; they are doomed to lose their dignity, then liberty, and then independence and destiny.\"

- Mustafa Kemal Ataturk":"Info"==c&&(n="\"Knowledge rests not upon truth alone, but upon error also.\"

- Carl Gustav Jung")),"string"!=typeof i&&(i="Okay"),a.plainText&&(e=f(e),n=f(n),i=f(i)),a.plainText||(e.length>a.titleMaxLength&&(e="HTML Tags Error",n="Your Title content length is more than \"titleMaxLength\" option.",i="Okay"),n.length>a.messageMaxLength&&(e="HTML Tags Error",n="Your Message content length is more than \"messageMaxLength\" option.",i="Okay"),i.length>a.buttonMaxLength&&(e="HTML Tags Error",n="Your Button content length is more than \"buttonMaxLength\" option.",i="Okay")),e.length>a.titleMaxLength&&(e=e.substring(0,a.titleMaxLength)+"..."),n.length>a.messageMaxLength&&(n=n.substring(0,a.messageMaxLength)+"..."),i.length>a.buttonMaxLength&&(i=i.substring(0,a.buttonMaxLength)+"..."),a.cssAnimation||(a.cssAnimationDuration=0);var m=t.document.createElement("div");m.id=l.ID,m.className=a.className,m.style.width=a.width,m.style.zIndex=a.zindex,m.style.borderRadius=a.borderRadius,m.style.fontFamily="\""+a.fontFamily+"\", "+s,a.rtl&&(m.setAttribute("dir","rtl"),m.classList.add("rtl-on"));var p="";a.backOverlay&&(p="
");var x="";if("Success"===c?x=h(a.svgSize,r.svgColor):"Failure"===c?x=k(a.svgSize,r.svgColor):"Warning"===c?x=w(a.svgSize,r.svgColor):"Info"==c&&(x=v(a.svgSize,r.svgColor)),m.innerHTML=p+"
"+x+"
"+e+"

"+n+"

"+i+"
",!t.document.getElementById(m.id)){t.document.body.appendChild(m);var g=Math.round(t.innerHeight),d=Math.round(t.document.getElementById(m.id).offsetHeight);m.style.top=(g-d)/2+"px";var u=t.document.getElementById(m.id),b=t.document.getElementById("NXReportButton");b.addEventListener("click",function(){"function"==typeof o&&o(),u.classList.add("remove");var t=setTimeout(function(){null!==u.parentNode&&u.parentNode.removeChild(u),clearTimeout(t)},a.cssAnimationDuration)})}},F=function(e,a,i,o,r,l){n||W.Confirm.Init({}),"string"!=typeof e&&(e="Notiflix Confirm"),"string"!=typeof a&&(a="Do you agree with me?"),"string"!=typeof i&&(i="Yes"),"string"!=typeof o&&(o="No"),"function"!=typeof r&&(r=void 0),"function"!=typeof l&&(l=void 0),n.plainText&&(e=f(e),a=f(a),i=f(i),o=f(o)),n.plainText||(e.length>n.titleMaxLength&&(e="HTML Tags Error",a="Your Title content length is more than \"titleMaxLength\" option.",i="Okay",o="..."),a.length>n.messageMaxLength&&(e="HTML Tags Error",a="Your Message content length is more than \"messageMaxLength\" option.",i="Okay",o="..."),(i.length||o.length)>n.buttonsMaxLength&&(e="HTML Tags Error",a="Your Buttons contents length is more than \"buttonsMaxLength\" option.",i="Okay",o="...")),e.length>n.titleMaxLength&&(e=e.substring(0,n.titleMaxLength)+"..."),a.length>n.messageMaxLength&&(a=a.substring(0,n.messageMaxLength)+"..."),i.length>n.buttonsMaxLength&&(i=i.substring(0,n.buttonsMaxLength)+"..."),o.length>n.buttonsMaxLength&&(o=o.substring(0,n.buttonsMaxLength)+"..."),n.cssAnimation||(n.cssAnimationDuration=0);var m=t.document.createElement("div");m.id=c.ID,m.className=n.className+(n.cssAnimation?" with-animation nx-"+n.cssAnimationStyle:""),m.style.width=n.width,m.style.zIndex=n.zindex,n.rtl&&(m.setAttribute("dir","rtl"),m.classList.add("rtl-on")),m.style.fontFamily="\""+n.fontFamily+"\", "+s;var p="";n.backOverlay&&(p="
");var x="";if("function"==typeof r&&(x=""+o+""),m.innerHTML=p+"
"+e+"
"+a+"
"+i+""+x+"
",!t.document.getElementById(m.id)){if(t.document.body.appendChild(m),"center"===n.position){var g=Math.round(t.innerHeight),d=Math.round(t.document.getElementById(m.id).offsetHeight);m.style.top=(g-d)/2+"px",m.style.left=n.distance,m.style.right=n.distance,m.style.bottom="auto",m.style.margin="auto"}else"right-top"===n.position?(m.style.right=n.distance,m.style.top=n.distance,m.style.bottom="auto",m.style.left="auto",m.style.margin="auto"):"right-bottom"===n.position?(m.style.right=n.distance,m.style.bottom=n.distance,m.style.top="auto",m.style.left="auto",m.style.margin="auto"):"left-top"===n.position?(m.style.left=n.distance,m.style.top=n.distance,m.style.right="auto",m.style.bottom="auto",m.style.margin="auto"):"left-bottom"===n.position?(m.style.left=n.distance,m.style.bottom=n.distance,m.style.top="auto",m.style.right="auto",m.style.margin="auto"):(m.style.top=n.distance,m.style.left=0,m.style.right=0,m.style.bottom="auto",m.style.margin="auto");var u=t.document.getElementById(m.id),b=t.document.getElementById("NXConfirmButtonOk");if(b.addEventListener("click",function(){"function"==typeof r&&r(),u.classList.add("remove");var t=setTimeout(function(){null!==u.parentNode&&(u.parentNode.removeChild(u),clearTimeout(t))},n.cssAnimationDuration)}),"function"==typeof r){var y=t.document.getElementById("NXConfirmButtonCancel");y.addEventListener("click",function(){"function"==typeof l&&l(),u.classList.add("remove");var t=setTimeout(function(){null!==u.parentNode&&(u.parentNode.removeChild(u),clearTimeout(t))},n.cssAnimationDuration)})}}},E=function(e,a,n,o){if(i||W.Loading.Init({}),"string"!=typeof e&&(e=""),n){e=e.toString().length>i.messageMaxLength?f(e).toString().substring(0,i.messageMaxLength)+"...":f(e).toString();var r=parseInt(i.svgSize),l="";if(0"+e+"

"}i.cssAnimation||(i.cssAnimationDuration=0);var x="";if("standard"===a)x=N(i.svgSize,i.svgColor);else if("hourglass"===a)x=z(i.svgSize,i.svgColor);else if("circle"===a)x=C(i.svgSize,i.svgColor);else if("arrows"===a)x=S(i.svgSize,i.svgColor);else if("dots"===a)x=I(i.svgSize,i.svgColor);else if("pulse"===a)x=X(i.svgSize,i.svgColor);else if("custom"===a&&null!==i.customSvgUrl)x="\"Notiflix\"";else{if("custom"===a&&null==i.customSvgUrl)return b("Notiflix Error","You have to set a static SVG url to \"customSvgUrl\" option to use Loading Custom."),!1;"notiflix"===a&&(x=R(i.svgSize,"#f8f8f8","#32c682"))}var g=0;0"+x+"",u=t.document.createElement("div");if(u.id=m.ID,u.className=i.className+(i.cssAnimation?" with-animation":"")+(i.clickToClose?" click-to-close":""),u.style.zIndex=i.zindex,u.style.background=i.backgroundColor,u.style.animationDuration=i.cssAnimationDuration+"ms",u.style.fontFamily="\""+i.fontFamily+"\", "+s,i.rtl&&(u.setAttribute("dir","rtl"),u.classList.add("rtl-on")),u.innerHTML=d+l,!t.document.getElementById(u.id)&&(t.document.body.appendChild(u),i.clickToClose)){var y=t.document.getElementById(u.id);y.addEventListener("click",function(){u.classList.add("remove");var t=setTimeout(function(){null!==u.parentNode&&(u.parentNode.removeChild(u),clearTimeout(t))},i.cssAnimationDuration)})}}else if(t.document.getElementById(m.ID))var h=t.document.getElementById(m.ID),k=setTimeout(function(){h.classList.add("remove");var t=setTimeout(function(){null!==h.parentNode&&(h.parentNode.removeChild(h),clearTimeout(t))},i.cssAnimationDuration);clearTimeout(k)},o)},D=function(e){if("string"!=typeof e&&(e=""),t.document.getElementById(m.ID))if(0i.messageMaxLength?f(e).toString().substring(0,i.messageMaxLength)+"...":f(e).toString();var a=t.document.getElementById(m.ID).getElementsByTagName("p")[0];if(a)a.innerHTML=e;else{var n=t.document.createElement("p");n.id=i.messageID,n.className="loading-message new",n.style.color=i.messageColor,n.style.fontSize=i.messageFontSize;var o=parseInt(i.svgSize),s=Math.round(o-o/4).toString()+"px";n.style.top=s;var r=(1.4*parseInt(i.messageFontSize)).toString()+"px";n.style.height=r,n.innerHTML=e;var l=t.document.getElementById(m.ID);l.appendChild(n);var c=t.document.getElementById(m.ID).getElementsByTagName("div")[0],p="-"+Math.round(o-o/4).toString()+"px";c.style.top=p}}else b("Notiflix Error","Where is the new message?")},T=0,O=function(e,a,n,r,l){if("string"!=typeof a)return b("Notiflix Error","The selector must be a String."),!1;"number"!=typeof l&&(l=0);var c=t.document.querySelectorAll(a);if(0=x?x:c.length;if(e)for(var d=0;dh.length){var k="";n&&("hourglass"===n?k=z(o.svgSize,o.svgColor):"circle"===n?k=C(o.svgSize,o.svgColor):"arrows"===n?k=S(o.svgSize,o.svgColor):"dots"===n?k=I(o.svgSize,o.svgColor):"pulse"===n?k=X(o.svgSize,o.svgColor):k=N(o.svgSize,o.svgColor));var w=parseInt(o.svgSize),v=Math.round(w-w/5).toString()+"px",R=r&&0"+k+"",M="",B=0;"string"==typeof r&&0o.messageMaxLength?f(r).toString().substring(0,o.messageMaxLength)+"...":f(r).toString(),B=Math.round(1.4*parseInt(o.messageFontSize)).toString()+"px",M=""+r+""),T++;var A=t.document.createElement("div");A.id=p.ID+"-"+T,A.className=m+"-wrap"+(o.cssAnimation?" with-animation":""),A.style.position=o.position,A.style.zIndex=o.zindex,A.style.background=o.backgroundColor,A.style.animationDuration=o.cssAnimationDuration+"ms",A.style.fontFamily="\""+o.fontFamily+"\", "+s,o.rtl&&(A.setAttribute("dir","rtl"),A.classList.add("rtl-on")),A.innerHTML=L+M;var F=t.getComputedStyle(u).getPropertyValue("position");F=F&&"string"==typeof F?F.toLowerCase():"relative";var E=t.getComputedStyle(u).getPropertyValue("min-height"),D=E.replace(/[^\d]/g,""),O=Math.round(D),H=Math.round(1.5*(parseInt(B)+w)),P="";O=["absolute","relative","fixed","sticky"].indexOf(F)){var Y="",G=t.document.createRange();G.selectNode(t.document.head);var j=G.createContextualFragment(Y);t.document.head.appendChild(j),u.classList.add(m+"-position")}u.appendChild(A)}}else var q=function(e){var a=setTimeout(function(){e.remove();var n=e.getAttribute("id"),i=t.document.getElementById("Style-"+n);i&&i.remove(),clearTimeout(a)},o.cssAnimationDuration)},U=function(t){if(t&&0div{pointer-events:all;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;width:100%;display:inline-block;position:relative;margin:0 0 10px;border-radius:5px;background:#1e1e1e;color:#fff;padding:10px 12px;font-size:14px;line-height:1.4}[id^=NotiflixNotifyWrap]>div:last-child{margin:0}[id^=NotiflixNotifyWrap]>div.with-callback{cursor:pointer}[id^=NotiflixNotifyWrap]>div.with-icon{padding:8px}[id^=NotiflixNotifyWrap]>div.click-to-close{cursor:pointer}[id^=NotiflixNotifyWrap]>div.with-close-button{padding:10px 30px 10px 12px}[id^=NotiflixNotifyWrap]>div.with-icon.with-close-button{padding:6px 30px 6px 6px}[id^=NotiflixNotifyWrap]>div>span.the-message{font-weight:normal;font-family:inherit!important;word-break:break-all;word-break:break-word}[id^=NotiflixNotifyWrap]>div>span.notify-close-button{cursor:pointer;transition:all .2s ease-in-out;position:absolute;right:8px;top:0;bottom:0;margin:auto;color:inherit;width:16px;height:16px}[id^=NotiflixNotifyWrap]>div>span.notify-close-button:hover{transform:rotate(90deg)}[id^=NotiflixNotifyWrap]>div>span.notify-close-button>svg{position:absolute;width:16px;height:16px;right:0;top:0}[id^=NotiflixNotifyWrap]>div>.nmi{position:absolute;width:40px;height:40px;font-size:30px;line-height:40px;text-align:center;left:8px;top:0;bottom:0;margin:auto;border-radius:inherit}[id^=NotiflixNotifyWrap]>div>.wfa.shadow{color:inherit;background:rgba(0,0,0,.15);box-shadow:inset 0 0 34px rgba(0,0,0,.2);text-shadow:0 0 10px rgba(0,0,0,.3)}[id^=NotiflixNotifyWrap]>div>span.with-icon{position:relative;float:left;width:calc(100% - 40px);margin:0 0 0 40px;padding:0 0 0 10px;box-sizing:border-box}[id^=NotiflixNotifyWrap]>div.rtl-on>.nmi{left:auto;right:8px}[id^=NotiflixNotifyWrap]>div.rtl-on>span.with-icon{padding:0 10px 0 0;margin:0 40px 0 0}[id^=NotiflixNotifyWrap]>div.rtl-on>span.notify-close-button{right:auto;left:8px}[id^=NotiflixNotifyWrap]>div.with-icon.with-close-button.rtl-on{padding:6px 6px 6px 30px}[id^=NotiflixNotifyWrap]>div.with-close-button.rtl-on{padding:10px 12px 10px 30px}[id^=NotiflixNotifyOverlay].with-animation,[id^=NotiflixNotifyWrap]>div.with-animation.nx-fade{animation:notify-animation-fade .3s ease-in-out 0s normal;-webkit-animation:notify-animation-fade .3s ease-in-out 0s normal}@keyframes notify-animation-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes notify-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-zoom{animation:notify-animation-zoom .3s ease-in-out 0s normal;-webkit-animation:notify-animation-zoom .3s ease-in-out 0s normal}@keyframes notify-animation-zoom{0%{transform:scale(0)}50%{transform:scale(1.05)}100%{transform:scale(1)}}@-webkit-keyframes notify-animation-zoom{0%{transform:scale(0)}50%{transform:scale(1.05)}100%{transform:scale(1)}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-right{animation:notify-animation-from-right .3s ease-in-out 0s normal;-webkit-animation:notify-animation-from-right .3s ease-in-out 0s normal}@keyframes notify-animation-from-right{0%{right:-300px;opacity:0}50%{right:8px;opacity:1}100%{right:0;opacity:1}}@-webkit-keyframes notify-animation-from-right{0%{right:-300px;opacity:0}50%{right:8px;opacity:1}100%{right:0;opacity:1}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-left{animation:notify-animation-from-left .3s ease-in-out 0s normal;-webkit-animation:notify-animation-from-left .3s ease-in-out 0s normal}@keyframes notify-animation-from-left{0%{left:-300px;opacity:0}50%{left:8px;opacity:1}100%{left:0;opacity:1}}@-webkit-keyframes notify-animation-from-left{0%{left:-300px;opacity:0}50%{left:8px;opacity:1}100%{left:0;opacity:1}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-top{animation:notify-animation-from-top .3s ease-in-out 0s normal;-webkit-animation:notify-animation-from-top .3s ease-in-out 0s normal}@keyframes notify-animation-from-top{0%{top:-50px;opacity:0}50%{top:8px;opacity:1}100%{top:0;opacity:1}}@-webkit-keyframes notify-animation-from-top{0%{top:-50px;opacity:0}50%{top:8px;opacity:1}100%{top:0;opacity:1}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-bottom{animation:notify-animation-from-bottom .3s ease-in-out 0s normal;-webkit-animation:notify-animation-from-bottom .3s ease-in-out 0s normal}@keyframes notify-animation-from-bottom{0%{bottom:-50px;opacity:0}50%{bottom:8px;opacity:1}100%{bottom:0;opacity:1}}@-webkit-keyframes notify-animation-from-bottom{0%{bottom:-50px;opacity:0}50%{bottom:8px;opacity:1}100%{bottom:0;opacity:1}}[id^=NotiflixNotifyOverlay].with-animation.remove,[id^=NotiflixNotifyWrap]>div.with-animation.nx-fade.remove{opacity:0;animation:notify-remove-fade .3s ease-in-out 0s normal;-webkit-animation:notify-remove-fade .3s ease-in-out 0s normal}@keyframes notify-remove-fade{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes notify-remove-fade{0%{opacity:1}100%{opacity:0}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-zoom.remove{transform:scale(0);animation:notify-remove-zoom .3s ease-in-out 0s normal;-webkit-animation:notify-remove-zoom .3s ease-in-out 0s normal}@keyframes notify-remove-zoom{0%{transform:scale(1)}50%{transform:scale(1.05)}100%{transform:scale(0)}}@-webkit-keyframes notify-remove-zoom{0%{transform:scale(1)}50%{transform:scale(1.05)}100%{transform:scale(0)}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-top.remove{opacity:0;animation:notify-remove-to-top .3s ease-in-out 0s normal;-webkit-animation:notify-remove-to-top .3s ease-in-out 0s normal}@keyframes notify-remove-to-top{0%{top:0;opacity:1}50%{top:8px;opacity:1}100%{top:-50px;opacity:0}}@-webkit-keyframes notify-remove-to-top{0%{top:0;opacity:1}50%{top:8px;opacity:1}100%{top:-50px;opacity:0}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-right.remove{opacity:0;animation:notify-remove-to-right .3s ease-in-out 0s normal;-webkit-animation:notify-remove-to-right .3s ease-in-out 0s normal}@keyframes notify-remove-to-right{0%{right:0;opacity:1}50%{right:8px;opacity:1}100%{right:-300px;opacity:0}}@-webkit-keyframes notify-remove-to-right{0%{right:0;opacity:1}50%{right:8px;opacity:1}100%{right:-300px;opacity:0}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-bottom.remove{opacity:0;animation:notify-remove-to-bottom .3s ease-in-out 0s normal;-webkit-animation:notify-remove-to-bottom .3s ease-in-out 0s normal}@keyframes notify-remove-to-bottom{0%{bottom:0;opacity:1}50%{bottom:8px;opacity:1}100%{bottom:-50px;opacity:0}}@-webkit-keyframes notify-remove-to-bottom{0%{bottom:0;opacity:1}50%{bottom:8px;opacity:1}100%{bottom:-50px;opacity:0}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-left.remove{opacity:0;animation:notify-remove-to-left .3s ease-in-out 0s normal;-webkit-animation:notify-remove-to-left .3s ease-in-out 0s normal}@keyframes notify-remove-to-left{0%{left:0;opacity:1}50%{left:8px;opacity:1}100%{left:-300px;opacity:0}}@-webkit-keyframes notify-remove-to-left{0%{left:0;opacity:1}50%{left:8px;opacity:1}100%{left:-300px;opacity:0}}[id^=NotiflixReportWrap]{position:fixed;z-index:4002;width:320px;max-width:96%;max-height:96vh;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;left:0;right:0;top:20px;color:#1e1e1e;border-radius:25px;background:transparent;margin:auto}[id^=NotiflixReportWrap]::-webkit-scrollbar{width:0;height:0}[id^=NotiflixReportWrap]::-webkit-scrollbar-thumb{background:transparent}[id^=NotiflixReportWrap]::-webkit-scrollbar-track{background:transparent}[id^=NotiflixReportWrap] *{box-sizing:border-box}[id^=NotiflixReportWrap]>div[class*="-overlay"]{width:100%;height:100%;left:0;top:0;background:rgba(255,255,255,.5);position:fixed;z-index:0}[id^=NotiflixReportWrap]>div[class*="-content"]{width:100%;float:left;border-radius:inherit;padding:10px;filter:drop-shadow(0 0 5px rgba(0, 0, 0, .1));border:1px solid rgba(0,0,0,.03);background:#f8f8f8;position:relative;z-index:1}[id^=NotiflixReportWrap]>div[class*="-content"]>div[class$="-icon"]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:110px;height:110px;display:block;margin:6px auto 12px}[id^=NotiflixReportWrap]>div[class*="-content"]>div[class$="-icon"] svg{min-width:100%;max-width:100%;height:auto}[id^=NotiflixReportWrap]>*>h5{word-break:break-all;word-break:break-word;font-family:inherit!important;font-size:16px;font-weight:500;line-height:1.4;margin:0 0 10px;padding:0 0 10px;border-bottom:1px solid rgba(0,0,0,.1);float:left;width:100%;text-align:center}[id^=NotiflixReportWrap]>*>p{word-break:break-all;word-break:break-word;font-family:inherit!important;font-size:13px;line-height:1.4;font-weight:normal;float:left;width:100%;padding:0 10px;margin:0 0 10px}[id^=NotiflixReportWrap] a#NXReportButton{word-break:break-all;word-break:break-word;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:inherit!important;transition:all .25s ease-in-out;cursor:pointer;float:right;padding:7px 17px;background:#32c682;font-size:14px;line-height:1.4;font-weight:500;border-radius:inherit!important;color:#fff}[id^=NotiflixReportWrap] a#NXReportButton:hover{box-shadow:inset 0 -60px 5px -5px rgba(0,0,0,.25)}[id^=NotiflixReportWrap].rtl-on a#NXReportButton{float:left}[id^=NotiflixReportWrap]>div[class*="-overlay"].with-animation{animation:report-overlay-animation .3s ease-in-out 0s normal;-webkit-animation:report-overlay-animation .3s ease-in-out 0s normal}@keyframes report-overlay-animation{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes report-overlay-animation{0%{opacity:0}100%{opacity:1}}[id^=NotiflixReportWrap]>div[class*="-content"].with-animation.nx-fade{animation:report-animation-fade .3s ease-in-out 0s normal;-webkit-animation:report-animation-fade .3s ease-in-out 0s normal}@keyframes report-animation-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes report-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixReportWrap]>div[class*="-content"].with-animation.nx-zoom{animation:report-animation-zoom .3s ease-in-out 0s normal;-webkit-animation:report-animation-zoom .3s ease-in-out 0s normal}@keyframes report-animation-zoom{0%{opacity:0;transform:scale(.5)}50%{opacity:1;transform:scale(1.05)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes report-animation-zoom{0%{opacity:0;transform:scale(.5)}50%{opacity:1;transform:scale(1.05)}100%{opacity:1;transform:scale(1)}}[id^=NotiflixReportWrap].remove>div[class*="-overlay"].with-animation{opacity:0;animation:report-overlay-animation-remove .3s ease-in-out 0s normal;-webkit-animation:report-overlay-animation-remove .3s ease-in-out 0s normal}@keyframes report-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes report-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixReportWrap].remove>div[class*="-content"].with-animation.nx-fade{opacity:0;animation:report-animation-fade-remove .3s ease-in-out 0s normal;-webkit-animation:report-animation-fade-remove .3s ease-in-out 0s normal}@keyframes report-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes report-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixReportWrap].remove>div[class*="-content"].with-animation.nx-zoom{opacity:0;animation:report-animation-zoom-remove .3s ease-in-out 0s normal;-webkit-animation:report-animation-zoom-remove .3s ease-in-out 0s normal}@keyframes report-animation-zoom-remove{0%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.05)}100%{opacity:0;transform:scale(0)}}@-webkit-keyframes report-animation-zoom-remove{0%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.05)}100%{opacity:0;transform:scale(0)}}[id^=NotiflixConfirmWrap]{position:fixed;z-index:4003;width:300px;max-width:96%;max-height:96vh;overflow-x:hidden;overflow-y:auto;left:10px;right:10px;top:10px;margin:auto;text-align:center;box-sizing:border-box;background:transparent;font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}[id^=NotiflixConfirmWrap]::-webkit-scrollbar{width:0;height:0}[id^=NotiflixConfirmWrap]::-webkit-scrollbar-thumb{background:transparent}[id^=NotiflixConfirmWrap]::-webkit-scrollbar-track{background:transparent}[id^=NotiflixConfirmWrap] *{box-sizing:border-box}[id^=NotiflixConfirmWrap]>div[class*="-overlay"]{width:100%;height:100%;left:0;top:0;background:rgba(255,255,255,.5);position:fixed;z-index:0}[id^=NotiflixConfirmWrap]>div[class*="-overlay"].with-animation{animation:confirm-overlay-animation .3s ease-in-out 0s normal;-webkit-animation:confirm-overlay-animation .3s ease-in-out 0s normal}@keyframes confirm-overlay-animation{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes confirm-overlay-animation{0%{opacity:0}100%{opacity:1}}[id^=NotiflixConfirmWrap].remove>div[class*="-overlay"].with-animation{opacity:0;animation:confirm-overlay-animation-remove .3s ease-in-out 0s normal;-webkit-animation:confirm-overlay-animation-remove .3s ease-in-out 0s normal}@keyframes confirm-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes confirm-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixConfirmWrap]>div[class*="-content"]{width:100%;float:left;border-radius:25px;padding:10px;margin:0;filter:drop-shadow(0 0 5px rgba(0, 0, 0, .1));background:#f8f8f8;color:#1e1e1e;position:relative;z-index:1}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]{float:left;width:100%}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>h5{float:left;width:100%;margin:0;padding:0 0 10px;border-bottom:1px solid rgba(0,0,0,.1);color:#32c682;font-family:inherit!important;font-size:16px;line-height:1.4;font-weight:500}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div{font-family:inherit!important;margin:15px 0 20px;padding:0 10px;float:left;width:100%;font-size:14px;line-height:1.4;font-weight:normal;color:inherit}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:inherit;float:left;width:100%}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a{cursor:pointer;font-family:inherit!important;transition:all .25s ease-in-out;float:left;width:48%;padding:9px 5px;border-radius:inherit!important;font-weight:500;font-size:15px;line-height:1.4;color:#f8f8f8}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a.confirm-button-ok{margin:0 2% 0 0;background:#32c682}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a.confirm-button-cancel{margin:0 0 0 2%;background:#a9a9a9}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a.full{margin:0;width:100%}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a:hover{box-shadow:inset 0 -60px 5px -5px rgba(0,0,0,.25)}[id^=NotiflixConfirmWrap].rtl-on>div[class*="-content"]>div[class*="-buttons"],[id^=NotiflixConfirmWrap].rtl-on>div[class*="-content"]>div[class*="-buttons"]>a{transform:rotateY(180deg)}[id^=NotiflixConfirmWrap].with-animation.nx-fade>div[class*="-content"]{animation:confirm-animation-fade .3s ease-in-out 0s normal;-webkit-animation:confirm-animation-fade .3s ease-in-out 0s normal}@keyframes confirm-animation-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes confirm-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixConfirmWrap].with-animation.nx-zoom>div[class*="-content"]{animation:confirm-animation-zoom .3s ease-in-out 0s normal;-webkit-animation:confirm-animation-zoom .3s ease-in-out 0s normal}@keyframes confirm-animation-zoom{0%{opacity:0;transform:scale(.5)}50%{opacity:1;transform:scale(1.05)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes confirm-animation-zoom{0%{opacity:0;transform:scale(.5)}50%{opacity:1;transform:scale(1.05)}100%{opacity:1;transform:scale(1)}}[id^=NotiflixConfirmWrap].with-animation.nx-fade.remove>div[class*="-content"]{opacity:0;animation:confirm-animation-fade-remove .3s ease-in-out 0s normal;-webkit-animation:confirm-animation-fade-remove .3s ease-in-out 0s normal}@keyframes confirm-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes confirm-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixConfirmWrap].with-animation.nx-zoom.remove>div[class*="-content"]{opacity:0;animation:confirm-animation-zoom-remove .3s ease-in-out 0s normal;-webkit-animation:confirm-animation-zoom-remove .3s ease-in-out 0s normal}@keyframes confirm-animation-zoom-remove{0%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.05)}100%{opacity:0;transform:scale(0)}}@-webkit-keyframes confirm-animation-zoom-remove{0%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.05)}100%{opacity:0;transform:scale(0)}}[id^=NotiflixLoadingWrap]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:fixed;z-index:4000;width:100%;height:100%;left:0;top:0;right:0;bottom:0;margin:auto;text-align:center;box-sizing:border-box;background:rgba(0,0,0,.8);font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}[id^=NotiflixLoadingWrap] *{box-sizing:border-box}[id^=NotiflixLoadingWrap].click-to-close{cursor:pointer}[id^=NotiflixLoadingWrap]>div[class*="-icon"]{width:60px;height:60px;position:fixed;transition:top .2s ease-in-out;left:0;top:0;right:0;bottom:0;margin:auto}[id^=NotiflixLoadingWrap]>div[class*="-icon"].with-message{top:-42px}[id^=NotiflixLoadingWrap]>div[class*="-icon"] img,[id^=NotiflixLoadingWrap]>div[class*="-icon"] svg{max-width:unset;max-height:unset;width:100%;height:100%;position:absolute;left:0;top:0}[id^=NotiflixLoadingWrap]>p{position:fixed;left:0;right:0;top:42px;bottom:0;margin:auto;font-family:inherit!important;font-weight:normal;line-height:1.4;padding:0 10px;width:100%;font-size:15px;height:18px}[id^=NotiflixLoadingWrap].with-animation{animation:loading-animation-fade .3s ease-in-out 0s normal;-webkit-animation:loading-animation-fade .3s ease-in-out 0s normal}@keyframes loading-animation-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes loading-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixLoadingWrap].with-animation.remove{opacity:0;animation:loading-animation-fade-remove .3s ease-in-out 0s normal;-webkit-animation:loading-animation-fade-remove .3s ease-in-out 0s normal}@keyframes loading-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes loading-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixLoadingWrap]>p.new{animation:loading-new-message-fade .3s ease-in-out 0s normal;-webkit-animation:loading-new-message-fade .3s ease-in-out 0s normal}@keyframes loading-new-message-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes loading-new-message-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixBlockWrap]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;position:absolute;z-index:1000;font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;background:rgba(255,255,255,.9);text-align:center;animation-duration:.4s;width:100%;height:100%;left:0;top:0;border-radius:inherit}[id^=NotiflixBlockWrap] *{box-sizing:border-box}[id^=NotiflixBlockWrap]>span[class*="-icon"]{width:45px;height:45px;position:absolute;left:0;top:0;right:0;bottom:0;margin:auto}[id^=NotiflixBlockWrap]>span[class*="-message"]{position:absolute;left:0;right:0;top:50px;bottom:0;margin:auto;font-family:inherit!important;font-weight:normal;font-size:14px;line-height:1.4;padding:0 10px;width:100%;height:20px;overflow:hidden}[id^=NotiflixBlockWrap].with-animation{animation:block-animation-fade .3s ease-in-out 0s normal;-webkit-animation:block-animation-fade .3s ease-in-out 0s normal}@keyframes block-animation-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes block-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixBlockWrap].with-animation.remove{opacity:0;animation:block-animation-fade-remove .3s ease-in-out 0s normal;-webkit-animation:block-animation-fade-remove .3s ease-in-out 0s normal}@keyframes block-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes block-animation-fade-remove{0%{opacity:1}100%{opacity:0}} \ No newline at end of file diff --git a/dist/notiflix-2.3.0.min.js b/dist/notiflix-2.3.0.min.js new file mode 100644 index 0000000..4744f0d --- /dev/null +++ b/dist/notiflix-2.3.0.min.js @@ -0,0 +1,3 @@ +/* Notiflix (https://www.notiflix.com) - Version: 2.3.0 - Author: Furkan MT (https://github.com/furcan) - Copyright 2020 Notiflix, MIT Licence (https://opensource.org/licenses/MIT) */ + +(function(t,e){"function"==typeof define&&define.amd?define([],function(){return e(t)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=e(t):t.Notiflix=e(t)})("undefined"==typeof global?"undefined"==typeof window?this:window:global,function(t){'use strict';if("undefined"!=typeof t||"undefined"!=typeof t.document){var e,a,n,i,o,s="-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"",r={wrapID:"NotiflixNotifyWrap",width:"280px",position:"right-top",distance:"10px",opacity:1,borderRadius:"5px",rtl:!1,timeout:3e3,messageMaxLength:110,backOverlay:!1,backOverlayColor:"rgba(0,0,0,0.5)",plainText:!0,showOnlyTheLastOne:!1,clickToClose:!1,ID:"NotiflixNotify",className:"notiflix-notify",zindex:4001,useGoogleFont:!1,fontFamily:"Quicksand",fontSize:"13px",cssAnimation:!0,cssAnimationDuration:400,cssAnimationStyle:"fade",closeButton:!1,useIcon:!0,useFontAwesome:!1,fontAwesomeIconStyle:"basic",fontAwesomeIconSize:"34px",success:{background:"#32c682",textColor:"#fff",childClassName:"success",notiflixIconColor:"rgba(0,0,0,0.2)",fontAwesomeClassName:"fas fa-check-circle",fontAwesomeIconColor:"rgba(0,0,0,0.2)",backOverlayColor:"rgba(50,198,130,0.2)"},failure:{background:"#ff5549",textColor:"#fff",childClassName:"failure",notiflixIconColor:"rgba(0,0,0,0.2)",fontAwesomeClassName:"fas fa-times-circle",fontAwesomeIconColor:"rgba(0,0,0,0.2)",backOverlayColor:"rgba(255,85,73,0.2)"},warning:{background:"#eebf31",textColor:"#fff",childClassName:"warning",notiflixIconColor:"rgba(0,0,0,0.2)",fontAwesomeClassName:"fas fa-exclamation-circle",fontAwesomeIconColor:"rgba(0,0,0,0.2)",backOverlayColor:"rgba(238,191,49,0.2)"},info:{background:"#26c0d3",textColor:"#fff",childClassName:"info",notiflixIconColor:"rgba(0,0,0,0.2)",fontAwesomeClassName:"fas fa-info-circle",fontAwesomeIconColor:"rgba(0,0,0,0.2)",backOverlayColor:"rgba(38,192,211,0.2)"}},l={ID:"NotiflixReportWrap",className:"notiflix-report",width:"320px",backgroundColor:"#f8f8f8",borderRadius:"25px",rtl:!1,zindex:4002,backOverlay:!0,backOverlayColor:"rgba(0,0,0,0.5)",useGoogleFont:!1,fontFamily:"Quicksand",svgSize:"110px",plainText:!0,titleFontSize:"16px",titleMaxLength:34,messageFontSize:"13px",messageMaxLength:400,buttonFontSize:"14px",buttonMaxLength:34,cssAnimation:!0,cssAnimationDuration:360,cssAnimationStyle:"fade",success:{svgColor:"#32c682",titleColor:"#1e1e1e",messageColor:"#242424",buttonBackground:"#32c682",buttonColor:"#fff",backOverlayColor:"rgba(50,198,130,0.2)"},failure:{svgColor:"#ff5549",titleColor:"#1e1e1e",messageColor:"#242424",buttonBackground:"#ff5549",buttonColor:"#fff",backOverlayColor:"rgba(255,85,73,0.2)"},warning:{svgColor:"#eebf31",titleColor:"#1e1e1e",messageColor:"#242424",buttonBackground:"#eebf31",buttonColor:"#fff",backOverlayColor:"rgba(238,191,49,0.2)"},info:{svgColor:"#26c0d3",titleColor:"#1e1e1e",messageColor:"#242424",buttonBackground:"#26c0d3",buttonColor:"#fff",backOverlayColor:"rgba(38,192,211,0.2)"}},c={ID:"NotiflixConfirmWrap",className:"notiflix-confirm",width:"300px",zindex:4003,position:"center",distance:"10px",backgroundColor:"#f8f8f8",borderRadius:"25px",backOverlay:!0,backOverlayColor:"rgba(0,0,0,0.5)",rtl:!1,useGoogleFont:!1,fontFamily:"Quicksand",cssAnimation:!0,cssAnimationStyle:"fade",cssAnimationDuration:300,plainText:!0,titleColor:"#32c682",titleFontSize:"16px",titleMaxLength:34,messageColor:"#1e1e1e",messageFontSize:"14px",messageMaxLength:110,buttonsFontSize:"15px",buttonsMaxLength:34,okButtonColor:"#f8f8f8",okButtonBackground:"#32c682",cancelButtonColor:"#f8f8f8",cancelButtonBackground:"#a9a9a9"},m={ID:"NotiflixLoadingWrap",className:"notiflix-loading",zindex:4e3,backgroundColor:"rgba(0,0,0,0.8)",rtl:!1,useGoogleFont:!1,fontFamily:"Quicksand",cssAnimation:!0,cssAnimationDuration:400,clickToClose:!1,customSvgUrl:null,svgSize:"80px",svgColor:"#32c682",messageID:"NotiflixLoadingMessage",messageFontSize:"15px",messageMaxLength:34,messageColor:"#dcdcdc"},p={ID:"NotiflixBlockWrap",querySelectorLimit:200,className:"notiflix-block",position:"absolute",zindex:1e3,backgroundColor:"rgba(255,255,255,0.9)",rtl:!1,useGoogleFont:!1,fontFamily:"Quicksand",cssAnimation:!0,cssAnimationDuration:300,svgSize:"45px",svgColor:"#383838",messageFontSize:"14px",messageMaxLength:34,messageColor:"#383838"},x=function(){return null},d=function(){if(null!==x()&&!t.document.getElementById("NotiflixInternalCSS")){var e=t.document.createElement("style");e.id="NotiflixInternalCSS",e.innerHTML=x(),t.document.head.appendChild(e)}},g=function(){var t={},e=!1,a=0;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],a++);for(var n=function(a){for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=e&&"[object Object]"===Object.prototype.toString.call(a[n])?g(t[n],a[n]):a[n])};a");t.document.head.appendChild(i);var o=t.document.createRange();o.selectNode(t.document.head);var s=o.createContextualFragment("");t.document.head.appendChild(s)}},b=function(t,e){return console.error("%c "+t+" ","padding:2px;border-radius:20px;color:#fff;background:#ff5549","\n"+e+"\nVisit documentation page to learn more: https://www.notiflix.com/documentation")},y=function(t,e){return console.log("%c "+t+" ","padding:2px;border-radius:20px;color:#fff;background:#26c0d3","\n"+e+"\nVisit documentation page to learn more: https://www.notiflix.com/documentation")},h=function(t,e){t||(t="110px"),e||(e="#32c682");var a="";return a},k=function(t,e){t||(t="110px"),e||(e="#ff5549");var a="";return a},w=function(t,e){t||(t="110px"),e||(e="#eebf31");var a="";return a},v=function(t,e){t||(t="110px"),e||(e="#26c0d3");var a="";return a},N=function(t,e){t||(t="60px"),e||(e="#32c682");var a="";return a},C=function(t,e){t||(t="60px"),e||(e="#32c682");var a=" ";return a},z=function(t,e){t||(t="60px"),e||(e="#32c682");var a="";return a},S=function(t,e){t||(t="60px"),e||(e="#32c682");var a="";return a},I=function(t,e){t||(t="60px"),e||(e="#32c682");var a=" ";return a},X=function(t,e){t||(t="60px"),e||(e="#32c682");var a="";return a},R=function(t,e,a){t||(t="60px"),e||(e="#f8f8f8"),a||(a="#32c682");var n="";return n},L=0,M=0,A=function(a,n,o,l){e||W.Notify.Init({});var c={};"function"==typeof n&&(o=n),"object"!=typeof n||Array.isArray(n)||(c=g(!0,e,{}),e=g(!0,e,n));var m=e[l.toLocaleLowerCase("en")];L++,"function"==typeof o&&M++,"string"!=typeof a&&(a="Notiflix "+l),e.plainText&&(a=f(a)),!e.plainText&&a.length>e.messageMaxLength&&(W.Notify.Merge({closeButton:!0,plainText:!1}),a="HTML Tags Error: Your content length is more than \"messageMaxLength\" option."),a.length>e.messageMaxLength&&(a=a.substring(0,e.messageMaxLength)+"..."),"shadow"===e.fontAwesomeIconStyle&&(m.fontAwesomeIconColor=m.background),e.cssAnimation||(e.cssAnimationDuration=0);var p=t.document.createElement("div");p.id=r.wrapID,p.style.width=e.width,p.style.zIndex=e.zindex,p.style.opacity=e.opacity,"center-center"===e.position?(p.style.left=e.distance,p.style.top=e.distance,p.style.right=e.distance,p.style.bottom=e.distance,p.style.margin="auto",p.classList.add("nx-flex-center-center"),p.style.maxHeight="calc((100vh - "+e.distance+") - "+e.distance+")",p.style.display="flex",p.style.flexWrap="wrap",p.style.flexDirection="column",p.style.justifyContent="center",p.style.alignItems="center",p.style.pointerEvents="none"):"center-top"===e.position?(p.style.left=e.distance,p.style.right=e.distance,p.style.top=e.distance,p.style.bottom="auto",p.style.margin="auto"):"center-bottom"===e.position?(p.style.left=e.distance,p.style.right=e.distance,p.style.bottom=e.distance,p.style.top="auto",p.style.margin="auto"):"right-bottom"===e.position?(p.style.right=e.distance,p.style.bottom=e.distance,p.style.top="auto",p.style.left="auto"):"left-top"===e.position?(p.style.left=e.distance,p.style.top=e.distance,p.style.right="auto",p.style.bottom="auto"):"left-bottom"===e.position?(p.style.left=e.distance,p.style.bottom=e.distance,p.style.top="auto",p.style.right="auto"):(p.style.right=e.distance,p.style.top=e.distance,p.style.left="auto",p.style.bottom="auto");var x;e.backOverlay&&(x=t.document.createElement("div"),x.id=e.ID+"Overlay",x.style.width="100%",x.style.height="100%",x.style.position="fixed",x.style.zIndex=e.zindex,x.style.left=0,x.style.top=0,x.style.right=0,x.style.bottom=0,x.style.background=m.backOverlayColor||e.backOverlayColor,x.className=e.cssAnimation?"with-animation":"",x.style.animationDuration=e.cssAnimation?e.cssAnimationDuration+"ms":"",t.document.getElementById(x.id)?0===M&&(t.document.getElementById(x.id).style.background=m.backOverlayColor||e.backOverlayColor):t.document.body.appendChild(x)),t.document.getElementById(p.id)||t.document.body.appendChild(p);var d=t.document.createElement("div");d.id=e.ID+"-"+L,d.className=e.className+" "+m.childClassName+" "+(e.cssAnimation?"with-animation":"")+" "+(e.useIcon?"with-icon":"")+" nx-"+e.cssAnimationStyle+" "+(e.closeButton&&"function"!=typeof o?"with-close-button":"")+" "+("function"==typeof o?"with-callback":"")+" "+(e.clickToClose?"click-to-close":""),d.style.fontSize=e.fontSize,d.style.color=m.textColor,d.style.background=m.background,d.style.borderRadius=e.borderRadius,d.style.pointerEvents="all",e.rtl&&(d.setAttribute("dir","rtl"),d.classList.add("rtl-on")),d.style.fontFamily="\""+e.fontFamily+"\", "+s,e.cssAnimation&&(d.style.animationDuration=e.cssAnimationDuration+"ms");var u="";if(e.closeButton&&"function"!=typeof o&&(u=""),!e.useIcon)d.innerHTML=""+a+""+(e.closeButton?u:"");else if(e.useFontAwesome)d.innerHTML=""+a+""+(e.closeButton?u:"");else{var b;b="Success"===l?"":"Failure"===l?"":"Warning"===l?"":"Info"===l?"":"",d.innerHTML=b+""+a+""+(e.closeButton?u:"")}if("left-bottom"===e.position||"right-bottom"===e.position){var y=t.document.getElementById(p.id);y.insertBefore(d,y.firstChild)}else t.document.getElementById(p.id).appendChild(d);if(e.useIcon){var h=t.document.getElementById(d.id).querySelectorAll(".nmi")[0],k=40;if(e.useFontAwesome)k=Math.round(parseInt(h.offsetHeight));else{var w=h.getBBox();k=Math.round(parseInt(w.width))}var v=t.document.getElementById(d.id).querySelectorAll("span")[0],N=Math.round(v.offsetHeight);N<=k&&(v.style.paddingTop=(k-N)/2+"px",v.style.paddingBottom=(k-N)/2+"px")}if(t.document.getElementById(d.id)){var C,z=t.document.getElementById(d.id),S=t.document.getElementById(p.id);e.backOverlay&&(C=t.document.getElementById(x.id));var I,X,R=function(){z.classList.add("remove"),e.backOverlay&&0>=S.childElementCount&&C.classList.add("remove"),clearTimeout(I)},A=function(){var a=t.document.getElementById(d.id);a&&null!==z.parentNode&&z.parentNode.removeChild(z),0>=S.childElementCount&&null!==S.parentNode&&(S.parentNode.removeChild(S),e.backOverlay&&null!==C.parentNode&&C.parentNode.removeChild(C)),clearTimeout(X)};if(e.closeButton&&"function"!=typeof o){var B=t.document.getElementById(d.id).querySelectorAll("span.notify-close-button")[0];B.addEventListener("click",function(){R();var t=setTimeout(function(){A(),clearTimeout(t)},e.cssAnimationDuration)})}("function"==typeof o||e.clickToClose)&&z.addEventListener("click",function(){"function"==typeof o&&(M--,o()),R();var t=setTimeout(function(){A(),clearTimeout(t)},e.cssAnimationDuration)}),e.closeButton||"function"==typeof o||(I=setTimeout(function(){R()},e.timeout),X=setTimeout(function(){A()},e.timeout+e.cssAnimationDuration))}if(e.showOnlyTheLastOne&&0
- Albert Einstein":"Failure"===c?n="\"Failure is simply the opportunity to begin again, this time more intelligently.\"

- Henry Ford":"Warning"===c?n="\"The peoples who want to live comfortably without producing and fatigue; they are doomed to lose their dignity, then liberty, and then independence and destiny.\"

- Mustafa Kemal Ataturk":"Info"==c&&(n="\"Knowledge rests not upon truth alone, but upon error also.\"

- Carl Gustav Jung")),"string"!=typeof i&&(i="Okay"),a.plainText&&(e=f(e),n=f(n),i=f(i)),a.plainText||(e.length>a.titleMaxLength&&(e="HTML Tags Error",n="Your Title content length is more than \"titleMaxLength\" option.",i="Okay"),n.length>a.messageMaxLength&&(e="HTML Tags Error",n="Your Message content length is more than \"messageMaxLength\" option.",i="Okay"),i.length>a.buttonMaxLength&&(e="HTML Tags Error",n="Your Button content length is more than \"buttonMaxLength\" option.",i="Okay")),e.length>a.titleMaxLength&&(e=e.substring(0,a.titleMaxLength)+"..."),n.length>a.messageMaxLength&&(n=n.substring(0,a.messageMaxLength)+"..."),i.length>a.buttonMaxLength&&(i=i.substring(0,a.buttonMaxLength)+"..."),a.cssAnimation||(a.cssAnimationDuration=0);var x=t.document.createElement("div");x.id=l.ID,x.className=a.className,x.style.width=a.width,x.style.zIndex=a.zindex,x.style.borderRadius=a.borderRadius,x.style.fontFamily="\""+a.fontFamily+"\", "+s,a.rtl&&(x.setAttribute("dir","rtl"),x.classList.add("rtl-on"));var d="";a.backOverlay&&(d="
");var u="";if("Success"===c?u=h(a.svgSize,p.svgColor):"Failure"===c?u=k(a.svgSize,p.svgColor):"Warning"===c?u=w(a.svgSize,p.svgColor):"Info"==c&&(u=v(a.svgSize,p.svgColor)),x.innerHTML=d+"
"+u+"
"+e+"

"+n+"

"+i+"
",!t.document.getElementById(x.id)){t.document.body.appendChild(x);var b=Math.round(t.innerHeight),y=Math.round(t.document.getElementById(x.id).offsetHeight);x.style.top=(b-y)/2+"px";var N=t.document.getElementById(x.id),C=t.document.getElementById("NXReportButton");C.addEventListener("click",function(){"function"==typeof r&&r(),N.classList.add("remove");var t=setTimeout(function(){null!==N.parentNode&&N.parentNode.removeChild(N),clearTimeout(t)},a.cssAnimationDuration)})}a=g(!0,a,m)},F=function(e,a,i,o,r,l){n||W.Confirm.Init({}),"string"!=typeof e&&(e="Notiflix Confirm"),"string"!=typeof a&&(a="Do you agree with me?"),"string"!=typeof i&&(i="Yes"),"string"!=typeof o&&(o="No"),"function"!=typeof r&&(r=void 0),"function"!=typeof l&&(l=void 0),n.plainText&&(e=f(e),a=f(a),i=f(i),o=f(o)),n.plainText||(e.length>n.titleMaxLength&&(e="HTML Tags Error",a="Your Title content length is more than \"titleMaxLength\" option.",i="Okay",o="..."),a.length>n.messageMaxLength&&(e="HTML Tags Error",a="Your Message content length is more than \"messageMaxLength\" option.",i="Okay",o="..."),(i.length||o.length)>n.buttonsMaxLength&&(e="HTML Tags Error",a="Your Buttons contents length is more than \"buttonsMaxLength\" option.",i="Okay",o="...")),e.length>n.titleMaxLength&&(e=e.substring(0,n.titleMaxLength)+"..."),a.length>n.messageMaxLength&&(a=a.substring(0,n.messageMaxLength)+"..."),i.length>n.buttonsMaxLength&&(i=i.substring(0,n.buttonsMaxLength)+"..."),o.length>n.buttonsMaxLength&&(o=o.substring(0,n.buttonsMaxLength)+"..."),n.cssAnimation||(n.cssAnimationDuration=0);var m=t.document.createElement("div");m.id=c.ID,m.className=n.className+(n.cssAnimation?" with-animation nx-"+n.cssAnimationStyle:""),m.style.width=n.width,m.style.zIndex=n.zindex,n.rtl&&(m.setAttribute("dir","rtl"),m.classList.add("rtl-on")),m.style.fontFamily="\""+n.fontFamily+"\", "+s;var p="";n.backOverlay&&(p="
");var x="";if("function"==typeof r&&(x=""+o+""),m.innerHTML=p+"
"+e+"
"+a+"
"+i+""+x+"
",!t.document.getElementById(m.id)){if(t.document.body.appendChild(m),"center"===n.position){var d=Math.round(t.innerHeight),g=Math.round(t.document.getElementById(m.id).offsetHeight);m.style.top=(d-g)/2+"px",m.style.left=n.distance,m.style.right=n.distance,m.style.bottom="auto",m.style.margin="auto"}else"right-top"===n.position?(m.style.right=n.distance,m.style.top=n.distance,m.style.bottom="auto",m.style.left="auto",m.style.margin="auto"):"right-bottom"===n.position?(m.style.right=n.distance,m.style.bottom=n.distance,m.style.top="auto",m.style.left="auto",m.style.margin="auto"):"left-top"===n.position?(m.style.left=n.distance,m.style.top=n.distance,m.style.right="auto",m.style.bottom="auto",m.style.margin="auto"):"left-bottom"===n.position?(m.style.left=n.distance,m.style.bottom=n.distance,m.style.top="auto",m.style.right="auto",m.style.margin="auto"):(m.style.top=n.distance,m.style.left=0,m.style.right=0,m.style.bottom="auto",m.style.margin="auto");var u=t.document.getElementById(m.id),b=t.document.getElementById("NXConfirmButtonOk");if(b.addEventListener("click",function(){"function"==typeof r&&r(),u.classList.add("remove");var t=setTimeout(function(){null!==u.parentNode&&(u.parentNode.removeChild(u),clearTimeout(t))},n.cssAnimationDuration)}),"function"==typeof r){var y=t.document.getElementById("NXConfirmButtonCancel");y.addEventListener("click",function(){"function"==typeof l&&l(),u.classList.add("remove");var t=setTimeout(function(){null!==u.parentNode&&(u.parentNode.removeChild(u),clearTimeout(t))},n.cssAnimationDuration)})}}},E=function(e,a,n,o){if(i||W.Loading.Init({}),"string"!=typeof e&&(e=""),n){e=e.toString().length>i.messageMaxLength?f(e).toString().substring(0,i.messageMaxLength)+"...":f(e).toString();var r=parseInt(i.svgSize),l="";if(0"+e+"

"}i.cssAnimation||(i.cssAnimationDuration=0);var x="";if("standard"===a)x=N(i.svgSize,i.svgColor);else if("hourglass"===a)x=C(i.svgSize,i.svgColor);else if("circle"===a)x=z(i.svgSize,i.svgColor);else if("arrows"===a)x=S(i.svgSize,i.svgColor);else if("dots"===a)x=I(i.svgSize,i.svgColor);else if("pulse"===a)x=X(i.svgSize,i.svgColor);else if("custom"===a&&null!==i.customSvgUrl)x="\"Notiflix\"";else{if("custom"===a&&null==i.customSvgUrl)return b("Notiflix Error","You have to set a static SVG url to \"customSvgUrl\" option to use Loading Custom."),!1;"notiflix"===a&&(x=R(i.svgSize,"#f8f8f8","#32c682"))}var d=0;0"+x+"",u=t.document.createElement("div");if(u.id=m.ID,u.className=i.className+(i.cssAnimation?" with-animation":"")+(i.clickToClose?" click-to-close":""),u.style.zIndex=i.zindex,u.style.background=i.backgroundColor,u.style.animationDuration=i.cssAnimationDuration+"ms",u.style.fontFamily="\""+i.fontFamily+"\", "+s,i.rtl&&(u.setAttribute("dir","rtl"),u.classList.add("rtl-on")),u.innerHTML=g+l,!t.document.getElementById(u.id)&&(t.document.body.appendChild(u),i.clickToClose)){var y=t.document.getElementById(u.id);y.addEventListener("click",function(){u.classList.add("remove");var t=setTimeout(function(){null!==u.parentNode&&(u.parentNode.removeChild(u),clearTimeout(t))},i.cssAnimationDuration)})}}else if(t.document.getElementById(m.ID))var h=t.document.getElementById(m.ID),k=setTimeout(function(){h.classList.add("remove");var t=setTimeout(function(){null!==h.parentNode&&(h.parentNode.removeChild(h),clearTimeout(t))},i.cssAnimationDuration);clearTimeout(k)},o)},D=function(e){if("string"!=typeof e&&(e=""),t.document.getElementById(m.ID))if(0i.messageMaxLength?f(e).toString().substring(0,i.messageMaxLength)+"...":f(e).toString();var a=t.document.getElementById(m.ID).getElementsByTagName("p")[0];if(a)a.innerHTML=e;else{var n=t.document.createElement("p");n.id=i.messageID,n.className="loading-message new",n.style.color=i.messageColor,n.style.fontSize=i.messageFontSize;var o=parseInt(i.svgSize),s=Math.round(o-o/4).toString()+"px";n.style.top=s;var r=(1.4*parseInt(i.messageFontSize)).toString()+"px";n.style.height=r,n.innerHTML=e;var l=t.document.getElementById(m.ID);l.appendChild(n);var c=t.document.getElementById(m.ID).getElementsByTagName("div")[0],p="-"+Math.round(o-o/4).toString()+"px";c.style.top=p}}else b("Notiflix Error","Where is the new message?")},T=0,O=function(e,a,n,r,l){if("string"!=typeof a)return b("Notiflix Error","The selector must be a String."),!1;"number"!=typeof l&&(l=0);var c=t.document.querySelectorAll(a);if(0=x?x:c.length;if(e)for(var g=0;gh.length){var k="";n&&("hourglass"===n?k=C(o.svgSize,o.svgColor):"circle"===n?k=z(o.svgSize,o.svgColor):"arrows"===n?k=S(o.svgSize,o.svgColor):"dots"===n?k=I(o.svgSize,o.svgColor):"pulse"===n?k=X(o.svgSize,o.svgColor):k=N(o.svgSize,o.svgColor));var w=parseInt(o.svgSize),v=Math.round(w-w/5).toString()+"px",R=r&&0"+k+"",M="",A=0;"string"==typeof r&&0o.messageMaxLength?f(r).toString().substring(0,o.messageMaxLength)+"...":f(r).toString(),A=Math.round(1.4*parseInt(o.messageFontSize)).toString()+"px",M=""+r+""),T++;var B=t.document.createElement("div");B.id=p.ID+"-"+T,B.className=m+"-wrap"+(o.cssAnimation?" with-animation":""),B.style.position=o.position,B.style.zIndex=o.zindex,B.style.background=o.backgroundColor,B.style.animationDuration=o.cssAnimationDuration+"ms",B.style.fontFamily="\""+o.fontFamily+"\", "+s,o.rtl&&(B.setAttribute("dir","rtl"),B.classList.add("rtl-on")),B.innerHTML=L+M;var F=t.getComputedStyle(u).getPropertyValue("position");F=F&&"string"==typeof F?F.toLowerCase():"relative";var E=t.getComputedStyle(u).getPropertyValue("min-height"),D=E.replace(/[^\d]/g,""),O=Math.round(D),H=Math.round(1.5*(parseInt(A)+w)),P="";O=["absolute","relative","fixed","sticky"].indexOf(F)){var Y="",j=t.document.createRange();j.selectNode(t.document.head);var G=j.createContextualFragment(Y);t.document.head.appendChild(G),u.classList.add(m+"-position")}u.appendChild(B)}}else var q=function(e){var a=setTimeout(function(){e.remove();var n=e.getAttribute("id"),i=t.document.getElementById("Style-"+n);i&&i.remove(),clearTimeout(a)},o.cssAnimationDuration)},U=function(t){if(t&&0div{pointer-events:all;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:\"Quicksand\",-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif;width:100%;display:inline-block;position:relative;margin:0 0 10px;border-radius:5px;background:#1e1e1e;color:#fff;padding:10px 12px;font-size:14px;line-height:1.4}[id^=NotiflixNotifyWrap]>div:last-child{margin:0}[id^=NotiflixNotifyWrap]>div.with-callback{cursor:pointer}[id^=NotiflixNotifyWrap]>div.with-icon{padding:8px}[id^=NotiflixNotifyWrap]>div.click-to-close{cursor:pointer}[id^=NotiflixNotifyWrap]>div.with-close-button{padding:10px 30px 10px 12px}[id^=NotiflixNotifyWrap]>div.with-icon.with-close-button{padding:6px 30px 6px 6px}[id^=NotiflixNotifyWrap]>div>span.the-message{font-weight:normal;font-family:inherit!important;word-break:break-all;word-break:break-word}[id^=NotiflixNotifyWrap]>div>span.notify-close-button{cursor:pointer;transition:all .2s ease-in-out;position:absolute;right:8px;top:0;bottom:0;margin:auto;color:inherit;width:16px;height:16px}[id^=NotiflixNotifyWrap]>div>span.notify-close-button:hover{transform:rotate(90deg)}[id^=NotiflixNotifyWrap]>div>span.notify-close-button>svg{position:absolute;width:16px;height:16px;right:0;top:0}[id^=NotiflixNotifyWrap]>div>.nmi{position:absolute;width:40px;height:40px;font-size:30px;line-height:40px;text-align:center;left:8px;top:0;bottom:0;margin:auto;border-radius:inherit}[id^=NotiflixNotifyWrap]>div>.wfa.shadow{color:inherit;background:rgba(0,0,0,.15);box-shadow:inset 0 0 34px rgba(0,0,0,.2);text-shadow:0 0 10px rgba(0,0,0,.3)}[id^=NotiflixNotifyWrap]>div>span.with-icon{position:relative;float:left;width:calc(100% - 40px);margin:0 0 0 40px;padding:0 0 0 10px;box-sizing:border-box}[id^=NotiflixNotifyWrap]>div.rtl-on>.nmi{left:auto;right:8px}[id^=NotiflixNotifyWrap]>div.rtl-on>span.with-icon{padding:0 10px 0 0;margin:0 40px 0 0}[id^=NotiflixNotifyWrap]>div.rtl-on>span.notify-close-button{right:auto;left:8px}[id^=NotiflixNotifyWrap]>div.with-icon.with-close-button.rtl-on{padding:6px 6px 6px 30px}[id^=NotiflixNotifyWrap]>div.with-close-button.rtl-on{padding:10px 12px 10px 30px}[id^=NotiflixNotifyOverlay].with-animation,[id^=NotiflixNotifyWrap]>div.with-animation.nx-fade{animation:notify-animation-fade .3s ease-in-out 0s normal;-webkit-animation:notify-animation-fade .3s ease-in-out 0s normal}@keyframes notify-animation-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes notify-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-zoom{animation:notify-animation-zoom .3s ease-in-out 0s normal;-webkit-animation:notify-animation-zoom .3s ease-in-out 0s normal}@keyframes notify-animation-zoom{0%{transform:scale(0)}50%{transform:scale(1.05)}100%{transform:scale(1)}}@-webkit-keyframes notify-animation-zoom{0%{transform:scale(0)}50%{transform:scale(1.05)}100%{transform:scale(1)}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-right{animation:notify-animation-from-right .3s ease-in-out 0s normal;-webkit-animation:notify-animation-from-right .3s ease-in-out 0s normal}@keyframes notify-animation-from-right{0%{right:-300px;opacity:0}50%{right:8px;opacity:1}100%{right:0;opacity:1}}@-webkit-keyframes notify-animation-from-right{0%{right:-300px;opacity:0}50%{right:8px;opacity:1}100%{right:0;opacity:1}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-left{animation:notify-animation-from-left .3s ease-in-out 0s normal;-webkit-animation:notify-animation-from-left .3s ease-in-out 0s normal}@keyframes notify-animation-from-left{0%{left:-300px;opacity:0}50%{left:8px;opacity:1}100%{left:0;opacity:1}}@-webkit-keyframes notify-animation-from-left{0%{left:-300px;opacity:0}50%{left:8px;opacity:1}100%{left:0;opacity:1}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-top{animation:notify-animation-from-top .3s ease-in-out 0s normal;-webkit-animation:notify-animation-from-top .3s ease-in-out 0s normal}@keyframes notify-animation-from-top{0%{top:-50px;opacity:0}50%{top:8px;opacity:1}100%{top:0;opacity:1}}@-webkit-keyframes notify-animation-from-top{0%{top:-50px;opacity:0}50%{top:8px;opacity:1}100%{top:0;opacity:1}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-bottom{animation:notify-animation-from-bottom .3s ease-in-out 0s normal;-webkit-animation:notify-animation-from-bottom .3s ease-in-out 0s normal}@keyframes notify-animation-from-bottom{0%{bottom:-50px;opacity:0}50%{bottom:8px;opacity:1}100%{bottom:0;opacity:1}}@-webkit-keyframes notify-animation-from-bottom{0%{bottom:-50px;opacity:0}50%{bottom:8px;opacity:1}100%{bottom:0;opacity:1}}[id^=NotiflixNotifyOverlay].with-animation.remove,[id^=NotiflixNotifyWrap]>div.with-animation.nx-fade.remove{opacity:0;animation:notify-remove-fade .3s ease-in-out 0s normal;-webkit-animation:notify-remove-fade .3s ease-in-out 0s normal}@keyframes notify-remove-fade{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes notify-remove-fade{0%{opacity:1}100%{opacity:0}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-zoom.remove{transform:scale(0);animation:notify-remove-zoom .3s ease-in-out 0s normal;-webkit-animation:notify-remove-zoom .3s ease-in-out 0s normal}@keyframes notify-remove-zoom{0%{transform:scale(1)}50%{transform:scale(1.05)}100%{transform:scale(0)}}@-webkit-keyframes notify-remove-zoom{0%{transform:scale(1)}50%{transform:scale(1.05)}100%{transform:scale(0)}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-top.remove{opacity:0;animation:notify-remove-to-top .3s ease-in-out 0s normal;-webkit-animation:notify-remove-to-top .3s ease-in-out 0s normal}@keyframes notify-remove-to-top{0%{top:0;opacity:1}50%{top:8px;opacity:1}100%{top:-50px;opacity:0}}@-webkit-keyframes notify-remove-to-top{0%{top:0;opacity:1}50%{top:8px;opacity:1}100%{top:-50px;opacity:0}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-right.remove{opacity:0;animation:notify-remove-to-right .3s ease-in-out 0s normal;-webkit-animation:notify-remove-to-right .3s ease-in-out 0s normal}@keyframes notify-remove-to-right{0%{right:0;opacity:1}50%{right:8px;opacity:1}100%{right:-300px;opacity:0}}@-webkit-keyframes notify-remove-to-right{0%{right:0;opacity:1}50%{right:8px;opacity:1}100%{right:-300px;opacity:0}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-bottom.remove{opacity:0;animation:notify-remove-to-bottom .3s ease-in-out 0s normal;-webkit-animation:notify-remove-to-bottom .3s ease-in-out 0s normal}@keyframes notify-remove-to-bottom{0%{bottom:0;opacity:1}50%{bottom:8px;opacity:1}100%{bottom:-50px;opacity:0}}@-webkit-keyframes notify-remove-to-bottom{0%{bottom:0;opacity:1}50%{bottom:8px;opacity:1}100%{bottom:-50px;opacity:0}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-left.remove{opacity:0;animation:notify-remove-to-left .3s ease-in-out 0s normal;-webkit-animation:notify-remove-to-left .3s ease-in-out 0s normal}@keyframes notify-remove-to-left{0%{left:0;opacity:1}50%{left:8px;opacity:1}100%{left:-300px;opacity:0}}@-webkit-keyframes notify-remove-to-left{0%{left:0;opacity:1}50%{left:8px;opacity:1}100%{left:-300px;opacity:0}}[id^=NotiflixReportWrap]{position:fixed;z-index:4002;width:320px;max-width:96%;max-height:96vh;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;font-family:\"Quicksand\",-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif;left:0;right:0;top:20px;color:#1e1e1e;border-radius:25px;background:transparent;margin:auto}[id^=NotiflixReportWrap]::-webkit-scrollbar{width:0;height:0}[id^=NotiflixReportWrap]::-webkit-scrollbar-thumb{background:transparent}[id^=NotiflixReportWrap]::-webkit-scrollbar-track{background:transparent}[id^=NotiflixReportWrap] *{box-sizing:border-box}[id^=NotiflixReportWrap]>div[class*=\"-overlay\"]{width:100%;height:100%;left:0;top:0;background:rgba(255,255,255,.5);position:fixed;z-index:0}[id^=NotiflixReportWrap]>div[class*=\"-content\"]{width:100%;float:left;border-radius:inherit;padding:10px;filter:drop-shadow(0 0 5px rgba(0, 0, 0, .1));border:1px solid rgba(0,0,0,.03);background:#f8f8f8;position:relative;z-index:1}[id^=NotiflixReportWrap]>div[class*=\"-content\"]>div[class$=\"-icon\"]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:110px;height:110px;display:block;margin:6px auto 12px}[id^=NotiflixReportWrap]>div[class*=\"-content\"]>div[class$=\"-icon\"] svg{min-width:100%;max-width:100%;height:auto}[id^=NotiflixReportWrap]>*>h5{word-break:break-all;word-break:break-word;font-family:inherit!important;font-size:16px;font-weight:500;line-height:1.4;margin:0 0 10px;padding:0 0 10px;border-bottom:1px solid rgba(0,0,0,.1);float:left;width:100%;text-align:center}[id^=NotiflixReportWrap]>*>p{word-break:break-all;word-break:break-word;font-family:inherit!important;font-size:13px;line-height:1.4;font-weight:normal;float:left;width:100%;padding:0 10px;margin:0 0 10px}[id^=NotiflixReportWrap] a#NXReportButton{word-break:break-all;word-break:break-word;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:inherit!important;transition:all .25s ease-in-out;cursor:pointer;float:right;padding:7px 17px;background:#32c682;font-size:14px;line-height:1.4;font-weight:500;border-radius:inherit!important;color:#fff}[id^=NotiflixReportWrap] a#NXReportButton:hover{box-shadow:inset 0 -60px 5px -5px rgba(0,0,0,.25)}[id^=NotiflixReportWrap].rtl-on a#NXReportButton{float:left}[id^=NotiflixReportWrap]>div[class*=\"-overlay\"].with-animation{animation:report-overlay-animation .3s ease-in-out 0s normal;-webkit-animation:report-overlay-animation .3s ease-in-out 0s normal}@keyframes report-overlay-animation{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes report-overlay-animation{0%{opacity:0}100%{opacity:1}}[id^=NotiflixReportWrap]>div[class*=\"-content\"].with-animation.nx-fade{animation:report-animation-fade .3s ease-in-out 0s normal;-webkit-animation:report-animation-fade .3s ease-in-out 0s normal}@keyframes report-animation-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes report-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixReportWrap]>div[class*=\"-content\"].with-animation.nx-zoom{animation:report-animation-zoom .3s ease-in-out 0s normal;-webkit-animation:report-animation-zoom .3s ease-in-out 0s normal}@keyframes report-animation-zoom{0%{opacity:0;transform:scale(.5)}50%{opacity:1;transform:scale(1.05)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes report-animation-zoom{0%{opacity:0;transform:scale(.5)}50%{opacity:1;transform:scale(1.05)}100%{opacity:1;transform:scale(1)}}[id^=NotiflixReportWrap].remove>div[class*=\"-overlay\"].with-animation{opacity:0;animation:report-overlay-animation-remove .3s ease-in-out 0s normal;-webkit-animation:report-overlay-animation-remove .3s ease-in-out 0s normal}@keyframes report-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes report-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixReportWrap].remove>div[class*=\"-content\"].with-animation.nx-fade{opacity:0;animation:report-animation-fade-remove .3s ease-in-out 0s normal;-webkit-animation:report-animation-fade-remove .3s ease-in-out 0s normal}@keyframes report-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes report-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixReportWrap].remove>div[class*=\"-content\"].with-animation.nx-zoom{opacity:0;animation:report-animation-zoom-remove .3s ease-in-out 0s normal;-webkit-animation:report-animation-zoom-remove .3s ease-in-out 0s normal}@keyframes report-animation-zoom-remove{0%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.05)}100%{opacity:0;transform:scale(0)}}@-webkit-keyframes report-animation-zoom-remove{0%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.05)}100%{opacity:0;transform:scale(0)}}[id^=NotiflixConfirmWrap]{position:fixed;z-index:4003;width:300px;max-width:96%;max-height:96vh;overflow-x:hidden;overflow-y:auto;left:10px;right:10px;top:10px;margin:auto;text-align:center;box-sizing:border-box;background:transparent;font-family:\"Quicksand\",-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif}[id^=NotiflixConfirmWrap]::-webkit-scrollbar{width:0;height:0}[id^=NotiflixConfirmWrap]::-webkit-scrollbar-thumb{background:transparent}[id^=NotiflixConfirmWrap]::-webkit-scrollbar-track{background:transparent}[id^=NotiflixConfirmWrap] *{box-sizing:border-box}[id^=NotiflixConfirmWrap]>div[class*=\"-overlay\"]{width:100%;height:100%;left:0;top:0;background:rgba(255,255,255,.5);position:fixed;z-index:0}[id^=NotiflixConfirmWrap]>div[class*=\"-overlay\"].with-animation{animation:confirm-overlay-animation .3s ease-in-out 0s normal;-webkit-animation:confirm-overlay-animation .3s ease-in-out 0s normal}@keyframes confirm-overlay-animation{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes confirm-overlay-animation{0%{opacity:0}100%{opacity:1}}[id^=NotiflixConfirmWrap].remove>div[class*=\"-overlay\"].with-animation{opacity:0;animation:confirm-overlay-animation-remove .3s ease-in-out 0s normal;-webkit-animation:confirm-overlay-animation-remove .3s ease-in-out 0s normal}@keyframes confirm-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes confirm-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]{width:100%;float:left;border-radius:25px;padding:10px;margin:0;filter:drop-shadow(0 0 5px rgba(0, 0, 0, .1));background:#f8f8f8;color:#1e1e1e;position:relative;z-index:1}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-head\"]{float:left;width:100%}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-head\"]>h5{float:left;width:100%;margin:0;padding:0 0 10px;border-bottom:1px solid rgba(0,0,0,.1);color:#32c682;font-family:inherit!important;font-size:16px;line-height:1.4;font-weight:500}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-head\"]>div{font-family:inherit!important;margin:15px 0 20px;padding:0 10px;float:left;width:100%;font-size:14px;line-height:1.4;font-weight:normal;color:inherit}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-buttons\"]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:inherit;float:left;width:100%}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-buttons\"]>a{cursor:pointer;font-family:inherit!important;transition:all .25s ease-in-out;float:left;width:48%;padding:9px 5px;border-radius:inherit!important;font-weight:500;font-size:15px;line-height:1.4;color:#f8f8f8}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-buttons\"]>a.confirm-button-ok{margin:0 2% 0 0;background:#32c682}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-buttons\"]>a.confirm-button-cancel{margin:0 0 0 2%;background:#a9a9a9}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-buttons\"]>a.full{margin:0;width:100%}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-buttons\"]>a:hover{box-shadow:inset 0 -60px 5px -5px rgba(0,0,0,.25)}[id^=NotiflixConfirmWrap].rtl-on>div[class*=\"-content\"]>div[class*=\"-buttons\"],[id^=NotiflixConfirmWrap].rtl-on>div[class*=\"-content\"]>div[class*=\"-buttons\"]>a{transform:rotateY(180deg)}[id^=NotiflixConfirmWrap].with-animation.nx-fade>div[class*=\"-content\"]{animation:confirm-animation-fade .3s ease-in-out 0s normal;-webkit-animation:confirm-animation-fade .3s ease-in-out 0s normal}@keyframes confirm-animation-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes confirm-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixConfirmWrap].with-animation.nx-zoom>div[class*=\"-content\"]{animation:confirm-animation-zoom .3s ease-in-out 0s normal;-webkit-animation:confirm-animation-zoom .3s ease-in-out 0s normal}@keyframes confirm-animation-zoom{0%{opacity:0;transform:scale(.5)}50%{opacity:1;transform:scale(1.05)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes confirm-animation-zoom{0%{opacity:0;transform:scale(.5)}50%{opacity:1;transform:scale(1.05)}100%{opacity:1;transform:scale(1)}}[id^=NotiflixConfirmWrap].with-animation.nx-fade.remove>div[class*=\"-content\"]{opacity:0;animation:confirm-animation-fade-remove .3s ease-in-out 0s normal;-webkit-animation:confirm-animation-fade-remove .3s ease-in-out 0s normal}@keyframes confirm-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes confirm-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixConfirmWrap].with-animation.nx-zoom.remove>div[class*=\"-content\"]{opacity:0;animation:confirm-animation-zoom-remove .3s ease-in-out 0s normal;-webkit-animation:confirm-animation-zoom-remove .3s ease-in-out 0s normal}@keyframes confirm-animation-zoom-remove{0%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.05)}100%{opacity:0;transform:scale(0)}}@-webkit-keyframes confirm-animation-zoom-remove{0%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.05)}100%{opacity:0;transform:scale(0)}}[id^=NotiflixLoadingWrap]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:fixed;z-index:4000;width:100%;height:100%;left:0;top:0;right:0;bottom:0;margin:auto;text-align:center;box-sizing:border-box;background:rgba(0,0,0,.8);font-family:\"Quicksand\",-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif}[id^=NotiflixLoadingWrap] *{box-sizing:border-box}[id^=NotiflixLoadingWrap].click-to-close{cursor:pointer}[id^=NotiflixLoadingWrap]>div[class*=\"-icon\"]{width:60px;height:60px;position:fixed;transition:top .2s ease-in-out;left:0;top:0;right:0;bottom:0;margin:auto}[id^=NotiflixLoadingWrap]>div[class*=\"-icon\"].with-message{top:-42px}[id^=NotiflixLoadingWrap]>div[class*=\"-icon\"] img,[id^=NotiflixLoadingWrap]>div[class*=\"-icon\"] svg{max-width:unset;max-height:unset;width:100%;height:100%;position:absolute;left:0;top:0}[id^=NotiflixLoadingWrap]>p{position:fixed;left:0;right:0;top:42px;bottom:0;margin:auto;font-family:inherit!important;font-weight:normal;line-height:1.4;padding:0 10px;width:100%;font-size:15px;height:18px}[id^=NotiflixLoadingWrap].with-animation{animation:loading-animation-fade .3s ease-in-out 0s normal;-webkit-animation:loading-animation-fade .3s ease-in-out 0s normal}@keyframes loading-animation-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes loading-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixLoadingWrap].with-animation.remove{opacity:0;animation:loading-animation-fade-remove .3s ease-in-out 0s normal;-webkit-animation:loading-animation-fade-remove .3s ease-in-out 0s normal}@keyframes loading-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes loading-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixLoadingWrap]>p.new{animation:loading-new-message-fade .3s ease-in-out 0s normal;-webkit-animation:loading-new-message-fade .3s ease-in-out 0s normal}@keyframes loading-new-message-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes loading-new-message-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixBlockWrap]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;position:absolute;z-index:1000;font-family:\"Quicksand\",-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif;background:rgba(255,255,255,.9);text-align:center;animation-duration:.4s;width:100%;height:100%;left:0;top:0;border-radius:inherit}[id^=NotiflixBlockWrap] *{box-sizing:border-box}[id^=NotiflixBlockWrap]>span[class*=\"-icon\"]{width:45px;height:45px;position:absolute;left:0;top:0;right:0;bottom:0;margin:auto}[id^=NotiflixBlockWrap]>span[class*=\"-message\"]{position:absolute;left:0;right:0;top:50px;bottom:0;margin:auto;font-family:inherit!important;font-weight:normal;font-size:14px;line-height:1.4;padding:0 10px;width:100%;height:20px;overflow:hidden}[id^=NotiflixBlockWrap].with-animation{animation:block-animation-fade .3s ease-in-out 0s normal;-webkit-animation:block-animation-fade .3s ease-in-out 0s normal}@keyframes block-animation-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes block-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixBlockWrap].with-animation.remove{opacity:0;animation:block-animation-fade-remove .3s ease-in-out 0s normal;-webkit-animation:block-animation-fade-remove .3s ease-in-out 0s normal}@keyframes block-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes block-animation-fade-remove{0%{opacity:1}100%{opacity:0}}"},d=function(){if(null!==f()&&!t.document.getElementById("NotiflixInternalCSS")){var e=t.document.createElement("style");e.id="NotiflixInternalCSS",e.innerHTML=f(),t.document.head.appendChild(e)}},x=function(){var t={},e=!1,a=0;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],a++);for(var o=function(i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=e&&"[object Object]"===Object.prototype.toString.call(i[a])?x(t[a],i[a]):i[a])};a");t.document.head.appendChild(o);var n=t.document.createRange();n.selectNode(t.document.head);var r=n.createContextualFragment("");t.document.head.appendChild(r)}},y=function(t,e){return console.error("%c "+t+" ","padding:2px;border-radius:20px;color:#fff;background:#ff5549","\n"+e+"\nVisit documentation page to learn more: https://www.notiflix.com/documentation")},b=function(t,e){return console.log("%c "+t+" ","padding:2px;border-radius:20px;color:#fff;background:#26c0d3","\n"+e+"\nVisit documentation page to learn more: https://www.notiflix.com/documentation")},h=function(t,e){t||(t="110px"),e||(e="#32c682");var i="";return i},k=function(t,e){t||(t="110px"),e||(e="#ff5549");var i="";return i},w=function(t,e){t||(t="110px"),e||(e="#eebf31");var i="";return i},v=function(t,e){t||(t="110px"),e||(e="#26c0d3");var i="";return i},N=function(t,e){t||(t="60px"),e||(e="#32c682");var i="";return i},z=function(t,e){t||(t="60px"),e||(e="#32c682");var i=" ";return i},C=function(t,e){t||(t="60px"),e||(e="#32c682");var i="";return i},S=function(t,e){t||(t="60px"),e||(e="#32c682");var i="";return i},R=function(t,e){t||(t="60px"),e||(e="#32c682");var i=" ";return i},I=function(t,e){t||(t="60px"),e||(e="#32c682");var i="";return i},X=function(t,e,i){t||(t="60px"),e||(e="#f8f8f8"),i||(i="#32c682");var a="";return a},W=0,L=0,B=function(a,o,n,l){if(arguments&&4===arguments.length){W++,"function"==typeof o&&L++,"string"!=typeof a&&(a="Notiflix "+l),e.plainText&&(a=g(a)),!e.plainText&&a.length>e.messageMaxLength&&(O.Notify.Merge({closeButton:!0,plainText:!1}),a="HTML Tags Error: Your content length is more than \"messageMaxLength\" option."),a.length>e.messageMaxLength&&(a=a.substring(0,e.messageMaxLength)+"..."),"shadow"===e.fontAwesomeIconStyle&&(n.fontAwesomeIconColor=n.background),e.cssAnimation||(e.cssAnimationDuration=0);var m=t.document.createElement("div");m.id=s.wrapID,m.style.width=e.width,m.style.zIndex=e.zindex,m.style.opacity=e.opacity,"center-center"===e.position?(m.style.left=e.distance,m.style.top=e.distance,m.style.right=e.distance,m.style.bottom=e.distance,m.style.margin="auto",m.classList.add("nx-flex-center-center"),m.style.maxHeight="calc((100vh - "+e.distance+") - "+e.distance+")",m.style.display="flex",m.style.flexWrap="wrap",m.style.flexDirection="column",m.style.justifyContent="center",m.style.alignItems="center",m.style.pointerEvents="none"):"center-top"===e.position?(m.style.left=e.distance,m.style.right=e.distance,m.style.top=e.distance,m.style.bottom="auto",m.style.margin="auto"):"center-bottom"===e.position?(m.style.left=e.distance,m.style.right=e.distance,m.style.bottom=e.distance,m.style.top="auto",m.style.margin="auto"):"right-bottom"===e.position?(m.style.right=e.distance,m.style.bottom=e.distance,m.style.top="auto",m.style.left="auto"):"left-top"===e.position?(m.style.left=e.distance,m.style.top=e.distance,m.style.right="auto",m.style.bottom="auto"):"left-bottom"===e.position?(m.style.left=e.distance,m.style.bottom=e.distance,m.style.top="auto",m.style.right="auto"):(m.style.right=e.distance,m.style.top=e.distance,m.style.left="auto",m.style.bottom="auto");var c;e.backOverlay&&(c=t.document.createElement("div"),c.id=e.ID+"Overlay",c.style.width="100%",c.style.height="100%",c.style.position="fixed",c.style.zIndex=e.zindex,c.style.left=0,c.style.top=0,c.style.right=0,c.style.bottom=0,c.style.background=n.backOverlayColor||e.backOverlayColor,c.className=e.cssAnimation?"with-animation":"",c.style.animationDuration=e.cssAnimation?e.cssAnimationDuration+"ms":"",t.document.getElementById(c.id)?0===L&&(t.document.getElementById(c.id).style.background=n.backOverlayColor||e.backOverlayColor):t.document.body.appendChild(c)),t.document.getElementById(m.id)||t.document.body.appendChild(m);var p=t.document.createElement("div");p.id=e.ID+"-"+W,p.className=e.className+" "+n.childClassName+" "+(e.cssAnimation?"with-animation":"")+" "+(e.useIcon?"with-icon":"")+" nx-"+e.cssAnimationStyle+" "+(e.closeButton&&"function"!=typeof o?"with-close-button":"")+" "+("function"==typeof o?"with-callback":"")+" "+(e.clickToClose?"click-to-close":""),p.style.fontSize=e.fontSize,p.style.color=n.textColor,p.style.background=n.background,p.style.borderRadius=e.borderRadius,p.style.pointerEvents="all",e.rtl&&(p.setAttribute("dir","rtl"),p.classList.add("rtl-on")),p.style.fontFamily="\""+e.fontFamily+"\", "+r,e.cssAnimation&&(p.style.animationDuration=e.cssAnimationDuration+"ms");var f="";if(e.closeButton&&"function"!=typeof o&&(f=""),!e.useIcon)p.innerHTML=""+a+""+(e.closeButton?f:"");else if(e.useFontAwesome)p.innerHTML=""+a+""+(e.closeButton?f:"");else{var d;d="Success"===l?"":"Failure"===l?"":"Warning"===l?"":"Info"===l?"":"",p.innerHTML=d+""+a+""+(e.closeButton?f:"")}if("left-bottom"===e.position||"right-bottom"===e.position){var x=t.document.getElementById(m.id);x.insertBefore(p,x.firstChild)}else t.document.getElementById(m.id).appendChild(p);if(e.useIcon){var u=t.document.getElementById(p.id).querySelectorAll(".nmi")[0],b=40;if(e.useFontAwesome)b=Math.round(parseInt(u.offsetHeight));else{var h=u.getBBox();b=Math.round(parseInt(h.width))}var k=t.document.getElementById(p.id).querySelectorAll("span")[0],w=Math.round(k.offsetHeight);w<=b&&(k.style.paddingTop=(b-w)/2+"px",k.style.paddingBottom=(b-w)/2+"px")}if(t.document.getElementById(p.id)){var v,N=t.document.getElementById(p.id),z=t.document.getElementById(m.id);e.backOverlay&&(v=t.document.getElementById(c.id));var C,S,R=function(){N.classList.add("remove"),e.backOverlay&&0>=z.childElementCount&&v.classList.add("remove"),clearTimeout(C)},I=function(){var i=t.document.getElementById(p.id);i&&null!==N.parentNode&&N.parentNode.removeChild(N),0>=z.childElementCount&&null!==z.parentNode&&(z.parentNode.removeChild(z),e.backOverlay&&null!==v.parentNode&&v.parentNode.removeChild(v)),clearTimeout(S)};if(e.closeButton&&"function"!=typeof o){var X=t.document.getElementById(p.id).querySelectorAll("span.notify-close-button")[0];X.addEventListener("click",function(){R();var t=setTimeout(function(){I(),clearTimeout(t)},e.cssAnimationDuration)})}("function"==typeof o||e.clickToClose)&&N.addEventListener("click",function(){"function"==typeof o&&(L--,o()),R();var t=setTimeout(function(){I(),clearTimeout(t)},e.cssAnimationDuration)}),e.closeButton||"function"==typeof o||(C=setTimeout(function(){R()},e.timeout),S=setTimeout(function(){I()},e.timeout+e.cssAnimationDuration))}if(e.showOnlyTheLastOne&&0
- Albert Einstein":"Failure"===m?a="\"Failure is simply the opportunity to begin again, this time more intelligently.\"

- Henry Ford":"Warning"===m?a="\"The peoples who want to live comfortably without producing and fatigue; they are doomed to lose their dignity, then liberty, and then independence and destiny.\"

- Mustafa Kemal Ataturk":"Info"==m&&(a="\"Knowledge rests not upon truth alone, but upon error also.\"

- Carl Gustav Jung")),"string"!=typeof o&&(o="Okay"),i.plainText&&(e=g(e),a=g(a),o=g(o)),i.plainText||(e.length>i.titleMaxLength&&(e="HTML Tags Error",a="Your Title content length is more than \"titleMaxLength\" option.",o="Okay"),a.length>i.messageMaxLength&&(e="HTML Tags Error",a="Your Message content length is more than \"messageMaxLength\" option.",o="Okay"),o.length>i.buttonMaxLength&&(e="HTML Tags Error",a="Your Button content length is more than \"buttonMaxLength\" option.",o="Okay")),e.length>i.titleMaxLength&&(e=e.substring(0,i.titleMaxLength)+"..."),a.length>i.messageMaxLength&&(a=a.substring(0,i.messageMaxLength)+"..."),o.length>i.buttonMaxLength&&(o=o.substring(0,i.buttonMaxLength)+"..."),i.cssAnimation||(i.cssAnimationDuration=0);var c=t.document.createElement("div");c.id=l.ID,c.className=i.className,c.style.width=i.width,c.style.zIndex=i.zindex,c.style.borderRadius=i.borderRadius,c.style.fontFamily="\""+i.fontFamily+"\", "+r,i.rtl&&(c.setAttribute("dir","rtl"),c.classList.add("rtl-on"));var p="";i.backOverlay&&(p="
");var f="";if("Success"===m?f=h(i.svgSize,s.svgColor):"Failure"===m?f=k(i.svgSize,s.svgColor):"Warning"===m?f=w(i.svgSize,s.svgColor):"Info"==m&&(f=v(i.svgSize,s.svgColor)),c.innerHTML=p+"
"+f+"
"+e+"

"+a+"

"+o+"
",!t.document.getElementById(c.id)){t.document.body.appendChild(c);var d=Math.round(t.innerHeight),x=Math.round(t.document.getElementById(c.id).offsetHeight);c.style.top=(d-x)/2+"px";var u=t.document.getElementById(c.id),y=t.document.getElementById("NXReportButton");y.addEventListener("click",function(){"function"==typeof n&&n(),u.classList.add("remove");var t=setTimeout(function(){null!==u.parentNode&&u.parentNode.removeChild(u),clearTimeout(t)},i.cssAnimationDuration)})}},A=function(e,i,o,n,s,l){a||O.Confirm.Init({}),"string"!=typeof e&&(e="Notiflix Confirm"),"string"!=typeof i&&(i="Do you agree with me?"),"string"!=typeof o&&(o="Yes"),"string"!=typeof n&&(n="No"),"function"!=typeof s&&(s=void 0),"function"!=typeof l&&(l=void 0),a.plainText&&(e=g(e),i=g(i),o=g(o),n=g(n)),a.plainText||(e.length>a.titleMaxLength&&(e="HTML Tags Error",i="Your Title content length is more than \"titleMaxLength\" option.",o="Okay",n="..."),i.length>a.messageMaxLength&&(e="HTML Tags Error",i="Your Message content length is more than \"messageMaxLength\" option.",o="Okay",n="..."),(o.length||n.length)>a.buttonsMaxLength&&(e="HTML Tags Error",i="Your Buttons contents length is more than \"buttonsMaxLength\" option.",o="Okay",n="...")),e.length>a.titleMaxLength&&(e=e.substring(0,a.titleMaxLength)+"..."),i.length>a.messageMaxLength&&(i=i.substring(0,a.messageMaxLength)+"..."),o.length>a.buttonsMaxLength&&(o=o.substring(0,a.buttonsMaxLength)+"..."),n.length>a.buttonsMaxLength&&(n=n.substring(0,a.buttonsMaxLength)+"..."),a.cssAnimation||(a.cssAnimationDuration=0);var c=t.document.createElement("div");c.id=m.ID,c.className=a.className+(a.cssAnimation?" with-animation nx-"+a.cssAnimationStyle:""),c.style.width=a.width,c.style.zIndex=a.zindex,a.rtl&&(c.setAttribute("dir","rtl"),c.classList.add("rtl-on")),c.style.fontFamily="\""+a.fontFamily+"\", "+r;var p="";a.backOverlay&&(p="
");var f="";if("function"==typeof s&&(f=""+n+""),c.innerHTML=p+"
"+e+"
"+i+"
"+o+""+f+"
",!t.document.getElementById(c.id)){if(t.document.body.appendChild(c),"center"===a.position){var d=Math.round(t.innerHeight),x=Math.round(t.document.getElementById(c.id).offsetHeight);c.style.top=(d-x)/2+"px",c.style.left=a.distance,c.style.right=a.distance,c.style.bottom="auto",c.style.margin="auto"}else"right-top"===a.position?(c.style.right=a.distance,c.style.top=a.distance,c.style.bottom="auto",c.style.left="auto",c.style.margin="auto"):"right-bottom"===a.position?(c.style.right=a.distance,c.style.bottom=a.distance,c.style.top="auto",c.style.left="auto",c.style.margin="auto"):"left-top"===a.position?(c.style.left=a.distance,c.style.top=a.distance,c.style.right="auto",c.style.bottom="auto",c.style.margin="auto"):"left-bottom"===a.position?(c.style.left=a.distance,c.style.bottom=a.distance,c.style.top="auto",c.style.right="auto",c.style.margin="auto"):(c.style.top=a.distance,c.style.left=0,c.style.right=0,c.style.bottom="auto",c.style.margin="auto");var u=t.document.getElementById(c.id),y=t.document.getElementById("NXConfirmButtonOk");if(y.addEventListener("click",function(){"function"==typeof s&&s(),u.classList.add("remove");var t=setTimeout(function(){null!==u.parentNode&&(u.parentNode.removeChild(u),clearTimeout(t))},a.cssAnimationDuration)}),"function"==typeof s){var b=t.document.getElementById("NXConfirmButtonCancel");b.addEventListener("click",function(){"function"==typeof l&&l(),u.classList.add("remove");var t=setTimeout(function(){null!==u.parentNode&&(u.parentNode.removeChild(u),clearTimeout(t))},a.cssAnimationDuration)})}}},F=function(e,i,a,n){if(o||O.Loading.Init({}),"string"!=typeof e&&(e=""),a){e=e.toString().length>o.messageMaxLength?g(e).toString().substring(0,o.messageMaxLength)+"...":g(e).toString();var s=parseInt(o.svgSize),l="";if(0"+e+"

"}o.cssAnimation||(o.cssAnimationDuration=0);var f="";if("standard"===i)f=N(o.svgSize,o.svgColor);else if("hourglass"===i)f=z(o.svgSize,o.svgColor);else if("circle"===i)f=C(o.svgSize,o.svgColor);else if("arrows"===i)f=S(o.svgSize,o.svgColor);else if("dots"===i)f=R(o.svgSize,o.svgColor);else if("pulse"===i)f=I(o.svgSize,o.svgColor);else if("custom"===i&&null!==o.customSvgUrl)f="\"Notiflix\"";else{if("custom"===i&&null==o.customSvgUrl)return y("Notiflix Error","You have to set a static SVG url to \"customSvgUrl\" option to use Loading Custom."),!1;"notiflix"===i&&(f=X(o.svgSize,"#f8f8f8","#32c682"))}var d=0;0"+f+"",u=t.document.createElement("div");if(u.id=c.ID,u.className=o.className+(o.cssAnimation?" with-animation":"")+(o.clickToClose?" click-to-close":""),u.style.zIndex=o.zindex,u.style.background=o.backgroundColor,u.style.animationDuration=o.cssAnimationDuration+"ms",u.style.fontFamily="\""+o.fontFamily+"\", "+r,o.rtl&&(u.setAttribute("dir","rtl"),u.classList.add("rtl-on")),u.innerHTML=x+l,!t.document.getElementById(u.id)&&(t.document.body.appendChild(u),o.clickToClose)){var b=t.document.getElementById(u.id);b.addEventListener("click",function(){u.classList.add("remove");var t=setTimeout(function(){null!==u.parentNode&&(u.parentNode.removeChild(u),clearTimeout(t))},o.cssAnimationDuration)})}}else if(t.document.getElementById(c.ID))var h=t.document.getElementById(c.ID),k=setTimeout(function(){h.classList.add("remove");var t=setTimeout(function(){null!==h.parentNode&&(h.parentNode.removeChild(h),clearTimeout(t))},o.cssAnimationDuration);clearTimeout(k)},n)},E=function(e){if("string"!=typeof e&&(e=""),t.document.getElementById(c.ID))if(0o.messageMaxLength?g(e).toString().substring(0,o.messageMaxLength)+"...":g(e).toString();var i=t.document.getElementById(c.ID).getElementsByTagName("p")[0];if(i)i.innerHTML=e;else{var a=t.document.createElement("p");a.id=o.messageID,a.className="loading-message new",a.style.color=o.messageColor,a.style.fontSize=o.messageFontSize;var n=parseInt(o.svgSize),r=Math.round(n-n/4).toString()+"px";a.style.top=r;var s=(1.4*parseInt(o.messageFontSize)).toString()+"px";a.style.height=s,a.innerHTML=e;var l=t.document.getElementById(c.ID);l.appendChild(a);var m=t.document.getElementById(c.ID).getElementsByTagName("div")[0],p="-"+Math.round(n-n/4).toString()+"px";m.style.top=p}}else y("Notiflix Error","Where is the new message?")},D=0,T=function(e,a,o,s,l){if("string"!=typeof a)return y("Notiflix Error","The selector must be a String."),!1;"number"!=typeof l&&(l=0);var m=t.document.querySelectorAll(a);if(0=f?f:m.length;if(e)for(var x=0;xh.length){var k="";o&&("hourglass"===o?k=z(n.svgSize,n.svgColor):"circle"===o?k=C(n.svgSize,n.svgColor):"arrows"===o?k=S(n.svgSize,n.svgColor):"dots"===o?k=R(n.svgSize,n.svgColor):"pulse"===o?k=I(n.svgSize,n.svgColor):k=N(n.svgSize,n.svgColor));var w=parseInt(n.svgSize),v=Math.round(w-w/5).toString()+"px",X=s&&0"+k+"",L="",B=0;"string"==typeof s&&0n.messageMaxLength?g(s).toString().substring(0,n.messageMaxLength)+"...":g(s).toString(),B=Math.round(1.4*parseInt(n.messageFontSize)).toString()+"px",L=""+s+""),D++;var M=t.document.createElement("div");M.id=p.ID+"-"+D,M.className=c+"-wrap"+(n.cssAnimation?" with-animation":""),M.style.position=n.position,M.style.zIndex=n.zindex,M.style.background=n.backgroundColor,M.style.animationDuration=n.cssAnimationDuration+"ms",M.style.fontFamily="\""+n.fontFamily+"\", "+r,n.rtl&&(M.setAttribute("dir","rtl"),M.classList.add("rtl-on")),M.innerHTML=W+L;var A=t.getComputedStyle(u).getPropertyValue("position");A=A&&"string"==typeof A?A.toLowerCase():"relative";var F=t.getComputedStyle(u).getPropertyValue("min-height"),E=F.replace(/[^\d]/g,""),T=Math.round(E),H=Math.round(1.5*(parseInt(B)+w)),P="";T=["absolute","relative","fixed","sticky"].indexOf(A)){var Y="",j=t.document.createRange();j.selectNode(t.document.head);var G=j.createContextualFragment(Y);t.document.head.appendChild(G),u.classList.add(c+"-position")}u.appendChild(M)}}else var U=function(e){var i=setTimeout(function(){e.remove();var a=e.getAttribute("id"),o=t.document.getElementById("Style-"+a);o&&o.remove(),clearTimeout(i)},n.cssAnimationDuration)},q=function(t){if(t&&0div{pointer-events:all;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:\"Quicksand\",-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif;width:100%;display:inline-block;position:relative;margin:0 0 10px;border-radius:5px;background:#1e1e1e;color:#fff;padding:10px 12px;font-size:14px;line-height:1.4}[id^=NotiflixNotifyWrap]>div:last-child{margin:0}[id^=NotiflixNotifyWrap]>div.with-callback{cursor:pointer}[id^=NotiflixNotifyWrap]>div.with-icon{padding:8px}[id^=NotiflixNotifyWrap]>div.click-to-close{cursor:pointer}[id^=NotiflixNotifyWrap]>div.with-close-button{padding:10px 30px 10px 12px}[id^=NotiflixNotifyWrap]>div.with-icon.with-close-button{padding:6px 30px 6px 6px}[id^=NotiflixNotifyWrap]>div>span.the-message{font-weight:normal;font-family:inherit!important;word-break:break-all;word-break:break-word}[id^=NotiflixNotifyWrap]>div>span.notify-close-button{cursor:pointer;transition:all .2s ease-in-out;position:absolute;right:8px;top:0;bottom:0;margin:auto;color:inherit;width:16px;height:16px}[id^=NotiflixNotifyWrap]>div>span.notify-close-button:hover{transform:rotate(90deg)}[id^=NotiflixNotifyWrap]>div>span.notify-close-button>svg{position:absolute;width:16px;height:16px;right:0;top:0}[id^=NotiflixNotifyWrap]>div>.nmi{position:absolute;width:40px;height:40px;font-size:30px;line-height:40px;text-align:center;left:8px;top:0;bottom:0;margin:auto;border-radius:inherit}[id^=NotiflixNotifyWrap]>div>.wfa.shadow{color:inherit;background:rgba(0,0,0,.15);box-shadow:inset 0 0 34px rgba(0,0,0,.2);text-shadow:0 0 10px rgba(0,0,0,.3)}[id^=NotiflixNotifyWrap]>div>span.with-icon{position:relative;float:left;width:calc(100% - 40px);margin:0 0 0 40px;padding:0 0 0 10px;box-sizing:border-box}[id^=NotiflixNotifyWrap]>div.rtl-on>.nmi{left:auto;right:8px}[id^=NotiflixNotifyWrap]>div.rtl-on>span.with-icon{padding:0 10px 0 0;margin:0 40px 0 0}[id^=NotiflixNotifyWrap]>div.rtl-on>span.notify-close-button{right:auto;left:8px}[id^=NotiflixNotifyWrap]>div.with-icon.with-close-button.rtl-on{padding:6px 6px 6px 30px}[id^=NotiflixNotifyWrap]>div.with-close-button.rtl-on{padding:10px 12px 10px 30px}[id^=NotiflixNotifyOverlay].with-animation,[id^=NotiflixNotifyWrap]>div.with-animation.nx-fade{animation:notify-animation-fade .3s ease-in-out 0s normal;-webkit-animation:notify-animation-fade .3s ease-in-out 0s normal}@keyframes notify-animation-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes notify-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-zoom{animation:notify-animation-zoom .3s ease-in-out 0s normal;-webkit-animation:notify-animation-zoom .3s ease-in-out 0s normal}@keyframes notify-animation-zoom{0%{transform:scale(0)}50%{transform:scale(1.05)}100%{transform:scale(1)}}@-webkit-keyframes notify-animation-zoom{0%{transform:scale(0)}50%{transform:scale(1.05)}100%{transform:scale(1)}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-right{animation:notify-animation-from-right .3s ease-in-out 0s normal;-webkit-animation:notify-animation-from-right .3s ease-in-out 0s normal}@keyframes notify-animation-from-right{0%{right:-300px;opacity:0}50%{right:8px;opacity:1}100%{right:0;opacity:1}}@-webkit-keyframes notify-animation-from-right{0%{right:-300px;opacity:0}50%{right:8px;opacity:1}100%{right:0;opacity:1}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-left{animation:notify-animation-from-left .3s ease-in-out 0s normal;-webkit-animation:notify-animation-from-left .3s ease-in-out 0s normal}@keyframes notify-animation-from-left{0%{left:-300px;opacity:0}50%{left:8px;opacity:1}100%{left:0;opacity:1}}@-webkit-keyframes notify-animation-from-left{0%{left:-300px;opacity:0}50%{left:8px;opacity:1}100%{left:0;opacity:1}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-top{animation:notify-animation-from-top .3s ease-in-out 0s normal;-webkit-animation:notify-animation-from-top .3s ease-in-out 0s normal}@keyframes notify-animation-from-top{0%{top:-50px;opacity:0}50%{top:8px;opacity:1}100%{top:0;opacity:1}}@-webkit-keyframes notify-animation-from-top{0%{top:-50px;opacity:0}50%{top:8px;opacity:1}100%{top:0;opacity:1}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-bottom{animation:notify-animation-from-bottom .3s ease-in-out 0s normal;-webkit-animation:notify-animation-from-bottom .3s ease-in-out 0s normal}@keyframes notify-animation-from-bottom{0%{bottom:-50px;opacity:0}50%{bottom:8px;opacity:1}100%{bottom:0;opacity:1}}@-webkit-keyframes notify-animation-from-bottom{0%{bottom:-50px;opacity:0}50%{bottom:8px;opacity:1}100%{bottom:0;opacity:1}}[id^=NotiflixNotifyOverlay].with-animation.remove,[id^=NotiflixNotifyWrap]>div.with-animation.nx-fade.remove{opacity:0;animation:notify-remove-fade .3s ease-in-out 0s normal;-webkit-animation:notify-remove-fade .3s ease-in-out 0s normal}@keyframes notify-remove-fade{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes notify-remove-fade{0%{opacity:1}100%{opacity:0}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-zoom.remove{transform:scale(0);animation:notify-remove-zoom .3s ease-in-out 0s normal;-webkit-animation:notify-remove-zoom .3s ease-in-out 0s normal}@keyframes notify-remove-zoom{0%{transform:scale(1)}50%{transform:scale(1.05)}100%{transform:scale(0)}}@-webkit-keyframes notify-remove-zoom{0%{transform:scale(1)}50%{transform:scale(1.05)}100%{transform:scale(0)}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-top.remove{opacity:0;animation:notify-remove-to-top .3s ease-in-out 0s normal;-webkit-animation:notify-remove-to-top .3s ease-in-out 0s normal}@keyframes notify-remove-to-top{0%{top:0;opacity:1}50%{top:8px;opacity:1}100%{top:-50px;opacity:0}}@-webkit-keyframes notify-remove-to-top{0%{top:0;opacity:1}50%{top:8px;opacity:1}100%{top:-50px;opacity:0}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-right.remove{opacity:0;animation:notify-remove-to-right .3s ease-in-out 0s normal;-webkit-animation:notify-remove-to-right .3s ease-in-out 0s normal}@keyframes notify-remove-to-right{0%{right:0;opacity:1}50%{right:8px;opacity:1}100%{right:-300px;opacity:0}}@-webkit-keyframes notify-remove-to-right{0%{right:0;opacity:1}50%{right:8px;opacity:1}100%{right:-300px;opacity:0}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-bottom.remove{opacity:0;animation:notify-remove-to-bottom .3s ease-in-out 0s normal;-webkit-animation:notify-remove-to-bottom .3s ease-in-out 0s normal}@keyframes notify-remove-to-bottom{0%{bottom:0;opacity:1}50%{bottom:8px;opacity:1}100%{bottom:-50px;opacity:0}}@-webkit-keyframes notify-remove-to-bottom{0%{bottom:0;opacity:1}50%{bottom:8px;opacity:1}100%{bottom:-50px;opacity:0}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-left.remove{opacity:0;animation:notify-remove-to-left .3s ease-in-out 0s normal;-webkit-animation:notify-remove-to-left .3s ease-in-out 0s normal}@keyframes notify-remove-to-left{0%{left:0;opacity:1}50%{left:8px;opacity:1}100%{left:-300px;opacity:0}}@-webkit-keyframes notify-remove-to-left{0%{left:0;opacity:1}50%{left:8px;opacity:1}100%{left:-300px;opacity:0}}[id^=NotiflixReportWrap]{position:fixed;z-index:4002;width:320px;max-width:96%;max-height:96vh;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;font-family:\"Quicksand\",-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif;left:0;right:0;top:20px;color:#1e1e1e;border-radius:25px;background:transparent;margin:auto}[id^=NotiflixReportWrap]::-webkit-scrollbar{width:0;height:0}[id^=NotiflixReportWrap]::-webkit-scrollbar-thumb{background:transparent}[id^=NotiflixReportWrap]::-webkit-scrollbar-track{background:transparent}[id^=NotiflixReportWrap] *{box-sizing:border-box}[id^=NotiflixReportWrap]>div[class*=\"-overlay\"]{width:100%;height:100%;left:0;top:0;background:rgba(255,255,255,.5);position:fixed;z-index:0}[id^=NotiflixReportWrap]>div[class*=\"-content\"]{width:100%;float:left;border-radius:inherit;padding:10px;filter:drop-shadow(0 0 5px rgba(0, 0, 0, .1));border:1px solid rgba(0,0,0,.03);background:#f8f8f8;position:relative;z-index:1}[id^=NotiflixReportWrap]>div[class*=\"-content\"]>div[class$=\"-icon\"]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:110px;height:110px;display:block;margin:6px auto 12px}[id^=NotiflixReportWrap]>div[class*=\"-content\"]>div[class$=\"-icon\"] svg{min-width:100%;max-width:100%;height:auto}[id^=NotiflixReportWrap]>*>h5{word-break:break-all;word-break:break-word;font-family:inherit!important;font-size:16px;font-weight:500;line-height:1.4;margin:0 0 10px;padding:0 0 10px;border-bottom:1px solid rgba(0,0,0,.1);float:left;width:100%;text-align:center}[id^=NotiflixReportWrap]>*>p{word-break:break-all;word-break:break-word;font-family:inherit!important;font-size:13px;line-height:1.4;font-weight:normal;float:left;width:100%;padding:0 10px;margin:0 0 10px}[id^=NotiflixReportWrap] a#NXReportButton{word-break:break-all;word-break:break-word;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:inherit!important;transition:all .25s ease-in-out;cursor:pointer;float:right;padding:7px 17px;background:#32c682;font-size:14px;line-height:1.4;font-weight:500;border-radius:inherit!important;color:#fff}[id^=NotiflixReportWrap] a#NXReportButton:hover{box-shadow:inset 0 -60px 5px -5px rgba(0,0,0,.25)}[id^=NotiflixReportWrap].rtl-on a#NXReportButton{float:left}[id^=NotiflixReportWrap]>div[class*=\"-overlay\"].with-animation{animation:report-overlay-animation .3s ease-in-out 0s normal;-webkit-animation:report-overlay-animation .3s ease-in-out 0s normal}@keyframes report-overlay-animation{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes report-overlay-animation{0%{opacity:0}100%{opacity:1}}[id^=NotiflixReportWrap]>div[class*=\"-content\"].with-animation.nx-fade{animation:report-animation-fade .3s ease-in-out 0s normal;-webkit-animation:report-animation-fade .3s ease-in-out 0s normal}@keyframes report-animation-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes report-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixReportWrap]>div[class*=\"-content\"].with-animation.nx-zoom{animation:report-animation-zoom .3s ease-in-out 0s normal;-webkit-animation:report-animation-zoom .3s ease-in-out 0s normal}@keyframes report-animation-zoom{0%{opacity:0;transform:scale(.5)}50%{opacity:1;transform:scale(1.05)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes report-animation-zoom{0%{opacity:0;transform:scale(.5)}50%{opacity:1;transform:scale(1.05)}100%{opacity:1;transform:scale(1)}}[id^=NotiflixReportWrap].remove>div[class*=\"-overlay\"].with-animation{opacity:0;animation:report-overlay-animation-remove .3s ease-in-out 0s normal;-webkit-animation:report-overlay-animation-remove .3s ease-in-out 0s normal}@keyframes report-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes report-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixReportWrap].remove>div[class*=\"-content\"].with-animation.nx-fade{opacity:0;animation:report-animation-fade-remove .3s ease-in-out 0s normal;-webkit-animation:report-animation-fade-remove .3s ease-in-out 0s normal}@keyframes report-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes report-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixReportWrap].remove>div[class*=\"-content\"].with-animation.nx-zoom{opacity:0;animation:report-animation-zoom-remove .3s ease-in-out 0s normal;-webkit-animation:report-animation-zoom-remove .3s ease-in-out 0s normal}@keyframes report-animation-zoom-remove{0%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.05)}100%{opacity:0;transform:scale(0)}}@-webkit-keyframes report-animation-zoom-remove{0%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.05)}100%{opacity:0;transform:scale(0)}}[id^=NotiflixConfirmWrap]{position:fixed;z-index:4003;width:300px;max-width:96%;max-height:96vh;overflow-x:hidden;overflow-y:auto;left:10px;right:10px;top:10px;margin:auto;text-align:center;box-sizing:border-box;background:transparent;font-family:\"Quicksand\",-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif}[id^=NotiflixConfirmWrap]::-webkit-scrollbar{width:0;height:0}[id^=NotiflixConfirmWrap]::-webkit-scrollbar-thumb{background:transparent}[id^=NotiflixConfirmWrap]::-webkit-scrollbar-track{background:transparent}[id^=NotiflixConfirmWrap] *{box-sizing:border-box}[id^=NotiflixConfirmWrap]>div[class*=\"-overlay\"]{width:100%;height:100%;left:0;top:0;background:rgba(255,255,255,.5);position:fixed;z-index:0}[id^=NotiflixConfirmWrap]>div[class*=\"-overlay\"].with-animation{animation:confirm-overlay-animation .3s ease-in-out 0s normal;-webkit-animation:confirm-overlay-animation .3s ease-in-out 0s normal}@keyframes confirm-overlay-animation{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes confirm-overlay-animation{0%{opacity:0}100%{opacity:1}}[id^=NotiflixConfirmWrap].remove>div[class*=\"-overlay\"].with-animation{opacity:0;animation:confirm-overlay-animation-remove .3s ease-in-out 0s normal;-webkit-animation:confirm-overlay-animation-remove .3s ease-in-out 0s normal}@keyframes confirm-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes confirm-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]{width:100%;float:left;border-radius:25px;padding:10px;margin:0;filter:drop-shadow(0 0 5px rgba(0, 0, 0, .1));background:#f8f8f8;color:#1e1e1e;position:relative;z-index:1}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-head\"]{float:left;width:100%}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-head\"]>h5{float:left;width:100%;margin:0;padding:0 0 10px;border-bottom:1px solid rgba(0,0,0,.1);color:#32c682;font-family:inherit!important;font-size:16px;line-height:1.4;font-weight:500}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-head\"]>div{font-family:inherit!important;margin:15px 0 20px;padding:0 10px;float:left;width:100%;font-size:14px;line-height:1.4;font-weight:normal;color:inherit}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-buttons\"]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:inherit;float:left;width:100%}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-buttons\"]>a{cursor:pointer;font-family:inherit!important;transition:all .25s ease-in-out;float:left;width:48%;padding:9px 5px;border-radius:inherit!important;font-weight:500;font-size:15px;line-height:1.4;color:#f8f8f8}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-buttons\"]>a.confirm-button-ok{margin:0 2% 0 0;background:#32c682}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-buttons\"]>a.confirm-button-cancel{margin:0 0 0 2%;background:#a9a9a9}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-buttons\"]>a.full{margin:0;width:100%}[id^=NotiflixConfirmWrap]>div[class*=\"-content\"]>div[class*=\"-buttons\"]>a:hover{box-shadow:inset 0 -60px 5px -5px rgba(0,0,0,.25)}[id^=NotiflixConfirmWrap].rtl-on>div[class*=\"-content\"]>div[class*=\"-buttons\"],[id^=NotiflixConfirmWrap].rtl-on>div[class*=\"-content\"]>div[class*=\"-buttons\"]>a{transform:rotateY(180deg)}[id^=NotiflixConfirmWrap].with-animation.nx-fade>div[class*=\"-content\"]{animation:confirm-animation-fade .3s ease-in-out 0s normal;-webkit-animation:confirm-animation-fade .3s ease-in-out 0s normal}@keyframes confirm-animation-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes confirm-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixConfirmWrap].with-animation.nx-zoom>div[class*=\"-content\"]{animation:confirm-animation-zoom .3s ease-in-out 0s normal;-webkit-animation:confirm-animation-zoom .3s ease-in-out 0s normal}@keyframes confirm-animation-zoom{0%{opacity:0;transform:scale(.5)}50%{opacity:1;transform:scale(1.05)}100%{opacity:1;transform:scale(1)}}@-webkit-keyframes confirm-animation-zoom{0%{opacity:0;transform:scale(.5)}50%{opacity:1;transform:scale(1.05)}100%{opacity:1;transform:scale(1)}}[id^=NotiflixConfirmWrap].with-animation.nx-fade.remove>div[class*=\"-content\"]{opacity:0;animation:confirm-animation-fade-remove .3s ease-in-out 0s normal;-webkit-animation:confirm-animation-fade-remove .3s ease-in-out 0s normal}@keyframes confirm-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes confirm-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixConfirmWrap].with-animation.nx-zoom.remove>div[class*=\"-content\"]{opacity:0;animation:confirm-animation-zoom-remove .3s ease-in-out 0s normal;-webkit-animation:confirm-animation-zoom-remove .3s ease-in-out 0s normal}@keyframes confirm-animation-zoom-remove{0%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.05)}100%{opacity:0;transform:scale(0)}}@-webkit-keyframes confirm-animation-zoom-remove{0%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.05)}100%{opacity:0;transform:scale(0)}}[id^=NotiflixLoadingWrap]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:fixed;z-index:4000;width:100%;height:100%;left:0;top:0;right:0;bottom:0;margin:auto;text-align:center;box-sizing:border-box;background:rgba(0,0,0,.8);font-family:\"Quicksand\",-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif}[id^=NotiflixLoadingWrap] *{box-sizing:border-box}[id^=NotiflixLoadingWrap].click-to-close{cursor:pointer}[id^=NotiflixLoadingWrap]>div[class*=\"-icon\"]{width:60px;height:60px;position:fixed;transition:top .2s ease-in-out;left:0;top:0;right:0;bottom:0;margin:auto}[id^=NotiflixLoadingWrap]>div[class*=\"-icon\"].with-message{top:-42px}[id^=NotiflixLoadingWrap]>div[class*=\"-icon\"] img,[id^=NotiflixLoadingWrap]>div[class*=\"-icon\"] svg{max-width:unset;max-height:unset;width:100%;height:100%;position:absolute;left:0;top:0}[id^=NotiflixLoadingWrap]>p{position:fixed;left:0;right:0;top:42px;bottom:0;margin:auto;font-family:inherit!important;font-weight:normal;line-height:1.4;padding:0 10px;width:100%;font-size:15px;height:18px}[id^=NotiflixLoadingWrap].with-animation{animation:loading-animation-fade .3s ease-in-out 0s normal;-webkit-animation:loading-animation-fade .3s ease-in-out 0s normal}@keyframes loading-animation-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes loading-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixLoadingWrap].with-animation.remove{opacity:0;animation:loading-animation-fade-remove .3s ease-in-out 0s normal;-webkit-animation:loading-animation-fade-remove .3s ease-in-out 0s normal}@keyframes loading-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes loading-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixLoadingWrap]>p.new{animation:loading-new-message-fade .3s ease-in-out 0s normal;-webkit-animation:loading-new-message-fade .3s ease-in-out 0s normal}@keyframes loading-new-message-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes loading-new-message-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixBlockWrap]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;position:absolute;z-index:1000;font-family:\"Quicksand\",-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif;background:rgba(255,255,255,.9);text-align:center;animation-duration:.4s;width:100%;height:100%;left:0;top:0;border-radius:inherit}[id^=NotiflixBlockWrap] *{box-sizing:border-box}[id^=NotiflixBlockWrap]>span[class*=\"-icon\"]{width:45px;height:45px;position:absolute;left:0;top:0;right:0;bottom:0;margin:auto}[id^=NotiflixBlockWrap]>span[class*=\"-message\"]{position:absolute;left:0;right:0;top:50px;bottom:0;margin:auto;font-family:inherit!important;font-weight:normal;font-size:14px;line-height:1.4;padding:0 10px;width:100%;height:20px;overflow:hidden}[id^=NotiflixBlockWrap].with-animation{animation:block-animation-fade .3s ease-in-out 0s normal;-webkit-animation:block-animation-fade .3s ease-in-out 0s normal}@keyframes block-animation-fade{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes block-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixBlockWrap].with-animation.remove{opacity:0;animation:block-animation-fade-remove .3s ease-in-out 0s normal;-webkit-animation:block-animation-fade-remove .3s ease-in-out 0s normal}@keyframes block-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes block-animation-fade-remove{0%{opacity:1}100%{opacity:0}}"},d=function(){if(null!==f()&&!t.document.getElementById("NotiflixInternalCSS")){var e=t.document.createElement("style");e.id="NotiflixInternalCSS",e.innerHTML=f(),t.document.head.appendChild(e)}},x=function(){var t={},e=!1,a=0;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],a++);for(var o=function(i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=e&&"[object Object]"===Object.prototype.toString.call(i[a])?x(t[a],i[a]):i[a])};a");t.document.head.appendChild(o);var n=t.document.createRange();n.selectNode(t.document.head);var r=n.createContextualFragment("");t.document.head.appendChild(r)}},y=function(t,e){return console.error("%c "+t+" ","padding:2px;border-radius:20px;color:#fff;background:#ff5549","\n"+e+"\nVisit documentation page to learn more: https://www.notiflix.com/documentation")},b=function(t,e){return console.log("%c "+t+" ","padding:2px;border-radius:20px;color:#fff;background:#26c0d3","\n"+e+"\nVisit documentation page to learn more: https://www.notiflix.com/documentation")},h=function(t,e){t||(t="110px"),e||(e="#32c682");var i="";return i},k=function(t,e){t||(t="110px"),e||(e="#ff5549");var i="";return i},w=function(t,e){t||(t="110px"),e||(e="#eebf31");var i="";return i},v=function(t,e){t||(t="110px"),e||(e="#26c0d3");var i="";return i},N=function(t,e){t||(t="60px"),e||(e="#32c682");var i="";return i},z=function(t,e){t||(t="60px"),e||(e="#32c682");var i=" ";return i},C=function(t,e){t||(t="60px"),e||(e="#32c682");var i="";return i},S=function(t,e){t||(t="60px"),e||(e="#32c682");var i="";return i},R=function(t,e){t||(t="60px"),e||(e="#32c682");var i=" ";return i},I=function(t,e){t||(t="60px"),e||(e="#32c682");var i="";return i},X=function(t,e,i){t||(t="60px"),e||(e="#f8f8f8"),i||(i="#32c682");var a="";return a},W=0,L=0,B=function(a,o,n,l){e||O.Notify.Init({});var m={};"function"==typeof o&&(n=o),"object"!=typeof o||Array.isArray(o)||(m=x(!0,e,{}),e=x(!0,e,o));var c=e[l.toLocaleLowerCase("en")];W++,"function"==typeof n&&L++,"string"!=typeof a&&(a="Notiflix "+l),e.plainText&&(a=g(a)),!e.plainText&&a.length>e.messageMaxLength&&(O.Notify.Merge({closeButton:!0,plainText:!1}),a="HTML Tags Error: Your content length is more than \"messageMaxLength\" option."),a.length>e.messageMaxLength&&(a=a.substring(0,e.messageMaxLength)+"..."),"shadow"===e.fontAwesomeIconStyle&&(c.fontAwesomeIconColor=c.background),e.cssAnimation||(e.cssAnimationDuration=0);var p=t.document.createElement("div");p.id=s.wrapID,p.style.width=e.width,p.style.zIndex=e.zindex,p.style.opacity=e.opacity,"center-center"===e.position?(p.style.left=e.distance,p.style.top=e.distance,p.style.right=e.distance,p.style.bottom=e.distance,p.style.margin="auto",p.classList.add("nx-flex-center-center"),p.style.maxHeight="calc((100vh - "+e.distance+") - "+e.distance+")",p.style.display="flex",p.style.flexWrap="wrap",p.style.flexDirection="column",p.style.justifyContent="center",p.style.alignItems="center",p.style.pointerEvents="none"):"center-top"===e.position?(p.style.left=e.distance,p.style.right=e.distance,p.style.top=e.distance,p.style.bottom="auto",p.style.margin="auto"):"center-bottom"===e.position?(p.style.left=e.distance,p.style.right=e.distance,p.style.bottom=e.distance,p.style.top="auto",p.style.margin="auto"):"right-bottom"===e.position?(p.style.right=e.distance,p.style.bottom=e.distance,p.style.top="auto",p.style.left="auto"):"left-top"===e.position?(p.style.left=e.distance,p.style.top=e.distance,p.style.right="auto",p.style.bottom="auto"):"left-bottom"===e.position?(p.style.left=e.distance,p.style.bottom=e.distance,p.style.top="auto",p.style.right="auto"):(p.style.right=e.distance,p.style.top=e.distance,p.style.left="auto",p.style.bottom="auto");var f;e.backOverlay&&(f=t.document.createElement("div"),f.id=e.ID+"Overlay",f.style.width="100%",f.style.height="100%",f.style.position="fixed",f.style.zIndex=e.zindex,f.style.left=0,f.style.top=0,f.style.right=0,f.style.bottom=0,f.style.background=c.backOverlayColor||e.backOverlayColor,f.className=e.cssAnimation?"with-animation":"",f.style.animationDuration=e.cssAnimation?e.cssAnimationDuration+"ms":"",t.document.getElementById(f.id)?0===L&&(t.document.getElementById(f.id).style.background=c.backOverlayColor||e.backOverlayColor):t.document.body.appendChild(f)),t.document.getElementById(p.id)||t.document.body.appendChild(p);var d=t.document.createElement("div");d.id=e.ID+"-"+W,d.className=e.className+" "+c.childClassName+" "+(e.cssAnimation?"with-animation":"")+" "+(e.useIcon?"with-icon":"")+" nx-"+e.cssAnimationStyle+" "+(e.closeButton&&"function"!=typeof n?"with-close-button":"")+" "+("function"==typeof n?"with-callback":"")+" "+(e.clickToClose?"click-to-close":""),d.style.fontSize=e.fontSize,d.style.color=c.textColor,d.style.background=c.background,d.style.borderRadius=e.borderRadius,d.style.pointerEvents="all",e.rtl&&(d.setAttribute("dir","rtl"),d.classList.add("rtl-on")),d.style.fontFamily="\""+e.fontFamily+"\", "+r,e.cssAnimation&&(d.style.animationDuration=e.cssAnimationDuration+"ms");var u="";if(e.closeButton&&"function"!=typeof n&&(u=""),!e.useIcon)d.innerHTML=""+a+""+(e.closeButton?u:"");else if(e.useFontAwesome)d.innerHTML=""+a+""+(e.closeButton?u:"");else{var y;y="Success"===l?"":"Failure"===l?"":"Warning"===l?"":"Info"===l?"":"",d.innerHTML=y+""+a+""+(e.closeButton?u:"")}if("left-bottom"===e.position||"right-bottom"===e.position){var b=t.document.getElementById(p.id);b.insertBefore(d,b.firstChild)}else t.document.getElementById(p.id).appendChild(d);if(e.useIcon){var h=t.document.getElementById(d.id).querySelectorAll(".nmi")[0],k=40;if(e.useFontAwesome)k=Math.round(parseInt(h.offsetHeight));else{var w=h.getBBox();k=Math.round(parseInt(w.width))}var v=t.document.getElementById(d.id).querySelectorAll("span")[0],N=Math.round(v.offsetHeight);N<=k&&(v.style.paddingTop=(k-N)/2+"px",v.style.paddingBottom=(k-N)/2+"px")}if(t.document.getElementById(d.id)){var z,C=t.document.getElementById(d.id),S=t.document.getElementById(p.id);e.backOverlay&&(z=t.document.getElementById(f.id));var R,I,X=function(){C.classList.add("remove"),e.backOverlay&&0>=S.childElementCount&&z.classList.add("remove"),clearTimeout(R)},B=function(){var i=t.document.getElementById(d.id);i&&null!==C.parentNode&&C.parentNode.removeChild(C),0>=S.childElementCount&&null!==S.parentNode&&(S.parentNode.removeChild(S),e.backOverlay&&null!==z.parentNode&&z.parentNode.removeChild(z)),clearTimeout(I)};if(e.closeButton&&"function"!=typeof n){var M=t.document.getElementById(d.id).querySelectorAll("span.notify-close-button")[0];M.addEventListener("click",function(){X();var t=setTimeout(function(){B(),clearTimeout(t)},e.cssAnimationDuration)})}("function"==typeof n||e.clickToClose)&&C.addEventListener("click",function(){"function"==typeof n&&(L--,n()),X();var t=setTimeout(function(){B(),clearTimeout(t)},e.cssAnimationDuration)}),e.closeButton||"function"==typeof n||(R=setTimeout(function(){X()},e.timeout),I=setTimeout(function(){B()},e.timeout+e.cssAnimationDuration))}if(e.showOnlyTheLastOne&&0
- Albert Einstein":"Failure"===m?a="\"Failure is simply the opportunity to begin again, this time more intelligently.\"

- Henry Ford":"Warning"===m?a="\"The peoples who want to live comfortably without producing and fatigue; they are doomed to lose their dignity, then liberty, and then independence and destiny.\"

- Mustafa Kemal Ataturk":"Info"==m&&(a="\"Knowledge rests not upon truth alone, but upon error also.\"

- Carl Gustav Jung")),"string"!=typeof o&&(o="Okay"),i.plainText&&(e=g(e),a=g(a),o=g(o)),i.plainText||(e.length>i.titleMaxLength&&(e="HTML Tags Error",a="Your Title content length is more than \"titleMaxLength\" option.",o="Okay"),a.length>i.messageMaxLength&&(e="HTML Tags Error",a="Your Message content length is more than \"messageMaxLength\" option.",o="Okay"),o.length>i.buttonMaxLength&&(e="HTML Tags Error",a="Your Button content length is more than \"buttonMaxLength\" option.",o="Okay")),e.length>i.titleMaxLength&&(e=e.substring(0,i.titleMaxLength)+"..."),a.length>i.messageMaxLength&&(a=a.substring(0,i.messageMaxLength)+"..."),o.length>i.buttonMaxLength&&(o=o.substring(0,i.buttonMaxLength)+"..."),i.cssAnimation||(i.cssAnimationDuration=0);var f=t.document.createElement("div");f.id=l.ID,f.className=i.className,f.style.width=i.width,f.style.zIndex=i.zindex,f.style.borderRadius=i.borderRadius,f.style.fontFamily="\""+i.fontFamily+"\", "+r,i.rtl&&(f.setAttribute("dir","rtl"),f.classList.add("rtl-on"));var d="";i.backOverlay&&(d="
");var u="";if("Success"===m?u=h(i.svgSize,p.svgColor):"Failure"===m?u=k(i.svgSize,p.svgColor):"Warning"===m?u=w(i.svgSize,p.svgColor):"Info"==m&&(u=v(i.svgSize,p.svgColor)),f.innerHTML=d+"
"+u+"
"+e+"

"+a+"

"+o+"
",!t.document.getElementById(f.id)){t.document.body.appendChild(f);var y=Math.round(t.innerHeight),b=Math.round(t.document.getElementById(f.id).offsetHeight);f.style.top=(y-b)/2+"px";var N=t.document.getElementById(f.id),z=t.document.getElementById("NXReportButton");z.addEventListener("click",function(){"function"==typeof s&&s(),N.classList.add("remove");var t=setTimeout(function(){null!==N.parentNode&&N.parentNode.removeChild(N),clearTimeout(t)},i.cssAnimationDuration)})}i=x(!0,i,c)},A=function(e,i,o,n,s,l){a||O.Confirm.Init({}),"string"!=typeof e&&(e="Notiflix Confirm"),"string"!=typeof i&&(i="Do you agree with me?"),"string"!=typeof o&&(o="Yes"),"string"!=typeof n&&(n="No"),"function"!=typeof s&&(s=void 0),"function"!=typeof l&&(l=void 0),a.plainText&&(e=g(e),i=g(i),o=g(o),n=g(n)),a.plainText||(e.length>a.titleMaxLength&&(e="HTML Tags Error",i="Your Title content length is more than \"titleMaxLength\" option.",o="Okay",n="..."),i.length>a.messageMaxLength&&(e="HTML Tags Error",i="Your Message content length is more than \"messageMaxLength\" option.",o="Okay",n="..."),(o.length||n.length)>a.buttonsMaxLength&&(e="HTML Tags Error",i="Your Buttons contents length is more than \"buttonsMaxLength\" option.",o="Okay",n="...")),e.length>a.titleMaxLength&&(e=e.substring(0,a.titleMaxLength)+"..."),i.length>a.messageMaxLength&&(i=i.substring(0,a.messageMaxLength)+"..."),o.length>a.buttonsMaxLength&&(o=o.substring(0,a.buttonsMaxLength)+"..."),n.length>a.buttonsMaxLength&&(n=n.substring(0,a.buttonsMaxLength)+"..."),a.cssAnimation||(a.cssAnimationDuration=0);var c=t.document.createElement("div");c.id=m.ID,c.className=a.className+(a.cssAnimation?" with-animation nx-"+a.cssAnimationStyle:""),c.style.width=a.width,c.style.zIndex=a.zindex,a.rtl&&(c.setAttribute("dir","rtl"),c.classList.add("rtl-on")),c.style.fontFamily="\""+a.fontFamily+"\", "+r;var p="";a.backOverlay&&(p="
");var f="";if("function"==typeof s&&(f=""+n+""),c.innerHTML=p+"
"+e+"
"+i+"
"+o+""+f+"
",!t.document.getElementById(c.id)){if(t.document.body.appendChild(c),"center"===a.position){var d=Math.round(t.innerHeight),x=Math.round(t.document.getElementById(c.id).offsetHeight);c.style.top=(d-x)/2+"px",c.style.left=a.distance,c.style.right=a.distance,c.style.bottom="auto",c.style.margin="auto"}else"right-top"===a.position?(c.style.right=a.distance,c.style.top=a.distance,c.style.bottom="auto",c.style.left="auto",c.style.margin="auto"):"right-bottom"===a.position?(c.style.right=a.distance,c.style.bottom=a.distance,c.style.top="auto",c.style.left="auto",c.style.margin="auto"):"left-top"===a.position?(c.style.left=a.distance,c.style.top=a.distance,c.style.right="auto",c.style.bottom="auto",c.style.margin="auto"):"left-bottom"===a.position?(c.style.left=a.distance,c.style.bottom=a.distance,c.style.top="auto",c.style.right="auto",c.style.margin="auto"):(c.style.top=a.distance,c.style.left=0,c.style.right=0,c.style.bottom="auto",c.style.margin="auto");var u=t.document.getElementById(c.id),y=t.document.getElementById("NXConfirmButtonOk");if(y.addEventListener("click",function(){"function"==typeof s&&s(),u.classList.add("remove");var t=setTimeout(function(){null!==u.parentNode&&(u.parentNode.removeChild(u),clearTimeout(t))},a.cssAnimationDuration)}),"function"==typeof s){var b=t.document.getElementById("NXConfirmButtonCancel");b.addEventListener("click",function(){"function"==typeof l&&l(),u.classList.add("remove");var t=setTimeout(function(){null!==u.parentNode&&(u.parentNode.removeChild(u),clearTimeout(t))},a.cssAnimationDuration)})}}},F=function(e,i,a,n){if(o||O.Loading.Init({}),"string"!=typeof e&&(e=""),a){e=e.toString().length>o.messageMaxLength?g(e).toString().substring(0,o.messageMaxLength)+"...":g(e).toString();var s=parseInt(o.svgSize),l="";if(0"+e+"

"}o.cssAnimation||(o.cssAnimationDuration=0);var f="";if("standard"===i)f=N(o.svgSize,o.svgColor);else if("hourglass"===i)f=z(o.svgSize,o.svgColor);else if("circle"===i)f=C(o.svgSize,o.svgColor);else if("arrows"===i)f=S(o.svgSize,o.svgColor);else if("dots"===i)f=R(o.svgSize,o.svgColor);else if("pulse"===i)f=I(o.svgSize,o.svgColor);else if("custom"===i&&null!==o.customSvgUrl)f="\"Notiflix\"";else{if("custom"===i&&null==o.customSvgUrl)return y("Notiflix Error","You have to set a static SVG url to \"customSvgUrl\" option to use Loading Custom."),!1;"notiflix"===i&&(f=X(o.svgSize,"#f8f8f8","#32c682"))}var d=0;0"+f+"",u=t.document.createElement("div");if(u.id=c.ID,u.className=o.className+(o.cssAnimation?" with-animation":"")+(o.clickToClose?" click-to-close":""),u.style.zIndex=o.zindex,u.style.background=o.backgroundColor,u.style.animationDuration=o.cssAnimationDuration+"ms",u.style.fontFamily="\""+o.fontFamily+"\", "+r,o.rtl&&(u.setAttribute("dir","rtl"),u.classList.add("rtl-on")),u.innerHTML=x+l,!t.document.getElementById(u.id)&&(t.document.body.appendChild(u),o.clickToClose)){var b=t.document.getElementById(u.id);b.addEventListener("click",function(){u.classList.add("remove");var t=setTimeout(function(){null!==u.parentNode&&(u.parentNode.removeChild(u),clearTimeout(t))},o.cssAnimationDuration)})}}else if(t.document.getElementById(c.ID))var h=t.document.getElementById(c.ID),k=setTimeout(function(){h.classList.add("remove");var t=setTimeout(function(){null!==h.parentNode&&(h.parentNode.removeChild(h),clearTimeout(t))},o.cssAnimationDuration);clearTimeout(k)},n)},E=function(e){if("string"!=typeof e&&(e=""),t.document.getElementById(c.ID))if(0o.messageMaxLength?g(e).toString().substring(0,o.messageMaxLength)+"...":g(e).toString();var i=t.document.getElementById(c.ID).getElementsByTagName("p")[0];if(i)i.innerHTML=e;else{var a=t.document.createElement("p");a.id=o.messageID,a.className="loading-message new",a.style.color=o.messageColor,a.style.fontSize=o.messageFontSize;var n=parseInt(o.svgSize),r=Math.round(n-n/4).toString()+"px";a.style.top=r;var s=(1.4*parseInt(o.messageFontSize)).toString()+"px";a.style.height=s,a.innerHTML=e;var l=t.document.getElementById(c.ID);l.appendChild(a);var m=t.document.getElementById(c.ID).getElementsByTagName("div")[0],p="-"+Math.round(n-n/4).toString()+"px";m.style.top=p}}else y("Notiflix Error","Where is the new message?")},D=0,T=function(e,a,o,s,l){if("string"!=typeof a)return y("Notiflix Error","The selector must be a String."),!1;"number"!=typeof l&&(l=0);var m=t.document.querySelectorAll(a);if(0=f?f:m.length;if(e)for(var x=0;xh.length){var k="";o&&("hourglass"===o?k=z(n.svgSize,n.svgColor):"circle"===o?k=C(n.svgSize,n.svgColor):"arrows"===o?k=S(n.svgSize,n.svgColor):"dots"===o?k=R(n.svgSize,n.svgColor):"pulse"===o?k=I(n.svgSize,n.svgColor):k=N(n.svgSize,n.svgColor));var w=parseInt(n.svgSize),v=Math.round(w-w/5).toString()+"px",X=s&&0"+k+"",L="",B=0;"string"==typeof s&&0n.messageMaxLength?g(s).toString().substring(0,n.messageMaxLength)+"...":g(s).toString(),B=Math.round(1.4*parseInt(n.messageFontSize)).toString()+"px",L=""+s+""),D++;var M=t.document.createElement("div");M.id=p.ID+"-"+D,M.className=c+"-wrap"+(n.cssAnimation?" with-animation":""),M.style.position=n.position,M.style.zIndex=n.zindex,M.style.background=n.backgroundColor,M.style.animationDuration=n.cssAnimationDuration+"ms",M.style.fontFamily="\""+n.fontFamily+"\", "+r,n.rtl&&(M.setAttribute("dir","rtl"),M.classList.add("rtl-on")),M.innerHTML=W+L;var A=t.getComputedStyle(u).getPropertyValue("position");A=A&&"string"==typeof A?A.toLowerCase():"relative";var F=t.getComputedStyle(u).getPropertyValue("min-height"),E=F.replace(/[^\d]/g,""),T=Math.round(E),H=Math.round(1.5*(parseInt(B)+w)),P="";T=["absolute","relative","fixed","sticky"].indexOf(A)){var Y="",j=t.document.createRange();j.selectNode(t.document.head);var G=j.createContextualFragment(Y);t.document.head.appendChild(G),u.classList.add(c+"-position")}u.appendChild(M)}}else var U=function(e){var i=setTimeout(function(){e.remove();var a=e.getAttribute("id"),o=t.document.getElementById("Style-"+a);o&&o.remove(),clearTimeout(i)},n.cssAnimationDuration)},q=function(t){if(t&&0 - - + + @@ -197,7 +197,9 @@

// Notiflix Notify

- + + + @@ -207,7 +209,9 @@

// Notiflix Report

- + + + @@ -215,7 +219,7 @@

// Notiflix Report

// Notiflix Confirm

- +
diff --git a/helpers/notiflix-minifier.js b/helpers/notiflix-minifier.js index 77071c9..4eaa491 100644 --- a/helpers/notiflix-minifier.js +++ b/helpers/notiflix-minifier.js @@ -1,3 +1,12 @@ +/*! +* Notiflix Minifier +* +* Description: Minify the Notiflix scripts, and clean the Notiflix styles to the distribution. (Used "Babel Minify", and "Clean CSS") +* Version: 1.0.0 +* Author: Furkan MT ('https://github.com/furcan') +* Copyright 2020 Notiflix Minifier, MIT Licence ('https://opensource.org/licenses/MIT') +*/ + // Dev Dependencies const { existsSync, readdirSync, unlinkSync, readFileSync, writeFileSync } = require('fs'); const { join } = require('path'); diff --git a/package-lock.json b/package-lock.json index cb84502..088ba33 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "notiflix", - "version": "2.2.1", + "version": "2.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -717,9 +717,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001066", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001066.tgz", - "integrity": "sha512-Gfj/WAastBtfxLws0RCh2sDbTK/8rJuSeZMecrSkNGYxPcv7EzblmDGfWQCFEQcSqYE2BRgQiJh8HOD07N5hIw==", + "version": "1.0.30001081", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001081.tgz", + "integrity": "sha512-iZdh3lu09jsUtLE6Bp8NAbJskco4Y3UDtkR3GTCJGsbMowBU5IWDFF79sV2ws7lSqTzWyKazxam2thasHymENQ==", "dev": true }, "ccount": { @@ -959,9 +959,9 @@ "dev": true }, "entities": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.2.tgz", - "integrity": "sha512-dmD3AvJQBUjKpcNkoqr+x+IF0SdRtPz9Vk0uTy4yWqga9ibB6s4v++QFWNohjiUGoMlF552ZvNyXDxz5iW0qmw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==", "dev": true } } @@ -992,9 +992,9 @@ } }, "electron-to-chromium": { - "version": "1.3.457", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.457.tgz", - "integrity": "sha512-sirUGpEXQ91HpWByW1Q9XMeL/0RQHS8AhNdkYSlfS184i6ukHO12wiJECyVKnDqTt/YuETQX4C6VOrCGGDmlOA==", + "version": "1.3.466", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.466.tgz", + "integrity": "sha512-eieqkoM2hCkZZRhETKyCouMziDV3l4XEKHRLuzcHG+HV+P7PeODU/z9HAmBgMQkzvHg2DoyQhfIDmmeguLZT/Q==", "dev": true }, "emoji-regex": { @@ -1055,9 +1055,9 @@ "dev": true }, "eslint": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.1.0.tgz", - "integrity": "sha512-DfS3b8iHMK5z/YLSme8K5cge168I8j8o1uiVmFCgnnjxZQbCGyraF8bMl7Ju4yfBmCuxD7shOF7eqGkcuIHfsA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.2.0.tgz", + "integrity": "sha512-B3BtEyaDKC5MlfDa2Ha8/D6DsS4fju95zs0hjS3HdGazw+LNayai38A25qMppK37wWGWNYSPOR6oYzlz5MHsRQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -1066,10 +1066,10 @@ "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", + "eslint-scope": "^5.1.0", "eslint-utils": "^2.0.0", - "eslint-visitor-keys": "^1.1.0", - "espree": "^7.0.0", + "eslint-visitor-keys": "^1.2.0", + "espree": "^7.1.0", "esquery": "^1.2.0", "esutils": "^2.0.2", "file-entry-cache": "^5.0.1", @@ -1109,9 +1109,9 @@ } }, "chalk": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", - "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -1166,9 +1166,9 @@ } }, "eslint-scope": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", - "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", + "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -1185,20 +1185,20 @@ } }, "eslint-visitor-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", - "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.2.0.tgz", + "integrity": "sha512-WFb4ihckKil6hu3Dp798xdzSfddwKKU3+nGniKF6HfeW6OLd2OUDEPP7TcHtB5+QXOKg2s6B2DaMPE1Nn/kxKQ==", "dev": true }, "espree": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.0.0.tgz", - "integrity": "sha512-/r2XEx5Mw4pgKdyb7GNLQNsu++asx/dltf/CI8RFi9oGHxmQFgvLbc5Op4U6i8Oaj+kdslhJtVlEZeAqH5qOTw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.1.0.tgz", + "integrity": "sha512-dcorZSyfmm4WTuTnE5Y7MEN1DyoPYy1ZR783QW1FJoenn7RailyWFsq/UL6ZAAA7uXurN9FIpYyUs3OfiIW+Qw==", "dev": true, "requires": { - "acorn": "^7.1.1", + "acorn": "^7.2.0", "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" + "eslint-visitor-keys": "^1.2.0" } }, "esprima": { @@ -1953,9 +1953,9 @@ } }, "chalk": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", - "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -2090,9 +2090,9 @@ } }, "merge2": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz", - "integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true }, "micromatch": { @@ -2185,9 +2185,9 @@ "dev": true }, "node-releases": { - "version": "1.1.57", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.57.tgz", - "integrity": "sha512-ZQmnWS7adi61A9JsllJ2gdj2PauElcjnOwTp2O011iGzoakTxUsDGSe+6vD7wXbKdqhSFymC0OSx35aAMhrSdw==", + "version": "1.1.58", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.58.tgz", + "integrity": "sha512-NxBudgVKiRh/2aPWMgPR7bPTX0VPmGx5QBwCtdHitnqFE5/O8DeBXuIMH1nwNnw/aMo6AjOrpsHzfY3UbUJ7yg==", "dev": true }, "normalize-package-data": { @@ -2697,9 +2697,9 @@ } }, "remark-stringify": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-8.0.0.tgz", - "integrity": "sha512-cABVYVloFH+2ZI5bdqzoOmemcz/ZuhQSH6W6ZNYnLojAUUn3xtX7u+6BpnYp35qHoGr2NFBsERV14t4vCIeW8w==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-8.1.0.tgz", + "integrity": "sha512-FSPZv1ds76oAZjurhhuV5qXSUSoz6QRPuwYK38S41sLHwg4oB7ejnmZshj7qwjgYLf93kdz6BOX9j5aidNE7rA==", "dev": true, "requires": { "ccount": "^1.0.0", @@ -3025,14 +3025,14 @@ "dev": true }, "stylelint": { - "version": "13.5.0", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-13.5.0.tgz", - "integrity": "sha512-+Jy7ieKAWKTf2tmcAE7jgScxH39Urb87i0bjK/enScFaGWWaFn4kAPwepGOSk2b7CLUDVt/O6kwA0x0p/V7moQ==", + "version": "13.6.0", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-13.6.0.tgz", + "integrity": "sha512-55gG2pNjVr183JJM/tlr3KAua6vTVX7Ho/lgKKuCIWszTZ1gmrXjX4Wok53SI8wRYFPbwKAcJGULQ77OJxTcNw==", "dev": true, "requires": { "@stylelint/postcss-css-in-js": "^0.37.1", "@stylelint/postcss-markdown": "^0.36.1", - "autoprefixer": "^9.7.6", + "autoprefixer": "^9.8.0", "balanced-match": "^1.0.0", "chalk": "^4.0.0", "cosmiconfig": "^6.0.0", @@ -3041,10 +3041,10 @@ "file-entry-cache": "^5.0.1", "get-stdin": "^8.0.0", "global-modules": "^2.0.0", - "globby": "^11.0.0", + "globby": "^11.0.1", "globjoin": "^0.1.4", "html-tags": "^3.1.0", - "ignore": "^5.1.4", + "ignore": "^5.1.8", "import-lazy": "^4.0.0", "imurmurhash": "^0.1.4", "known-css-properties": "^0.19.0", @@ -3055,7 +3055,7 @@ "meow": "^7.0.1", "micromatch": "^4.0.2", "normalize-selector": "^0.2.0", - "postcss": "^7.0.30", + "postcss": "^7.0.32", "postcss-html": "^0.36.0", "postcss-less": "^3.1.4", "postcss-media-query-parser": "^0.2.3", @@ -3063,7 +3063,7 @@ "postcss-resolve-nested-selector": "^0.1.1", "postcss-safe-parser": "^4.0.2", "postcss-sass": "^0.4.4", - "postcss-scss": "^2.0.0", + "postcss-scss": "^2.1.1", "postcss-selector-parser": "^6.0.2", "postcss-syntax": "^0.36.2", "postcss-value-parser": "^4.1.0", @@ -3076,7 +3076,7 @@ "sugarss": "^2.0.0", "svg-tags": "^1.0.0", "table": "^5.4.6", - "v8-compile-cache": "^2.1.0", + "v8-compile-cache": "^2.1.1", "write-file-atomic": "^3.0.3" }, "dependencies": { @@ -3091,9 +3091,9 @@ } }, "chalk": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", - "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "requires": { "ansi-styles": "^4.1.0", diff --git a/package.json b/package.json index 46ec66d..0b2e619 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "notiflix", - "main": "dist/notiflix-aio-2.2.1.min.js", - "version": "2.2.1", + "main": "dist/notiflix-aio-2.3.0.min.js", + "version": "2.3.0", "description": "Notiflix is a JavaScript library for client-side non-blocking notifications, popup boxes, loading indicators, and more...", "homepage": "https://github.com/notiflix/Notiflix", "files": [ @@ -13,6 +13,7 @@ "notifications", "notiflix", "notify", + "toast", "alert", "popup boxes", "loading indicator", @@ -43,8 +44,8 @@ "devDependencies": { "babel-minify": "^0.5.1", "clean-css": "^4.2.3", - "eslint": "^7.1.0", - "stylelint": "^13.5.0", + "eslint": "^7.2.0", + "stylelint": "^13.6.0", "stylelint-config-standard": "^20.0.0" }, "scripts": { diff --git a/src/notiflix-aio.js b/src/notiflix-aio.js index 5e94752..bf93cbb 100644 --- a/src/notiflix-aio.js +++ b/src/notiflix-aio.js @@ -1,6 +1,6 @@ /*! * Notiflix ('https://www.notiflix.com') -* Version: 2.2.1 +* Version: 2.3.0 * Author: Furkan MT ('https://github.com/furcan') * Copyright 2020 Notiflix, MIT Licence ('https://opensource.org/licenses/MIT') */ @@ -312,7 +312,7 @@ // Notiflix: GoogleFont on var notiflixGoogleFont = function (use, family) { - if (!window.document.getElementById('NotiflixQuicksand') && use && (family && typeof family === 'string' && family.toLowerCase() === 'quicksand')) { + if (!window.document.getElementById('NotiflixQuicksand') && use && (typeof family === 'string' && family.toLowerCase() === 'quicksand')) { // google fonts dns prefetch on var dns = ''; var dnsRange = window.document.createRange(); @@ -447,342 +447,389 @@ // Notiflix: Notify Single on var notifyElmCount = 0; var notifyElmCountOnlyCallback = 0; - var NotiflixNotify = function (message, callback, theType, staticType) { - if (arguments && arguments.length === 4) { + var NotiflixNotify = function (message, optionsOrCallback, callback, staticType) { + // if not initialized pretend like init + if (!newNotifySettings) { + Notiflix.Notify.Init({}); + } - // notify counter on - notifyElmCount++; - if (typeof callback === 'function') { - notifyElmCountOnlyCallback++; - } - // notify counter off + // create a backup for settings + var newNotifySettingsBackup = {}; - // if no message on - if (typeof message !== 'string') { - message = 'Notiflix ' + staticType; - } - // if no message off + // detect optionsOrCallback and callback on + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } - // if plainText true = HTML tags not allowed on - if (newNotifySettings.plainText) { - message = notiflixPlaintext(message); // message plain text - } - // if plainText true = HTML tags not allowed off + if (typeof optionsOrCallback === 'object' && !Array.isArray(optionsOrCallback)) { + // extend the backup settings with new settings + newNotifySettingsBackup = extendNotiflix(true, newNotifySettings, {}); - // if plainText false but the message length more than messageMaxLength = HTML tags error on - if (!newNotifySettings.plainText && message.length > newNotifySettings.messageMaxLength) { - Notiflix.Notify.Merge({ - closeButton: true, - plainText: false, - }); - message = 'HTML Tags Error: Your content length is more than "messageMaxLength" option.'; // message html error - } - // if plainText false but the message length more than messageMaxLength = HTML tags error off + // extend new settings with the options + newNotifySettings = extendNotiflix(true, newNotifySettings, optionsOrCallback); + } + // detect optionsOrCallback and callback off - // message max length substring on - if (message.length > newNotifySettings.messageMaxLength) { - message = message.substring(0, newNotifySettings.messageMaxLength) + '...'; - } - // message max length substring off + // notify type + var theType = newNotifySettings[staticType.toLocaleLowerCase('en')]; - // font awesome icon style on - if (newNotifySettings.fontAwesomeIconStyle === 'shadow') { - theType.fontAwesomeIconColor = theType.background; - } - // font awesome icon style off + // notify counter on + notifyElmCount++; + if (typeof callback === 'function') { + notifyElmCountOnlyCallback++; + } + // notify counter off - // if cssAnimaion false -> duration on - if (!newNotifySettings.cssAnimation) { - newNotifySettings.cssAnimationDuration = 0; - } - // if cssAnimaion false -> duration off + // if no message on + if (typeof message !== 'string') { + message = 'Notiflix ' + staticType; + } + // if no message off - // notify wrap on - var ntflxNotifyWrap = window.document.createElement('div'); - ntflxNotifyWrap.id = notifySettings.wrapID; - ntflxNotifyWrap.style.width = newNotifySettings.width; - ntflxNotifyWrap.style.zIndex = newNotifySettings.zindex; - ntflxNotifyWrap.style.opacity = newNotifySettings.opacity; - - // wrap position on - if (newNotifySettings.position === 'center-center') { - ntflxNotifyWrap.style.left = newNotifySettings.distance; - ntflxNotifyWrap.style.top = newNotifySettings.distance; - ntflxNotifyWrap.style.right = newNotifySettings.distance; - ntflxNotifyWrap.style.bottom = newNotifySettings.distance; - ntflxNotifyWrap.style.margin = 'auto'; - ntflxNotifyWrap.classList.add('nx-flex-center-center'); - ntflxNotifyWrap.style.maxHeight = 'calc((100vh - ' + newNotifySettings.distance + ') - ' + newNotifySettings.distance + ')'; - ntflxNotifyWrap.style.display = 'flex'; - ntflxNotifyWrap.style.flexWrap = 'wrap'; - ntflxNotifyWrap.style.flexDirection = 'column'; - ntflxNotifyWrap.style.justifyContent = 'center'; - ntflxNotifyWrap.style.alignItems = 'center'; - ntflxNotifyWrap.style.pointerEvents = 'none'; - } else if (newNotifySettings.position === 'center-top') { - ntflxNotifyWrap.style.left = newNotifySettings.distance; - ntflxNotifyWrap.style.right = newNotifySettings.distance; - ntflxNotifyWrap.style.top = newNotifySettings.distance; - ntflxNotifyWrap.style.bottom = 'auto'; - ntflxNotifyWrap.style.margin = 'auto'; - } else if (newNotifySettings.position === 'center-bottom') { - ntflxNotifyWrap.style.left = newNotifySettings.distance; - ntflxNotifyWrap.style.right = newNotifySettings.distance; - ntflxNotifyWrap.style.bottom = newNotifySettings.distance; - ntflxNotifyWrap.style.top = 'auto'; - ntflxNotifyWrap.style.margin = 'auto'; - } else if (newNotifySettings.position === 'right-bottom') { - ntflxNotifyWrap.style.right = newNotifySettings.distance; - ntflxNotifyWrap.style.bottom = newNotifySettings.distance; - ntflxNotifyWrap.style.top = 'auto'; - ntflxNotifyWrap.style.left = 'auto'; - } else if (newNotifySettings.position === 'left-top') { - ntflxNotifyWrap.style.left = newNotifySettings.distance; - ntflxNotifyWrap.style.top = newNotifySettings.distance; - ntflxNotifyWrap.style.right = 'auto'; - ntflxNotifyWrap.style.bottom = 'auto'; - } else if (newNotifySettings.position === 'left-bottom') { - ntflxNotifyWrap.style.left = newNotifySettings.distance; - ntflxNotifyWrap.style.bottom = newNotifySettings.distance; - ntflxNotifyWrap.style.top = 'auto'; - ntflxNotifyWrap.style.right = 'auto'; - } else { // 'right-top' or else - ntflxNotifyWrap.style.right = newNotifySettings.distance; - ntflxNotifyWrap.style.top = newNotifySettings.distance; - ntflxNotifyWrap.style.left = 'auto'; - ntflxNotifyWrap.style.bottom = 'auto'; - } - // wrap position off + // if plainText true = HTML tags not allowed on + if (newNotifySettings.plainText) { + message = notiflixPlaintext(message); // message plain text + } + // if plainText true = HTML tags not allowed off - // if background overlay true on - var notifyOverlay; - if (newNotifySettings.backOverlay) { - notifyOverlay = window.document.createElement('div'); - notifyOverlay.id = newNotifySettings.ID + 'Overlay'; - notifyOverlay.style.width = '100%'; - notifyOverlay.style.height = '100%'; - notifyOverlay.style.position = 'fixed'; - notifyOverlay.style.zIndex = newNotifySettings.zindex; - notifyOverlay.style.left = 0; - notifyOverlay.style.top = 0; - notifyOverlay.style.right = 0; - notifyOverlay.style.bottom = 0; - notifyOverlay.style.background = theType.backOverlayColor || newNotifySettings.backOverlayColor; - notifyOverlay.className = (newNotifySettings.cssAnimation ? 'with-animation' : ''); - notifyOverlay.style.animationDuration = (newNotifySettings.cssAnimation) ? newNotifySettings.cssAnimationDuration + 'ms' : ''; - // if there is not an backoverlay element create a new one - if (!window.document.getElementById(notifyOverlay.id)) { - window.document.body.appendChild(notifyOverlay); - } - // if there is a backoverlay element and also if there is not a notify element with a callback, change backoverlay color by each type - else if (notifyElmCountOnlyCallback === 0) { - window.document.getElementById(notifyOverlay.id).style.background = theType.backOverlayColor || newNotifySettings.backOverlayColor; - } - } - // if background overlay true off + // if plainText false but the message length more than messageMaxLength = HTML tags error on + if (!newNotifySettings.plainText && message.length > newNotifySettings.messageMaxLength) { + Notiflix.Notify.Merge({ + closeButton: true, + plainText: false, + }); + message = 'HTML Tags Error: Your content length is more than "messageMaxLength" option.'; // message html error + } + // if plainText false but the message length more than messageMaxLength = HTML tags error off - if (!window.document.getElementById(ntflxNotifyWrap.id)) { - window.document.body.appendChild(ntflxNotifyWrap); - } - // notify wrap off - - // notify content on - var ntflxNotify = window.document.createElement('div'); - ntflxNotify.id = newNotifySettings.ID + '-' + notifyElmCount; - ntflxNotify.className = newNotifySettings.className + ' ' + theType.childClassName + ' ' + (newNotifySettings.cssAnimation ? 'with-animation' : '') + ' ' + (newNotifySettings.useIcon ? 'with-icon' : '') + ' nx-' + newNotifySettings.cssAnimationStyle + ' ' + (newNotifySettings.closeButton && typeof callback !== 'function' ? 'with-close-button' : '') + ' ' + (typeof callback === 'function' ? 'with-callback' : '') + ' ' + (newNotifySettings.clickToClose ? 'click-to-close' : ''); - ntflxNotify.style.fontSize = newNotifySettings.fontSize; - ntflxNotify.style.color = theType.textColor; - ntflxNotify.style.background = theType.background; - ntflxNotify.style.borderRadius = newNotifySettings.borderRadius; - ntflxNotify.style.pointerEvents = 'all'; + // message max length substring on + if (message.length > newNotifySettings.messageMaxLength) { + message = message.substring(0, newNotifySettings.messageMaxLength) + '...'; + } + // message max length substring off - // rtl on - if (newNotifySettings.rtl) { - ntflxNotify.setAttribute('dir', 'rtl'); - ntflxNotify.classList.add('rtl-on'); - } - // rtl off + // font awesome icon style on + if (newNotifySettings.fontAwesomeIconStyle === 'shadow') { + theType.fontAwesomeIconColor = theType.background; + } + // font awesome icon style off - // font-family on - ntflxNotify.style.fontFamily = '"' + newNotifySettings.fontFamily + '", ' + defaultFontFamily; - // font-family off + // if cssAnimaion false -> duration on + if (!newNotifySettings.cssAnimation) { + newNotifySettings.cssAnimationDuration = 0; + } + // if cssAnimaion false -> duration off - // use css animation on - if (newNotifySettings.cssAnimation) { - ntflxNotify.style.animationDuration = newNotifySettings.cssAnimationDuration + 'ms'; - } - // use css animation off + // notify wrap on + var ntflxNotifyWrap = window.document.createElement('div'); + ntflxNotifyWrap.id = notifySettings.wrapID; + ntflxNotifyWrap.style.width = newNotifySettings.width; + ntflxNotifyWrap.style.zIndex = newNotifySettings.zindex; + ntflxNotifyWrap.style.opacity = newNotifySettings.opacity; + + // wrap position on + if (newNotifySettings.position === 'center-center') { + ntflxNotifyWrap.style.left = newNotifySettings.distance; + ntflxNotifyWrap.style.top = newNotifySettings.distance; + ntflxNotifyWrap.style.right = newNotifySettings.distance; + ntflxNotifyWrap.style.bottom = newNotifySettings.distance; + ntflxNotifyWrap.style.margin = 'auto'; + ntflxNotifyWrap.classList.add('nx-flex-center-center'); + ntflxNotifyWrap.style.maxHeight = 'calc((100vh - ' + newNotifySettings.distance + ') - ' + newNotifySettings.distance + ')'; + ntflxNotifyWrap.style.display = 'flex'; + ntflxNotifyWrap.style.flexWrap = 'wrap'; + ntflxNotifyWrap.style.flexDirection = 'column'; + ntflxNotifyWrap.style.justifyContent = 'center'; + ntflxNotifyWrap.style.alignItems = 'center'; + ntflxNotifyWrap.style.pointerEvents = 'none'; + } else if (newNotifySettings.position === 'center-top') { + ntflxNotifyWrap.style.left = newNotifySettings.distance; + ntflxNotifyWrap.style.right = newNotifySettings.distance; + ntflxNotifyWrap.style.top = newNotifySettings.distance; + ntflxNotifyWrap.style.bottom = 'auto'; + ntflxNotifyWrap.style.margin = 'auto'; + } else if (newNotifySettings.position === 'center-bottom') { + ntflxNotifyWrap.style.left = newNotifySettings.distance; + ntflxNotifyWrap.style.right = newNotifySettings.distance; + ntflxNotifyWrap.style.bottom = newNotifySettings.distance; + ntflxNotifyWrap.style.top = 'auto'; + ntflxNotifyWrap.style.margin = 'auto'; + } else if (newNotifySettings.position === 'right-bottom') { + ntflxNotifyWrap.style.right = newNotifySettings.distance; + ntflxNotifyWrap.style.bottom = newNotifySettings.distance; + ntflxNotifyWrap.style.top = 'auto'; + ntflxNotifyWrap.style.left = 'auto'; + } else if (newNotifySettings.position === 'left-top') { + ntflxNotifyWrap.style.left = newNotifySettings.distance; + ntflxNotifyWrap.style.top = newNotifySettings.distance; + ntflxNotifyWrap.style.right = 'auto'; + ntflxNotifyWrap.style.bottom = 'auto'; + } else if (newNotifySettings.position === 'left-bottom') { + ntflxNotifyWrap.style.left = newNotifySettings.distance; + ntflxNotifyWrap.style.bottom = newNotifySettings.distance; + ntflxNotifyWrap.style.top = 'auto'; + ntflxNotifyWrap.style.right = 'auto'; + } else { // 'right-top' or else + ntflxNotifyWrap.style.right = newNotifySettings.distance; + ntflxNotifyWrap.style.top = newNotifySettings.distance; + ntflxNotifyWrap.style.left = 'auto'; + ntflxNotifyWrap.style.bottom = 'auto'; + } + // wrap position off - // close button element on - var closeButtonHTML = ''; - if (newNotifySettings.closeButton && typeof callback !== 'function') { - closeButtonHTML = ''; + // if background overlay true on + var notifyOverlay; + if (newNotifySettings.backOverlay) { + notifyOverlay = window.document.createElement('div'); + notifyOverlay.id = newNotifySettings.ID + 'Overlay'; + notifyOverlay.style.width = '100%'; + notifyOverlay.style.height = '100%'; + notifyOverlay.style.position = 'fixed'; + notifyOverlay.style.zIndex = newNotifySettings.zindex; + notifyOverlay.style.left = 0; + notifyOverlay.style.top = 0; + notifyOverlay.style.right = 0; + notifyOverlay.style.bottom = 0; + notifyOverlay.style.background = theType.backOverlayColor || newNotifySettings.backOverlayColor; + notifyOverlay.className = (newNotifySettings.cssAnimation ? 'with-animation' : ''); + notifyOverlay.style.animationDuration = (newNotifySettings.cssAnimation) ? newNotifySettings.cssAnimationDuration + 'ms' : ''; + // if there is not an backoverlay element create a new one + if (!window.document.getElementById(notifyOverlay.id)) { + window.document.body.appendChild(notifyOverlay); } - // close buttpon element off + // if there is a backoverlay element and also if there is not a notify element with a callback, change backoverlay color by each type + else if (notifyElmCountOnlyCallback === 0) { + window.document.getElementById(notifyOverlay.id).style.background = theType.backOverlayColor || newNotifySettings.backOverlayColor; + } + } + // if background overlay true off - // use icon on - if (newNotifySettings.useIcon) { - // use font awesome - if (newNotifySettings.useFontAwesome) { - ntflxNotify.innerHTML = '' + message + '' + (newNotifySettings.closeButton ? closeButtonHTML : ''); - } - // use notiflix icon - else { - var svgIcon; - if (staticType === 'Success') { // success - svgIcon = ''; - } else if (staticType === 'Failure') { // failure - svgIcon = ''; - } else if (staticType === 'Warning') { // warning - svgIcon = ''; - } else if (staticType === 'Info') { // info - svgIcon = ''; - } else { - svgIcon = ''; - } - ntflxNotify.innerHTML = svgIcon + '' + message + '' + (newNotifySettings.closeButton ? closeButtonHTML : ''); - } + if (!window.document.getElementById(ntflxNotifyWrap.id)) { + window.document.body.appendChild(ntflxNotifyWrap); + } + // notify wrap off + + // notify content on + var ntflxNotify = window.document.createElement('div'); + ntflxNotify.id = newNotifySettings.ID + '-' + notifyElmCount; + ntflxNotify.className = newNotifySettings.className + ' ' + theType.childClassName + ' ' + (newNotifySettings.cssAnimation ? 'with-animation' : '') + ' ' + (newNotifySettings.useIcon ? 'with-icon' : '') + ' nx-' + newNotifySettings.cssAnimationStyle + ' ' + (newNotifySettings.closeButton && typeof callback !== 'function' ? 'with-close-button' : '') + ' ' + (typeof callback === 'function' ? 'with-callback' : '') + ' ' + (newNotifySettings.clickToClose ? 'click-to-close' : ''); + ntflxNotify.style.fontSize = newNotifySettings.fontSize; + ntflxNotify.style.color = theType.textColor; + ntflxNotify.style.background = theType.background; + ntflxNotify.style.borderRadius = newNotifySettings.borderRadius; + ntflxNotify.style.pointerEvents = 'all'; + + // rtl on + if (newNotifySettings.rtl) { + ntflxNotify.setAttribute('dir', 'rtl'); + ntflxNotify.classList.add('rtl-on'); + } + // rtl off + + // font-family on + ntflxNotify.style.fontFamily = '"' + newNotifySettings.fontFamily + '", ' + defaultFontFamily; + // font-family off + + // use css animation on + if (newNotifySettings.cssAnimation) { + ntflxNotify.style.animationDuration = newNotifySettings.cssAnimationDuration + 'ms'; + } + // use css animation off + + // close button element on + var closeButtonHTML = ''; + if (newNotifySettings.closeButton && typeof callback !== 'function') { + closeButtonHTML = ''; + } + // close buttpon element off + + // use icon on + if (newNotifySettings.useIcon) { + // use font awesome + if (newNotifySettings.useFontAwesome) { + ntflxNotify.innerHTML = '' + message + '' + (newNotifySettings.closeButton ? closeButtonHTML : ''); } - // without icon + // use notiflix icon else { - ntflxNotify.innerHTML = '' + message + '' + (newNotifySettings.closeButton ? closeButtonHTML : ''); + var svgIcon; + if (staticType === 'Success') { // success + svgIcon = ''; + } else if (staticType === 'Failure') { // failure + svgIcon = ''; + } else if (staticType === 'Warning') { // warning + svgIcon = ''; + } else if (staticType === 'Info') { // info + svgIcon = ''; + } else { + svgIcon = ''; + } + ntflxNotify.innerHTML = svgIcon + '' + message + '' + (newNotifySettings.closeButton ? closeButtonHTML : ''); } - // use icon off - // notify content off + } + // without icon + else { + ntflxNotify.innerHTML = '' + message + '' + (newNotifySettings.closeButton ? closeButtonHTML : ''); + } + // use icon off + // notify content off - // notify append or prepend on - if (newNotifySettings.position === 'left-bottom' || newNotifySettings.position === 'right-bottom') { // the new one will be first - var notifyWrap = window.document.getElementById(ntflxNotifyWrap.id); - notifyWrap.insertBefore(ntflxNotify, notifyWrap.firstChild); - } else { - window.document.getElementById(ntflxNotifyWrap.id).appendChild(ntflxNotify); - } + // notify append or prepend on + if (newNotifySettings.position === 'left-bottom' || newNotifySettings.position === 'right-bottom') { // the new one will be first + var notifyWrap = window.document.getElementById(ntflxNotifyWrap.id); + notifyWrap.insertBefore(ntflxNotify, notifyWrap.firstChild); + } else { + window.document.getElementById(ntflxNotifyWrap.id).appendChild(ntflxNotify); + } - if (newNotifySettings.useIcon) { // if useIcon, dynamically vertical align the contents - var messageIcon = window.document.getElementById(ntflxNotify.id).querySelectorAll('.nmi')[0]; - var messageIconH = 40; - // if font awesome - if (newNotifySettings.useFontAwesome) { - messageIconH = Math.round(parseInt(messageIcon.offsetHeight)); - } - // if notiflix SVG - else { - var SvgBBox = messageIcon.getBBox(); - messageIconH = Math.round(parseInt(SvgBBox.width)); - } - var messageText = window.document.getElementById(ntflxNotify.id).querySelectorAll('span')[0]; - var messageTextH = Math.round(messageText.offsetHeight); - if (messageTextH <= messageIconH) { - messageText.style.paddingTop = (messageIconH - messageTextH) / 2 + 'px'; - messageText.style.paddingBottom = (messageIconH - messageTextH) / 2 + 'px'; - } + if (newNotifySettings.useIcon) { // if useIcon, dynamically vertical align the contents + var messageIcon = window.document.getElementById(ntflxNotify.id).querySelectorAll('.nmi')[0]; + var messageIconH = 40; + // if font awesome + if (newNotifySettings.useFontAwesome) { + messageIconH = Math.round(parseInt(messageIcon.offsetHeight)); + } + // if notiflix SVG + else { + var SvgBBox = messageIcon.getBBox(); + messageIconH = Math.round(parseInt(SvgBBox.width)); + } + var messageText = window.document.getElementById(ntflxNotify.id).querySelectorAll('span')[0]; + var messageTextH = Math.round(messageText.offsetHeight); + if (messageTextH <= messageIconH) { + messageText.style.paddingTop = (messageIconH - messageTextH) / 2 + 'px'; + messageText.style.paddingBottom = (messageIconH - messageTextH) / 2 + 'px'; } - // notify append or prepend off - - // remove by timeout or click on - if (window.document.getElementById(ntflxNotify.id)) { - // set elements on - var removeDiv = window.document.getElementById(ntflxNotify.id); - var removeWrap = window.document.getElementById(ntflxNotifyWrap.id); - var removeOverlay; - if (newNotifySettings.backOverlay) { - removeOverlay = window.document.getElementById(notifyOverlay.id); + } + // notify append or prepend off + + // remove by timeout or click on + if (window.document.getElementById(ntflxNotify.id)) { + // set elements on + var removeDiv = window.document.getElementById(ntflxNotify.id); + var removeWrap = window.document.getElementById(ntflxNotifyWrap.id); + var removeOverlay; + if (newNotifySettings.backOverlay) { + removeOverlay = window.document.getElementById(notifyOverlay.id); + } + // set elements on + + // timeout vars on + var timeoutHide; + var timeoutRemove; + // timeout vars off + + // hide notify elm and hide overlay on + var hideNotifyElementsAndOverlay = function () { + removeDiv.classList.add('remove'); + if (newNotifySettings.backOverlay && removeWrap.childElementCount <= 0) { + removeOverlay.classList.add('remove'); } - // set elements on - - // timeout vars on - var timeoutHide; - var timeoutRemove; - // timeout vars off - - // hide notify elm and hide overlay on - var hideNotifyElementsAndOverlay = function () { - removeDiv.classList.add('remove'); - if (newNotifySettings.backOverlay && removeWrap.childElementCount <= 0) { - removeOverlay.classList.add('remove'); - } - clearTimeout(timeoutHide); - }; - // hide notify elm and hide overlay off - - // remove notify elm and wrapper on - var removeNotifyElmentsAndWrapper = function () { - var notifyExist = window.document.getElementById(ntflxNotify.id); - if (notifyExist && removeDiv.parentNode !== null) { - removeDiv.parentNode.removeChild(removeDiv); - } - if (removeWrap.childElementCount <= 0 && removeWrap.parentNode !== null) { // if childs count === 0 remove wrap - removeWrap.parentNode.removeChild(removeWrap); - if (newNotifySettings.backOverlay && removeOverlay.parentNode !== null) { - removeOverlay.parentNode.removeChild(removeOverlay); - } - } - clearTimeout(timeoutRemove); - }; - // remove notify elm and wrapper off - - // if close button and callback is not a function on - if (newNotifySettings.closeButton && typeof callback !== 'function') { - var closeButtonElm = window.document.getElementById(ntflxNotify.id).querySelectorAll('span.notify-close-button')[0]; - closeButtonElm.addEventListener('click', function () { - hideNotifyElementsAndOverlay(); - var clickToCloseTimeout = setTimeout(function () { - removeNotifyElmentsAndWrapper(); - clearTimeout(clickToCloseTimeout); - }, newNotifySettings.cssAnimationDuration); - }); + clearTimeout(timeoutHide); + }; + // hide notify elm and hide overlay off + + // remove notify elm and wrapper on + var removeNotifyElmentsAndWrapper = function () { + var notifyExist = window.document.getElementById(ntflxNotify.id); + if (notifyExist && removeDiv.parentNode !== null) { + removeDiv.parentNode.removeChild(removeDiv); } - // if close button and callback is not a function off - - // if callback or click to close on - if ((typeof callback === 'function') || newNotifySettings.clickToClose) { - removeDiv.addEventListener('click', function () { - if (typeof callback === 'function') { - notifyElmCountOnlyCallback--; - callback(); - } - hideNotifyElementsAndOverlay(); - var callbackTimeout = setTimeout(function () { - removeNotifyElmentsAndWrapper(); - clearTimeout(callbackTimeout); - }, newNotifySettings.cssAnimationDuration); - }); + if (removeWrap.childElementCount <= 0 && removeWrap.parentNode !== null) { // if childs count === 0 remove wrap + removeWrap.parentNode.removeChild(removeWrap); + if (newNotifySettings.backOverlay && removeOverlay.parentNode !== null) { + removeOverlay.parentNode.removeChild(removeOverlay); + } } - // if callback or click to close off - - // else auto remove on - if (!newNotifySettings.closeButton && typeof callback !== 'function') { - timeoutHide = setTimeout(function () { - hideNotifyElementsAndOverlay(); - }, newNotifySettings.timeout); - timeoutRemove = setTimeout(function () { + clearTimeout(timeoutRemove); + }; + // remove notify elm and wrapper off + + // if close button and callback is not a function on + if (newNotifySettings.closeButton && typeof callback !== 'function') { + var closeButtonElm = window.document.getElementById(ntflxNotify.id).querySelectorAll('span.notify-close-button')[0]; + closeButtonElm.addEventListener('click', function () { + hideNotifyElementsAndOverlay(); + var clickToCloseTimeout = setTimeout(function () { removeNotifyElmentsAndWrapper(); - }, newNotifySettings.timeout + newNotifySettings.cssAnimationDuration); - } - // else auto remove off + clearTimeout(clickToCloseTimeout); + }, newNotifySettings.cssAnimationDuration); + }); } - // remove by timeout or click off - - // notify - show only the last one on - if (newNotifySettings.showOnlyTheLastOne && notifyElmCount > 0) { - var allNotifyElmNotTheLastOne = window.document.querySelectorAll('[id^=' + newNotifySettings.ID + '-]:not([id=' + newNotifySettings.ID + '-' + notifyElmCount + '])'); - for (var i = 0; i < allNotifyElmNotTheLastOne.length; i++) { - var eachNotifyElmNotLastOne = allNotifyElmNotTheLastOne[i]; - if (eachNotifyElmNotLastOne.parentNode !== null) { - eachNotifyElmNotLastOne.parentNode.removeChild(eachNotifyElmNotLastOne); + // if close button and callback is not a function off + + // if callback or click to close on + if ((typeof callback === 'function') || newNotifySettings.clickToClose) { + removeDiv.addEventListener('click', function () { + if (typeof callback === 'function') { + notifyElmCountOnlyCallback--; + callback(); } + hideNotifyElementsAndOverlay(); + var callbackTimeout = setTimeout(function () { + removeNotifyElmentsAndWrapper(); + clearTimeout(callbackTimeout); + }, newNotifySettings.cssAnimationDuration); + }); + } + // if callback or click to close off + + // else auto remove on + if (!newNotifySettings.closeButton && typeof callback !== 'function') { + timeoutHide = setTimeout(function () { + hideNotifyElementsAndOverlay(); + }, newNotifySettings.timeout); + timeoutRemove = setTimeout(function () { + removeNotifyElmentsAndWrapper(); + }, newNotifySettings.timeout + newNotifySettings.cssAnimationDuration); + } + // else auto remove off + } + // remove by timeout or click off + + // notify - show only the last one on + if (newNotifySettings.showOnlyTheLastOne && notifyElmCount > 0) { + var allNotifyElmNotTheLastOne = window.document.querySelectorAll('[id^=' + newNotifySettings.ID + '-]:not([id=' + newNotifySettings.ID + '-' + notifyElmCount + '])'); + for (var i = 0; i < allNotifyElmNotTheLastOne.length; i++) { + var eachNotifyElmNotLastOne = allNotifyElmNotTheLastOne[i]; + if (eachNotifyElmNotLastOne.parentNode !== null) { + eachNotifyElmNotLastOne.parentNode.removeChild(eachNotifyElmNotLastOne); } } - // notify - show only the last one off - - } else { - notiflixConsoleError('Notiflix Error', 'Where is the arguments?'); } + // notify - show only the last one off + + // extend new settings with the backup settings + newNotifySettings = extendNotiflix(true, newNotifySettings, newNotifySettingsBackup); + }; // Notiflix: Notify Single off // Notiflix: Report Single on - var NotiflixReport = function (title, message, buttonText, buttonCallback, theType, staticType) { + var NotiflixReport = function (title, message, buttonText, optionsOrCallback, buttonCallback, staticType) { + // if not initialized pretend like init + if (!newReportSettings) { + Notiflix.Report.Init({}); + } + + // create a backup for settings + var newReportSettingsBackup = {}; + + // detect optionsOrCallback and buttonCallback on + if (typeof optionsOrCallback === 'function') { + buttonCallback = optionsOrCallback; + } + + if (typeof optionsOrCallback === 'object' && !Array.isArray(optionsOrCallback)) { + // extend the backup settings with new settings + newReportSettingsBackup = extendNotiflix(true, newReportSettings, {}); + + // extend new settings with the options + newReportSettings = extendNotiflix(true, newReportSettings, optionsOrCallback); + } + // detect optionsOrCallback and callback off + + // report type + var theType = newReportSettings[staticType.toLocaleLowerCase('en')]; // check the arguments on if (typeof title !== 'string') { title = 'Notiflix ' + staticType; } @@ -928,6 +975,9 @@ } // report wrap off + // extend new settings with the backup settings + newReportSettings = extendNotiflix(true, newReportSettings, newReportSettingsBackup); + }; // Notiflix: Report Single off @@ -1591,40 +1641,20 @@ } }, // Display Notification: Success - Success: function (message, callback) { - // if not initialized pretend like init - if (!newNotifySettings) { - Notiflix.Notify.Init({}); - } - var theType = newNotifySettings.success; - NotiflixNotify(message, callback, theType, 'Success'); + Success: function (message, optionsOrCallback, callback) { + NotiflixNotify(message, optionsOrCallback, callback, 'Success'); }, // Display Notification: Failure - Failure: function (message, callback) { - // if not initialized pretend like init - if (!newNotifySettings) { - Notiflix.Notify.Init({}); - } - var theType = newNotifySettings.failure; - NotiflixNotify(message, callback, theType, 'Failure'); + Failure: function (message, optionsOrCallback, callback) { + NotiflixNotify(message, optionsOrCallback, callback, 'Failure'); }, // Display Notification: Warning - Warning: function (message, callback) { - // if not initialized pretend like init - if (!newNotifySettings) { - Notiflix.Notify.Init({}); - } - var theType = newNotifySettings.warning; - NotiflixNotify(message, callback, theType, 'Warning'); + Warning: function (message, optionsOrCallback, callback) { + NotiflixNotify(message, optionsOrCallback, callback, 'Warning'); }, // Display Notification: Info - Info: function (message, callback) { - // if not initialized pretend like init - if (!newNotifySettings) { - Notiflix.Notify.Init({}); - } - var theType = newNotifySettings.info; - NotiflixNotify(message, callback, theType, 'Info'); + Info: function (message, optionsOrCallback, callback) { + NotiflixNotify(message, optionsOrCallback, callback, 'Info'); }, }, // Notify off @@ -1653,40 +1683,20 @@ } }, // Display Report: Success - Success: function (title, message, buttonText, buttonCallback) { - // if not initialized pretend like init - if (!newReportSettings) { - Notiflix.Report.Init({}); - } - var theType = newReportSettings.success; - NotiflixReport(title, message, buttonText, buttonCallback, theType, 'Success'); + Success: function (title, message, buttonText, optionsOrCallback, callback) { + NotiflixReport(title, message, buttonText, optionsOrCallback, callback, 'Success'); }, // Display Report: Failure - Failure: function (title, message, buttonText, buttonCallback) { - // if not initialized pretend like init - if (!newReportSettings) { - Notiflix.Report.Init({}); - } - var theType = newReportSettings.failure; - NotiflixReport(title, message, buttonText, buttonCallback, theType, 'Failure'); + Failure: function (title, message, buttonText, optionsOrCallback, callback) { + NotiflixReport(title, message, buttonText, optionsOrCallback, callback, 'Failure'); }, // Display Report: Warning - Warning: function (title, message, buttonText, buttonCallback) { - // if not initialized pretend like init - if (!newReportSettings) { - Notiflix.Report.Init({}); - } - var theType = newReportSettings.warning; - NotiflixReport(title, message, buttonText, buttonCallback, theType, 'Warning'); + Warning: function (title, message, buttonText, optionsOrCallback, callback) { + NotiflixReport(title, message, buttonText, optionsOrCallback, callback, 'Warning'); }, // Display Report: Info - Info: function (title, message, buttonText, buttonCallback) { - // if not initialized pretend like init - if (!newReportSettings) { - Notiflix.Report.Init({}); - } - var theType = newReportSettings.info; - NotiflixReport(title, message, buttonText, buttonCallback, theType, 'Info'); + Info: function (title, message, buttonText, optionsOrCallback, callback) { + NotiflixReport(title, message, buttonText, optionsOrCallback, callback, 'Info'); }, }, // Report off diff --git a/src/notiflix.css b/src/notiflix.css index 3f74f3e..dc213bb 100644 --- a/src/notiflix.css +++ b/src/notiflix.css @@ -1,6 +1,6 @@ /*! * Notiflix ('https://www.notiflix.com') -* Version: 2.2.1 +* Version: 2.3.0 * Author: Furkan MT ('https://github.com/furcan') * Copyright 2020 Notiflix, MIT Licence ('https://opensource.org/licenses/MIT') */ diff --git a/src/notiflix.js b/src/notiflix.js index 7cb7a90..2a88d8b 100644 --- a/src/notiflix.js +++ b/src/notiflix.js @@ -1,6 +1,6 @@ /*! * Notiflix ('https://www.notiflix.com') -* Version: 2.2.1 +* Version: 2.3.0 * Author: Furkan MT ('https://github.com/furcan') * Copyright 2020 Notiflix, MIT Licence ('https://opensource.org/licenses/MIT') */ @@ -312,7 +312,7 @@ // Notiflix: GoogleFont on var notiflixGoogleFont = function (use, family) { - if (!window.document.getElementById('NotiflixQuicksand') && use && (family && typeof family === 'string' && family.toLowerCase() === 'quicksand')) { + if (!window.document.getElementById('NotiflixQuicksand') && use && (typeof family === 'string' && family.toLowerCase() === 'quicksand')) { // google fonts dns prefetch on var dns = ''; var dnsRange = window.document.createRange(); @@ -447,342 +447,389 @@ // Notiflix: Notify Single on var notifyElmCount = 0; var notifyElmCountOnlyCallback = 0; - var NotiflixNotify = function (message, callback, theType, staticType) { - if (arguments && arguments.length === 4) { + var NotiflixNotify = function (message, optionsOrCallback, callback, staticType) { + // if not initialized pretend like init + if (!newNotifySettings) { + Notiflix.Notify.Init({}); + } - // notify counter on - notifyElmCount++; - if (typeof callback === 'function') { - notifyElmCountOnlyCallback++; - } - // notify counter off + // create a backup for settings + var newNotifySettingsBackup = {}; - // if no message on - if (typeof message !== 'string') { - message = 'Notiflix ' + staticType; - } - // if no message off + // detect optionsOrCallback and callback on + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + } - // if plainText true = HTML tags not allowed on - if (newNotifySettings.plainText) { - message = notiflixPlaintext(message); // message plain text - } - // if plainText true = HTML tags not allowed off + if (typeof optionsOrCallback === 'object' && !Array.isArray(optionsOrCallback)) { + // extend the backup settings with new settings + newNotifySettingsBackup = extendNotiflix(true, newNotifySettings, {}); - // if plainText false but the message length more than messageMaxLength = HTML tags error on - if (!newNotifySettings.plainText && message.length > newNotifySettings.messageMaxLength) { - Notiflix.Notify.Merge({ - closeButton: true, - plainText: false, - }); - message = 'HTML Tags Error: Your content length is more than "messageMaxLength" option.'; // message html error - } - // if plainText false but the message length more than messageMaxLength = HTML tags error off + // extend new settings with the options + newNotifySettings = extendNotiflix(true, newNotifySettings, optionsOrCallback); + } + // detect optionsOrCallback and callback off - // message max length substring on - if (message.length > newNotifySettings.messageMaxLength) { - message = message.substring(0, newNotifySettings.messageMaxLength) + '...'; - } - // message max length substring off + // notify type + var theType = newNotifySettings[staticType.toLocaleLowerCase('en')]; - // font awesome icon style on - if (newNotifySettings.fontAwesomeIconStyle === 'shadow') { - theType.fontAwesomeIconColor = theType.background; - } - // font awesome icon style off + // notify counter on + notifyElmCount++; + if (typeof callback === 'function') { + notifyElmCountOnlyCallback++; + } + // notify counter off - // if cssAnimaion false -> duration on - if (!newNotifySettings.cssAnimation) { - newNotifySettings.cssAnimationDuration = 0; - } - // if cssAnimaion false -> duration off + // if no message on + if (typeof message !== 'string') { + message = 'Notiflix ' + staticType; + } + // if no message off - // notify wrap on - var ntflxNotifyWrap = window.document.createElement('div'); - ntflxNotifyWrap.id = notifySettings.wrapID; - ntflxNotifyWrap.style.width = newNotifySettings.width; - ntflxNotifyWrap.style.zIndex = newNotifySettings.zindex; - ntflxNotifyWrap.style.opacity = newNotifySettings.opacity; - - // wrap position on - if (newNotifySettings.position === 'center-center') { - ntflxNotifyWrap.style.left = newNotifySettings.distance; - ntflxNotifyWrap.style.top = newNotifySettings.distance; - ntflxNotifyWrap.style.right = newNotifySettings.distance; - ntflxNotifyWrap.style.bottom = newNotifySettings.distance; - ntflxNotifyWrap.style.margin = 'auto'; - ntflxNotifyWrap.classList.add('nx-flex-center-center'); - ntflxNotifyWrap.style.maxHeight = 'calc((100vh - ' + newNotifySettings.distance + ') - ' + newNotifySettings.distance + ')'; - ntflxNotifyWrap.style.display = 'flex'; - ntflxNotifyWrap.style.flexWrap = 'wrap'; - ntflxNotifyWrap.style.flexDirection = 'column'; - ntflxNotifyWrap.style.justifyContent = 'center'; - ntflxNotifyWrap.style.alignItems = 'center'; - ntflxNotifyWrap.style.pointerEvents = 'none'; - } else if (newNotifySettings.position === 'center-top') { - ntflxNotifyWrap.style.left = newNotifySettings.distance; - ntflxNotifyWrap.style.right = newNotifySettings.distance; - ntflxNotifyWrap.style.top = newNotifySettings.distance; - ntflxNotifyWrap.style.bottom = 'auto'; - ntflxNotifyWrap.style.margin = 'auto'; - } else if (newNotifySettings.position === 'center-bottom') { - ntflxNotifyWrap.style.left = newNotifySettings.distance; - ntflxNotifyWrap.style.right = newNotifySettings.distance; - ntflxNotifyWrap.style.bottom = newNotifySettings.distance; - ntflxNotifyWrap.style.top = 'auto'; - ntflxNotifyWrap.style.margin = 'auto'; - } else if (newNotifySettings.position === 'right-bottom') { - ntflxNotifyWrap.style.right = newNotifySettings.distance; - ntflxNotifyWrap.style.bottom = newNotifySettings.distance; - ntflxNotifyWrap.style.top = 'auto'; - ntflxNotifyWrap.style.left = 'auto'; - } else if (newNotifySettings.position === 'left-top') { - ntflxNotifyWrap.style.left = newNotifySettings.distance; - ntflxNotifyWrap.style.top = newNotifySettings.distance; - ntflxNotifyWrap.style.right = 'auto'; - ntflxNotifyWrap.style.bottom = 'auto'; - } else if (newNotifySettings.position === 'left-bottom') { - ntflxNotifyWrap.style.left = newNotifySettings.distance; - ntflxNotifyWrap.style.bottom = newNotifySettings.distance; - ntflxNotifyWrap.style.top = 'auto'; - ntflxNotifyWrap.style.right = 'auto'; - } else { // 'right-top' or else - ntflxNotifyWrap.style.right = newNotifySettings.distance; - ntflxNotifyWrap.style.top = newNotifySettings.distance; - ntflxNotifyWrap.style.left = 'auto'; - ntflxNotifyWrap.style.bottom = 'auto'; - } - // wrap position off + // if plainText true = HTML tags not allowed on + if (newNotifySettings.plainText) { + message = notiflixPlaintext(message); // message plain text + } + // if plainText true = HTML tags not allowed off - // if background overlay true on - var notifyOverlay; - if (newNotifySettings.backOverlay) { - notifyOverlay = window.document.createElement('div'); - notifyOverlay.id = newNotifySettings.ID + 'Overlay'; - notifyOverlay.style.width = '100%'; - notifyOverlay.style.height = '100%'; - notifyOverlay.style.position = 'fixed'; - notifyOverlay.style.zIndex = newNotifySettings.zindex; - notifyOverlay.style.left = 0; - notifyOverlay.style.top = 0; - notifyOverlay.style.right = 0; - notifyOverlay.style.bottom = 0; - notifyOverlay.style.background = theType.backOverlayColor || newNotifySettings.backOverlayColor; - notifyOverlay.className = (newNotifySettings.cssAnimation ? 'with-animation' : ''); - notifyOverlay.style.animationDuration = (newNotifySettings.cssAnimation) ? newNotifySettings.cssAnimationDuration + 'ms' : ''; - // if there is not an backoverlay element create a new one - if (!window.document.getElementById(notifyOverlay.id)) { - window.document.body.appendChild(notifyOverlay); - } - // if there is a backoverlay element and also if there is not a notify element with a callback, change backoverlay color by each type - else if (notifyElmCountOnlyCallback === 0) { - window.document.getElementById(notifyOverlay.id).style.background = theType.backOverlayColor || newNotifySettings.backOverlayColor; - } - } - // if background overlay true off + // if plainText false but the message length more than messageMaxLength = HTML tags error on + if (!newNotifySettings.plainText && message.length > newNotifySettings.messageMaxLength) { + Notiflix.Notify.Merge({ + closeButton: true, + plainText: false, + }); + message = 'HTML Tags Error: Your content length is more than "messageMaxLength" option.'; // message html error + } + // if plainText false but the message length more than messageMaxLength = HTML tags error off - if (!window.document.getElementById(ntflxNotifyWrap.id)) { - window.document.body.appendChild(ntflxNotifyWrap); - } - // notify wrap off - - // notify content on - var ntflxNotify = window.document.createElement('div'); - ntflxNotify.id = newNotifySettings.ID + '-' + notifyElmCount; - ntflxNotify.className = newNotifySettings.className + ' ' + theType.childClassName + ' ' + (newNotifySettings.cssAnimation ? 'with-animation' : '') + ' ' + (newNotifySettings.useIcon ? 'with-icon' : '') + ' nx-' + newNotifySettings.cssAnimationStyle + ' ' + (newNotifySettings.closeButton && typeof callback !== 'function' ? 'with-close-button' : '') + ' ' + (typeof callback === 'function' ? 'with-callback' : '') + ' ' + (newNotifySettings.clickToClose ? 'click-to-close' : ''); - ntflxNotify.style.fontSize = newNotifySettings.fontSize; - ntflxNotify.style.color = theType.textColor; - ntflxNotify.style.background = theType.background; - ntflxNotify.style.borderRadius = newNotifySettings.borderRadius; - ntflxNotify.style.pointerEvents = 'all'; + // message max length substring on + if (message.length > newNotifySettings.messageMaxLength) { + message = message.substring(0, newNotifySettings.messageMaxLength) + '...'; + } + // message max length substring off - // rtl on - if (newNotifySettings.rtl) { - ntflxNotify.setAttribute('dir', 'rtl'); - ntflxNotify.classList.add('rtl-on'); - } - // rtl off + // font awesome icon style on + if (newNotifySettings.fontAwesomeIconStyle === 'shadow') { + theType.fontAwesomeIconColor = theType.background; + } + // font awesome icon style off - // font-family on - ntflxNotify.style.fontFamily = '"' + newNotifySettings.fontFamily + '", ' + defaultFontFamily; - // font-family off + // if cssAnimaion false -> duration on + if (!newNotifySettings.cssAnimation) { + newNotifySettings.cssAnimationDuration = 0; + } + // if cssAnimaion false -> duration off - // use css animation on - if (newNotifySettings.cssAnimation) { - ntflxNotify.style.animationDuration = newNotifySettings.cssAnimationDuration + 'ms'; - } - // use css animation off + // notify wrap on + var ntflxNotifyWrap = window.document.createElement('div'); + ntflxNotifyWrap.id = notifySettings.wrapID; + ntflxNotifyWrap.style.width = newNotifySettings.width; + ntflxNotifyWrap.style.zIndex = newNotifySettings.zindex; + ntflxNotifyWrap.style.opacity = newNotifySettings.opacity; + + // wrap position on + if (newNotifySettings.position === 'center-center') { + ntflxNotifyWrap.style.left = newNotifySettings.distance; + ntflxNotifyWrap.style.top = newNotifySettings.distance; + ntflxNotifyWrap.style.right = newNotifySettings.distance; + ntflxNotifyWrap.style.bottom = newNotifySettings.distance; + ntflxNotifyWrap.style.margin = 'auto'; + ntflxNotifyWrap.classList.add('nx-flex-center-center'); + ntflxNotifyWrap.style.maxHeight = 'calc((100vh - ' + newNotifySettings.distance + ') - ' + newNotifySettings.distance + ')'; + ntflxNotifyWrap.style.display = 'flex'; + ntflxNotifyWrap.style.flexWrap = 'wrap'; + ntflxNotifyWrap.style.flexDirection = 'column'; + ntflxNotifyWrap.style.justifyContent = 'center'; + ntflxNotifyWrap.style.alignItems = 'center'; + ntflxNotifyWrap.style.pointerEvents = 'none'; + } else if (newNotifySettings.position === 'center-top') { + ntflxNotifyWrap.style.left = newNotifySettings.distance; + ntflxNotifyWrap.style.right = newNotifySettings.distance; + ntflxNotifyWrap.style.top = newNotifySettings.distance; + ntflxNotifyWrap.style.bottom = 'auto'; + ntflxNotifyWrap.style.margin = 'auto'; + } else if (newNotifySettings.position === 'center-bottom') { + ntflxNotifyWrap.style.left = newNotifySettings.distance; + ntflxNotifyWrap.style.right = newNotifySettings.distance; + ntflxNotifyWrap.style.bottom = newNotifySettings.distance; + ntflxNotifyWrap.style.top = 'auto'; + ntflxNotifyWrap.style.margin = 'auto'; + } else if (newNotifySettings.position === 'right-bottom') { + ntflxNotifyWrap.style.right = newNotifySettings.distance; + ntflxNotifyWrap.style.bottom = newNotifySettings.distance; + ntflxNotifyWrap.style.top = 'auto'; + ntflxNotifyWrap.style.left = 'auto'; + } else if (newNotifySettings.position === 'left-top') { + ntflxNotifyWrap.style.left = newNotifySettings.distance; + ntflxNotifyWrap.style.top = newNotifySettings.distance; + ntflxNotifyWrap.style.right = 'auto'; + ntflxNotifyWrap.style.bottom = 'auto'; + } else if (newNotifySettings.position === 'left-bottom') { + ntflxNotifyWrap.style.left = newNotifySettings.distance; + ntflxNotifyWrap.style.bottom = newNotifySettings.distance; + ntflxNotifyWrap.style.top = 'auto'; + ntflxNotifyWrap.style.right = 'auto'; + } else { // 'right-top' or else + ntflxNotifyWrap.style.right = newNotifySettings.distance; + ntflxNotifyWrap.style.top = newNotifySettings.distance; + ntflxNotifyWrap.style.left = 'auto'; + ntflxNotifyWrap.style.bottom = 'auto'; + } + // wrap position off - // close button element on - var closeButtonHTML = ''; - if (newNotifySettings.closeButton && typeof callback !== 'function') { - closeButtonHTML = ''; + // if background overlay true on + var notifyOverlay; + if (newNotifySettings.backOverlay) { + notifyOverlay = window.document.createElement('div'); + notifyOverlay.id = newNotifySettings.ID + 'Overlay'; + notifyOverlay.style.width = '100%'; + notifyOverlay.style.height = '100%'; + notifyOverlay.style.position = 'fixed'; + notifyOverlay.style.zIndex = newNotifySettings.zindex; + notifyOverlay.style.left = 0; + notifyOverlay.style.top = 0; + notifyOverlay.style.right = 0; + notifyOverlay.style.bottom = 0; + notifyOverlay.style.background = theType.backOverlayColor || newNotifySettings.backOverlayColor; + notifyOverlay.className = (newNotifySettings.cssAnimation ? 'with-animation' : ''); + notifyOverlay.style.animationDuration = (newNotifySettings.cssAnimation) ? newNotifySettings.cssAnimationDuration + 'ms' : ''; + // if there is not an backoverlay element create a new one + if (!window.document.getElementById(notifyOverlay.id)) { + window.document.body.appendChild(notifyOverlay); } - // close buttpon element off + // if there is a backoverlay element and also if there is not a notify element with a callback, change backoverlay color by each type + else if (notifyElmCountOnlyCallback === 0) { + window.document.getElementById(notifyOverlay.id).style.background = theType.backOverlayColor || newNotifySettings.backOverlayColor; + } + } + // if background overlay true off - // use icon on - if (newNotifySettings.useIcon) { - // use font awesome - if (newNotifySettings.useFontAwesome) { - ntflxNotify.innerHTML = '' + message + '' + (newNotifySettings.closeButton ? closeButtonHTML : ''); - } - // use notiflix icon - else { - var svgIcon; - if (staticType === 'Success') { // success - svgIcon = ''; - } else if (staticType === 'Failure') { // failure - svgIcon = ''; - } else if (staticType === 'Warning') { // warning - svgIcon = ''; - } else if (staticType === 'Info') { // info - svgIcon = ''; - } else { - svgIcon = ''; - } - ntflxNotify.innerHTML = svgIcon + '' + message + '' + (newNotifySettings.closeButton ? closeButtonHTML : ''); - } + if (!window.document.getElementById(ntflxNotifyWrap.id)) { + window.document.body.appendChild(ntflxNotifyWrap); + } + // notify wrap off + + // notify content on + var ntflxNotify = window.document.createElement('div'); + ntflxNotify.id = newNotifySettings.ID + '-' + notifyElmCount; + ntflxNotify.className = newNotifySettings.className + ' ' + theType.childClassName + ' ' + (newNotifySettings.cssAnimation ? 'with-animation' : '') + ' ' + (newNotifySettings.useIcon ? 'with-icon' : '') + ' nx-' + newNotifySettings.cssAnimationStyle + ' ' + (newNotifySettings.closeButton && typeof callback !== 'function' ? 'with-close-button' : '') + ' ' + (typeof callback === 'function' ? 'with-callback' : '') + ' ' + (newNotifySettings.clickToClose ? 'click-to-close' : ''); + ntflxNotify.style.fontSize = newNotifySettings.fontSize; + ntflxNotify.style.color = theType.textColor; + ntflxNotify.style.background = theType.background; + ntflxNotify.style.borderRadius = newNotifySettings.borderRadius; + ntflxNotify.style.pointerEvents = 'all'; + + // rtl on + if (newNotifySettings.rtl) { + ntflxNotify.setAttribute('dir', 'rtl'); + ntflxNotify.classList.add('rtl-on'); + } + // rtl off + + // font-family on + ntflxNotify.style.fontFamily = '"' + newNotifySettings.fontFamily + '", ' + defaultFontFamily; + // font-family off + + // use css animation on + if (newNotifySettings.cssAnimation) { + ntflxNotify.style.animationDuration = newNotifySettings.cssAnimationDuration + 'ms'; + } + // use css animation off + + // close button element on + var closeButtonHTML = ''; + if (newNotifySettings.closeButton && typeof callback !== 'function') { + closeButtonHTML = ''; + } + // close buttpon element off + + // use icon on + if (newNotifySettings.useIcon) { + // use font awesome + if (newNotifySettings.useFontAwesome) { + ntflxNotify.innerHTML = '' + message + '' + (newNotifySettings.closeButton ? closeButtonHTML : ''); } - // without icon + // use notiflix icon else { - ntflxNotify.innerHTML = '' + message + '' + (newNotifySettings.closeButton ? closeButtonHTML : ''); + var svgIcon; + if (staticType === 'Success') { // success + svgIcon = ''; + } else if (staticType === 'Failure') { // failure + svgIcon = ''; + } else if (staticType === 'Warning') { // warning + svgIcon = ''; + } else if (staticType === 'Info') { // info + svgIcon = ''; + } else { + svgIcon = ''; + } + ntflxNotify.innerHTML = svgIcon + '' + message + '' + (newNotifySettings.closeButton ? closeButtonHTML : ''); } - // use icon off - // notify content off + } + // without icon + else { + ntflxNotify.innerHTML = '' + message + '' + (newNotifySettings.closeButton ? closeButtonHTML : ''); + } + // use icon off + // notify content off - // notify append or prepend on - if (newNotifySettings.position === 'left-bottom' || newNotifySettings.position === 'right-bottom') { // the new one will be first - var notifyWrap = window.document.getElementById(ntflxNotifyWrap.id); - notifyWrap.insertBefore(ntflxNotify, notifyWrap.firstChild); - } else { - window.document.getElementById(ntflxNotifyWrap.id).appendChild(ntflxNotify); - } + // notify append or prepend on + if (newNotifySettings.position === 'left-bottom' || newNotifySettings.position === 'right-bottom') { // the new one will be first + var notifyWrap = window.document.getElementById(ntflxNotifyWrap.id); + notifyWrap.insertBefore(ntflxNotify, notifyWrap.firstChild); + } else { + window.document.getElementById(ntflxNotifyWrap.id).appendChild(ntflxNotify); + } - if (newNotifySettings.useIcon) { // if useIcon, dynamically vertical align the contents - var messageIcon = window.document.getElementById(ntflxNotify.id).querySelectorAll('.nmi')[0]; - var messageIconH = 40; - // if font awesome - if (newNotifySettings.useFontAwesome) { - messageIconH = Math.round(parseInt(messageIcon.offsetHeight)); - } - // if notiflix SVG - else { - var SvgBBox = messageIcon.getBBox(); - messageIconH = Math.round(parseInt(SvgBBox.width)); - } - var messageText = window.document.getElementById(ntflxNotify.id).querySelectorAll('span')[0]; - var messageTextH = Math.round(messageText.offsetHeight); - if (messageTextH <= messageIconH) { - messageText.style.paddingTop = (messageIconH - messageTextH) / 2 + 'px'; - messageText.style.paddingBottom = (messageIconH - messageTextH) / 2 + 'px'; - } + if (newNotifySettings.useIcon) { // if useIcon, dynamically vertical align the contents + var messageIcon = window.document.getElementById(ntflxNotify.id).querySelectorAll('.nmi')[0]; + var messageIconH = 40; + // if font awesome + if (newNotifySettings.useFontAwesome) { + messageIconH = Math.round(parseInt(messageIcon.offsetHeight)); + } + // if notiflix SVG + else { + var SvgBBox = messageIcon.getBBox(); + messageIconH = Math.round(parseInt(SvgBBox.width)); + } + var messageText = window.document.getElementById(ntflxNotify.id).querySelectorAll('span')[0]; + var messageTextH = Math.round(messageText.offsetHeight); + if (messageTextH <= messageIconH) { + messageText.style.paddingTop = (messageIconH - messageTextH) / 2 + 'px'; + messageText.style.paddingBottom = (messageIconH - messageTextH) / 2 + 'px'; } - // notify append or prepend off - - // remove by timeout or click on - if (window.document.getElementById(ntflxNotify.id)) { - // set elements on - var removeDiv = window.document.getElementById(ntflxNotify.id); - var removeWrap = window.document.getElementById(ntflxNotifyWrap.id); - var removeOverlay; - if (newNotifySettings.backOverlay) { - removeOverlay = window.document.getElementById(notifyOverlay.id); + } + // notify append or prepend off + + // remove by timeout or click on + if (window.document.getElementById(ntflxNotify.id)) { + // set elements on + var removeDiv = window.document.getElementById(ntflxNotify.id); + var removeWrap = window.document.getElementById(ntflxNotifyWrap.id); + var removeOverlay; + if (newNotifySettings.backOverlay) { + removeOverlay = window.document.getElementById(notifyOverlay.id); + } + // set elements on + + // timeout vars on + var timeoutHide; + var timeoutRemove; + // timeout vars off + + // hide notify elm and hide overlay on + var hideNotifyElementsAndOverlay = function () { + removeDiv.classList.add('remove'); + if (newNotifySettings.backOverlay && removeWrap.childElementCount <= 0) { + removeOverlay.classList.add('remove'); } - // set elements on - - // timeout vars on - var timeoutHide; - var timeoutRemove; - // timeout vars off - - // hide notify elm and hide overlay on - var hideNotifyElementsAndOverlay = function () { - removeDiv.classList.add('remove'); - if (newNotifySettings.backOverlay && removeWrap.childElementCount <= 0) { - removeOverlay.classList.add('remove'); - } - clearTimeout(timeoutHide); - }; - // hide notify elm and hide overlay off - - // remove notify elm and wrapper on - var removeNotifyElmentsAndWrapper = function () { - var notifyExist = window.document.getElementById(ntflxNotify.id); - if (notifyExist && removeDiv.parentNode !== null) { - removeDiv.parentNode.removeChild(removeDiv); - } - if (removeWrap.childElementCount <= 0 && removeWrap.parentNode !== null) { // if childs count === 0 remove wrap - removeWrap.parentNode.removeChild(removeWrap); - if (newNotifySettings.backOverlay && removeOverlay.parentNode !== null) { - removeOverlay.parentNode.removeChild(removeOverlay); - } - } - clearTimeout(timeoutRemove); - }; - // remove notify elm and wrapper off - - // if close button and callback is not a function on - if (newNotifySettings.closeButton && typeof callback !== 'function') { - var closeButtonElm = window.document.getElementById(ntflxNotify.id).querySelectorAll('span.notify-close-button')[0]; - closeButtonElm.addEventListener('click', function () { - hideNotifyElementsAndOverlay(); - var clickToCloseTimeout = setTimeout(function () { - removeNotifyElmentsAndWrapper(); - clearTimeout(clickToCloseTimeout); - }, newNotifySettings.cssAnimationDuration); - }); + clearTimeout(timeoutHide); + }; + // hide notify elm and hide overlay off + + // remove notify elm and wrapper on + var removeNotifyElmentsAndWrapper = function () { + var notifyExist = window.document.getElementById(ntflxNotify.id); + if (notifyExist && removeDiv.parentNode !== null) { + removeDiv.parentNode.removeChild(removeDiv); } - // if close button and callback is not a function off - - // if callback or click to close on - if ((typeof callback === 'function') || newNotifySettings.clickToClose) { - removeDiv.addEventListener('click', function () { - if (typeof callback === 'function') { - notifyElmCountOnlyCallback--; - callback(); - } - hideNotifyElementsAndOverlay(); - var callbackTimeout = setTimeout(function () { - removeNotifyElmentsAndWrapper(); - clearTimeout(callbackTimeout); - }, newNotifySettings.cssAnimationDuration); - }); + if (removeWrap.childElementCount <= 0 && removeWrap.parentNode !== null) { // if childs count === 0 remove wrap + removeWrap.parentNode.removeChild(removeWrap); + if (newNotifySettings.backOverlay && removeOverlay.parentNode !== null) { + removeOverlay.parentNode.removeChild(removeOverlay); + } } - // if callback or click to close off - - // else auto remove on - if (!newNotifySettings.closeButton && typeof callback !== 'function') { - timeoutHide = setTimeout(function () { - hideNotifyElementsAndOverlay(); - }, newNotifySettings.timeout); - timeoutRemove = setTimeout(function () { + clearTimeout(timeoutRemove); + }; + // remove notify elm and wrapper off + + // if close button and callback is not a function on + if (newNotifySettings.closeButton && typeof callback !== 'function') { + var closeButtonElm = window.document.getElementById(ntflxNotify.id).querySelectorAll('span.notify-close-button')[0]; + closeButtonElm.addEventListener('click', function () { + hideNotifyElementsAndOverlay(); + var clickToCloseTimeout = setTimeout(function () { removeNotifyElmentsAndWrapper(); - }, newNotifySettings.timeout + newNotifySettings.cssAnimationDuration); - } - // else auto remove off + clearTimeout(clickToCloseTimeout); + }, newNotifySettings.cssAnimationDuration); + }); } - // remove by timeout or click off - - // notify - show only the last one on - if (newNotifySettings.showOnlyTheLastOne && notifyElmCount > 0) { - var allNotifyElmNotTheLastOne = window.document.querySelectorAll('[id^=' + newNotifySettings.ID + '-]:not([id=' + newNotifySettings.ID + '-' + notifyElmCount + '])'); - for (var i = 0; i < allNotifyElmNotTheLastOne.length; i++) { - var eachNotifyElmNotLastOne = allNotifyElmNotTheLastOne[i]; - if (eachNotifyElmNotLastOne.parentNode !== null) { - eachNotifyElmNotLastOne.parentNode.removeChild(eachNotifyElmNotLastOne); + // if close button and callback is not a function off + + // if callback or click to close on + if ((typeof callback === 'function') || newNotifySettings.clickToClose) { + removeDiv.addEventListener('click', function () { + if (typeof callback === 'function') { + notifyElmCountOnlyCallback--; + callback(); } + hideNotifyElementsAndOverlay(); + var callbackTimeout = setTimeout(function () { + removeNotifyElmentsAndWrapper(); + clearTimeout(callbackTimeout); + }, newNotifySettings.cssAnimationDuration); + }); + } + // if callback or click to close off + + // else auto remove on + if (!newNotifySettings.closeButton && typeof callback !== 'function') { + timeoutHide = setTimeout(function () { + hideNotifyElementsAndOverlay(); + }, newNotifySettings.timeout); + timeoutRemove = setTimeout(function () { + removeNotifyElmentsAndWrapper(); + }, newNotifySettings.timeout + newNotifySettings.cssAnimationDuration); + } + // else auto remove off + } + // remove by timeout or click off + + // notify - show only the last one on + if (newNotifySettings.showOnlyTheLastOne && notifyElmCount > 0) { + var allNotifyElmNotTheLastOne = window.document.querySelectorAll('[id^=' + newNotifySettings.ID + '-]:not([id=' + newNotifySettings.ID + '-' + notifyElmCount + '])'); + for (var i = 0; i < allNotifyElmNotTheLastOne.length; i++) { + var eachNotifyElmNotLastOne = allNotifyElmNotTheLastOne[i]; + if (eachNotifyElmNotLastOne.parentNode !== null) { + eachNotifyElmNotLastOne.parentNode.removeChild(eachNotifyElmNotLastOne); } } - // notify - show only the last one off - - } else { - notiflixConsoleError('Notiflix Error', 'Where is the arguments?'); } + // notify - show only the last one off + + // extend new settings with the backup settings + newNotifySettings = extendNotiflix(true, newNotifySettings, newNotifySettingsBackup); + }; // Notiflix: Notify Single off // Notiflix: Report Single on - var NotiflixReport = function (title, message, buttonText, buttonCallback, theType, staticType) { + var NotiflixReport = function (title, message, buttonText, optionsOrCallback, buttonCallback, staticType) { + // if not initialized pretend like init + if (!newReportSettings) { + Notiflix.Report.Init({}); + } + + // create a backup for settings + var newReportSettingsBackup = {}; + + // detect optionsOrCallback and buttonCallback on + if (typeof optionsOrCallback === 'function') { + buttonCallback = optionsOrCallback; + } + + if (typeof optionsOrCallback === 'object' && !Array.isArray(optionsOrCallback)) { + // extend the backup settings with new settings + newReportSettingsBackup = extendNotiflix(true, newReportSettings, {}); + + // extend new settings with the options + newReportSettings = extendNotiflix(true, newReportSettings, optionsOrCallback); + } + // detect optionsOrCallback and callback off + + // report type + var theType = newReportSettings[staticType.toLocaleLowerCase('en')]; // check the arguments on if (typeof title !== 'string') { title = 'Notiflix ' + staticType; } @@ -928,6 +975,9 @@ } // report wrap off + // extend new settings with the backup settings + newReportSettings = extendNotiflix(true, newReportSettings, newReportSettingsBackup); + }; // Notiflix: Report Single off @@ -1591,40 +1641,20 @@ } }, // Display Notification: Success - Success: function (message, callback) { - // if not initialized pretend like init - if (!newNotifySettings) { - Notiflix.Notify.Init({}); - } - var theType = newNotifySettings.success; - NotiflixNotify(message, callback, theType, 'Success'); + Success: function (message, optionsOrCallback, callback) { + NotiflixNotify(message, optionsOrCallback, callback, 'Success'); }, // Display Notification: Failure - Failure: function (message, callback) { - // if not initialized pretend like init - if (!newNotifySettings) { - Notiflix.Notify.Init({}); - } - var theType = newNotifySettings.failure; - NotiflixNotify(message, callback, theType, 'Failure'); + Failure: function (message, optionsOrCallback, callback) { + NotiflixNotify(message, optionsOrCallback, callback, 'Failure'); }, // Display Notification: Warning - Warning: function (message, callback) { - // if not initialized pretend like init - if (!newNotifySettings) { - Notiflix.Notify.Init({}); - } - var theType = newNotifySettings.warning; - NotiflixNotify(message, callback, theType, 'Warning'); + Warning: function (message, optionsOrCallback, callback) { + NotiflixNotify(message, optionsOrCallback, callback, 'Warning'); }, // Display Notification: Info - Info: function (message, callback) { - // if not initialized pretend like init - if (!newNotifySettings) { - Notiflix.Notify.Init({}); - } - var theType = newNotifySettings.info; - NotiflixNotify(message, callback, theType, 'Info'); + Info: function (message, optionsOrCallback, callback) { + NotiflixNotify(message, optionsOrCallback, callback, 'Info'); }, }, // Notify off @@ -1653,40 +1683,20 @@ } }, // Display Report: Success - Success: function (title, message, buttonText, buttonCallback) { - // if not initialized pretend like init - if (!newReportSettings) { - Notiflix.Report.Init({}); - } - var theType = newReportSettings.success; - NotiflixReport(title, message, buttonText, buttonCallback, theType, 'Success'); + Success: function (title, message, buttonText, optionsOrCallback, callback) { + NotiflixReport(title, message, buttonText, optionsOrCallback, callback, 'Success'); }, // Display Report: Failure - Failure: function (title, message, buttonText, buttonCallback) { - // if not initialized pretend like init - if (!newReportSettings) { - Notiflix.Report.Init({}); - } - var theType = newReportSettings.failure; - NotiflixReport(title, message, buttonText, buttonCallback, theType, 'Failure'); + Failure: function (title, message, buttonText, optionsOrCallback, callback) { + NotiflixReport(title, message, buttonText, optionsOrCallback, callback, 'Failure'); }, // Display Report: Warning - Warning: function (title, message, buttonText, buttonCallback) { - // if not initialized pretend like init - if (!newReportSettings) { - Notiflix.Report.Init({}); - } - var theType = newReportSettings.warning; - NotiflixReport(title, message, buttonText, buttonCallback, theType, 'Warning'); + Warning: function (title, message, buttonText, optionsOrCallback, callback) { + NotiflixReport(title, message, buttonText, optionsOrCallback, callback, 'Warning'); }, // Display Report: Info - Info: function (title, message, buttonText, buttonCallback) { - // if not initialized pretend like init - if (!newReportSettings) { - Notiflix.Report.Init({}); - } - var theType = newReportSettings.info; - NotiflixReport(title, message, buttonText, buttonCallback, theType, 'Info'); + Info: function (title, message, buttonText, optionsOrCallback, callback) { + NotiflixReport(title, message, buttonText, optionsOrCallback, callback, 'Info'); }, }, // Report off