!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sweetalert2=e()}(this,function(){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;nt.clientHeight)}function rt(t){var e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return 0\n
\n
    \n
    \n
    \n
    \n
    \n
    \n \n

    \n \n
    \n
    \n
    \n \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n \n').replace(/(^|\n)\s*/g,""),vt=function(t){var e,n,o,i,r,a,c,s,u,l,d,p,f,m,h,g=!!(e=Y())&&(e.parentNode.removeChild(e),ft([document.documentElement,document.body],[W["no-backdrop"],W["toast-shown"],W["has-column"]]),!0);ct()?U("SweetAlert2 requires document to initialize"):((n=document.createElement("div")).className=W.container,g&&pt(n,W["no-transition"]),V(n,gt),(o="string"==typeof(i=t.target)?document.querySelector(i):i).appendChild(n),r=t,(a=Z()).setAttribute("role",r.toast?"alert":"dialog"),a.setAttribute("aria-live",r.toast?"polite":"assertive"),r.toast||a.setAttribute("aria-modal","true"),c=o,"rtl"===window.getComputedStyle(c).direction&&pt(Y(),W.rtl),s=k(),u=mt(s,W.input),l=mt(s,W.file),d=s.querySelector(".".concat(W.range," input")),p=s.querySelector(".".concat(W.range," output")),f=mt(s,W.select),m=s.querySelector(".".concat(W.checkbox," input")),h=mt(s,W.textarea),u.oninput=st,l.onchange=st,f.onchange=st,m.onchange=st,h.oninput=st,d.oninput=function(t){st(t),p.value=d.value},d.onchange=function(t){st(t),d.nextSibling.value=d.value})},bt=function(t,e){t.jquery?yt(e,t):V(e,t.toString())},yt=function(t,e){if(t.textContent="",0 in e)for(var n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},wt=function(){if(ct())return!1;var t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&void 0!==t.style[n])return e[n];return!1}();function Ct(t,e,n){var o;ot(t,n["show".concat((o=e).charAt(0).toUpperCase()+o.slice(1),"Button")],"inline-block"),V(t,n["".concat(e,"ButtonText")]),t.setAttribute("aria-label",n["".concat(e,"ButtonAriaLabel")]),t.className=W[e],H(t,n,"".concat(e,"Button")),pt(t,n["".concat(e,"ButtonClass")])}function kt(t,e){var n,o,i,r,a,c,s,u,l=Y();l&&(n=l,"string"==typeof(o=e.backdrop)?n.style.background=o:o||pt([document.documentElement,document.body],W["no-backdrop"]),!e.backdrop&&e.allowOutsideClick&&N('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),i=l,(r=e.position)in W?pt(i,W[r]):(N('The "position" parameter is not valid, defaulting to "center"'),pt(i,W.center)),a=l,!(c=e.grow)||"string"!=typeof c||(s="grow-".concat(c))in W&&pt(a,W[s]),H(l,e,"container"),(u=document.body.getAttribute("data-swal2-queue-step"))&&(l.setAttribute("data-queue-step",u),document.body.removeAttribute("data-swal2-queue-step")))}function xt(t,e){t.placeholder&&!e.inputPlaceholder||(t.placeholder=e.inputPlaceholder)}var Pt={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},At=["input","file","range","select","radio","checkbox","textarea"],Et=function(t){if(!Tt[t.input])return U('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input,'"'));var e=Ot(t.input),n=Tt[t.input](e,t);et(n),setTimeout(function(){X(n)})},Bt=function(t,e){var n=J(k(),t);if(n)for(var o in!function(t){for(var e=0;e=s.progressSteps.length&&N("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),s.progressSteps.forEach(function(t,e){var n,o,i,r,a,c=(n=t,o=document.createElement("li"),pt(o,W["progress-step"]),V(o,n),o);u.appendChild(c),e===l&&pt(c,W["active-progress-step"]),e!==s.progressSteps.length-1&&(r=t,a=document.createElement("li"),pt(a,W["progress-step-line"]),r.progressStepsDistance&&(a.style.width=r.progressStepsDistance),i=a,u.appendChild(i))})}function It(t,e){var n,o,i,r,a,c,s,u,l=O();H(l,e,"header"),qt(0,e),n=t,o=e,(r=Pt.innerParams.get(n))&&o.icon===r.icon&&w()?H(w(),o,"icon"):(Rt(),o.icon&&(-1!==Object.keys(K).indexOf(o.icon)?(i=y(".".concat(W.icon,".").concat(K[o.icon])),et(i),Dt(i,o),Ht(),H(i,o,"icon"),pt(i,o.showClass.icon)):U('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(o.icon,'"')))),function(t){var e=x();if(!t.imageUrl)return nt(e);et(e,""),e.setAttribute("src",t.imageUrl),e.setAttribute("alt",t.imageAlt),tt(e,"width",t.imageWidth),tt(e,"height",t.imageHeight),e.className=W.image,H(e,t,"image")}(e),a=e,c=C(),ot(c,a.title||a.titleText),a.title&&ut(a.title,c),a.titleText&&(c.innerText=a.titleText),H(c,a,"title"),s=e,u=j(),V(u,s.closeButtonHtml),H(u,s,"closeButton"),ot(u,s.showCloseButton),u.setAttribute("aria-label",s.closeButtonAriaLabel)}function Mt(t,e){var n,o,i,r;n=e,o=Z(),tt(o,"width",n.width),tt(o,"padding",n.padding),n.background&&(o.style.background=n.background),_t(o,n),kt(0,e),It(t,e),Lt(t,e),lt(0,e),i=e,r=T(),ot(r,i.footer),i.footer&&ut(i.footer,r),H(r,i,"footer"),"function"==typeof e.onRender&&e.onRender(Z())}function Vt(){return E()&&E().click()}var Rt=function(){for(var t=n(),e=0;e\n \n
    \n
    \n '):"error"===e.icon?V(t,'\n \n \n \n \n '):V(t,Nt({question:"?",warning:"!",info:"i"}[e.icon]))},Nt=function(t){return'
    ').concat(t,"
    ")},Ut=[],_t=function(t,e){t.className="".concat(W.popup," ").concat(ht(t)?e.showClass.popup:""),e.toast?(pt([document.documentElement,document.body],W["toast-shown"]),pt(t,W.toast)):pt(t,W.modal),H(t,e,"popup"),"string"==typeof e.customClass&&pt(t,e.customClass),e.icon&&pt(t,W["icon-".concat(e.icon)])};function Ft(){var t=Z();t||rn.fire(),t=Z();var e=S(),n=E();et(e),et(n,"inline-block"),pt([t,e],W.loading),n.disabled=!0,t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()}function zt(){return new Promise(function(t){var e=window.scrollX,n=window.scrollY;$t.restoreFocusTimeout=setTimeout(function(){$t.previousActiveElement&&$t.previousActiveElement.focus?($t.previousActiveElement.focus(),$t.previousActiveElement=null):document.body&&document.body.focus(),t()},100),void 0!==e&&void 0!==n&&window.scrollTo(e,n)})}function Wt(){if($t.timeout)return function(){var t=L(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";var n=parseInt(window.getComputedStyle(t).width),o=parseInt(e/n*100);t.style.removeProperty("transition"),t.style.width="".concat(o,"%")}(),$t.timeout.stop()}function Kt(){if($t.timeout){var t=$t.timeout.start();return at(t),t}}function Yt(t){return Object.prototype.hasOwnProperty.call(Jt,t)}function Zt(t){return Gt[t]}function Qt(t){for(var e in t)Yt(i=e)||N('Unknown parameter "'.concat(i,'"')),t.toast&&(o=e,-1!==te.indexOf(o)&&N('The parameter "'.concat(o,'" is incompatible with toasts'))),Zt(n=e)&&g(n,Zt(n));var n,o,i}var $t={},Jt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconHtml:void 0,toast:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:void 0,target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showCancelButton:!1,preConfirm:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusCancel:!1,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",showLoaderOnConfirm:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,onBeforeOpen:void 0,onOpen:void 0,onRender:void 0,onClose:void 0,onAfterClose:void 0,onDestroy:void 0,scrollbarPadding:!0},Xt=["title","titleText","text","html","footer","icon","hideClass","customClass","allowOutsideClick","allowEscapeKey","showConfirmButton","showCancelButton","confirmButtonText","confirmButtonAriaLabel","confirmButtonColor","cancelButtonText","cancelButtonAriaLabel","cancelButtonColor","buttonsStyling","reverseButtons","imageUrl","imageWidth","imageHeight","imageAlt","progressSteps","currentProgressStep","onClose","onAfterClose","onDestroy"],Gt={animation:'showClass" and "hideClass'},te=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusCancel","heightAuto","keydownListenerCapture"],ee=Object.freeze({isValidParameter:Yt,isUpdatableParameter:function(t){return-1!==Xt.indexOf(t)},isDeprecatedParameter:Zt,argsToParams:function(o){var i={};return"object"!==r(o[0])||b(o[0])?["title","html","icon"].forEach(function(t,e){var n=o[e];"string"==typeof n||b(n)?i[t]=n:void 0!==n&&U("Unexpected type of ".concat(t,'! Expected "string" or "Element", got ').concat(r(n)))}):s(i,o[0]),i},isVisible:function(){return ht(Z())},clickConfirm:Vt,clickCancel:function(){return B()&&B().click()},getContainer:Y,getPopup:Z,getTitle:C,getContent:k,getHtmlContainer:function(){return e(W["html-container"])},getImage:x,getIcon:w,getIcons:n,getCloseButton:j,getActions:S,getConfirmButton:E,getCancelButton:B,getHeader:O,getFooter:T,getTimerProgressBar:L,getFocusableElements:q,getValidationMessage:A,isLoading:M,fire:function(){for(var t=arguments.length,e=new Array(t),n=0;nwindow.innerHeight&&($.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat($.previousBodyPadding+function(){var t=document.createElement("div");t.className=W["scrollbar-measure"],document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}(),"px"))}function ie(){return!!window.MSInputMethodContext&&!!document.documentMode}function re(){var t=Y(),e=Z();t.style.removeProperty("align-items"),e.offsetTop<0&&(t.style.alignItems="flex-start")}var ae=function(){var e,t=Y();t.ontouchstart=function(t){e=ce(t.target)},t.ontouchmove=function(t){e&&(t.preventDefault(),t.stopPropagation())}},ce=function(t){var e=Y();return t===e||!(it(e)||"INPUT"===t.tagName||it(k())&&k().contains(t))},se={swalPromiseResolve:new WeakMap};function ue(t,e,n,o){var i;n?pe(t,o):(zt().then(function(){return pe(t,o)}),$t.keydownTarget.removeEventListener("keydown",$t.keydownHandler,{capture:$t.keydownListenerCapture}),$t.keydownHandlerAdded=!1),e.parentNode&&!document.body.getAttribute("data-swal2-queue-step")&&e.parentNode.removeChild(e),I()&&(null!==$.previousBodyPadding&&(document.body.style.paddingRight="".concat($.previousBodyPadding,"px"),$.previousBodyPadding=null),R(document.body,W.iosfix)&&(i=parseInt(document.body.style.top,10),ft(document.body,W.iosfix),document.body.style.top="",document.body.scrollTop=-1*i),"undefined"!=typeof window&&ie()&&window.removeEventListener("resize",re),h(document.body.children).forEach(function(t){t.hasAttribute("data-previous-aria-hidden")?(t.setAttribute("aria-hidden",t.getAttribute("data-previous-aria-hidden")),t.removeAttribute("data-previous-aria-hidden")):t.removeAttribute("aria-hidden")})),ft([document.documentElement,document.body],[W.shown,W["height-auto"],W["no-backdrop"],W["toast-shown"],W["toast-column"]])}function le(t){var e,n,o,i=Z();i&&(e=Pt.innerParams.get(this))&&!R(i,e.hideClass.popup)&&(n=se.swalPromiseResolve.get(this),ft(i,e.showClass.popup),pt(i,e.hideClass.popup),o=Y(),ft(o,e.showClass.backdrop),pt(o,e.hideClass.backdrop),function(t,e,n){var o=Y(),i=wt&&rt(e),r=n.onClose,a=n.onAfterClose;if(r!==null&&typeof r==="function"){r(e)}if(i){de(t,e,o,a)}else{ue(t,o,Q(),a)}}(this,i,e),void 0!==t?(t.isDismissed=void 0!==t.dismiss,t.isConfirmed=void 0===t.dismiss):t={isDismissed:!0,isConfirmed:!1},n(t||{}))}var de=function(t,e,n,o){$t.swalCloseEventFinishedCallback=ue.bind(null,t,n,Q(),o),e.addEventListener(wt,function(t){t.target===e&&($t.swalCloseEventFinishedCallback(),delete $t.swalCloseEventFinishedCallback)})},pe=function(t,e){setTimeout(function(){"function"==typeof e&&e(),t._destroy()})};function fe(t,e,n){var o=Pt.domCache.get(t);e.forEach(function(t){o[t].disabled=n})}function me(t,e){if(!t)return!1;if("radio"===t.type)for(var n=t.parentNode.parentNode.querySelectorAll("input"),o=0;o")),vt(t)}function be(t){var e=Y(),n=Z();"function"==typeof t.onBeforeOpen&&t.onBeforeOpen(n),Oe(e,n,t),Be(e,n),I()&&Se(e,t.scrollbarPadding),Q()||$t.previousActiveElement||($t.previousActiveElement=document.activeElement),"function"==typeof t.onOpen&&setTimeout(function(){return t.onOpen(n)}),ft(e,W["no-transition"])}function ye(t){var e,n=Z();t.target===n&&(e=Y(),n.removeEventListener(wt,ye),e.style.overflowY="auto")}function we(t,e){"select"===e.input||"radio"===e.input?qe(t,e):-1!==["text","email","number","tel","textarea"].indexOf(e.input)&&v(e.inputValue)&&Ie(t,e)}function Ce(t,e){t.disableButtons(),e.input?Re(t,e):He(t,e,!0)}function ke(t,e){t.disableButtons(),e(z.cancel)}function xe(t,e){t.closePopup({value:e})}function Pe(e,t,n,o){t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1),n.toast||(t.keydownHandler=function(t){return Ue(e,t,o)},t.keydownTarget=n.keydownListenerCapture?window:Z(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)}function Ae(t,e,n){var o=q(),i=0;if(i