@sesamy/sesamy-js 1.18.2 → 1.18.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sesamy-js.cjs +1 -1
- package/dist/sesamy-js.mjs +0 -1
- package/package.json +2 -2
package/dist/sesamy-js.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Ol=Object.defineProperty;var _l=(e,t,r)=>t in e?Ol(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ie=(e,t,r)=>_l(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("core-js/actual/fetch");var lr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},re=function(e){try{return!!e()}catch{return!0}},Rl=re,za=!Rl(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),uc=za,lc=Function.prototype,fa=lc.call,Cl=uc&&lc.bind.bind(fa,fa),K=uc?Cl:function(e){return function(){return fa.apply(e,arguments)}},fc=K,jl=fc({}.toString),Al=fc("".slice),Ha=function(e){return Al(jl(e),8,-1)},Ll=K,Ul=re,xl=Ha,dn=Object,Nl=Ll("".split),dc=Ul(function(){return!dn("z").propertyIsEnumerable(0)})?function(e){return xl(e)==="String"?Nl(e,""):dn(e)}:dn,Ba=function(e){return e==null},Dl=Ba,Ml=TypeError,Yr=function(e){if(Dl(e))throw new Ml("Can't call method on "+e);return e},Fl=dc,zl=Yr,rr=function(e){return Fl(zl(e))},At=function(e){return e&&e.Math===Math&&e},q=At(typeof globalThis=="object"&&globalThis)||At(typeof window=="object"&&window)||At(typeof self=="object"&&self)||At(typeof lr=="object"&&lr)||At(typeof lr=="object"&&lr)||function(){return this}()||Function("return this")(),hc={exports:{}},Hl=!1,Li=q,Bl=Object.defineProperty,Ka=function(e,t){try{Bl(Li,e,{value:t,configurable:!0,writable:!0})}catch{Li[e]=t}return t},Kl=q,Gl=Ka,Ui="__core-js_shared__",xi=hc.exports=Kl[Ui]||Gl(Ui,{});(xi.versions||(xi.versions=[])).push({version:"3.37.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Ga=hc.exports,Ni=Ga,vc=function(e,t){return Ni[e]||(Ni[e]=t||{})},Wl=Yr,Vl=Object,Jr=function(e){return Vl(Wl(e))},Zl=K,Yl=Jr,Jl=Zl({}.hasOwnProperty),ye=Object.hasOwn||function(t,r){return Jl(Yl(t),r)},Xl=K,ql=0,Ql=Math.random(),ef=Xl(1 .toString),pc=function(e){return"Symbol("+(e===void 0?"":e)+")_"+ef(++ql+Ql,36)},tf=typeof navigator<"u"&&String(navigator.userAgent)||"",mc=q,hn=tf,Di=mc.process,Mi=mc.Deno,Fi=Di&&Di.versions||Mi&&Mi.version,zi=Fi&&Fi.v8,pe,Nr;zi&&(pe=zi.split("."),Nr=pe[0]>0&&pe[0]<4?1:+(pe[0]+pe[1]));!Nr&&hn&&(pe=hn.match(/Edge\/(\d+)/),(!pe||pe[1]>=74)&&(pe=hn.match(/Chrome\/(\d+)/),pe&&(Nr=+pe[1])));var rf=Nr,Hi=rf,nf=re,af=q,of=af.String,gc=!!Object.getOwnPropertySymbols&&!nf(function(){var e=Symbol("symbol detection");return!of(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Hi&&Hi<41}),sf=gc,yc=sf&&!Symbol.sham&&typeof Symbol.iterator=="symbol",cf=q,uf=vc,Bi=ye,lf=pc,ff=gc,df=yc,dt=cf.Symbol,vn=uf("wks"),hf=df?dt.for||dt:dt&&dt.withoutSetter||lf,fe=function(e){return Bi(vn,e)||(vn[e]=ff&&Bi(dt,e)?dt[e]:hf("Symbol."+e)),vn[e]},pn=typeof document=="object"&&document.all,Z=typeof pn>"u"&&pn!==void 0?function(e){return typeof e=="function"||e===pn}:function(e){return typeof e=="function"},vf=Z,Re=function(e){return typeof e=="object"?e!==null:vf(e)},pf=Re,mf=String,gf=TypeError,Me=function(e){if(pf(e))return e;throw new gf(mf(e)+" is not an object")},wc={},yf=re,Y=!yf(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),wf=Y,bf=re,bc=wf&&bf(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),$e={},Sf=q,Ki=Re,da=Sf.document,If=Ki(da)&&Ki(da.createElement),Wa=function(e){return If?da.createElement(e):{}},$f=Y,kf=re,Pf=Wa,Sc=!$f&&!kf(function(){return Object.defineProperty(Pf("div"),"a",{get:function(){return 7}}).a!==7}),Tf=za,fr=Function.prototype.call,ke=Tf?fr.bind(fr):function(){return fr.apply(fr,arguments)},mn=q,Ef=Z,Of=function(e){return Ef(e)?e:void 0},Tt=function(e,t){return arguments.length<2?Of(mn[e]):mn[e]&&mn[e][t]},_f=K,Ic=_f({}.isPrototypeOf),Rf=Tt,Cf=Z,jf=Ic,Af=yc,Lf=Object,$c=Af?function(e){return typeof e=="symbol"}:function(e){var t=Rf("Symbol");return Cf(t)&&jf(t.prototype,Lf(e))},Uf=String,kc=function(e){try{return Uf(e)}catch{return"Object"}},xf=Z,Nf=kc,Df=TypeError,Xr=function(e){if(xf(e))return e;throw new Df(Nf(e)+" is not a function")},Mf=Xr,Ff=Ba,Va=function(e,t){var r=e[t];return Ff(r)?void 0:Mf(r)},gn=ke,yn=Z,wn=Re,zf=TypeError,Hf=function(e,t){var r,n;if(t==="string"&&yn(r=e.toString)&&!wn(n=gn(r,e))||yn(r=e.valueOf)&&!wn(n=gn(r,e))||t!=="string"&&yn(r=e.toString)&&!wn(n=gn(r,e)))return n;throw new zf("Can't convert object to primitive value")},Bf=ke,Gi=Re,Wi=$c,Kf=Va,Gf=Hf,Wf=fe,Vf=TypeError,Zf=Wf("toPrimitive"),Yf=function(e,t){if(!Gi(e)||Wi(e))return e;var r=Kf(e,Zf),n;if(r){if(t===void 0&&(t="default"),n=Bf(r,e,t),!Gi(n)||Wi(n))return n;throw new Vf("Can't convert object to primitive value")}return t===void 0&&(t="number"),Gf(e,t)},Jf=Yf,Xf=$c,Pc=function(e){var t=Jf(e,"string");return Xf(t)?t:t+""},qf=Y,Qf=Sc,ed=bc,dr=Me,Vi=Pc,td=TypeError,bn=Object.defineProperty,rd=Object.getOwnPropertyDescriptor,Sn="enumerable",In="configurable",$n="writable";$e.f=qf?ed?function(t,r,n){if(dr(t),r=Vi(r),dr(n),typeof t=="function"&&r==="prototype"&&"value"in n&&$n in n&&!n[$n]){var a=rd(t,r);a&&a[$n]&&(t[r]=n.value,n={configurable:In in n?n[In]:a[In],enumerable:Sn in n?n[Sn]:a[Sn],writable:!1})}return bn(t,r,n)}:bn:function(t,r,n){if(dr(t),r=Vi(r),dr(n),Qf)try{return bn(t,r,n)}catch{}if("get"in n||"set"in n)throw new td("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var nd=Math.ceil,ad=Math.floor,id=Math.trunc||function(t){var r=+t;return(r>0?ad:nd)(r)},od=id,Za=function(e){var t=+e;return t!==t||t===0?0:od(t)},sd=Za,cd=Math.max,ud=Math.min,ld=function(e,t){var r=sd(e);return r<0?cd(r+t,0):ud(r,t)},fd=Za,dd=Math.min,hd=function(e){var t=fd(e);return t>0?dd(t,9007199254740991):0},vd=hd,Tc=function(e){return vd(e.length)},pd=rr,md=ld,gd=Tc,Zi=function(e){return function(t,r,n){var a=pd(t),i=gd(a);if(i===0)return!e&&-1;var o=md(n,i),c;if(e&&r!==r){for(;i>o;)if(c=a[o++],c!==c)return!0}else for(;i>o;o++)if((e||o in a)&&a[o]===r)return e||o||0;return!e&&-1}},yd={includes:Zi(!0),indexOf:Zi(!1)},Ya={},wd=K,kn=ye,bd=rr,Sd=yd.indexOf,Id=Ya,Yi=wd([].push),Ec=function(e,t){var r=bd(e),n=0,a=[],i;for(i in r)!kn(Id,i)&&kn(r,i)&&Yi(a,i);for(;t.length>n;)kn(r,i=t[n++])&&(~Sd(a,i)||Yi(a,i));return a},Ja=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],$d=Ec,kd=Ja,Oc=Object.keys||function(t){return $d(t,kd)},Pd=Y,Td=bc,Ed=$e,Od=Me,_d=rr,Rd=Oc;wc.f=Pd&&!Td?Object.defineProperties:function(t,r){Od(t);for(var n=_d(r),a=Rd(r),i=a.length,o=0,c;i>o;)Ed.f(t,c=a[o++],n[c]);return t};var Cd=Tt,jd=Cd("document","documentElement"),Ad=vc,Ld=pc,Ji=Ad("keys"),Xa=function(e){return Ji[e]||(Ji[e]=Ld(e))},Ud=Me,xd=wc,Xi=Ja,Nd=Ya,Dd=jd,Md=Wa,Fd=Xa,qi=">",Qi="<",ha="prototype",va="script",_c=Fd("IE_PROTO"),Pn=function(){},Rc=function(e){return Qi+va+qi+e+Qi+"/"+va+qi},eo=function(e){e.write(Rc("")),e.close();var t=e.parentWindow.Object;return e=null,t},zd=function(){var e=Md("iframe"),t="java"+va+":",r;return e.style.display="none",Dd.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(Rc("document.F=Object")),r.close(),r.F},hr,Cr=function(){try{hr=new ActiveXObject("htmlfile")}catch{}Cr=typeof document<"u"?document.domain&&hr?eo(hr):zd():eo(hr);for(var e=Xi.length;e--;)delete Cr[ha][Xi[e]];return Cr()};Nd[_c]=!0;var qa=Object.create||function(t,r){var n;return t!==null?(Pn[ha]=Ud(t),n=new Pn,Pn[ha]=null,n[_c]=t):n=Cr(),r===void 0?n:xd.f(n,r)},Hd=fe,Bd=qa,Kd=$e.f,pa=Hd("unscopables"),ma=Array.prototype;ma[pa]===void 0&&Kd(ma,pa,{configurable:!0,value:Bd(null)});var Gd=function(e){ma[pa][e]=!0},nr={},Wd=q,Vd=Z,to=Wd.WeakMap,Zd=Vd(to)&&/native code/.test(String(to)),ar=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},Yd=Y,Jd=$e,Xd=ar,qr=Yd?function(e,t,r){return Jd.f(e,t,Xd(1,r))}:function(e,t,r){return e[t]=r,e},qd=Zd,Cc=q,Qd=Re,eh=qr,Tn=ye,En=Ga,th=Xa,rh=Ya,ro="Object already initialized",ga=Cc.TypeError,nh=Cc.WeakMap,Dr,er,Mr,ah=function(e){return Mr(e)?er(e):Dr(e,{})},ih=function(e){return function(t){var r;if(!Qd(t)||(r=er(t)).type!==e)throw new ga("Incompatible receiver, "+e+" required");return r}};if(qd||En.state){var we=En.state||(En.state=new nh);we.get=we.get,we.has=we.has,we.set=we.set,Dr=function(e,t){if(we.has(e))throw new ga(ro);return t.facade=e,we.set(e,t),t},er=function(e){return we.get(e)||{}},Mr=function(e){return we.has(e)}}else{var at=th("state");rh[at]=!0,Dr=function(e,t){if(Tn(e,at))throw new ga(ro);return t.facade=e,eh(e,at,t),t},er=function(e){return Tn(e,at)?e[at]:{}},Mr=function(e){return Tn(e,at)}}var ir={set:Dr,get:er,has:Mr,enforce:ah,getterFor:ih},Qa={},ei={},jc={}.propertyIsEnumerable,Ac=Object.getOwnPropertyDescriptor,oh=Ac&&!jc.call({1:2},1);ei.f=oh?function(t){var r=Ac(this,t);return!!r&&r.enumerable}:jc;var sh=Y,ch=ke,uh=ei,lh=ar,fh=rr,dh=Pc,hh=ye,vh=Sc,no=Object.getOwnPropertyDescriptor;Qa.f=sh?no:function(t,r){if(t=fh(t),r=dh(r),vh)try{return no(t,r)}catch{}if(hh(t,r))return lh(!ch(uh.f,t,r),t[r])};var Lc={exports:{}},ya=Y,ph=ye,Uc=Function.prototype,mh=ya&&Object.getOwnPropertyDescriptor,ti=ph(Uc,"name"),gh=ti&&(function(){}).name==="something",yh=ti&&(!ya||ya&&mh(Uc,"name").configurable),xc={EXISTS:ti,PROPER:gh,CONFIGURABLE:yh},wh=K,bh=Z,wa=Ga,Sh=wh(Function.toString);bh(wa.inspectSource)||(wa.inspectSource=function(e){return Sh(e)});var Nc=wa.inspectSource,ri=K,Ih=re,$h=Z,vr=ye,ba=Y,kh=xc.CONFIGURABLE,Ph=Nc,Dc=ir,Th=Dc.enforce,Eh=Dc.get,ao=String,jr=Object.defineProperty,Oh=ri("".slice),_h=ri("".replace),Rh=ri([].join),Ch=ba&&!Ih(function(){return jr(function(){},"length",{value:8}).length!==8}),jh=String(String).split("String"),Ah=Lc.exports=function(e,t,r){Oh(ao(t),0,7)==="Symbol("&&(t="["+_h(ao(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!vr(e,"name")||kh&&e.name!==t)&&(ba?jr(e,"name",{value:t,configurable:!0}):e.name=t),Ch&&r&&vr(r,"arity")&&e.length!==r.arity&&jr(e,"length",{value:r.arity});try{r&&vr(r,"constructor")&&r.constructor?ba&&jr(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch{}var n=Th(e);return vr(n,"source")||(n.source=Rh(jh,typeof t=="string"?t:"")),e};Function.prototype.toString=Ah(function(){return $h(this)&&Eh(this).source||Ph(this)},"toString");var Mc=Lc.exports,Lh=Z,Uh=$e,xh=Mc,Nh=Ka,Fe=function(e,t,r,n){n||(n={});var a=n.enumerable,i=n.name!==void 0?n.name:t;if(Lh(r)&&xh(r,i,n),n.global)a?e[t]=r:Nh(t,r);else{try{n.unsafe?e[t]&&(a=!0):delete e[t]}catch{}a?e[t]=r:Uh.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Fc={},Dh=Ec,Mh=Ja,Fh=Mh.concat("length","prototype");Fc.f=Object.getOwnPropertyNames||function(t){return Dh(t,Fh)};var ni={};ni.f=Object.getOwnPropertySymbols;var zh=Tt,Hh=K,Bh=Fc,Kh=ni,Gh=Me,Wh=Hh([].concat),Vh=zh("Reflect","ownKeys")||function(t){var r=Bh.f(Gh(t)),n=Kh.f;return n?Wh(r,n(t)):r},io=ye,Zh=Vh,Yh=Qa,Jh=$e,Xh=function(e,t,r){for(var n=Zh(t),a=Jh.f,i=Yh.f,o=0;o<n.length;o++){var c=n[o];!io(e,c)&&!(r&&io(r,c))&&a(e,c,i(t,c))}},qh=re,Qh=Z,ev=/#|\.prototype\./,or=function(e,t){var r=rv[tv(e)];return r===av?!0:r===nv?!1:Qh(t)?qh(t):!!t},tv=or.normalize=function(e){return String(e).replace(ev,".").toLowerCase()},rv=or.data={},nv=or.NATIVE="N",av=or.POLYFILL="P",iv=or,pr=q,ov=Qa.f,sv=qr,cv=Fe,uv=Ka,lv=Xh,fv=iv,Et=function(e,t){var r=e.target,n=e.global,a=e.stat,i,o,c,l,f,u;if(n?o=pr:a?o=pr[r]||uv(r,{}):o=pr[r]&&pr[r].prototype,o)for(c in t){if(f=t[c],e.dontCallGetSet?(u=ov(o,c),l=u&&u.value):l=o[c],i=fv(n?c:r+(a?".":"#")+c,e.forced),!i&&l!==void 0){if(typeof f==typeof l)continue;lv(f,l)}(e.sham||l&&l.sham)&&sv(f,"sham",!0),cv(o,c,f,e)}},dv=re,hv=!dv(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),vv=ye,pv=Z,mv=Jr,gv=Xa,yv=hv,oo=gv("IE_PROTO"),Sa=Object,wv=Sa.prototype,zc=yv?Sa.getPrototypeOf:function(e){var t=mv(e);if(vv(t,oo))return t[oo];var r=t.constructor;return pv(r)&&t instanceof r?r.prototype:t instanceof Sa?wv:null},bv=re,Sv=Z,Iv=Re,so=zc,$v=Fe,kv=fe,Ia=kv("iterator"),Hc=!1,Qe,On,_n;[].keys&&(_n=[].keys(),"next"in _n?(On=so(so(_n)),On!==Object.prototype&&(Qe=On)):Hc=!0);var Pv=!Iv(Qe)||bv(function(){var e={};return Qe[Ia].call(e)!==e});Pv&&(Qe={});Sv(Qe[Ia])||$v(Qe,Ia,function(){return this});var Bc={IteratorPrototype:Qe,BUGGY_SAFARI_ITERATORS:Hc},Tv=$e.f,Ev=ye,Ov=fe,co=Ov("toStringTag"),sr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!Ev(e,co)&&Tv(e,co,{configurable:!0,value:t})},_v=Bc.IteratorPrototype,Rv=qa,Cv=ar,jv=sr,Av=nr,Lv=function(){return this},Kc=function(e,t,r,n){var a=t+" Iterator";return e.prototype=Rv(_v,{next:Cv(+!n,r)}),jv(e,a,!1),Av[a]=Lv,e},Uv=K,xv=Xr,Nv=function(e,t,r){try{return Uv(xv(Object.getOwnPropertyDescriptor(e,t)[r]))}catch{}},Dv=Re,Mv=function(e){return Dv(e)||e===null},Fv=Mv,zv=String,Hv=TypeError,Bv=function(e){if(Fv(e))return e;throw new Hv("Can't set "+zv(e)+" as a prototype")},Kv=Nv,Gv=Re,Wv=Yr,Vv=Bv,Zv=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,t={},r;try{r=Kv(Object.prototype,"__proto__","set"),r(t,[]),e=t instanceof Array}catch{}return function(a,i){return Wv(a),Vv(i),Gv(a)&&(e?r(a,i):a.__proto__=i),a}}():void 0),Yv=Et,Jv=ke,Gc=xc,Xv=Z,qv=Kc,uo=zc,lo=Zv,Qv=sr,ep=qr,Rn=Fe,tp=fe,rp=nr,Wc=Bc,np=Gc.PROPER,ap=Gc.CONFIGURABLE,fo=Wc.IteratorPrototype,mr=Wc.BUGGY_SAFARI_ITERATORS,Lt=tp("iterator"),ho="keys",Ut="values",vo="entries",ip=function(){return this},Vc=function(e,t,r,n,a,i,o){qv(r,t,n);var c=function($){if($===a&&d)return d;if(!mr&&$&&$ in u)return u[$];switch($){case ho:return function(){return new r(this,$)};case Ut:return function(){return new r(this,$)};case vo:return function(){return new r(this,$)}}return function(){return new r(this)}},l=t+" Iterator",f=!1,u=e.prototype,s=u[Lt]||u["@@iterator"]||a&&u[a],d=!mr&&s||c(a),h=t==="Array"&&u.entries||s,m,S,g;if(h&&(m=uo(h.call(new e)),m!==Object.prototype&&m.next&&(uo(m)!==fo&&(lo?lo(m,fo):Xv(m[Lt])||Rn(m,Lt,ip)),Qv(m,l,!0))),np&&a===Ut&&s&&s.name!==Ut&&(ap?ep(u,"name",Ut):(f=!0,d=function(){return Jv(s,this)})),a)if(S={values:c(Ut),keys:i?d:c(ho),entries:c(vo)},o)for(g in S)(mr||f||!(g in u))&&Rn(u,g,S[g]);else Yv({target:t,proto:!0,forced:mr||f},S);return u[Lt]!==d&&Rn(u,Lt,d,{name:a}),rp[t]=d,S},ai=function(e,t){return{value:e,done:t}},op=rr,ii=Gd,po=nr,Zc=ir,sp=$e.f,cp=Vc,gr=ai,up=Y,Yc="Array Iterator",lp=Zc.set,fp=Zc.getterFor(Yc),dp=cp(Array,"Array",function(e,t){lp(this,{type:Yc,target:op(e),index:0,kind:t})},function(){var e=fp(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=void 0,gr(void 0,!0);switch(e.kind){case"keys":return gr(r,!1);case"values":return gr(t[r],!1)}return gr([r,t[r]],!1)},"values"),mo=po.Arguments=po.Array;ii("keys");ii("values");ii("entries");if(up&&mo.name!=="values")try{sp(mo,"name",{value:"values"})}catch{}var go=q,hp=Y,vp=Object.getOwnPropertyDescriptor,pp=function(e){if(!hp)return go[e];var t=vp(go,e);return t&&t.value},mp=re,gp=fe,yp=Y,yo=Hl,wp=gp("iterator"),Qr=!mp(function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach(function(a,i){t.delete("b"),n+=i+a}),r.delete("a",2),r.delete("b",void 0),yo&&(!e.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!t.size&&(yo||!yp)||!t.sort||e.href!=="http://a/c%20d?a=1&c=3"||t.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!t[wp]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"||n!=="a1c3"||new URL("http://x",void 0).host!=="x"}),wo=Mc,bp=$e,oi=function(e,t,r){return r.get&&wo(r.get,t,{getter:!0}),r.set&&wo(r.set,t,{setter:!0}),bp.f(e,t,r)},Sp=Fe,Ip=function(e,t,r){for(var n in t)Sp(e,n,t[n],r);return e},$p=Ic,kp=TypeError,Jc=function(e,t){if($p(t,e))return e;throw new kp("Incorrect invocation")},Pp=Ha,Tp=K,Ep=function(e){if(Pp(e)==="Function")return Tp(e)},bo=Ep,Op=Xr,_p=za,Rp=bo(bo.bind),si=function(e,t){return Op(e),t===void 0?e:_p?Rp(e,t):function(){return e.apply(t,arguments)}},Cp=fe,jp=Cp("toStringTag"),Xc={};Xc[jp]="z";var Ap=String(Xc)==="[object z]",Lp=Ap,Up=Z,Ar=Ha,xp=fe,Np=xp("toStringTag"),Dp=Object,Mp=Ar(function(){return arguments}())==="Arguments",Fp=function(e,t){try{return e[t]}catch{}},en=Lp?Ar:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=Fp(t=Dp(e),Np))=="string"?r:Mp?Ar(t):(n=Ar(t))==="Object"&&Up(t.callee)?"Arguments":n},zp=en,Hp=String,ze=function(e){if(zp(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Hp(e)},Bp=en,So=Va,Kp=Ba,Gp=nr,Wp=fe,Vp=Wp("iterator"),ci=function(e){if(!Kp(e))return So(e,Vp)||So(e,"@@iterator")||Gp[Bp(e)]},Zp=ke,Yp=Xr,Jp=Me,Xp=kc,qp=ci,Qp=TypeError,qc=function(e,t){var r=arguments.length<2?qp(e):t;if(Yp(r))return Jp(Zp(r,e));throw new Qp(Xp(e)+" is not iterable")},em=TypeError,Ot=function(e,t){if(e<t)throw new em("Not enough arguments");return e},tm=K,Qc=tm([].slice),Io=Qc,rm=Math.floor,$a=function(e,t){var r=e.length;if(r<8)for(var n=1,a,i;n<r;){for(i=n,a=e[n];i&&t(e[i-1],a)>0;)e[i]=e[--i];i!==n++&&(e[i]=a)}else for(var o=rm(r/2),c=$a(Io(e,0,o),t),l=$a(Io(e,o),t),f=c.length,u=l.length,s=0,d=0;s<f||d<u;)e[s+d]=s<f&&d<u?t(c[s],l[d])<=0?c[s++]:l[d++]:s<f?c[s++]:l[d++];return e},nm=$a,ka=Et,tn=q,ui=pp,yr=ke,Ie=K,Wt=Y,eu=Qr,tu=Fe,am=oi,im=Ip,om=sr,sm=Kc,li=ir,ru=Jc,Cn=Z,cm=ye,um=si,lm=en,fm=Me,nu=Re,X=ze,dm=qa,$o=ar,ko=qc,hm=ci,wr=ai,it=Ot,vm=fe,pm=nm,mm=vm("iterator"),_t="URLSearchParams",au=_t+"Iterator",iu=li.set,ue=li.getterFor(_t),gm=li.getterFor(au),Po=ui("fetch"),Fr=ui("Request"),Vt=ui("Headers"),jn=Fr&&Fr.prototype,To=Vt&&Vt.prototype,ym=tn.RegExp,wm=tn.TypeError,ou=tn.decodeURIComponent,bm=tn.encodeURIComponent,Sm=Ie("".charAt),Eo=Ie([].join),Ze=Ie([].push),Pa=Ie("".replace),Im=Ie([].shift),Oo=Ie([].splice),_o=Ie("".split),$m=Ie("".slice),km=/\+/g,Ro=Array(4),Pm=function(e){return Ro[e-1]||(Ro[e-1]=ym("((?:%[\\da-f]{2}){"+e+"})","gi"))},Tm=function(e){try{return ou(e)}catch{return e}},Co=function(e){var t=Pa(e,km," "),r=4;try{return ou(t)}catch{for(;r;)t=Pa(t,Pm(r--),Tm);return t}},Em=/[!'()~]|%20/g,Om={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},_m=function(e){return Om[e]},jo=function(e){return Pa(bm(e),Em,_m)},An=sm(function(t,r){iu(this,{type:au,target:ue(t).entries,index:0,kind:r})},_t,function(){var t=gm(this),r=t.target,n=t.index++;if(!r||n>=r.length)return t.target=void 0,wr(void 0,!0);var a=r[n];switch(t.kind){case"keys":return wr(a.key,!1);case"values":return wr(a.value,!1)}return wr([a.key,a.value],!1)},!0),su=function(e){this.entries=[],this.url=null,e!==void 0&&(nu(e)?this.parseObject(e):this.parseQuery(typeof e=="string"?Sm(e,0)==="?"?$m(e,1):e:X(e)))};su.prototype={type:_t,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t=this.entries,r=hm(e),n,a,i,o,c,l,f;if(r)for(n=ko(e,r),a=n.next;!(i=yr(a,n)).done;){if(o=ko(fm(i.value)),c=o.next,(l=yr(c,o)).done||(f=yr(c,o)).done||!yr(c,o).done)throw new wm("Expected sequence with length 2");Ze(t,{key:X(l.value),value:X(f.value)})}else for(var u in e)cm(e,u)&&Ze(t,{key:u,value:X(e[u])})},parseQuery:function(e){if(e)for(var t=this.entries,r=_o(e,"&"),n=0,a,i;n<r.length;)a=r[n++],a.length&&(i=_o(a,"="),Ze(t,{key:Co(Im(i)),value:Co(Eo(i,"="))}))},serialize:function(){for(var e=this.entries,t=[],r=0,n;r<e.length;)n=e[r++],Ze(t,jo(n.key)+"="+jo(n.value));return Eo(t,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var rn=function(){ru(this,wt);var t=arguments.length>0?arguments[0]:void 0,r=iu(this,new su(t));Wt||(this.size=r.entries.length)},wt=rn.prototype;im(wt,{append:function(t,r){var n=ue(this);it(arguments.length,2),Ze(n.entries,{key:X(t),value:X(r)}),Wt||this.length++,n.updateURL()},delete:function(e){for(var t=ue(this),r=it(arguments.length,1),n=t.entries,a=X(e),i=r<2?void 0:arguments[1],o=i===void 0?i:X(i),c=0;c<n.length;){var l=n[c];if(l.key===a&&(o===void 0||l.value===o)){if(Oo(n,c,1),o!==void 0)break}else c++}Wt||(this.size=n.length),t.updateURL()},get:function(t){var r=ue(this).entries;it(arguments.length,1);for(var n=X(t),a=0;a<r.length;a++)if(r[a].key===n)return r[a].value;return null},getAll:function(t){var r=ue(this).entries;it(arguments.length,1);for(var n=X(t),a=[],i=0;i<r.length;i++)r[i].key===n&&Ze(a,r[i].value);return a},has:function(t){for(var r=ue(this).entries,n=it(arguments.length,1),a=X(t),i=n<2?void 0:arguments[1],o=i===void 0?i:X(i),c=0;c<r.length;){var l=r[c++];if(l.key===a&&(o===void 0||l.value===o))return!0}return!1},set:function(t,r){var n=ue(this);it(arguments.length,1);for(var a=n.entries,i=!1,o=X(t),c=X(r),l=0,f;l<a.length;l++)f=a[l],f.key===o&&(i?Oo(a,l--,1):(i=!0,f.value=c));i||Ze(a,{key:o,value:c}),Wt||(this.size=a.length),n.updateURL()},sort:function(){var t=ue(this);pm(t.entries,function(r,n){return r.key>n.key?1:-1}),t.updateURL()},forEach:function(t){for(var r=ue(this).entries,n=um(t,arguments.length>1?arguments[1]:void 0),a=0,i;a<r.length;)i=r[a++],n(i.value,i.key,this)},keys:function(){return new An(this,"keys")},values:function(){return new An(this,"values")},entries:function(){return new An(this,"entries")}},{enumerable:!0});tu(wt,mm,wt.entries,{name:"entries"});tu(wt,"toString",function(){return ue(this).serialize()},{enumerable:!0});Wt&&am(wt,"size",{get:function(){return ue(this).entries.length},configurable:!0,enumerable:!0});om(rn,_t);ka({global:!0,constructor:!0,forced:!eu},{URLSearchParams:rn});if(!eu&&Cn(Vt)){var Rm=Ie(To.has),Cm=Ie(To.set),Ao=function(e){if(nu(e)){var t=e.body,r;if(lm(t)===_t)return r=e.headers?new Vt(e.headers):new Vt,Rm(r,"content-type")||Cm(r,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),dm(e,{body:$o(0,X(t)),headers:$o(0,r)})}return e};if(Cn(Po)&&ka({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return Po(t,arguments.length>1?Ao(arguments[1]):{})}}),Cn(Fr)){var Ln=function(t){return ru(this,jn),new Fr(t,arguments.length>1?Ao(arguments[1]):{})};jn.constructor=Ln,Ln.prototype=jn,ka({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ln})}}var jm={URLSearchParams:rn,getState:ue},Am=Fe,nn=K,Lo=ze,Lm=Ot,cu=URLSearchParams,an=cu.prototype,Um=nn(an.append),Uo=nn(an.delete),xm=nn(an.forEach),Nm=nn([].push),fi=new cu("a=1&a=2&b=3");fi.delete("a",1);fi.delete("b",void 0);fi+""!="a=2"&&Am(an,"delete",function(e){var t=arguments.length,r=t<2?void 0:arguments[1];if(t&&r===void 0)return Uo(this,e);var n=[];xm(this,function(s,d){Nm(n,{key:d,value:s})}),Lm(t,1);for(var a=Lo(e),i=Lo(r),o=0,c=0,l=!1,f=n.length,u;o<f;)u=n[o++],l||u.key===a?(l=!0,Uo(this,u.key)):c++;for(;c<f;)u=n[c++],u.key===a&&u.value===i||Um(this,u.key,u.value)},{enumerable:!0,unsafe:!0});var Dm=Fe,uu=K,Mm=ze,Fm=Ot,lu=URLSearchParams,di=lu.prototype,zm=uu(di.getAll),Hm=uu(di.has),xo=new lu("a=1");(xo.has("a",2)||!xo.has("a",void 0))&&Dm(di,"has",function(t){var r=arguments.length,n=r<2?void 0:arguments[1];if(r&&n===void 0)return Hm(this,t);var a=zm(this,t);Fm(r,1);for(var i=Mm(n),o=0;o<a.length;)if(a[o++]===i)return!0;return!1},{enumerable:!0,unsafe:!0});var Bm=Y,Km=K,Gm=oi,Ta=URLSearchParams.prototype,Wm=Km(Ta.forEach);Bm&&!("size"in Ta)&&Gm(Ta,"size",{get:function(){var t=0;return Wm(this,function(){t++}),t},configurable:!0,enumerable:!0});var Vm=q,fu=Vm,Zm=fu;Zm.URLSearchParams;var hi=K,Ym=Za,Jm=ze,Xm=Yr,qm=hi("".charAt),No=hi("".charCodeAt),Qm=hi("".slice),Do=function(e){return function(t,r){var n=Jm(Xm(t)),a=Ym(r),i=n.length,o,c;return a<0||a>=i?e?"":void 0:(o=No(n,a),o<55296||o>56319||a+1===i||(c=No(n,a+1))<56320||c>57343?e?qm(n,a):o:e?Qm(n,a,a+2):(o-55296<<10)+(c-56320)+65536)}},du={codeAt:Do(!1),charAt:Do(!0)},eg=du.charAt,tg=ze,hu=ir,rg=Vc,Mo=ai,vu="String Iterator",ng=hu.set,ag=hu.getterFor(vu);rg(String,"String",function(e){ng(this,{type:vu,string:tg(e),index:0})},function(){var t=ag(this),r=t.string,n=t.index,a;return n>=r.length?Mo(void 0,!0):(a=eg(r,n),t.index+=a.length,Mo(a,!1))});var Fo=Y,ig=K,og=ke,sg=re,Un=Oc,cg=ni,ug=ei,lg=Jr,fg=dc,ot=Object.assign,zo=Object.defineProperty,dg=ig([].concat),hg=!ot||sg(function(){if(Fo&&ot({b:1},ot(zo({},"a",{enumerable:!0,get:function(){zo(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(a){t[a]=a}),ot({},e)[r]!==7||Un(ot({},t)).join("")!==n})?function(t,r){for(var n=lg(t),a=arguments.length,i=1,o=cg.f,c=ug.f;a>i;)for(var l=fg(arguments[i++]),f=o?dg(Un(l),o(l)):Un(l),u=f.length,s=0,d;u>s;)d=f[s++],(!Fo||og(c,l,d))&&(n[d]=l[d]);return n}:ot,vg=ke,Ho=Me,pg=Va,mg=function(e,t,r){var n,a;Ho(e);try{if(n=pg(e,"return"),!n){if(t==="throw")throw r;return r}n=vg(n,e)}catch(i){a=!0,n=i}if(t==="throw")throw r;if(a)throw n;return Ho(n),r},gg=Me,yg=mg,wg=function(e,t,r,n){try{return n?t(gg(r)[0],r[1]):t(r)}catch(a){yg(e,"throw",a)}},bg=fe,Sg=nr,Ig=bg("iterator"),$g=Array.prototype,kg=function(e){return e!==void 0&&(Sg.Array===e||$g[Ig]===e)},Pg=K,Tg=re,pu=Z,Eg=en,Og=Tt,_g=Nc,mu=function(){},gu=Og("Reflect","construct"),vi=/^\s*(?:class|function)\b/,Rg=Pg(vi.exec),Cg=!vi.test(mu),xt=function(t){if(!pu(t))return!1;try{return gu(mu,[],t),!0}catch{return!1}},yu=function(t){if(!pu(t))return!1;switch(Eg(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Cg||!!Rg(vi,_g(t))}catch{return!0}};yu.sham=!0;var jg=!gu||Tg(function(){var e;return xt(xt.call)||!xt(Object)||!xt(function(){e=!0})||e})?yu:xt,Ag=Y,Lg=$e,Ug=ar,xg=function(e,t,r){Ag?Lg.f(e,t,Ug(0,r)):e[t]=r},Ng=si,Dg=ke,Mg=Jr,Fg=wg,zg=kg,Hg=jg,Bg=Tc,Bo=xg,Kg=qc,Gg=ci,Ko=Array,Wg=function(t){var r=Mg(t),n=Hg(this),a=arguments.length,i=a>1?arguments[1]:void 0,o=i!==void 0;o&&(i=Ng(i,a>2?arguments[2]:void 0));var c=Gg(r),l=0,f,u,s,d,h,m;if(c&&!(this===Ko&&zg(c)))for(u=n?new this:[],d=Kg(r,c),h=d.next;!(s=Dg(h,d)).done;l++)m=o?Fg(d,i,[s.value,l],!0):s.value,Bo(u,l,m);else for(f=Bg(r),u=n?new this(f):Ko(f);f>l;l++)m=o?i(r[l],l):r[l],Bo(u,l,m);return u.length=l,u},nt=K,xn=2147483647,Zt=36,wu=1,Ea=26,Vg=38,Zg=700,Yg=72,Jg=128,Xg="-",qg=/[^\0-\u007E]/,bu=/[.\u3002\uFF0E\uFF61]/g,Go="Overflow: input needs wider integers to process",Nn=Zt-wu,Wo=RangeError,Qg=nt(bu.exec),ht=Math.floor,Dn=String.fromCharCode,Vo=nt("".charCodeAt),Su=nt([].join),Ue=nt([].push),ey=nt("".replace),ty=nt("".split),ry=nt("".toLowerCase),ny=function(e){for(var t=[],r=0,n=e.length;r<n;){var a=Vo(e,r++);if(a>=55296&&a<=56319&&r<n){var i=Vo(e,r++);(i&64512)===56320?Ue(t,((a&1023)<<10)+(i&1023)+65536):(Ue(t,a),r--)}else Ue(t,a)}return t},Zo=function(e){return e+22+75*(e<26)},ay=function(e,t,r){var n=0;for(e=r?ht(e/Zg):e>>1,e+=ht(e/t);e>Nn*Ea>>1;)e=ht(e/Nn),n+=Zt;return ht(n+(Nn+1)*e/(e+Vg))},iy=function(e){var t=[];e=ny(e);var r=e.length,n=Jg,a=0,i=Yg,o,c;for(o=0;o<e.length;o++)c=e[o],c<128&&Ue(t,Dn(c));var l=t.length,f=l;for(l&&Ue(t,Xg);f<r;){var u=xn;for(o=0;o<e.length;o++)c=e[o],c>=n&&c<u&&(u=c);var s=f+1;if(u-n>ht((xn-a)/s))throw new Wo(Go);for(a+=(u-n)*s,n=u,o=0;o<e.length;o++){if(c=e[o],c<n&&++a>xn)throw new Wo(Go);if(c===n){for(var d=a,h=Zt;;){var m=h<=i?wu:h>=i+Ea?Ea:h-i;if(d<m)break;var S=d-m,g=Zt-m;Ue(t,Dn(Zo(m+S%g))),d=ht(S/g),h+=Zt}Ue(t,Dn(Zo(d))),i=ay(a,s,f===l),a=0,f++}}a++,n++}return Su(t,"")},oy=function(e){var t=[],r=ty(ey(ry(e),bu,"."),"."),n,a;for(n=0;n<r.length;n++)a=r[n],Ue(t,Qg(qg,a)?"xn--"+iy(a):a);return Su(t,".")},sy=Et,pi=Y,cy=Qr,mi=q,Yo=si,de=K,zr=Fe,oe=oi,uy=Jc,Oa=ye,gi=hg,st=Wg,he=Qc,ly=du.codeAt,fy=oy,Te=ze,dy=sr,hy=Ot,Iu=jm,$u=ir,vy=$u.set,Hr=$u.getterFor("URL"),py=Iu.URLSearchParams,my=Iu.getState,Nt=mi.URL,_a=mi.TypeError,Br=mi.parseInt,gy=Math.floor,Jo=Math.pow,le=de("".charAt),me=de(/./.exec),Ht=de([].join),yy=de(1 .toString),wy=de([].pop),lt=de([].push),Mn=de("".replace),by=de([].shift),Sy=de("".split),Yt=de("".slice),Kr=de("".toLowerCase),Iy=de([].unshift),$y="Invalid authority",Fn="Invalid scheme",Be="Invalid host",Xo="Invalid port",ku=/[a-z]/i,ky=/[\d+-.a-z]/i,Ra=/\d/,Py=/^0x/i,Ty=/^[0-7]+$/,Ey=/^\d+$/,Pu=/^[\da-f]+$/i,Oy=/[\0\t\n\r #%/:<>?@[\\\]^|]/,_y=/[\0\t\n\r #/:<>?@[\\\]^|]/,Ry=/^[\u0000-\u0020]+/,Cy=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,jy=/[\t\n\r]/g,se,Ay=function(e){var t=Sy(e,"."),r,n,a,i,o,c,l;if(t.length&&t[t.length-1]===""&&t.length--,r=t.length,r>4)return e;for(n=[],a=0;a<r;a++){if(i=t[a],i==="")return e;if(o=10,i.length>1&&le(i,0)==="0"&&(o=me(Py,i)?16:8,i=Yt(i,o===8?1:2)),i==="")c=0;else{if(!me(o===10?Ey:o===8?Ty:Pu,i))return e;c=Br(i,o)}lt(n,c)}for(a=0;a<r;a++)if(c=n[a],a===r-1){if(c>=Jo(256,5-r))return null}else if(c>255)return null;for(l=wy(n),a=0;a<n.length;a++)l+=n[a]*Jo(256,3-a);return l},Ly=function(e){var t=[0,0,0,0,0,0,0,0],r=0,n=null,a=0,i,o,c,l,f,u,s,d=function(){return le(e,a)};if(d()===":"){if(le(e,1)!==":")return;a+=2,r++,n=r}for(;d();){if(r===8)return;if(d()===":"){if(n!==null)return;a++,r++,n=r;continue}for(i=o=0;o<4&&me(Pu,d());)i=i*16+Br(d(),16),a++,o++;if(d()==="."){if(o===0||(a-=o,r>6))return;for(c=0;d();){if(l=null,c>0)if(d()==="."&&c<4)a++;else return;if(!me(Ra,d()))return;for(;me(Ra,d());){if(f=Br(d(),10),l===null)l=f;else{if(l===0)return;l=l*10+f}if(l>255)return;a++}t[r]=t[r]*256+l,c++,(c===2||c===4)&&r++}if(c!==4)return;break}else if(d()===":"){if(a++,!d())return}else if(d())return;t[r++]=i}if(n!==null)for(u=r-n,r=7;r!==0&&u>0;)s=t[r],t[r--]=t[n+u-1],t[n+--u]=s;else if(r!==8)return;return t},Uy=function(e){for(var t=null,r=1,n=null,a=0,i=0;i<8;i++)e[i]!==0?(a>r&&(t=n,r=a),n=null,a=0):(n===null&&(n=i),++a);return a>r&&(t=n,r=a),t},Dt=function(e){var t,r,n,a;if(typeof e=="number"){for(t=[],r=0;r<4;r++)Iy(t,e%256),e=gy(e/256);return Ht(t,".")}else if(typeof e=="object"){for(t="",n=Uy(e),r=0;r<8;r++)a&&e[r]===0||(a&&(a=!1),n===r?(t+=r?":":"::",a=!0):(t+=yy(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},Lr={},Tu=gi({},Lr,{" ":1,'"':1,"<":1,">":1,"`":1}),Eu=gi({},Tu,{"#":1,"?":1,"{":1,"}":1}),zn=gi({},Eu,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Ce=function(e,t){var r=ly(e,0);return r>32&&r<127&&!Oa(t,e)?e:encodeURIComponent(e)},br={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Bt=function(e,t){var r;return e.length===2&&me(ku,le(e,0))&&((r=le(e,1))===":"||!t&&r==="|")},qo=function(e){var t;return e.length>1&&Bt(Yt(e,0,2))&&(e.length===2||(t=le(e,2))==="/"||t==="\\"||t==="?"||t==="#")},xy=function(e){return e==="."||Kr(e)==="%2e"},Ny=function(e){return e=Kr(e),e===".."||e==="%2e."||e===".%2e"||e==="%2e%2e"},Hn={},Qo={},Bn={},es={},ts={},Kn={},rs={},ns={},Sr={},Ir={},Gn={},Wn={},Vn={},Zn={},as={},Yn={},ct={},be={},is={},Ke={},Pe={},yi=function(e,t,r){var n=Te(e),a,i,o;if(t){if(i=this.parse(n),i)throw new _a(i);this.searchParams=null}else{if(r!==void 0&&(a=new yi(r,!0)),i=this.parse(n,null,a),i)throw new _a(i);o=my(new py),o.bindURL(this),this.searchParams=o}};yi.prototype={type:"URL",parse:function(e,t,r){var n=this,a=t||Hn,i=0,o="",c=!1,l=!1,f=!1,u,s,d,h;for(e=Te(e),t||(n.scheme="",n.username="",n.password="",n.host=null,n.port=null,n.path=[],n.query=null,n.fragment=null,n.cannotBeABaseURL=!1,e=Mn(e,Ry,""),e=Mn(e,Cy,"$1")),e=Mn(e,jy,""),u=st(e);i<=u.length;){switch(s=u[i],a){case Hn:if(s&&me(ku,s))o+=Kr(s),a=Qo;else{if(t)return Fn;a=Bn;continue}break;case Qo:if(s&&(me(ky,s)||s==="+"||s==="-"||s==="."))o+=Kr(s);else if(s===":"){if(t&&(n.isSpecial()!==Oa(br,o)||o==="file"&&(n.includesCredentials()||n.port!==null)||n.scheme==="file"&&!n.host))return;if(n.scheme=o,t){n.isSpecial()&&br[n.scheme]===n.port&&(n.port=null);return}o="",n.scheme==="file"?a=Zn:n.isSpecial()&&r&&r.scheme===n.scheme?a=es:n.isSpecial()?a=ns:u[i+1]==="/"?(a=ts,i++):(n.cannotBeABaseURL=!0,lt(n.path,""),a=is)}else{if(t)return Fn;o="",a=Bn,i=0;continue}break;case Bn:if(!r||r.cannotBeABaseURL&&s!=="#")return Fn;if(r.cannotBeABaseURL&&s==="#"){n.scheme=r.scheme,n.path=he(r.path),n.query=r.query,n.fragment="",n.cannotBeABaseURL=!0,a=Pe;break}a=r.scheme==="file"?Zn:Kn;continue;case es:if(s==="/"&&u[i+1]==="/")a=Sr,i++;else{a=Kn;continue}break;case ts:if(s==="/"){a=Ir;break}else{a=be;continue}case Kn:if(n.scheme=r.scheme,s===se)n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=he(r.path),n.query=r.query;else if(s==="/"||s==="\\"&&n.isSpecial())a=rs;else if(s==="?")n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=he(r.path),n.query="",a=Ke;else if(s==="#")n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=he(r.path),n.query=r.query,n.fragment="",a=Pe;else{n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=he(r.path),n.path.length--,a=be;continue}break;case rs:if(n.isSpecial()&&(s==="/"||s==="\\"))a=Sr;else if(s==="/")a=Ir;else{n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,a=be;continue}break;case ns:if(a=Sr,s!=="/"||le(o,i+1)!=="/")continue;i++;break;case Sr:if(s!=="/"&&s!=="\\"){a=Ir;continue}break;case Ir:if(s==="@"){c&&(o="%40"+o),c=!0,d=st(o);for(var m=0;m<d.length;m++){var S=d[m];if(S===":"&&!f){f=!0;continue}var g=Ce(S,zn);f?n.password+=g:n.username+=g}o=""}else if(s===se||s==="/"||s==="?"||s==="#"||s==="\\"&&n.isSpecial()){if(c&&o==="")return $y;i-=st(o).length+1,o="",a=Gn}else o+=s;break;case Gn:case Wn:if(t&&n.scheme==="file"){a=Yn;continue}else if(s===":"&&!l){if(o==="")return Be;if(h=n.parseHost(o),h)return h;if(o="",a=Vn,t===Wn)return}else if(s===se||s==="/"||s==="?"||s==="#"||s==="\\"&&n.isSpecial()){if(n.isSpecial()&&o==="")return Be;if(t&&o===""&&(n.includesCredentials()||n.port!==null))return;if(h=n.parseHost(o),h)return h;if(o="",a=ct,t)return;continue}else s==="["?l=!0:s==="]"&&(l=!1),o+=s;break;case Vn:if(me(Ra,s))o+=s;else if(s===se||s==="/"||s==="?"||s==="#"||s==="\\"&&n.isSpecial()||t){if(o!==""){var $=Br(o,10);if($>65535)return Xo;n.port=n.isSpecial()&&$===br[n.scheme]?null:$,o=""}if(t)return;a=ct;continue}else return Xo;break;case Zn:if(n.scheme="file",s==="/"||s==="\\")a=as;else if(r&&r.scheme==="file")switch(s){case se:n.host=r.host,n.path=he(r.path),n.query=r.query;break;case"?":n.host=r.host,n.path=he(r.path),n.query="",a=Ke;break;case"#":n.host=r.host,n.path=he(r.path),n.query=r.query,n.fragment="",a=Pe;break;default:qo(Ht(he(u,i),""))||(n.host=r.host,n.path=he(r.path),n.shortenPath()),a=be;continue}else{a=be;continue}break;case as:if(s==="/"||s==="\\"){a=Yn;break}r&&r.scheme==="file"&&!qo(Ht(he(u,i),""))&&(Bt(r.path[0],!0)?lt(n.path,r.path[0]):n.host=r.host),a=be;continue;case Yn:if(s===se||s==="/"||s==="\\"||s==="?"||s==="#"){if(!t&&Bt(o))a=be;else if(o===""){if(n.host="",t)return;a=ct}else{if(h=n.parseHost(o),h)return h;if(n.host==="localhost"&&(n.host=""),t)return;o="",a=ct}continue}else o+=s;break;case ct:if(n.isSpecial()){if(a=be,s!=="/"&&s!=="\\")continue}else if(!t&&s==="?")n.query="",a=Ke;else if(!t&&s==="#")n.fragment="",a=Pe;else if(s!==se&&(a=be,s!=="/"))continue;break;case be:if(s===se||s==="/"||s==="\\"&&n.isSpecial()||!t&&(s==="?"||s==="#")){if(Ny(o)?(n.shortenPath(),s!=="/"&&!(s==="\\"&&n.isSpecial())&<(n.path,"")):xy(o)?s!=="/"&&!(s==="\\"&&n.isSpecial())&<(n.path,""):(n.scheme==="file"&&!n.path.length&&Bt(o)&&(n.host&&(n.host=""),o=le(o,0)+":"),lt(n.path,o)),o="",n.scheme==="file"&&(s===se||s==="?"||s==="#"))for(;n.path.length>1&&n.path[0]==="";)by(n.path);s==="?"?(n.query="",a=Ke):s==="#"&&(n.fragment="",a=Pe)}else o+=Ce(s,Eu);break;case is:s==="?"?(n.query="",a=Ke):s==="#"?(n.fragment="",a=Pe):s!==se&&(n.path[0]+=Ce(s,Lr));break;case Ke:!t&&s==="#"?(n.fragment="",a=Pe):s!==se&&(s==="'"&&n.isSpecial()?n.query+="%27":s==="#"?n.query+="%23":n.query+=Ce(s,Lr));break;case Pe:s!==se&&(n.fragment+=Ce(s,Tu));break}i++}},parseHost:function(e){var t,r,n;if(le(e,0)==="["){if(le(e,e.length-1)!=="]"||(t=Ly(Yt(e,1,-1)),!t))return Be;this.host=t}else if(this.isSpecial()){if(e=fy(e),me(Oy,e)||(t=Ay(e),t===null))return Be;this.host=t}else{if(me(_y,e))return Be;for(t="",r=st(e),n=0;n<r.length;n++)t+=Ce(r[n],Lr);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return Oa(br,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;t&&(this.scheme!=="file"||t!==1||!Bt(e[0],!0))&&e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,a=e.host,i=e.port,o=e.path,c=e.query,l=e.fragment,f=t+":";return a!==null?(f+="//",e.includesCredentials()&&(f+=r+(n?":"+n:"")+"@"),f+=Dt(a),i!==null&&(f+=":"+i)):t==="file"&&(f+="//"),f+=e.cannotBeABaseURL?o[0]:o.length?"/"+Ht(o,"/"):"",c!==null&&(f+="?"+c),l!==null&&(f+="#"+l),f},setHref:function(e){var t=this.parse(e);if(t)throw new _a(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if(e==="blob")try{return new bt(e.path[0]).origin}catch{return"null"}return e==="file"||!this.isSpecial()?"null":e+"://"+Dt(this.host)+(t!==null?":"+t:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Te(e)+":",Hn)},getUsername:function(){return this.username},setUsername:function(e){var t=st(Te(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=Ce(t[r],zn)}},getPassword:function(){return this.password},setPassword:function(e){var t=st(Te(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=Ce(t[r],zn)}},getHost:function(){var e=this.host,t=this.port;return e===null?"":t===null?Dt(e):Dt(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Gn)},getHostname:function(){var e=this.host;return e===null?"":Dt(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Wn)},getPort:function(){var e=this.port;return e===null?"":Te(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(e=Te(e),e===""?this.port=null:this.parse(e,Vn))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Ht(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,ct))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){e=Te(e),e===""?this.query=null:(le(e,0)==="?"&&(e=Yt(e,1)),this.query="",this.parse(e,Ke)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){if(e=Te(e),e===""){this.fragment=null;return}le(e,0)==="#"&&(e=Yt(e,1)),this.fragment="",this.parse(e,Pe)},update:function(){this.query=this.searchParams.serialize()||null}};var bt=function(t){var r=uy(this,J),n=hy(arguments.length,1)>1?arguments[1]:void 0,a=vy(r,new yi(t,!1,n));pi||(r.href=a.serialize(),r.origin=a.getOrigin(),r.protocol=a.getProtocol(),r.username=a.getUsername(),r.password=a.getPassword(),r.host=a.getHost(),r.hostname=a.getHostname(),r.port=a.getPort(),r.pathname=a.getPathname(),r.search=a.getSearch(),r.searchParams=a.getSearchParams(),r.hash=a.getHash())},J=bt.prototype,ce=function(e,t){return{get:function(){return Hr(this)[e]()},set:t&&function(r){return Hr(this)[t](r)},configurable:!0,enumerable:!0}};pi&&(oe(J,"href",ce("serialize","setHref")),oe(J,"origin",ce("getOrigin")),oe(J,"protocol",ce("getProtocol","setProtocol")),oe(J,"username",ce("getUsername","setUsername")),oe(J,"password",ce("getPassword","setPassword")),oe(J,"host",ce("getHost","setHost")),oe(J,"hostname",ce("getHostname","setHostname")),oe(J,"port",ce("getPort","setPort")),oe(J,"pathname",ce("getPathname","setPathname")),oe(J,"search",ce("getSearch","setSearch")),oe(J,"searchParams",ce("getSearchParams")),oe(J,"hash",ce("getHash","setHash")));zr(J,"toJSON",function(){return Hr(this).serialize()},{enumerable:!0});zr(J,"toString",function(){return Hr(this).serialize()},{enumerable:!0});if(Nt){var os=Nt.createObjectURL,ss=Nt.revokeObjectURL;os&&zr(bt,"createObjectURL",Yo(os,Nt)),ss&&zr(bt,"revokeObjectURL",Yo(ss,Nt))}dy(bt,"URL");sy({global:!0,constructor:!0,forced:!cy,sham:!pi},{URL:bt});var Dy=Et,My=Tt,Ou=re,Fy=Ot,cs=ze,zy=Qr,wi=My("URL"),Hy=zy&&Ou(function(){wi.canParse()}),By=Ou(function(){return wi.canParse.length!==1});Dy({target:"URL",stat:!0,forced:!Hy||By},{canParse:function(t){var r=Fy(arguments.length,1),n=cs(t),a=r<2||arguments[1]===void 0?void 0:cs(arguments[1]);try{return!!new wi(n,a)}catch{return!1}}});var Ky=Et,Gy=Tt,Wy=Ot,us=ze,Vy=Qr,Zy=Gy("URL");Ky({target:"URL",stat:!0,forced:!Vy},{parse:function(t){var r=Wy(arguments.length,1),n=us(t),a=r<2||arguments[1]===void 0?void 0:us(arguments[1]);try{return new Zy(n,a)}catch{return null}}});var Yy=Et,Jy=ke;Yy({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return Jy(URL.prototype.toString,this)}});var Xy=fu;Xy.URL;var qy={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Qy=Wa,Jn=Qy("span").classList,ls=Jn&&Jn.constructor&&Jn.constructor.prototype,ew=ls===Object.prototype?void 0:ls,fs=q,_u=qy,tw=ew,Kt=dp,ds=qr,rw=sr,nw=fe,Xn=nw("iterator"),qn=Kt.values,Ru=function(e,t){if(e){if(e[Xn]!==qn)try{ds(e,Xn,qn)}catch{e[Xn]=qn}if(rw(e,t,!0),_u[t]){for(var r in Kt)if(e[r]!==Kt[r])try{ds(e,r,Kt[r])}catch{e[r]=Kt[r]}}}};for(var Qn in _u)Ru(fs[Qn]&&fs[Qn].prototype,Qn);Ru(tw,"DOMTokenList");function De(e,t){const r=new CustomEvent(e,{detail:t,bubbles:!0,composed:!0});dispatchEvent(r)}function Se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r}var We=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Si(e,t){return e(t={exports:{}},t.exports),t.exports}var Ge=Si(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(){var a=this;this.locked=new Map,this.addToLocked=function(i,o){var c=a.locked.get(i);c===void 0?o===void 0?a.locked.set(i,[]):a.locked.set(i,[o]):o!==void 0&&(c.unshift(o),a.locked.set(i,c))},this.isLocked=function(i){return a.locked.has(i)},this.lock=function(i){return new Promise(function(o,c){a.isLocked(i)?a.addToLocked(i,o):(a.addToLocked(i),o())})},this.unlock=function(i){var o=a.locked.get(i);if(o!==void 0&&o.length!==0){var c=o.pop();a.locked.set(i,o),c!==void 0&&setTimeout(c,0)}else a.locked.delete(i)}}return n.getInstance=function(){return n.instance===void 0&&(n.instance=new n),n.instance},n}();t.default=function(){return r.getInstance()}});bi(Ge);var aw=bi(Si(function(e,t){var r=We&&We.__awaiter||function(u,s,d,h){return new(d||(d=Promise))(function(m,S){function g(b){try{k(h.next(b))}catch(v){S(v)}}function $(b){try{k(h.throw(b))}catch(v){S(v)}}function k(b){b.done?m(b.value):new d(function(v){v(b.value)}).then(g,$)}k((h=h.apply(u,s||[])).next())})},n=We&&We.__generator||function(u,s){var d,h,m,S,g={label:0,sent:function(){if(1&m[0])throw m[1];return m[1]},trys:[],ops:[]};return S={next:$(0),throw:$(1),return:$(2)},typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function $(k){return function(b){return function(v){if(d)throw new TypeError("Generator is already executing.");for(;g;)try{if(d=1,h&&(m=2&v[0]?h.return:v[0]?h.throw||((m=h.return)&&m.call(h),0):h.next)&&!(m=m.call(h,v[1])).done)return m;switch(h=0,m&&(v=[2&v[0],m.value]),v[0]){case 0:case 1:m=v;break;case 4:return g.label++,{value:v[1],done:!1};case 5:g.label++,h=v[1],v=[0];continue;case 7:v=g.ops.pop(),g.trys.pop();continue;default:if(m=g.trys,!((m=m.length>0&&m[m.length-1])||v[0]!==6&&v[0]!==2)){g=0;continue}if(v[0]===3&&(!m||v[1]>m[0]&&v[1]<m[3])){g.label=v[1];break}if(v[0]===6&&g.label<m[1]){g.label=m[1],m=v;break}if(m&&g.label<m[2]){g.label=m[2],g.ops.push(v);break}m[2]&&g.ops.pop(),g.trys.pop();continue}v=s.call(u,g)}catch(I){v=[6,I],h=0}finally{d=m=0}if(5&v[0])throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}([k,b])}}},a=We;Object.defineProperty(t,"__esModule",{value:!0});var i="browser-tabs-lock-key",o={key:function(u){return r(a,void 0,void 0,function(){return n(this,function(s){throw new Error("Unsupported")})})},getItem:function(u){return r(a,void 0,void 0,function(){return n(this,function(s){throw new Error("Unsupported")})})},clear:function(){return r(a,void 0,void 0,function(){return n(this,function(u){return[2,window.localStorage.clear()]})})},removeItem:function(u){return r(a,void 0,void 0,function(){return n(this,function(s){throw new Error("Unsupported")})})},setItem:function(u,s){return r(a,void 0,void 0,function(){return n(this,function(d){throw new Error("Unsupported")})})},keySync:function(u){return window.localStorage.key(u)},getItemSync:function(u){return window.localStorage.getItem(u)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(u){return window.localStorage.removeItem(u)},setItemSync:function(u,s){return window.localStorage.setItem(u,s)}};function c(u){return new Promise(function(s){return setTimeout(s,u)})}function l(u){for(var s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",d="",h=0;h<u;h++)d+=s[Math.floor(Math.random()*s.length)];return d}var f=function(){function u(s){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+l(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=s,u.waiters===void 0&&(u.waiters=[])}return u.prototype.acquireLock=function(s,d){return d===void 0&&(d=5e3),r(this,void 0,void 0,function(){var h,m,S,g,$,k,b;return n(this,function(v){switch(v.label){case 0:h=Date.now()+l(4),m=Date.now()+d,S=i+"-"+s,g=this.storageHandler===void 0?o:this.storageHandler,v.label=1;case 1:return Date.now()<m?[4,c(30)]:[3,8];case 2:return v.sent(),g.getItemSync(S)!==null?[3,5]:($=this.id+"-"+s+"-"+h,[4,c(Math.floor(25*Math.random()))]);case 3:return v.sent(),g.setItemSync(S,JSON.stringify({id:this.id,iat:h,timeoutKey:$,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,c(30)];case 4:return v.sent(),(k=g.getItemSync(S))!==null&&(b=JSON.parse(k)).id===this.id&&b.iat===h?(this.acquiredIatSet.add(h),this.refreshLockWhileAcquired(S,h),[2,!0]):[3,7];case 5:return u.lockCorrector(this.storageHandler===void 0?o:this.storageHandler),[4,this.waitForSomethingToChange(m)];case 6:v.sent(),v.label=7;case 7:return h=Date.now()+l(4),[3,1];case 8:return[2,!1]}})})},u.prototype.refreshLockWhileAcquired=function(s,d){return r(this,void 0,void 0,function(){var h=this;return n(this,function(m){return setTimeout(function(){return r(h,void 0,void 0,function(){var S,g,$;return n(this,function(k){switch(k.label){case 0:return[4,Ge.default().lock(d)];case 1:return k.sent(),this.acquiredIatSet.has(d)?(S=this.storageHandler===void 0?o:this.storageHandler,(g=S.getItemSync(s))===null?(Ge.default().unlock(d),[2]):(($=JSON.parse(g)).timeRefreshed=Date.now(),S.setItemSync(s,JSON.stringify($)),Ge.default().unlock(d),this.refreshLockWhileAcquired(s,d),[2])):(Ge.default().unlock(d),[2])}})})},1e3),[2]})})},u.prototype.waitForSomethingToChange=function(s){return r(this,void 0,void 0,function(){return n(this,function(d){switch(d.label){case 0:return[4,new Promise(function(h){var m=!1,S=Date.now(),g=!1;function $(){if(g||(window.removeEventListener("storage",$),u.removeFromWaiting($),clearTimeout(k),g=!0),!m){m=!0;var b=50-(Date.now()-S);b>0?setTimeout(h,b):h(null)}}window.addEventListener("storage",$),u.addToWaiting($);var k=setTimeout($,Math.max(0,s-Date.now()))})];case 1:return d.sent(),[2]}})})},u.addToWaiting=function(s){this.removeFromWaiting(s),u.waiters!==void 0&&u.waiters.push(s)},u.removeFromWaiting=function(s){u.waiters!==void 0&&(u.waiters=u.waiters.filter(function(d){return d!==s}))},u.notifyWaiters=function(){u.waiters!==void 0&&u.waiters.slice().forEach(function(s){return s()})},u.prototype.releaseLock=function(s){return r(this,void 0,void 0,function(){return n(this,function(d){switch(d.label){case 0:return[4,this.releaseLock__private__(s)];case 1:return[2,d.sent()]}})})},u.prototype.releaseLock__private__=function(s){return r(this,void 0,void 0,function(){var d,h,m,S;return n(this,function(g){switch(g.label){case 0:return d=this.storageHandler===void 0?o:this.storageHandler,h=i+"-"+s,(m=d.getItemSync(h))===null?[2]:(S=JSON.parse(m)).id!==this.id?[3,2]:[4,Ge.default().lock(S.iat)];case 1:g.sent(),this.acquiredIatSet.delete(S.iat),d.removeItemSync(h),Ge.default().unlock(S.iat),u.notifyWaiters(),g.label=2;case 2:return[2]}})})},u.lockCorrector=function(s){for(var d=Date.now()-5e3,h=s,m=[],S=0;;){var g=h.keySync(S);if(g===null)break;m.push(g),S++}for(var $=!1,k=0;k<m.length;k++){var b=m[k];if(b.includes(i)){var v=h.getItemSync(b);if(v!==null){var I=JSON.parse(v);(I.timeRefreshed===void 0&&I.timeAcquired<d||I.timeRefreshed!==void 0&&I.timeRefreshed<d)&&(h.removeItemSync(b),$=!0)}}}$&&u.notifyWaiters()},u.waiters=void 0,u}();t.default=f}));const iw={timeoutInSeconds:60},Cu={name:"auth0-spa-js",version:"2.1.3"},ju=()=>Date.now();let ne=class Ca extends Error{constructor(t,r){super(r),this.error=t,this.error_description=r,Object.setPrototypeOf(this,Ca.prototype)}static fromPayload({error:t,error_description:r}){return new Ca(t,r)}},ow=class Au extends ne{constructor(t,r,n,a=null){super(t,r),this.state=n,this.appState=a,Object.setPrototypeOf(this,Au.prototype)}},ja=class Lu extends ne{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,Lu.prototype)}},sw=class Uu extends ja{constructor(t){super(),this.popup=t,Object.setPrototypeOf(this,Uu.prototype)}},cw=class xu extends ne{constructor(t){super("cancelled","Popup closed"),this.popup=t,Object.setPrototypeOf(this,xu.prototype)}},uw=class Nu extends ne{constructor(t,r,n){super(t,r),this.mfa_token=n,Object.setPrototypeOf(this,Nu.prototype)}},Du=class Mu extends ne{constructor(t,r){super("missing_refresh_token",`Missing Refresh Token (audience: '${hs(t,["default"])}', scope: '${hs(r)}')`),this.audience=t,this.scope=r,Object.setPrototypeOf(this,Mu.prototype)}};function hs(e,t=[]){return e&&!t.includes(e)?e:""}const Ur=()=>window.crypto,ea=()=>{const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let t="";return Array.from(Ur().getRandomValues(new Uint8Array(43))).forEach(r=>t+=e[r%e.length]),t},vs=e=>btoa(e),Aa=e=>{var{clientId:t}=e,r=Se(e,["clientId"]);return new URLSearchParams((n=>Object.keys(n).filter(a=>n[a]!==void 0).reduce((a,i)=>Object.assign(Object.assign({},a),{[i]:n[i]}),{}))(Object.assign({client_id:t},r))).toString()},ps=e=>(t=>decodeURIComponent(atob(t).split("").map(r=>"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),lw=async(e,t)=>{const r=await fetch(e,t);return{ok:r.ok,json:await r.json()}},fw=async(e,t,r)=>{const n=new AbortController;let a;return t.signal=n.signal,Promise.race([lw(e,t),new Promise((i,o)=>{a=setTimeout(()=>{n.abort(),o(new Error("Timeout when executing 'fetch'"))},r)})]).finally(()=>{clearTimeout(a)})},dw=async(e,t,r,n,a,i,o)=>{return c={auth:{audience:t,scope:r},timeout:a,fetchUrl:e,fetchOptions:n,useFormData:o},l=i,new Promise(function(f,u){const s=new MessageChannel;s.port1.onmessage=function(d){d.data.error?u(new Error(d.data.error)):f(d.data),s.port1.close()},l.postMessage(c,[s.port2])});var c,l},hw=async(e,t,r,n,a,i,o=1e4)=>a?dw(e,t,r,n,o,a,i):fw(e,n,o);async function vw(e,t){var{baseUrl:r,timeout:n,audience:a,scope:i,auth0Client:o,useFormData:c}=e,l=Se(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);const f=c?Aa(l):JSON.stringify(l);return await async function(u,s,d,h,m,S,g){let $,k=null;for(let C=0;C<3;C++)try{$=await hw(u,d,h,m,S,g,s),k=null;break}catch(F){k=F}if(k)throw k;const b=$.json,{error:v,error_description:I}=b,O=Se(b,["error","error_description"]),{ok:_}=$;if(!_){const C=I||`HTTP error. Unable to fetch ${u}`;throw v==="mfa_required"?new uw(v,C,O.mfa_token):v==="missing_refresh_token"?new Du(d,h):new ne(v||"request_error",C)}return O}(`${r}/oauth/token`,n,a||"default",i,{method:"POST",body:f,headers:{"Content-Type":c?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(o||Cu))}},t,c)}const $r=(...e)=>{return(t=e.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(t))).join(" ");var t};let Ye=class La{constructor(t,r="@@auth0spajs@@",n){this.prefix=r,this.suffix=n,this.clientId=t.clientId,this.scope=t.scope,this.audience=t.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(t){const[r,n,a,i]=t.split("::");return new La({clientId:n,scope:i,audience:a},r)}static fromCacheEntry(t){const{scope:r,audience:n,client_id:a}=t;return new La({scope:r,audience:n,clientId:a})}},pw=class{set(t,r){localStorage.setItem(t,JSON.stringify(r))}get(t){const r=window.localStorage.getItem(t);if(r)try{return JSON.parse(r)}catch{return}}remove(t){localStorage.removeItem(t)}allKeys(){return Object.keys(window.localStorage).filter(t=>t.startsWith("@@auth0spajs@@"))}},Fu=class{constructor(){this.enclosedCache=function(){let t={};return{set(r,n){t[r]=n},get(r){const n=t[r];if(n)return n},remove(r){delete t[r]},allKeys:()=>Object.keys(t)}}()}},mw=class{constructor(t,r,n){this.cache=t,this.keyManifest=r,this.nowProvider=n||ju}async setIdToken(t,r,n){var a;const i=this.getIdTokenCacheKey(t);await this.cache.set(i,{id_token:r,decodedToken:n}),await((a=this.keyManifest)===null||a===void 0?void 0:a.add(i))}async getIdToken(t){const r=await this.cache.get(this.getIdTokenCacheKey(t.clientId));if(!r&&t.scope&&t.audience){const n=await this.get(t);return!n||!n.id_token||!n.decodedToken?void 0:{id_token:n.id_token,decodedToken:n.decodedToken}}if(r)return{id_token:r.id_token,decodedToken:r.decodedToken}}async get(t,r=0){var n;let a=await this.cache.get(t.toKey());if(!a){const c=await this.getCacheKeys();if(!c)return;const l=this.matchExistingCacheKey(t,c);l&&(a=await this.cache.get(l))}if(!a)return;const i=await this.nowProvider(),o=Math.floor(i/1e3);return a.expiresAt-r<o?a.body.refresh_token?(a.body={refresh_token:a.body.refresh_token},await this.cache.set(t.toKey(),a),a.body):(await this.cache.remove(t.toKey()),void await((n=this.keyManifest)===null||n===void 0?void 0:n.remove(t.toKey()))):a.body}async set(t){var r;const n=new Ye({clientId:t.client_id,scope:t.scope,audience:t.audience}),a=await this.wrapCacheEntry(t);await this.cache.set(n.toKey(),a),await((r=this.keyManifest)===null||r===void 0?void 0:r.add(n.toKey()))}async clear(t){var r;const n=await this.getCacheKeys();n&&(await n.filter(a=>!t||a.includes(t)).reduce(async(a,i)=>{await a,await this.cache.remove(i)},Promise.resolve()),await((r=this.keyManifest)===null||r===void 0?void 0:r.clear()))}async wrapCacheEntry(t){const r=await this.nowProvider();return{body:t,expiresAt:Math.floor(r/1e3)+t.expires_in}}async getCacheKeys(){var t;return this.keyManifest?(t=await this.keyManifest.get())===null||t===void 0?void 0:t.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(t){return new Ye({clientId:t},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(t,r){return r.filter(n=>{var a;const i=Ye.fromKey(n),o=new Set(i.scope&&i.scope.split(" ")),c=((a=t.scope)===null||a===void 0?void 0:a.split(" "))||[],l=i.scope&&c.reduce((f,u)=>f&&o.has(u),!0);return i.prefix==="@@auth0spajs@@"&&i.clientId===t.clientId&&i.audience===t.audience&&l})[0]}},gw=class{constructor(t,r,n){this.storage=t,this.clientId=r,this.cookieDomain=n,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(t){this.storage.save(this.storageKey,t,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}};const Mt=e=>typeof e=="number",yw=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],ww=e=>{if(!e.id_token)throw new Error("ID token is required but missing");const t=(i=>{const o=i.split("."),[c,l,f]=o;if(o.length!==3||!c||!l||!f)throw new Error("ID token could not be decoded");const u=JSON.parse(ps(l)),s={__raw:i},d={};return Object.keys(u).forEach(h=>{s[h]=u[h],yw.includes(h)||(d[h]=u[h])}),{encoded:{header:c,payload:l,signature:f},header:JSON.parse(ps(c)),claims:s,user:d}})(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${e.iss}", found "${t.claims.iss}"`);if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(t.header.alg!=="RS256")throw new Error(`Signature algorithm of "${t.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!t.claims.aud||typeof t.claims.aud!="string"&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but was not one of "${t.claims.aud.join(", ")}"`);if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${e.aud}", found "${t.claims.azp}"`)}}else if(t.claims.aud!==e.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but found "${t.claims.aud}"`);if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${e.nonce}", found "${t.claims.nonce}"`)}if(e.max_age&&!Mt(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(t.claims.exp==null||!Mt(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Mt(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const r=e.leeway||60,n=new Date(e.now||Date.now()),a=new Date(0);if(a.setUTCSeconds(t.claims.exp+r),n>a)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${n}) is after expiration time (${a})`);if(t.claims.nbf!=null&&Mt(t.claims.nbf)){const i=new Date(0);if(i.setUTCSeconds(t.claims.nbf-r),n<i)throw new Error(`Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (${n}) is before ${i}`)}if(t.claims.auth_time!=null&&Mt(t.claims.auth_time)){const i=new Date(0);if(i.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+r),n>i)throw new Error(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (${n}) is after last auth at ${i}`)}if(e.organization){const i=e.organization.trim();if(i.startsWith("org_")){const o=i;if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(o!==t.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${o}", found "${t.claims.org_id}"`)}else{const o=i.toLowerCase();if(!t.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(o!==t.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${o}", found "${t.claims.org_name}"`)}}return t};var Je=Si(function(e,t){var r=We&&We.__assign||function(){return r=Object.assign||function(l){for(var f,u=1,s=arguments.length;u<s;u++)for(var d in f=arguments[u])Object.prototype.hasOwnProperty.call(f,d)&&(l[d]=f[d]);return l},r.apply(this,arguments)};function n(l,f){if(!f)return"";var u="; "+l;return f===!0?u:u+"="+f}function a(l,f,u){return encodeURIComponent(l).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(f).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(s){if(typeof s.expires=="number"){var d=new Date;d.setMilliseconds(d.getMilliseconds()+864e5*s.expires),s.expires=d}return n("Expires",s.expires?s.expires.toUTCString():"")+n("Domain",s.domain)+n("Path",s.path)+n("Secure",s.secure)+n("SameSite",s.sameSite)}(u)}function i(l){for(var f={},u=l?l.split("; "):[],s=/(%[\dA-F]{2})+/gi,d=0;d<u.length;d++){var h=u[d].split("="),m=h.slice(1).join("=");m.charAt(0)==='"'&&(m=m.slice(1,-1));try{f[h[0].replace(s,decodeURIComponent)]=m.replace(s,decodeURIComponent)}catch{}}return f}function o(){return i(document.cookie)}function c(l,f,u){document.cookie=a(l,f,r({path:"/"},u))}t.__esModule=!0,t.encode=a,t.parse=i,t.getAll=o,t.get=function(l){return o()[l]},t.set=c,t.remove=function(l,f){c(l,"",r(r({},f),{expires:-1}))}});bi(Je),Je.encode,Je.parse,Je.getAll;var bw=Je.get,zu=Je.set,Hu=Je.remove;const ft={get(e){const t=bw(e);if(t!==void 0)return JSON.parse(t)},save(e,t,r){let n={};window.location.protocol==="https:"&&(n={secure:!0,sameSite:"none"}),r!=null&&r.daysUntilExpire&&(n.expires=r.daysUntilExpire),r!=null&&r.cookieDomain&&(n.domain=r.cookieDomain),zu(e,JSON.stringify(t),n)},remove(e,t){let r={};t!=null&&t.cookieDomain&&(r.domain=t.cookieDomain),Hu(e,r)}},Sw={get(e){return ft.get(e)||ft.get(`_legacy_${e}`)},save(e,t,r){let n={};window.location.protocol==="https:"&&(n={secure:!0}),r!=null&&r.daysUntilExpire&&(n.expires=r.daysUntilExpire),r!=null&&r.cookieDomain&&(n.domain=r.cookieDomain),zu(`_legacy_${e}`,JSON.stringify(t),n),ft.save(e,t,r)},remove(e,t){let r={};t!=null&&t.cookieDomain&&(r.domain=t.cookieDomain),Hu(e,r),ft.remove(e,t),ft.remove(`_legacy_${e}`,t)}},Iw={get(e){if(typeof sessionStorage>"u")return;const t=sessionStorage.getItem(e);return t!=null?JSON.parse(t):void 0},save(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove(e){sessionStorage.removeItem(e)}};function $w(e,t,r){var n=t===void 0?null:t,a=function(l,f){var u=atob(l);if(f){for(var s=new Uint8Array(u.length),d=0,h=u.length;d<h;++d)s[d]=u.charCodeAt(d);return String.fromCharCode.apply(null,new Uint16Array(s.buffer))}return u}(e,r!==void 0&&r),i=a.indexOf(`
|
|
1
|
+
"use strict";var Ol=Object.defineProperty;var _l=(e,t,r)=>t in e?Ol(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ie=(e,t,r)=>_l(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var lr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},re=function(e){try{return!!e()}catch{return!0}},Rl=re,za=!Rl(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),uc=za,lc=Function.prototype,fa=lc.call,Cl=uc&&lc.bind.bind(fa,fa),K=uc?Cl:function(e){return function(){return fa.apply(e,arguments)}},fc=K,jl=fc({}.toString),Al=fc("".slice),Ha=function(e){return Al(jl(e),8,-1)},Ll=K,Ul=re,xl=Ha,dn=Object,Nl=Ll("".split),dc=Ul(function(){return!dn("z").propertyIsEnumerable(0)})?function(e){return xl(e)==="String"?Nl(e,""):dn(e)}:dn,Ba=function(e){return e==null},Dl=Ba,Ml=TypeError,Yr=function(e){if(Dl(e))throw new Ml("Can't call method on "+e);return e},Fl=dc,zl=Yr,rr=function(e){return Fl(zl(e))},At=function(e){return e&&e.Math===Math&&e},q=At(typeof globalThis=="object"&&globalThis)||At(typeof window=="object"&&window)||At(typeof self=="object"&&self)||At(typeof lr=="object"&&lr)||At(typeof lr=="object"&&lr)||function(){return this}()||Function("return this")(),hc={exports:{}},Hl=!1,Li=q,Bl=Object.defineProperty,Ka=function(e,t){try{Bl(Li,e,{value:t,configurable:!0,writable:!0})}catch{Li[e]=t}return t},Kl=q,Gl=Ka,Ui="__core-js_shared__",xi=hc.exports=Kl[Ui]||Gl(Ui,{});(xi.versions||(xi.versions=[])).push({version:"3.37.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Ga=hc.exports,Ni=Ga,vc=function(e,t){return Ni[e]||(Ni[e]=t||{})},Wl=Yr,Vl=Object,Jr=function(e){return Vl(Wl(e))},Zl=K,Yl=Jr,Jl=Zl({}.hasOwnProperty),ye=Object.hasOwn||function(t,r){return Jl(Yl(t),r)},Xl=K,ql=0,Ql=Math.random(),ef=Xl(1 .toString),pc=function(e){return"Symbol("+(e===void 0?"":e)+")_"+ef(++ql+Ql,36)},tf=typeof navigator<"u"&&String(navigator.userAgent)||"",mc=q,hn=tf,Di=mc.process,Mi=mc.Deno,Fi=Di&&Di.versions||Mi&&Mi.version,zi=Fi&&Fi.v8,pe,Nr;zi&&(pe=zi.split("."),Nr=pe[0]>0&&pe[0]<4?1:+(pe[0]+pe[1]));!Nr&&hn&&(pe=hn.match(/Edge\/(\d+)/),(!pe||pe[1]>=74)&&(pe=hn.match(/Chrome\/(\d+)/),pe&&(Nr=+pe[1])));var rf=Nr,Hi=rf,nf=re,af=q,of=af.String,gc=!!Object.getOwnPropertySymbols&&!nf(function(){var e=Symbol("symbol detection");return!of(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Hi&&Hi<41}),sf=gc,yc=sf&&!Symbol.sham&&typeof Symbol.iterator=="symbol",cf=q,uf=vc,Bi=ye,lf=pc,ff=gc,df=yc,dt=cf.Symbol,vn=uf("wks"),hf=df?dt.for||dt:dt&&dt.withoutSetter||lf,fe=function(e){return Bi(vn,e)||(vn[e]=ff&&Bi(dt,e)?dt[e]:hf("Symbol."+e)),vn[e]},pn=typeof document=="object"&&document.all,Z=typeof pn>"u"&&pn!==void 0?function(e){return typeof e=="function"||e===pn}:function(e){return typeof e=="function"},vf=Z,Re=function(e){return typeof e=="object"?e!==null:vf(e)},pf=Re,mf=String,gf=TypeError,Me=function(e){if(pf(e))return e;throw new gf(mf(e)+" is not an object")},wc={},yf=re,Y=!yf(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),wf=Y,bf=re,bc=wf&&bf(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),$e={},Sf=q,Ki=Re,da=Sf.document,If=Ki(da)&&Ki(da.createElement),Wa=function(e){return If?da.createElement(e):{}},$f=Y,kf=re,Pf=Wa,Sc=!$f&&!kf(function(){return Object.defineProperty(Pf("div"),"a",{get:function(){return 7}}).a!==7}),Tf=za,fr=Function.prototype.call,ke=Tf?fr.bind(fr):function(){return fr.apply(fr,arguments)},mn=q,Ef=Z,Of=function(e){return Ef(e)?e:void 0},Tt=function(e,t){return arguments.length<2?Of(mn[e]):mn[e]&&mn[e][t]},_f=K,Ic=_f({}.isPrototypeOf),Rf=Tt,Cf=Z,jf=Ic,Af=yc,Lf=Object,$c=Af?function(e){return typeof e=="symbol"}:function(e){var t=Rf("Symbol");return Cf(t)&&jf(t.prototype,Lf(e))},Uf=String,kc=function(e){try{return Uf(e)}catch{return"Object"}},xf=Z,Nf=kc,Df=TypeError,Xr=function(e){if(xf(e))return e;throw new Df(Nf(e)+" is not a function")},Mf=Xr,Ff=Ba,Va=function(e,t){var r=e[t];return Ff(r)?void 0:Mf(r)},gn=ke,yn=Z,wn=Re,zf=TypeError,Hf=function(e,t){var r,n;if(t==="string"&&yn(r=e.toString)&&!wn(n=gn(r,e))||yn(r=e.valueOf)&&!wn(n=gn(r,e))||t!=="string"&&yn(r=e.toString)&&!wn(n=gn(r,e)))return n;throw new zf("Can't convert object to primitive value")},Bf=ke,Gi=Re,Wi=$c,Kf=Va,Gf=Hf,Wf=fe,Vf=TypeError,Zf=Wf("toPrimitive"),Yf=function(e,t){if(!Gi(e)||Wi(e))return e;var r=Kf(e,Zf),n;if(r){if(t===void 0&&(t="default"),n=Bf(r,e,t),!Gi(n)||Wi(n))return n;throw new Vf("Can't convert object to primitive value")}return t===void 0&&(t="number"),Gf(e,t)},Jf=Yf,Xf=$c,Pc=function(e){var t=Jf(e,"string");return Xf(t)?t:t+""},qf=Y,Qf=Sc,ed=bc,dr=Me,Vi=Pc,td=TypeError,bn=Object.defineProperty,rd=Object.getOwnPropertyDescriptor,Sn="enumerable",In="configurable",$n="writable";$e.f=qf?ed?function(t,r,n){if(dr(t),r=Vi(r),dr(n),typeof t=="function"&&r==="prototype"&&"value"in n&&$n in n&&!n[$n]){var a=rd(t,r);a&&a[$n]&&(t[r]=n.value,n={configurable:In in n?n[In]:a[In],enumerable:Sn in n?n[Sn]:a[Sn],writable:!1})}return bn(t,r,n)}:bn:function(t,r,n){if(dr(t),r=Vi(r),dr(n),Qf)try{return bn(t,r,n)}catch{}if("get"in n||"set"in n)throw new td("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var nd=Math.ceil,ad=Math.floor,id=Math.trunc||function(t){var r=+t;return(r>0?ad:nd)(r)},od=id,Za=function(e){var t=+e;return t!==t||t===0?0:od(t)},sd=Za,cd=Math.max,ud=Math.min,ld=function(e,t){var r=sd(e);return r<0?cd(r+t,0):ud(r,t)},fd=Za,dd=Math.min,hd=function(e){var t=fd(e);return t>0?dd(t,9007199254740991):0},vd=hd,Tc=function(e){return vd(e.length)},pd=rr,md=ld,gd=Tc,Zi=function(e){return function(t,r,n){var a=pd(t),i=gd(a);if(i===0)return!e&&-1;var o=md(n,i),c;if(e&&r!==r){for(;i>o;)if(c=a[o++],c!==c)return!0}else for(;i>o;o++)if((e||o in a)&&a[o]===r)return e||o||0;return!e&&-1}},yd={includes:Zi(!0),indexOf:Zi(!1)},Ya={},wd=K,kn=ye,bd=rr,Sd=yd.indexOf,Id=Ya,Yi=wd([].push),Ec=function(e,t){var r=bd(e),n=0,a=[],i;for(i in r)!kn(Id,i)&&kn(r,i)&&Yi(a,i);for(;t.length>n;)kn(r,i=t[n++])&&(~Sd(a,i)||Yi(a,i));return a},Ja=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],$d=Ec,kd=Ja,Oc=Object.keys||function(t){return $d(t,kd)},Pd=Y,Td=bc,Ed=$e,Od=Me,_d=rr,Rd=Oc;wc.f=Pd&&!Td?Object.defineProperties:function(t,r){Od(t);for(var n=_d(r),a=Rd(r),i=a.length,o=0,c;i>o;)Ed.f(t,c=a[o++],n[c]);return t};var Cd=Tt,jd=Cd("document","documentElement"),Ad=vc,Ld=pc,Ji=Ad("keys"),Xa=function(e){return Ji[e]||(Ji[e]=Ld(e))},Ud=Me,xd=wc,Xi=Ja,Nd=Ya,Dd=jd,Md=Wa,Fd=Xa,qi=">",Qi="<",ha="prototype",va="script",_c=Fd("IE_PROTO"),Pn=function(){},Rc=function(e){return Qi+va+qi+e+Qi+"/"+va+qi},eo=function(e){e.write(Rc("")),e.close();var t=e.parentWindow.Object;return e=null,t},zd=function(){var e=Md("iframe"),t="java"+va+":",r;return e.style.display="none",Dd.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(Rc("document.F=Object")),r.close(),r.F},hr,Cr=function(){try{hr=new ActiveXObject("htmlfile")}catch{}Cr=typeof document<"u"?document.domain&&hr?eo(hr):zd():eo(hr);for(var e=Xi.length;e--;)delete Cr[ha][Xi[e]];return Cr()};Nd[_c]=!0;var qa=Object.create||function(t,r){var n;return t!==null?(Pn[ha]=Ud(t),n=new Pn,Pn[ha]=null,n[_c]=t):n=Cr(),r===void 0?n:xd.f(n,r)},Hd=fe,Bd=qa,Kd=$e.f,pa=Hd("unscopables"),ma=Array.prototype;ma[pa]===void 0&&Kd(ma,pa,{configurable:!0,value:Bd(null)});var Gd=function(e){ma[pa][e]=!0},nr={},Wd=q,Vd=Z,to=Wd.WeakMap,Zd=Vd(to)&&/native code/.test(String(to)),ar=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},Yd=Y,Jd=$e,Xd=ar,qr=Yd?function(e,t,r){return Jd.f(e,t,Xd(1,r))}:function(e,t,r){return e[t]=r,e},qd=Zd,Cc=q,Qd=Re,eh=qr,Tn=ye,En=Ga,th=Xa,rh=Ya,ro="Object already initialized",ga=Cc.TypeError,nh=Cc.WeakMap,Dr,er,Mr,ah=function(e){return Mr(e)?er(e):Dr(e,{})},ih=function(e){return function(t){var r;if(!Qd(t)||(r=er(t)).type!==e)throw new ga("Incompatible receiver, "+e+" required");return r}};if(qd||En.state){var we=En.state||(En.state=new nh);we.get=we.get,we.has=we.has,we.set=we.set,Dr=function(e,t){if(we.has(e))throw new ga(ro);return t.facade=e,we.set(e,t),t},er=function(e){return we.get(e)||{}},Mr=function(e){return we.has(e)}}else{var at=th("state");rh[at]=!0,Dr=function(e,t){if(Tn(e,at))throw new ga(ro);return t.facade=e,eh(e,at,t),t},er=function(e){return Tn(e,at)?e[at]:{}},Mr=function(e){return Tn(e,at)}}var ir={set:Dr,get:er,has:Mr,enforce:ah,getterFor:ih},Qa={},ei={},jc={}.propertyIsEnumerable,Ac=Object.getOwnPropertyDescriptor,oh=Ac&&!jc.call({1:2},1);ei.f=oh?function(t){var r=Ac(this,t);return!!r&&r.enumerable}:jc;var sh=Y,ch=ke,uh=ei,lh=ar,fh=rr,dh=Pc,hh=ye,vh=Sc,no=Object.getOwnPropertyDescriptor;Qa.f=sh?no:function(t,r){if(t=fh(t),r=dh(r),vh)try{return no(t,r)}catch{}if(hh(t,r))return lh(!ch(uh.f,t,r),t[r])};var Lc={exports:{}},ya=Y,ph=ye,Uc=Function.prototype,mh=ya&&Object.getOwnPropertyDescriptor,ti=ph(Uc,"name"),gh=ti&&(function(){}).name==="something",yh=ti&&(!ya||ya&&mh(Uc,"name").configurable),xc={EXISTS:ti,PROPER:gh,CONFIGURABLE:yh},wh=K,bh=Z,wa=Ga,Sh=wh(Function.toString);bh(wa.inspectSource)||(wa.inspectSource=function(e){return Sh(e)});var Nc=wa.inspectSource,ri=K,Ih=re,$h=Z,vr=ye,ba=Y,kh=xc.CONFIGURABLE,Ph=Nc,Dc=ir,Th=Dc.enforce,Eh=Dc.get,ao=String,jr=Object.defineProperty,Oh=ri("".slice),_h=ri("".replace),Rh=ri([].join),Ch=ba&&!Ih(function(){return jr(function(){},"length",{value:8}).length!==8}),jh=String(String).split("String"),Ah=Lc.exports=function(e,t,r){Oh(ao(t),0,7)==="Symbol("&&(t="["+_h(ao(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!vr(e,"name")||kh&&e.name!==t)&&(ba?jr(e,"name",{value:t,configurable:!0}):e.name=t),Ch&&r&&vr(r,"arity")&&e.length!==r.arity&&jr(e,"length",{value:r.arity});try{r&&vr(r,"constructor")&&r.constructor?ba&&jr(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch{}var n=Th(e);return vr(n,"source")||(n.source=Rh(jh,typeof t=="string"?t:"")),e};Function.prototype.toString=Ah(function(){return $h(this)&&Eh(this).source||Ph(this)},"toString");var Mc=Lc.exports,Lh=Z,Uh=$e,xh=Mc,Nh=Ka,Fe=function(e,t,r,n){n||(n={});var a=n.enumerable,i=n.name!==void 0?n.name:t;if(Lh(r)&&xh(r,i,n),n.global)a?e[t]=r:Nh(t,r);else{try{n.unsafe?e[t]&&(a=!0):delete e[t]}catch{}a?e[t]=r:Uh.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Fc={},Dh=Ec,Mh=Ja,Fh=Mh.concat("length","prototype");Fc.f=Object.getOwnPropertyNames||function(t){return Dh(t,Fh)};var ni={};ni.f=Object.getOwnPropertySymbols;var zh=Tt,Hh=K,Bh=Fc,Kh=ni,Gh=Me,Wh=Hh([].concat),Vh=zh("Reflect","ownKeys")||function(t){var r=Bh.f(Gh(t)),n=Kh.f;return n?Wh(r,n(t)):r},io=ye,Zh=Vh,Yh=Qa,Jh=$e,Xh=function(e,t,r){for(var n=Zh(t),a=Jh.f,i=Yh.f,o=0;o<n.length;o++){var c=n[o];!io(e,c)&&!(r&&io(r,c))&&a(e,c,i(t,c))}},qh=re,Qh=Z,ev=/#|\.prototype\./,or=function(e,t){var r=rv[tv(e)];return r===av?!0:r===nv?!1:Qh(t)?qh(t):!!t},tv=or.normalize=function(e){return String(e).replace(ev,".").toLowerCase()},rv=or.data={},nv=or.NATIVE="N",av=or.POLYFILL="P",iv=or,pr=q,ov=Qa.f,sv=qr,cv=Fe,uv=Ka,lv=Xh,fv=iv,Et=function(e,t){var r=e.target,n=e.global,a=e.stat,i,o,c,l,f,u;if(n?o=pr:a?o=pr[r]||uv(r,{}):o=pr[r]&&pr[r].prototype,o)for(c in t){if(f=t[c],e.dontCallGetSet?(u=ov(o,c),l=u&&u.value):l=o[c],i=fv(n?c:r+(a?".":"#")+c,e.forced),!i&&l!==void 0){if(typeof f==typeof l)continue;lv(f,l)}(e.sham||l&&l.sham)&&sv(f,"sham",!0),cv(o,c,f,e)}},dv=re,hv=!dv(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),vv=ye,pv=Z,mv=Jr,gv=Xa,yv=hv,oo=gv("IE_PROTO"),Sa=Object,wv=Sa.prototype,zc=yv?Sa.getPrototypeOf:function(e){var t=mv(e);if(vv(t,oo))return t[oo];var r=t.constructor;return pv(r)&&t instanceof r?r.prototype:t instanceof Sa?wv:null},bv=re,Sv=Z,Iv=Re,so=zc,$v=Fe,kv=fe,Ia=kv("iterator"),Hc=!1,Qe,On,_n;[].keys&&(_n=[].keys(),"next"in _n?(On=so(so(_n)),On!==Object.prototype&&(Qe=On)):Hc=!0);var Pv=!Iv(Qe)||bv(function(){var e={};return Qe[Ia].call(e)!==e});Pv&&(Qe={});Sv(Qe[Ia])||$v(Qe,Ia,function(){return this});var Bc={IteratorPrototype:Qe,BUGGY_SAFARI_ITERATORS:Hc},Tv=$e.f,Ev=ye,Ov=fe,co=Ov("toStringTag"),sr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!Ev(e,co)&&Tv(e,co,{configurable:!0,value:t})},_v=Bc.IteratorPrototype,Rv=qa,Cv=ar,jv=sr,Av=nr,Lv=function(){return this},Kc=function(e,t,r,n){var a=t+" Iterator";return e.prototype=Rv(_v,{next:Cv(+!n,r)}),jv(e,a,!1),Av[a]=Lv,e},Uv=K,xv=Xr,Nv=function(e,t,r){try{return Uv(xv(Object.getOwnPropertyDescriptor(e,t)[r]))}catch{}},Dv=Re,Mv=function(e){return Dv(e)||e===null},Fv=Mv,zv=String,Hv=TypeError,Bv=function(e){if(Fv(e))return e;throw new Hv("Can't set "+zv(e)+" as a prototype")},Kv=Nv,Gv=Re,Wv=Yr,Vv=Bv,Zv=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,t={},r;try{r=Kv(Object.prototype,"__proto__","set"),r(t,[]),e=t instanceof Array}catch{}return function(a,i){return Wv(a),Vv(i),Gv(a)&&(e?r(a,i):a.__proto__=i),a}}():void 0),Yv=Et,Jv=ke,Gc=xc,Xv=Z,qv=Kc,uo=zc,lo=Zv,Qv=sr,ep=qr,Rn=Fe,tp=fe,rp=nr,Wc=Bc,np=Gc.PROPER,ap=Gc.CONFIGURABLE,fo=Wc.IteratorPrototype,mr=Wc.BUGGY_SAFARI_ITERATORS,Lt=tp("iterator"),ho="keys",Ut="values",vo="entries",ip=function(){return this},Vc=function(e,t,r,n,a,i,o){qv(r,t,n);var c=function($){if($===a&&d)return d;if(!mr&&$&&$ in u)return u[$];switch($){case ho:return function(){return new r(this,$)};case Ut:return function(){return new r(this,$)};case vo:return function(){return new r(this,$)}}return function(){return new r(this)}},l=t+" Iterator",f=!1,u=e.prototype,s=u[Lt]||u["@@iterator"]||a&&u[a],d=!mr&&s||c(a),h=t==="Array"&&u.entries||s,m,S,g;if(h&&(m=uo(h.call(new e)),m!==Object.prototype&&m.next&&(uo(m)!==fo&&(lo?lo(m,fo):Xv(m[Lt])||Rn(m,Lt,ip)),Qv(m,l,!0))),np&&a===Ut&&s&&s.name!==Ut&&(ap?ep(u,"name",Ut):(f=!0,d=function(){return Jv(s,this)})),a)if(S={values:c(Ut),keys:i?d:c(ho),entries:c(vo)},o)for(g in S)(mr||f||!(g in u))&&Rn(u,g,S[g]);else Yv({target:t,proto:!0,forced:mr||f},S);return u[Lt]!==d&&Rn(u,Lt,d,{name:a}),rp[t]=d,S},ai=function(e,t){return{value:e,done:t}},op=rr,ii=Gd,po=nr,Zc=ir,sp=$e.f,cp=Vc,gr=ai,up=Y,Yc="Array Iterator",lp=Zc.set,fp=Zc.getterFor(Yc),dp=cp(Array,"Array",function(e,t){lp(this,{type:Yc,target:op(e),index:0,kind:t})},function(){var e=fp(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=void 0,gr(void 0,!0);switch(e.kind){case"keys":return gr(r,!1);case"values":return gr(t[r],!1)}return gr([r,t[r]],!1)},"values"),mo=po.Arguments=po.Array;ii("keys");ii("values");ii("entries");if(up&&mo.name!=="values")try{sp(mo,"name",{value:"values"})}catch{}var go=q,hp=Y,vp=Object.getOwnPropertyDescriptor,pp=function(e){if(!hp)return go[e];var t=vp(go,e);return t&&t.value},mp=re,gp=fe,yp=Y,yo=Hl,wp=gp("iterator"),Qr=!mp(function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach(function(a,i){t.delete("b"),n+=i+a}),r.delete("a",2),r.delete("b",void 0),yo&&(!e.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!t.size&&(yo||!yp)||!t.sort||e.href!=="http://a/c%20d?a=1&c=3"||t.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!t[wp]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"||n!=="a1c3"||new URL("http://x",void 0).host!=="x"}),wo=Mc,bp=$e,oi=function(e,t,r){return r.get&&wo(r.get,t,{getter:!0}),r.set&&wo(r.set,t,{setter:!0}),bp.f(e,t,r)},Sp=Fe,Ip=function(e,t,r){for(var n in t)Sp(e,n,t[n],r);return e},$p=Ic,kp=TypeError,Jc=function(e,t){if($p(t,e))return e;throw new kp("Incorrect invocation")},Pp=Ha,Tp=K,Ep=function(e){if(Pp(e)==="Function")return Tp(e)},bo=Ep,Op=Xr,_p=za,Rp=bo(bo.bind),si=function(e,t){return Op(e),t===void 0?e:_p?Rp(e,t):function(){return e.apply(t,arguments)}},Cp=fe,jp=Cp("toStringTag"),Xc={};Xc[jp]="z";var Ap=String(Xc)==="[object z]",Lp=Ap,Up=Z,Ar=Ha,xp=fe,Np=xp("toStringTag"),Dp=Object,Mp=Ar(function(){return arguments}())==="Arguments",Fp=function(e,t){try{return e[t]}catch{}},en=Lp?Ar:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=Fp(t=Dp(e),Np))=="string"?r:Mp?Ar(t):(n=Ar(t))==="Object"&&Up(t.callee)?"Arguments":n},zp=en,Hp=String,ze=function(e){if(zp(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Hp(e)},Bp=en,So=Va,Kp=Ba,Gp=nr,Wp=fe,Vp=Wp("iterator"),ci=function(e){if(!Kp(e))return So(e,Vp)||So(e,"@@iterator")||Gp[Bp(e)]},Zp=ke,Yp=Xr,Jp=Me,Xp=kc,qp=ci,Qp=TypeError,qc=function(e,t){var r=arguments.length<2?qp(e):t;if(Yp(r))return Jp(Zp(r,e));throw new Qp(Xp(e)+" is not iterable")},em=TypeError,Ot=function(e,t){if(e<t)throw new em("Not enough arguments");return e},tm=K,Qc=tm([].slice),Io=Qc,rm=Math.floor,$a=function(e,t){var r=e.length;if(r<8)for(var n=1,a,i;n<r;){for(i=n,a=e[n];i&&t(e[i-1],a)>0;)e[i]=e[--i];i!==n++&&(e[i]=a)}else for(var o=rm(r/2),c=$a(Io(e,0,o),t),l=$a(Io(e,o),t),f=c.length,u=l.length,s=0,d=0;s<f||d<u;)e[s+d]=s<f&&d<u?t(c[s],l[d])<=0?c[s++]:l[d++]:s<f?c[s++]:l[d++];return e},nm=$a,ka=Et,tn=q,ui=pp,yr=ke,Ie=K,Wt=Y,eu=Qr,tu=Fe,am=oi,im=Ip,om=sr,sm=Kc,li=ir,ru=Jc,Cn=Z,cm=ye,um=si,lm=en,fm=Me,nu=Re,X=ze,dm=qa,$o=ar,ko=qc,hm=ci,wr=ai,it=Ot,vm=fe,pm=nm,mm=vm("iterator"),_t="URLSearchParams",au=_t+"Iterator",iu=li.set,ue=li.getterFor(_t),gm=li.getterFor(au),Po=ui("fetch"),Fr=ui("Request"),Vt=ui("Headers"),jn=Fr&&Fr.prototype,To=Vt&&Vt.prototype,ym=tn.RegExp,wm=tn.TypeError,ou=tn.decodeURIComponent,bm=tn.encodeURIComponent,Sm=Ie("".charAt),Eo=Ie([].join),Ze=Ie([].push),Pa=Ie("".replace),Im=Ie([].shift),Oo=Ie([].splice),_o=Ie("".split),$m=Ie("".slice),km=/\+/g,Ro=Array(4),Pm=function(e){return Ro[e-1]||(Ro[e-1]=ym("((?:%[\\da-f]{2}){"+e+"})","gi"))},Tm=function(e){try{return ou(e)}catch{return e}},Co=function(e){var t=Pa(e,km," "),r=4;try{return ou(t)}catch{for(;r;)t=Pa(t,Pm(r--),Tm);return t}},Em=/[!'()~]|%20/g,Om={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},_m=function(e){return Om[e]},jo=function(e){return Pa(bm(e),Em,_m)},An=sm(function(t,r){iu(this,{type:au,target:ue(t).entries,index:0,kind:r})},_t,function(){var t=gm(this),r=t.target,n=t.index++;if(!r||n>=r.length)return t.target=void 0,wr(void 0,!0);var a=r[n];switch(t.kind){case"keys":return wr(a.key,!1);case"values":return wr(a.value,!1)}return wr([a.key,a.value],!1)},!0),su=function(e){this.entries=[],this.url=null,e!==void 0&&(nu(e)?this.parseObject(e):this.parseQuery(typeof e=="string"?Sm(e,0)==="?"?$m(e,1):e:X(e)))};su.prototype={type:_t,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t=this.entries,r=hm(e),n,a,i,o,c,l,f;if(r)for(n=ko(e,r),a=n.next;!(i=yr(a,n)).done;){if(o=ko(fm(i.value)),c=o.next,(l=yr(c,o)).done||(f=yr(c,o)).done||!yr(c,o).done)throw new wm("Expected sequence with length 2");Ze(t,{key:X(l.value),value:X(f.value)})}else for(var u in e)cm(e,u)&&Ze(t,{key:u,value:X(e[u])})},parseQuery:function(e){if(e)for(var t=this.entries,r=_o(e,"&"),n=0,a,i;n<r.length;)a=r[n++],a.length&&(i=_o(a,"="),Ze(t,{key:Co(Im(i)),value:Co(Eo(i,"="))}))},serialize:function(){for(var e=this.entries,t=[],r=0,n;r<e.length;)n=e[r++],Ze(t,jo(n.key)+"="+jo(n.value));return Eo(t,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var rn=function(){ru(this,wt);var t=arguments.length>0?arguments[0]:void 0,r=iu(this,new su(t));Wt||(this.size=r.entries.length)},wt=rn.prototype;im(wt,{append:function(t,r){var n=ue(this);it(arguments.length,2),Ze(n.entries,{key:X(t),value:X(r)}),Wt||this.length++,n.updateURL()},delete:function(e){for(var t=ue(this),r=it(arguments.length,1),n=t.entries,a=X(e),i=r<2?void 0:arguments[1],o=i===void 0?i:X(i),c=0;c<n.length;){var l=n[c];if(l.key===a&&(o===void 0||l.value===o)){if(Oo(n,c,1),o!==void 0)break}else c++}Wt||(this.size=n.length),t.updateURL()},get:function(t){var r=ue(this).entries;it(arguments.length,1);for(var n=X(t),a=0;a<r.length;a++)if(r[a].key===n)return r[a].value;return null},getAll:function(t){var r=ue(this).entries;it(arguments.length,1);for(var n=X(t),a=[],i=0;i<r.length;i++)r[i].key===n&&Ze(a,r[i].value);return a},has:function(t){for(var r=ue(this).entries,n=it(arguments.length,1),a=X(t),i=n<2?void 0:arguments[1],o=i===void 0?i:X(i),c=0;c<r.length;){var l=r[c++];if(l.key===a&&(o===void 0||l.value===o))return!0}return!1},set:function(t,r){var n=ue(this);it(arguments.length,1);for(var a=n.entries,i=!1,o=X(t),c=X(r),l=0,f;l<a.length;l++)f=a[l],f.key===o&&(i?Oo(a,l--,1):(i=!0,f.value=c));i||Ze(a,{key:o,value:c}),Wt||(this.size=a.length),n.updateURL()},sort:function(){var t=ue(this);pm(t.entries,function(r,n){return r.key>n.key?1:-1}),t.updateURL()},forEach:function(t){for(var r=ue(this).entries,n=um(t,arguments.length>1?arguments[1]:void 0),a=0,i;a<r.length;)i=r[a++],n(i.value,i.key,this)},keys:function(){return new An(this,"keys")},values:function(){return new An(this,"values")},entries:function(){return new An(this,"entries")}},{enumerable:!0});tu(wt,mm,wt.entries,{name:"entries"});tu(wt,"toString",function(){return ue(this).serialize()},{enumerable:!0});Wt&&am(wt,"size",{get:function(){return ue(this).entries.length},configurable:!0,enumerable:!0});om(rn,_t);ka({global:!0,constructor:!0,forced:!eu},{URLSearchParams:rn});if(!eu&&Cn(Vt)){var Rm=Ie(To.has),Cm=Ie(To.set),Ao=function(e){if(nu(e)){var t=e.body,r;if(lm(t)===_t)return r=e.headers?new Vt(e.headers):new Vt,Rm(r,"content-type")||Cm(r,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),dm(e,{body:$o(0,X(t)),headers:$o(0,r)})}return e};if(Cn(Po)&&ka({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return Po(t,arguments.length>1?Ao(arguments[1]):{})}}),Cn(Fr)){var Ln=function(t){return ru(this,jn),new Fr(t,arguments.length>1?Ao(arguments[1]):{})};jn.constructor=Ln,Ln.prototype=jn,ka({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ln})}}var jm={URLSearchParams:rn,getState:ue},Am=Fe,nn=K,Lo=ze,Lm=Ot,cu=URLSearchParams,an=cu.prototype,Um=nn(an.append),Uo=nn(an.delete),xm=nn(an.forEach),Nm=nn([].push),fi=new cu("a=1&a=2&b=3");fi.delete("a",1);fi.delete("b",void 0);fi+""!="a=2"&&Am(an,"delete",function(e){var t=arguments.length,r=t<2?void 0:arguments[1];if(t&&r===void 0)return Uo(this,e);var n=[];xm(this,function(s,d){Nm(n,{key:d,value:s})}),Lm(t,1);for(var a=Lo(e),i=Lo(r),o=0,c=0,l=!1,f=n.length,u;o<f;)u=n[o++],l||u.key===a?(l=!0,Uo(this,u.key)):c++;for(;c<f;)u=n[c++],u.key===a&&u.value===i||Um(this,u.key,u.value)},{enumerable:!0,unsafe:!0});var Dm=Fe,uu=K,Mm=ze,Fm=Ot,lu=URLSearchParams,di=lu.prototype,zm=uu(di.getAll),Hm=uu(di.has),xo=new lu("a=1");(xo.has("a",2)||!xo.has("a",void 0))&&Dm(di,"has",function(t){var r=arguments.length,n=r<2?void 0:arguments[1];if(r&&n===void 0)return Hm(this,t);var a=zm(this,t);Fm(r,1);for(var i=Mm(n),o=0;o<a.length;)if(a[o++]===i)return!0;return!1},{enumerable:!0,unsafe:!0});var Bm=Y,Km=K,Gm=oi,Ta=URLSearchParams.prototype,Wm=Km(Ta.forEach);Bm&&!("size"in Ta)&&Gm(Ta,"size",{get:function(){var t=0;return Wm(this,function(){t++}),t},configurable:!0,enumerable:!0});var Vm=q,fu=Vm,Zm=fu;Zm.URLSearchParams;var hi=K,Ym=Za,Jm=ze,Xm=Yr,qm=hi("".charAt),No=hi("".charCodeAt),Qm=hi("".slice),Do=function(e){return function(t,r){var n=Jm(Xm(t)),a=Ym(r),i=n.length,o,c;return a<0||a>=i?e?"":void 0:(o=No(n,a),o<55296||o>56319||a+1===i||(c=No(n,a+1))<56320||c>57343?e?qm(n,a):o:e?Qm(n,a,a+2):(o-55296<<10)+(c-56320)+65536)}},du={codeAt:Do(!1),charAt:Do(!0)},eg=du.charAt,tg=ze,hu=ir,rg=Vc,Mo=ai,vu="String Iterator",ng=hu.set,ag=hu.getterFor(vu);rg(String,"String",function(e){ng(this,{type:vu,string:tg(e),index:0})},function(){var t=ag(this),r=t.string,n=t.index,a;return n>=r.length?Mo(void 0,!0):(a=eg(r,n),t.index+=a.length,Mo(a,!1))});var Fo=Y,ig=K,og=ke,sg=re,Un=Oc,cg=ni,ug=ei,lg=Jr,fg=dc,ot=Object.assign,zo=Object.defineProperty,dg=ig([].concat),hg=!ot||sg(function(){if(Fo&&ot({b:1},ot(zo({},"a",{enumerable:!0,get:function(){zo(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(a){t[a]=a}),ot({},e)[r]!==7||Un(ot({},t)).join("")!==n})?function(t,r){for(var n=lg(t),a=arguments.length,i=1,o=cg.f,c=ug.f;a>i;)for(var l=fg(arguments[i++]),f=o?dg(Un(l),o(l)):Un(l),u=f.length,s=0,d;u>s;)d=f[s++],(!Fo||og(c,l,d))&&(n[d]=l[d]);return n}:ot,vg=ke,Ho=Me,pg=Va,mg=function(e,t,r){var n,a;Ho(e);try{if(n=pg(e,"return"),!n){if(t==="throw")throw r;return r}n=vg(n,e)}catch(i){a=!0,n=i}if(t==="throw")throw r;if(a)throw n;return Ho(n),r},gg=Me,yg=mg,wg=function(e,t,r,n){try{return n?t(gg(r)[0],r[1]):t(r)}catch(a){yg(e,"throw",a)}},bg=fe,Sg=nr,Ig=bg("iterator"),$g=Array.prototype,kg=function(e){return e!==void 0&&(Sg.Array===e||$g[Ig]===e)},Pg=K,Tg=re,pu=Z,Eg=en,Og=Tt,_g=Nc,mu=function(){},gu=Og("Reflect","construct"),vi=/^\s*(?:class|function)\b/,Rg=Pg(vi.exec),Cg=!vi.test(mu),xt=function(t){if(!pu(t))return!1;try{return gu(mu,[],t),!0}catch{return!1}},yu=function(t){if(!pu(t))return!1;switch(Eg(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Cg||!!Rg(vi,_g(t))}catch{return!0}};yu.sham=!0;var jg=!gu||Tg(function(){var e;return xt(xt.call)||!xt(Object)||!xt(function(){e=!0})||e})?yu:xt,Ag=Y,Lg=$e,Ug=ar,xg=function(e,t,r){Ag?Lg.f(e,t,Ug(0,r)):e[t]=r},Ng=si,Dg=ke,Mg=Jr,Fg=wg,zg=kg,Hg=jg,Bg=Tc,Bo=xg,Kg=qc,Gg=ci,Ko=Array,Wg=function(t){var r=Mg(t),n=Hg(this),a=arguments.length,i=a>1?arguments[1]:void 0,o=i!==void 0;o&&(i=Ng(i,a>2?arguments[2]:void 0));var c=Gg(r),l=0,f,u,s,d,h,m;if(c&&!(this===Ko&&zg(c)))for(u=n?new this:[],d=Kg(r,c),h=d.next;!(s=Dg(h,d)).done;l++)m=o?Fg(d,i,[s.value,l],!0):s.value,Bo(u,l,m);else for(f=Bg(r),u=n?new this(f):Ko(f);f>l;l++)m=o?i(r[l],l):r[l],Bo(u,l,m);return u.length=l,u},nt=K,xn=2147483647,Zt=36,wu=1,Ea=26,Vg=38,Zg=700,Yg=72,Jg=128,Xg="-",qg=/[^\0-\u007E]/,bu=/[.\u3002\uFF0E\uFF61]/g,Go="Overflow: input needs wider integers to process",Nn=Zt-wu,Wo=RangeError,Qg=nt(bu.exec),ht=Math.floor,Dn=String.fromCharCode,Vo=nt("".charCodeAt),Su=nt([].join),Ue=nt([].push),ey=nt("".replace),ty=nt("".split),ry=nt("".toLowerCase),ny=function(e){for(var t=[],r=0,n=e.length;r<n;){var a=Vo(e,r++);if(a>=55296&&a<=56319&&r<n){var i=Vo(e,r++);(i&64512)===56320?Ue(t,((a&1023)<<10)+(i&1023)+65536):(Ue(t,a),r--)}else Ue(t,a)}return t},Zo=function(e){return e+22+75*(e<26)},ay=function(e,t,r){var n=0;for(e=r?ht(e/Zg):e>>1,e+=ht(e/t);e>Nn*Ea>>1;)e=ht(e/Nn),n+=Zt;return ht(n+(Nn+1)*e/(e+Vg))},iy=function(e){var t=[];e=ny(e);var r=e.length,n=Jg,a=0,i=Yg,o,c;for(o=0;o<e.length;o++)c=e[o],c<128&&Ue(t,Dn(c));var l=t.length,f=l;for(l&&Ue(t,Xg);f<r;){var u=xn;for(o=0;o<e.length;o++)c=e[o],c>=n&&c<u&&(u=c);var s=f+1;if(u-n>ht((xn-a)/s))throw new Wo(Go);for(a+=(u-n)*s,n=u,o=0;o<e.length;o++){if(c=e[o],c<n&&++a>xn)throw new Wo(Go);if(c===n){for(var d=a,h=Zt;;){var m=h<=i?wu:h>=i+Ea?Ea:h-i;if(d<m)break;var S=d-m,g=Zt-m;Ue(t,Dn(Zo(m+S%g))),d=ht(S/g),h+=Zt}Ue(t,Dn(Zo(d))),i=ay(a,s,f===l),a=0,f++}}a++,n++}return Su(t,"")},oy=function(e){var t=[],r=ty(ey(ry(e),bu,"."),"."),n,a;for(n=0;n<r.length;n++)a=r[n],Ue(t,Qg(qg,a)?"xn--"+iy(a):a);return Su(t,".")},sy=Et,pi=Y,cy=Qr,mi=q,Yo=si,de=K,zr=Fe,oe=oi,uy=Jc,Oa=ye,gi=hg,st=Wg,he=Qc,ly=du.codeAt,fy=oy,Te=ze,dy=sr,hy=Ot,Iu=jm,$u=ir,vy=$u.set,Hr=$u.getterFor("URL"),py=Iu.URLSearchParams,my=Iu.getState,Nt=mi.URL,_a=mi.TypeError,Br=mi.parseInt,gy=Math.floor,Jo=Math.pow,le=de("".charAt),me=de(/./.exec),Ht=de([].join),yy=de(1 .toString),wy=de([].pop),lt=de([].push),Mn=de("".replace),by=de([].shift),Sy=de("".split),Yt=de("".slice),Kr=de("".toLowerCase),Iy=de([].unshift),$y="Invalid authority",Fn="Invalid scheme",Be="Invalid host",Xo="Invalid port",ku=/[a-z]/i,ky=/[\d+-.a-z]/i,Ra=/\d/,Py=/^0x/i,Ty=/^[0-7]+$/,Ey=/^\d+$/,Pu=/^[\da-f]+$/i,Oy=/[\0\t\n\r #%/:<>?@[\\\]^|]/,_y=/[\0\t\n\r #/:<>?@[\\\]^|]/,Ry=/^[\u0000-\u0020]+/,Cy=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,jy=/[\t\n\r]/g,se,Ay=function(e){var t=Sy(e,"."),r,n,a,i,o,c,l;if(t.length&&t[t.length-1]===""&&t.length--,r=t.length,r>4)return e;for(n=[],a=0;a<r;a++){if(i=t[a],i==="")return e;if(o=10,i.length>1&&le(i,0)==="0"&&(o=me(Py,i)?16:8,i=Yt(i,o===8?1:2)),i==="")c=0;else{if(!me(o===10?Ey:o===8?Ty:Pu,i))return e;c=Br(i,o)}lt(n,c)}for(a=0;a<r;a++)if(c=n[a],a===r-1){if(c>=Jo(256,5-r))return null}else if(c>255)return null;for(l=wy(n),a=0;a<n.length;a++)l+=n[a]*Jo(256,3-a);return l},Ly=function(e){var t=[0,0,0,0,0,0,0,0],r=0,n=null,a=0,i,o,c,l,f,u,s,d=function(){return le(e,a)};if(d()===":"){if(le(e,1)!==":")return;a+=2,r++,n=r}for(;d();){if(r===8)return;if(d()===":"){if(n!==null)return;a++,r++,n=r;continue}for(i=o=0;o<4&&me(Pu,d());)i=i*16+Br(d(),16),a++,o++;if(d()==="."){if(o===0||(a-=o,r>6))return;for(c=0;d();){if(l=null,c>0)if(d()==="."&&c<4)a++;else return;if(!me(Ra,d()))return;for(;me(Ra,d());){if(f=Br(d(),10),l===null)l=f;else{if(l===0)return;l=l*10+f}if(l>255)return;a++}t[r]=t[r]*256+l,c++,(c===2||c===4)&&r++}if(c!==4)return;break}else if(d()===":"){if(a++,!d())return}else if(d())return;t[r++]=i}if(n!==null)for(u=r-n,r=7;r!==0&&u>0;)s=t[r],t[r--]=t[n+u-1],t[n+--u]=s;else if(r!==8)return;return t},Uy=function(e){for(var t=null,r=1,n=null,a=0,i=0;i<8;i++)e[i]!==0?(a>r&&(t=n,r=a),n=null,a=0):(n===null&&(n=i),++a);return a>r&&(t=n,r=a),t},Dt=function(e){var t,r,n,a;if(typeof e=="number"){for(t=[],r=0;r<4;r++)Iy(t,e%256),e=gy(e/256);return Ht(t,".")}else if(typeof e=="object"){for(t="",n=Uy(e),r=0;r<8;r++)a&&e[r]===0||(a&&(a=!1),n===r?(t+=r?":":"::",a=!0):(t+=yy(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},Lr={},Tu=gi({},Lr,{" ":1,'"':1,"<":1,">":1,"`":1}),Eu=gi({},Tu,{"#":1,"?":1,"{":1,"}":1}),zn=gi({},Eu,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Ce=function(e,t){var r=ly(e,0);return r>32&&r<127&&!Oa(t,e)?e:encodeURIComponent(e)},br={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Bt=function(e,t){var r;return e.length===2&&me(ku,le(e,0))&&((r=le(e,1))===":"||!t&&r==="|")},qo=function(e){var t;return e.length>1&&Bt(Yt(e,0,2))&&(e.length===2||(t=le(e,2))==="/"||t==="\\"||t==="?"||t==="#")},xy=function(e){return e==="."||Kr(e)==="%2e"},Ny=function(e){return e=Kr(e),e===".."||e==="%2e."||e===".%2e"||e==="%2e%2e"},Hn={},Qo={},Bn={},es={},ts={},Kn={},rs={},ns={},Sr={},Ir={},Gn={},Wn={},Vn={},Zn={},as={},Yn={},ct={},be={},is={},Ke={},Pe={},yi=function(e,t,r){var n=Te(e),a,i,o;if(t){if(i=this.parse(n),i)throw new _a(i);this.searchParams=null}else{if(r!==void 0&&(a=new yi(r,!0)),i=this.parse(n,null,a),i)throw new _a(i);o=my(new py),o.bindURL(this),this.searchParams=o}};yi.prototype={type:"URL",parse:function(e,t,r){var n=this,a=t||Hn,i=0,o="",c=!1,l=!1,f=!1,u,s,d,h;for(e=Te(e),t||(n.scheme="",n.username="",n.password="",n.host=null,n.port=null,n.path=[],n.query=null,n.fragment=null,n.cannotBeABaseURL=!1,e=Mn(e,Ry,""),e=Mn(e,Cy,"$1")),e=Mn(e,jy,""),u=st(e);i<=u.length;){switch(s=u[i],a){case Hn:if(s&&me(ku,s))o+=Kr(s),a=Qo;else{if(t)return Fn;a=Bn;continue}break;case Qo:if(s&&(me(ky,s)||s==="+"||s==="-"||s==="."))o+=Kr(s);else if(s===":"){if(t&&(n.isSpecial()!==Oa(br,o)||o==="file"&&(n.includesCredentials()||n.port!==null)||n.scheme==="file"&&!n.host))return;if(n.scheme=o,t){n.isSpecial()&&br[n.scheme]===n.port&&(n.port=null);return}o="",n.scheme==="file"?a=Zn:n.isSpecial()&&r&&r.scheme===n.scheme?a=es:n.isSpecial()?a=ns:u[i+1]==="/"?(a=ts,i++):(n.cannotBeABaseURL=!0,lt(n.path,""),a=is)}else{if(t)return Fn;o="",a=Bn,i=0;continue}break;case Bn:if(!r||r.cannotBeABaseURL&&s!=="#")return Fn;if(r.cannotBeABaseURL&&s==="#"){n.scheme=r.scheme,n.path=he(r.path),n.query=r.query,n.fragment="",n.cannotBeABaseURL=!0,a=Pe;break}a=r.scheme==="file"?Zn:Kn;continue;case es:if(s==="/"&&u[i+1]==="/")a=Sr,i++;else{a=Kn;continue}break;case ts:if(s==="/"){a=Ir;break}else{a=be;continue}case Kn:if(n.scheme=r.scheme,s===se)n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=he(r.path),n.query=r.query;else if(s==="/"||s==="\\"&&n.isSpecial())a=rs;else if(s==="?")n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=he(r.path),n.query="",a=Ke;else if(s==="#")n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=he(r.path),n.query=r.query,n.fragment="",a=Pe;else{n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=he(r.path),n.path.length--,a=be;continue}break;case rs:if(n.isSpecial()&&(s==="/"||s==="\\"))a=Sr;else if(s==="/")a=Ir;else{n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,a=be;continue}break;case ns:if(a=Sr,s!=="/"||le(o,i+1)!=="/")continue;i++;break;case Sr:if(s!=="/"&&s!=="\\"){a=Ir;continue}break;case Ir:if(s==="@"){c&&(o="%40"+o),c=!0,d=st(o);for(var m=0;m<d.length;m++){var S=d[m];if(S===":"&&!f){f=!0;continue}var g=Ce(S,zn);f?n.password+=g:n.username+=g}o=""}else if(s===se||s==="/"||s==="?"||s==="#"||s==="\\"&&n.isSpecial()){if(c&&o==="")return $y;i-=st(o).length+1,o="",a=Gn}else o+=s;break;case Gn:case Wn:if(t&&n.scheme==="file"){a=Yn;continue}else if(s===":"&&!l){if(o==="")return Be;if(h=n.parseHost(o),h)return h;if(o="",a=Vn,t===Wn)return}else if(s===se||s==="/"||s==="?"||s==="#"||s==="\\"&&n.isSpecial()){if(n.isSpecial()&&o==="")return Be;if(t&&o===""&&(n.includesCredentials()||n.port!==null))return;if(h=n.parseHost(o),h)return h;if(o="",a=ct,t)return;continue}else s==="["?l=!0:s==="]"&&(l=!1),o+=s;break;case Vn:if(me(Ra,s))o+=s;else if(s===se||s==="/"||s==="?"||s==="#"||s==="\\"&&n.isSpecial()||t){if(o!==""){var $=Br(o,10);if($>65535)return Xo;n.port=n.isSpecial()&&$===br[n.scheme]?null:$,o=""}if(t)return;a=ct;continue}else return Xo;break;case Zn:if(n.scheme="file",s==="/"||s==="\\")a=as;else if(r&&r.scheme==="file")switch(s){case se:n.host=r.host,n.path=he(r.path),n.query=r.query;break;case"?":n.host=r.host,n.path=he(r.path),n.query="",a=Ke;break;case"#":n.host=r.host,n.path=he(r.path),n.query=r.query,n.fragment="",a=Pe;break;default:qo(Ht(he(u,i),""))||(n.host=r.host,n.path=he(r.path),n.shortenPath()),a=be;continue}else{a=be;continue}break;case as:if(s==="/"||s==="\\"){a=Yn;break}r&&r.scheme==="file"&&!qo(Ht(he(u,i),""))&&(Bt(r.path[0],!0)?lt(n.path,r.path[0]):n.host=r.host),a=be;continue;case Yn:if(s===se||s==="/"||s==="\\"||s==="?"||s==="#"){if(!t&&Bt(o))a=be;else if(o===""){if(n.host="",t)return;a=ct}else{if(h=n.parseHost(o),h)return h;if(n.host==="localhost"&&(n.host=""),t)return;o="",a=ct}continue}else o+=s;break;case ct:if(n.isSpecial()){if(a=be,s!=="/"&&s!=="\\")continue}else if(!t&&s==="?")n.query="",a=Ke;else if(!t&&s==="#")n.fragment="",a=Pe;else if(s!==se&&(a=be,s!=="/"))continue;break;case be:if(s===se||s==="/"||s==="\\"&&n.isSpecial()||!t&&(s==="?"||s==="#")){if(Ny(o)?(n.shortenPath(),s!=="/"&&!(s==="\\"&&n.isSpecial())&<(n.path,"")):xy(o)?s!=="/"&&!(s==="\\"&&n.isSpecial())&<(n.path,""):(n.scheme==="file"&&!n.path.length&&Bt(o)&&(n.host&&(n.host=""),o=le(o,0)+":"),lt(n.path,o)),o="",n.scheme==="file"&&(s===se||s==="?"||s==="#"))for(;n.path.length>1&&n.path[0]==="";)by(n.path);s==="?"?(n.query="",a=Ke):s==="#"&&(n.fragment="",a=Pe)}else o+=Ce(s,Eu);break;case is:s==="?"?(n.query="",a=Ke):s==="#"?(n.fragment="",a=Pe):s!==se&&(n.path[0]+=Ce(s,Lr));break;case Ke:!t&&s==="#"?(n.fragment="",a=Pe):s!==se&&(s==="'"&&n.isSpecial()?n.query+="%27":s==="#"?n.query+="%23":n.query+=Ce(s,Lr));break;case Pe:s!==se&&(n.fragment+=Ce(s,Tu));break}i++}},parseHost:function(e){var t,r,n;if(le(e,0)==="["){if(le(e,e.length-1)!=="]"||(t=Ly(Yt(e,1,-1)),!t))return Be;this.host=t}else if(this.isSpecial()){if(e=fy(e),me(Oy,e)||(t=Ay(e),t===null))return Be;this.host=t}else{if(me(_y,e))return Be;for(t="",r=st(e),n=0;n<r.length;n++)t+=Ce(r[n],Lr);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return Oa(br,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;t&&(this.scheme!=="file"||t!==1||!Bt(e[0],!0))&&e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,a=e.host,i=e.port,o=e.path,c=e.query,l=e.fragment,f=t+":";return a!==null?(f+="//",e.includesCredentials()&&(f+=r+(n?":"+n:"")+"@"),f+=Dt(a),i!==null&&(f+=":"+i)):t==="file"&&(f+="//"),f+=e.cannotBeABaseURL?o[0]:o.length?"/"+Ht(o,"/"):"",c!==null&&(f+="?"+c),l!==null&&(f+="#"+l),f},setHref:function(e){var t=this.parse(e);if(t)throw new _a(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if(e==="blob")try{return new bt(e.path[0]).origin}catch{return"null"}return e==="file"||!this.isSpecial()?"null":e+"://"+Dt(this.host)+(t!==null?":"+t:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Te(e)+":",Hn)},getUsername:function(){return this.username},setUsername:function(e){var t=st(Te(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=Ce(t[r],zn)}},getPassword:function(){return this.password},setPassword:function(e){var t=st(Te(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=Ce(t[r],zn)}},getHost:function(){var e=this.host,t=this.port;return e===null?"":t===null?Dt(e):Dt(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Gn)},getHostname:function(){var e=this.host;return e===null?"":Dt(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Wn)},getPort:function(){var e=this.port;return e===null?"":Te(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(e=Te(e),e===""?this.port=null:this.parse(e,Vn))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Ht(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,ct))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){e=Te(e),e===""?this.query=null:(le(e,0)==="?"&&(e=Yt(e,1)),this.query="",this.parse(e,Ke)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){if(e=Te(e),e===""){this.fragment=null;return}le(e,0)==="#"&&(e=Yt(e,1)),this.fragment="",this.parse(e,Pe)},update:function(){this.query=this.searchParams.serialize()||null}};var bt=function(t){var r=uy(this,J),n=hy(arguments.length,1)>1?arguments[1]:void 0,a=vy(r,new yi(t,!1,n));pi||(r.href=a.serialize(),r.origin=a.getOrigin(),r.protocol=a.getProtocol(),r.username=a.getUsername(),r.password=a.getPassword(),r.host=a.getHost(),r.hostname=a.getHostname(),r.port=a.getPort(),r.pathname=a.getPathname(),r.search=a.getSearch(),r.searchParams=a.getSearchParams(),r.hash=a.getHash())},J=bt.prototype,ce=function(e,t){return{get:function(){return Hr(this)[e]()},set:t&&function(r){return Hr(this)[t](r)},configurable:!0,enumerable:!0}};pi&&(oe(J,"href",ce("serialize","setHref")),oe(J,"origin",ce("getOrigin")),oe(J,"protocol",ce("getProtocol","setProtocol")),oe(J,"username",ce("getUsername","setUsername")),oe(J,"password",ce("getPassword","setPassword")),oe(J,"host",ce("getHost","setHost")),oe(J,"hostname",ce("getHostname","setHostname")),oe(J,"port",ce("getPort","setPort")),oe(J,"pathname",ce("getPathname","setPathname")),oe(J,"search",ce("getSearch","setSearch")),oe(J,"searchParams",ce("getSearchParams")),oe(J,"hash",ce("getHash","setHash")));zr(J,"toJSON",function(){return Hr(this).serialize()},{enumerable:!0});zr(J,"toString",function(){return Hr(this).serialize()},{enumerable:!0});if(Nt){var os=Nt.createObjectURL,ss=Nt.revokeObjectURL;os&&zr(bt,"createObjectURL",Yo(os,Nt)),ss&&zr(bt,"revokeObjectURL",Yo(ss,Nt))}dy(bt,"URL");sy({global:!0,constructor:!0,forced:!cy,sham:!pi},{URL:bt});var Dy=Et,My=Tt,Ou=re,Fy=Ot,cs=ze,zy=Qr,wi=My("URL"),Hy=zy&&Ou(function(){wi.canParse()}),By=Ou(function(){return wi.canParse.length!==1});Dy({target:"URL",stat:!0,forced:!Hy||By},{canParse:function(t){var r=Fy(arguments.length,1),n=cs(t),a=r<2||arguments[1]===void 0?void 0:cs(arguments[1]);try{return!!new wi(n,a)}catch{return!1}}});var Ky=Et,Gy=Tt,Wy=Ot,us=ze,Vy=Qr,Zy=Gy("URL");Ky({target:"URL",stat:!0,forced:!Vy},{parse:function(t){var r=Wy(arguments.length,1),n=us(t),a=r<2||arguments[1]===void 0?void 0:us(arguments[1]);try{return new Zy(n,a)}catch{return null}}});var Yy=Et,Jy=ke;Yy({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return Jy(URL.prototype.toString,this)}});var Xy=fu;Xy.URL;var qy={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Qy=Wa,Jn=Qy("span").classList,ls=Jn&&Jn.constructor&&Jn.constructor.prototype,ew=ls===Object.prototype?void 0:ls,fs=q,_u=qy,tw=ew,Kt=dp,ds=qr,rw=sr,nw=fe,Xn=nw("iterator"),qn=Kt.values,Ru=function(e,t){if(e){if(e[Xn]!==qn)try{ds(e,Xn,qn)}catch{e[Xn]=qn}if(rw(e,t,!0),_u[t]){for(var r in Kt)if(e[r]!==Kt[r])try{ds(e,r,Kt[r])}catch{e[r]=Kt[r]}}}};for(var Qn in _u)Ru(fs[Qn]&&fs[Qn].prototype,Qn);Ru(tw,"DOMTokenList");function De(e,t){const r=new CustomEvent(e,{detail:t,bubbles:!0,composed:!0});dispatchEvent(r)}function Se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r}var We=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Si(e,t){return e(t={exports:{}},t.exports),t.exports}var Ge=Si(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(){var a=this;this.locked=new Map,this.addToLocked=function(i,o){var c=a.locked.get(i);c===void 0?o===void 0?a.locked.set(i,[]):a.locked.set(i,[o]):o!==void 0&&(c.unshift(o),a.locked.set(i,c))},this.isLocked=function(i){return a.locked.has(i)},this.lock=function(i){return new Promise(function(o,c){a.isLocked(i)?a.addToLocked(i,o):(a.addToLocked(i),o())})},this.unlock=function(i){var o=a.locked.get(i);if(o!==void 0&&o.length!==0){var c=o.pop();a.locked.set(i,o),c!==void 0&&setTimeout(c,0)}else a.locked.delete(i)}}return n.getInstance=function(){return n.instance===void 0&&(n.instance=new n),n.instance},n}();t.default=function(){return r.getInstance()}});bi(Ge);var aw=bi(Si(function(e,t){var r=We&&We.__awaiter||function(u,s,d,h){return new(d||(d=Promise))(function(m,S){function g(b){try{k(h.next(b))}catch(v){S(v)}}function $(b){try{k(h.throw(b))}catch(v){S(v)}}function k(b){b.done?m(b.value):new d(function(v){v(b.value)}).then(g,$)}k((h=h.apply(u,s||[])).next())})},n=We&&We.__generator||function(u,s){var d,h,m,S,g={label:0,sent:function(){if(1&m[0])throw m[1];return m[1]},trys:[],ops:[]};return S={next:$(0),throw:$(1),return:$(2)},typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function $(k){return function(b){return function(v){if(d)throw new TypeError("Generator is already executing.");for(;g;)try{if(d=1,h&&(m=2&v[0]?h.return:v[0]?h.throw||((m=h.return)&&m.call(h),0):h.next)&&!(m=m.call(h,v[1])).done)return m;switch(h=0,m&&(v=[2&v[0],m.value]),v[0]){case 0:case 1:m=v;break;case 4:return g.label++,{value:v[1],done:!1};case 5:g.label++,h=v[1],v=[0];continue;case 7:v=g.ops.pop(),g.trys.pop();continue;default:if(m=g.trys,!((m=m.length>0&&m[m.length-1])||v[0]!==6&&v[0]!==2)){g=0;continue}if(v[0]===3&&(!m||v[1]>m[0]&&v[1]<m[3])){g.label=v[1];break}if(v[0]===6&&g.label<m[1]){g.label=m[1],m=v;break}if(m&&g.label<m[2]){g.label=m[2],g.ops.push(v);break}m[2]&&g.ops.pop(),g.trys.pop();continue}v=s.call(u,g)}catch(I){v=[6,I],h=0}finally{d=m=0}if(5&v[0])throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}([k,b])}}},a=We;Object.defineProperty(t,"__esModule",{value:!0});var i="browser-tabs-lock-key",o={key:function(u){return r(a,void 0,void 0,function(){return n(this,function(s){throw new Error("Unsupported")})})},getItem:function(u){return r(a,void 0,void 0,function(){return n(this,function(s){throw new Error("Unsupported")})})},clear:function(){return r(a,void 0,void 0,function(){return n(this,function(u){return[2,window.localStorage.clear()]})})},removeItem:function(u){return r(a,void 0,void 0,function(){return n(this,function(s){throw new Error("Unsupported")})})},setItem:function(u,s){return r(a,void 0,void 0,function(){return n(this,function(d){throw new Error("Unsupported")})})},keySync:function(u){return window.localStorage.key(u)},getItemSync:function(u){return window.localStorage.getItem(u)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(u){return window.localStorage.removeItem(u)},setItemSync:function(u,s){return window.localStorage.setItem(u,s)}};function c(u){return new Promise(function(s){return setTimeout(s,u)})}function l(u){for(var s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",d="",h=0;h<u;h++)d+=s[Math.floor(Math.random()*s.length)];return d}var f=function(){function u(s){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+l(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=s,u.waiters===void 0&&(u.waiters=[])}return u.prototype.acquireLock=function(s,d){return d===void 0&&(d=5e3),r(this,void 0,void 0,function(){var h,m,S,g,$,k,b;return n(this,function(v){switch(v.label){case 0:h=Date.now()+l(4),m=Date.now()+d,S=i+"-"+s,g=this.storageHandler===void 0?o:this.storageHandler,v.label=1;case 1:return Date.now()<m?[4,c(30)]:[3,8];case 2:return v.sent(),g.getItemSync(S)!==null?[3,5]:($=this.id+"-"+s+"-"+h,[4,c(Math.floor(25*Math.random()))]);case 3:return v.sent(),g.setItemSync(S,JSON.stringify({id:this.id,iat:h,timeoutKey:$,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,c(30)];case 4:return v.sent(),(k=g.getItemSync(S))!==null&&(b=JSON.parse(k)).id===this.id&&b.iat===h?(this.acquiredIatSet.add(h),this.refreshLockWhileAcquired(S,h),[2,!0]):[3,7];case 5:return u.lockCorrector(this.storageHandler===void 0?o:this.storageHandler),[4,this.waitForSomethingToChange(m)];case 6:v.sent(),v.label=7;case 7:return h=Date.now()+l(4),[3,1];case 8:return[2,!1]}})})},u.prototype.refreshLockWhileAcquired=function(s,d){return r(this,void 0,void 0,function(){var h=this;return n(this,function(m){return setTimeout(function(){return r(h,void 0,void 0,function(){var S,g,$;return n(this,function(k){switch(k.label){case 0:return[4,Ge.default().lock(d)];case 1:return k.sent(),this.acquiredIatSet.has(d)?(S=this.storageHandler===void 0?o:this.storageHandler,(g=S.getItemSync(s))===null?(Ge.default().unlock(d),[2]):(($=JSON.parse(g)).timeRefreshed=Date.now(),S.setItemSync(s,JSON.stringify($)),Ge.default().unlock(d),this.refreshLockWhileAcquired(s,d),[2])):(Ge.default().unlock(d),[2])}})})},1e3),[2]})})},u.prototype.waitForSomethingToChange=function(s){return r(this,void 0,void 0,function(){return n(this,function(d){switch(d.label){case 0:return[4,new Promise(function(h){var m=!1,S=Date.now(),g=!1;function $(){if(g||(window.removeEventListener("storage",$),u.removeFromWaiting($),clearTimeout(k),g=!0),!m){m=!0;var b=50-(Date.now()-S);b>0?setTimeout(h,b):h(null)}}window.addEventListener("storage",$),u.addToWaiting($);var k=setTimeout($,Math.max(0,s-Date.now()))})];case 1:return d.sent(),[2]}})})},u.addToWaiting=function(s){this.removeFromWaiting(s),u.waiters!==void 0&&u.waiters.push(s)},u.removeFromWaiting=function(s){u.waiters!==void 0&&(u.waiters=u.waiters.filter(function(d){return d!==s}))},u.notifyWaiters=function(){u.waiters!==void 0&&u.waiters.slice().forEach(function(s){return s()})},u.prototype.releaseLock=function(s){return r(this,void 0,void 0,function(){return n(this,function(d){switch(d.label){case 0:return[4,this.releaseLock__private__(s)];case 1:return[2,d.sent()]}})})},u.prototype.releaseLock__private__=function(s){return r(this,void 0,void 0,function(){var d,h,m,S;return n(this,function(g){switch(g.label){case 0:return d=this.storageHandler===void 0?o:this.storageHandler,h=i+"-"+s,(m=d.getItemSync(h))===null?[2]:(S=JSON.parse(m)).id!==this.id?[3,2]:[4,Ge.default().lock(S.iat)];case 1:g.sent(),this.acquiredIatSet.delete(S.iat),d.removeItemSync(h),Ge.default().unlock(S.iat),u.notifyWaiters(),g.label=2;case 2:return[2]}})})},u.lockCorrector=function(s){for(var d=Date.now()-5e3,h=s,m=[],S=0;;){var g=h.keySync(S);if(g===null)break;m.push(g),S++}for(var $=!1,k=0;k<m.length;k++){var b=m[k];if(b.includes(i)){var v=h.getItemSync(b);if(v!==null){var I=JSON.parse(v);(I.timeRefreshed===void 0&&I.timeAcquired<d||I.timeRefreshed!==void 0&&I.timeRefreshed<d)&&(h.removeItemSync(b),$=!0)}}}$&&u.notifyWaiters()},u.waiters=void 0,u}();t.default=f}));const iw={timeoutInSeconds:60},Cu={name:"auth0-spa-js",version:"2.1.3"},ju=()=>Date.now();let ne=class Ca extends Error{constructor(t,r){super(r),this.error=t,this.error_description=r,Object.setPrototypeOf(this,Ca.prototype)}static fromPayload({error:t,error_description:r}){return new Ca(t,r)}},ow=class Au extends ne{constructor(t,r,n,a=null){super(t,r),this.state=n,this.appState=a,Object.setPrototypeOf(this,Au.prototype)}},ja=class Lu extends ne{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,Lu.prototype)}},sw=class Uu extends ja{constructor(t){super(),this.popup=t,Object.setPrototypeOf(this,Uu.prototype)}},cw=class xu extends ne{constructor(t){super("cancelled","Popup closed"),this.popup=t,Object.setPrototypeOf(this,xu.prototype)}},uw=class Nu extends ne{constructor(t,r,n){super(t,r),this.mfa_token=n,Object.setPrototypeOf(this,Nu.prototype)}},Du=class Mu extends ne{constructor(t,r){super("missing_refresh_token",`Missing Refresh Token (audience: '${hs(t,["default"])}', scope: '${hs(r)}')`),this.audience=t,this.scope=r,Object.setPrototypeOf(this,Mu.prototype)}};function hs(e,t=[]){return e&&!t.includes(e)?e:""}const Ur=()=>window.crypto,ea=()=>{const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let t="";return Array.from(Ur().getRandomValues(new Uint8Array(43))).forEach(r=>t+=e[r%e.length]),t},vs=e=>btoa(e),Aa=e=>{var{clientId:t}=e,r=Se(e,["clientId"]);return new URLSearchParams((n=>Object.keys(n).filter(a=>n[a]!==void 0).reduce((a,i)=>Object.assign(Object.assign({},a),{[i]:n[i]}),{}))(Object.assign({client_id:t},r))).toString()},ps=e=>(t=>decodeURIComponent(atob(t).split("").map(r=>"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),lw=async(e,t)=>{const r=await fetch(e,t);return{ok:r.ok,json:await r.json()}},fw=async(e,t,r)=>{const n=new AbortController;let a;return t.signal=n.signal,Promise.race([lw(e,t),new Promise((i,o)=>{a=setTimeout(()=>{n.abort(),o(new Error("Timeout when executing 'fetch'"))},r)})]).finally(()=>{clearTimeout(a)})},dw=async(e,t,r,n,a,i,o)=>{return c={auth:{audience:t,scope:r},timeout:a,fetchUrl:e,fetchOptions:n,useFormData:o},l=i,new Promise(function(f,u){const s=new MessageChannel;s.port1.onmessage=function(d){d.data.error?u(new Error(d.data.error)):f(d.data),s.port1.close()},l.postMessage(c,[s.port2])});var c,l},hw=async(e,t,r,n,a,i,o=1e4)=>a?dw(e,t,r,n,o,a,i):fw(e,n,o);async function vw(e,t){var{baseUrl:r,timeout:n,audience:a,scope:i,auth0Client:o,useFormData:c}=e,l=Se(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);const f=c?Aa(l):JSON.stringify(l);return await async function(u,s,d,h,m,S,g){let $,k=null;for(let C=0;C<3;C++)try{$=await hw(u,d,h,m,S,g,s),k=null;break}catch(F){k=F}if(k)throw k;const b=$.json,{error:v,error_description:I}=b,O=Se(b,["error","error_description"]),{ok:_}=$;if(!_){const C=I||`HTTP error. Unable to fetch ${u}`;throw v==="mfa_required"?new uw(v,C,O.mfa_token):v==="missing_refresh_token"?new Du(d,h):new ne(v||"request_error",C)}return O}(`${r}/oauth/token`,n,a||"default",i,{method:"POST",body:f,headers:{"Content-Type":c?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(o||Cu))}},t,c)}const $r=(...e)=>{return(t=e.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(t))).join(" ");var t};let Ye=class La{constructor(t,r="@@auth0spajs@@",n){this.prefix=r,this.suffix=n,this.clientId=t.clientId,this.scope=t.scope,this.audience=t.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(t){const[r,n,a,i]=t.split("::");return new La({clientId:n,scope:i,audience:a},r)}static fromCacheEntry(t){const{scope:r,audience:n,client_id:a}=t;return new La({scope:r,audience:n,clientId:a})}},pw=class{set(t,r){localStorage.setItem(t,JSON.stringify(r))}get(t){const r=window.localStorage.getItem(t);if(r)try{return JSON.parse(r)}catch{return}}remove(t){localStorage.removeItem(t)}allKeys(){return Object.keys(window.localStorage).filter(t=>t.startsWith("@@auth0spajs@@"))}},Fu=class{constructor(){this.enclosedCache=function(){let t={};return{set(r,n){t[r]=n},get(r){const n=t[r];if(n)return n},remove(r){delete t[r]},allKeys:()=>Object.keys(t)}}()}},mw=class{constructor(t,r,n){this.cache=t,this.keyManifest=r,this.nowProvider=n||ju}async setIdToken(t,r,n){var a;const i=this.getIdTokenCacheKey(t);await this.cache.set(i,{id_token:r,decodedToken:n}),await((a=this.keyManifest)===null||a===void 0?void 0:a.add(i))}async getIdToken(t){const r=await this.cache.get(this.getIdTokenCacheKey(t.clientId));if(!r&&t.scope&&t.audience){const n=await this.get(t);return!n||!n.id_token||!n.decodedToken?void 0:{id_token:n.id_token,decodedToken:n.decodedToken}}if(r)return{id_token:r.id_token,decodedToken:r.decodedToken}}async get(t,r=0){var n;let a=await this.cache.get(t.toKey());if(!a){const c=await this.getCacheKeys();if(!c)return;const l=this.matchExistingCacheKey(t,c);l&&(a=await this.cache.get(l))}if(!a)return;const i=await this.nowProvider(),o=Math.floor(i/1e3);return a.expiresAt-r<o?a.body.refresh_token?(a.body={refresh_token:a.body.refresh_token},await this.cache.set(t.toKey(),a),a.body):(await this.cache.remove(t.toKey()),void await((n=this.keyManifest)===null||n===void 0?void 0:n.remove(t.toKey()))):a.body}async set(t){var r;const n=new Ye({clientId:t.client_id,scope:t.scope,audience:t.audience}),a=await this.wrapCacheEntry(t);await this.cache.set(n.toKey(),a),await((r=this.keyManifest)===null||r===void 0?void 0:r.add(n.toKey()))}async clear(t){var r;const n=await this.getCacheKeys();n&&(await n.filter(a=>!t||a.includes(t)).reduce(async(a,i)=>{await a,await this.cache.remove(i)},Promise.resolve()),await((r=this.keyManifest)===null||r===void 0?void 0:r.clear()))}async wrapCacheEntry(t){const r=await this.nowProvider();return{body:t,expiresAt:Math.floor(r/1e3)+t.expires_in}}async getCacheKeys(){var t;return this.keyManifest?(t=await this.keyManifest.get())===null||t===void 0?void 0:t.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(t){return new Ye({clientId:t},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(t,r){return r.filter(n=>{var a;const i=Ye.fromKey(n),o=new Set(i.scope&&i.scope.split(" ")),c=((a=t.scope)===null||a===void 0?void 0:a.split(" "))||[],l=i.scope&&c.reduce((f,u)=>f&&o.has(u),!0);return i.prefix==="@@auth0spajs@@"&&i.clientId===t.clientId&&i.audience===t.audience&&l})[0]}},gw=class{constructor(t,r,n){this.storage=t,this.clientId=r,this.cookieDomain=n,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(t){this.storage.save(this.storageKey,t,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}};const Mt=e=>typeof e=="number",yw=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],ww=e=>{if(!e.id_token)throw new Error("ID token is required but missing");const t=(i=>{const o=i.split("."),[c,l,f]=o;if(o.length!==3||!c||!l||!f)throw new Error("ID token could not be decoded");const u=JSON.parse(ps(l)),s={__raw:i},d={};return Object.keys(u).forEach(h=>{s[h]=u[h],yw.includes(h)||(d[h]=u[h])}),{encoded:{header:c,payload:l,signature:f},header:JSON.parse(ps(c)),claims:s,user:d}})(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${e.iss}", found "${t.claims.iss}"`);if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(t.header.alg!=="RS256")throw new Error(`Signature algorithm of "${t.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!t.claims.aud||typeof t.claims.aud!="string"&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but was not one of "${t.claims.aud.join(", ")}"`);if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${e.aud}", found "${t.claims.azp}"`)}}else if(t.claims.aud!==e.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but found "${t.claims.aud}"`);if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${e.nonce}", found "${t.claims.nonce}"`)}if(e.max_age&&!Mt(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(t.claims.exp==null||!Mt(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Mt(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const r=e.leeway||60,n=new Date(e.now||Date.now()),a=new Date(0);if(a.setUTCSeconds(t.claims.exp+r),n>a)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${n}) is after expiration time (${a})`);if(t.claims.nbf!=null&&Mt(t.claims.nbf)){const i=new Date(0);if(i.setUTCSeconds(t.claims.nbf-r),n<i)throw new Error(`Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (${n}) is before ${i}`)}if(t.claims.auth_time!=null&&Mt(t.claims.auth_time)){const i=new Date(0);if(i.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+r),n>i)throw new Error(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (${n}) is after last auth at ${i}`)}if(e.organization){const i=e.organization.trim();if(i.startsWith("org_")){const o=i;if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(o!==t.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${o}", found "${t.claims.org_id}"`)}else{const o=i.toLowerCase();if(!t.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(o!==t.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${o}", found "${t.claims.org_name}"`)}}return t};var Je=Si(function(e,t){var r=We&&We.__assign||function(){return r=Object.assign||function(l){for(var f,u=1,s=arguments.length;u<s;u++)for(var d in f=arguments[u])Object.prototype.hasOwnProperty.call(f,d)&&(l[d]=f[d]);return l},r.apply(this,arguments)};function n(l,f){if(!f)return"";var u="; "+l;return f===!0?u:u+"="+f}function a(l,f,u){return encodeURIComponent(l).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(f).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(s){if(typeof s.expires=="number"){var d=new Date;d.setMilliseconds(d.getMilliseconds()+864e5*s.expires),s.expires=d}return n("Expires",s.expires?s.expires.toUTCString():"")+n("Domain",s.domain)+n("Path",s.path)+n("Secure",s.secure)+n("SameSite",s.sameSite)}(u)}function i(l){for(var f={},u=l?l.split("; "):[],s=/(%[\dA-F]{2})+/gi,d=0;d<u.length;d++){var h=u[d].split("="),m=h.slice(1).join("=");m.charAt(0)==='"'&&(m=m.slice(1,-1));try{f[h[0].replace(s,decodeURIComponent)]=m.replace(s,decodeURIComponent)}catch{}}return f}function o(){return i(document.cookie)}function c(l,f,u){document.cookie=a(l,f,r({path:"/"},u))}t.__esModule=!0,t.encode=a,t.parse=i,t.getAll=o,t.get=function(l){return o()[l]},t.set=c,t.remove=function(l,f){c(l,"",r(r({},f),{expires:-1}))}});bi(Je),Je.encode,Je.parse,Je.getAll;var bw=Je.get,zu=Je.set,Hu=Je.remove;const ft={get(e){const t=bw(e);if(t!==void 0)return JSON.parse(t)},save(e,t,r){let n={};window.location.protocol==="https:"&&(n={secure:!0,sameSite:"none"}),r!=null&&r.daysUntilExpire&&(n.expires=r.daysUntilExpire),r!=null&&r.cookieDomain&&(n.domain=r.cookieDomain),zu(e,JSON.stringify(t),n)},remove(e,t){let r={};t!=null&&t.cookieDomain&&(r.domain=t.cookieDomain),Hu(e,r)}},Sw={get(e){return ft.get(e)||ft.get(`_legacy_${e}`)},save(e,t,r){let n={};window.location.protocol==="https:"&&(n={secure:!0}),r!=null&&r.daysUntilExpire&&(n.expires=r.daysUntilExpire),r!=null&&r.cookieDomain&&(n.domain=r.cookieDomain),zu(`_legacy_${e}`,JSON.stringify(t),n),ft.save(e,t,r)},remove(e,t){let r={};t!=null&&t.cookieDomain&&(r.domain=t.cookieDomain),Hu(e,r),ft.remove(e,t),ft.remove(`_legacy_${e}`,t)}},Iw={get(e){if(typeof sessionStorage>"u")return;const t=sessionStorage.getItem(e);return t!=null?JSON.parse(t):void 0},save(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove(e){sessionStorage.removeItem(e)}};function $w(e,t,r){var n=t===void 0?null:t,a=function(l,f){var u=atob(l);if(f){for(var s=new Uint8Array(u.length),d=0,h=u.length;d<h;++d)s[d]=u.charCodeAt(d);return String.fromCharCode.apply(null,new Uint16Array(s.buffer))}return u}(e,r!==void 0&&r),i=a.indexOf(`
|
|
2
2
|
`,10)+1,o=a.substring(i)+(n?"//# sourceMappingURL="+n:""),c=new Blob([o],{type:"application/javascript"});return URL.createObjectURL(c)}var ms,gs,ys,ta,kw=(ms="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=",gs=null,ys=!1,function(e){return ta=ta||$w(ms,gs,ys),new Worker(ta,e)});const ra={};let Pw=class{constructor(t,r){this.cache=t,this.clientId=r,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(t){var r;const n=new Set(((r=await this.cache.get(this.manifestKey))===null||r===void 0?void 0:r.keys)||[]);n.add(t),await this.cache.set(this.manifestKey,{keys:[...n]})}async remove(t){const r=await this.cache.get(this.manifestKey);if(r){const n=new Set(r.keys);return n.delete(t),n.size>0?await this.cache.set(this.manifestKey,{keys:[...n]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(t){return`@@auth0spajs@@::${t}`}};const Tw={memory:()=>new Fu().enclosedCache,localstorage:()=>new pw},ws=e=>Tw[e],bs=e=>{const{openUrl:t,onRedirect:r}=e,n=Se(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},n),{openUrl:t===!1||t?t:r})},na=new aw;let Ew=class{constructor(t){let r,n;if(this.userCache=new Fu().enclosedCache,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{await na.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),t),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),t.authorizationParams)}),typeof window<"u"&&(()=>{if(!Ur())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(Ur().subtle===void 0)throw new Error(`
|
|
3
3
|
auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.
|
|
4
4
|
`)})(),t.cache&&t.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),t.cache)n=t.cache;else{if(r=t.cacheLocation||"memory",!ws(r))throw new Error(`Invalid cache location "${r}"`);n=ws(r)()}this.httpTimeoutMs=t.httpTimeoutInSeconds?1e3*t.httpTimeoutInSeconds:1e4,this.cookieStorage=t.legacySameSiteCookie===!1?ft:Sw,this.orgHintCookieName=`auth0.${this.options.clientId}.organization_hint`,this.isAuthenticatedCookieName=(o=>`auth0.${o}.is.authenticated`)(this.options.clientId),this.sessionCheckExpiryDays=t.sessionCheckExpiryDays||1;const a=t.useCookiesForTransactions?this.cookieStorage:Iw;var i;this.scope=$r("openid",this.options.authorizationParams.scope,this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new gw(a,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||ju,this.cacheManager=new mw(n,n.allKeys?void 0:new Pw(n,this.options.clientId),this.nowProvider),this.domainUrl=(i=this.options.domain,/^https?:\/\//.test(i)?i:`https://${i}`),this.tokenIssuer=((o,c)=>o?o.startsWith("https://")?o:`https://${o}/`:`${c}/`)(this.options.issuer,this.domainUrl),typeof window<"u"&&window.Worker&&this.options.useRefreshTokens&&r==="memory"&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new kw)}_url(t){const r=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||Cu)));return`${this.domainUrl}${t}&auth0Client=${r}`}_authorizeUrl(t){return this._url(`/authorize?${Aa(t)}`)}async _verifyIdToken(t,r,n){const a=await this.nowProvider();return ww({iss:this.tokenIssuer,aud:this.options.clientId,id_token:t,nonce:r,organization:n,leeway:this.options.leeway,max_age:(i=this.options.authorizationParams.max_age,typeof i!="string"?i:parseInt(i,10)||void 0),now:a});var i}_processOrgHint(t){t?this.cookieStorage.save(this.orgHintCookieName,t,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(t,r,n){const a=vs(ea()),i=vs(ea()),o=ea(),c=(u=>{const s=new Uint8Array(u);return(d=>{const h={"+":"-","/":"_","=":""};return d.replace(/[+/=]/g,m=>h[m])})(window.btoa(String.fromCharCode(...Array.from(s))))})(await(async u=>await Ur().subtle.digest({name:"SHA-256"},new TextEncoder().encode(u)))(o)),l=((u,s,d,h,m,S,g,$)=>Object.assign(Object.assign(Object.assign({client_id:u.clientId},u.authorizationParams),d),{scope:$r(s,d.scope),response_type:"code",response_mode:$||"query",state:h,nonce:m,redirect_uri:g||u.authorizationParams.redirect_uri,code_challenge:S,code_challenge_method:"S256"}))(this.options,this.scope,t,a,i,c,t.redirect_uri||this.options.authorizationParams.redirect_uri||n,r==null?void 0:r.response_mode),f=this._authorizeUrl(l);return{nonce:i,code_verifier:o,scope:l.scope,audience:l.audience||"default",redirect_uri:l.redirect_uri,state:a,url:f}}async loginWithPopup(t,r){var n;if(t=t||{},!(r=r||{}).popup&&(r.popup=(c=>{const l=window.screenX+(window.innerWidth-400)/2,f=window.screenY+(window.innerHeight-600)/2;return window.open(c,"auth0:authorize:popup",`left=${l},top=${f},width=400,height=600,resizable,scrollbars=yes,status=1`)})(""),!r.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");const a=await this._prepareAuthorizeUrl(t.authorizationParams||{},{response_mode:"web_message"},window.location.origin);r.popup.location.href=a.url;const i=await(c=>new Promise((l,f)=>{let u;const s=setInterval(()=>{c.popup&&c.popup.closed&&(clearInterval(s),clearTimeout(d),window.removeEventListener("message",u,!1),f(new cw(c.popup)))},1e3),d=setTimeout(()=>{clearInterval(s),f(new sw(c.popup)),window.removeEventListener("message",u,!1)},1e3*(c.timeoutInSeconds||60));u=function(h){if(h.data&&h.data.type==="authorization_response"){if(clearTimeout(d),clearInterval(s),window.removeEventListener("message",u,!1),c.popup.close(),h.data.response.error)return f(ne.fromPayload(h.data.response));l(h.data.response)}},window.addEventListener("message",u)}))(Object.assign(Object.assign({},r),{timeoutInSeconds:r.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(a.state!==i.state)throw new ne("state_mismatch","Invalid state");const o=((n=t.authorizationParams)===null||n===void 0?void 0:n.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:a.audience,scope:a.scope,code_verifier:a.code_verifier,grant_type:"authorization_code",code:i.code,redirect_uri:a.redirect_uri},{nonceIn:a.nonce,organization:o})}async getUser(){var t;const r=await this._getIdTokenFromCache();return(t=r==null?void 0:r.decodedToken)===null||t===void 0?void 0:t.user}async getIdTokenClaims(){var t;const r=await this._getIdTokenFromCache();return(t=r==null?void 0:r.decodedToken)===null||t===void 0?void 0:t.claims}async loginWithRedirect(t={}){var r;const n=bs(t),{openUrl:a,fragment:i,appState:o}=n,c=Se(n,["openUrl","fragment","appState"]),l=((r=c.authorizationParams)===null||r===void 0?void 0:r.organization)||this.options.authorizationParams.organization,f=await this._prepareAuthorizeUrl(c.authorizationParams||{}),{url:u}=f,s=Se(f,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},s),{appState:o}),l&&{organization:l}));const d=i?`${u}#${i}`:u;a?await a(d):window.location.assign(d)}async handleRedirectCallback(t=window.location.href){const r=t.split("?").slice(1);if(r.length===0)throw new Error("There are no query params available for parsing.");const{state:n,code:a,error:i,error_description:o}=(s=>{s.indexOf("#")>-1&&(s=s.substring(0,s.indexOf("#")));const d=new URLSearchParams(s);return{state:d.get("state"),code:d.get("code")||void 0,error:d.get("error")||void 0,error_description:d.get("error_description")||void 0}})(r.join("")),c=this.transactionManager.get();if(!c)throw new ne("missing_transaction","Invalid state");if(this.transactionManager.remove(),i)throw new ow(i,o||i,n,c.appState);if(!c.code_verifier||c.state&&c.state!==n)throw new ne("state_mismatch","Invalid state");const l=c.organization,f=c.nonce,u=c.redirect_uri;return await this._requestToken(Object.assign({audience:c.audience,scope:c.scope,code_verifier:c.code_verifier,grant_type:"authorization_code",code:a},u?{redirect_uri:u}:{}),{nonceIn:f,organization:l}),{appState:c.appState}}async checkSession(t){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(t)}catch{}}async getTokenSilently(t={}){var r;const n=Object.assign(Object.assign({cacheMode:"on"},t),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),t.authorizationParams),{scope:$r(this.scope,(r=t.authorizationParams)===null||r===void 0?void 0:r.scope)})}),a=await((i,o)=>{let c=ra[o];return c||(c=i().finally(()=>{delete ra[o],c=null}),ra[o]=c),c})(()=>this._getTokenSilently(n),`${this.options.clientId}::${n.authorizationParams.audience}::${n.authorizationParams.scope}`);return t.detailedResponse?a:a==null?void 0:a.access_token}async _getTokenSilently(t){const{cacheMode:r}=t,n=Se(t,["cacheMode"]);if(r!=="off"){const a=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(a)return a}if(r!=="cache-only"){if(!await(async(a,i=3)=>{for(let o=0;o<i;o++)if(await a())return!0;return!1})(()=>na.acquireLock("auth0.lock.getTokenSilently",5e3),10))throw new ja;try{if(window.addEventListener("pagehide",this._releaseLockOnPageHide),r!=="off"){const f=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(f)return f}const a=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(n):await this._getTokenFromIFrame(n),{id_token:i,access_token:o,oauthTokenScope:c,expires_in:l}=a;return Object.assign(Object.assign({id_token:i,access_token:o},c?{scope:c}:null),{expires_in:l})}finally{await na.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}}async getTokenWithPopup(t={},r={}){var n;const a=Object.assign(Object.assign({},t),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),t.authorizationParams),{scope:$r(this.scope,(n=t.authorizationParams)===null||n===void 0?void 0:n.scope)})});return r=Object.assign(Object.assign({},iw),r),await this.loginWithPopup(a,r),(await this.cacheManager.get(new Ye({scope:a.authorizationParams.scope,audience:a.authorizationParams.audience||"default",clientId:this.options.clientId}))).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(t){t.clientId!==null?t.clientId=t.clientId||this.options.clientId:delete t.clientId;const r=t.logoutParams||{},{federated:n}=r,a=Se(r,["federated"]),i=n?"&federated":"";return this._url(`/v2/logout?${Aa(Object.assign({clientId:t.clientId},a))}`)+i}async logout(t={}){const r=bs(t),{openUrl:n}=r,a=Se(r,["openUrl"]);t.clientId===null?await this.cacheManager.clear():await this.cacheManager.clear(t.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@");const i=this._buildLogoutUrl(a);n?await n(i):n!==!1&&window.location.assign(i)}async _getTokenFromIFrame(t){const r=Object.assign(Object.assign({},t.authorizationParams),{prompt:"none"}),n=this.cookieStorage.get(this.orgHintCookieName);n&&!r.organization&&(r.organization=n);const{url:a,state:i,nonce:o,code_verifier:c,redirect_uri:l,scope:f,audience:u}=await this._prepareAuthorizeUrl(r,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new ne("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const s=t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,d=await((m,S,g=60)=>new Promise(($,k)=>{const b=window.document.createElement("iframe");b.setAttribute("width","0"),b.setAttribute("height","0"),b.style.display="none";const v=()=>{window.document.body.contains(b)&&(window.document.body.removeChild(b),window.removeEventListener("message",I,!1))};let I;const O=setTimeout(()=>{k(new ja),v()},1e3*g);I=function(_){if(_.origin!=S||!_.data||_.data.type!=="authorization_response")return;const C=_.source;C&&C.close(),_.data.response.error?k(ne.fromPayload(_.data.response)):$(_.data.response),clearTimeout(O),window.removeEventListener("message",I,!1),setTimeout(v,2e3)},window.addEventListener("message",I,!1),window.document.body.appendChild(b),b.setAttribute("src",m)}))(a,this.domainUrl,s);if(i!==d.state)throw new ne("state_mismatch","Invalid state");const h=await this._requestToken(Object.assign(Object.assign({},t.authorizationParams),{code_verifier:c,code:d.code,grant_type:"authorization_code",redirect_uri:l,timeout:t.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:o,organization:r.organization});return Object.assign(Object.assign({},h),{scope:f,oauthTokenScope:h.scope,audience:u})}catch(s){throw s.error==="login_required"&&this.logout({openUrl:!1}),s}}async _getTokenUsingRefreshToken(t){const r=await this.cacheManager.get(new Ye({scope:t.authorizationParams.scope,audience:t.authorizationParams.audience||"default",clientId:this.options.clientId}));if(!(r&&r.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(t);throw new Du(t.authorizationParams.audience||"default",t.authorizationParams.scope)}const n=t.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,a=typeof t.timeoutInSeconds=="number"?1e3*t.timeoutInSeconds:null;try{const i=await this._requestToken(Object.assign(Object.assign(Object.assign({},t.authorizationParams),{grant_type:"refresh_token",refresh_token:r&&r.refresh_token,redirect_uri:n}),a&&{timeout:a}));return Object.assign(Object.assign({},i),{scope:t.authorizationParams.scope,oauthTokenScope:i.scope,audience:t.authorizationParams.audience||"default"})}catch(i){if((i.message.indexOf("Missing Refresh Token")>-1||i.message&&i.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(t);throw i}}async _saveEntryInCache(t){const{id_token:r,decodedToken:n}=t,a=Se(t,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:r,decodedToken:n}),await this.cacheManager.setIdToken(this.options.clientId,t.id_token,t.decodedToken),await this.cacheManager.set(a)}async _getIdTokenFromCache(){const t=this.options.authorizationParams.audience||"default",r=await this.cacheManager.getIdToken(new Ye({clientId:this.options.clientId,audience:t,scope:this.scope})),n=this.userCache.get("@@user@@");return r&&r.id_token===(n==null?void 0:n.id_token)?n:(this.userCache.set("@@user@@",r),r)}async _getEntryFromCache({scope:t,audience:r,clientId:n}){const a=await this.cacheManager.get(new Ye({scope:t,audience:r,clientId:n}),60);if(a&&a.access_token){const{access_token:i,oauthTokenScope:o,expires_in:c}=a,l=await this._getIdTokenFromCache();return l&&Object.assign(Object.assign({id_token:l.id_token,access_token:i},o?{scope:o}:null),{expires_in:c})}}async _requestToken(t,r){const{nonceIn:n,organization:a}=r||{},i=await vw(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},t),this.worker),o=await this._verifyIdToken(i.id_token,n,a);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},i),{decodedToken:o,scope:t.scope,audience:t.audience||"default"}),i.scope?{oauthTokenScope:i.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(a||o.claims.org_id),Object.assign(Object.assign({},i),{decodedToken:o})}};async function Ow(e){const t=new Ew(e);return await t.checkSession(),t}var ge=(e=>(e.READY="sesamyJsReady",e.AUTHENTICATED="sesamyJsAuthenticated",e.LOGOUT="sesamyJsLogout",e.CLEAR_CACHE="sesamyJsClearCache",e.USER_ATTRIBUTE_CHANGED="sesamyUserAttributeChanged",e.PURCHASE="sesamyJsPurchase",e))(ge||{});const _w="sesamy.com",Rw="sesamy.dev",Cw="https://sesa.my",Ua="sesamyCacheTimestamp";function Ae(e,t){return`https://${e}.${t==="dev"?Rw:_w}`}let ae,Bu;const St="sesamyAccessToken",aa="sesamyRefreshToken";async function jw(e){if(!e)return null;const t=localStorage.getItem(aa);if(!t)throw new Error("No refresh token available");const r=new URLSearchParams;r.set("client_id",e.iss),r.set("refresh_token",t),r.set("grant_type","refresh_token");const n=new URL(e.iss);n.pathname="/oauth/token",n.searchParams.set("user_id",e.sub);try{const a=await fetch(n.href,{body:r.toString(),method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"}});if(!a.ok)throw localStorage.removeItem(aa),new Error("Renew token failed");const i=await a.json();return localStorage.setItem(aa,i.refresh_token),localStorage.setItem(St,i.access_token),i.access_token}catch{Ku()}}async function Ii(){const e=localStorage.getItem(St);if(!e)return null;const t=Gu(e);if(!t||!t.exp||t.exp<new Date().getTime()/1e3){const r=await jw(t);if(r)return r;localStorage.removeItem(St)}return e}function Ss(e){try{const t=new URL(e).hostname,r=t.split(".");return r.length>1?r.slice(-2).join("."):t}catch{return null}}async function Aw(e){if(e.enabled===!1)return;Bu=e.organization;const t={domain:Ae("token",e.environment),clientId:e.clientId,useCookiesForTransactions:!0};if(Ss(window.location.href)!==Ss(Ae("auth",e.environment))&&(t.cacheLocation="localstorage",t.useRefreshTokens=!0),ae=await Ow(t),window.location.search.includes("code="))try{await ae.handleRedirectCallback();const r=await ae.getUser();De(ge.AUTHENTICATED,r);const n=new URL(location.href),a=n.searchParams;a.delete("code"),a.delete("state"),n.search=a.toString(),window.history.replaceState({},document.title,n.toString())}catch(r){console.error(r)}}async function $i(){return await Ii()?!0:ae?ae.isAuthenticated():!1}async function Lw(){return await Ii()?{sub:"local",name:"Local User"}:ae?ae.getUser():null}function ki(e){if(localStorage.removeItem(St),!ae)throw new Error("Auth0 client not initialized");const t=(e==null?void 0:e.authorizationParams)||{};return ae.loginWithRedirect({...e,authorizationParams:{organization:Bu,redirect_uri:window.location.href,...t}})}async function Ft(e=!0){const t=Ii();if(t)return t;try{return ae?await ae.getTokenSilently():null}catch(r){if(e)throw r;return null}}async function Ku(e={}){if(localStorage.removeItem(St),De(ge.LOGOUT,{}),!!ae)return ae.logout({...e,logoutParams:{returnTo:window.location.href,...e.logoutParams}})}function Gu(e){const t=e.split(".");if(t.length!==3)return null;const n=t[1].replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(n).split("").map(function(i){return"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a)}async function Wu(e){const t=Gu(e);if(!t||!t.exp||t.exp<new Date().getTime()/1e3)throw new Error("Invalid token");localStorage.setItem(St,e),De(ge.AUTHENTICATED,t)}const Uw=(e,t)=>t.skipDedupe||t.method!=="GET",xw=(e,t)=>t.method+"@"+e,Nw=e=>e.clone(),Is=({skip:e=Uw,key:t=xw,resolver:r=Nw}={})=>{const n=new Map;return a=>(i,o)=>{if(e(i,o))return a(i,o);const c=t(i,o);if(!n.has(c))n.set(c,[]);else return new Promise((l,f)=>{n.get(c).push([l,f])});try{return a(i,o).then(l=>(n.get(c).forEach(([f])=>f(r(l))),n.delete(c),l)).catch(l=>{throw n.get(c).forEach(([f,u])=>u(l)),n.delete(c),l})}catch(l){return n.delete(c),Promise.reject(l)}}},Dw=(e,t)=>e*t,Mw=e=>e&&e.ok,$s=({delayTimer:e=500,delayRamp:t=Dw,maxAttempts:r=10,until:n=Mw,onRetry:a=null,retryOnNetworkError:i=!1,resolveWithLatestResponse:o=!1,skip:c}={})=>l=>(f,u)=>{let s=0;if(c&&c(f,u))return l(f,u);const d=(h,m)=>Promise.resolve(n(h,m)).then(S=>S?h&&o?h:m?Promise.reject(m):h:(s++,!r||s<=r?new Promise(g=>{const $=t(e,s);setTimeout(()=>{typeof a=="function"?Promise.resolve(a({response:h,error:m,url:f,options:u})).then((k={})=>{var b,v;g(l((b=k&&k.url)!==null&&b!==void 0?b:f,(v=k&&k.options)!==null&&v!==void 0?v:u))}):g(l(f,u))},$)}).then(d).catch(g=>{if(!i)throw g;return d(null,g)}):h&&o?h:Promise.reject(m||new Error("Number of attempts exceeded."))));return l(f,u).then(d).catch(h=>{if(!i)throw h;return d(null,h)})},Fw="application/json",Vu="Content-Type",ut=Symbol(),Zu=Symbol();function ks(e={}){var t;return(t=Object.entries(e).find(([r])=>r.toLowerCase()===Vu.toLowerCase()))===null||t===void 0?void 0:t[1]}function Ps(e){return/^application\/.*json.*/.test(e)}const Xe=function(e,t,r=!1){return Object.entries(t).reduce((n,[a,i])=>{const o=e[a];return Array.isArray(o)&&Array.isArray(i)?n[a]=r?[...o,...i]:i:typeof o=="object"&&typeof i=="object"?n[a]=Xe(o,i,r):n[a]=i,n},{...e})},It={options:{},errorType:"text",polyfills:{},polyfill(e,t=!0,r=!1,...n){const a=this.polyfills[e]||(typeof self<"u"?self[e]:null)||(typeof global<"u"?global[e]:null);if(t&&!a)throw new Error(e+" is not defined");return r&&a?new a(...n):a}};function zw(e,t=!1){It.options=t?e:Xe(It.options,e)}function Hw(e,t=!1){It.polyfills=t?e:Xe(It.polyfills,e)}function Bw(e){It.errorType=e}const Kw=e=>t=>e.reduceRight((r,n)=>n(r),t)||t;class Yu extends Error{}const Gw=e=>{const t=Object.create(null);e=e._addons.reduce((b,v)=>v.beforeRequest&&v.beforeRequest(b,e._options,t)||b,e);const{_url:r,_options:n,_config:a,_catchers:i,_resolvers:o,_middlewares:c,_addons:l}=e,f=new Map(i),u=Xe(a.options,n);let s=r;const d=Kw(c)((b,v)=>(s=b,a.polyfill("fetch")(b,v)))(r,u),h=new Error,m=d.catch(b=>{throw{[ut]:b}}).then(b=>{if(!b.ok){const v=new Yu;if(v.cause=h,v.stack=v.stack+`
|
package/dist/sesamy-js.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
var El = Object.defineProperty;
|
|
2
2
|
var Ol = (e, t, r) => t in e ? El(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var ie = (e, t, r) => Ol(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
import "core-js/actual/fetch";
|
|
5
4
|
var lr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, re = function(e) {
|
|
6
5
|
try {
|
|
7
6
|
return !!e();
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
7
7
|
"tag": "latest"
|
|
8
8
|
},
|
|
9
|
-
"version": "1.18.
|
|
9
|
+
"version": "1.18.3",
|
|
10
10
|
"main": "dist/sesamy-js.cjs",
|
|
11
11
|
"module": "dist/sesamy-js.mjs",
|
|
12
12
|
"types": "dist/sesamy-js.d.ts",
|
|
@@ -69,7 +69,6 @@
|
|
|
69
69
|
"@typescript-eslint/eslint-plugin": "^7.15.0",
|
|
70
70
|
"@typescript-eslint/parser": "^7.15.0",
|
|
71
71
|
"copyfiles": "^2.4.1",
|
|
72
|
-
"core-js": "^3.37.1",
|
|
73
72
|
"dts-bundle-generator": "^9.5.1",
|
|
74
73
|
"eslint": "9.x",
|
|
75
74
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -90,6 +89,7 @@
|
|
|
90
89
|
"@analytics/scroll-utils": "^0.1.22",
|
|
91
90
|
"@auth0/auth0-spa-js": "^2.1.3",
|
|
92
91
|
"analytics": "^0.8.13",
|
|
92
|
+
"core-js": "^3.37.1",
|
|
93
93
|
"saturated": "^1.0.0",
|
|
94
94
|
"wretch": "^2.9.0"
|
|
95
95
|
}
|