@luizleon/sf.prefeiturasp.vuecomponents 0.0.43 → 0.0.44

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.
Files changed (52) hide show
  1. package/dist/components/button/Button.d.ts +45 -42
  2. package/dist/components/content/Content.d.ts +21 -36
  3. package/dist/components/drawer/Drawer.d.ts +46 -55
  4. package/dist/components/icon/Icon.d.ts +38 -38
  5. package/dist/components/internal/HeaderAvatar.d.ts +6 -0
  6. package/dist/components/internal/ScrollToTop.d.ts +2 -7
  7. package/dist/components/internal/ThemeToggle.d.ts +2 -11
  8. package/dist/components/layout/Layout.d.ts +18 -45
  9. package/dist/components/message/Message.d.ts +33 -37
  10. package/dist/components/navmenulink/NavMenuLink.d.ts +12 -35
  11. package/dist/components/tabnavigation/TabNavigation.d.ts +23 -42
  12. package/dist/index.d.ts +3 -3
  13. package/dist/keycloak.d.ts +1 -1
  14. package/dist/services/dialogService.d.ts +16 -5
  15. package/dist/{lib.es.js → sf.prefeiturasp.vuecomponents.es.js} +1300 -1266
  16. package/dist/sf.prefeiturasp.vuecomponents.es.js.map +1 -0
  17. package/dist/sf.prefeiturasp.vuecomponents.umd.js +82 -0
  18. package/dist/sf.prefeiturasp.vuecomponents.umd.js.map +1 -0
  19. package/dist/style.css +1 -1
  20. package/package.json +10 -10
  21. package/src/components/button/Button.d.ts +18 -3
  22. package/src/components/button/Button.vue +1 -0
  23. package/src/components/drawer/Drawer.d.ts +3 -0
  24. package/src/components/icon/Icon.d.ts +17 -3
  25. package/src/components/icon/Icon.vue +14 -8
  26. package/src/components/internal/HeaderAvatar.vue +4 -5
  27. package/src/components/message/Message.d.ts +10 -2
  28. package/src/components/message/Message.vue +9 -10
  29. package/src/index.ts +6 -6
  30. package/src/services/dialogService.ts +71 -25
  31. package/src/style/src/components/_icon.scss +0 -7
  32. package/src/style/src/sweetalert/scss/_animations.scss +197 -197
  33. package/src/style/src/sweetalert/scss/_body.scss +45 -45
  34. package/src/style/src/sweetalert/scss/_core.scss +862 -862
  35. package/src/style/src/sweetalert/scss/_mixins.scss +16 -16
  36. package/src/style/src/sweetalert/scss/_theming.scss +8 -8
  37. package/src/style/src/sweetalert/scss/_toasts-animations.scss +83 -83
  38. package/src/style/src/sweetalert/scss/_toasts-body.scss +85 -85
  39. package/src/style/src/sweetalert/scss/_toasts.scss +203 -203
  40. package/src/ts-helpers.d.ts +9 -9
  41. package/tsconfig.json +2 -2
  42. package/vite.config.js +4 -3
  43. package/dist/enum/cor.d.ts +0 -9
  44. package/dist/enum/index.d.ts +0 -2
  45. package/dist/enum/tamanho.d.ts +0 -5
  46. package/dist/lib.es.js.map +0 -1
  47. package/dist/lib.umd.js +0 -84
  48. package/dist/lib.umd.js.map +0 -1
  49. package/dist/ts-helpers.d.ts +0 -57
  50. package/src/enum/cor.ts +0 -9
  51. package/src/enum/index.ts +0 -2
  52. package/src/enum/tamanho.ts +0 -5
@@ -0,0 +1,82 @@
1
+ (function(Z,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(Z=typeof globalThis<"u"?globalThis:Z||self,c((Z.sf=Z.sf||{},Z.sf.prefeiturasp=Z.sf.prefeiturasp||{},Z.sf.prefeiturasp.vuecomponents={}),Z.Vue))})(this,function(Z,c){"use strict";var dd=Object.defineProperty;var fd=(Z,c,Xe)=>c in Z?dd(Z,c,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):Z[c]=Xe;var qe=(Z,c,Xe)=>(fd(Z,typeof c!="symbol"?c+"":c,Xe),Xe);class Xe{constructor(){qe(this,"_visible",c.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 As=new Xe,fn=()=>As;class Ke{constructor(e){qe(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()}}function ks(t=[]){let e="body *:not(style)";for(const n of t)e+=`, ${n}`;return Math.max(...Array.from(document.querySelectorAll(e)).map(n=>{const o=getComputedStyle(n).zIndex;return+o==+o?+o:0}))}let Cs=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");const uo=(t,e)=>{const n=t.__vccOpts||t;for(const[o,r]of e)n[o]=r;return n},Ss={},xs={class:"sf-loading-circle"},_s=[c.createElementVNode("div",null,[c.createElementVNode("svg",{viewBox:"25 25 50 50"},[c.createElementVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"4","stroke-miterlimit":"10"})])],-1)];function vs(t,e){return c.openBlock(),c.createElementBlock("div",xs,_s)}const Ts=uo(Ss,[["render",vs]]),Ps=["disabled","tabindex"],Rs=["data-color"],wt=c.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:"md"},dot:{type:Boolean},dotColor:{default:"error"},filled:{type:Boolean},buttonProps:{}},setup(t){const e=t;function n(){return new Ke(`${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==="sm").AddClass("sf-icon-medium",e.tamanho==="md").AddClass("sf-icon-large",e.tamanho==="lg").AddClass("sf-ripple",e.button===!0).Build()}return(o,r)=>e.visible?(c.openBlock(),c.createElementBlock("div",{key:0,style:c.normalizeStyle(e.style),class:c.normalizeClass(n())},[c.createElementVNode("button",c.mergeProps({class:["material-symbols-outlined",{"icon-filled":!!e.filled}],disabled:e.disabled||e.loading},e.buttonProps,{tabindex:e.button?void 0:-1}),[e.loading?(c.openBlock(),c.createBlock(Ts,{key:0})):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createTextVNode(c.toDisplayString(e.icone),1)],64))],16,Ps),e.dot?(c.openBlock(),c.createElementBlock("span",{key:0,"data-color":e.dotColor},null,8,Rs)):c.createCommentVNode("",!0)],6)):c.createCommentVNode("",!0)}}),Ls=["id","onClick"],Os={class:"sf-drawer-header"},Is={class:"sf-drawer-title"},Bs={class:"sf-drawer-content"},Ns={key:0,class:"sf-drawer-footer"},fo=c.defineComponent({__name:"Drawer",props:{visible:{type:Boolean,default:!1},position:{default:"left"},style:{}},emits:["update:visible","open","before-close"],setup(t,{emit:e}){const n=t,o=e,r=c.useSlots(),s=c.ref(n.visible),a=c.ref(!1),f=c.ref(0),u=Cs();function w(){s.value=!1}function E(M){(M.key==="Escape"||M.code==="Escape")&&w()}function b(){o("open"),window.document.addEventListener("keydown",E,!0)}function X(M){f.value=ks(),M.style.zIndex=`${f.value}`}function $(M){var ee;o("before-close"),(ee=M==null?void 0:M.parentElement)==null||ee.classList.add("sf-mask-overlay-leave")}function B(){window.document.removeEventListener("keydown",E,!0),a.value=!1}function N(){return new Ke("sf-mask sf-mask-overlay").AddClass("right",n.position==="right").AddClass("bottom",n.position==="bottom").AddClass("full",n.position==="full").AddClass("sf-mask-overlay-enter",n.visible===!0).Build()}return c.watch(()=>n.visible,M=>{s.value=M}),c.watch(()=>s.value,M=>{o("update:visible",M),M&&(a.value=!0)}),(M,ee)=>(c.openBlock(),c.createBlock(c.Teleport,{to:"body"},[a.value?(c.openBlock(),c.createElementBlock("div",{key:0,id:c.unref(u),class:c.normalizeClass(N()),style:c.normalizeStyle({zIndex:f.value-1}),onClick:c.withModifiers(w,["stop"])},[c.createVNode(c.Transition,{name:"sf-drawer",appear:"",onBeforeEnter:X,onEnter:b,onBeforeLeave:$,onAfterLeave:B},{default:c.withCtx(()=>[s.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["sf-drawer",{"sf-drawer-with-footer":!!c.unref(r).footer}]),style:c.normalizeStyle(n.style),role:"dialog",onClick:ee[0]||(ee[0]=c.withModifiers(oe=>M.void,["stop"]))},[c.createElementVNode("div",Os,[c.createElementVNode("span",Is,[c.renderSlot(M.$slots,"title")]),c.createVNode(wt,{button:!0,icone:"close",onClick:c.withModifiers(w,["stop"])},null,8,["onClick"])]),c.createElementVNode("div",Bs,[c.renderSlot(M.$slots,"default")]),c.unref(r).footer?(c.openBlock(),c.createElementBlock("div",Ns,[c.renderSlot(M.$slots,"footer")])):c.createCommentVNode("",!0)],6)):c.createCommentVNode("",!0)]),_:3})],14,Ls)):c.createCommentVNode("",!0)]))}}),Fs=["id","name","disabled","data-color","form","type"],Us={class:"sf-button-label"},ho=c.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 Ke(`${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,r)=>(c.openBlock(),c.createElementBlock("button",{id:e.id,name:e.name,class:c.normalizeClass(n()),style:c.normalizeStyle(e.style),disabled:e.disabled||e.loading,"data-color":e.color,form:e.form,type:e.type},[e.icon?(c.openBlock(),c.createBlock(wt,{key:0,filled:e.variant==="filled",icone:e.icon,loading:e.loading,size:e.size,"button-props":{tabindex:-1}},null,8,["filled","icone","loading","size"])):e.loading?(c.openBlock(),c.createBlock(wt,{key:1,loading:!0,size:e.size,"button-props":{tabindex:-1}},null,8,["size"])):c.createCommentVNode("",!0),c.createElementVNode("span",Us,[c.renderSlot(o.$slots,"default")])],14,Fs))}}),po="SweetAlert2:",Ds=t=>{const e=[];for(let n=0;n<t.length;n++)e.indexOf(t[n])===-1&&e.push(t[n]);return e},hn=t=>t.charAt(0).toUpperCase()+t.slice(1),_e=t=>Array.prototype.slice.call(t),Ee=t=>{console.warn(`${po} ${typeof t=="object"?t.join(" "):t}`)},Ze=t=>{console.error(`${po} ${t}`)},mo=[],Ms=t=>{mo.includes(t)||(mo.push(t),Ee(t))},$s=(t,e)=>{Ms(`"${t}" is deprecated and will be removed in the next major release. Please use "${e}" instead.`)},Ht=t=>typeof t=="function"?t():t,pn=t=>t&&typeof t.toPromise=="function",Et=t=>pn(t)?t.toPromise():Promise.resolve(t),mn=t=>t&&Promise.resolve(t)===t,st={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},Hs=["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"],js={},Vs=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],go=t=>Object.prototype.hasOwnProperty.call(st,t),yo=t=>Hs.indexOf(t)!==-1,gn=t=>js[t],zs=t=>{go(t)||Ee(`Unknown parameter "${t}"`)},Ws=t=>{Vs.includes(t)&&Ee(`The parameter "${t}" is incompatible with toasts`)},qs=t=>{gn(t)&&$s(t,gn(t))},Ks=t=>{!t.backdrop&&t.allowOutsideClick&&Ee('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const e in t)zs(e),t.toast&&Ws(e),qs(e)},Gs="swal2-",bo=t=>{const e={};for(const n in t)e[t[n]]=Gs+t[n];return e},h=bo(["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"]),At=bo(["success","warning","info","question","error"]),de=()=>document.body.querySelector(`.${h.container}`),kt=t=>{const e=de();return e?e.querySelector(t):null},Re=t=>kt(`.${t}`),Q=()=>Re(h.popup),Ct=()=>Re(h.icon),wo=()=>Re(h.title),jt=()=>Re(h["html-container"]),Eo=()=>Re(h.image),Ao=()=>Re(h["progress-steps"]),Vt=()=>Re(h["validation-message"]),Be=()=>kt(`.${h.actions} .${h.confirm}`),Ge=()=>kt(`.${h.actions} .${h.deny}`),Js=()=>Re(h["input-label"]),it=()=>kt(`.${h.loader}`),Qe=()=>kt(`.${h.actions} .${h.cancel}`),St=()=>Re(h.actions),ko=()=>Re(h.footer),zt=()=>Re(h["timer-progress-bar"]),yn=()=>Re(h.close),Ys=`
2
+ a[href],
3
+ area[href],
4
+ input:not([disabled]),
5
+ select:not([disabled]),
6
+ textarea:not([disabled]),
7
+ button:not([disabled]),
8
+ iframe,
9
+ object,
10
+ embed,
11
+ [tabindex="0"],
12
+ [contenteditable],
13
+ audio[controls],
14
+ video[controls],
15
+ summary
16
+ `,bn=()=>{const t=_e(Q().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((n,o)=>{const r=parseInt(n.getAttribute("tabindex")),s=parseInt(o.getAttribute("tabindex"));return r>s?1:r<s?-1:0}),e=_e(Q().querySelectorAll(Ys)).filter(n=>n.getAttribute("tabindex")!=="-1");return Ds(t.concat(e)).filter(n=>ve(n))},wn=()=>je(document.body,h.shown)&&!je(document.body,h["toast-shown"])&&!je(document.body,h["no-backdrop"]),Wt=()=>Q()&&je(Q(),h.toast),Xs=()=>Q().hasAttribute("data-loading"),at={previousBodyPadding:null},fe=(t,e)=>{if(t.textContent="",e){const o=new DOMParser().parseFromString(e,"text/html");_e(o.querySelector("head").childNodes).forEach(r=>{t.appendChild(r)}),_e(o.querySelector("body").childNodes).forEach(r=>{t.appendChild(r)})}},je=(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},Zs=(t,e)=>{_e(t.classList).forEach(n=>{!Object.values(h).includes(n)&&!Object.values(At).includes(n)&&!Object.values(e.showClass).includes(n)&&t.classList.remove(n)})},Le=(t,e,n)=>{if(Zs(t,e),e.customClass&&e.customClass[n]){if(typeof e.customClass[n]!="string"&&!e.customClass[n].forEach)return Ee(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof e.customClass[n]}"`);J(t,e.customClass[n])}},En=(t,e)=>{if(!e)return null;switch(e){case"select":case"textarea":case"file":return t.querySelector(`.${h.popup} > .${h[e]}`);case"checkbox":return t.querySelector(`.${h.popup} > .${h.checkbox} input`);case"radio":return t.querySelector(`.${h.popup} > .${h.radio} input:checked`)||t.querySelector(`.${h.popup} > .${h.radio} input:first-child`);case"range":return t.querySelector(`.${h.popup} > .${h.range} input`);default:return t.querySelector(`.${h.popup} > .${h.input}`)}},Co=t=>{if(t.focus(),t.type!=="file"){const e=t.value;t.value="",t.value=e}},So=(t,e,n)=>{!t||!e||(typeof e=="string"&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(o=>{Array.isArray(t)?t.forEach(r=>{n?r.classList.add(o):r.classList.remove(o)}):n?t.classList.add(o):t.classList.remove(o)}))},J=(t,e)=>{So(t,e,!0)},Ue=(t,e)=>{So(t,e,!1)},Je=(t,e)=>{const n=_e(t.childNodes);for(let o=0;o<n.length;o++)if(je(n[o],e))return n[o]},xt=(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)},le=(t,e="flex")=>{t.style.display=e},he=t=>{t.style.display="none"},xo=(t,e,n,o)=>{const r=t.querySelector(e);r&&(r.style[n]=o)},qt=(t,e,n)=>{e?le(t,n):he(t)},ve=t=>!!(t&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)),Qs=()=>!ve(Be())&&!ve(Ge())&&!ve(Qe()),_o=t=>t.scrollHeight>t.clientHeight,vo=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},An=(t,e=!1)=>{const n=zt();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))},ei=()=>{const t=zt(),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}%`},To=()=>typeof window>"u"||typeof document>"u",ti=100,W={},ni=()=>{W.previousActiveElement&&W.previousActiveElement.focus?(W.previousActiveElement.focus(),W.previousActiveElement=null):document.body&&document.body.focus()},oi=t=>new Promise(e=>{if(!t)return e();const n=window.scrollX,o=window.scrollY;W.restoreFocusTimeout=setTimeout(()=>{ni(),e()},ti),window.scrollTo(n,o)}),ri=`
17
+ <div aria-labelledby="${h.title}" aria-describedby="${h["html-container"]}" class="${h.popup}" tabindex="-1">
18
+ <button type="button" class="${h.close}"></button>
19
+ <ul class="${h["progress-steps"]}"></ul>
20
+ <div class="${h.icon}"></div>
21
+ <img class="${h.image}" />
22
+ <h2 class="${h.title}" id="${h.title}"></h2>
23
+ <div class="${h["html-container"]}" id="${h["html-container"]}"></div>
24
+ <input class="${h.input}" />
25
+ <input type="file" class="${h.file}" />
26
+ <div class="${h.range}">
27
+ <input type="range" />
28
+ <output></output>
29
+ </div>
30
+ <select class="${h.select}"></select>
31
+ <div class="${h.radio}"></div>
32
+ <label for="${h.checkbox}" class="${h.checkbox}">
33
+ <input type="checkbox" />
34
+ <span class="${h.label}"></span>
35
+ </label>
36
+ <textarea class="${h.textarea}"></textarea>
37
+ <div class="${h["validation-message"]}" id="${h["validation-message"]}"></div>
38
+ <div class="${h.actions}">
39
+ <div class="${h.loader}"></div>
40
+ <button type="button" class="${h.confirm}"></button>
41
+ <button type="button" class="${h.deny}"></button>
42
+ <button type="button" class="${h.cancel}"></button>
43
+ </div>
44
+ <div class="${h.footer}"></div>
45
+ <div class="${h["timer-progress-bar-container"]}">
46
+ <div class="${h["timer-progress-bar"]}"></div>
47
+ </div>
48
+ </div>
49
+ `.replace(/(^|\n)\s*/g,""),si=()=>{const t=de();return t?(t.remove(),Ue([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0):!1},et=()=>{W.currentInstance.resetValidationMessage()},ii=()=>{const t=Q(),e=Je(t,h.input),n=Je(t,h.file),o=t.querySelector(`.${h.range} input`),r=t.querySelector(`.${h.range} output`),s=Je(t,h.select),a=t.querySelector(`.${h.checkbox} input`),f=Je(t,h.textarea);e.oninput=et,n.onchange=et,s.onchange=et,a.onchange=et,f.oninput=et,o.oninput=()=>{et(),r.value=o.value},o.onchange=()=>{et(),o.nextSibling.value=o.value}},ai=t=>typeof t=="string"?document.querySelector(t):t,ci=t=>{const e=Q();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")},li=t=>{window.getComputedStyle(t).direction==="rtl"&&J(de(),h.rtl)},ui=t=>{const e=si();if(To()){Ze("SweetAlert2 requires document to initialize");return}const n=document.createElement("div");n.className=h.container,e&&J(n,h["no-transition"]),fe(n,ri);const o=ai(t.target);o.appendChild(n),ci(t),li(o),ii()},kn=(t,e)=>{t instanceof HTMLElement?e.appendChild(t):typeof t=="object"?di(t,e):t&&fe(e,t)},di=(t,e)=>{t.jquery?fi(e,t):fe(e,t.toString())},fi=(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))},_t=(()=>{if(To())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})(),hi=()=>{const t=document.createElement("div");t.className=h["scrollbar-measure"],document.body.appendChild(t);const e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},pi=(t,e)=>{const n=St(),o=it();!e.showConfirmButton&&!e.showDenyButton&&!e.showCancelButton?he(n):le(n),Le(n,e,"actions"),mi(n,o,e),fe(o,e.loaderHtml),Le(o,e,"loader")};function mi(t,e,n){const o=Be(),r=Ge(),s=Qe();Cn(o,"confirm",n),Cn(r,"deny",n),Cn(s,"cancel",n),gi(o,r,s,n),n.reverseButtons&&(n.toast?(t.insertBefore(s,o),t.insertBefore(r,o)):(t.insertBefore(s,e),t.insertBefore(r,e),t.insertBefore(o,e)))}function gi(t,e,n,o){if(!o.buttonsStyling)return Ue([t,e,n],h.styled);J([t,e,n],h.styled),o.confirmButtonColor&&(t.style.backgroundColor=o.confirmButtonColor,J(t,h["default-outline"])),o.denyButtonColor&&(e.style.backgroundColor=o.denyButtonColor,J(e,h["default-outline"])),o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,J(n,h["default-outline"]))}function Cn(t,e,n){qt(t,n[`show${hn(e)}Button`],"inline-block"),fe(t,n[`${e}ButtonText`]),t.setAttribute("aria-label",n[`${e}ButtonAriaLabel`]),t.className=h[e],Le(t,n,`${e}Button`),J(t,n[`${e}ButtonClass`])}function yi(t,e){typeof e=="string"?t.style.background=e:e||J([document.documentElement,document.body],h["no-backdrop"])}function bi(t,e){e in h?J(t,h[e]):(Ee('The "position" parameter is not valid, defaulting to "center"'),J(t,h.center))}function wi(t,e){if(e&&typeof e=="string"){const n=`grow-${e}`;n in h&&J(t,h[n])}}const Ei=(t,e)=>{const n=de();n&&(yi(n,e.backdrop),bi(n,e.position),wi(n,e.grow),Le(n,e,"container"))},q={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},Ai=["input","file","range","select","radio","checkbox","textarea"],ki=(t,e)=>{const n=Q(),o=q.innerParams.get(t),r=!o||e.input!==o.input;Ai.forEach(s=>{const a=h[s],f=Je(n,a);xi(s,e.inputAttributes),f.className=a,r&&he(f)}),e.input&&(r&&Ci(e),_i(e))},Ci=t=>{if(!Ae[t.input])return Ze(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${t.input}"`);const e=Po(t.input),n=Ae[t.input](e,t);le(n),setTimeout(()=>{Co(n)})},Si=t=>{for(let e=0;e<t.attributes.length;e++){const n=t.attributes[e].name;["type","value","style"].includes(n)||t.removeAttribute(n)}},xi=(t,e)=>{const n=En(Q(),t);if(n){Si(n);for(const o in e)n.setAttribute(o,e[o])}},_i=t=>{const e=Po(t.input);t.customClass&&J(e,t.customClass.input)},Sn=(t,e)=>{(!t.placeholder||e.inputPlaceholder)&&(t.placeholder=e.inputPlaceholder)},vt=(t,e,n)=>{if(n.inputLabel){t.id=h.input;const o=document.createElement("label"),r=h["input-label"];o.setAttribute("for",t.id),o.className=r,J(o,n.customClass.inputLabel),o.innerText=n.inputLabel,e.insertAdjacentElement("beforebegin",o)}},Po=t=>{const e=h[t]?h[t]:h.input;return Je(Q(),e)},Ae={};Ae.text=Ae.email=Ae.password=Ae.number=Ae.tel=Ae.url=(t,e)=>(typeof e.inputValue=="string"||typeof e.inputValue=="number"?t.value=e.inputValue:mn(e.inputValue)||Ee(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof e.inputValue}"`),vt(t,t,e),Sn(t,e),t.type=e.input,t),Ae.file=(t,e)=>(vt(t,t,e),Sn(t,e),t),Ae.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,vt(n,t,e),t},Ae.select=(t,e)=>{if(t.textContent="",e.inputPlaceholder){const n=document.createElement("option");fe(n,e.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)}return vt(t,t,e),t},Ae.radio=t=>(t.textContent="",t),Ae.checkbox=(t,e)=>{const n=En(Q(),"checkbox");n.value="1",n.id=h.checkbox,n.checked=!!e.inputValue;const o=t.querySelector("span");return fe(o,e.inputPlaceholder),t},Ae.textarea=(t,e)=>{t.value=e.inputValue,Sn(t,e),vt(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(Q()).width),r=()=>{const s=t.offsetWidth+n(t);s>o?Q().style.width=`${s}px`:Q().style.width=null};new MutationObserver(r).observe(t,{attributes:!0,attributeFilter:["style"]})}}),t};const vi=(t,e)=>{const n=jt();Le(n,e,"htmlContainer"),e.html?(kn(e.html,n),le(n,"block")):e.text?(n.textContent=e.text,le(n,"block")):he(n),ki(t,e)},Ti=(t,e)=>{const n=ko();qt(n,e.footer),e.footer&&kn(e.footer,n),Le(n,e,"footer")},Pi=(t,e)=>{const n=yn();fe(n,e.closeButtonHtml),Le(n,e,"closeButton"),qt(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel)},Ri=(t,e)=>{const n=q.innerParams.get(t),o=Ct();if(n&&e.icon===n.icon){Lo(o,e),Ro(o,e);return}if(!e.icon&&!e.iconHtml)return he(o);if(e.icon&&Object.keys(At).indexOf(e.icon)===-1)return Ze(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${e.icon}"`),he(o);le(o),Lo(o,e),Ro(o,e),J(o,e.showClass.icon)},Ro=(t,e)=>{for(const n in At)e.icon!==n&&Ue(t,At[n]);J(t,At[e.icon]),Bi(t,e),Li(),Le(t,e,"icon")},Li=()=>{const t=Q(),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},Oi=`
50
+ <div class="swal2-success-circular-line-left"></div>
51
+ <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
52
+ <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
53
+ <div class="swal2-success-circular-line-right"></div>
54
+ `,Ii=`
55
+ <span class="swal2-x-mark">
56
+ <span class="swal2-x-mark-line-left"></span>
57
+ <span class="swal2-x-mark-line-right"></span>
58
+ </span>
59
+ `,Lo=(t,e)=>{t.textContent="",e.iconHtml?fe(t,Oo(e.iconHtml)):e.icon==="success"?fe(t,Oi):e.icon==="error"?fe(t,Ii):fe(t,Oo({question:"?",warning:"!",info:"i"}[e.icon]))},Bi=(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"])xo(t,n,"backgroundColor",e.iconColor);xo(t,".swal2-success-ring","borderColor",e.iconColor)}},Oo=t=>`<div class="${h["icon-content"]}">${t}</div>`,Ni=(t,e)=>{const n=Eo();if(!e.imageUrl)return he(n);le(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt),xt(n,"width",e.imageWidth),xt(n,"height",e.imageHeight),n.className=h.image,Le(n,e,"image")},Fi=t=>{const e=document.createElement("li");return J(e,h["progress-step"]),fe(e,t),e},Ui=t=>{const e=document.createElement("li");return J(e,h["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e},Di=(t,e)=>{const n=Ao();if(!e.progressSteps||e.progressSteps.length===0)return he(n);le(n),n.textContent="",e.currentProgressStep>=e.progressSteps.length&&Ee("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach((o,r)=>{const s=Fi(o);if(n.appendChild(s),r===e.currentProgressStep&&J(s,h["active-progress-step"]),r!==e.progressSteps.length-1){const a=Ui(e);n.appendChild(a)}})},Mi=(t,e)=>{const n=wo();qt(n,e.title||e.titleText,"block"),e.title&&kn(e.title,n),e.titleText&&(n.innerText=e.titleText),Le(n,e,"title")},$i=(t,e)=>{const n=de(),o=Q();e.toast?(xt(n,"width",e.width),o.style.width="100%",o.insertBefore(it(),Ct())):xt(o,"width",e.width),xt(o,"padding",e.padding),e.color&&(o.style.color=e.color),e.background&&(o.style.background=e.background),he(Vt()),Hi(o,e)},Hi=(t,e)=>{t.className=`${h.popup} ${ve(t)?e.showClass.popup:""}`,e.toast?(J([document.documentElement,document.body],h["toast-shown"]),J(t,h.toast)):J(t,h.modal),Le(t,e,"popup"),typeof e.customClass=="string"&&J(t,e.customClass),e.icon&&J(t,h[`icon-${e.icon}`])},Io=(t,e)=>{$i(t,e),Ei(t,e),Di(t,e),Ri(t,e),Ni(t,e),Mi(t,e),Pi(t,e),vi(t,e),pi(t,e),Ti(t,e),typeof e.didRender=="function"&&e.didRender(Q())},ct=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),ji=()=>{_e(document.body.children).forEach(e=>{e===de()||e.contains(de())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})},Bo=()=>{_e(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"],Vi=t=>{const e=typeof t.template=="string"?document.querySelector(t.template):t.template;if(!e)return{};const n=e.content;return Yi(n),Object.assign(zi(n),Wi(n),qi(n),Ki(n),Gi(n),Ji(n,No))},zi=t=>{const e={};return _e(t.querySelectorAll("swal-param")).forEach(n=>{tt(n,["name","value"]);const o=n.getAttribute("name"),r=n.getAttribute("value");typeof st[o]=="boolean"&&r==="false"&&(e[o]=!1),typeof st[o]=="object"&&(e[o]=JSON.parse(r))}),e},Wi=t=>{const e={};return _e(t.querySelectorAll("swal-button")).forEach(n=>{tt(n,["type","color","aria-label"]);const o=n.getAttribute("type");e[`${o}ButtonText`]=n.innerHTML,e[`show${hn(o)}Button`]=!0,n.hasAttribute("color")&&(e[`${o}ButtonColor`]=n.getAttribute("color")),n.hasAttribute("aria-label")&&(e[`${o}ButtonAriaLabel`]=n.getAttribute("aria-label"))}),e},qi=t=>{const e={},n=t.querySelector("swal-image");return n&&(tt(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},Ki=t=>{const e={},n=t.querySelector("swal-icon");return n&&(tt(n,["type","color"]),n.hasAttribute("type")&&(e.icon=n.getAttribute("type")),n.hasAttribute("color")&&(e.iconColor=n.getAttribute("color")),e.iconHtml=n.innerHTML),e},Gi=t=>{const e={},n=t.querySelector("swal-input");n&&(tt(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={},_e(o).forEach(r=>{tt(r,["value"]);const s=r.getAttribute("value"),a=r.innerHTML;e.inputOptions[s]=a})),e},Ji=(t,e)=>{const n={};for(const o in e){const r=e[o],s=t.querySelector(r);s&&(tt(s,[]),n[r.replace(/^swal-/,"")]=s.innerHTML.trim())}return n},Yi=t=>{const e=No.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);_e(t.children).forEach(n=>{const o=n.tagName.toLowerCase();e.indexOf(o)===-1&&Ee(`Unrecognized element <${o}>`)})},tt=(t,e)=>{_e(t.attributes).forEach(n=>{e.indexOf(n.name)===-1&&Ee([`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 Xi(t){t.inputValidator||Object.keys(Fo).forEach(e=>{t.input===e&&(t.inputValidator=Fo[e])})}function Zi(t){(!t.target||typeof t.target=="string"&&!document.querySelector(t.target)||typeof t.target!="string"&&!t.target.appendChild)&&(Ee('Target parameter is not valid, defaulting to "body"'),t.target="body")}function Qi(t){Xi(t),t.showLoaderOnConfirm&&!t.preConfirm&&Ee(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
60
+ showLoaderOnConfirm should be used together with preConfirm, see usage example:
61
+ https://sweetalert2.github.io/#ajax-request`),Zi(t),typeof t.title=="string"&&(t.title=t.title.split(`
62
+ `).join("<br />")),ui(t)}class ea{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 ta=()=>{at.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(at.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${at.previousBodyPadding+hi()}px`)},na=()=>{at.previousBodyPadding!==null&&(document.body.style.paddingRight=`${at.previousBodyPadding}px`,at.previousBodyPadding=null)},oa=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!je(document.body,h.iosfix)){const e=document.body.scrollTop;document.body.style.top=`${e*-1}px`,J(document.body,h.iosfix),sa(),ra()}},ra=()=>{const t=navigator.userAgent,e=!!t.match(/iPad/i)||!!t.match(/iPhone/i),n=!!t.match(/WebKit/i);e&&n&&!t.match(/CriOS/i)&&Q().scrollHeight>window.innerHeight-44&&(de().style.paddingBottom="44px")},sa=()=>{const t=de();let e;t.ontouchstart=n=>{e=ia(n)},t.ontouchmove=n=>{e&&(n.preventDefault(),n.stopPropagation())}},ia=t=>{const e=t.target,n=de();return aa(t)||ca(t)?!1:e===n||!_o(n)&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"&&!(_o(jt())&&jt().contains(e))},aa=t=>t.touches&&t.touches.length&&t.touches[0].touchType==="stylus",ca=t=>t.touches&&t.touches.length>1,la=()=>{if(je(document.body,h.iosfix)){const t=parseInt(document.body.style.top,10);Ue(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=t*-1}},Uo=10,ua=t=>{const e=de(),n=Q();typeof t.willOpen=="function"&&t.willOpen(n);const r=window.getComputedStyle(document.body).overflowY;ha(e,n,t),setTimeout(()=>{da(e,n)},Uo),wn()&&(fa(e,t.scrollbarPadding,r),ji()),!Wt()&&!W.previousActiveElement&&(W.previousActiveElement=document.activeElement),typeof t.didOpen=="function"&&setTimeout(()=>t.didOpen(n)),Ue(e,h["no-transition"])},Do=t=>{const e=Q();if(t.target!==e)return;const n=de();e.removeEventListener(_t,Do),n.style.overflowY="auto"},da=(t,e)=>{_t&&vo(e)?(t.style.overflowY="hidden",e.addEventListener(_t,Do)):t.style.overflowY="auto"},fa=(t,e,n)=>{oa(),e&&n!=="hidden"&&ta(),setTimeout(()=>{t.scrollTop=0})},ha=(t,e,n)=>{J(t,n.showClass.backdrop),e.style.setProperty("opacity","0","important"),le(e,"grid"),setTimeout(()=>{J(e,n.showClass.popup),e.style.removeProperty("opacity")},Uo),J([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&J([document.documentElement,document.body],h["height-auto"])},lt=t=>{let e=Q();e||new dt,e=Q();const n=it();Wt()?he(Ct()):pa(e,t),le(n),e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},pa=(t,e)=>{const n=St(),o=it();!e&&ve(Be())&&(e=Be()),le(n),e&&(he(e),o.setAttribute("data-button-to-replace",e.className)),o.parentNode.insertBefore(o,e),J([t,n],h.loading)},ma=(t,e)=>{e.input==="select"||e.input==="radio"?Ea(t,e):["text","email","number","tel","textarea"].includes(e.input)&&(pn(e.inputValue)||mn(e.inputValue))&&(lt(Be()),Aa(t,e))},ga=(t,e)=>{const n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return ya(n);case"radio":return ba(n);case"file":return wa(n);default:return e.inputAutoTrim?n.value.trim():n.value}},ya=t=>t.checked?1:0,ba=t=>t.checked?t.value:null,wa=t=>t.files.length?t.getAttribute("multiple")!==null?t.files:t.files[0]:null,Ea=(t,e)=>{const n=Q(),o=r=>ka[e.input](n,xn(r),e);pn(e.inputOptions)||mn(e.inputOptions)?(lt(Be()),Et(e.inputOptions).then(r=>{t.hideLoading(),o(r)})):typeof e.inputOptions=="object"?o(e.inputOptions):Ze(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`)},Aa=(t,e)=>{const n=t.getInput();he(n),Et(e.inputValue).then(o=>{n.value=e.input==="number"?parseFloat(o)||0:`${o}`,le(n),n.focus(),t.hideLoading()}).catch(o=>{Ze(`Error in inputValue promise: ${o}`),n.value="",le(n),n.focus(),t.hideLoading()})},ka={select:(t,e,n)=>{const o=Je(t,h.select),r=(s,a,f)=>{const u=document.createElement("option");u.value=f,fe(u,a),u.selected=Mo(f,n.inputValue),s.appendChild(u)};e.forEach(s=>{const a=s[0],f=s[1];if(Array.isArray(f)){const u=document.createElement("optgroup");u.label=a,u.disabled=!1,o.appendChild(u),f.forEach(w=>r(u,w[1],w[0]))}else r(o,f,a)}),o.focus()},radio:(t,e,n)=>{const o=Je(t,h.radio);e.forEach(s=>{const a=s[0],f=s[1],u=document.createElement("input"),w=document.createElement("label");u.type="radio",u.name=h.radio,u.value=a,Mo(a,n.inputValue)&&(u.checked=!0);const E=document.createElement("span");fe(E,f),E.className=h.label,w.appendChild(u),w.appendChild(E),o.appendChild(w)});const r=o.querySelectorAll("input");r.length&&r[0].focus()}},xn=t=>{const e=[];return typeof Map<"u"&&t instanceof Map?t.forEach((n,o)=>{let r=n;typeof r=="object"&&(r=xn(r)),e.push([o,r])}):Object.keys(t).forEach(n=>{let o=t[n];typeof o=="object"&&(o=xn(o)),e.push([n,o])}),e},Mo=(t,e)=>e&&e.toString()===t.toString();function $o(){const t=q.innerParams.get(this);if(!t)return;const e=q.domCache.get(this);he(e.loader),Wt()?t.icon&&le(Ct()):Ca(e),Ue([e.popup,e.actions],h.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}const Ca=t=>{const e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?le(e[0],"inline-block"):Qs()&&he(t.actions)};function Sa(t){const e=q.innerParams.get(t||this),n=q.domCache.get(t||this);return n?En(n.popup,e.input):null}const Tt={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},xa=()=>ve(Q()),Ho=()=>Be()&&Be().click(),_a=()=>Ge()&&Ge().click(),va=()=>Qe()&&Qe().click(),jo=t=>{t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},Ta=(t,e,n,o)=>{jo(e),n.toast||(e.keydownHandler=r=>Ra(t,r,o),e.keydownTarget=n.keydownListenerCapture?window:Q(),e.keydownListenerCapture=n.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)},_n=(t,e,n)=>{const o=bn();if(o.length)return e=e+n,e===o.length?e=0:e===-1&&(e=o.length-1),o[e].focus();Q().focus()},Vo=["ArrowRight","ArrowDown"],Pa=["ArrowLeft","ArrowUp"],Ra=(t,e,n)=>{const o=q.innerParams.get(t);o&&(e.isComposing||e.keyCode===229||(o.stopKeydownPropagation&&e.stopPropagation(),e.key==="Enter"?La(t,e,o):e.key==="Tab"?Oa(e,o):[...Vo,...Pa].includes(e.key)?Ia(e.key):e.key==="Escape"&&Ba(e,o,n)))},La=(t,e,n)=>{if(Ht(n.allowEnterKey)&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;Ho(),e.preventDefault()}},Oa=(t,e)=>{const n=t.target,o=bn();let r=-1;for(let s=0;s<o.length;s++)if(n===o[s]){r=s;break}t.shiftKey?_n(e,r,-1):_n(e,r,1),t.stopPropagation(),t.preventDefault()},Ia=t=>{const e=Be(),n=Ge(),o=Qe();if(![e,n,o].includes(document.activeElement))return;const r=Vo.includes(t)?"nextElementSibling":"previousElementSibling";let s=document.activeElement;for(let a=0;a<St().children.length;a++){if(s=s[r],!s)return;if(ve(s)&&s instanceof HTMLButtonElement)break}s instanceof HTMLButtonElement&&s.focus()},Ba=(t,e,n)=>{Ht(e.allowEscapeKey)&&(t.preventDefault(),n(ct.esc))};function zo(t,e,n,o){Wt()?Wo(t,o):(oi(n).then(()=>Wo(t,o)),jo(W)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),wn()&&(na(),la(),Bo()),Na()}function Na(){Ue([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function Kt(t){t=Ma(t);const e=Tt.swalPromiseResolve.get(this),n=Ua(this);this.isAwaitingPromise()?t.isDismissed||(Pt(this),e(t)):n&&e(t)}function Fa(){return!!q.awaitingPromise.get(this)}const Ua=t=>{const e=Q();if(!e)return!1;const n=q.innerParams.get(t);if(!n||je(e,n.hideClass.popup))return!1;Ue(e,n.showClass.popup),J(e,n.hideClass.popup);const o=de();return Ue(o,n.showClass.backdrop),J(o,n.hideClass.backdrop),$a(t,e,n),!0};function Da(t){const e=Tt.swalPromiseReject.get(this);Pt(this),e&&e(t)}const Pt=t=>{t.isAwaitingPromise()&&(q.awaitingPromise.delete(t),q.innerParams.get(t)||t._destroy())},Ma=t=>typeof t>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),$a=(t,e,n)=>{const o=de(),r=_t&&vo(e);typeof n.willClose=="function"&&n.willClose(e),r?Ha(t,e,o,n.returnFocus,n.didClose):zo(t,o,n.returnFocus,n.didClose)},Ha=(t,e,n,o,r)=>{W.swalCloseEventFinishedCallback=zo.bind(null,t,n,o,r),e.addEventListener(_t,function(s){s.target===e&&(W.swalCloseEventFinishedCallback(),delete W.swalCloseEventFinishedCallback)})},Wo=(t,e)=>{setTimeout(()=>{typeof e=="function"&&e.bind(t.params)(),t._destroy()})};function qo(t,e,n){const o=q.domCache.get(t);e.forEach(r=>{o[r].disabled=n})}function Ko(t,e){if(!t)return!1;if(t.type==="radio"){const o=t.parentNode.parentNode.querySelectorAll("input");for(let r=0;r<o.length;r++)o[r].disabled=e}else t.disabled=e}function ja(){qo(this,["confirmButton","denyButton","cancelButton"],!1)}function Va(){qo(this,["confirmButton","denyButton","cancelButton"],!0)}function za(){return Ko(this.getInput(),!1)}function Wa(){return Ko(this.getInput(),!0)}function qa(t){const e=q.domCache.get(this),n=q.innerParams.get(this);fe(e.validationMessage,t),e.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&J(e.validationMessage,n.customClass.validationMessage),le(e.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),Co(o),J(o,h.inputerror))}function Ka(){const t=q.domCache.get(this);t.validationMessage&&he(t.validationMessage);const e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedby"),Ue(e,h.inputerror))}function Ga(){return q.domCache.get(this).progressSteps}function Ja(t){const e=Q(),n=q.innerParams.get(this);if(!e||je(e,n.hideClass.popup))return Ee("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=Ya(t),r=Object.assign({},n,o);Io(this,r),q.innerParams.set(this,r),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}const Ya=t=>{const e={};return Object.keys(t).forEach(n=>{yo(n)?e[n]=t[n]:Ee(`Invalid parameter to update: "${n}". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js
63
+
64
+ 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 Xa(){const t=q.domCache.get(this),e=q.innerParams.get(this);if(!e){Go(this);return}t.popup&&W.swalCloseEventFinishedCallback&&(W.swalCloseEventFinishedCallback(),delete W.swalCloseEventFinishedCallback),W.deferDisposalTimer&&(clearTimeout(W.deferDisposalTimer),delete W.deferDisposalTimer),typeof e.didDestroy=="function"&&e.didDestroy(),Za(this)}const Za=t=>{Go(t),delete t.params,delete W.keydownHandler,delete W.keydownTarget,delete W.currentInstance},Go=t=>{t.isAwaitingPromise()?(vn(q,t),q.awaitingPromise.set(t,!0)):(vn(Tt,t),vn(q,t))},vn=(t,e)=>{for(const n in t)t[n].delete(e)},Jo=Object.freeze(Object.defineProperty({__proto__:null,_destroy:Xa,close:Kt,closeModal:Kt,closePopup:Kt,closeToast:Kt,disableButtons:Va,disableInput:Wa,disableLoading:$o,enableButtons:ja,enableInput:za,getInput:Sa,getProgressSteps:Ga,handleAwaitingPromise:Pt,hideLoading:$o,isAwaitingPromise:Fa,rejectPromise:Da,resetValidationMessage:Ka,showValidationMessage:qa,update:Ja},Symbol.toStringTag,{value:"Module"})),Qa=t=>{const e=q.innerParams.get(t);t.disableButtons(),e.input?Yo(t,"confirm"):Pn(t,!0)},ec=t=>{const e=q.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?Yo(t,"deny"):Tn(t,!1)},tc=(t,e)=>{t.disableButtons(),e(ct.cancel)},Yo=(t,e)=>{const n=q.innerParams.get(t);if(!n.input)return Ze(`The "input" parameter is needed to be set when using returnInputValueOn${hn(e)}`);const o=ga(t,n);n.inputValidator?nc(t,o,e):t.getInput().checkValidity()?e==="deny"?Tn(t,o):Pn(t,o):(t.enableButtons(),t.showValidationMessage(n.validationMessage))},nc=(t,e,n)=>{const o=q.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>Et(o.inputValidator(e,o.validationMessage))).then(s=>{t.enableButtons(),t.enableInput(),s?t.showValidationMessage(s):n==="deny"?Tn(t,e):Pn(t,e)})},Tn=(t,e)=>{const n=q.innerParams.get(t||globalThis);n.showLoaderOnDeny&&lt(Ge()),n.preDeny?(q.awaitingPromise.set(t||globalThis,!0),Promise.resolve().then(()=>Et(n.preDeny(e,n.validationMessage))).then(r=>{r===!1?(t.hideLoading(),Pt(t)):t.closePopup({isDenied:!0,value:typeof r>"u"?e:r})}).catch(r=>Zo(t||globalThis,r))):t.closePopup({isDenied:!0,value:e})},Xo=(t,e)=>{t.closePopup({isConfirmed:!0,value:e})},Zo=(t,e)=>{t.rejectPromise(e)},Pn=(t,e)=>{const n=q.innerParams.get(t||globalThis);n.showLoaderOnConfirm&&lt(),n.preConfirm?(t.resetValidationMessage(),q.awaitingPromise.set(t||globalThis,!0),Promise.resolve().then(()=>Et(n.preConfirm(e,n.validationMessage))).then(r=>{ve(Vt())||r===!1?(t.hideLoading(),Pt(t)):Xo(t,typeof r>"u"?e:r)}).catch(r=>Zo(t||globalThis,r))):Xo(t,e)},oc=(t,e,n)=>{q.innerParams.get(t).toast?rc(t,e,n):(ic(e),ac(e),cc(t,e,n))},rc=(t,e,n)=>{e.popup.onclick=()=>{const o=q.innerParams.get(t);o&&(sc(o)||o.timer||o.input)||n(ct.close)}},sc=t=>t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton;let Gt=!1;const ic=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(Gt=!0)}}},ac=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,(e.target===t.popup||t.popup.contains(e.target))&&(Gt=!0)}}},cc=(t,e,n)=>{e.container.onclick=o=>{const r=q.innerParams.get(t);if(Gt){Gt=!1;return}o.target===e.container&&Ht(r.allowOutsideClick)&&n(ct.backdrop)}},lc=t=>typeof t=="object"&&t.jquery,Qo=t=>t instanceof Element||lc(t),uc=t=>{const e={};return typeof t[0]=="object"&&!Qo(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((n,o)=>{const r=t[o];typeof r=="string"||Qo(r)?e[n]=r:r!==void 0&&Ze(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof r}`)}),e};function dc(...t){const e=this;return new e(...t)}function fc(t){class e extends this{_main(o,r){return super._main(o,Object.assign({},t,r))}}return e}const hc=()=>W.timeout&&W.timeout.getTimerLeft(),er=()=>{if(W.timeout)return ei(),W.timeout.stop()},tr=()=>{if(W.timeout){const t=W.timeout.start();return An(t),t}},pc=()=>{const t=W.timeout;return t&&(t.running?er():tr())},mc=t=>{if(W.timeout){const e=W.timeout.increase(t);return An(e,!0),e}},gc=()=>W.timeout&&W.timeout.isRunning();let nr=!1;const Rn={};function yc(t="data-swal-template"){Rn[t]=this,nr||(document.body.addEventListener("click",bc),nr=!0)}const bc=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const n in Rn){const o=e.getAttribute(n);if(o){Rn[n].fire({template:o});return}}},wc=Object.freeze(Object.defineProperty({__proto__:null,argsToParams:uc,bindClickHandler:yc,clickCancel:va,clickConfirm:Ho,clickDeny:_a,enableLoading:lt,fire:dc,getActions:St,getCancelButton:Qe,getCloseButton:yn,getConfirmButton:Be,getContainer:de,getDenyButton:Ge,getFocusableElements:bn,getFooter:ko,getHtmlContainer:jt,getIcon:Ct,getImage:Eo,getInputLabel:Js,getLoader:it,getPopup:Q,getTimerLeft:hc,getTimerProgressBar:zt,getTitle:wo,getValidationMessage:Vt,increaseTimer:mc,isDeprecatedParameter:gn,isLoading:Xs,isTimerRunning:gc,isUpdatableParameter:yo,isValidParameter:go,isVisible:xa,mixin:fc,resumeTimer:tr,showLoading:lt,stopTimer:er,toggleTimer:pc},Symbol.toStringTag,{value:"Module"}));let Ln;class ut{constructor(...e){if(typeof window>"u")return;Ln=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);q.promise.set(this,o)}_main(e,n={}){Ks(Object.assign({},n,e)),W.currentInstance&&(W.currentInstance._destroy(),wn()&&Bo()),W.currentInstance=this;const o=Ac(e,n);Qi(o),Object.freeze(o),W.timeout&&(W.timeout.stop(),delete W.timeout),clearTimeout(W.restoreFocusTimeout);const r=kc(this);return Io(this,o),q.innerParams.set(this,o),Ec(this,r,o)}then(e){return q.promise.get(this).then(e)}finally(e){return q.promise.get(this).finally(e)}}const Ec=(t,e,n)=>new Promise((o,r)=>{const s=a=>{t.closePopup({isDismissed:!0,dismiss:a})};Tt.swalPromiseResolve.set(t,o),Tt.swalPromiseReject.set(t,r),e.confirmButton.onclick=()=>Qa(t),e.denyButton.onclick=()=>ec(t),e.cancelButton.onclick=()=>tc(t,s),e.closeButton.onclick=()=>s(ct.close),oc(t,e,s),Ta(t,W,n,s),ma(t,n),ua(n),Cc(W,n,s),Sc(e,n),setTimeout(()=>{e.container.scrollTop=0})}),Ac=(t,e)=>{const n=Vi(t),o=Object.assign({},st,e,n,t);return o.showClass=Object.assign({},st.showClass,o.showClass),o.hideClass=Object.assign({},st.hideClass,o.hideClass),o},kc=t=>{const e={popup:Q(),container:de(),actions:St(),confirmButton:Be(),denyButton:Ge(),cancelButton:Qe(),loader:it(),closeButton:yn(),validationMessage:Vt(),progressSteps:Ao()};return q.domCache.set(t,e),e},Cc=(t,e,n)=>{const o=zt();he(o),e.timer&&(t.timeout=new ea(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(le(o),Le(o,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&An(e.timer)})))},Sc=(t,e)=>{if(!e.toast){if(!Ht(e.allowEnterKey))return _c();xc(t,e)||_n(e,-1,1)}},xc=(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,_c=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};Object.assign(ut.prototype,Jo),Object.assign(ut,wc),Object.keys(Jo).forEach(t=>{ut[t]=function(...e){if(Ln)return Ln[t](...e)}}),ut.DismissReason=ct,ut.version="11.4.8";const dt=ut;dt.default=dt;/*! @license DOMPurify 3.0.9 | (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.9/LICENSE */const{entries:or,setPrototypeOf:rr,isFrozen:vc,getPrototypeOf:Tc,getOwnPropertyDescriptor:Pc}=Object;let{freeze:ge,seal:Ne,create:sr}=Object,{apply:On,construct:In}=typeof Reflect<"u"&&Reflect;ge||(ge=function(e){return e}),Ne||(Ne=function(e){return e}),On||(On=function(e,n,o){return e.apply(n,o)}),In||(In=function(e,n){return new e(...n)});const Jt=Pe(Array.prototype.forEach),ir=Pe(Array.prototype.pop),Rt=Pe(Array.prototype.push),Yt=Pe(String.prototype.toLowerCase),Bn=Pe(String.prototype.toString),Rc=Pe(String.prototype.match),Lt=Pe(String.prototype.replace),Lc=Pe(String.prototype.indexOf),Oc=Pe(String.prototype.trim),Fe=Pe(Object.prototype.hasOwnProperty),Te=Pe(RegExp.prototype.test),Ot=Ic(TypeError);function Pe(t){return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return On(t,e,o)}}function Ic(t){return function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return In(t,n)}}function K(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Yt;rr&&rr(t,null);let o=e.length;for(;o--;){let r=e[o];if(typeof r=="string"){const s=n(r);s!==r&&(vc(e)||(e[o]=s),r=s)}t[r]=!0}return t}function Bc(t){for(let e=0;e<t.length;e++)Fe(t,e)||(t[e]=null);return t}function nt(t){const e=sr(null);for(const[n,o]of or(t))Fe(t,n)&&(Array.isArray(o)?e[n]=Bc(o):o&&typeof o=="object"&&o.constructor===Object?e[n]=nt(o):e[n]=o);return e}function Xt(t,e){for(;t!==null;){const o=Pc(t,e);if(o){if(o.get)return Pe(o.get);if(typeof o.value=="function")return Pe(o.value)}t=Tc(t)}function n(){return null}return n}const ar=ge(["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"]),Nn=ge(["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"]),Fn=ge(["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"]),Nc=ge(["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"]),Un=ge(["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"]),Fc=ge(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),cr=ge(["#text"]),lr=ge(["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"]),Dn=ge(["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"]),ur=ge(["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=ge(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Uc=Ne(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Dc=Ne(/<%[\w\W]*|[\w\W]*%>/gm),Mc=Ne(/\${[\w\W]*}/gm),$c=Ne(/^data-[\-\w.\u00B7-\uFFFF]/),Hc=Ne(/^aria-[\-\w]+$/),dr=Ne(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jc=Ne(/^(?:\w+script|data):/i),Vc=Ne(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fr=Ne(/^html$/i);var hr=Object.freeze({__proto__:null,MUSTACHE_EXPR:Uc,ERB_EXPR:Dc,TMPLIT_EXPR:Mc,DATA_ATTR:$c,ARIA_ATTR:Hc,IS_ALLOWED_URI:dr,IS_SCRIPT_OR_DATA:jc,ATTR_WHITESPACE:Vc,DOCTYPE_NAME:fr});const zc=function(){return typeof window>"u"?null:window},Wc=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let o=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(o=n.getAttribute(r));const s="dompurify"+(o?"#"+o:"");try{return e.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function pr(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:zc();const e=F=>pr(F);if(e.version="3.0.9",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let{document:n}=t;const o=n,r=o.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:f,Element:u,NodeFilter:w,NamedNodeMap:E=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:b,DOMParser:X,trustedTypes:$}=t,B=u.prototype,N=Xt(B,"cloneNode"),M=Xt(B,"nextSibling"),ee=Xt(B,"childNodes"),oe=Xt(B,"parentNode");if(typeof a=="function"){const F=n.createElement("template");F.content&&F.content.ownerDocument&&(n=F.content.ownerDocument)}let j,ye="";const{implementation:ae,createNodeIterator:g,createDocumentFragment:T,getElementsByTagName:U}=n,{importNode:P}=o;let v={};e.isSupported=typeof or=="function"&&typeof oe=="function"&&ae&&ae.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:_,ERB_EXPR:V,TMPLIT_EXPR:A,DATA_ATTR:z,ARIA_ATTR:te,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:se}=hr;let{IS_ALLOWED_URI:be}=hr,D=null;const ke=K({},[...ar,...Nn,...Fn,...Un,...cr]);let i=null;const d=K({},[...lr,...Dn,...ur,...Zt]);let m=Object.seal(sr(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}})),C=null,y=null,R=!0,k=!0,S=!1,O=!0,L=!1,H=!1,G=!1,Ce=!1,we=!1,ue=!1,He=!1,ts=!0,ns=!1;const nd="user-content-";let ro=!0,Dt=!1,mt={},gt=null;const os=K({},["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 rs=null;const ss=K({},["audio","video","img","source","image","track"]);let so=null;const is=K({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),un="http://www.w3.org/1998/Math/MathML",dn="http://www.w3.org/2000/svg",ze="http://www.w3.org/1999/xhtml";let yt=ze,io=!1,ao=null;const od=K({},[un,dn,ze],Bn);let Mt=null;const rd=["application/xhtml+xml","text/html"],sd="text/html";let ce=null,bt=null;const id=n.createElement("form"),as=function(l){return l instanceof RegExp||l instanceof Function},co=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(bt&&bt===l)){if((!l||typeof l!="object")&&(l={}),l=nt(l),Mt=rd.indexOf(l.PARSER_MEDIA_TYPE)===-1?sd:l.PARSER_MEDIA_TYPE,ce=Mt==="application/xhtml+xml"?Bn:Yt,D=Fe(l,"ALLOWED_TAGS")?K({},l.ALLOWED_TAGS,ce):ke,i=Fe(l,"ALLOWED_ATTR")?K({},l.ALLOWED_ATTR,ce):d,ao=Fe(l,"ALLOWED_NAMESPACES")?K({},l.ALLOWED_NAMESPACES,Bn):od,so=Fe(l,"ADD_URI_SAFE_ATTR")?K(nt(is),l.ADD_URI_SAFE_ATTR,ce):is,rs=Fe(l,"ADD_DATA_URI_TAGS")?K(nt(ss),l.ADD_DATA_URI_TAGS,ce):ss,gt=Fe(l,"FORBID_CONTENTS")?K({},l.FORBID_CONTENTS,ce):os,C=Fe(l,"FORBID_TAGS")?K({},l.FORBID_TAGS,ce):{},y=Fe(l,"FORBID_ATTR")?K({},l.FORBID_ATTR,ce):{},mt=Fe(l,"USE_PROFILES")?l.USE_PROFILES:!1,R=l.ALLOW_ARIA_ATTR!==!1,k=l.ALLOW_DATA_ATTR!==!1,S=l.ALLOW_UNKNOWN_PROTOCOLS||!1,O=l.ALLOW_SELF_CLOSE_IN_ATTR!==!1,L=l.SAFE_FOR_TEMPLATES||!1,H=l.WHOLE_DOCUMENT||!1,we=l.RETURN_DOM||!1,ue=l.RETURN_DOM_FRAGMENT||!1,He=l.RETURN_TRUSTED_TYPE||!1,Ce=l.FORCE_BODY||!1,ts=l.SANITIZE_DOM!==!1,ns=l.SANITIZE_NAMED_PROPS||!1,ro=l.KEEP_CONTENT!==!1,Dt=l.IN_PLACE||!1,be=l.ALLOWED_URI_REGEXP||dr,yt=l.NAMESPACE||ze,m=l.CUSTOM_ELEMENT_HANDLING||{},l.CUSTOM_ELEMENT_HANDLING&&as(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(m.tagNameCheck=l.CUSTOM_ELEMENT_HANDLING.tagNameCheck),l.CUSTOM_ELEMENT_HANDLING&&as(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(m.attributeNameCheck=l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),l.CUSTOM_ELEMENT_HANDLING&&typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(m.allowCustomizedBuiltInElements=l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),L&&(k=!1),ue&&(we=!0),mt&&(D=K({},cr),i=[],mt.html===!0&&(K(D,ar),K(i,lr)),mt.svg===!0&&(K(D,Nn),K(i,Dn),K(i,Zt)),mt.svgFilters===!0&&(K(D,Fn),K(i,Dn),K(i,Zt)),mt.mathMl===!0&&(K(D,Un),K(i,ur),K(i,Zt))),l.ADD_TAGS&&(D===ke&&(D=nt(D)),K(D,l.ADD_TAGS,ce)),l.ADD_ATTR&&(i===d&&(i=nt(i)),K(i,l.ADD_ATTR,ce)),l.ADD_URI_SAFE_ATTR&&K(so,l.ADD_URI_SAFE_ATTR,ce),l.FORBID_CONTENTS&&(gt===os&&(gt=nt(gt)),K(gt,l.FORBID_CONTENTS,ce)),ro&&(D["#text"]=!0),H&&K(D,["html","head","body"]),D.table&&(K(D,["tbody"]),delete C.tbody),l.TRUSTED_TYPES_POLICY){if(typeof l.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ot('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof l.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ot('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');j=l.TRUSTED_TYPES_POLICY,ye=j.createHTML("")}else j===void 0&&(j=Wc($,r)),j!==null&&typeof ye=="string"&&(ye=j.createHTML(""));ge&&ge(l),bt=l}},cs=K({},["mi","mo","mn","ms","mtext"]),ls=K({},["foreignobject","desc","title","annotation-xml"]),ad=K({},["title","style","font","a","script"]),us=K({},[...Nn,...Fn,...Nc]),ds=K({},[...Un,...Fc]),cd=function(l){let x=oe(l);(!x||!x.tagName)&&(x={namespaceURI:yt,tagName:"template"});const I=Yt(l.tagName),ne=Yt(x.tagName);return ao[l.namespaceURI]?l.namespaceURI===dn?x.namespaceURI===ze?I==="svg":x.namespaceURI===un?I==="svg"&&(ne==="annotation-xml"||cs[ne]):!!us[I]:l.namespaceURI===un?x.namespaceURI===ze?I==="math":x.namespaceURI===dn?I==="math"&&ls[ne]:!!ds[I]:l.namespaceURI===ze?x.namespaceURI===dn&&!ls[ne]||x.namespaceURI===un&&!cs[ne]?!1:!ds[I]&&(ad[I]||!us[I]):!!(Mt==="application/xhtml+xml"&&ao[l.namespaceURI]):!1},ot=function(l){Rt(e.removed,{element:l});try{l.parentNode.removeChild(l)}catch{l.remove()}},lo=function(l,x){try{Rt(e.removed,{attribute:x.getAttributeNode(l),from:x})}catch{Rt(e.removed,{attribute:null,from:x})}if(x.removeAttribute(l),l==="is"&&!i[l])if(we||ue)try{ot(x)}catch{}else try{x.setAttribute(l,"")}catch{}},fs=function(l){let x=null,I=null;if(Ce)l="<remove></remove>"+l;else{const me=Rc(l,/^[\r\n\t ]+/);I=me&&me[0]}Mt==="application/xhtml+xml"&&yt===ze&&(l='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+l+"</body></html>");const ne=j?j.createHTML(l):l;if(yt===ze)try{x=new X().parseFromString(ne,Mt)}catch{}if(!x||!x.documentElement){x=ae.createDocument(yt,"template",null);try{x.documentElement.innerHTML=io?ye:ne}catch{}}const pe=x.body||x.documentElement;return l&&I&&pe.insertBefore(n.createTextNode(I),pe.childNodes[0]||null),yt===ze?U.call(x,H?"html":"body")[0]:H?x.documentElement:pe},hs=function(l){return g.call(l.ownerDocument||l,l,w.SHOW_ELEMENT|w.SHOW_COMMENT|w.SHOW_TEXT,null)},ld=function(l){return l instanceof b&&(typeof l.nodeName!="string"||typeof l.textContent!="string"||typeof l.removeChild!="function"||!(l.attributes instanceof E)||typeof l.removeAttribute!="function"||typeof l.setAttribute!="function"||typeof l.namespaceURI!="string"||typeof l.insertBefore!="function"||typeof l.hasChildNodes!="function")},ps=function(l){return typeof f=="function"&&l instanceof f},We=function(l,x,I){v[l]&&Jt(v[l],ne=>{ne.call(e,x,I,bt)})},ms=function(l){let x=null;if(We("beforeSanitizeElements",l,null),ld(l))return ot(l),!0;const I=ce(l.nodeName);if(We("uponSanitizeElement",l,{tagName:I,allowedTags:D}),l.hasChildNodes()&&!ps(l.firstElementChild)&&Te(/<[/\w]/g,l.innerHTML)&&Te(/<[/\w]/g,l.textContent))return ot(l),!0;if(!D[I]||C[I]){if(!C[I]&&ys(I)&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,I)||m.tagNameCheck instanceof Function&&m.tagNameCheck(I)))return!1;if(ro&&!gt[I]){const ne=oe(l)||l.parentNode,pe=ee(l)||l.childNodes;if(pe&&ne){const me=pe.length;for(let Se=me-1;Se>=0;--Se)ne.insertBefore(N(pe[Se],!0),M(l))}}return ot(l),!0}return l instanceof u&&!cd(l)||(I==="noscript"||I==="noembed"||I==="noframes")&&Te(/<\/no(script|embed|frames)/i,l.innerHTML)?(ot(l),!0):(L&&l.nodeType===3&&(x=l.textContent,Jt([_,V,A],ne=>{x=Lt(x,ne," ")}),l.textContent!==x&&(Rt(e.removed,{element:l.cloneNode()}),l.textContent=x)),We("afterSanitizeElements",l,null),!1)},gs=function(l,x,I){if(ts&&(x==="id"||x==="name")&&(I in n||I in id))return!1;if(!(k&&!y[x]&&Te(z,x))){if(!(R&&Te(te,x))){if(!i[x]||y[x]){if(!(ys(l)&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,l)||m.tagNameCheck instanceof Function&&m.tagNameCheck(l))&&(m.attributeNameCheck instanceof RegExp&&Te(m.attributeNameCheck,x)||m.attributeNameCheck instanceof Function&&m.attributeNameCheck(x))||x==="is"&&m.allowCustomizedBuiltInElements&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,I)||m.tagNameCheck instanceof Function&&m.tagNameCheck(I))))return!1}else if(!so[x]){if(!Te(be,Lt(I,se,""))){if(!((x==="src"||x==="xlink:href"||x==="href")&&l!=="script"&&Lc(I,"data:")===0&&rs[l])){if(!(S&&!Te(ie,Lt(I,se,"")))){if(I)return!1}}}}}}return!0},ys=function(l){return l!=="annotation-xml"&&l.indexOf("-")>0},bs=function(l){We("beforeSanitizeAttributes",l,null);const{attributes:x}=l;if(!x)return;const I={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:i};let ne=x.length;for(;ne--;){const pe=x[ne],{name:me,namespaceURI:Se,value:rt}=pe,$t=ce(me);let xe=me==="value"?rt:Oc(rt);if(I.attrName=$t,I.attrValue=xe,I.keepAttr=!0,I.forceKeepAttr=void 0,We("uponSanitizeAttribute",l,I),xe=I.attrValue,I.forceKeepAttr||(lo(me,l),!I.keepAttr))continue;if(!O&&Te(/\/>/i,xe)){lo(me,l);continue}L&&Jt([_,V,A],Es=>{xe=Lt(xe,Es," ")});const ws=ce(l.nodeName);if(gs(ws,$t,xe)){if(ns&&($t==="id"||$t==="name")&&(lo(me,l),xe=nd+xe),j&&typeof $=="object"&&typeof $.getAttributeType=="function"&&!Se)switch($.getAttributeType(ws,$t)){case"TrustedHTML":{xe=j.createHTML(xe);break}case"TrustedScriptURL":{xe=j.createScriptURL(xe);break}}try{Se?l.setAttributeNS(Se,me,xe):l.setAttribute(me,xe),ir(e.removed)}catch{}}}We("afterSanitizeAttributes",l,null)},ud=function F(l){let x=null;const I=hs(l);for(We("beforeSanitizeShadowDOM",l,null);x=I.nextNode();)We("uponSanitizeShadowNode",x,null),!ms(x)&&(x.content instanceof s&&F(x.content),bs(x));We("afterSanitizeShadowDOM",l,null)};return e.sanitize=function(F){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=null,I=null,ne=null,pe=null;if(io=!F,io&&(F="<!-->"),typeof F!="string"&&!ps(F))if(typeof F.toString=="function"){if(F=F.toString(),typeof F!="string")throw Ot("dirty is not a string, aborting")}else throw Ot("toString is not a function");if(!e.isSupported)return F;if(G||co(l),e.removed=[],typeof F=="string"&&(Dt=!1),Dt){if(F.nodeName){const rt=ce(F.nodeName);if(!D[rt]||C[rt])throw Ot("root node is forbidden and cannot be sanitized in-place")}}else if(F instanceof f)x=fs("<!---->"),I=x.ownerDocument.importNode(F,!0),I.nodeType===1&&I.nodeName==="BODY"||I.nodeName==="HTML"?x=I:x.appendChild(I);else{if(!we&&!L&&!H&&F.indexOf("<")===-1)return j&&He?j.createHTML(F):F;if(x=fs(F),!x)return we?null:He?ye:""}x&&Ce&&ot(x.firstChild);const me=hs(Dt?F:x);for(;ne=me.nextNode();)ms(ne)||(ne.content instanceof s&&ud(ne.content),bs(ne));if(Dt)return F;if(we){if(ue)for(pe=T.call(x.ownerDocument);x.firstChild;)pe.appendChild(x.firstChild);else pe=x;return(i.shadowroot||i.shadowrootmode)&&(pe=P.call(o,pe,!0)),pe}let Se=H?x.outerHTML:x.innerHTML;return H&&D["!doctype"]&&x.ownerDocument&&x.ownerDocument.doctype&&x.ownerDocument.doctype.name&&Te(fr,x.ownerDocument.doctype.name)&&(Se="<!DOCTYPE "+x.ownerDocument.doctype.name+`>
65
+ `+Se),L&&Jt([_,V,A],rt=>{Se=Lt(Se,rt," ")}),j&&He?j.createHTML(Se):Se},e.setConfig=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};co(F),G=!0},e.clearConfig=function(){bt=null,G=!1},e.isValidAttribute=function(F,l,x){bt||co({});const I=ce(F),ne=ce(l);return gs(I,ne,x)},e.addHook=function(F,l){typeof l=="function"&&(v[F]=v[F]||[],Rt(v[F],l))},e.removeHook=function(F){if(v[F])return ir(v[F])},e.removeHooks=function(F){v[F]&&(v[F]=[])},e.removeAllHooks=function(){v={}},e}var mr=pr();class gr{get IsVisible(){return dt.isVisible()}}class qc extends gr{constructor(){super()}async CreateAlertAsync(e){let n="info",o,r;return typeof e=="string"||Array.isArray(e)?o=Array.isArray(e)?e.join("<br />"):e:(n=e.icon??"info",r=e.title??"",o=Array.isArray(e.text)?e.text.join("<br />"):e.text),new Promise(s=>{dt.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:r,html:`<div style="max-height: 50vh; overflow: auto">${mr.sanitize(o)}</div>`}).then(()=>s(!0))})}async AlertAsync(e){return this.CreateAlertAsync({text:e,icon:"info"})}async AlertErrorAsync(e){return this.CreateAlertAsync({text:e,icon:"error"})}async AlertSuccessAsync(e){return this.CreateAlertAsync({text:e,icon:"success"})}}class Kc extends gr{async CreateConfirmAsync(e){return new Promise(n=>{dt.fire({showCancelButton:!0,allowEscapeKey:!1,allowOutsideClick:!1,icon:"question",title:e.title,html:mr.sanitize(e.text),confirmButtonText:e.confirmLabel??"confirmar",cancelButtonText:e.rejectLabel??"cancelar"}).then(o=>{n(o.isConfirmed===!0)})})}async ConfirmAsync(e){return this.CreateConfirmAsync({text:e})}}const Gc=()=>new qc,yr=()=>new Kc,Jc=["data-cor"],Yc={class:"sf-p-4"},Xc=c.defineComponent({__name:"HeaderAvatar",emits:["logout"],setup(t,{emit:e}){const n=yr(),o=c.ref("?"),r=e;async function s(){await n.CreateConfirmAsync({text:"Você deseja sair da conta?",confirmLabel:"sair"})&&r("logout")}function a(){const w=sessionStorage.getItem("name");let E="?";if(!w)return E;const b=w.split(" ").filter($=>$.length>0).map($=>$[0].toUpperCase()),X=Math.min(2,b.length);return E=b.slice(0,X).join(""),E.length>0?E:"?"}const f=c.computed(()=>{const w=o.value[0],E=w==="?"?0:(w.charCodeAt(0)-64)%19;return Math.max(E,0)}),u=c.ref(!1);return c.onMounted(()=>{o.value=a()}),(w,E)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",{id:"sf-header-avatar","data-cor":f.value,onClick:E[0]||(E[0]=b=>u.value=!0)},c.toDisplayString(o.value),9,Jc),c.createVNode(fo,{visible:u.value,"onUpdate:visible":E[1]||(E[1]=b=>u.value=b),position:"right"},{title:c.withCtx(()=>[c.createTextVNode("Minha conta")]),default:c.withCtx(()=>[c.createElementVNode("div",Yc,[c.createVNode(ho,{color:"error",onClick:s},{default:c.withCtx(()=>[c.createTextVNode("Sair")]),_:1})])]),_:1},8,["visible"])],64))}}),Zc={},Qc={xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",class:"sf-svg-icon"},el=[c.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 tl(t,e){return c.openBlock(),c.createElementBlock("svg",Qc,el)}const nl=uo(Zc,[["render",tl]]);class ol{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 Mn=(()=>new ol)(),rl=[c.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)],sl=c.defineComponent({__name:"ThemeToggle",setup(t){return(e,n)=>(c.openBlock(),c.createElementBlock("button",{id:"sf-theme-toggle",onClick:n[0]||(n[0]=(...o)=>c.unref(Mn).Toggle&&c.unref(Mn).Toggle(...o))},rl))}}),il={id:"sf-layout"},al=c.createElementVNode("div",{class:"sf-layout-menu-toggler-logo"},null,-1),cl={class:"title"},ll={class:"sf-layout-nav-content"},ul=c.createElementVNode("section",{id:"sf-layout-page-title"},null,-1),dl={id:"sf-layout-content"},fl=c.defineComponent({__name:"Layout",emits:["mounted","logout"],setup(t,{emit:e}){const n=fn(),o=e;return c.onMounted(()=>{o("mounted")}),(r,s)=>(c.openBlock(),c.createElementBlock("div",il,[c.createElementVNode("header",null,[c.createElementVNode("div",{class:c.normalizeClass(["sf-layout-menu-toggler",{invert:c.unref(n).IsVisible}]),onClick:s[0]||(s[0]=a=>c.unref(n).Toggle())},[al,c.createVNode(nl)],2),c.createElementVNode("div",cl,[c.renderSlot(r.$slots,"title")]),c.renderSlot(r.$slots,"action"),c.createVNode(sl),c.createVNode(Xc,{onLogout:s[1]||(s[1]=a=>o("logout"))})]),c.createElementVNode("nav",{class:c.normalizeClass({visible:c.unref(n).IsVisible})},[c.createElementVNode("div",ll,[c.renderSlot(r.$slots,"menu")])],2),c.createElementVNode("main",{class:c.normalizeClass({"menu-visible":c.unref(n).IsVisible})},[ul,c.createElementVNode("section",dl,[c.renderSlot(r.$slots,"content")])],2)]))}}),hl=["href","data-active","onClick"],pl={class:"sf-navmenulink-text"},ml=c.defineComponent({__name:"NavMenuLink",props:{href:{},text:{},icon:{},exact:{type:Boolean}},setup(t){const e=t,n=fn();function o(r,s){r.preventDefault();const f=r.target.closest(".sf-layout-nav-content");s(),f&&f.clientWidth+10>document.body.clientWidth&&n.Close()}return(r,s)=>{const a=c.resolveComponent("router-link");return c.openBlock(),c.createBlock(a,{to:e.href,custom:""},{default:c.withCtx(({href:f,navigate:u,isExactActive:w,isActive:E})=>[c.createElementVNode("a",{class:"sf-navmenulink",href:f,"data-active":e.exact?w:E,onClick:b=>o(b,u)},[e.icon?(c.openBlock(),c.createBlock(wt,{key:0,icone:e.icon,"button-props":{tabindex:-1}},null,8,["icone"])):c.createCommentVNode("",!0),c.createElementVNode("span",pl,c.toDisplayString(e.text),1)],8,hl)]),_:1},8,["to"])}}}),gl=c.defineComponent({__name:"ScrollToTop",setup(t){const e=c.ref(!1),n=`--${+new Date}`;let o=null;function r(){o==null||o.scrollTo(0,0)}return c.onMounted(()=>{var s;o=((s=document.getElementById(n))==null?void 0:s.parentElement)??null,o&&o.addEventListener("scroll",function(){e.value=this.scrollTop-this.clientHeight>0})}),(s,a)=>(c.openBlock(),c.createElementBlock("button",{id:n,class:c.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":e.value}]),onClick:r},null,2))}}),yl=c.defineComponent({__name:"Content",props:{class:{},style:{},disableBodyPadding:{type:Boolean},disableHeaderPadding:{type:Boolean},disableFooterPadding:{type:Boolean}},setup(t){const e=t;function n(){return new Ke("sf-content").AddClass(e.class,!!e.class).Build()}function o(){return new Ke("sf-content-body").AddClass("sf-content-no-padding",e.disableBodyPadding).Build()}function r(){return new Ke("sf-content-header").AddClass("sf-content-no-padding",e.disableHeaderPadding).Build()}function s(){return new Ke("sf-content-footer").AddClass("sf-content-no-padding",e.disableFooterPadding).Build()}return(a,f)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(n()),style:c.normalizeStyle(e.style)},[c.createElementVNode("div",{class:c.normalizeClass(r())},[c.renderSlot(a.$slots,"header")],2),c.createElementVNode("div",{class:c.normalizeClass(o())},[c.renderSlot(a.$slots,"default"),c.createVNode(gl)],2),c.createElementVNode("div",{class:c.normalizeClass(s())},[c.renderSlot(a.$slots,"footer")],2)],6))}}),bl={class:"sf-tab-navigation"},wl=[c.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"},[c.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})],-1)],El=["data-active"],Al=["href","onClick"],kl=[c.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"},[c.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})],-1)],Cl=c.defineComponent({__name:"TabNavigation",props:{tabs:{}},setup(t){const e=t,n=c.ref(null),o=new ResizeObserver(u=>{f()}),r=c.ref(!1),s=c.ref(!1);function a(u=!1){const w=n.value.clientWidth;n.value.scrollLeft+=u?-w:w}function f(){const u=n.value.scrollWidth-n.value.clientWidth;r.value=n.value.scrollLeft>10,s.value=n.value.scrollLeft<u-10}return c.onMounted(()=>{n.value.addEventListener("scroll",f),o.observe(n.value)}),c.onBeforeUnmount(()=>{var u;try{(u=n.value)==null||u.removeEventListener("scroll",f),o.unobserve(n.value),o.disconnect()}catch{}}),(u,w)=>{const E=c.resolveComponent("RouterLink");return c.openBlock(),c.createElementBlock("div",bl,[c.createElementVNode("div",{class:c.normalizeClass(["left-arrow",{active:r.value}]),onClick:w[0]||(w[0]=b=>a(!0))},wl,2),c.createElementVNode("ul",{ref_key:"trackerContainer",ref:n},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.tabs,b=>(c.openBlock(),c.createBlock(E,{to:b.route,custom:!0},{default:c.withCtx(({navigate:X,isActive:$})=>[c.createElementVNode("li",{"data-active":$},[c.renderSlot(u.$slots,"item",{item:b,navigate:X,isActive:$},()=>[c.createElementVNode("a",{href:b.route,class:c.normalizeClass({active:$}),onClick:X},c.toDisplayString(b.text),11,Al)])],8,El)]),_:2},1032,["to"]))),256))],512),c.createElementVNode("div",{class:c.normalizeClass(["right-arrow",{active:s.value}]),onClick:w[1]||(w[1]=b=>a())},kl,2)])}}}),Sl=["data-icon"],xl=c.defineComponent({__name:"Message",props:{color:{default:"info"},class:{},style:{},icon:{}},setup(t){const e=t,n=c.computed(()=>{if(e.icon)return e.icon;switch(e.color){case"error":return"cancel";case"info":return"info";case"warn":return"warning";case"success":return"check";case"help":return"help";default:return null}}),o=c.computed(()=>new Ke("sf-message").AddClass("sf-message-error",e.color==="error").AddClass("sf-message-info",e.color==="info").AddClass("sf-message-warning",e.color==="warn").AddClass("sf-message-success",e.color==="success").AddClass("sf-message-help",e.color==="help").AddClass("sf-message-primary",e.color==="primary").AddClass("sf-message-secondary",e.color==="secondary").AddClass(e.class).Build());return(r,s)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(o.value),"data-icon":n.value},[c.renderSlot(r.$slots,"default")],10,Sl))}});var _l=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Tl(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 r=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:function(){return t[o]}})}),n}var Qt={};Qt.byteLength=Ll,Qt.toByteArray=Il,Qt.fromByteArray=Fl;for(var De=[],Oe=[],Pl=typeof Uint8Array<"u"?Uint8Array:Array,$n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ft=0,Rl=$n.length;ft<Rl;++ft)De[ft]=$n[ft],Oe[$n.charCodeAt(ft)]=ft;Oe["-".charCodeAt(0)]=62,Oe["_".charCodeAt(0)]=63;function br(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 Ll(t){var e=br(t),n=e[0],o=e[1];return(n+o)*3/4-o}function Ol(t,e,n){return(e+n)*3/4-n}function Il(t){var e,n=br(t),o=n[0],r=n[1],s=new Pl(Ol(t,o,r)),a=0,f=r>0?o-4:o,u;for(u=0;u<f;u+=4)e=Oe[t.charCodeAt(u)]<<18|Oe[t.charCodeAt(u+1)]<<12|Oe[t.charCodeAt(u+2)]<<6|Oe[t.charCodeAt(u+3)],s[a++]=e>>16&255,s[a++]=e>>8&255,s[a++]=e&255;return r===2&&(e=Oe[t.charCodeAt(u)]<<2|Oe[t.charCodeAt(u+1)]>>4,s[a++]=e&255),r===1&&(e=Oe[t.charCodeAt(u)]<<10|Oe[t.charCodeAt(u+1)]<<4|Oe[t.charCodeAt(u+2)]>>2,s[a++]=e>>8&255,s[a++]=e&255),s}function Bl(t){return De[t>>18&63]+De[t>>12&63]+De[t>>6&63]+De[t&63]}function Nl(t,e,n){for(var o,r=[],s=e;s<n;s+=3)o=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),r.push(Bl(o));return r.join("")}function Fl(t){for(var e,n=t.length,o=n%3,r=[],s=16383,a=0,f=n-o;a<f;a+=s)r.push(Nl(t,a,a+s>f?f:a+s));return o===1?(e=t[n-1],r.push(De[e>>2]+De[e<<4&63]+"==")):o===2&&(e=(t[n-2]<<8)+t[n-1],r.push(De[e>>10]+De[e>>4&63]+De[e<<2&63]+"=")),r.join("")}var wr={exports:{}};const Er=Tl(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));/**
66
+ * [js-sha256]{@link https://github.com/emn178/js-sha256}
67
+ *
68
+ * @version 0.10.1
69
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
70
+ * @copyright Chen, Yi-Cyuan 2014-2023
71
+ * @license MIT
72
+ */(function(t){(function(){var e="input is invalid type",n=typeof window=="object",o=n?window:{};o.JS_SHA256_NO_WINDOW&&(n=!1);var r=!n&&typeof self=="object",s=!o.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;s?o=_l:r&&(o=self);var a=!o.JS_SHA256_NO_COMMON_JS&&!0&&t.exports,f=!o.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),w=[-2147483648,8388608,32768,128],E=[24,16,8,0],b=[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],X=["hex","array","digest","arrayBuffer"],$=[];(o.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(g){return Object.prototype.toString.call(g)==="[object Array]"}),f&&(o.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(g){return typeof g=="object"&&g.buffer&&g.buffer.constructor===ArrayBuffer});var B=function(g,T){return function(U){return new j(T,!0).update(U)[g]()}},N=function(g){var T=B("hex",g);s&&(T=M(T,g)),T.create=function(){return new j(g)},T.update=function(v){return T.create().update(v)};for(var U=0;U<X.length;++U){var P=X[U];T[P]=B(P,g)}return T},M=function(g,T){var U=Er,P=Er.Buffer,v=T?"sha224":"sha256",_;P.from&&!o.JS_SHA256_NO_BUFFER_FROM?_=P.from:_=function(A){return new P(A)};var V=function(A){if(typeof A=="string")return U.createHash(v).update(A,"utf8").digest("hex");if(A==null)throw new Error(e);return A.constructor===ArrayBuffer&&(A=new Uint8Array(A)),Array.isArray(A)||ArrayBuffer.isView(A)||A.constructor===P?U.createHash(v).update(_(A)).digest("hex"):g(A)};return V},ee=function(g,T){return function(U,P){return new ye(U,T,!0).update(P)[g]()}},oe=function(g){var T=ee("hex",g);T.create=function(v){return new ye(v,g)},T.update=function(v,_){return T.create(v).update(_)};for(var U=0;U<X.length;++U){var P=X[U];T[P]=ee(P,g)}return T};function j(g,T){T?($[0]=$[16]=$[1]=$[2]=$[3]=$[4]=$[5]=$[6]=$[7]=$[8]=$[9]=$[10]=$[11]=$[12]=$[13]=$[14]=$[15]=0,this.blocks=$):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g?(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=g}j.prototype.update=function(g){if(!this.finalized){var T,U=typeof g;if(U!=="string"){if(U==="object"){if(g===null)throw new Error(e);if(f&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!f||!ArrayBuffer.isView(g)))throw new Error(e)}else throw new Error(e);T=!0}for(var P,v=0,_,V=g.length,A=this.blocks;v<V;){if(this.hashed&&(this.hashed=!1,A[0]=this.block,A[16]=A[1]=A[2]=A[3]=A[4]=A[5]=A[6]=A[7]=A[8]=A[9]=A[10]=A[11]=A[12]=A[13]=A[14]=A[15]=0),T)for(_=this.start;v<V&&_<64;++v)A[_>>2]|=g[v]<<E[_++&3];else for(_=this.start;v<V&&_<64;++v)P=g.charCodeAt(v),P<128?A[_>>2]|=P<<E[_++&3]:P<2048?(A[_>>2]|=(192|P>>6)<<E[_++&3],A[_>>2]|=(128|P&63)<<E[_++&3]):P<55296||P>=57344?(A[_>>2]|=(224|P>>12)<<E[_++&3],A[_>>2]|=(128|P>>6&63)<<E[_++&3],A[_>>2]|=(128|P&63)<<E[_++&3]):(P=65536+((P&1023)<<10|g.charCodeAt(++v)&1023),A[_>>2]|=(240|P>>18)<<E[_++&3],A[_>>2]|=(128|P>>12&63)<<E[_++&3],A[_>>2]|=(128|P>>6&63)<<E[_++&3],A[_>>2]|=(128|P&63)<<E[_++&3]);this.lastByteIndex=_,this.bytes+=_-this.start,_>=64?(this.block=A[16],this.start=_-64,this.hash(),this.hashed=!0):this.start=_}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},j.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var g=this.blocks,T=this.lastByteIndex;g[16]=this.block,g[T>>2]|=w[T&3],this.block=g[16],T>=56&&(this.hashed||this.hash(),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),g[14]=this.hBytes<<3|this.bytes>>>29,g[15]=this.bytes<<3,this.hash()}},j.prototype.hash=function(){var g=this.h0,T=this.h1,U=this.h2,P=this.h3,v=this.h4,_=this.h5,V=this.h6,A=this.h7,z=this.blocks,te,ie,se,be,D,ke,i,d,m,C,y;for(te=16;te<64;++te)D=z[te-15],ie=(D>>>7|D<<25)^(D>>>18|D<<14)^D>>>3,D=z[te-2],se=(D>>>17|D<<15)^(D>>>19|D<<13)^D>>>10,z[te]=z[te-16]+ie+z[te-7]+se<<0;for(y=T&U,te=0;te<64;te+=4)this.first?(this.is224?(d=300032,D=z[0]-1413257819,A=D-150054599<<0,P=D+24177077<<0):(d=704751109,D=z[0]-210244248,A=D-1521486534<<0,P=D+143694565<<0),this.first=!1):(ie=(g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10),se=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),d=g&T,be=d^g&U^y,i=v&_^~v&V,D=A+se+i+b[te]+z[te],ke=ie+be,A=P+D<<0,P=D+ke<<0),ie=(P>>>2|P<<30)^(P>>>13|P<<19)^(P>>>22|P<<10),se=(A>>>6|A<<26)^(A>>>11|A<<21)^(A>>>25|A<<7),m=P&g,be=m^P&T^d,i=A&v^~A&_,D=V+se+i+b[te+1]+z[te+1],ke=ie+be,V=U+D<<0,U=D+ke<<0,ie=(U>>>2|U<<30)^(U>>>13|U<<19)^(U>>>22|U<<10),se=(V>>>6|V<<26)^(V>>>11|V<<21)^(V>>>25|V<<7),C=U&P,be=C^U&g^m,i=V&A^~V&v,D=_+se+i+b[te+2]+z[te+2],ke=ie+be,_=T+D<<0,T=D+ke<<0,ie=(T>>>2|T<<30)^(T>>>13|T<<19)^(T>>>22|T<<10),se=(_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7),y=T&U,be=y^T&P^C,i=_&V^~_&A,D=v+se+i+b[te+3]+z[te+3],ke=ie+be,v=g+D<<0,g=D+ke<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+g<<0,this.h1=this.h1+T<<0,this.h2=this.h2+U<<0,this.h3=this.h3+P<<0,this.h4=this.h4+v<<0,this.h5=this.h5+_<<0,this.h6=this.h6+V<<0,this.h7=this.h7+A<<0},j.prototype.hex=function(){this.finalize();var g=this.h0,T=this.h1,U=this.h2,P=this.h3,v=this.h4,_=this.h5,V=this.h6,A=this.h7,z=u[g>>28&15]+u[g>>24&15]+u[g>>20&15]+u[g>>16&15]+u[g>>12&15]+u[g>>8&15]+u[g>>4&15]+u[g&15]+u[T>>28&15]+u[T>>24&15]+u[T>>20&15]+u[T>>16&15]+u[T>>12&15]+u[T>>8&15]+u[T>>4&15]+u[T&15]+u[U>>28&15]+u[U>>24&15]+u[U>>20&15]+u[U>>16&15]+u[U>>12&15]+u[U>>8&15]+u[U>>4&15]+u[U&15]+u[P>>28&15]+u[P>>24&15]+u[P>>20&15]+u[P>>16&15]+u[P>>12&15]+u[P>>8&15]+u[P>>4&15]+u[P&15]+u[v>>28&15]+u[v>>24&15]+u[v>>20&15]+u[v>>16&15]+u[v>>12&15]+u[v>>8&15]+u[v>>4&15]+u[v&15]+u[_>>28&15]+u[_>>24&15]+u[_>>20&15]+u[_>>16&15]+u[_>>12&15]+u[_>>8&15]+u[_>>4&15]+u[_&15]+u[V>>28&15]+u[V>>24&15]+u[V>>20&15]+u[V>>16&15]+u[V>>12&15]+u[V>>8&15]+u[V>>4&15]+u[V&15];return this.is224||(z+=u[A>>28&15]+u[A>>24&15]+u[A>>20&15]+u[A>>16&15]+u[A>>12&15]+u[A>>8&15]+u[A>>4&15]+u[A&15]),z},j.prototype.toString=j.prototype.hex,j.prototype.digest=function(){this.finalize();var g=this.h0,T=this.h1,U=this.h2,P=this.h3,v=this.h4,_=this.h5,V=this.h6,A=this.h7,z=[g>>24&255,g>>16&255,g>>8&255,g&255,T>>24&255,T>>16&255,T>>8&255,T&255,U>>24&255,U>>16&255,U>>8&255,U&255,P>>24&255,P>>16&255,P>>8&255,P&255,v>>24&255,v>>16&255,v>>8&255,v&255,_>>24&255,_>>16&255,_>>8&255,_&255,V>>24&255,V>>16&255,V>>8&255,V&255];return this.is224||z.push(A>>24&255,A>>16&255,A>>8&255,A&255),z},j.prototype.array=j.prototype.digest,j.prototype.arrayBuffer=function(){this.finalize();var g=new ArrayBuffer(this.is224?28:32),T=new DataView(g);return T.setUint32(0,this.h0),T.setUint32(4,this.h1),T.setUint32(8,this.h2),T.setUint32(12,this.h3),T.setUint32(16,this.h4),T.setUint32(20,this.h5),T.setUint32(24,this.h6),this.is224||T.setUint32(28,this.h7),g};function ye(g,T,U){var P,v=typeof g;if(v==="string"){var _=[],V=g.length,A=0,z;for(P=0;P<V;++P)z=g.charCodeAt(P),z<128?_[A++]=z:z<2048?(_[A++]=192|z>>6,_[A++]=128|z&63):z<55296||z>=57344?(_[A++]=224|z>>12,_[A++]=128|z>>6&63,_[A++]=128|z&63):(z=65536+((z&1023)<<10|g.charCodeAt(++P)&1023),_[A++]=240|z>>18,_[A++]=128|z>>12&63,_[A++]=128|z>>6&63,_[A++]=128|z&63);g=_}else if(v==="object"){if(g===null)throw new Error(e);if(f&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!f||!ArrayBuffer.isView(g)))throw new Error(e)}else throw new Error(e);g.length>64&&(g=new j(T,!0).update(g).array());var te=[],ie=[];for(P=0;P<64;++P){var se=g[P]||0;te[P]=92^se,ie[P]=54^se}j.call(this,T,U),this.update(ie),this.oKeyPad=te,this.inner=!0,this.sharedMemory=U}ye.prototype=new j,ye.prototype.finalize=function(){if(j.prototype.finalize.call(this),this.inner){this.inner=!1;var g=this.array();j.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(g),j.prototype.finalize.call(this)}};var ae=N();ae.sha256=ae,ae.sha224=N(!0),ae.sha256.hmac=oe(),ae.sha224.hmac=oe(!0),a?t.exports=ae:(o.sha256=ae.sha256,o.sha224=ae.sha224)})()})(wr);var Ul=wr.exports;const Dl=vl(Ul);class It extends Error{}It.prototype.name="InvalidTokenError";function Ml(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 $l(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 Ml(e)}catch{return atob(e)}}function Hn(t,e){if(typeof t!="string")throw new It("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 It(`Invalid token specified: missing part #${n+1}`);let r;try{r=$l(o)}catch(s){throw new It(`Invalid token specified: invalid base64 for part #${n+1} (${s.message})`)}try{return JSON.parse(r)}catch(s){throw new It(`Invalid token specified: invalid json for part #${n+1} (${s.message})`)}}if(typeof Promise>"u")throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function Ar(t){if(!(this instanceof Ar))throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var e=this,n,o=[],r,s={enable:!0,callbackList:[],interval:5},a=document.getElementsByTagName("script"),f=0;f<a.length;f++)(a[f].src.indexOf("keycloak.js")!==-1||a[f].src.indexOf("keycloak.min.js")!==-1)&&a[f].src.indexOf("version=")!==-1&&(e.iframeVersion=a[f].src.substring(a[f].src.indexOf("version=")+8).split("&")[0]);var u=!0,w=ke(console.info),E=ke(console.warn);e.init=function(i){if(e.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");e.didInitialize=!0,e.authenticated=!1,r=D();var d=["default","cordova","cordova-native"];if(i&&d.indexOf(i.adapter)>-1?n=ie(i.adapter):i&&typeof i.adapter=="object"?n=i.adapter:window.Cordova||window.cordova?n=ie("cordova"):n=ie(),i){if(typeof i.useNonce<"u"&&(u=i.useNonce),typeof i.checkLoginIframe<"u"&&(s.enable=i.checkLoginIframe),i.checkLoginIframeInterval&&(s.interval=i.checkLoginIframeInterval),i.onLoad==="login-required"&&(e.loginRequired=!0),i.responseMode)if(i.responseMode==="query"||i.responseMode==="fragment")e.responseMode=i.responseMode;else throw"Invalid value for responseMode";if(i.flow){switch(i.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=i.flow}if(i.timeSkew!=null&&(e.timeSkew=i.timeSkew),i.redirectUri&&(e.redirectUri=i.redirectUri),i.silentCheckSsoRedirectUri&&(e.silentCheckSsoRedirectUri=i.silentCheckSsoRedirectUri),typeof i.silentCheckSsoFallback=="boolean"?e.silentCheckSsoFallback=i.silentCheckSsoFallback:e.silentCheckSsoFallback=!0,i.pkceMethod){if(i.pkceMethod!=="S256")throw"Invalid value for pkceMethod";e.pkceMethod=i.pkceMethod}typeof i.enableLogging=="boolean"?e.enableLogging=i.enableLogging:e.enableLogging=!1,typeof i.scope=="string"&&(e.scope=i.scope),typeof i.acrValues=="string"&&(e.acrValues=i.acrValues),typeof i.messageReceiveTimeout=="number"&&i.messageReceiveTimeout>0?e.messageReceiveTimeout=i.messageReceiveTimeout:e.messageReceiveTimeout=1e4}e.responseMode||(e.responseMode="fragment"),e.responseType||(e.responseType="code",e.flow="standard");var m=v(),C=v();C.promise.then(function(){e.onReady&&e.onReady(e.authenticated),m.setSuccess(e.authenticated)}).catch(function(O){m.setError(O)});var y=j();function R(){var O=function(G){G||(H.prompt="none"),i&&i.locale&&(H.locale=i.locale),e.login(H).then(function(){C.setSuccess()}).catch(function(Ce){C.setError(Ce)})},L=function(){var G=document.createElement("iframe"),Ce=e.createLoginUrl({prompt:"none",redirectUri:e.silentCheckSsoRedirectUri});G.setAttribute("src",Ce),G.setAttribute("sandbox","allow-scripts allow-same-origin"),G.setAttribute("title","keycloak-silent-check-sso"),G.style.display="none",document.body.appendChild(G);var we=function(ue){if(!(ue.origin!==window.location.origin||G.contentWindow!==ue.source)){var He=T(ue.data);oe(He,C),document.body.removeChild(G),window.removeEventListener("message",we)}};window.addEventListener("message",we)},H={};switch(i.onLoad){case"check-sso":s.enable?V().then(function(){z().then(function(G){G?C.setSuccess():e.silentCheckSsoRedirectUri?L():O(!1)}).catch(function(G){C.setError(G)})}):e.silentCheckSsoRedirectUri?L():O(!1);break;case"login-required":O(!0);break;default:throw"Invalid value for onLoad"}}function k(){var O=T(window.location.href);if(O&&window.history.replaceState(window.history.state,null,O.newUrl),O&&O.valid)return V().then(function(){oe(O,C)}).catch(function(L){C.setError(L)});i?i.token&&i.refreshToken?(ae(i.token,i.refreshToken,i.idToken),s.enable?V().then(function(){z().then(function(L){L?(e.onAuthSuccess&&e.onAuthSuccess(),C.setSuccess(),A()):C.setSuccess()}).catch(function(L){C.setError(L)})}):e.updateToken(-1).then(function(){e.onAuthSuccess&&e.onAuthSuccess(),C.setSuccess()}).catch(function(L){e.onAuthError&&e.onAuthError(),i.onLoad?R():C.setError(L)})):i.onLoad?R():C.setSuccess():C.setSuccess()}function S(){var O=v(),L=function(){(document.readyState==="interactive"||document.readyState==="complete")&&(document.removeEventListener("readystatechange",L),O.setSuccess())};return document.addEventListener("readystatechange",L),L(),O.promise}return y.then(function(){S().then(te).then(k).catch(function(O){m.setError(O)})}),y.catch(function(O){m.setError(O)}),m.promise},e.login=function(i){return n.login(i)};function b(i){var d=null,m=window.crypto||window.msCrypto;if(m&&m.getRandomValues&&window.Uint8Array)return d=new Uint8Array(i),m.getRandomValues(d),d;d=new Array(i);for(var C=0;C<d.length;C++)d[C]=Math.floor(256*Math.random());return d}function X(i){return $(i,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}function $(i,d){for(var m=b(i),C=new Array(i),y=0;y<i;y++)C[y]=d.charCodeAt(m[y]%d.length);return String.fromCharCode.apply(null,C)}function B(i,d){switch(i){case"S256":var m=new Uint8Array(Dl.arrayBuffer(d)),C=Qt.fromByteArray(m).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"");return C;default:throw"Invalid value for pkceMethod"}}function N(i){var d={id_token:{acr:i}};return JSON.stringify(d)}e.createLoginUrl=function(i){var d=g(),m=g(),C=n.redirectUri(i),y={state:d,nonce:m,redirectUri:encodeURIComponent(C)};i&&i.prompt&&(y.prompt=i.prompt);var R;i&&i.action=="register"?R=e.endpoints.register():R=e.endpoints.authorize();var k=i&&i.scope||e.scope;k?k.indexOf("openid")===-1&&(k="openid "+k):k="openid";var S=R+"?client_id="+encodeURIComponent(e.clientId)+"&redirect_uri="+encodeURIComponent(C)+"&state="+encodeURIComponent(d)+"&response_mode="+encodeURIComponent(e.responseMode)+"&response_type="+encodeURIComponent(e.responseType)+"&scope="+encodeURIComponent(k);if(u&&(S=S+"&nonce="+encodeURIComponent(m)),i&&i.prompt&&(S+="&prompt="+encodeURIComponent(i.prompt)),i&&i.maxAge&&(S+="&max_age="+encodeURIComponent(i.maxAge)),i&&i.loginHint&&(S+="&login_hint="+encodeURIComponent(i.loginHint)),i&&i.idpHint&&(S+="&kc_idp_hint="+encodeURIComponent(i.idpHint)),i&&i.action&&i.action!="register"&&(S+="&kc_action="+encodeURIComponent(i.action)),i&&i.locale&&(S+="&ui_locales="+encodeURIComponent(i.locale)),i&&i.acr){var O=N(i.acr);S+="&claims="+encodeURIComponent(O)}if((i&&i.acrValues||e.acrValues)&&(S+="&acr_values="+encodeURIComponent(i.acrValues||e.acrValues)),e.pkceMethod){var L=X(96);y.pkceCodeVerifier=L;var H=B(e.pkceMethod,L);S+="&code_challenge="+H,S+="&code_challenge_method="+e.pkceMethod}return r.add(y),S},e.logout=function(i){return n.logout(i)},e.createLogoutUrl=function(i){var d=e.endpoints.logout()+"?client_id="+encodeURIComponent(e.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(n.redirectUri(i,!1));return e.idToken&&(d+="&id_token_hint="+encodeURIComponent(e.idToken)),d},e.register=function(i){return n.register(i)},e.createRegisterUrl=function(i){return i||(i={}),i.action="register",e.createLoginUrl(i)},e.createAccountUrl=function(i){var d=M(),m=void 0;return typeof d<"u"&&(m=d+"/account?referrer="+encodeURIComponent(e.clientId)+"&referrer_uri="+encodeURIComponent(n.redirectUri(i))),m},e.accountManagement=function(){return n.accountManagement()},e.hasRealmRole=function(i){var d=e.realmAccess;return!!d&&d.roles.indexOf(i)>=0},e.hasResourceRole=function(i,d){if(!e.resourceAccess)return!1;var m=e.resourceAccess[d||e.clientId];return!!m&&m.roles.indexOf(i)>=0},e.loadUserProfile=function(){var i=M()+"/account",d=new XMLHttpRequest;d.open("GET",i,!0),d.setRequestHeader("Accept","application/json"),d.setRequestHeader("Authorization","bearer "+e.token);var m=v();return d.onreadystatechange=function(){d.readyState==4&&(d.status==200?(e.profile=JSON.parse(d.responseText),m.setSuccess(e.profile)):m.setError())},d.send(),m.promise},e.loadUserInfo=function(){var i=e.endpoints.userinfo(),d=new XMLHttpRequest;d.open("GET",i,!0),d.setRequestHeader("Accept","application/json"),d.setRequestHeader("Authorization","bearer "+e.token);var m=v();return d.onreadystatechange=function(){d.readyState==4&&(d.status==200?(e.userInfo=JSON.parse(d.responseText),m.setSuccess(e.userInfo)):m.setError())},d.send(),m.promise},e.isTokenExpired=function(i){if(!e.tokenParsed||!e.refreshToken&&e.flow!="implicit")throw"Not authenticated";if(e.timeSkew==null)return w("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var d=e.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+e.timeSkew;if(i){if(isNaN(i))throw"Invalid minValidity";d-=i}return d<0},e.updateToken=function(i){var d=v();if(!e.refreshToken)return d.setError(),d.promise;i=i||5;var m=function(){var y=!1;if(i==-1?(y=!0,w("[KEYCLOAK] Refreshing token: forced refresh")):(!e.tokenParsed||e.isTokenExpired(i))&&(y=!0,w("[KEYCLOAK] Refreshing token: token expired")),!y)d.setSuccess(!1);else{var R="grant_type=refresh_token&refresh_token="+e.refreshToken,k=e.endpoints.token();if(o.push(d),o.length==1){var S=new XMLHttpRequest;S.open("POST",k,!0),S.setRequestHeader("Content-type","application/x-www-form-urlencoded"),S.withCredentials=!0,R+="&client_id="+encodeURIComponent(e.clientId);var O=new Date().getTime();S.onreadystatechange=function(){if(S.readyState==4)if(S.status==200){w("[KEYCLOAK] Token refreshed"),O=(O+new Date().getTime())/2;var L=JSON.parse(S.responseText);ae(L.access_token,L.refresh_token,L.id_token,O),e.onAuthRefreshSuccess&&e.onAuthRefreshSuccess();for(var H=o.pop();H!=null;H=o.pop())H.setSuccess(!0)}else{E("[KEYCLOAK] Failed to refresh token"),S.status==400&&e.clearToken(),e.onAuthRefreshError&&e.onAuthRefreshError();for(var H=o.pop();H!=null;H=o.pop())H.setError(!0)}},S.send(R)}}};if(s.enable){var C=z();C.then(function(){m()}).catch(function(y){d.setError(y)})}else m();return d.promise},e.clearToken=function(){e.token&&(ae(null,null,null),e.onAuthLogout&&e.onAuthLogout(),e.loginRequired&&e.login())},e.setToken=ae;function M(){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 ee(){return window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}function oe(i,d){var m=i.code,C=i.error,y=i.prompt,R=new Date().getTime();if(i.kc_action_status&&e.onActionUpdate&&e.onActionUpdate(i.kc_action_status),C){if(y!="none"){var k={error:C,error_description:i.error_description};e.onAuthError&&e.onAuthError(k),d&&d.setError(k)}else d&&d.setSuccess();return}else e.flow!="standard"&&(i.access_token||i.id_token)&&H(i.access_token,null,i.id_token,!0);if(e.flow!="implicit"&&m){var S="code="+m+"&grant_type=authorization_code",O=e.endpoints.token(),L=new XMLHttpRequest;L.open("POST",O,!0),L.setRequestHeader("Content-type","application/x-www-form-urlencoded"),S+="&client_id="+encodeURIComponent(e.clientId),S+="&redirect_uri="+i.redirectUri,i.pkceCodeVerifier&&(S+="&code_verifier="+i.pkceCodeVerifier),L.withCredentials=!0,L.onreadystatechange=function(){if(L.readyState==4)if(L.status==200){var G=JSON.parse(L.responseText);H(G.access_token,G.refresh_token,G.id_token,e.flow==="standard"),A()}else e.onAuthError&&e.onAuthError(),d&&d.setError()},L.send(S)}function H(G,Ce,we,ue){R=(R+new Date().getTime())/2,ae(G,Ce,we,R),u&&(e.tokenParsed&&e.tokenParsed.nonce!=i.storedNonce||e.refreshTokenParsed&&e.refreshTokenParsed.nonce!=i.storedNonce||e.idTokenParsed&&e.idTokenParsed.nonce!=i.storedNonce)?(w("[KEYCLOAK] Invalid nonce, clearing token"),e.clearToken(),d&&d.setError()):ue&&(e.onAuthSuccess&&e.onAuthSuccess(),d&&d.setSuccess())}}function j(i){var d=v(),m;t?typeof t=="string"&&(m=t):m=location.origin+"/keycloak.json";function C(L){L?e.endpoints={authorize:function(){return L.authorization_endpoint},token:function(){return L.token_endpoint},logout:function(){if(!L.end_session_endpoint)throw"Not supported by the OIDC server";return L.end_session_endpoint},checkSessionIframe:function(){if(!L.check_session_iframe)throw"Not supported by the OIDC server";return L.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!L.userinfo_endpoint)throw"Not supported by the OIDC server";return L.userinfo_endpoint}}:e.endpoints={authorize:function(){return M()+"/protocol/openid-connect/auth"},token:function(){return M()+"/protocol/openid-connect/token"},logout:function(){return M()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var H=M()+"/protocol/openid-connect/login-status-iframe.html";return e.iframeVersion&&(H=H+"?version="+e.iframeVersion),H},thirdPartyCookiesIframe:function(){var H=M()+"/protocol/openid-connect/3p-cookies/step1.html";return e.iframeVersion&&(H=H+"?version="+e.iframeVersion),H},register:function(){return M()+"/protocol/openid-connect/registrations"},userinfo:function(){return M()+"/protocol/openid-connect/userinfo"}}}if(m){var y=new XMLHttpRequest;y.open("GET",m,!0),y.setRequestHeader("Accept","application/json"),y.onreadystatechange=function(){if(y.readyState==4)if(y.status==200||ye(y)){var L=JSON.parse(y.responseText);e.authServerUrl=L["auth-server-url"],e.realm=L.realm,e.clientId=L.resource,C(null),d.setSuccess()}else d.setError()},y.send()}else{if(!t.clientId)throw"clientId missing";e.clientId=t.clientId;var R=t.oidcProvider;if(R)if(typeof R=="string"){var O;R.charAt(R.length-1)=="/"?O=R+".well-known/openid-configuration":O=R+"/.well-known/openid-configuration";var y=new XMLHttpRequest;y.open("GET",O,!0),y.setRequestHeader("Accept","application/json"),y.onreadystatechange=function(){if(y.readyState==4)if(y.status==200||ye(y)){var H=JSON.parse(y.responseText);C(H),d.setSuccess()}else d.setError()},y.send()}else C(R),d.setSuccess();else{if(!t.url){for(var k=document.getElementsByTagName("script"),S=0;S<k.length;S++)if(k[S].src.match(/.*keycloak\.js/)){t.url=k[S].src.substr(0,k[S].src.indexOf("/js/keycloak.js"));break}}if(!t.realm)throw"realm missing";e.authServerUrl=t.url,e.realm=t.realm,C(null),d.setSuccess()}}return d.promise}function ye(i){return i.status==0&&i.responseText&&i.responseURL.startsWith("file:")}function ae(i,d,m,C){if(e.tokenTimeoutHandle&&(clearTimeout(e.tokenTimeoutHandle),e.tokenTimeoutHandle=null),d?(e.refreshToken=d,e.refreshTokenParsed=Hn(d)):(delete e.refreshToken,delete e.refreshTokenParsed),m?(e.idToken=m,e.idTokenParsed=Hn(m)):(delete e.idToken,delete e.idTokenParsed),i){if(e.token=i,e.tokenParsed=Hn(i),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,C&&(e.timeSkew=Math.floor(C/1e3)-e.tokenParsed.iat),e.timeSkew!=null&&(w("[KEYCLOAK] Estimated time difference between browser and server is "+e.timeSkew+" seconds"),e.onTokenExpired)){var y=(e.tokenParsed.exp-new Date().getTime()/1e3+e.timeSkew)*1e3;w("[KEYCLOAK] Token expires in "+Math.round(y/1e3)+" s"),y<=0?e.onTokenExpired():e.tokenTimeoutHandle=setTimeout(e.onTokenExpired,y)}}else delete e.token,delete e.tokenParsed,delete e.subject,delete e.realmAccess,delete e.resourceAccess,e.authenticated=!1}function g(){var i="0123456789abcdef",d=$(36,i).split("");d[14]="4",d[19]=i.substr(d[19]&3|8,1),d[8]=d[13]=d[18]=d[23]="-";var m=d.join("");return m}function T(i){var d=U(i);if(d){var m=r.get(d.state);return m&&(d.valid=!0,d.redirectUri=m.redirectUri,d.storedNonce=m.nonce,d.prompt=m.prompt,d.pkceCodeVerifier=m.pkceCodeVerifier),d}}function U(i){var d;switch(e.flow){case"standard":d=["code","state","session_state","kc_action_status","iss"];break;case"implicit":d=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":d=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"];break}d.push("error"),d.push("error_description"),d.push("error_uri");var m=i.indexOf("?"),C=i.indexOf("#"),y,R;if(e.responseMode==="query"&&m!==-1?(y=i.substring(0,m),R=P(i.substring(m+1,C!==-1?C:i.length),d),R.paramsString!==""&&(y+="?"+R.paramsString),C!==-1&&(y+=i.substring(C))):e.responseMode==="fragment"&&C!==-1&&(y=i.substring(0,C),R=P(i.substring(C+1),d),R.paramsString!==""&&(y+="#"+R.paramsString)),R&&R.oauthParams){if(e.flow==="standard"||e.flow==="hybrid"){if((R.oauthParams.code||R.oauthParams.error)&&R.oauthParams.state)return R.oauthParams.newUrl=y,R.oauthParams}else if(e.flow==="implicit"&&(R.oauthParams.access_token||R.oauthParams.error)&&R.oauthParams.state)return R.oauthParams.newUrl=y,R.oauthParams}}function P(i,d){for(var m=i.split("&"),C={paramsString:"",oauthParams:{}},y=0;y<m.length;y++){var R=m[y].indexOf("="),k=m[y].slice(0,R);d.indexOf(k)!==-1?C.oauthParams[k]=m[y].slice(R+1):(C.paramsString!==""&&(C.paramsString+="&"),C.paramsString+=m[y])}return C}function v(){var i={setSuccess:function(d){i.resolve(d)},setError:function(d){i.reject(d)}};return i.promise=new Promise(function(d,m){i.resolve=d,i.reject=m}),i}function _(i,d,m){var C=null,y=new Promise(function(R,k){C=setTimeout(function(){k({error:m||"Promise is not settled within timeout of "+d+"ms"})},d)});return Promise.race([i,y]).finally(function(){clearTimeout(C)})}function V(){var i=v();if(!s.enable||s.iframe)return i.setSuccess(),i.promise;var d=document.createElement("iframe");s.iframe=d,d.onload=function(){var y=e.endpoints.authorize();y.charAt(0)==="/"?s.iframeOrigin=ee():s.iframeOrigin=y.substring(0,y.indexOf("/",8)),i.setSuccess()};var m=e.endpoints.checkSessionIframe();d.setAttribute("src",m),d.setAttribute("sandbox","allow-scripts allow-same-origin"),d.setAttribute("title","keycloak-session-iframe"),d.style.display="none",document.body.appendChild(d);var C=function(y){if(!(y.origin!==s.iframeOrigin||s.iframe.contentWindow!==y.source)&&(y.data=="unchanged"||y.data=="changed"||y.data=="error")){y.data!="unchanged"&&e.clearToken();for(var R=s.callbackList.splice(0,s.callbackList.length),k=R.length-1;k>=0;--k){var S=R[k];y.data=="error"?S.setError():S.setSuccess(y.data=="unchanged")}}};return window.addEventListener("message",C,!1),i.promise}function A(){s.enable&&e.token&&setTimeout(function(){z().then(function(i){i&&A()})},s.interval*1e3)}function z(){var i=v();if(s.iframe&&s.iframeOrigin){var d=e.clientId+" "+(e.sessionId?e.sessionId:"");s.callbackList.push(i);var m=s.iframeOrigin;s.callbackList.length==1&&s.iframe.contentWindow.postMessage(d,m)}else i.setSuccess();return i.promise}function te(){var i=v();if(s.enable||e.silentCheckSsoRedirectUri){var d=document.createElement("iframe");d.setAttribute("src",e.endpoints.thirdPartyCookiesIframe()),d.setAttribute("sandbox","allow-scripts allow-same-origin"),d.setAttribute("title","keycloak-3p-check-iframe"),d.style.display="none",document.body.appendChild(d);var m=function(C){d.contentWindow===C.source&&(C.data!=="supported"&&C.data!=="unsupported"||(C.data==="unsupported"&&(E(`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:
73
+
74
+ - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).
75
+ - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).
76
+
77
+ For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers`),s.enable=!1,e.silentCheckSsoFallback&&(e.silentCheckSsoRedirectUri=!1)),document.body.removeChild(d),window.removeEventListener("message",m),i.setSuccess()))};window.addEventListener("message",m,!1)}else i.setSuccess();return _(i.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function ie(i){if(!i||i=="default")return{login:function(k){return window.location.assign(e.createLoginUrl(k)),v().promise},logout:function(k){return window.location.replace(e.createLogoutUrl(k)),v().promise},register:function(k){return window.location.assign(e.createRegisterUrl(k)),v().promise},accountManagement:function(){var k=e.createAccountUrl();if(typeof k<"u")window.location.href=k;else throw"Not supported by the OIDC server";return v().promise},redirectUri:function(k,S){return k&&k.redirectUri?k.redirectUri:e.redirectUri?e.redirectUri:location.href}};if(i=="cordova"){s.enable=!1;var d=function(k,S,O){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(k,S,O):window.open(k,S,O)},m=function(k){return k&&k.cordovaOptions?Object.keys(k.cordovaOptions).reduce(function(S,O){return S[O]=k.cordovaOptions[O],S},{}):{}},C=function(k){return Object.keys(k).reduce(function(S,O){return S.push(O+"="+k[O]),S},[]).join(",")},y=function(k){var S=m(k);return S.location="no",k&&k.prompt=="none"&&(S.hidden="yes"),C(S)},R=function(){return e.redirectUri||"http://localhost"};return{login:function(k){var S=v(),O=y(k),L=e.createLoginUrl(k),H=d(L,"_blank",O),G=!1,Ce=!1,we=function(){Ce=!0,H.close()};return H.addEventListener("loadstart",function(ue){if(ue.url.indexOf(R())==0){var He=T(ue.url);oe(He,S),we(),G=!0}}),H.addEventListener("loaderror",function(ue){if(!G)if(ue.url.indexOf(R())==0){var He=T(ue.url);oe(He,S),we(),G=!0}else S.setError(),we()}),H.addEventListener("exit",function(ue){Ce||S.setError({reason:"closed_by_user"})}),S.promise},logout:function(k){var S=v(),O=e.createLogoutUrl(k),L=d(O,"_blank","location=no,hidden=yes,clearcache=yes"),H;return L.addEventListener("loadstart",function(G){G.url.indexOf(R())==0&&L.close()}),L.addEventListener("loaderror",function(G){G.url.indexOf(R())==0||(H=!0),L.close()}),L.addEventListener("exit",function(G){H?S.setError():(e.clearToken(),S.setSuccess())}),S.promise},register:function(k){var S=v(),O=e.createRegisterUrl(),L=y(k),H=d(O,"_blank",L);return H.addEventListener("loadstart",function(G){if(G.url.indexOf(R())==0){H.close();var Ce=T(G.url);oe(Ce,S)}}),S.promise},accountManagement:function(){var k=e.createAccountUrl();if(typeof k<"u"){var S=d(k,"_blank","location=no");S.addEventListener("loadstart",function(O){O.url.indexOf(R())==0&&S.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(k){return R()}}}if(i=="cordova-native")return s.enable=!1,{login:function(k){var S=v(),O=e.createLoginUrl(k);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var H=T(L.url);oe(H,S)}),window.cordova.plugins.browsertab.openUrl(O),S.promise},logout:function(k){var S=v(),O=e.createLogoutUrl(k);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),e.clearToken(),S.setSuccess()}),window.cordova.plugins.browsertab.openUrl(O),S.promise},register:function(k){var S=v(),O=e.createRegisterUrl(k);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var H=T(L.url);oe(H,S)}),window.cordova.plugins.browsertab.openUrl(O),S.promise},accountManagement:function(){var k=e.createAccountUrl();if(typeof k<"u")window.cordova.plugins.browsertab.openUrl(k);else throw"Not supported by the OIDC server"},redirectUri:function(k){return k&&k.redirectUri?k.redirectUri:e.redirectUri?e.redirectUri:"http://localhost"}};throw"invalid adapter type: "+i}var se=function(){if(!(this instanceof se))return new se;localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test");var i=this;function d(){for(var m=new Date().getTime(),C=0;C<localStorage.length;C++){var y=localStorage.key(C);if(y&&y.indexOf("kc-callback-")==0){var R=localStorage.getItem(y);if(R)try{var k=JSON.parse(R).expires;(!k||k<m)&&localStorage.removeItem(y)}catch{localStorage.removeItem(y)}}}}i.get=function(m){if(m){var C="kc-callback-"+m,y=localStorage.getItem(C);return y&&(localStorage.removeItem(C),y=JSON.parse(y)),d(),y}},i.add=function(m){d();var C="kc-callback-"+m.state;m.expires=new Date().getTime()+60*60*1e3,localStorage.setItem(C,JSON.stringify(m))}},be=function(){if(!(this instanceof be))return new be;var i=this;i.get=function(y){if(y){var R=m("kc-callback-"+y);if(C("kc-callback-"+y,"",d(-100)),R)return JSON.parse(R)}},i.add=function(y){C("kc-callback-"+y.state,JSON.stringify(y),d(60))},i.removeItem=function(y){C(y,"",d(-100))};var d=function(y){var R=new Date;return R.setTime(R.getTime()+y*60*1e3),R},m=function(y){for(var R=y+"=",k=document.cookie.split(";"),S=0;S<k.length;S++){for(var O=k[S];O.charAt(0)==" ";)O=O.substring(1);if(O.indexOf(R)==0)return O.substring(R.length,O.length)}return""},C=function(y,R,k){var S=y+"="+R+"; expires="+k.toUTCString()+"; ";document.cookie=S}};function D(){try{return new se}catch{}return new be}function ke(i){return function(){e.enableLogging&&i.apply(console,Array.prototype.slice.call(arguments))}}}async function Hl(){const t="silent-login.html",e=await fetch(location.origin+"/"+t).then(async n=>n.status!==200?!1:(await n.text()).includes("silent-login-iframe-result")).catch(()=>!1);if(!e){const n=`O arquivo ${t} não foi localizado no projeto ou não possui o conteúdo correto!`;console.warn(n),document.documentElement.setAttribute("data-app-message",n)}return e}function jl(t){const e=new Ar(t),n={},o=async(a={},f)=>{if(await Hl())return a.onLoad==="login-required"&&document.documentElement.setAttribute("data-app-message","Autorizando..."),e.init(a).then(async w=>{w&&await r(),f&&typeof f=="function"&&f(),document.documentElement.classList.add("app-mounted")}).catch(w=>{console.error(w),document.documentElement.setAttribute("data-app-message","Não foi possível conectar no servidor de autenticação.")})},r=async()=>{const a=await e.loadUserInfo();n.email=a.email??"",n.emailVerified=a.email_verified===!0,n.firstName=a.given_name??"",n.lastName=a.family_name??"",n.name=a.name??"",n.sub=a.sub??"",n.username=a.preferred_username??"",n.roles=[...a.role??[]],n.groups=[...a.group??[]],n.IsInRole=f=>n.roles.includes(f),sessionStorage.setItem("name",n.name)};return{Instance:e,User:n,Init:o,Logout:()=>{e.logout({redirectUri:location.origin}).then(()=>{sessionStorage.removeItem("name")})}}}const Vl=t=>jl(t);class jn{constructor(e=null){qe(this,"errors",[]);qe(this,"_value",null);qe(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 Ed="";function kr(t,e){return function(){return t.apply(e,arguments)}}const{toString:zl}=Object.prototype,{getPrototypeOf:Vn}=Object,en=(t=>e=>{const n=zl.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Me=t=>(t=t.toLowerCase(),e=>en(e)===t),tn=t=>e=>typeof e===t,{isArray:ht}=Array,Bt=tn("undefined");function Wl(t){return t!==null&&!Bt(t)&&t.constructor!==null&&!Bt(t.constructor)&&Ie(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Cr=Me("ArrayBuffer");function ql(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Cr(t.buffer),e}const Kl=tn("string"),Ie=tn("function"),Sr=tn("number"),nn=t=>t!==null&&typeof t=="object",Gl=t=>t===!0||t===!1,on=t=>{if(en(t)!=="object")return!1;const e=Vn(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Jl=Me("Date"),Yl=Me("File"),Xl=Me("Blob"),Zl=Me("FileList"),Ql=t=>nn(t)&&Ie(t.pipe),eu=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ie(t.append)&&((e=en(t))==="formdata"||e==="object"&&Ie(t.toString)&&t.toString()==="[object FormData]"))},tu=Me("URLSearchParams"),nu=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Nt(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let o,r;if(typeof t!="object"&&(t=[t]),ht(t))for(o=0,r=t.length;o<r;o++)e.call(null,t[o],o,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),a=s.length;let f;for(o=0;o<a;o++)f=s[o],e.call(null,t[f],f,t)}}function xr(t,e){e=e.toLowerCase();const n=Object.keys(t);let o=n.length,r;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const _r=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),vr=t=>!Bt(t)&&t!==_r;function zn(){const{caseless:t}=vr(this)&&this||{},e={},n=(o,r)=>{const s=t&&xr(e,r)||r;on(e[s])&&on(o)?e[s]=zn(e[s],o):on(o)?e[s]=zn({},o):ht(o)?e[s]=o.slice():e[s]=o};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&Nt(arguments[o],n);return e}const ou=(t,e,n,{allOwnKeys:o}={})=>(Nt(e,(r,s)=>{n&&Ie(r)?t[s]=kr(r,n):t[s]=r},{allOwnKeys:o}),t),ru=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),su=(t,e,n,o)=>{t.prototype=Object.create(e.prototype,o),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},iu=(t,e,n,o)=>{let r,s,a;const f={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)a=r[s],(!o||o(a,t,e))&&!f[a]&&(e[a]=t[a],f[a]=!0);t=n!==!1&&Vn(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},au=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const o=t.indexOf(e,n);return o!==-1&&o===n},cu=t=>{if(!t)return null;if(ht(t))return t;let e=t.length;if(!Sr(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},lu=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Vn(Uint8Array)),uu=(t,e)=>{const o=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=o.next())&&!r.done;){const s=r.value;e.call(t,s[0],s[1])}},du=(t,e)=>{let n;const o=[];for(;(n=t.exec(e))!==null;)o.push(n);return o},fu=Me("HTMLFormElement"),hu=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),Tr=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),pu=Me("RegExp"),Pr=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),o={};Nt(n,(r,s)=>{let a;(a=e(r,s,t))!==!1&&(o[s]=a||r)}),Object.defineProperties(t,o)},mu=t=>{Pr(t,(e,n)=>{if(Ie(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=t[n];if(Ie(o)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},gu=(t,e)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return ht(t)?o(t):o(String(t).split(e)),n},yu=()=>{},bu=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Wn="abcdefghijklmnopqrstuvwxyz",Rr="0123456789",Lr={DIGIT:Rr,ALPHA:Wn,ALPHA_DIGIT:Wn+Wn.toUpperCase()+Rr},wu=(t=16,e=Lr.ALPHA_DIGIT)=>{let n="";const{length:o}=e;for(;t--;)n+=e[Math.random()*o|0];return n};function Eu(t){return!!(t&&Ie(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Au=t=>{const e=new Array(10),n=(o,r)=>{if(nn(o)){if(e.indexOf(o)>=0)return;if(!("toJSON"in o)){e[r]=o;const s=ht(o)?[]:{};return Nt(o,(a,f)=>{const u=n(a,r+1);!Bt(u)&&(s[f]=u)}),e[r]=void 0,s}}return o};return n(t,0)},ku=Me("AsyncFunction"),p={isArray:ht,isArrayBuffer:Cr,isBuffer:Wl,isFormData:eu,isArrayBufferView:ql,isString:Kl,isNumber:Sr,isBoolean:Gl,isObject:nn,isPlainObject:on,isUndefined:Bt,isDate:Jl,isFile:Yl,isBlob:Xl,isRegExp:pu,isFunction:Ie,isStream:Ql,isURLSearchParams:tu,isTypedArray:lu,isFileList:Zl,forEach:Nt,merge:zn,extend:ou,trim:nu,stripBOM:ru,inherits:su,toFlatObject:iu,kindOf:en,kindOfTest:Me,endsWith:au,toArray:cu,forEachEntry:uu,matchAll:du,isHTMLForm:fu,hasOwnProperty:Tr,hasOwnProp:Tr,reduceDescriptors:Pr,freezeMethods:mu,toObjectSet:gu,toCamelCase:hu,noop:yu,toFiniteNumber:bu,findKey:xr,global:_r,isContextDefined:vr,ALPHABET:Lr,generateString:wu,isSpecCompliantForm:Eu,toJSONObject:Au,isAsyncFn:ku,isThenable:t=>t&&(nn(t)||Ie(t))&&Ie(t.then)&&Ie(t.catch)};function Y(t,e,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r)}p.inherits(Y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:p.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Or=Y.prototype,Ir={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Ir[t]={value:t}}),Object.defineProperties(Y,Ir),Object.defineProperty(Or,"isAxiosError",{value:!0}),Y.from=(t,e,n,o,r,s)=>{const a=Object.create(Or);return p.toFlatObject(t,a,function(u){return u!==Error.prototype},f=>f!=="isAxiosError"),Y.call(a,t.message,e,n,o,r),a.cause=t,a.name=t.name,s&&Object.assign(a,s),a};const Cu=null;function qn(t){return p.isPlainObject(t)||p.isArray(t)}function Br(t){return p.endsWith(t,"[]")?t.slice(0,-2):t}function Nr(t,e,n){return t?t.concat(e).map(function(r,s){return r=Br(r),!n&&s?"["+r+"]":r}).join(n?".":""):e}function Su(t){return p.isArray(t)&&!t.some(qn)}const xu=p.toFlatObject(p,{},null,function(e){return/^is[A-Z]/.test(e)});function rn(t,e,n){if(!p.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=p.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(N,M){return!p.isUndefined(M[N])});const o=n.metaTokens,r=n.visitor||E,s=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&p.isSpecCompliantForm(e);if(!p.isFunction(r))throw new TypeError("visitor must be a function");function w(B){if(B===null)return"";if(p.isDate(B))return B.toISOString();if(!u&&p.isBlob(B))throw new Y("Blob is not supported. Use a Buffer instead.");return p.isArrayBuffer(B)||p.isTypedArray(B)?u&&typeof Blob=="function"?new Blob([B]):Buffer.from(B):B}function E(B,N,M){let ee=B;if(B&&!M&&typeof B=="object"){if(p.endsWith(N,"{}"))N=o?N:N.slice(0,-2),B=JSON.stringify(B);else if(p.isArray(B)&&Su(B)||(p.isFileList(B)||p.endsWith(N,"[]"))&&(ee=p.toArray(B)))return N=Br(N),ee.forEach(function(j,ye){!(p.isUndefined(j)||j===null)&&e.append(a===!0?Nr([N],ye,s):a===null?N:N+"[]",w(j))}),!1}return qn(B)?!0:(e.append(Nr(M,N,s),w(B)),!1)}const b=[],X=Object.assign(xu,{defaultVisitor:E,convertValue:w,isVisitable:qn});function $(B,N){if(!p.isUndefined(B)){if(b.indexOf(B)!==-1)throw Error("Circular reference detected in "+N.join("."));b.push(B),p.forEach(B,function(ee,oe){(!(p.isUndefined(ee)||ee===null)&&r.call(e,ee,p.isString(oe)?oe.trim():oe,N,X))===!0&&$(ee,N?N.concat(oe):[oe])}),b.pop()}}if(!p.isObject(t))throw new TypeError("data must be an object");return $(t),e}function Fr(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(o){return e[o]})}function Kn(t,e){this._pairs=[],t&&rn(t,this,e)}const Ur=Kn.prototype;Ur.append=function(e,n){this._pairs.push([e,n])},Ur.toString=function(e){const n=e?function(o){return e.call(this,o,Fr)}:Fr;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function _u(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Dr(t,e,n){if(!e)return t;const o=n&&n.encode||_u,r=n&&n.serialize;let s;if(r?s=r(e,n):s=p.isURLSearchParams(e)?e.toString():new Kn(e,n).toString(o),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class vu{constructor(){this.handlers=[]}use(e,n,o){return this.handlers.push({fulfilled:e,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){p.forEach(this.handlers,function(o){o!==null&&e(o)})}}const Mr=vu,$r={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tu={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Kn,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Hr=typeof window<"u"&&typeof document<"u",Pu=(t=>Hr&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),Ru=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),$e={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Hr,hasStandardBrowserEnv:Pu,hasStandardBrowserWebWorkerEnv:Ru},Symbol.toStringTag,{value:"Module"})),...Tu};function Lu(t,e){return rn(t,new $e.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return $e.isNode&&p.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Ou(t){return p.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Iu(t){const e={},n=Object.keys(t);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],e[s]=t[s];return e}function jr(t){function e(n,o,r,s){let a=n[s++];if(a==="__proto__")return!0;const f=Number.isFinite(+a),u=s>=n.length;return a=!a&&p.isArray(r)?r.length:a,u?(p.hasOwnProp(r,a)?r[a]=[r[a],o]:r[a]=o,!f):((!r[a]||!p.isObject(r[a]))&&(r[a]=[]),e(n,o,r[a],s)&&p.isArray(r[a])&&(r[a]=Iu(r[a])),!f)}if(p.isFormData(t)&&p.isFunction(t.entries)){const n={};return p.forEachEntry(t,(o,r)=>{e(Ou(o),r,n,0)}),n}return null}function Bu(t,e,n){if(p.isString(t))try{return(e||JSON.parse)(t),p.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(t)}const Gn={transitional:$r,adapter:["xhr","http"],transformRequest:[function(e,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=p.isObject(e);if(s&&p.isHTMLForm(e)&&(e=new FormData(e)),p.isFormData(e))return r&&r?JSON.stringify(jr(e)):e;if(p.isArrayBuffer(e)||p.isBuffer(e)||p.isStream(e)||p.isFile(e)||p.isBlob(e))return e;if(p.isArrayBufferView(e))return e.buffer;if(p.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let f;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return Lu(e,this.formSerializer).toString();if((f=p.isFileList(e))||o.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return rn(f?{"files[]":e}:e,u&&new u,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),Bu(e)):e}],transformResponse:[function(e){const n=this.transitional||Gn.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if(e&&p.isString(e)&&(o&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(f){if(a)throw f.name==="SyntaxError"?Y.from(f,Y.ERR_BAD_RESPONSE,this,null,this.response):f}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$e.classes.FormData,Blob:$e.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};p.forEach(["delete","get","head","post","put","patch"],t=>{Gn.headers[t]={}});const Jn=Gn,Nu=p.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Fu=t=>{const e={};let n,o,r;return t&&t.split(`
78
+ `).forEach(function(a){r=a.indexOf(":"),n=a.substring(0,r).trim().toLowerCase(),o=a.substring(r+1).trim(),!(!n||e[n]&&Nu[n])&&(n==="set-cookie"?e[n]?e[n].push(o):e[n]=[o]:e[n]=e[n]?e[n]+", "+o:o)}),e},Vr=Symbol("internals");function Ft(t){return t&&String(t).trim().toLowerCase()}function sn(t){return t===!1||t==null?t:p.isArray(t)?t.map(sn):String(t)}function Uu(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(t);)e[o[1]]=o[2];return e}const Du=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Yn(t,e,n,o,r){if(p.isFunction(o))return o.call(this,e,n);if(r&&(e=n),!!p.isString(e)){if(p.isString(o))return e.indexOf(o)!==-1;if(p.isRegExp(o))return o.test(e)}}function Mu(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,o)=>n.toUpperCase()+o)}function $u(t,e){const n=p.toCamelCase(" "+e);["get","set","has"].forEach(o=>{Object.defineProperty(t,o+n,{value:function(r,s,a){return this[o].call(this,e,r,s,a)},configurable:!0})})}class an{constructor(e){e&&this.set(e)}set(e,n,o){const r=this;function s(f,u,w){const E=Ft(u);if(!E)throw new Error("header name must be a non-empty string");const b=p.findKey(r,E);(!b||r[b]===void 0||w===!0||w===void 0&&r[b]!==!1)&&(r[b||u]=sn(f))}const a=(f,u)=>p.forEach(f,(w,E)=>s(w,E,u));return p.isPlainObject(e)||e instanceof this.constructor?a(e,n):p.isString(e)&&(e=e.trim())&&!Du(e)?a(Fu(e),n):e!=null&&s(n,e,o),this}get(e,n){if(e=Ft(e),e){const o=p.findKey(this,e);if(o){const r=this[o];if(!n)return r;if(n===!0)return Uu(r);if(p.isFunction(n))return n.call(this,r,o);if(p.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ft(e),e){const o=p.findKey(this,e);return!!(o&&this[o]!==void 0&&(!n||Yn(this,this[o],o,n)))}return!1}delete(e,n){const o=this;let r=!1;function s(a){if(a=Ft(a),a){const f=p.findKey(o,a);f&&(!n||Yn(o,o[f],f,n))&&(delete o[f],r=!0)}}return p.isArray(e)?e.forEach(s):s(e),r}clear(e){const n=Object.keys(this);let o=n.length,r=!1;for(;o--;){const s=n[o];(!e||Yn(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){const n=this,o={};return p.forEach(this,(r,s)=>{const a=p.findKey(o,s);if(a){n[a]=sn(r),delete n[s];return}const f=e?Mu(s):String(s).trim();f!==s&&delete n[s],n[f]=sn(r),o[f]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return p.forEach(this,(o,r)=>{o!=null&&o!==!1&&(n[r]=e&&p.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
79
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const o=new this(e);return n.forEach(r=>o.set(r)),o}static accessor(e){const o=(this[Vr]=this[Vr]={accessors:{}}).accessors,r=this.prototype;function s(a){const f=Ft(a);o[f]||($u(r,a),o[f]=!0)}return p.isArray(e)?e.forEach(s):s(e),this}}an.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),p.reduceDescriptors(an.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(o){this[n]=o}}}),p.freezeMethods(an);const Ve=an;function Xn(t,e){const n=this||Jn,o=e||n,r=Ve.from(o.headers);let s=o.data;return p.forEach(t,function(f){s=f.call(n,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function zr(t){return!!(t&&t.__CANCEL__)}function Ut(t,e,n){Y.call(this,t??"canceled",Y.ERR_CANCELED,e,n),this.name="CanceledError"}p.inherits(Ut,Y,{__CANCEL__:!0});function Hu(t,e,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?t(n):e(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const ju=$e.hasStandardBrowserEnv?{write(t,e,n,o,r,s){const a=[t+"="+encodeURIComponent(e)];p.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),p.isString(o)&&a.push("path="+o),p.isString(r)&&a.push("domain="+r),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Vu(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function zu(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Wr(t,e){return t&&!Vu(e)?zu(t,e):e}const Wu=$e.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function r(s){let a=s;return e&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=r(window.location.href),function(a){const f=p.isString(a)?r(a):a;return f.protocol===o.protocol&&f.host===o.host}}():function(){return function(){return!0}}();function qu(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Ku(t,e){t=t||10;const n=new Array(t),o=new Array(t);let r=0,s=0,a;return e=e!==void 0?e:1e3,function(u){const w=Date.now(),E=o[s];a||(a=w),n[r]=u,o[r]=w;let b=s,X=0;for(;b!==r;)X+=n[b++],b=b%t;if(r=(r+1)%t,r===s&&(s=(s+1)%t),w-a<e)return;const $=E&&w-E;return $?Math.round(X*1e3/$):void 0}}function qr(t,e){let n=0;const o=Ku(50,250);return r=>{const s=r.loaded,a=r.lengthComputable?r.total:void 0,f=s-n,u=o(f),w=s<=a;n=s;const E={loaded:s,total:a,progress:a?s/a:void 0,bytes:f,rate:u||void 0,estimated:u&&a&&w?(a-s)/u:void 0,event:r};E[e?"download":"upload"]=!0,t(E)}}const Zn={http:Cu,xhr:typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,o){let r=t.data;const s=Ve.from(t.headers).normalize();let{responseType:a,withXSRFToken:f}=t,u;function w(){t.cancelToken&&t.cancelToken.unsubscribe(u),t.signal&&t.signal.removeEventListener("abort",u)}let E;if(p.isFormData(r)){if($e.hasStandardBrowserEnv||$e.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if((E=s.getContentType())!==!1){const[N,...M]=E?E.split(";").map(ee=>ee.trim()).filter(Boolean):[];s.setContentType([N||"multipart/form-data",...M].join("; "))}}let b=new XMLHttpRequest;if(t.auth){const N=t.auth.username||"",M=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.set("Authorization","Basic "+btoa(N+":"+M))}const X=Wr(t.baseURL,t.url);b.open(t.method.toUpperCase(),Dr(X,t.params,t.paramsSerializer),!0),b.timeout=t.timeout;function $(){if(!b)return;const N=Ve.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),ee={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:N,config:t,request:b};Hu(function(j){n(j),w()},function(j){o(j),w()},ee),b=null}if("onloadend"in b?b.onloadend=$:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout($)},b.onabort=function(){b&&(o(new Y("Request aborted",Y.ECONNABORTED,t,b)),b=null)},b.onerror=function(){o(new Y("Network Error",Y.ERR_NETWORK,t,b)),b=null},b.ontimeout=function(){let M=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const ee=t.transitional||$r;t.timeoutErrorMessage&&(M=t.timeoutErrorMessage),o(new Y(M,ee.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,t,b)),b=null},$e.hasStandardBrowserEnv&&(f&&p.isFunction(f)&&(f=f(t)),f||f!==!1&&Wu(X))){const N=t.xsrfHeaderName&&t.xsrfCookieName&&ju.read(t.xsrfCookieName);N&&s.set(t.xsrfHeaderName,N)}r===void 0&&s.setContentType(null),"setRequestHeader"in b&&p.forEach(s.toJSON(),function(M,ee){b.setRequestHeader(ee,M)}),p.isUndefined(t.withCredentials)||(b.withCredentials=!!t.withCredentials),a&&a!=="json"&&(b.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&b.addEventListener("progress",qr(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&b.upload&&b.upload.addEventListener("progress",qr(t.onUploadProgress)),(t.cancelToken||t.signal)&&(u=N=>{b&&(o(!N||N.type?new Ut(null,t,b):N),b.abort(),b=null)},t.cancelToken&&t.cancelToken.subscribe(u),t.signal&&(t.signal.aborted?u():t.signal.addEventListener("abort",u)));const B=qu(X);if(B&&$e.protocols.indexOf(B)===-1){o(new Y("Unsupported protocol "+B+":",Y.ERR_BAD_REQUEST,t));return}b.send(r||null)})}};p.forEach(Zn,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Kr=t=>`- ${t}`,Gu=t=>p.isFunction(t)||t===null||t===!1,Gr={getAdapter:t=>{t=p.isArray(t)?t:[t];const{length:e}=t;let n,o;const r={};for(let s=0;s<e;s++){n=t[s];let a;if(o=n,!Gu(n)&&(o=Zn[(a=String(n)).toLowerCase()],o===void 0))throw new Y(`Unknown adapter '${a}'`);if(o)break;r[a||"#"+s]=o}if(!o){const s=Object.entries(r).map(([f,u])=>`adapter ${f} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=e?s.length>1?`since :
80
+ `+s.map(Kr).join(`
81
+ `):" "+Kr(s[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o},adapters:Zn};function Qn(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ut(null,t)}function Jr(t){return Qn(t),t.headers=Ve.from(t.headers),t.data=Xn.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Gr.getAdapter(t.adapter||Jn.adapter)(t).then(function(o){return Qn(t),o.data=Xn.call(t,t.transformResponse,o),o.headers=Ve.from(o.headers),o},function(o){return zr(o)||(Qn(t),o&&o.response&&(o.response.data=Xn.call(t,t.transformResponse,o.response),o.response.headers=Ve.from(o.response.headers))),Promise.reject(o)})}const Yr=t=>t instanceof Ve?t.toJSON():t;function pt(t,e){e=e||{};const n={};function o(w,E,b){return p.isPlainObject(w)&&p.isPlainObject(E)?p.merge.call({caseless:b},w,E):p.isPlainObject(E)?p.merge({},E):p.isArray(E)?E.slice():E}function r(w,E,b){if(p.isUndefined(E)){if(!p.isUndefined(w))return o(void 0,w,b)}else return o(w,E,b)}function s(w,E){if(!p.isUndefined(E))return o(void 0,E)}function a(w,E){if(p.isUndefined(E)){if(!p.isUndefined(w))return o(void 0,w)}else return o(void 0,E)}function f(w,E,b){if(b in e)return o(w,E);if(b in t)return o(void 0,w)}const u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:f,headers:(w,E)=>r(Yr(w),Yr(E),!0)};return p.forEach(Object.keys(Object.assign({},t,e)),function(E){const b=u[E]||r,X=b(t[E],e[E],E);p.isUndefined(X)&&b!==f||(n[E]=X)}),n}const Xr="1.6.5",eo={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{eo[t]=function(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}});const Zr={};eo.transitional=function(e,n,o){function r(s,a){return"[Axios v"+Xr+"] Transitional option '"+s+"'"+a+(o?". "+o:"")}return(s,a,f)=>{if(e===!1)throw new Y(r(a," has been removed"+(n?" in "+n:"")),Y.ERR_DEPRECATED);return n&&!Zr[a]&&(Zr[a]=!0,console.warn(r(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,a,f):!0}};function Ju(t,e,n){if(typeof t!="object")throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const o=Object.keys(t);let r=o.length;for(;r-- >0;){const s=o[r],a=e[s];if(a){const f=t[s],u=f===void 0||a(f,s,t);if(u!==!0)throw new Y("option "+s+" must be "+u,Y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Y("Unknown option "+s,Y.ERR_BAD_OPTION)}}const to={assertOptions:Ju,validators:eo},Ye=to.validators;class cn{constructor(e){this.defaults=e,this.interceptors={request:new Mr,response:new Mr}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=pt(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&to.assertOptions(o,{silentJSONParsing:Ye.transitional(Ye.boolean),forcedJSONParsing:Ye.transitional(Ye.boolean),clarifyTimeoutError:Ye.transitional(Ye.boolean)},!1),r!=null&&(p.isFunction(r)?n.paramsSerializer={serialize:r}:to.assertOptions(r,{encode:Ye.function,serialize:Ye.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&p.merge(s.common,s[n.method]);s&&p.forEach(["delete","get","head","post","put","patch","common"],B=>{delete s[B]}),n.headers=Ve.concat(a,s);const f=[];let u=!0;this.interceptors.request.forEach(function(N){typeof N.runWhen=="function"&&N.runWhen(n)===!1||(u=u&&N.synchronous,f.unshift(N.fulfilled,N.rejected))});const w=[];this.interceptors.response.forEach(function(N){w.push(N.fulfilled,N.rejected)});let E,b=0,X;if(!u){const B=[Jr.bind(this),void 0];for(B.unshift.apply(B,f),B.push.apply(B,w),X=B.length,E=Promise.resolve(n);b<X;)E=E.then(B[b++],B[b++]);return E}X=f.length;let $=n;for(b=0;b<X;){const B=f[b++],N=f[b++];try{$=B($)}catch(M){N.call(this,M);break}}try{E=Jr.call(this,$)}catch(B){return Promise.reject(B)}for(b=0,X=w.length;b<X;)E=E.then(w[b++],w[b++]);return E}getUri(e){e=pt(this.defaults,e);const n=Wr(e.baseURL,e.url);return Dr(n,e.params,e.paramsSerializer)}}p.forEach(["delete","get","head","options"],function(e){cn.prototype[e]=function(n,o){return this.request(pt(o||{},{method:e,url:n,data:(o||{}).data}))}}),p.forEach(["post","put","patch"],function(e){function n(o){return function(s,a,f){return this.request(pt(f||{},{method:e,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}cn.prototype[e]=n(),cn.prototype[e+"Form"]=n(!0)});const ln=cn;class no{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(f=>{o.subscribe(f),s=f}).then(r);return a.cancel=function(){o.unsubscribe(s)},a},e(function(s,a,f){o.reason||(o.reason=new Ut(s,a,f),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new no(function(r){e=r}),cancel:e}}}const Yu=no;function Xu(t){return function(n){return t.apply(null,n)}}function Zu(t){return p.isObject(t)&&t.isAxiosError===!0}const oo={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(oo).forEach(([t,e])=>{oo[e]=t});const Qu=oo;function Qr(t){const e=new ln(t),n=kr(ln.prototype.request,e);return p.extend(n,ln.prototype,e,{allOwnKeys:!0}),p.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Qr(pt(t,r))},n}const re=Qr(Jn);re.Axios=ln,re.CanceledError=Ut,re.CancelToken=Yu,re.isCancel=zr,re.VERSION=Xr,re.toFormData=rn,re.AxiosError=Y,re.Cancel=re.CanceledError,re.all=function(e){return Promise.all(e)},re.spread=Xu,re.isAxiosError=Zu,re.mergeConfig=pt,re.AxiosHeaders=Ve,re.formToJSON=t=>jr(p.isHTMLForm(t)?new FormData(t):t),re.getAdapter=Gr.getAdapter,re.HttpStatusCode=Qu,re.default=re;const ed=re;class es{constructor(e){qe(this,"keycloak");qe(this,"axios");qe(this,"fileName","silent-login.html");this.keycloak=e,this.axios=ed.create(),this.axios.defaults.baseURL="https://localhost:5001/api",this.axios.defaults.headers.common["content-type"]="application/json",this.axios.defaults.timeout=1e3*60*5,this.axios.interceptors.request.use(async n=>{await this.SilentLogin();const o=this.keycloak.token;return n.headers.Authorization=`Bearer ${o}`,n})}ParseAppResult(e){try{const n=typeof e.hasSuccess=="boolean",o=typeof e.hasError=="boolean",r=typeof e.httpStatusCode=="number",s=Array.isArray(e.errors);return n&&o&&r&&s?e:null}catch{return null}}HandleThen(e){const n=new jn,o=this.ParseAppResult(e.data);return o===null?(n.value=e.data,n):o.hasError?(o.errors.forEach(r=>n.WithError(r)),n.httpStatusCode=o.httpStatusCode,n):(n.value=e.data.value,n)}HandleCatch(e){var r;const n=new jn,o=this.ParseAppResult((r=e.response)==null?void 0:r.data);return o===null?n.WithError(e.message):(n.WithErrors(o.errors),n.httpStatusCode=o.httpStatusCode),n}async SilentLogin(){return new Promise(async e=>{if(!this.isTokenExpired){e(!0);return}const n=this.GenerateIframe(),o=r=>{if(document.body.removeChild(n),window.removeEventListener("message",o),r.origin!==location.origin){e(!1);return}const s=r.data.action,a=r.data.code,f=r.data.state,u=r.data.error;if(s!=="silent-login-iframe-result"||u==="login_required"||!a){e(!1);return}const w=new XMLHttpRequest;w.open("POST",this.tokenExchangeUrl,!0),w.setRequestHeader("Content-type","application/x-www-form-urlencoded"),w.onreadystatechange=()=>{if(w.readyState===4){if(w.status===200){const E=JSON.parse(w.responseText);this.keycloak.setToken(E.access_token,null,E.id_token,new Date().getTime()),e(!0);return}e(!1)}},w.send(this.TokenExchangeParams(a,f))};window.addEventListener("message",o)}).then(e=>(e||(this.keycloak.clearToken(),this.keycloak.login()),e))}GetCodeVerifierFromState(e){const n=`kc-callback-${e}`,o=localStorage.getItem(n);if(o)return localStorage.removeItem(n),JSON.parse(o).pkceCodeVerifier}TokenExchangeParams(e,n){let o=`code=${e}&grant_type=authorization_code`;return o+=`&client_id=${encodeURIComponent(this.keycloak.clientId)}`,o+=`&redirect_uri=${this.silentLoginRedirectUrl}`,o+=`&code_verifier=${this.GetCodeVerifierFromState(n)}`,o}GenerateIframe(){const e=document.createElement("iframe");return e.src=this.keycloak.createLoginUrl({prompt:"none",redirectUri:this.silentLoginRedirectUrl})??"",document.body.appendChild(e),e}get silentLoginRedirectUrl(){return`${location.origin}/${this.fileName}`}get tokenExchangeUrl(){return`${this.keycloak.authServerUrl}/realms/${this.keycloak.realm}/protocol/openid-connect/token`}get isTokenExpired(){const e=this.keycloak.tokenParsed,n=e?e.exp:null;return!e||!n?!0:n-Math.ceil(new Date().getTime()/1e3)+(this.keycloak.timeSkew??0)<10}}const td=t=>new es(t);Mn.SetInitialTheme(),Z.AppResult=jn,Z.AxiosClient=es,Z.SfButton=ho,Z.SfContent=yl,Z.SfDrawer=fo,Z.SfIcon=wt,Z.SfLayout=fl,Z.SfMessage=xl,Z.SfNavMenuLink=ml,Z.SfTabNavigation=Cl,Z.UseAlertService=Gc,Z.UseAuthService=Vl,Z.UseAxiosClient=td,Z.UseConfirmService=yr,Z.UseNavMenuService=fn,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
82
+ //# sourceMappingURL=sf.prefeiturasp.vuecomponents.umd.js.map