@luizleon/sf.prefeiturasp.vuecomponents 0.0.26 → 0.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib.umd.js CHANGED
@@ -1,16 +1,18 @@
1
- (function(G,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(G=typeof globalThis<"u"?globalThis:G||self,l(G.Lib={},G.Vue))})(this,function(G,l){"use strict";var xl=Object.defineProperty;var Sl=(G,l,De)=>l in G?xl(G,l,{enumerable:!0,configurable:!0,writable:!0,value:De}):G[l]=De;var dt=(G,l,De)=>(Sl(G,typeof l!="symbol"?l+"":l,De),De);class De{constructor(){dt(this,"_visible",l.ref(!1))}get IsVisible(){return this._visible.value===!0}Toggle(){this._visible.value=!this._visible.value}Close(){this._visible.value=!1}Open(){this._visible.value=!0}}const rr=new De,Wt=()=>rr;var qt=(t=>(t.Primary="primary",t.Secondary="secondary",t.Info="info",t.Success="success",t.Help="help",t.Warn="warn",t.Error="error",t))(qt||{}),Ge=(t=>(t.Pequeno="sm",t.Medio="md",t.Grande="lg",t))(Ge||{});const In=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},sr={},ir={class:"sf-loading-circle"},ar=[l.createElementVNode("div",null,[l.createElementVNode("svg",{viewBox:"25 25 50 50"},[l.createElementVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"4","stroke-miterlimit":"10"})])],-1)];function lr(t,e){return l.openBlock(),l.createElementBlock("div",ir,ar)}const cr=In(sr,[["render",lr]]);class Ye{constructor(e){dt(this,"retorno");this.retorno=e??""}Concat(e){return e&&e.trim().length&&(this.retorno+=` ${e}`),this}AddClass(e,n=!0){return n?this.Concat(e):this}Build(){return this.retorno.trim()}}const ur=["disabled","tabindex"],dr=["data-color"],ft=l.defineComponent({__name:"Icon",props:{icone:{},visible:{type:Boolean,default:!0},class:{default:""},style:{default:""},disabled:{type:Boolean},loading:{type:Boolean},button:{type:Boolean},tamanho:{default:Ge.Medio},dot:{type:Boolean},dotColor:{default:qt.Error},buttonProps:{}},setup(t){const e=t;function n(){return new Ye(`${e.class} sf-icon`).AddClass("sf-component-loading",e.loading).AddClass("sf-component-disabled",e.disabled).AddClass("sf-icon-button",e.button).AddClass("sf-icon-small",e.tamanho===Ge.Pequeno).AddClass("sf-icon-medium",e.tamanho===Ge.Medio).AddClass("sf-icon-large",e.tamanho===Ge.Grande).AddClass("sf-ripple",e.button===!0).Build()}return(o,i)=>(l.openBlock(),l.createElementBlock("div",{style:l.normalizeStyle(e.style),class:l.normalizeClass(n())},[l.createElementVNode("button",l.mergeProps({class:"material-symbols-outlined",disabled:e.disabled||e.loading},e.buttonProps,{tabindex:e.button?void 0:-1}),[e.loading?(l.openBlock(),l.createBlock(cr,{key:0})):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(l.toDisplayString(e.icone),1)],64))],16,ur),e.dot?(l.openBlock(),l.createElementBlock("span",{key:0,"data-color":e.dotColor},null,8,dr)):l.createCommentVNode("",!0)],6))}});var fr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function pr(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function o(){return this instanceof o?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(o){var i=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,i.get?i:{enumerable:!0,get:function(){return t[o]}})}),n}var Lt={};Lt.byteLength=br,Lt.toByteArray=wr,Lt.fromByteArray=_r;for(var Ie=[],Ce=[],mr=typeof Uint8Array<"u"?Uint8Array:Array,Kt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Je=0,gr=Kt.length;Je<gr;++Je)Ie[Je]=Kt[Je],Ce[Kt.charCodeAt(Je)]=Je;Ce["-".charCodeAt(0)]=62,Ce["_".charCodeAt(0)]=63;function Pn(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var o=n===e?0:4-n%4;return[n,o]}function br(t){var e=Pn(t),n=e[0],o=e[1];return(n+o)*3/4-o}function yr(t,e,n){return(e+n)*3/4-n}function wr(t){var e,n=Pn(t),o=n[0],i=n[1],c=new mr(yr(t,o,i)),E=0,I=i>0?o-4:o,d;for(d=0;d<I;d+=4)e=Ce[t.charCodeAt(d)]<<18|Ce[t.charCodeAt(d+1)]<<12|Ce[t.charCodeAt(d+2)]<<6|Ce[t.charCodeAt(d+3)],c[E++]=e>>16&255,c[E++]=e>>8&255,c[E++]=e&255;return i===2&&(e=Ce[t.charCodeAt(d)]<<2|Ce[t.charCodeAt(d+1)]>>4,c[E++]=e&255),i===1&&(e=Ce[t.charCodeAt(d)]<<10|Ce[t.charCodeAt(d+1)]<<4|Ce[t.charCodeAt(d+2)]>>2,c[E++]=e>>8&255,c[E++]=e&255),c}function vr(t){return Ie[t>>18&63]+Ie[t>>12&63]+Ie[t>>6&63]+Ie[t&63]}function kr(t,e,n){for(var o,i=[],c=e;c<n;c+=3)o=(t[c]<<16&16711680)+(t[c+1]<<8&65280)+(t[c+2]&255),i.push(vr(o));return i.join("")}function _r(t){for(var e,n=t.length,o=n%3,i=[],c=16383,E=0,I=n-o;E<I;E+=c)i.push(kr(t,E,E+c>I?I:E+c));return o===1?(e=t[n-1],i.push(Ie[e>>2]+Ie[e<<4&63]+"==")):o===2&&(e=(t[n-2]<<8)+t[n-1],i.push(Ie[e>>10]+Ie[e>>4&63]+Ie[e<<2&63]+"=")),i.join("")}var Bn={exports:{}};const Rn=pr(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));/**
1
+ (function(Y,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(Y=typeof globalThis<"u"?globalThis:Y||self,l(Y.Lib={},Y.Vue))})(this,function(Y,l){"use strict";var Jc=Object.defineProperty;var Xc=(Y,l,He)=>l in Y?Jc(Y,l,{enumerable:!0,configurable:!0,writable:!0,value:He}):Y[l]=He;var pt=(Y,l,He)=>(Xc(Y,typeof l!="symbol"?l+"":l,He),He);class He{constructor(){pt(this,"_visible",l.ref(!1))}get IsVisible(){return this._visible.value===!0}Toggle(){this._visible.value=!this._visible.value}Close(){this._visible.value=!1}Open(){this._visible.value=!0}}const fr=new He,Yt=()=>fr;var Gt=(t=>(t.Primary="primary",t.Secondary="secondary",t.Info="info",t.Success="success",t.Help="help",t.Warn="warn",t.Error="error",t))(Gt||{}),Je=(t=>(t.Pequeno="sm",t.Medio="md",t.Grande="lg",t))(Je||{});const Nn=(t,e)=>{const n=t.__vccOpts||t;for(const[o,s]of e)n[o]=s;return n},hr={},pr={class:"sf-loading-circle"},mr=[l.createElementVNode("div",null,[l.createElementVNode("svg",{viewBox:"25 25 50 50"},[l.createElementVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"4","stroke-miterlimit":"10"})])],-1)];function gr(t,e){return l.openBlock(),l.createElementBlock("div",pr,mr)}const br=Nn(hr,[["render",gr]]);class Xe{constructor(e){pt(this,"retorno");this.retorno=e??""}Concat(e){return e&&e.trim().length&&(this.retorno+=` ${e}`),this}AddClass(e,n=!0){return n?this.Concat(e):this}Build(){return this.retorno.trim()}}const yr=["disabled","tabindex"],wr=["data-color"],mt=l.defineComponent({__name:"Icon",props:{icone:{},visible:{type:Boolean,default:!0},class:{default:""},style:{default:""},disabled:{type:Boolean},loading:{type:Boolean},button:{type:Boolean},tamanho:{default:Je.Medio},dot:{type:Boolean},dotColor:{default:Gt.Error},buttonProps:{}},setup(t){const e=t;function n(){return new Xe(`${e.class} sf-icon`).AddClass("sf-component-loading",e.loading).AddClass("sf-component-disabled",e.disabled).AddClass("sf-icon-button",e.button).AddClass("sf-icon-small",e.tamanho===Je.Pequeno).AddClass("sf-icon-medium",e.tamanho===Je.Medio).AddClass("sf-icon-large",e.tamanho===Je.Grande).AddClass("sf-ripple",e.button===!0).Build()}return(o,s)=>(l.openBlock(),l.createElementBlock("div",{style:l.normalizeStyle(e.style),class:l.normalizeClass(n())},[l.createElementVNode("button",l.mergeProps({class:"material-symbols-outlined",disabled:e.disabled||e.loading},e.buttonProps,{tabindex:e.button?void 0:-1}),[e.loading?(l.openBlock(),l.createBlock(br,{key:0})):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(l.toDisplayString(e.icone),1)],64))],16,yr),e.dot?(l.openBlock(),l.createElementBlock("span",{key:0,"data-color":e.dotColor},null,8,wr)):l.createCommentVNode("",!0)],6))}});var vr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function _r(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function o(){return this instanceof o?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(o){var s=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,s.get?s:{enumerable:!0,get:function(){return t[o]}})}),n}var Bt={};Bt.byteLength=Cr,Bt.toByteArray=Tr,Bt.fromByteArray=Lr;for(var Pe=[],Ee=[],Er=typeof Uint8Array<"u"?Uint8Array:Array,Jt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ze=0,Ar=Jt.length;Ze<Ar;++Ze)Pe[Ze]=Jt[Ze],Ee[Jt.charCodeAt(Ze)]=Ze;Ee["-".charCodeAt(0)]=62,Ee["_".charCodeAt(0)]=63;function Dn(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var o=n===e?0:4-n%4;return[n,o]}function Cr(t){var e=Dn(t),n=e[0],o=e[1];return(n+o)*3/4-o}function xr(t,e,n){return(e+n)*3/4-n}function Tr(t){var e,n=Dn(t),o=n[0],s=n[1],a=new Er(xr(t,o,s)),y=0,T=s>0?o-4:o,d;for(d=0;d<T;d+=4)e=Ee[t.charCodeAt(d)]<<18|Ee[t.charCodeAt(d+1)]<<12|Ee[t.charCodeAt(d+2)]<<6|Ee[t.charCodeAt(d+3)],a[y++]=e>>16&255,a[y++]=e>>8&255,a[y++]=e&255;return s===2&&(e=Ee[t.charCodeAt(d)]<<2|Ee[t.charCodeAt(d+1)]>>4,a[y++]=e&255),s===1&&(e=Ee[t.charCodeAt(d)]<<10|Ee[t.charCodeAt(d+1)]<<4|Ee[t.charCodeAt(d+2)]>>2,a[y++]=e>>8&255,a[y++]=e&255),a}function Sr(t){return Pe[t>>18&63]+Pe[t>>12&63]+Pe[t>>6&63]+Pe[t&63]}function Ir(t,e,n){for(var o,s=[],a=e;a<n;a+=3)o=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(t[a+2]&255),s.push(Sr(o));return s.join("")}function Lr(t){for(var e,n=t.length,o=n%3,s=[],a=16383,y=0,T=n-o;y<T;y+=a)s.push(Ir(t,y,y+a>T?T:y+a));return o===1?(e=t[n-1],s.push(Pe[e>>2]+Pe[e<<4&63]+"==")):o===2&&(e=(t[n-2]<<8)+t[n-1],s.push(Pe[e>>10]+Pe[e>>4&63]+Pe[e<<2&63]+"=")),s.join("")}var Mn={exports:{}};const Qe=_r(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));/**
2
2
  * [js-sha256]{@link https://github.com/emn178/js-sha256}
3
3
  *
4
4
  * @version 0.10.1
5
5
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
6
6
  * @copyright Chen, Yi-Cyuan 2014-2023
7
7
  * @license MIT
8
- */(function(t){(function(){var e="input is invalid type",n=typeof window=="object",o=n?window:{};o.JS_SHA256_NO_WINDOW&&(n=!1);var i=!n&&typeof self=="object",c=!o.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;c?o=fr:i&&(o=self);var E=!o.JS_SHA256_NO_COMMON_JS&&!0&&t.exports,I=!o.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",d="0123456789abcdef".split(""),V=[-2147483648,8388608,32768,128],W=[24,16,8,0],ee=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Le=["hex","array","digest","arrayBuffer"],z=[];(o.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(h){return Object.prototype.toString.call(h)==="[object Array]"}),I&&(o.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(h){return typeof h=="object"&&h.buffer&&h.buffer.constructor===ArrayBuffer});var Oe=function(h,_){return function(P){return new D(_,!0).update(P)[h]()}},st=function(h){var _=Oe("hex",h);c&&(_=ke(_,h)),_.create=function(){return new D(h)},_.update=function(k){return _.create().update(k)};for(var P=0;P<Le.length;++P){var C=Le[P];_[C]=Oe(C,h)}return _},ke=function(h,_){var P=Rn,C=Rn.Buffer,k=_?"sha224":"sha256",v;C.from&&!o.JS_SHA256_NO_BUFFER_FROM?v=C.from:v=function(m){return new C(m)};var O=function(m){if(typeof m=="string")return P.createHash(k).update(m,"utf8").digest("hex");if(m==null)throw new Error(e);return m.constructor===ArrayBuffer&&(m=new Uint8Array(m)),Array.isArray(m)||ArrayBuffer.isView(m)||m.constructor===C?P.createHash(k).update(v(m)).digest("hex"):h(m)};return O},it=function(h,_){return function(P,C){return new _e(P,_,!0).update(C)[h]()}},he=function(h){var _=it("hex",h);_.create=function(k){return new _e(k,h)},_.update=function(k,v){return _.create(k).update(v)};for(var P=0;P<Le.length;++P){var C=Le[P];_[C]=it(C,h)}return _};function D(h,_){_?(z[0]=z[16]=z[1]=z[2]=z[3]=z[4]=z[5]=z[6]=z[7]=z[8]=z[9]=z[10]=z[11]=z[12]=z[13]=z[14]=z[15]=0,this.blocks=z):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=h}D.prototype.update=function(h){if(!this.finalized){var _,P=typeof h;if(P!=="string"){if(P==="object"){if(h===null)throw new Error(e);if(I&&h.constructor===ArrayBuffer)h=new Uint8Array(h);else if(!Array.isArray(h)&&(!I||!ArrayBuffer.isView(h)))throw new Error(e)}else throw new Error(e);_=!0}for(var C,k=0,v,O=h.length,m=this.blocks;k<O;){if(this.hashed&&(this.hashed=!1,m[0]=this.block,m[16]=m[1]=m[2]=m[3]=m[4]=m[5]=m[6]=m[7]=m[8]=m[9]=m[10]=m[11]=m[12]=m[13]=m[14]=m[15]=0),_)for(v=this.start;k<O&&v<64;++k)m[v>>2]|=h[k]<<W[v++&3];else for(v=this.start;k<O&&v<64;++k)C=h.charCodeAt(k),C<128?m[v>>2]|=C<<W[v++&3]:C<2048?(m[v>>2]|=(192|C>>6)<<W[v++&3],m[v>>2]|=(128|C&63)<<W[v++&3]):C<55296||C>=57344?(m[v>>2]|=(224|C>>12)<<W[v++&3],m[v>>2]|=(128|C>>6&63)<<W[v++&3],m[v>>2]|=(128|C&63)<<W[v++&3]):(C=65536+((C&1023)<<10|h.charCodeAt(++k)&1023),m[v>>2]|=(240|C>>18)<<W[v++&3],m[v>>2]|=(128|C>>12&63)<<W[v++&3],m[v>>2]|=(128|C>>6&63)<<W[v++&3],m[v>>2]|=(128|C&63)<<W[v++&3]);this.lastByteIndex=v,this.bytes+=v-this.start,v>=64?(this.block=m[16],this.start=v-64,this.hash(),this.hashed=!0):this.start=v}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},D.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var h=this.blocks,_=this.lastByteIndex;h[16]=this.block,h[_>>2]|=V[_&3],this.block=h[16],_>=56&&(this.hashed||this.hash(),h[0]=this.block,h[16]=h[1]=h[2]=h[3]=h[4]=h[5]=h[6]=h[7]=h[8]=h[9]=h[10]=h[11]=h[12]=h[13]=h[14]=h[15]=0),h[14]=this.hBytes<<3|this.bytes>>>29,h[15]=this.bytes<<3,this.hash()}},D.prototype.hash=function(){var h=this.h0,_=this.h1,P=this.h2,C=this.h3,k=this.h4,v=this.h5,O=this.h6,m=this.h7,F=this.blocks,q,J,Y,ce,B,pe,r,a,f,b,p;for(q=16;q<64;++q)B=F[q-15],J=(B>>>7|B<<25)^(B>>>18|B<<14)^B>>>3,B=F[q-2],Y=(B>>>17|B<<15)^(B>>>19|B<<13)^B>>>10,F[q]=F[q-16]+J+F[q-7]+Y<<0;for(p=_&P,q=0;q<64;q+=4)this.first?(this.is224?(a=300032,B=F[0]-1413257819,m=B-150054599<<0,C=B+24177077<<0):(a=704751109,B=F[0]-210244248,m=B-1521486534<<0,C=B+143694565<<0),this.first=!1):(J=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),Y=(k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7),a=h&_,ce=a^h&P^p,r=k&v^~k&O,B=m+Y+r+ee[q]+F[q],pe=J+ce,m=C+B<<0,C=B+pe<<0),J=(C>>>2|C<<30)^(C>>>13|C<<19)^(C>>>22|C<<10),Y=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7),f=C&h,ce=f^C&_^a,r=m&k^~m&v,B=O+Y+r+ee[q+1]+F[q+1],pe=J+ce,O=P+B<<0,P=B+pe<<0,J=(P>>>2|P<<30)^(P>>>13|P<<19)^(P>>>22|P<<10),Y=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),b=P&C,ce=b^P&h^f,r=O&m^~O&k,B=v+Y+r+ee[q+2]+F[q+2],pe=J+ce,v=_+B<<0,_=B+pe<<0,J=(_>>>2|_<<30)^(_>>>13|_<<19)^(_>>>22|_<<10),Y=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),p=_&P,ce=p^_&C^b,r=v&O^~v&m,B=k+Y+r+ee[q+3]+F[q+3],pe=J+ce,k=h+B<<0,h=B+pe<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+h<<0,this.h1=this.h1+_<<0,this.h2=this.h2+P<<0,this.h3=this.h3+C<<0,this.h4=this.h4+k<<0,this.h5=this.h5+v<<0,this.h6=this.h6+O<<0,this.h7=this.h7+m<<0},D.prototype.hex=function(){this.finalize();var h=this.h0,_=this.h1,P=this.h2,C=this.h3,k=this.h4,v=this.h5,O=this.h6,m=this.h7,F=d[h>>28&15]+d[h>>24&15]+d[h>>20&15]+d[h>>16&15]+d[h>>12&15]+d[h>>8&15]+d[h>>4&15]+d[h&15]+d[_>>28&15]+d[_>>24&15]+d[_>>20&15]+d[_>>16&15]+d[_>>12&15]+d[_>>8&15]+d[_>>4&15]+d[_&15]+d[P>>28&15]+d[P>>24&15]+d[P>>20&15]+d[P>>16&15]+d[P>>12&15]+d[P>>8&15]+d[P>>4&15]+d[P&15]+d[C>>28&15]+d[C>>24&15]+d[C>>20&15]+d[C>>16&15]+d[C>>12&15]+d[C>>8&15]+d[C>>4&15]+d[C&15]+d[k>>28&15]+d[k>>24&15]+d[k>>20&15]+d[k>>16&15]+d[k>>12&15]+d[k>>8&15]+d[k>>4&15]+d[k&15]+d[v>>28&15]+d[v>>24&15]+d[v>>20&15]+d[v>>16&15]+d[v>>12&15]+d[v>>8&15]+d[v>>4&15]+d[v&15]+d[O>>28&15]+d[O>>24&15]+d[O>>20&15]+d[O>>16&15]+d[O>>12&15]+d[O>>8&15]+d[O>>4&15]+d[O&15];return this.is224||(F+=d[m>>28&15]+d[m>>24&15]+d[m>>20&15]+d[m>>16&15]+d[m>>12&15]+d[m>>8&15]+d[m>>4&15]+d[m&15]),F},D.prototype.toString=D.prototype.hex,D.prototype.digest=function(){this.finalize();var h=this.h0,_=this.h1,P=this.h2,C=this.h3,k=this.h4,v=this.h5,O=this.h6,m=this.h7,F=[h>>24&255,h>>16&255,h>>8&255,h&255,_>>24&255,_>>16&255,_>>8&255,_&255,P>>24&255,P>>16&255,P>>8&255,P&255,C>>24&255,C>>16&255,C>>8&255,C&255,k>>24&255,k>>16&255,k>>8&255,k&255,v>>24&255,v>>16&255,v>>8&255,v&255,O>>24&255,O>>16&255,O>>8&255,O&255];return this.is224||F.push(m>>24&255,m>>16&255,m>>8&255,m&255),F},D.prototype.array=D.prototype.digest,D.prototype.arrayBuffer=function(){this.finalize();var h=new ArrayBuffer(this.is224?28:32),_=new DataView(h);return _.setUint32(0,this.h0),_.setUint32(4,this.h1),_.setUint32(8,this.h2),_.setUint32(12,this.h3),_.setUint32(16,this.h4),_.setUint32(20,this.h5),_.setUint32(24,this.h6),this.is224||_.setUint32(28,this.h7),h};function _e(h,_,P){var C,k=typeof h;if(k==="string"){var v=[],O=h.length,m=0,F;for(C=0;C<O;++C)F=h.charCodeAt(C),F<128?v[m++]=F:F<2048?(v[m++]=192|F>>6,v[m++]=128|F&63):F<55296||F>=57344?(v[m++]=224|F>>12,v[m++]=128|F>>6&63,v[m++]=128|F&63):(F=65536+((F&1023)<<10|h.charCodeAt(++C)&1023),v[m++]=240|F>>18,v[m++]=128|F>>12&63,v[m++]=128|F>>6&63,v[m++]=128|F&63);h=v}else if(k==="object"){if(h===null)throw new Error(e);if(I&&h.constructor===ArrayBuffer)h=new Uint8Array(h);else if(!Array.isArray(h)&&(!I||!ArrayBuffer.isView(h)))throw new Error(e)}else throw new Error(e);h.length>64&&(h=new D(_,!0).update(h).array());var q=[],J=[];for(C=0;C<64;++C){var Y=h[C]||0;q[C]=92^Y,J[C]=54^Y}D.call(this,_,P),this.update(J),this.oKeyPad=q,this.inner=!0,this.sharedMemory=P}_e.prototype=new D,_e.prototype.finalize=function(){if(D.prototype.finalize.call(this),this.inner){this.inner=!1;var h=this.array();D.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(h),D.prototype.finalize.call(this)}};var X=st();X.sha256=X,X.sha224=st(!0),X.sha256.hmac=he(),X.sha224.hmac=he(!0),E?t.exports=X:(o.sha256=X.sha256,o.sha224=X.sha224)})()})(Bn);var Cr=Bn.exports;const Ar=hr(Cr);class ht extends Error{}ht.prototype.name="InvalidTokenError";function Er(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,n)=>{let o=n.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}function xr(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Er(e)}catch{return atob(e)}}function Gt(t,e){if(typeof t!="string")throw new ht("Invalid token specified: must be a string");e||(e={});const n=e.header===!0?0:1,o=t.split(".")[n];if(typeof o!="string")throw new ht(`Invalid token specified: missing part #${n+1}`);let i;try{i=xr(o)}catch(c){throw new ht(`Invalid token specified: invalid base64 for part #${n+1} (${c.message})`)}try{return JSON.parse(i)}catch(c){throw new ht(`Invalid token specified: invalid json for part #${n+1} (${c.message})`)}}if(typeof Promise>"u")throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function On(t){if(!(this instanceof On))throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var e=this,n,o=[],i,c={enable:!0,callbackList:[],interval:5},E=document.getElementsByTagName("script"),I=0;I<E.length;I++)(E[I].src.indexOf("keycloak.js")!==-1||E[I].src.indexOf("keycloak.min.js")!==-1)&&E[I].src.indexOf("version=")!==-1&&(e.iframeVersion=E[I].src.substring(E[I].src.indexOf("version=")+8).split("&")[0]);var d=!0,V=pe(console.info),W=pe(console.warn);e.init=function(r){if(e.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");e.didInitialize=!0,e.authenticated=!1,i=B();var a=["default","cordova","cordova-native"];if(r&&a.indexOf(r.adapter)>-1?n=J(r.adapter):r&&typeof r.adapter=="object"?n=r.adapter:window.Cordova||window.cordova?n=J("cordova"):n=J(),r){if(typeof r.useNonce<"u"&&(d=r.useNonce),typeof r.checkLoginIframe<"u"&&(c.enable=r.checkLoginIframe),r.checkLoginIframeInterval&&(c.interval=r.checkLoginIframeInterval),r.onLoad==="login-required"&&(e.loginRequired=!0),r.responseMode)if(r.responseMode==="query"||r.responseMode==="fragment")e.responseMode=r.responseMode;else throw"Invalid value for responseMode";if(r.flow){switch(r.flow){case"standard":e.responseType="code";break;case"implicit":e.responseType="id_token token";break;case"hybrid":e.responseType="code id_token token";break;default:throw"Invalid value for flow"}e.flow=r.flow}if(r.timeSkew!=null&&(e.timeSkew=r.timeSkew),r.redirectUri&&(e.redirectUri=r.redirectUri),r.silentCheckSsoRedirectUri&&(e.silentCheckSsoRedirectUri=r.silentCheckSsoRedirectUri),typeof r.silentCheckSsoFallback=="boolean"?e.silentCheckSsoFallback=r.silentCheckSsoFallback:e.silentCheckSsoFallback=!0,r.pkceMethod){if(r.pkceMethod!=="S256")throw"Invalid value for pkceMethod";e.pkceMethod=r.pkceMethod}typeof r.enableLogging=="boolean"?e.enableLogging=r.enableLogging:e.enableLogging=!1,typeof r.scope=="string"&&(e.scope=r.scope),typeof r.acrValues=="string"&&(e.acrValues=r.acrValues),typeof r.messageReceiveTimeout=="number"&&r.messageReceiveTimeout>0?e.messageReceiveTimeout=r.messageReceiveTimeout:e.messageReceiveTimeout=1e4}e.responseMode||(e.responseMode="fragment"),e.responseType||(e.responseType="code",e.flow="standard");var f=k(),b=k();b.promise.then(function(){e.onReady&&e.onReady(e.authenticated),f.setSuccess(e.authenticated)}).catch(function(S){f.setError(S)});var p=D();function A(){var S=function($){$||(R.prompt="none"),r&&r.locale&&(R.locale=r.locale),e.login(R).then(function(){b.setSuccess()}).catch(function(me){b.setError(me)})},x=function(){var $=document.createElement("iframe"),me=e.createLoginUrl({prompt:"none",redirectUri:e.silentCheckSsoRedirectUri});$.setAttribute("src",me),$.setAttribute("sandbox","allow-scripts allow-same-origin"),$.setAttribute("title","keycloak-silent-check-sso"),$.style.display="none",document.body.appendChild($);var ue=function(te){if(!(te.origin!==window.location.origin||$.contentWindow!==te.source)){var Be=_(te.data);he(Be,b),document.body.removeChild($),window.removeEventListener("message",ue)}};window.addEventListener("message",ue)},R={};switch(r.onLoad){case"check-sso":c.enable?O().then(function(){F().then(function($){$?b.setSuccess():e.silentCheckSsoRedirectUri?x():S(!1)}).catch(function($){b.setError($)})}):e.silentCheckSsoRedirectUri?x():S(!1);break;case"login-required":S(!0);break;default:throw"Invalid value for onLoad"}}function g(){var S=_(window.location.href);if(S&&window.history.replaceState(window.history.state,null,S.newUrl),S&&S.valid)return O().then(function(){he(S,b)}).catch(function(x){b.setError(x)});r?r.token&&r.refreshToken?(X(r.token,r.refreshToken,r.idToken),c.enable?O().then(function(){F().then(function(x){x?(e.onAuthSuccess&&e.onAuthSuccess(),b.setSuccess(),m()):b.setSuccess()}).catch(function(x){b.setError(x)})}):e.updateToken(-1).then(function(){e.onAuthSuccess&&e.onAuthSuccess(),b.setSuccess()}).catch(function(x){e.onAuthError&&e.onAuthError(),r.onLoad?A():b.setError(x)})):r.onLoad?A():b.setSuccess():b.setSuccess()}function y(){var S=k(),x=function(){(document.readyState==="interactive"||document.readyState==="complete")&&(document.removeEventListener("readystatechange",x),S.setSuccess())};return document.addEventListener("readystatechange",x),x(),S.promise}return p.then(function(){y().then(q).then(g).catch(function(S){f.setError(S)})}),p.catch(function(S){f.setError(S)}),f.promise},e.login=function(r){return n.login(r)};function ee(r){var a=null,f=window.crypto||window.msCrypto;if(f&&f.getRandomValues&&window.Uint8Array)return a=new Uint8Array(r),f.getRandomValues(a),a;a=new Array(r);for(var b=0;b<a.length;b++)a[b]=Math.floor(256*Math.random());return a}function Le(r){return z(r,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}function z(r,a){for(var f=ee(r),b=new Array(r),p=0;p<r;p++)b[p]=a.charCodeAt(f[p]%a.length);return String.fromCharCode.apply(null,b)}function Oe(r,a){switch(r){case"S256":var f=new Uint8Array(Ar.arrayBuffer(a)),b=Lt.fromByteArray(f).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"");return b;default:throw"Invalid value for pkceMethod"}}function st(r){var a={id_token:{acr:r}};return JSON.stringify(a)}e.createLoginUrl=function(r){var a=h(),f=h(),b=n.redirectUri(r),p={state:a,nonce:f,redirectUri:encodeURIComponent(b)};r&&r.prompt&&(p.prompt=r.prompt);var A;r&&r.action=="register"?A=e.endpoints.register():A=e.endpoints.authorize();var g=r&&r.scope||e.scope;g?g.indexOf("openid")===-1&&(g="openid "+g):g="openid";var y=A+"?client_id="+encodeURIComponent(e.clientId)+"&redirect_uri="+encodeURIComponent(b)+"&state="+encodeURIComponent(a)+"&response_mode="+encodeURIComponent(e.responseMode)+"&response_type="+encodeURIComponent(e.responseType)+"&scope="+encodeURIComponent(g);if(d&&(y=y+"&nonce="+encodeURIComponent(f)),r&&r.prompt&&(y+="&prompt="+encodeURIComponent(r.prompt)),r&&r.maxAge&&(y+="&max_age="+encodeURIComponent(r.maxAge)),r&&r.loginHint&&(y+="&login_hint="+encodeURIComponent(r.loginHint)),r&&r.idpHint&&(y+="&kc_idp_hint="+encodeURIComponent(r.idpHint)),r&&r.action&&r.action!="register"&&(y+="&kc_action="+encodeURIComponent(r.action)),r&&r.locale&&(y+="&ui_locales="+encodeURIComponent(r.locale)),r&&r.acr){var S=st(r.acr);y+="&claims="+encodeURIComponent(S)}if((r&&r.acrValues||e.acrValues)&&(y+="&acr_values="+encodeURIComponent(r.acrValues||e.acrValues)),e.pkceMethod){var x=Le(96);p.pkceCodeVerifier=x;var R=Oe(e.pkceMethod,x);y+="&code_challenge="+R,y+="&code_challenge_method="+e.pkceMethod}return i.add(p),y},e.logout=function(r){return n.logout(r)},e.createLogoutUrl=function(r){var a=e.endpoints.logout()+"?client_id="+encodeURIComponent(e.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(n.redirectUri(r,!1));return e.idToken&&(a+="&id_token_hint="+encodeURIComponent(e.idToken)),a},e.register=function(r){return n.register(r)},e.createRegisterUrl=function(r){return r||(r={}),r.action="register",e.createLoginUrl(r)},e.createAccountUrl=function(r){var a=ke(),f=void 0;return typeof a<"u"&&(f=a+"/account?referrer="+encodeURIComponent(e.clientId)+"&referrer_uri="+encodeURIComponent(n.redirectUri(r))),f},e.accountManagement=function(){return n.accountManagement()},e.hasRealmRole=function(r){var a=e.realmAccess;return!!a&&a.roles.indexOf(r)>=0},e.hasResourceRole=function(r,a){if(!e.resourceAccess)return!1;var f=e.resourceAccess[a||e.clientId];return!!f&&f.roles.indexOf(r)>=0},e.loadUserProfile=function(){var r=ke()+"/account",a=new XMLHttpRequest;a.open("GET",r,!0),a.setRequestHeader("Accept","application/json"),a.setRequestHeader("Authorization","bearer "+e.token);var f=k();return a.onreadystatechange=function(){a.readyState==4&&(a.status==200?(e.profile=JSON.parse(a.responseText),f.setSuccess(e.profile)):f.setError())},a.send(),f.promise},e.loadUserInfo=function(){var r=e.endpoints.userinfo(),a=new XMLHttpRequest;a.open("GET",r,!0),a.setRequestHeader("Accept","application/json"),a.setRequestHeader("Authorization","bearer "+e.token);var f=k();return a.onreadystatechange=function(){a.readyState==4&&(a.status==200?(e.userInfo=JSON.parse(a.responseText),f.setSuccess(e.userInfo)):f.setError())},a.send(),f.promise},e.isTokenExpired=function(r){if(!e.tokenParsed||!e.refreshToken&&e.flow!="implicit")throw"Not authenticated";if(e.timeSkew==null)return V("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var a=e.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+e.timeSkew;if(r){if(isNaN(r))throw"Invalid minValidity";a-=r}return a<0},e.updateToken=function(r){var a=k();if(!e.refreshToken)return a.setError(),a.promise;r=r||5;var f=function(){var p=!1;if(r==-1?(p=!0,V("[KEYCLOAK] Refreshing token: forced refresh")):(!e.tokenParsed||e.isTokenExpired(r))&&(p=!0,V("[KEYCLOAK] Refreshing token: token expired")),!p)a.setSuccess(!1);else{var A="grant_type=refresh_token&refresh_token="+e.refreshToken,g=e.endpoints.token();if(o.push(a),o.length==1){var y=new XMLHttpRequest;y.open("POST",g,!0),y.setRequestHeader("Content-type","application/x-www-form-urlencoded"),y.withCredentials=!0,A+="&client_id="+encodeURIComponent(e.clientId);var S=new Date().getTime();y.onreadystatechange=function(){if(y.readyState==4)if(y.status==200){V("[KEYCLOAK] Token refreshed"),S=(S+new Date().getTime())/2;var x=JSON.parse(y.responseText);X(x.access_token,x.refresh_token,x.id_token,S),e.onAuthRefreshSuccess&&e.onAuthRefreshSuccess();for(var R=o.pop();R!=null;R=o.pop())R.setSuccess(!0)}else{W("[KEYCLOAK] Failed to refresh token"),y.status==400&&e.clearToken(),e.onAuthRefreshError&&e.onAuthRefreshError();for(var R=o.pop();R!=null;R=o.pop())R.setError(!0)}},y.send(A)}}};if(c.enable){var b=F();b.then(function(){f()}).catch(function(p){a.setError(p)})}else f();return a.promise},e.clearToken=function(){e.token&&(X(null,null,null),e.onAuthLogout&&e.onAuthLogout(),e.loginRequired&&e.login())},e.setToken=X;function ke(){if(typeof e.authServerUrl<"u")return e.authServerUrl.charAt(e.authServerUrl.length-1)=="/"?e.authServerUrl+"realms/"+encodeURIComponent(e.realm):e.authServerUrl+"/realms/"+encodeURIComponent(e.realm)}function it(){return window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}function he(r,a){var f=r.code,b=r.error,p=r.prompt,A=new Date().getTime();if(r.kc_action_status&&e.onActionUpdate&&e.onActionUpdate(r.kc_action_status),b){if(p!="none"){var g={error:b,error_description:r.error_description};e.onAuthError&&e.onAuthError(g),a&&a.setError(g)}else a&&a.setSuccess();return}else e.flow!="standard"&&(r.access_token||r.id_token)&&R(r.access_token,null,r.id_token,!0);if(e.flow!="implicit"&&f){var y="code="+f+"&grant_type=authorization_code",S=e.endpoints.token(),x=new XMLHttpRequest;x.open("POST",S,!0),x.setRequestHeader("Content-type","application/x-www-form-urlencoded"),y+="&client_id="+encodeURIComponent(e.clientId),y+="&redirect_uri="+r.redirectUri,r.pkceCodeVerifier&&(y+="&code_verifier="+r.pkceCodeVerifier),x.withCredentials=!0,x.onreadystatechange=function(){if(x.readyState==4)if(x.status==200){var $=JSON.parse(x.responseText);R($.access_token,$.refresh_token,$.id_token,e.flow==="standard"),m()}else e.onAuthError&&e.onAuthError(),a&&a.setError()},x.send(y)}function R($,me,ue,te){A=(A+new Date().getTime())/2,X($,me,ue,A),d&&(e.tokenParsed&&e.tokenParsed.nonce!=r.storedNonce||e.refreshTokenParsed&&e.refreshTokenParsed.nonce!=r.storedNonce||e.idTokenParsed&&e.idTokenParsed.nonce!=r.storedNonce)?(V("[KEYCLOAK] Invalid nonce, clearing token"),e.clearToken(),a&&a.setError()):te&&(e.onAuthSuccess&&e.onAuthSuccess(),a&&a.setSuccess())}}function D(r){var a=k(),f;t?typeof t=="string"&&(f=t):f=location.origin+"/keycloak.json";function b(x){x?e.endpoints={authorize:function(){return x.authorization_endpoint},token:function(){return x.token_endpoint},logout:function(){if(!x.end_session_endpoint)throw"Not supported by the OIDC server";return x.end_session_endpoint},checkSessionIframe:function(){if(!x.check_session_iframe)throw"Not supported by the OIDC server";return x.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!x.userinfo_endpoint)throw"Not supported by the OIDC server";return x.userinfo_endpoint}}:e.endpoints={authorize:function(){return ke()+"/protocol/openid-connect/auth"},token:function(){return ke()+"/protocol/openid-connect/token"},logout:function(){return ke()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var R=ke()+"/protocol/openid-connect/login-status-iframe.html";return e.iframeVersion&&(R=R+"?version="+e.iframeVersion),R},thirdPartyCookiesIframe:function(){var R=ke()+"/protocol/openid-connect/3p-cookies/step1.html";return e.iframeVersion&&(R=R+"?version="+e.iframeVersion),R},register:function(){return ke()+"/protocol/openid-connect/registrations"},userinfo:function(){return ke()+"/protocol/openid-connect/userinfo"}}}if(f){var p=new XMLHttpRequest;p.open("GET",f,!0),p.setRequestHeader("Accept","application/json"),p.onreadystatechange=function(){if(p.readyState==4)if(p.status==200||_e(p)){var x=JSON.parse(p.responseText);e.authServerUrl=x["auth-server-url"],e.realm=x.realm,e.clientId=x.resource,b(null),a.setSuccess()}else a.setError()},p.send()}else{if(!t.clientId)throw"clientId missing";e.clientId=t.clientId;var A=t.oidcProvider;if(A)if(typeof A=="string"){var S;A.charAt(A.length-1)=="/"?S=A+".well-known/openid-configuration":S=A+"/.well-known/openid-configuration";var p=new XMLHttpRequest;p.open("GET",S,!0),p.setRequestHeader("Accept","application/json"),p.onreadystatechange=function(){if(p.readyState==4)if(p.status==200||_e(p)){var R=JSON.parse(p.responseText);b(R),a.setSuccess()}else a.setError()},p.send()}else b(A),a.setSuccess();else{if(!t.url){for(var g=document.getElementsByTagName("script"),y=0;y<g.length;y++)if(g[y].src.match(/.*keycloak\.js/)){t.url=g[y].src.substr(0,g[y].src.indexOf("/js/keycloak.js"));break}}if(!t.realm)throw"realm missing";e.authServerUrl=t.url,e.realm=t.realm,b(null),a.setSuccess()}}return a.promise}function _e(r){return r.status==0&&r.responseText&&r.responseURL.startsWith("file:")}function X(r,a,f,b){if(e.tokenTimeoutHandle&&(clearTimeout(e.tokenTimeoutHandle),e.tokenTimeoutHandle=null),a?(e.refreshToken=a,e.refreshTokenParsed=Gt(a)):(delete e.refreshToken,delete e.refreshTokenParsed),f?(e.idToken=f,e.idTokenParsed=Gt(f)):(delete e.idToken,delete e.idTokenParsed),r){if(e.token=r,e.tokenParsed=Gt(r),e.sessionId=e.tokenParsed.session_state,e.authenticated=!0,e.subject=e.tokenParsed.sub,e.realmAccess=e.tokenParsed.realm_access,e.resourceAccess=e.tokenParsed.resource_access,b&&(e.timeSkew=Math.floor(b/1e3)-e.tokenParsed.iat),e.timeSkew!=null&&(V("[KEYCLOAK] Estimated time difference between browser and server is "+e.timeSkew+" seconds"),e.onTokenExpired)){var p=(e.tokenParsed.exp-new Date().getTime()/1e3+e.timeSkew)*1e3;V("[KEYCLOAK] Token expires in "+Math.round(p/1e3)+" s"),p<=0?e.onTokenExpired():e.tokenTimeoutHandle=setTimeout(e.onTokenExpired,p)}}else delete e.token,delete e.tokenParsed,delete e.subject,delete e.realmAccess,delete e.resourceAccess,e.authenticated=!1}function h(){var r="0123456789abcdef",a=z(36,r).split("");a[14]="4",a[19]=r.substr(a[19]&3|8,1),a[8]=a[13]=a[18]=a[23]="-";var f=a.join("");return f}function _(r){var a=P(r);if(a){var f=i.get(a.state);return f&&(a.valid=!0,a.redirectUri=f.redirectUri,a.storedNonce=f.nonce,a.prompt=f.prompt,a.pkceCodeVerifier=f.pkceCodeVerifier),a}}function P(r){var a;switch(e.flow){case"standard":a=["code","state","session_state","kc_action_status","iss"];break;case"implicit":a=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":a=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"];break}a.push("error"),a.push("error_description"),a.push("error_uri");var f=r.indexOf("?"),b=r.indexOf("#"),p,A;if(e.responseMode==="query"&&f!==-1?(p=r.substring(0,f),A=C(r.substring(f+1,b!==-1?b:r.length),a),A.paramsString!==""&&(p+="?"+A.paramsString),b!==-1&&(p+=r.substring(b))):e.responseMode==="fragment"&&b!==-1&&(p=r.substring(0,b),A=C(r.substring(b+1),a),A.paramsString!==""&&(p+="#"+A.paramsString)),A&&A.oauthParams){if(e.flow==="standard"||e.flow==="hybrid"){if((A.oauthParams.code||A.oauthParams.error)&&A.oauthParams.state)return A.oauthParams.newUrl=p,A.oauthParams}else if(e.flow==="implicit"&&(A.oauthParams.access_token||A.oauthParams.error)&&A.oauthParams.state)return A.oauthParams.newUrl=p,A.oauthParams}}function C(r,a){for(var f=r.split("&"),b={paramsString:"",oauthParams:{}},p=0;p<f.length;p++){var A=f[p].indexOf("="),g=f[p].slice(0,A);a.indexOf(g)!==-1?b.oauthParams[g]=f[p].slice(A+1):(b.paramsString!==""&&(b.paramsString+="&"),b.paramsString+=f[p])}return b}function k(){var r={setSuccess:function(a){r.resolve(a)},setError:function(a){r.reject(a)}};return r.promise=new Promise(function(a,f){r.resolve=a,r.reject=f}),r}function v(r,a,f){var b=null,p=new Promise(function(A,g){b=setTimeout(function(){g({error:f||"Promise is not settled within timeout of "+a+"ms"})},a)});return Promise.race([r,p]).finally(function(){clearTimeout(b)})}function O(){var r=k();if(!c.enable||c.iframe)return r.setSuccess(),r.promise;var a=document.createElement("iframe");c.iframe=a,a.onload=function(){var p=e.endpoints.authorize();p.charAt(0)==="/"?c.iframeOrigin=it():c.iframeOrigin=p.substring(0,p.indexOf("/",8)),r.setSuccess()};var f=e.endpoints.checkSessionIframe();a.setAttribute("src",f),a.setAttribute("sandbox","allow-scripts allow-same-origin"),a.setAttribute("title","keycloak-session-iframe"),a.style.display="none",document.body.appendChild(a);var b=function(p){if(!(p.origin!==c.iframeOrigin||c.iframe.contentWindow!==p.source)&&(p.data=="unchanged"||p.data=="changed"||p.data=="error")){p.data!="unchanged"&&e.clearToken();for(var A=c.callbackList.splice(0,c.callbackList.length),g=A.length-1;g>=0;--g){var y=A[g];p.data=="error"?y.setError():y.setSuccess(p.data=="unchanged")}}};return window.addEventListener("message",b,!1),r.promise}function m(){c.enable&&e.token&&setTimeout(function(){F().then(function(r){r&&m()})},c.interval*1e3)}function F(){var r=k();if(c.iframe&&c.iframeOrigin){var a=e.clientId+" "+(e.sessionId?e.sessionId:"");c.callbackList.push(r);var f=c.iframeOrigin;c.callbackList.length==1&&c.iframe.contentWindow.postMessage(a,f)}else r.setSuccess();return r.promise}function q(){var r=k();if(c.enable||e.silentCheckSsoRedirectUri){var a=document.createElement("iframe");a.setAttribute("src",e.endpoints.thirdPartyCookiesIframe()),a.setAttribute("sandbox","allow-scripts allow-same-origin"),a.setAttribute("title","keycloak-3p-check-iframe"),a.style.display="none",document.body.appendChild(a);var f=function(b){a.contentWindow===b.source&&(b.data!=="supported"&&b.data!=="unsupported"||(b.data==="unsupported"&&(W(`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:
8
+ */(function(t){(function(){var e="input is invalid type",n=typeof window=="object",o=n?window:{};o.JS_SHA256_NO_WINDOW&&(n=!1);var s=!n&&typeof self=="object",a=!o.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;a?o=vr:s&&(o=self);var y=!o.JS_SHA256_NO_COMMON_JS&&!0&&t.exports,T=!o.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",d="0123456789abcdef".split(""),V=[-2147483648,8388608,32768,128],j=[24,16,8,0],te=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Le=["hex","array","digest","arrayBuffer"],W=[];(o.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(f){return Object.prototype.toString.call(f)==="[object Array]"}),T&&(o.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(f){return typeof f=="object"&&f.buffer&&f.buffer.constructor===ArrayBuffer});var Fe=function(f,E){return function(P){return new U(E,!0).update(P)[f]()}},ct=function(f){var E=Fe("hex",f);a&&(E=_e(E,f)),E.create=function(){return new U(f)},E.update=function(_){return E.create().update(_)};for(var P=0;P<Le.length;++P){var A=Le[P];E[A]=Fe(A,f)}return E},_e=function(f,E){var P=Qe,A=Qe.Buffer,_=E?"sha224":"sha256",k;A.from&&!o.JS_SHA256_NO_BUFFER_FROM?k=A.from:k=function(g){return new A(g)};var O=function(g){if(typeof g=="string")return P.createHash(_).update(g,"utf8").digest("hex");if(g==null)throw new Error(e);return g.constructor===ArrayBuffer&&(g=new Uint8Array(g)),Array.isArray(g)||ArrayBuffer.isView(g)||g.constructor===A?P.createHash(_).update(k(g)).digest("hex"):f(g)};return O},lt=function(f,E){return function(P,A){return new Te(P,E,!0).update(A)[f]()}},pe=function(f){var E=lt("hex",f);E.create=function(_){return new Te(_,f)},E.update=function(_,k){return E.create(_).update(k)};for(var P=0;P<Le.length;++P){var A=Le[P];E[A]=lt(A,f)}return E};function U(f,E){E?(W[0]=W[16]=W[1]=W[2]=W[3]=W[4]=W[5]=W[6]=W[7]=W[8]=W[9]=W[10]=W[11]=W[12]=W[13]=W[14]=W[15]=0,this.blocks=W):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=f}U.prototype.update=function(f){if(!this.finalized){var E,P=typeof f;if(P!=="string"){if(P==="object"){if(f===null)throw new Error(e);if(T&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!T||!ArrayBuffer.isView(f)))throw new Error(e)}else throw new Error(e);E=!0}for(var A,_=0,k,O=f.length,g=this.blocks;_<O;){if(this.hashed&&(this.hashed=!1,g[0]=this.block,g[16]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=0),E)for(k=this.start;_<O&&k<64;++_)g[k>>2]|=f[_]<<j[k++&3];else for(k=this.start;_<O&&k<64;++_)A=f.charCodeAt(_),A<128?g[k>>2]|=A<<j[k++&3]:A<2048?(g[k>>2]|=(192|A>>6)<<j[k++&3],g[k>>2]|=(128|A&63)<<j[k++&3]):A<55296||A>=57344?(g[k>>2]|=(224|A>>12)<<j[k++&3],g[k>>2]|=(128|A>>6&63)<<j[k++&3],g[k>>2]|=(128|A&63)<<j[k++&3]):(A=65536+((A&1023)<<10|f.charCodeAt(++_)&1023),g[k>>2]|=(240|A>>18)<<j[k++&3],g[k>>2]|=(128|A>>12&63)<<j[k++&3],g[k>>2]|=(128|A>>6&63)<<j[k++&3],g[k>>2]|=(128|A&63)<<j[k++&3]);this.lastByteIndex=k,this.bytes+=k-this.start,k>=64?(this.block=g[16],this.start=k-64,this.hash(),this.hashed=!0):this.start=k}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},U.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var f=this.blocks,E=this.lastByteIndex;f[16]=this.block,f[E>>2]|=V[E&3],this.block=f[16],E>=56&&(this.hashed||this.hash(),f[0]=this.block,f[16]=f[1]=f[2]=f[3]=f[4]=f[5]=f[6]=f[7]=f[8]=f[9]=f[10]=f[11]=f[12]=f[13]=f[14]=f[15]=0),f[14]=this.hBytes<<3|this.bytes>>>29,f[15]=this.bytes<<3,this.hash()}},U.prototype.hash=function(){var f=this.h0,E=this.h1,P=this.h2,A=this.h3,_=this.h4,k=this.h5,O=this.h6,g=this.h7,R=this.blocks,q,J,G,ue,B,me,r,c,h,m,p;for(q=16;q<64;++q)B=R[q-15],J=(B>>>7|B<<25)^(B>>>18|B<<14)^B>>>3,B=R[q-2],G=(B>>>17|B<<15)^(B>>>19|B<<13)^B>>>10,R[q]=R[q-16]+J+R[q-7]+G<<0;for(p=E&P,q=0;q<64;q+=4)this.first?(this.is224?(c=300032,B=R[0]-1413257819,g=B-150054599<<0,A=B+24177077<<0):(c=704751109,B=R[0]-210244248,g=B-1521486534<<0,A=B+143694565<<0),this.first=!1):(J=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),G=(_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7),c=f&E,ue=c^f&P^p,r=_&k^~_&O,B=g+G+r+te[q]+R[q],me=J+ue,g=A+B<<0,A=B+me<<0),J=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),G=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7),h=A&f,ue=h^A&E^c,r=g&_^~g&k,B=O+G+r+te[q+1]+R[q+1],me=J+ue,O=P+B<<0,P=B+me<<0,J=(P>>>2|P<<30)^(P>>>13|P<<19)^(P>>>22|P<<10),G=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),m=P&A,ue=m^P&f^h,r=O&g^~O&_,B=k+G+r+te[q+2]+R[q+2],me=J+ue,k=E+B<<0,E=B+me<<0,J=(E>>>2|E<<30)^(E>>>13|E<<19)^(E>>>22|E<<10),G=(k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7),p=E&P,ue=p^E&A^m,r=k&O^~k&g,B=_+G+r+te[q+3]+R[q+3],me=J+ue,_=f+B<<0,f=B+me<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+f<<0,this.h1=this.h1+E<<0,this.h2=this.h2+P<<0,this.h3=this.h3+A<<0,this.h4=this.h4+_<<0,this.h5=this.h5+k<<0,this.h6=this.h6+O<<0,this.h7=this.h7+g<<0},U.prototype.hex=function(){this.finalize();var f=this.h0,E=this.h1,P=this.h2,A=this.h3,_=this.h4,k=this.h5,O=this.h6,g=this.h7,R=d[f>>28&15]+d[f>>24&15]+d[f>>20&15]+d[f>>16&15]+d[f>>12&15]+d[f>>8&15]+d[f>>4&15]+d[f&15]+d[E>>28&15]+d[E>>24&15]+d[E>>20&15]+d[E>>16&15]+d[E>>12&15]+d[E>>8&15]+d[E>>4&15]+d[E&15]+d[P>>28&15]+d[P>>24&15]+d[P>>20&15]+d[P>>16&15]+d[P>>12&15]+d[P>>8&15]+d[P>>4&15]+d[P&15]+d[A>>28&15]+d[A>>24&15]+d[A>>20&15]+d[A>>16&15]+d[A>>12&15]+d[A>>8&15]+d[A>>4&15]+d[A&15]+d[_>>28&15]+d[_>>24&15]+d[_>>20&15]+d[_>>16&15]+d[_>>12&15]+d[_>>8&15]+d[_>>4&15]+d[_&15]+d[k>>28&15]+d[k>>24&15]+d[k>>20&15]+d[k>>16&15]+d[k>>12&15]+d[k>>8&15]+d[k>>4&15]+d[k&15]+d[O>>28&15]+d[O>>24&15]+d[O>>20&15]+d[O>>16&15]+d[O>>12&15]+d[O>>8&15]+d[O>>4&15]+d[O&15];return this.is224||(R+=d[g>>28&15]+d[g>>24&15]+d[g>>20&15]+d[g>>16&15]+d[g>>12&15]+d[g>>8&15]+d[g>>4&15]+d[g&15]),R},U.prototype.toString=U.prototype.hex,U.prototype.digest=function(){this.finalize();var f=this.h0,E=this.h1,P=this.h2,A=this.h3,_=this.h4,k=this.h5,O=this.h6,g=this.h7,R=[f>>24&255,f>>16&255,f>>8&255,f&255,E>>24&255,E>>16&255,E>>8&255,E&255,P>>24&255,P>>16&255,P>>8&255,P&255,A>>24&255,A>>16&255,A>>8&255,A&255,_>>24&255,_>>16&255,_>>8&255,_&255,k>>24&255,k>>16&255,k>>8&255,k&255,O>>24&255,O>>16&255,O>>8&255,O&255];return this.is224||R.push(g>>24&255,g>>16&255,g>>8&255,g&255),R},U.prototype.array=U.prototype.digest,U.prototype.arrayBuffer=function(){this.finalize();var f=new ArrayBuffer(this.is224?28:32),E=new DataView(f);return E.setUint32(0,this.h0),E.setUint32(4,this.h1),E.setUint32(8,this.h2),E.setUint32(12,this.h3),E.setUint32(16,this.h4),E.setUint32(20,this.h5),E.setUint32(24,this.h6),this.is224||E.setUint32(28,this.h7),f};function Te(f,E,P){var A,_=typeof f;if(_==="string"){var k=[],O=f.length,g=0,R;for(A=0;A<O;++A)R=f.charCodeAt(A),R<128?k[g++]=R:R<2048?(k[g++]=192|R>>6,k[g++]=128|R&63):R<55296||R>=57344?(k[g++]=224|R>>12,k[g++]=128|R>>6&63,k[g++]=128|R&63):(R=65536+((R&1023)<<10|f.charCodeAt(++A)&1023),k[g++]=240|R>>18,k[g++]=128|R>>12&63,k[g++]=128|R>>6&63,k[g++]=128|R&63);f=k}else if(_==="object"){if(f===null)throw new Error(e);if(T&&f.constructor===ArrayBuffer)f=new Uint8Array(f);else if(!Array.isArray(f)&&(!T||!ArrayBuffer.isView(f)))throw new Error(e)}else throw new Error(e);f.length>64&&(f=new U(E,!0).update(f).array());var q=[],J=[];for(A=0;A<64;++A){var G=f[A]||0;q[A]=92^G,J[A]=54^G}U.call(this,E,P),this.update(J),this.oKeyPad=q,this.inner=!0,this.sharedMemory=P}Te.prototype=new U,Te.prototype.finalize=function(){if(U.prototype.finalize.call(this),this.inner){this.inner=!1;var f=this.array();U.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(f),U.prototype.finalize.call(this)}};var Z=ct();Z.sha256=Z,Z.sha224=ct(!0),Z.sha256.hmac=pe(),Z.sha224.hmac=pe(!0),y?t.exports=Z:(o.sha256=Z.sha256,o.sha224=Z.sha224)})()})(Mn);var Pr=Mn.exports;const Br=kr(Pr);class gt extends Error{}gt.prototype.name="InvalidTokenError";function Or(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,n)=>{let o=n.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}function Rr(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Or(e)}catch{return atob(e)}}function Xt(t,e){if(typeof t!="string")throw new gt("Invalid token specified: must be a string");e||(e={});const n=e.header===!0?0:1,o=t.split(".")[n];if(typeof o!="string")throw new gt(`Invalid token specified: missing part #${n+1}`);let s;try{s=Rr(o)}catch(a){throw new gt(`Invalid token specified: invalid base64 for part #${n+1} (${a.message})`)}try{return JSON.parse(s)}catch(a){throw new gt(`Invalid token specified: invalid json for part #${n+1} (${a.message})`)}}var Me={exports:{}};const Fr={name:"dotenv",version:"16.3.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}},Un=Qe,Zt=Qe,Nr=Qe,Dr=Qe,Qt=Fr.version,Mr=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function Ur(t){const e={};let n=t.toString();n=n.replace(/\r\n?/mg,`
9
+ `);let o;for(;(o=Mr.exec(n))!=null;){const s=o[1];let a=o[2]||"";a=a.trim();const y=a[0];a=a.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),y==='"'&&(a=a.replace(/\\n/g,`
10
+ `),a=a.replace(/\\r/g,"\r")),e[s]=a}return e}function $r(t){const e=Hn(t),n=X.configDotenv({path:e});if(!n.parsed)throw new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);const o=$n(t).split(","),s=o.length;let a;for(let y=0;y<s;y++)try{const T=o[y].trim(),d=jr(n,T);a=X.decrypt(d.ciphertext,d.key);break}catch(T){if(y+1>=s)throw T}return X.parse(a)}function Hr(t){console.log(`[dotenv@${Qt}][INFO] ${t}`)}function Vr(t){console.log(`[dotenv@${Qt}][WARN] ${t}`)}function en(t){console.log(`[dotenv@${Qt}][DEBUG] ${t}`)}function $n(t){return t&&t.DOTENV_KEY&&t.DOTENV_KEY.length>0?t.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function jr(t,e){let n;try{n=new URL(e)}catch(T){throw T.code==="ERR_INVALID_URL"?new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development"):T}const o=n.password;if(!o)throw new Error("INVALID_DOTENV_KEY: Missing key part");const s=n.searchParams.get("environment");if(!s)throw new Error("INVALID_DOTENV_KEY: Missing environment part");const a=`DOTENV_VAULT_${s.toUpperCase()}`,y=t.parsed[a];if(!y)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${a} in your .env.vault file.`);return{ciphertext:y,key:o}}function Hn(t){let e=Zt.resolve(process.cwd(),".env");return t&&t.path&&t.path.length>0&&(e=t.path),e.endsWith(".vault")?e:`${e}.vault`}function zr(t){return t[0]==="~"?Zt.join(Nr.homedir(),t.slice(1)):t}function Wr(t){Hr("Loading env from encrypted .env.vault");const e=X._parseVault(t);let n=process.env;return t&&t.processEnv!=null&&(n=t.processEnv),X.populate(n,e,t),{parsed:e}}function qr(t){let e=Zt.resolve(process.cwd(),".env"),n="utf8";const o=!!(t&&t.debug);t&&(t.path!=null&&(e=zr(t.path)),t.encoding!=null&&(n=t.encoding));try{const s=X.parse(Un.readFileSync(e,{encoding:n}));let a=process.env;return t&&t.processEnv!=null&&(a=t.processEnv),X.populate(a,s,t),{parsed:s}}catch(s){return o&&en(`Failed to load ${e} ${s.message}`),{error:s}}}function Kr(t){const e=Hn(t);return $n(t).length===0?X.configDotenv(t):Un.existsSync(e)?X._configVault(t):(Vr(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),X.configDotenv(t))}function Yr(t,e){const n=Buffer.from(e.slice(-64),"hex");let o=Buffer.from(t,"base64");const s=o.slice(0,12),a=o.slice(-16);o=o.slice(12,-16);try{const y=Dr.createDecipheriv("aes-256-gcm",n,s);return y.setAuthTag(a),`${y.update(o)}${y.final()}`}catch(y){const T=y instanceof RangeError,d=y.message==="Invalid key length",V=y.message==="Unsupported state or unable to authenticate data";if(T||d){const j="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(j)}else if(V){const j="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(j)}else throw console.error("Error: ",y.code),console.error("Error: ",y.message),y}}function Gr(t,e,n={}){const o=!!(n&&n.debug),s=!!(n&&n.override);if(typeof e!="object")throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(const a of Object.keys(e))Object.prototype.hasOwnProperty.call(t,a)?(s===!0&&(t[a]=e[a]),o&&en(s===!0?`"${a}" is already defined and WAS overwritten`:`"${a}" is already defined and was NOT overwritten`)):t[a]=e[a]}const X={configDotenv:qr,_configVault:Wr,_parseVault:$r,config:Kr,decrypt:Yr,parse:Ur,populate:Gr};Me.exports.configDotenv=X.configDotenv,Me.exports._configVault=X._configVault,Me.exports._parseVault=X._parseVault;var Jr=Me.exports.config=X.config;if(Me.exports.decrypt=X.decrypt,Me.exports.parse=X.parse,Me.exports.populate=X.populate,Me.exports=X,Jr(),typeof Promise>"u")throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function Vn(t){if(!(this instanceof Vn))throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var e=this,n,o=[],s,a={enable:!0,callbackList:[],interval:5},y=document.getElementsByTagName("script"),T=0;T<y.length;T++)(y[T].src.indexOf("keycloak.js")!==-1||y[T].src.indexOf("keycloak.min.js")!==-1)&&y[T].src.indexOf("version=")!==-1&&(e.iframeVersion=y[T].src.substring(y[T].src.indexOf("version=")+8).split("&")[0]);var d=!0,V=me(console.info),j=me(console.warn);e.init=function(r){if(e.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");e.didInitialize=!0,e.authenticated=!1,s=B();var c=["default","cordova","cordova-native"];if(r&&c.indexOf(r.adapter)>-1?n=J(r.adapter):r&&typeof r.adapter=="object"?n=r.adapter:window.Cordova||window.cordova?n=J("cordova"):n=J(),r){if(typeof r.useNonce<"u"&&(d=r.useNonce),typeof r.checkLoginIframe<"u"&&(a.enable=r.checkLoginIframe),r.checkLoginIframeInterval&&(a.interval=r.checkLoginIframeInterval),r.onLoad==="login-required"&&(e.loginRequired=!0),r.responseMode)if(r.responseMode==="query"||r.responseMode==="fragment")e.responseMode=r.responseMode;else throw"Invalid value for responseMode";if(r.flow){switch(r.flow){case"standard":e.responseType="code";break;case"implicit":e.responseType="id_token token";break;case"hybrid":e.responseType="code id_token token";break;default:throw"Invalid value for flow"}e.flow=r.flow}if(r.timeSkew!=null&&(e.timeSkew=r.timeSkew),r.redirectUri&&(e.redirectUri=r.redirectUri),r.silentCheckSsoRedirectUri&&(e.silentCheckSsoRedirectUri=r.silentCheckSsoRedirectUri),typeof r.silentCheckSsoFallback=="boolean"?e.silentCheckSsoFallback=r.silentCheckSsoFallback:e.silentCheckSsoFallback=!0,r.pkceMethod){if(r.pkceMethod!=="S256")throw"Invalid value for pkceMethod";e.pkceMethod=r.pkceMethod}typeof r.enableLogging=="boolean"?e.enableLogging=r.enableLogging:e.enableLogging=!1,typeof r.scope=="string"&&(e.scope=r.scope),typeof r.acrValues=="string"&&(e.acrValues=r.acrValues),typeof r.messageReceiveTimeout=="number"&&r.messageReceiveTimeout>0?e.messageReceiveTimeout=r.messageReceiveTimeout:e.messageReceiveTimeout=1e4}e.responseMode||(e.responseMode="fragment"),e.responseType||(e.responseType="code",e.flow="standard");var h=_(),m=_();m.promise.then(function(){e.onReady&&e.onReady(e.authenticated),h.setSuccess(e.authenticated)}).catch(function(x){h.setError(x)});var p=U();function C(){var x=function($){$||(M.prompt="none"),r&&r.locale&&(M.locale=r.locale),e.login(M).then(function(){m.setSuccess()}).catch(function(ge){m.setError(ge)})},S=function(){var $=document.createElement("iframe"),ge=e.createLoginUrl({prompt:"none",redirectUri:e.silentCheckSsoRedirectUri});$.setAttribute("src",ge),$.setAttribute("sandbox","allow-scripts allow-same-origin"),$.setAttribute("title","keycloak-silent-check-sso"),$.style.display="none",document.body.appendChild($);var de=function(ne){if(!(ne.origin!==window.location.origin||$.contentWindow!==ne.source)){var Oe=E(ne.data);pe(Oe,m),document.body.removeChild($),window.removeEventListener("message",de)}};window.addEventListener("message",de)},M={};switch(r.onLoad){case"check-sso":a.enable?O().then(function(){R().then(function($){$?m.setSuccess():e.silentCheckSsoRedirectUri?S():x(!1)}).catch(function($){m.setError($)})}):e.silentCheckSsoRedirectUri?S():x(!1);break;case"login-required":x(!0);break;default:throw"Invalid value for onLoad"}}function b(){var x=E(window.location.href);if(x&&window.history.replaceState(window.history.state,null,x.newUrl),x&&x.valid)return O().then(function(){pe(x,m)}).catch(function(S){m.setError(S)});r?r.token&&r.refreshToken?(Z(r.token,r.refreshToken,r.idToken),a.enable?O().then(function(){R().then(function(S){S?(e.onAuthSuccess&&e.onAuthSuccess(),m.setSuccess(),g()):m.setSuccess()}).catch(function(S){m.setError(S)})}):e.updateToken(-1).then(function(){e.onAuthSuccess&&e.onAuthSuccess(),m.setSuccess()}).catch(function(S){e.onAuthError&&e.onAuthError(),r.onLoad?C():m.setError(S)})):r.onLoad?C():m.setSuccess():m.setSuccess()}function w(){var x=_(),S=function(){(document.readyState==="interactive"||document.readyState==="complete")&&(document.removeEventListener("readystatechange",S),x.setSuccess())};return document.addEventListener("readystatechange",S),S(),x.promise}return p.then(function(){w().then(q).then(b).catch(function(x){h.setError(x)})}),p.catch(function(x){h.setError(x)}),h.promise},e.login=function(r){return n.login(r)};function te(r){var c=null,h=window.crypto||window.msCrypto;if(h&&h.getRandomValues&&window.Uint8Array)return c=new Uint8Array(r),h.getRandomValues(c),c;c=new Array(r);for(var m=0;m<c.length;m++)c[m]=Math.floor(256*Math.random());return c}function Le(r){return W(r,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}function W(r,c){for(var h=te(r),m=new Array(r),p=0;p<r;p++)m[p]=c.charCodeAt(h[p]%c.length);return String.fromCharCode.apply(null,m)}function Fe(r,c){switch(r){case"S256":var h=new Uint8Array(Br.arrayBuffer(c)),m=Bt.fromByteArray(h).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"");return m;default:throw"Invalid value for pkceMethod"}}function ct(r){var c={id_token:{acr:r}};return JSON.stringify(c)}e.createLoginUrl=function(r){var c=f(),h=f(),m=n.redirectUri(r),p={state:c,nonce:h,redirectUri:encodeURIComponent(m)};r&&r.prompt&&(p.prompt=r.prompt);var C;r&&r.action=="register"?C=e.endpoints.register():C=e.endpoints.authorize();var b=r&&r.scope||e.scope;b?b.indexOf("openid")===-1&&(b="openid "+b):b="openid";var w=C+"?client_id="+encodeURIComponent(e.clientId)+"&redirect_uri="+encodeURIComponent(m)+"&state="+encodeURIComponent(c)+"&response_mode="+encodeURIComponent(e.responseMode)+"&response_type="+encodeURIComponent(e.responseType)+"&scope="+encodeURIComponent(b);if(d&&(w=w+"&nonce="+encodeURIComponent(h)),r&&r.prompt&&(w+="&prompt="+encodeURIComponent(r.prompt)),r&&r.maxAge&&(w+="&max_age="+encodeURIComponent(r.maxAge)),r&&r.loginHint&&(w+="&login_hint="+encodeURIComponent(r.loginHint)),r&&r.idpHint&&(w+="&kc_idp_hint="+encodeURIComponent(r.idpHint)),r&&r.action&&r.action!="register"&&(w+="&kc_action="+encodeURIComponent(r.action)),r&&r.locale&&(w+="&ui_locales="+encodeURIComponent(r.locale)),r&&r.acr){var x=ct(r.acr);w+="&claims="+encodeURIComponent(x)}if((r&&r.acrValues||e.acrValues)&&(w+="&acr_values="+encodeURIComponent(r.acrValues||e.acrValues)),e.pkceMethod){var S=Le(96);p.pkceCodeVerifier=S;var M=Fe(e.pkceMethod,S);w+="&code_challenge="+M,w+="&code_challenge_method="+e.pkceMethod}return s.add(p),w},e.logout=function(r){return n.logout(r)},e.createLogoutUrl=function(r){var c=e.endpoints.logout()+"?client_id="+encodeURIComponent(e.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(n.redirectUri(r,!1));return e.idToken&&(c+="&id_token_hint="+encodeURIComponent(e.idToken)),c},e.register=function(r){return n.register(r)},e.createRegisterUrl=function(r){return r||(r={}),r.action="register",e.createLoginUrl(r)},e.createAccountUrl=function(r){var c=_e(),h=void 0;return typeof c<"u"&&(h=c+"/account?referrer="+encodeURIComponent(e.clientId)+"&referrer_uri="+encodeURIComponent(n.redirectUri(r))),h},e.accountManagement=function(){return n.accountManagement()},e.hasRealmRole=function(r){var c=e.realmAccess;return!!c&&c.roles.indexOf(r)>=0},e.hasResourceRole=function(r,c){if(!e.resourceAccess)return!1;var h=e.resourceAccess[c||e.clientId];return!!h&&h.roles.indexOf(r)>=0},e.loadUserProfile=function(){var r=_e()+"/account",c=new XMLHttpRequest;c.open("GET",r,!0),c.setRequestHeader("Accept","application/json"),c.setRequestHeader("Authorization","bearer "+e.token);var h=_();return c.onreadystatechange=function(){c.readyState==4&&(c.status==200?(e.profile=JSON.parse(c.responseText),h.setSuccess(e.profile)):h.setError())},c.send(),h.promise},e.loadUserInfo=function(){var r=e.endpoints.userinfo(),c=new XMLHttpRequest;c.open("GET",r,!0),c.setRequestHeader("Accept","application/json"),c.setRequestHeader("Authorization","bearer "+e.token);var h=_();return c.onreadystatechange=function(){c.readyState==4&&(c.status==200?(e.userInfo=JSON.parse(c.responseText),h.setSuccess(e.userInfo)):h.setError())},c.send(),h.promise},e.isTokenExpired=function(r){if(!e.tokenParsed||!e.refreshToken&&e.flow!="implicit")throw"Not authenticated";if(e.timeSkew==null)return V("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var c=e.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+e.timeSkew;if(r){if(isNaN(r))throw"Invalid minValidity";c-=r}return c<0},e.updateToken=function(r){var c=_();if(!e.refreshToken)return c.setError(),c.promise;r=r||5;var h=function(){var p=!1;if(r==-1?(p=!0,V("[KEYCLOAK] Refreshing token: forced refresh")):(!e.tokenParsed||e.isTokenExpired(r))&&(p=!0,V("[KEYCLOAK] Refreshing token: token expired")),!p)c.setSuccess(!1);else{var C="grant_type=refresh_token&refresh_token="+e.refreshToken,b=e.endpoints.token();if(o.push(c),o.length==1){var w=new XMLHttpRequest;w.open("POST",b,!0),w.setRequestHeader("Content-type","application/x-www-form-urlencoded"),w.withCredentials=!0,C+="&client_id="+encodeURIComponent(e.clientId);var x=new Date().getTime();w.onreadystatechange=function(){if(w.readyState==4)if(w.status==200){V("[KEYCLOAK] Token refreshed"),x=(x+new Date().getTime())/2;var S=JSON.parse(w.responseText);Z(S.access_token,S.refresh_token,S.id_token,x),e.onAuthRefreshSuccess&&e.onAuthRefreshSuccess();for(var M=o.pop();M!=null;M=o.pop())M.setSuccess(!0)}else{j("[KEYCLOAK] Failed to refresh token"),w.status==400&&e.clearToken(),e.onAuthRefreshError&&e.onAuthRefreshError();for(var M=o.pop();M!=null;M=o.pop())M.setError(!0)}},w.send(C)}}};if(a.enable){var m=R();m.then(function(){h()}).catch(function(p){c.setError(p)})}else h();return c.promise},e.clearToken=function(){e.token&&(Z(null,null,null),e.onAuthLogout&&e.onAuthLogout(),e.loginRequired&&e.login())},e.setToken=Z;function _e(){if(typeof e.authServerUrl<"u")return e.authServerUrl.charAt(e.authServerUrl.length-1)=="/"?e.authServerUrl+"realms/"+encodeURIComponent(e.realm):e.authServerUrl+"/realms/"+encodeURIComponent(e.realm)}function lt(){return window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}function pe(r,c){var h=r.code,m=r.error,p=r.prompt,C=new Date().getTime();if(r.kc_action_status&&e.onActionUpdate&&e.onActionUpdate(r.kc_action_status),m){if(p!="none"){var b={error:m,error_description:r.error_description};e.onAuthError&&e.onAuthError(b),c&&c.setError(b)}else c&&c.setSuccess();return}else e.flow!="standard"&&(r.access_token||r.id_token)&&M(r.access_token,null,r.id_token,!0);if(e.flow!="implicit"&&h){var w="code="+h+"&grant_type=authorization_code",x=e.endpoints.token(),S=new XMLHttpRequest;S.open("POST",x,!0),S.setRequestHeader("Content-type","application/x-www-form-urlencoded"),w+="&client_id="+encodeURIComponent(e.clientId),w+="&redirect_uri="+r.redirectUri,r.pkceCodeVerifier&&(w+="&code_verifier="+r.pkceCodeVerifier),S.withCredentials=!0,S.onreadystatechange=function(){if(S.readyState==4)if(S.status==200){var $=JSON.parse(S.responseText);M($.access_token,$.refresh_token,$.id_token,e.flow==="standard"),g()}else e.onAuthError&&e.onAuthError(),c&&c.setError()},S.send(w)}function M($,ge,de,ne){C=(C+new Date().getTime())/2,Z($,ge,de,C),d&&(e.tokenParsed&&e.tokenParsed.nonce!=r.storedNonce||e.refreshTokenParsed&&e.refreshTokenParsed.nonce!=r.storedNonce||e.idTokenParsed&&e.idTokenParsed.nonce!=r.storedNonce)?(V("[KEYCLOAK] Invalid nonce, clearing token"),e.clearToken(),c&&c.setError()):ne&&(e.onAuthSuccess&&e.onAuthSuccess(),c&&c.setSuccess())}}function U(r){var c=_();e.authServerUrl=process.env.AUTHSERVICE_URL,e.realm=process.env.AUTHSERVICE_REALM,e.clientId=process.env.AUTHSERVICE_CLIENTID;function h(x){x?e.endpoints={authorize:function(){return x.authorization_endpoint},token:function(){return x.token_endpoint},logout:function(){if(!x.end_session_endpoint)throw"Not supported by the OIDC server";return x.end_session_endpoint},checkSessionIframe:function(){if(!x.check_session_iframe)throw"Not supported by the OIDC server";return x.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!x.userinfo_endpoint)throw"Not supported by the OIDC server";return x.userinfo_endpoint}}:e.endpoints={authorize:function(){return _e()+"/protocol/openid-connect/auth"},token:function(){return _e()+"/protocol/openid-connect/token"},logout:function(){return _e()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var S=_e()+"/protocol/openid-connect/login-status-iframe.html";return e.iframeVersion&&(S=S+"?version="+e.iframeVersion),S},thirdPartyCookiesIframe:function(){var S=_e()+"/protocol/openid-connect/3p-cookies/step1.html";return e.iframeVersion&&(S=S+"?version="+e.iframeVersion),S},register:function(){return _e()+"/protocol/openid-connect/registrations"},userinfo:function(){return _e()+"/protocol/openid-connect/userinfo"}}}var m;{if(!t.clientId)throw"clientId missing";e.clientId=t.clientId;var p=t.oidcProvider;if(p)if(typeof p=="string"){var w;p.charAt(p.length-1)=="/"?w=p+".well-known/openid-configuration":w=p+"/.well-known/openid-configuration";var m=new XMLHttpRequest;m.open("GET",w,!0),m.setRequestHeader("Accept","application/json"),m.onreadystatechange=function(){if(m.readyState==4)if(m.status==200||Te(m)){var S=JSON.parse(m.responseText);h(S),c.setSuccess()}else c.setError()},m.send()}else h(p),c.setSuccess();else{if(!t.url){for(var C=document.getElementsByTagName("script"),b=0;b<C.length;b++)if(C[b].src.match(/.*keycloak\.js/)){t.url=C[b].src.substr(0,C[b].src.indexOf("/js/keycloak.js"));break}}if(!t.realm)throw"realm missing";e.authServerUrl=t.url,e.realm=t.realm,h(null),c.setSuccess()}}return c.promise}function Te(r){return r.status==0&&r.responseText&&r.responseURL.startsWith("file:")}function Z(r,c,h,m){if(e.tokenTimeoutHandle&&(clearTimeout(e.tokenTimeoutHandle),e.tokenTimeoutHandle=null),c?(e.refreshToken=c,e.refreshTokenParsed=Xt(c)):(delete e.refreshToken,delete e.refreshTokenParsed),h?(e.idToken=h,e.idTokenParsed=Xt(h)):(delete e.idToken,delete e.idTokenParsed),r){if(e.token=r,e.tokenParsed=Xt(r),e.sessionId=e.tokenParsed.session_state,e.authenticated=!0,e.subject=e.tokenParsed.sub,e.realmAccess=e.tokenParsed.realm_access,e.resourceAccess=e.tokenParsed.resource_access,m&&(e.timeSkew=Math.floor(m/1e3)-e.tokenParsed.iat),e.timeSkew!=null&&(V("[KEYCLOAK] Estimated time difference between browser and server is "+e.timeSkew+" seconds"),e.onTokenExpired)){var p=(e.tokenParsed.exp-new Date().getTime()/1e3+e.timeSkew)*1e3;V("[KEYCLOAK] Token expires in "+Math.round(p/1e3)+" s"),p<=0?e.onTokenExpired():e.tokenTimeoutHandle=setTimeout(e.onTokenExpired,p)}}else delete e.token,delete e.tokenParsed,delete e.subject,delete e.realmAccess,delete e.resourceAccess,e.authenticated=!1}function f(){var r="0123456789abcdef",c=W(36,r).split("");c[14]="4",c[19]=r.substr(c[19]&3|8,1),c[8]=c[13]=c[18]=c[23]="-";var h=c.join("");return h}function E(r){var c=P(r);if(c){var h=s.get(c.state);return h&&(c.valid=!0,c.redirectUri=h.redirectUri,c.storedNonce=h.nonce,c.prompt=h.prompt,c.pkceCodeVerifier=h.pkceCodeVerifier),c}}function P(r){var c;switch(e.flow){case"standard":c=["code","state","session_state","kc_action_status","iss"];break;case"implicit":c=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":c=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"];break}c.push("error"),c.push("error_description"),c.push("error_uri");var h=r.indexOf("?"),m=r.indexOf("#"),p,C;if(e.responseMode==="query"&&h!==-1?(p=r.substring(0,h),C=A(r.substring(h+1,m!==-1?m:r.length),c),C.paramsString!==""&&(p+="?"+C.paramsString),m!==-1&&(p+=r.substring(m))):e.responseMode==="fragment"&&m!==-1&&(p=r.substring(0,m),C=A(r.substring(m+1),c),C.paramsString!==""&&(p+="#"+C.paramsString)),C&&C.oauthParams){if(e.flow==="standard"||e.flow==="hybrid"){if((C.oauthParams.code||C.oauthParams.error)&&C.oauthParams.state)return C.oauthParams.newUrl=p,C.oauthParams}else if(e.flow==="implicit"&&(C.oauthParams.access_token||C.oauthParams.error)&&C.oauthParams.state)return C.oauthParams.newUrl=p,C.oauthParams}}function A(r,c){for(var h=r.split("&"),m={paramsString:"",oauthParams:{}},p=0;p<h.length;p++){var C=h[p].indexOf("="),b=h[p].slice(0,C);c.indexOf(b)!==-1?m.oauthParams[b]=h[p].slice(C+1):(m.paramsString!==""&&(m.paramsString+="&"),m.paramsString+=h[p])}return m}function _(){var r={setSuccess:function(c){r.resolve(c)},setError:function(c){r.reject(c)}};return r.promise=new Promise(function(c,h){r.resolve=c,r.reject=h}),r}function k(r,c,h){var m=null,p=new Promise(function(C,b){m=setTimeout(function(){b({error:h||"Promise is not settled within timeout of "+c+"ms"})},c)});return Promise.race([r,p]).finally(function(){clearTimeout(m)})}function O(){var r=_();if(!a.enable||a.iframe)return r.setSuccess(),r.promise;var c=document.createElement("iframe");a.iframe=c,c.onload=function(){var p=e.endpoints.authorize();p.charAt(0)==="/"?a.iframeOrigin=lt():a.iframeOrigin=p.substring(0,p.indexOf("/",8)),r.setSuccess()};var h=e.endpoints.checkSessionIframe();c.setAttribute("src",h),c.setAttribute("sandbox","allow-scripts allow-same-origin"),c.setAttribute("title","keycloak-session-iframe"),c.style.display="none",document.body.appendChild(c);var m=function(p){if(!(p.origin!==a.iframeOrigin||a.iframe.contentWindow!==p.source)&&(p.data=="unchanged"||p.data=="changed"||p.data=="error")){p.data!="unchanged"&&e.clearToken();for(var C=a.callbackList.splice(0,a.callbackList.length),b=C.length-1;b>=0;--b){var w=C[b];p.data=="error"?w.setError():w.setSuccess(p.data=="unchanged")}}};return window.addEventListener("message",m,!1),r.promise}function g(){a.enable&&e.token&&setTimeout(function(){R().then(function(r){r&&g()})},a.interval*1e3)}function R(){var r=_();if(a.iframe&&a.iframeOrigin){var c=e.clientId+" "+(e.sessionId?e.sessionId:"");a.callbackList.push(r);var h=a.iframeOrigin;a.callbackList.length==1&&a.iframe.contentWindow.postMessage(c,h)}else r.setSuccess();return r.promise}function q(){var r=_();if(a.enable||e.silentCheckSsoRedirectUri){var c=document.createElement("iframe");c.setAttribute("src",e.endpoints.thirdPartyCookiesIframe()),c.setAttribute("sandbox","allow-scripts allow-same-origin"),c.setAttribute("title","keycloak-3p-check-iframe"),c.style.display="none",document.body.appendChild(c);var h=function(m){c.contentWindow===m.source&&(m.data!=="supported"&&m.data!=="unsupported"||(m.data==="unsupported"&&(j(`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:
9
11
 
10
12
  - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).
11
13
  - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).
12
14
 
13
- For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers`),c.enable=!1,e.silentCheckSsoFallback&&(e.silentCheckSsoRedirectUri=!1)),document.body.removeChild(a),window.removeEventListener("message",f),r.setSuccess()))};window.addEventListener("message",f,!1)}else r.setSuccess();return v(r.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function J(r){if(!r||r=="default")return{login:function(g){return window.location.assign(e.createLoginUrl(g)),k().promise},logout:function(g){return window.location.replace(e.createLogoutUrl(g)),k().promise},register:function(g){return window.location.assign(e.createRegisterUrl(g)),k().promise},accountManagement:function(){var g=e.createAccountUrl();if(typeof g<"u")window.location.href=g;else throw"Not supported by the OIDC server";return k().promise},redirectUri:function(g,y){return g&&g.redirectUri?g.redirectUri:e.redirectUri?e.redirectUri:location.href}};if(r=="cordova"){c.enable=!1;var a=function(g,y,S){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(g,y,S):window.open(g,y,S)},f=function(g){return g&&g.cordovaOptions?Object.keys(g.cordovaOptions).reduce(function(y,S){return y[S]=g.cordovaOptions[S],y},{}):{}},b=function(g){return Object.keys(g).reduce(function(y,S){return y.push(S+"="+g[S]),y},[]).join(",")},p=function(g){var y=f(g);return y.location="no",g&&g.prompt=="none"&&(y.hidden="yes"),b(y)},A=function(){return e.redirectUri||"http://localhost"};return{login:function(g){var y=k(),S=p(g),x=e.createLoginUrl(g),R=a(x,"_blank",S),$=!1,me=!1,ue=function(){me=!0,R.close()};return R.addEventListener("loadstart",function(te){if(te.url.indexOf(A())==0){var Be=_(te.url);he(Be,y),ue(),$=!0}}),R.addEventListener("loaderror",function(te){if(!$)if(te.url.indexOf(A())==0){var Be=_(te.url);he(Be,y),ue(),$=!0}else y.setError(),ue()}),R.addEventListener("exit",function(te){me||y.setError({reason:"closed_by_user"})}),y.promise},logout:function(g){var y=k(),S=e.createLogoutUrl(g),x=a(S,"_blank","location=no,hidden=yes,clearcache=yes"),R;return x.addEventListener("loadstart",function($){$.url.indexOf(A())==0&&x.close()}),x.addEventListener("loaderror",function($){$.url.indexOf(A())==0||(R=!0),x.close()}),x.addEventListener("exit",function($){R?y.setError():(e.clearToken(),y.setSuccess())}),y.promise},register:function(g){var y=k(),S=e.createRegisterUrl(),x=p(g),R=a(S,"_blank",x);return R.addEventListener("loadstart",function($){if($.url.indexOf(A())==0){R.close();var me=_($.url);he(me,y)}}),y.promise},accountManagement:function(){var g=e.createAccountUrl();if(typeof g<"u"){var y=a(g,"_blank","location=no");y.addEventListener("loadstart",function(S){S.url.indexOf(A())==0&&y.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(g){return A()}}}if(r=="cordova-native")return c.enable=!1,{login:function(g){var y=k(),S=e.createLoginUrl(g);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var R=_(x.url);he(R,y)}),window.cordova.plugins.browsertab.openUrl(S),y.promise},logout:function(g){var y=k(),S=e.createLogoutUrl(g);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),e.clearToken(),y.setSuccess()}),window.cordova.plugins.browsertab.openUrl(S),y.promise},register:function(g){var y=k(),S=e.createRegisterUrl(g);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var R=_(x.url);he(R,y)}),window.cordova.plugins.browsertab.openUrl(S),y.promise},accountManagement:function(){var g=e.createAccountUrl();if(typeof g<"u")window.cordova.plugins.browsertab.openUrl(g);else throw"Not supported by the OIDC server"},redirectUri:function(g){return g&&g.redirectUri?g.redirectUri:e.redirectUri?e.redirectUri:"http://localhost"}};throw"invalid adapter type: "+r}var Y=function(){if(!(this instanceof Y))return new Y;localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test");var r=this;function a(){for(var f=new Date().getTime(),b=0;b<localStorage.length;b++){var p=localStorage.key(b);if(p&&p.indexOf("kc-callback-")==0){var A=localStorage.getItem(p);if(A)try{var g=JSON.parse(A).expires;(!g||g<f)&&localStorage.removeItem(p)}catch{localStorage.removeItem(p)}}}}r.get=function(f){if(f){var b="kc-callback-"+f,p=localStorage.getItem(b);return p&&(localStorage.removeItem(b),p=JSON.parse(p)),a(),p}},r.add=function(f){a();var b="kc-callback-"+f.state;f.expires=new Date().getTime()+60*60*1e3,localStorage.setItem(b,JSON.stringify(f))}},ce=function(){if(!(this instanceof ce))return new ce;var r=this;r.get=function(p){if(p){var A=f("kc-callback-"+p);if(b("kc-callback-"+p,"",a(-100)),A)return JSON.parse(A)}},r.add=function(p){b("kc-callback-"+p.state,JSON.stringify(p),a(60))},r.removeItem=function(p){b(p,"",a(-100))};var a=function(p){var A=new Date;return A.setTime(A.getTime()+p*60*1e3),A},f=function(p){for(var A=p+"=",g=document.cookie.split(";"),y=0;y<g.length;y++){for(var S=g[y];S.charAt(0)==" ";)S=S.substring(1);if(S.indexOf(A)==0)return S.substring(A.length,S.length)}return""},b=function(p,A,g){var y=p+"="+A+"; expires="+g.toUTCString()+"; ";document.cookie=y}};function B(){try{return new Y}catch{}return new ce}function pe(r){return function(){e.enableLogging&&r.apply(console,Array.prototype.slice.call(arguments))}}}const $e=new On,Sr=(t,e)=>{$e.init({onLoad:"login-required"}).then(async n=>{n&&await Tr(),t()}).catch(n=>{e(n)})},Tr=async()=>{const t=await $e.loadUserInfo();ne.User.email=t.email??"",ne.User.emailVerified=t.email_verified===!0,ne.User.firstName=t.given_name??"",ne.User.lastName=t.family_name??"",ne.User.name=t.name??"",ne.User.sub=t.sub??"",ne.User.username=t.preferred_username??"",ne.User.roles=[...t.role??[]],ne.User.groups=[...t.group??[]],ne.User.IsInRole=e=>ne.User.roles.includes(e)},ne={Instance:$e,User:{},SetUrl:t=>{$e.authServerUrl=t},SetRealm:t=>{$e.realm=t},SetClientId:t=>{$e.clientId=t},CallLogin:Sr,CallLogout:()=>{$e.logout({redirectUri:location.origin}).then(()=>{sessionStorage.removeItem("user-info")})}},Fn="SweetAlert2:",Lr=t=>{const e=[];for(let n=0;n<t.length;n++)e.indexOf(t[n])===-1&&e.push(t[n]);return e},Yt=t=>t.charAt(0).toUpperCase()+t.slice(1),ye=t=>Array.prototype.slice.call(t),de=t=>{console.warn(`${Fn} ${typeof t=="object"?t.join(" "):t}`)},He=t=>{console.error(`${Fn} ${t}`)},Mn=[],Ir=t=>{Mn.includes(t)||(Mn.push(t),de(t))},Pr=(t,e)=>{Ir(`"${t}" is deprecated and will be removed in the next major release. Please use "${e}" instead.`)},It=t=>typeof t=="function"?t():t,Jt=t=>t&&typeof t.toPromise=="function",pt=t=>Jt(t)?t.toPromise():Promise.resolve(t),Xt=t=>t&&Promise.resolve(t)===t,Xe={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:"&times;",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},Br=["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"],Rr={},Or=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Nn=t=>Object.prototype.hasOwnProperty.call(Xe,t),Un=t=>Br.indexOf(t)!==-1,Zt=t=>Rr[t],Fr=t=>{Nn(t)||de(`Unknown parameter "${t}"`)},Mr=t=>{Or.includes(t)&&de(`The parameter "${t}" is incompatible with toasts`)},Nr=t=>{Zt(t)&&Pr(t,Zt(t))},Ur=t=>{!t.backdrop&&t.allowOutsideClick&&de('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const e in t)Fr(e),t.toast&&Mr(e),Nr(e)},Dr="swal2-",Dn=t=>{const e={};for(const n in t)e[t[n]]=Dr+t[n];return e},u=Dn(["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"]),mt=Dn(["success","warning","info","question","error"]),oe=()=>document.body.querySelector(`.${u.container}`),gt=t=>{const e=oe();return e?e.querySelector(t):null},Ae=t=>gt(`.${t}`),j=()=>Ae(u.popup),bt=()=>Ae(u.icon),$n=()=>Ae(u.title),Pt=()=>Ae(u["html-container"]),Hn=()=>Ae(u.image),Vn=()=>Ae(u["progress-steps"]),Bt=()=>Ae(u["validation-message"]),Se=()=>gt(`.${u.actions} .${u.confirm}`),Ne=()=>gt(`.${u.actions} .${u.deny}`),$r=()=>Ae(u["input-label"]),Ze=()=>gt(`.${u.loader}`),Ve=()=>gt(`.${u.actions} .${u.cancel}`),yt=()=>Ae(u.actions),jn=()=>Ae(u.footer),Rt=()=>Ae(u["timer-progress-bar"]),Qt=()=>Ae(u.close),Hr=`
15
+ For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers`),a.enable=!1,e.silentCheckSsoFallback&&(e.silentCheckSsoRedirectUri=!1)),document.body.removeChild(c),window.removeEventListener("message",h),r.setSuccess()))};window.addEventListener("message",h,!1)}else r.setSuccess();return k(r.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function J(r){if(!r||r=="default")return{login:function(b){return window.location.assign(e.createLoginUrl(b)),_().promise},logout:function(b){return window.location.replace(e.createLogoutUrl(b)),_().promise},register:function(b){return window.location.assign(e.createRegisterUrl(b)),_().promise},accountManagement:function(){var b=e.createAccountUrl();if(typeof b<"u")window.location.href=b;else throw"Not supported by the OIDC server";return _().promise},redirectUri:function(b,w){return b&&b.redirectUri?b.redirectUri:e.redirectUri?e.redirectUri:location.href}};if(r=="cordova"){a.enable=!1;var c=function(b,w,x){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(b,w,x):window.open(b,w,x)},h=function(b){return b&&b.cordovaOptions?Object.keys(b.cordovaOptions).reduce(function(w,x){return w[x]=b.cordovaOptions[x],w},{}):{}},m=function(b){return Object.keys(b).reduce(function(w,x){return w.push(x+"="+b[x]),w},[]).join(",")},p=function(b){var w=h(b);return w.location="no",b&&b.prompt=="none"&&(w.hidden="yes"),m(w)},C=function(){return e.redirectUri||"http://localhost"};return{login:function(b){var w=_(),x=p(b),S=e.createLoginUrl(b),M=c(S,"_blank",x),$=!1,ge=!1,de=function(){ge=!0,M.close()};return M.addEventListener("loadstart",function(ne){if(ne.url.indexOf(C())==0){var Oe=E(ne.url);pe(Oe,w),de(),$=!0}}),M.addEventListener("loaderror",function(ne){if(!$)if(ne.url.indexOf(C())==0){var Oe=E(ne.url);pe(Oe,w),de(),$=!0}else w.setError(),de()}),M.addEventListener("exit",function(ne){ge||w.setError({reason:"closed_by_user"})}),w.promise},logout:function(b){var w=_(),x=e.createLogoutUrl(b),S=c(x,"_blank","location=no,hidden=yes,clearcache=yes"),M;return S.addEventListener("loadstart",function($){$.url.indexOf(C())==0&&S.close()}),S.addEventListener("loaderror",function($){$.url.indexOf(C())==0||(M=!0),S.close()}),S.addEventListener("exit",function($){M?w.setError():(e.clearToken(),w.setSuccess())}),w.promise},register:function(b){var w=_(),x=e.createRegisterUrl(),S=p(b),M=c(x,"_blank",S);return M.addEventListener("loadstart",function($){if($.url.indexOf(C())==0){M.close();var ge=E($.url);pe(ge,w)}}),w.promise},accountManagement:function(){var b=e.createAccountUrl();if(typeof b<"u"){var w=c(b,"_blank","location=no");w.addEventListener("loadstart",function(x){x.url.indexOf(C())==0&&w.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(b){return C()}}}if(r=="cordova-native")return a.enable=!1,{login:function(b){var w=_(),x=e.createLoginUrl(b);return universalLinks.subscribe("keycloak",function(S){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var M=E(S.url);pe(M,w)}),window.cordova.plugins.browsertab.openUrl(x),w.promise},logout:function(b){var w=_(),x=e.createLogoutUrl(b);return universalLinks.subscribe("keycloak",function(S){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),e.clearToken(),w.setSuccess()}),window.cordova.plugins.browsertab.openUrl(x),w.promise},register:function(b){var w=_(),x=e.createRegisterUrl(b);return universalLinks.subscribe("keycloak",function(S){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var M=E(S.url);pe(M,w)}),window.cordova.plugins.browsertab.openUrl(x),w.promise},accountManagement:function(){var b=e.createAccountUrl();if(typeof b<"u")window.cordova.plugins.browsertab.openUrl(b);else throw"Not supported by the OIDC server"},redirectUri:function(b){return b&&b.redirectUri?b.redirectUri:e.redirectUri?e.redirectUri:"http://localhost"}};throw"invalid adapter type: "+r}var G=function(){if(!(this instanceof G))return new G;localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test");var r=this;function c(){for(var h=new Date().getTime(),m=0;m<localStorage.length;m++){var p=localStorage.key(m);if(p&&p.indexOf("kc-callback-")==0){var C=localStorage.getItem(p);if(C)try{var b=JSON.parse(C).expires;(!b||b<h)&&localStorage.removeItem(p)}catch{localStorage.removeItem(p)}}}}r.get=function(h){if(h){var m="kc-callback-"+h,p=localStorage.getItem(m);return p&&(localStorage.removeItem(m),p=JSON.parse(p)),c(),p}},r.add=function(h){c();var m="kc-callback-"+h.state;h.expires=new Date().getTime()+60*60*1e3,localStorage.setItem(m,JSON.stringify(h))}},ue=function(){if(!(this instanceof ue))return new ue;var r=this;r.get=function(p){if(p){var C=h("kc-callback-"+p);if(m("kc-callback-"+p,"",c(-100)),C)return JSON.parse(C)}},r.add=function(p){m("kc-callback-"+p.state,JSON.stringify(p),c(60))},r.removeItem=function(p){m(p,"",c(-100))};var c=function(p){var C=new Date;return C.setTime(C.getTime()+p*60*1e3),C},h=function(p){for(var C=p+"=",b=document.cookie.split(";"),w=0;w<b.length;w++){for(var x=b[w];x.charAt(0)==" ";)x=x.substring(1);if(x.indexOf(C)==0)return x.substring(C.length,x.length)}return""},m=function(p,C,b){var w=p+"="+C+"; expires="+b.toUTCString()+"; ";document.cookie=w}};function B(){try{return new G}catch{}return new ue}function me(r){return function(){e.enableLogging&&r.apply(console,Array.prototype.slice.call(arguments))}}}const Ve=new Vn,Xr=(t,e)=>{Ve.init({onLoad:"login-required"}).then(async n=>{n&&await Zr(),t()}).catch(n=>{e(n)})},Zr=async()=>{const t=await Ve.loadUserInfo();oe.User.email=t.email??"",oe.User.emailVerified=t.email_verified===!0,oe.User.firstName=t.given_name??"",oe.User.lastName=t.family_name??"",oe.User.name=t.name??"",oe.User.sub=t.sub??"",oe.User.username=t.preferred_username??"",oe.User.roles=[...t.role??[]],oe.User.groups=[...t.group??[]],oe.User.IsInRole=e=>oe.User.roles.includes(e)},oe={Instance:Ve,User:{},SetUrl:t=>{Ve.authServerUrl=t},SetRealm:t=>{Ve.realm=t},SetClientId:t=>{Ve.clientId=t},CallLogin:Xr,CallLogout:()=>{Ve.logout({redirectUri:location.origin}).then(()=>{sessionStorage.removeItem("user-info")})}},jn="SweetAlert2:",Qr=t=>{const e=[];for(let n=0;n<t.length;n++)e.indexOf(t[n])===-1&&e.push(t[n]);return e},tn=t=>t.charAt(0).toUpperCase()+t.slice(1),we=t=>Array.prototype.slice.call(t),fe=t=>{console.warn(`${jn} ${typeof t=="object"?t.join(" "):t}`)},je=t=>{console.error(`${jn} ${t}`)},zn=[],es=t=>{zn.includes(t)||(zn.push(t),fe(t))},ts=(t,e)=>{es(`"${t}" is deprecated and will be removed in the next major release. Please use "${e}" instead.`)},Ot=t=>typeof t=="function"?t():t,nn=t=>t&&typeof t.toPromise=="function",bt=t=>nn(t)?t.toPromise():Promise.resolve(t),on=t=>t&&Promise.resolve(t)===t,et={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:"&times;",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},ns=["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"],os={},rs=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Wn=t=>Object.prototype.hasOwnProperty.call(et,t),qn=t=>ns.indexOf(t)!==-1,rn=t=>os[t],ss=t=>{Wn(t)||fe(`Unknown parameter "${t}"`)},is=t=>{rs.includes(t)&&fe(`The parameter "${t}" is incompatible with toasts`)},as=t=>{rn(t)&&ts(t,rn(t))},cs=t=>{!t.backdrop&&t.allowOutsideClick&&fe('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const e in t)ss(e),t.toast&&is(e),as(e)},ls="swal2-",Kn=t=>{const e={};for(const n in t)e[t[n]]=ls+t[n];return e},u=Kn(["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"]),yt=Kn(["success","warning","info","question","error"]),re=()=>document.body.querySelector(`.${u.container}`),wt=t=>{const e=re();return e?e.querySelector(t):null},Ae=t=>wt(`.${t}`),z=()=>Ae(u.popup),vt=()=>Ae(u.icon),Yn=()=>Ae(u.title),Rt=()=>Ae(u["html-container"]),Gn=()=>Ae(u.image),Jn=()=>Ae(u["progress-steps"]),Ft=()=>Ae(u["validation-message"]),Se=()=>wt(`.${u.actions} .${u.confirm}`),Ue=()=>wt(`.${u.actions} .${u.deny}`),us=()=>Ae(u["input-label"]),tt=()=>wt(`.${u.loader}`),ze=()=>wt(`.${u.actions} .${u.cancel}`),kt=()=>Ae(u.actions),Xn=()=>Ae(u.footer),Nt=()=>Ae(u["timer-progress-bar"]),sn=()=>Ae(u.close),ds=`
14
16
  a[href],
15
17
  area[href],
16
18
  input:not([disabled]),
@@ -25,7 +27,7 @@ For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_m
25
27
  audio[controls],
26
28
  video[controls],
27
29
  summary
28
- `,en=()=>{const t=ye(j().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((n,o)=>{const i=parseInt(n.getAttribute("tabindex")),c=parseInt(o.getAttribute("tabindex"));return i>c?1:i<c?-1:0}),e=ye(j().querySelectorAll(Hr)).filter(n=>n.getAttribute("tabindex")!=="-1");return Lr(t.concat(e)).filter(n=>we(n))},tn=()=>Re(document.body,u.shown)&&!Re(document.body,u["toast-shown"])&&!Re(document.body,u["no-backdrop"]),Ot=()=>j()&&Re(j(),u.toast),Vr=()=>j().hasAttribute("data-loading"),Qe={previousBodyPadding:null},re=(t,e)=>{if(t.textContent="",e){const o=new DOMParser().parseFromString(e,"text/html");ye(o.querySelector("head").childNodes).forEach(i=>{t.appendChild(i)}),ye(o.querySelector("body").childNodes).forEach(i=>{t.appendChild(i)})}},Re=(t,e)=>{if(!e)return!1;const n=e.split(/\s+/);for(let o=0;o<n.length;o++)if(!t.classList.contains(n[o]))return!1;return!0},jr=(t,e)=>{ye(t.classList).forEach(n=>{!Object.values(u).includes(n)&&!Object.values(mt).includes(n)&&!Object.values(e.showClass).includes(n)&&t.classList.remove(n)})},Ee=(t,e,n)=>{if(jr(t,e),e.customClass&&e.customClass[n]){if(typeof e.customClass[n]!="string"&&!e.customClass[n].forEach)return de(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof e.customClass[n]}"`);H(t,e.customClass[n])}},nn=(t,e)=>{if(!e)return null;switch(e){case"select":case"textarea":case"file":return t.querySelector(`.${u.popup} > .${u[e]}`);case"checkbox":return t.querySelector(`.${u.popup} > .${u.checkbox} input`);case"radio":return t.querySelector(`.${u.popup} > .${u.radio} input:checked`)||t.querySelector(`.${u.popup} > .${u.radio} input:first-child`);case"range":return t.querySelector(`.${u.popup} > .${u.range} input`);default:return t.querySelector(`.${u.popup} > .${u.input}`)}},zn=t=>{if(t.focus(),t.type!=="file"){const e=t.value;t.value="",t.value=e}},Wn=(t,e,n)=>{!t||!e||(typeof e=="string"&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(o=>{Array.isArray(t)?t.forEach(i=>{n?i.classList.add(o):i.classList.remove(o)}):n?t.classList.add(o):t.classList.remove(o)}))},H=(t,e)=>{Wn(t,e,!0)},Pe=(t,e)=>{Wn(t,e,!1)},Ue=(t,e)=>{const n=ye(t.childNodes);for(let o=0;o<n.length;o++)if(Re(n[o],e))return n[o]},wt=(t,e,n)=>{n===`${parseInt(n)}`&&(n=parseInt(n)),n||parseInt(n)===0?t.style[e]=typeof n=="number"?`${n}px`:n:t.style.removeProperty(e)},Q=(t,e="flex")=>{t.style.display=e},se=t=>{t.style.display="none"},qn=(t,e,n,o)=>{const i=t.querySelector(e);i&&(i.style[n]=o)},Ft=(t,e,n)=>{e?Q(t,n):se(t)},we=t=>!!(t&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)),zr=()=>!we(Se())&&!we(Ne())&&!we(Ve()),Kn=t=>t.scrollHeight>t.clientHeight,Gn=t=>{const e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return n>0||o>0},on=(t,e=!1)=>{const n=Rt();we(n)&&(e&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition=`width ${t/1e3}s linear`,n.style.width="0%"},10))},Wr=()=>{const t=Rt(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";const n=parseInt(window.getComputedStyle(t).width),o=e/n*100;t.style.removeProperty("transition"),t.style.width=`${o}%`},Yn=()=>typeof window>"u"||typeof document>"u",qr=100,M={},Kr=()=>{M.previousActiveElement&&M.previousActiveElement.focus?(M.previousActiveElement.focus(),M.previousActiveElement=null):document.body&&document.body.focus()},Gr=t=>new Promise(e=>{if(!t)return e();const n=window.scrollX,o=window.scrollY;M.restoreFocusTimeout=setTimeout(()=>{Kr(),e()},qr),window.scrollTo(n,o)}),Yr=`
30
+ `,an=()=>{const t=we(z().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((n,o)=>{const s=parseInt(n.getAttribute("tabindex")),a=parseInt(o.getAttribute("tabindex"));return s>a?1:s<a?-1:0}),e=we(z().querySelectorAll(ds)).filter(n=>n.getAttribute("tabindex")!=="-1");return Qr(t.concat(e)).filter(n=>ve(n))},cn=()=>Re(document.body,u.shown)&&!Re(document.body,u["toast-shown"])&&!Re(document.body,u["no-backdrop"]),Dt=()=>z()&&Re(z(),u.toast),fs=()=>z().hasAttribute("data-loading"),nt={previousBodyPadding:null},se=(t,e)=>{if(t.textContent="",e){const o=new DOMParser().parseFromString(e,"text/html");we(o.querySelector("head").childNodes).forEach(s=>{t.appendChild(s)}),we(o.querySelector("body").childNodes).forEach(s=>{t.appendChild(s)})}},Re=(t,e)=>{if(!e)return!1;const n=e.split(/\s+/);for(let o=0;o<n.length;o++)if(!t.classList.contains(n[o]))return!1;return!0},hs=(t,e)=>{we(t.classList).forEach(n=>{!Object.values(u).includes(n)&&!Object.values(yt).includes(n)&&!Object.values(e.showClass).includes(n)&&t.classList.remove(n)})},Ce=(t,e,n)=>{if(hs(t,e),e.customClass&&e.customClass[n]){if(typeof e.customClass[n]!="string"&&!e.customClass[n].forEach)return fe(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof e.customClass[n]}"`);H(t,e.customClass[n])}},ln=(t,e)=>{if(!e)return null;switch(e){case"select":case"textarea":case"file":return t.querySelector(`.${u.popup} > .${u[e]}`);case"checkbox":return t.querySelector(`.${u.popup} > .${u.checkbox} input`);case"radio":return t.querySelector(`.${u.popup} > .${u.radio} input:checked`)||t.querySelector(`.${u.popup} > .${u.radio} input:first-child`);case"range":return t.querySelector(`.${u.popup} > .${u.range} input`);default:return t.querySelector(`.${u.popup} > .${u.input}`)}},Zn=t=>{if(t.focus(),t.type!=="file"){const e=t.value;t.value="",t.value=e}},Qn=(t,e,n)=>{!t||!e||(typeof e=="string"&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(o=>{Array.isArray(t)?t.forEach(s=>{n?s.classList.add(o):s.classList.remove(o)}):n?t.classList.add(o):t.classList.remove(o)}))},H=(t,e)=>{Qn(t,e,!0)},Be=(t,e)=>{Qn(t,e,!1)},$e=(t,e)=>{const n=we(t.childNodes);for(let o=0;o<n.length;o++)if(Re(n[o],e))return n[o]},_t=(t,e,n)=>{n===`${parseInt(n)}`&&(n=parseInt(n)),n||parseInt(n)===0?t.style[e]=typeof n=="number"?`${n}px`:n:t.style.removeProperty(e)},ee=(t,e="flex")=>{t.style.display=e},ie=t=>{t.style.display="none"},eo=(t,e,n,o)=>{const s=t.querySelector(e);s&&(s.style[n]=o)},Mt=(t,e,n)=>{e?ee(t,n):ie(t)},ve=t=>!!(t&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)),ps=()=>!ve(Se())&&!ve(Ue())&&!ve(ze()),to=t=>t.scrollHeight>t.clientHeight,no=t=>{const e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return n>0||o>0},un=(t,e=!1)=>{const n=Nt();ve(n)&&(e&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition=`width ${t/1e3}s linear`,n.style.width="0%"},10))},ms=()=>{const t=Nt(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";const n=parseInt(window.getComputedStyle(t).width),o=e/n*100;t.style.removeProperty("transition"),t.style.width=`${o}%`},oo=()=>typeof window>"u"||typeof document>"u",gs=100,F={},bs=()=>{F.previousActiveElement&&F.previousActiveElement.focus?(F.previousActiveElement.focus(),F.previousActiveElement=null):document.body&&document.body.focus()},ys=t=>new Promise(e=>{if(!t)return e();const n=window.scrollX,o=window.scrollY;F.restoreFocusTimeout=setTimeout(()=>{bs(),e()},gs),window.scrollTo(n,o)}),ws=`
29
31
  <div aria-labelledby="${u.title}" aria-describedby="${u["html-container"]}" class="${u.popup}" tabindex="-1">
30
32
  <button type="button" class="${u.close}"></button>
31
33
  <ul class="${u["progress-steps"]}"></ul>
@@ -58,23 +60,23 @@ For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_m
58
60
  <div class="${u["timer-progress-bar"]}"></div>
59
61
  </div>
60
62
  </div>
61
- `.replace(/(^|\n)\s*/g,""),Jr=()=>{const t=oe();return t?(t.remove(),Pe([document.documentElement,document.body],[u["no-backdrop"],u["toast-shown"],u["has-column"]]),!0):!1},je=()=>{M.currentInstance.resetValidationMessage()},Xr=()=>{const t=j(),e=Ue(t,u.input),n=Ue(t,u.file),o=t.querySelector(`.${u.range} input`),i=t.querySelector(`.${u.range} output`),c=Ue(t,u.select),E=t.querySelector(`.${u.checkbox} input`),I=Ue(t,u.textarea);e.oninput=je,n.onchange=je,c.onchange=je,E.onchange=je,I.oninput=je,o.oninput=()=>{je(),i.value=o.value},o.onchange=()=>{je(),o.nextSibling.value=o.value}},Zr=t=>typeof t=="string"?document.querySelector(t):t,Qr=t=>{const e=j();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")},es=t=>{window.getComputedStyle(t).direction==="rtl"&&H(oe(),u.rtl)},ts=t=>{const e=Jr();if(Yn()){He("SweetAlert2 requires document to initialize");return}const n=document.createElement("div");n.className=u.container,e&&H(n,u["no-transition"]),re(n,Yr);const o=Zr(t.target);o.appendChild(n),Qr(t),es(o),Xr()},rn=(t,e)=>{t instanceof HTMLElement?e.appendChild(t):typeof t=="object"?ns(t,e):t&&re(e,t)},ns=(t,e)=>{t.jquery?os(e,t):re(e,t.toString())},os=(t,e)=>{if(t.textContent="",0 in e)for(let n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},vt=(()=>{if(Yn())return!1;const t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&typeof t.style[n]<"u")return e[n];return!1})(),rs=()=>{const t=document.createElement("div");t.className=u["scrollbar-measure"],document.body.appendChild(t);const e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},ss=(t,e)=>{const n=yt(),o=Ze();!e.showConfirmButton&&!e.showDenyButton&&!e.showCancelButton?se(n):Q(n),Ee(n,e,"actions"),is(n,o,e),re(o,e.loaderHtml),Ee(o,e,"loader")};function is(t,e,n){const o=Se(),i=Ne(),c=Ve();sn(o,"confirm",n),sn(i,"deny",n),sn(c,"cancel",n),as(o,i,c,n),n.reverseButtons&&(n.toast?(t.insertBefore(c,o),t.insertBefore(i,o)):(t.insertBefore(c,e),t.insertBefore(i,e),t.insertBefore(o,e)))}function as(t,e,n,o){if(!o.buttonsStyling)return Pe([t,e,n],u.styled);H([t,e,n],u.styled),o.confirmButtonColor&&(t.style.backgroundColor=o.confirmButtonColor,H(t,u["default-outline"])),o.denyButtonColor&&(e.style.backgroundColor=o.denyButtonColor,H(e,u["default-outline"])),o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,H(n,u["default-outline"]))}function sn(t,e,n){Ft(t,n[`show${Yt(e)}Button`],"inline-block"),re(t,n[`${e}ButtonText`]),t.setAttribute("aria-label",n[`${e}ButtonAriaLabel`]),t.className=u[e],Ee(t,n,`${e}Button`),H(t,n[`${e}ButtonClass`])}function ls(t,e){typeof e=="string"?t.style.background=e:e||H([document.documentElement,document.body],u["no-backdrop"])}function cs(t,e){e in u?H(t,u[e]):(de('The "position" parameter is not valid, defaulting to "center"'),H(t,u.center))}function us(t,e){if(e&&typeof e=="string"){const n=`grow-${e}`;n in u&&H(t,u[n])}}const ds=(t,e)=>{const n=oe();n&&(ls(n,e.backdrop),cs(n,e.position),us(n,e.grow),Ee(n,e,"container"))},U={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},fs=["input","file","range","select","radio","checkbox","textarea"],hs=(t,e)=>{const n=j(),o=U.innerParams.get(t),i=!o||e.input!==o.input;fs.forEach(c=>{const E=u[c],I=Ue(n,E);gs(c,e.inputAttributes),I.className=E,i&&se(I)}),e.input&&(i&&ps(e),bs(e))},ps=t=>{if(!fe[t.input])return He(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${t.input}"`);const e=Jn(t.input),n=fe[t.input](e,t);Q(n),setTimeout(()=>{zn(n)})},ms=t=>{for(let e=0;e<t.attributes.length;e++){const n=t.attributes[e].name;["type","value","style"].includes(n)||t.removeAttribute(n)}},gs=(t,e)=>{const n=nn(j(),t);if(n){ms(n);for(const o in e)n.setAttribute(o,e[o])}},bs=t=>{const e=Jn(t.input);t.customClass&&H(e,t.customClass.input)},an=(t,e)=>{(!t.placeholder||e.inputPlaceholder)&&(t.placeholder=e.inputPlaceholder)},kt=(t,e,n)=>{if(n.inputLabel){t.id=u.input;const o=document.createElement("label"),i=u["input-label"];o.setAttribute("for",t.id),o.className=i,H(o,n.customClass.inputLabel),o.innerText=n.inputLabel,e.insertAdjacentElement("beforebegin",o)}},Jn=t=>{const e=u[t]?u[t]:u.input;return Ue(j(),e)},fe={};fe.text=fe.email=fe.password=fe.number=fe.tel=fe.url=(t,e)=>(typeof e.inputValue=="string"||typeof e.inputValue=="number"?t.value=e.inputValue:Xt(e.inputValue)||de(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof e.inputValue}"`),kt(t,t,e),an(t,e),t.type=e.input,t),fe.file=(t,e)=>(kt(t,t,e),an(t,e),t),fe.range=(t,e)=>{const n=t.querySelector("input"),o=t.querySelector("output");return n.value=e.inputValue,n.type=e.input,o.value=e.inputValue,kt(n,t,e),t},fe.select=(t,e)=>{if(t.textContent="",e.inputPlaceholder){const n=document.createElement("option");re(n,e.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)}return kt(t,t,e),t},fe.radio=t=>(t.textContent="",t),fe.checkbox=(t,e)=>{const n=nn(j(),"checkbox");n.value="1",n.id=u.checkbox,n.checked=!!e.inputValue;const o=t.querySelector("span");return re(o,e.inputPlaceholder),t},fe.textarea=(t,e)=>{t.value=e.inputValue,an(t,e),kt(t,t,e);const n=o=>parseInt(window.getComputedStyle(o).marginLeft)+parseInt(window.getComputedStyle(o).marginRight);return setTimeout(()=>{if("MutationObserver"in window){const o=parseInt(window.getComputedStyle(j()).width),i=()=>{const c=t.offsetWidth+n(t);c>o?j().style.width=`${c}px`:j().style.width=null};new MutationObserver(i).observe(t,{attributes:!0,attributeFilter:["style"]})}}),t};const ys=(t,e)=>{const n=Pt();Ee(n,e,"htmlContainer"),e.html?(rn(e.html,n),Q(n,"block")):e.text?(n.textContent=e.text,Q(n,"block")):se(n),hs(t,e)},ws=(t,e)=>{const n=jn();Ft(n,e.footer),e.footer&&rn(e.footer,n),Ee(n,e,"footer")},vs=(t,e)=>{const n=Qt();re(n,e.closeButtonHtml),Ee(n,e,"closeButton"),Ft(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel)},ks=(t,e)=>{const n=U.innerParams.get(t),o=bt();if(n&&e.icon===n.icon){Zn(o,e),Xn(o,e);return}if(!e.icon&&!e.iconHtml)return se(o);if(e.icon&&Object.keys(mt).indexOf(e.icon)===-1)return He(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${e.icon}"`),se(o);Q(o),Zn(o,e),Xn(o,e),H(o,e.showClass.icon)},Xn=(t,e)=>{for(const n in mt)e.icon!==n&&Pe(t,mt[n]);H(t,mt[e.icon]),Es(t,e),_s(),Ee(t,e,"icon")},_s=()=>{const t=j(),e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let o=0;o<n.length;o++)n[o].style.backgroundColor=e},Cs=`
63
+ `.replace(/(^|\n)\s*/g,""),vs=()=>{const t=re();return t?(t.remove(),Be([document.documentElement,document.body],[u["no-backdrop"],u["toast-shown"],u["has-column"]]),!0):!1},We=()=>{F.currentInstance.resetValidationMessage()},ks=()=>{const t=z(),e=$e(t,u.input),n=$e(t,u.file),o=t.querySelector(`.${u.range} input`),s=t.querySelector(`.${u.range} output`),a=$e(t,u.select),y=t.querySelector(`.${u.checkbox} input`),T=$e(t,u.textarea);e.oninput=We,n.onchange=We,a.onchange=We,y.onchange=We,T.oninput=We,o.oninput=()=>{We(),s.value=o.value},o.onchange=()=>{We(),o.nextSibling.value=o.value}},_s=t=>typeof t=="string"?document.querySelector(t):t,Es=t=>{const e=z();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")},As=t=>{window.getComputedStyle(t).direction==="rtl"&&H(re(),u.rtl)},Cs=t=>{const e=vs();if(oo()){je("SweetAlert2 requires document to initialize");return}const n=document.createElement("div");n.className=u.container,e&&H(n,u["no-transition"]),se(n,ws);const o=_s(t.target);o.appendChild(n),Es(t),As(o),ks()},dn=(t,e)=>{t instanceof HTMLElement?e.appendChild(t):typeof t=="object"?xs(t,e):t&&se(e,t)},xs=(t,e)=>{t.jquery?Ts(e,t):se(e,t.toString())},Ts=(t,e)=>{if(t.textContent="",0 in e)for(let n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},Et=(()=>{if(oo())return!1;const t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&typeof t.style[n]<"u")return e[n];return!1})(),Ss=()=>{const t=document.createElement("div");t.className=u["scrollbar-measure"],document.body.appendChild(t);const e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},Is=(t,e)=>{const n=kt(),o=tt();!e.showConfirmButton&&!e.showDenyButton&&!e.showCancelButton?ie(n):ee(n),Ce(n,e,"actions"),Ls(n,o,e),se(o,e.loaderHtml),Ce(o,e,"loader")};function Ls(t,e,n){const o=Se(),s=Ue(),a=ze();fn(o,"confirm",n),fn(s,"deny",n),fn(a,"cancel",n),Ps(o,s,a,n),n.reverseButtons&&(n.toast?(t.insertBefore(a,o),t.insertBefore(s,o)):(t.insertBefore(a,e),t.insertBefore(s,e),t.insertBefore(o,e)))}function Ps(t,e,n,o){if(!o.buttonsStyling)return Be([t,e,n],u.styled);H([t,e,n],u.styled),o.confirmButtonColor&&(t.style.backgroundColor=o.confirmButtonColor,H(t,u["default-outline"])),o.denyButtonColor&&(e.style.backgroundColor=o.denyButtonColor,H(e,u["default-outline"])),o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,H(n,u["default-outline"]))}function fn(t,e,n){Mt(t,n[`show${tn(e)}Button`],"inline-block"),se(t,n[`${e}ButtonText`]),t.setAttribute("aria-label",n[`${e}ButtonAriaLabel`]),t.className=u[e],Ce(t,n,`${e}Button`),H(t,n[`${e}ButtonClass`])}function Bs(t,e){typeof e=="string"?t.style.background=e:e||H([document.documentElement,document.body],u["no-backdrop"])}function Os(t,e){e in u?H(t,u[e]):(fe('The "position" parameter is not valid, defaulting to "center"'),H(t,u.center))}function Rs(t,e){if(e&&typeof e=="string"){const n=`grow-${e}`;n in u&&H(t,u[n])}}const Fs=(t,e)=>{const n=re();n&&(Bs(n,e.backdrop),Os(n,e.position),Rs(n,e.grow),Ce(n,e,"container"))},D={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},Ns=["input","file","range","select","radio","checkbox","textarea"],Ds=(t,e)=>{const n=z(),o=D.innerParams.get(t),s=!o||e.input!==o.input;Ns.forEach(a=>{const y=u[a],T=$e(n,y);$s(a,e.inputAttributes),T.className=y,s&&ie(T)}),e.input&&(s&&Ms(e),Hs(e))},Ms=t=>{if(!he[t.input])return je(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${t.input}"`);const e=ro(t.input),n=he[t.input](e,t);ee(n),setTimeout(()=>{Zn(n)})},Us=t=>{for(let e=0;e<t.attributes.length;e++){const n=t.attributes[e].name;["type","value","style"].includes(n)||t.removeAttribute(n)}},$s=(t,e)=>{const n=ln(z(),t);if(n){Us(n);for(const o in e)n.setAttribute(o,e[o])}},Hs=t=>{const e=ro(t.input);t.customClass&&H(e,t.customClass.input)},hn=(t,e)=>{(!t.placeholder||e.inputPlaceholder)&&(t.placeholder=e.inputPlaceholder)},At=(t,e,n)=>{if(n.inputLabel){t.id=u.input;const o=document.createElement("label"),s=u["input-label"];o.setAttribute("for",t.id),o.className=s,H(o,n.customClass.inputLabel),o.innerText=n.inputLabel,e.insertAdjacentElement("beforebegin",o)}},ro=t=>{const e=u[t]?u[t]:u.input;return $e(z(),e)},he={};he.text=he.email=he.password=he.number=he.tel=he.url=(t,e)=>(typeof e.inputValue=="string"||typeof e.inputValue=="number"?t.value=e.inputValue:on(e.inputValue)||fe(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof e.inputValue}"`),At(t,t,e),hn(t,e),t.type=e.input,t),he.file=(t,e)=>(At(t,t,e),hn(t,e),t),he.range=(t,e)=>{const n=t.querySelector("input"),o=t.querySelector("output");return n.value=e.inputValue,n.type=e.input,o.value=e.inputValue,At(n,t,e),t},he.select=(t,e)=>{if(t.textContent="",e.inputPlaceholder){const n=document.createElement("option");se(n,e.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)}return At(t,t,e),t},he.radio=t=>(t.textContent="",t),he.checkbox=(t,e)=>{const n=ln(z(),"checkbox");n.value="1",n.id=u.checkbox,n.checked=!!e.inputValue;const o=t.querySelector("span");return se(o,e.inputPlaceholder),t},he.textarea=(t,e)=>{t.value=e.inputValue,hn(t,e),At(t,t,e);const n=o=>parseInt(window.getComputedStyle(o).marginLeft)+parseInt(window.getComputedStyle(o).marginRight);return setTimeout(()=>{if("MutationObserver"in window){const o=parseInt(window.getComputedStyle(z()).width),s=()=>{const a=t.offsetWidth+n(t);a>o?z().style.width=`${a}px`:z().style.width=null};new MutationObserver(s).observe(t,{attributes:!0,attributeFilter:["style"]})}}),t};const Vs=(t,e)=>{const n=Rt();Ce(n,e,"htmlContainer"),e.html?(dn(e.html,n),ee(n,"block")):e.text?(n.textContent=e.text,ee(n,"block")):ie(n),Ds(t,e)},js=(t,e)=>{const n=Xn();Mt(n,e.footer),e.footer&&dn(e.footer,n),Ce(n,e,"footer")},zs=(t,e)=>{const n=sn();se(n,e.closeButtonHtml),Ce(n,e,"closeButton"),Mt(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel)},Ws=(t,e)=>{const n=D.innerParams.get(t),o=vt();if(n&&e.icon===n.icon){io(o,e),so(o,e);return}if(!e.icon&&!e.iconHtml)return ie(o);if(e.icon&&Object.keys(yt).indexOf(e.icon)===-1)return je(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${e.icon}"`),ie(o);ee(o),io(o,e),so(o,e),H(o,e.showClass.icon)},so=(t,e)=>{for(const n in yt)e.icon!==n&&Be(t,yt[n]);H(t,yt[e.icon]),Gs(t,e),qs(),Ce(t,e,"icon")},qs=()=>{const t=z(),e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let o=0;o<n.length;o++)n[o].style.backgroundColor=e},Ks=`
62
64
  <div class="swal2-success-circular-line-left"></div>
63
65
  <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
64
66
  <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
65
67
  <div class="swal2-success-circular-line-right"></div>
66
- `,As=`
68
+ `,Ys=`
67
69
  <span class="swal2-x-mark">
68
70
  <span class="swal2-x-mark-line-left"></span>
69
71
  <span class="swal2-x-mark-line-right"></span>
70
72
  </span>
71
- `,Zn=(t,e)=>{t.textContent="",e.iconHtml?re(t,Qn(e.iconHtml)):e.icon==="success"?re(t,Cs):e.icon==="error"?re(t,As):re(t,Qn({question:"?",warning:"!",info:"i"}[e.icon]))},Es=(t,e)=>{if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])qn(t,n,"backgroundColor",e.iconColor);qn(t,".swal2-success-ring","borderColor",e.iconColor)}},Qn=t=>`<div class="${u["icon-content"]}">${t}</div>`,xs=(t,e)=>{const n=Hn();if(!e.imageUrl)return se(n);Q(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt),wt(n,"width",e.imageWidth),wt(n,"height",e.imageHeight),n.className=u.image,Ee(n,e,"image")},Ss=t=>{const e=document.createElement("li");return H(e,u["progress-step"]),re(e,t),e},Ts=t=>{const e=document.createElement("li");return H(e,u["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e},Ls=(t,e)=>{const n=Vn();if(!e.progressSteps||e.progressSteps.length===0)return se(n);Q(n),n.textContent="",e.currentProgressStep>=e.progressSteps.length&&de("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach((o,i)=>{const c=Ss(o);if(n.appendChild(c),i===e.currentProgressStep&&H(c,u["active-progress-step"]),i!==e.progressSteps.length-1){const E=Ts(e);n.appendChild(E)}})},Is=(t,e)=>{const n=$n();Ft(n,e.title||e.titleText,"block"),e.title&&rn(e.title,n),e.titleText&&(n.innerText=e.titleText),Ee(n,e,"title")},Ps=(t,e)=>{const n=oe(),o=j();e.toast?(wt(n,"width",e.width),o.style.width="100%",o.insertBefore(Ze(),bt())):wt(o,"width",e.width),wt(o,"padding",e.padding),e.color&&(o.style.color=e.color),e.background&&(o.style.background=e.background),se(Bt()),Bs(o,e)},Bs=(t,e)=>{t.className=`${u.popup} ${we(t)?e.showClass.popup:""}`,e.toast?(H([document.documentElement,document.body],u["toast-shown"]),H(t,u.toast)):H(t,u.modal),Ee(t,e,"popup"),typeof e.customClass=="string"&&H(t,e.customClass),e.icon&&H(t,u[`icon-${e.icon}`])},eo=(t,e)=>{Ps(t,e),ds(t,e),Ls(t,e),ks(t,e),xs(t,e),Is(t,e),vs(t,e),ys(t,e),ss(t,e),ws(t,e),typeof e.didRender=="function"&&e.didRender(j())},et=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Rs=()=>{ye(document.body.children).forEach(e=>{e===oe()||e.contains(oe())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})},to=()=>{ye(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")})},no=["swal-title","swal-html","swal-footer"],Os=t=>{const e=typeof t.template=="string"?document.querySelector(t.template):t.template;if(!e)return{};const n=e.content;return Hs(n),Object.assign(Fs(n),Ms(n),Ns(n),Us(n),Ds(n),$s(n,no))},Fs=t=>{const e={};return ye(t.querySelectorAll("swal-param")).forEach(n=>{ze(n,["name","value"]);const o=n.getAttribute("name"),i=n.getAttribute("value");typeof Xe[o]=="boolean"&&i==="false"&&(e[o]=!1),typeof Xe[o]=="object"&&(e[o]=JSON.parse(i))}),e},Ms=t=>{const e={};return ye(t.querySelectorAll("swal-button")).forEach(n=>{ze(n,["type","color","aria-label"]);const o=n.getAttribute("type");e[`${o}ButtonText`]=n.innerHTML,e[`show${Yt(o)}Button`]=!0,n.hasAttribute("color")&&(e[`${o}ButtonColor`]=n.getAttribute("color")),n.hasAttribute("aria-label")&&(e[`${o}ButtonAriaLabel`]=n.getAttribute("aria-label"))}),e},Ns=t=>{const e={},n=t.querySelector("swal-image");return n&&(ze(n,["src","width","height","alt"]),n.hasAttribute("src")&&(e.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(e.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(e.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(e.imageAlt=n.getAttribute("alt"))),e},Us=t=>{const e={},n=t.querySelector("swal-icon");return n&&(ze(n,["type","color"]),n.hasAttribute("type")&&(e.icon=n.getAttribute("type")),n.hasAttribute("color")&&(e.iconColor=n.getAttribute("color")),e.iconHtml=n.innerHTML),e},Ds=t=>{const e={},n=t.querySelector("swal-input");n&&(ze(n,["type","label","placeholder","value"]),e.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(e.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(e.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(e.inputValue=n.getAttribute("value")));const o=t.querySelectorAll("swal-input-option");return o.length&&(e.inputOptions={},ye(o).forEach(i=>{ze(i,["value"]);const c=i.getAttribute("value"),E=i.innerHTML;e.inputOptions[c]=E})),e},$s=(t,e)=>{const n={};for(const o in e){const i=e[o],c=t.querySelector(i);c&&(ze(c,[]),n[i.replace(/^swal-/,"")]=c.innerHTML.trim())}return n},Hs=t=>{const e=no.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);ye(t.children).forEach(n=>{const o=n.tagName.toLowerCase();e.indexOf(o)===-1&&de(`Unrecognized element <${o}>`)})},ze=(t,e)=>{ye(t.attributes).forEach(n=>{e.indexOf(n.name)===-1&&de([`Unrecognized attribute "${n.name}" on <${t.tagName.toLowerCase()}>.`,`${e.length?`Allowed attributes are: ${e.join(", ")}`:"To set the value, use HTML within the element."}`])})},oo={email:(t,e)=>/^[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 Vs(t){t.inputValidator||Object.keys(oo).forEach(e=>{t.input===e&&(t.inputValidator=oo[e])})}function js(t){(!t.target||typeof t.target=="string"&&!document.querySelector(t.target)||typeof t.target!="string"&&!t.target.appendChild)&&(de('Target parameter is not valid, defaulting to "body"'),t.target="body")}function zs(t){Vs(t),t.showLoaderOnConfirm&&!t.preConfirm&&de(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
73
+ `,io=(t,e)=>{t.textContent="",e.iconHtml?se(t,ao(e.iconHtml)):e.icon==="success"?se(t,Ks):e.icon==="error"?se(t,Ys):se(t,ao({question:"?",warning:"!",info:"i"}[e.icon]))},Gs=(t,e)=>{if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])eo(t,n,"backgroundColor",e.iconColor);eo(t,".swal2-success-ring","borderColor",e.iconColor)}},ao=t=>`<div class="${u["icon-content"]}">${t}</div>`,Js=(t,e)=>{const n=Gn();if(!e.imageUrl)return ie(n);ee(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt),_t(n,"width",e.imageWidth),_t(n,"height",e.imageHeight),n.className=u.image,Ce(n,e,"image")},Xs=t=>{const e=document.createElement("li");return H(e,u["progress-step"]),se(e,t),e},Zs=t=>{const e=document.createElement("li");return H(e,u["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e},Qs=(t,e)=>{const n=Jn();if(!e.progressSteps||e.progressSteps.length===0)return ie(n);ee(n),n.textContent="",e.currentProgressStep>=e.progressSteps.length&&fe("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach((o,s)=>{const a=Xs(o);if(n.appendChild(a),s===e.currentProgressStep&&H(a,u["active-progress-step"]),s!==e.progressSteps.length-1){const y=Zs(e);n.appendChild(y)}})},ei=(t,e)=>{const n=Yn();Mt(n,e.title||e.titleText,"block"),e.title&&dn(e.title,n),e.titleText&&(n.innerText=e.titleText),Ce(n,e,"title")},ti=(t,e)=>{const n=re(),o=z();e.toast?(_t(n,"width",e.width),o.style.width="100%",o.insertBefore(tt(),vt())):_t(o,"width",e.width),_t(o,"padding",e.padding),e.color&&(o.style.color=e.color),e.background&&(o.style.background=e.background),ie(Ft()),ni(o,e)},ni=(t,e)=>{t.className=`${u.popup} ${ve(t)?e.showClass.popup:""}`,e.toast?(H([document.documentElement,document.body],u["toast-shown"]),H(t,u.toast)):H(t,u.modal),Ce(t,e,"popup"),typeof e.customClass=="string"&&H(t,e.customClass),e.icon&&H(t,u[`icon-${e.icon}`])},co=(t,e)=>{ti(t,e),Fs(t,e),Qs(t,e),Ws(t,e),Js(t,e),ei(t,e),zs(t,e),Vs(t,e),Is(t,e),js(t,e),typeof e.didRender=="function"&&e.didRender(z())},ot=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),oi=()=>{we(document.body.children).forEach(e=>{e===re()||e.contains(re())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})},lo=()=>{we(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")})},uo=["swal-title","swal-html","swal-footer"],ri=t=>{const e=typeof t.template=="string"?document.querySelector(t.template):t.template;if(!e)return{};const n=e.content;return di(n),Object.assign(si(n),ii(n),ai(n),ci(n),li(n),ui(n,uo))},si=t=>{const e={};return we(t.querySelectorAll("swal-param")).forEach(n=>{qe(n,["name","value"]);const o=n.getAttribute("name"),s=n.getAttribute("value");typeof et[o]=="boolean"&&s==="false"&&(e[o]=!1),typeof et[o]=="object"&&(e[o]=JSON.parse(s))}),e},ii=t=>{const e={};return we(t.querySelectorAll("swal-button")).forEach(n=>{qe(n,["type","color","aria-label"]);const o=n.getAttribute("type");e[`${o}ButtonText`]=n.innerHTML,e[`show${tn(o)}Button`]=!0,n.hasAttribute("color")&&(e[`${o}ButtonColor`]=n.getAttribute("color")),n.hasAttribute("aria-label")&&(e[`${o}ButtonAriaLabel`]=n.getAttribute("aria-label"))}),e},ai=t=>{const e={},n=t.querySelector("swal-image");return n&&(qe(n,["src","width","height","alt"]),n.hasAttribute("src")&&(e.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(e.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(e.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(e.imageAlt=n.getAttribute("alt"))),e},ci=t=>{const e={},n=t.querySelector("swal-icon");return n&&(qe(n,["type","color"]),n.hasAttribute("type")&&(e.icon=n.getAttribute("type")),n.hasAttribute("color")&&(e.iconColor=n.getAttribute("color")),e.iconHtml=n.innerHTML),e},li=t=>{const e={},n=t.querySelector("swal-input");n&&(qe(n,["type","label","placeholder","value"]),e.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(e.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(e.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(e.inputValue=n.getAttribute("value")));const o=t.querySelectorAll("swal-input-option");return o.length&&(e.inputOptions={},we(o).forEach(s=>{qe(s,["value"]);const a=s.getAttribute("value"),y=s.innerHTML;e.inputOptions[a]=y})),e},ui=(t,e)=>{const n={};for(const o in e){const s=e[o],a=t.querySelector(s);a&&(qe(a,[]),n[s.replace(/^swal-/,"")]=a.innerHTML.trim())}return n},di=t=>{const e=uo.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);we(t.children).forEach(n=>{const o=n.tagName.toLowerCase();e.indexOf(o)===-1&&fe(`Unrecognized element <${o}>`)})},qe=(t,e)=>{we(t.attributes).forEach(n=>{e.indexOf(n.name)===-1&&fe([`Unrecognized attribute "${n.name}" on <${t.tagName.toLowerCase()}>.`,`${e.length?`Allowed attributes are: ${e.join(", ")}`:"To set the value, use HTML within the element."}`])})},fo={email:(t,e)=>/^[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 fi(t){t.inputValidator||Object.keys(fo).forEach(e=>{t.input===e&&(t.inputValidator=fo[e])})}function hi(t){(!t.target||typeof t.target=="string"&&!document.querySelector(t.target)||typeof t.target!="string"&&!t.target.appendChild)&&(fe('Target parameter is not valid, defaulting to "body"'),t.target="body")}function pi(t){fi(t),t.showLoaderOnConfirm&&!t.preConfirm&&fe(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
72
74
  showLoaderOnConfirm should be used together with preConfirm, see usage example:
73
- https://sweetalert2.github.io/#ajax-request`),js(t),typeof t.title=="string"&&(t.title=t.title.split(`
74
- `).join("<br />")),ts(t)}class Ws{constructor(e,n){this.callback=e,this.remaining=n,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){const n=this.running;return n&&this.stop(),this.remaining+=e,n&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const qs=()=>{Qe.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(Qe.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${Qe.previousBodyPadding+rs()}px`)},Ks=()=>{Qe.previousBodyPadding!==null&&(document.body.style.paddingRight=`${Qe.previousBodyPadding}px`,Qe.previousBodyPadding=null)},Gs=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!Re(document.body,u.iosfix)){const e=document.body.scrollTop;document.body.style.top=`${e*-1}px`,H(document.body,u.iosfix),Js(),Ys()}},Ys=()=>{const t=navigator.userAgent,e=!!t.match(/iPad/i)||!!t.match(/iPhone/i),n=!!t.match(/WebKit/i);e&&n&&!t.match(/CriOS/i)&&j().scrollHeight>window.innerHeight-44&&(oe().style.paddingBottom="44px")},Js=()=>{const t=oe();let e;t.ontouchstart=n=>{e=Xs(n)},t.ontouchmove=n=>{e&&(n.preventDefault(),n.stopPropagation())}},Xs=t=>{const e=t.target,n=oe();return Zs(t)||Qs(t)?!1:e===n||!Kn(n)&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"&&!(Kn(Pt())&&Pt().contains(e))},Zs=t=>t.touches&&t.touches.length&&t.touches[0].touchType==="stylus",Qs=t=>t.touches&&t.touches.length>1,ei=()=>{if(Re(document.body,u.iosfix)){const t=parseInt(document.body.style.top,10);Pe(document.body,u.iosfix),document.body.style.top="",document.body.scrollTop=t*-1}},ro=10,ti=t=>{const e=oe(),n=j();typeof t.willOpen=="function"&&t.willOpen(n);const i=window.getComputedStyle(document.body).overflowY;ri(e,n,t),setTimeout(()=>{ni(e,n)},ro),tn()&&(oi(e,t.scrollbarPadding,i),Rs()),!Ot()&&!M.previousActiveElement&&(M.previousActiveElement=document.activeElement),typeof t.didOpen=="function"&&setTimeout(()=>t.didOpen(n)),Pe(e,u["no-transition"])},so=t=>{const e=j();if(t.target!==e)return;const n=oe();e.removeEventListener(vt,so),n.style.overflowY="auto"},ni=(t,e)=>{vt&&Gn(e)?(t.style.overflowY="hidden",e.addEventListener(vt,so)):t.style.overflowY="auto"},oi=(t,e,n)=>{Gs(),e&&n!=="hidden"&&qs(),setTimeout(()=>{t.scrollTop=0})},ri=(t,e,n)=>{H(t,n.showClass.backdrop),e.style.setProperty("opacity","0","important"),Q(e,"grid"),setTimeout(()=>{H(e,n.showClass.popup),e.style.removeProperty("opacity")},ro),H([document.documentElement,document.body],u.shown),n.heightAuto&&n.backdrop&&!n.toast&&H([document.documentElement,document.body],u["height-auto"])},tt=t=>{let e=j();e||new ot,e=j();const n=Ze();Ot()?se(bt()):si(e,t),Q(n),e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},si=(t,e)=>{const n=yt(),o=Ze();!e&&we(Se())&&(e=Se()),Q(n),e&&(se(e),o.setAttribute("data-button-to-replace",e.className)),o.parentNode.insertBefore(o,e),H([t,n],u.loading)},ii=(t,e)=>{e.input==="select"||e.input==="radio"?di(t,e):["text","email","number","tel","textarea"].includes(e.input)&&(Jt(e.inputValue)||Xt(e.inputValue))&&(tt(Se()),fi(t,e))},ai=(t,e)=>{const n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return li(n);case"radio":return ci(n);case"file":return ui(n);default:return e.inputAutoTrim?n.value.trim():n.value}},li=t=>t.checked?1:0,ci=t=>t.checked?t.value:null,ui=t=>t.files.length?t.getAttribute("multiple")!==null?t.files:t.files[0]:null,di=(t,e)=>{const n=j(),o=i=>hi[e.input](n,ln(i),e);Jt(e.inputOptions)||Xt(e.inputOptions)?(tt(Se()),pt(e.inputOptions).then(i=>{t.hideLoading(),o(i)})):typeof e.inputOptions=="object"?o(e.inputOptions):He(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`)},fi=(t,e)=>{const n=t.getInput();se(n),pt(e.inputValue).then(o=>{n.value=e.input==="number"?parseFloat(o)||0:`${o}`,Q(n),n.focus(),t.hideLoading()}).catch(o=>{He(`Error in inputValue promise: ${o}`),n.value="",Q(n),n.focus(),t.hideLoading()})},hi={select:(t,e,n)=>{const o=Ue(t,u.select),i=(c,E,I)=>{const d=document.createElement("option");d.value=I,re(d,E),d.selected=io(I,n.inputValue),c.appendChild(d)};e.forEach(c=>{const E=c[0],I=c[1];if(Array.isArray(I)){const d=document.createElement("optgroup");d.label=E,d.disabled=!1,o.appendChild(d),I.forEach(V=>i(d,V[1],V[0]))}else i(o,I,E)}),o.focus()},radio:(t,e,n)=>{const o=Ue(t,u.radio);e.forEach(c=>{const E=c[0],I=c[1],d=document.createElement("input"),V=document.createElement("label");d.type="radio",d.name=u.radio,d.value=E,io(E,n.inputValue)&&(d.checked=!0);const W=document.createElement("span");re(W,I),W.className=u.label,V.appendChild(d),V.appendChild(W),o.appendChild(V)});const i=o.querySelectorAll("input");i.length&&i[0].focus()}},ln=t=>{const e=[];return typeof Map<"u"&&t instanceof Map?t.forEach((n,o)=>{let i=n;typeof i=="object"&&(i=ln(i)),e.push([o,i])}):Object.keys(t).forEach(n=>{let o=t[n];typeof o=="object"&&(o=ln(o)),e.push([n,o])}),e},io=(t,e)=>e&&e.toString()===t.toString();function ao(){const t=U.innerParams.get(this);if(!t)return;const e=U.domCache.get(this);se(e.loader),Ot()?t.icon&&Q(bt()):pi(e),Pe([e.popup,e.actions],u.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}const pi=t=>{const e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?Q(e[0],"inline-block"):zr()&&se(t.actions)};function mi(t){const e=U.innerParams.get(t||this),n=U.domCache.get(t||this);return n?nn(n.popup,e.input):null}const _t={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},gi=()=>we(j()),lo=()=>Se()&&Se().click(),bi=()=>Ne()&&Ne().click(),yi=()=>Ve()&&Ve().click(),co=t=>{t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},wi=(t,e,n,o)=>{co(e),n.toast||(e.keydownHandler=i=>ki(t,i,o),e.keydownTarget=n.keydownListenerCapture?window:j(),e.keydownListenerCapture=n.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)},cn=(t,e,n)=>{const o=en();if(o.length)return e=e+n,e===o.length?e=0:e===-1&&(e=o.length-1),o[e].focus();j().focus()},uo=["ArrowRight","ArrowDown"],vi=["ArrowLeft","ArrowUp"],ki=(t,e,n)=>{const o=U.innerParams.get(t);o&&(e.isComposing||e.keyCode===229||(o.stopKeydownPropagation&&e.stopPropagation(),e.key==="Enter"?_i(t,e,o):e.key==="Tab"?Ci(e,o):[...uo,...vi].includes(e.key)?Ai(e.key):e.key==="Escape"&&Ei(e,o,n)))},_i=(t,e,n)=>{if(It(n.allowEnterKey)&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;lo(),e.preventDefault()}},Ci=(t,e)=>{const n=t.target,o=en();let i=-1;for(let c=0;c<o.length;c++)if(n===o[c]){i=c;break}t.shiftKey?cn(e,i,-1):cn(e,i,1),t.stopPropagation(),t.preventDefault()},Ai=t=>{const e=Se(),n=Ne(),o=Ve();if(![e,n,o].includes(document.activeElement))return;const i=uo.includes(t)?"nextElementSibling":"previousElementSibling";let c=document.activeElement;for(let E=0;E<yt().children.length;E++){if(c=c[i],!c)return;if(we(c)&&c instanceof HTMLButtonElement)break}c instanceof HTMLButtonElement&&c.focus()},Ei=(t,e,n)=>{It(e.allowEscapeKey)&&(t.preventDefault(),n(et.esc))};function fo(t,e,n,o){Ot()?ho(t,o):(Gr(n).then(()=>ho(t,o)),co(M)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),tn()&&(Ks(),ei(),to()),xi()}function xi(){Pe([document.documentElement,document.body],[u.shown,u["height-auto"],u["no-backdrop"],u["toast-shown"]])}function Mt(t){t=Ii(t);const e=_t.swalPromiseResolve.get(this),n=Ti(this);this.isAwaitingPromise()?t.isDismissed||(Ct(this),e(t)):n&&e(t)}function Si(){return!!U.awaitingPromise.get(this)}const Ti=t=>{const e=j();if(!e)return!1;const n=U.innerParams.get(t);if(!n||Re(e,n.hideClass.popup))return!1;Pe(e,n.showClass.popup),H(e,n.hideClass.popup);const o=oe();return Pe(o,n.showClass.backdrop),H(o,n.hideClass.backdrop),Pi(t,e,n),!0};function Li(t){const e=_t.swalPromiseReject.get(this);Ct(this),e&&e(t)}const Ct=t=>{t.isAwaitingPromise()&&(U.awaitingPromise.delete(t),U.innerParams.get(t)||t._destroy())},Ii=t=>typeof t>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),Pi=(t,e,n)=>{const o=oe(),i=vt&&Gn(e);typeof n.willClose=="function"&&n.willClose(e),i?Bi(t,e,o,n.returnFocus,n.didClose):fo(t,o,n.returnFocus,n.didClose)},Bi=(t,e,n,o,i)=>{M.swalCloseEventFinishedCallback=fo.bind(null,t,n,o,i),e.addEventListener(vt,function(c){c.target===e&&(M.swalCloseEventFinishedCallback(),delete M.swalCloseEventFinishedCallback)})},ho=(t,e)=>{setTimeout(()=>{typeof e=="function"&&e.bind(t.params)(),t._destroy()})};function po(t,e,n){const o=U.domCache.get(t);e.forEach(i=>{o[i].disabled=n})}function mo(t,e){if(!t)return!1;if(t.type==="radio"){const o=t.parentNode.parentNode.querySelectorAll("input");for(let i=0;i<o.length;i++)o[i].disabled=e}else t.disabled=e}function Ri(){po(this,["confirmButton","denyButton","cancelButton"],!1)}function Oi(){po(this,["confirmButton","denyButton","cancelButton"],!0)}function Fi(){return mo(this.getInput(),!1)}function Mi(){return mo(this.getInput(),!0)}function Ni(t){const e=U.domCache.get(this),n=U.innerParams.get(this);re(e.validationMessage,t),e.validationMessage.className=u["validation-message"],n.customClass&&n.customClass.validationMessage&&H(e.validationMessage,n.customClass.validationMessage),Q(e.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",u["validation-message"]),zn(o),H(o,u.inputerror))}function Ui(){const t=U.domCache.get(this);t.validationMessage&&se(t.validationMessage);const e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedby"),Pe(e,u.inputerror))}function Di(){return U.domCache.get(this).progressSteps}function $i(t){const e=j(),n=U.innerParams.get(this);if(!e||Re(e,n.hideClass.popup))return de("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 o=Hi(t),i=Object.assign({},n,o);eo(this,i),U.innerParams.set(this,i),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}const Hi=t=>{const e={};return Object.keys(t).forEach(n=>{Un(n)?e[n]=t[n]:de(`Invalid parameter to update: "${n}". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js
75
+ https://sweetalert2.github.io/#ajax-request`),hi(t),typeof t.title=="string"&&(t.title=t.title.split(`
76
+ `).join("<br />")),Cs(t)}class mi{constructor(e,n){this.callback=e,this.remaining=n,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){const n=this.running;return n&&this.stop(),this.remaining+=e,n&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const gi=()=>{nt.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(nt.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${nt.previousBodyPadding+Ss()}px`)},bi=()=>{nt.previousBodyPadding!==null&&(document.body.style.paddingRight=`${nt.previousBodyPadding}px`,nt.previousBodyPadding=null)},yi=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!Re(document.body,u.iosfix)){const e=document.body.scrollTop;document.body.style.top=`${e*-1}px`,H(document.body,u.iosfix),vi(),wi()}},wi=()=>{const t=navigator.userAgent,e=!!t.match(/iPad/i)||!!t.match(/iPhone/i),n=!!t.match(/WebKit/i);e&&n&&!t.match(/CriOS/i)&&z().scrollHeight>window.innerHeight-44&&(re().style.paddingBottom="44px")},vi=()=>{const t=re();let e;t.ontouchstart=n=>{e=ki(n)},t.ontouchmove=n=>{e&&(n.preventDefault(),n.stopPropagation())}},ki=t=>{const e=t.target,n=re();return _i(t)||Ei(t)?!1:e===n||!to(n)&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"&&!(to(Rt())&&Rt().contains(e))},_i=t=>t.touches&&t.touches.length&&t.touches[0].touchType==="stylus",Ei=t=>t.touches&&t.touches.length>1,Ai=()=>{if(Re(document.body,u.iosfix)){const t=parseInt(document.body.style.top,10);Be(document.body,u.iosfix),document.body.style.top="",document.body.scrollTop=t*-1}},ho=10,Ci=t=>{const e=re(),n=z();typeof t.willOpen=="function"&&t.willOpen(n);const s=window.getComputedStyle(document.body).overflowY;Si(e,n,t),setTimeout(()=>{xi(e,n)},ho),cn()&&(Ti(e,t.scrollbarPadding,s),oi()),!Dt()&&!F.previousActiveElement&&(F.previousActiveElement=document.activeElement),typeof t.didOpen=="function"&&setTimeout(()=>t.didOpen(n)),Be(e,u["no-transition"])},po=t=>{const e=z();if(t.target!==e)return;const n=re();e.removeEventListener(Et,po),n.style.overflowY="auto"},xi=(t,e)=>{Et&&no(e)?(t.style.overflowY="hidden",e.addEventListener(Et,po)):t.style.overflowY="auto"},Ti=(t,e,n)=>{yi(),e&&n!=="hidden"&&gi(),setTimeout(()=>{t.scrollTop=0})},Si=(t,e,n)=>{H(t,n.showClass.backdrop),e.style.setProperty("opacity","0","important"),ee(e,"grid"),setTimeout(()=>{H(e,n.showClass.popup),e.style.removeProperty("opacity")},ho),H([document.documentElement,document.body],u.shown),n.heightAuto&&n.backdrop&&!n.toast&&H([document.documentElement,document.body],u["height-auto"])},rt=t=>{let e=z();e||new it,e=z();const n=tt();Dt()?ie(vt()):Ii(e,t),ee(n),e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},Ii=(t,e)=>{const n=kt(),o=tt();!e&&ve(Se())&&(e=Se()),ee(n),e&&(ie(e),o.setAttribute("data-button-to-replace",e.className)),o.parentNode.insertBefore(o,e),H([t,n],u.loading)},Li=(t,e)=>{e.input==="select"||e.input==="radio"?Fi(t,e):["text","email","number","tel","textarea"].includes(e.input)&&(nn(e.inputValue)||on(e.inputValue))&&(rt(Se()),Ni(t,e))},Pi=(t,e)=>{const n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return Bi(n);case"radio":return Oi(n);case"file":return Ri(n);default:return e.inputAutoTrim?n.value.trim():n.value}},Bi=t=>t.checked?1:0,Oi=t=>t.checked?t.value:null,Ri=t=>t.files.length?t.getAttribute("multiple")!==null?t.files:t.files[0]:null,Fi=(t,e)=>{const n=z(),o=s=>Di[e.input](n,pn(s),e);nn(e.inputOptions)||on(e.inputOptions)?(rt(Se()),bt(e.inputOptions).then(s=>{t.hideLoading(),o(s)})):typeof e.inputOptions=="object"?o(e.inputOptions):je(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`)},Ni=(t,e)=>{const n=t.getInput();ie(n),bt(e.inputValue).then(o=>{n.value=e.input==="number"?parseFloat(o)||0:`${o}`,ee(n),n.focus(),t.hideLoading()}).catch(o=>{je(`Error in inputValue promise: ${o}`),n.value="",ee(n),n.focus(),t.hideLoading()})},Di={select:(t,e,n)=>{const o=$e(t,u.select),s=(a,y,T)=>{const d=document.createElement("option");d.value=T,se(d,y),d.selected=mo(T,n.inputValue),a.appendChild(d)};e.forEach(a=>{const y=a[0],T=a[1];if(Array.isArray(T)){const d=document.createElement("optgroup");d.label=y,d.disabled=!1,o.appendChild(d),T.forEach(V=>s(d,V[1],V[0]))}else s(o,T,y)}),o.focus()},radio:(t,e,n)=>{const o=$e(t,u.radio);e.forEach(a=>{const y=a[0],T=a[1],d=document.createElement("input"),V=document.createElement("label");d.type="radio",d.name=u.radio,d.value=y,mo(y,n.inputValue)&&(d.checked=!0);const j=document.createElement("span");se(j,T),j.className=u.label,V.appendChild(d),V.appendChild(j),o.appendChild(V)});const s=o.querySelectorAll("input");s.length&&s[0].focus()}},pn=t=>{const e=[];return typeof Map<"u"&&t instanceof Map?t.forEach((n,o)=>{let s=n;typeof s=="object"&&(s=pn(s)),e.push([o,s])}):Object.keys(t).forEach(n=>{let o=t[n];typeof o=="object"&&(o=pn(o)),e.push([n,o])}),e},mo=(t,e)=>e&&e.toString()===t.toString();function go(){const t=D.innerParams.get(this);if(!t)return;const e=D.domCache.get(this);ie(e.loader),Dt()?t.icon&&ee(vt()):Mi(e),Be([e.popup,e.actions],u.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}const Mi=t=>{const e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?ee(e[0],"inline-block"):ps()&&ie(t.actions)};function Ui(t){const e=D.innerParams.get(t||this),n=D.domCache.get(t||this);return n?ln(n.popup,e.input):null}const Ct={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},$i=()=>ve(z()),bo=()=>Se()&&Se().click(),Hi=()=>Ue()&&Ue().click(),Vi=()=>ze()&&ze().click(),yo=t=>{t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},ji=(t,e,n,o)=>{yo(e),n.toast||(e.keydownHandler=s=>Wi(t,s,o),e.keydownTarget=n.keydownListenerCapture?window:z(),e.keydownListenerCapture=n.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)},mn=(t,e,n)=>{const o=an();if(o.length)return e=e+n,e===o.length?e=0:e===-1&&(e=o.length-1),o[e].focus();z().focus()},wo=["ArrowRight","ArrowDown"],zi=["ArrowLeft","ArrowUp"],Wi=(t,e,n)=>{const o=D.innerParams.get(t);o&&(e.isComposing||e.keyCode===229||(o.stopKeydownPropagation&&e.stopPropagation(),e.key==="Enter"?qi(t,e,o):e.key==="Tab"?Ki(e,o):[...wo,...zi].includes(e.key)?Yi(e.key):e.key==="Escape"&&Gi(e,o,n)))},qi=(t,e,n)=>{if(Ot(n.allowEnterKey)&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;bo(),e.preventDefault()}},Ki=(t,e)=>{const n=t.target,o=an();let s=-1;for(let a=0;a<o.length;a++)if(n===o[a]){s=a;break}t.shiftKey?mn(e,s,-1):mn(e,s,1),t.stopPropagation(),t.preventDefault()},Yi=t=>{const e=Se(),n=Ue(),o=ze();if(![e,n,o].includes(document.activeElement))return;const s=wo.includes(t)?"nextElementSibling":"previousElementSibling";let a=document.activeElement;for(let y=0;y<kt().children.length;y++){if(a=a[s],!a)return;if(ve(a)&&a instanceof HTMLButtonElement)break}a instanceof HTMLButtonElement&&a.focus()},Gi=(t,e,n)=>{Ot(e.allowEscapeKey)&&(t.preventDefault(),n(ot.esc))};function vo(t,e,n,o){Dt()?ko(t,o):(ys(n).then(()=>ko(t,o)),yo(F)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),cn()&&(bi(),Ai(),lo()),Ji()}function Ji(){Be([document.documentElement,document.body],[u.shown,u["height-auto"],u["no-backdrop"],u["toast-shown"]])}function Ut(t){t=ea(t);const e=Ct.swalPromiseResolve.get(this),n=Zi(this);this.isAwaitingPromise()?t.isDismissed||(xt(this),e(t)):n&&e(t)}function Xi(){return!!D.awaitingPromise.get(this)}const Zi=t=>{const e=z();if(!e)return!1;const n=D.innerParams.get(t);if(!n||Re(e,n.hideClass.popup))return!1;Be(e,n.showClass.popup),H(e,n.hideClass.popup);const o=re();return Be(o,n.showClass.backdrop),H(o,n.hideClass.backdrop),ta(t,e,n),!0};function Qi(t){const e=Ct.swalPromiseReject.get(this);xt(this),e&&e(t)}const xt=t=>{t.isAwaitingPromise()&&(D.awaitingPromise.delete(t),D.innerParams.get(t)||t._destroy())},ea=t=>typeof t>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),ta=(t,e,n)=>{const o=re(),s=Et&&no(e);typeof n.willClose=="function"&&n.willClose(e),s?na(t,e,o,n.returnFocus,n.didClose):vo(t,o,n.returnFocus,n.didClose)},na=(t,e,n,o,s)=>{F.swalCloseEventFinishedCallback=vo.bind(null,t,n,o,s),e.addEventListener(Et,function(a){a.target===e&&(F.swalCloseEventFinishedCallback(),delete F.swalCloseEventFinishedCallback)})},ko=(t,e)=>{setTimeout(()=>{typeof e=="function"&&e.bind(t.params)(),t._destroy()})};function _o(t,e,n){const o=D.domCache.get(t);e.forEach(s=>{o[s].disabled=n})}function Eo(t,e){if(!t)return!1;if(t.type==="radio"){const o=t.parentNode.parentNode.querySelectorAll("input");for(let s=0;s<o.length;s++)o[s].disabled=e}else t.disabled=e}function oa(){_o(this,["confirmButton","denyButton","cancelButton"],!1)}function ra(){_o(this,["confirmButton","denyButton","cancelButton"],!0)}function sa(){return Eo(this.getInput(),!1)}function ia(){return Eo(this.getInput(),!0)}function aa(t){const e=D.domCache.get(this),n=D.innerParams.get(this);se(e.validationMessage,t),e.validationMessage.className=u["validation-message"],n.customClass&&n.customClass.validationMessage&&H(e.validationMessage,n.customClass.validationMessage),ee(e.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",u["validation-message"]),Zn(o),H(o,u.inputerror))}function ca(){const t=D.domCache.get(this);t.validationMessage&&ie(t.validationMessage);const e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedby"),Be(e,u.inputerror))}function la(){return D.domCache.get(this).progressSteps}function ua(t){const e=z(),n=D.innerParams.get(this);if(!e||Re(e,n.hideClass.popup))return fe("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 o=da(t),s=Object.assign({},n,o);co(this,s),D.innerParams.set(this,s),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}const da=t=>{const e={};return Object.keys(t).forEach(n=>{qn(n)?e[n]=t[n]:fe(`Invalid parameter to update: "${n}". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js
75
77
 
76
- If you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md`)}),e};function Vi(){const t=U.domCache.get(this),e=U.innerParams.get(this);if(!e){go(this);return}t.popup&&M.swalCloseEventFinishedCallback&&(M.swalCloseEventFinishedCallback(),delete M.swalCloseEventFinishedCallback),M.deferDisposalTimer&&(clearTimeout(M.deferDisposalTimer),delete M.deferDisposalTimer),typeof e.didDestroy=="function"&&e.didDestroy(),ji(this)}const ji=t=>{go(t),delete t.params,delete M.keydownHandler,delete M.keydownTarget,delete M.currentInstance},go=t=>{t.isAwaitingPromise()?(un(U,t),U.awaitingPromise.set(t,!0)):(un(_t,t),un(U,t))},un=(t,e)=>{for(const n in t)t[n].delete(e)},bo=Object.freeze(Object.defineProperty({__proto__:null,_destroy:Vi,close:Mt,closeModal:Mt,closePopup:Mt,closeToast:Mt,disableButtons:Oi,disableInput:Mi,disableLoading:ao,enableButtons:Ri,enableInput:Fi,getInput:mi,getProgressSteps:Di,handleAwaitingPromise:Ct,hideLoading:ao,isAwaitingPromise:Si,rejectPromise:Li,resetValidationMessage:Ui,showValidationMessage:Ni,update:$i},Symbol.toStringTag,{value:"Module"})),zi=t=>{const e=U.innerParams.get(t);t.disableButtons(),e.input?yo(t,"confirm"):fn(t,!0)},Wi=t=>{const e=U.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?yo(t,"deny"):dn(t,!1)},qi=(t,e)=>{t.disableButtons(),e(et.cancel)},yo=(t,e)=>{const n=U.innerParams.get(t);if(!n.input)return He(`The "input" parameter is needed to be set when using returnInputValueOn${Yt(e)}`);const o=ai(t,n);n.inputValidator?Ki(t,o,e):t.getInput().checkValidity()?e==="deny"?dn(t,o):fn(t,o):(t.enableButtons(),t.showValidationMessage(n.validationMessage))},Ki=(t,e,n)=>{const o=U.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>pt(o.inputValidator(e,o.validationMessage))).then(c=>{t.enableButtons(),t.enableInput(),c?t.showValidationMessage(c):n==="deny"?dn(t,e):fn(t,e)})},dn=(t,e)=>{const n=U.innerParams.get(t||globalThis);n.showLoaderOnDeny&&tt(Ne()),n.preDeny?(U.awaitingPromise.set(t||globalThis,!0),Promise.resolve().then(()=>pt(n.preDeny(e,n.validationMessage))).then(i=>{i===!1?(t.hideLoading(),Ct(t)):t.closePopup({isDenied:!0,value:typeof i>"u"?e:i})}).catch(i=>vo(t||globalThis,i))):t.closePopup({isDenied:!0,value:e})},wo=(t,e)=>{t.closePopup({isConfirmed:!0,value:e})},vo=(t,e)=>{t.rejectPromise(e)},fn=(t,e)=>{const n=U.innerParams.get(t||globalThis);n.showLoaderOnConfirm&&tt(),n.preConfirm?(t.resetValidationMessage(),U.awaitingPromise.set(t||globalThis,!0),Promise.resolve().then(()=>pt(n.preConfirm(e,n.validationMessage))).then(i=>{we(Bt())||i===!1?(t.hideLoading(),Ct(t)):wo(t,typeof i>"u"?e:i)}).catch(i=>vo(t||globalThis,i))):wo(t,e)},Gi=(t,e,n)=>{U.innerParams.get(t).toast?Yi(t,e,n):(Xi(e),Zi(e),Qi(t,e,n))},Yi=(t,e,n)=>{e.popup.onclick=()=>{const o=U.innerParams.get(t);o&&(Ji(o)||o.timer||o.input)||n(et.close)}},Ji=t=>t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton;let Nt=!1;const Xi=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(Nt=!0)}}},Zi=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,(e.target===t.popup||t.popup.contains(e.target))&&(Nt=!0)}}},Qi=(t,e,n)=>{e.container.onclick=o=>{const i=U.innerParams.get(t);if(Nt){Nt=!1;return}o.target===e.container&&It(i.allowOutsideClick)&&n(et.backdrop)}},ea=t=>typeof t=="object"&&t.jquery,ko=t=>t instanceof Element||ea(t),ta=t=>{const e={};return typeof t[0]=="object"&&!ko(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((n,o)=>{const i=t[o];typeof i=="string"||ko(i)?e[n]=i:i!==void 0&&He(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`)}),e};function na(...t){const e=this;return new e(...t)}function oa(t){class e extends this{_main(o,i){return super._main(o,Object.assign({},t,i))}}return e}const ra=()=>M.timeout&&M.timeout.getTimerLeft(),_o=()=>{if(M.timeout)return Wr(),M.timeout.stop()},Co=()=>{if(M.timeout){const t=M.timeout.start();return on(t),t}},sa=()=>{const t=M.timeout;return t&&(t.running?_o():Co())},ia=t=>{if(M.timeout){const e=M.timeout.increase(t);return on(e,!0),e}},aa=()=>M.timeout&&M.timeout.isRunning();let Ao=!1;const hn={};function la(t="data-swal-template"){hn[t]=this,Ao||(document.body.addEventListener("click",ca),Ao=!0)}const ca=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const n in hn){const o=e.getAttribute(n);if(o){hn[n].fire({template:o});return}}},ua=Object.freeze(Object.defineProperty({__proto__:null,argsToParams:ta,bindClickHandler:la,clickCancel:yi,clickConfirm:lo,clickDeny:bi,enableLoading:tt,fire:na,getActions:yt,getCancelButton:Ve,getCloseButton:Qt,getConfirmButton:Se,getContainer:oe,getDenyButton:Ne,getFocusableElements:en,getFooter:jn,getHtmlContainer:Pt,getIcon:bt,getImage:Hn,getInputLabel:$r,getLoader:Ze,getPopup:j,getTimerLeft:ra,getTimerProgressBar:Rt,getTitle:$n,getValidationMessage:Bt,increaseTimer:ia,isDeprecatedParameter:Zt,isLoading:Vr,isTimerRunning:aa,isUpdatableParameter:Un,isValidParameter:Nn,isVisible:gi,mixin:oa,resumeTimer:Co,showLoading:tt,stopTimer:_o,toggleTimer:sa},Symbol.toStringTag,{value:"Module"}));let pn;class nt{constructor(...e){if(typeof window>"u")return;pn=this;const n=Object.freeze(this.constructor.argsToParams(e));Object.defineProperties(this,{params:{value:n,writable:!1,enumerable:!0,configurable:!0}});const o=this._main(this.params);U.promise.set(this,o)}_main(e,n={}){Ur(Object.assign({},n,e)),M.currentInstance&&(M.currentInstance._destroy(),tn()&&to()),M.currentInstance=this;const o=fa(e,n);zs(o),Object.freeze(o),M.timeout&&(M.timeout.stop(),delete M.timeout),clearTimeout(M.restoreFocusTimeout);const i=ha(this);return eo(this,o),U.innerParams.set(this,o),da(this,i,o)}then(e){return U.promise.get(this).then(e)}finally(e){return U.promise.get(this).finally(e)}}const da=(t,e,n)=>new Promise((o,i)=>{const c=E=>{t.closePopup({isDismissed:!0,dismiss:E})};_t.swalPromiseResolve.set(t,o),_t.swalPromiseReject.set(t,i),e.confirmButton.onclick=()=>zi(t),e.denyButton.onclick=()=>Wi(t),e.cancelButton.onclick=()=>qi(t,c),e.closeButton.onclick=()=>c(et.close),Gi(t,e,c),wi(t,M,n,c),ii(t,n),ti(n),pa(M,n,c),ma(e,n),setTimeout(()=>{e.container.scrollTop=0})}),fa=(t,e)=>{const n=Os(t),o=Object.assign({},Xe,e,n,t);return o.showClass=Object.assign({},Xe.showClass,o.showClass),o.hideClass=Object.assign({},Xe.hideClass,o.hideClass),o},ha=t=>{const e={popup:j(),container:oe(),actions:yt(),confirmButton:Se(),denyButton:Ne(),cancelButton:Ve(),loader:Ze(),closeButton:Qt(),validationMessage:Bt(),progressSteps:Vn()};return U.domCache.set(t,e),e},pa=(t,e,n)=>{const o=Rt();se(o),e.timer&&(t.timeout=new Ws(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(Q(o),Ee(o,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&on(e.timer)})))},ma=(t,e)=>{if(!e.toast){if(!It(e.allowEnterKey))return ba();ga(t,e)||cn(e,-1,1)}},ga=(t,e)=>e.focusDeny&&we(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&we(t.cancelButton)?(t.cancelButton.focus(),!0):e.focusConfirm&&we(t.confirmButton)?(t.confirmButton.focus(),!0):!1,ba=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};Object.assign(nt.prototype,bo),Object.assign(nt,ua),Object.keys(bo).forEach(t=>{nt[t]=function(...e){if(pn)return pn[t](...e)}}),nt.DismissReason=et,nt.version="11.4.8";const ot=nt;ot.default=ot;/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */const{entries:Eo,setPrototypeOf:xo,isFrozen:ya,getPrototypeOf:wa,getOwnPropertyDescriptor:So}=Object;let{freeze:le,seal:Te,create:To}=Object,{apply:mn,construct:gn}=typeof Reflect<"u"&&Reflect;le||(le=function(e){return e}),Te||(Te=function(e){return e}),mn||(mn=function(e,n,o){return e.apply(n,o)}),gn||(gn=function(e,n){return new e(...n)});const Ut=xe(Array.prototype.forEach),Lo=xe(Array.prototype.pop),At=xe(Array.prototype.push),Dt=xe(String.prototype.toLowerCase),bn=xe(String.prototype.toString),va=xe(String.prototype.match),Et=xe(String.prototype.replace),ka=xe(String.prototype.indexOf),_a=xe(String.prototype.trim),ve=xe(RegExp.prototype.test),xt=Ca(TypeError);function xe(t){return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return mn(t,e,o)}}function Ca(t){return function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return gn(t,n)}}function N(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Dt;xo&&xo(t,null);let o=e.length;for(;o--;){let i=e[o];if(typeof i=="string"){const c=n(i);c!==i&&(ya(e)||(e[o]=c),i=c)}t[i]=!0}return t}function rt(t){const e=To(null);for(const[n,o]of Eo(t))So(t,n)!==void 0&&(e[n]=o);return e}function $t(t,e){for(;t!==null;){const o=So(t,e);if(o){if(o.get)return xe(o.get);if(typeof o.value=="function")return xe(o.value)}t=wa(t)}function n(o){return console.warn("fallback value for",o),null}return n}const Io=le(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),yn=le(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),wn=le(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Aa=le(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),vn=le(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ea=le(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Po=le(["#text"]),Bo=le(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),kn=le(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ro=le(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ht=le(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),xa=Te(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Sa=Te(/<%[\w\W]*|[\w\W]*%>/gm),Ta=Te(/\${[\w\W]*}/gm),La=Te(/^data-[\-\w.\u00B7-\uFFFF]/),Ia=Te(/^aria-[\-\w]+$/),Oo=Te(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Pa=Te(/^(?:\w+script|data):/i),Ba=Te(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Fo=Te(/^html$/i);var Mo=Object.freeze({__proto__:null,MUSTACHE_EXPR:xa,ERB_EXPR:Sa,TMPLIT_EXPR:Ta,DATA_ATTR:La,ARIA_ATTR:Ia,IS_ALLOWED_URI:Oo,IS_SCRIPT_OR_DATA:Pa,ATTR_WHITESPACE:Ba,DOCTYPE_NAME:Fo});const Ra=function(){return typeof window>"u"?null:window},Oa=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let o=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(o=n.getAttribute(i));const c="dompurify"+(o?"#"+o:"");try{return e.createPolicy(c,{createHTML(E){return E},createScriptURL(E){return E}})}catch{return console.warn("TrustedTypes policy "+c+" could not be created."),null}};function No(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ra();const e=L=>No(L);if(e.version="3.0.6",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let{document:n}=t;const o=n,i=o.currentScript,{DocumentFragment:c,HTMLTemplateElement:E,Node:I,Element:d,NodeFilter:V,NamedNodeMap:W=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:ee,DOMParser:Le,trustedTypes:z}=t,Oe=d.prototype,st=$t(Oe,"cloneNode"),ke=$t(Oe,"nextSibling"),it=$t(Oe,"childNodes"),he=$t(Oe,"parentNode");if(typeof E=="function"){const L=n.createElement("template");L.content&&L.content.ownerDocument&&(n=L.content.ownerDocument)}let D,_e="";const{implementation:X,createNodeIterator:h,createDocumentFragment:_,getElementsByTagName:P}=n,{importNode:C}=o;let k={};e.isSupported=typeof Eo=="function"&&typeof he=="function"&&X&&X.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:v,ERB_EXPR:O,TMPLIT_EXPR:m,DATA_ATTR:F,ARIA_ATTR:q,IS_SCRIPT_OR_DATA:J,ATTR_WHITESPACE:Y}=Mo;let{IS_ALLOWED_URI:ce}=Mo,B=null;const pe=N({},[...Io,...yn,...wn,...vn,...Po]);let r=null;const a=N({},[...Bo,...kn,...Ro,...Ht]);let f=Object.seal(To(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),b=null,p=null,A=!0,g=!0,y=!1,S=!0,x=!1,R=!1,$=!1,me=!1,ue=!1,te=!1,Be=!1,$o=!0,Ho=!1;const bl="user-content-";let Cn=!0,St=!1,at={},lt=null;const Vo=N({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let jo=null;const zo=N({},["audio","video","img","source","image","track"]);let An=null;const Wo=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Vt="http://www.w3.org/1998/Math/MathML",jt="http://www.w3.org/2000/svg",Fe="http://www.w3.org/1999/xhtml";let ct=Fe,En=!1,xn=null;const yl=N({},[Vt,jt,Fe],bn);let We=null;const wl=["application/xhtml+xml","text/html"],vl="text/html";let Z=null,ut=null;const kl=n.createElement("form"),qo=function(s){return s instanceof RegExp||s instanceof Function},Sn=function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ut&&ut===s)){if((!s||typeof s!="object")&&(s={}),s=rt(s),We=wl.indexOf(s.PARSER_MEDIA_TYPE)===-1?We=vl:We=s.PARSER_MEDIA_TYPE,Z=We==="application/xhtml+xml"?bn:Dt,B="ALLOWED_TAGS"in s?N({},s.ALLOWED_TAGS,Z):pe,r="ALLOWED_ATTR"in s?N({},s.ALLOWED_ATTR,Z):a,xn="ALLOWED_NAMESPACES"in s?N({},s.ALLOWED_NAMESPACES,bn):yl,An="ADD_URI_SAFE_ATTR"in s?N(rt(Wo),s.ADD_URI_SAFE_ATTR,Z):Wo,jo="ADD_DATA_URI_TAGS"in s?N(rt(zo),s.ADD_DATA_URI_TAGS,Z):zo,lt="FORBID_CONTENTS"in s?N({},s.FORBID_CONTENTS,Z):Vo,b="FORBID_TAGS"in s?N({},s.FORBID_TAGS,Z):{},p="FORBID_ATTR"in s?N({},s.FORBID_ATTR,Z):{},at="USE_PROFILES"in s?s.USE_PROFILES:!1,A=s.ALLOW_ARIA_ATTR!==!1,g=s.ALLOW_DATA_ATTR!==!1,y=s.ALLOW_UNKNOWN_PROTOCOLS||!1,S=s.ALLOW_SELF_CLOSE_IN_ATTR!==!1,x=s.SAFE_FOR_TEMPLATES||!1,R=s.WHOLE_DOCUMENT||!1,ue=s.RETURN_DOM||!1,te=s.RETURN_DOM_FRAGMENT||!1,Be=s.RETURN_TRUSTED_TYPE||!1,me=s.FORCE_BODY||!1,$o=s.SANITIZE_DOM!==!1,Ho=s.SANITIZE_NAMED_PROPS||!1,Cn=s.KEEP_CONTENT!==!1,St=s.IN_PLACE||!1,ce=s.ALLOWED_URI_REGEXP||Oo,ct=s.NAMESPACE||Fe,f=s.CUSTOM_ELEMENT_HANDLING||{},s.CUSTOM_ELEMENT_HANDLING&&qo(s.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(f.tagNameCheck=s.CUSTOM_ELEMENT_HANDLING.tagNameCheck),s.CUSTOM_ELEMENT_HANDLING&&qo(s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(f.attributeNameCheck=s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),s.CUSTOM_ELEMENT_HANDLING&&typeof s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(f.allowCustomizedBuiltInElements=s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),x&&(g=!1),te&&(ue=!0),at&&(B=N({},[...Po]),r=[],at.html===!0&&(N(B,Io),N(r,Bo)),at.svg===!0&&(N(B,yn),N(r,kn),N(r,Ht)),at.svgFilters===!0&&(N(B,wn),N(r,kn),N(r,Ht)),at.mathMl===!0&&(N(B,vn),N(r,Ro),N(r,Ht))),s.ADD_TAGS&&(B===pe&&(B=rt(B)),N(B,s.ADD_TAGS,Z)),s.ADD_ATTR&&(r===a&&(r=rt(r)),N(r,s.ADD_ATTR,Z)),s.ADD_URI_SAFE_ATTR&&N(An,s.ADD_URI_SAFE_ATTR,Z),s.FORBID_CONTENTS&&(lt===Vo&&(lt=rt(lt)),N(lt,s.FORBID_CONTENTS,Z)),Cn&&(B["#text"]=!0),R&&N(B,["html","head","body"]),B.table&&(N(B,["tbody"]),delete b.tbody),s.TRUSTED_TYPES_POLICY){if(typeof s.TRUSTED_TYPES_POLICY.createHTML!="function")throw xt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof s.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw xt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');D=s.TRUSTED_TYPES_POLICY,_e=D.createHTML("")}else D===void 0&&(D=Oa(z,i)),D!==null&&typeof _e=="string"&&(_e=D.createHTML(""));le&&le(s),ut=s}},Ko=N({},["mi","mo","mn","ms","mtext"]),Go=N({},["foreignobject","desc","title","annotation-xml"]),_l=N({},["title","style","font","a","script"]),zt=N({},yn);N(zt,wn),N(zt,Aa);const Tn=N({},vn);N(Tn,Ea);const Cl=function(s){let w=he(s);(!w||!w.tagName)&&(w={namespaceURI:ct,tagName:"template"});const T=Dt(s.tagName),K=Dt(w.tagName);return xn[s.namespaceURI]?s.namespaceURI===jt?w.namespaceURI===Fe?T==="svg":w.namespaceURI===Vt?T==="svg"&&(K==="annotation-xml"||Ko[K]):!!zt[T]:s.namespaceURI===Vt?w.namespaceURI===Fe?T==="math":w.namespaceURI===jt?T==="math"&&Go[K]:!!Tn[T]:s.namespaceURI===Fe?w.namespaceURI===jt&&!Go[K]||w.namespaceURI===Vt&&!Ko[K]?!1:!Tn[T]&&(_l[T]||!zt[T]):!!(We==="application/xhtml+xml"&&xn[s.namespaceURI]):!1},qe=function(s){At(e.removed,{element:s});try{s.parentNode.removeChild(s)}catch{s.remove()}},Ln=function(s,w){try{At(e.removed,{attribute:w.getAttributeNode(s),from:w})}catch{At(e.removed,{attribute:null,from:w})}if(w.removeAttribute(s),s==="is"&&!r[s])if(ue||te)try{qe(w)}catch{}else try{w.setAttribute(s,"")}catch{}},Yo=function(s){let w=null,T=null;if(me)s="<remove></remove>"+s;else{const ae=va(s,/^[\r\n\t ]+/);T=ae&&ae[0]}We==="application/xhtml+xml"&&ct===Fe&&(s='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+s+"</body></html>");const K=D?D.createHTML(s):s;if(ct===Fe)try{w=new Le().parseFromString(K,We)}catch{}if(!w||!w.documentElement){w=X.createDocument(ct,"template",null);try{w.documentElement.innerHTML=En?_e:K}catch{}}const ie=w.body||w.documentElement;return s&&T&&ie.insertBefore(n.createTextNode(T),ie.childNodes[0]||null),ct===Fe?P.call(w,R?"html":"body")[0]:R?w.documentElement:ie},Jo=function(s){return h.call(s.ownerDocument||s,s,V.SHOW_ELEMENT|V.SHOW_COMMENT|V.SHOW_TEXT,null)},Al=function(s){return s instanceof ee&&(typeof s.nodeName!="string"||typeof s.textContent!="string"||typeof s.removeChild!="function"||!(s.attributes instanceof W)||typeof s.removeAttribute!="function"||typeof s.setAttribute!="function"||typeof s.namespaceURI!="string"||typeof s.insertBefore!="function"||typeof s.hasChildNodes!="function")},Xo=function(s){return typeof I=="function"&&s instanceof I},Me=function(s,w,T){k[s]&&Ut(k[s],K=>{K.call(e,w,T,ut)})},Zo=function(s){let w=null;if(Me("beforeSanitizeElements",s,null),Al(s))return qe(s),!0;const T=Z(s.nodeName);if(Me("uponSanitizeElement",s,{tagName:T,allowedTags:B}),s.hasChildNodes()&&!Xo(s.firstElementChild)&&ve(/<[/\w]/g,s.innerHTML)&&ve(/<[/\w]/g,s.textContent))return qe(s),!0;if(!B[T]||b[T]){if(!b[T]&&er(T)&&(f.tagNameCheck instanceof RegExp&&ve(f.tagNameCheck,T)||f.tagNameCheck instanceof Function&&f.tagNameCheck(T)))return!1;if(Cn&&!lt[T]){const K=he(s)||s.parentNode,ie=it(s)||s.childNodes;if(ie&&K){const ae=ie.length;for(let ge=ae-1;ge>=0;--ge)K.insertBefore(st(ie[ge],!0),ke(s))}}return qe(s),!0}return s instanceof d&&!Cl(s)||(T==="noscript"||T==="noembed"||T==="noframes")&&ve(/<\/no(script|embed|frames)/i,s.innerHTML)?(qe(s),!0):(x&&s.nodeType===3&&(w=s.textContent,Ut([v,O,m],K=>{w=Et(w,K," ")}),s.textContent!==w&&(At(e.removed,{element:s.cloneNode()}),s.textContent=w)),Me("afterSanitizeElements",s,null),!1)},Qo=function(s,w,T){if($o&&(w==="id"||w==="name")&&(T in n||T in kl))return!1;if(!(g&&!p[w]&&ve(F,w))){if(!(A&&ve(q,w))){if(!r[w]||p[w]){if(!(er(s)&&(f.tagNameCheck instanceof RegExp&&ve(f.tagNameCheck,s)||f.tagNameCheck instanceof Function&&f.tagNameCheck(s))&&(f.attributeNameCheck instanceof RegExp&&ve(f.attributeNameCheck,w)||f.attributeNameCheck instanceof Function&&f.attributeNameCheck(w))||w==="is"&&f.allowCustomizedBuiltInElements&&(f.tagNameCheck instanceof RegExp&&ve(f.tagNameCheck,T)||f.tagNameCheck instanceof Function&&f.tagNameCheck(T))))return!1}else if(!An[w]){if(!ve(ce,Et(T,Y,""))){if(!((w==="src"||w==="xlink:href"||w==="href")&&s!=="script"&&ka(T,"data:")===0&&jo[s])){if(!(y&&!ve(J,Et(T,Y,"")))){if(T)return!1}}}}}}return!0},er=function(s){return s.indexOf("-")>0},tr=function(s){Me("beforeSanitizeAttributes",s,null);const{attributes:w}=s;if(!w)return;const T={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:r};let K=w.length;for(;K--;){const ie=w[K],{name:ae,namespaceURI:ge,value:Ke}=ie,Tt=Z(ae);let be=ae==="value"?Ke:_a(Ke);if(T.attrName=Tt,T.attrValue=be,T.keepAttr=!0,T.forceKeepAttr=void 0,Me("uponSanitizeAttribute",s,T),be=T.attrValue,T.forceKeepAttr||(Ln(ae,s),!T.keepAttr))continue;if(!S&&ve(/\/>/i,be)){Ln(ae,s);continue}x&&Ut([v,O,m],or=>{be=Et(be,or," ")});const nr=Z(s.nodeName);if(Qo(nr,Tt,be)){if(Ho&&(Tt==="id"||Tt==="name")&&(Ln(ae,s),be=bl+be),D&&typeof z=="object"&&typeof z.getAttributeType=="function"&&!ge)switch(z.getAttributeType(nr,Tt)){case"TrustedHTML":{be=D.createHTML(be);break}case"TrustedScriptURL":{be=D.createScriptURL(be);break}}try{ge?s.setAttributeNS(ge,ae,be):s.setAttribute(ae,be),Lo(e.removed)}catch{}}}Me("afterSanitizeAttributes",s,null)},El=function L(s){let w=null;const T=Jo(s);for(Me("beforeSanitizeShadowDOM",s,null);w=T.nextNode();)Me("uponSanitizeShadowNode",w,null),!Zo(w)&&(w.content instanceof c&&L(w.content),tr(w));Me("afterSanitizeShadowDOM",s,null)};return e.sanitize=function(L){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=null,T=null,K=null,ie=null;if(En=!L,En&&(L="<!-->"),typeof L!="string"&&!Xo(L))if(typeof L.toString=="function"){if(L=L.toString(),typeof L!="string")throw xt("dirty is not a string, aborting")}else throw xt("toString is not a function");if(!e.isSupported)return L;if($||Sn(s),e.removed=[],typeof L=="string"&&(St=!1),St){if(L.nodeName){const Ke=Z(L.nodeName);if(!B[Ke]||b[Ke])throw xt("root node is forbidden and cannot be sanitized in-place")}}else if(L instanceof I)w=Yo("<!---->"),T=w.ownerDocument.importNode(L,!0),T.nodeType===1&&T.nodeName==="BODY"||T.nodeName==="HTML"?w=T:w.appendChild(T);else{if(!ue&&!x&&!R&&L.indexOf("<")===-1)return D&&Be?D.createHTML(L):L;if(w=Yo(L),!w)return ue?null:Be?_e:""}w&&me&&qe(w.firstChild);const ae=Jo(St?L:w);for(;K=ae.nextNode();)Zo(K)||(K.content instanceof c&&El(K.content),tr(K));if(St)return L;if(ue){if(te)for(ie=_.call(w.ownerDocument);w.firstChild;)ie.appendChild(w.firstChild);else ie=w;return(r.shadowroot||r.shadowrootmode)&&(ie=C.call(o,ie,!0)),ie}let ge=R?w.outerHTML:w.innerHTML;return R&&B["!doctype"]&&w.ownerDocument&&w.ownerDocument.doctype&&w.ownerDocument.doctype.name&&ve(Fo,w.ownerDocument.doctype.name)&&(ge="<!DOCTYPE "+w.ownerDocument.doctype.name+`>
77
- `+ge),x&&Ut([v,O,m],Ke=>{ge=Et(ge,Ke," ")}),D&&Be?D.createHTML(ge):ge},e.setConfig=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Sn(L),$=!0},e.clearConfig=function(){ut=null,$=!1},e.isValidAttribute=function(L,s,w){ut||Sn({});const T=Z(L),K=Z(s);return Qo(T,K,w)},e.addHook=function(L,s){typeof s=="function"&&(k[L]=k[L]||[],At(k[L],s))},e.removeHook=function(L){if(k[L])return Lo(k[L])},e.removeHooks=function(L){k[L]&&(k[L]=[])},e.removeAllHooks=function(){k={}},e}var Uo=No();class Fa{get IsVisible(){return ot.isVisible()}async ConfirmAsync(e){return new Promise(n=>{ot.fire({showCancelButton:!0,allowEscapeKey:!1,allowOutsideClick:!1,icon:"question",title:e.title,html:Uo.sanitize(e.text),confirmButtonText:e.confirmLabel??"confirmar",cancelButtonText:e.rejectLabel??"cancelar"}).then(o=>{n(o.isConfirmed===!0)})})}async AlertAsync(e){const n=e.icon??"info";let o;return Array.isArray(e.text)?o=`<div style="max-height: 50vh; overflow: auto">
78
+ If you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md`)}),e};function fa(){const t=D.domCache.get(this),e=D.innerParams.get(this);if(!e){Ao(this);return}t.popup&&F.swalCloseEventFinishedCallback&&(F.swalCloseEventFinishedCallback(),delete F.swalCloseEventFinishedCallback),F.deferDisposalTimer&&(clearTimeout(F.deferDisposalTimer),delete F.deferDisposalTimer),typeof e.didDestroy=="function"&&e.didDestroy(),ha(this)}const ha=t=>{Ao(t),delete t.params,delete F.keydownHandler,delete F.keydownTarget,delete F.currentInstance},Ao=t=>{t.isAwaitingPromise()?(gn(D,t),D.awaitingPromise.set(t,!0)):(gn(Ct,t),gn(D,t))},gn=(t,e)=>{for(const n in t)t[n].delete(e)},Co=Object.freeze(Object.defineProperty({__proto__:null,_destroy:fa,close:Ut,closeModal:Ut,closePopup:Ut,closeToast:Ut,disableButtons:ra,disableInput:ia,disableLoading:go,enableButtons:oa,enableInput:sa,getInput:Ui,getProgressSteps:la,handleAwaitingPromise:xt,hideLoading:go,isAwaitingPromise:Xi,rejectPromise:Qi,resetValidationMessage:ca,showValidationMessage:aa,update:ua},Symbol.toStringTag,{value:"Module"})),pa=t=>{const e=D.innerParams.get(t);t.disableButtons(),e.input?xo(t,"confirm"):yn(t,!0)},ma=t=>{const e=D.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?xo(t,"deny"):bn(t,!1)},ga=(t,e)=>{t.disableButtons(),e(ot.cancel)},xo=(t,e)=>{const n=D.innerParams.get(t);if(!n.input)return je(`The "input" parameter is needed to be set when using returnInputValueOn${tn(e)}`);const o=Pi(t,n);n.inputValidator?ba(t,o,e):t.getInput().checkValidity()?e==="deny"?bn(t,o):yn(t,o):(t.enableButtons(),t.showValidationMessage(n.validationMessage))},ba=(t,e,n)=>{const o=D.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>bt(o.inputValidator(e,o.validationMessage))).then(a=>{t.enableButtons(),t.enableInput(),a?t.showValidationMessage(a):n==="deny"?bn(t,e):yn(t,e)})},bn=(t,e)=>{const n=D.innerParams.get(t||globalThis);n.showLoaderOnDeny&&rt(Ue()),n.preDeny?(D.awaitingPromise.set(t||globalThis,!0),Promise.resolve().then(()=>bt(n.preDeny(e,n.validationMessage))).then(s=>{s===!1?(t.hideLoading(),xt(t)):t.closePopup({isDenied:!0,value:typeof s>"u"?e:s})}).catch(s=>So(t||globalThis,s))):t.closePopup({isDenied:!0,value:e})},To=(t,e)=>{t.closePopup({isConfirmed:!0,value:e})},So=(t,e)=>{t.rejectPromise(e)},yn=(t,e)=>{const n=D.innerParams.get(t||globalThis);n.showLoaderOnConfirm&&rt(),n.preConfirm?(t.resetValidationMessage(),D.awaitingPromise.set(t||globalThis,!0),Promise.resolve().then(()=>bt(n.preConfirm(e,n.validationMessage))).then(s=>{ve(Ft())||s===!1?(t.hideLoading(),xt(t)):To(t,typeof s>"u"?e:s)}).catch(s=>So(t||globalThis,s))):To(t,e)},ya=(t,e,n)=>{D.innerParams.get(t).toast?wa(t,e,n):(ka(e),_a(e),Ea(t,e,n))},wa=(t,e,n)=>{e.popup.onclick=()=>{const o=D.innerParams.get(t);o&&(va(o)||o.timer||o.input)||n(ot.close)}},va=t=>t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton;let $t=!1;const ka=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&($t=!0)}}},_a=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,(e.target===t.popup||t.popup.contains(e.target))&&($t=!0)}}},Ea=(t,e,n)=>{e.container.onclick=o=>{const s=D.innerParams.get(t);if($t){$t=!1;return}o.target===e.container&&Ot(s.allowOutsideClick)&&n(ot.backdrop)}},Aa=t=>typeof t=="object"&&t.jquery,Io=t=>t instanceof Element||Aa(t),Ca=t=>{const e={};return typeof t[0]=="object"&&!Io(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((n,o)=>{const s=t[o];typeof s=="string"||Io(s)?e[n]=s:s!==void 0&&je(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof s}`)}),e};function xa(...t){const e=this;return new e(...t)}function Ta(t){class e extends this{_main(o,s){return super._main(o,Object.assign({},t,s))}}return e}const Sa=()=>F.timeout&&F.timeout.getTimerLeft(),Lo=()=>{if(F.timeout)return ms(),F.timeout.stop()},Po=()=>{if(F.timeout){const t=F.timeout.start();return un(t),t}},Ia=()=>{const t=F.timeout;return t&&(t.running?Lo():Po())},La=t=>{if(F.timeout){const e=F.timeout.increase(t);return un(e,!0),e}},Pa=()=>F.timeout&&F.timeout.isRunning();let Bo=!1;const wn={};function Ba(t="data-swal-template"){wn[t]=this,Bo||(document.body.addEventListener("click",Oa),Bo=!0)}const Oa=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const n in wn){const o=e.getAttribute(n);if(o){wn[n].fire({template:o});return}}},Ra=Object.freeze(Object.defineProperty({__proto__:null,argsToParams:Ca,bindClickHandler:Ba,clickCancel:Vi,clickConfirm:bo,clickDeny:Hi,enableLoading:rt,fire:xa,getActions:kt,getCancelButton:ze,getCloseButton:sn,getConfirmButton:Se,getContainer:re,getDenyButton:Ue,getFocusableElements:an,getFooter:Xn,getHtmlContainer:Rt,getIcon:vt,getImage:Gn,getInputLabel:us,getLoader:tt,getPopup:z,getTimerLeft:Sa,getTimerProgressBar:Nt,getTitle:Yn,getValidationMessage:Ft,increaseTimer:La,isDeprecatedParameter:rn,isLoading:fs,isTimerRunning:Pa,isUpdatableParameter:qn,isValidParameter:Wn,isVisible:$i,mixin:Ta,resumeTimer:Po,showLoading:rt,stopTimer:Lo,toggleTimer:Ia},Symbol.toStringTag,{value:"Module"}));let vn;class st{constructor(...e){if(typeof window>"u")return;vn=this;const n=Object.freeze(this.constructor.argsToParams(e));Object.defineProperties(this,{params:{value:n,writable:!1,enumerable:!0,configurable:!0}});const o=this._main(this.params);D.promise.set(this,o)}_main(e,n={}){cs(Object.assign({},n,e)),F.currentInstance&&(F.currentInstance._destroy(),cn()&&lo()),F.currentInstance=this;const o=Na(e,n);pi(o),Object.freeze(o),F.timeout&&(F.timeout.stop(),delete F.timeout),clearTimeout(F.restoreFocusTimeout);const s=Da(this);return co(this,o),D.innerParams.set(this,o),Fa(this,s,o)}then(e){return D.promise.get(this).then(e)}finally(e){return D.promise.get(this).finally(e)}}const Fa=(t,e,n)=>new Promise((o,s)=>{const a=y=>{t.closePopup({isDismissed:!0,dismiss:y})};Ct.swalPromiseResolve.set(t,o),Ct.swalPromiseReject.set(t,s),e.confirmButton.onclick=()=>pa(t),e.denyButton.onclick=()=>ma(t),e.cancelButton.onclick=()=>ga(t,a),e.closeButton.onclick=()=>a(ot.close),ya(t,e,a),ji(t,F,n,a),Li(t,n),Ci(n),Ma(F,n,a),Ua(e,n),setTimeout(()=>{e.container.scrollTop=0})}),Na=(t,e)=>{const n=ri(t),o=Object.assign({},et,e,n,t);return o.showClass=Object.assign({},et.showClass,o.showClass),o.hideClass=Object.assign({},et.hideClass,o.hideClass),o},Da=t=>{const e={popup:z(),container:re(),actions:kt(),confirmButton:Se(),denyButton:Ue(),cancelButton:ze(),loader:tt(),closeButton:sn(),validationMessage:Ft(),progressSteps:Jn()};return D.domCache.set(t,e),e},Ma=(t,e,n)=>{const o=Nt();ie(o),e.timer&&(t.timeout=new mi(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(ee(o),Ce(o,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&un(e.timer)})))},Ua=(t,e)=>{if(!e.toast){if(!Ot(e.allowEnterKey))return Ha();$a(t,e)||mn(e,-1,1)}},$a=(t,e)=>e.focusDeny&&ve(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&ve(t.cancelButton)?(t.cancelButton.focus(),!0):e.focusConfirm&&ve(t.confirmButton)?(t.confirmButton.focus(),!0):!1,Ha=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};Object.assign(st.prototype,Co),Object.assign(st,Ra),Object.keys(Co).forEach(t=>{st[t]=function(...e){if(vn)return vn[t](...e)}}),st.DismissReason=ot,st.version="11.4.8";const it=st;it.default=it;/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */const{entries:Oo,setPrototypeOf:Ro,isFrozen:Va,getPrototypeOf:ja,getOwnPropertyDescriptor:Fo}=Object;let{freeze:le,seal:Ie,create:No}=Object,{apply:kn,construct:_n}=typeof Reflect<"u"&&Reflect;le||(le=function(e){return e}),Ie||(Ie=function(e){return e}),kn||(kn=function(e,n,o){return e.apply(n,o)}),_n||(_n=function(e,n){return new e(...n)});const Ht=xe(Array.prototype.forEach),Do=xe(Array.prototype.pop),Tt=xe(Array.prototype.push),Vt=xe(String.prototype.toLowerCase),En=xe(String.prototype.toString),za=xe(String.prototype.match),St=xe(String.prototype.replace),Wa=xe(String.prototype.indexOf),qa=xe(String.prototype.trim),ke=xe(RegExp.prototype.test),It=Ka(TypeError);function xe(t){return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];return kn(t,e,o)}}function Ka(t){return function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return _n(t,n)}}function N(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vt;Ro&&Ro(t,null);let o=e.length;for(;o--;){let s=e[o];if(typeof s=="string"){const a=n(s);a!==s&&(Va(e)||(e[o]=a),s=a)}t[s]=!0}return t}function at(t){const e=No(null);for(const[n,o]of Oo(t))Fo(t,n)!==void 0&&(e[n]=o);return e}function jt(t,e){for(;t!==null;){const o=Fo(t,e);if(o){if(o.get)return xe(o.get);if(typeof o.value=="function")return xe(o.value)}t=ja(t)}function n(o){return console.warn("fallback value for",o),null}return n}const Mo=le(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),An=le(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Cn=le(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ya=le(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),xn=le(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ga=le(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Uo=le(["#text"]),$o=le(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Tn=le(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ho=le(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),zt=le(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ja=Ie(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Xa=Ie(/<%[\w\W]*|[\w\W]*%>/gm),Za=Ie(/\${[\w\W]*}/gm),Qa=Ie(/^data-[\-\w.\u00B7-\uFFFF]/),ec=Ie(/^aria-[\-\w]+$/),Vo=Ie(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tc=Ie(/^(?:\w+script|data):/i),nc=Ie(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),jo=Ie(/^html$/i);var zo=Object.freeze({__proto__:null,MUSTACHE_EXPR:Ja,ERB_EXPR:Xa,TMPLIT_EXPR:Za,DATA_ATTR:Qa,ARIA_ATTR:ec,IS_ALLOWED_URI:Vo,IS_SCRIPT_OR_DATA:tc,ATTR_WHITESPACE:nc,DOCTYPE_NAME:jo});const oc=function(){return typeof window>"u"?null:window},rc=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let o=null;const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(o=n.getAttribute(s));const a="dompurify"+(o?"#"+o:"");try{return e.createPolicy(a,{createHTML(y){return y},createScriptURL(y){return y}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function Wo(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:oc();const e=L=>Wo(L);if(e.version="3.0.6",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let{document:n}=t;const o=n,s=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:y,Node:T,Element:d,NodeFilter:V,NamedNodeMap:j=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:te,DOMParser:Le,trustedTypes:W}=t,Fe=d.prototype,ct=jt(Fe,"cloneNode"),_e=jt(Fe,"nextSibling"),lt=jt(Fe,"childNodes"),pe=jt(Fe,"parentNode");if(typeof y=="function"){const L=n.createElement("template");L.content&&L.content.ownerDocument&&(n=L.content.ownerDocument)}let U,Te="";const{implementation:Z,createNodeIterator:f,createDocumentFragment:E,getElementsByTagName:P}=n,{importNode:A}=o;let _={};e.isSupported=typeof Oo=="function"&&typeof pe=="function"&&Z&&Z.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:k,ERB_EXPR:O,TMPLIT_EXPR:g,DATA_ATTR:R,ARIA_ATTR:q,IS_SCRIPT_OR_DATA:J,ATTR_WHITESPACE:G}=zo;let{IS_ALLOWED_URI:ue}=zo,B=null;const me=N({},[...Mo,...An,...Cn,...xn,...Uo]);let r=null;const c=N({},[...$o,...Tn,...Ho,...zt]);let h=Object.seal(No(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),m=null,p=null,C=!0,b=!0,w=!1,x=!0,S=!1,M=!1,$=!1,ge=!1,de=!1,ne=!1,Oe=!1,Yo=!0,Go=!1;const Hc="user-content-";let In=!0,Lt=!1,ut={},dt=null;const Jo=N({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Xo=null;const Zo=N({},["audio","video","img","source","image","track"]);let Ln=null;const Qo=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Wt="http://www.w3.org/1998/Math/MathML",qt="http://www.w3.org/2000/svg",Ne="http://www.w3.org/1999/xhtml";let ft=Ne,Pn=!1,Bn=null;const Vc=N({},[Wt,qt,Ne],En);let Ke=null;const jc=["application/xhtml+xml","text/html"],zc="text/html";let Q=null,ht=null;const Wc=n.createElement("form"),er=function(i){return i instanceof RegExp||i instanceof Function},On=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ht&&ht===i)){if((!i||typeof i!="object")&&(i={}),i=at(i),Ke=jc.indexOf(i.PARSER_MEDIA_TYPE)===-1?Ke=zc:Ke=i.PARSER_MEDIA_TYPE,Q=Ke==="application/xhtml+xml"?En:Vt,B="ALLOWED_TAGS"in i?N({},i.ALLOWED_TAGS,Q):me,r="ALLOWED_ATTR"in i?N({},i.ALLOWED_ATTR,Q):c,Bn="ALLOWED_NAMESPACES"in i?N({},i.ALLOWED_NAMESPACES,En):Vc,Ln="ADD_URI_SAFE_ATTR"in i?N(at(Qo),i.ADD_URI_SAFE_ATTR,Q):Qo,Xo="ADD_DATA_URI_TAGS"in i?N(at(Zo),i.ADD_DATA_URI_TAGS,Q):Zo,dt="FORBID_CONTENTS"in i?N({},i.FORBID_CONTENTS,Q):Jo,m="FORBID_TAGS"in i?N({},i.FORBID_TAGS,Q):{},p="FORBID_ATTR"in i?N({},i.FORBID_ATTR,Q):{},ut="USE_PROFILES"in i?i.USE_PROFILES:!1,C=i.ALLOW_ARIA_ATTR!==!1,b=i.ALLOW_DATA_ATTR!==!1,w=i.ALLOW_UNKNOWN_PROTOCOLS||!1,x=i.ALLOW_SELF_CLOSE_IN_ATTR!==!1,S=i.SAFE_FOR_TEMPLATES||!1,M=i.WHOLE_DOCUMENT||!1,de=i.RETURN_DOM||!1,ne=i.RETURN_DOM_FRAGMENT||!1,Oe=i.RETURN_TRUSTED_TYPE||!1,ge=i.FORCE_BODY||!1,Yo=i.SANITIZE_DOM!==!1,Go=i.SANITIZE_NAMED_PROPS||!1,In=i.KEEP_CONTENT!==!1,Lt=i.IN_PLACE||!1,ue=i.ALLOWED_URI_REGEXP||Vo,ft=i.NAMESPACE||Ne,h=i.CUSTOM_ELEMENT_HANDLING||{},i.CUSTOM_ELEMENT_HANDLING&&er(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(h.tagNameCheck=i.CUSTOM_ELEMENT_HANDLING.tagNameCheck),i.CUSTOM_ELEMENT_HANDLING&&er(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(h.attributeNameCheck=i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),i.CUSTOM_ELEMENT_HANDLING&&typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(h.allowCustomizedBuiltInElements=i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),S&&(b=!1),ne&&(de=!0),ut&&(B=N({},[...Uo]),r=[],ut.html===!0&&(N(B,Mo),N(r,$o)),ut.svg===!0&&(N(B,An),N(r,Tn),N(r,zt)),ut.svgFilters===!0&&(N(B,Cn),N(r,Tn),N(r,zt)),ut.mathMl===!0&&(N(B,xn),N(r,Ho),N(r,zt))),i.ADD_TAGS&&(B===me&&(B=at(B)),N(B,i.ADD_TAGS,Q)),i.ADD_ATTR&&(r===c&&(r=at(r)),N(r,i.ADD_ATTR,Q)),i.ADD_URI_SAFE_ATTR&&N(Ln,i.ADD_URI_SAFE_ATTR,Q),i.FORBID_CONTENTS&&(dt===Jo&&(dt=at(dt)),N(dt,i.FORBID_CONTENTS,Q)),In&&(B["#text"]=!0),M&&N(B,["html","head","body"]),B.table&&(N(B,["tbody"]),delete m.tbody),i.TRUSTED_TYPES_POLICY){if(typeof i.TRUSTED_TYPES_POLICY.createHTML!="function")throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof i.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');U=i.TRUSTED_TYPES_POLICY,Te=U.createHTML("")}else U===void 0&&(U=rc(W,s)),U!==null&&typeof Te=="string"&&(Te=U.createHTML(""));le&&le(i),ht=i}},tr=N({},["mi","mo","mn","ms","mtext"]),nr=N({},["foreignobject","desc","title","annotation-xml"]),qc=N({},["title","style","font","a","script"]),Kt=N({},An);N(Kt,Cn),N(Kt,Ya);const Rn=N({},xn);N(Rn,Ga);const Kc=function(i){let v=pe(i);(!v||!v.tagName)&&(v={namespaceURI:ft,tagName:"template"});const I=Vt(i.tagName),K=Vt(v.tagName);return Bn[i.namespaceURI]?i.namespaceURI===qt?v.namespaceURI===Ne?I==="svg":v.namespaceURI===Wt?I==="svg"&&(K==="annotation-xml"||tr[K]):!!Kt[I]:i.namespaceURI===Wt?v.namespaceURI===Ne?I==="math":v.namespaceURI===qt?I==="math"&&nr[K]:!!Rn[I]:i.namespaceURI===Ne?v.namespaceURI===qt&&!nr[K]||v.namespaceURI===Wt&&!tr[K]?!1:!Rn[I]&&(qc[I]||!Kt[I]):!!(Ke==="application/xhtml+xml"&&Bn[i.namespaceURI]):!1},Ye=function(i){Tt(e.removed,{element:i});try{i.parentNode.removeChild(i)}catch{i.remove()}},Fn=function(i,v){try{Tt(e.removed,{attribute:v.getAttributeNode(i),from:v})}catch{Tt(e.removed,{attribute:null,from:v})}if(v.removeAttribute(i),i==="is"&&!r[i])if(de||ne)try{Ye(v)}catch{}else try{v.setAttribute(i,"")}catch{}},or=function(i){let v=null,I=null;if(ge)i="<remove></remove>"+i;else{const ce=za(i,/^[\r\n\t ]+/);I=ce&&ce[0]}Ke==="application/xhtml+xml"&&ft===Ne&&(i='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+i+"</body></html>");const K=U?U.createHTML(i):i;if(ft===Ne)try{v=new Le().parseFromString(K,Ke)}catch{}if(!v||!v.documentElement){v=Z.createDocument(ft,"template",null);try{v.documentElement.innerHTML=Pn?Te:K}catch{}}const ae=v.body||v.documentElement;return i&&I&&ae.insertBefore(n.createTextNode(I),ae.childNodes[0]||null),ft===Ne?P.call(v,M?"html":"body")[0]:M?v.documentElement:ae},rr=function(i){return f.call(i.ownerDocument||i,i,V.SHOW_ELEMENT|V.SHOW_COMMENT|V.SHOW_TEXT,null)},Yc=function(i){return i instanceof te&&(typeof i.nodeName!="string"||typeof i.textContent!="string"||typeof i.removeChild!="function"||!(i.attributes instanceof j)||typeof i.removeAttribute!="function"||typeof i.setAttribute!="function"||typeof i.namespaceURI!="string"||typeof i.insertBefore!="function"||typeof i.hasChildNodes!="function")},sr=function(i){return typeof T=="function"&&i instanceof T},De=function(i,v,I){_[i]&&Ht(_[i],K=>{K.call(e,v,I,ht)})},ir=function(i){let v=null;if(De("beforeSanitizeElements",i,null),Yc(i))return Ye(i),!0;const I=Q(i.nodeName);if(De("uponSanitizeElement",i,{tagName:I,allowedTags:B}),i.hasChildNodes()&&!sr(i.firstElementChild)&&ke(/<[/\w]/g,i.innerHTML)&&ke(/<[/\w]/g,i.textContent))return Ye(i),!0;if(!B[I]||m[I]){if(!m[I]&&cr(I)&&(h.tagNameCheck instanceof RegExp&&ke(h.tagNameCheck,I)||h.tagNameCheck instanceof Function&&h.tagNameCheck(I)))return!1;if(In&&!dt[I]){const K=pe(i)||i.parentNode,ae=lt(i)||i.childNodes;if(ae&&K){const ce=ae.length;for(let be=ce-1;be>=0;--be)K.insertBefore(ct(ae[be],!0),_e(i))}}return Ye(i),!0}return i instanceof d&&!Kc(i)||(I==="noscript"||I==="noembed"||I==="noframes")&&ke(/<\/no(script|embed|frames)/i,i.innerHTML)?(Ye(i),!0):(S&&i.nodeType===3&&(v=i.textContent,Ht([k,O,g],K=>{v=St(v,K," ")}),i.textContent!==v&&(Tt(e.removed,{element:i.cloneNode()}),i.textContent=v)),De("afterSanitizeElements",i,null),!1)},ar=function(i,v,I){if(Yo&&(v==="id"||v==="name")&&(I in n||I in Wc))return!1;if(!(b&&!p[v]&&ke(R,v))){if(!(C&&ke(q,v))){if(!r[v]||p[v]){if(!(cr(i)&&(h.tagNameCheck instanceof RegExp&&ke(h.tagNameCheck,i)||h.tagNameCheck instanceof Function&&h.tagNameCheck(i))&&(h.attributeNameCheck instanceof RegExp&&ke(h.attributeNameCheck,v)||h.attributeNameCheck instanceof Function&&h.attributeNameCheck(v))||v==="is"&&h.allowCustomizedBuiltInElements&&(h.tagNameCheck instanceof RegExp&&ke(h.tagNameCheck,I)||h.tagNameCheck instanceof Function&&h.tagNameCheck(I))))return!1}else if(!Ln[v]){if(!ke(ue,St(I,G,""))){if(!((v==="src"||v==="xlink:href"||v==="href")&&i!=="script"&&Wa(I,"data:")===0&&Xo[i])){if(!(w&&!ke(J,St(I,G,"")))){if(I)return!1}}}}}}return!0},cr=function(i){return i.indexOf("-")>0},lr=function(i){De("beforeSanitizeAttributes",i,null);const{attributes:v}=i;if(!v)return;const I={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:r};let K=v.length;for(;K--;){const ae=v[K],{name:ce,namespaceURI:be,value:Ge}=ae,Pt=Q(ce);let ye=ce==="value"?Ge:qa(Ge);if(I.attrName=Pt,I.attrValue=ye,I.keepAttr=!0,I.forceKeepAttr=void 0,De("uponSanitizeAttribute",i,I),ye=I.attrValue,I.forceKeepAttr||(Fn(ce,i),!I.keepAttr))continue;if(!x&&ke(/\/>/i,ye)){Fn(ce,i);continue}S&&Ht([k,O,g],dr=>{ye=St(ye,dr," ")});const ur=Q(i.nodeName);if(ar(ur,Pt,ye)){if(Go&&(Pt==="id"||Pt==="name")&&(Fn(ce,i),ye=Hc+ye),U&&typeof W=="object"&&typeof W.getAttributeType=="function"&&!be)switch(W.getAttributeType(ur,Pt)){case"TrustedHTML":{ye=U.createHTML(ye);break}case"TrustedScriptURL":{ye=U.createScriptURL(ye);break}}try{be?i.setAttributeNS(be,ce,ye):i.setAttribute(ce,ye),Do(e.removed)}catch{}}}De("afterSanitizeAttributes",i,null)},Gc=function L(i){let v=null;const I=rr(i);for(De("beforeSanitizeShadowDOM",i,null);v=I.nextNode();)De("uponSanitizeShadowNode",v,null),!ir(v)&&(v.content instanceof a&&L(v.content),lr(v));De("afterSanitizeShadowDOM",i,null)};return e.sanitize=function(L){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=null,I=null,K=null,ae=null;if(Pn=!L,Pn&&(L="<!-->"),typeof L!="string"&&!sr(L))if(typeof L.toString=="function"){if(L=L.toString(),typeof L!="string")throw It("dirty is not a string, aborting")}else throw It("toString is not a function");if(!e.isSupported)return L;if($||On(i),e.removed=[],typeof L=="string"&&(Lt=!1),Lt){if(L.nodeName){const Ge=Q(L.nodeName);if(!B[Ge]||m[Ge])throw It("root node is forbidden and cannot be sanitized in-place")}}else if(L instanceof T)v=or("<!---->"),I=v.ownerDocument.importNode(L,!0),I.nodeType===1&&I.nodeName==="BODY"||I.nodeName==="HTML"?v=I:v.appendChild(I);else{if(!de&&!S&&!M&&L.indexOf("<")===-1)return U&&Oe?U.createHTML(L):L;if(v=or(L),!v)return de?null:Oe?Te:""}v&&ge&&Ye(v.firstChild);const ce=rr(Lt?L:v);for(;K=ce.nextNode();)ir(K)||(K.content instanceof a&&Gc(K.content),lr(K));if(Lt)return L;if(de){if(ne)for(ae=E.call(v.ownerDocument);v.firstChild;)ae.appendChild(v.firstChild);else ae=v;return(r.shadowroot||r.shadowrootmode)&&(ae=A.call(o,ae,!0)),ae}let be=M?v.outerHTML:v.innerHTML;return M&&B["!doctype"]&&v.ownerDocument&&v.ownerDocument.doctype&&v.ownerDocument.doctype.name&&ke(jo,v.ownerDocument.doctype.name)&&(be="<!DOCTYPE "+v.ownerDocument.doctype.name+`>
79
+ `+be),S&&Ht([k,O,g],Ge=>{be=St(be,Ge," ")}),U&&Oe?U.createHTML(be):be},e.setConfig=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};On(L),$=!0},e.clearConfig=function(){ht=null,$=!1},e.isValidAttribute=function(L,i,v){ht||On({});const I=Q(L),K=Q(i);return ar(I,K,v)},e.addHook=function(L,i){typeof i=="function"&&(_[L]=_[L]||[],Tt(_[L],i))},e.removeHook=function(L){if(_[L])return Do(_[L])},e.removeHooks=function(L){_[L]&&(_[L]=[])},e.removeAllHooks=function(){_={}},e}var qo=Wo();class sc{get IsVisible(){return it.isVisible()}async ConfirmAsync(e){return new Promise(n=>{it.fire({showCancelButton:!0,allowEscapeKey:!1,allowOutsideClick:!1,icon:"question",title:e.title,html:qo.sanitize(e.text),confirmButtonText:e.confirmLabel??"confirmar",cancelButtonText:e.rejectLabel??"cancelar"}).then(o=>{n(o.isConfirmed===!0)})})}async AlertAsync(e){const n=e.icon??"info";let o;return Array.isArray(e.text)?o=`<div style="max-height: 50vh; overflow: auto">
78
80
  ${e.text.join("<br />")}
79
- </div>`:o=e.text,new Promise(i=>{ot.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:e.title,html:Uo.sanitize(o)}).then(()=>i(!0))})}}const Ma=new Fa,Do=()=>Ma,Na=["data-cor"],Ua=l.defineComponent({__name:"HeaderAvatar",setup(t){const e=Do(),n=i();async function o(){await e.ConfirmAsync({text:`${ne.User.username} - ${ne.User.name}.<br /><br />Você deseja sair da conta?`,confirmLabel:"sair"})&&ne.CallLogout()}function i(){const E=ne.User.name;let I="?";if(!E)return I;const d=E.split(" ").filter(W=>W.length>0).map(W=>W[0].toUpperCase()),V=Math.min(2,d.length);return I=d.slice(0,V).join(""),I.length>0?I:"?"}function c(){const E=n[0],I=E==="?"?0:(E.charCodeAt(0)-64)%19;return Math.max(I,0)}return(E,I)=>(l.openBlock(),l.createElementBlock("div",{id:"sf-header-avatar","data-cor":c(),onClick:o},l.toDisplayString(l.unref(n)),9,Na))}}),Da={},$a={xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",class:"sf-svg-icon"},Ha=[l.createElementVNode("path",{d:"m307.231-83.463-54.999-55.23 343.923-343.922-343.923-343.539 54.999-54.614 398.153 398.153L307.231-83.462Z"},null,-1)];function Va(t,e){return l.openBlock(),l.createElementBlock("svg",$a,Ha)}const ja=In(Da,[["render",Va]]);class za{get storedTheme(){return localStorage.getItem("color-scheme")}get IsDark(){return document.documentElement.classList.contains("dark")}Toggle(){this.IsDark?this.EnableLightMode():this.EnableDarkMode()}EnableDarkMode(){document.documentElement.classList.add("dark"),document.documentElement.classList.remove("light"),localStorage.setItem("color-scheme","dark")}EnableLightMode(){document.documentElement.classList.remove("dark"),document.documentElement.classList.add("light"),localStorage.setItem("color-scheme","light")}SetInitialTheme(){if(this.storedTheme==="light")return this.EnableLightMode();if(this.storedTheme==="dark")return this.EnableDarkMode();if(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches)return this.EnableDarkMode();this.EnableLightMode()}}const _n=(()=>new za)(),Wa=[l.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="472.39" height="472.39" viewBox="0 0 472.39 472.39"><g class="toggle-sun"><path d="M403.21,167V69.18H305.38L236.2,0,167,69.18H69.18V167L0,236.2l69.18,69.18v97.83H167l69.18,69.18,69.18-69.18h97.83V305.38l69.18-69.18Zm-167,198.17a129,129,0,1,1,129-129A129,129,0,0,1,236.2,365.19Z"></path></g><g class="toggle-circle"><circle class="cls-1" cx="236.2" cy="236.2" r="103.78"></circle></g></svg>',1)],qa=l.defineComponent({__name:"ThemeToggle",setup(t){return(e,n)=>(l.openBlock(),l.createElementBlock("button",{id:"sf-theme-toggle",onClick:n[0]||(n[0]=(...o)=>l.unref(_n).Toggle&&l.unref(_n).Toggle(...o))},Wa))}}),Ka={id:"sf-layout"},Ga=l.createElementVNode("div",{class:"sf-layout-menu-toggler-logo"},null,-1),Ya={class:"title"},Ja={class:"sf-layout-nav-header"},Xa=l.createElementVNode("span",null,"Menu",-1),Za={class:"sf-layout-nav-content"},Qa=l.createElementVNode("section",{id:"sf-layout-page-title"},null,-1),el={id:"sf-layout-content"},tl=l.defineComponent({__name:"Layout",setup(t){const e=Wt();return(n,o)=>(l.openBlock(),l.createElementBlock("div",Ka,[l.createElementVNode("header",null,[l.createElementVNode("div",{class:l.normalizeClass(["sf-layout-menu-toggler",{invert:l.unref(e).IsVisible}]),onClick:o[0]||(o[0]=i=>l.unref(e).Toggle())},[Ga,l.createVNode(ja)],2),l.createElementVNode("div",Ya,[l.renderSlot(n.$slots,"title")]),l.renderSlot(n.$slots,"action"),l.createVNode(qa),l.createVNode(Ua)]),l.createElementVNode("nav",{class:l.normalizeClass({visible:l.unref(e).IsVisible})},[l.createElementVNode("div",Ja,[Xa,l.createVNode(ft,{icone:"close",button:"",onClick:o[1]||(o[1]=i=>l.unref(e).Close())})]),l.createElementVNode("div",Za,[l.renderSlot(n.$slots,"menu")])],2),l.createElementVNode("main",{class:l.normalizeClass({"menu-visible":l.unref(e).IsVisible})},[Qa,l.createElementVNode("section",el,[l.renderSlot(n.$slots,"content")])],2)]))}}),nl=["href","data-active","onClick"],ol={class:"sf-navmenulink-text"},rl=l.defineComponent({__name:"NavMenuLink",props:{href:{},text:{},icon:{},exact:{type:Boolean}},setup(t){const e=t,n=Wt();function o(i,c){i.preventDefault();const I=i.target.closest(".sf-layout-nav-content");c(),I&&I.clientWidth+10>document.body.clientWidth&&n.Close()}return(i,c)=>{const E=l.resolveComponent("router-link");return l.openBlock(),l.createBlock(E,{to:e.href,custom:""},{default:l.withCtx(({href:I,navigate:d,isExactActive:V,isActive:W})=>[l.createElementVNode("a",{class:"sf-navmenulink",href:I,"data-active":e.exact?V:W,onClick:ee=>o(ee,d)},[e.icon?(l.openBlock(),l.createBlock(ft,{key:0,icone:e.icon,"button-props":{tabindex:-1}},null,8,["icone"])):l.createCommentVNode("",!0),l.createElementVNode("span",ol,l.toDisplayString(e.text),1)],8,nl)]),_:1},8,["to"])}}}),sl=l.defineComponent({__name:"ScrollToTop",setup(t){const e=l.ref(!1),n=`--${+new Date}`;let o=null;function i(){o==null||o.scrollTo(0,0)}return l.onMounted(()=>{var c;o=((c=document.getElementById(n))==null?void 0:c.parentElement)??null,o&&o.addEventListener("scroll",function(){e.value=this.scrollTop-this.clientHeight>0})}),(c,E)=>(l.openBlock(),l.createElementBlock("button",{id:n,class:l.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":e.value}]),onClick:i},null,2))}}),il=l.defineComponent({__name:"Content",props:{class:{},style:{},disableBodyPadding:{type:Boolean},disableHeaderPadding:{type:Boolean},disableFooterPadding:{type:Boolean}},setup(t){const e=t;function n(){return new Ye("sf-content").AddClass(e.class,!!e.class).Build()}function o(){return new Ye("sf-content-body").AddClass("sf-content-no-padding",e.disableBodyPadding).Build()}function i(){return new Ye("sf-content-header").AddClass("sf-content-no-padding",e.disableHeaderPadding).Build()}function c(){return new Ye("sf-content-footer").AddClass("sf-content-no-padding",e.disableFooterPadding).Build()}return(E,I)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(n()),style:l.normalizeStyle(e.style)},[l.createElementVNode("div",{class:l.normalizeClass(i())},[l.renderSlot(E.$slots,"header")],2),l.createElementVNode("div",{class:l.normalizeClass(o())},[l.renderSlot(E.$slots,"default"),l.createVNode(sl)],2),l.createElementVNode("div",{class:l.normalizeClass(c())},[l.renderSlot(E.$slots,"footer")],2)],6))}}),al={class:"sf-tab-navigation"},ll=[l.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[l.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})],-1)],cl=["data-active"],ul=["href","onClick"],dl=[l.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[l.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})],-1)],fl=l.defineComponent({__name:"TabNavigation",props:{tabs:{}},setup(t){const e=t,n=l.ref(null),o=new ResizeObserver(d=>{I()}),i=l.ref(!1),c=l.ref(!1);function E(d=!1){const V=n.value.clientWidth;n.value.scrollLeft+=d?-V:V}function I(){const d=n.value.scrollWidth-n.value.clientWidth;i.value=n.value.scrollLeft>10,c.value=n.value.scrollLeft<d-10}return l.onMounted(()=>{n.value.addEventListener("scroll",I),o.observe(n.value)}),l.onBeforeUnmount(()=>{var d;try{(d=n.value)==null||d.removeEventListener("scroll",I),o.unobserve(n.value),o.disconnect()}catch{}}),(d,V)=>{const W=l.resolveComponent("RouterLink");return l.openBlock(),l.createElementBlock("div",al,[l.createElementVNode("div",{class:l.normalizeClass(["left-arrow",{active:i.value}]),onClick:V[0]||(V[0]=ee=>E(!0))},ll,2),l.createElementVNode("ul",{ref_key:"trackerContainer",ref:n},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.tabs,ee=>(l.openBlock(),l.createBlock(W,{to:ee.route,custom:!0},{default:l.withCtx(({navigate:Le,isActive:z})=>[l.createElementVNode("li",{"data-active":z},[l.renderSlot(d.$slots,"item",{item:ee,navigate:Le,isActive:z},()=>[l.createElementVNode("a",{href:ee.route,class:l.normalizeClass({active:z}),onClick:Le},l.toDisplayString(ee.text),11,ul)])],8,cl)]),_:2},1032,["to"]))),256))],512),l.createElementVNode("div",{class:l.normalizeClass(["right-arrow",{active:c.value}]),onClick:V[1]||(V[1]=ee=>E())},dl,2)])}}}),hl=["id","name","disabled","data-color","form","type"],pl={class:"sf-button-label"},ml=l.defineComponent({__name:"Button",props:{icon:{},visible:{type:Boolean,default:!0},class:{},style:{},disabled:{type:Boolean},loading:{type:Boolean},color:{default:"primary"},size:{default:"md"},variant:{default:"filled"},autofocus:{type:Boolean},form:{},name:{},id:{},type:{default:"button"},value:{}},setup(t){const e=t;function n(){return new Ye(`${e.class??""} sf-button`).AddClass("sf-component-loading",e.loading).AddClass("sf-component-disabled",e.disabled).AddClass("sf-button-small",e.size==="sm").AddClass("sf-button-medium",e.size==="md").AddClass("sf-button-large",e.size==="lg").AddClass("sf-button-filled",e.variant==="filled").AddClass("sf-button-text",e.variant==="text").AddClass("sf-button-outlined",e.variant==="outlined").AddClass("sf-button-with-icon",!!e.icon).AddClass("sf-ripple").Build()}return(o,i)=>(l.openBlock(),l.createElementBlock("button",{id:e.id,name:e.name,class:l.normalizeClass(n()),style:l.normalizeStyle(e.style),disabled:e.disabled||e.loading,"data-color":e.color,form:e.form,type:e.type},[e.icon?(l.openBlock(),l.createBlock(ft,{key:0,icone:e.icon,loading:e.loading,size:e.size,"button-props":{tabindex:-1}},null,8,["icone","loading","size"])):e.loading?(l.openBlock(),l.createBlock(ft,{key:1,loading:!0,size:e.size,"button-props":{tabindex:-1}},null,8,["size"])):l.createCommentVNode("",!0),l.createElementVNode("span",pl,[l.renderSlot(o.$slots,"default")])],14,hl))}});class gl{constructor(e=null){dt(this,"errors",[]);dt(this,"_value",null);dt(this,"_httpStatusCode");this._value=e,this._httpStatusCode=200}get value(){return this._value}set value(e){this._value=e}get hasSuccess(){return!this.hasError}get hasError(){return this.errors.length>0}get httpStatusCode(){return this._httpStatusCode}set httpStatusCode(e){this._httpStatusCode=e}WithError(e){this.errors.push(e),this._httpStatusCode===200&&(this._httpStatusCode=400)}WithErrors(e){e.forEach(n=>this.WithError(n))}}const Ml="",Nl="";(()=>{function t(){l.nextTick(()=>{setTimeout(()=>{var n;const e=document.querySelector(":root");e&&e.style.setProperty("--window-height",`${((n=window.visualViewport)==null?void 0:n.height)??window.innerHeight}px`)},1)})}t(),window.addEventListener("resize",t)})(),_n.SetInitialTheme(),G.AppResult=gl,G.AuthService=ne,G.Cor=qt,G.SfButton=ml,G.SfContent=il,G.SfIcon=ft,G.SfLayout=tl,G.SfNavMenuLink=rl,G.SfTabNavigation=fl,G.Tamanho=Ge,G.UseDialogService=Do,G.UseNavMenuService=Wt,Object.defineProperty(G,Symbol.toStringTag,{value:"Module"})});
81
+ </div>`:o=e.text,new Promise(s=>{it.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:e.title,html:qo.sanitize(o)}).then(()=>s(!0))})}}const ic=new sc,Ko=()=>ic,ac=["data-cor"],cc=l.defineComponent({__name:"HeaderAvatar",setup(t){const e=Ko(),n=s();async function o(){await e.ConfirmAsync({text:`${oe.User.username} - ${oe.User.name}.<br /><br />Você deseja sair da conta?`,confirmLabel:"sair"})&&oe.CallLogout()}function s(){const y=oe.User.name;let T="?";if(!y)return T;const d=y.split(" ").filter(j=>j.length>0).map(j=>j[0].toUpperCase()),V=Math.min(2,d.length);return T=d.slice(0,V).join(""),T.length>0?T:"?"}function a(){const y=n[0],T=y==="?"?0:(y.charCodeAt(0)-64)%19;return Math.max(T,0)}return(y,T)=>(l.openBlock(),l.createElementBlock("div",{id:"sf-header-avatar","data-cor":a(),onClick:o},l.toDisplayString(l.unref(n)),9,ac))}}),lc={},uc={xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",class:"sf-svg-icon"},dc=[l.createElementVNode("path",{d:"m307.231-83.463-54.999-55.23 343.923-343.922-343.923-343.539 54.999-54.614 398.153 398.153L307.231-83.462Z"},null,-1)];function fc(t,e){return l.openBlock(),l.createElementBlock("svg",uc,dc)}const hc=Nn(lc,[["render",fc]]);class pc{get storedTheme(){return localStorage.getItem("color-scheme")}get IsDark(){return document.documentElement.classList.contains("dark")}Toggle(){this.IsDark?this.EnableLightMode():this.EnableDarkMode()}EnableDarkMode(){document.documentElement.classList.add("dark"),document.documentElement.classList.remove("light"),localStorage.setItem("color-scheme","dark")}EnableLightMode(){document.documentElement.classList.remove("dark"),document.documentElement.classList.add("light"),localStorage.setItem("color-scheme","light")}SetInitialTheme(){if(this.storedTheme==="light")return this.EnableLightMode();if(this.storedTheme==="dark")return this.EnableDarkMode();if(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches)return this.EnableDarkMode();this.EnableLightMode()}}const Sn=(()=>new pc)(),mc=[l.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="472.39" height="472.39" viewBox="0 0 472.39 472.39"><g class="toggle-sun"><path d="M403.21,167V69.18H305.38L236.2,0,167,69.18H69.18V167L0,236.2l69.18,69.18v97.83H167l69.18,69.18,69.18-69.18h97.83V305.38l69.18-69.18Zm-167,198.17a129,129,0,1,1,129-129A129,129,0,0,1,236.2,365.19Z"></path></g><g class="toggle-circle"><circle class="cls-1" cx="236.2" cy="236.2" r="103.78"></circle></g></svg>',1)],gc=l.defineComponent({__name:"ThemeToggle",setup(t){return(e,n)=>(l.openBlock(),l.createElementBlock("button",{id:"sf-theme-toggle",onClick:n[0]||(n[0]=(...o)=>l.unref(Sn).Toggle&&l.unref(Sn).Toggle(...o))},mc))}}),bc={id:"sf-layout"},yc=l.createElementVNode("div",{class:"sf-layout-menu-toggler-logo"},null,-1),wc={class:"title"},vc={class:"sf-layout-nav-header"},kc=l.createElementVNode("span",null,"Menu",-1),_c={class:"sf-layout-nav-content"},Ec=l.createElementVNode("section",{id:"sf-layout-page-title"},null,-1),Ac={id:"sf-layout-content"},Cc=l.defineComponent({__name:"Layout",setup(t){const e=Yt();return(n,o)=>(l.openBlock(),l.createElementBlock("div",bc,[l.createElementVNode("header",null,[l.createElementVNode("div",{class:l.normalizeClass(["sf-layout-menu-toggler",{invert:l.unref(e).IsVisible}]),onClick:o[0]||(o[0]=s=>l.unref(e).Toggle())},[yc,l.createVNode(hc)],2),l.createElementVNode("div",wc,[l.renderSlot(n.$slots,"title")]),l.renderSlot(n.$slots,"action"),l.createVNode(gc),l.createVNode(cc)]),l.createElementVNode("nav",{class:l.normalizeClass({visible:l.unref(e).IsVisible})},[l.createElementVNode("div",vc,[kc,l.createVNode(mt,{icone:"close",button:"",onClick:o[1]||(o[1]=s=>l.unref(e).Close())})]),l.createElementVNode("div",_c,[l.renderSlot(n.$slots,"menu")])],2),l.createElementVNode("main",{class:l.normalizeClass({"menu-visible":l.unref(e).IsVisible})},[Ec,l.createElementVNode("section",Ac,[l.renderSlot(n.$slots,"content")])],2)]))}}),xc=["href","data-active","onClick"],Tc={class:"sf-navmenulink-text"},Sc=l.defineComponent({__name:"NavMenuLink",props:{href:{},text:{},icon:{},exact:{type:Boolean}},setup(t){const e=t,n=Yt();function o(s,a){s.preventDefault();const T=s.target.closest(".sf-layout-nav-content");a(),T&&T.clientWidth+10>document.body.clientWidth&&n.Close()}return(s,a)=>{const y=l.resolveComponent("router-link");return l.openBlock(),l.createBlock(y,{to:e.href,custom:""},{default:l.withCtx(({href:T,navigate:d,isExactActive:V,isActive:j})=>[l.createElementVNode("a",{class:"sf-navmenulink",href:T,"data-active":e.exact?V:j,onClick:te=>o(te,d)},[e.icon?(l.openBlock(),l.createBlock(mt,{key:0,icone:e.icon,"button-props":{tabindex:-1}},null,8,["icone"])):l.createCommentVNode("",!0),l.createElementVNode("span",Tc,l.toDisplayString(e.text),1)],8,xc)]),_:1},8,["to"])}}}),Ic=l.defineComponent({__name:"ScrollToTop",setup(t){const e=l.ref(!1),n=`--${+new Date}`;let o=null;function s(){o==null||o.scrollTo(0,0)}return l.onMounted(()=>{var a;o=((a=document.getElementById(n))==null?void 0:a.parentElement)??null,o&&o.addEventListener("scroll",function(){e.value=this.scrollTop-this.clientHeight>0})}),(a,y)=>(l.openBlock(),l.createElementBlock("button",{id:n,class:l.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":e.value}]),onClick:s},null,2))}}),Lc=l.defineComponent({__name:"Content",props:{class:{},style:{},disableBodyPadding:{type:Boolean},disableHeaderPadding:{type:Boolean},disableFooterPadding:{type:Boolean}},setup(t){const e=t;function n(){return new Xe("sf-content").AddClass(e.class,!!e.class).Build()}function o(){return new Xe("sf-content-body").AddClass("sf-content-no-padding",e.disableBodyPadding).Build()}function s(){return new Xe("sf-content-header").AddClass("sf-content-no-padding",e.disableHeaderPadding).Build()}function a(){return new Xe("sf-content-footer").AddClass("sf-content-no-padding",e.disableFooterPadding).Build()}return(y,T)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(n()),style:l.normalizeStyle(e.style)},[l.createElementVNode("div",{class:l.normalizeClass(s())},[l.renderSlot(y.$slots,"header")],2),l.createElementVNode("div",{class:l.normalizeClass(o())},[l.renderSlot(y.$slots,"default"),l.createVNode(Ic)],2),l.createElementVNode("div",{class:l.normalizeClass(a())},[l.renderSlot(y.$slots,"footer")],2)],6))}}),Pc={class:"sf-tab-navigation"},Bc=[l.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[l.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})],-1)],Oc=["data-active"],Rc=["href","onClick"],Fc=[l.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[l.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})],-1)],Nc=l.defineComponent({__name:"TabNavigation",props:{tabs:{}},setup(t){const e=t,n=l.ref(null),o=new ResizeObserver(d=>{T()}),s=l.ref(!1),a=l.ref(!1);function y(d=!1){const V=n.value.clientWidth;n.value.scrollLeft+=d?-V:V}function T(){const d=n.value.scrollWidth-n.value.clientWidth;s.value=n.value.scrollLeft>10,a.value=n.value.scrollLeft<d-10}return l.onMounted(()=>{n.value.addEventListener("scroll",T),o.observe(n.value)}),l.onBeforeUnmount(()=>{var d;try{(d=n.value)==null||d.removeEventListener("scroll",T),o.unobserve(n.value),o.disconnect()}catch{}}),(d,V)=>{const j=l.resolveComponent("RouterLink");return l.openBlock(),l.createElementBlock("div",Pc,[l.createElementVNode("div",{class:l.normalizeClass(["left-arrow",{active:s.value}]),onClick:V[0]||(V[0]=te=>y(!0))},Bc,2),l.createElementVNode("ul",{ref_key:"trackerContainer",ref:n},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.tabs,te=>(l.openBlock(),l.createBlock(j,{to:te.route,custom:!0},{default:l.withCtx(({navigate:Le,isActive:W})=>[l.createElementVNode("li",{"data-active":W},[l.renderSlot(d.$slots,"item",{item:te,navigate:Le,isActive:W},()=>[l.createElementVNode("a",{href:te.route,class:l.normalizeClass({active:W}),onClick:Le},l.toDisplayString(te.text),11,Rc)])],8,Oc)]),_:2},1032,["to"]))),256))],512),l.createElementVNode("div",{class:l.normalizeClass(["right-arrow",{active:a.value}]),onClick:V[1]||(V[1]=te=>y())},Fc,2)])}}}),Dc=["id","name","disabled","data-color","form","type"],Mc={class:"sf-button-label"},Uc=l.defineComponent({__name:"Button",props:{icon:{},visible:{type:Boolean,default:!0},class:{},style:{},disabled:{type:Boolean},loading:{type:Boolean},color:{default:"primary"},size:{default:"md"},variant:{default:"filled"},autofocus:{type:Boolean},form:{},name:{},id:{},type:{default:"button"},value:{}},setup(t){const e=t;function n(){return new Xe(`${e.class??""} sf-button`).AddClass("sf-component-loading",e.loading).AddClass("sf-component-disabled",e.disabled).AddClass("sf-button-small",e.size==="sm").AddClass("sf-button-medium",e.size==="md").AddClass("sf-button-large",e.size==="lg").AddClass("sf-button-filled",e.variant==="filled").AddClass("sf-button-text",e.variant==="text").AddClass("sf-button-outlined",e.variant==="outlined").AddClass("sf-button-with-icon",!!e.icon).AddClass("sf-ripple").Build()}return(o,s)=>(l.openBlock(),l.createElementBlock("button",{id:e.id,name:e.name,class:l.normalizeClass(n()),style:l.normalizeStyle(e.style),disabled:e.disabled||e.loading,"data-color":e.color,form:e.form,type:e.type},[e.icon?(l.openBlock(),l.createBlock(mt,{key:0,icone:e.icon,loading:e.loading,size:e.size,"button-props":{tabindex:-1}},null,8,["icone","loading","size"])):e.loading?(l.openBlock(),l.createBlock(mt,{key:1,loading:!0,size:e.size,"button-props":{tabindex:-1}},null,8,["size"])):l.createCommentVNode("",!0),l.createElementVNode("span",Mc,[l.renderSlot(o.$slots,"default")])],14,Dc))}});class $c{constructor(e=null){pt(this,"errors",[]);pt(this,"_value",null);pt(this,"_httpStatusCode");this._value=e,this._httpStatusCode=200}get value(){return this._value}set value(e){this._value=e}get hasSuccess(){return!this.hasError}get hasError(){return this.errors.length>0}get httpStatusCode(){return this._httpStatusCode}set httpStatusCode(e){this._httpStatusCode=e}WithError(e){this.errors.push(e),this._httpStatusCode===200&&(this._httpStatusCode=400)}WithErrors(e){e.forEach(n=>this.WithError(n))}}const _l="",El="";(()=>{function t(){l.nextTick(()=>{setTimeout(()=>{var n;const e=document.querySelector(":root");e&&e.style.setProperty("--window-height",`${((n=window.visualViewport)==null?void 0:n.height)??window.innerHeight}px`)},1)})}t(),window.addEventListener("resize",t)})(),Sn.SetInitialTheme(),Y.AppResult=$c,Y.AuthService=oe,Y.Cor=Gt,Y.SfButton=Uc,Y.SfContent=Lc,Y.SfIcon=mt,Y.SfLayout=Cc,Y.SfNavMenuLink=Sc,Y.SfTabNavigation=Nc,Y.Tamanho=Je,Y.UseDialogService=Ko,Y.UseNavMenuService=Yt,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})});
80
82
  //# sourceMappingURL=lib.umd.js.map