/*! * sweetalert2 v10.16.7 * Released under the MIT License. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self,t.Sweetalert2=e())}(this,function(){"use strict";function t(e){"@babel/helpers - typeof";return(t="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})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;n")),Ot(t)}var y,w=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},C=function(t){return Object.keys(t).map(function(e){return t[e]})},k=function(t){return Array.prototype.slice.call(t)},A=function(e){console.warn("".concat("SweetAlert2:"," ").concat("object"===t(e)?e.join(" "):e))},x=function(t){console.error("".concat("SweetAlert2:"," ").concat(t))},B=[],P=function(t,e){!function(t){-1===B.indexOf(t)&&(B.push(t),A(t))}('"'.concat(t,'" is deprecated and will be removed in the next major release. Please use "').concat(e,'" instead.'))},O=function(t){return"function"==typeof t?t():t},E=function(t){return t&&"function"==typeof t.toPromise},S=function(t){return E(t)?t.toPromise():Promise.resolve(t)},T=function(t){return t&&Promise.resolve(t)===t},L=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),q=function(e){return e instanceof Element||function(e){return"object"===t(e)&&e.jquery}(e)},D=function(t){var e={};for(var n in t)e[t[n]]="swal2-"+t[n];return e},j=D(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","header","content","html-container","actions","confirm","deny","cancel","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),M=D(["success","warning","info","question","error"]),I=function(){return document.body.querySelector(".".concat(j.container))},H=function(t){var e=I();return e?e.querySelector(t):null},V=function(t){return H(".".concat(t))},R=function(){return V(j.popup)},N=function(){return V(j.icon)},U=function(){return V(j.title)},F=function(){return V(j.content)},_=function(){return V(j["html-container"])},z=function(){return V(j.image)},W=function(){return V(j["progress-steps"])},K=function(){return V(j["validation-message"])},Y=function(){return H(".".concat(j.actions," .").concat(j.confirm))},Z=function(){return H(".".concat(j.actions," .").concat(j.deny))},Q=function(){return H(".".concat(j.loader))},J=function(){return H(".".concat(j.actions," .").concat(j.cancel))},$=function(){return V(j.actions)},X=function(){return V(j.header)},G=function(){return V(j.footer)},tt=function(){return V(j["timer-progress-bar"])},et=function(){return V(j.close)},nt=function(){var t=k(R().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(function(t,e){return t=parseInt(t.getAttribute("tabindex")),e=parseInt(e.getAttribute("tabindex")),t>e?1:t1&&arguments[1]!==undefined?arguments[1]:"flex";t.style.display=e},gt=function(t){t.style.display="none"},vt=function(t,e,n,o){var i=t.querySelector(e);i&&(i.style[n]=o)},bt=function(t,e,n){e?ht(t,n):gt(t)},yt=function(t){return!(!t||!(t.offsetWidth||t.offsetHeight||t.getClientRects().length))},wt=function(){return!yt(Y())&&!yt(Z())&&!yt(J())},Ct=function(t){return!!(t.scrollHeight>t.clientHeight)},kt=function(t){var e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return n>0||o>0},At=function(t){var e=arguments.length>1&&arguments[1]!==undefined&&arguments[1],n=tt();yt(n)&&(e&&(n.style.transition="none",n.style.width="100%"),setTimeout(function(){n.style.transition="width ".concat(t/1e3,"s linear"),n.style.width="0%"},10))},xt=function(){return"undefined"==typeof window||"undefined"==typeof document},Bt='\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,""),Pt=function(t){_n.isVisible()&&y!==t.target.value&&_n.resetValidationMessage(),y=t.target.value},Ot=function(t){var e=function(){var t=I();return!!t&&(t.parentNode.removeChild(t),ft([document.documentElement,document.body],[j["no-backdrop"],j["toast-shown"],j["has-column"]]),!0)}();if(xt())x("SweetAlert2 requires document to initialize");else{var n=document.createElement("div");n.className=j.container,e&&dt(n,j["no-transition"]),at(n,Bt);var o=function(t){return"string"==typeof t?document.querySelector(t):t}(t.target);o.appendChild(n),function(t){var e=R();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")}(t),function(t){"rtl"===window.getComputedStyle(t).direction&&dt(I(),j.rtl)}(o),function(){var t=F(),e=pt(t,j.input),n=pt(t,j.file),o=t.querySelector(".".concat(j.range," input")),i=t.querySelector(".".concat(j.range," output")),r=pt(t,j.select),a=t.querySelector(".".concat(j.checkbox," input")),u=pt(t,j.textarea);e.oninput=Pt,n.onchange=Pt,r.onchange=Pt,a.onchange=Pt,u.oninput=Pt,o.oninput=function(t){Pt(t),i.value=o.value},o.onchange=function(t){Pt(t),o.nextSibling.value=o.value}}()}},Et=function(e,n){e instanceof HTMLElement?n.appendChild(e):"object"===t(e)?St(e,n):e&&at(n,e)},St=function(t,e){t.jquery?Tt(e,t):at(e,t.toString())},Tt=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))},Lt=function(){if(xt())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)&&"undefined"!=typeof t.style[n])return e[n];return!1}(),qt=function(t,e){var n=$(),o=Q(),i=Y(),r=Z(),a=J();e.showConfirmButton||e.showDenyButton||e.showCancelButton||gt(n),ct(n,e,"actions"),f(i,"confirm",e),f(r,"deny",e),f(a,"cancel",e),function(t,e,n,o){if(!o.buttonsStyling)return ft([t,e,n],j.styled);dt([t,e,n],j.styled),o.confirmButtonColor&&(t.style.backgroundColor=o.confirmButtonColor),o.denyButtonColor&&(e.style.backgroundColor=o.denyButtonColor),o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor)}(i,r,a,e),e.reverseButtons&&(n.insertBefore(a,o),n.insertBefore(r,o),n.insertBefore(i,o)),at(o,e.loaderHtml),ct(o,e,"loader")},Dt=function(t,e){var n=I();if(n){!function(t,e){"string"==typeof e?t.style.background=e:e||dt([document.documentElement,document.body],j["no-backdrop"])}(n,e.backdrop),!e.backdrop&&e.allowOutsideClick&&A('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),function(t,e){e in j?dt(t,j[e]):(A('The "position" parameter is not valid, defaulting to "center"'),dt(t,j.center))}(n,e.position),function(t,e){if(e&&"string"==typeof e){var n="grow-".concat(e);n in j&&dt(t,j[n])}}(n,e.grow),ct(n,e,"container");var o=document.body.getAttribute("data-swal2-queue-step");o&&(n.setAttribute("data-queue-step",o),document.body.removeAttribute("data-swal2-queue-step"))}},jt={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},Mt=["input","file","range","select","radio","checkbox","textarea"],It=function(t){if(!Ft[t.input])return x('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input,'"'));var e=Ut(t.input),n=Ft[t.input](e,t);ht(n),setTimeout(function(){st(n)})},Ht=function(t,e){var n=d(F(),t);if(n){!function(t){for(var e=0;eo?"".concat(e,"px"):null}).observe(t,{attributes:!0,attributeFilter:["style"]})}return t};var _t,zt=function(t,e){var n=_();ct(n,e,"htmlContainer"),e.html?(Et(e.html,n),ht(n,"block")):e.text?(n.textContent=e.text,ht(n,"block")):gt(n),function(t,e){var n=F(),o=jt.innerParams.get(t),i=!o||e.input!==o.input;Mt.forEach(function(t){var o=j[t],r=pt(n,o);Ht(t,e.inputAttributes),r.className=o,i&>(r)}),e.input&&(i&&It(e),Vt(e))}(t,e),ct(F(),e,"content")},Wt=function(t,e){for(var n in M)e.icon!==n&&ft(t,M[n]);dt(t,M[e.icon]),Zt(t,e),Kt(),ct(t,e,"icon")},Kt=function(){for(var t=R(),e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),o=0;o\n \n
    \n
    \n ');else if("error"===e.icon)at(t,'\n \n \n \n \n ');else{at(t,Qt({question:"?",warning:"!",info:"i"}[e.icon]))}},Zt=function(t,e){if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(var n=0,o=[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"];n').concat(t,"")},Jt=[],$t=function(){return I()&&I().getAttribute("data-queue-step")},Xt=function(t,e){var n=W();if(!e.progressSteps||0===e.progressSteps.length)return gt(n);ht(n),n.textContent="";var o=parseInt(e.currentProgressStep===undefined?$t():e.currentProgressStep);o>=e.progressSteps.length&&A("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach(function(t,i){var r=function(t){var e=document.createElement("li");return dt(e,j["progress-step"]),at(e,t),e}(t);if(n.appendChild(r),i===o&&dt(r,j["active-progress-step"]),i!==e.progressSteps.length-1){var a=function(t){var e=document.createElement("li");return dt(e,j["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e}(e);n.appendChild(a)}})},Gt=function(t,e){var n=X();ct(n,e,"header"),Xt(0,e),function(t,e){var n=jt.innerParams.get(t),o=N();n&&e.icon===n.icon?(Yt(o,e),Wt(o,e)):e.icon||e.iconHtml?e.icon&&-1===Object.keys(M).indexOf(e.icon)?(x('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.icon,'"')),gt(o)):(ht(o),Yt(o,e),Wt(o,e),dt(o,e.showClass.icon)):gt(o)}(t,e),function(t,e){var n=z();if(!e.imageUrl)return gt(n);ht(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt),mt(n,"width",e.imageWidth),mt(n,"height",e.imageHeight),n.className=j.image,ct(n,e,"image")}(0,e),function(t,e){var n=U();bt(n,e.title||e.titleText,"block"),e.title&&Et(e.title,n),e.titleText&&(n.innerText=e.titleText),ct(n,e,"title")}(0,e),function(t,e){var n=et();at(n,e.closeButtonHtml),ct(n,e,"closeButton"),bt(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel)}(0,e)},te=function(t,e){t.className="".concat(j.popup," ").concat(yt(t)?e.showClass.popup:""),e.toast?(dt([document.documentElement,document.body],j["toast-shown"]),dt(t,j.toast)):dt(t,j.modal),ct(t,e,"popup"),"string"==typeof e.customClass&&dt(t,e.customClass),e.icon&&dt(t,j["icon-".concat(e.icon)])},ee=function(t,e){!function(t,e){var n=I(),o=R();e.toast?(mt(n,"width",e.width),o.style.width="100%"):mt(o,"width",e.width),mt(o,"padding",e.padding),e.background&&(o.style.background=e.background),gt(K()),te(o,e)}(0,e),Dt(0,e),Gt(t,e),zt(t,e),qt(0,e),function(t,e){var n=G();bt(n,e.footer),e.footer&&Et(e.footer,n),ct(n,e,"footer")}(0,e),"function"==typeof e.didRender?e.didRender(R()):"function"==typeof e.onRender&&e.onRender(R())},ne=function(){return Y()&&Y().click()},oe=function(t){var e=R();e||_n.fire(),e=R();var n=$(),o=Q();!t&&yt(Y())&&(t=Y()),ht(n),t&&(gt(t),o.setAttribute("data-button-to-replace",t.className)),o.parentNode.insertBefore(o,t),dt([e,n],j.loading),ht(o),e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},ie={},re=function(t){return new Promise(function(e){if(!t)return e();var n=window.scrollX,o=window.scrollY;ie.restoreFocusTimeout=setTimeout(function(){ie.previousActiveElement&&ie.previousActiveElement.focus?(ie.previousActiveElement.focus(),ie.previousActiveElement=null):document.body&&document.body.focus(),e()},100),void 0!==n&&void 0!==o&&window.scrollTo(n,o)})},ae=function(){if(ie.timeout)return function(){var t=tt(),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,"%")}(),ie.timeout.stop()},ue=function(){if(ie.timeout){var t=ie.timeout.start();return At(t),t}},ce=!1,se={},le=function(t){for(var e=t.target;e&&e!==document;e=e.parentNode)for(var n in se){var o=e.getAttribute(n);if(o)return void se[n].fire({template:o})}},de={title:"",titleText:"",text:"",html:"",footer:"",icon:undefined,iconColor:undefined,iconHtml:undefined,template:undefined,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:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:undefined,preDeny:undefined,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:undefined,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:undefined,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:undefined,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:undefined,imageWidth:undefined,imageHeight:undefined,imageAlt:"",timer:undefined,timerProgressBar:!1,width:undefined,padding:undefined,background:undefined,input:undefined,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:undefined,returnInputValueOnDeny:!1,validationMessage:undefined,grow:!1,position:"center",progressSteps:[],currentProgressStep:undefined,progressStepsDistance:undefined,onBeforeOpen:undefined,onOpen:undefined,willOpen:undefined,didOpen:undefined,onRender:undefined,didRender:undefined,onClose:undefined,onAfterClose:undefined,willClose:undefined,didClose:undefined,onDestroy:undefined,didDestroy:undefined,scrollbarPadding:!0},fe=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","onAfterClose","onClose","onDestroy","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],pe={animation:'showClass" and "hideClass',onBeforeOpen:"willOpen",onOpen:"didOpen",onRender:"didRender",onClose:"willClose",onAfterClose:"didClose",onDestroy:"didDestroy"},me=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],he=function(t){return Object.prototype.hasOwnProperty.call(de,t)},ge=function(t){return pe[t]},ve=function(t){he(t)||A('Unknown parameter "'.concat(t,'"'))},be=function(t){-1!==me.indexOf(t)&&A('The parameter "'.concat(t,'" is incompatible with toasts'))},ye=function(t){ge(t)&&P(t,ge(t))},we=function(t){for(var e in t)ve(e),t.toast&&be(e),ye(e)},Ce=Object.freeze({isValidParameter:he,isUpdatableParameter:function(t){return-1!==fe.indexOf(t)},isDeprecatedParameter:ge,argsToParams:function(e){var n={};return"object"!==t(e[0])||q(e[0])?["title","html","icon"].forEach(function(o,i){var r=e[i];"string"==typeof r||q(r)?n[o]=r:r!==undefined&&x("Unexpected type of ".concat(o,'! Expected "string" or "Element", got ').concat(t(r)))}):i(n,e[0]),n},isVisible:function(){return yt(R())},clickConfirm:ne,clickDeny:function(){return Z()&&Z().click()},clickCancel:function(){return J()&&J().click()},getContainer:I,getPopup:R,getTitle:U,getContent:F,getHtmlContainer:_,getImage:z,getIcon:N,getInputLabel:function(){return V(j["input-label"])},getCloseButton:et,getActions:$,getConfirmButton:Y,getDenyButton:Z,getCancelButton:J,getLoader:Q,getHeader:X,getFooter:G,getTimerProgressBar:tt,getFocusableElements:nt,getValidationMessage:K,isLoading:function(){return R().hasAttribute("data-loading")},fire:function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&arguments[0]!==undefined?arguments[0]:"data-swal-template";se[t]=this,ce||(document.body.addEventListener("click",le),ce=!0)}}),ke=function(){null===rt.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(rt.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(rt.previousBodyPadding+function(){var t=document.createElement("div");t.className=j["scrollbar-measure"],document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}(),"px"))},Ae=function(){null!==rt.previousBodyPadding&&(document.body.style.paddingRight="".concat(rt.previousBodyPadding,"px"),rt.previousBodyPadding=null)},xe=function(){if(!navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)){R().scrollHeight>window.innerHeight-44&&(I().style.paddingBottom="".concat(44,"px"))}},Be=function(){var t,e=I();e.ontouchstart=function(e){t=Pe(e)},e.ontouchmove=function(e){t&&(e.preventDefault(),e.stopPropagation())}},Pe=function(t){var e=t.target,n=I();return!Oe(t)&&!Ee(t)&&(e===n||!(Ct(n)||"INPUT"===e.tagName||Ct(F())&&F().contains(e)))},Oe=function(t){return t.touches&&t.touches.length&&"stylus"===t.touches[0].touchType},Ee=function(t){return t.touches&&t.touches.length>1},Se=function(){if(ut(document.body,j.iosfix)){var t=parseInt(document.body.style.top,10);ft(document.body,j.iosfix),document.body.style.top="",document.body.scrollTop=-1*t}},Te=function(){return!!window.MSInputMethodContext&&!!document.documentMode},Le=function(){var t=I(),e=R();t.style.removeProperty("align-items"),e.offsetTop<0&&(t.style.alignItems="flex-start")},qe=function(){"undefined"!=typeof window&&Te()&&window.removeEventListener("resize",Le)},De=function(){k(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")})},je={swalPromiseResolve:new WeakMap},Me=function(t){return void 0===t?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:i({isConfirmed:!1,isDenied:!1,isDismissed:!1},t)},Ie=function(t,e,n){var o=I(),i=Lt&&kt(e),r=n.onClose,a=n.onAfterClose,u=n.willClose,c=n.didClose;He(e,u,r),i?Ve(t,e,o,n.returnFocus,c||a):m(t,o,n.returnFocus,c||a)},He=function(t,e,n){null!==e&&"function"==typeof e?e(t):null!==n&&"function"==typeof n&&n(t)},Ve=function(t,e,n,o,i){ie.swalCloseEventFinishedCallback=m.bind(null,t,n,o,i),e.addEventListener(Lt,function(t){t.target===e&&(ie.swalCloseEventFinishedCallback(),delete ie.swalCloseEventFinishedCallback)})},Re=function(t,e){setTimeout(function(){"function"==typeof e&&e(),t._destroy()})},Ne=function(){function t(n,o){e(this,t),this.callback=n,this.remaining=o,this.running=!1,this.start()}return o(t,[{key:"start",value:function(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}},{key:"stop",value:function(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date-this.started),this.remaining}},{key:"increase",value:function(t){var e=this.running;return e&&this.stop(),this.remaining+=t,e&&this.start(),this.remaining}},{key:"getTimerLeft",value:function(){return this.running&&(this.stop(),this.start()),this.remaining}},{key:"isRunning",value:function(){return this.running}}]),t}(),Ue={email:function(t,e){return/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address")},url:function(t,e){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")}},Fe=["swal-title","swal-html","swal-footer"],_e=function(e){var n={};return k(e.querySelectorAll("swal-param")).forEach(function(e){Je(e,["name","value"]);var o=e.getAttribute("name"),i=e.getAttribute("value");"boolean"==typeof de[o]&&"false"===i&&(i=!1),"object"===t(de[o])&&(i=JSON.parse(i)),n[o]=i}),n},ze=function(t){var e={};return k(t.querySelectorAll("swal-button")).forEach(function(t){Je(t,["type","color","aria-label"]);var n=t.getAttribute("type");e["".concat(n,"ButtonText")]=t.innerHTML,e["show".concat(w(n),"Button")]=!0,t.hasAttribute("color")&&(e["".concat(n,"ButtonColor")]=t.getAttribute("color")),t.hasAttribute("aria-label")&&(e["".concat(n,"ButtonAriaLabel")]=t.getAttribute("aria-label"))}),e},We=function(t){var e={},n=t.querySelector("swal-image");return n&&(Je(n,["src","width","height","alt"]),n.hasAttribute("src")&&(e.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(e.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(e.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(e.imageAlt=n.getAttribute("alt"))),e},Ke=function(t){var e={},n=t.querySelector("swal-icon");return n&&(Je(n,["type","color"]),n.hasAttribute("type")&&(e.icon=n.getAttribute("type")),n.hasAttribute("color")&&(e.iconColor=n.getAttribute("color")),e.iconHtml=n.innerHTML),e},Ye=function(t){var e={},n=t.querySelector("swal-input");n&&(Je(n,["type","label","placeholder","value"]),e.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(e.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(e.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(e.inputValue=n.getAttribute("value")));var o=t.querySelectorAll("swal-input-option");return o.length&&(e.inputOptions={},k(o).forEach(function(t){Je(t,["value"]);var n=t.getAttribute("value"),o=t.innerHTML;e.inputOptions[n]=o})),e},Ze=function(t,e){var n={};for(var o in e){var i=e[o],r=t.querySelector(i);r&&(Je(r,[]),n[i.replace(/^swal-/,"")]=r.innerHTML.trim())}return n},Qe=function(t){var e=Fe.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);k(t.querySelectorAll("*")).forEach(function(n){if(n.parentNode===t){var o=n.tagName.toLowerCase();-1===e.indexOf(o)&&A("Unrecognized element <".concat(o,">"))}})},Je=function(t,e){k(t.attributes).forEach(function(n){-1===e.indexOf(n.name)&&A(['Unrecognized attribute "'.concat(n.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(e.length?"Allowed attributes are: ".concat(e.join(", ")):"To set the value, use HTML within the element.")])})},$e=function(t){var e=I(),n=R();"function"==typeof t.willOpen?t.willOpen(n):"function"==typeof t.onBeforeOpen&&t.onBeforeOpen(n);var o=window.getComputedStyle(document.body).overflowY;nn(e,n,t),setTimeout(function(){tn(e,n)},10),ot()&&(en(e,t.scrollbarPadding,o),k(document.body.children).forEach(function(t){t===I()||function(t,e){if("function"==typeof t.contains)return t.contains(e)}(t,I())||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true"))})),it()||ie.previousActiveElement||(ie.previousActiveElement=document.activeElement),Xe(n,t),ft(e,j["no-transition"])},Xe=function(t,e){"function"==typeof e.didOpen?setTimeout(function(){return e.didOpen(t)}):"function"==typeof e.onOpen&&setTimeout(function(){return e.onOpen(t)})},Ge=function zn(t){var e=R();if(t.target===e){var n=I();e.removeEventListener(Lt,zn),n.style.overflowY="auto"}},tn=function(t,e){Lt&&kt(e)?(t.style.overflowY="hidden",e.addEventListener(Lt,Ge)):t.style.overflowY="auto"},en=function(t,e,n){!function(){if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!ut(document.body,j.iosfix)){var t=document.body.scrollTop;document.body.style.top="".concat(-1*t,"px"),dt(document.body,j.iosfix),Be(),xe()}}(),"undefined"!=typeof window&&Te()&&(Le(),window.addEventListener("resize",Le)),e&&"hidden"!==n&&ke(),setTimeout(function(){t.scrollTop=0})},nn=function(t,e,n){dt(t,n.showClass.backdrop),e.style.setProperty("opacity","0","important"),ht(e),setTimeout(function(){dt(e,n.showClass.popup),e.style.removeProperty("opacity")},10),dt([document.documentElement,document.body],j.shown),n.heightAuto&&n.backdrop&&!n.toast&&dt([document.documentElement,document.body],j["height-auto"])},on=function(t){return t.checked?1:0},rn=function(t){return t.checked?t.value:null},an=function(t){return t.files.length?null!==t.getAttribute("multiple")?t.files:t.files[0]:null},un=function(e,n){var o=F(),i=function(t){return sn[n.input](o,ln(t),n)};E(n.inputOptions)||T(n.inputOptions)?(oe(Y()),S(n.inputOptions).then(function(t){e.hideLoading(),i(t)})):"object"===t(n.inputOptions)?i(n.inputOptions):x("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(t(n.inputOptions)))},cn=function(t,e){var n=t.getInput();gt(n),S(e.inputValue).then(function(o){n.value="number"===e.input?parseFloat(o)||0:"".concat(o),ht(n),n.focus(),t.hideLoading()})["catch"](function(e){x("Error in inputValue promise: ".concat(e)),n.value="",ht(n),n.focus(),t.hideLoading()})},sn={select:function(t,e,n){var o=pt(t,j.select),i=function(t,e,o){var i=document.createElement("option");i.value=o,at(i,e),i.selected=dn(o,n.inputValue),t.appendChild(i)};e.forEach(function(t){var e=t[0],n=t[1];if(Array.isArray(n)){var r=document.createElement("optgroup");r.label=e,r.disabled=!1,o.appendChild(r),n.forEach(function(t){return i(r,t[1],t[0])})}else i(o,n,e)}),o.focus()},radio:function(t,e,n){var o=pt(t,j.radio);e.forEach(function(t){var e=t[0],i=t[1],r=document.createElement("input"),a=document.createElement("label");r.type="radio",r.name=j.radio,r.value=e,dn(e,n.inputValue)&&(r.checked=!0);var u=document.createElement("span");at(u,i),u.className=j.label,a.appendChild(r),a.appendChild(u),o.appendChild(a)});var i=o.querySelectorAll("input");i.length&&i[0].focus()}},ln=function Wn(e){var n=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach(function(e,o){var i=e;"object"===t(i)&&(i=Wn(i)),n.push([o,i])}):Object.keys(e).forEach(function(o){var i=e[o];"object"===t(i)&&(i=Wn(i)),n.push([o,i])}),n},dn=function(t,e){return e&&e.toString()===t.toString()},fn=function(t,e,n){var o=function(t,e){var n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return on(n);case"radio":return rn(n);case"file":return an(n);default:return e.inputAutoTrim?n.value.trim():n.value}}(t,e);e.inputValidator?pn(t,e,o):t.getInput().checkValidity()?"deny"===n?mn(t,e,o):gn(t,e,o):(t.enableButtons(),t.showValidationMessage(e.validationMessage))},pn=function(t,e,n){t.disableInput();Promise.resolve().then(function(){return S(e.inputValidator(n,e.validationMessage))}).then(function(o){t.enableButtons(),t.enableInput(),o?t.showValidationMessage(o):gn(t,e,n)})},mn=function(t,e,n){if(e.showLoaderOnDeny&&oe(Z()),e.preDeny){Promise.resolve().then(function(){return S(e.preDeny(n,e.validationMessage))}).then(function(e){!1===e?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===e?n:e})})}else t.closePopup({isDenied:!0,value:n})},hn=function(t,e){t.closePopup({isConfirmed:!0,value:e})},gn=function(t,e,n){if(e.showLoaderOnConfirm&&oe(),e.preConfirm){t.resetValidationMessage();Promise.resolve().then(function(){return S(e.preConfirm(n,e.validationMessage))}).then(function(e){yt(K())||!1===e?t.hideLoading():hn(t,void 0===e?n:e)})}else hn(t,n)},vn=function(t,e,n){var o=nt();if(o.length)return(e+=n)===o.length?e=0:-1===e&&(e=o.length-1),o[e].focus();R().focus()},bn=["ArrowRight","ArrowDown","Right","Down"],yn=["ArrowLeft","ArrowUp","Left","Up"],wn=["Escape","Esc"],Cn=function(t,e,n){var o=jt.innerParams.get(t);o&&(o.stopKeydownPropagation&&e.stopPropagation(),"Enter"===e.key?kn(t,e,o):"Tab"===e.key?An(e,o):-1!==[].concat(bn,yn).indexOf(e.key)?xn(e.key):-1!==wn.indexOf(e.key)&&Bn(e,o,n))},kn=function(t,e,n){if(!e.isComposing&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(-1!==["textarea","file"].indexOf(n.input))return;ne(),e.preventDefault()}},An=function(t,e){for(var n=t.target,o=nt(),i=-1,r=0;r1&&arguments[1]!==undefined?arguments[1]:{};we(i({},e,t)),ie.currentInstance&&ie.currentInstance._destroy(),ie.currentInstance=this;var n=Ln(t,e);b(n),Object.freeze(n),ie.timeout&&(ie.timeout.stop(),delete ie.timeout),clearTimeout(ie.restoreFocusTimeout);var o=Dn(this);return ee(this,n),jt.innerParams.set(this,n),qn(this,o,n)},update:function(t){var e=R(),n=jt.innerParams.get(this);if(!e||ut(e,n.hideClass.popup))return A("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");var o={};Object.keys(t).forEach(function(e){_n.isUpdatableParameter(e)?o[e]=t[e]:A('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))});var r=i({},n,o);ee(this,r),jt.innerParams.set(this,r),Object.defineProperties(this,{params:{value:i({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var t=jt.domCache.get(this),e=jt.innerParams.get(this);e&&(t.popup&&ie.swalCloseEventFinishedCallback&&(ie.swalCloseEventFinishedCallback(),delete ie.swalCloseEventFinishedCallback),ie.deferDisposalTimer&&(clearTimeout(ie.deferDisposalTimer),delete ie.deferDisposalTimer),Vn(e),Rn(this))}}),Fn=function(){function t(){if(e(this,t),"undefined"!=typeof window){"undefined"==typeof Promise&&x("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"),_t=this;for(var n=arguments.length,o=new Array(n),i=0;i