2 lines
42 KiB
JavaScript
Executable File
Vendored
2 lines
42 KiB
JavaScript
Executable File
Vendored
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Sweetalert2=t()}(this,(function(){"use strict";const e="SweetAlert2:",t=e=>e.charAt(0).toUpperCase()+e.slice(1),n=e=>Array.prototype.slice.call(e),o=t=>{console.warn("".concat(e," ").concat("object"==typeof t?t.join(" "):t))},i=t=>{console.error("".concat(e," ").concat(t))},a=[],r=(e,t)=>{e='"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'),a.includes(e)||(a.push(e),o(e))},s=e=>"function"==typeof e?e():e,c=e=>e&&"function"==typeof e.toPromise,l=e=>c(e)?e.toPromise():Promise.resolve(e),u=e=>e&&Promise.resolve(e)===e,d={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,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",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,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: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:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},p=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],m={},g=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],h=e=>Object.prototype.hasOwnProperty.call(d,e),f=e=>-1!==p.indexOf(e),b=e=>m[e];var y=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t};const v=y(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","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"]),w=y(["success","warning","info","question","error"]),C=()=>document.body.querySelector(".".concat(v.container)),k=e=>{const t=C();return t?t.querySelector(e):null},A=e=>k(".".concat(e)),P=()=>A(v.popup),B=()=>A(v.icon),x=()=>A(v.title),E=()=>A(v["html-container"]),T=()=>A(v.image),S=()=>A(v["progress-steps"]),L=()=>A(v["validation-message"]),O=()=>k(".".concat(v.actions," .").concat(v.confirm)),j=()=>k(".".concat(v.actions," .").concat(v.deny)),M=()=>k(".".concat(v.loader)),D=()=>k(".".concat(v.actions," .").concat(v.cancel)),H=()=>A(v.actions),I=()=>A(v.footer),q=()=>A(v["timer-progress-bar"]),V=()=>A(v.close),N=()=>{const e=n(P().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(((e,t)=>(e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))<e?1:e<t?-1:0)));var t=n(P().querySelectorAll('\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n')).filter((e=>"-1"!==e.getAttribute("tabindex")));return(e=>{const t=[];for(let n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t})(e.concat(t)).filter((e=>ie(e)))},R=()=>_(document.body,v.shown)&&!_(document.body,v["toast-shown"])&&!_(document.body,v["no-backdrop"]),F=()=>P()&&_(P(),v.toast);function U(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];const n=q();ie(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout((()=>{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"}),10))}const W={previousBodyPadding:null},z=(e,t)=>{if(e.textContent="",t){const o=(new DOMParser).parseFromString(t,"text/html");n(o.querySelector("head").childNodes).forEach((t=>{e.appendChild(t)})),n(o.querySelector("body").childNodes).forEach((t=>{e.appendChild(t)}))}},_=(e,t)=>{if(!t)return!1;var n=t.split(/\s+/);for(let t=0;t<n.length;t++)if(!e.classList.contains(n[t]))return!1;return!0},K=(e,t,i)=>{if(((e,t)=>{n(e.classList).forEach((n=>{Object.values(v).includes(n)||Object.values(w).includes(n)||Object.values(t.showClass).includes(n)||e.classList.remove(n)}))})(e,t),t.customClass&&t.customClass[i]){if("string"!=typeof t.customClass[i]&&!t.customClass[i].forEach)return o("Invalid type of customClass.".concat(i,'! Expected string or iterable object, got "').concat(typeof t.customClass[i],'"'));X(e,t.customClass[i])}},Y=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(".".concat(v.popup," > .").concat(v[t]));case"checkbox":return e.querySelector(".".concat(v.popup," > .").concat(v.checkbox," input"));case"radio":return e.querySelector(".".concat(v.popup," > .").concat(v.radio," input:checked"))||e.querySelector(".".concat(v.popup," > .").concat(v.radio," input:first-child"));case"range":return e.querySelector(".".concat(v.popup," > .").concat(v.range," input"));default:return e.querySelector(".".concat(v.popup," > .").concat(v.input))}},Z=e=>{var t;e.focus(),"file"!==e.type&&(t=e.value,e.value="",e.value=t)},J=(e,t,n)=>{e&&t&&(t="string"==typeof t?t.split(/\s+/).filter(Boolean):t).forEach((t=>{Array.isArray(e)?e.forEach((e=>{n?e.classList.add(t):e.classList.remove(t)})):n?e.classList.add(t):e.classList.remove(t)}))},X=(e,t)=>{J(e,t,!0)},$=(e,t)=>{J(e,t,!1)},G=(e,t)=>{var o=n(e.childNodes);for(let e=0;e<o.length;e++)if(_(o[e],t))return o[e]},Q=(e,t,n)=>{(n=n==="".concat(parseInt(n))?parseInt(n):n)||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},ee=function(e){e.style.display=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"flex"},te=e=>{e.style.display="none"},ne=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},oe=(e,t,n)=>{t?ee(e,n):te(e)},ie=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),ae=e=>!!(e.scrollHeight>e.clientHeight),re=e=>{const t=window.getComputedStyle(e);e=parseFloat(t.getPropertyValue("animation-duration")||"0");var n=parseFloat(t.getPropertyValue("transition-duration")||"0");return 0<e||0<n},se=()=>"undefined"==typeof window||"undefined"==typeof document,ce={},le=e=>new Promise((t=>{if(!e)return t();var n=window.scrollX,o=window.scrollY;ce.restoreFocusTimeout=setTimeout((()=>{ce.previousActiveElement&&ce.previousActiveElement.focus?(ce.previousActiveElement.focus(),ce.previousActiveElement=null):document.body&&document.body.focus(),t()}),100),window.scrollTo(n,o)})),ue='\n <div aria-labelledby="'.concat(v.title,'" aria-describedby="').concat(v["html-container"],'" class="').concat(v.popup,'" tabindex="-1">\n <button type="button" class="').concat(v.close,'"></button>\n <ul class="').concat(v["progress-steps"],'"></ul>\n <div class="').concat(v.icon,'"></div>\n <img class="').concat(v.image,'" />\n <h2 class="').concat(v.title,'" id="').concat(v.title,'"></h2>\n <div class="').concat(v["html-container"],'" id="').concat(v["html-container"],'"></div>\n <input class="').concat(v.input,'" />\n <input type="file" class="').concat(v.file,'" />\n <div class="').concat(v.range,'">\n <input type="range" />\n <output></output>\n </div>\n <select class="').concat(v.select,'"></select>\n <div class="').concat(v.radio,'"></div>\n <label for="').concat(v.checkbox,'" class="').concat(v.checkbox,'">\n <input type="checkbox" />\n <span class="').concat(v.label,'"></span>\n </label>\n <textarea class="').concat(v.textarea,'"></textarea>\n <div class="').concat(v["validation-message"],'" id="').concat(v["validation-message"],'"></div>\n <div class="').concat(v.actions,'">\n <div class="').concat(v.loader,'"></div>\n <button type="button" class="').concat(v.confirm,'"></button>\n <button type="button" class="').concat(v.deny,'"></button>\n <button type="button" class="').concat(v.cancel,'"></button>\n </div>\n <div class="').concat(v.footer,'"></div>\n <div class="').concat(v["timer-progress-bar-container"],'">\n <div class="').concat(v["timer-progress-bar"],'"></div>\n </div>\n </div>\n').replace(/(^|\n)\s*/g,""),de=()=>{ce.currentInstance.resetValidationMessage()},pe=(e,t)=>{if(e instanceof HTMLElement)t.appendChild(e);else if("object"==typeof e){var n=e,o=t;n.jquery?me(o,n):z(o,n.toString())}else e&&z(t,e)},me=(e,t)=>{if(e.textContent="",0 in t)for(let n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},ge=(()=>{if(se())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})();function he(e,n,o){oe(e,o["show".concat(t(n),"Button")],"inline-block"),z(e,o["".concat(n,"ButtonText")]),e.setAttribute("aria-label",o["".concat(n,"ButtonAriaLabel")]),e.className=v[n],K(e,o,"".concat(n,"Button")),X(e,o["".concat(n,"ButtonClass")])}var fe={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const be=["input","file","range","select","radio","checkbox","textarea"],ye=e=>{for(let n=0;n<e.attributes.length;n++){var t=e.attributes[n].name;["type","value","style"].includes(t)||e.removeAttribute(t)}},ve=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},we=(e,t,n)=>{if(n.inputLabel){e.id=v.input;const i=document.createElement("label");var o=v["input-label"];i.setAttribute("for",e.id),i.className=o,X(i,n.customClass.inputLabel),i.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",i)}},Ce=e=>(e=v[e]||v.input,G(P(),e)),ke={},Ae=(ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:u(t.inputValue)||o('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),we(e,e,t),ve(e,t),e.type=t.input,e),ke.file=(e,t)=>(we(e,e,t),ve(e,t),e),ke.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,we(n,e,t),e},ke.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");z(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return we(e,e,t),e},ke.radio=e=>(e.textContent="",e),ke.checkbox=(e,t)=>{const n=Y(P(),"checkbox");n.value="1",n.id=v.checkbox,n.checked=Boolean(t.inputValue);var o=e.querySelector("span");return z(o,t.inputPlaceholder),e},ke.textarea=(e,t)=>(e.value=t.inputValue,ve(e,t),we(e,e,t),setTimeout((()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(P()).width);new MutationObserver((()=>{var n=e.offsetWidth+(n=e,parseInt(window.getComputedStyle(n).marginLeft)+parseInt(window.getComputedStyle(n).marginRight));P().style.width=n>t?"".concat(n,"px"):null})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e),(e,t)=>{const n=E();K(n,t,"htmlContainer"),t.html?(pe(t.html,n),ee(n,"block")):t.text?(n.textContent=t.text,ee(n,"block")):te(n),((e,t)=>{const n=P();var o;const a=!(e=fe.innerParams.get(e))||t.input!==e.input;be.forEach((e=>{var o=v[e];const i=G(n,o);{var r=t.inputAttributes;const n=Y(P(),e);if(n){ye(n);for(const e in r)n.setAttribute(e,r[e])}}i.className=o,a&&te(i)})),t.input&&(a&&(e=>{if(!ke[e.input])return i('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));const t=Ce(e.input),n=ke[e.input](t,e);ee(n),setTimeout((()=>{Z(n)}))})(t),o=Ce((e=t).input),e.customClass&&X(o,e.customClass.input))})(e,t)}),Pe=(e,t)=>{for(const n in w)t.icon!==n&&$(e,w[n]);X(e,w[t.icon]),Ee(e,t),Be(),K(e,t,"icon")},Be=()=>{const e=P();var t=window.getComputedStyle(e).getPropertyValue("background-color");const n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<n.length;e++)n[e].style.backgroundColor=t},xe=(e,t)=>{e.textContent="",t.iconHtml?z(e,Te(t.iconHtml)):"success"===t.icon?z(e,'\n <div class="swal2-success-circular-line-left"></div>\n <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>\n <div class="swal2-success-circular-line-right"></div>\n'):"error"===t.icon?z(e,'\n <span class="swal2-x-mark">\n <span class="swal2-x-mark-line-left"></span>\n <span class="swal2-x-mark-line-right"></span>\n </span>\n'):z(e,Te({question:"?",warning:"!",info:"i"}[t.icon]))},Ee=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])ne(e,n,"backgroundColor",t.iconColor);ne(e,".swal2-success-ring","borderColor",t.iconColor)}},Te=e=>'<div class="'.concat(v["icon-content"],'">').concat(e,"</div>"),Se=(e,t)=>{((e,t)=>{var n=C();const o=P();t.toast?(Q(n,"width",t.width),o.style.width="100%",o.insertBefore(M(),B())):Q(o,"width",t.width),Q(o,"padding",t.padding),t.color&&(o.style.color=t.color),t.background&&(o.style.background=t.background),te(L()),(n=o).className="".concat(v.popup," ").concat(ie(n)?t.showClass.popup:""),t.toast?(X([document.documentElement,document.body],v["toast-shown"]),X(n,v.toast)):X(n,v.modal),K(n,t,"popup"),"string"==typeof t.customClass&&X(n,t.customClass),t.icon&&X(n,v["icon-".concat(t.icon)])})(0,t),((e,t)=>{var n,i,a=C();a&&(i=a,"string"==typeof(n=t.backdrop)?i.style.background=n:n||X([document.documentElement,document.body],v["no-backdrop"]),i=a,(n=t.position)in v?X(i,v[n]):(o('The "position" parameter is not valid, defaulting to "center"'),X(i,v.center)),n=a,!(i=t.grow)||"string"!=typeof i||(i="grow-".concat(i))in v&&X(n,v[i]),K(a,t,"container"))})(0,t),((e,t)=>{const n=S();if(!t.progressSteps||0===t.progressSteps.length)return te(n);ee(n),n.textContent="",t.currentProgressStep>=t.progressSteps.length&&o("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach(((e,o)=>{var i;i=document.createElement("li"),X(i,v["progress-step"]),z(i,e),e=i,n.appendChild(e),o===t.currentProgressStep&&X(e,v["active-progress-step"]),o!==t.progressSteps.length-1&&(i=(e=>{const t=document.createElement("li");return X(t,v["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t})(t),n.appendChild(i))}))})(0,t),((e,t)=>{e=fe.innerParams.get(e);var n=B();e&&t.icon===e.icon?(xe(n,t),Pe(n,t)):t.icon||t.iconHtml?t.icon&&-1===Object.keys(w).indexOf(t.icon)?(i('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(t.icon,'"')),te(n)):(ee(n),xe(n,t),Pe(n,t),X(n,t.showClass.icon)):te(n)})(e,t),((e,t)=>{const n=T();if(!t.imageUrl)return te(n);ee(n,""),n.setAttribute("src",t.imageUrl),n.setAttribute("alt",t.imageAlt),Q(n,"width",t.imageWidth),Q(n,"height",t.imageHeight),n.className=v.image,K(n,t,"image")})(0,t),((e,t)=>{const n=x();oe(n,t.title||t.titleText,"block"),t.title&&pe(t.title,n),t.titleText&&(n.innerText=t.titleText),K(n,t,"title")})(0,t),((e,t)=>{const n=V();z(n,t.closeButtonHtml),K(n,t,"closeButton"),oe(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel)})(0,t),Ae(e,t),((e,t)=>{var n,o,i,a,r,s=H(),c=M();(t.showConfirmButton||t.showDenyButton||t.showCancelButton?ee:te)(s),K(s,t,"actions"),n=c,o=t,i=O(),a=j(),r=D(),he(i,"confirm",o),he(a,"deny",o),he(r,"cancel",o),function(e,t,n,o){if(!o.buttonsStyling)return $([e,t,n],v.styled);X([e,t,n],v.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,X(e,v["default-outline"])),o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,X(t,v["default-outline"])),o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,X(n,v["default-outline"]))}(i,a,r,o),o.reverseButtons&&(o.toast?(s.insertBefore(r,i),s.insertBefore(a,i)):(s.insertBefore(r,n),s.insertBefore(a,n),s.insertBefore(i,n))),z(c,t.loaderHtml),K(c,t,"loader")})(0,t),((e,t)=>{var n=I();oe(n,t.footer),t.footer&&pe(t.footer,n),K(n,t,"footer")})(0,t),"function"==typeof t.didRender&&t.didRender(P())},Le=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Oe=()=>{n(document.body.children).forEach((e=>{e===C()||e.contains(C())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}))},je=()=>{n(document.body.children).forEach((e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))},Me=["swal-title","swal-html","swal-footer"],De=(e,t)=>{n(e.attributes).forEach((n=>{-1===t.indexOf(n.name)&&o(['Unrecognized attribute "'.concat(n.name,'" on <').concat(e.tagName.toLowerCase(),">."),"".concat(t.length?"Allowed attributes are: ".concat(t.join(", ")):"To set the value, use HTML within the element.")])}))};var He={email:(e,t)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function Ie(e){(t=e).inputValidator||Object.keys(He).forEach((e=>{t.input===e&&(t.inputValidator=He[e])})),e.showLoaderOnConfirm&&!e.preConfirm&&o("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),(n=e).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(o('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />"));var t,n=e;e=(()=>{const e=C();return!!e&&(e.remove(),$([document.documentElement,document.body],[v["no-backdrop"],v["toast-shown"],v["has-column"]]),!0)})();if(se())i("SweetAlert2 requires document to initialize");else{const t=document.createElement("div"),o=(t.className=v.container,e&&X(t,v["no-transition"]),z(t,ue),(e=>"string"==typeof e?document.querySelector(e):e)(n.target));o.appendChild(t),(e=>{const t=P();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(n),(e=>{"rtl"===window.getComputedStyle(e).direction&&X(C(),v.rtl)})(o),(()=>{const e=P(),t=G(e,v.input),n=G(e,v.file),o=e.querySelector(".".concat(v.range," input")),i=e.querySelector(".".concat(v.range," output")),a=G(e,v.select),r=e.querySelector(".".concat(v.checkbox," input")),s=G(e,v.textarea);t.oninput=de,n.onchange=de,a.onchange=de,r.onchange=de,s.oninput=de,o.oninput=()=>{de(),i.value=o.value},o.onchange=()=>{de(),o.nextSibling.value=o.value}})()}}class qe{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){var t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const Ve=e=>{var t,n=e.target,o=C();return!((t=e).touches&&t.touches.length&&"stylus"===t.touches[0].touchType||(t=e).touches&&1<t.touches.length||n!==o&&(ae(o)||"INPUT"===n.tagName||"TEXTAREA"===n.tagName||ae(E())&&E().contains(n)))},Ne=e=>{const t=P();if(e.target===t){const e=C();t.removeEventListener(ge,Ne),e.style.overflowY="auto"}},Re=(e,t,n)=>{(()=>{if((e=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints)&&!_(document.body,v.iosfix)){var e=document.body.scrollTop;document.body.style.top="".concat(-1*e,"px"),X(document.body,v.iosfix);{const e=C();let t;e.ontouchstart=e=>{t=Ve(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}}{const e=navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),n=!!e.match(/WebKit/i);t&&n&&!e.match(/CriOS/i)&&P().scrollHeight>window.innerHeight-44&&(C().style.paddingBottom="".concat(44,"px"))}}})(),t&&"hidden"!==n&&(null===W.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(W.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(W.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=v["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})(),"px"))),setTimeout((()=>{e.scrollTop=0}))},Fe=(e,t,n)=>{X(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),ee(t,"grid"),setTimeout((()=>{X(t,n.showClass.popup),t.style.removeProperty("opacity")}),10),X([document.documentElement,document.body],v.shown),n.heightAuto&&n.backdrop&&!n.toast&&X([document.documentElement,document.body],v["height-auto"])},Ue=e=>{let t=P();t||new Lt,t=P();var n=M();if(F())te(B());else{var o=t;const n=H(),i=M();!e&&ie(O())&&(e=O()),ee(n),e&&(te(e),i.setAttribute("data-button-to-replace",e.className)),i.parentNode.insertBefore(i,e),X([o,n],v.loading)}ee(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},We=(e,t)=>{const n=e.getInput();te(n),l(t.inputValue).then((o=>{n.value="number"===t.input?parseFloat(o)||0:"".concat(o),ee(n),n.focus(),e.hideLoading()})).catch((t=>{i("Error in inputValue promise: ".concat(t)),n.value="",ee(n),n.focus(),e.hideLoading()}))},ze={select:(e,t,n)=>{const o=G(e,v.select),i=(e,t,o)=>{const i=document.createElement("option");i.value=o,z(i,t),i.selected=Ke(o,n.inputValue),e.appendChild(i)};t.forEach((e=>{var t=e[0];const n=e[1];if(Array.isArray(n)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,o.appendChild(e),n.forEach((t=>i(e,t[1],t[0])))}else i(o,n,t)})),o.focus()},radio:(e,t,n)=>{const o=G(e,v.radio),i=(t.forEach((e=>{var t=e[0];e=e[1];const i=document.createElement("input"),a=document.createElement("label"),r=(i.type="radio",i.name=v.radio,i.value=t,Ke(t,n.inputValue)&&(i.checked=!0),document.createElement("span"));z(r,e),r.className=v.label,a.appendChild(i),a.appendChild(r),o.appendChild(a)})),o.querySelectorAll("input"));i.length&&i[0].focus()}},_e=e=>{const t=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach(((e,n)=>{let o=e;"object"==typeof o&&(o=_e(o)),t.push([n,o])})):Object.keys(e).forEach((n=>{let o=e[n];"object"==typeof o&&(o=_e(o)),t.push([n,o])})),t},Ke=(e,t)=>t&&t.toString()===e.toString();function Ye(){var e,t=fe.innerParams.get(this);if(t){const n=fe.domCache.get(this);te(n.loader),F()?t.icon&&ee(B()):(e=(t=n).popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"))).length?ee(e[0],"inline-block"):!ie(O())&&!ie(j())&&!ie(D())&&te(t.actions),$([n.popup,n.actions],v.loading),n.popup.removeAttribute("aria-busy"),n.popup.removeAttribute("data-loading"),n.confirmButton.disabled=!1,n.denyButton.disabled=!1,n.cancelButton.disabled=!1}}var Ze={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};function Je(e,t,n,o){F()?Qe(e,o):(le(n).then((()=>Qe(e,o))),ce.keydownTarget.removeEventListener("keydown",ce.keydownHandler,{capture:ce.keydownListenerCapture}),ce.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),R()&&(null!==W.previousBodyPadding&&(document.body.style.paddingRight="".concat(W.previousBodyPadding,"px"),W.previousBodyPadding=null),(()=>{var e;_(document.body,v.iosfix)&&(e=parseInt(document.body.style.top,10),$(document.body,v.iosfix),document.body.style.top="",document.body.scrollTop=-1*e)})(),je()),$([document.documentElement,document.body],[v.shown,v["height-auto"],v["no-backdrop"],v["toast-shown"]])}function Xe(e){e=void 0!==(n=e)?Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},n):{isConfirmed:!1,isDenied:!1,isDismissed:!0};const t=Ze.swalPromiseResolve.get(this);var n=(e=>{const t=P();if(!t)return!1;const n=fe.innerParams.get(e);if(!n||_(t,n.hideClass.popup))return!1;$(t,n.showClass.popup),X(t,n.hideClass.popup);const o=C();return $(o,n.showClass.backdrop),X(o,n.hideClass.backdrop),Ge(e,t,n),!0})(this);this.isAwaitingPromise()?e.isDismissed||($e(this),t(e)):n&&t(e)}const $e=e=>{e.isAwaitingPromise()&&(fe.awaitingPromise.delete(e),fe.innerParams.get(e)||e._destroy())},Ge=(e,t,n)=>{var o,i,a,r=C(),s=ge&&re(t);"function"==typeof n.willClose&&n.willClose(t),s?(s=e,o=t,t=r,i=n.returnFocus,a=n.didClose,ce.swalCloseEventFinishedCallback=Je.bind(null,s,t,i,a),o.addEventListener(ge,(function(e){e.target===o&&(ce.swalCloseEventFinishedCallback(),delete ce.swalCloseEventFinishedCallback)}))):Je(e,r,n.returnFocus,n.didClose)},Qe=(e,t)=>{setTimeout((()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()}))};function et(e,t,n){const o=fe.domCache.get(e);t.forEach((e=>{o[e].disabled=n}))}function tt(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode.querySelectorAll("input");for(let e=0;e<n.length;e++)n[e].disabled=t}else e.disabled=t}const nt=e=>{e.isAwaitingPromise()?(ot(fe,e),fe.awaitingPromise.set(e,!0)):(ot(Ze,e),ot(fe,e))},ot=(e,t)=>{for(const n in e)e[n].delete(t)};y=Object.freeze({hideLoading:Ye,disableLoading:Ye,getInput:function(e){var t=fe.innerParams.get(e||this);return(e=fe.domCache.get(e||this))?Y(e.popup,t.input):null},close:Xe,isAwaitingPromise:function(){return!!fe.awaitingPromise.get(this)},rejectPromise:function(e){const t=Ze.swalPromiseReject.get(this);$e(this),t&&t(e)},handleAwaitingPromise:$e,closePopup:Xe,closeModal:Xe,closeToast:Xe,enableButtons:function(){et(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){et(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return tt(this.getInput(),!1)},disableInput:function(){return tt(this.getInput(),!0)},showValidationMessage:function(e){const t=fe.domCache.get(this);var n=fe.innerParams.get(this);z(t.validationMessage,e),t.validationMessage.className=v["validation-message"],n.customClass&&n.customClass.validationMessage&&X(t.validationMessage,n.customClass.validationMessage),ee(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",v["validation-message"]),Z(o),X(o,v.inputerror))},resetValidationMessage:function(){var e=fe.domCache.get(this);e.validationMessage&&te(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),$(t,v.inputerror))},getProgressSteps:function(){return fe.domCache.get(this).progressSteps},update:function(e){var t=P(),n=fe.innerParams.get(this);if(!t||_(t,n.hideClass.popup))return o("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.");t=(e=>{const t={};return Object.keys(e).forEach((n=>{f(n)?t[n]=e[n]:o('Invalid parameter to update: "'.concat(n,'". 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'))})),t})(e),n=Object.assign({},n,t),Se(this,n),fe.innerParams.set(this,n),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})},_destroy:function(){var e=fe.domCache.get(this);const t=fe.innerParams.get(this);t?(e.popup&&ce.swalCloseEventFinishedCallback&&(ce.swalCloseEventFinishedCallback(),delete ce.swalCloseEventFinishedCallback),ce.deferDisposalTimer&&(clearTimeout(ce.deferDisposalTimer),delete ce.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),nt(e=this),delete e.params,delete ce.keydownHandler,delete ce.keydownTarget,delete ce.currentInstance):nt(this)}});const it=(e,n)=>{var o=fe.innerParams.get(e);if(!o.input)return i('The "input" parameter is needed to be set when using returnInputValueOn'.concat(t(n)));var a=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return n.checked?1:0;case"radio":return(o=n).checked?o.value:null;case"file":return(o=n).files.length?null!==o.getAttribute("multiple")?o.files:o.files[0]:null;default:return t.inputAutoTrim?n.value.trim():n.value}var o})(e,o);if(o.inputValidator){var r=e,s=a,c=n;const t=fe.innerParams.get(r);(r.disableInput(),Promise.resolve().then((()=>l(t.inputValidator(s,t.validationMessage))))).then((e=>{r.enableButtons(),r.enableInput(),e?r.showValidationMessage(e):("deny"===c?at:ct)(r,s)}))}else e.getInput().checkValidity()?("deny"===n?at:ct)(e,a):(e.enableButtons(),e.showValidationMessage(o.validationMessage))},at=(e,t)=>{const n=fe.innerParams.get(e||void 0);if(n.showLoaderOnDeny&&Ue(j()),n.preDeny){fe.awaitingPromise.set(e||void 0,!0);Promise.resolve().then((()=>l(n.preDeny(t,n.validationMessage)))).then((n=>{!1===n?(e.hideLoading(),$e(e)):e.closePopup({isDenied:!0,value:void 0===n?t:n})})).catch((t=>st(e||void 0,t)))}else e.closePopup({isDenied:!0,value:t})},rt=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},st=(e,t)=>{e.rejectPromise(t)},ct=(e,t)=>{const n=fe.innerParams.get(e||void 0);if(n.showLoaderOnConfirm&&Ue(),n.preConfirm){e.resetValidationMessage(),fe.awaitingPromise.set(e||void 0,!0);Promise.resolve().then((()=>l(n.preConfirm(t,n.validationMessage)))).then((n=>{ie(L())||!1===n?(e.hideLoading(),$e(e)):rt(e,void 0===n?t:n)})).catch((t=>st(e||void 0,t)))}else rt(e,t)};let lt=!1;const ut=()=>O()&&O().click(),dt=(e,t,n)=>{const o=N();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();P().focus()},pt=["ArrowRight","ArrowDown"],mt=["ArrowLeft","ArrowUp"],gt=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e),ht=()=>{if(ce.timeout){{const t=q();var e=(e=parseInt(window.getComputedStyle(t).width))/(t.style.removeProperty("transition"),t.style.width="100%",parseInt(window.getComputedStyle(t).width))*100;t.style.removeProperty("transition"),t.style.width="".concat(e,"%")}return ce.timeout.stop()}},ft=()=>{var e;if(ce.timeout)return U(e=ce.timeout.start()),e};let bt=!1;const yt={},vt=e=>{for(let n=e.target;n&&n!==document;n=n.parentNode)for(const e in yt){var t=n.getAttribute(e);if(t)return void yt[e].fire({template:t})}};var wt=Object.freeze({isValidParameter:h,isUpdatableParameter:f,isDeprecatedParameter:b,argsToParams:e=>{const t={};return"object"!=typeof e[0]||gt(e[0])?["title","html","icon"].forEach(((n,o)=>{"string"==typeof(o=e[o])||gt(o)?t[n]=o:void 0!==o&&i("Unexpected type of ".concat(n,'! Expected "string" or "Element", got ').concat(typeof o))})):Object.assign(t,e[0]),t},isVisible:()=>ie(P()),clickConfirm:ut,clickDeny:()=>j()&&j().click(),clickCancel:()=>D()&&D().click(),getContainer:C,getPopup:P,getTitle:x,getHtmlContainer:E,getImage:T,getIcon:B,getInputLabel:()=>A(v["input-label"]),getCloseButton:V,getActions:H,getConfirmButton:O,getDenyButton:j,getCancelButton:D,getLoader:M,getFooter:I,getTimerProgressBar:q,getFocusableElements:N,getValidationMessage:L,isLoading:()=>P().hasAttribute("data-loading"),fire:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new this(...t)},mixin:function(e){return class extends(this){_main(t,n){return super._main(t,Object.assign({},e,n))}}},showLoading:Ue,enableLoading:Ue,getTimerLeft:()=>ce.timeout&&ce.timeout.getTimerLeft(),stopTimer:ht,resumeTimer:ft,toggleTimer:()=>{var e=ce.timeout;return e&&(e.running?ht:ft)()},increaseTimer:e=>{if(ce.timeout)return U(e=ce.timeout.increase(e),!0),e},isTimerRunning:()=>ce.timeout&&ce.timeout.isRunning(),bindClickHandler:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"data-swal-template";yt[e]=this,bt||(document.body.addEventListener("click",vt),bt=!0)}});let Ct;class kt{constructor(){if("undefined"!=typeof window){Ct=this;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=Object.freeze(this.constructor.argsToParams(t));o=(Object.defineProperties(this,{params:{value:o,writable:!1,enumerable:!0,configurable:!0}}),this._main(this.params));fe.promise.set(this,o)}}_main(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};(e=>{!e.backdrop&&e.allowOutsideClick&&o('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const n in e)h(t=n)||o('Unknown parameter "'.concat(t,'"')),e.toast&&(t=n,g.includes(t)&&o('The parameter "'.concat(t,'" is incompatible with toasts'))),b(t=n)&&r(t,b(t));var t})(Object.assign({},t,e)),ce.currentInstance&&(ce.currentInstance._destroy(),R()&&je()),ce.currentInstance=this,e=Pt(e,t),Ie(e),Object.freeze(e),ce.timeout&&(ce.timeout.stop(),delete ce.timeout),clearTimeout(ce.restoreFocusTimeout),t=Bt(this);return Se(this,e),fe.innerParams.set(this,e),At(this,t,e)}then(e){return fe.promise.get(this).then(e)}finally(e){return fe.promise.get(this).finally(e)}}const At=(e,t,n)=>new Promise(((o,a)=>{const r=t=>{e.closePopup({isDismissed:!0,dismiss:t})};var d,p,m;Ze.swalPromiseResolve.set(e,o),Ze.swalPromiseReject.set(e,a),t.confirmButton.onclick=()=>{var t=e,n=fe.innerParams.get(t);t.disableButtons(),n.input?it(t,"confirm"):ct(t,!0)},t.denyButton.onclick=()=>{var t=e,n=fe.innerParams.get(t);t.disableButtons(),n.returnInputValueOnDeny?it(t,"deny"):at(t,!1)},t.cancelButton.onclick=()=>{var t=r;e.disableButtons(),t(Le.cancel)},t.closeButton.onclick=()=>r(Le.close),o=e,a=t,m=r,fe.innerParams.get(o).toast?((e,t,n)=>{t.popup.onclick=()=>{var t,o=fe.innerParams.get(e);o&&((t=o).showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton||o.timer||o.input)||n(Le.close)}})(o,a,m):((e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(lt=!0)}}})(a),(e=>{e.container.onmousedown=()=>{e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,t.target!==e.popup&&!e.popup.contains(t.target)||(lt=!0)}}})(a),((e,t,n)=>{t.container.onclick=o=>{var i=fe.innerParams.get(e);lt?lt=!1:o.target===t.container&&s(i.allowOutsideClick)&&n(Le.backdrop)}})(o,a,m)),d=e,a=n,p=r,(o=ce).keydownTarget&&o.keydownHandlerAdded&&(o.keydownTarget.removeEventListener("keydown",o.keydownHandler,{capture:o.keydownListenerCapture}),o.keydownHandlerAdded=!1),a.toast||(o.keydownHandler=e=>((e,t,n)=>{var o=fe.innerParams.get(e);if(o&&!t.isComposing&&229!==t.keyCode)if(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key)r=t,s((a=o).allowEnterKey)&&r.target&&e.getInput()&&r.target.outerHTML===e.getInput().outerHTML&&(["textarea","file"].includes(a.input)||(ut(),r.preventDefault()));else if("Tab"!==t.key){if([...pt,...mt].includes(t.key)){if(e=t.key,[O(),j(),D()].includes(document.activeElement)){var i=pt.includes(e)?"nextElementSibling":"previousElementSibling";let t=document.activeElement;for(let e=0;e<H().children.length;e++){if(!(t=t[i]))return;if(ie(t)&&t instanceof HTMLButtonElement)break}t instanceof HTMLButtonElement&&t.focus()}}else if("Escape"===t.key){var a=t,r=o;e=n,s(r.allowEscapeKey)&&(a.preventDefault(),e(Le.esc))}}else{e=o;var c=(n=t).target,l=N();let i=-1;for(let e=0;e<l.length;e++)if(c===l[e]){i=e;break}n.shiftKey?dt(0,i,-1):dt(0,i,1),n.stopPropagation(),n.preventDefault()}})(d,e,p),o.keydownTarget=a.keydownListenerCapture?window:P(),o.keydownListenerCapture=a.keydownListenerCapture,o.keydownTarget.addEventListener("keydown",o.keydownHandler,{capture:o.keydownListenerCapture}),o.keydownHandlerAdded=!0),m=e,"select"===(a=n).input||"radio"===a.input?((e,t)=>{const n=P(),o=e=>ze[t.input](n,_e(e),t);c(t.inputOptions)||u(t.inputOptions)?(Ue(O()),l(t.inputOptions).then((t=>{e.hideLoading(),o(t)}))):"object"==typeof t.inputOptions?o(t.inputOptions):i("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof t.inputOptions))})(m,a):["text","email","number","tel","textarea"].includes(a.input)&&(c(a.inputValue)||u(a.inputValue))&&(Ue(O()),We(m,a));{var g=n;const e=C(),t=P();"function"==typeof g.willOpen&&g.willOpen(t),o=window.getComputedStyle(document.body).overflowY,Fe(e,t,g),setTimeout((()=>{((e,t)=>{ge&&re(t)?(e.style.overflowY="hidden",t.addEventListener(ge,Ne)):e.style.overflowY="auto"})(e,t)}),10),R()&&(Re(e,g.scrollbarPadding,o),Oe()),F()||ce.previousActiveElement||(ce.previousActiveElement=document.activeElement),"function"==typeof g.didOpen&&setTimeout((()=>g.didOpen(t))),$(e,v["no-transition"])}xt(ce,n,r),Et(t,n),setTimeout((()=>{t.container.scrollTop=0}))})),Pt=(e,i)=>{var a=(e=>(e="string"==typeof e.template?document.querySelector(e.template):e.template)?((e=>{const t=Me.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);n(e.children).forEach((e=>{e=e.tagName.toLowerCase(),-1===t.indexOf(e)&&o("Unrecognized element <".concat(e,">"))}))})(e=e.content),e=Object.assign((e=>{const t={};return n(e.querySelectorAll("swal-param")).forEach((e=>{De(e,["name","value"]);var n=e.getAttribute("name");e=e.getAttribute("value"),"boolean"==typeof d[n]&&"false"===e&&(t[n]=!1),"object"==typeof d[n]&&(t[n]=JSON.parse(e))})),t})(e),(e=>{const o={};return n(e.querySelectorAll("swal-button")).forEach((e=>{De(e,["type","color","aria-label"]);var n=e.getAttribute("type");o["".concat(n,"ButtonText")]=e.innerHTML,o["show".concat(t(n),"Button")]=!0,e.hasAttribute("color")&&(o["".concat(n,"ButtonColor")]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(o["".concat(n,"ButtonAriaLabel")]=e.getAttribute("aria-label"))})),o})(e),(e=>{const t={},n=e.querySelector("swal-image");return n&&(De(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t})(e),(e=>{const t={},n=e.querySelector("swal-icon");return n&&(De(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t})(e),(e=>{const t={},o=e.querySelector("swal-input");return o&&(De(o,["type","label","placeholder","value"]),t.input=o.getAttribute("type")||"text",o.hasAttribute("label")&&(t.inputLabel=o.getAttribute("label")),o.hasAttribute("placeholder")&&(t.inputPlaceholder=o.getAttribute("placeholder")),o.hasAttribute("value")&&(t.inputValue=o.getAttribute("value"))),(e=e.querySelectorAll("swal-input-option")).length&&(t.inputOptions={},n(e).forEach((e=>{De(e,["value"]);var n=e.getAttribute("value");e=e.innerHTML,t.inputOptions[n]=e}))),t})(e),((e,t)=>{const n={};for(const o in t){const i=t[o],a=e.querySelector(i);a&&(De(a,[]),n[i.replace(/^swal-/,"")]=a.innerHTML.trim())}return n})(e,Me)),e):{})(e);const r=Object.assign({},d,i,a,e);return r.showClass=Object.assign({},d.showClass,r.showClass),r.hideClass=Object.assign({},d.hideClass,r.hideClass),r},Bt=e=>{var t={popup:P(),container:C(),actions:H(),confirmButton:O(),denyButton:j(),cancelButton:D(),loader:M(),closeButton:V(),validationMessage:L(),progressSteps:S()};return fe.domCache.set(e,t),t},xt=(e,t,n)=>{var o=q();te(o),t.timer&&(e.timeout=new qe((()=>{n("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(ee(o),K(o,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&U(t.timer)}))))},Et=(e,t)=>{if(!t.toast)return s(t.allowEnterKey)?void(Tt(e,t)||dt(0,-1,1)):St()},Tt=(e,t)=>t.focusDeny&&ie(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&ie(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!ie(e.confirmButton)||(e.confirmButton.focus(),0)),St=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()},Lt=(Object.assign(kt.prototype,y),Object.assign(kt,wt),Object.keys(y).forEach((e=>{kt[e]=function(){if(Ct)return Ct[e](...arguments)}})),kt.DismissReason=Le,kt.version="11.4.4",kt);return Lt.default=Lt})),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2);
|