\n \n').replace(/(^|\n)\s*/g,""),st=()=>{fo.isVisible()&&fo.resetValidationMessage()},at=t=>{const e=(()=>{const t=h();return!!t&&(t.remove(),$([document.documentElement,document.body],[w["no-backdrop"],w["toast-shown"],w["has-column"]]),!0)})();if(ot())return void a("SweetAlert2 requires document to initialize");const o=document.createElement("div");o.className=w.container,e&&Y(o,w["no-transition"]),I(o,nt);const n="string"==typeof(s=t.target)?document.querySelector(s):s;var s;n.appendChild(o),(t=>{const e=y();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")})(t),(t=>{"rtl"===window.getComputedStyle(t).direction&&Y(h(),w.rtl)})(n),(()=>{const t=y(),e=Z(t,w.input),o=Z(t,w.file),n=t.querySelector(".".concat(w.range," input")),s=t.querySelector(".".concat(w.range," output")),a=Z(t,w.select),i=t.querySelector(".".concat(w.checkbox," input")),r=Z(t,w.textarea);e.oninput=st,o.onchange=st,a.onchange=st,i.onchange=st,r.oninput=st,n.oninput=()=>{st(),s.value=n.value},n.onchange=()=>{st(),n.nextSibling.value=n.value}})()},it=(t,e)=>{t instanceof HTMLElement?e.appendChild(t):"object"==typeof t?rt(t,e):t&&I(e,t)},rt=(t,e)=>{t.jquery?lt(e,t):I(e,t.toString())},lt=(t,e)=>{if(t.textContent="",0 in e)for(let o=0;o in e;o++)t.appendChild(e[o].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},ct=(()=>{if(ot())return!1;const t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&void 0!==t.style[o])return e[o];return!1})(),dt=(t,e)=>{const o=L(),n=S(),s=E(),a=P(),i=T();e.showConfirmButton||e.showDenyButton||e.showCancelButton?W(o):K(o),N(o,e,"actions"),ut(s,"confirm",e),ut(a,"deny",e),ut(i,"cancel",e),function(t,e,o,n){if(!n.buttonsStyling)return $([t,e,o],w.styled);Y([t,e,o],w.styled),n.confirmButtonColor&&(t.style.backgroundColor=n.confirmButtonColor,Y(t,w["default-outline"])),n.denyButtonColor&&(e.style.backgroundColor=n.denyButtonColor,Y(e,w["default-outline"])),n.cancelButtonColor&&(o.style.backgroundColor=n.cancelButtonColor,Y(o,w["default-outline"]))}(s,a,i,e),e.reverseButtons&&(o.insertBefore(i,n),o.insertBefore(a,n),o.insertBefore(s,n)),I(n,e.loaderHtml),N(n,e,"loader")};function ut(t,e,n){J(t,n["show".concat(o(e),"Button")],"inline-block"),I(t,n["".concat(e,"ButtonText")]),t.setAttribute("aria-label",n["".concat(e,"ButtonAriaLabel")]),t.className=w[e],N(t,n,"".concat(e,"Button")),Y(t,n["".concat(e,"ButtonClass")])}const pt=(t,e)=>{const o=h();o&&(function(t,e){"string"==typeof e?t.style.background=e:e||Y([document.documentElement,document.body],w["no-backdrop"])}(o,e.backdrop),function(t,e){e in w?Y(t,w[e]):(s('The "position" parameter is not valid, defaulting to "center"'),Y(t,w.center))}(o,e.position),function(t,e){if(e&&"string"==typeof e){const o="grow-".concat(e);o in w&&Y(t,w[o])}}(o,e.grow),N(o,e,"container"))};var mt={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const wt=["input","file","range","select","radio","checkbox","textarea"],gt=t=>{if(!kt[t.input])return a('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input,'"'));const e=vt(t.input),o=kt[t.input](e,t);W(o),setTimeout((()=>{F(o)}))},ht=(t,e)=>{const o=U(y(),t);if(o){(t=>{for(let e=0;e{const e=vt(t.input);t.customClass&&Y(e,t.customClass.input)},bt=(t,e)=>{t.placeholder&&!e.inputPlaceholder||(t.placeholder=e.inputPlaceholder)},yt=(t,e,o)=>{if(o.inputLabel){t.id=w.input;const n=document.createElement("label"),s=w["input-label"];n.setAttribute("for",t.id),n.className=s,Y(n,o.customClass.inputLabel),n.innerText=o.inputLabel,e.insertAdjacentElement("beforebegin",n)}},vt=t=>{const e=w[t]?w[t]:w.input;return Z(y(),e)},kt={};kt.text=kt.email=kt.password=kt.number=kt.tel=kt.url=(t,e)=>("string"==typeof e.inputValue||"number"==typeof e.inputValue?t.value=e.inputValue:u(e.inputValue)||s('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof e.inputValue,'"')),yt(t,t,e),bt(t,e),t.type=e.input,t),kt.file=(t,e)=>(yt(t,t,e),bt(t,e),t),kt.range=(t,e)=>{const o=t.querySelector("input"),n=t.querySelector("output");return o.value=e.inputValue,o.type=e.input,n.value=e.inputValue,yt(o,t,e),t},kt.select=(t,e)=>{if(t.textContent="",e.inputPlaceholder){const o=document.createElement("option");I(o,e.inputPlaceholder),o.value="",o.disabled=!0,o.selected=!0,t.appendChild(o)}return yt(t,t,e),t},kt.radio=t=>(t.textContent="",t),kt.checkbox=(t,e)=>{const o=U(y(),"checkbox");o.value=1,o.id=w.checkbox,o.checked=Boolean(e.inputValue);const n=t.querySelector("span");return I(n,e.inputPlaceholder),t},kt.textarea=(t,e)=>(t.value=e.inputValue,bt(t,e),yt(t,t,e),setTimeout((()=>{if("MutationObserver"in window){const e=parseInt(window.getComputedStyle(y()).width);new MutationObserver((()=>{const o=t.offsetWidth+(n=t,parseInt(window.getComputedStyle(n).marginLeft)+parseInt(window.getComputedStyle(n).marginRight));var n;y().style.width=o>e?"".concat(o,"px"):null})).observe(t,{attributes:!0,attributeFilter:["style"]})}})),t);const xt=(t,e)=>{const o=x();N(o,e,"htmlContainer"),e.html?(it(e.html,o),W(o,"block")):e.text?(o.textContent=e.text,W(o,"block")):K(o),((t,e)=>{const o=y(),n=mt.innerParams.get(t),s=!n||e.input!==n.input;wt.forEach((t=>{const n=w[t],a=Z(o,n);ht(t,e.inputAttributes),a.className=n,s&&K(a)})),e.input&&(s&>(e),ft(e))})(t,e)},Ct=(t,e)=>{for(const o in g)e.icon!==o&&$(t,g[o]);Y(t,g[e.icon]),Et(t,e),At(),N(t,e,"icon")},At=()=>{const t=y(),e=window.getComputedStyle(t).getPropertyValue("background-color"),o=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let t=0;t{t.textContent="",e.iconHtml?I(t,Pt(e.iconHtml)):"success"===e.icon?I(t,'\n \n \n \n \n '):"error"===e.icon?I(t,'\n \n \n \n \n '):I(t,Pt({question:"?",warning:"!",info:"i"}[e.icon]))},Et=(t,e)=>{if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(const o of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])X(t,o,"backgroundColor",e.iconColor);X(t,".swal2-success-ring","borderColor",e.iconColor)}},Pt=t=>'
').concat(t,"
"),St=(t,e)=>{const o=A();if(!e.progressSteps||0===e.progressSteps.length)return K(o);W(o),o.textContent="",e.currentProgressStep>=e.progressSteps.length&&s("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach(((t,n)=>{const s=(t=>{const e=document.createElement("li");return Y(e,w["progress-step"]),I(e,t),e})(t);if(o.appendChild(s),n===e.currentProgressStep&&Y(s,w["active-progress-step"]),n!==e.progressSteps.length-1){const t=(t=>{const e=document.createElement("li");return Y(e,w["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e})(e);o.appendChild(t)}}))},Tt=(t,e)=>{t.className="".concat(w.popup," ").concat(G(t)?e.showClass.popup:""),e.toast?(Y([document.documentElement,document.body],w["toast-shown"]),Y(t,w.toast)):Y(t,w.modal),N(t,e,"popup"),"string"==typeof e.customClass&&Y(t,e.customClass),e.icon&&Y(t,w["icon-".concat(e.icon)])},Lt=(t,e)=>{((t,e)=>{const o=h(),n=y();e.toast?(_(o,"width",e.width),n.style.width="100%",n.insertBefore(S(),v())):_(n,"width",e.width),_(n,"padding",e.padding),e.background&&(n.style.background=e.background),K(B()),Tt(n,e)})(0,e),pt(0,e),St(0,e),((t,e)=>{const o=mt.innerParams.get(t),n=v();o&&e.icon===o.icon?(Bt(n,e),Ct(n,e)):e.icon||e.iconHtml?e.icon&&-1===Object.keys(g).indexOf(e.icon)?(a('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.icon,'"')),K(n)):(W(n),Bt(n,e),Ct(n,e),Y(n,e.showClass.icon)):K(n)})(t,e),((t,e)=>{const o=C();if(!e.imageUrl)return K(o);W(o,""),o.setAttribute("src",e.imageUrl),o.setAttribute("alt",e.imageAlt),_(o,"width",e.imageWidth),_(o,"height",e.imageHeight),o.className=w.image,N(o,e,"image")})(0,e),((t,e)=>{const o=k();J(o,e.title||e.titleText,"block"),e.title&&it(e.title,o),e.titleText&&(o.innerText=e.titleText),N(o,e,"title")})(0,e),((t,e)=>{const o=z();I(o,e.closeButtonHtml),N(o,e,"closeButton"),J(o,e.showCloseButton),o.setAttribute("aria-label",e.closeButtonAriaLabel)})(0,e),xt(t,e),dt(0,e),((t,e)=>{const o=O();J(o,e.footer),e.footer&&it(e.footer,o),N(o,e,"footer")})(0,e),"function"==typeof e.didRender&&e.didRender(y())},Ot=()=>E()&&E().click(),jt=t=>{let e=y();e||fo.fire(),e=y();const o=S();q()?K(v()):zt(e,t),W(o),e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},zt=(t,e)=>{const o=L(),n=S();!e&&G(E())&&(e=E()),W(o),e&&(K(e),n.setAttribute("data-button-to-replace",e.className)),n.parentNode.insertBefore(n,e),Y([t,o],w.loading)},Mt={},Ht=t=>new Promise((e=>{if(!t)return e();const o=window.scrollX,n=window.scrollY;Mt.restoreFocusTimeout=setTimeout((()=>{Mt.previousActiveElement&&Mt.previousActiveElement.focus?(Mt.previousActiveElement.focus(),Mt.previousActiveElement=null):document.body&&document.body.focus(),e()}),100),window.scrollTo(o,n)})),qt=()=>{if(Mt.timeout)return(()=>{const t=j(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";const o=parseInt(window.getComputedStyle(t).width),n=parseInt(e/o*100);t.style.removeProperty("transition"),t.style.width="".concat(n,"%")})(),Mt.timeout.stop()},Dt=()=>{if(Mt.timeout){const t=Mt.timeout.start();return et(t),t}};let It=!1;const Vt={},Nt=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const t in Vt){const o=e.getAttribute(t);if(o)return void Vt[t].fire({template:o})}},Ut={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",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},Ft=["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","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],Rt={},Yt=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],$t=t=>Object.prototype.hasOwnProperty.call(Ut,t),Zt=t=>Rt[t],_t=t=>{$t(t)||s('Unknown parameter "'.concat(t,'"'))},Wt=t=>{Yt.includes(t)&&s('The parameter "'.concat(t,'" is incompatible with toasts'))},Kt=t=>{Zt(t)&&r(t,Zt(t))};var Xt=Object.freeze({isValidParameter:$t,isUpdatableParameter:t=>-1!==Ft.indexOf(t),isDeprecatedParameter:Zt,argsToParams:t=>{const e={};return"object"!=typeof t[0]||p(t[0])?["title","html","icon"].forEach(((o,n)=>{const s=t[n];"string"==typeof s||p(s)?e[o]=s:void 0!==s&&a("Unexpected type of ".concat(o,'! Expected "string" or "Element", got ').concat(typeof s))})):Object.assign(e,t[0]),e},isVisible:()=>G(y()),clickConfirm:Ot,clickDeny:()=>P()&&P().click(),clickCancel:()=>T()&&T().click(),getContainer:h,getPopup:y,getTitle:k,getHtmlContainer:x,getImage:C,getIcon:v,getInputLabel:()=>b(w["input-label"]),getCloseButton:z,getActions:L,getConfirmButton:E,getDenyButton:P,getCancelButton:T,getLoader:S,getFooter:O,getTimerProgressBar:j,getFocusableElements:M,getValidationMessage:B,isLoading:()=>y().hasAttribute("data-loading"),fire:function(...t){return new this(...t)},mixin:function(t){return class extends(this){_main(e,o){return super._main(e,Object.assign({},t,o))}}},showLoading:jt,enableLoading:jt,getTimerLeft:()=>Mt.timeout&&Mt.timeout.getTimerLeft(),stopTimer:qt,resumeTimer:Dt,toggleTimer:()=>{const t=Mt.timeout;return t&&(t.running?qt():Dt())},increaseTimer:t=>{if(Mt.timeout){const e=Mt.timeout.increase(t);return et(e,!0),e}},isTimerRunning:()=>Mt.timeout&&Mt.timeout.isRunning(),bindClickHandler:function(t="data-swal-template"){Vt[t]=this,It||(document.body.addEventListener("click",Nt),It=!0)}});function Jt(){const t=mt.innerParams.get(this);if(!t)return;const e=mt.domCache.get(this);K(e.loader),q()?t.icon&&W(v()):Gt(e),$([e.popup,e.actions],w.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}const Gt=t=>{const e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?W(e[0],"inline-block"):G(E())||G(P())||G(T())||K(t.actions)},Qt=()=>{null===D.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(D.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(D.previousBodyPadding+(()=>{const t=document.createElement("div");t.className=w["scrollbar-measure"],document.body.appendChild(t);const e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e})(),"px"))},te=()=>{if(!navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)){const t=44;y().scrollHeight>window.innerHeight-t&&(h().style.paddingBottom="".concat(t,"px"))}},ee=()=>{const t=h();let e;t.ontouchstart=t=>{e=oe(t)},t.ontouchmove=t=>{e&&(t.preventDefault(),t.stopPropagation())}},oe=t=>{const e=t.target,o=h();return!(ne(t)||se(t)||e!==o&&(Q(o)||"INPUT"===e.tagName||"TEXTAREA"===e.tagName||Q(x())&&x().contains(e)))},ne=t=>t.touches&&t.touches.length&&"stylus"===t.touches[0].touchType,se=t=>t.touches&&t.touches.length>1,ae=()=>{n(document.body.children).forEach((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")}))};var ie={swalPromiseResolve:new WeakMap};function re(t,e,o,n){q()?pe(t,n):(Ht(o).then((()=>pe(t,n))),Mt.keydownTarget.removeEventListener("keydown",Mt.keydownHandler,{capture:Mt.keydownListenerCapture}),Mt.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),H()&&(null!==D.previousBodyPadding&&(document.body.style.paddingRight="".concat(D.previousBodyPadding,"px"),D.previousBodyPadding=null),(()=>{if(V(document.body,w.iosfix)){const t=parseInt(document.body.style.top,10);$(document.body,w.iosfix),document.body.style.top="",document.body.scrollTop=-1*t}})(),ae()),$([document.documentElement,document.body],[w.shown,w["height-auto"],w["no-backdrop"],w["toast-shown"]])}function le(t){const e=y();if(!e)return;t=ce(t);const o=mt.innerParams.get(this);if(!o||V(e,o.hideClass.popup))return;const n=ie.swalPromiseResolve.get(this);$(e,o.showClass.popup),Y(e,o.hideClass.popup);const s=h();$(s,o.showClass.backdrop),Y(s,o.hideClass.backdrop),de(this,e,o),n(t)}const ce=t=>void 0===t?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),de=(t,e,o)=>{const n=h(),s=ct&&tt(e);"function"==typeof o.willClose&&o.willClose(e),s?ue(t,e,n,o.returnFocus,o.didClose):re(t,n,o.returnFocus,o.didClose)},ue=(t,e,o,n,s)=>{Mt.swalCloseEventFinishedCallback=re.bind(null,t,o,n,s),e.addEventListener(ct,(function(t){t.target===e&&(Mt.swalCloseEventFinishedCallback(),delete Mt.swalCloseEventFinishedCallback)}))},pe=(t,e)=>{setTimeout((()=>{"function"==typeof e&&e.bind(t.params)(),t._destroy()}))};function me(t,e,o){const n=mt.domCache.get(t);e.forEach((t=>{n[t].disabled=o}))}function we(t,e){if(!t)return!1;if("radio"===t.type){const o=t.parentNode.parentNode.querySelectorAll("input");for(let t=0;t/^[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:(t,e)=>/^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")};function fe(t){!function(t){t.inputValidator||Object.keys(he).forEach((e=>{t.input===e&&(t.inputValidator=he[e])}))}(t),t.showLoaderOnConfirm&&!t.preConfirm&&s("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"),function(t){(!t.target||"string"==typeof t.target&&!document.querySelector(t.target)||"string"!=typeof t.target&&!t.target.appendChild)&&(s('Target parameter is not valid, defaulting to "body"'),t.target="body")}(t),"string"==typeof t.title&&(t.title=t.title.split("\n").join(" ")),at(t)}const be=["swal-title","swal-html","swal-footer"],ye=t=>{const e={};return n(t.querySelectorAll("swal-param")).forEach((t=>{Ee(t,["name","value"]);const o=t.getAttribute("name");let n=t.getAttribute("value");"boolean"==typeof Ut[o]&&"false"===n&&(n=!1),"object"==typeof Ut[o]&&(n=JSON.parse(n)),e[o]=n})),e},ve=t=>{const e={};return n(t.querySelectorAll("swal-button")).forEach((t=>{Ee(t,["type","color","aria-label"]);const n=t.getAttribute("type");e["".concat(n,"ButtonText")]=t.innerHTML,e["show".concat(o(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},ke=t=>{const e={},o=t.querySelector("swal-image");return o&&(Ee(o,["src","width","height","alt"]),o.hasAttribute("src")&&(e.imageUrl=o.getAttribute("src")),o.hasAttribute("width")&&(e.imageWidth=o.getAttribute("width")),o.hasAttribute("height")&&(e.imageHeight=o.getAttribute("height")),o.hasAttribute("alt")&&(e.imageAlt=o.getAttribute("alt"))),e},xe=t=>{const e={},o=t.querySelector("swal-icon");return o&&(Ee(o,["type","color"]),o.hasAttribute("type")&&(e.icon=o.getAttribute("type")),o.hasAttribute("color")&&(e.iconColor=o.getAttribute("color")),e.iconHtml=o.innerHTML),e},Ce=t=>{const e={},o=t.querySelector("swal-input");o&&(Ee(o,["type","label","placeholder","value"]),e.input=o.getAttribute("type")||"text",o.hasAttribute("label")&&(e.inputLabel=o.getAttribute("label")),o.hasAttribute("placeholder")&&(e.inputPlaceholder=o.getAttribute("placeholder")),o.hasAttribute("value")&&(e.inputValue=o.getAttribute("value")));const s=t.querySelectorAll("swal-input-option");return s.length&&(e.inputOptions={},n(s).forEach((t=>{Ee(t,["value"]);const o=t.getAttribute("value"),n=t.innerHTML;e.inputOptions[o]=n}))),e},Ae=(t,e)=>{const o={};for(const n in e){const s=e[n],a=t.querySelector(s);a&&(Ee(a,[]),o[s.replace(/^swal-/,"")]=a.innerHTML.trim())}return o},Be=t=>{const e=be.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);n(t.children).forEach((t=>{const o=t.tagName.toLowerCase();-1===e.indexOf(o)&&s("Unrecognized element <".concat(o,">"))}))},Ee=(t,e)=>{n(t.attributes).forEach((o=>{-1===e.indexOf(o.name)&&s(['Unrecognized attribute "'.concat(o.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(e.length?"Allowed attributes are: ".concat(e.join(", ")):"To set the value, use HTML within the element.")])}))},Pe=t=>{const e=h(),o=y();"function"==typeof t.willOpen&&t.willOpen(o);const s=window.getComputedStyle(document.body).overflowY;Oe(e,o,t),setTimeout((()=>{Te(e,o)}),10),H()&&(Le(e,t.scrollbarPadding,s),n(document.body.children).forEach((t=>{t===h()||t.contains(h())||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true"))}))),q()||Mt.previousActiveElement||(Mt.previousActiveElement=document.activeElement),"function"==typeof t.didOpen&&setTimeout((()=>t.didOpen(o))),$(e,w["no-transition"])},Se=t=>{const e=y();if(t.target!==e)return;const o=h();e.removeEventListener(ct,Se),o.style.overflowY="auto"},Te=(t,e)=>{ct&&tt(e)?(t.style.overflowY="hidden",e.addEventListener(ct,Se)):t.style.overflowY="auto"},Le=(t,e,o)=>{(()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!V(document.body,w.iosfix)){const t=document.body.scrollTop;document.body.style.top="".concat(-1*t,"px"),Y(document.body,w.iosfix),ee(),te()}})(),e&&"hidden"!==o&&Qt(),setTimeout((()=>{t.scrollTop=0}))},Oe=(t,e,o)=>{Y(t,o.showClass.backdrop),e.style.setProperty("opacity","0","important"),W(e,"grid"),setTimeout((()=>{Y(e,o.showClass.popup),e.style.removeProperty("opacity")}),10),Y([document.documentElement,document.body],w.shown),o.heightAuto&&o.backdrop&&!o.toast&&Y([document.documentElement,document.body],w["height-auto"])},je=t=>t.checked?1:0,ze=t=>t.checked?t.value:null,Me=t=>t.files.length?null!==t.getAttribute("multiple")?t.files:t.files[0]:null,He=(t,e)=>{const o=y(),n=t=>De[e.input](o,Ie(t),e);c(e.inputOptions)||u(e.inputOptions)?(jt(E()),d(e.inputOptions).then((e=>{t.hideLoading(),n(e)}))):"object"==typeof e.inputOptions?n(e.inputOptions):a("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof e.inputOptions))},qe=(t,e)=>{const o=t.getInput();K(o),d(e.inputValue).then((n=>{o.value="number"===e.input?parseFloat(n)||0:"".concat(n),W(o),o.focus(),t.hideLoading()})).catch((e=>{a("Error in inputValue promise: ".concat(e)),o.value="",W(o),o.focus(),t.hideLoading()}))},De={select:(t,e,o)=>{const n=Z(t,w.select),s=(t,e,n)=>{const s=document.createElement("option");s.value=n,I(s,e),s.selected=Ve(n,o.inputValue),t.appendChild(s)};e.forEach((t=>{const e=t[0],o=t[1];if(Array.isArray(o)){const t=document.createElement("optgroup");t.label=e,t.disabled=!1,n.appendChild(t),o.forEach((e=>s(t,e[1],e[0])))}else s(n,o,e)})),n.focus()},radio:(t,e,o)=>{const n=Z(t,w.radio);e.forEach((t=>{const e=t[0],s=t[1],a=document.createElement("input"),i=document.createElement("label");a.type="radio",a.name=w.radio,a.value=e,Ve(e,o.inputValue)&&(a.checked=!0);const r=document.createElement("span");I(r,s),r.className=w.label,i.appendChild(a),i.appendChild(r),n.appendChild(i)}));const s=n.querySelectorAll("input");s.length&&s[0].focus()}},Ie=t=>{const e=[];return"undefined"!=typeof Map&&t instanceof Map?t.forEach(((t,o)=>{let n=t;"object"==typeof n&&(n=Ie(n)),e.push([o,n])})):Object.keys(t).forEach((o=>{let n=t[o];"object"==typeof n&&(n=Ie(n)),e.push([o,n])})),e},Ve=(t,e)=>e&&e.toString()===t.toString(),Ne=(t,e)=>{const o=mt.innerParams.get(t),n=((t,e)=>{const o=t.getInput();if(!o)return null;switch(e.input){case"checkbox":return je(o);case"radio":return ze(o);case"file":return Me(o);default:return e.inputAutoTrim?o.value.trim():o.value}})(t,o);o.inputValidator?Ue(t,n,e):t.getInput().checkValidity()?"deny"===e?Fe(t,n):Ye(t,n):(t.enableButtons(),t.showValidationMessage(o.validationMessage))},Ue=(t,e,o)=>{const n=mt.innerParams.get(t);t.disableInput(),Promise.resolve().then((()=>d(n.inputValidator(e,n.validationMessage)))).then((n=>{t.enableButtons(),t.enableInput(),n?t.showValidationMessage(n):"deny"===o?Fe(t,e):Ye(t,e)}))},Fe=(t,e)=>{const o=mt.innerParams.get(t||void 0);o.showLoaderOnDeny&&jt(P()),o.preDeny?Promise.resolve().then((()=>d(o.preDeny(e,o.validationMessage)))).then((o=>{!1===o?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===o?e:o})})):t.closePopup({isDenied:!0,value:e})},Re=(t,e)=>{t.closePopup({isConfirmed:!0,value:e})},Ye=(t,e)=>{const o=mt.innerParams.get(t||void 0);o.showLoaderOnConfirm&&jt(),o.preConfirm?(t.resetValidationMessage(),Promise.resolve().then((()=>d(o.preConfirm(e,o.validationMessage)))).then((o=>{G(B())||!1===o?t.hideLoading():Re(t,void 0===o?e:o)}))):Re(t,e)},$e=(t,e,o)=>{const n=M();if(n.length)return(e+=o)===n.length?e=0:-1===e&&(e=n.length-1),n[e].focus();y().focus()},Ze=["ArrowRight","ArrowDown"],_e=["ArrowLeft","ArrowUp"],We=(t,e,o)=>{const n=mt.innerParams.get(t);n&&(n.stopKeydownPropagation&&e.stopPropagation(),"Enter"===e.key?Ke(t,e,n):"Tab"===e.key?Xe(e,n):[...Ze,..._e].includes(e.key)?Je(e.key):"Escape"===e.key&&Ge(e,n,o))},Ke=(t,e,o)=>{if(!e.isComposing&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(["textarea","file"].includes(o.input))return;Ot(),e.preventDefault()}},Xe=(t,e)=>{const o=t.target,n=M();let s=-1;for(let t=0;t{if(![E(),P(),T()].includes(document.activeElement))return;const e=Ze.includes(t)?"nextElementSibling":"previousElementSibling",o=document.activeElement[e];o&&o.focus()},Ge=(e,o,n)=>{l(o.allowEscapeKey)&&(e.preventDefault(),n(t.esc))},Qe=(e,o,n)=>{o.popup.onclick=()=>{const o=mt.innerParams.get(e);o.showConfirmButton||o.showDenyButton||o.showCancelButton||o.showCloseButton||o.timer||o.input||n(t.close)}};let to=!1;const eo=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(to=!0)}}},oo=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,(e.target===t.popup||t.popup.contains(e.target))&&(to=!0)}}},no=(e,o,n)=>{o.container.onclick=s=>{const a=mt.innerParams.get(e);to?to=!1:s.target===o.container&&l(a.allowOutsideClick)&&n(t.backdrop)}},so=(t,e)=>{const o=(t=>{const e="string"==typeof t.template?document.querySelector(t.template):t.template;if(!e)return{};const o=e.content;return Be(o),Object.assign(ye(o),ve(o),ke(o),xe(o),Ce(o),Ae(o,be))})(t),n=Object.assign({},Ut,e,o,t);return n.showClass=Object.assign({},Ut.showClass,n.showClass),n.hideClass=Object.assign({},Ut.hideClass,n.hideClass),n},ao=(e,o,n)=>new Promise((s=>{const a=t=>{e.closePopup({isDismissed:!0,dismiss:t})};ie.swalPromiseResolve.set(e,s),o.confirmButton.onclick=()=>(t=>{const e=mt.innerParams.get(t);t.disableButtons(),e.input?Ne(t,"confirm"):Ye(t,!0)})(e),o.denyButton.onclick=()=>(t=>{const e=mt.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?Ne(t,"deny"):Fe(t,!1)})(e),o.cancelButton.onclick=()=>((e,o)=>{e.disableButtons(),o(t.cancel)})(e,a),o.closeButton.onclick=()=>a(t.close),((t,e,o)=>{mt.innerParams.get(t).toast?Qe(t,e,o):(eo(e),oo(e),no(t,e,o))})(e,o,a),((t,e,o,n)=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1),o.toast||(e.keydownHandler=e=>We(t,e,n),e.keydownTarget=o.keydownListenerCapture?window:y(),e.keydownListenerCapture=o.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)})(e,Mt,n,a),((t,e)=>{"select"===e.input||"radio"===e.input?He(t,e):["text","email","number","tel","textarea"].includes(e.input)&&(c(e.inputValue)||u(e.inputValue))&&(jt(E()),qe(t,e))})(e,n),Pe(n),ro(Mt,n,a),lo(o,n),setTimeout((()=>{o.container.scrollTop=0}))})),io=t=>{const e={popup:y(),container:h(),actions:L(),confirmButton:E(),denyButton:P(),cancelButton:T(),loader:S(),closeButton:z(),validationMessage:B(),progressSteps:A()};return mt.domCache.set(t,e),e},ro=(t,e,o)=>{const n=j();K(n),e.timer&&(t.timeout=new ge((()=>{o("timer"),delete t.timeout}),e.timer),e.timerProgressBar&&(W(n),setTimeout((()=>{t.timeout&&t.timeout.running&&et(e.timer)}))))},lo=(t,e)=>{if(!e.toast)return l(e.allowEnterKey)?void(co(t,e)||$e(0,-1,1)):uo()},co=(t,e)=>e.focusDeny&&G(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&G(t.cancelButton)?(t.cancelButton.focus(),!0):!(!e.focusConfirm||!G(t.confirmButton)||(t.confirmButton.focus(),0)),uo=()=>{document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()},po=t=>{delete t.params,delete Mt.keydownHandler,delete Mt.keydownTarget,mo(mt),mo(ie),delete Mt.currentInstance},mo=t=>{for(const e in t)t[e]=new WeakMap};var wo=Object.freeze({hideLoading:Jt,disableLoading:Jt,getInput:function(t){const e=mt.innerParams.get(t||this),o=mt.domCache.get(t||this);return o?U(o.popup,e.input):null},close:le,closePopup:le,closeModal:le,closeToast:le,enableButtons:function(){me(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){me(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return we(this.getInput(),!1)},disableInput:function(){return we(this.getInput(),!0)},showValidationMessage:function(t){const e=mt.domCache.get(this),o=mt.innerParams.get(this);I(e.validationMessage,t),e.validationMessage.className=w["validation-message"],o.customClass&&o.customClass.validationMessage&&Y(e.validationMessage,o.customClass.validationMessage),W(e.validationMessage);const n=this.getInput();n&&(n.setAttribute("aria-invalid",!0),n.setAttribute("aria-describedby",w["validation-message"]),F(n),Y(n,w.inputerror))},resetValidationMessage:function(){const t=mt.domCache.get(this);t.validationMessage&&K(t.validationMessage);const e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedby"),$(e,w.inputerror))},getProgressSteps:function(){return mt.domCache.get(this).progressSteps},_main:function(t,e={}){(t=>{!t.backdrop&&t.allowOutsideClick&&s('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const e in t)_t(e),t.toast&&Wt(e),Kt(e)})(Object.assign({},e,t)),Mt.currentInstance&&(Mt.currentInstance._destroy(),H()&&ae()),Mt.currentInstance=this;const o=so(t,e);fe(o),Object.freeze(o),Mt.timeout&&(Mt.timeout.stop(),delete Mt.timeout),clearTimeout(Mt.restoreFocusTimeout);const n=io(this);return Lt(this,o),mt.innerParams.set(this,o),ao(this,n,o)},update:function(t){const e=y(),o=mt.innerParams.get(this);if(!e||V(e,o.hideClass.popup))return s("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.");const n={};Object.keys(t).forEach((e=>{fo.isUpdatableParameter(e)?n[e]=t[e]:s('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'))}));const a=Object.assign({},o,n);Lt(this,a),mt.innerParams.set(this,a),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){const t=mt.domCache.get(this),e=mt.innerParams.get(this);e&&(t.popup&&Mt.swalCloseEventFinishedCallback&&(Mt.swalCloseEventFinishedCallback(),delete Mt.swalCloseEventFinishedCallback),Mt.deferDisposalTimer&&(clearTimeout(Mt.deferDisposalTimer),delete Mt.deferDisposalTimer),"function"==typeof e.didDestroy&&e.didDestroy(),po(this))}});let go;class ho{constructor(...t){if("undefined"==typeof window)return;go=this;const e=Object.freeze(this.constructor.argsToParams(t));Object.defineProperties(this,{params:{value:e,writable:!1,enumerable:!0,configurable:!0}});const o=this._main(this.params);mt.promise.set(this,o)}then(t){return mt.promise.get(this).then(t)}finally(t){return mt.promise.get(this).finally(t)}}Object.assign(ho.prototype,wo),Object.assign(ho,Xt),Object.keys(wo).forEach((t=>{ho[t]=function(...e){if(go)return go[t](...e)}})),ho.DismissReason=t,ho.version="11.1.2";const fo=ho;return fo.default=fo,fo},"object"==typeof i?i=a():"function"==typeof define&&define.amd?define(a):(s=s||self).Sweetalert2=a(),void 0!==i&&i.Sweetalert2&&(i.swal=i.sweetAlert=i.Swal=i.SweetAlert=i.Sweetalert2),"undefined"!=typeof document&&function(t,e){var o=t.createElement("style");if(t.getElementsByTagName("head")[0].appendChild(o),o.styleSheet)o.styleSheet.disabled||(o.styleSheet.cssText=e);else try{o.innerHTML=e}catch(t){o.innerText=e}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 .625em #d9d9d9;pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.3125em;padding:0}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-styled:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px rgba(100,150,200,.5)}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end" "gap gap gap";grid-template-rows:auto auto auto .625em;height:100%;padding:.625em .625em 0;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container::after{content:"";grid-column:1/4;grid-row:4;height:.625em}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7367f0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(115,103,240,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#ea5455;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(234,84,85,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7d88;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,125,136,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-input[type=number]{max-width:10em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}');const r=new class{async connect(){if(!navigator.bluetooth)return t(i).fire({title:"The bluetooth platform is not available on this device."}),!1;if(!navigator.bluetooth.getAvailability())return t(i).fire({title:"Bluetooth not available, disconnect from other devices first."}),!1;try{var e,o;this.device=await navigator.bluetooth.requestDevice({filters:[{name:"PetCat"}],optionalServices:[65520]}),this.device.ongattserverdisconnected=()=>{document.querySelector(`[is="${u.tag}"]`).connected=!1};const n=await(null===(e=this.device.gatt)||void 0===e||null===(o=e.connect)||void 0===o?void 0:o.call(e));return n?(this.server=n,!0):(t(i).fire({title:"Could not connect to bluetooth device."}),!1)}catch(t){return!1}}async setPresetCommand(t){const e=await this.server.getPrimaryService(65520),o=await e.getCharacteristic(65523),n=t.match(/.{1,2}/g);if(!n)throw new Error("Could not parse command value");const s=n.map((t=>parseInt(t,16)));o.writeValue(new Uint8Array(s))}},l=t=>{t.setAttribute("is",t.constructor.tag)};class c extends HTMLButtonElement{static get tag(){return"button-send-preset"}connectedCallback(){this.classList.add(...e);if(!this.getAttribute("bt-command"))throw"Attribute 'bt-command' was not set."}}customElements.define(c.tag,c,{extends:"button"});class d extends HTMLDivElement{static get tag(){return"section-interactions"}connectedCallback(){l(this),this.refreshButtons(!1)}refreshButtons(t){if(this.innerHTML="",!t)return;const e=document.createElement("div");e.innerHTML="
Preset Game
";[{command:"0f0405000107",title:"small"},{command:"0f0405000208",title:"medium"},{command:"0f0405000309",title:"large"}].map((t=>{const o=document.createElement("button",{is:c.tag});return o.setAttribute("bt-command",t.command),o.innerHTML=t.title,o.addEventListener("click",(()=>{r.setPresetCommand(t.command)})),e.append(o),o}));this.append(e)}}customElements.define(d.tag,d,{extends:"div"});class u extends HTMLButtonElement{static get tag(){return"button-bt-connect"}set connected(t){this.disabled=t;const e=t?n:o,s=t?o:n;this.classList.add(...e),this.classList.remove(...s);document.querySelector(`[is="${d.tag}"]`).refreshButtons(t)}connectedCallback(){this.innerHTML="connect",l(this),this.classList.add(...e,...o),this.addEventListener("click",(async()=>{this.disabled=!0;const t=await r.connect();this.connected=t}))}}customElements.define(u.tag,u,{extends:"button"});(()=>{const t=document.querySelector("main");if(!t)throw new Error("No main element found");t.appendChild(document.createElement("button",{is:u.tag})),t.appendChild(document.createElement("div",{is:d.tag}))})();