@sesamy/sesamy-js 1.37.12 → 1.38.1

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.
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Ls=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qs={},xn,xs;function $e(){return xs||(xs=1,xn=function(e){try{return!!e()}catch{return!0}}),xn}var Nn,Ns;function cn(){if(Ns)return Nn;Ns=1;var e=$e();return Nn=!e(function(){var r=(function(){}).bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),Nn}var $n,$s;function Se(){if($s)return $n;$s=1;var e=cn(),r=Function.prototype,t=r.call,n=e&&r.bind.bind(t,t);return $n=e?n:function(a){return function(){return t.apply(a,arguments)}},$n}var Dn,Ds;function ln(){if(Ds)return Dn;Ds=1;var e=Se(),r=e({}.toString),t=e("".slice);return Dn=function(n){return t(r(n),8,-1)},Dn}var Mn,Ms;function Od(){if(Ms)return Mn;Ms=1;var e=Se(),r=$e(),t=ln(),n=Object,a=e("".split);return Mn=r(function(){return!n("z").propertyIsEnumerable(0)})?function(i){return t(i)==="String"?a(i,""):n(i)}:n,Mn}var Fn,Fs;function fn(){return Fs||(Fs=1,Fn=function(e){return e==null}),Fn}var Bn,Bs;function dn(){if(Bs)return Bn;Bs=1;var e=fn(),r=TypeError;return Bn=function(t){if(e(t))throw new r("Can't call method on "+t);return t},Bn}var zn,zs;function Ut(){if(zs)return zn;zs=1;var e=Od(),r=dn();return zn=function(t){return e(r(t))},zn}var wt,Hs;function Ie(){if(Hs)return wt;Hs=1;var e=function(r){return r&&r.Math===Math&&r};return wt=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof Ls=="object"&&Ls)||e(typeof wt=="object"&&wt)||function(){return this}()||Function("return this")(),wt}var Hn={exports:{}},Gn,Gs;function gr(){return Gs||(Gs=1,Gn=!1),Gn}var Kn,Ks;function Wo(){if(Ks)return Kn;Ks=1;var e=Ie(),r=Object.defineProperty;return Kn=function(t,n){try{r(e,t,{value:n,configurable:!0,writable:!0})}catch{e[t]=n}return n},Kn}var Ws;function Vo(){if(Ws)return Hn.exports;Ws=1;var e=gr(),r=Ie(),t=Wo(),n="__core-js_shared__",a=Hn.exports=r[n]||t(n,{});return(a.versions||(a.versions=[])).push({version:"3.45.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Hn.exports}var Wn,Vs;function kd(){if(Vs)return Wn;Vs=1;var e=Vo();return Wn=function(r,t){return e[r]||(e[r]=t||{})},Wn}var Vn,Js;function hn(){if(Js)return Vn;Js=1;var e=dn(),r=Object;return Vn=function(t){return r(e(t))},Vn}var Jn,Zs;function ar(){if(Zs)return Jn;Zs=1;var e=Se(),r=hn(),t=e({}.hasOwnProperty);return Jn=Object.hasOwn||function(a,i){return t(r(a),i)},Jn}var Zn,Ys;function Cd(){if(Ys)return Zn;Ys=1;var e=Se(),r=0,t=Math.random(),n=e(1.1.toString);return Zn=function(a){return"Symbol("+(a===void 0?"":a)+")_"+n(++r+t,36)},Zn}var Yn,Xs;function Lt(){if(Xs)return Yn;Xs=1;var e=Ie(),r=e.navigator,t=r&&r.userAgent;return Yn=t?String(t):"",Yn}var Xn,Qs;function Ad(){if(Qs)return Xn;Qs=1;var e=Ie(),r=Lt(),t=e.process,n=e.Deno,a=t&&t.versions||n&&n.version,i=a&&a.v8,o,s;return i&&(o=i.split("."),s=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!s&&r&&(o=r.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=r.match(/Chrome\/(\d+)/),o&&(s=+o[1]))),Xn=s,Xn}var Qn,eu;function jd(){if(eu)return Qn;eu=1;var e=Ad(),r=$e(),t=Ie(),n=t.String;return Qn=!!Object.getOwnPropertySymbols&&!r(function(){var a=Symbol("symbol detection");return!n(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Qn}var ea,ru;function Ud(){if(ru)return ea;ru=1;var e=jd();return ea=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ea}var ra,tu;function De(){if(tu)return ra;tu=1;var e=Ie(),r=kd(),t=ar(),n=Cd(),a=jd(),i=Ud(),o=e.Symbol,s=r("wks"),c=i?o.for||o:o&&o.withoutSetter||n;return ra=function(l){return t(s,l)||(s[l]=a&&t(o,l)?o[l]:c("Symbol."+l)),s[l]},ra}var ta,nu;function Ee(){if(nu)return ta;nu=1;var e=typeof document=="object"&&document.all;return ta=typeof e>"u"&&e!==void 0?function(r){return typeof r=="function"||r===e}:function(r){return typeof r=="function"},ta}var na,au;function ir(){if(au)return na;au=1;var e=Ee();return na=function(r){return typeof r=="object"?r!==null:e(r)},na}var aa,iu;function ur(){if(iu)return aa;iu=1;var e=ir(),r=String,t=TypeError;return aa=function(n){if(e(n))return n;throw new t(r(n)+" is not an object")},aa}var ia={},oa,ou;function Me(){if(ou)return oa;ou=1;var e=$e();return oa=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),oa}var sa,su;function Ld(){if(su)return sa;su=1;var e=Me(),r=$e();return sa=e&&r(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),sa}var ua={},ca,uu;function vn(){if(uu)return ca;uu=1;var e=Ie(),r=ir(),t=e.document,n=r(t)&&r(t.createElement);return ca=function(a){return n?t.createElement(a):{}},ca}var la,cu;function qd(){if(cu)return la;cu=1;var e=Me(),r=$e(),t=vn();return la=!e&&!r(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),la}var fa,lu;function ze(){if(lu)return fa;lu=1;var e=cn(),r=Function.prototype.call;return fa=e?r.bind(r):function(){return r.apply(r,arguments)},fa}var da,fu;function or(){if(fu)return da;fu=1;var e=Ie(),r=Ee(),t=function(n){return r(n)?n:void 0};return da=function(n,a){return arguments.length<2?t(e[n]):e[n]&&e[n][a]},da}var ha,du;function pn(){if(du)return ha;du=1;var e=Se();return ha=e({}.isPrototypeOf),ha}var va,hu;function xd(){if(hu)return va;hu=1;var e=or(),r=Ee(),t=pn(),n=Ud(),a=Object;return va=n?function(i){return typeof i=="symbol"}:function(i){var o=e("Symbol");return r(o)&&t(o.prototype,a(i))},va}var pa,vu;function mn(){if(vu)return pa;vu=1;var e=String;return pa=function(r){try{return e(r)}catch{return"Object"}},pa}var ma,pu;function cr(){if(pu)return ma;pu=1;var e=Ee(),r=mn(),t=TypeError;return ma=function(n){if(e(n))return n;throw new t(r(n)+" is not a function")},ma}var ga,mu;function Jo(){if(mu)return ga;mu=1;var e=cr(),r=fn();return ga=function(t,n){var a=t[n];return r(a)?void 0:e(a)},ga}var ya,gu;function Pv(){if(gu)return ya;gu=1;var e=ze(),r=Ee(),t=ir(),n=TypeError;return ya=function(a,i){var o,s;if(i==="string"&&r(o=a.toString)&&!t(s=e(o,a))||r(o=a.valueOf)&&!t(s=e(o,a))||i!=="string"&&r(o=a.toString)&&!t(s=e(o,a)))return s;throw new n("Can't convert object to primitive value")},ya}var wa,yu;function Ev(){if(yu)return wa;yu=1;var e=ze(),r=ir(),t=xd(),n=Jo(),a=Pv(),i=De(),o=TypeError,s=i("toPrimitive");return wa=function(c,l){if(!r(c)||t(c))return c;var u=n(c,s),f;if(u){if(l===void 0&&(l="default"),f=e(u,c,l),!r(f)||t(f))return f;throw new o("Can't convert object to primitive value")}return l===void 0&&(l="number"),a(c,l)},wa}var ba,wu;function Nd(){if(wu)return ba;wu=1;var e=Ev(),r=xd();return ba=function(t){var n=e(t,"string");return r(n)?n:n+""},ba}var bu;function Pr(){if(bu)return ua;bu=1;var e=Me(),r=qd(),t=Ld(),n=ur(),a=Nd(),i=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c="enumerable",l="configurable",u="writable";return ua.f=e?t?function(h,d,v){if(n(h),d=a(d),n(v),typeof h=="function"&&d==="prototype"&&"value"in v&&u in v&&!v[u]){var m=s(h,d);m&&m[u]&&(h[d]=v.value,v={configurable:l in v?v[l]:m[l],enumerable:c in v?v[c]:m[c],writable:!1})}return o(h,d,v)}:o:function(h,d,v){if(n(h),d=a(d),n(v),r)try{return o(h,d,v)}catch{}if("get"in v||"set"in v)throw new i("Accessors not supported");return"value"in v&&(h[d]=v.value),h},ua}var Sa,Su;function Rv(){if(Su)return Sa;Su=1;var e=Math.ceil,r=Math.floor;return Sa=Math.trunc||function(n){var a=+n;return(a>0?r:e)(a)},Sa}var Ia,Iu;function Zo(){if(Iu)return Ia;Iu=1;var e=Rv();return Ia=function(r){var t=+r;return t!==t||t===0?0:e(t)},Ia}var Pa,Pu;function $d(){if(Pu)return Pa;Pu=1;var e=Zo(),r=Math.max,t=Math.min;return Pa=function(n,a){var i=e(n);return i<0?r(i+a,0):t(i,a)},Pa}var Ea,Eu;function _v(){if(Eu)return Ea;Eu=1;var e=Zo(),r=Math.min;return Ea=function(t){var n=e(t);return n>0?r(n,9007199254740991):0},Ea}var Ra,Ru;function Yo(){if(Ru)return Ra;Ru=1;var e=_v();return Ra=function(r){return e(r.length)},Ra}var _a,_u;function Tv(){if(_u)return _a;_u=1;var e=Ut(),r=$d(),t=Yo(),n=function(a){return function(i,o,s){var c=e(i),l=t(c);if(l===0)return!a&&-1;var u=r(s,l),f;if(a&&o!==o){for(;l>u;)if(f=c[u++],f!==f)return!0}else for(;l>u;u++)if((a||u in c)&&c[u]===o)return a||u||0;return!a&&-1}};return _a={includes:n(!0),indexOf:n(!1)},_a}var Ta,Tu;function Xo(){return Tu||(Tu=1,Ta={}),Ta}var Oa,Ou;function Dd(){if(Ou)return Oa;Ou=1;var e=Se(),r=ar(),t=Ut(),n=Tv().indexOf,a=Xo(),i=e([].push);return Oa=function(o,s){var c=t(o),l=0,u=[],f;for(f in c)!r(a,f)&&r(c,f)&&i(u,f);for(;s.length>l;)r(c,f=s[l++])&&(~n(u,f)||i(u,f));return u},Oa}var ka,ku;function Qo(){return ku||(ku=1,ka=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),ka}var Ca,Cu;function Md(){if(Cu)return Ca;Cu=1;var e=Dd(),r=Qo();return Ca=Object.keys||function(n){return e(n,r)},Ca}var Au;function Ov(){if(Au)return ia;Au=1;var e=Me(),r=Ld(),t=Pr(),n=ur(),a=Ut(),i=Md();return ia.f=e&&!r?Object.defineProperties:function(s,c){n(s);for(var l=a(c),u=i(c),f=u.length,h=0,d;f>h;)t.f(s,d=u[h++],l[d]);return s},ia}var Aa,ju;function Fd(){if(ju)return Aa;ju=1;var e=or();return Aa=e("document","documentElement"),Aa}var ja,Uu;function es(){if(Uu)return ja;Uu=1;var e=kd(),r=Cd(),t=e("keys");return ja=function(n){return t[n]||(t[n]=r(n))},ja}var Ua,Lu;function qt(){if(Lu)return Ua;Lu=1;var e=ur(),r=Ov(),t=Qo(),n=Xo(),a=Fd(),i=vn(),o=es(),s=">",c="<",l="prototype",u="script",f=o("IE_PROTO"),h=function(){},d=function(b){return c+u+s+b+c+"/"+u+s},v=function(b){b.write(d("")),b.close();var g=b.parentWindow.Object;return b=null,g},m=function(){var b=i("iframe"),g="java"+u+":",p;return b.style.display="none",a.appendChild(b),b.src=String(g),p=b.contentWindow.document,p.open(),p.write(d("document.F=Object")),p.close(),p.F},y,E=function(){try{y=new ActiveXObject("htmlfile")}catch{}E=typeof document<"u"?document.domain&&y?v(y):m():v(y);for(var b=t.length;b--;)delete E[l][t[b]];return E()};return n[f]=!0,Ua=Object.create||function(g,p){var w;return g!==null?(h[l]=e(g),w=new h,h[l]=null,w[f]=g):w=E(),p===void 0?w:r.f(w,p)},Ua}var La,qu;function kv(){if(qu)return La;qu=1;var e=De(),r=qt(),t=Pr().f,n=e("unscopables"),a=Array.prototype;return a[n]===void 0&&t(a,n,{configurable:!0,value:r(null)}),La=function(i){a[n][i]=!0},La}var qa,xu;function xt(){return xu||(xu=1,qa={}),qa}var xa,Nu;function Cv(){if(Nu)return xa;Nu=1;var e=Ie(),r=Ee(),t=e.WeakMap;return xa=r(t)&&/native code/.test(String(t)),xa}var Na,$u;function zr(){return $u||($u=1,Na=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}),Na}var $a,Du;function Hr(){if(Du)return $a;Du=1;var e=Me(),r=Pr(),t=zr();return $a=e?function(n,a,i){return r.f(n,a,t(1,i))}:function(n,a,i){return n[a]=i,n},$a}var Da,Mu;function ft(){if(Mu)return Da;Mu=1;var e=Cv(),r=Ie(),t=ir(),n=Hr(),a=ar(),i=Vo(),o=es(),s=Xo(),c="Object already initialized",l=r.TypeError,u=r.WeakMap,f,h,d,v=function(b){return d(b)?h(b):f(b,{})},m=function(b){return function(g){var p;if(!t(g)||(p=h(g)).type!==b)throw new l("Incompatible receiver, "+b+" required");return p}};if(e||i.state){var y=i.state||(i.state=new u);y.get=y.get,y.has=y.has,y.set=y.set,f=function(b,g){if(y.has(b))throw new l(c);return g.facade=b,y.set(b,g),g},h=function(b){return y.get(b)||{}},d=function(b){return y.has(b)}}else{var E=o("state");s[E]=!0,f=function(b,g){if(a(b,E))throw new l(c);return g.facade=b,n(b,E,g),g},h=function(b){return a(b,E)?b[E]:{}},d=function(b){return a(b,E)}}return Da={set:f,get:h,has:d,enforce:v,getterFor:m},Da}var Ma={},Fa={},Fu;function Bd(){if(Fu)return Fa;Fu=1;var e={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,t=r&&!e.call({1:2},1);return Fa.f=t?function(a){var i=r(this,a);return!!i&&i.enumerable}:e,Fa}var Bu;function zd(){if(Bu)return Ma;Bu=1;var e=Me(),r=ze(),t=Bd(),n=zr(),a=Ut(),i=Nd(),o=ar(),s=qd(),c=Object.getOwnPropertyDescriptor;return Ma.f=e?c:function(u,f){if(u=a(u),f=i(f),s)try{return c(u,f)}catch{}if(o(u,f))return n(!r(t.f,u,f),u[f])},Ma}var Ba={exports:{}},za,zu;function Hd(){if(zu)return za;zu=1;var e=Me(),r=ar(),t=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,a=r(t,"name"),i=a&&(function(){}).name==="something",o=a&&(!e||e&&n(t,"name").configurable);return za={EXISTS:a,PROPER:i,CONFIGURABLE:o},za}var Ha,Hu;function rs(){if(Hu)return Ha;Hu=1;var e=Se(),r=Ee(),t=Vo(),n=e(Function.toString);return r(t.inspectSource)||(t.inspectSource=function(a){return n(a)}),Ha=t.inspectSource,Ha}var Gu;function Gd(){if(Gu)return Ba.exports;Gu=1;var e=Se(),r=$e(),t=Ee(),n=ar(),a=Me(),i=Hd().CONFIGURABLE,o=rs(),s=ft(),c=s.enforce,l=s.get,u=String,f=Object.defineProperty,h=e("".slice),d=e("".replace),v=e([].join),m=a&&!r(function(){return f(function(){},"length",{value:8}).length!==8}),y=String(String).split("String"),E=Ba.exports=function(b,g,p){h(u(g),0,7)==="Symbol("&&(g="["+d(u(g),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),p&&p.getter&&(g="get "+g),p&&p.setter&&(g="set "+g),(!n(b,"name")||i&&b.name!==g)&&(a?f(b,"name",{value:g,configurable:!0}):b.name=g),m&&p&&n(p,"arity")&&b.length!==p.arity&&f(b,"length",{value:p.arity});try{p&&n(p,"constructor")&&p.constructor?a&&f(b,"prototype",{writable:!1}):b.prototype&&(b.prototype=void 0)}catch{}var w=c(b);return n(w,"source")||(w.source=v(y,typeof g=="string"?g:"")),b};return Function.prototype.toString=E(function(){return t(this)&&l(this).source||o(this)},"toString"),Ba.exports}var Ga,Ku;function sr(){if(Ku)return Ga;Ku=1;var e=Ee(),r=Pr(),t=Gd(),n=Wo();return Ga=function(a,i,o,s){s||(s={});var c=s.enumerable,l=s.name!==void 0?s.name:i;if(e(o)&&t(o,l,s),s.global)c?a[i]=o:n(i,o);else{try{s.unsafe?a[i]&&(c=!0):delete a[i]}catch{}c?a[i]=o:r.f(a,i,{value:o,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return a},Ga}var Ka={},Wu;function Av(){if(Wu)return Ka;Wu=1;var e=Dd(),r=Qo(),t=r.concat("length","prototype");return Ka.f=Object.getOwnPropertyNames||function(a){return e(a,t)},Ka}var Wa={},Vu;function Kd(){return Vu||(Vu=1,Wa.f=Object.getOwnPropertySymbols),Wa}var Va,Ju;function jv(){if(Ju)return Va;Ju=1;var e=or(),r=Se(),t=Av(),n=Kd(),a=ur(),i=r([].concat);return Va=e("Reflect","ownKeys")||function(s){var c=t.f(a(s)),l=n.f;return l?i(c,l(s)):c},Va}var Ja,Zu;function Wd(){if(Zu)return Ja;Zu=1;var e=ar(),r=jv(),t=zd(),n=Pr();return Ja=function(a,i,o){for(var s=r(i),c=n.f,l=t.f,u=0;u<s.length;u++){var f=s[u];!e(a,f)&&!(o&&e(o,f))&&c(a,f,l(i,f))}},Ja}var Za,Yu;function Vd(){if(Yu)return Za;Yu=1;var e=$e(),r=Ee(),t=/#|\.prototype\./,n=function(c,l){var u=i[a(c)];return u===s?!0:u===o?!1:r(l)?e(l):!!l},a=n.normalize=function(c){return String(c).replace(t,".").toLowerCase()},i=n.data={},o=n.NATIVE="N",s=n.POLYFILL="P";return Za=n,Za}var Ya,Xu;function ke(){if(Xu)return Ya;Xu=1;var e=Ie(),r=zd().f,t=Hr(),n=sr(),a=Wo(),i=Wd(),o=Vd();return Ya=function(s,c){var l=s.target,u=s.global,f=s.stat,h,d,v,m,y,E;if(u?d=e:f?d=e[l]||a(l,{}):d=e[l]&&e[l].prototype,d)for(v in c){if(y=c[v],s.dontCallGetSet?(E=r(d,v),m=E&&E.value):m=d[v],h=o(u?v:l+(f?".":"#")+v,s.forced),!h&&m!==void 0){if(typeof y==typeof m)continue;i(y,m)}(s.sham||m&&m.sham)&&t(y,"sham",!0),n(d,v,y,s)}},Ya}var Xa,Qu;function Uv(){if(Qu)return Xa;Qu=1;var e=$e();return Xa=!e(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),Xa}var Qa,ec;function ts(){if(ec)return Qa;ec=1;var e=ar(),r=Ee(),t=hn(),n=es(),a=Uv(),i=n("IE_PROTO"),o=Object,s=o.prototype;return Qa=a?o.getPrototypeOf:function(c){var l=t(c);if(e(l,i))return l[i];var u=l.constructor;return r(u)&&l instanceof u?u.prototype:l instanceof o?s:null},Qa}var ei,rc;function Jd(){if(rc)return ei;rc=1;var e=$e(),r=Ee(),t=ir(),n=qt(),a=ts(),i=sr(),o=De(),s=gr(),c=o("iterator"),l=!1,u,f,h;[].keys&&(h=[].keys(),"next"in h?(f=a(a(h)),f!==Object.prototype&&(u=f)):l=!0);var d=!t(u)||e(function(){var v={};return u[c].call(v)!==v});return d?u={}:s&&(u=n(u)),r(u[c])||i(u,c,function(){return this}),ei={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:l},ei}var ri,tc;function dt(){if(tc)return ri;tc=1;var e=Pr().f,r=ar(),t=De(),n=t("toStringTag");return ri=function(a,i,o){a&&!o&&(a=a.prototype),a&&!r(a,n)&&e(a,n,{configurable:!0,value:i})},ri}var ti,nc;function Zd(){if(nc)return ti;nc=1;var e=Jd().IteratorPrototype,r=qt(),t=zr(),n=dt(),a=xt(),i=function(){return this};return ti=function(o,s,c,l){var u=s+" Iterator";return o.prototype=r(e,{next:t(+!l,c)}),n(o,u,!1,!0),a[u]=i,o},ti}var ni,ac;function Lv(){if(ac)return ni;ac=1;var e=Se(),r=cr();return ni=function(t,n,a){try{return e(r(Object.getOwnPropertyDescriptor(t,n)[a]))}catch{}},ni}var ai,ic;function qv(){if(ic)return ai;ic=1;var e=ir();return ai=function(r){return e(r)||r===null},ai}var ii,oc;function xv(){if(oc)return ii;oc=1;var e=qv(),r=String,t=TypeError;return ii=function(n){if(e(n))return n;throw new t("Can't set "+r(n)+" as a prototype")},ii}var oi,sc;function ns(){if(sc)return oi;sc=1;var e=Lv(),r=ir(),t=dn(),n=xv();return oi=Object.setPrototypeOf||("__proto__"in{}?function(){var a=!1,i={},o;try{o=e(Object.prototype,"__proto__","set"),o(i,[]),a=i instanceof Array}catch{}return function(c,l){return t(c),n(l),r(c)&&(a?o(c,l):c.__proto__=l),c}}():void 0),oi}var si,uc;function Yd(){if(uc)return si;uc=1;var e=ke(),r=ze(),t=gr(),n=Hd(),a=Ee(),i=Zd(),o=ts(),s=ns(),c=dt(),l=Hr(),u=sr(),f=De(),h=xt(),d=Jd(),v=n.PROPER,m=n.CONFIGURABLE,y=d.IteratorPrototype,E=d.BUGGY_SAFARI_ITERATORS,b=f("iterator"),g="keys",p="values",w="entries",k=function(){return this};return si=function(q,C,B,z,re,L,D){i(B,C,z);var x=function(Z){if(Z===re&&S)return S;if(!E&&Z&&Z in te)return te[Z];switch(Z){case g:return function(){return new B(this,Z)};case p:return function(){return new B(this,Z)};case w:return function(){return new B(this,Z)}}return function(){return new B(this)}},O=C+" Iterator",Y=!1,te=q.prototype,Q=te[b]||te["@@iterator"]||re&&te[re],S=!E&&Q||x(re),_=C==="Array"&&te.entries||Q,N,H,G;if(_&&(N=o(_.call(new q)),N!==Object.prototype&&N.next&&(!t&&o(N)!==y&&(s?s(N,y):a(N[b])||u(N,b,k)),c(N,O,!0,!0),t&&(h[O]=k))),v&&re===p&&Q&&Q.name!==p&&(!t&&m?l(te,"name",p):(Y=!0,S=function(){return r(Q,this)})),re)if(H={values:x(p),keys:L?S:x(g),entries:x(w)},D)for(G in H)(E||Y||!(G in te))&&u(te,G,H[G]);else e({target:C,proto:!0,forced:E||Y},H);return(!t||D)&&te[b]!==S&&u(te,b,S,{name:re}),h[C]=S,H},si}var ui,cc;function as(){return cc||(cc=1,ui=function(e,r){return{value:e,done:r}}),ui}var ci,lc;function is(){if(lc)return ci;lc=1;var e=Ut(),r=kv(),t=xt(),n=ft(),a=Pr().f,i=Yd(),o=as(),s=gr(),c=Me(),l="Array Iterator",u=n.set,f=n.getterFor(l);ci=i(Array,"Array",function(d,v){u(this,{type:l,target:e(d),index:0,kind:v})},function(){var d=f(this),v=d.target,m=d.index++;if(!v||m>=v.length)return d.target=null,o(void 0,!0);switch(d.kind){case"keys":return o(m,!1);case"values":return o(v[m],!1)}return o([m,v[m]],!1)},"values");var h=t.Arguments=t.Array;if(r("keys"),r("values"),r("entries"),!s&&c&&h.name!=="values")try{a(h,"name",{value:"values"})}catch{}return ci}var fc={},dc;function Nv(){if(dc)return fc;dc=1;var e=ke(),r=Se(),t=$d(),n=RangeError,a=String.fromCharCode,i=String.fromCodePoint,o=r([].join),s=!!i&&i.length!==1;return e({target:"String",stat:!0,arity:1,forced:s},{fromCodePoint:function(l){for(var u=[],f=arguments.length,h=0,d;f>h;){if(d=+arguments[h++],t(d,1114111)!==d)throw new n(d+" is not a valid code point");u[h]=d<65536?a(d):a(((d-=65536)>>10)+55296,d%1024+56320)}return o(u,"")}}),fc}var li,hc;function Xd(){if(hc)return li;hc=1;var e=Ie(),r=Me(),t=Object.getOwnPropertyDescriptor;return li=function(n){if(!r)return e[n];var a=t(e,n);return a&&a.value},li}var fi,vc;function gn(){if(vc)return fi;vc=1;var e=$e(),r=De(),t=Me(),n=gr(),a=r("iterator");return fi=!e(function(){var i=new URL("b?a=1&b=2&c=3","https://a"),o=i.searchParams,s=new URLSearchParams("a=1&a=2&b=3"),c="";return i.pathname="c%20d",o.forEach(function(l,u){o.delete("b"),c+=u+l}),s.delete("a",2),s.delete("b",void 0),n&&(!i.toJSON||!s.has("a",1)||s.has("a",2)||!s.has("a",void 0)||s.has("b"))||!o.size&&(n||!t)||!o.sort||i.href!=="https://a/c%20d?a=1&c=3"||o.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!o[a]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||c!=="a1c3"||new URL("https://x",void 0).host!=="x"}),fi}var di,pc;function yn(){if(pc)return di;pc=1;var e=Gd(),r=Pr();return di=function(t,n,a){return a.get&&e(a.get,n,{getter:!0}),a.set&&e(a.set,n,{setter:!0}),r.f(t,n,a)},di}var hi,mc;function $v(){if(mc)return hi;mc=1;var e=sr();return hi=function(r,t,n){for(var a in t)e(r,a,t[a],n);return r},hi}var vi,gc;function os(){if(gc)return vi;gc=1;var e=pn(),r=TypeError;return vi=function(t,n){if(e(n,t))return t;throw new r("Incorrect invocation")},vi}var pi,yc;function Dv(){if(yc)return pi;yc=1;var e=ln(),r=Se();return pi=function(t){if(e(t)==="Function")return r(t)},pi}var mi,wc;function ht(){if(wc)return mi;wc=1;var e=Dv(),r=cr(),t=cn(),n=e(e.bind);return mi=function(a,i){return r(a),i===void 0?a:t?n(a,i):function(){return a.apply(i,arguments)}},mi}var gi,bc;function ss(){if(bc)return gi;bc=1;var e=De(),r=e("toStringTag"),t={};return t[r]="z",gi=String(t)==="[object z]",gi}var yi,Sc;function Nt(){if(Sc)return yi;Sc=1;var e=ss(),r=Ee(),t=ln(),n=De(),a=n("toStringTag"),i=Object,o=t(function(){return arguments}())==="Arguments",s=function(c,l){try{return c[l]}catch{}};return yi=e?t:function(c){var l,u,f;return c===void 0?"Undefined":c===null?"Null":typeof(u=s(l=i(c),a))=="string"?u:o?t(l):(f=t(l))==="Object"&&r(l.callee)?"Arguments":f},yi}var wi,Ic;function Er(){if(Ic)return wi;Ic=1;var e=Nt(),r=String;return wi=function(t){if(e(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return r(t)},wi}var bi,Pc;function wn(){if(Pc)return bi;Pc=1;var e=Nt(),r=Jo(),t=fn(),n=xt(),a=De(),i=a("iterator");return bi=function(o){if(!t(o))return r(o,i)||r(o,"@@iterator")||n[e(o)]},bi}var Si,Ec;function us(){if(Ec)return Si;Ec=1;var e=ze(),r=cr(),t=ur(),n=mn(),a=wn(),i=TypeError;return Si=function(o,s){var c=arguments.length<2?a(o):s;if(r(c))return t(e(c,o));throw new i(n(o)+" is not iterable")},Si}var Ii,Rc;function Gr(){if(Rc)return Ii;Rc=1;var e=TypeError;return Ii=function(r,t){if(r<t)throw new e("Not enough arguments");return r},Ii}var Pi,_c;function bn(){if(_c)return Pi;_c=1;var e=Se();return Pi=e([].slice),Pi}var Ei,Tc;function Mv(){if(Tc)return Ei;Tc=1;var e=bn(),r=Math.floor,t=function(n,a){var i=n.length;if(i<8)for(var o=1,s,c;o<i;){for(c=o,s=n[o];c&&a(n[c-1],s)>0;)n[c]=n[--c];c!==o++&&(n[c]=s)}else for(var l=r(i/2),u=t(e(n,0,l),a),f=t(e(n,l),a),h=u.length,d=f.length,v=0,m=0;v<h||m<d;)n[v+m]=v<h&&m<d?a(u[v],f[m])<=0?u[v++]:f[m++]:v<h?u[v++]:f[m++];return n};return Ei=t,Ei}var Ri,Oc;function Qd(){if(Oc)return Ri;Oc=1,is(),Nv();var e=ke(),r=Ie(),t=Xd(),n=or(),a=ze(),i=Se(),o=Me(),s=gn(),c=sr(),l=yn(),u=$v(),f=dt(),h=Zd(),d=ft(),v=os(),m=Ee(),y=ar(),E=ht(),b=Nt(),g=ur(),p=ir(),w=Er(),k=qt(),q=zr(),C=us(),B=wn(),z=as(),re=Gr(),L=De(),D=Mv(),x=L("iterator"),O="URLSearchParams",Y=O+"Iterator",te=d.set,Q=d.getterFor(O),S=d.getterFor(Y),_=t("fetch"),N=t("Request"),H=t("Headers"),G=N&&N.prototype,Z=H&&H.prototype,fe=r.TypeError,ie=r.encodeURIComponent,ce=String.fromCharCode,oe=n("String","fromCodePoint"),Re=parseInt,Te=i("".charAt),Fe=i([].join),Ce=i([].push),Je=i("".replace),lr=i([].shift),fr=i([].splice),T=i("".split),M=i("".slice),J=i(/./.exec),ve=/\+/g,pe="�",me=/^[0-9a-f]+$/i,Ae=function($,W){var V=M($,W,W+2);return J(me,V)?Re(V,16):NaN},Ze=function($){for(var W=0,V=128;V>0&&($&V)!==0;V>>=1)W++;return W},F=function($){var W=null;switch($.length){case 1:W=$[0];break;case 2:W=($[0]&31)<<6|$[1]&63;break;case 3:W=($[0]&15)<<12|($[1]&63)<<6|$[2]&63;break;case 4:W=($[0]&7)<<18|($[1]&63)<<12|($[2]&63)<<6|$[3]&63;break}return W>1114111?null:W},ee=function($){$=Je($,ve," ");for(var W=$.length,V="",X=0;X<W;){var ue=Te($,X);if(ue==="%"){if(Te($,X+1)==="%"||X+3>W){V+="%",X++;continue}var de=Ae($,X+1);if(de!==de){V+=ue,X++;continue}X+=2;var we=Ze(de);if(we===0)ue=ce(de);else{if(we===1||we>4){V+=pe,X++;continue}for(var be=[de],_e=1;_e<we&&(X++,!(X+3>W||Te($,X)!=="%"));){var Be=Ae($,X+1);if(Be!==Be){X+=3;break}if(Be>191||Be<128)break;Ce(be,Be),X+=2,_e++}if(be.length!==we){V+=pe;continue}var dr=F(be);dr===null?V+=pe:ue=oe(dr)}}V+=ue,X++}return V},le=/[!'()~]|%20/g,he={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ge=function($){return he[$]},Ye=function($){return Je(ie($),le,ge)},Ue=h(function(W,V){te(this,{type:Y,target:Q(W).entries,index:0,kind:V})},O,function(){var W=S(this),V=W.target,X=W.index++;if(!V||X>=V.length)return W.target=null,z(void 0,!0);var ue=V[X];switch(W.kind){case"keys":return z(ue.key,!1);case"values":return z(ue.value,!1)}return z([ue.key,ue.value],!1)},!0),Ge=function($){this.entries=[],this.url=null,$!==void 0&&(p($)?this.parseObject($):this.parseQuery(typeof $=="string"?Te($,0)==="?"?M($,1):$:w($)))};Ge.prototype={type:O,bindURL:function($){this.url=$,this.update()},parseObject:function($){var W=this.entries,V=B($),X,ue,de,we,be,_e,Be;if(V)for(X=C($,V),ue=X.next;!(de=a(ue,X)).done;){if(we=C(g(de.value)),be=we.next,(_e=a(be,we)).done||(Be=a(be,we)).done||!a(be,we).done)throw new fe("Expected sequence with length 2");Ce(W,{key:w(_e.value),value:w(Be.value)})}else for(var dr in $)y($,dr)&&Ce(W,{key:dr,value:w($[dr])})},parseQuery:function($){if($)for(var W=this.entries,V=T($,"&"),X=0,ue,de;X<V.length;)ue=V[X++],ue.length&&(de=T(ue,"="),Ce(W,{key:ee(lr(de)),value:ee(Fe(de,"="))}))},serialize:function(){for(var $=this.entries,W=[],V=0,X;V<$.length;)X=$[V++],Ce(W,Ye(X.key)+"="+Ye(X.value));return Fe(W,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Le=function(){v(this,er);var W=arguments.length>0?arguments[0]:void 0,V=te(this,new Ge(W));o||(this.size=V.entries.length)},er=Le.prototype;if(u(er,{append:function(W,V){var X=Q(this);re(arguments.length,2),Ce(X.entries,{key:w(W),value:w(V)}),o||this.length++,X.updateURL()},delete:function($){for(var W=Q(this),V=re(arguments.length,1),X=W.entries,ue=w($),de=V<2?void 0:arguments[1],we=de===void 0?de:w(de),be=0;be<X.length;){var _e=X[be];if(_e.key===ue&&(we===void 0||_e.value===we)){if(fr(X,be,1),we!==void 0)break}else be++}o||(this.size=X.length),W.updateURL()},get:function(W){var V=Q(this).entries;re(arguments.length,1);for(var X=w(W),ue=0;ue<V.length;ue++)if(V[ue].key===X)return V[ue].value;return null},getAll:function(W){var V=Q(this).entries;re(arguments.length,1);for(var X=w(W),ue=[],de=0;de<V.length;de++)V[de].key===X&&Ce(ue,V[de].value);return ue},has:function(W){for(var V=Q(this).entries,X=re(arguments.length,1),ue=w(W),de=X<2?void 0:arguments[1],we=de===void 0?de:w(de),be=0;be<V.length;){var _e=V[be++];if(_e.key===ue&&(we===void 0||_e.value===we))return!0}return!1},set:function(W,V){var X=Q(this);re(arguments.length,1);for(var ue=X.entries,de=!1,we=w(W),be=w(V),_e=0,Be;_e<ue.length;_e++)Be=ue[_e],Be.key===we&&(de?fr(ue,_e--,1):(de=!0,Be.value=be));de||Ce(ue,{key:we,value:be}),o||(this.size=ue.length),X.updateURL()},sort:function(){var W=Q(this);D(W.entries,function(V,X){return V.key>X.key?1:-1}),W.updateURL()},forEach:function(W){for(var V=Q(this).entries,X=E(W,arguments.length>1?arguments[1]:void 0),ue=0,de;ue<V.length;)de=V[ue++],X(de.value,de.key,this)},keys:function(){return new Ue(this,"keys")},values:function(){return new Ue(this,"values")},entries:function(){return new Ue(this,"entries")}},{enumerable:!0}),c(er,x,er.entries,{name:"entries"}),c(er,"toString",function(){return Q(this).serialize()},{enumerable:!0}),o&&l(er,"size",{get:function(){return Q(this).entries.length},configurable:!0,enumerable:!0}),f(Le,O),e({global:!0,constructor:!0,forced:!s},{URLSearchParams:Le}),!s&&m(H)){var Kr=i(Z.has),yt=i(Z.set),Wr=function($){if(p($)){var W=$.body,V;if(b(W)===O)return V=$.headers?new H($.headers):new H,Kr(V,"content-type")||yt(V,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),k($,{body:q(0,w(W)),headers:q(0,V)})}return $};if(m(_)&&e({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(W){return _(W,arguments.length>1?Wr(arguments[1]):{})}}),m(N)){var Vr=function(W){return v(this,G),new N(W,arguments.length>1?Wr(arguments[1]):{})};G.constructor=Vr,Vr.prototype=G,e({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Vr})}}return Ri={URLSearchParams:Le,getState:Q},Ri}var kc;function Fv(){return kc||(kc=1,Qd()),qs}var Cc={},Ac;function Bv(){if(Ac)return Cc;Ac=1;var e=sr(),r=Se(),t=Er(),n=Gr(),a=URLSearchParams,i=a.prototype,o=r(i.append),s=r(i.delete),c=r(i.forEach),l=r([].push),u=new a("a=1&a=2&b=3");return u.delete("a",1),u.delete("b",void 0),u+""!="a=2"&&e(i,"delete",function(f){var h=arguments.length,d=h<2?void 0:arguments[1];if(h&&d===void 0)return s(this,f);var v=[];c(this,function(k,q){l(v,{key:q,value:k})}),n(h,1);for(var m=t(f),y=t(d),E=0,b=0,g=!1,p=v.length,w;E<p;)w=v[E++],g||w.key===m?(g=!0,s(this,w.key)):b++;for(;b<p;)w=v[b++],w.key===m&&w.value===y||o(this,w.key,w.value)},{enumerable:!0,unsafe:!0}),Cc}var jc={},Uc;function zv(){if(Uc)return jc;Uc=1;var e=sr(),r=Se(),t=Er(),n=Gr(),a=URLSearchParams,i=a.prototype,o=r(i.getAll),s=r(i.has),c=new a("a=1");return(c.has("a",2)||!c.has("a",void 0))&&e(i,"has",function(u){var f=arguments.length,h=f<2?void 0:arguments[1];if(f&&h===void 0)return s(this,u);var d=o(this,u);n(f,1);for(var v=t(h),m=0;m<d.length;)if(d[m++]===v)return!0;return!1},{enumerable:!0,unsafe:!0}),jc}var Lc={},qc;function Hv(){if(qc)return Lc;qc=1;var e=Me(),r=Se(),t=yn(),n=URLSearchParams.prototype,a=r(n.forEach);return e&&!("size"in n)&&t(n,"size",{get:function(){var o=0;return a(this,function(){o++}),o},configurable:!0,enumerable:!0}),Lc}var _i,xc;function Sn(){if(xc)return _i;xc=1;var e=Ie();return _i=e,_i}var Ti,Nc;function eh(){if(Nc)return Ti;Nc=1,Fv(),Bv(),zv(),Hv();var e=Sn();return Ti=e.URLSearchParams,Ti}var $c={},Dc={},Mc={},Oi,Fc;function rh(){if(Fc)return Oi;Fc=1;var e=Se(),r=Zo(),t=Er(),n=dn(),a=e("".charAt),i=e("".charCodeAt),o=e("".slice),s=function(c){return function(l,u){var f=t(n(l)),h=r(u),d=f.length,v,m;return h<0||h>=d?c?"":void 0:(v=i(f,h),v<55296||v>56319||h+1===d||(m=i(f,h+1))<56320||m>57343?c?a(f,h):v:c?o(f,h,h+2):(v-55296<<10)+(m-56320)+65536)}};return Oi={codeAt:s(!1),charAt:s(!0)},Oi}var Bc;function th(){if(Bc)return Mc;Bc=1;var e=rh().charAt,r=Er(),t=ft(),n=Yd(),a=as(),i="String Iterator",o=t.set,s=t.getterFor(i);return n(String,"String",function(c){o(this,{type:i,string:r(c),index:0})},function(){var l=s(this),u=l.string,f=l.index,h;return f>=u.length?a(void 0,!0):(h=e(u,f),l.index+=h.length,a(h,!1))}),Mc}var ki,zc;function Gv(){if(zc)return ki;zc=1;var e=Me(),r=Se(),t=ze(),n=$e(),a=Md(),i=Kd(),o=Bd(),s=hn(),c=Od(),l=Object.assign,u=Object.defineProperty,f=r([].concat);return ki=!l||n(function(){if(e&&l({b:1},l(u({},"a",{enumerable:!0,get:function(){u(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var h={},d={},v=Symbol("assign detection"),m="abcdefghijklmnopqrst";return h[v]=7,m.split("").forEach(function(y){d[y]=y}),l({},h)[v]!==7||a(l({},d)).join("")!==m})?function(d,v){for(var m=s(d),y=arguments.length,E=1,b=i.f,g=o.f;y>E;)for(var p=c(arguments[E++]),w=b?f(a(p),b(p)):a(p),k=w.length,q=0,C;k>q;)C=w[q++],(!e||t(g,p,C))&&(m[C]=p[C]);return m}:l,ki}var Ci,Hc;function nh(){if(Hc)return Ci;Hc=1;var e=ze(),r=ur(),t=Jo();return Ci=function(n,a,i){var o,s;r(n);try{if(o=t(n,"return"),!o){if(a==="throw")throw i;return i}o=e(o,n)}catch(c){s=!0,o=c}if(a==="throw")throw i;if(s)throw o;return r(o),i},Ci}var Ai,Gc;function Kv(){if(Gc)return Ai;Gc=1;var e=ur(),r=nh();return Ai=function(t,n,a,i){try{return i?n(e(a)[0],a[1]):n(a)}catch(o){r(t,"throw",o)}},Ai}var ji,Kc;function ah(){if(Kc)return ji;Kc=1;var e=De(),r=xt(),t=e("iterator"),n=Array.prototype;return ji=function(a){return a!==void 0&&(r.Array===a||n[t]===a)},ji}var Ui,Wc;function ih(){if(Wc)return Ui;Wc=1;var e=Se(),r=$e(),t=Ee(),n=Nt(),a=or(),i=rs(),o=function(){},s=a("Reflect","construct"),c=/^\s*(?:class|function)\b/,l=e(c.exec),u=!c.test(o),f=function(v){if(!t(v))return!1;try{return s(o,[],v),!0}catch{return!1}},h=function(v){if(!t(v))return!1;switch(n(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return u||!!l(c,i(v))}catch{return!0}};return h.sham=!0,Ui=!s||r(function(){var d;return f(f.call)||!f(Object)||!f(function(){d=!0})||d})?h:f,Ui}var Li,Vc;function Wv(){if(Vc)return Li;Vc=1;var e=Me(),r=Pr(),t=zr();return Li=function(n,a,i){e?r.f(n,a,t(0,i)):n[a]=i},Li}var qi,Jc;function Vv(){if(Jc)return qi;Jc=1;var e=ht(),r=ze(),t=hn(),n=Kv(),a=ah(),i=ih(),o=Yo(),s=Wv(),c=us(),l=wn(),u=Array;return qi=function(h){var d=t(h),v=i(this),m=arguments.length,y=m>1?arguments[1]:void 0,E=y!==void 0;E&&(y=e(y,m>2?arguments[2]:void 0));var b=l(d),g=0,p,w,k,q,C,B;if(b&&!(this===u&&a(b)))for(w=v?new this:[],q=c(d,b),C=q.next;!(k=r(C,q)).done;g++)B=E?n(q,y,[k.value,g],!0):k.value,s(w,g,B);else for(p=o(d),w=v?new this(p):u(p);p>g;g++)B=E?y(d[g],g):d[g],s(w,g,B);return w.length=g,w},qi}var xi,Zc;function Jv(){if(Zc)return xi;Zc=1;var e=Se(),r=2147483647,t=36,n=1,a=26,i=38,o=700,s=72,c=128,l="-",u=/[^\0-\u007E]/,f=/[.\u3002\uFF0E\uFF61]/g,h="Overflow: input needs wider integers to process",d=t-n,v=RangeError,m=e(f.exec),y=Math.floor,E=String.fromCharCode,b=e("".charCodeAt),g=e([].join),p=e([].push),w=e("".replace),k=e("".split),q=e("".toLowerCase),C=function(L){for(var D=[],x=0,O=L.length;x<O;){var Y=b(L,x++);if(Y>=55296&&Y<=56319&&x<O){var te=b(L,x++);(te&64512)===56320?p(D,((Y&1023)<<10)+(te&1023)+65536):(p(D,Y),x--)}else p(D,Y)}return D},B=function(L){return L+22+75*(L<26)},z=function(L,D,x){var O=0;for(L=x?y(L/o):L>>1,L+=y(L/D);L>d*a>>1;)L=y(L/d),O+=t;return y(O+(d+1)*L/(L+i))},re=function(L){var D=[];L=C(L);var x=L.length,O=c,Y=0,te=s,Q,S;for(Q=0;Q<L.length;Q++)S=L[Q],S<128&&p(D,E(S));var _=D.length,N=_;for(_&&p(D,l);N<x;){var H=r;for(Q=0;Q<L.length;Q++)S=L[Q],S>=O&&S<H&&(H=S);var G=N+1;if(H-O>y((r-Y)/G))throw new v(h);for(Y+=(H-O)*G,O=H,Q=0;Q<L.length;Q++){if(S=L[Q],S<O&&++Y>r)throw new v(h);if(S===O){for(var Z=Y,fe=t;;){var ie=fe<=te?n:fe>=te+a?a:fe-te;if(Z<ie)break;var ce=Z-ie,oe=t-ie;p(D,E(B(ie+ce%oe))),Z=y(ce/oe),fe+=t}p(D,E(B(Z))),te=z(Y,G,N===_),Y=0,N++}}Y++,O++}return g(D,"")};return xi=function(L){var D=[],x=k(w(q(L),f,"."),"."),O,Y;for(O=0;O<x.length;O++)Y=x[O],p(D,m(u,Y)?"xn--"+re(Y):Y);return g(D,".")},xi}var Yc;function Zv(){if(Yc)return Dc;Yc=1,th();var e=ke(),r=Me(),t=gn(),n=Ie(),a=ht(),i=Se(),o=sr(),s=yn(),c=os(),l=ar(),u=Gv(),f=Vv(),h=bn(),d=rh().codeAt,v=Jv(),m=Er(),y=dt(),E=Gr(),b=Qd(),g=ft(),p=g.set,w=g.getterFor("URL"),k=b.URLSearchParams,q=b.getState,C=n.URL,B=n.TypeError,z=n.parseInt,re=Math.floor,L=Math.pow,D=i("".charAt),x=i(/./.exec),O=i([].join),Y=i(1.1.toString),te=i([].pop),Q=i([].push),S=i("".replace),_=i([].shift),N=i("".split),H=i("".slice),G=i("".toLowerCase),Z=i([].unshift),fe="Invalid authority",ie="Invalid scheme",ce="Invalid host",oe="Invalid port",Re=/[a-z]/i,Te=/[\d+-.a-z]/i,Fe=/\d/,Ce=/^0x/i,Je=/^[0-7]+$/,lr=/^\d+$/,fr=/^[\da-f]+$/i,T=/[\0\t\n\r #%/:<>?@[\\\]^|]/,M=/[\0\t\n\r #/:<>?@[\\\]^|]/,J=/^[\u0000-\u0020]+/,ve=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,pe=/[\t\n\r]/g,me,Ae=function(P){var U=N(P,"."),R,I,A,se,K,Pe,Oe;if(U.length&&U[U.length-1]===""&&U.length--,R=U.length,R>4)return P;for(I=[],A=0;A<R;A++){if(se=U[A],se==="")return P;if(K=10,se.length>1&&D(se,0)==="0"&&(K=x(Ce,se)?16:8,se=H(se,K===8?1:2)),se==="")Pe=0;else{if(!x(K===10?lr:K===8?Je:fr,se))return P;Pe=z(se,K)}Q(I,Pe)}for(A=0;A<R;A++)if(Pe=I[A],A===R-1){if(Pe>=L(256,5-R))return null}else if(Pe>255)return null;for(Oe=te(I),A=0;A<I.length;A++)Oe+=I[A]*L(256,3-A);return Oe},Ze=function(P){var U=[0,0,0,0,0,0,0,0],R=0,I=null,A=0,se,K,Pe,Oe,qe,tr,j,je=function(){return D(P,A)};if(je()===":"){if(D(P,1)!==":")return;A+=2,R++,I=R}for(;je();){if(R===8)return;if(je()===":"){if(I!==null)return;A++,R++,I=R;continue}for(se=K=0;K<4&&x(fr,je());)se=se*16+z(je(),16),A++,K++;if(je()==="."){if(K===0||(A-=K,R>6))return;for(Pe=0;je();){if(Oe=null,Pe>0)if(je()==="."&&Pe<4)A++;else return;if(!x(Fe,je()))return;for(;x(Fe,je());){if(qe=z(je(),10),Oe===null)Oe=qe;else{if(Oe===0)return;Oe=Oe*10+qe}if(Oe>255)return;A++}U[R]=U[R]*256+Oe,Pe++,(Pe===2||Pe===4)&&R++}if(Pe!==4)return;break}else if(je()===":"){if(A++,!je())return}else if(je())return;U[R++]=se}if(I!==null)for(tr=R-I,R=7;R!==0&&tr>0;)j=U[R],U[R--]=U[I+tr-1],U[I+--tr]=j;else if(R!==8)return;return U},F=function(P){for(var U=null,R=1,I=null,A=0,se=0;se<8;se++)P[se]!==0?(A>R&&(U=I,R=A),I=null,A=0):(I===null&&(I=se),++A);return A>R?I:U},ee=function(P){var U,R,I,A;if(typeof P=="number"){for(U=[],R=0;R<4;R++)Z(U,P%256),P=re(P/256);return O(U,".")}if(typeof P=="object"){for(U="",I=F(P),R=0;R<8;R++)A&&P[R]===0||(A&&(A=!1),I===R?(U+=R?":":"::",A=!0):(U+=Y(P[R],16),R<7&&(U+=":")));return"["+U+"]"}return P},le={},he=u({},le,{" ":1,'"':1,"<":1,">":1,"`":1}),ge=u({},he,{"#":1,"?":1,"{":1,"}":1}),Ye=u({},ge,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Ue=function(P,U){var R=d(P,0);return R>32&&R<127&&!l(U,P)?P:encodeURIComponent(P)},Ge={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Le=function(P,U){var R;return P.length===2&&x(Re,D(P,0))&&((R=D(P,1))===":"||!U&&R==="|")},er=function(P){var U;return P.length>1&&Le(H(P,0,2))&&(P.length===2||(U=D(P,2))==="/"||U==="\\"||U==="?"||U==="#")},Kr=function(P){return P==="."||G(P)==="%2e"},yt=function(P){return P=G(P),P===".."||P==="%2e."||P===".%2e"||P==="%2e%2e"},Wr={},Vr={},$={},W={},V={},X={},ue={},de={},we={},be={},_e={},Be={},dr={},An={},Os={},jn={},Jr={},hr={},ks={},Ar={},yr={},Un=function(P,U,R){var I=m(P),A,se,K;if(U){if(se=this.parse(I),se)throw new B(se);this.searchParams=null}else{if(R!==void 0&&(A=new Un(R,!0)),se=this.parse(I,null,A),se)throw new B(se);K=q(new k),K.bindURL(this),this.searchParams=K}};Un.prototype={type:"URL",parse:function(P,U,R){var I=this,A=U||Wr,se=0,K="",Pe=!1,Oe=!1,qe=!1,tr,j,je,wr;for(P=m(P),U||(I.scheme="",I.username="",I.password="",I.host=null,I.port=null,I.path=[],I.query=null,I.fragment=null,I.cannotBeABaseURL=!1,P=S(P,J,""),P=S(P,ve,"$1")),P=S(P,pe,""),tr=f(P);se<=tr.length;){switch(j=tr[se],A){case Wr:if(j&&x(Re,j))K+=G(j),A=Vr;else{if(U)return ie;A=$;continue}break;case Vr:if(j&&(x(Te,j)||j==="+"||j==="-"||j==="."))K+=G(j);else if(j===":"){if(U&&(I.isSpecial()!==l(Ge,K)||K==="file"&&(I.includesCredentials()||I.port!==null)||I.scheme==="file"&&!I.host))return;if(I.scheme=K,U){I.isSpecial()&&Ge[I.scheme]===I.port&&(I.port=null);return}K="",I.scheme==="file"?A=An:I.isSpecial()&&R&&R.scheme===I.scheme?A=W:I.isSpecial()?A=de:tr[se+1]==="/"?(A=V,se++):(I.cannotBeABaseURL=!0,Q(I.path,""),A=ks)}else{if(U)return ie;K="",A=$,se=0;continue}break;case $:if(!R||R.cannotBeABaseURL&&j!=="#")return ie;if(R.cannotBeABaseURL&&j==="#"){I.scheme=R.scheme,I.path=h(R.path),I.query=R.query,I.fragment="",I.cannotBeABaseURL=!0,A=yr;break}A=R.scheme==="file"?An:X;continue;case W:if(j==="/"&&tr[se+1]==="/")A=we,se++;else{A=X;continue}break;case V:if(j==="/"){A=be;break}else{A=hr;continue}case X:if(I.scheme=R.scheme,j===me)I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,I.path=h(R.path),I.query=R.query;else if(j==="/"||j==="\\"&&I.isSpecial())A=ue;else if(j==="?")I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,I.path=h(R.path),I.query="",A=Ar;else if(j==="#")I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,I.path=h(R.path),I.query=R.query,I.fragment="",A=yr;else{I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,I.path=h(R.path),I.path.length--,A=hr;continue}break;case ue:if(I.isSpecial()&&(j==="/"||j==="\\"))A=we;else if(j==="/")A=be;else{I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,A=hr;continue}break;case de:if(A=we,j!=="/"||D(K,se+1)!=="/")continue;se++;break;case we:if(j!=="/"&&j!=="\\"){A=be;continue}break;case be:if(j==="@"){Pe&&(K="%40"+K),Pe=!0,je=f(K);for(var Ln=0;Ln<je.length;Ln++){var js=je[Ln];if(js===":"&&!qe){qe=!0;continue}var Us=Ue(js,Ye);qe?I.password+=Us:I.username+=Us}K=""}else if(j===me||j==="/"||j==="?"||j==="#"||j==="\\"&&I.isSpecial()){if(Pe&&K==="")return fe;se-=f(K).length+1,K="",A=_e}else K+=j;break;case _e:case Be:if(U&&I.scheme==="file"){A=jn;continue}else if(j===":"&&!Oe){if(K==="")return ce;if(wr=I.parseHost(K),wr)return wr;if(K="",A=dr,U===Be)return}else if(j===me||j==="/"||j==="?"||j==="#"||j==="\\"&&I.isSpecial()){if(I.isSpecial()&&K==="")return ce;if(U&&K===""&&(I.includesCredentials()||I.port!==null))return;if(wr=I.parseHost(K),wr)return wr;if(K="",A=Jr,U)return;continue}else j==="["?Oe=!0:j==="]"&&(Oe=!1),K+=j;break;case dr:if(x(Fe,j))K+=j;else if(j===me||j==="/"||j==="?"||j==="#"||j==="\\"&&I.isSpecial()||U){if(K!==""){var qn=z(K,10);if(qn>65535)return oe;I.port=I.isSpecial()&&qn===Ge[I.scheme]?null:qn,K=""}if(U)return;A=Jr;continue}else return oe;break;case An:if(I.scheme="file",j==="/"||j==="\\")A=Os;else if(R&&R.scheme==="file")switch(j){case me:I.host=R.host,I.path=h(R.path),I.query=R.query;break;case"?":I.host=R.host,I.path=h(R.path),I.query="",A=Ar;break;case"#":I.host=R.host,I.path=h(R.path),I.query=R.query,I.fragment="",A=yr;break;default:er(O(h(tr,se),""))||(I.host=R.host,I.path=h(R.path),I.shortenPath()),A=hr;continue}else{A=hr;continue}break;case Os:if(j==="/"||j==="\\"){A=jn;break}R&&R.scheme==="file"&&!er(O(h(tr,se),""))&&(Le(R.path[0],!0)?Q(I.path,R.path[0]):I.host=R.host),A=hr;continue;case jn:if(j===me||j==="/"||j==="\\"||j==="?"||j==="#"){if(!U&&Le(K))A=hr;else if(K===""){if(I.host="",U)return;A=Jr}else{if(wr=I.parseHost(K),wr)return wr;if(I.host==="localhost"&&(I.host=""),U)return;K="",A=Jr}continue}else K+=j;break;case Jr:if(I.isSpecial()){if(A=hr,j!=="/"&&j!=="\\")continue}else if(!U&&j==="?")I.query="",A=Ar;else if(!U&&j==="#")I.fragment="",A=yr;else if(j!==me&&(A=hr,j!=="/"))continue;break;case hr:if(j===me||j==="/"||j==="\\"&&I.isSpecial()||!U&&(j==="?"||j==="#")){if(yt(K)?(I.shortenPath(),j!=="/"&&!(j==="\\"&&I.isSpecial())&&Q(I.path,"")):Kr(K)?j!=="/"&&!(j==="\\"&&I.isSpecial())&&Q(I.path,""):(I.scheme==="file"&&!I.path.length&&Le(K)&&(I.host&&(I.host=""),K=D(K,0)+":"),Q(I.path,K)),K="",I.scheme==="file"&&(j===me||j==="?"||j==="#"))for(;I.path.length>1&&I.path[0]==="";)_(I.path);j==="?"?(I.query="",A=Ar):j==="#"&&(I.fragment="",A=yr)}else K+=Ue(j,ge);break;case ks:j==="?"?(I.query="",A=Ar):j==="#"?(I.fragment="",A=yr):j!==me&&(I.path[0]+=Ue(j,le));break;case Ar:!U&&j==="#"?(I.fragment="",A=yr):j!==me&&(j==="'"&&I.isSpecial()?I.query+="%27":j==="#"?I.query+="%23":I.query+=Ue(j,le));break;case yr:j!==me&&(I.fragment+=Ue(j,he));break}se++}},parseHost:function(P){var U,R,I;if(D(P,0)==="["){if(D(P,P.length-1)!=="]"||(U=Ze(H(P,1,-1)),!U))return ce;this.host=U}else if(this.isSpecial()){if(P=v(P),x(T,P)||(U=Ae(P),U===null))return ce;this.host=U}else{if(x(M,P))return ce;for(U="",R=f(P),I=0;I<R.length;I++)U+=Ue(R[I],le);this.host=U}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return l(Ge,this.scheme)},shortenPath:function(){var P=this.path,U=P.length;U&&(this.scheme!=="file"||U!==1||!Le(P[0],!0))&&P.length--},serialize:function(){var P=this,U=P.scheme,R=P.username,I=P.password,A=P.host,se=P.port,K=P.path,Pe=P.query,Oe=P.fragment,qe=U+":";return A!==null?(qe+="//",P.includesCredentials()&&(qe+=R+(I?":"+I:"")+"@"),qe+=ee(A),se!==null&&(qe+=":"+se)):U==="file"&&(qe+="//"),qe+=P.cannotBeABaseURL?K[0]:K.length?"/"+O(K,"/"):"",Pe!==null&&(qe+="?"+Pe),Oe!==null&&(qe+="#"+Oe),qe},setHref:function(P){var U=this.parse(P);if(U)throw new B(U);this.searchParams.update()},getOrigin:function(){var P=this.scheme,U=this.port;if(P==="blob")try{return new Zr(P.path[0]).origin}catch{return"null"}return P==="file"||!this.isSpecial()?"null":P+"://"+ee(this.host)+(U!==null?":"+U:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(P){this.parse(m(P)+":",Wr)},getUsername:function(){return this.username},setUsername:function(P){var U=f(m(P));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var R=0;R<U.length;R++)this.username+=Ue(U[R],Ye)}},getPassword:function(){return this.password},setPassword:function(P){var U=f(m(P));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var R=0;R<U.length;R++)this.password+=Ue(U[R],Ye)}},getHost:function(){var P=this.host,U=this.port;return P===null?"":U===null?ee(P):ee(P)+":"+U},setHost:function(P){this.cannotBeABaseURL||this.parse(P,_e)},getHostname:function(){var P=this.host;return P===null?"":ee(P)},setHostname:function(P){this.cannotBeABaseURL||this.parse(P,Be)},getPort:function(){var P=this.port;return P===null?"":m(P)},setPort:function(P){this.cannotHaveUsernamePasswordPort()||(P=m(P),P===""?this.port=null:this.parse(P,dr))},getPathname:function(){var P=this.path;return this.cannotBeABaseURL?P[0]:P.length?"/"+O(P,"/"):""},setPathname:function(P){this.cannotBeABaseURL||(this.path=[],this.parse(P,Jr))},getSearch:function(){var P=this.query;return P?"?"+P:""},setSearch:function(P){P=m(P),P===""?this.query=null:(D(P,0)==="?"&&(P=H(P,1)),this.query="",this.parse(P,Ar)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var P=this.fragment;return P?"#"+P:""},setHash:function(P){if(P=m(P),P===""){this.fragment=null;return}D(P,0)==="#"&&(P=H(P,1)),this.fragment="",this.parse(P,yr)},update:function(){this.query=this.searchParams.serialize()||null}};var Zr=function(U){var R=c(this,He),I=E(arguments.length,1)>1?arguments[1]:void 0,A=p(R,new Un(U,!1,I));r||(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())},He=Zr.prototype,rr=function(P,U){return{get:function(){return w(this)[P]()},set:U&&function(R){return w(this)[U](R)},configurable:!0,enumerable:!0}};if(r&&(s(He,"href",rr("serialize","setHref")),s(He,"origin",rr("getOrigin")),s(He,"protocol",rr("getProtocol","setProtocol")),s(He,"username",rr("getUsername","setUsername")),s(He,"password",rr("getPassword","setPassword")),s(He,"host",rr("getHost","setHost")),s(He,"hostname",rr("getHostname","setHostname")),s(He,"port",rr("getPort","setPort")),s(He,"pathname",rr("getPathname","setPathname")),s(He,"search",rr("getSearch","setSearch")),s(He,"searchParams",rr("getSearchParams")),s(He,"hash",rr("getHash","setHash"))),o(He,"toJSON",function(){return w(this).serialize()},{enumerable:!0}),o(He,"toString",function(){return w(this).serialize()},{enumerable:!0}),C){var Cs=C.createObjectURL,As=C.revokeObjectURL;Cs&&o(Zr,"createObjectURL",a(Cs,C)),As&&o(Zr,"revokeObjectURL",a(As,C))}return y(Zr,"URL"),e({global:!0,constructor:!0,forced:!t,sham:!r},{URL:Zr}),Dc}var Xc;function Yv(){return Xc||(Xc=1,Zv()),$c}var Qc={},el;function Xv(){if(el)return Qc;el=1;var e=ke(),r=or(),t=$e(),n=Gr(),a=Er(),i=gn(),o=r("URL"),s=i&&t(function(){o.canParse()}),c=t(function(){return o.canParse.length!==1});return e({target:"URL",stat:!0,forced:!s||c},{canParse:function(u){var f=n(arguments.length,1),h=a(u),d=f<2||arguments[1]===void 0?void 0:a(arguments[1]);try{return!!new o(h,d)}catch{return!1}}}),Qc}var rl={},tl;function Qv(){if(tl)return rl;tl=1;var e=ke(),r=or(),t=Gr(),n=Er(),a=gn(),i=r("URL");return e({target:"URL",stat:!0,forced:!a},{parse:function(s){var c=t(arguments.length,1),l=n(s),u=c<2||arguments[1]===void 0?void 0:n(arguments[1]);try{return new i(l,u)}catch{return null}}}),rl}var nl={},al;function ep(){if(al)return nl;al=1;var e=ke(),r=ze();return e({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}}),nl}var Ni,il;function rp(){if(il)return Ni;il=1,eh(),Yv(),Xv(),Qv(),ep();var e=Sn();return Ni=e.URL,Ni}var $i,ol;function tp(){if(ol)return $i;ol=1;var e=rp();return $i=e,$i}var Di,sl;function np(){if(sl)return Di;sl=1;var e=tp();return Di=e,Di}np();var ul={},Mi,cl;function ap(){return cl||(cl=1,Mi={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}),Mi}var Fi,ll;function ip(){if(ll)return Fi;ll=1;var e=vn(),r=e("span").classList,t=r&&r.constructor&&r.constructor.prototype;return Fi=t===Object.prototype?void 0:t,Fi}var fl;function oh(){if(fl)return ul;fl=1;var e=Ie(),r=ap(),t=ip(),n=is(),a=Hr(),i=dt(),o=De(),s=o("iterator"),c=n.values,l=function(f,h){if(f){if(f[s]!==c)try{a(f,s,c)}catch{f[s]=c}if(i(f,h,!0),r[h]){for(var d in n)if(f[d]!==n[d])try{a(f,d,n[d])}catch{f[d]=n[d]}}}};for(var u in r)l(e[u]&&e[u].prototype,u);return l(t,"DOMTokenList"),ul}var Bi,dl;function op(){if(dl)return Bi;dl=1;var e=eh();return oh(),Bi=e,Bi}var zi,hl;function sp(){if(hl)return zi;hl=1;var e=op();return zi=e,zi}sp();var vl={},pl={},Hi,ml;function up(){if(ml)return Hi;ml=1;var e=ir(),r=Hr();return Hi=function(t,n){e(n)&&"cause"in n&&r(t,"cause",n.cause)},Hi}var Gi,gl;function cp(){if(gl)return Gi;gl=1;var e=Se(),r=Error,t=e("".replace),n=function(o){return String(new r(o).stack)}("zxcasd"),a=/\n\s*at [^:]*:[^\n]*/,i=a.test(n);return Gi=function(o,s){if(i&&typeof o=="string"&&!r.prepareStackTrace)for(;s--;)o=t(o,a,"");return o},Gi}var Ki,yl;function lp(){if(yl)return Ki;yl=1;var e=$e(),r=zr();return Ki=!e(function(){var t=new Error("a");return"stack"in t?(Object.defineProperty(t,"stack",r(1,7)),t.stack!==7):!0}),Ki}var Wi,wl;function fp(){if(wl)return Wi;wl=1;var e=Hr(),r=cp(),t=lp(),n=Error.captureStackTrace;return Wi=function(a,i,o,s){t&&(n?n(a,i):e(a,"stack",r(o,s)))},Wi}var Vi,bl;function $t(){if(bl)return Vi;bl=1;var e=ht(),r=ze(),t=ur(),n=mn(),a=ah(),i=Yo(),o=pn(),s=us(),c=wn(),l=nh(),u=TypeError,f=function(d,v){this.stopped=d,this.result=v},h=f.prototype;return Vi=function(d,v,m){var y=m&&m.that,E=!!(m&&m.AS_ENTRIES),b=!!(m&&m.IS_RECORD),g=!!(m&&m.IS_ITERATOR),p=!!(m&&m.INTERRUPTED),w=e(v,y),k,q,C,B,z,re,L,D=function(O){return k&&l(k,"normal"),new f(!0,O)},x=function(O){return E?(t(O),p?w(O[0],O[1],D):w(O[0],O[1])):p?w(O,D):w(O)};if(b)k=d.iterator;else if(g)k=d;else{if(q=c(d),!q)throw new u(n(d)+" is not iterable");if(a(q)){for(C=0,B=i(d);B>C;C++)if(z=x(d[C]),z&&o(h,z))return z;return new f(!1)}k=s(d,q)}for(re=b?d.next:k.next;!(L=r(re,k)).done;){try{z=x(L.value)}catch(O){l(k,"throw",O)}if(typeof z=="object"&&z&&o(h,z))return z}return new f(!1)},Vi}var Ji,Sl;function dp(){if(Sl)return Ji;Sl=1;var e=Er();return Ji=function(r,t){return r===void 0?arguments.length<2?"":t:e(r)},Ji}var Il;function hp(){if(Il)return pl;Il=1;var e=ke(),r=pn(),t=ts(),n=ns(),a=Wd(),i=qt(),o=Hr(),s=zr(),c=up(),l=fp(),u=$t(),f=dp(),h=De(),d=h("toStringTag"),v=Error,m=[].push,y=function(g,p){var w=r(E,this),k;n?k=n(new v,w?t(this):E):(k=w?this:i(E),o(k,d,"Error")),p!==void 0&&o(k,"message",f(p)),l(k,y,k.stack,1),arguments.length>2&&c(k,arguments[2]);var q=[];return u(g,m,{that:q}),o(k,"errors",q),k};n?n(y,v):a(y,v,{name:!0});var E=y.prototype=i(v.prototype,{constructor:s(1,y),message:s(1,""),name:s(1,"AggregateError")});return e({global:!0,constructor:!0,arity:2},{AggregateError:y}),pl}var Pl;function vp(){return Pl||(Pl=1,hp()),vl}var El={},Zi,Rl;function pp(){if(Rl)return Zi;Rl=1;var e=ss(),r=Nt();return Zi=e?{}.toString:function(){return"[object "+r(this)+"]"},Zi}var _l;function mp(){if(_l)return El;_l=1;var e=ss(),r=sr(),t=pp();return e||r(Object.prototype,"toString",t,{unsafe:!0}),El}var Tl={},Ol={},Yi,kl;function sh(){if(kl)return Yi;kl=1;var e=Ie(),r=Lt(),t=ln(),n=function(a){return r.slice(0,a.length)===a};return Yi=function(){return n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":e.Bun&&typeof Bun.version=="string"?"BUN":e.Deno&&typeof Deno.version=="object"?"DENO":t(e.process)==="process"?"NODE":e.window&&e.document?"BROWSER":"REST"}(),Yi}var Xi,Cl;function cs(){if(Cl)return Xi;Cl=1;var e=sh();return Xi=e==="NODE",Xi}var Qi,Al;function gp(){if(Al)return Qi;Al=1;var e=or(),r=yn(),t=De(),n=Me(),a=t("species");return Qi=function(i){var o=e(i);n&&o&&!o[a]&&r(o,a,{configurable:!0,get:function(){return this}})},Qi}var eo,jl;function yp(){if(jl)return eo;jl=1;var e=ih(),r=mn(),t=TypeError;return eo=function(n){if(e(n))return n;throw new t(r(n)+" is not a constructor")},eo}var ro,Ul;function uh(){if(Ul)return ro;Ul=1;var e=ur(),r=yp(),t=fn(),n=De(),a=n("species");return ro=function(i,o){var s=e(i).constructor,c;return s===void 0||t(c=e(s)[a])?o:r(c)},ro}var to,Ll;function ch(){if(Ll)return to;Ll=1;var e=cn(),r=Function.prototype,t=r.apply,n=r.call;return to=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(t):function(){return n.apply(t,arguments)}),to}var no,ql;function lh(){if(ql)return no;ql=1;var e=Lt();return no=/(?:ipad|iphone|ipod).*applewebkit/i.test(e),no}var ao,xl;function fh(){if(xl)return ao;xl=1;var e=Ie(),r=ch(),t=ht(),n=Ee(),a=ar(),i=$e(),o=Fd(),s=bn(),c=vn(),l=Gr(),u=lh(),f=cs(),h=e.setImmediate,d=e.clearImmediate,v=e.process,m=e.Dispatch,y=e.Function,E=e.MessageChannel,b=e.String,g=0,p={},w="onreadystatechange",k,q,C,B;i(function(){k=e.location});var z=function(x){if(a(p,x)){var O=p[x];delete p[x],O()}},re=function(x){return function(){z(x)}},L=function(x){z(x.data)},D=function(x){e.postMessage(b(x),k.protocol+"//"+k.host)};return(!h||!d)&&(h=function(O){l(arguments.length,1);var Y=n(O)?O:y(O),te=s(arguments,1);return p[++g]=function(){r(Y,void 0,te)},q(g),g},d=function(O){delete p[O]},f?q=function(x){v.nextTick(re(x))}:m&&m.now?q=function(x){m.now(re(x))}:E&&!u?(C=new E,B=C.port2,C.port1.onmessage=L,q=t(B.postMessage,B)):e.addEventListener&&n(e.postMessage)&&!e.importScripts&&k&&k.protocol!=="file:"&&!i(D)?(q=D,e.addEventListener("message",L,!1)):w in c("script")?q=function(x){o.appendChild(c("script"))[w]=function(){o.removeChild(this),z(x)}}:q=function(x){setTimeout(re(x),0)}),ao={set:h,clear:d},ao}var io,Nl;function dh(){if(Nl)return io;Nl=1;var e=function(){this.head=null,this.tail=null};return e.prototype={add:function(r){var t={item:r,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var r=this.head;if(r){var t=this.head=r.next;return t===null&&(this.tail=null),r.item}}},io=e,io}var oo,$l;function wp(){if($l)return oo;$l=1;var e=Lt();return oo=/ipad|iphone|ipod/i.test(e)&&typeof Pebble<"u",oo}var so,Dl;function bp(){if(Dl)return so;Dl=1;var e=Lt();return so=/web0s(?!.*chrome)/i.test(e),so}var uo,Ml;function Sp(){if(Ml)return uo;Ml=1;var e=Ie(),r=Xd(),t=ht(),n=fh().set,a=dh(),i=lh(),o=wp(),s=bp(),c=cs(),l=e.MutationObserver||e.WebKitMutationObserver,u=e.document,f=e.process,h=e.Promise,d=r("queueMicrotask"),v,m,y,E,b;if(!d){var g=new a,p=function(){var w,k;for(c&&(w=f.domain)&&w.exit();k=g.get();)try{k()}catch(q){throw g.head&&v(),q}w&&w.enter()};!i&&!c&&!s&&l&&u?(m=!0,y=u.createTextNode(""),new l(p).observe(y,{characterData:!0}),v=function(){y.data=m=!m}):!o&&h&&h.resolve?(E=h.resolve(void 0),E.constructor=h,b=t(E.then,E),v=function(){b(p)}):c?v=function(){f.nextTick(p)}:(n=t(n,e),v=function(){n(p)}),d=function(w){g.head||v(),g.add(w)}}return uo=d,uo}var co,Fl;function Ip(){return Fl||(Fl=1,co=function(e,r){try{arguments.length===1?console.error(e):console.error(e,r)}catch{}}),co}var lo,Bl;function vt(){return Bl||(Bl=1,lo=function(e){try{return{error:!1,value:e()}}catch(r){return{error:!0,value:r}}}),lo}var fo,zl;function pt(){if(zl)return fo;zl=1;var e=Ie();return fo=e.Promise,fo}var ho,Hl;function Dt(){if(Hl)return ho;Hl=1;var e=Ie(),r=pt(),t=Ee(),n=Vd(),a=rs(),i=De(),o=sh(),s=gr(),c=Ad(),l=r&&r.prototype,u=i("species"),f=!1,h=t(e.PromiseRejectionEvent),d=n("Promise",function(){var v=a(r),m=v!==String(r);if(!m&&c===66||s&&!(l.catch&&l.finally))return!0;if(!c||c<51||!/native code/.test(v)){var y=new r(function(g){g(1)}),E=function(g){g(function(){},function(){})},b=y.constructor={};if(b[u]=E,f=y.then(function(){})instanceof E,!f)return!0}return!m&&(o==="BROWSER"||o==="DENO")&&!h});return ho={CONSTRUCTOR:d,REJECTION_EVENT:h,SUBCLASSING:f},ho}var vo={},Gl;function Rr(){if(Gl)return vo;Gl=1;var e=cr(),r=TypeError,t=function(n){var a,i;this.promise=new n(function(o,s){if(a!==void 0||i!==void 0)throw new r("Bad Promise constructor");a=o,i=s}),this.resolve=e(a),this.reject=e(i)};return vo.f=function(n){return new t(n)},vo}var Kl;function Pp(){if(Kl)return Ol;Kl=1;var e=ke(),r=gr(),t=cs(),n=Ie(),a=Sn(),i=ze(),o=sr(),s=ns(),c=dt(),l=gp(),u=cr(),f=Ee(),h=ir(),d=os(),v=uh(),m=fh().set,y=Sp(),E=Ip(),b=vt(),g=dh(),p=ft(),w=pt(),k=Dt(),q=Rr(),C="Promise",B=k.CONSTRUCTOR,z=k.REJECTION_EVENT,re=k.SUBCLASSING,L=p.getterFor(C),D=p.set,x=w&&w.prototype,O=w,Y=x,te=n.TypeError,Q=n.document,S=n.process,_=q.f,N=_,H=!!(Q&&Q.createEvent&&n.dispatchEvent),G="unhandledrejection",Z="rejectionhandled",fe=0,ie=1,ce=2,oe=1,Re=2,Te,Fe,Ce,Je,lr=function(F){var ee;return h(F)&&f(ee=F.then)?ee:!1},fr=function(F,ee){var le=ee.value,he=ee.state===ie,ge=he?F.ok:F.fail,Ye=F.resolve,Ue=F.reject,Ge=F.domain,Le,er,Kr;try{ge?(he||(ee.rejection===Re&&pe(ee),ee.rejection=oe),ge===!0?Le=le:(Ge&&Ge.enter(),Le=ge(le),Ge&&(Ge.exit(),Kr=!0)),Le===F.promise?Ue(new te("Promise-chain cycle")):(er=lr(Le))?i(er,Le,Ye,Ue):Ye(Le)):Ue(le)}catch(yt){Ge&&!Kr&&Ge.exit(),Ue(yt)}},T=function(F,ee){F.notified||(F.notified=!0,y(function(){for(var le=F.reactions,he;he=le.get();)fr(he,F);F.notified=!1,ee&&!F.rejection&&J(F)}))},M=function(F,ee,le){var he,ge;H?(he=Q.createEvent("Event"),he.promise=ee,he.reason=le,he.initEvent(F,!1,!0),n.dispatchEvent(he)):he={promise:ee,reason:le},!z&&(ge=n["on"+F])?ge(he):F===G&&E("Unhandled promise rejection",le)},J=function(F){i(m,n,function(){var ee=F.facade,le=F.value,he=ve(F),ge;if(he&&(ge=b(function(){t?S.emit("unhandledRejection",le,ee):M(G,ee,le)}),F.rejection=t||ve(F)?Re:oe,ge.error))throw ge.value})},ve=function(F){return F.rejection!==oe&&!F.parent},pe=function(F){i(m,n,function(){var ee=F.facade;t?S.emit("rejectionHandled",ee):M(Z,ee,F.value)})},me=function(F,ee,le){return function(he){F(ee,he,le)}},Ae=function(F,ee,le){F.done||(F.done=!0,le&&(F=le),F.value=ee,F.state=ce,T(F,!0))},Ze=function(F,ee,le){if(!F.done){F.done=!0,le&&(F=le);try{if(F.facade===ee)throw new te("Promise can't be resolved itself");var he=lr(ee);he?y(function(){var ge={done:!1};try{i(he,ee,me(Ze,ge,F),me(Ae,ge,F))}catch(Ye){Ae(ge,Ye,F)}}):(F.value=ee,F.state=ie,T(F,!1))}catch(ge){Ae({done:!1},ge,F)}}};if(B&&(O=function(ee){d(this,Y),u(ee),i(Te,this);var le=L(this);try{ee(me(Ze,le),me(Ae,le))}catch(he){Ae(le,he)}},Y=O.prototype,Te=function(ee){D(this,{type:C,done:!1,notified:!1,parent:!1,reactions:new g,rejection:!1,state:fe,value:null})},Te.prototype=o(Y,"then",function(ee,le){var he=L(this),ge=_(v(this,O));return he.parent=!0,ge.ok=f(ee)?ee:!0,ge.fail=f(le)&&le,ge.domain=t?S.domain:void 0,he.state===fe?he.reactions.add(ge):y(function(){fr(ge,he)}),ge.promise}),Fe=function(){var F=new Te,ee=L(F);this.promise=F,this.resolve=me(Ze,ee),this.reject=me(Ae,ee)},q.f=_=function(F){return F===O||F===Ce?new Fe(F):N(F)},!r&&f(w)&&x!==Object.prototype)){Je=x.then,re||o(x,"then",function(ee,le){var he=this;return new O(function(ge,Ye){i(Je,he,ge,Ye)}).then(ee,le)},{unsafe:!0});try{delete x.constructor}catch{}s&&s(x,Y)}return e({global:!0,constructor:!0,wrap:!0,forced:B},{Promise:O}),Ce=a.Promise,c(O,C,!1,!0),l(C),Ol}var Wl={},po,Vl;function Ep(){if(Vl)return po;Vl=1;var e=De(),r=e("iterator"),t=!1;try{var n=0,a={next:function(){return{done:!!n++}},return:function(){t=!0}};a[r]=function(){return this},Array.from(a,function(){throw 2})}catch{}return po=function(i,o){try{if(!o&&!t)return!1}catch{return!1}var s=!1;try{var c={};c[r]=function(){return{next:function(){return{done:s=!0}}}},i(c)}catch{}return s},po}var mo,Jl;function In(){if(Jl)return mo;Jl=1;var e=pt(),r=Ep(),t=Dt().CONSTRUCTOR;return mo=t||!r(function(n){e.all(n).then(void 0,function(){})}),mo}var Zl;function Rp(){if(Zl)return Wl;Zl=1;var e=ke(),r=ze(),t=cr(),n=Rr(),a=vt(),i=$t(),o=In();return e({target:"Promise",stat:!0,forced:o},{all:function(c){var l=this,u=n.f(l),f=u.resolve,h=u.reject,d=a(function(){var v=t(l.resolve),m=[],y=0,E=1;i(c,function(b){var g=y++,p=!1;E++,r(v,l,b).then(function(w){p||(p=!0,m[g]=w,--E||f(m))},h)}),--E||f(m)});return d.error&&h(d.value),u.promise}}),Wl}var Yl={},Xl;function _p(){if(Xl)return Yl;Xl=1;var e=ke(),r=gr(),t=Dt().CONSTRUCTOR,n=pt(),a=or(),i=Ee(),o=sr(),s=n&&n.prototype;if(e({target:"Promise",proto:!0,forced:t,real:!0},{catch:function(l){return this.then(void 0,l)}}),!r&&i(n)){var c=a("Promise").prototype.catch;s.catch!==c&&o(s,"catch",c,{unsafe:!0})}return Yl}var Ql={},ef;function Tp(){if(ef)return Ql;ef=1;var e=ke(),r=ze(),t=cr(),n=Rr(),a=vt(),i=$t(),o=In();return e({target:"Promise",stat:!0,forced:o},{race:function(c){var l=this,u=n.f(l),f=u.reject,h=a(function(){var d=t(l.resolve);i(c,function(v){r(d,l,v).then(u.resolve,f)})});return h.error&&f(h.value),u.promise}}),Ql}var rf={},tf;function Op(){if(tf)return rf;tf=1;var e=ke(),r=Rr(),t=Dt().CONSTRUCTOR;return e({target:"Promise",stat:!0,forced:t},{reject:function(a){var i=r.f(this),o=i.reject;return o(a),i.promise}}),rf}var nf={},go,af;function hh(){if(af)return go;af=1;var e=ur(),r=ir(),t=Rr();return go=function(n,a){if(e(n),r(a)&&a.constructor===n)return a;var i=t.f(n),o=i.resolve;return o(a),i.promise},go}var of;function kp(){if(of)return nf;of=1;var e=ke(),r=or(),t=gr(),n=pt(),a=Dt().CONSTRUCTOR,i=hh(),o=r("Promise"),s=t&&!a;return e({target:"Promise",stat:!0,forced:t||a},{resolve:function(l){return i(s&&this===o?n:this,l)}}),nf}var sf;function Cp(){return sf||(sf=1,Pp(),Rp(),_p(),Tp(),Op(),kp()),Tl}var uf={},cf;function Ap(){if(cf)return uf;cf=1;var e=ke(),r=ze(),t=cr(),n=Rr(),a=vt(),i=$t(),o=In();return e({target:"Promise",stat:!0,forced:o},{allSettled:function(c){var l=this,u=n.f(l),f=u.resolve,h=u.reject,d=a(function(){var v=t(l.resolve),m=[],y=0,E=1;i(c,function(b){var g=y++,p=!1;E++,r(v,l,b).then(function(w){p||(p=!0,m[g]={status:"fulfilled",value:w},--E||f(m))},function(w){p||(p=!0,m[g]={status:"rejected",reason:w},--E||f(m))})}),--E||f(m)});return d.error&&h(d.value),u.promise}}),uf}var lf={},ff;function jp(){if(ff)return lf;ff=1;var e=ke(),r=ze(),t=cr(),n=or(),a=Rr(),i=vt(),o=$t(),s=In(),c="No one promise resolved";return e({target:"Promise",stat:!0,forced:s},{any:function(u){var f=this,h=n("AggregateError"),d=a.f(f),v=d.resolve,m=d.reject,y=i(function(){var E=t(f.resolve),b=[],g=0,p=1,w=!1;o(u,function(k){var q=g++,C=!1;p++,r(E,f,k).then(function(B){C||w||(w=!0,v(B))},function(B){C||w||(C=!0,b[q]=B,--p||m(new h(b,c)))})}),--p||m(new h(b,c))});return y.error&&m(y.value),d.promise}}),lf}var df={},hf;function vh(){if(hf)return df;hf=1;var e=ke(),r=Ie(),t=ch(),n=bn(),a=Rr(),i=cr(),o=vt(),s=r.Promise,c=!1,l=!s||!s.try||o(function(){s.try(function(u){c=u===8},8)}).error||!c;return e({target:"Promise",stat:!0,forced:l},{try:function(u){var f=arguments.length>1?n(arguments,1):[],h=a.f(this),d=o(function(){return t(i(u),void 0,f)});return(d.error?h.reject:h.resolve)(d.value),h.promise}}),df}var vf={},pf;function ph(){if(pf)return vf;pf=1;var e=ke(),r=Rr();return e({target:"Promise",stat:!0},{withResolvers:function(){var n=r.f(this);return{promise:n.promise,resolve:n.resolve,reject:n.reject}}}),vf}var mf={},gf;function Up(){if(gf)return mf;gf=1;var e=ke(),r=gr(),t=pt(),n=$e(),a=or(),i=Ee(),o=uh(),s=hh(),c=sr(),l=t&&t.prototype,u=!!t&&n(function(){l.finally.call({then:function(){}},function(){})});if(e({target:"Promise",proto:!0,real:!0,forced:u},{finally:function(h){var d=o(this,a("Promise")),v=i(h);return this.then(v?function(m){return s(d,h()).then(function(){return m})}:h,v?function(m){return s(d,h()).then(function(){throw m})}:h)}}),!r&&i(t)){var f=a("Promise").prototype.finally;l.finally!==f&&c(l,"finally",f,{unsafe:!0})}return mf}var yo,yf;function Lp(){if(yf)return yo;yf=1,vp(),is(),mp(),Cp(),Ap(),jp(),vh(),ph(),Up(),th();var e=Sn();return yo=e.Promise,yo}var wo,wf;function qp(){if(wf)return wo;wf=1;var e=Lp();return oh(),wo=e,wo}var bf={},Sf;function xp(){return Sf||(Sf=1,vh()),bf}var If={},Pf;function Np(){return Pf||(Pf=1,ph()),If}var bo,Ef;function $p(){if(Ef)return bo;Ef=1;var e=qp();return xp(),Np(),bo=e,bo}$p();const mh="sesamy-debug";function Dp(e,r,t){const n=new Date;n.setTime(n.getTime()+t*60*60*1e3);const a="expires="+n.toUTCString();document.cookie=`${e}=${r}; ${a}; path=/`}function Mp(e){if(typeof document>"u")return null;const r=e+"=",t=document.cookie.split(";");for(let n=0;n<t.length;n++){let a=t[n];for(;a.charAt(0)===" ";)a=a.substring(1);if(a.indexOf(r)===0)return a.substring(r.length,a.length)}return null}function Fp(e){Dp(mh,e.toString(),1)}function Bp(){return Mp(mh)==="true"}function ye(e){Bp()&&console.log(e)}function Ir(e,r){if(typeof window>"u")return;const t=new CustomEvent(e,{detail:r,bubbles:!0,composed:!0});ye(`Triggering event: ${e}`),dispatchEvent(t)}function pr(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)r.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]])}return t}var Ur=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ls(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function fs(e,r){return e(r={exports:{}},r.exports),r.exports}var jr=fs(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});var t=function(){function n(){var a=this;this.locked=new Map,this.addToLocked=function(i,o){var s=a.locked.get(i);s===void 0?o===void 0?a.locked.set(i,[]):a.locked.set(i,[o]):o!==void 0&&(s.unshift(o),a.locked.set(i,s))},this.isLocked=function(i){return a.locked.has(i)},this.lock=function(i){return new Promise(function(o,s){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 s=o.pop();a.locked.set(i,o),s!==void 0&&setTimeout(s,0)}else a.locked.delete(i)}}return n.getInstance=function(){return n.instance===void 0&&(n.instance=new n),n.instance},n}();r.default=function(){return t.getInstance()}});ls(jr);var zp=ls(fs(function(e,r){var t=Ur&&Ur.__awaiter||function(u,f,h,d){return new(h||(h=Promise))(function(v,m){function y(g){try{b(d.next(g))}catch(p){m(p)}}function E(g){try{b(d.throw(g))}catch(p){m(p)}}function b(g){g.done?v(g.value):new h(function(p){p(g.value)}).then(y,E)}b((d=d.apply(u,f||[])).next())})},n=Ur&&Ur.__generator||function(u,f){var h,d,v,m,y={label:0,sent:function(){if(1&v[0])throw v[1];return v[1]},trys:[],ops:[]};return m={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function E(b){return function(g){return function(p){if(h)throw new TypeError("Generator is already executing.");for(;y;)try{if(h=1,d&&(v=2&p[0]?d.return:p[0]?d.throw||((v=d.return)&&v.call(d),0):d.next)&&!(v=v.call(d,p[1])).done)return v;switch(d=0,v&&(p=[2&p[0],v.value]),p[0]){case 0:case 1:v=p;break;case 4:return y.label++,{value:p[1],done:!1};case 5:y.label++,d=p[1],p=[0];continue;case 7:p=y.ops.pop(),y.trys.pop();continue;default:if(v=y.trys,!((v=v.length>0&&v[v.length-1])||p[0]!==6&&p[0]!==2)){y=0;continue}if(p[0]===3&&(!v||p[1]>v[0]&&p[1]<v[3])){y.label=p[1];break}if(p[0]===6&&y.label<v[1]){y.label=v[1],v=p;break}if(v&&y.label<v[2]){y.label=v[2],y.ops.push(p);break}v[2]&&y.ops.pop(),y.trys.pop();continue}p=f.call(u,y)}catch(w){p=[6,w],d=0}finally{h=v=0}if(5&p[0])throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}([b,g])}}},a=Ur;Object.defineProperty(r,"__esModule",{value:!0});var i="browser-tabs-lock-key",o={key:function(u){return t(a,void 0,void 0,function(){return n(this,function(f){throw new Error("Unsupported")})})},getItem:function(u){return t(a,void 0,void 0,function(){return n(this,function(f){throw new Error("Unsupported")})})},clear:function(){return t(a,void 0,void 0,function(){return n(this,function(u){return[2,window.localStorage.clear()]})})},removeItem:function(u){return t(a,void 0,void 0,function(){return n(this,function(f){throw new Error("Unsupported")})})},setItem:function(u,f){return t(a,void 0,void 0,function(){return n(this,function(h){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,f){return window.localStorage.setItem(u,f)}};function s(u){return new Promise(function(f){return setTimeout(f,u)})}function c(u){for(var f="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",h="",d=0;d<u;d++)h+=f[Math.floor(Math.random()*f.length)];return h}var l=function(){function u(f){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+c(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=f,u.waiters===void 0&&(u.waiters=[])}return u.prototype.acquireLock=function(f,h){return h===void 0&&(h=5e3),t(this,void 0,void 0,function(){var d,v,m,y,E,b,g;return n(this,function(p){switch(p.label){case 0:d=Date.now()+c(4),v=Date.now()+h,m=i+"-"+f,y=this.storageHandler===void 0?o:this.storageHandler,p.label=1;case 1:return Date.now()<v?[4,s(30)]:[3,8];case 2:return p.sent(),y.getItemSync(m)!==null?[3,5]:(E=this.id+"-"+f+"-"+d,[4,s(Math.floor(25*Math.random()))]);case 3:return p.sent(),y.setItemSync(m,JSON.stringify({id:this.id,iat:d,timeoutKey:E,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,s(30)];case 4:return p.sent(),(b=y.getItemSync(m))!==null&&(g=JSON.parse(b)).id===this.id&&g.iat===d?(this.acquiredIatSet.add(d),this.refreshLockWhileAcquired(m,d),[2,!0]):[3,7];case 5:return u.lockCorrector(this.storageHandler===void 0?o:this.storageHandler),[4,this.waitForSomethingToChange(v)];case 6:p.sent(),p.label=7;case 7:return d=Date.now()+c(4),[3,1];case 8:return[2,!1]}})})},u.prototype.refreshLockWhileAcquired=function(f,h){return t(this,void 0,void 0,function(){var d=this;return n(this,function(v){return setTimeout(function(){return t(d,void 0,void 0,function(){var m,y,E;return n(this,function(b){switch(b.label){case 0:return[4,jr.default().lock(h)];case 1:return b.sent(),this.acquiredIatSet.has(h)?(m=this.storageHandler===void 0?o:this.storageHandler,(y=m.getItemSync(f))===null?(jr.default().unlock(h),[2]):((E=JSON.parse(y)).timeRefreshed=Date.now(),m.setItemSync(f,JSON.stringify(E)),jr.default().unlock(h),this.refreshLockWhileAcquired(f,h),[2])):(jr.default().unlock(h),[2])}})})},1e3),[2]})})},u.prototype.waitForSomethingToChange=function(f){return t(this,void 0,void 0,function(){return n(this,function(h){switch(h.label){case 0:return[4,new Promise(function(d){var v=!1,m=Date.now(),y=!1;function E(){if(y||(window.removeEventListener("storage",E),u.removeFromWaiting(E),clearTimeout(b),y=!0),!v){v=!0;var g=50-(Date.now()-m);g>0?setTimeout(d,g):d(null)}}window.addEventListener("storage",E),u.addToWaiting(E);var b=setTimeout(E,Math.max(0,f-Date.now()))})];case 1:return h.sent(),[2]}})})},u.addToWaiting=function(f){this.removeFromWaiting(f),u.waiters!==void 0&&u.waiters.push(f)},u.removeFromWaiting=function(f){u.waiters!==void 0&&(u.waiters=u.waiters.filter(function(h){return h!==f}))},u.notifyWaiters=function(){u.waiters!==void 0&&u.waiters.slice().forEach(function(f){return f()})},u.prototype.releaseLock=function(f){return t(this,void 0,void 0,function(){return n(this,function(h){switch(h.label){case 0:return[4,this.releaseLock__private__(f)];case 1:return[2,h.sent()]}})})},u.prototype.releaseLock__private__=function(f){return t(this,void 0,void 0,function(){var h,d,v,m;return n(this,function(y){switch(y.label){case 0:return h=this.storageHandler===void 0?o:this.storageHandler,d=i+"-"+f,(v=h.getItemSync(d))===null?[2]:(m=JSON.parse(v)).id!==this.id?[3,2]:[4,jr.default().lock(m.iat)];case 1:y.sent(),this.acquiredIatSet.delete(m.iat),h.removeItemSync(d),jr.default().unlock(m.iat),u.notifyWaiters(),y.label=2;case 2:return[2]}})})},u.lockCorrector=function(f){for(var h=Date.now()-5e3,d=f,v=[],m=0;;){var y=d.keySync(m);if(y===null)break;v.push(y),m++}for(var E=!1,b=0;b<v.length;b++){var g=v[b];if(g.includes(i)){var p=d.getItemSync(g);if(p!==null){var w=JSON.parse(p);(w.timeRefreshed===void 0&&w.timeAcquired<h||w.timeRefreshed!==void 0&&w.timeRefreshed<h)&&(d.removeItemSync(g),E=!0)}}}E&&u.notifyWaiters()},u.waiters=void 0,u}();r.default=l}));const Hp={timeoutInSeconds:60},gh={name:"auth0-spa-js",version:"2.3.0"},yh=()=>Date.now();let Qe=class jo extends Error{constructor(r,t){super(t),this.error=r,this.error_description=t,Object.setPrototypeOf(this,jo.prototype)}static fromPayload({error:r,error_description:t}){return new jo(r,t)}},Gp=class wh extends Qe{constructor(r,t,n,a=null){super(r,t),this.state=n,this.appState=a,Object.setPrototypeOf(this,wh.prototype)}},Uo=class bh extends Qe{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,bh.prototype)}},Kp=class Sh extends Uo{constructor(r){super(),this.popup=r,Object.setPrototypeOf(this,Sh.prototype)}},Wp=class Ih extends Qe{constructor(r){super("cancelled","Popup closed"),this.popup=r,Object.setPrototypeOf(this,Ih.prototype)}},Vp=class Ph extends Qe{constructor(r,t,n){super(r,t),this.mfa_token=n,Object.setPrototypeOf(this,Ph.prototype)}},Eh=class Rh extends Qe{constructor(r,t){super("missing_refresh_token",`Missing Refresh Token (audience: '${Rf(r,["default"])}', scope: '${Rf(t)}')`),this.audience=r,this.scope=t,Object.setPrototypeOf(this,Rh.prototype)}};function Rf(e,r=[]){return e&&!r.includes(e)?e:""}const Jt=()=>window.crypto,So=()=>{const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let r="";return Array.from(Jt().getRandomValues(new Uint8Array(43))).forEach(t=>r+=e[t%e.length]),r},_f=e=>btoa(e),Lo=e=>{var{clientId:r}=e,t=pr(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:r},t))).toString()},Tf=e=>(r=>decodeURIComponent(atob(r).split("").map(t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),Jp=async(e,r)=>{const t=await fetch(e,r);return{ok:t.ok,json:await t.json()}},Zp=async(e,r,t)=>{const n=new AbortController;let a;return r.signal=n.signal,Promise.race([Jp(e,r),new Promise((i,o)=>{a=setTimeout(()=>{n.abort(),o(new Error("Timeout when executing 'fetch'"))},t)})]).finally(()=>{clearTimeout(a)})},Yp=async(e,r,t,n,a,i,o)=>{return s={auth:{audience:r,scope:t},timeout:a,fetchUrl:e,fetchOptions:n,useFormData:o},c=i,new Promise(function(l,u){const f=new MessageChannel;f.port1.onmessage=function(h){h.data.error?u(new Error(h.data.error)):l(h.data),f.port1.close()},c.postMessage(s,[f.port2])});var s,c},Xp=async(e,r,t,n,a,i,o=1e4)=>a?Yp(e,r,t,n,o,a,i):Zp(e,n,o);async function Qp(e,r){var{baseUrl:t,timeout:n,audience:a,scope:i,auth0Client:o,useFormData:s}=e,c=pr(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);const l=c.grant_type==="urn:ietf:params:oauth:grant-type:token-exchange",u=Object.assign(Object.assign(Object.assign({},c),l&&a&&{audience:a}),l&&i&&{scope:i}),f=s?Lo(u):JSON.stringify(u);return await async function(h,d,v,m,y,E,b){let g,p=null;for(let z=0;z<3;z++)try{g=await Xp(h,v,m,y,E,b,d),p=null;break}catch(re){p=re}if(p)throw p;const w=g.json,{error:k,error_description:q}=w,C=pr(w,["error","error_description"]),{ok:B}=g;if(!B){const z=q||`HTTP error. Unable to fetch ${h}`;throw k==="mfa_required"?new Vp(k,z,C.mfa_token):k==="missing_refresh_token"?new Eh(v,m):new Qe(k||"request_error",z)}return C}(`${t}/oauth/token`,n,a||"default",i,{method:"POST",body:f,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(o||gh))}},r,s)}const bt=(...e)=>{return(r=e.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(r))).join(" ");var r};let qr=class qo{constructor(r,t="@@auth0spajs@@",n){this.prefix=t,this.suffix=n,this.clientId=r.clientId,this.scope=r.scope,this.audience=r.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(r){const[t,n,a,i]=r.split("::");return new qo({clientId:n,scope:i,audience:a},t)}static fromCacheEntry(r){const{scope:t,audience:n,client_id:a}=r;return new qo({scope:t,audience:n,clientId:a})}},em=class{set(r,t){localStorage.setItem(r,JSON.stringify(t))}get(r){const t=window.localStorage.getItem(r);if(t)try{return JSON.parse(t)}catch{return}}remove(r){localStorage.removeItem(r)}allKeys(){return Object.keys(window.localStorage).filter(r=>r.startsWith("@@auth0spajs@@"))}},_h=class{constructor(){this.enclosedCache=function(){let r={};return{set(t,n){r[t]=n},get(t){const n=r[t];if(n)return n},remove(t){delete r[t]},allKeys:()=>Object.keys(r)}}()}},rm=class{constructor(r,t,n){this.cache=r,this.keyManifest=t,this.nowProvider=n||yh}async setIdToken(r,t,n){var a;const i=this.getIdTokenCacheKey(r);await this.cache.set(i,{id_token:t,decodedToken:n}),await((a=this.keyManifest)===null||a===void 0?void 0:a.add(i))}async getIdToken(r){const t=await this.cache.get(this.getIdTokenCacheKey(r.clientId));if(!t&&r.scope&&r.audience){const n=await this.get(r);return!n||!n.id_token||!n.decodedToken?void 0:{id_token:n.id_token,decodedToken:n.decodedToken}}if(t)return{id_token:t.id_token,decodedToken:t.decodedToken}}async get(r,t=0){var n;let a=await this.cache.get(r.toKey());if(!a){const s=await this.getCacheKeys();if(!s)return;const c=this.matchExistingCacheKey(r,s);c&&(a=await this.cache.get(c))}if(!a)return;const i=await this.nowProvider(),o=Math.floor(i/1e3);return a.expiresAt-t<o?a.body.refresh_token?(a.body={refresh_token:a.body.refresh_token},await this.cache.set(r.toKey(),a),a.body):(await this.cache.remove(r.toKey()),void await((n=this.keyManifest)===null||n===void 0?void 0:n.remove(r.toKey()))):a.body}async set(r){var t;const n=new qr({clientId:r.client_id,scope:r.scope,audience:r.audience}),a=await this.wrapCacheEntry(r);await this.cache.set(n.toKey(),a),await((t=this.keyManifest)===null||t===void 0?void 0:t.add(n.toKey()))}async clear(r){var t;const n=await this.getCacheKeys();n&&(await n.filter(a=>!r||a.includes(r)).reduce(async(a,i)=>{await a,await this.cache.remove(i)},Promise.resolve()),await((t=this.keyManifest)===null||t===void 0?void 0:t.clear()))}async wrapCacheEntry(r){const t=await this.nowProvider();return{body:r,expiresAt:Math.floor(t/1e3)+r.expires_in}}async getCacheKeys(){var r;return this.keyManifest?(r=await this.keyManifest.get())===null||r===void 0?void 0:r.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(r){return new qr({clientId:r},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(r,t){return t.filter(n=>{var a;const i=qr.fromKey(n),o=new Set(i.scope&&i.scope.split(" ")),s=((a=r.scope)===null||a===void 0?void 0:a.split(" "))||[],c=i.scope&&s.reduce((l,u)=>l&&o.has(u),!0);return i.prefix==="@@auth0spajs@@"&&i.clientId===r.clientId&&i.audience===r.audience&&c})[0]}},tm=class{constructor(r,t,n){this.storage=r,this.clientId=t,this.cookieDomain=n,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(r){this.storage.save(this.storageKey,r,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}};const St=e=>typeof e=="number",nm=["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"],am=e=>{if(!e.id_token)throw new Error("ID token is required but missing");const r=(i=>{const o=i.split("."),[s,c,l]=o;if(o.length!==3||!s||!c||!l)throw new Error("ID token could not be decoded");const u=JSON.parse(Tf(c)),f={__raw:i},h={};return Object.keys(u).forEach(d=>{f[d]=u[d],nm.includes(d)||(h[d]=u[d])}),{encoded:{header:s,payload:c,signature:l},header:JSON.parse(Tf(s)),claims:f,user:h}})(e.id_token);if(!r.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(r.claims.iss!==e.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${e.iss}", found "${r.claims.iss}"`);if(!r.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(r.header.alg!=="RS256")throw new Error(`Signature algorithm of "${r.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!r.claims.aud||typeof r.claims.aud!="string"&&!Array.isArray(r.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(r.claims.aud)){if(!r.claims.aud.includes(e.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but was not one of "${r.claims.aud.join(", ")}"`);if(r.claims.aud.length>1){if(!r.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(r.claims.azp!==e.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${e.aud}", found "${r.claims.azp}"`)}}else if(r.claims.aud!==e.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but found "${r.claims.aud}"`);if(e.nonce){if(!r.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(r.claims.nonce!==e.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${e.nonce}", found "${r.claims.nonce}"`)}if(e.max_age&&!St(r.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(r.claims.exp==null||!St(r.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!St(r.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const t=e.leeway||60,n=new Date(e.now||Date.now()),a=new Date(0);if(a.setUTCSeconds(r.claims.exp+t),n>a)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${n}) is after expiration time (${a})`);if(r.claims.nbf!=null&&St(r.claims.nbf)){const i=new Date(0);if(i.setUTCSeconds(r.claims.nbf-t),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(r.claims.auth_time!=null&&St(r.claims.auth_time)){const i=new Date(0);if(i.setUTCSeconds(parseInt(r.claims.auth_time)+e.max_age+t),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(!r.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(o!==r.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${o}", found "${r.claims.org_id}"`)}else{const o=i.toLowerCase();if(!r.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(o!==r.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${o}", found "${r.claims.org_name}"`)}}return r};var xr=fs(function(e,r){var t=Ur&&Ur.__assign||function(){return t=Object.assign||function(c){for(var l,u=1,f=arguments.length;u<f;u++)for(var h in l=arguments[u])Object.prototype.hasOwnProperty.call(l,h)&&(c[h]=l[h]);return c},t.apply(this,arguments)};function n(c,l){if(!l)return"";var u="; "+c;return l===!0?u:u+"="+l}function a(c,l,u){return encodeURIComponent(c).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(l).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(f){if(typeof f.expires=="number"){var h=new Date;h.setMilliseconds(h.getMilliseconds()+864e5*f.expires),f.expires=h}return n("Expires",f.expires?f.expires.toUTCString():"")+n("Domain",f.domain)+n("Path",f.path)+n("Secure",f.secure)+n("SameSite",f.sameSite)}(u)}function i(c){for(var l={},u=c?c.split("; "):[],f=/(%[\dA-F]{2})+/gi,h=0;h<u.length;h++){var d=u[h].split("="),v=d.slice(1).join("=");v.charAt(0)==='"'&&(v=v.slice(1,-1));try{l[d[0].replace(f,decodeURIComponent)]=v.replace(f,decodeURIComponent)}catch{}}return l}function o(){return i(document.cookie)}function s(c,l,u){document.cookie=a(c,l,t({path:"/"},u))}r.__esModule=!0,r.encode=a,r.parse=i,r.getAll=o,r.get=function(c){return o()[c]},r.set=s,r.remove=function(c,l){s(c,"",t(t({},l),{expires:-1}))}});ls(xr),xr.encode,xr.parse,xr.getAll;var im=xr.get,Th=xr.set,Oh=xr.remove;const Xr={get(e){const r=im(e);if(r!==void 0)return JSON.parse(r)},save(e,r,t){let n={};window.location.protocol==="https:"&&(n={secure:!0,sameSite:"none"}),t?.daysUntilExpire&&(n.expires=t.daysUntilExpire),t?.cookieDomain&&(n.domain=t.cookieDomain),Th(e,JSON.stringify(r),n)},remove(e,r){let t={};r?.cookieDomain&&(t.domain=r.cookieDomain),Oh(e,t)}},om={get(e){return Xr.get(e)||Xr.get(`_legacy_${e}`)},save(e,r,t){let n={};window.location.protocol==="https:"&&(n={secure:!0}),t?.daysUntilExpire&&(n.expires=t.daysUntilExpire),t?.cookieDomain&&(n.domain=t.cookieDomain),Th(`_legacy_${e}`,JSON.stringify(r),n),Xr.save(e,r,t)},remove(e,r){let t={};r?.cookieDomain&&(t.domain=r.cookieDomain),Oh(e,t),Xr.remove(e,r),Xr.remove(`_legacy_${e}`,r)}},sm={get(e){if(typeof sessionStorage>"u")return;const r=sessionStorage.getItem(e);return r!=null?JSON.parse(r):void 0},save(e,r){sessionStorage.setItem(e,JSON.stringify(r))},remove(e){sessionStorage.removeItem(e)}};function um(e,r,t){var n=r===void 0?null:r,a=function(c,l){var u=atob(c);if(l){for(var f=new Uint8Array(u.length),h=0,d=u.length;h<d;++h)f[h]=u.charCodeAt(h);return String.fromCharCode.apply(null,new Uint16Array(f.buffer))}return u}(e,t!==void 0&&t),i=a.indexOf(`
2
- `,10)+1,o=a.substring(i)+(n?"//# sourceMappingURL="+n:""),s=new Blob([o],{type:"application/javascript"});return URL.createObjectURL(s)}var Of,kf,Cf,Io,cm=(Of="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=",kf=null,Cf=!1,function(e){return Io=Io||um(Of,kf,Cf),new Worker(Io,e)});const Po={};let lm=class{constructor(r,t){this.cache=r,this.clientId=t,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(r){var t;const n=new Set(((t=await this.cache.get(this.manifestKey))===null||t===void 0?void 0:t.keys)||[]);n.add(r),await this.cache.set(this.manifestKey,{keys:[...n]})}async remove(r){const t=await this.cache.get(this.manifestKey);if(t){const n=new Set(t.keys);return n.delete(r),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(r){return`@@auth0spajs@@::${r}`}};const fm={memory:()=>new _h().enclosedCache,localstorage:()=>new em},Af=e=>fm[e],jf=e=>{const{openUrl:r,onRedirect:t}=e,n=pr(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},n),{openUrl:r===!1||r?r:t})},Eo=new zp;let dm=class{constructor(r){let t,n;if(this.userCache=new _h().enclosedCache,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{await Eo.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),r),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),r.authorizationParams)}),typeof window<"u"&&(()=>{if(!Jt())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(Jt().subtle===void 0)throw new Error(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Ms=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Fs={},Mn,Hs;function De(){return Hs||(Hs=1,Mn=function(r){try{return!!r()}catch{return!0}}),Mn}var Fn,Ks;function hn(){if(Ks)return Fn;Ks=1;var r=De();return Fn=!r(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Fn}var Hn,zs;function Se(){if(zs)return Hn;zs=1;var r=hn(),e=Function.prototype,t=e.call,n=r&&e.bind.bind(t,t);return Hn=r?n:function(a){return function(){return t.apply(a,arguments)}},Hn}var Kn,Bs;function vn(){if(Bs)return Kn;Bs=1;var r=Se(),e=r({}.toString),t=r("".slice);return Kn=function(n){return t(e(n),8,-1)},Kn}var zn,Gs;function Nd(){if(Gs)return zn;Gs=1;var r=Se(),e=De(),t=vn(),n=Object,a=r("".split);return zn=e(function(){return!n("z").propertyIsEnumerable(0)})?function(i){return t(i)==="String"?a(i,""):n(i)}:n,zn}var Bn,Ws;function pn(){return Ws||(Ws=1,Bn=function(r){return r==null}),Bn}var Gn,Vs;function mn(){if(Vs)return Gn;Vs=1;var r=pn(),e=TypeError;return Gn=function(t){if(r(t))throw new e("Can't call method on "+t);return t},Gn}var Wn,Js;function xt(){if(Js)return Wn;Js=1;var r=Nd(),e=mn();return Wn=function(t){return r(e(t))},Wn}var St,Zs;function Ie(){if(Zs)return St;Zs=1;var r=function(e){return e&&e.Math===Math&&e};return St=r(typeof globalThis=="object"&&globalThis)||r(typeof window=="object"&&window)||r(typeof self=="object"&&self)||r(typeof Ms=="object"&&Ms)||r(typeof St=="object"&&St)||function(){return this}()||Function("return this")(),St}var Vn={exports:{}},Jn,Ys;function gr(){return Ys||(Ys=1,Jn=!1),Jn}var Zn,Xs;function Qo(){if(Xs)return Zn;Xs=1;var r=Ie(),e=Object.defineProperty;return Zn=function(t,n){try{e(r,t,{value:n,configurable:!0,writable:!0})}catch{r[t]=n}return n},Zn}var Qs;function es(){if(Qs)return Vn.exports;Qs=1;var r=gr(),e=Ie(),t=Qo(),n="__core-js_shared__",a=Vn.exports=e[n]||t(n,{});return(a.versions||(a.versions=[])).push({version:"3.45.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Vn.exports}var Yn,eu;function xd(){if(eu)return Yn;eu=1;var r=es();return Yn=function(e,t){return r[e]||(r[e]=t||{})},Yn}var Xn,ru;function gn(){if(ru)return Xn;ru=1;var r=mn(),e=Object;return Xn=function(t){return e(r(t))},Xn}var Qn,tu;function ar(){if(tu)return Qn;tu=1;var r=Se(),e=gn(),t=r({}.hasOwnProperty);return Qn=Object.hasOwn||function(a,i){return t(e(a),i)},Qn}var ea,nu;function Dd(){if(nu)return ea;nu=1;var r=Se(),e=0,t=Math.random(),n=r(1.1.toString);return ea=function(a){return"Symbol("+(a===void 0?"":a)+")_"+n(++e+t,36)},ea}var ra,au;function Dt(){if(au)return ra;au=1;var r=Ie(),e=r.navigator,t=e&&e.userAgent;return ra=t?String(t):"",ra}var ta,iu;function $d(){if(iu)return ta;iu=1;var r=Ie(),e=Dt(),t=r.process,n=r.Deno,a=t&&t.versions||n&&n.version,i=a&&a.v8,o,s;return i&&(o=i.split("."),s=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!s&&e&&(o=e.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=e.match(/Chrome\/(\d+)/),o&&(s=+o[1]))),ta=s,ta}var na,ou;function Md(){if(ou)return na;ou=1;var r=$d(),e=De(),t=Ie(),n=t.String;return na=!!Object.getOwnPropertySymbols&&!e(function(){var a=Symbol("symbol detection");return!n(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&r&&r<41}),na}var aa,su;function Fd(){if(su)return aa;su=1;var r=Md();return aa=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol",aa}var ia,uu;function $e(){if(uu)return ia;uu=1;var r=Ie(),e=xd(),t=ar(),n=Dd(),a=Md(),i=Fd(),o=r.Symbol,s=e("wks"),c=i?o.for||o:o&&o.withoutSetter||n;return ia=function(l){return t(s,l)||(s[l]=a&&t(o,l)?o[l]:c("Symbol."+l)),s[l]},ia}var oa,cu;function Ee(){if(cu)return oa;cu=1;var r=typeof document=="object"&&document.all;return oa=typeof r>"u"&&r!==void 0?function(e){return typeof e=="function"||e===r}:function(e){return typeof e=="function"},oa}var sa,lu;function ir(){if(lu)return sa;lu=1;var r=Ee();return sa=function(e){return typeof e=="object"?e!==null:r(e)},sa}var ua,fu;function ur(){if(fu)return ua;fu=1;var r=ir(),e=String,t=TypeError;return ua=function(n){if(r(n))return n;throw new t(e(n)+" is not an object")},ua}var ca={},la,du;function Me(){if(du)return la;du=1;var r=De();return la=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),la}var fa,hu;function Hd(){if(hu)return fa;hu=1;var r=Me(),e=De();return fa=r&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),fa}var da={},ha,vu;function yn(){if(vu)return ha;vu=1;var r=Ie(),e=ir(),t=r.document,n=e(t)&&e(t.createElement);return ha=function(a){return n?t.createElement(a):{}},ha}var va,pu;function Kd(){if(pu)return va;pu=1;var r=Me(),e=De(),t=yn();return va=!r&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),va}var pa,mu;function Ke(){if(mu)return pa;mu=1;var r=hn(),e=Function.prototype.call;return pa=r?e.bind(e):function(){return e.apply(e,arguments)},pa}var ma,gu;function or(){if(gu)return ma;gu=1;var r=Ie(),e=Ee(),t=function(n){return e(n)?n:void 0};return ma=function(n,a){return arguments.length<2?t(r[n]):r[n]&&r[n][a]},ma}var ga,yu;function wn(){if(yu)return ga;yu=1;var r=Se();return ga=r({}.isPrototypeOf),ga}var ya,wu;function zd(){if(wu)return ya;wu=1;var r=or(),e=Ee(),t=wn(),n=Fd(),a=Object;return ya=n?function(i){return typeof i=="symbol"}:function(i){var o=r("Symbol");return e(o)&&t(o.prototype,a(i))},ya}var wa,bu;function bn(){if(bu)return wa;bu=1;var r=String;return wa=function(e){try{return r(e)}catch{return"Object"}},wa}var ba,Su;function cr(){if(Su)return ba;Su=1;var r=Ee(),e=bn(),t=TypeError;return ba=function(n){if(r(n))return n;throw new t(e(n)+" is not a function")},ba}var Sa,Iu;function rs(){if(Iu)return Sa;Iu=1;var r=cr(),e=pn();return Sa=function(t,n){var a=t[n];return e(a)?void 0:r(a)},Sa}var Ia,Pu;function Nv(){if(Pu)return Ia;Pu=1;var r=Ke(),e=Ee(),t=ir(),n=TypeError;return Ia=function(a,i){var o,s;if(i==="string"&&e(o=a.toString)&&!t(s=r(o,a))||e(o=a.valueOf)&&!t(s=r(o,a))||i!=="string"&&e(o=a.toString)&&!t(s=r(o,a)))return s;throw new n("Can't convert object to primitive value")},Ia}var Pa,Eu;function xv(){if(Eu)return Pa;Eu=1;var r=Ke(),e=ir(),t=zd(),n=rs(),a=Nv(),i=$e(),o=TypeError,s=i("toPrimitive");return Pa=function(c,l){if(!e(c)||t(c))return c;var u=n(c,s),f;if(u){if(l===void 0&&(l="default"),f=r(u,c,l),!e(f)||t(f))return f;throw new o("Can't convert object to primitive value")}return l===void 0&&(l="number"),a(c,l)},Pa}var Ea,Ru;function Bd(){if(Ru)return Ea;Ru=1;var r=xv(),e=zd();return Ea=function(t){var n=r(t,"string");return e(n)?n:n+""},Ea}var Tu;function Pr(){if(Tu)return da;Tu=1;var r=Me(),e=Kd(),t=Hd(),n=ur(),a=Bd(),i=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c="enumerable",l="configurable",u="writable";return da.f=r?t?function(h,d,v){if(n(h),d=a(d),n(v),typeof h=="function"&&d==="prototype"&&"value"in v&&u in v&&!v[u]){var p=s(h,d);p&&p[u]&&(h[d]=v.value,v={configurable:l in v?v[l]:p[l],enumerable:c in v?v[c]:p[c],writable:!1})}return o(h,d,v)}:o:function(h,d,v){if(n(h),d=a(d),n(v),e)try{return o(h,d,v)}catch{}if("get"in v||"set"in v)throw new i("Accessors not supported");return"value"in v&&(h[d]=v.value),h},da}var Ra,_u;function Dv(){if(_u)return Ra;_u=1;var r=Math.ceil,e=Math.floor;return Ra=Math.trunc||function(n){var a=+n;return(a>0?e:r)(a)},Ra}var Ta,ku;function ts(){if(ku)return Ta;ku=1;var r=Dv();return Ta=function(e){var t=+e;return t!==t||t===0?0:r(t)},Ta}var _a,Ou;function Gd(){if(Ou)return _a;Ou=1;var r=ts(),e=Math.max,t=Math.min;return _a=function(n,a){var i=r(n);return i<0?e(i+a,0):t(i,a)},_a}var ka,Cu;function $v(){if(Cu)return ka;Cu=1;var r=ts(),e=Math.min;return ka=function(t){var n=r(t);return n>0?e(n,9007199254740991):0},ka}var Oa,Au;function ns(){if(Au)return Oa;Au=1;var r=$v();return Oa=function(e){return r(e.length)},Oa}var Ca,ju;function Mv(){if(ju)return Ca;ju=1;var r=xt(),e=Gd(),t=ns(),n=function(a){return function(i,o,s){var c=r(i),l=t(c);if(l===0)return!a&&-1;var u=e(s,l),f;if(a&&o!==o){for(;l>u;)if(f=c[u++],f!==f)return!0}else for(;l>u;u++)if((a||u in c)&&c[u]===o)return a||u||0;return!a&&-1}};return Ca={includes:n(!0),indexOf:n(!1)},Ca}var Aa,Uu;function as(){return Uu||(Uu=1,Aa={}),Aa}var ja,Lu;function Wd(){if(Lu)return ja;Lu=1;var r=Se(),e=ar(),t=xt(),n=Mv().indexOf,a=as(),i=r([].push);return ja=function(o,s){var c=t(o),l=0,u=[],f;for(f in c)!e(a,f)&&e(c,f)&&i(u,f);for(;s.length>l;)e(c,f=s[l++])&&(~n(u,f)||i(u,f));return u},ja}var Ua,qu;function is(){return qu||(qu=1,Ua=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Ua}var La,Nu;function Vd(){if(Nu)return La;Nu=1;var r=Wd(),e=is();return La=Object.keys||function(n){return r(n,e)},La}var xu;function Fv(){if(xu)return ca;xu=1;var r=Me(),e=Hd(),t=Pr(),n=ur(),a=xt(),i=Vd();return ca.f=r&&!e?Object.defineProperties:function(s,c){n(s);for(var l=a(c),u=i(c),f=u.length,h=0,d;f>h;)t.f(s,d=u[h++],l[d]);return s},ca}var qa,Du;function Jd(){if(Du)return qa;Du=1;var r=or();return qa=r("document","documentElement"),qa}var Na,$u;function os(){if($u)return Na;$u=1;var r=xd(),e=Dd(),t=r("keys");return Na=function(n){return t[n]||(t[n]=e(n))},Na}var xa,Mu;function $t(){if(Mu)return xa;Mu=1;var r=ur(),e=Fv(),t=is(),n=as(),a=Jd(),i=yn(),o=os(),s=">",c="<",l="prototype",u="script",f=o("IE_PROTO"),h=function(){},d=function(b){return c+u+s+b+c+"/"+u+s},v=function(b){b.write(d("")),b.close();var y=b.parentWindow.Object;return b=null,y},p=function(){var b=i("iframe"),y="java"+u+":",m;return b.style.display="none",a.appendChild(b),b.src=String(y),m=b.contentWindow.document,m.open(),m.write(d("document.F=Object")),m.close(),m.F},g,E=function(){try{g=new ActiveXObject("htmlfile")}catch{}E=typeof document<"u"?document.domain&&g?v(g):p():v(g);for(var b=t.length;b--;)delete E[l][t[b]];return E()};return n[f]=!0,xa=Object.create||function(y,m){var w;return y!==null?(h[l]=r(y),w=new h,h[l]=null,w[f]=y):w=E(),m===void 0?w:e.f(w,m)},xa}var Da,Fu;function Hv(){if(Fu)return Da;Fu=1;var r=$e(),e=$t(),t=Pr().f,n=r("unscopables"),a=Array.prototype;return a[n]===void 0&&t(a,n,{configurable:!0,value:e(null)}),Da=function(i){a[n][i]=!0},Da}var $a,Hu;function Mt(){return Hu||(Hu=1,$a={}),$a}var Ma,Ku;function Kv(){if(Ku)return Ma;Ku=1;var r=Ie(),e=Ee(),t=r.WeakMap;return Ma=e(t)&&/native code/.test(String(t)),Ma}var Fa,zu;function Br(){return zu||(zu=1,Fa=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}),Fa}var Ha,Bu;function Gr(){if(Bu)return Ha;Bu=1;var r=Me(),e=Pr(),t=Br();return Ha=r?function(n,a,i){return e.f(n,a,t(1,i))}:function(n,a,i){return n[a]=i,n},Ha}var Ka,Gu;function ht(){if(Gu)return Ka;Gu=1;var r=Kv(),e=Ie(),t=ir(),n=Gr(),a=ar(),i=es(),o=os(),s=as(),c="Object already initialized",l=e.TypeError,u=e.WeakMap,f,h,d,v=function(b){return d(b)?h(b):f(b,{})},p=function(b){return function(y){var m;if(!t(y)||(m=h(y)).type!==b)throw new l("Incompatible receiver, "+b+" required");return m}};if(r||i.state){var g=i.state||(i.state=new u);g.get=g.get,g.has=g.has,g.set=g.set,f=function(b,y){if(g.has(b))throw new l(c);return y.facade=b,g.set(b,y),y},h=function(b){return g.get(b)||{}},d=function(b){return g.has(b)}}else{var E=o("state");s[E]=!0,f=function(b,y){if(a(b,E))throw new l(c);return y.facade=b,n(b,E,y),y},h=function(b){return a(b,E)?b[E]:{}},d=function(b){return a(b,E)}}return Ka={set:f,get:h,has:d,enforce:v,getterFor:p},Ka}var za={},Ba={},Wu;function Zd(){if(Wu)return Ba;Wu=1;var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);return Ba.f=t?function(a){var i=e(this,a);return!!i&&i.enumerable}:r,Ba}var Vu;function Yd(){if(Vu)return za;Vu=1;var r=Me(),e=Ke(),t=Zd(),n=Br(),a=xt(),i=Bd(),o=ar(),s=Kd(),c=Object.getOwnPropertyDescriptor;return za.f=r?c:function(u,f){if(u=a(u),f=i(f),s)try{return c(u,f)}catch{}if(o(u,f))return n(!e(t.f,u,f),u[f])},za}var Ga={exports:{}},Wa,Ju;function Xd(){if(Ju)return Wa;Ju=1;var r=Me(),e=ar(),t=Function.prototype,n=r&&Object.getOwnPropertyDescriptor,a=e(t,"name"),i=a&&(function(){}).name==="something",o=a&&(!r||r&&n(t,"name").configurable);return Wa={EXISTS:a,PROPER:i,CONFIGURABLE:o},Wa}var Va,Zu;function ss(){if(Zu)return Va;Zu=1;var r=Se(),e=Ee(),t=es(),n=r(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(a){return n(a)}),Va=t.inspectSource,Va}var Yu;function Qd(){if(Yu)return Ga.exports;Yu=1;var r=Se(),e=De(),t=Ee(),n=ar(),a=Me(),i=Xd().CONFIGURABLE,o=ss(),s=ht(),c=s.enforce,l=s.get,u=String,f=Object.defineProperty,h=r("".slice),d=r("".replace),v=r([].join),p=a&&!e(function(){return f(function(){},"length",{value:8}).length!==8}),g=String(String).split("String"),E=Ga.exports=function(b,y,m){h(u(y),0,7)==="Symbol("&&(y="["+d(u(y),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),m&&m.getter&&(y="get "+y),m&&m.setter&&(y="set "+y),(!n(b,"name")||i&&b.name!==y)&&(a?f(b,"name",{value:y,configurable:!0}):b.name=y),p&&m&&n(m,"arity")&&b.length!==m.arity&&f(b,"length",{value:m.arity});try{m&&n(m,"constructor")&&m.constructor?a&&f(b,"prototype",{writable:!1}):b.prototype&&(b.prototype=void 0)}catch{}var w=c(b);return n(w,"source")||(w.source=v(g,typeof y=="string"?y:"")),b};return Function.prototype.toString=E(function(){return t(this)&&l(this).source||o(this)},"toString"),Ga.exports}var Ja,Xu;function sr(){if(Xu)return Ja;Xu=1;var r=Ee(),e=Pr(),t=Qd(),n=Qo();return Ja=function(a,i,o,s){s||(s={});var c=s.enumerable,l=s.name!==void 0?s.name:i;if(r(o)&&t(o,l,s),s.global)c?a[i]=o:n(i,o);else{try{s.unsafe?a[i]&&(c=!0):delete a[i]}catch{}c?a[i]=o:e.f(a,i,{value:o,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return a},Ja}var Za={},Qu;function zv(){if(Qu)return Za;Qu=1;var r=Wd(),e=is(),t=e.concat("length","prototype");return Za.f=Object.getOwnPropertyNames||function(a){return r(a,t)},Za}var Ya={},ec;function eh(){return ec||(ec=1,Ya.f=Object.getOwnPropertySymbols),Ya}var Xa,rc;function Bv(){if(rc)return Xa;rc=1;var r=or(),e=Se(),t=zv(),n=eh(),a=ur(),i=e([].concat);return Xa=r("Reflect","ownKeys")||function(s){var c=t.f(a(s)),l=n.f;return l?i(c,l(s)):c},Xa}var Qa,tc;function rh(){if(tc)return Qa;tc=1;var r=ar(),e=Bv(),t=Yd(),n=Pr();return Qa=function(a,i,o){for(var s=e(i),c=n.f,l=t.f,u=0;u<s.length;u++){var f=s[u];!r(a,f)&&!(o&&r(o,f))&&c(a,f,l(i,f))}},Qa}var ei,nc;function th(){if(nc)return ei;nc=1;var r=De(),e=Ee(),t=/#|\.prototype\./,n=function(c,l){var u=i[a(c)];return u===s?!0:u===o?!1:e(l)?r(l):!!l},a=n.normalize=function(c){return String(c).replace(t,".").toLowerCase()},i=n.data={},o=n.NATIVE="N",s=n.POLYFILL="P";return ei=n,ei}var ri,ac;function Oe(){if(ac)return ri;ac=1;var r=Ie(),e=Yd().f,t=Gr(),n=sr(),a=Qo(),i=rh(),o=th();return ri=function(s,c){var l=s.target,u=s.global,f=s.stat,h,d,v,p,g,E;if(u?d=r:f?d=r[l]||a(l,{}):d=r[l]&&r[l].prototype,d)for(v in c){if(g=c[v],s.dontCallGetSet?(E=e(d,v),p=E&&E.value):p=d[v],h=o(u?v:l+(f?".":"#")+v,s.forced),!h&&p!==void 0){if(typeof g==typeof p)continue;i(g,p)}(s.sham||p&&p.sham)&&t(g,"sham",!0),n(d,v,g,s)}},ri}var ti,ic;function Gv(){if(ic)return ti;ic=1;var r=De();return ti=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),ti}var ni,oc;function us(){if(oc)return ni;oc=1;var r=ar(),e=Ee(),t=gn(),n=os(),a=Gv(),i=n("IE_PROTO"),o=Object,s=o.prototype;return ni=a?o.getPrototypeOf:function(c){var l=t(c);if(r(l,i))return l[i];var u=l.constructor;return e(u)&&l instanceof u?u.prototype:l instanceof o?s:null},ni}var ai,sc;function nh(){if(sc)return ai;sc=1;var r=De(),e=Ee(),t=ir(),n=$t(),a=us(),i=sr(),o=$e(),s=gr(),c=o("iterator"),l=!1,u,f,h;[].keys&&(h=[].keys(),"next"in h?(f=a(a(h)),f!==Object.prototype&&(u=f)):l=!0);var d=!t(u)||r(function(){var v={};return u[c].call(v)!==v});return d?u={}:s&&(u=n(u)),e(u[c])||i(u,c,function(){return this}),ai={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:l},ai}var ii,uc;function vt(){if(uc)return ii;uc=1;var r=Pr().f,e=ar(),t=$e(),n=t("toStringTag");return ii=function(a,i,o){a&&!o&&(a=a.prototype),a&&!e(a,n)&&r(a,n,{configurable:!0,value:i})},ii}var oi,cc;function ah(){if(cc)return oi;cc=1;var r=nh().IteratorPrototype,e=$t(),t=Br(),n=vt(),a=Mt(),i=function(){return this};return oi=function(o,s,c,l){var u=s+" Iterator";return o.prototype=e(r,{next:t(+!l,c)}),n(o,u,!1,!0),a[u]=i,o},oi}var si,lc;function Wv(){if(lc)return si;lc=1;var r=Se(),e=cr();return si=function(t,n,a){try{return r(e(Object.getOwnPropertyDescriptor(t,n)[a]))}catch{}},si}var ui,fc;function Vv(){if(fc)return ui;fc=1;var r=ir();return ui=function(e){return r(e)||e===null},ui}var ci,dc;function Jv(){if(dc)return ci;dc=1;var r=Vv(),e=String,t=TypeError;return ci=function(n){if(r(n))return n;throw new t("Can't set "+e(n)+" as a prototype")},ci}var li,hc;function cs(){if(hc)return li;hc=1;var r=Wv(),e=ir(),t=mn(),n=Jv();return li=Object.setPrototypeOf||("__proto__"in{}?function(){var a=!1,i={},o;try{o=r(Object.prototype,"__proto__","set"),o(i,[]),a=i instanceof Array}catch{}return function(c,l){return t(c),n(l),e(c)&&(a?o(c,l):c.__proto__=l),c}}():void 0),li}var fi,vc;function ih(){if(vc)return fi;vc=1;var r=Oe(),e=Ke(),t=gr(),n=Xd(),a=Ee(),i=ah(),o=us(),s=cs(),c=vt(),l=Gr(),u=sr(),f=$e(),h=Mt(),d=nh(),v=n.PROPER,p=n.CONFIGURABLE,g=d.IteratorPrototype,E=d.BUGGY_SAFARI_ITERATORS,b=f("iterator"),y="keys",m="values",w="entries",O=function(){return this};return fi=function(N,A,K,z,ae,L,$){i(K,A,z);var q=function(Z){if(Z===ae&&S)return S;if(!E&&Z&&Z in re)return re[Z];switch(Z){case y:return function(){return new K(this,Z)};case m:return function(){return new K(this,Z)};case w:return function(){return new K(this,Z)}}return function(){return new K(this)}},k=A+" Iterator",Y=!1,re=N.prototype,Q=re[b]||re["@@iterator"]||ae&&re[ae],S=!E&&Q||q(ae),T=A==="Array"&&re.entries||Q,x,H,B;if(T&&(x=o(T.call(new N)),x!==Object.prototype&&x.next&&(!t&&o(x)!==g&&(s?s(x,g):a(x[b])||u(x,b,O)),c(x,k,!0,!0),t&&(h[k]=O))),v&&ae===m&&Q&&Q.name!==m&&(!t&&p?l(re,"name",m):(Y=!0,S=function(){return e(Q,this)})),ae)if(H={values:q(m),keys:L?S:q(y),entries:q(w)},$)for(B in H)(E||Y||!(B in re))&&u(re,B,H[B]);else r({target:A,proto:!0,forced:E||Y},H);return(!t||$)&&re[b]!==S&&u(re,b,S,{name:ae}),h[A]=S,H},fi}var di,pc;function ls(){return pc||(pc=1,di=function(r,e){return{value:r,done:e}}),di}var hi,mc;function fs(){if(mc)return hi;mc=1;var r=xt(),e=Hv(),t=Mt(),n=ht(),a=Pr().f,i=ih(),o=ls(),s=gr(),c=Me(),l="Array Iterator",u=n.set,f=n.getterFor(l);hi=i(Array,"Array",function(d,v){u(this,{type:l,target:r(d),index:0,kind:v})},function(){var d=f(this),v=d.target,p=d.index++;if(!v||p>=v.length)return d.target=null,o(void 0,!0);switch(d.kind){case"keys":return o(p,!1);case"values":return o(v[p],!1)}return o([p,v[p]],!1)},"values");var h=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!s&&c&&h.name!=="values")try{a(h,"name",{value:"values"})}catch{}return hi}var gc={},yc;function Zv(){if(yc)return gc;yc=1;var r=Oe(),e=Se(),t=Gd(),n=RangeError,a=String.fromCharCode,i=String.fromCodePoint,o=e([].join),s=!!i&&i.length!==1;return r({target:"String",stat:!0,arity:1,forced:s},{fromCodePoint:function(l){for(var u=[],f=arguments.length,h=0,d;f>h;){if(d=+arguments[h++],t(d,1114111)!==d)throw new n(d+" is not a valid code point");u[h]=d<65536?a(d):a(((d-=65536)>>10)+55296,d%1024+56320)}return o(u,"")}}),gc}var vi,wc;function oh(){if(wc)return vi;wc=1;var r=Ie(),e=Me(),t=Object.getOwnPropertyDescriptor;return vi=function(n){if(!e)return r[n];var a=t(r,n);return a&&a.value},vi}var pi,bc;function Sn(){if(bc)return pi;bc=1;var r=De(),e=$e(),t=Me(),n=gr(),a=e("iterator");return pi=!r(function(){var i=new URL("b?a=1&b=2&c=3","https://a"),o=i.searchParams,s=new URLSearchParams("a=1&a=2&b=3"),c="";return i.pathname="c%20d",o.forEach(function(l,u){o.delete("b"),c+=u+l}),s.delete("a",2),s.delete("b",void 0),n&&(!i.toJSON||!s.has("a",1)||s.has("a",2)||!s.has("a",void 0)||s.has("b"))||!o.size&&(n||!t)||!o.sort||i.href!=="https://a/c%20d?a=1&c=3"||o.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!o[a]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||c!=="a1c3"||new URL("https://x",void 0).host!=="x"}),pi}var mi,Sc;function In(){if(Sc)return mi;Sc=1;var r=Qd(),e=Pr();return mi=function(t,n,a){return a.get&&r(a.get,n,{getter:!0}),a.set&&r(a.set,n,{setter:!0}),e.f(t,n,a)},mi}var gi,Ic;function Yv(){if(Ic)return gi;Ic=1;var r=sr();return gi=function(e,t,n){for(var a in t)r(e,a,t[a],n);return e},gi}var yi,Pc;function ds(){if(Pc)return yi;Pc=1;var r=wn(),e=TypeError;return yi=function(t,n){if(r(n,t))return t;throw new e("Incorrect invocation")},yi}var wi,Ec;function Xv(){if(Ec)return wi;Ec=1;var r=vn(),e=Se();return wi=function(t){if(r(t)==="Function")return e(t)},wi}var bi,Rc;function pt(){if(Rc)return bi;Rc=1;var r=Xv(),e=cr(),t=hn(),n=r(r.bind);return bi=function(a,i){return e(a),i===void 0?a:t?n(a,i):function(){return a.apply(i,arguments)}},bi}var Si,Tc;function hs(){if(Tc)return Si;Tc=1;var r=$e(),e=r("toStringTag"),t={};return t[e]="z",Si=String(t)==="[object z]",Si}var Ii,_c;function Ft(){if(_c)return Ii;_c=1;var r=hs(),e=Ee(),t=vn(),n=$e(),a=n("toStringTag"),i=Object,o=t(function(){return arguments}())==="Arguments",s=function(c,l){try{return c[l]}catch{}};return Ii=r?t:function(c){var l,u,f;return c===void 0?"Undefined":c===null?"Null":typeof(u=s(l=i(c),a))=="string"?u:o?t(l):(f=t(l))==="Object"&&e(l.callee)?"Arguments":f},Ii}var Pi,kc;function Er(){if(kc)return Pi;kc=1;var r=Ft(),e=String;return Pi=function(t){if(r(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(t)},Pi}var Ei,Oc;function Pn(){if(Oc)return Ei;Oc=1;var r=Ft(),e=rs(),t=pn(),n=Mt(),a=$e(),i=a("iterator");return Ei=function(o){if(!t(o))return e(o,i)||e(o,"@@iterator")||n[r(o)]},Ei}var Ri,Cc;function vs(){if(Cc)return Ri;Cc=1;var r=Ke(),e=cr(),t=ur(),n=bn(),a=Pn(),i=TypeError;return Ri=function(o,s){var c=arguments.length<2?a(o):s;if(e(c))return t(r(c,o));throw new i(n(o)+" is not iterable")},Ri}var Ti,Ac;function Wr(){if(Ac)return Ti;Ac=1;var r=TypeError;return Ti=function(e,t){if(e<t)throw new r("Not enough arguments");return e},Ti}var _i,jc;function En(){if(jc)return _i;jc=1;var r=Se();return _i=r([].slice),_i}var ki,Uc;function Qv(){if(Uc)return ki;Uc=1;var r=En(),e=Math.floor,t=function(n,a){var i=n.length;if(i<8)for(var o=1,s,c;o<i;){for(c=o,s=n[o];c&&a(n[c-1],s)>0;)n[c]=n[--c];c!==o++&&(n[c]=s)}else for(var l=e(i/2),u=t(r(n,0,l),a),f=t(r(n,l),a),h=u.length,d=f.length,v=0,p=0;v<h||p<d;)n[v+p]=v<h&&p<d?a(u[v],f[p])<=0?u[v++]:f[p++]:v<h?u[v++]:f[p++];return n};return ki=t,ki}var Oi,Lc;function sh(){if(Lc)return Oi;Lc=1,fs(),Zv();var r=Oe(),e=Ie(),t=oh(),n=or(),a=Ke(),i=Se(),o=Me(),s=Sn(),c=sr(),l=In(),u=Yv(),f=vt(),h=ah(),d=ht(),v=ds(),p=Ee(),g=ar(),E=pt(),b=Ft(),y=ur(),m=ir(),w=Er(),O=$t(),N=Br(),A=vs(),K=Pn(),z=ls(),ae=Wr(),L=$e(),$=Qv(),q=L("iterator"),k="URLSearchParams",Y=k+"Iterator",re=d.set,Q=d.getterFor(k),S=d.getterFor(Y),T=t("fetch"),x=t("Request"),H=t("Headers"),B=x&&x.prototype,Z=H&&H.prototype,fe=e.TypeError,ie=e.encodeURIComponent,ce=String.fromCharCode,oe=n("String","fromCodePoint"),Re=parseInt,_e=i("".charAt),Fe=i([].join),Ce=i([].push),Ze=i("".replace),lr=i([].shift),fr=i([].splice),_=i("".split),M=i("".slice),J=i(/./.exec),ve=/\+/g,pe="�",me=/^[0-9a-f]+$/i,Ae=function(D,W){var V=M(D,W,W+2);return J(me,V)?Re(V,16):NaN},Ye=function(D){for(var W=0,V=128;V>0&&(D&V)!==0;V>>=1)W++;return W},F=function(D){var W=null;switch(D.length){case 1:W=D[0];break;case 2:W=(D[0]&31)<<6|D[1]&63;break;case 3:W=(D[0]&15)<<12|(D[1]&63)<<6|D[2]&63;break;case 4:W=(D[0]&7)<<18|(D[1]&63)<<12|(D[2]&63)<<6|D[3]&63;break}return W>1114111?null:W},ee=function(D){D=Ze(D,ve," ");for(var W=D.length,V="",X=0;X<W;){var ue=_e(D,X);if(ue==="%"){if(_e(D,X+1)==="%"||X+3>W){V+="%",X++;continue}var de=Ae(D,X+1);if(de!==de){V+=ue,X++;continue}X+=2;var we=Ye(de);if(we===0)ue=ce(de);else{if(we===1||we>4){V+=pe,X++;continue}for(var be=[de],Te=1;Te<we&&(X++,!(X+3>W||_e(D,X)!=="%"));){var He=Ae(D,X+1);if(He!==He){X+=3;break}if(He>191||He<128)break;Ce(be,He),X+=2,Te++}if(be.length!==we){V+=pe;continue}var dr=F(be);dr===null?V+=pe:ue=oe(dr)}}V+=ue,X++}return V},le=/[!'()~]|%20/g,he={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ge=function(D){return he[D]},Xe=function(D){return Ze(ie(D),le,ge)},Ue=h(function(W,V){re(this,{type:Y,target:Q(W).entries,index:0,kind:V})},k,function(){var W=S(this),V=W.target,X=W.index++;if(!V||X>=V.length)return W.target=null,z(void 0,!0);var ue=V[X];switch(W.kind){case"keys":return z(ue.key,!1);case"values":return z(ue.value,!1)}return z([ue.key,ue.value],!1)},!0),Be=function(D){this.entries=[],this.url=null,D!==void 0&&(m(D)?this.parseObject(D):this.parseQuery(typeof D=="string"?_e(D,0)==="?"?M(D,1):D:w(D)))};Be.prototype={type:k,bindURL:function(D){this.url=D,this.update()},parseObject:function(D){var W=this.entries,V=K(D),X,ue,de,we,be,Te,He;if(V)for(X=A(D,V),ue=X.next;!(de=a(ue,X)).done;){if(we=A(y(de.value)),be=we.next,(Te=a(be,we)).done||(He=a(be,we)).done||!a(be,we).done)throw new fe("Expected sequence with length 2");Ce(W,{key:w(Te.value),value:w(He.value)})}else for(var dr in D)g(D,dr)&&Ce(W,{key:dr,value:w(D[dr])})},parseQuery:function(D){if(D)for(var W=this.entries,V=_(D,"&"),X=0,ue,de;X<V.length;)ue=V[X++],ue.length&&(de=_(ue,"="),Ce(W,{key:ee(lr(de)),value:ee(Fe(de,"="))}))},serialize:function(){for(var D=this.entries,W=[],V=0,X;V<D.length;)X=D[V++],Ce(W,Xe(X.key)+"="+Xe(X.value));return Fe(W,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Le=function(){v(this,er);var W=arguments.length>0?arguments[0]:void 0,V=re(this,new Be(W));o||(this.size=V.entries.length)},er=Le.prototype;if(u(er,{append:function(W,V){var X=Q(this);ae(arguments.length,2),Ce(X.entries,{key:w(W),value:w(V)}),o||this.length++,X.updateURL()},delete:function(D){for(var W=Q(this),V=ae(arguments.length,1),X=W.entries,ue=w(D),de=V<2?void 0:arguments[1],we=de===void 0?de:w(de),be=0;be<X.length;){var Te=X[be];if(Te.key===ue&&(we===void 0||Te.value===we)){if(fr(X,be,1),we!==void 0)break}else be++}o||(this.size=X.length),W.updateURL()},get:function(W){var V=Q(this).entries;ae(arguments.length,1);for(var X=w(W),ue=0;ue<V.length;ue++)if(V[ue].key===X)return V[ue].value;return null},getAll:function(W){var V=Q(this).entries;ae(arguments.length,1);for(var X=w(W),ue=[],de=0;de<V.length;de++)V[de].key===X&&Ce(ue,V[de].value);return ue},has:function(W){for(var V=Q(this).entries,X=ae(arguments.length,1),ue=w(W),de=X<2?void 0:arguments[1],we=de===void 0?de:w(de),be=0;be<V.length;){var Te=V[be++];if(Te.key===ue&&(we===void 0||Te.value===we))return!0}return!1},set:function(W,V){var X=Q(this);ae(arguments.length,1);for(var ue=X.entries,de=!1,we=w(W),be=w(V),Te=0,He;Te<ue.length;Te++)He=ue[Te],He.key===we&&(de?fr(ue,Te--,1):(de=!0,He.value=be));de||Ce(ue,{key:we,value:be}),o||(this.size=ue.length),X.updateURL()},sort:function(){var W=Q(this);$(W.entries,function(V,X){return V.key>X.key?1:-1}),W.updateURL()},forEach:function(W){for(var V=Q(this).entries,X=E(W,arguments.length>1?arguments[1]:void 0),ue=0,de;ue<V.length;)de=V[ue++],X(de.value,de.key,this)},keys:function(){return new Ue(this,"keys")},values:function(){return new Ue(this,"values")},entries:function(){return new Ue(this,"entries")}},{enumerable:!0}),c(er,q,er.entries,{name:"entries"}),c(er,"toString",function(){return Q(this).serialize()},{enumerable:!0}),o&&l(er,"size",{get:function(){return Q(this).entries.length},configurable:!0,enumerable:!0}),f(Le,k),r({global:!0,constructor:!0,forced:!s},{URLSearchParams:Le}),!s&&p(H)){var Vr=i(Z.has),bt=i(Z.set),Jr=function(D){if(m(D)){var W=D.body,V;if(b(W)===k)return V=D.headers?new H(D.headers):new H,Vr(V,"content-type")||bt(V,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),O(D,{body:N(0,w(W)),headers:N(0,V)})}return D};if(p(T)&&r({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(W){return T(W,arguments.length>1?Jr(arguments[1]):{})}}),p(x)){var Zr=function(W){return v(this,B),new x(W,arguments.length>1?Jr(arguments[1]):{})};B.constructor=Zr,Zr.prototype=B,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Zr})}}return Oi={URLSearchParams:Le,getState:Q},Oi}var qc;function ep(){return qc||(qc=1,sh()),Fs}var Nc={},xc;function rp(){if(xc)return Nc;xc=1;var r=sr(),e=Se(),t=Er(),n=Wr(),a=URLSearchParams,i=a.prototype,o=e(i.append),s=e(i.delete),c=e(i.forEach),l=e([].push),u=new a("a=1&a=2&b=3");return u.delete("a",1),u.delete("b",void 0),u+""!="a=2"&&r(i,"delete",function(f){var h=arguments.length,d=h<2?void 0:arguments[1];if(h&&d===void 0)return s(this,f);var v=[];c(this,function(O,N){l(v,{key:N,value:O})}),n(h,1);for(var p=t(f),g=t(d),E=0,b=0,y=!1,m=v.length,w;E<m;)w=v[E++],y||w.key===p?(y=!0,s(this,w.key)):b++;for(;b<m;)w=v[b++],w.key===p&&w.value===g||o(this,w.key,w.value)},{enumerable:!0,unsafe:!0}),Nc}var Dc={},$c;function tp(){if($c)return Dc;$c=1;var r=sr(),e=Se(),t=Er(),n=Wr(),a=URLSearchParams,i=a.prototype,o=e(i.getAll),s=e(i.has),c=new a("a=1");return(c.has("a",2)||!c.has("a",void 0))&&r(i,"has",function(u){var f=arguments.length,h=f<2?void 0:arguments[1];if(f&&h===void 0)return s(this,u);var d=o(this,u);n(f,1);for(var v=t(h),p=0;p<d.length;)if(d[p++]===v)return!0;return!1},{enumerable:!0,unsafe:!0}),Dc}var Mc={},Fc;function np(){if(Fc)return Mc;Fc=1;var r=Me(),e=Se(),t=In(),n=URLSearchParams.prototype,a=e(n.forEach);return r&&!("size"in n)&&t(n,"size",{get:function(){var o=0;return a(this,function(){o++}),o},configurable:!0,enumerable:!0}),Mc}var Ci,Hc;function Rn(){if(Hc)return Ci;Hc=1;var r=Ie();return Ci=r,Ci}var Ai,Kc;function uh(){if(Kc)return Ai;Kc=1,ep(),rp(),tp(),np();var r=Rn();return Ai=r.URLSearchParams,Ai}var zc={},Bc={},Gc={},ji,Wc;function ch(){if(Wc)return ji;Wc=1;var r=Se(),e=ts(),t=Er(),n=mn(),a=r("".charAt),i=r("".charCodeAt),o=r("".slice),s=function(c){return function(l,u){var f=t(n(l)),h=e(u),d=f.length,v,p;return h<0||h>=d?c?"":void 0:(v=i(f,h),v<55296||v>56319||h+1===d||(p=i(f,h+1))<56320||p>57343?c?a(f,h):v:c?o(f,h,h+2):(v-55296<<10)+(p-56320)+65536)}};return ji={codeAt:s(!1),charAt:s(!0)},ji}var Vc;function lh(){if(Vc)return Gc;Vc=1;var r=ch().charAt,e=Er(),t=ht(),n=ih(),a=ls(),i="String Iterator",o=t.set,s=t.getterFor(i);return n(String,"String",function(c){o(this,{type:i,string:e(c),index:0})},function(){var l=s(this),u=l.string,f=l.index,h;return f>=u.length?a(void 0,!0):(h=r(u,f),l.index+=h.length,a(h,!1))}),Gc}var Ui,Jc;function ap(){if(Jc)return Ui;Jc=1;var r=Me(),e=Se(),t=Ke(),n=De(),a=Vd(),i=eh(),o=Zd(),s=gn(),c=Nd(),l=Object.assign,u=Object.defineProperty,f=e([].concat);return Ui=!l||n(function(){if(r&&l({b:1},l(u({},"a",{enumerable:!0,get:function(){u(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var h={},d={},v=Symbol("assign detection"),p="abcdefghijklmnopqrst";return h[v]=7,p.split("").forEach(function(g){d[g]=g}),l({},h)[v]!==7||a(l({},d)).join("")!==p})?function(d,v){for(var p=s(d),g=arguments.length,E=1,b=i.f,y=o.f;g>E;)for(var m=c(arguments[E++]),w=b?f(a(m),b(m)):a(m),O=w.length,N=0,A;O>N;)A=w[N++],(!r||t(y,m,A))&&(p[A]=m[A]);return p}:l,Ui}var Li,Zc;function fh(){if(Zc)return Li;Zc=1;var r=Ke(),e=ur(),t=rs();return Li=function(n,a,i){var o,s;e(n);try{if(o=t(n,"return"),!o){if(a==="throw")throw i;return i}o=r(o,n)}catch(c){s=!0,o=c}if(a==="throw")throw i;if(s)throw o;return e(o),i},Li}var qi,Yc;function ip(){if(Yc)return qi;Yc=1;var r=ur(),e=fh();return qi=function(t,n,a,i){try{return i?n(r(a)[0],a[1]):n(a)}catch(o){e(t,"throw",o)}},qi}var Ni,Xc;function dh(){if(Xc)return Ni;Xc=1;var r=$e(),e=Mt(),t=r("iterator"),n=Array.prototype;return Ni=function(a){return a!==void 0&&(e.Array===a||n[t]===a)},Ni}var xi,Qc;function hh(){if(Qc)return xi;Qc=1;var r=Se(),e=De(),t=Ee(),n=Ft(),a=or(),i=ss(),o=function(){},s=a("Reflect","construct"),c=/^\s*(?:class|function)\b/,l=r(c.exec),u=!c.test(o),f=function(v){if(!t(v))return!1;try{return s(o,[],v),!0}catch{return!1}},h=function(v){if(!t(v))return!1;switch(n(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return u||!!l(c,i(v))}catch{return!0}};return h.sham=!0,xi=!s||e(function(){var d;return f(f.call)||!f(Object)||!f(function(){d=!0})||d})?h:f,xi}var Di,el;function op(){if(el)return Di;el=1;var r=Me(),e=Pr(),t=Br();return Di=function(n,a,i){r?e.f(n,a,t(0,i)):n[a]=i},Di}var $i,rl;function sp(){if(rl)return $i;rl=1;var r=pt(),e=Ke(),t=gn(),n=ip(),a=dh(),i=hh(),o=ns(),s=op(),c=vs(),l=Pn(),u=Array;return $i=function(h){var d=t(h),v=i(this),p=arguments.length,g=p>1?arguments[1]:void 0,E=g!==void 0;E&&(g=r(g,p>2?arguments[2]:void 0));var b=l(d),y=0,m,w,O,N,A,K;if(b&&!(this===u&&a(b)))for(w=v?new this:[],N=c(d,b),A=N.next;!(O=e(A,N)).done;y++)K=E?n(N,g,[O.value,y],!0):O.value,s(w,y,K);else for(m=o(d),w=v?new this(m):u(m);m>y;y++)K=E?g(d[y],y):d[y],s(w,y,K);return w.length=y,w},$i}var Mi,tl;function up(){if(tl)return Mi;tl=1;var r=Se(),e=2147483647,t=36,n=1,a=26,i=38,o=700,s=72,c=128,l="-",u=/[^\0-\u007E]/,f=/[.\u3002\uFF0E\uFF61]/g,h="Overflow: input needs wider integers to process",d=t-n,v=RangeError,p=r(f.exec),g=Math.floor,E=String.fromCharCode,b=r("".charCodeAt),y=r([].join),m=r([].push),w=r("".replace),O=r("".split),N=r("".toLowerCase),A=function(L){for(var $=[],q=0,k=L.length;q<k;){var Y=b(L,q++);if(Y>=55296&&Y<=56319&&q<k){var re=b(L,q++);(re&64512)===56320?m($,((Y&1023)<<10)+(re&1023)+65536):(m($,Y),q--)}else m($,Y)}return $},K=function(L){return L+22+75*(L<26)},z=function(L,$,q){var k=0;for(L=q?g(L/o):L>>1,L+=g(L/$);L>d*a>>1;)L=g(L/d),k+=t;return g(k+(d+1)*L/(L+i))},ae=function(L){var $=[];L=A(L);var q=L.length,k=c,Y=0,re=s,Q,S;for(Q=0;Q<L.length;Q++)S=L[Q],S<128&&m($,E(S));var T=$.length,x=T;for(T&&m($,l);x<q;){var H=e;for(Q=0;Q<L.length;Q++)S=L[Q],S>=k&&S<H&&(H=S);var B=x+1;if(H-k>g((e-Y)/B))throw new v(h);for(Y+=(H-k)*B,k=H,Q=0;Q<L.length;Q++){if(S=L[Q],S<k&&++Y>e)throw new v(h);if(S===k){for(var Z=Y,fe=t;;){var ie=fe<=re?n:fe>=re+a?a:fe-re;if(Z<ie)break;var ce=Z-ie,oe=t-ie;m($,E(K(ie+ce%oe))),Z=g(ce/oe),fe+=t}m($,E(K(Z))),re=z(Y,B,x===T),Y=0,x++}}Y++,k++}return y($,"")};return Mi=function(L){var $=[],q=O(w(N(L),f,"."),"."),k,Y;for(k=0;k<q.length;k++)Y=q[k],m($,p(u,Y)?"xn--"+ae(Y):Y);return y($,".")},Mi}var nl;function cp(){if(nl)return Bc;nl=1,lh();var r=Oe(),e=Me(),t=Sn(),n=Ie(),a=pt(),i=Se(),o=sr(),s=In(),c=ds(),l=ar(),u=ap(),f=sp(),h=En(),d=ch().codeAt,v=up(),p=Er(),g=vt(),E=Wr(),b=sh(),y=ht(),m=y.set,w=y.getterFor("URL"),O=b.URLSearchParams,N=b.getState,A=n.URL,K=n.TypeError,z=n.parseInt,ae=Math.floor,L=Math.pow,$=i("".charAt),q=i(/./.exec),k=i([].join),Y=i(1.1.toString),re=i([].pop),Q=i([].push),S=i("".replace),T=i([].shift),x=i("".split),H=i("".slice),B=i("".toLowerCase),Z=i([].unshift),fe="Invalid authority",ie="Invalid scheme",ce="Invalid host",oe="Invalid port",Re=/[a-z]/i,_e=/[\d+-.a-z]/i,Fe=/\d/,Ce=/^0x/i,Ze=/^[0-7]+$/,lr=/^\d+$/,fr=/^[\da-f]+$/i,_=/[\0\t\n\r #%/:<>?@[\\\]^|]/,M=/[\0\t\n\r #/:<>?@[\\\]^|]/,J=/^[\u0000-\u0020]+/,ve=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,pe=/[\t\n\r]/g,me,Ae=function(P){var U=x(P,"."),R,I,C,se,G,Pe,ke;if(U.length&&U[U.length-1]===""&&U.length--,R=U.length,R>4)return P;for(I=[],C=0;C<R;C++){if(se=U[C],se==="")return P;if(G=10,se.length>1&&$(se,0)==="0"&&(G=q(Ce,se)?16:8,se=H(se,G===8?1:2)),se==="")Pe=0;else{if(!q(G===10?lr:G===8?Ze:fr,se))return P;Pe=z(se,G)}Q(I,Pe)}for(C=0;C<R;C++)if(Pe=I[C],C===R-1){if(Pe>=L(256,5-R))return null}else if(Pe>255)return null;for(ke=re(I),C=0;C<I.length;C++)ke+=I[C]*L(256,3-C);return ke},Ye=function(P){var U=[0,0,0,0,0,0,0,0],R=0,I=null,C=0,se,G,Pe,ke,qe,tr,j,je=function(){return $(P,C)};if(je()===":"){if($(P,1)!==":")return;C+=2,R++,I=R}for(;je();){if(R===8)return;if(je()===":"){if(I!==null)return;C++,R++,I=R;continue}for(se=G=0;G<4&&q(fr,je());)se=se*16+z(je(),16),C++,G++;if(je()==="."){if(G===0||(C-=G,R>6))return;for(Pe=0;je();){if(ke=null,Pe>0)if(je()==="."&&Pe<4)C++;else return;if(!q(Fe,je()))return;for(;q(Fe,je());){if(qe=z(je(),10),ke===null)ke=qe;else{if(ke===0)return;ke=ke*10+qe}if(ke>255)return;C++}U[R]=U[R]*256+ke,Pe++,(Pe===2||Pe===4)&&R++}if(Pe!==4)return;break}else if(je()===":"){if(C++,!je())return}else if(je())return;U[R++]=se}if(I!==null)for(tr=R-I,R=7;R!==0&&tr>0;)j=U[R],U[R--]=U[I+tr-1],U[I+--tr]=j;else if(R!==8)return;return U},F=function(P){for(var U=null,R=1,I=null,C=0,se=0;se<8;se++)P[se]!==0?(C>R&&(U=I,R=C),I=null,C=0):(I===null&&(I=se),++C);return C>R?I:U},ee=function(P){var U,R,I,C;if(typeof P=="number"){for(U=[],R=0;R<4;R++)Z(U,P%256),P=ae(P/256);return k(U,".")}if(typeof P=="object"){for(U="",I=F(P),R=0;R<8;R++)C&&P[R]===0||(C&&(C=!1),I===R?(U+=R?":":"::",C=!0):(U+=Y(P[R],16),R<7&&(U+=":")));return"["+U+"]"}return P},le={},he=u({},le,{" ":1,'"':1,"<":1,">":1,"`":1}),ge=u({},he,{"#":1,"?":1,"{":1,"}":1}),Xe=u({},ge,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Ue=function(P,U){var R=d(P,0);return R>32&&R<127&&!l(U,P)?P:encodeURIComponent(P)},Be={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Le=function(P,U){var R;return P.length===2&&q(Re,$(P,0))&&((R=$(P,1))===":"||!U&&R==="|")},er=function(P){var U;return P.length>1&&Le(H(P,0,2))&&(P.length===2||(U=$(P,2))==="/"||U==="\\"||U==="?"||U==="#")},Vr=function(P){return P==="."||B(P)==="%2e"},bt=function(P){return P=B(P),P===".."||P==="%2e."||P===".%2e"||P==="%2e%2e"},Jr={},Zr={},D={},W={},V={},X={},ue={},de={},we={},be={},Te={},He={},dr={},qn={},Ls={},Nn={},Yr={},hr={},qs={},jr={},yr={},xn=function(P,U,R){var I=p(P),C,se,G;if(U){if(se=this.parse(I),se)throw new K(se);this.searchParams=null}else{if(R!==void 0&&(C=new xn(R,!0)),se=this.parse(I,null,C),se)throw new K(se);G=N(new O),G.bindURL(this),this.searchParams=G}};xn.prototype={type:"URL",parse:function(P,U,R){var I=this,C=U||Jr,se=0,G="",Pe=!1,ke=!1,qe=!1,tr,j,je,wr;for(P=p(P),U||(I.scheme="",I.username="",I.password="",I.host=null,I.port=null,I.path=[],I.query=null,I.fragment=null,I.cannotBeABaseURL=!1,P=S(P,J,""),P=S(P,ve,"$1")),P=S(P,pe,""),tr=f(P);se<=tr.length;){switch(j=tr[se],C){case Jr:if(j&&q(Re,j))G+=B(j),C=Zr;else{if(U)return ie;C=D;continue}break;case Zr:if(j&&(q(_e,j)||j==="+"||j==="-"||j==="."))G+=B(j);else if(j===":"){if(U&&(I.isSpecial()!==l(Be,G)||G==="file"&&(I.includesCredentials()||I.port!==null)||I.scheme==="file"&&!I.host))return;if(I.scheme=G,U){I.isSpecial()&&Be[I.scheme]===I.port&&(I.port=null);return}G="",I.scheme==="file"?C=qn:I.isSpecial()&&R&&R.scheme===I.scheme?C=W:I.isSpecial()?C=de:tr[se+1]==="/"?(C=V,se++):(I.cannotBeABaseURL=!0,Q(I.path,""),C=qs)}else{if(U)return ie;G="",C=D,se=0;continue}break;case D:if(!R||R.cannotBeABaseURL&&j!=="#")return ie;if(R.cannotBeABaseURL&&j==="#"){I.scheme=R.scheme,I.path=h(R.path),I.query=R.query,I.fragment="",I.cannotBeABaseURL=!0,C=yr;break}C=R.scheme==="file"?qn:X;continue;case W:if(j==="/"&&tr[se+1]==="/")C=we,se++;else{C=X;continue}break;case V:if(j==="/"){C=be;break}else{C=hr;continue}case X:if(I.scheme=R.scheme,j===me)I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,I.path=h(R.path),I.query=R.query;else if(j==="/"||j==="\\"&&I.isSpecial())C=ue;else if(j==="?")I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,I.path=h(R.path),I.query="",C=jr;else if(j==="#")I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,I.path=h(R.path),I.query=R.query,I.fragment="",C=yr;else{I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,I.path=h(R.path),I.path.length--,C=hr;continue}break;case ue:if(I.isSpecial()&&(j==="/"||j==="\\"))C=we;else if(j==="/")C=be;else{I.username=R.username,I.password=R.password,I.host=R.host,I.port=R.port,C=hr;continue}break;case de:if(C=we,j!=="/"||$(G,se+1)!=="/")continue;se++;break;case we:if(j!=="/"&&j!=="\\"){C=be;continue}break;case be:if(j==="@"){Pe&&(G="%40"+G),Pe=!0,je=f(G);for(var Dn=0;Dn<je.length;Dn++){var Ds=je[Dn];if(Ds===":"&&!qe){qe=!0;continue}var $s=Ue(Ds,Xe);qe?I.password+=$s:I.username+=$s}G=""}else if(j===me||j==="/"||j==="?"||j==="#"||j==="\\"&&I.isSpecial()){if(Pe&&G==="")return fe;se-=f(G).length+1,G="",C=Te}else G+=j;break;case Te:case He:if(U&&I.scheme==="file"){C=Nn;continue}else if(j===":"&&!ke){if(G==="")return ce;if(wr=I.parseHost(G),wr)return wr;if(G="",C=dr,U===He)return}else if(j===me||j==="/"||j==="?"||j==="#"||j==="\\"&&I.isSpecial()){if(I.isSpecial()&&G==="")return ce;if(U&&G===""&&(I.includesCredentials()||I.port!==null))return;if(wr=I.parseHost(G),wr)return wr;if(G="",C=Yr,U)return;continue}else j==="["?ke=!0:j==="]"&&(ke=!1),G+=j;break;case dr:if(q(Fe,j))G+=j;else if(j===me||j==="/"||j==="?"||j==="#"||j==="\\"&&I.isSpecial()||U){if(G!==""){var $n=z(G,10);if($n>65535)return oe;I.port=I.isSpecial()&&$n===Be[I.scheme]?null:$n,G=""}if(U)return;C=Yr;continue}else return oe;break;case qn:if(I.scheme="file",j==="/"||j==="\\")C=Ls;else if(R&&R.scheme==="file")switch(j){case me:I.host=R.host,I.path=h(R.path),I.query=R.query;break;case"?":I.host=R.host,I.path=h(R.path),I.query="",C=jr;break;case"#":I.host=R.host,I.path=h(R.path),I.query=R.query,I.fragment="",C=yr;break;default:er(k(h(tr,se),""))||(I.host=R.host,I.path=h(R.path),I.shortenPath()),C=hr;continue}else{C=hr;continue}break;case Ls:if(j==="/"||j==="\\"){C=Nn;break}R&&R.scheme==="file"&&!er(k(h(tr,se),""))&&(Le(R.path[0],!0)?Q(I.path,R.path[0]):I.host=R.host),C=hr;continue;case Nn:if(j===me||j==="/"||j==="\\"||j==="?"||j==="#"){if(!U&&Le(G))C=hr;else if(G===""){if(I.host="",U)return;C=Yr}else{if(wr=I.parseHost(G),wr)return wr;if(I.host==="localhost"&&(I.host=""),U)return;G="",C=Yr}continue}else G+=j;break;case Yr:if(I.isSpecial()){if(C=hr,j!=="/"&&j!=="\\")continue}else if(!U&&j==="?")I.query="",C=jr;else if(!U&&j==="#")I.fragment="",C=yr;else if(j!==me&&(C=hr,j!=="/"))continue;break;case hr:if(j===me||j==="/"||j==="\\"&&I.isSpecial()||!U&&(j==="?"||j==="#")){if(bt(G)?(I.shortenPath(),j!=="/"&&!(j==="\\"&&I.isSpecial())&&Q(I.path,"")):Vr(G)?j!=="/"&&!(j==="\\"&&I.isSpecial())&&Q(I.path,""):(I.scheme==="file"&&!I.path.length&&Le(G)&&(I.host&&(I.host=""),G=$(G,0)+":"),Q(I.path,G)),G="",I.scheme==="file"&&(j===me||j==="?"||j==="#"))for(;I.path.length>1&&I.path[0]==="";)T(I.path);j==="?"?(I.query="",C=jr):j==="#"&&(I.fragment="",C=yr)}else G+=Ue(j,ge);break;case qs:j==="?"?(I.query="",C=jr):j==="#"?(I.fragment="",C=yr):j!==me&&(I.path[0]+=Ue(j,le));break;case jr:!U&&j==="#"?(I.fragment="",C=yr):j!==me&&(j==="'"&&I.isSpecial()?I.query+="%27":j==="#"?I.query+="%23":I.query+=Ue(j,le));break;case yr:j!==me&&(I.fragment+=Ue(j,he));break}se++}},parseHost:function(P){var U,R,I;if($(P,0)==="["){if($(P,P.length-1)!=="]"||(U=Ye(H(P,1,-1)),!U))return ce;this.host=U}else if(this.isSpecial()){if(P=v(P),q(_,P)||(U=Ae(P),U===null))return ce;this.host=U}else{if(q(M,P))return ce;for(U="",R=f(P),I=0;I<R.length;I++)U+=Ue(R[I],le);this.host=U}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return l(Be,this.scheme)},shortenPath:function(){var P=this.path,U=P.length;U&&(this.scheme!=="file"||U!==1||!Le(P[0],!0))&&P.length--},serialize:function(){var P=this,U=P.scheme,R=P.username,I=P.password,C=P.host,se=P.port,G=P.path,Pe=P.query,ke=P.fragment,qe=U+":";return C!==null?(qe+="//",P.includesCredentials()&&(qe+=R+(I?":"+I:"")+"@"),qe+=ee(C),se!==null&&(qe+=":"+se)):U==="file"&&(qe+="//"),qe+=P.cannotBeABaseURL?G[0]:G.length?"/"+k(G,"/"):"",Pe!==null&&(qe+="?"+Pe),ke!==null&&(qe+="#"+ke),qe},setHref:function(P){var U=this.parse(P);if(U)throw new K(U);this.searchParams.update()},getOrigin:function(){var P=this.scheme,U=this.port;if(P==="blob")try{return new Xr(P.path[0]).origin}catch{return"null"}return P==="file"||!this.isSpecial()?"null":P+"://"+ee(this.host)+(U!==null?":"+U:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(P){this.parse(p(P)+":",Jr)},getUsername:function(){return this.username},setUsername:function(P){var U=f(p(P));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var R=0;R<U.length;R++)this.username+=Ue(U[R],Xe)}},getPassword:function(){return this.password},setPassword:function(P){var U=f(p(P));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var R=0;R<U.length;R++)this.password+=Ue(U[R],Xe)}},getHost:function(){var P=this.host,U=this.port;return P===null?"":U===null?ee(P):ee(P)+":"+U},setHost:function(P){this.cannotBeABaseURL||this.parse(P,Te)},getHostname:function(){var P=this.host;return P===null?"":ee(P)},setHostname:function(P){this.cannotBeABaseURL||this.parse(P,He)},getPort:function(){var P=this.port;return P===null?"":p(P)},setPort:function(P){this.cannotHaveUsernamePasswordPort()||(P=p(P),P===""?this.port=null:this.parse(P,dr))},getPathname:function(){var P=this.path;return this.cannotBeABaseURL?P[0]:P.length?"/"+k(P,"/"):""},setPathname:function(P){this.cannotBeABaseURL||(this.path=[],this.parse(P,Yr))},getSearch:function(){var P=this.query;return P?"?"+P:""},setSearch:function(P){P=p(P),P===""?this.query=null:($(P,0)==="?"&&(P=H(P,1)),this.query="",this.parse(P,jr)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var P=this.fragment;return P?"#"+P:""},setHash:function(P){if(P=p(P),P===""){this.fragment=null;return}$(P,0)==="#"&&(P=H(P,1)),this.fragment="",this.parse(P,yr)},update:function(){this.query=this.searchParams.serialize()||null}};var Xr=function(U){var R=c(this,ze),I=E(arguments.length,1)>1?arguments[1]:void 0,C=m(R,new xn(U,!1,I));e||(R.href=C.serialize(),R.origin=C.getOrigin(),R.protocol=C.getProtocol(),R.username=C.getUsername(),R.password=C.getPassword(),R.host=C.getHost(),R.hostname=C.getHostname(),R.port=C.getPort(),R.pathname=C.getPathname(),R.search=C.getSearch(),R.searchParams=C.getSearchParams(),R.hash=C.getHash())},ze=Xr.prototype,rr=function(P,U){return{get:function(){return w(this)[P]()},set:U&&function(R){return w(this)[U](R)},configurable:!0,enumerable:!0}};if(e&&(s(ze,"href",rr("serialize","setHref")),s(ze,"origin",rr("getOrigin")),s(ze,"protocol",rr("getProtocol","setProtocol")),s(ze,"username",rr("getUsername","setUsername")),s(ze,"password",rr("getPassword","setPassword")),s(ze,"host",rr("getHost","setHost")),s(ze,"hostname",rr("getHostname","setHostname")),s(ze,"port",rr("getPort","setPort")),s(ze,"pathname",rr("getPathname","setPathname")),s(ze,"search",rr("getSearch","setSearch")),s(ze,"searchParams",rr("getSearchParams")),s(ze,"hash",rr("getHash","setHash"))),o(ze,"toJSON",function(){return w(this).serialize()},{enumerable:!0}),o(ze,"toString",function(){return w(this).serialize()},{enumerable:!0}),A){var Ns=A.createObjectURL,xs=A.revokeObjectURL;Ns&&o(Xr,"createObjectURL",a(Ns,A)),xs&&o(Xr,"revokeObjectURL",a(xs,A))}return g(Xr,"URL"),r({global:!0,constructor:!0,forced:!t,sham:!e},{URL:Xr}),Bc}var al;function lp(){return al||(al=1,cp()),zc}var il={},ol;function fp(){if(ol)return il;ol=1;var r=Oe(),e=or(),t=De(),n=Wr(),a=Er(),i=Sn(),o=e("URL"),s=i&&t(function(){o.canParse()}),c=t(function(){return o.canParse.length!==1});return r({target:"URL",stat:!0,forced:!s||c},{canParse:function(u){var f=n(arguments.length,1),h=a(u),d=f<2||arguments[1]===void 0?void 0:a(arguments[1]);try{return!!new o(h,d)}catch{return!1}}}),il}var sl={},ul;function dp(){if(ul)return sl;ul=1;var r=Oe(),e=or(),t=Wr(),n=Er(),a=Sn(),i=e("URL");return r({target:"URL",stat:!0,forced:!a},{parse:function(s){var c=t(arguments.length,1),l=n(s),u=c<2||arguments[1]===void 0?void 0:n(arguments[1]);try{return new i(l,u)}catch{return null}}}),sl}var cl={},ll;function hp(){if(ll)return cl;ll=1;var r=Oe(),e=Ke();return r({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return e(URL.prototype.toString,this)}}),cl}var Fi,fl;function vp(){if(fl)return Fi;fl=1,uh(),lp(),fp(),dp(),hp();var r=Rn();return Fi=r.URL,Fi}var Hi,dl;function pp(){if(dl)return Hi;dl=1;var r=vp();return Hi=r,Hi}var Ki,hl;function mp(){if(hl)return Ki;hl=1;var r=pp();return Ki=r,Ki}mp();var vl={},zi,pl;function gp(){return pl||(pl=1,zi={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}),zi}var Bi,ml;function yp(){if(ml)return Bi;ml=1;var r=yn(),e=r("span").classList,t=e&&e.constructor&&e.constructor.prototype;return Bi=t===Object.prototype?void 0:t,Bi}var gl;function vh(){if(gl)return vl;gl=1;var r=Ie(),e=gp(),t=yp(),n=fs(),a=Gr(),i=vt(),o=$e(),s=o("iterator"),c=n.values,l=function(f,h){if(f){if(f[s]!==c)try{a(f,s,c)}catch{f[s]=c}if(i(f,h,!0),e[h]){for(var d in n)if(f[d]!==n[d])try{a(f,d,n[d])}catch{f[d]=n[d]}}}};for(var u in e)l(r[u]&&r[u].prototype,u);return l(t,"DOMTokenList"),vl}var Gi,yl;function wp(){if(yl)return Gi;yl=1;var r=uh();return vh(),Gi=r,Gi}var Wi,wl;function bp(){if(wl)return Wi;wl=1;var r=wp();return Wi=r,Wi}bp();var bl={},Sl={},Vi,Il;function Sp(){if(Il)return Vi;Il=1;var r=ir(),e=Gr();return Vi=function(t,n){r(n)&&"cause"in n&&e(t,"cause",n.cause)},Vi}var Ji,Pl;function Ip(){if(Pl)return Ji;Pl=1;var r=Se(),e=Error,t=r("".replace),n=function(o){return String(new e(o).stack)}("zxcasd"),a=/\n\s*at [^:]*:[^\n]*/,i=a.test(n);return Ji=function(o,s){if(i&&typeof o=="string"&&!e.prepareStackTrace)for(;s--;)o=t(o,a,"");return o},Ji}var Zi,El;function Pp(){if(El)return Zi;El=1;var r=De(),e=Br();return Zi=!r(function(){var t=new Error("a");return"stack"in t?(Object.defineProperty(t,"stack",e(1,7)),t.stack!==7):!0}),Zi}var Yi,Rl;function Ep(){if(Rl)return Yi;Rl=1;var r=Gr(),e=Ip(),t=Pp(),n=Error.captureStackTrace;return Yi=function(a,i,o,s){t&&(n?n(a,i):r(a,"stack",e(o,s)))},Yi}var Xi,Tl;function Ht(){if(Tl)return Xi;Tl=1;var r=pt(),e=Ke(),t=ur(),n=bn(),a=dh(),i=ns(),o=wn(),s=vs(),c=Pn(),l=fh(),u=TypeError,f=function(d,v){this.stopped=d,this.result=v},h=f.prototype;return Xi=function(d,v,p){var g=p&&p.that,E=!!(p&&p.AS_ENTRIES),b=!!(p&&p.IS_RECORD),y=!!(p&&p.IS_ITERATOR),m=!!(p&&p.INTERRUPTED),w=r(v,g),O,N,A,K,z,ae,L,$=function(k){return O&&l(O,"normal"),new f(!0,k)},q=function(k){return E?(t(k),m?w(k[0],k[1],$):w(k[0],k[1])):m?w(k,$):w(k)};if(b)O=d.iterator;else if(y)O=d;else{if(N=c(d),!N)throw new u(n(d)+" is not iterable");if(a(N)){for(A=0,K=i(d);K>A;A++)if(z=q(d[A]),z&&o(h,z))return z;return new f(!1)}O=s(d,N)}for(ae=b?d.next:O.next;!(L=e(ae,O)).done;){try{z=q(L.value)}catch(k){l(O,"throw",k)}if(typeof z=="object"&&z&&o(h,z))return z}return new f(!1)},Xi}var Qi,_l;function Rp(){if(_l)return Qi;_l=1;var r=Er();return Qi=function(e,t){return e===void 0?arguments.length<2?"":t:r(e)},Qi}var kl;function Tp(){if(kl)return Sl;kl=1;var r=Oe(),e=wn(),t=us(),n=cs(),a=rh(),i=$t(),o=Gr(),s=Br(),c=Sp(),l=Ep(),u=Ht(),f=Rp(),h=$e(),d=h("toStringTag"),v=Error,p=[].push,g=function(y,m){var w=e(E,this),O;n?O=n(new v,w?t(this):E):(O=w?this:i(E),o(O,d,"Error")),m!==void 0&&o(O,"message",f(m)),l(O,g,O.stack,1),arguments.length>2&&c(O,arguments[2]);var N=[];return u(y,p,{that:N}),o(O,"errors",N),O};n?n(g,v):a(g,v,{name:!0});var E=g.prototype=i(v.prototype,{constructor:s(1,g),message:s(1,""),name:s(1,"AggregateError")});return r({global:!0,constructor:!0,arity:2},{AggregateError:g}),Sl}var Ol;function _p(){return Ol||(Ol=1,Tp()),bl}var Cl={},eo,Al;function kp(){if(Al)return eo;Al=1;var r=hs(),e=Ft();return eo=r?{}.toString:function(){return"[object "+e(this)+"]"},eo}var jl;function Op(){if(jl)return Cl;jl=1;var r=hs(),e=sr(),t=kp();return r||e(Object.prototype,"toString",t,{unsafe:!0}),Cl}var Ul={},Ll={},ro,ql;function ph(){if(ql)return ro;ql=1;var r=Ie(),e=Dt(),t=vn(),n=function(a){return e.slice(0,a.length)===a};return ro=function(){return n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":r.Bun&&typeof Bun.version=="string"?"BUN":r.Deno&&typeof Deno.version=="object"?"DENO":t(r.process)==="process"?"NODE":r.window&&r.document?"BROWSER":"REST"}(),ro}var to,Nl;function ps(){if(Nl)return to;Nl=1;var r=ph();return to=r==="NODE",to}var no,xl;function Cp(){if(xl)return no;xl=1;var r=or(),e=In(),t=$e(),n=Me(),a=t("species");return no=function(i){var o=r(i);n&&o&&!o[a]&&e(o,a,{configurable:!0,get:function(){return this}})},no}var ao,Dl;function Ap(){if(Dl)return ao;Dl=1;var r=hh(),e=bn(),t=TypeError;return ao=function(n){if(r(n))return n;throw new t(e(n)+" is not a constructor")},ao}var io,$l;function mh(){if($l)return io;$l=1;var r=ur(),e=Ap(),t=pn(),n=$e(),a=n("species");return io=function(i,o){var s=r(i).constructor,c;return s===void 0||t(c=r(s)[a])?o:e(c)},io}var oo,Ml;function gh(){if(Ml)return oo;Ml=1;var r=hn(),e=Function.prototype,t=e.apply,n=e.call;return oo=typeof Reflect=="object"&&Reflect.apply||(r?n.bind(t):function(){return n.apply(t,arguments)}),oo}var so,Fl;function yh(){if(Fl)return so;Fl=1;var r=Dt();return so=/(?:ipad|iphone|ipod).*applewebkit/i.test(r),so}var uo,Hl;function wh(){if(Hl)return uo;Hl=1;var r=Ie(),e=gh(),t=pt(),n=Ee(),a=ar(),i=De(),o=Jd(),s=En(),c=yn(),l=Wr(),u=yh(),f=ps(),h=r.setImmediate,d=r.clearImmediate,v=r.process,p=r.Dispatch,g=r.Function,E=r.MessageChannel,b=r.String,y=0,m={},w="onreadystatechange",O,N,A,K;i(function(){O=r.location});var z=function(q){if(a(m,q)){var k=m[q];delete m[q],k()}},ae=function(q){return function(){z(q)}},L=function(q){z(q.data)},$=function(q){r.postMessage(b(q),O.protocol+"//"+O.host)};return(!h||!d)&&(h=function(k){l(arguments.length,1);var Y=n(k)?k:g(k),re=s(arguments,1);return m[++y]=function(){e(Y,void 0,re)},N(y),y},d=function(k){delete m[k]},f?N=function(q){v.nextTick(ae(q))}:p&&p.now?N=function(q){p.now(ae(q))}:E&&!u?(A=new E,K=A.port2,A.port1.onmessage=L,N=t(K.postMessage,K)):r.addEventListener&&n(r.postMessage)&&!r.importScripts&&O&&O.protocol!=="file:"&&!i($)?(N=$,r.addEventListener("message",L,!1)):w in c("script")?N=function(q){o.appendChild(c("script"))[w]=function(){o.removeChild(this),z(q)}}:N=function(q){setTimeout(ae(q),0)}),uo={set:h,clear:d},uo}var co,Kl;function bh(){if(Kl)return co;Kl=1;var r=function(){this.head=null,this.tail=null};return r.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e){var t=this.head=e.next;return t===null&&(this.tail=null),e.item}}},co=r,co}var lo,zl;function jp(){if(zl)return lo;zl=1;var r=Dt();return lo=/ipad|iphone|ipod/i.test(r)&&typeof Pebble<"u",lo}var fo,Bl;function Up(){if(Bl)return fo;Bl=1;var r=Dt();return fo=/web0s(?!.*chrome)/i.test(r),fo}var ho,Gl;function Lp(){if(Gl)return ho;Gl=1;var r=Ie(),e=oh(),t=pt(),n=wh().set,a=bh(),i=yh(),o=jp(),s=Up(),c=ps(),l=r.MutationObserver||r.WebKitMutationObserver,u=r.document,f=r.process,h=r.Promise,d=e("queueMicrotask"),v,p,g,E,b;if(!d){var y=new a,m=function(){var w,O;for(c&&(w=f.domain)&&w.exit();O=y.get();)try{O()}catch(N){throw y.head&&v(),N}w&&w.enter()};!i&&!c&&!s&&l&&u?(p=!0,g=u.createTextNode(""),new l(m).observe(g,{characterData:!0}),v=function(){g.data=p=!p}):!o&&h&&h.resolve?(E=h.resolve(void 0),E.constructor=h,b=t(E.then,E),v=function(){b(m)}):c?v=function(){f.nextTick(m)}:(n=t(n,r),v=function(){n(m)}),d=function(w){y.head||v(),y.add(w)}}return ho=d,ho}var vo,Wl;function qp(){return Wl||(Wl=1,vo=function(r,e){try{arguments.length===1?console.error(r):console.error(r,e)}catch{}}),vo}var po,Vl;function mt(){return Vl||(Vl=1,po=function(r){try{return{error:!1,value:r()}}catch(e){return{error:!0,value:e}}}),po}var mo,Jl;function gt(){if(Jl)return mo;Jl=1;var r=Ie();return mo=r.Promise,mo}var go,Zl;function Kt(){if(Zl)return go;Zl=1;var r=Ie(),e=gt(),t=Ee(),n=th(),a=ss(),i=$e(),o=ph(),s=gr(),c=$d(),l=e&&e.prototype,u=i("species"),f=!1,h=t(r.PromiseRejectionEvent),d=n("Promise",function(){var v=a(e),p=v!==String(e);if(!p&&c===66||s&&!(l.catch&&l.finally))return!0;if(!c||c<51||!/native code/.test(v)){var g=new e(function(y){y(1)}),E=function(y){y(function(){},function(){})},b=g.constructor={};if(b[u]=E,f=g.then(function(){})instanceof E,!f)return!0}return!p&&(o==="BROWSER"||o==="DENO")&&!h});return go={CONSTRUCTOR:d,REJECTION_EVENT:h,SUBCLASSING:f},go}var yo={},Yl;function Rr(){if(Yl)return yo;Yl=1;var r=cr(),e=TypeError,t=function(n){var a,i;this.promise=new n(function(o,s){if(a!==void 0||i!==void 0)throw new e("Bad Promise constructor");a=o,i=s}),this.resolve=r(a),this.reject=r(i)};return yo.f=function(n){return new t(n)},yo}var Xl;function Np(){if(Xl)return Ll;Xl=1;var r=Oe(),e=gr(),t=ps(),n=Ie(),a=Rn(),i=Ke(),o=sr(),s=cs(),c=vt(),l=Cp(),u=cr(),f=Ee(),h=ir(),d=ds(),v=mh(),p=wh().set,g=Lp(),E=qp(),b=mt(),y=bh(),m=ht(),w=gt(),O=Kt(),N=Rr(),A="Promise",K=O.CONSTRUCTOR,z=O.REJECTION_EVENT,ae=O.SUBCLASSING,L=m.getterFor(A),$=m.set,q=w&&w.prototype,k=w,Y=q,re=n.TypeError,Q=n.document,S=n.process,T=N.f,x=T,H=!!(Q&&Q.createEvent&&n.dispatchEvent),B="unhandledrejection",Z="rejectionhandled",fe=0,ie=1,ce=2,oe=1,Re=2,_e,Fe,Ce,Ze,lr=function(F){var ee;return h(F)&&f(ee=F.then)?ee:!1},fr=function(F,ee){var le=ee.value,he=ee.state===ie,ge=he?F.ok:F.fail,Xe=F.resolve,Ue=F.reject,Be=F.domain,Le,er,Vr;try{ge?(he||(ee.rejection===Re&&pe(ee),ee.rejection=oe),ge===!0?Le=le:(Be&&Be.enter(),Le=ge(le),Be&&(Be.exit(),Vr=!0)),Le===F.promise?Ue(new re("Promise-chain cycle")):(er=lr(Le))?i(er,Le,Xe,Ue):Xe(Le)):Ue(le)}catch(bt){Be&&!Vr&&Be.exit(),Ue(bt)}},_=function(F,ee){F.notified||(F.notified=!0,g(function(){for(var le=F.reactions,he;he=le.get();)fr(he,F);F.notified=!1,ee&&!F.rejection&&J(F)}))},M=function(F,ee,le){var he,ge;H?(he=Q.createEvent("Event"),he.promise=ee,he.reason=le,he.initEvent(F,!1,!0),n.dispatchEvent(he)):he={promise:ee,reason:le},!z&&(ge=n["on"+F])?ge(he):F===B&&E("Unhandled promise rejection",le)},J=function(F){i(p,n,function(){var ee=F.facade,le=F.value,he=ve(F),ge;if(he&&(ge=b(function(){t?S.emit("unhandledRejection",le,ee):M(B,ee,le)}),F.rejection=t||ve(F)?Re:oe,ge.error))throw ge.value})},ve=function(F){return F.rejection!==oe&&!F.parent},pe=function(F){i(p,n,function(){var ee=F.facade;t?S.emit("rejectionHandled",ee):M(Z,ee,F.value)})},me=function(F,ee,le){return function(he){F(ee,he,le)}},Ae=function(F,ee,le){F.done||(F.done=!0,le&&(F=le),F.value=ee,F.state=ce,_(F,!0))},Ye=function(F,ee,le){if(!F.done){F.done=!0,le&&(F=le);try{if(F.facade===ee)throw new re("Promise can't be resolved itself");var he=lr(ee);he?g(function(){var ge={done:!1};try{i(he,ee,me(Ye,ge,F),me(Ae,ge,F))}catch(Xe){Ae(ge,Xe,F)}}):(F.value=ee,F.state=ie,_(F,!1))}catch(ge){Ae({done:!1},ge,F)}}};if(K&&(k=function(ee){d(this,Y),u(ee),i(_e,this);var le=L(this);try{ee(me(Ye,le),me(Ae,le))}catch(he){Ae(le,he)}},Y=k.prototype,_e=function(ee){$(this,{type:A,done:!1,notified:!1,parent:!1,reactions:new y,rejection:!1,state:fe,value:null})},_e.prototype=o(Y,"then",function(ee,le){var he=L(this),ge=T(v(this,k));return he.parent=!0,ge.ok=f(ee)?ee:!0,ge.fail=f(le)&&le,ge.domain=t?S.domain:void 0,he.state===fe?he.reactions.add(ge):g(function(){fr(ge,he)}),ge.promise}),Fe=function(){var F=new _e,ee=L(F);this.promise=F,this.resolve=me(Ye,ee),this.reject=me(Ae,ee)},N.f=T=function(F){return F===k||F===Ce?new Fe(F):x(F)},!e&&f(w)&&q!==Object.prototype)){Ze=q.then,ae||o(q,"then",function(ee,le){var he=this;return new k(function(ge,Xe){i(Ze,he,ge,Xe)}).then(ee,le)},{unsafe:!0});try{delete q.constructor}catch{}s&&s(q,Y)}return r({global:!0,constructor:!0,wrap:!0,forced:K},{Promise:k}),Ce=a.Promise,c(k,A,!1,!0),l(A),Ll}var Ql={},wo,ef;function xp(){if(ef)return wo;ef=1;var r=$e(),e=r("iterator"),t=!1;try{var n=0,a={next:function(){return{done:!!n++}},return:function(){t=!0}};a[e]=function(){return this},Array.from(a,function(){throw 2})}catch{}return wo=function(i,o){try{if(!o&&!t)return!1}catch{return!1}var s=!1;try{var c={};c[e]=function(){return{next:function(){return{done:s=!0}}}},i(c)}catch{}return s},wo}var bo,rf;function Tn(){if(rf)return bo;rf=1;var r=gt(),e=xp(),t=Kt().CONSTRUCTOR;return bo=t||!e(function(n){r.all(n).then(void 0,function(){})}),bo}var tf;function Dp(){if(tf)return Ql;tf=1;var r=Oe(),e=Ke(),t=cr(),n=Rr(),a=mt(),i=Ht(),o=Tn();return r({target:"Promise",stat:!0,forced:o},{all:function(c){var l=this,u=n.f(l),f=u.resolve,h=u.reject,d=a(function(){var v=t(l.resolve),p=[],g=0,E=1;i(c,function(b){var y=g++,m=!1;E++,e(v,l,b).then(function(w){m||(m=!0,p[y]=w,--E||f(p))},h)}),--E||f(p)});return d.error&&h(d.value),u.promise}}),Ql}var nf={},af;function $p(){if(af)return nf;af=1;var r=Oe(),e=gr(),t=Kt().CONSTRUCTOR,n=gt(),a=or(),i=Ee(),o=sr(),s=n&&n.prototype;if(r({target:"Promise",proto:!0,forced:t,real:!0},{catch:function(l){return this.then(void 0,l)}}),!e&&i(n)){var c=a("Promise").prototype.catch;s.catch!==c&&o(s,"catch",c,{unsafe:!0})}return nf}var of={},sf;function Mp(){if(sf)return of;sf=1;var r=Oe(),e=Ke(),t=cr(),n=Rr(),a=mt(),i=Ht(),o=Tn();return r({target:"Promise",stat:!0,forced:o},{race:function(c){var l=this,u=n.f(l),f=u.reject,h=a(function(){var d=t(l.resolve);i(c,function(v){e(d,l,v).then(u.resolve,f)})});return h.error&&f(h.value),u.promise}}),of}var uf={},cf;function Fp(){if(cf)return uf;cf=1;var r=Oe(),e=Rr(),t=Kt().CONSTRUCTOR;return r({target:"Promise",stat:!0,forced:t},{reject:function(a){var i=e.f(this),o=i.reject;return o(a),i.promise}}),uf}var lf={},So,ff;function Sh(){if(ff)return So;ff=1;var r=ur(),e=ir(),t=Rr();return So=function(n,a){if(r(n),e(a)&&a.constructor===n)return a;var i=t.f(n),o=i.resolve;return o(a),i.promise},So}var df;function Hp(){if(df)return lf;df=1;var r=Oe(),e=or(),t=gr(),n=gt(),a=Kt().CONSTRUCTOR,i=Sh(),o=e("Promise"),s=t&&!a;return r({target:"Promise",stat:!0,forced:t||a},{resolve:function(l){return i(s&&this===o?n:this,l)}}),lf}var hf;function Kp(){return hf||(hf=1,Np(),Dp(),$p(),Mp(),Fp(),Hp()),Ul}var vf={},pf;function zp(){if(pf)return vf;pf=1;var r=Oe(),e=Ke(),t=cr(),n=Rr(),a=mt(),i=Ht(),o=Tn();return r({target:"Promise",stat:!0,forced:o},{allSettled:function(c){var l=this,u=n.f(l),f=u.resolve,h=u.reject,d=a(function(){var v=t(l.resolve),p=[],g=0,E=1;i(c,function(b){var y=g++,m=!1;E++,e(v,l,b).then(function(w){m||(m=!0,p[y]={status:"fulfilled",value:w},--E||f(p))},function(w){m||(m=!0,p[y]={status:"rejected",reason:w},--E||f(p))})}),--E||f(p)});return d.error&&h(d.value),u.promise}}),vf}var mf={},gf;function Bp(){if(gf)return mf;gf=1;var r=Oe(),e=Ke(),t=cr(),n=or(),a=Rr(),i=mt(),o=Ht(),s=Tn(),c="No one promise resolved";return r({target:"Promise",stat:!0,forced:s},{any:function(u){var f=this,h=n("AggregateError"),d=a.f(f),v=d.resolve,p=d.reject,g=i(function(){var E=t(f.resolve),b=[],y=0,m=1,w=!1;o(u,function(O){var N=y++,A=!1;m++,e(E,f,O).then(function(K){A||w||(w=!0,v(K))},function(K){A||w||(A=!0,b[N]=K,--m||p(new h(b,c)))})}),--m||p(new h(b,c))});return g.error&&p(g.value),d.promise}}),mf}var yf={},wf;function Ih(){if(wf)return yf;wf=1;var r=Oe(),e=Ie(),t=gh(),n=En(),a=Rr(),i=cr(),o=mt(),s=e.Promise,c=!1,l=!s||!s.try||o(function(){s.try(function(u){c=u===8},8)}).error||!c;return r({target:"Promise",stat:!0,forced:l},{try:function(u){var f=arguments.length>1?n(arguments,1):[],h=a.f(this),d=o(function(){return t(i(u),void 0,f)});return(d.error?h.reject:h.resolve)(d.value),h.promise}}),yf}var bf={},Sf;function Ph(){if(Sf)return bf;Sf=1;var r=Oe(),e=Rr();return r({target:"Promise",stat:!0},{withResolvers:function(){var n=e.f(this);return{promise:n.promise,resolve:n.resolve,reject:n.reject}}}),bf}var If={},Pf;function Gp(){if(Pf)return If;Pf=1;var r=Oe(),e=gr(),t=gt(),n=De(),a=or(),i=Ee(),o=mh(),s=Sh(),c=sr(),l=t&&t.prototype,u=!!t&&n(function(){l.finally.call({then:function(){}},function(){})});if(r({target:"Promise",proto:!0,real:!0,forced:u},{finally:function(h){var d=o(this,a("Promise")),v=i(h);return this.then(v?function(p){return s(d,h()).then(function(){return p})}:h,v?function(p){return s(d,h()).then(function(){throw p})}:h)}}),!e&&i(t)){var f=a("Promise").prototype.finally;l.finally!==f&&c(l,"finally",f,{unsafe:!0})}return If}var Io,Ef;function Wp(){if(Ef)return Io;Ef=1,_p(),fs(),Op(),Kp(),zp(),Bp(),Ih(),Ph(),Gp(),lh();var r=Rn();return Io=r.Promise,Io}var Po,Rf;function Vp(){if(Rf)return Po;Rf=1;var r=Wp();return vh(),Po=r,Po}var Tf={},_f;function Jp(){return _f||(_f=1,Ih()),Tf}var kf={},Of;function Zp(){return Of||(Of=1,Ph()),kf}var Eo,Cf;function Yp(){if(Cf)return Eo;Cf=1;var r=Vp();return Jp(),Zp(),Eo=r,Eo}Yp();const Eh="sesamy-debug";function Xp(r,e,t){const n=new Date;n.setTime(n.getTime()+t*60*60*1e3);const a="expires="+n.toUTCString();document.cookie=`${r}=${e}; ${a}; path=/`}function Qp(r){if(typeof document>"u")return null;const e=r+"=",t=document.cookie.split(";");for(let n=0;n<t.length;n++){let a=t[n];for(;a.charAt(0)===" ";)a=a.substring(1);if(a.indexOf(e)===0)return a.substring(e.length,a.length)}return null}function em(r){Xp(Eh,r.toString(),1)}function rm(){return Qp(Eh)==="true"}function ye(r){rm()&&console.log(r)}function Ir(r,e){if(typeof window>"u")return;const t=new CustomEvent(r,{detail:e,bubbles:!0,composed:!0});ye(`Triggering event: ${r}`),dispatchEvent(t)}function pr(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function"){var a=0;for(n=Object.getOwnPropertySymbols(r);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(r,n[a])&&(t[n[a]]=r[n[a]])}return t}var qr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ms(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function gs(r,e){return r(e={exports:{}},e.exports),e.exports}var Lr=gs(function(r,e){Object.defineProperty(e,"__esModule",{value:!0});var t=function(){function n(){var a=this;this.locked=new Map,this.addToLocked=function(i,o){var s=a.locked.get(i);s===void 0?o===void 0?a.locked.set(i,[]):a.locked.set(i,[o]):o!==void 0&&(s.unshift(o),a.locked.set(i,s))},this.isLocked=function(i){return a.locked.has(i)},this.lock=function(i){return new Promise(function(o,s){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 s=o.pop();a.locked.set(i,o),s!==void 0&&setTimeout(s,0)}else a.locked.delete(i)}}return n.getInstance=function(){return n.instance===void 0&&(n.instance=new n),n.instance},n}();e.default=function(){return t.getInstance()}});ms(Lr);var tm=ms(gs(function(r,e){var t=qr&&qr.__awaiter||function(u,f,h,d){return new(h||(h=Promise))(function(v,p){function g(y){try{b(d.next(y))}catch(m){p(m)}}function E(y){try{b(d.throw(y))}catch(m){p(m)}}function b(y){y.done?v(y.value):new h(function(m){m(y.value)}).then(g,E)}b((d=d.apply(u,f||[])).next())})},n=qr&&qr.__generator||function(u,f){var h,d,v,p,g={label:0,sent:function(){if(1&v[0])throw v[1];return v[1]},trys:[],ops:[]};return p={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function E(b){return function(y){return function(m){if(h)throw new TypeError("Generator is already executing.");for(;g;)try{if(h=1,d&&(v=2&m[0]?d.return:m[0]?d.throw||((v=d.return)&&v.call(d),0):d.next)&&!(v=v.call(d,m[1])).done)return v;switch(d=0,v&&(m=[2&m[0],v.value]),m[0]){case 0:case 1:v=m;break;case 4:return g.label++,{value:m[1],done:!1};case 5:g.label++,d=m[1],m=[0];continue;case 7:m=g.ops.pop(),g.trys.pop();continue;default:if(v=g.trys,!((v=v.length>0&&v[v.length-1])||m[0]!==6&&m[0]!==2)){g=0;continue}if(m[0]===3&&(!v||m[1]>v[0]&&m[1]<v[3])){g.label=m[1];break}if(m[0]===6&&g.label<v[1]){g.label=v[1],v=m;break}if(v&&g.label<v[2]){g.label=v[2],g.ops.push(m);break}v[2]&&g.ops.pop(),g.trys.pop();continue}m=f.call(u,g)}catch(w){m=[6,w],d=0}finally{h=v=0}if(5&m[0])throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}([b,y])}}},a=qr;Object.defineProperty(e,"__esModule",{value:!0});var i="browser-tabs-lock-key",o={key:function(u){return t(a,void 0,void 0,function(){return n(this,function(f){throw new Error("Unsupported")})})},getItem:function(u){return t(a,void 0,void 0,function(){return n(this,function(f){throw new Error("Unsupported")})})},clear:function(){return t(a,void 0,void 0,function(){return n(this,function(u){return[2,window.localStorage.clear()]})})},removeItem:function(u){return t(a,void 0,void 0,function(){return n(this,function(f){throw new Error("Unsupported")})})},setItem:function(u,f){return t(a,void 0,void 0,function(){return n(this,function(h){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,f){return window.localStorage.setItem(u,f)}};function s(u){return new Promise(function(f){return setTimeout(f,u)})}function c(u){for(var f="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",h="",d=0;d<u;d++)h+=f[Math.floor(Math.random()*f.length)];return h}var l=function(){function u(f){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+c(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=f,u.waiters===void 0&&(u.waiters=[])}return u.prototype.acquireLock=function(f,h){return h===void 0&&(h=5e3),t(this,void 0,void 0,function(){var d,v,p,g,E,b,y;return n(this,function(m){switch(m.label){case 0:d=Date.now()+c(4),v=Date.now()+h,p=i+"-"+f,g=this.storageHandler===void 0?o:this.storageHandler,m.label=1;case 1:return Date.now()<v?[4,s(30)]:[3,8];case 2:return m.sent(),g.getItemSync(p)!==null?[3,5]:(E=this.id+"-"+f+"-"+d,[4,s(Math.floor(25*Math.random()))]);case 3:return m.sent(),g.setItemSync(p,JSON.stringify({id:this.id,iat:d,timeoutKey:E,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,s(30)];case 4:return m.sent(),(b=g.getItemSync(p))!==null&&(y=JSON.parse(b)).id===this.id&&y.iat===d?(this.acquiredIatSet.add(d),this.refreshLockWhileAcquired(p,d),[2,!0]):[3,7];case 5:return u.lockCorrector(this.storageHandler===void 0?o:this.storageHandler),[4,this.waitForSomethingToChange(v)];case 6:m.sent(),m.label=7;case 7:return d=Date.now()+c(4),[3,1];case 8:return[2,!1]}})})},u.prototype.refreshLockWhileAcquired=function(f,h){return t(this,void 0,void 0,function(){var d=this;return n(this,function(v){return setTimeout(function(){return t(d,void 0,void 0,function(){var p,g,E;return n(this,function(b){switch(b.label){case 0:return[4,Lr.default().lock(h)];case 1:return b.sent(),this.acquiredIatSet.has(h)?(p=this.storageHandler===void 0?o:this.storageHandler,(g=p.getItemSync(f))===null?(Lr.default().unlock(h),[2]):((E=JSON.parse(g)).timeRefreshed=Date.now(),p.setItemSync(f,JSON.stringify(E)),Lr.default().unlock(h),this.refreshLockWhileAcquired(f,h),[2])):(Lr.default().unlock(h),[2])}})})},1e3),[2]})})},u.prototype.waitForSomethingToChange=function(f){return t(this,void 0,void 0,function(){return n(this,function(h){switch(h.label){case 0:return[4,new Promise(function(d){var v=!1,p=Date.now(),g=!1;function E(){if(g||(window.removeEventListener("storage",E),u.removeFromWaiting(E),clearTimeout(b),g=!0),!v){v=!0;var y=50-(Date.now()-p);y>0?setTimeout(d,y):d(null)}}window.addEventListener("storage",E),u.addToWaiting(E);var b=setTimeout(E,Math.max(0,f-Date.now()))})];case 1:return h.sent(),[2]}})})},u.addToWaiting=function(f){this.removeFromWaiting(f),u.waiters!==void 0&&u.waiters.push(f)},u.removeFromWaiting=function(f){u.waiters!==void 0&&(u.waiters=u.waiters.filter(function(h){return h!==f}))},u.notifyWaiters=function(){u.waiters!==void 0&&u.waiters.slice().forEach(function(f){return f()})},u.prototype.releaseLock=function(f){return t(this,void 0,void 0,function(){return n(this,function(h){switch(h.label){case 0:return[4,this.releaseLock__private__(f)];case 1:return[2,h.sent()]}})})},u.prototype.releaseLock__private__=function(f){return t(this,void 0,void 0,function(){var h,d,v,p;return n(this,function(g){switch(g.label){case 0:return h=this.storageHandler===void 0?o:this.storageHandler,d=i+"-"+f,(v=h.getItemSync(d))===null?[2]:(p=JSON.parse(v)).id!==this.id?[3,2]:[4,Lr.default().lock(p.iat)];case 1:g.sent(),this.acquiredIatSet.delete(p.iat),h.removeItemSync(d),Lr.default().unlock(p.iat),u.notifyWaiters(),g.label=2;case 2:return[2]}})})},u.lockCorrector=function(f){for(var h=Date.now()-5e3,d=f,v=[],p=0;;){var g=d.keySync(p);if(g===null)break;v.push(g),p++}for(var E=!1,b=0;b<v.length;b++){var y=v[b];if(y.includes(i)){var m=d.getItemSync(y);if(m!==null){var w=JSON.parse(m);(w.timeRefreshed===void 0&&w.timeAcquired<h||w.timeRefreshed!==void 0&&w.timeRefreshed<h)&&(d.removeItemSync(y),E=!0)}}}E&&u.notifyWaiters()},u.waiters=void 0,u}();e.default=l}));const nm={timeoutInSeconds:60},Rh={name:"auth0-spa-js",version:"2.5.0"},Th=()=>Date.now();let We=class No extends Error{constructor(e,t){super(t),this.error=e,this.error_description=t,Object.setPrototypeOf(this,No.prototype)}static fromPayload({error:e,error_description:t}){return new No(e,t)}},am=class _h extends We{constructor(e,t,n,a=null){super(e,t),this.state=n,this.appState=a,Object.setPrototypeOf(this,_h.prototype)}},xo=class kh extends We{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,kh.prototype)}},im=class Oh extends xo{constructor(e){super(),this.popup=e,Object.setPrototypeOf(this,Oh.prototype)}},om=class Ch extends We{constructor(e){super("cancelled","Popup closed"),this.popup=e,Object.setPrototypeOf(this,Ch.prototype)}},sm=class Ah extends We{constructor(e,t,n){super(e,t),this.mfa_token=n,Object.setPrototypeOf(this,Ah.prototype)}},Do=class jh extends We{constructor(e,t){super("missing_refresh_token",`Missing Refresh Token (audience: '${Af(e,["default"])}', scope: '${Af(t)}')`),this.audience=e,this.scope=t,Object.setPrototypeOf(this,jh.prototype)}},Uh=class Lh extends We{constructor(e){super("use_dpop_nonce","Server rejected DPoP proof: wrong nonce"),this.newDpopNonce=e,Object.setPrototypeOf(this,Lh.prototype)}};function Af(r,e=[]){return r&&!e.includes(r)?r:""}const Qt=()=>window.crypto,Ro=()=>{const r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let e="";return Array.from(Qt().getRandomValues(new Uint8Array(43))).forEach(t=>e+=r[t%r.length]),e},jf=r=>btoa(r),$o=r=>{var{clientId:e}=r,t=pr(r,["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:e},t))).toString()},Uf=r=>(e=>decodeURIComponent(atob(e).split("").map(t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join("")))(r.replace(/_/g,"/").replace(/-/g,"+")),um=new TextEncoder,cm=new TextDecoder;function kt(r){return typeof r=="string"?um.encode(r):cm.decode(r)}function Lf(r){if(typeof r.modulusLength!="number"||r.modulusLength<2048)throw new fm(`${r.name} modulusLength must be at least 2048 bits`)}async function lm(r,e,t){if(t.usages.includes("sign")===!1)throw new TypeError('private CryptoKey instances used for signing assertions must include "sign" in their "usages"');const n=`${Ot(kt(JSON.stringify(r)))}.${Ot(kt(JSON.stringify(e)))}`;return`${n}.${Ot(await crypto.subtle.sign(function(a){switch(a.algorithm.name){case"ECDSA":return{name:a.algorithm.name,hash:"SHA-256"};case"RSA-PSS":return Lf(a.algorithm),{name:a.algorithm.name,saltLength:32};case"RSASSA-PKCS1-v1_5":return Lf(a.algorithm),{name:a.algorithm.name};case"Ed25519":return{name:a.algorithm.name}}throw new xr}(t),t,kt(n)))}`}let Mo;Uint8Array.prototype.toBase64?Mo=r=>(r instanceof ArrayBuffer&&(r=new Uint8Array(r)),r.toBase64({alphabet:"base64url",omitPadding:!0})):Mo=e=>{e instanceof ArrayBuffer&&(e=new Uint8Array(e));const t=[];for(let n=0;n<e.byteLength;n+=32768)t.push(String.fromCharCode.apply(null,e.subarray(n,n+32768)));return btoa(t.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")};function Ot(r){return Mo(r)}let xr=class extends Error{constructor(e){var t;super(e??"operation not supported"),this.name=this.constructor.name,(t=Error.captureStackTrace)===null||t===void 0||t.call(Error,this,this.constructor)}},fm=class extends Error{constructor(e){var t;super(e),this.name=this.constructor.name,(t=Error.captureStackTrace)===null||t===void 0||t.call(Error,this,this.constructor)}};function dm(r){switch(r.algorithm.name){case"RSA-PSS":return function(e){if(e.algorithm.hash.name==="SHA-256")return"PS256";throw new xr("unsupported RsaHashedKeyAlgorithm hash name")}(r);case"RSASSA-PKCS1-v1_5":return function(e){if(e.algorithm.hash.name==="SHA-256")return"RS256";throw new xr("unsupported RsaHashedKeyAlgorithm hash name")}(r);case"ECDSA":return function(e){if(e.algorithm.namedCurve==="P-256")return"ES256";throw new xr("unsupported EcKeyAlgorithm namedCurve")}(r);case"Ed25519":return"Ed25519";default:throw new xr("unsupported CryptoKey algorithm name")}}function qh(r){return r instanceof CryptoKey}function Nh(r){return qh(r)&&r.type==="public"}async function hm(r,e,t,n,a,i){const o=r?.privateKey,s=r?.publicKey;if(!qh(c=o)||c.type!=="private")throw new TypeError('"keypair.privateKey" must be a private CryptoKey');var c;if(!Nh(s))throw new TypeError('"keypair.publicKey" must be a public CryptoKey');if(s.extractable!==!0)throw new TypeError('"keypair.publicKey.extractable" must be true');if(typeof e!="string")throw new TypeError('"htu" must be a string');if(typeof t!="string")throw new TypeError('"htm" must be a string');if(n!==void 0&&typeof n!="string")throw new TypeError('"nonce" must be a string or undefined');if(a!==void 0&&typeof a!="string")throw new TypeError('"accessToken" must be a string or undefined');return lm({alg:dm(o),typ:"dpop+jwt",jwk:await xh(s)},Object.assign(Object.assign({},i),{iat:Math.floor(Date.now()/1e3),jti:crypto.randomUUID(),htm:t,nonce:n,htu:e,ath:a?Ot(await crypto.subtle.digest("SHA-256",kt(a))):void 0}),o)}async function xh(r){const{kty:e,e:t,n,x:a,y:i,crv:o}=await crypto.subtle.exportKey("jwk",r);return{kty:e,crv:o,e:t,n,x:a,y:i}}const vm=["authorization_code","refresh_token","urn:ietf:params:oauth:grant-type:token-exchange"];function pm(){return async function(r,e){var t;let n;if(r.length===0)throw new TypeError('"alg" must be a non-empty string');switch(r){case"PS256":n={name:"RSA-PSS",hash:"SHA-256",modulusLength:2048,publicExponent:new Uint8Array([1,0,1])};break;case"RS256":n={name:"RSASSA-PKCS1-v1_5",hash:"SHA-256",modulusLength:2048,publicExponent:new Uint8Array([1,0,1])};break;case"ES256":n={name:"ECDSA",namedCurve:"P-256"};break;case"Ed25519":n={name:"Ed25519"};break;default:throw new xr}return crypto.subtle.generateKey(n,(t=e?.extractable)!==null&&t!==void 0&&t,["sign","verify"])}("ES256",{extractable:!1})}function mm(r){return async function(e){if(!Nh(e))throw new TypeError('"publicKey" must be a public CryptoKey');if(e.extractable!==!0)throw new TypeError('"publicKey.extractable" must be true');const t=await xh(e);let n;switch(t.kty){case"EC":n={crv:t.crv,kty:t.kty,x:t.x,y:t.y};break;case"OKP":n={crv:t.crv,kty:t.kty,x:t.x};break;case"RSA":n={e:t.e,kty:t.kty,n:t.n};break;default:throw new xr("unsupported JWK kty")}return Ot(await crypto.subtle.digest({name:"SHA-256"},kt(JSON.stringify(n))))}(r.publicKey)}function gm({keyPair:r,url:e,method:t,nonce:n,accessToken:a}){const i=function(o){const s=new URL(o);return s.search="",s.hash="",s.href}(e);return hm(r,i,t,n,a)}const ym=async(r,e)=>{const t=await fetch(r,e);return{ok:t.ok,json:await t.json(),headers:(n=t.headers,[...n].reduce((a,[i,o])=>(a[i]=o,a),{}))};var n},wm=async(r,e,t)=>{const n=new AbortController;let a;return e.signal=n.signal,Promise.race([ym(r,e),new Promise((i,o)=>{a=setTimeout(()=>{n.abort(),o(new Error("Timeout when executing 'fetch'"))},t)})]).finally(()=>{clearTimeout(a)})},bm=async(r,e,t,n,a,i,o,s)=>{return c={auth:{audience:e,scope:t},timeout:a,fetchUrl:r,fetchOptions:n,useFormData:o,useMrrt:s},l=i,new Promise(function(u,f){const h=new MessageChannel;h.port1.onmessage=function(d){d.data.error?f(new Error(d.data.error)):u(d.data),h.port1.close()},l.postMessage(c,[h.port2])});var c,l},Sm=async(r,e,t,n,a,i,o=1e4,s)=>a?bm(r,e,t,n,o,a,i,s):wm(r,n,o);async function Dh(r,e,t,n,a,i,o,s,c,l){if(c){const y=await c.generateProof({url:r,method:a.method||"GET",nonce:await c.getNonce()});a.headers=Object.assign(Object.assign({},a.headers),{dpop:y})}let u,f=null;for(let y=0;y<3;y++)try{u=await Sm(r,t,n,a,i,o,e,s),f=null;break}catch(m){f=m}if(f)throw f;const h=u.json,{error:d,error_description:v}=h,p=pr(h,["error","error_description"]),{headers:g,ok:E}=u;let b;if(c&&(b=g["dpop-nonce"],b&&await c.setNonce(b)),!E){const y=v||`HTTP error. Unable to fetch ${r}`;if(d==="mfa_required")throw new sm(d,y,p.mfa_token);if(d==="missing_refresh_token")throw new Do(t,n);if(d==="use_dpop_nonce"){if(!c||!b||l)throw new Uh(b);return Dh(r,e,t,n,a,i,o,s,c,!0)}throw new We(d||"request_error",y)}return p}async function Im(r,e){var{baseUrl:t,timeout:n,audience:a,scope:i,auth0Client:o,useFormData:s,useMrrt:c,dpop:l}=r,u=pr(r,["baseUrl","timeout","audience","scope","auth0Client","useFormData","useMrrt","dpop"]);const f=u.grant_type==="urn:ietf:params:oauth:grant-type:token-exchange",h=u.grant_type==="refresh_token"&&c,d=Object.assign(Object.assign(Object.assign(Object.assign({},u),f&&a&&{audience:a}),f&&i&&{scope:i}),h&&{audience:a,scope:i}),v=s?$o(d):JSON.stringify(d),p=(g=u.grant_type,vm.includes(g));var g;return await Dh(`${t}/oauth/token`,n,a||"default",i,{method:"POST",body:v,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(o||Rh))}},e,s,c,p?l:void 0)}const It=(...r)=>{return(e=r.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(e))).join(" ");var e};let Or=class Fo{constructor(e,t="@@auth0spajs@@",n){this.prefix=t,this.suffix=n,this.clientId=e.clientId,this.scope=e.scope,this.audience=e.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(e){const[t,n,a,i]=e.split("::");return new Fo({clientId:n,scope:i,audience:a},t)}static fromCacheEntry(e){const{scope:t,audience:n,client_id:a}=e;return new Fo({scope:t,audience:n,clientId:a})}},Pm=class{set(e,t){localStorage.setItem(e,JSON.stringify(t))}get(e){const t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch{return}}remove(e){localStorage.removeItem(e)}allKeys(){return Object.keys(window.localStorage).filter(e=>e.startsWith("@@auth0spajs@@"))}},$h=class{constructor(){this.enclosedCache=function(){let e={};return{set(t,n){e[t]=n},get(t){const n=e[t];if(n)return n},remove(t){delete e[t]},allKeys:()=>Object.keys(e)}}()}},Em=class{constructor(e,t,n){this.cache=e,this.keyManifest=t,this.nowProvider=n||Th}async setIdToken(e,t,n){var a;const i=this.getIdTokenCacheKey(e);await this.cache.set(i,{id_token:t,decodedToken:n}),await((a=this.keyManifest)===null||a===void 0?void 0:a.add(i))}async getIdToken(e){const t=await this.cache.get(this.getIdTokenCacheKey(e.clientId));if(!t&&e.scope&&e.audience){const n=await this.get(e);return!n||!n.id_token||!n.decodedToken?void 0:{id_token:n.id_token,decodedToken:n.decodedToken}}if(t)return{id_token:t.id_token,decodedToken:t.decodedToken}}async get(e,t=0,n=!1,a){var i;let o=await this.cache.get(e.toKey());if(!o){const l=await this.getCacheKeys();if(!l)return;const u=this.matchExistingCacheKey(e,l);if(u&&(o=await this.cache.get(u)),!u&&n&&a!=="cache-only")return this.getEntryWithRefreshToken(e,l)}if(!o)return;const s=await this.nowProvider(),c=Math.floor(s/1e3);return o.expiresAt-t<c?o.body.refresh_token?this.modifiedCachedEntry(o,e):(await this.cache.remove(e.toKey()),void await((i=this.keyManifest)===null||i===void 0?void 0:i.remove(e.toKey()))):o.body}async modifiedCachedEntry(e,t){return e.body={refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope},await this.cache.set(t.toKey(),e),{refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope}}async set(e){var t;const n=new Or({clientId:e.client_id,scope:e.scope,audience:e.audience}),a=await this.wrapCacheEntry(e);await this.cache.set(n.toKey(),a),await((t=this.keyManifest)===null||t===void 0?void 0:t.add(n.toKey()))}async clear(e){var t;const n=await this.getCacheKeys();n&&(await n.filter(a=>!e||a.includes(e)).reduce(async(a,i)=>{await a,await this.cache.remove(i)},Promise.resolve()),await((t=this.keyManifest)===null||t===void 0?void 0:t.clear()))}async wrapCacheEntry(e){const t=await this.nowProvider();return{body:e,expiresAt:Math.floor(t/1e3)+e.expires_in}}async getCacheKeys(){var e;return this.keyManifest?(e=await this.keyManifest.get())===null||e===void 0?void 0:e.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(e){return new Or({clientId:e},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(e,t){return t.filter(n=>{var a;const i=Or.fromKey(n),o=new Set(i.scope&&i.scope.split(" ")),s=((a=e.scope)===null||a===void 0?void 0:a.split(" "))||[],c=i.scope&&s.reduce((l,u)=>l&&o.has(u),!0);return i.prefix==="@@auth0spajs@@"&&i.clientId===e.clientId&&i.audience===e.audience&&c})[0]}async getEntryWithRefreshToken(e,t){var n;for(const a of t){const i=Or.fromKey(a);if(i.prefix==="@@auth0spajs@@"&&i.clientId===e.clientId){const o=await this.cache.get(a);if(!((n=o?.body)===null||n===void 0)&&n.refresh_token)return this.modifiedCachedEntry(o,e)}}}async updateEntry(e,t){var n;const a=await this.getCacheKeys();if(a)for(const i of a){const o=await this.cache.get(i);if(((n=o?.body)===null||n===void 0?void 0:n.refresh_token)===e){const s=Object.assign(Object.assign({},o.body),{refresh_token:t});await this.set(s)}}}},Rm=class{constructor(e,t,n){this.storage=e,this.clientId=t,this.cookieDomain=n,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(e){this.storage.save(this.storageKey,e,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}};const Pt=r=>typeof r=="number",Tm=["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"],_m=r=>{if(!r.id_token)throw new Error("ID token is required but missing");const e=(i=>{const o=i.split("."),[s,c,l]=o;if(o.length!==3||!s||!c||!l)throw new Error("ID token could not be decoded");const u=JSON.parse(Uf(c)),f={__raw:i},h={};return Object.keys(u).forEach(d=>{f[d]=u[d],Tm.includes(d)||(h[d]=u[d])}),{encoded:{header:s,payload:c,signature:l},header:JSON.parse(Uf(s)),claims:f,user:h}})(r.id_token);if(!e.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(e.claims.iss!==r.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${r.iss}", found "${e.claims.iss}"`);if(!e.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(e.header.alg!=="RS256")throw new Error(`Signature algorithm of "${e.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!e.claims.aud||typeof e.claims.aud!="string"&&!Array.isArray(e.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(e.claims.aud)){if(!e.claims.aud.includes(r.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${r.aud}" but was not one of "${e.claims.aud.join(", ")}"`);if(e.claims.aud.length>1){if(!e.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(e.claims.azp!==r.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${r.aud}", found "${e.claims.azp}"`)}}else if(e.claims.aud!==r.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${r.aud}" but found "${e.claims.aud}"`);if(r.nonce){if(!e.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(e.claims.nonce!==r.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${r.nonce}", found "${e.claims.nonce}"`)}if(r.max_age&&!Pt(e.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(e.claims.exp==null||!Pt(e.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Pt(e.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const t=r.leeway||60,n=new Date(r.now||Date.now()),a=new Date(0);if(a.setUTCSeconds(e.claims.exp+t),n>a)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${n}) is after expiration time (${a})`);if(e.claims.nbf!=null&&Pt(e.claims.nbf)){const i=new Date(0);if(i.setUTCSeconds(e.claims.nbf-t),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(e.claims.auth_time!=null&&Pt(e.claims.auth_time)){const i=new Date(0);if(i.setUTCSeconds(parseInt(e.claims.auth_time)+r.max_age+t),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(r.organization){const i=r.organization.trim();if(i.startsWith("org_")){const o=i;if(!e.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(o!==e.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${o}", found "${e.claims.org_id}"`)}else{const o=i.toLowerCase();if(!e.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(o!==e.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${o}", found "${e.claims.org_name}"`)}}return e};var Dr=gs(function(r,e){var t=qr&&qr.__assign||function(){return t=Object.assign||function(c){for(var l,u=1,f=arguments.length;u<f;u++)for(var h in l=arguments[u])Object.prototype.hasOwnProperty.call(l,h)&&(c[h]=l[h]);return c},t.apply(this,arguments)};function n(c,l){if(!l)return"";var u="; "+c;return l===!0?u:u+"="+l}function a(c,l,u){return encodeURIComponent(c).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(l).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(f){if(typeof f.expires=="number"){var h=new Date;h.setMilliseconds(h.getMilliseconds()+864e5*f.expires),f.expires=h}return n("Expires",f.expires?f.expires.toUTCString():"")+n("Domain",f.domain)+n("Path",f.path)+n("Secure",f.secure)+n("SameSite",f.sameSite)}(u)}function i(c){for(var l={},u=c?c.split("; "):[],f=/(%[\dA-F]{2})+/gi,h=0;h<u.length;h++){var d=u[h].split("="),v=d.slice(1).join("=");v.charAt(0)==='"'&&(v=v.slice(1,-1));try{l[d[0].replace(f,decodeURIComponent)]=v.replace(f,decodeURIComponent)}catch{}}return l}function o(){return i(document.cookie)}function s(c,l,u){document.cookie=a(c,l,t({path:"/"},u))}e.__esModule=!0,e.encode=a,e.parse=i,e.getAll=o,e.get=function(c){return o()[c]},e.set=s,e.remove=function(c,l){s(c,"",t(t({},l),{expires:-1}))}});ms(Dr),Dr.encode,Dr.parse,Dr.getAll;var km=Dr.get,Mh=Dr.set,Fh=Dr.remove;const et={get(r){const e=km(r);if(e!==void 0)return JSON.parse(e)},save(r,e,t){let n={};window.location.protocol==="https:"&&(n={secure:!0,sameSite:"none"}),t?.daysUntilExpire&&(n.expires=t.daysUntilExpire),t?.cookieDomain&&(n.domain=t.cookieDomain),Mh(r,JSON.stringify(e),n)},remove(r,e){let t={};e?.cookieDomain&&(t.domain=e.cookieDomain),Fh(r,t)}},Om={get(r){return et.get(r)||et.get(`_legacy_${r}`)},save(r,e,t){let n={};window.location.protocol==="https:"&&(n={secure:!0}),t?.daysUntilExpire&&(n.expires=t.daysUntilExpire),t?.cookieDomain&&(n.domain=t.cookieDomain),Mh(`_legacy_${r}`,JSON.stringify(e),n),et.save(r,e,t)},remove(r,e){let t={};e?.cookieDomain&&(t.domain=e.cookieDomain),Fh(r,t),et.remove(r,e),et.remove(`_legacy_${r}`,e)}},Cm={get(r){if(typeof sessionStorage>"u")return;const e=sessionStorage.getItem(r);return e!=null?JSON.parse(e):void 0},save(r,e){sessionStorage.setItem(r,JSON.stringify(e))},remove(r){sessionStorage.removeItem(r)}};function Am(r,e,t){var n=e===void 0?null:e,a=function(c,l){var u=atob(c);if(l){for(var f=new Uint8Array(u.length),h=0,d=u.length;h<d;++h)f[h]=u.charCodeAt(h);return String.fromCharCode.apply(null,new Uint16Array(f.buffer))}return u}(r,t!==void 0&&t),i=a.indexOf(`
2
+ `,10)+1,o=a.substring(i)+(n?"//# sourceMappingURL="+n:""),s=new Blob([o],{type:"application/javascript"});return URL.createObjectURL(s)}var qf,Nf,xf,To,jm=(qf="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YSx1c2VNcnJ0OmZ9LHBvcnRzOltwXX0pPT57bGV0IHUsaCxsPXt9O2NvbnN0e2F1ZGllbmNlOmQsc2NvcGU6eX09cnx8e307dHJ5e2NvbnN0IHI9YT8oZT0+e2NvbnN0IHQ9bmV3IFVSTFNlYXJjaFBhcmFtcyhlKSxyPXt9O3JldHVybiB0LmZvckVhY2goKChlLHQpPT57clt0XT1lfSkpLHJ9KShjLmJvZHkpOkpTT04ucGFyc2UoYy5ib2R5KTtpZighci5yZWZyZXNoX3Rva2VuJiYicmVmcmVzaF90b2tlbiI9PT1yLmdyYW50X3R5cGUpe2lmKGg9KChlLHQpPT5vW24oZSx0KV0pKGQseSksIWgmJmYpe2NvbnN0IGU9by5sYXRlc3RfcmVmcmVzaF90b2tlbix0PSgoZSx0KT0+e2NvbnN0IHI9T2JqZWN0LmtleXMobykuZmluZCgocj0+e2lmKCJsYXRlc3RfcmVmcmVzaF90b2tlbiIhPT1yKXtjb25zdCBzPSgoZSx0KT0+dC5zdGFydHNXaXRoKGAke2V9fGApKSh0LHIpLG89ci5zcGxpdCgifCIpWzFdLnNwbGl0KCIgIiksbj1lLnNwbGl0KCIgIikuZXZlcnkoKGU9Pm8uaW5jbHVkZXMoZSkpKTtyZXR1cm4gcyYmbn19KSk7cmV0dXJuISFyfSkoeSxkKTtlJiYhdCYmKGg9ZSl9aWYoIWgpdGhyb3cgbmV3IHQoZCx5KTtjLmJvZHk9YT9zKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxyKSx7cmVmcmVzaF90b2tlbjpofSkpOkpTT04uc3RyaW5naWZ5KE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxyKSx7cmVmcmVzaF90b2tlbjpofSkpfWxldCBqLGs7ImZ1bmN0aW9uIj09dHlwZW9mIEFib3J0Q29udHJvbGxlciYmKGo9bmV3IEFib3J0Q29udHJvbGxlcixjLnNpZ25hbD1qLnNpZ25hbCk7dHJ5e2s9YXdhaXQgUHJvbWlzZS5yYWNlKFsoXz1lLG5ldyBQcm9taXNlKChlPT5zZXRUaW1lb3V0KGUsXykpKSksZmV0Y2goaSxPYmplY3QuYXNzaWduKHt9LGMpKV0pfWNhdGNoKGUpe3JldHVybiB2b2lkIHAucG9zdE1lc3NhZ2Uoe2Vycm9yOmUubWVzc2FnZX0pfWlmKCFrKXJldHVybiBqJiZqLmFib3J0KCksdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjoiVGltZW91dCB3aGVuIGV4ZWN1dGluZyAnZmV0Y2gnIn0pO2c9ay5oZWFkZXJzLGw9Wy4uLmddLnJlZHVjZSgoKGUsW3Qscl0pPT4oZVt0XT1yLGUpKSx7fSksdT1hd2FpdCBrLmpzb24oKSx1LnJlZnJlc2hfdG9rZW4/KGYmJiJkZWZhdWx0IiE9PWQmJihvLmxhdGVzdF9yZWZyZXNoX3Rva2VuPXUucmVmcmVzaF90b2tlbixPPWgsYj11LnJlZnJlc2hfdG9rZW4sT2JqZWN0LmVudHJpZXMobykuZm9yRWFjaCgoKFtlLHRdKT0+e3Q9PT1PJiYob1tlXT1iKX0pKSksKChlLHQscik9PntvW24odCxyKV09ZX0pKHUucmVmcmVzaF90b2tlbixkLHkpLGRlbGV0ZSB1LnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KShkLHkpLHAucG9zdE1lc3NhZ2Uoe29rOmsub2ssanNvbjp1LGhlYWRlcnM6bH0pfWNhdGNoKGUpe3AucG9zdE1lc3NhZ2Uoe29rOiExLGpzb246e2Vycm9yOmUuZXJyb3IsZXJyb3JfZGVzY3JpcHRpb246ZS5tZXNzYWdlfSxoZWFkZXJzOmx9KX12YXIgTyxiLGcsX30pKX0oKTsKCg==",Nf=null,xf=!1,function(r){return To=To||Am(qf,Nf,xf),new Worker(To,r)});const _o={};let Um=class{constructor(e,t){this.cache=e,this.clientId=t,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(e){var t;const n=new Set(((t=await this.cache.get(this.manifestKey))===null||t===void 0?void 0:t.keys)||[]);n.add(e),await this.cache.set(this.manifestKey,{keys:[...n]})}async remove(e){const t=await this.cache.get(this.manifestKey);if(t){const n=new Set(t.keys);return n.delete(e),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(e){return`@@auth0spajs@@::${e}`}};const Lm={memory:()=>new $h().enclosedCache,localstorage:()=>new Pm},Df=r=>Lm[r],$f=r=>{const{openUrl:e,onRedirect:t}=r,n=pr(r,["openUrl","onRedirect"]);return Object.assign(Object.assign({},n),{openUrl:e===!1||e?e:t})},Mf=(r,e)=>{const t=e?.split(" ")||[];return(r?.split(" ")||[]).every(n=>t.includes(n))},Ur={NONCE:"nonce",KEYPAIR:"keypair"};let qm=class{constructor(e){this.clientId=e}getVersion(){return 1}createDbHandle(){const e=window.indexedDB.open("auth0-spa-js",this.getVersion());return new Promise((t,n)=>{e.onupgradeneeded=()=>Object.values(Ur).forEach(a=>e.result.createObjectStore(a)),e.onerror=()=>n(e.error),e.onsuccess=()=>t(e.result)})}async getDbHandle(){return this.dbHandle||(this.dbHandle=await this.createDbHandle()),this.dbHandle}async executeDbRequest(e,t,n){const a=n((await this.getDbHandle()).transaction(e,t).objectStore(e));return new Promise((i,o)=>{a.onsuccess=()=>i(a.result),a.onerror=()=>o(a.error)})}buildKey(e){const t=e?`_${e}`:"auth0";return`${this.clientId}::${t}`}setNonce(e,t){return this.save(Ur.NONCE,this.buildKey(t),e)}setKeyPair(e){return this.save(Ur.KEYPAIR,this.buildKey(),e)}async save(e,t,n){await this.executeDbRequest(e,"readwrite",a=>a.put(n,t))}findNonce(e){return this.find(Ur.NONCE,this.buildKey(e))}findKeyPair(){return this.find(Ur.KEYPAIR,this.buildKey())}find(e,t){return this.executeDbRequest(e,"readonly",n=>n.get(t))}async deleteBy(e,t){const n=await this.executeDbRequest(e,"readonly",a=>a.getAllKeys());n?.filter(t).map(a=>this.executeDbRequest(e,"readwrite",i=>i.delete(a)))}deleteByClientId(e,t){return this.deleteBy(e,n=>typeof n=="string"&&n.startsWith(`${t}::`))}clearNonces(){return this.deleteByClientId(Ur.NONCE,this.clientId)}clearKeyPairs(){return this.deleteByClientId(Ur.KEYPAIR,this.clientId)}},Nm=class{constructor(e){this.storage=new qm(e)}getNonce(e){return this.storage.findNonce(e)}setNonce(e,t){return this.storage.setNonce(e,t)}async getOrGenerateKeyPair(){let e=await this.storage.findKeyPair();return e||(e=await pm(),await this.storage.setKeyPair(e)),e}async generateProof(e){const t=await this.getOrGenerateKeyPair();return gm(Object.assign({keyPair:t},e))}async calculateThumbprint(){return mm(await this.getOrGenerateKeyPair())}async clear(){await Promise.all([this.storage.clearNonces(),this.storage.clearKeyPairs()])}},xm=class{constructor(e,t){this.hooks=t,this.config=Object.assign(Object.assign({},e),{fetch:e.fetch||(typeof window>"u"?fetch:window.fetch.bind(window))})}isAbsoluteUrl(e){return/^(https?:)?\/\//i.test(e)}buildUrl(e,t){if(t){if(this.isAbsoluteUrl(t))return t;if(e)return`${e.replace(/\/?\/$/,"")}/${t.replace(/^\/+/,"")}`}throw new TypeError("`url` must be absolute or `baseUrl` non-empty.")}getAccessToken(e){return this.config.getAccessToken?this.config.getAccessToken(e):this.hooks.getAccessToken(e)}buildBaseRequest(e,t){const n=new Request(e,t);return this.config.baseUrl?new Request(this.buildUrl(this.config.baseUrl,n.url),n):n}async setAuthorizationHeader(e,t){e.headers.set("authorization",`${this.config.dpopNonceId?"DPoP":"Bearer"} ${t}`)}async setDpopProofHeader(e,t){if(!this.config.dpopNonceId)return;const n=await this.hooks.getDpopNonce(),a=await this.hooks.generateDpopProof({accessToken:t,method:e.method,nonce:n,url:e.url});e.headers.set("dpop",a)}async prepareRequest(e,t){const n=await this.getAccessToken(t);this.setAuthorizationHeader(e,n),await this.setDpopProofHeader(e,n)}getHeader(e,t){return Array.isArray(e)?new Headers(e).get(t)||"":typeof e.get=="function"?e.get(t)||"":e[t]||""}hasUseDpopNonceError(e){return e.status!==401?!1:this.getHeader(e.headers,"www-authenticate").includes("use_dpop_nonce")}async handleResponse(e,t){const n=this.getHeader(e.headers,"dpop-nonce");if(n&&await this.hooks.setDpopNonce(n),!this.hasUseDpopNonceError(e))return e;if(!n||!t.onUseDpopNonceError)throw new Uh(n);return t.onUseDpopNonceError()}async internalFetchWithAuth(e,t,n,a){const i=this.buildBaseRequest(e,t);await this.prepareRequest(i,a);const o=await this.config.fetch(i);return this.handleResponse(o,n)}fetchWithAuth(e,t,n){const a={onUseDpopNonceError:()=>this.internalFetchWithAuth(e,t,Object.assign(Object.assign({},a),{onUseDpopNonceError:void 0}),n)};return this.internalFetchWithAuth(e,t,a,n)}};const ko=new tm;let Dm=class{constructor(e){let t,n;if(this.userCache=new $h().enclosedCache,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{await ko.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),e),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),e.authorizationParams)}),typeof window<"u"&&(()=>{if(!Qt())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(Qt().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
- `)})(),r.cache&&r.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),r.cache)n=r.cache;else{if(t=r.cacheLocation||"memory",!Af(t))throw new Error(`Invalid cache location "${t}"`);n=Af(t)()}this.httpTimeoutMs=r.httpTimeoutInSeconds?1e3*r.httpTimeoutInSeconds:1e4,this.cookieStorage=r.legacySameSiteCookie===!1?Xr:om,this.orgHintCookieName=`auth0.${this.options.clientId}.organization_hint`,this.isAuthenticatedCookieName=(o=>`auth0.${o}.is.authenticated`)(this.options.clientId),this.sessionCheckExpiryDays=r.sessionCheckExpiryDays||1;const a=r.useCookiesForTransactions?this.cookieStorage:sm;var i;this.scope=bt("openid",this.options.authorizationParams.scope,this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new tm(a,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||yh,this.cacheManager=new rm(n,n.allKeys?void 0:new lm(n,this.options.clientId),this.nowProvider),this.domainUrl=(i=this.options.domain,/^https?:\/\//.test(i)?i:`https://${i}`),this.tokenIssuer=((o,s)=>o?o.startsWith("https://")?o:`https://${o}/`:`${s}/`)(this.options.issuer,this.domainUrl),typeof window<"u"&&window.Worker&&this.options.useRefreshTokens&&t==="memory"&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new cm)}_url(r){const t=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||gh)));return`${this.domainUrl}${r}&auth0Client=${t}`}_authorizeUrl(r){return this._url(`/authorize?${Lo(r)}`)}async _verifyIdToken(r,t,n){const a=await this.nowProvider();return am({iss:this.tokenIssuer,aud:this.options.clientId,id_token:r,nonce:t,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(r){r?this.cookieStorage.save(this.orgHintCookieName,r,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(r,t,n){const a=_f(So()),i=_f(So()),o=So(),s=(u=>{const f=new Uint8Array(u);return(h=>{const d={"+":"-","/":"_","=":""};return h.replace(/[+/=]/g,v=>d[v])})(window.btoa(String.fromCharCode(...Array.from(f))))})(await(async u=>await Jt().subtle.digest({name:"SHA-256"},new TextEncoder().encode(u)))(o)),c=((u,f,h,d,v,m,y,E)=>Object.assign(Object.assign(Object.assign({client_id:u.clientId},u.authorizationParams),h),{scope:bt(f,h.scope),response_type:"code",response_mode:E||"query",state:d,nonce:v,redirect_uri:y||u.authorizationParams.redirect_uri,code_challenge:m,code_challenge_method:"S256"}))(this.options,this.scope,r,a,i,s,r.redirect_uri||this.options.authorizationParams.redirect_uri||n,t?.response_mode),l=this._authorizeUrl(c);return{nonce:i,code_verifier:o,scope:c.scope,audience:c.audience||"default",redirect_uri:c.redirect_uri,state:a,url:l}}async loginWithPopup(r,t){var n;if(r=r||{},!(t=t||{}).popup&&(t.popup=(s=>{const c=window.screenX+(window.innerWidth-400)/2,l=window.screenY+(window.innerHeight-600)/2;return window.open(s,"auth0:authorize:popup",`left=${c},top=${l},width=400,height=600,resizable,scrollbars=yes,status=1`)})(""),!t.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");const a=await this._prepareAuthorizeUrl(r.authorizationParams||{},{response_mode:"web_message"},window.location.origin);t.popup.location.href=a.url;const i=await(s=>new Promise((c,l)=>{let u;const f=setInterval(()=>{s.popup&&s.popup.closed&&(clearInterval(f),clearTimeout(h),window.removeEventListener("message",u,!1),l(new Wp(s.popup)))},1e3),h=setTimeout(()=>{clearInterval(f),l(new Kp(s.popup)),window.removeEventListener("message",u,!1)},1e3*(s.timeoutInSeconds||60));u=function(d){if(d.data&&d.data.type==="authorization_response"){if(clearTimeout(h),clearInterval(f),window.removeEventListener("message",u,!1),s.popup.close(),d.data.response.error)return l(Qe.fromPayload(d.data.response));c(d.data.response)}},window.addEventListener("message",u)}))(Object.assign(Object.assign({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(a.state!==i.state)throw new Qe("state_mismatch","Invalid state");const o=((n=r.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 r;const t=await this._getIdTokenFromCache();return(r=t?.decodedToken)===null||r===void 0?void 0:r.user}async getIdTokenClaims(){var r;const t=await this._getIdTokenFromCache();return(r=t?.decodedToken)===null||r===void 0?void 0:r.claims}async loginWithRedirect(r={}){var t;const n=jf(r),{openUrl:a,fragment:i,appState:o}=n,s=pr(n,["openUrl","fragment","appState"]),c=((t=s.authorizationParams)===null||t===void 0?void 0:t.organization)||this.options.authorizationParams.organization,l=await this._prepareAuthorizeUrl(s.authorizationParams||{}),{url:u}=l,f=pr(l,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},f),{appState:o}),c&&{organization:c}));const h=i?`${u}#${i}`:u;a?await a(h):window.location.assign(h)}async handleRedirectCallback(r=window.location.href){const t=r.split("?").slice(1);if(t.length===0)throw new Error("There are no query params available for parsing.");const{state:n,code:a,error:i,error_description:o}=(f=>{f.indexOf("#")>-1&&(f=f.substring(0,f.indexOf("#")));const h=new URLSearchParams(f);return{state:h.get("state"),code:h.get("code")||void 0,error:h.get("error")||void 0,error_description:h.get("error_description")||void 0}})(t.join("")),s=this.transactionManager.get();if(!s)throw new Qe("missing_transaction","Invalid state");if(this.transactionManager.remove(),i)throw new Gp(i,o||i,n,s.appState);if(!s.code_verifier||s.state&&s.state!==n)throw new Qe("state_mismatch","Invalid state");const c=s.organization,l=s.nonce,u=s.redirect_uri;return await this._requestToken(Object.assign({audience:s.audience,scope:s.scope,code_verifier:s.code_verifier,grant_type:"authorization_code",code:a},u?{redirect_uri:u}:{}),{nonceIn:l,organization:c}),{appState:s.appState}}async checkSession(r){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(r)}catch{}}async getTokenSilently(r={}){var t;const n=Object.assign(Object.assign({cacheMode:"on"},r),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),r.authorizationParams),{scope:bt(this.scope,(t=r.authorizationParams)===null||t===void 0?void 0:t.scope)})}),a=await((i,o)=>{let s=Po[o];return s||(s=i().finally(()=>{delete Po[o],s=null}),Po[o]=s),s})(()=>this._getTokenSilently(n),`${this.options.clientId}::${n.authorizationParams.audience}::${n.authorizationParams.scope}`);return r.detailedResponse?a:a?.access_token}async _getTokenSilently(r){const{cacheMode:t}=r,n=pr(r,["cacheMode"]);if(t!=="off"){const a=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(a)return a}if(t!=="cache-only"){if(!await(async(a,i=3)=>{for(let o=0;o<i;o++)if(await a())return!0;return!1})(()=>Eo.acquireLock("auth0.lock.getTokenSilently",5e3),10))throw new Uo;try{if(window.addEventListener("pagehide",this._releaseLockOnPageHide),t!=="off"){const l=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(l)return l}const a=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(n):await this._getTokenFromIFrame(n),{id_token:i,access_token:o,oauthTokenScope:s,expires_in:c}=a;return Object.assign(Object.assign({id_token:i,access_token:o},s?{scope:s}:null),{expires_in:c})}finally{await Eo.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}}async getTokenWithPopup(r={},t={}){var n;const a=Object.assign(Object.assign({},r),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),r.authorizationParams),{scope:bt(this.scope,(n=r.authorizationParams)===null||n===void 0?void 0:n.scope)})});return t=Object.assign(Object.assign({},Hp),t),await this.loginWithPopup(a,t),(await this.cacheManager.get(new qr({scope:a.authorizationParams.scope,audience:a.authorizationParams.audience||"default",clientId:this.options.clientId}))).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(r){r.clientId!==null?r.clientId=r.clientId||this.options.clientId:delete r.clientId;const t=r.logoutParams||{},{federated:n}=t,a=pr(t,["federated"]),i=n?"&federated":"";return this._url(`/v2/logout?${Lo(Object.assign({clientId:r.clientId},a))}`)+i}async logout(r={}){const t=jf(r),{openUrl:n}=t,a=pr(t,["openUrl"]);r.clientId===null?await this.cacheManager.clear():await this.cacheManager.clear(r.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(r){const t=Object.assign(Object.assign({},r.authorizationParams),{prompt:"none"}),n=this.cookieStorage.get(this.orgHintCookieName);n&&!t.organization&&(t.organization=n);const{url:a,state:i,nonce:o,code_verifier:s,redirect_uri:c,scope:l,audience:u}=await this._prepareAuthorizeUrl(t,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new Qe("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const f=r.timeoutInSeconds||this.options.authorizeTimeoutInSeconds;let h;try{h=new URL(this.domainUrl).origin}catch{h=this.domainUrl}const d=await((m,y,E=60)=>new Promise((b,g)=>{const p=window.document.createElement("iframe");p.setAttribute("width","0"),p.setAttribute("height","0"),p.style.display="none";const w=()=>{window.document.body.contains(p)&&(window.document.body.removeChild(p),window.removeEventListener("message",k,!1))};let k;const q=setTimeout(()=>{g(new Uo),w()},1e3*E);k=function(C){if(C.origin!=y||!C.data||C.data.type!=="authorization_response")return;const B=C.source;B&&B.close(),C.data.response.error?g(Qe.fromPayload(C.data.response)):b(C.data.response),clearTimeout(q),window.removeEventListener("message",k,!1),setTimeout(w,2e3)},window.addEventListener("message",k,!1),window.document.body.appendChild(p),p.setAttribute("src",m)}))(a,h,f);if(i!==d.state)throw new Qe("state_mismatch","Invalid state");const v=await this._requestToken(Object.assign(Object.assign({},r.authorizationParams),{code_verifier:s,code:d.code,grant_type:"authorization_code",redirect_uri:c,timeout:r.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:o,organization:t.organization});return Object.assign(Object.assign({},v),{scope:l,oauthTokenScope:v.scope,audience:u})}catch(f){throw f.error==="login_required"&&this.logout({openUrl:!1}),f}}async _getTokenUsingRefreshToken(r){const t=await this.cacheManager.get(new qr({scope:r.authorizationParams.scope,audience:r.authorizationParams.audience||"default",clientId:this.options.clientId}));if(!(t&&t.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(r);throw new Eh(r.authorizationParams.audience||"default",r.authorizationParams.scope)}const n=r.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,a=typeof r.timeoutInSeconds=="number"?1e3*r.timeoutInSeconds:null;try{const i=await this._requestToken(Object.assign(Object.assign(Object.assign({},r.authorizationParams),{grant_type:"refresh_token",refresh_token:t&&t.refresh_token,redirect_uri:n}),a&&{timeout:a}));return Object.assign(Object.assign({},i),{scope:r.authorizationParams.scope,oauthTokenScope:i.scope,audience:r.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(r);throw i}}async _saveEntryInCache(r){const{id_token:t,decodedToken:n}=r,a=pr(r,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:t,decodedToken:n}),await this.cacheManager.setIdToken(this.options.clientId,r.id_token,r.decodedToken),await this.cacheManager.set(a)}async _getIdTokenFromCache(){const r=this.options.authorizationParams.audience||"default",t=await this.cacheManager.getIdToken(new qr({clientId:this.options.clientId,audience:r,scope:this.scope})),n=this.userCache.get("@@user@@");return t&&t.id_token===n?.id_token?n:(this.userCache.set("@@user@@",t),t)}async _getEntryFromCache({scope:r,audience:t,clientId:n}){const a=await this.cacheManager.get(new qr({scope:r,audience:t,clientId:n}),60);if(a&&a.access_token){const{access_token:i,oauthTokenScope:o,expires_in:s}=a,c=await this._getIdTokenFromCache();return c&&Object.assign(Object.assign({id_token:c.id_token,access_token:i},o?{scope:o}:null),{expires_in:s})}}async _requestToken(r,t){const{nonceIn:n,organization:a}=t||{},i=await Qp(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},r),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:r.scope,audience:r.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 exchangeToken(r){return this._requestToken({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",subject_token:r.subject_token,subject_token_type:r.subject_token_type,scope:bt(r.scope,this.scope),audience:r.audience||this.options.authorizationParams.audience})}};async function hm(e){const r=new dm(e);return await r.checkSession(),r}var Ve=(e=>(e.AUTH_INITIALIZED="sesamyJsAuthInitialized",e.READY="sesamyJsReady",e.AUTHENTICATED="sesamyJsAuthenticated",e.LOGOUT="sesamyJsLogout",e.CLEAR_CACHE="sesamyJsClearCache",e.USER_ATTRIBUTE_CHANGED="sesamyUserAttributeChanged",e.PURCHASE="sesamyJsPurchase",e))(Ve||{});const vm="sesamy.com",pm="sesamy.dev",mm="https://sesa.my",xo="sesamyCacheTimestamp",Uf="sesamyContentReloaded";function kh(e,r){return`${e}.${r==="dev"?pm:vm}`}function vr(e,r){return`https://${kh(e,r)}`}function rn(){return(document.documentElement.getAttribute("lang")??navigator.language??"en").split("-")[0]?.toLocaleLowerCase()}/*!
4
+ `)})(),e.cache&&e.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),e.cache)n=e.cache;else{if(t=e.cacheLocation||"memory",!Df(t))throw new Error(`Invalid cache location "${t}"`);n=Df(t)()}this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:1e4,this.cookieStorage=e.legacySameSiteCookie===!1?et:Om,this.orgHintCookieName=`auth0.${this.options.clientId}.organization_hint`,this.isAuthenticatedCookieName=(o=>`auth0.${o}.is.authenticated`)(this.options.clientId),this.sessionCheckExpiryDays=e.sessionCheckExpiryDays||1;const a=e.useCookiesForTransactions?this.cookieStorage:Cm;var i;this.scope=It("openid",this.options.authorizationParams.scope,this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new Rm(a,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||Th,this.cacheManager=new Em(n,n.allKeys?void 0:new Um(n,this.options.clientId),this.nowProvider),this.dpop=this.options.useDpop?new Nm(this.options.clientId):void 0,this.domainUrl=(i=this.options.domain,/^https?:\/\//.test(i)?i:`https://${i}`),this.tokenIssuer=((o,s)=>o?o.startsWith("https://")?o:`https://${o}/`:`${s}/`)(this.options.issuer,this.domainUrl),typeof window<"u"&&window.Worker&&this.options.useRefreshTokens&&t==="memory"&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new jm)}_url(e){const t=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||Rh)));return`${this.domainUrl}${e}&auth0Client=${t}`}_authorizeUrl(e){return this._url(`/authorize?${$o(e)}`)}async _verifyIdToken(e,t,n){const a=await this.nowProvider();return _m({iss:this.tokenIssuer,aud:this.options.clientId,id_token:e,nonce:t,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(e){e?this.cookieStorage.save(this.orgHintCookieName,e,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(e,t,n){var a;const i=jf(Ro()),o=jf(Ro()),s=Ro(),c=(h=>{const d=new Uint8Array(h);return(v=>{const p={"+":"-","/":"_","=":""};return v.replace(/[+/=]/g,g=>p[g])})(window.btoa(String.fromCharCode(...Array.from(d))))})(await(async h=>await Qt().subtle.digest({name:"SHA-256"},new TextEncoder().encode(h)))(s)),l=await((a=this.dpop)===null||a===void 0?void 0:a.calculateThumbprint()),u=((h,d,v,p,g,E,b,y,m)=>Object.assign(Object.assign(Object.assign({client_id:h.clientId},h.authorizationParams),v),{scope:It(d,v.scope),response_type:"code",response_mode:y||"query",state:p,nonce:g,redirect_uri:b||h.authorizationParams.redirect_uri,code_challenge:E,code_challenge_method:"S256",dpop_jkt:m}))(this.options,this.scope,e,i,o,c,e.redirect_uri||this.options.authorizationParams.redirect_uri||n,t?.response_mode,l),f=this._authorizeUrl(u);return{nonce:o,code_verifier:s,scope:u.scope,audience:u.audience||"default",redirect_uri:u.redirect_uri,state:i,url:f}}async loginWithPopup(e,t){var n;if(e=e||{},!(t=t||{}).popup&&(t.popup=(s=>{const c=window.screenX+(window.innerWidth-400)/2,l=window.screenY+(window.innerHeight-600)/2;return window.open(s,"auth0:authorize:popup",`left=${c},top=${l},width=400,height=600,resizable,scrollbars=yes,status=1`)})(""),!t.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");const a=await this._prepareAuthorizeUrl(e.authorizationParams||{},{response_mode:"web_message"},window.location.origin);t.popup.location.href=a.url;const i=await(s=>new Promise((c,l)=>{let u;const f=setInterval(()=>{s.popup&&s.popup.closed&&(clearInterval(f),clearTimeout(h),window.removeEventListener("message",u,!1),l(new om(s.popup)))},1e3),h=setTimeout(()=>{clearInterval(f),l(new im(s.popup)),window.removeEventListener("message",u,!1)},1e3*(s.timeoutInSeconds||60));u=function(d){if(d.data&&d.data.type==="authorization_response"){if(clearTimeout(h),clearInterval(f),window.removeEventListener("message",u,!1),s.popup.close(),d.data.response.error)return l(We.fromPayload(d.data.response));c(d.data.response)}},window.addEventListener("message",u)}))(Object.assign(Object.assign({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(a.state!==i.state)throw new We("state_mismatch","Invalid state");const o=((n=e.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 e;const t=await this._getIdTokenFromCache();return(e=t?.decodedToken)===null||e===void 0?void 0:e.user}async getIdTokenClaims(){var e;const t=await this._getIdTokenFromCache();return(e=t?.decodedToken)===null||e===void 0?void 0:e.claims}async loginWithRedirect(e={}){var t;const n=$f(e),{openUrl:a,fragment:i,appState:o}=n,s=pr(n,["openUrl","fragment","appState"]),c=((t=s.authorizationParams)===null||t===void 0?void 0:t.organization)||this.options.authorizationParams.organization,l=await this._prepareAuthorizeUrl(s.authorizationParams||{}),{url:u}=l,f=pr(l,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},f),{appState:o}),c&&{organization:c}));const h=i?`${u}#${i}`:u;a?await a(h):window.location.assign(h)}async handleRedirectCallback(e=window.location.href){const t=e.split("?").slice(1);if(t.length===0)throw new Error("There are no query params available for parsing.");const{state:n,code:a,error:i,error_description:o}=(f=>{f.indexOf("#")>-1&&(f=f.substring(0,f.indexOf("#")));const h=new URLSearchParams(f);return{state:h.get("state"),code:h.get("code")||void 0,error:h.get("error")||void 0,error_description:h.get("error_description")||void 0}})(t.join("")),s=this.transactionManager.get();if(!s)throw new We("missing_transaction","Invalid state");if(this.transactionManager.remove(),i)throw new am(i,o||i,n,s.appState);if(!s.code_verifier||s.state&&s.state!==n)throw new We("state_mismatch","Invalid state");const c=s.organization,l=s.nonce,u=s.redirect_uri;return await this._requestToken(Object.assign({audience:s.audience,scope:s.scope,code_verifier:s.code_verifier,grant_type:"authorization_code",code:a},u?{redirect_uri:u}:{}),{nonceIn:l,organization:c}),{appState:s.appState}}async checkSession(e){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(e)}catch{}}async getTokenSilently(e={}){var t;const n=Object.assign(Object.assign({cacheMode:"on"},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:It(this.scope,(t=e.authorizationParams)===null||t===void 0?void 0:t.scope)})}),a=await((i,o)=>{let s=_o[o];return s||(s=i().finally(()=>{delete _o[o],s=null}),_o[o]=s),s})(()=>this._getTokenSilently(n),`${this.options.clientId}::${n.authorizationParams.audience}::${n.authorizationParams.scope}`);return e.detailedResponse?a:a?.access_token}async _getTokenSilently(e){const{cacheMode:t}=e,n=pr(e,["cacheMode"]);if(t!=="off"){const a=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId,cacheMode:t});if(a)return a}if(t!=="cache-only"){if(!await(async(a,i=3)=>{for(let o=0;o<i;o++)if(await a())return!0;return!1})(()=>ko.acquireLock("auth0.lock.getTokenSilently",5e3),10))throw new xo;try{if(window.addEventListener("pagehide",this._releaseLockOnPageHide),t!=="off"){const u=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(u)return u}const a=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(n):await this._getTokenFromIFrame(n),{id_token:i,token_type:o,access_token:s,oauthTokenScope:c,expires_in:l}=a;return Object.assign(Object.assign({id_token:i,token_type:o,access_token:s},c?{scope:c}:null),{expires_in:l})}finally{await ko.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}}async getTokenWithPopup(e={},t={}){var n;const a=Object.assign(Object.assign({},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:It(this.scope,(n=e.authorizationParams)===null||n===void 0?void 0:n.scope)})});return t=Object.assign(Object.assign({},nm),t),await this.loginWithPopup(a,t),(await this.cacheManager.get(new Or({scope:a.authorizationParams.scope,audience:a.authorizationParams.audience||"default",clientId:this.options.clientId}),void 0,this.options.useMrrt)).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(e){e.clientId!==null?e.clientId=e.clientId||this.options.clientId:delete e.clientId;const t=e.logoutParams||{},{federated:n}=t,a=pr(t,["federated"]),i=n?"&federated":"";return this._url(`/v2/logout?${$o(Object.assign({clientId:e.clientId},a))}`)+i}async logout(e={}){var t;const n=$f(e),{openUrl:a}=n,i=pr(n,["openUrl"]);e.clientId===null?await this.cacheManager.clear():await this.cacheManager.clear(e.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@@"),await((t=this.dpop)===null||t===void 0?void 0:t.clear());const o=this._buildLogoutUrl(i);a?await a(o):a!==!1&&window.location.assign(o)}async _getTokenFromIFrame(e){const t=Object.assign(Object.assign({},e.authorizationParams),{prompt:"none"}),n=this.cookieStorage.get(this.orgHintCookieName);n&&!t.organization&&(t.organization=n);const{url:a,state:i,nonce:o,code_verifier:s,redirect_uri:c,scope:l,audience:u}=await this._prepareAuthorizeUrl(t,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new We("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const f=e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds;let h;try{h=new URL(this.domainUrl).origin}catch{h=this.domainUrl}const d=await((p,g,E=60)=>new Promise((b,y)=>{const m=window.document.createElement("iframe");m.setAttribute("width","0"),m.setAttribute("height","0"),m.style.display="none";const w=()=>{window.document.body.contains(m)&&(window.document.body.removeChild(m),window.removeEventListener("message",O,!1))};let O;const N=setTimeout(()=>{y(new xo),w()},1e3*E);O=function(A){if(A.origin!=g||!A.data||A.data.type!=="authorization_response")return;const K=A.source;K&&K.close(),A.data.response.error?y(We.fromPayload(A.data.response)):b(A.data.response),clearTimeout(N),window.removeEventListener("message",O,!1),setTimeout(w,2e3)},window.addEventListener("message",O,!1),window.document.body.appendChild(m),m.setAttribute("src",p)}))(a,h,f);if(i!==d.state)throw new We("state_mismatch","Invalid state");const v=await this._requestToken(Object.assign(Object.assign({},e.authorizationParams),{code_verifier:s,code:d.code,grant_type:"authorization_code",redirect_uri:c,timeout:e.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:o,organization:t.organization});return Object.assign(Object.assign({},v),{scope:l,oauthTokenScope:v.scope,audience:u})}catch(f){throw f.error==="login_required"&&this.logout({openUrl:!1}),f}}async _getTokenUsingRefreshToken(e){const t=await this.cacheManager.get(new Or({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||"default",clientId:this.options.clientId}),void 0,this.options.useMrrt);if(!(t&&t.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw new Do(e.authorizationParams.audience||"default",e.authorizationParams.scope)}const n=e.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,a=typeof e.timeoutInSeconds=="number"?1e3*e.timeoutInSeconds:null,i=((u,f,h,d)=>{var v;if(u&&h&&d){if(f.audience!==h)return f.scope;const p=d.split(" "),g=((v=f.scope)===null||v===void 0?void 0:v.split(" "))||[],E=g.every(b=>p.includes(b));return p.length>=g.length&&E?d:f.scope}return f.scope})(this.options.useMrrt,e.authorizationParams,t?.audience,t?.scope);try{const u=await this._requestToken(Object.assign(Object.assign(Object.assign({},e.authorizationParams),{grant_type:"refresh_token",refresh_token:t&&t.refresh_token,redirect_uri:n}),a&&{timeout:a}),{scopesToRequest:i});if(u.refresh_token&&this.options.useMrrt&&t?.refresh_token&&await this.cacheManager.updateEntry(t.refresh_token,u.refresh_token),this.options.useMrrt&&(o=t?.audience,s=t?.scope,c=e.authorizationParams.audience,l=e.authorizationParams.scope,(o!==c||!Mf(l,s))&&!Mf(i,u.scope))){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw new Do(e.authorizationParams.audience||"default",e.authorizationParams.scope)}return Object.assign(Object.assign({},u),{scope:e.authorizationParams.scope,oauthTokenScope:u.scope,audience:e.authorizationParams.audience||"default"})}catch(u){if((u.message.indexOf("Missing Refresh Token")>-1||u.message&&u.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw u}var o,s,c,l}async _saveEntryInCache(e){const{id_token:t,decodedToken:n}=e,a=pr(e,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:t,decodedToken:n}),await this.cacheManager.setIdToken(this.options.clientId,e.id_token,e.decodedToken),await this.cacheManager.set(a)}async _getIdTokenFromCache(){const e=this.options.authorizationParams.audience||"default",t=await this.cacheManager.getIdToken(new Or({clientId:this.options.clientId,audience:e,scope:this.scope})),n=this.userCache.get("@@user@@");return t&&t.id_token===n?.id_token?n:(this.userCache.set("@@user@@",t),t)}async _getEntryFromCache({scope:e,audience:t,clientId:n,cacheMode:a}){const i=await this.cacheManager.get(new Or({scope:e,audience:t,clientId:n}),60,this.options.useMrrt,a);if(i&&i.access_token){const{token_type:o,access_token:s,oauthTokenScope:c,expires_in:l}=i,u=await this._getIdTokenFromCache();return u&&Object.assign(Object.assign({id_token:u.id_token,token_type:o||"Bearer",access_token:s},c?{scope:c}:null),{expires_in:l})}}async _requestToken(e,t){const{nonceIn:n,organization:a,scopesToRequest:i}=t||{},o=await Im(Object.assign(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs,useMrrt:this.options.useMrrt,dpop:this.dpop},e),{scope:i||e.scope}),this.worker),s=await this._verifyIdToken(o.id_token,n,a);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},o),{decodedToken:s,scope:e.scope,audience:e.audience||"default"}),o.scope?{oauthTokenScope:o.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(a||s.claims.org_id),Object.assign(Object.assign({},o),{decodedToken:s})}async exchangeToken(e){return this._requestToken({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",subject_token:e.subject_token,subject_token_type:e.subject_token_type,scope:It(e.scope,this.scope),audience:e.audience||this.options.authorizationParams.audience})}_assertDpop(e){if(!e)throw new Error("`useDpop` option must be enabled before using DPoP.")}getDpopNonce(e){return this._assertDpop(this.dpop),this.dpop.getNonce(e)}setDpopNonce(e,t){return this._assertDpop(this.dpop),this.dpop.setNonce(e,t)}generateDpopProof(e){return this._assertDpop(this.dpop),this.dpop.generateProof(e)}createFetcher(e={}){if(this.options.useDpop&&!e.dpopNonceId)throw new TypeError("When `useDpop` is enabled, `dpopNonceId` must be set when calling `createFetcher()`.");return new xm(e,{isDpopEnabled:()=>!!this.options.useDpop,getAccessToken:t=>{var n;return this.getTokenSilently({authorizationParams:{scope:(n=t?.scope)===null||n===void 0?void 0:n.join(" "),audience:t?.audience}})},getDpopNonce:()=>this.getDpopNonce(e.dpopNonceId),setDpopNonce:t=>this.setDpopNonce(t),generateDpopProof:t=>this.generateDpopProof(t)})}};async function $m(r){const e=new Dm(r);return await e.checkSession(),e}var Je=(r=>(r.AUTH_INITIALIZED="sesamyJsAuthInitialized",r.READY="sesamyJsReady",r.AUTHENTICATED="sesamyJsAuthenticated",r.LOGOUT="sesamyJsLogout",r.CLEAR_CACHE="sesamyJsClearCache",r.USER_ATTRIBUTE_CHANGED="sesamyUserAttributeChanged",r.PURCHASE="sesamyJsPurchase",r))(Je||{});const Mm="sesamy.com",Fm="sesamy.dev",Hm="https://sesa.my",Ho="sesamyCacheTimestamp",Ff="sesamyContentReloaded";function Hh(r,e){return`${r}.${e==="dev"?Fm:Mm}`}function vr(r,e){return`https://${Hh(r,e)}`}function on(){return(document.documentElement.getAttribute("lang")??navigator.language??"en").split("-")[0]?.toLocaleLowerCase()}/*!
5
5
  *
6
6
  * detectIncognito v1.6.0
7
7
  *
@@ -31,10 +31,10 @@
31
31
  *
32
32
  * Please keep this comment intact in order to properly abide by the MIT License.
33
33
  *
34
- **/var No={d:(e,r)=>{for(var t in r)No.o(r,t)&&!No.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)},ds={};No.d(ds,{A:()=>gm,k:()=>hs});var It=function(e,r,t,n){return new(t||(t=Promise))(function(a,i){function o(l){try{c(n.next(l))}catch(u){i(u)}}function s(l){try{c(n.throw(l))}catch(u){i(u)}}function c(l){var u;l.done?a(l.value):(u=l.value,u instanceof t?u:new t(function(f){f(u)})).then(o,s)}c((n=n.apply(e,[])).next())})},Pt=function(e,r){var t,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(l){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(t=1,n&&(a=2&u[0]?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!((a=a.length>0&&a[a.length-1])||u[0]!==6&&u[0]!==2)){o=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(u[0]===6&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=r.call(e,o)}catch(f){u=[6,f],n=0}finally{t=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([c,l])}}};function hs(){return It(this,void 0,Promise,function(){return Pt(this,function(e){switch(e.label){case 0:return[4,new Promise(function(r,t){var n="Unknown",a=!1;function i(d){a||(a=!0,r({isPrivate:d,browserName:n}))}function o(){var d=0,v=parseInt("-1");try{v.toFixed(v)}catch(m){d=m.message.length}return d}function s(){return navigator.msSaveBlob!==void 0&&function(d){try{return d===eval.toString().length}catch{return!1}}(39)}function c(){var d;return It(this,void 0,void 0,function(){var v,m;return Pt(this,function(y){switch(y.label){case 0:return y.trys.push([0,2,,3]),[4,navigator.storage.getDirectory()];case 1:return y.sent(),i(!1),[3,3];case 2:return v=y.sent(),m=v,v instanceof Error&&(m=(d=v.message)!==null&&d!==void 0?d:v),typeof m!="string"?(i(!1),[2]):(i(!!m.includes("unknown transient reason")),[3,3]);case 3:return[2]}})})}function l(){var d;return It(this,void 0,Promise,function(){return Pt(this,function(v){switch(v.label){case 0:return((d=navigator.storage)===null||d===void 0?void 0:d.getDirectory)===void 0?[3,2]:[4,c()];case 1:return v.sent(),[3,3];case 2:navigator.maxTouchPoints!==void 0?function(){var m=String(Math.random());try{var y=indexedDB.open(m,1);y.onupgradeneeded=function(E){var b=E.target.result,g=function(p){i(p)};try{b.createObjectStore("t",{autoIncrement:!0}).put(new Blob),g(!1)}catch(p){(p.message||"").includes("are not yet supported")?g(!0):g(!1)}finally{b.close(),indexedDB.deleteDatabase(m)}},y.onerror=function(){return i(!1)}}catch{i(!1)}}():function(){var m=window.openDatabase,y=window.localStorage;try{m(null,null,null,null)}catch{return void i(!0)}try{y.setItem("test","1"),y.removeItem("test")}catch{return void i(!0)}i(!1)}(),v.label=3;case 3:return[2]}})})}function u(){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(d,v){var m;i(Math.round(v/1048576)<2*Math.round(((m=window).performance!==void 0&&m.performance.memory!==void 0&&m.performance.memory.jsHeapSizeLimit!==void 0?performance.memory.jsHeapSizeLimit:1073741824)/1048576))},function(d){t(new Error("detectIncognito somehow failed to query storage quota: "+d.message))})}function f(){self.Promise!==void 0&&self.Promise.allSettled!==void 0?u():(0,window.webkitRequestFileSystem)(0,1,function(){i(!1)},function(){i(!0)})}function h(){return It(this,void 0,Promise,function(){var d,v;return Pt(this,function(m){switch(m.label){case 0:if(!navigator.storage||!navigator.storage.getDirectory)return[3,4];m.label=1;case 1:return m.trys.push([1,3,,4]),[4,navigator.storage.getDirectory()];case 2:return m.sent(),i(!1),[3,4];case 3:return d=m.sent(),typeof(v=d instanceof Error&&typeof d.message=="string"?d.message:String(d))!="string"?(i(!1),[2]):(i(v.includes("Security error")),[2]);case 4:return i(navigator.serviceWorker===void 0),[2]}})})}(function(){return It(this,void 0,Promise,function(){return Pt(this,function(d){switch(d.label){case 0:return o()!==44?[3,2]:(n="Safari",[4,l()]);case 1:return d.sent(),[3,6];case 2:return o()!==51?[3,3]:(v=navigator.userAgent,n=v.match(/Chrome/)?navigator.brave!==void 0?"Brave":v.match(/Edg/)?"Edge":v.match(/OPR/)?"Opera":"Chrome":"Chromium",f(),[3,6]);case 3:return o()!==25?[3,5]:(n="Firefox",[4,h()]);case 4:return d.sent(),[3,6];case 5:s()?(n="Internet Explorer",i(window.indexedDB===void 0)):t(new Error("detectIncognito cannot determine the browser")),d.label=6;case 6:return[2]}var v})})})().catch(t)})];case 1:return[2,e.sent()]}})})}typeof window<"u"&&(window.detectIncognito=hs);const gm=hs;ds.A;const ym=ds.k,Zt="sesamy_incognito_mode";function vs(){try{const e=sessionStorage.getItem(Zt);return e===null?void 0:e==="true"}catch{return}}async function wm(){try{const e=sessionStorage.getItem(Zt);if(e!==null)return e==="true";const{isPrivate:r}=await ym();return sessionStorage.setItem(Zt,r.toString()),r}catch{try{sessionStorage.setItem(Zt,"false")}catch{}return!1}}function Ct(){return typeof window<"u"}function Lf(e,r,t,n,a){for(r=r.split?r.split("."):r,n=0;n<r.length;n++)e=e?e[r[n]]:a;return e===a?t:e}var Ft="undefined",qf="object",$o=function(){},Ch="any",Ah="*",Mr="__",tn=typeof process<"u"?process:{};tn.env&&tn.env.NODE_ENV;var Ne=typeof document<"u";tn.versions!=null&&tn.versions.node!=null;typeof Deno<"u"&&Deno.core;Ne&&window.name==="nodejs"||typeof navigator<"u"&&navigator.userAgent!==void 0&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));function jh(e,r){return r.charAt(0)[e]()+r.slice(1)}var bm=jh.bind(null,"toUpperCase"),Sm=jh.bind(null,"toLowerCase");function Im(e){return Uh(e)?bm("null"):typeof e=="object"?_m(e):Object.prototype.toString.call(e).slice(8,-1)}function nn(e,r){r===void 0&&(r=!0);var t=Im(e);return r?Sm(t):t}function Mt(e,r){return typeof r===e}var We=Mt.bind(null,"function"),kr=Mt.bind(null,"string"),et=Mt.bind(null,"undefined"),Pm=Mt.bind(null,"boolean");Mt.bind(null,"symbol");function Uh(e){return e===null}function Em(e){return nn(e)==="number"&&!isNaN(e)}function Lh(e){return nn(e)==="array"}function Ke(e){if(!Rm(e))return!1;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}function Rm(e){return e&&(typeof e=="object"||e!==null)}function _m(e){return We(e.constructor)?e.constructor.name:null}function Tm(e){return e instanceof Error||kr(e.message)&&e.constructor&&Em(e.constructor.stackTraceLimit)}function qh(e,r){if(typeof r!="object"||Uh(r))return!1;if(r instanceof e)return!0;var t=nn(new e(""));if(Tm(r))for(;r;){if(nn(r)===t)return!0;r=Object.getPrototypeOf(r)}return!1}qh.bind(null,TypeError);qh.bind(null,SyntaxError);function Pn(e,r){var t=e instanceof Element||e instanceof HTMLDocument;return t&&r?Om(e,r):t}function Om(e,r){return r===void 0&&(r=""),e&&e.nodeName===r.toUpperCase()}function En(e){var r=[].slice.call(arguments,1);return function(){return e.apply(void 0,[].slice.call(arguments).concat(r))}}En(Pn,"form");En(Pn,"button");En(Pn,"input");En(Pn,"select");function km(e){return e?Lh(e)?e:[e]:[]}function xf(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function Cm(){if(Ne){var e=navigator,r=e.languages;return e.userLanguage||(r&&r.length?r[0]:e.language)}}function Am(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function jm(e){return function(r){for(var t,n=Object.create(null),a=/([^&=]+)=?([^&]*)/g;t=a.exec(r);){var i=xf(t[1]),o=xf(t[2]);if(i)if(i.substring(i.length-2)==="[]"){var s=n[i=i.substring(0,i.length-2)]||(n[i]=[]);n[i]=Array.isArray(s)?s:[],n[i].push(o)}else n[i]=o===""||o}for(var c in n){var l=c.split("[");l.length>1&&(Um(n,l.map(function(u){return u.replace(/[?[\]\\ ]/g,"")}),n[c]),delete n[c])}return n}(function(r){return Ne&&window.location.search.substring(1)}())}function Um(e,r,t){for(var n=r.length-1,a=0;a<n;++a){var i=r[a];if(i==="__proto__"||i==="constructor")break;i in e||(e[i]={}),e=e[i]}e[r[n]]=t}function Rn(){for(var e="",r=0,t=4294967295*Math.random()|0;r++<36;){var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[r-1],a=15&t;e+=n=="-"||n=="4"?n:(n=="x"?a:3&a|8).toString(16),t=r%8==0?4294967295*Math.random()|0:t>>4}return e}function Lm(e,r){var t,n,a,i=null,o=0,s=function(){o=new Date,i=null,a=e.apply(t,n)};return function(){var c=new Date;o||(o=c);var l=r-(c-o);return t=this,n=arguments,l<=0?(clearTimeout(i),i=null,o=c,a=e.apply(t,n)):i||(i=setTimeout(s,l)),a}}var _t="global",ot=Mr+"global"+Mr,st=typeof self===qf&&self.self===self&&self||typeof global===qf&&global.global===global&&global||void 0;function Fr(e){return st[ot][e]}function Br(e,r){return st[ot][e]=r}function mt(e){delete st[ot][e]}function gt(e,r,t){var n;try{if(ps(e)){var a=window[e];n=a[r].bind(a)}}catch{}return n||t}st[ot]||(st[ot]={});var Bt={};function ps(e){if(typeof Bt[e]!==Ft)return Bt[e];try{var r=window[e];r.setItem(Ft,Ft),r.removeItem(Ft)}catch{return Bt[e]=!1}return Bt[e]=!0}function ae(){return ae=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},ae.apply(this,arguments)}var Tr="function",Sr="undefined",qm="@@redux/"+Math.random().toString(36),Nf=function(){return typeof Symbol===Tr&&Symbol.observable||"@@observable"}(),zt=" != "+Tr;function xh(e,r,t){var n;if(typeof r===Tr&&typeof t===Sr&&(t=r,r=void 0),typeof t!==Sr){if(typeof t!==Tr)throw new Error("enhancer"+zt);return t(xh)(e,r)}if(typeof e!==Tr)throw new Error("reducer"+zt);var a=e,i=r,o=[],s=o,c=!1;function l(){s===o&&(s=o.slice())}function u(){return i}function f(d){if(typeof d!==Tr)throw new Error("Listener"+zt);var v=!0;return l(),s.push(d),function(){if(v){v=!1,l();var m=s.indexOf(d);s.splice(m,1)}}}function h(d){if(!Ke(d))throw new Error("Act != obj");if(typeof d.type===Sr)throw new Error("ActType "+Sr);if(c)throw new Error("Dispatch in reducer");try{c=!0,i=a(i,d)}finally{c=!1}for(var v=o=s,m=0;m<v.length;m++)(0,v[m])();return d}return h({type:"@@redux/INIT"}),(n={dispatch:h,subscribe:f,getState:u,replaceReducer:function(d){if(typeof d!==Tr)throw new Error("next reducer"+zt);a=d,h({type:"@@redux/INIT"})}})[Nf]=function(){var d,v=f;return(d={subscribe:function(m){if(typeof m!="object")throw new TypeError("Observer != obj");function y(){m.next&&m.next(u())}return y(),{unsubscribe:v(y)}}})[Nf]=function(){return this},d},n}function xm(e,r){var t=r&&r.type;return"action "+(t&&t.toString()||"?")+"reducer "+e+" returns "+Sr}function ut(){var e=[].slice.call(arguments);return e.length===0?function(r){return r}:e.length===1?e[0]:e.reduce(function(r,t){return function(){return r(t.apply(void 0,[].slice.call(arguments)))}})}function Nm(){var e=arguments;return function(r){return function(t,n,a){var i,o=r(t,n,a),s=o.dispatch,c={getState:o.getState,dispatch:function(l){return s(l)}};return i=[].slice.call(e).map(function(l){return l(c)}),ae({},o,{dispatch:s=ut.apply(void 0,i)(o.dispatch)})}}}var Cr=Mr+"anon_id",Nr=Mr+"user_id",tt=Mr+"user_traits",_r="userId",rt="anonymousId",Yt=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],Do=["name","EVENTS","config","loaded"],ne=Yt.reduce(function(e,r){return e[r]=r,e},{registerPluginType:function(e){return"registerPlugin:"+e},pluginReadyType:function(e){return"ready:"+e}}),$f=/^utm_/,Df=/^an_prop_/,Mf=/^an_trait_/;function $m(e){var r=e.storage.setItem;return function(t){return function(n){return function(a){if(a.type===ne.bootstrap){var i=a.params,o=a.user,s=a.persistedUser,c=a.initialUser,l=s.userId===o.userId;s.anonymousId!==o.anonymousId&&r(Cr,o.anonymousId),l||r(Nr,o.userId),c.traits&&r(tt,ae({},l&&s.traits?s.traits:{},c.traits));var u=Object.keys(a.params);if(u.length){var f=i.an_uid,h=i.an_event,d=u.reduce(function(v,m){if(m.match($f)||m.match(/^(d|g)clid/)){var y=m.replace($f,"");v.campaign[y==="campaign"?"name":y]=i[m]}return m.match(Df)&&(v.props[m.replace(Df,"")]=i[m]),m.match(Mf)&&(v.traits[m.replace(Mf,"")]=i[m]),v},{campaign:{},props:{},traits:{}});t.dispatch(ae({type:ne.params,raw:i},d,f?{userId:f}:{})),f&&setTimeout(function(){return e.identify(f,d.traits)},0),h&&setTimeout(function(){return e.track(h,d.props)},0),Object.keys(d.campaign).length&&t.dispatch({type:ne.campaign,campaign:d.campaign})}}return n(a)}}}}function Dm(e){return function(r,t){if(r===void 0&&(r={}),t===void 0&&(t={}),t.type===ne.setItemEnd){if(t.key===Cr)return ae({},r,{anonymousId:t.value});if(t.key===Nr)return ae({},r,{userId:t.value})}switch(t.type){case ne.identify:return Object.assign({},r,{userId:t.userId,traits:ae({},r.traits,t.traits)});case ne.reset:return[Nr,Cr,tt].forEach(function(n){e.removeItem(n)}),Object.assign({},r,{userId:null,anonymousId:null,traits:{}});default:return r}}}function Ff(e){return{userId:e.getItem(Nr),anonymousId:e.getItem(Cr),traits:e.getItem(tt)}}var Mo=function(e){return Mr+"TEMP"+Mr+e};function Mm(e){var r=e.storage,t=r.setItem,n=r.removeItem,a=r.getItem;return function(i){return function(o){return function(s){var c=s.userId,l=s.traits,u=s.options;if(s.type===ne.reset&&([Nr,tt,Cr].forEach(function(d){n(d)}),[_r,rt,"traits"].forEach(function(d){mt(Mo(d))})),s.type===ne.identify){a(Cr)||t(Cr,Rn());var f=a(Nr),h=a(tt)||{};f&&f!==c&&i.dispatch({type:ne.userIdChanged,old:{userId:f,traits:h},new:{userId:c,traits:l},options:u}),c&&t(Nr,c),l&&t(tt,ae({},h,l))}return o(s)}}}}var Rt={};function Bf(e,r){Rt[e]&&We(Rt[e])&&(Rt[e](r),delete Rt[e])}function Nh(e,r,t){return new Promise(function(n,a){return r()?n(e):t<1?a(ae({},e,{queue:!0})):new Promise(function(i){return setTimeout(i,10)}).then(function(i){return Nh(e,r,t-10).then(n,a)})})}function Fm(e){return{abort:e}}function $h(e,r,t){var n={},a=r(),i=e.getState(),o=i.plugins,s=i.queue,c=i.user;if(!i.context.offline&&s&&s.actions&&s.actions.length){var l=s.actions.reduce(function(f,h,d){return o[h.plugin].loaded?(f.process.push(h),f.processIndex.push(d)):(f.requeue.push(h),f.requeueIndex.push(d)),f},{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(l.processIndex&&l.processIndex.length){l.processIndex.forEach(function(f){var h=s.actions[f],d=h.plugin,v=h.payload.type,m=a[d][v];if(m&&We(m)){var y,E=function(p,w){return p===void 0&&(p={}),w===void 0&&(w={}),[_r,rt].reduce(function(k,q){return p.hasOwnProperty(q)&&w[q]&&w[q]!==p[q]&&(k[q]=w[q]),k},p)}(h.payload,c),b=n[E.meta.rid];if(!b&&(y=m({payload:E,config:o[d].config,instance:t,abort:Fm}))&&Ke(y)&&y.abort)return void(n[E.meta.rid]=!0);if(!b){var g=v+":"+d;e.dispatch(ae({},E,{type:g,_:{called:g,from:"queueDrain"}}))}}});var u=s.actions.filter(function(f,h){return!~l.processIndex.indexOf(h)});s.actions=u}}}var Ro=function(e){var r=e.data,t=e.action,n=e.instance,a=e.state,i=e.allPlugins,o=e.allMatches,s=e.store,c=e.EVENTS;try{var l=a.plugins,u=a.context,f=t.type,h=f.match(nt),d=r.exact.map(function(y){return y.pluginName});h&&(d=o.during.map(function(y){return y.pluginName}));var v=function(y,E){return function(b,g,p){var w=g.config,k=g.name,q=k+"."+b.type;p&&(q=p.event);var C=b.type.match(nt)?function(B,z,re,L,D){return function(x,O){var Y=L?L.name:B,te=O&&At(O)?O:re;if(L&&(!(te=O&&At(O)?O:[B]).includes(B)||te.length!==1))throw new Error("Method "+z+" can only abort "+B+" plugin. "+JSON.stringify(te)+" input valid");return ae({},D,{abort:{reason:x,plugins:te,caller:z,_:Y}})}}(k,q,E,p,b):function(B,z){return function(){throw new Error(B.type+" action not cancellable. Remove abort in "+z)}}(b,q);return{payload:Bm(b),instance:y,config:w||{},abort:C}}}(n,d),m=r.exact.reduce(function(y,E){var b=E.pluginName,g=E.methodName,p=!1;return g.match(/^initialize/)||g.match(/^reset/)||(p=!l[b].loaded),u.offline&&g.match(/^(page|track|identify)/)&&(p=!0),y[""+b]=p,y},{});return Promise.resolve(r.exact.reduce(function(y,E,b){try{var g=E.pluginName;return Promise.resolve(y).then(function(p){function w(){return Promise.resolve(p)}var k=function(){if(r.namespaced&&r.namespaced[g])return Promise.resolve(r.namespaced[g].reduce(function(q,C,B){try{return Promise.resolve(q).then(function(z){return C.method&&We(C.method)?(function(x,O){var Y=Jf(x);if(Y&&Y.name===O){var te=Jf(Y.method);throw new Error([O+" plugin is calling method "+x,"Plugins cant call self","Use "+Y.method+" "+(te?"or "+te.method:"")+" in "+O+" plugin insteadof "+x].join(`
35
- `))}}(C.methodName,C.pluginName),Promise.resolve(C.method({payload:z,instance:n,abort:(re=z,L=g,D=C.pluginName,function(x,O){return ae({},re,{abort:{reason:x,plugins:O||[L],caller:f,from:D||L}})}),config:Gf(C.pluginName,l,i),plugins:l})).then(function(x){var O=Ke(x)?x:{};return Promise.resolve(ae({},z,O))})):z;var re,L,D})}catch(z){return Promise.reject(z)}},Promise.resolve(t))).then(function(q){p[g]=q});p[g]=t}();return k&&k.then?k.then(w):w()})}catch(p){return Promise.reject(p)}},Promise.resolve({}))).then(function(y){return Promise.resolve(r.exact.reduce(function(E,b,g){try{var p=r.exact.length===g+1,w=b.pluginName,k=i[w];return Promise.resolve(E).then(function(q){var C=y[w]?y[w]:{};if(h&&(C=q),To(C,w))return _o({data:C,method:f,instance:n,pluginName:w,store:s}),Promise.resolve(q);if(To(q,w))return p&&_o({data:q,method:f,instance:n,store:s}),Promise.resolve(q);if(m.hasOwnProperty(w)&&m[w]===!0)return s.dispatch({type:"queue",plugin:w,payload:C,_:{called:"queue",from:"queueMechanism"}}),Promise.resolve(q);var B=v(y[w],i[w]);return Promise.resolve(k[f]({abort:B.abort,payload:C,instance:n,config:Gf(w,l,i),plugins:l})).then(function(z){var re=Ke(z)?z:{},L=ae({},q,re),D=y[w];if(To(D,w))_o({data:D,method:f,instance:n,pluginName:w,store:s});else{var x=f+":"+w;(x.match(/:/g)||[]).length<2&&!f.match(zf)&&!f.match(Hf)&&n.dispatch(ae({},h?L:C,{type:x,_:{called:x,from:"submethod"}}))}return Promise.resolve(L)})})}catch(q){return Promise.reject(q)}},Promise.resolve(t))).then(function(E){if(!(f.match(nt)||f.match(/^registerPlugin/)||f.match(Hf)||f.match(zf)||f.match(/^params/)||f.match(/^userIdChanged/))){if(c.plugins.includes(f),E._&&E._.originalAction===f)return E;var b=ae({},E,{_:{originalAction:E.type,called:E.type,from:"engineEnd"}});Dh(E,r.exact.length)&&!f.match(/End$/)&&(b=ae({},b,{type:E.type+"Aborted"})),s.dispatch(b)}return E})})}catch(y){return Promise.reject(y)}},nt=/Start$/,zf=/^bootstrap/,Hf=/^ready/;function _o(e){var r=e.pluginName,t=e.method+"Aborted"+(r?":"+r:"");e.store.dispatch(ae({},e.data,{type:t,_:{called:t,from:"abort"}}))}function Gf(e,r,t){var n=r[e]||t[e];return n&&n.config?n.config:{}}function Kf(e,r){return r.reduce(function(t,n){return n[e]?t.concat({methodName:e,pluginName:n.name,method:n[e]}):t},[])}function Wf(e,r){var t=e.replace(nt,""),n=r?":"+r:"";return[""+e+n,""+t+n,t+"End"+n]}function To(e,r){var t=e.abort;return!!t&&(t===!0||Vf(t,r)||t&&Vf(t.plugins,r))}function Dh(e,r){var t=e.abort;if(!t)return!1;if(t===!0||kr(t))return!0;var n=t.plugins;return At(t)&&t.length===r||At(n)&&n.length===r}function At(e){return Array.isArray(e)}function Vf(e,r){return!(!e||!At(e))&&e.includes(r)}function Jf(e){var r=e.match(/(.*):(.*)/);return!!r&&{method:r[1],name:r[2]}}function Bm(e){return Object.keys(e).reduce(function(r,t){return t==="type"||(r[t]=Ke(e[t])?Object.assign({},e[t]):e[t]),r},{})}function zm(e,r,t){var n={};return function(a){return function(i){return function(o){try{var s,c=function(p){return s?p:i(f)},l=o.type,u=o.plugins,f=o;if(o.abort)return Promise.resolve(i(o));if(l===ne.enablePlugin&&a.dispatch({type:ne.initializeStart,plugins:u,disabled:[],fromEnable:!0,meta:o.meta}),l===ne.disablePlugin&&setTimeout(function(){return Bf(o.meta.rid,{payload:o})},0),l===ne.initializeEnd){var h=r(),d=Object.keys(h),v=d.filter(function(p){return u.includes(p)}).map(function(p){return h[p]}),m=[],y=[],E=o.disabled,b=v.map(function(p){var w=p.loaded,k=p.name,q=p.config;return Nh(p,function(){return w({config:q})},1e4).then(function(C){return n[k]||(a.dispatch({type:ne.pluginReadyType(k),name:k,events:Object.keys(p).filter(function(B){return!Do.includes(B)})}),n[k]=!0),m=m.concat(k),p}).catch(function(C){if(C instanceof Error)throw new Error(C);return y=y.concat(C.name),C})});Promise.all(b).then(function(p){var w={plugins:m,failed:y,disabled:E};setTimeout(function(){d.length===b.length+E.length&&a.dispatch(ae({},{type:ne.ready},w))},0)})}var g=function(){if(l!==ne.bootstrap)return/^ready:([^:]*)$/.test(l)&&setTimeout(function(){return $h(a,r,e)},0),Promise.resolve(function(p,w,k,q,C){try{var B=We(w)?w():w,z=p.type,re=z.replace(nt,"");if(p._&&p._.called)return Promise.resolve(p);var L=k.getState(),D=(Y=B,(te=L.plugins)===void 0&&(te={}),(Q=p.options)===void 0&&(Q={}),Object.keys(Y).filter(function(S){var _=Q.plugins||{};return Pm(_[S])?_[S]:_.all!==!1&&(!te[S]||te[S].enabled!==!1)}).map(function(S){return Y[S]}));z===ne.initializeStart&&p.fromEnable&&(D=Object.keys(L.plugins).filter(function(S){var _=L.plugins[S];return p.plugins.includes(S)&&!_.initialized}).map(function(S){return B[S]}));var x=D.map(function(S){return S.name}),O=function(S,_,N){var H=Wf(S).map(function(G){return Kf(G,_)});return _.reduce(function(G,Z){var fe=Z.name,ie=Wf(S,fe).map(function(Te){return Kf(Te,_)}),ce=ie[0],oe=ie[1],Re=ie[2];return ce.length&&(G.beforeNS[fe]=ce),oe.length&&(G.duringNS[fe]=oe),Re.length&&(G.afterNS[fe]=Re),G},{before:H[0],beforeNS:{},during:H[1],duringNS:{},after:H[2],afterNS:{}})}(z,D);return Promise.resolve(Ro({action:p,data:{exact:O.before,namespaced:O.beforeNS},state:L,allPlugins:B,allMatches:O,instance:k,store:q,EVENTS:C})).then(function(S){function _(){var G=function(){if(z.match(nt))return Promise.resolve(Ro({action:ae({},N,{type:re+"End"}),data:{exact:O.after,namespaced:O.afterNS},state:L,allPlugins:B,allMatches:O,instance:k,store:q,EVENTS:C})).then(function(Z){Z.meta&&Z.meta.hasCallback&&Bf(Z.meta.rid,{payload:Z})})}();return G&&G.then?G.then(function(){return S}):S}if(Dh(S,x.length))return S;var N,H=function(){if(z!==re)return Promise.resolve(Ro({action:ae({},S,{type:re}),data:{exact:O.during,namespaced:O.duringNS},state:L,allPlugins:B,allMatches:O,instance:k,store:q,EVENTS:C})).then(function(G){N=G});N=S}();return H&&H.then?H.then(_):_()})}catch(S){return Promise.reject(S)}var Y,te,Q}(o,r,e,a,t)).then(function(p){return s=1,i(p)})}();return Promise.resolve(g&&g.then?g.then(c):c(g))}catch(p){return Promise.reject(p)}}}}}function Hm(e){return function(r){return function(t){return function(n){var a=n.type,i=n.key,o=n.value,s=n.options;if(a===ne.setItem||a===ne.removeItem){if(n.abort)return t(n);a===ne.setItem?e.setItem(i,o,s):e.removeItem(i,s)}return t(n)}}}}var Gm=function(){var e=this;this.before=[],this.after=[],this.addMiddleware=function(r,t){e[t]=e[t].concat(r)},this.removeMiddleware=function(r,t){var n=e[t].findIndex(function(a){return a===r});n!==-1&&(e[t]=[].concat(e[t].slice(0,n),e[t].slice(n+1)))},this.dynamicMiddlewares=function(r){return function(t){return function(n){return function(a){var i={getState:t.getState,dispatch:function(s){return t.dispatch(s)}},o=e[r].map(function(s){return s(i)});return ut.apply(void 0,o)(n)(a)}}}}};function Km(e){return function(r,t){r===void 0&&(r={});var n={};if(t.type==="initialize:aborted")return r;if(/^registerPlugin:([^:]*)$/.test(t.type)){var a=Zf(t.type,"registerPlugin"),i=e()[a];if(!i||!a)return r;var o=t.enabled,s=i.config;return n[a]={enabled:o,initialized:!!o&&!i.initialize,loaded:!!o&&!!i.loaded({config:s}),config:s},ae({},r,n)}if(/^initialize:([^:]*)$/.test(t.type)){var c=Zf(t.type,ne.initialize),l=e()[c];return l&&c?(n[c]=ae({},r[c],{initialized:!0,loaded:!!l.loaded({config:l.config})}),ae({},r,n)):r}if(/^ready:([^:]*)$/.test(t.type))return n[t.name]=ae({},r[t.name],{loaded:!0}),ae({},r,n);switch(t.type){case ne.disablePlugin:return ae({},r,Yf(t.plugins,!1,r));case ne.enablePlugin:return ae({},r,Yf(t.plugins,!0,r));default:return r}}}function Zf(e,r){return e.substring(r.length+1,e.length)}function Yf(e,r,t){return e.reduce(function(n,a){return n[a]=ae({},t[a],{enabled:r}),n},t)}function Mh(e){try{return JSON.parse(JSON.stringify(e))}catch{}return e}var Wm={last:{},history:[]};function Vm(e,r){e===void 0&&(e=Wm);var t=r.options,n=r.meta;if(r.type===ne.track){var a=Mh(ae({event:r.event,properties:r.properties},Object.keys(t).length&&{options:t},{meta:n}));return ae({},e,{last:a,history:e.history.concat(a)})}return e}var Jm={actions:[]};function Zm(e,r){e===void 0&&(e=Jm);var t=r.payload;switch(r.type){case"queue":var n;return n=t&&t.type&&t.type===ne.identify?[r].concat(e.actions):e.actions.concat(r),ae({},e,{actions:n});case"dequeue":return[];default:return e}}var Fh=/#.*$/;function Ym(e){var r=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(e);return"/"+(r&&r[3]?r[3].split("?")[0].replace(Fh,""):"")}var Bh,zh,Hh,Gh,Xm=function(e){if(e===void 0&&(e={}),!Ne)return e;var r=document,t=r.title,n=r.referrer,a=window,i=a.location,o=a.innerWidth,s=a.innerHeight,c=i.hash,l=i.search,u=function(h){var d=function(){if(Ne){for(var v,m=document.getElementsByTagName("link"),y=0;v=m[y];y++)if(v.getAttribute("rel")==="canonical")return v.getAttribute("href")}}();return d?d.match(/\?/)?d:d+h:window.location.href.replace(Fh,"")}(l),f={title:t,url:u,path:Ym(u),hash:c,search:l,width:o,height:s};return n&&n!==""&&(f.referrer=n),ae({},f,e)},Qm={last:{},history:[]};function eg(e,r){e===void 0&&(e=Qm);var t=r.options;if(r.type===ne.page){var n=Mh(ae({properties:r.properties,meta:r.meta},Object.keys(t).length&&{options:t}));return ae({},e,{last:n,history:e.history.concat(n)})}return e}Bh=function(){if(!Ne)return!1;var e=navigator.appVersion;return~e.indexOf("Win")?"Windows":~e.indexOf("Mac")?"MacOS":~e.indexOf("X11")?"UNIX":~e.indexOf("Linux")?"Linux":"Unknown OS"}(),zh=Ne?document.referrer:null,Hh=Cm(),Gh=Am();var Xf={initialized:!1,sessionId:Rn(),app:null,version:null,debug:!1,offline:!!Ne&&!navigator.onLine,os:{name:Bh},userAgent:Ne?navigator.userAgent:"node",library:{name:"analytics",version:"0.12.16"},timezone:Gh,locale:Hh,campaign:{},referrer:zh};function rg(e,r){e===void 0&&(e=Xf);var t=e.initialized,n=r.campaign;switch(r.type){case ne.campaign:return ae({},e,{campaign:n});case ne.offline:return ae({},e,{offline:!0});case ne.online:return ae({},e,{offline:!1});default:return t?e:ae({},Xf,e,{initialized:!0})}}var tg=["plugins","reducers","storage"];function ng(e,r,t){if(Ne){var n=window[(t?"add":"remove")+"EventListener"];e.split(" ").forEach(function(a){n(a,r)})}}function ag(e){var r=ng.bind(null,"online offline",function(t){return Promise.resolve(!navigator.onLine).then(e)});return r(!0),function(t){return r(!1)}}function Kh(){return Br("analytics",[]),function(e){return function(r,t,n){var a=e(r,t,n),i=a.dispatch;return Object.assign(a,{dispatch:function(o){return st[ot].analytics.push(o.action||o),i(o)}})}}}function Qf(e){return function(){return ut(ut.apply(null,arguments),Kh())}}function Oo(e){return e?Lh(e)?e:[e]:[]}function ed(e,r,t){e===void 0&&(e={});var n,a,i=Rn();return r&&(Rt[i]=(n=r,a=function(o){for(var s,c=o||Array.prototype.slice.call(arguments),l=0;l<c.length;l++)if(We(c[l])){s=c[l];break}return s}(t),function(o){a&&a(o),n(o)})),ae({},e,{rid:i,ts:new Date().getTime()},r?{hasCallback:!0}:{})}function ig(e){e===void 0&&(e={});var r=e.reducers||{},t=e.initialUser||{},n=(e.plugins||[]).reduce(function(S,_){if(We(_))return S.middlewares=S.middlewares.concat(_),S;if(_.NAMESPACE&&(_.name=_.NAMESPACE),!_.name)throw new Error("https://lytics.dev/errors/1");_.config||(_.config={});var N=_.EVENTS?Object.keys(_.EVENTS).map(function(Z){return _.EVENTS[Z]}):[];S.pluginEnabled[_.name]=!(_.enabled===!1||_.config.enabled===!1),delete _.enabled,_.methods&&(S.methods[_.name]=Object.keys(_.methods).reduce(function(Z,fe){var ie;return Z[fe]=(ie=_.methods[fe],function(){for(var ce=Array.prototype.slice.call(arguments),oe=new Array(ie.length),Re=0;Re<ce.length;Re++)oe[Re]=ce[Re];return oe[oe.length]=w,ie.apply({instance:w},oe)}),Z},{}),delete _.methods);var H=Object.keys(_).concat(N),G=new Set(S.events.concat(H));if(S.events=Array.from(G),S.pluginsArray=S.pluginsArray.concat(_),S.plugins[_.name])throw new Error(_.name+"AlreadyLoaded");return S.plugins[_.name]=_,S.plugins[_.name].loaded||(S.plugins[_.name].loaded=function(){return!0}),S},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),a=e.storage?e.storage:{getItem:Fr,setItem:Br,removeItem:mt},i=function(S){return function(_,N,H){return N.getState("user")[_]||(H&&Ke(H)&&H[_]?H[_]:Ff(S)[_]||Fr(Mo(_))||null)}}(a),o=n.plugins,s=n.events.filter(function(S){return!Do.includes(S)}).sort(),c=new Set(s.concat(Yt).filter(function(S){return!Do.includes(S)})),l=Array.from(c).sort(),u=function(){return o},f=new Gm,h=f.addMiddleware,d=f.removeMiddleware,v=f.dynamicMiddlewares,m=function(){throw new Error("Abort disabled inListener")},y=jm(),E=Ff(a),b=ae({},E,t,y.an_uid?{userId:y.an_uid}:{},y.an_aid?{anonymousId:y.an_aid}:{});b.anonymousId||(b.anonymousId=Rn());var g=ae({enable:function(S,_){return new Promise(function(N){O.dispatch({type:ne.enablePlugin,plugins:Oo(S),_:{originalAction:ne.enablePlugin}},N,[_])})},disable:function(S,_){return new Promise(function(N){O.dispatch({type:ne.disablePlugin,plugins:Oo(S),_:{originalAction:ne.disablePlugin}},N,[_])})}},n.methods),p=!1,w={identify:function(S,_,N,H){try{var G=kr(S)?S:null,Z=Ke(S)?S:_,fe=N||{},ie=w.user();Br(Mo(_r),G);var ce=G||Z.userId||i(_r,w,Z);return Promise.resolve(new Promise(function(oe){O.dispatch(ae({type:ne.identifyStart,userId:ce,traits:Z||{},options:fe,anonymousId:ie.anonymousId},ie.id&&ie.id!==G&&{previousId:ie.id}),oe,[_,N,H])}))}catch(oe){return Promise.reject(oe)}},track:function(S,_,N,H){try{var G=Ke(S)?S.event:S;if(!G||!kr(G))throw new Error("EventMissing");var Z=Ke(S)?S:_||{},fe=Ke(N)?N:{};return Promise.resolve(new Promise(function(ie){O.dispatch({type:ne.trackStart,event:G,properties:Z,options:fe,userId:i(_r,w,_),anonymousId:i(rt,w,_)},ie,[_,N,H])}))}catch(ie){return Promise.reject(ie)}},page:function(S,_,N){try{var H=Ke(S)?S:{},G=Ke(_)?_:{};return Promise.resolve(new Promise(function(Z){O.dispatch({type:ne.pageStart,properties:Xm(H),options:G,userId:i(_r,w,H),anonymousId:i(rt,w,H)},Z,[S,_,N])}))}catch(Z){return Promise.reject(Z)}},user:function(S){if(S===_r||S==="id")return i(_r,w);if(S===rt||S==="anonId")return i(rt,w);var _=w.getState("user");return S?Lf(_,S):_},reset:function(S){return new Promise(function(_){O.dispatch({type:ne.resetStart},_,S)})},ready:function(S){return p&&S({plugins:g,instance:w}),w.on(ne.ready,function(_){S(_),p=!0})},on:function(S,_){if(!S||!We(_))return!1;if(S===ne.bootstrap)throw new Error(".on disabled for "+S);var N=/Start$|Start:/;if(S==="*"){var H=function(ie){return function(ce){return function(oe){return oe.type.match(N)&&_({payload:oe,instance:w,plugins:o}),ce(oe)}}},G=function(ie){return function(ce){return function(oe){return oe.type.match(N)||_({payload:oe,instance:w,plugins:o}),ce(oe)}}};return h(H,Ht),h(G,Gt),function(){d(H,Ht),d(G,Gt)}}var Z=S.match(N)?Ht:Gt,fe=function(ie){return function(ce){return function(oe){return oe.type===S&&_({payload:oe,instance:w,plugins:o,abort:m}),ce(oe)}}};return h(fe,Z),function(){return d(fe,Z)}},once:function(S,_){if(!S||!We(_))return!1;if(S===ne.bootstrap)throw new Error(".once disabled for "+S);var N=w.on(S,function(H){_({payload:H.payload,instance:w,plugins:o,abort:m}),N()});return N},getState:function(S){var _=O.getState();return S?Lf(_,S):Object.assign({},_)},dispatch:function(S){var _=kr(S)?{type:S}:S;if(Yt.includes(_.type))throw new Error("reserved action "+_.type);var N=ae({},_,{_:ae({originalAction:_.type},S._||{})});O.dispatch(N)},enablePlugin:g.enable,disablePlugin:g.disable,plugins:g,storage:{getItem:a.getItem,setItem:function(S,_,N){O.dispatch({type:ne.setItemStart,key:S,value:_,options:N})},removeItem:function(S,_){O.dispatch({type:ne.removeItemStart,key:S,options:_})}},setAnonymousId:function(S,_){w.storage.setItem(Cr,S,_)},events:{core:Yt,plugins:s}},k=n.middlewares.concat([function(S){return function(_){return function(N){return N.meta||(N.meta=ed()),_(N)}}},v(Ht),zm(w,u,{all:l,plugins:s}),Hm(a),$m(w),Mm(w),v(Gt)]),q={context:rg,user:Dm(a),page:eg,track:Vm,plugins:Km(u),queue:Zm},C=ut,B=ut;if(Ne&&e.debug){var z=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;z&&(C=z({trace:!0,traceLimit:25})),B=function(){return arguments.length===0?Kh():Ke(typeof arguments[0])?Qf():Qf().apply(null,arguments)}}var re,L=function(S){return Object.keys(S).reduce(function(_,N){return tg.includes(N)||(_[N]=S[N]),_},{})}(e),D=n.pluginsArray.reduce(function(S,_){var N=_.name,H=_.config,G=_.loaded,Z=n.pluginEnabled[N];return S[N]={enabled:Z,initialized:!!Z&&!_.initialize,loaded:!!G({config:H}),config:H},S},{}),x={context:L,user:b,plugins:D},O=xh(function(S){for(var _=Object.keys(S),N={},H=0;H<_.length;H++){var G=_[H];typeof S[G]===Tr&&(N[G]=S[G])}var Z,fe=Object.keys(N);try{(function(ie){Object.keys(ie).forEach(function(ce){var oe=ie[ce];if(typeof oe(void 0,{type:"@@redux/INIT"})===Sr||typeof oe(void 0,{type:qm})===Sr)throw new Error("reducer "+ce+" "+Sr)})})(N)}catch(ie){Z=ie}return function(ie,ce){if(ie===void 0&&(ie={}),Z)throw Z;for(var oe=!1,Re={},Te=0;Te<fe.length;Te++){var Fe=fe[Te],Ce=ie[Fe],Je=(0,N[Fe])(Ce,ce);if(typeof Je===Sr){var lr=xm(Fe,ce);throw new Error(lr)}Re[Fe]=Je,oe=oe||Je!==Ce}return oe?Re:ie}}(ae({},q,r)),x,B(C(Nm.apply(void 0,k))));O.dispatch=(re=O.dispatch,function(S,_,N){var H=ae({},S,{meta:ed(S.meta,_,Oo(N))});return re.apply(null,[H])});var Y=Object.keys(o);O.dispatch({type:ne.bootstrap,plugins:Y,config:L,params:y,user:b,initialUser:t,persistedUser:E});var te=Y.filter(function(S){return n.pluginEnabled[S]}),Q=Y.filter(function(S){return!n.pluginEnabled[S]});return O.dispatch({type:ne.registerPlugins,plugins:Y,enabled:n.pluginEnabled}),n.pluginsArray.map(function(S,_){var N=S.bootstrap,H=S.config,G=S.name;N&&We(N)&&N({instance:w,config:H,payload:S}),O.dispatch({type:ne.registerPluginType(G),name:G,enabled:n.pluginEnabled[G],plugin:S}),n.pluginsArray.length===_+1&&O.dispatch({type:ne.initializeStart,plugins:te,disabled:Q})}),ag(function(S){O.dispatch({type:S?ne.offline:ne.online})}),function(S,_,N){setInterval(function(){return $h(S,_,N)},3e3)}(O,u,w),w}var Ht="before",Gt="after",Tt="cookie",Lr=Jh(),Wh=_n,og=_n;function Vh(e){return Lr?_n(e,"",-1):mt(e)}function Jh(){if(Lr!==void 0)return Lr;var e="cookiecookie";try{_n(e,e),Lr=document.cookie.indexOf(e)!==-1,Vh(e)}catch{Lr=!1}return Lr}function _n(e,r,t,n,a,i){if(typeof window<"u"){var o=arguments.length>1;return Lr===!1&&(o?Br(e,r):Fr(e)),o?document.cookie=e+"="+encodeURIComponent(r)+(t?"; expires="+new Date(+new Date+1e3*t).toUTCString()+(n?"; path="+n:"")+(a?"; domain="+a:"")+(i?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}}var Ot="localStorage",sg=ps.bind(null,"localStorage");gt("localStorage","getItem",Fr);gt("localStorage","setItem",Br);gt("localStorage","removeItem",mt);var kt="sessionStorage",ug=ps.bind(null,"sessionStorage");gt("sessionStorage","getItem",Fr);gt("sessionStorage","setItem",Br);gt("sessionStorage","removeItem",mt);function at(e){var r=e;try{if((r=JSON.parse(e))==="true")return!0;if(r==="false")return!1;if(Ke(r))return r;parseFloat(r)===r&&(r=parseFloat(r))}catch{}if(r!==null&&r!=="")return r}var cg=sg(),lg=ug(),fg=Jh();function $r(e,r){if(e){var t=ms(r),n=!bs(t),a=gs(t)?at(localStorage.getItem(e)):void 0;if(n&&!et(a))return a;var i=ys(t)?at(Wh(e)):void 0;if(n&&i)return i;var o=ws(t)?at(sessionStorage.getItem(e)):void 0;if(n&&o)return o;var s=Fr(e);return n?s:{localStorage:a,sessionStorage:o,cookie:i,global:s}}}function an(e,r,t){if(e&&!et(r)){var n={},a=ms(t),i=JSON.stringify(r),o=!bs(a);return gs(a)&&(n[Ot]=Kt(Ot,r,at(localStorage.getItem(e))),localStorage.setItem(e,i),o)?n[Ot]:ys(a)&&(n[Tt]=Kt(Tt,r,at(Wh(e))),og(e,i),o)?n[Tt]:ws(a)&&(n[kt]=Kt(kt,r,at(sessionStorage.getItem(e))),sessionStorage.setItem(e,i),o)?n[kt]:(n[_t]=Kt(_t,r,Fr(e)),Br(e,r),o?n[_t]:n)}}function dg(e,r){if(e){var t=ms(r),n=$r(e,Ah),a={};return!et(n.localStorage)&&gs(t)&&(localStorage.removeItem(e),a[Ot]=n.localStorage),!et(n.cookie)&&ys(t)&&(Vh(e),a[Tt]=n.cookie),!et(n.sessionStorage)&&ws(t)&&(sessionStorage.removeItem(e),a[kt]=n.sessionStorage),!et(n.global)&&Tn(t,_t)&&(mt(e),a[_t]=n.global),a}}function ms(e){return e?kr(e)?e:e.storage:Ch}function gs(e){return cg&&Tn(e,Ot)}function ys(e){return fg&&Tn(e,Tt)}function ws(e){return lg&&Tn(e,kt)}function bs(e){return e===Ah||e==="all"}function Tn(e,r){return e===Ch||e===r||bs(e)}function Kt(e,r,t){return{location:e,current:r,previous:t}}var hg={setItem:an,getItem:$r,removeItem:dg};function vg(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function rd(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function td(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?rd(Object(t),!0).forEach(function(n){vg(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rd(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function pg(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r={storage:hg};return ig(td(td({},r),e))}const Zh="@sesamy/sesamy-js",Ss="1.37.12";function mg(e){if(typeof window>"u")return;const{addEventListener:r,history:t,location:n}=window;let a=n.pathname;r("popstate",()=>e(n.pathname)),["push","replace"].map(i=>{const o=`${i}State`;if(o!=="pushState"&&o!=="replaceState")return;const s=t[o];t[o]=function(...c){const l=c[2]?.toString()||"",u=yg(l);return a!==u&&(a=u,setTimeout(()=>e(l),0)),s.apply(t,c)}})}function gg(e,r){const t=e.indexOf(r);return t>-1?e.slice(0,t):e}function yg(e){return["#","?"].forEach(r=>e=gg(e,r)),e}function wg(){mg(()=>{br.page()})}function bg(e){if(e===void 0&&(e={}),!Ne)return $o;var r=ad(),t=Fo(),n=nd(),a=Wt(n,r),i=Wt(t,r),o=[],s=[],c=[],l=n,u=a,f=i,h=Object.keys(e);if(!h.length)return $o;var d=h.map(function(m){return Number(m)}),v=Lm(function(){var m=ad(),y=function(L,D){return D.map(function(x){return x===100?L-5:L*(x/100)})}(m,d),E=Fo(),b=nd(),g=Wt(b,m),p=Wt(E,m);if(u=g>u?g:u,f=p<f?p:f,!(o.length>=d.length)){var w=l===b,k="up";w?k="initial":l<=b&&(k="down");var q=y,C=d;(k==="up"||w)&&(q=y.slice().reverse(),C=d.slice().reverse());var B=C.reduce(function(L,D,x){var O=q[x];return c.includes(D)&&b<=O&&(c=c.filter(function(Y){return Y!==D}),L.singleFunction=D),k==="down"&&!o.includes(D)&&b>=O&&D>i?(s.push(D),L.callbacks=L.callbacks.concat(D),L):k==="up"&&!o.includes(D)&&b<=O&&D<=g?(L.foundFunc=[D],L):(w&&b>=O&&L.foundFunc.length===0&&(L.foundFunc=[D]),!s.includes(D)&&b>=O&&(s.push(D),L.singleFunction?c.push(D):L.singleFunction=D),L)},{foundFunc:[],singleFunction:null,callbacks:[],direction:k});if(l=b,k==="down"&&B.callbacks&&B.callbacks.forEach(function(L){We(e[L])&&(e[L]({trigger:L,direction:k,scrollMin:f,scrollMax:u,range:[f,u]}),o.push(L))}),B.singleFunction){var z=B.singleFunction,re=B.direction;We(e[z])&&e[z]({trigger:z,direction:re,scrollMin:f,scrollMax:u,range:[f,u]}),o.push(z)}}},500);return window.addEventListener("scroll",v),function(){return window.removeEventListener("scroll",v)}}function Fo(){return Ne?document.body.scrollTop||document.documentElement.scrollTop:0}function Sg(){return Ne?window.innerHeight||document.documentElement.clientHeight:0}function nd(){return Math.round(Fo()+Sg())}function ad(){if(!Ne)return 0;var e=document.body,r=document.documentElement;return Math.max(e.scrollHeight,e.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight)}function Wt(e,r){return Math.round(e/r*100)}var id="EventListener";function Ig(e){return function(r,t,n,a){var i=n||$o,o=a||!1;if(!Ne)return i;var s=on(t),c=on(r,!0);if(!c.length)throw new Error("noElements");if(!s.length)throw new Error("noEvent");var l=[];return function u(f){f&&(l=[]);for(var h=f?"add"+id:"remove"+id,d=0;d<c.length;d++){var v=c[d];l[d]=f?o&&o.once?Pg(i):i:l[d]||i;for(var m=0;m<s.length;m++)v[h]?v["on"+s[m]]=f?l[d]:null:v[h](s[m],l[d],o)}return u.bind(null,!f)}(e)}}function on(e,r){if(kr(e))return r?on(document.querySelectorAll(e)):(t=e).split(t.indexOf(",")>-1?",":" ").map(function(o){return o.trim()});var t;if(NodeList.prototype.isPrototypeOf(e)){for(var n=[],a=e.length>>>0;a--;)n[a]=e[a];return n}var i=km(e);return r?i.map(function(o){return kr(o)?on(o,!0):o}).flat():i}function Pg(e,r){var t;return function(){return e&&(t=e.apply(this,arguments),e=null),t}}var ko=Ig("Event");function Yh(e,r){return Ne&&We(window[e])?(t=window[e],n=r,(a=window)===void 0&&(a=null),We(t)?function(){t.apply(a,arguments),n.apply(a,arguments)}:n):window[e]=r;var t,n,a}Yh.bind(null,"onerror");Yh.bind(null,"onload");var Xh=typeof window>"u",od="hidden";function Eg(e){if(Xh)return!1;var r=Rg(),t="".concat(r.replace(/[H|h]idden/,""),"visibilitychange"),n=function(){return e(!!document[r])},a=function(){return document.addEventListener(t,n)};return a(),function(){return document.removeEventListener(t,n),a}}function Rg(){var e=["webkit","moz","ms","o"];return Xh||od in document?od:e.reduce(function(r,t){var n=t+"Hidden";return!r&&n in document?n:r},null)}var _g=["mousemove","mousedown","touchmove","touchstart","touchend","keydown"];function Tg(e,r){r===void 0&&(r={});var t=function(o,s){var c=this,l=!1;return function(u){l||(o.call(c,u),l=!0,setTimeout(function(){return l=!1},s))}}(e,r.throttle||1e4),n=[];function a(){var o=Eg(function(s){s||t({type:"tabVisible"})});return n=[o].concat(_g.map(function(s){return ko(document,s,t)})).concat(ko(window,"load",t)).concat(ko(window,"scroll",t,{capture:!0,passive:!0})),i}function i(){n.map(function(o){return o()})}return a(),function(){return i(),a}}function Og(e){var r,t,n=e.onIdle,a=e.onWakeUp,i=e.onHeartbeat,o=e.timeout,s=o,c=e.throttle,l=c===void 0?2e3:c,u=!1,f=!1,h=new Date,d=function(){return clearTimeout(r)};function v(y){d(),i&&!u&&i(Et(h),y),a&&u&&(u=!1,a(Et(t),y),h=new Date),r=setTimeout(function(){u=!0,n&&(t=new Date,n(Et(h),y))},s)}var m=Tg(v,{throttle:l});return{disable:function(){f=!0,u=!1,d();var y=m();return function(){return f=!1,h=new Date,v({type:"load"}),y()}},getStatus:function(){return{isIdle:u,isDisabled:f,active:u?0:Et(h,f),idle:u?Et(t,f):0}}}}function Et(e,r){return r?0:Math.round((new Date-e)/1e3)}const sd=5e3;class kg{element;isInViewport=!1;isAwake=!1;isFlushing;observer;lastEventAt=Date.now();registeredView=!1;viewCallback;activeDurationCallback;idleDurationCallback;scrollCallback;constructor(r){this.element=r.element,this.viewCallback=r.viewCallback,this.activeDurationCallback=r.activeDurationCallback,this.idleDurationCallback=r.idleDurationCallback,this.scrollCallback=r.scrollCallback,this.observer=new IntersectionObserver(t=>{t.forEach(n=>{this.handleInViewPort(n.isIntersecting)})},{threshold:0}),this.observer.observe(this.element),Og({onIdle:t=>this.handleAwake(!1,t),onWakeUp:t=>this.handleAwake(!0,t),timeout:sd}),bg({25:this.handleScroll.bind(this),50:this.handleScroll.bind(this),75:this.handleScroll.bind(this),90:this.handleScroll.bind(this),100:this.handleScroll.bind(this)})}flush(){this.isFlushing=!0,this.handleAwake(!this.isAwake)}handleInViewPort(r){r?(this.isAwake=!0,this.trackInViewport()):this.handleAwake(!1),this.isInViewport=r}handleAwake(r,t=Math.round((Date.now()-this.lastEventAt)/1e3)){this.isAwake=r,this.lastEventAt=r?Date.now()-t*sd:Date.now(),this.isInViewport&&this.trackAwake(r,t)}handleScroll(r){this.scrollCallback&&this.scrollCallback(r)}handleVisibilityChange(){this.isAwake=!1;const r=Math.round((Date.now()-this.lastEventAt)/1e3);r>1&&(this.lastEventAt=Date.now(),this.trackAwake(!1,r))}trackAwake(r,t){!r&&this.activeDurationCallback&&this.activeDurationCallback(t,this.isFlushing,this.lastEventAt),r&&this.idleDurationCallback&&this.idleDurationCallback(t,this.isFlushing,this.lastEventAt)}trackInViewport(){this.registeredView||(this.registeredView=!0,this.viewCallback&&this.viewCallback())}}function Qh(e){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()}function Cg(e,r){r=r||{};var t,n,a=[],i=r.max||1/0;function o(){clearInterval(t),e(a.splice(0,i)),s()}function s(){t=setInterval(o,r.interval||1e4)}return s(),{flush:o,push:function(c){return n=a.push(c),n>=i&&o(),n},size:function(){return a.length},end:function(c){c&&o(),clearInterval(t)}}}const ud="sesamy_session_id";function Ag(){let e=sessionStorage.getItem(ud);return e||(e=Math.random().toString(36).slice(2,9),sessionStorage.setItem(ud,e)),e}function ev(e){function r(n){return n.id?`#${n.id}`:n.classList.length>0?Array.from(n.classList).map(i=>`.${i}`).join(""):null}function t(n){const a=[];let i=n;for(;i&&i!==document.body&&i!==document.documentElement;){const o=r(i);if(o){a.unshift(o);break}if(i.parentElement){const s=Array.from(i.parentElement.children),c=s.indexOf(i)+1,l=i.tagName.toLowerCase();s.filter(f=>f.tagName.toLowerCase()===l).length>1?a.unshift(`${l}:nth-child(${c})`):a.unshift(l)}i=i.parentElement}return a.join(" > ")}return t(e)}let Xe={article:{selector:"sesamy-article"},image:{selector:"img",attribute:"src"},title:{selector:"h1",attribute:"textContent"},excerpt:{selector:"p",attribute:"textContent"},price:{selector:"sesamy-article",attribute:"price"},currency:{selector:"sesamy-article",attribute:"currency"},url:{selector:"sesamy-article",attribute:"item-src"},accessLevel:{selector:"sesamy-article",attribute:"access-level"},id:{selector:"sesamy-article",attribute:"publisher-content-id"},pass:{selector:"sesamy-article",attribute:"pass"}},Xt;function jg(e,r){Xe={...Xe,...e.content?.article},Xt=r}function Ug(e,r){const{selector:t}=r;return t===Xe.article.selector?e:e.querySelector(t)}function rv(e,r){if(e)return r.attribute?r.attribute==="textContent"?e.textContent??void 0:e.getAttribute(r.attribute)??rv(e.parentElement,r):e.textContent??void 0}function it(e){const r=document.head.querySelectorAll(`[property~='${e}'][content]`);for(let n=0;n<r.length;n+=1)if(r[n].content)return r[n].content;const t=document.head.querySelectorAll(`[name~='${e}'][content]`);for(let n=0;n<t.length;n+=1)if(t[n].content)return t[n].content}function tv({publisherContentId:e,key:r,defaultValue:t=""}){return(e?document.body.querySelector(`sesamy-content-data[id='${e}']`):null)?.getAttribute(r)||it(`sesamy:${r}`)||it(`og:${r}`)||it(r)||t}function Lg(){const e=document.querySelectorAll(Xe.article.selector);return Array.from(e).map(Is).filter(r=>r!==null)}function Is(e){const r=typeof e=="string"?document.querySelector(e):e;if(!r)return null;const t={element:r,selector:typeof e=="string"?e:ev(r)},n=(a,i,o,s)=>{const c=Ug(r,i);if(c){const l=rv(c,i)||tv({publisherContentId:o,key:a});l!==void 0&&(t[a]=s?s(l):l)}};return n("id",Xe.id),n("title",Xe.title,t.id),n("excerpt",Xe.excerpt,t.id),n("image",Xe.image,t.id),n("price",Xe.price,t.id,a=>parseFloat(a)),n("currency",Xe.currency,t.id),n("url",Xe.url,t.id),n("pass",Xe.pass,t.id),n("accessLevel",Xe.accessLevel,t.id,a=>a||"entitlement"),t}async function qg(e,r){const t=typeof e=="string"?document.querySelector(e):e;if(!t)throw new Error("Could not find element");const n=Is(t);if(!n?.url)throw new Error("Could not find content for element");const a=await Xt.entitlements.hasAccess(n.url||"",n.pass?.split(",")||[]);if(!a)throw new Error("User does not have access to the content");const i=await Xt.entitlements.access(a.id);if(!i.token)throw new Error("Could not get access token");const o=r||ev(t.parentElement||t);return Xt.proxy.getContent(i.token,n.url,o)}let nv=!1,Qt,sn,Bo;function av(e){return JSON.stringify(e.map(r=>{const{campaign:t,...n}=r.properties||{};return{anonymousId:r.anonymousId,userId:r.userId,type:r.type,properties:n,clientId:Bo,requestId:Math.random().toString(36).slice(2,9),sessionId:Ag(),timestamp:new Date().toISOString(),version:Ss,event:r.event,context:{...r.context,page:{url:window.location.href,title:document.title,referrer:document.referrer,itemSrc:it("sesamy:item-src"),publisherContentId:it("sesamy:publisher-content-id")},campaign:t,locale:navigator.language,library:Zh,userAgent:navigator.userAgent,clientId:Bo}}}))}const iv=Cg(async e=>{if(e.length>0){const r=av(e);nv?navigator.sendBeacon(sn,r):(await fetch(sn,{method:"POST",body:r,headers:{"Content-Type":"text/plain"}})).ok}},{max:10,interval:3e3});function Co(e){if(e.anonymousId)if(e.properties?.flushing){const r={...e};delete r.properties.flushing,navigator.sendBeacon(sn,av([r]))}else iv.push(e)}function xg(){return nv=!0,iv.flush()}function Ng(e,r,t){Qt=r,sn=`${vr("logs",t)}/events`,Bo=e}const $g={name:"custom-analytics-plugin",page:({payload:e})=>{if(!Qt)return;const{properties:r,anonymousId:t,userId:n,event:a}=e;Co({anonymousId:t,userId:n,properties:r,event:a,type:"page"})},track:({payload:e})=>{if(!Qt)return;const{properties:r,anonymousId:t,userId:n,event:a}=e;Co({anonymousId:t,userId:n,properties:r,event:a,type:"track"})},identify:({payload:e})=>{if(!Qt)return;const{properties:r,anonymousId:t,userId:n}=e;Co({anonymousId:t,userId:n,properties:r,type:"identify"})}},cd=["source","medium","campaign","term","content"],Or="utm_",Dg=30*60*1e3;function ov(e){return e?Date.now()-parseInt(e,10)>Dg:!0}function ld(){const e=document.referrer||"";if(!e)return;const r=$r(`${Or}set_at`);(ov(r)||!$r(`${Or}referrer`))&&an(`${Or}referrer`,e)}function Mg(){const e=()=>{const t={};for(const a of cd){const i=$r(`${Or}${a}`);i&&(t[`utm_${a}`]=i)}const n=$r(`${Or}referrer`);return n&&(t.utm_referrer=n),t};return{name:"attribution-tracking",initialize(){ld()},campaign({payload:t}){const n=t?.campaign||{},a=$r(`${Or}set_at`);if(Object.keys(n).length>0&&ov(a)){for(const o of cd){const s=n[o];s&&an(`${Or}${o}`,s)}an(`${Or}set_at`,String(Date.now()))}ld()},page({payload:t}){return t.properties.campaign=e(),t},track({payload:t}){return t.properties.campaign=e(),t},getStoredCampaignData:e}}const Fg=Mg(),fd=new Map,dd=new Map;function Bg({clientId:e,enabled:r=!0,environment:t}){Ng(e,r,t),r&&(window.addEventListener("beforeunload",()=>{dd.forEach((n,a)=>{n.bind(a)()}),xg()}),window.addEventListener("visibilitychange",()=>{document.visibilityState!=="visible"&&fd.forEach((n,a)=>{n.bind(a)()})}),wg(),Qh(()=>{const n=new kg({element:document.body,viewCallback:()=>{br.page()},activeDurationCallback:(a,i,o)=>{br.track("activeDuration",{duration:a,durationStart:o,flushing:i})},idleDurationCallback:(a,i,o)=>{br.track("idleDuration",{duration:a,durationStart:o,flushing:i})},scrollCallback:a=>{br.track("scroll",{scroll:a.scrollMax})}});dd.set(document.body,()=>{n.flush()}),fd.set(document.body,()=>{n.handleVisibilityChange()})}),window.addEventListener(Ve.AUTHENTICATED,async n=>{const a=n;await br.identify(a.detail.sub)}),window.addEventListener(Ve.LOGOUT,async()=>{await br.track("logout",{}),await br.reset()}))}const br=pg({app:Zh,version:Ss,plugins:[Fg,$g]});function sv(e,r){br.track(e,r)}function uv(e,r,t=!1){const n={name:e,data:r},a=new CustomEvent(e,{detail:n,cancelable:t,bubbles:!0});sv(`event:${e}`,{...r,timestamp:new Date().toISOString()});const i=window.dispatchEvent(a);return t&&!i?{canceled:!0,message:n.cancellationMessage}:{canceled:!1}}function zg(e,r){e.cancelable&&(e.detail.cancellationMessage=r,e.preventDefault())}function Hg(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Gg(){return/android/i.test(navigator.userAgent)}let xe,cv,zo=!1,en=!1;Ct()&&window.addEventListener("pageshow",()=>{en=!1});let lv=!1,fv=!1;const ct="sesamyAccessToken",Ao="sesamyRefreshToken";async function On(){return zo?!0:new Promise((e,r)=>{const t=setTimeout(()=>{zo?e(!0):r(new Error("Initialization failed: Timeout"))},2e3);window.addEventListener(Ve.AUTH_INITIALIZED,()=>{clearTimeout(t),e(!0)})})}async function Kg(e){if(!e)return null;const r=localStorage.getItem(Ao);if(!r)return ye("No refresh token found in localstorage"),null;const t=new URLSearchParams;t.set("client_id",e.iss),t.set("refresh_token",r),t.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:t.toString(),method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"}});if(!a.ok)throw localStorage.removeItem(Ao),new Error("Renew token failed");const i=await a.json();return localStorage.setItem(Ao,i.refresh_token),localStorage.setItem(ct,i.access_token),i.access_token}catch{Es()}}async function Ps(){const e=localStorage.getItem(ct);if(!e)return null;const r=Rs(e);if(!r||!r.exp||r.exp<new Date().getTime()/1e3){const t=await Kg(r);if(t)return t;localStorage.removeItem(ct)}return e}let Vt=null;function Wg(){try{if(Vt!==null)return Vt;const r=Object.keys(localStorage).filter(t=>t.startsWith("@@auth0spajs@@"));for(const t of r){const n=JSON.parse(localStorage.getItem(t)||"{}");if(typeof n=="object"&&"refresh_token"in n)return Vt=!0,!0}}catch(e){ye(`Error checking for existing auth0 tokens: ${e.message}`)}return Vt=!1,!1}function hd(e){try{const r=new URL(e).hostname,t=r.split(".");return t.length>1?t.slice(-2).join("."):r}catch{return null}}async function Vg(e){if(e.enabled===!1)return;e.usePopupForSafari&&(lv=!0),e.usePopupForAndroid&&(fv=!0),cv=e.organization;const r=e.domain&&!Wg()?e.domain:kh("token",e.environment),t={domain:r,clientId:e.clientId,useCookiesForTransactions:!0};t.cacheLocation="localstorage",hd(window.location.href)!==hd(`https://${r}`)&&(t.useRefreshTokens=!0),ye(`Initializing auth0 client: ${JSON.stringify(t)}`),xe=await hm(t);const n=new URLSearchParams(window.location.search),a=n.get("code"),i=n.get("state");if(a)if(window.opener)ye("Code found in URL, posting to opener"),window.opener.postMessage({type:"authorization_response",response:{code:a,state:i}},window.location.origin);else{ye("Code found in URL, handling redirect");try{const c=await xe.handleRedirectCallback();ye(`Login result: ${JSON.stringify(c)}`);const l=await xe.getUser();if(!l)throw ye("No user found"),new Error("No user found");ye(`User found ${JSON.stringify(l)}`),Ir(Ve.AUTHENTICATED,l),ye("Rewrite url")}catch(c){alert("There was an error logging in"),console.error(c)}const o=new URL(location.href),s=o.searchParams;s.delete("code"),s.delete("state"),o.search=s.toString(),window.history.replaceState({},document.title,o.toString())}zo=!0,Ir(Ve.AUTH_INITIALIZED,{})}async function jt(){return await On(),await Ps()?!0:xe?xe.isAuthenticated():!1}async function Jg(){return await On(),await Ps()?(ye("Using local user"),{sub:"local",name:"Local User"}):xe?xe.getUser():null}function dv(e){if(en)return ye("Login already in progress"),null;if(en=!0,setTimeout(()=>{en=!1},3e3),localStorage.removeItem(ct),!xe)throw new Error("Auth0 client not initialized");const r=e?.authorizationParams||{};return{...e,authorizationParams:{organization:cv,redirect_uri:window.location.href,ui_locales:rn(),incognito:vs(),...r}}}async function kn(e){const r=dv(e);if(r)return xe.loginWithRedirect(r)}async function hv(e){const r=dv(e);if(!r)return;await xe.loginWithPopup(r),uv(Ve.AUTHENTICATED,await xe.getUser()).canceled||window.location.reload()}async function Zg(e){return Hg()&&(vs()||lv)||Gg()&&fv?hv(e):kn(e)}async function Qr(e=!0,r=!1){await On();const t=await Ps();if(t)return t;try{if(!xe)return ye("Auth client not initialized"),null;let n=await xe.getTokenSilently();const a=Rs(n);return r&&a?.exp&&a.exp+3600<new Date().getTime()/1e3&&(n=await xe.getTokenSilently({cacheMode:r?"off":"on"})),n}catch(n){const a=n;if(ye(`Failed to get token silently: ${a.message}`),await xe.isAuthenticated()&&(a.message==="Invalid refresh token"||a.message.includes("Missing Refresh Token"))&&await Es(),e)throw n;return null}}async function Es(e={}){if(await On(),localStorage.removeItem(ct),Ir(Ve.LOGOUT,{}),!!xe)return ye(`Logout with options: ${JSON.stringify(e)}`),xe.logout({...e,logoutParams:{returnTo:window.location.href,...e.logoutParams}})}function Rs(e){const r=e.split(".");if(r.length!==3)return null;const n=r[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 Ho(e){const r=Rs(e);if(!r||!r.exp||r.exp<new Date().getTime()/1e3)throw new Error("Invalid token");ye("Set token"),localStorage.setItem(ct,e),Ir(Ve.AUTHENTICATED,r)}const Yg=(e,r)=>r.skipDedupe||r.method!=="GET",Xg=(e,r)=>r.method+"@"+e,Qg=e=>e.clone(),vd=({skip:e=Yg,key:r=Xg,resolver:t=Qg}={})=>{const n=new Map;return a=>(i,o)=>{if(e(i,o))return a(i,o);const s=r(i,o);if(!n.has(s))n.set(s,[]);else return new Promise((c,l)=>{n.get(s).push([c,l])});try{return a(i,o).then(c=>(n.get(s).forEach(([l])=>l(t(c))),n.delete(s),c)).catch(c=>{throw n.get(s).forEach(([,l])=>l(c)),n.delete(s),c})}catch(c){return n.delete(s),Promise.reject(c)}}},ey=(e,r)=>e*r,ry=e=>e&&e.ok,pd=({delayTimer:e=500,delayRamp:r=ey,maxAttempts:t=10,until:n=ry,onRetry:a=null,retryOnNetworkError:i=!1,resolveWithLatestResponse:o=!1,skip:s}={})=>c=>(l,u)=>{let f=0;if(s&&s(l,u))return c(l,u);const h=(d,v)=>Promise.resolve(n(d,v)).then(m=>m?d&&o?d:v?Promise.reject(v):d:(f++,!t||f<=t?new Promise(y=>{const E=r(e,f);setTimeout(()=>{typeof a=="function"?Promise.resolve(a({response:d,error:v,url:l,options:u})).then((b={})=>{var g,p;y(c((g=b&&b.url)!==null&&g!==void 0?g:l,(p=b&&b.options)!==null&&p!==void 0?p:u))}):y(c(l,u))},E)}).then(h).catch(y=>{if(!i)throw y;return h(null,y)}):d&&o?d:Promise.reject(v||new Error("Number of attempts exceeded."))));return c(l,u).then(h).catch(d=>{if(!i)throw d;return h(null,d)})},ty="application/json",vv="Content-Type",Yr=Symbol(),pv=Symbol();function md(e={}){var r;const t=e instanceof Array?Object.fromEntries(e):e;return(r=Object.entries(t).find(([n])=>n.toLowerCase()===vv.toLowerCase()))===null||r===void 0?void 0:r[1]}function gd(e){return/^application\/.*json.*/.test(e)}const Dr=function(e,r,t=!1){return Object.entries(r).reduce((n,[a,i])=>{const o=e[a];return Array.isArray(o)&&Array.isArray(i)?n[a]=t?[...o,...i]:i:typeof o=="object"&&typeof i=="object"?n[a]=Dr(o,i,t):n[a]=i,n},{...e})},lt={options:{},errorType:"text",polyfills:{},polyfill(e,r=!0,t=!1,...n){const a=this.polyfills[e]||(typeof self<"u"?self[e]:null)||(typeof global<"u"?global[e]:null);if(r&&!a)throw new Error(e+" is not defined");return t&&a?new a(...n):a}};function ny(e,r=!1){lt.options=r?e:Dr(lt.options,e)}function ay(e,r=!1){lt.polyfills=r?e:Dr(lt.polyfills,e)}function iy(e){lt.errorType=e}const oy=e=>r=>e.reduceRight((t,n)=>n(t),r)||r;class mv extends Error{}const sy=e=>{const r=Object.create(null);e=e._addons.reduce((g,p)=>p.beforeRequest&&p.beforeRequest(g,e._options,r)||g,e);const{_url:t,_options:n,_config:a,_catchers:i,_resolvers:o,_middlewares:s,_addons:c}=e,l=new Map(i),u=Dr(a.options,n);let f=t;const h=oy(s)((g,p)=>(f=g,a.polyfill("fetch")(g,p)))(t,u),d=new Error,v=h.catch(g=>{throw{[Yr]:g}}).then(g=>{var p;if(!g.ok){const w=new mv;if(w.cause=d,w.stack=w.stack+`
36
- CAUSE: `+d.stack,w.response=g,w.status=g.status,w.url=f,g.type==="opaque")throw w;const k=a.errorType==="json"||((p=g.headers.get("Content-Type"))===null||p===void 0?void 0:p.split(";")[0])==="application/json";return(a.errorType?k?g.text():g[a.errorType]():Promise.resolve(g.body)).then(C=>{throw w.message=typeof C=="string"?C:g.statusText,C&&(k&&typeof C=="string"?(w.text=C,w.json=JSON.parse(C)):w[a.errorType]=C),w})}return g}),m=g=>g.catch(p=>{const w=Object.prototype.hasOwnProperty.call(p,Yr),k=w?p[Yr]:p,q=k?.status&&l.get(k.status)||l.get(k?.name)||w&&l.has(Yr)&&l.get(Yr);if(q)return q(k,e);const C=l.get(pv);if(C)return C(k,e);throw k}),y=g=>p=>m(g?v.then(w=>w&&w[g]()).then(w=>p?p(w):w):v.then(w=>p?p(w):w)),E={_wretchReq:e,_fetchReq:h,_sharedState:r,res:y(null),json:y("json"),blob:y("blob"),formData:y("formData"),arrayBuffer:y("arrayBuffer"),text:y("text"),error(g,p){return l.set(g,p),this},badRequest(g){return this.error(400,g)},unauthorized(g){return this.error(401,g)},forbidden(g){return this.error(403,g)},notFound(g){return this.error(404,g)},timeout(g){return this.error(408,g)},internalError(g){return this.error(500,g)},fetchError(g){return this.error(Yr,g)}},b=c.reduce((g,p)=>({...g,...typeof p.resolver=="function"?p.resolver(g):p.resolver}),E);return o.reduce((g,p)=>p(g,e),b)},uy={_url:"",_options:{},_config:lt,_catchers:new Map,_resolvers:[],_deferred:[],_middlewares:[],_addons:[],addon(e){return{...this,_addons:[...this._addons,e],...e.wretch}},errorType(e){return{...this,_config:{...this._config,errorType:e}}},polyfills(e,r=!1){return{...this,_config:{...this._config,polyfills:r?e:Dr(this._config.polyfills,e)}}},url(e,r=!1){if(r)return{...this,_url:e};const t=this._url.split("?");return{...this,_url:t.length>1?t[0]+e+"?"+t[1]:this._url+e}},options(e,r=!1){return{...this,_options:r?e:Dr(this._options,e)}},headers(e){const r=e?Array.isArray(e)?Object.fromEntries(e):"entries"in e?Object.fromEntries(e.entries()):e:{};return{...this,_options:Dr(this._options,{headers:r})}},accept(e){return this.headers({Accept:e})},content(e){return this.headers({[vv]:e})},auth(e){return this.headers({Authorization:e})},catcher(e,r){const t=new Map(this._catchers);return t.set(e,r),{...this,_catchers:t}},catcherFallback(e){return this.catcher(pv,e)},resolve(e,r=!1){return{...this,_resolvers:r?[e]:[...this._resolvers,e]}},defer(e,r=!1){return{...this,_deferred:r?[e]:[...this._deferred,e]}},middlewares(e,r=!1){return{...this,_middlewares:r?e:[...this._middlewares,...e]}},fetch(e=this._options.method,r="",t=null){let n=this.url(r).options({method:e});const a=md(n._options.headers),i=this._config.polyfill("FormData",!1),o=typeof t=="object"&&!(i&&t instanceof i)&&(!n._options.headers||!a||gd(a));return n=t?o?n.json(t,a):n.body(t):n,sy(n._deferred.reduce((s,c)=>c(s,s._url,s._options),n))},get(e=""){return this.fetch("GET",e)},delete(e=""){return this.fetch("DELETE",e)},put(e,r=""){return this.fetch("PUT",r,e)},post(e,r=""){return this.fetch("POST",r,e)},patch(e,r=""){return this.fetch("PATCH",r,e)},head(e=""){return this.fetch("HEAD",e)},opts(e=""){return this.fetch("OPTIONS",e)},body(e){return{...this,_options:{...this._options,body:e}}},json(e,r){const t=md(this._options.headers);return this.content(r||gd(t)&&t||ty).body(JSON.stringify(e))}};function mr(e="",r={}){return{...uy,_url:e,_options:r}}mr.default=mr;mr.options=ny;mr.errorType=iy;mr.polyfills=ay;mr.WretchError=mv;function nr(){return sessionStorage.removeItem(xo),ye("Cache cleared"),Ir(Ve.CLEAR_CACHE,{}),"Cache cleared"}function Go(e){let r;try{r=new URL(e)}catch{return!1}return r.protocol==="http:"||r.protocol==="https:"}function gv(e,r){if(Go(e))return{itemSrc:e};const[t,n,a]=e.split(":");return{sku:`${t}:${n}`,purchaseOption:r||a}}function yd(e){return e.endsWith("/")?e.slice(0,-1):e}function wd(e,r){if(!Go(e)||!Go(r))return!1;const t=new URL(e),n=new URL(r);return t.origin===n.origin&&yd(t.pathname)===yd(n.pathname)}function cy(e,r,t){const n=new URL(`${vr("checkout3",e.environment)}`);if(r.language&&n.searchParams.set("lang",r.language),r.sku)n.searchParams.set("sku",r.sku),r.purchaseOptionId&&n.searchParams.set("po-id",r.purchaseOptionId);else if(r.itemSrc){const{sku:s,purchaseOption:c,itemSrc:l}=gv(r.itemSrc,r.purchaseOptionId);l&&n.searchParams.set("url",l),s&&n.searchParams.set("sku",s),c&&n.searchParams.set("po-id",c)}r.email&&n.searchParams.set("email",r.email),r.business&&n.searchParams.set("business","true"),r.currency&&n.searchParams.set("currency",r.currency),r.price&&n.searchParams.set("price",r.price.toString()),r.discountCode&&n.searchParams.set("discount-code",r.discountCode),r.attributionItemSrc?n.searchParams.set("itemSrc",r.attributionItemSrc):t.itemSrc&&n.searchParams.set("itemSrc",t.itemSrc),r.attributionPublisherContentId?n.searchParams.set("publisherContentId",r.attributionPublisherContentId):t.publisherContentId&&n.searchParams.set("publisherContentId",t.publisherContentId),r.utmSource?n.searchParams.set("utm_source",r.utmSource):t.utmSource&&n.searchParams.set("utm_source",t.utmSource),r.utmMedium?n.searchParams.set("utm_medium",r.utmMedium):t.utmMedium&&n.searchParams.set("utm_medium",t.utmMedium),r.utmCampaign?n.searchParams.set("utm_campaign",r.utmCampaign):t.utmCampaign&&n.searchParams.set("utm_campaign",t.utmCampaign),r.utmTerm?n.searchParams.set("utm_term",r.utmTerm):t.utmTerm&&n.searchParams.set("utm_term",t.utmTerm),r.utmContent?n.searchParams.set("utm_content",r.utmContent):t.utmContent&&n.searchParams.set("utm_content",t.utmContent);const a=["_ga","_gid","_fbp","_fbc"];document.cookie.split(";").map(s=>{const[c,l]=s.trim().split("=");return{key:c,value:l}}).filter(s=>a.some(c=>c===s.key)).forEach(s=>{n.searchParams.append(s.key,s.value)});let o=new URL(window.location.href);if(r.redirectUrl)try{o=new URL(r.redirectUrl)}catch{console.warn("Invalid redirect URL provided, using current URL instead:",r.redirectUrl)}return o.searchParams.set("force-refetch-entitlements","true"),r.itemSrc&&o.searchParams.set("sesamy-purchase",r.itemSrc),n.searchParams.set("redirect-url",o.toString()),r.paymentMethodsFilter&&n.searchParams.set("paymentmethods-filter",r.paymentMethodsFilter.flatMap(({provider:s,methods:c})=>c?c.map(l=>`${s}|${l}`):s).join(",")),n}const yv="sesamySignedURLs";function _s(){const e=sessionStorage.getItem(yv);return e?JSON.parse(e):[]}function ly(e){const r=_s();r.push(e),ye(`Adding signed URL: ${e}`),sessionStorage.setItem(yv,JSON.stringify(r))}function fy(e){const r={};return Object.keys(e).forEach(t=>{const n=e[t];n!=null&&(r[t]=n.toString())}),r}const Ko="sesamyAttribution";function dy(e){const r=localStorage.getItem(e);if(!r)return null;try{return JSON.parse(r).value}catch{return console.error(`Failed to parse ${e}`),null}}function hy(e){return Object.keys(e).find(r=>r.startsWith("utm_"))?{utmSource:void 0,utmMedium:void 0,utmCampaign:void 0,...e}:e}function un(){return dy(Ko)||{}}function wv(e){if(e===null)localStorage.removeItem(Ko);else{ye(`Setting attribution ${JSON.stringify(e)}`);const r=un()??{},t=fy({...r,...hy(e)});localStorage.setItem(Ko,JSON.stringify({value:t}))}}function vy(e){const r=vr("api2",e.environment),t=T=>async(M,J)=>{let ve=sessionStorage.getItem(xo);ve||(ve=Date.now().toString(),sessionStorage.setItem(xo,ve));const pe={...J,headers:{...J.headers,"Cache-Timestamp":ve}};return T(M,pe)},n=(T=!0)=>M=>async(J,ve)=>{let pe=null;if(pe=await Qr(T),!pe){if(T)throw new Error("No access token available");return M(J,ve)}const me={...ve,headers:{...ve.headers,...pe?{Authorization:`Bearer ${pe}`}:{}}};return M(J,me)},a=T=>(M,J)=>{if(J.headers&&"Authorization"in J.headers)return T(M,J);const ve=localStorage.getItem("__anon_id"),pe=btoa(`${e.clientId}|${ve}:`),me={...J,headers:{...J.headers,Authorization:`Basic ${pe}`}};return T(M,me)},i=mr(r).headers({"Content-Type":"application/json"}).middlewares([t,n(),vd(),pd({delayTimer:1e3,delayRamp:(T,M)=>T*M,maxAttempts:3,until:T=>!!(T&&(T.ok||T.status>=400&&T.status<500)),retryOnNetworkError:!1})]),o=mr(r).headers({"Content-Type":"application/json"}).middlewares([t,n(!1),a,vd(),pd({delayTimer:1e3,delayRamp:(T,M)=>T*M,maxAttempts:3,until:T=>!!(T&&(T.ok||T.status>=400&&T.status<500)),retryOnNetworkError:!1})]);async function s(T={}){const{waitForEntitlementAfter:M,includeSignedLinks:J=!0}=T,ve=M?`?wait-for-entitlement-after=${M.toISOString()}`:"",pe=await jt()?await i.get(`/entitlements${ve}`).json():[];return J&&pe.push(..._s()),pe}async function c(T,M=[]){return(await s())?.find(pe=>{const{sku:me,purchaseOption:Ae}=gv(T);let Ze="sku"in pe&&me===pe.sku;Ze&&Ae&&"purchaseOptionId"in pe&&(Ze=Ae===pe.purchaseOptionId);const F=wd(T,pe.url),ee=M.some(le=>wd(le,pe.url));return Ze||F||ee})}async function l(T){return(await i.get("/entitlements").json())?.find(J=>J.id===T)}async function u(T){return i.get(`/entitlements/${encodeURIComponent(T)}/access`).json()}async function f(T,M,J){const ve=new URL(vr("api2",e.environment));return ve.pathname="/proxy",ve.searchParams.set("url",M),J&&ve.searchParams.set("selector",J),mr(ve.toString()).headers({Authorization:`Bearer ${T}`}).get().text()}async function h(T){if(!T)throw new Error("SKU is required to get fulfillments");return await jt()?await i.get(`/fulfillments?sku=${encodeURIComponent(T)}`).json():[]}async function d(T,M){if(!T||!M)throw new Error("SKU and itemId are required to request delivery");return(await i.post({sku:T},`/fulfillments/${encodeURIComponent(M)}/request-delivery?`).res()).ok}async function v(){return i.get("/contracts").json()}async function m(T){return(await i.get("/contracts").json())?.find(J=>J.id===T)}async function y(T){const M=await i.post({},`/contracts/${encodeURIComponent(T)}/cancel`).res();return nr(),M.ok}async function E(){return console.warn("getSubscriptions is deprecated, use getContracts instead"),i.get("/subscriptions").json()}async function b(){return i.get("/bills").json()}async function g(T){return(await i.get("/bills").json())?.find(J=>J.id===T)}async function p(){return i.get("/transactions").json()}async function w(T){return(await i.get("/transactions").json())?.find(J=>J.id===T)}async function k(T,M){const J=await i.url(`/user-metadata/${encodeURIComponent(T)}`).put(M).json();return Ir(Ve.USER_ATTRIBUTE_CHANGED,{}),nr(),J}async function q(T){const M=await i.url(`/user-metadata/${encodeURIComponent(T)}`).delete().res();return nr(),M.ok}async function C(){return await i.url("/user-metadata").get().json()}async function B(T){return(await C())[T]||null}async function z(){return await i.url("/tags").get().json()}async function re(T){const M=await i.url(`/tags/${encodeURIComponent(T)}`).delete().res();return nr(),M.ok}async function L(T){const M=await i.url("/tags").post(encodeURIComponent(T)).res();return Ir(Ve.USER_ATTRIBUTE_CHANGED,{}),nr(),M.ok}async function D(T){return(await o.url("/tallies").get().json())[T]}async function x(){return await o.url("/tallies").get().json()}async function O(T){const M=await o.url(`/tallies/${T}`).delete().res();return nr(),M.ok}async function Y(T,M){return await o.url(`/tallies/${encodeURIComponent(T)}/push`).post(M).json()}async function te(T){return await i.url(`/products/${encodeURIComponent(T)}`).get().json()}async function Q(){return await Qr(!1)?await i.url("/profile").get().json():null}async function S(T){const M=await i.url("/profile").patch(T).res();return nr(),M.ok}async function _(){return await i.url("/payment-issues").get().json()}async function N(){return(await i.url("/profile/spotify-link").get().json()).isSpotifyLinked}async function H(){return(await i.url("/profile/unlink-spotify").post().res()).ok}async function G(T){const M=await Qr(!1);if(!M)throw new Error("No access token available");const J=new URL(`${vr("access-sync",e.environment)}/spotify/sesamy-callback`);J.searchParams.set("access_token",M),J.searchParams.set("state",T),window.location.href=J.toString()}async function Z(T){const M=await i.url(`/products/${encodeURIComponent(T)}/auto-onboard`).post().json();return M.length&&nr(),M}async function fe(T,M=3600){const{shortlink:J}=await mr(mm).post({url:T,ttl:M}).json();return J}async function ie(T){const M=await Qr(!1,!0);let J;const ve=T.language||rn(),pe=un();switch(T.target){case"account":J=new URL(`${vr("account",e.environment)}/${encodeURIComponent(T.language||ve)}/subscriptions/${encodeURIComponent(e.clientId)}${T.contractId?`/${encodeURIComponent(T.contractId)}`:""}`),J.searchParams.set("sesamy-redirect-url",T.redirectUrl||window.location.href);break;case"change-payment":J=new URL(`${vr("account",e.environment)}/${encodeURIComponent(T.language||ve)}/subscriptions/${encodeURIComponent(e.clientId)}/${encodeURIComponent(T.contractId)}/change-payment-method`),J.searchParams.set("sesamy-redirect-url",T.redirectUrl||window.location.href);break;case"change-plan":J=new URL(`${vr("account",e.environment)}/${encodeURIComponent(T.language||ve)}/subscriptions/${encodeURIComponent(e.clientId)}/${encodeURIComponent(T.contractId)}/edit-plan`),J.searchParams.set("sesamy-redirect-url",T.redirectUrl||window.location.href);break;case"consume":J=new URL(`${vr("consume",e.environment)}/${encodeURIComponent(T.language||ve)}/@${encodeURIComponent(e.clientId)}/${encodeURIComponent(T.sku)}`),T.episodeId?J.href+=`/${T.episodeId}`:J.href+="/listen",J.searchParams.set("sesamy-redirect-url",T.redirectUrl||window.location.href);break;case"checkout":J=cy(e,{language:ve,...T},pe);break;default:throw new Error("Invalid target")}return M&&(J.hash=`#access_token=${M}`),T.shorten?fe(J.href,T.ttl):J.href}async function ce(T){const M=un(),J=["_ga","_gid","_fbp","_fbc"];return document.cookie.split(";").forEach(pe=>{const me=M,[Ae,Ze]=pe.trim().split("=");J.includes(Ae)&&!me[Ae]&&(me[Ae]=Ze)}),(await o.url("/checkouts").post({language:rn(),...T,attribution:{...M,...T.attribution},vendorId:e.clientId})).json()}async function oe(T,M){return(await o.url(`/checkouts/${T}`).patch(M)).json()}async function Re(T){return(await o.url(`/checkouts/${T}`).get()).json()}async function Te(T){return(await o.url(`/paywalls/${T}`).get()).json()}async function Fe(){return(await o.url("/vendor").get()).json()}async function Ce(){return(await i.url("/vendors").get()).json()}async function Je(T){return(await i.url(`/contracts/${encodeURIComponent(T.contractId)}/amendments`).post({amendmentType:T.amendmentType,discountCode:T.discountCode})).json()}async function lr(T){return await i.url(`/amendments/${encodeURIComponent(T)}/confirm`).post(),!0}async function fr(){const T=await Qr(!1),M=new URL(`${vr("account",e.environment)}/subscriptions/${e.clientId}`);T&&(M.hash=`#access_token=${T}`),window.location.href=M.toString()}return{autoOnboardProduct:Z,cancelContract:y,confirmAmendment:lr,createAmendment:Je,createCheckout:ce,deleteTag:re,deleteTally:O,deleteUserMetadata:q,generateLink:ie,getBill:g,getBills:b,getCheckout:Re,getProxyContent:f,getContract:m,getContracts:v,getEntitlement:l,getEntitlementAccess:u,getEntitlements:s,getFulfillments:h,requestDelivery:d,getPaywall:Te,getPaymentIssues:_,getProfile:Q,getProduct:te,getSubscriptions:E,getTally:D,getTallies:x,getTags:z,getTransaction:w,getTransactions:p,getUserMetadata:B,hasAccess:c,isSpotifyLinked:N,linkSpotify:G,listUserMetadata:C,openHostedAccountPage:fr,pushTally:Y,setTag:L,setUserMetadata:k,unlinkSpotify:H,updateCheckout:oe,updateProfile:S,getVendorSettings:Fe,listVendors:Ce}}const py=["AdHeader","AdContainer","AD_Top","homead","ad-lead"];function my(){return new Promise(e=>{const r=py.map(t=>{const n=document.createElement("div");return n.innerHTML="&nbsp;",n.id=t,n.style.position="absolute",document.body.appendChild(n),n});window.setTimeout(()=>{const t=!r.every(n=>document.querySelector(`#${n.id}`)?.offsetParent);r.forEach(n=>n.remove()),e(t)},100)})}function gy(){const e=navigator.userAgent.toLowerCase(),r=[{name:"Facebook",regex:/fbav|fban/i},{name:"LinkedIn",regex:/linkedin/i},{name:"Instagram",regex:/instagram/i},{name:"Gmail",regex:/gmail/i},{name:"Twitter",regex:/twitter/i},{name:"WeChat",regex:/micromessenger/i},{name:"Line",regex:/line/i},{name:"Snapchat",regex:/snapchat/i},{name:"Pinterest",regex:/pinterest/i},{name:"Kakao",regex:/kakaotalk/i},{name:"Skype",regex:/skype/i},{name:"WhatsApp",regex:/whatsapp/i}];for(const t of r)if(t.regex.test(e))return{isInAppBrowser:!0,browserName:t.name};return/; wv\)/.test(e)?{isInAppBrowser:!0,browserName:"Unknown In-App Browser"}:{isInAppBrowser:!1,browserName:null}}const bv="sesamyFlags";async function Sv(e){try{localStorage.setItem(bv,JSON.stringify(e))}catch{ye("Failed to save flags to localStorage")}}async function yy(e,r){const t=await Cn();t[e]=r,await Sv(t)}async function wy(e){return(await Cn())[e]}async function by(e){const r=await Cn();e in r&&(delete r[e],await Sv(r))}async function Cn(){try{const e=localStorage.getItem(bv);return e?JSON.parse(e):{}}catch{return{}}}function Sy(e){const{autoOnboardProduct:r,cancelContract:t,createCheckout:n,deleteTag:a,deleteTally:i,deleteUserMetadata:o,generateLink:s,getBill:c,getBills:l,getCheckout:u,getContract:f,getContracts:h,getEntitlement:d,getEntitlementAccess:v,getEntitlements:m,getFulfillments:y,getPaywall:E,getPaymentIssues:b,getProfile:g,getProduct:p,getProxyContent:w,getSubscriptions:k,getTags:q,getTally:C,getTallies:B,getTransaction:z,getTransactions:re,getUserMetadata:L,getVendorSettings:D,listVendors:x,hasAccess:O,isSpotifyLinked:Y,linkSpotify:te,listUserMetadata:Q,openHostedAccountPage:S,pushTally:_,requestDelivery:N,setTag:H,setUserMetadata:G,unlinkSpotify:Z,updateCheckout:fe,updateProfile:ie}=vy(e),ce={analytics:{track:sv},attribution:{get:un,set:wv},auth:{getUser:g,getTokenSilently:Qr,isAuthenticated:jt,loginWithRedirect:kn,loginWithPopup:hv,login:Zg,logout:Es,setToken:Ho},bills:{get:c,list:l},browser:{detectAdblock:my,isInAppBrowser:gy,isIncognito:vs},checkouts:{create:n,get:u,update:fe},clearCache:nr,content:{list:Lg,get:Is,getLanguage:rn,unlock:qg,getPropertyFromHTML:tv},contracts:{cancel:t,get:f,list:h},entitlements:{access:v,get:d,hasAccess:O,list:m,signedLinks:_s},events:{emit:uv,cancel:zg},flags:{get:wy,set:yy,list:Cn,delete:by},fulfillments:{list:y,requestDelivery:N},generateLink:s,getPaymentIssues:b,getVersion:Iy,isReady:()=>exports.isInitialized,log:ye,paywalls:{get:E},products:{autoOnboard:r,get:p,linkSpotify:te},profile:{get:g,isSpotifyLinked:Y,openHostedAccountPage:S,unlinkSpotify:Z,update:ie},proxy:{getContent:w},subscriptions:{list:k},tags:{delete:a,list:q,set:H},tallies:{delete:i,get:C,list:B,push:_},transactions:{get:z,list:re},userMetadata:{delete:o,get:L,list:Q,set:G},vendors:{get:D,list:x},setToken:Ho};return e.namespace&&(window[e.namespace]=ce),ce}function Iy(){return Ss}function Py(e,r){e.style.position="relative",e.style.height="200px",e.style.overflow="hidden";let n=0;const a=Array.from(e.children);for(const o of a){const s=o.offsetHeight;n+s>200?o.remove():n+=s}const i=document.createElement("style");i.innerHTML=`
37
- ${r.selector}::before {
34
+ **/var Ko={d:(r,e)=>{for(var t in e)Ko.o(e,t)&&!Ko.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},o:(r,e)=>Object.prototype.hasOwnProperty.call(r,e)},ys={};Ko.d(ys,{A:()=>Km,k:()=>ws});var Et=function(r,e,t,n){return new(t||(t=Promise))(function(a,i){function o(l){try{c(n.next(l))}catch(u){i(u)}}function s(l){try{c(n.throw(l))}catch(u){i(u)}}function c(l){var u;l.done?a(l.value):(u=l.value,u instanceof t?u:new t(function(f){f(u)})).then(o,s)}c((n=n.apply(r,[])).next())})},Rt=function(r,e){var t,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(l){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(t=1,n&&(a=2&u[0]?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(a=o.trys,!((a=a.length>0&&a[a.length-1])||u[0]!==6&&u[0]!==2)){o=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(u[0]===6&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(r,o)}catch(f){u=[6,f],n=0}finally{t=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([c,l])}}};function ws(){return Et(this,void 0,Promise,function(){return Rt(this,function(r){switch(r.label){case 0:return[4,new Promise(function(e,t){var n="Unknown",a=!1;function i(d){a||(a=!0,e({isPrivate:d,browserName:n}))}function o(){var d=0,v=parseInt("-1");try{v.toFixed(v)}catch(p){d=p.message.length}return d}function s(){return navigator.msSaveBlob!==void 0&&function(d){try{return d===eval.toString().length}catch{return!1}}(39)}function c(){var d;return Et(this,void 0,void 0,function(){var v,p;return Rt(this,function(g){switch(g.label){case 0:return g.trys.push([0,2,,3]),[4,navigator.storage.getDirectory()];case 1:return g.sent(),i(!1),[3,3];case 2:return v=g.sent(),p=v,v instanceof Error&&(p=(d=v.message)!==null&&d!==void 0?d:v),typeof p!="string"?(i(!1),[2]):(i(!!p.includes("unknown transient reason")),[3,3]);case 3:return[2]}})})}function l(){var d;return Et(this,void 0,Promise,function(){return Rt(this,function(v){switch(v.label){case 0:return((d=navigator.storage)===null||d===void 0?void 0:d.getDirectory)===void 0?[3,2]:[4,c()];case 1:return v.sent(),[3,3];case 2:navigator.maxTouchPoints!==void 0?function(){var p=String(Math.random());try{var g=indexedDB.open(p,1);g.onupgradeneeded=function(E){var b=E.target.result,y=function(m){i(m)};try{b.createObjectStore("t",{autoIncrement:!0}).put(new Blob),y(!1)}catch(m){(m.message||"").includes("are not yet supported")?y(!0):y(!1)}finally{b.close(),indexedDB.deleteDatabase(p)}},g.onerror=function(){return i(!1)}}catch{i(!1)}}():function(){var p=window.openDatabase,g=window.localStorage;try{p(null,null,null,null)}catch{return void i(!0)}try{g.setItem("test","1"),g.removeItem("test")}catch{return void i(!0)}i(!1)}(),v.label=3;case 3:return[2]}})})}function u(){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(d,v){var p;i(Math.round(v/1048576)<2*Math.round(((p=window).performance!==void 0&&p.performance.memory!==void 0&&p.performance.memory.jsHeapSizeLimit!==void 0?performance.memory.jsHeapSizeLimit:1073741824)/1048576))},function(d){t(new Error("detectIncognito somehow failed to query storage quota: "+d.message))})}function f(){self.Promise!==void 0&&self.Promise.allSettled!==void 0?u():(0,window.webkitRequestFileSystem)(0,1,function(){i(!1)},function(){i(!0)})}function h(){return Et(this,void 0,Promise,function(){var d,v;return Rt(this,function(p){switch(p.label){case 0:if(!navigator.storage||!navigator.storage.getDirectory)return[3,4];p.label=1;case 1:return p.trys.push([1,3,,4]),[4,navigator.storage.getDirectory()];case 2:return p.sent(),i(!1),[3,4];case 3:return d=p.sent(),typeof(v=d instanceof Error&&typeof d.message=="string"?d.message:String(d))!="string"?(i(!1),[2]):(i(v.includes("Security error")),[2]);case 4:return i(navigator.serviceWorker===void 0),[2]}})})}(function(){return Et(this,void 0,Promise,function(){return Rt(this,function(d){switch(d.label){case 0:return o()!==44?[3,2]:(n="Safari",[4,l()]);case 1:return d.sent(),[3,6];case 2:return o()!==51?[3,3]:(v=navigator.userAgent,n=v.match(/Chrome/)?navigator.brave!==void 0?"Brave":v.match(/Edg/)?"Edge":v.match(/OPR/)?"Opera":"Chrome":"Chromium",f(),[3,6]);case 3:return o()!==25?[3,5]:(n="Firefox",[4,h()]);case 4:return d.sent(),[3,6];case 5:s()?(n="Internet Explorer",i(window.indexedDB===void 0)):t(new Error("detectIncognito cannot determine the browser")),d.label=6;case 6:return[2]}var v})})})().catch(t)})];case 1:return[2,r.sent()]}})})}typeof window<"u"&&(window.detectIncognito=ws);const Km=ws;ys.A;const zm=ys.k,en="sesamy_incognito_mode";function bs(){try{const r=sessionStorage.getItem(en);return r===null?void 0:r==="true"}catch{return}}async function Bm(){try{const r=sessionStorage.getItem(en);if(r!==null)return r==="true";const{isPrivate:e}=await zm();return sessionStorage.setItem(en,e.toString()),e}catch{try{sessionStorage.setItem(en,"false")}catch{}return!1}}function Lt(){return typeof window<"u"}function Hf(r,e,t,n,a){for(e=e.split?e.split("."):e,n=0;n<e.length;n++)r=r?r[e[n]]:a;return r===a?t:r}var Bt="undefined",Kf="object",zo=function(){},Kh="any",zh="*",Hr="__",sn=typeof process<"u"?process:{};sn.env&&sn.env.NODE_ENV;var xe=typeof document<"u";sn.versions!=null&&sn.versions.node!=null;typeof Deno<"u"&&Deno.core;xe&&window.name==="nodejs"||typeof navigator<"u"&&navigator.userAgent!==void 0&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));function Bh(r,e){return e.charAt(0)[r]()+e.slice(1)}var Gm=Bh.bind(null,"toUpperCase"),Wm=Bh.bind(null,"toLowerCase");function Vm(r){return Gh(r)?Gm("null"):typeof r=="object"?Xm(r):Object.prototype.toString.call(r).slice(8,-1)}function un(r,e){e===void 0&&(e=!0);var t=Vm(r);return e?Wm(t):t}function zt(r,e){return typeof e===r}var Ve=zt.bind(null,"function"),Cr=zt.bind(null,"string"),tt=zt.bind(null,"undefined"),Jm=zt.bind(null,"boolean");zt.bind(null,"symbol");function Gh(r){return r===null}function Zm(r){return un(r)==="number"&&!isNaN(r)}function Wh(r){return un(r)==="array"}function Ge(r){if(!Ym(r))return!1;for(var e=r;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(r)===e}function Ym(r){return r&&(typeof r=="object"||r!==null)}function Xm(r){return Ve(r.constructor)?r.constructor.name:null}function Qm(r){return r instanceof Error||Cr(r.message)&&r.constructor&&Zm(r.constructor.stackTraceLimit)}function Vh(r,e){if(typeof e!="object"||Gh(e))return!1;if(e instanceof r)return!0;var t=un(new r(""));if(Qm(e))for(;e;){if(un(e)===t)return!0;e=Object.getPrototypeOf(e)}return!1}Vh.bind(null,TypeError);Vh.bind(null,SyntaxError);function _n(r,e){var t=r instanceof Element||r instanceof HTMLDocument;return t&&e?eg(r,e):t}function eg(r,e){return e===void 0&&(e=""),r&&r.nodeName===e.toUpperCase()}function kn(r){var e=[].slice.call(arguments,1);return function(){return r.apply(void 0,[].slice.call(arguments).concat(e))}}kn(_n,"form");kn(_n,"button");kn(_n,"input");kn(_n,"select");function rg(r){return r?Wh(r)?r:[r]:[]}function zf(r){try{return decodeURIComponent(r.replace(/\+/g," "))}catch{return null}}function tg(){if(xe){var r=navigator,e=r.languages;return r.userLanguage||(e&&e.length?e[0]:r.language)}}function ng(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function ag(r){return function(e){for(var t,n=Object.create(null),a=/([^&=]+)=?([^&]*)/g;t=a.exec(e);){var i=zf(t[1]),o=zf(t[2]);if(i)if(i.substring(i.length-2)==="[]"){var s=n[i=i.substring(0,i.length-2)]||(n[i]=[]);n[i]=Array.isArray(s)?s:[],n[i].push(o)}else n[i]=o===""||o}for(var c in n){var l=c.split("[");l.length>1&&(ig(n,l.map(function(u){return u.replace(/[?[\]\\ ]/g,"")}),n[c]),delete n[c])}return n}(function(e){return xe&&window.location.search.substring(1)}())}function ig(r,e,t){for(var n=e.length-1,a=0;a<n;++a){var i=e[a];if(i==="__proto__"||i==="constructor")break;i in r||(r[i]={}),r=r[i]}r[e[n]]=t}function On(){for(var r="",e=0,t=4294967295*Math.random()|0;e++<36;){var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[e-1],a=15&t;r+=n=="-"||n=="4"?n:(n=="x"?a:3&a|8).toString(16),t=e%8==0?4294967295*Math.random()|0:t>>4}return r}function og(r,e){var t,n,a,i=null,o=0,s=function(){o=new Date,i=null,a=r.apply(t,n)};return function(){var c=new Date;o||(o=c);var l=e-(c-o);return t=this,n=arguments,l<=0?(clearTimeout(i),i=null,o=c,a=r.apply(t,n)):i||(i=setTimeout(s,l)),a}}var Ct="global",ut=Hr+"global"+Hr,ct=typeof self===Kf&&self.self===self&&self||typeof global===Kf&&global.global===global&&global||void 0;function Kr(r){return ct[ut][r]}function zr(r,e){return ct[ut][r]=e}function yt(r){delete ct[ut][r]}function wt(r,e,t){var n;try{if(Ss(r)){var a=window[r];n=a[e].bind(a)}}catch{}return n||t}ct[ut]||(ct[ut]={});var Gt={};function Ss(r){if(typeof Gt[r]!==Bt)return Gt[r];try{var e=window[r];e.setItem(Bt,Bt),e.removeItem(Bt)}catch{return Gt[r]=!1}return Gt[r]=!0}function ne(){return ne=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},ne.apply(this,arguments)}var _r="function",Sr="undefined",sg="@@redux/"+Math.random().toString(36),Bf=function(){return typeof Symbol===_r&&Symbol.observable||"@@observable"}(),Wt=" != "+_r;function Jh(r,e,t){var n;if(typeof e===_r&&typeof t===Sr&&(t=e,e=void 0),typeof t!==Sr){if(typeof t!==_r)throw new Error("enhancer"+Wt);return t(Jh)(r,e)}if(typeof r!==_r)throw new Error("reducer"+Wt);var a=r,i=e,o=[],s=o,c=!1;function l(){s===o&&(s=o.slice())}function u(){return i}function f(d){if(typeof d!==_r)throw new Error("Listener"+Wt);var v=!0;return l(),s.push(d),function(){if(v){v=!1,l();var p=s.indexOf(d);s.splice(p,1)}}}function h(d){if(!Ge(d))throw new Error("Act != obj");if(typeof d.type===Sr)throw new Error("ActType "+Sr);if(c)throw new Error("Dispatch in reducer");try{c=!0,i=a(i,d)}finally{c=!1}for(var v=o=s,p=0;p<v.length;p++)(0,v[p])();return d}return h({type:"@@redux/INIT"}),(n={dispatch:h,subscribe:f,getState:u,replaceReducer:function(d){if(typeof d!==_r)throw new Error("next reducer"+Wt);a=d,h({type:"@@redux/INIT"})}})[Bf]=function(){var d,v=f;return(d={subscribe:function(p){if(typeof p!="object")throw new TypeError("Observer != obj");function g(){p.next&&p.next(u())}return g(),{unsubscribe:v(g)}}})[Bf]=function(){return this},d},n}function ug(r,e){var t=e&&e.type;return"action "+(t&&t.toString()||"?")+"reducer "+r+" returns "+Sr}function lt(){var r=[].slice.call(arguments);return r.length===0?function(e){return e}:r.length===1?r[0]:r.reduce(function(e,t){return function(){return e(t.apply(void 0,[].slice.call(arguments)))}})}function cg(){var r=arguments;return function(e){return function(t,n,a){var i,o=e(t,n,a),s=o.dispatch,c={getState:o.getState,dispatch:function(l){return s(l)}};return i=[].slice.call(r).map(function(l){return l(c)}),ne({},o,{dispatch:s=lt.apply(void 0,i)(o.dispatch)})}}}var Ar=Hr+"anon_id",$r=Hr+"user_id",at=Hr+"user_traits",Tr="userId",nt="anonymousId",rn=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],Bo=["name","EVENTS","config","loaded"],te=rn.reduce(function(r,e){return r[e]=e,r},{registerPluginType:function(r){return"registerPlugin:"+r},pluginReadyType:function(r){return"ready:"+r}}),Gf=/^utm_/,Wf=/^an_prop_/,Vf=/^an_trait_/;function lg(r){var e=r.storage.setItem;return function(t){return function(n){return function(a){if(a.type===te.bootstrap){var i=a.params,o=a.user,s=a.persistedUser,c=a.initialUser,l=s.userId===o.userId;s.anonymousId!==o.anonymousId&&e(Ar,o.anonymousId),l||e($r,o.userId),c.traits&&e(at,ne({},l&&s.traits?s.traits:{},c.traits));var u=Object.keys(a.params);if(u.length){var f=i.an_uid,h=i.an_event,d=u.reduce(function(v,p){if(p.match(Gf)||p.match(/^(d|g)clid/)){var g=p.replace(Gf,"");v.campaign[g==="campaign"?"name":g]=i[p]}return p.match(Wf)&&(v.props[p.replace(Wf,"")]=i[p]),p.match(Vf)&&(v.traits[p.replace(Vf,"")]=i[p]),v},{campaign:{},props:{},traits:{}});t.dispatch(ne({type:te.params,raw:i},d,f?{userId:f}:{})),f&&setTimeout(function(){return r.identify(f,d.traits)},0),h&&setTimeout(function(){return r.track(h,d.props)},0),Object.keys(d.campaign).length&&t.dispatch({type:te.campaign,campaign:d.campaign})}}return n(a)}}}}function fg(r){return function(e,t){if(e===void 0&&(e={}),t===void 0&&(t={}),t.type===te.setItemEnd){if(t.key===Ar)return ne({},e,{anonymousId:t.value});if(t.key===$r)return ne({},e,{userId:t.value})}switch(t.type){case te.identify:return Object.assign({},e,{userId:t.userId,traits:ne({},e.traits,t.traits)});case te.reset:return[$r,Ar,at].forEach(function(n){r.removeItem(n)}),Object.assign({},e,{userId:null,anonymousId:null,traits:{}});default:return e}}}function Jf(r){return{userId:r.getItem($r),anonymousId:r.getItem(Ar),traits:r.getItem(at)}}var Go=function(r){return Hr+"TEMP"+Hr+r};function dg(r){var e=r.storage,t=e.setItem,n=e.removeItem,a=e.getItem;return function(i){return function(o){return function(s){var c=s.userId,l=s.traits,u=s.options;if(s.type===te.reset&&([$r,at,Ar].forEach(function(d){n(d)}),[Tr,nt,"traits"].forEach(function(d){yt(Go(d))})),s.type===te.identify){a(Ar)||t(Ar,On());var f=a($r),h=a(at)||{};f&&f!==c&&i.dispatch({type:te.userIdChanged,old:{userId:f,traits:h},new:{userId:c,traits:l},options:u}),c&&t($r,c),l&&t(at,ne({},h,l))}return o(s)}}}}var _t={};function Zf(r,e){_t[r]&&Ve(_t[r])&&(_t[r](e),delete _t[r])}function Zh(r,e,t){return new Promise(function(n,a){return e()?n(r):t<1?a(ne({},r,{queue:!0})):new Promise(function(i){return setTimeout(i,10)}).then(function(i){return Zh(r,e,t-10).then(n,a)})})}function hg(r){return{abort:r}}function Yh(r,e,t){var n={},a=e(),i=r.getState(),o=i.plugins,s=i.queue,c=i.user;if(!i.context.offline&&s&&s.actions&&s.actions.length){var l=s.actions.reduce(function(f,h,d){return o[h.plugin].loaded?(f.process.push(h),f.processIndex.push(d)):(f.requeue.push(h),f.requeueIndex.push(d)),f},{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(l.processIndex&&l.processIndex.length){l.processIndex.forEach(function(f){var h=s.actions[f],d=h.plugin,v=h.payload.type,p=a[d][v];if(p&&Ve(p)){var g,E=function(m,w){return m===void 0&&(m={}),w===void 0&&(w={}),[Tr,nt].reduce(function(O,N){return m.hasOwnProperty(N)&&w[N]&&w[N]!==m[N]&&(O[N]=w[N]),O},m)}(h.payload,c),b=n[E.meta.rid];if(!b&&(g=p({payload:E,config:o[d].config,instance:t,abort:hg}))&&Ge(g)&&g.abort)return void(n[E.meta.rid]=!0);if(!b){var y=v+":"+d;r.dispatch(ne({},E,{type:y,_:{called:y,from:"queueDrain"}}))}}});var u=s.actions.filter(function(f,h){return!~l.processIndex.indexOf(h)});s.actions=u}}}var Oo=function(r){var e=r.data,t=r.action,n=r.instance,a=r.state,i=r.allPlugins,o=r.allMatches,s=r.store,c=r.EVENTS;try{var l=a.plugins,u=a.context,f=t.type,h=f.match(it),d=e.exact.map(function(g){return g.pluginName});h&&(d=o.during.map(function(g){return g.pluginName}));var v=function(g,E){return function(b,y,m){var w=y.config,O=y.name,N=O+"."+b.type;m&&(N=m.event);var A=b.type.match(it)?function(K,z,ae,L,$){return function(q,k){var Y=L?L.name:K,re=k&&qt(k)?k:ae;if(L&&(!(re=k&&qt(k)?k:[K]).includes(K)||re.length!==1))throw new Error("Method "+z+" can only abort "+K+" plugin. "+JSON.stringify(re)+" input valid");return ne({},$,{abort:{reason:q,plugins:re,caller:z,_:Y}})}}(O,N,E,m,b):function(K,z){return function(){throw new Error(K.type+" action not cancellable. Remove abort in "+z)}}(b,N);return{payload:vg(b),instance:g,config:w||{},abort:A}}}(n,d),p=e.exact.reduce(function(g,E){var b=E.pluginName,y=E.methodName,m=!1;return y.match(/^initialize/)||y.match(/^reset/)||(m=!l[b].loaded),u.offline&&y.match(/^(page|track|identify)/)&&(m=!0),g[""+b]=m,g},{});return Promise.resolve(e.exact.reduce(function(g,E,b){try{var y=E.pluginName;return Promise.resolve(g).then(function(m){function w(){return Promise.resolve(m)}var O=function(){if(e.namespaced&&e.namespaced[y])return Promise.resolve(e.namespaced[y].reduce(function(N,A,K){try{return Promise.resolve(N).then(function(z){return A.method&&Ve(A.method)?(function(q,k){var Y=nd(q);if(Y&&Y.name===k){var re=nd(Y.method);throw new Error([k+" plugin is calling method "+q,"Plugins cant call self","Use "+Y.method+" "+(re?"or "+re.method:"")+" in "+k+" plugin insteadof "+q].join(`
35
+ `))}}(A.methodName,A.pluginName),Promise.resolve(A.method({payload:z,instance:n,abort:(ae=z,L=y,$=A.pluginName,function(q,k){return ne({},ae,{abort:{reason:q,plugins:k||[L],caller:f,from:$||L}})}),config:Qf(A.pluginName,l,i),plugins:l})).then(function(q){var k=Ge(q)?q:{};return Promise.resolve(ne({},z,k))})):z;var ae,L,$})}catch(z){return Promise.reject(z)}},Promise.resolve(t))).then(function(N){m[y]=N});m[y]=t}();return O&&O.then?O.then(w):w()})}catch(m){return Promise.reject(m)}},Promise.resolve({}))).then(function(g){return Promise.resolve(e.exact.reduce(function(E,b,y){try{var m=e.exact.length===y+1,w=b.pluginName,O=i[w];return Promise.resolve(E).then(function(N){var A=g[w]?g[w]:{};if(h&&(A=N),Ao(A,w))return Co({data:A,method:f,instance:n,pluginName:w,store:s}),Promise.resolve(N);if(Ao(N,w))return m&&Co({data:N,method:f,instance:n,store:s}),Promise.resolve(N);if(p.hasOwnProperty(w)&&p[w]===!0)return s.dispatch({type:"queue",plugin:w,payload:A,_:{called:"queue",from:"queueMechanism"}}),Promise.resolve(N);var K=v(g[w],i[w]);return Promise.resolve(O[f]({abort:K.abort,payload:A,instance:n,config:Qf(w,l,i),plugins:l})).then(function(z){var ae=Ge(z)?z:{},L=ne({},N,ae),$=g[w];if(Ao($,w))Co({data:$,method:f,instance:n,pluginName:w,store:s});else{var q=f+":"+w;(q.match(/:/g)||[]).length<2&&!f.match(Yf)&&!f.match(Xf)&&n.dispatch(ne({},h?L:A,{type:q,_:{called:q,from:"submethod"}}))}return Promise.resolve(L)})})}catch(N){return Promise.reject(N)}},Promise.resolve(t))).then(function(E){if(!(f.match(it)||f.match(/^registerPlugin/)||f.match(Xf)||f.match(Yf)||f.match(/^params/)||f.match(/^userIdChanged/))){if(c.plugins.includes(f),E._&&E._.originalAction===f)return E;var b=ne({},E,{_:{originalAction:E.type,called:E.type,from:"engineEnd"}});Xh(E,e.exact.length)&&!f.match(/End$/)&&(b=ne({},b,{type:E.type+"Aborted"})),s.dispatch(b)}return E})})}catch(g){return Promise.reject(g)}},it=/Start$/,Yf=/^bootstrap/,Xf=/^ready/;function Co(r){var e=r.pluginName,t=r.method+"Aborted"+(e?":"+e:"");r.store.dispatch(ne({},r.data,{type:t,_:{called:t,from:"abort"}}))}function Qf(r,e,t){var n=e[r]||t[r];return n&&n.config?n.config:{}}function ed(r,e){return e.reduce(function(t,n){return n[r]?t.concat({methodName:r,pluginName:n.name,method:n[r]}):t},[])}function rd(r,e){var t=r.replace(it,""),n=e?":"+e:"";return[""+r+n,""+t+n,t+"End"+n]}function Ao(r,e){var t=r.abort;return!!t&&(t===!0||td(t,e)||t&&td(t.plugins,e))}function Xh(r,e){var t=r.abort;if(!t)return!1;if(t===!0||Cr(t))return!0;var n=t.plugins;return qt(t)&&t.length===e||qt(n)&&n.length===e}function qt(r){return Array.isArray(r)}function td(r,e){return!(!r||!qt(r))&&r.includes(e)}function nd(r){var e=r.match(/(.*):(.*)/);return!!e&&{method:e[1],name:e[2]}}function vg(r){return Object.keys(r).reduce(function(e,t){return t==="type"||(e[t]=Ge(r[t])?Object.assign({},r[t]):r[t]),e},{})}function pg(r,e,t){var n={};return function(a){return function(i){return function(o){try{var s,c=function(m){return s?m:i(f)},l=o.type,u=o.plugins,f=o;if(o.abort)return Promise.resolve(i(o));if(l===te.enablePlugin&&a.dispatch({type:te.initializeStart,plugins:u,disabled:[],fromEnable:!0,meta:o.meta}),l===te.disablePlugin&&setTimeout(function(){return Zf(o.meta.rid,{payload:o})},0),l===te.initializeEnd){var h=e(),d=Object.keys(h),v=d.filter(function(m){return u.includes(m)}).map(function(m){return h[m]}),p=[],g=[],E=o.disabled,b=v.map(function(m){var w=m.loaded,O=m.name,N=m.config;return Zh(m,function(){return w({config:N})},1e4).then(function(A){return n[O]||(a.dispatch({type:te.pluginReadyType(O),name:O,events:Object.keys(m).filter(function(K){return!Bo.includes(K)})}),n[O]=!0),p=p.concat(O),m}).catch(function(A){if(A instanceof Error)throw new Error(A);return g=g.concat(A.name),A})});Promise.all(b).then(function(m){var w={plugins:p,failed:g,disabled:E};setTimeout(function(){d.length===b.length+E.length&&a.dispatch(ne({},{type:te.ready},w))},0)})}var y=function(){if(l!==te.bootstrap)return/^ready:([^:]*)$/.test(l)&&setTimeout(function(){return Yh(a,e,r)},0),Promise.resolve(function(m,w,O,N,A){try{var K=Ve(w)?w():w,z=m.type,ae=z.replace(it,"");if(m._&&m._.called)return Promise.resolve(m);var L=O.getState(),$=(Y=K,(re=L.plugins)===void 0&&(re={}),(Q=m.options)===void 0&&(Q={}),Object.keys(Y).filter(function(S){var T=Q.plugins||{};return Jm(T[S])?T[S]:T.all!==!1&&(!re[S]||re[S].enabled!==!1)}).map(function(S){return Y[S]}));z===te.initializeStart&&m.fromEnable&&($=Object.keys(L.plugins).filter(function(S){var T=L.plugins[S];return m.plugins.includes(S)&&!T.initialized}).map(function(S){return K[S]}));var q=$.map(function(S){return S.name}),k=function(S,T,x){var H=rd(S).map(function(B){return ed(B,T)});return T.reduce(function(B,Z){var fe=Z.name,ie=rd(S,fe).map(function(_e){return ed(_e,T)}),ce=ie[0],oe=ie[1],Re=ie[2];return ce.length&&(B.beforeNS[fe]=ce),oe.length&&(B.duringNS[fe]=oe),Re.length&&(B.afterNS[fe]=Re),B},{before:H[0],beforeNS:{},during:H[1],duringNS:{},after:H[2],afterNS:{}})}(z,$);return Promise.resolve(Oo({action:m,data:{exact:k.before,namespaced:k.beforeNS},state:L,allPlugins:K,allMatches:k,instance:O,store:N,EVENTS:A})).then(function(S){function T(){var B=function(){if(z.match(it))return Promise.resolve(Oo({action:ne({},x,{type:ae+"End"}),data:{exact:k.after,namespaced:k.afterNS},state:L,allPlugins:K,allMatches:k,instance:O,store:N,EVENTS:A})).then(function(Z){Z.meta&&Z.meta.hasCallback&&Zf(Z.meta.rid,{payload:Z})})}();return B&&B.then?B.then(function(){return S}):S}if(Xh(S,q.length))return S;var x,H=function(){if(z!==ae)return Promise.resolve(Oo({action:ne({},S,{type:ae}),data:{exact:k.during,namespaced:k.duringNS},state:L,allPlugins:K,allMatches:k,instance:O,store:N,EVENTS:A})).then(function(B){x=B});x=S}();return H&&H.then?H.then(T):T()})}catch(S){return Promise.reject(S)}var Y,re,Q}(o,e,r,a,t)).then(function(m){return s=1,i(m)})}();return Promise.resolve(y&&y.then?y.then(c):c(y))}catch(m){return Promise.reject(m)}}}}}function mg(r){return function(e){return function(t){return function(n){var a=n.type,i=n.key,o=n.value,s=n.options;if(a===te.setItem||a===te.removeItem){if(n.abort)return t(n);a===te.setItem?r.setItem(i,o,s):r.removeItem(i,s)}return t(n)}}}}var gg=function(){var r=this;this.before=[],this.after=[],this.addMiddleware=function(e,t){r[t]=r[t].concat(e)},this.removeMiddleware=function(e,t){var n=r[t].findIndex(function(a){return a===e});n!==-1&&(r[t]=[].concat(r[t].slice(0,n),r[t].slice(n+1)))},this.dynamicMiddlewares=function(e){return function(t){return function(n){return function(a){var i={getState:t.getState,dispatch:function(s){return t.dispatch(s)}},o=r[e].map(function(s){return s(i)});return lt.apply(void 0,o)(n)(a)}}}}};function yg(r){return function(e,t){e===void 0&&(e={});var n={};if(t.type==="initialize:aborted")return e;if(/^registerPlugin:([^:]*)$/.test(t.type)){var a=ad(t.type,"registerPlugin"),i=r()[a];if(!i||!a)return e;var o=t.enabled,s=i.config;return n[a]={enabled:o,initialized:!!o&&!i.initialize,loaded:!!o&&!!i.loaded({config:s}),config:s},ne({},e,n)}if(/^initialize:([^:]*)$/.test(t.type)){var c=ad(t.type,te.initialize),l=r()[c];return l&&c?(n[c]=ne({},e[c],{initialized:!0,loaded:!!l.loaded({config:l.config})}),ne({},e,n)):e}if(/^ready:([^:]*)$/.test(t.type))return n[t.name]=ne({},e[t.name],{loaded:!0}),ne({},e,n);switch(t.type){case te.disablePlugin:return ne({},e,id(t.plugins,!1,e));case te.enablePlugin:return ne({},e,id(t.plugins,!0,e));default:return e}}}function ad(r,e){return r.substring(e.length+1,r.length)}function id(r,e,t){return r.reduce(function(n,a){return n[a]=ne({},t[a],{enabled:e}),n},t)}function Qh(r){try{return JSON.parse(JSON.stringify(r))}catch{}return r}var wg={last:{},history:[]};function bg(r,e){r===void 0&&(r=wg);var t=e.options,n=e.meta;if(e.type===te.track){var a=Qh(ne({event:e.event,properties:e.properties},Object.keys(t).length&&{options:t},{meta:n}));return ne({},r,{last:a,history:r.history.concat(a)})}return r}var Sg={actions:[]};function Ig(r,e){r===void 0&&(r=Sg);var t=e.payload;switch(e.type){case"queue":var n;return n=t&&t.type&&t.type===te.identify?[e].concat(r.actions):r.actions.concat(e),ne({},r,{actions:n});case"dequeue":return[];default:return r}}var ev=/#.*$/;function Pg(r){var e=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(r);return"/"+(e&&e[3]?e[3].split("?")[0].replace(ev,""):"")}var rv,tv,nv,av,Eg=function(r){if(r===void 0&&(r={}),!xe)return r;var e=document,t=e.title,n=e.referrer,a=window,i=a.location,o=a.innerWidth,s=a.innerHeight,c=i.hash,l=i.search,u=function(h){var d=function(){if(xe){for(var v,p=document.getElementsByTagName("link"),g=0;v=p[g];g++)if(v.getAttribute("rel")==="canonical")return v.getAttribute("href")}}();return d?d.match(/\?/)?d:d+h:window.location.href.replace(ev,"")}(l),f={title:t,url:u,path:Pg(u),hash:c,search:l,width:o,height:s};return n&&n!==""&&(f.referrer=n),ne({},f,r)},Rg={last:{},history:[]};function Tg(r,e){r===void 0&&(r=Rg);var t=e.options;if(e.type===te.page){var n=Qh(ne({properties:e.properties,meta:e.meta},Object.keys(t).length&&{options:t}));return ne({},r,{last:n,history:r.history.concat(n)})}return r}rv=function(){if(!xe)return!1;var r=navigator.appVersion;return~r.indexOf("Win")?"Windows":~r.indexOf("Mac")?"MacOS":~r.indexOf("X11")?"UNIX":~r.indexOf("Linux")?"Linux":"Unknown OS"}(),tv=xe?document.referrer:null,nv=tg(),av=ng();var od={initialized:!1,sessionId:On(),app:null,version:null,debug:!1,offline:!!xe&&!navigator.onLine,os:{name:rv},userAgent:xe?navigator.userAgent:"node",library:{name:"analytics",version:"0.12.16"},timezone:av,locale:nv,campaign:{},referrer:tv};function _g(r,e){r===void 0&&(r=od);var t=r.initialized,n=e.campaign;switch(e.type){case te.campaign:return ne({},r,{campaign:n});case te.offline:return ne({},r,{offline:!0});case te.online:return ne({},r,{offline:!1});default:return t?r:ne({},od,r,{initialized:!0})}}var kg=["plugins","reducers","storage"];function Og(r,e,t){if(xe){var n=window[(t?"add":"remove")+"EventListener"];r.split(" ").forEach(function(a){n(a,e)})}}function Cg(r){var e=Og.bind(null,"online offline",function(t){return Promise.resolve(!navigator.onLine).then(r)});return e(!0),function(t){return e(!1)}}function iv(){return zr("analytics",[]),function(r){return function(e,t,n){var a=r(e,t,n),i=a.dispatch;return Object.assign(a,{dispatch:function(o){return ct[ut].analytics.push(o.action||o),i(o)}})}}}function sd(r){return function(){return lt(lt.apply(null,arguments),iv())}}function jo(r){return r?Wh(r)?r:[r]:[]}function ud(r,e,t){r===void 0&&(r={});var n,a,i=On();return e&&(_t[i]=(n=e,a=function(o){for(var s,c=o||Array.prototype.slice.call(arguments),l=0;l<c.length;l++)if(Ve(c[l])){s=c[l];break}return s}(t),function(o){a&&a(o),n(o)})),ne({},r,{rid:i,ts:new Date().getTime()},e?{hasCallback:!0}:{})}function Ag(r){r===void 0&&(r={});var e=r.reducers||{},t=r.initialUser||{},n=(r.plugins||[]).reduce(function(S,T){if(Ve(T))return S.middlewares=S.middlewares.concat(T),S;if(T.NAMESPACE&&(T.name=T.NAMESPACE),!T.name)throw new Error("https://lytics.dev/errors/1");T.config||(T.config={});var x=T.EVENTS?Object.keys(T.EVENTS).map(function(Z){return T.EVENTS[Z]}):[];S.pluginEnabled[T.name]=!(T.enabled===!1||T.config.enabled===!1),delete T.enabled,T.methods&&(S.methods[T.name]=Object.keys(T.methods).reduce(function(Z,fe){var ie;return Z[fe]=(ie=T.methods[fe],function(){for(var ce=Array.prototype.slice.call(arguments),oe=new Array(ie.length),Re=0;Re<ce.length;Re++)oe[Re]=ce[Re];return oe[oe.length]=w,ie.apply({instance:w},oe)}),Z},{}),delete T.methods);var H=Object.keys(T).concat(x),B=new Set(S.events.concat(H));if(S.events=Array.from(B),S.pluginsArray=S.pluginsArray.concat(T),S.plugins[T.name])throw new Error(T.name+"AlreadyLoaded");return S.plugins[T.name]=T,S.plugins[T.name].loaded||(S.plugins[T.name].loaded=function(){return!0}),S},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),a=r.storage?r.storage:{getItem:Kr,setItem:zr,removeItem:yt},i=function(S){return function(T,x,H){return x.getState("user")[T]||(H&&Ge(H)&&H[T]?H[T]:Jf(S)[T]||Kr(Go(T))||null)}}(a),o=n.plugins,s=n.events.filter(function(S){return!Bo.includes(S)}).sort(),c=new Set(s.concat(rn).filter(function(S){return!Bo.includes(S)})),l=Array.from(c).sort(),u=function(){return o},f=new gg,h=f.addMiddleware,d=f.removeMiddleware,v=f.dynamicMiddlewares,p=function(){throw new Error("Abort disabled inListener")},g=ag(),E=Jf(a),b=ne({},E,t,g.an_uid?{userId:g.an_uid}:{},g.an_aid?{anonymousId:g.an_aid}:{});b.anonymousId||(b.anonymousId=On());var y=ne({enable:function(S,T){return new Promise(function(x){k.dispatch({type:te.enablePlugin,plugins:jo(S),_:{originalAction:te.enablePlugin}},x,[T])})},disable:function(S,T){return new Promise(function(x){k.dispatch({type:te.disablePlugin,plugins:jo(S),_:{originalAction:te.disablePlugin}},x,[T])})}},n.methods),m=!1,w={identify:function(S,T,x,H){try{var B=Cr(S)?S:null,Z=Ge(S)?S:T,fe=x||{},ie=w.user();zr(Go(Tr),B);var ce=B||Z.userId||i(Tr,w,Z);return Promise.resolve(new Promise(function(oe){k.dispatch(ne({type:te.identifyStart,userId:ce,traits:Z||{},options:fe,anonymousId:ie.anonymousId},ie.id&&ie.id!==B&&{previousId:ie.id}),oe,[T,x,H])}))}catch(oe){return Promise.reject(oe)}},track:function(S,T,x,H){try{var B=Ge(S)?S.event:S;if(!B||!Cr(B))throw new Error("EventMissing");var Z=Ge(S)?S:T||{},fe=Ge(x)?x:{};return Promise.resolve(new Promise(function(ie){k.dispatch({type:te.trackStart,event:B,properties:Z,options:fe,userId:i(Tr,w,T),anonymousId:i(nt,w,T)},ie,[T,x,H])}))}catch(ie){return Promise.reject(ie)}},page:function(S,T,x){try{var H=Ge(S)?S:{},B=Ge(T)?T:{};return Promise.resolve(new Promise(function(Z){k.dispatch({type:te.pageStart,properties:Eg(H),options:B,userId:i(Tr,w,H),anonymousId:i(nt,w,H)},Z,[S,T,x])}))}catch(Z){return Promise.reject(Z)}},user:function(S){if(S===Tr||S==="id")return i(Tr,w);if(S===nt||S==="anonId")return i(nt,w);var T=w.getState("user");return S?Hf(T,S):T},reset:function(S){return new Promise(function(T){k.dispatch({type:te.resetStart},T,S)})},ready:function(S){return m&&S({plugins:y,instance:w}),w.on(te.ready,function(T){S(T),m=!0})},on:function(S,T){if(!S||!Ve(T))return!1;if(S===te.bootstrap)throw new Error(".on disabled for "+S);var x=/Start$|Start:/;if(S==="*"){var H=function(ie){return function(ce){return function(oe){return oe.type.match(x)&&T({payload:oe,instance:w,plugins:o}),ce(oe)}}},B=function(ie){return function(ce){return function(oe){return oe.type.match(x)||T({payload:oe,instance:w,plugins:o}),ce(oe)}}};return h(H,Vt),h(B,Jt),function(){d(H,Vt),d(B,Jt)}}var Z=S.match(x)?Vt:Jt,fe=function(ie){return function(ce){return function(oe){return oe.type===S&&T({payload:oe,instance:w,plugins:o,abort:p}),ce(oe)}}};return h(fe,Z),function(){return d(fe,Z)}},once:function(S,T){if(!S||!Ve(T))return!1;if(S===te.bootstrap)throw new Error(".once disabled for "+S);var x=w.on(S,function(H){T({payload:H.payload,instance:w,plugins:o,abort:p}),x()});return x},getState:function(S){var T=k.getState();return S?Hf(T,S):Object.assign({},T)},dispatch:function(S){var T=Cr(S)?{type:S}:S;if(rn.includes(T.type))throw new Error("reserved action "+T.type);var x=ne({},T,{_:ne({originalAction:T.type},S._||{})});k.dispatch(x)},enablePlugin:y.enable,disablePlugin:y.disable,plugins:y,storage:{getItem:a.getItem,setItem:function(S,T,x){k.dispatch({type:te.setItemStart,key:S,value:T,options:x})},removeItem:function(S,T){k.dispatch({type:te.removeItemStart,key:S,options:T})}},setAnonymousId:function(S,T){w.storage.setItem(Ar,S,T)},events:{core:rn,plugins:s}},O=n.middlewares.concat([function(S){return function(T){return function(x){return x.meta||(x.meta=ud()),T(x)}}},v(Vt),pg(w,u,{all:l,plugins:s}),mg(a),lg(w),dg(w),v(Jt)]),N={context:_g,user:fg(a),page:Tg,track:bg,plugins:yg(u),queue:Ig},A=lt,K=lt;if(xe&&r.debug){var z=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;z&&(A=z({trace:!0,traceLimit:25})),K=function(){return arguments.length===0?iv():Ge(typeof arguments[0])?sd():sd().apply(null,arguments)}}var ae,L=function(S){return Object.keys(S).reduce(function(T,x){return kg.includes(x)||(T[x]=S[x]),T},{})}(r),$=n.pluginsArray.reduce(function(S,T){var x=T.name,H=T.config,B=T.loaded,Z=n.pluginEnabled[x];return S[x]={enabled:Z,initialized:!!Z&&!T.initialize,loaded:!!B({config:H}),config:H},S},{}),q={context:L,user:b,plugins:$},k=Jh(function(S){for(var T=Object.keys(S),x={},H=0;H<T.length;H++){var B=T[H];typeof S[B]===_r&&(x[B]=S[B])}var Z,fe=Object.keys(x);try{(function(ie){Object.keys(ie).forEach(function(ce){var oe=ie[ce];if(typeof oe(void 0,{type:"@@redux/INIT"})===Sr||typeof oe(void 0,{type:sg})===Sr)throw new Error("reducer "+ce+" "+Sr)})})(x)}catch(ie){Z=ie}return function(ie,ce){if(ie===void 0&&(ie={}),Z)throw Z;for(var oe=!1,Re={},_e=0;_e<fe.length;_e++){var Fe=fe[_e],Ce=ie[Fe],Ze=(0,x[Fe])(Ce,ce);if(typeof Ze===Sr){var lr=ug(Fe,ce);throw new Error(lr)}Re[Fe]=Ze,oe=oe||Ze!==Ce}return oe?Re:ie}}(ne({},N,e)),q,K(A(cg.apply(void 0,O))));k.dispatch=(ae=k.dispatch,function(S,T,x){var H=ne({},S,{meta:ud(S.meta,T,jo(x))});return ae.apply(null,[H])});var Y=Object.keys(o);k.dispatch({type:te.bootstrap,plugins:Y,config:L,params:g,user:b,initialUser:t,persistedUser:E});var re=Y.filter(function(S){return n.pluginEnabled[S]}),Q=Y.filter(function(S){return!n.pluginEnabled[S]});return k.dispatch({type:te.registerPlugins,plugins:Y,enabled:n.pluginEnabled}),n.pluginsArray.map(function(S,T){var x=S.bootstrap,H=S.config,B=S.name;x&&Ve(x)&&x({instance:w,config:H,payload:S}),k.dispatch({type:te.registerPluginType(B),name:B,enabled:n.pluginEnabled[B],plugin:S}),n.pluginsArray.length===T+1&&k.dispatch({type:te.initializeStart,plugins:re,disabled:Q})}),Cg(function(S){k.dispatch({type:S?te.offline:te.online})}),function(S,T,x){setInterval(function(){return Yh(S,T,x)},3e3)}(k,u,w),w}var Vt="before",Jt="after",At="cookie",Nr=uv(),ov=Cn,jg=Cn;function sv(r){return Nr?Cn(r,"",-1):yt(r)}function uv(){if(Nr!==void 0)return Nr;var r="cookiecookie";try{Cn(r,r),Nr=document.cookie.indexOf(r)!==-1,sv(r)}catch{Nr=!1}return Nr}function Cn(r,e,t,n,a,i){if(typeof window<"u"){var o=arguments.length>1;return Nr===!1&&(o?zr(r,e):Kr(r)),o?document.cookie=r+"="+encodeURIComponent(e)+(t?"; expires="+new Date(+new Date+1e3*t).toUTCString()+(n?"; path="+n:"")+(a?"; domain="+a:"")+(i?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+r+"=")[1]||"").split(";")[0])}}var jt="localStorage",Ug=Ss.bind(null,"localStorage");wt("localStorage","getItem",Kr);wt("localStorage","setItem",zr);wt("localStorage","removeItem",yt);var Ut="sessionStorage",Lg=Ss.bind(null,"sessionStorage");wt("sessionStorage","getItem",Kr);wt("sessionStorage","setItem",zr);wt("sessionStorage","removeItem",yt);function ot(r){var e=r;try{if((e=JSON.parse(r))==="true")return!0;if(e==="false")return!1;if(Ge(e))return e;parseFloat(e)===e&&(e=parseFloat(e))}catch{}if(e!==null&&e!=="")return e}var qg=Ug(),Ng=Lg(),xg=uv();function Mr(r,e){if(r){var t=Is(e),n=!Ts(t),a=Ps(t)?ot(localStorage.getItem(r)):void 0;if(n&&!tt(a))return a;var i=Es(t)?ot(ov(r)):void 0;if(n&&i)return i;var o=Rs(t)?ot(sessionStorage.getItem(r)):void 0;if(n&&o)return o;var s=Kr(r);return n?s:{localStorage:a,sessionStorage:o,cookie:i,global:s}}}function cn(r,e,t){if(r&&!tt(e)){var n={},a=Is(t),i=JSON.stringify(e),o=!Ts(a);return Ps(a)&&(n[jt]=Zt(jt,e,ot(localStorage.getItem(r))),localStorage.setItem(r,i),o)?n[jt]:Es(a)&&(n[At]=Zt(At,e,ot(ov(r))),jg(r,i),o)?n[At]:Rs(a)&&(n[Ut]=Zt(Ut,e,ot(sessionStorage.getItem(r))),sessionStorage.setItem(r,i),o)?n[Ut]:(n[Ct]=Zt(Ct,e,Kr(r)),zr(r,e),o?n[Ct]:n)}}function Dg(r,e){if(r){var t=Is(e),n=Mr(r,zh),a={};return!tt(n.localStorage)&&Ps(t)&&(localStorage.removeItem(r),a[jt]=n.localStorage),!tt(n.cookie)&&Es(t)&&(sv(r),a[At]=n.cookie),!tt(n.sessionStorage)&&Rs(t)&&(sessionStorage.removeItem(r),a[Ut]=n.sessionStorage),!tt(n.global)&&An(t,Ct)&&(yt(r),a[Ct]=n.global),a}}function Is(r){return r?Cr(r)?r:r.storage:Kh}function Ps(r){return qg&&An(r,jt)}function Es(r){return xg&&An(r,At)}function Rs(r){return Ng&&An(r,Ut)}function Ts(r){return r===zh||r==="all"}function An(r,e){return r===Kh||r===e||Ts(r)}function Zt(r,e,t){return{location:r,current:e,previous:t}}var $g={setItem:cn,getItem:Mr,removeItem:Dg};function Mg(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function cd(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),t.push.apply(t,n)}return t}function ld(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?cd(Object(t),!0).forEach(function(n){Mg(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):cd(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Fg(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={storage:$g};return Ag(ld(ld({},e),r))}const cv="@sesamy/sesamy-js",_s="1.38.1";function Hg(r){if(typeof window>"u")return;const{addEventListener:e,history:t,location:n}=window;let a=n.pathname;e("popstate",()=>r(n.pathname)),["push","replace"].map(i=>{const o=`${i}State`;if(o!=="pushState"&&o!=="replaceState")return;const s=t[o];t[o]=function(...c){const l=c[2]?.toString()||"",u=zg(l);return a!==u&&(a=u,setTimeout(()=>r(l),0)),s.apply(t,c)}})}function Kg(r,e){const t=r.indexOf(e);return t>-1?r.slice(0,t):r}function zg(r){return["#","?"].forEach(e=>r=Kg(r,e)),r}function Bg(){Hg(()=>{br.page()})}function Gg(r){if(r===void 0&&(r={}),!xe)return zo;var e=dd(),t=Wo(),n=fd(),a=Yt(n,e),i=Yt(t,e),o=[],s=[],c=[],l=n,u=a,f=i,h=Object.keys(r);if(!h.length)return zo;var d=h.map(function(p){return Number(p)}),v=og(function(){var p=dd(),g=function(L,$){return $.map(function(q){return q===100?L-5:L*(q/100)})}(p,d),E=Wo(),b=fd(),y=Yt(b,p),m=Yt(E,p);if(u=y>u?y:u,f=m<f?m:f,!(o.length>=d.length)){var w=l===b,O="up";w?O="initial":l<=b&&(O="down");var N=g,A=d;(O==="up"||w)&&(N=g.slice().reverse(),A=d.slice().reverse());var K=A.reduce(function(L,$,q){var k=N[q];return c.includes($)&&b<=k&&(c=c.filter(function(Y){return Y!==$}),L.singleFunction=$),O==="down"&&!o.includes($)&&b>=k&&$>i?(s.push($),L.callbacks=L.callbacks.concat($),L):O==="up"&&!o.includes($)&&b<=k&&$<=y?(L.foundFunc=[$],L):(w&&b>=k&&L.foundFunc.length===0&&(L.foundFunc=[$]),!s.includes($)&&b>=k&&(s.push($),L.singleFunction?c.push($):L.singleFunction=$),L)},{foundFunc:[],singleFunction:null,callbacks:[],direction:O});if(l=b,O==="down"&&K.callbacks&&K.callbacks.forEach(function(L){Ve(r[L])&&(r[L]({trigger:L,direction:O,scrollMin:f,scrollMax:u,range:[f,u]}),o.push(L))}),K.singleFunction){var z=K.singleFunction,ae=K.direction;Ve(r[z])&&r[z]({trigger:z,direction:ae,scrollMin:f,scrollMax:u,range:[f,u]}),o.push(z)}}},500);return window.addEventListener("scroll",v),function(){return window.removeEventListener("scroll",v)}}function Wo(){return xe?document.body.scrollTop||document.documentElement.scrollTop:0}function Wg(){return xe?window.innerHeight||document.documentElement.clientHeight:0}function fd(){return Math.round(Wo()+Wg())}function dd(){if(!xe)return 0;var r=document.body,e=document.documentElement;return Math.max(r.scrollHeight,r.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)}function Yt(r,e){return Math.round(r/e*100)}var hd="EventListener";function Vg(r){return function(e,t,n,a){var i=n||zo,o=a||!1;if(!xe)return i;var s=ln(t),c=ln(e,!0);if(!c.length)throw new Error("noElements");if(!s.length)throw new Error("noEvent");var l=[];return function u(f){f&&(l=[]);for(var h=f?"add"+hd:"remove"+hd,d=0;d<c.length;d++){var v=c[d];l[d]=f?o&&o.once?Jg(i):i:l[d]||i;for(var p=0;p<s.length;p++)v[h]?v["on"+s[p]]=f?l[d]:null:v[h](s[p],l[d],o)}return u.bind(null,!f)}(r)}}function ln(r,e){if(Cr(r))return e?ln(document.querySelectorAll(r)):(t=r).split(t.indexOf(",")>-1?",":" ").map(function(o){return o.trim()});var t;if(NodeList.prototype.isPrototypeOf(r)){for(var n=[],a=r.length>>>0;a--;)n[a]=r[a];return n}var i=rg(r);return e?i.map(function(o){return Cr(o)?ln(o,!0):o}).flat():i}function Jg(r,e){var t;return function(){return r&&(t=r.apply(this,arguments),r=null),t}}var Uo=Vg("Event");function lv(r,e){return xe&&Ve(window[r])?(t=window[r],n=e,(a=window)===void 0&&(a=null),Ve(t)?function(){t.apply(a,arguments),n.apply(a,arguments)}:n):window[r]=e;var t,n,a}lv.bind(null,"onerror");lv.bind(null,"onload");var fv=typeof window>"u",vd="hidden";function Zg(r){if(fv)return!1;var e=Yg(),t="".concat(e.replace(/[H|h]idden/,""),"visibilitychange"),n=function(){return r(!!document[e])},a=function(){return document.addEventListener(t,n)};return a(),function(){return document.removeEventListener(t,n),a}}function Yg(){var r=["webkit","moz","ms","o"];return fv||vd in document?vd:r.reduce(function(e,t){var n=t+"Hidden";return!e&&n in document?n:e},null)}var Xg=["mousemove","mousedown","touchmove","touchstart","touchend","keydown"];function Qg(r,e){e===void 0&&(e={});var t=function(o,s){var c=this,l=!1;return function(u){l||(o.call(c,u),l=!0,setTimeout(function(){return l=!1},s))}}(r,e.throttle||1e4),n=[];function a(){var o=Zg(function(s){s||t({type:"tabVisible"})});return n=[o].concat(Xg.map(function(s){return Uo(document,s,t)})).concat(Uo(window,"load",t)).concat(Uo(window,"scroll",t,{capture:!0,passive:!0})),i}function i(){n.map(function(o){return o()})}return a(),function(){return i(),a}}function ey(r){var e,t,n=r.onIdle,a=r.onWakeUp,i=r.onHeartbeat,o=r.timeout,s=o,c=r.throttle,l=c===void 0?2e3:c,u=!1,f=!1,h=new Date,d=function(){return clearTimeout(e)};function v(g){d(),i&&!u&&i(Tt(h),g),a&&u&&(u=!1,a(Tt(t),g),h=new Date),e=setTimeout(function(){u=!0,n&&(t=new Date,n(Tt(h),g))},s)}var p=Qg(v,{throttle:l});return{disable:function(){f=!0,u=!1,d();var g=p();return function(){return f=!1,h=new Date,v({type:"load"}),g()}},getStatus:function(){return{isIdle:u,isDisabled:f,active:u?0:Tt(h,f),idle:u?Tt(t,f):0}}}}function Tt(r,e){return e?0:Math.round((new Date-r)/1e3)}const pd=5e3;class ry{element;isInViewport=!1;isAwake=!1;isFlushing;observer;lastEventAt=Date.now();registeredView=!1;viewCallback;activeDurationCallback;idleDurationCallback;scrollCallback;constructor(e){this.element=e.element,this.viewCallback=e.viewCallback,this.activeDurationCallback=e.activeDurationCallback,this.idleDurationCallback=e.idleDurationCallback,this.scrollCallback=e.scrollCallback,this.observer=new IntersectionObserver(t=>{t.forEach(n=>{this.handleInViewPort(n.isIntersecting)})},{threshold:0}),this.observer.observe(this.element),ey({onIdle:t=>this.handleAwake(!1,t),onWakeUp:t=>this.handleAwake(!0,t),timeout:pd}),Gg({25:this.handleScroll.bind(this),50:this.handleScroll.bind(this),75:this.handleScroll.bind(this),90:this.handleScroll.bind(this),100:this.handleScroll.bind(this)})}flush(){this.isFlushing=!0,this.handleAwake(!this.isAwake)}handleInViewPort(e){e?(this.isAwake=!0,this.trackInViewport()):this.handleAwake(!1),this.isInViewport=e}handleAwake(e,t=Math.round((Date.now()-this.lastEventAt)/1e3)){this.isAwake=e,this.lastEventAt=e?Date.now()-t*pd:Date.now(),this.isInViewport&&this.trackAwake(e,t)}handleScroll(e){this.scrollCallback&&this.scrollCallback(e)}handleVisibilityChange(){this.isAwake=!1;const e=Math.round((Date.now()-this.lastEventAt)/1e3);e>1&&(this.lastEventAt=Date.now(),this.trackAwake(!1,e))}trackAwake(e,t){!e&&this.activeDurationCallback&&this.activeDurationCallback(t,this.isFlushing,this.lastEventAt),e&&this.idleDurationCallback&&this.idleDurationCallback(t,this.isFlushing,this.lastEventAt)}trackInViewport(){this.registeredView||(this.registeredView=!0,this.viewCallback&&this.viewCallback())}}function dv(r){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",r):r()}function ty(r,e){e=e||{};var t,n,a=[],i=e.max||1/0;function o(){clearInterval(t),r(a.splice(0,i)),s()}function s(){t=setInterval(o,e.interval||1e4)}return s(),{flush:o,push:function(c){return n=a.push(c),n>=i&&o(),n},size:function(){return a.length},end:function(c){c&&o(),clearInterval(t)}}}const md="sesamy_session_id";function ny(){let r=sessionStorage.getItem(md);return r||(r=Math.random().toString(36).slice(2,9),sessionStorage.setItem(md,r)),r}function hv(r){function e(n){return n.id?`#${n.id}`:n.classList.length>0?Array.from(n.classList).map(i=>`.${i}`).join(""):null}function t(n){const a=[];let i=n;for(;i&&i!==document.body&&i!==document.documentElement;){const o=e(i);if(o){a.unshift(o);break}if(i.parentElement){const s=Array.from(i.parentElement.children),c=s.indexOf(i)+1,l=i.tagName.toLowerCase();s.filter(f=>f.tagName.toLowerCase()===l).length>1?a.unshift(`${l}:nth-child(${c})`):a.unshift(l)}i=i.parentElement}return a.join(" > ")}return t(r)}let Qe={article:{selector:"sesamy-article"},image:{selector:"img",attribute:"src"},title:{selector:"h1",attribute:"textContent"},excerpt:{selector:"p",attribute:"textContent"},price:{selector:"sesamy-article",attribute:"price"},currency:{selector:"sesamy-article",attribute:"currency"},url:{selector:"sesamy-article",attribute:"item-src"},accessLevel:{selector:"sesamy-article",attribute:"access-level"},id:{selector:"sesamy-article",attribute:"publisher-content-id"},pass:{selector:"sesamy-article",attribute:"pass"}},tn;function ay(r,e){Qe={...Qe,...r.content?.article},tn=e}function iy(r,e){const{selector:t}=e;return t===Qe.article.selector?r:r.querySelector(t)}function vv(r,e){if(r)return e.attribute?e.attribute==="textContent"?r.textContent??void 0:r.getAttribute(e.attribute)??vv(r.parentElement,e):r.textContent??void 0}function st(r){const e=document.head.querySelectorAll(`[property~='${r}'][content]`);for(let n=0;n<e.length;n+=1)if(e[n].content)return e[n].content;const t=document.head.querySelectorAll(`[name~='${r}'][content]`);for(let n=0;n<t.length;n+=1)if(t[n].content)return t[n].content}function pv({publisherContentId:r,key:e,defaultValue:t=""}){return(r?document.body.querySelector(`sesamy-content-data[id='${r}']`):null)?.getAttribute(e)||st(`sesamy:${e}`)||st(`og:${e}`)||st(e)||t}function oy(){const r=document.querySelectorAll(Qe.article.selector);return Array.from(r).map(ks).filter(e=>e!==null)}function ks(r){const e=typeof r=="string"?document.querySelector(r):r;if(!e)return null;const t={element:e,selector:typeof r=="string"?r:hv(e)},n=(a,i,o,s)=>{const c=iy(e,i);if(c){const l=vv(c,i)||pv({publisherContentId:o,key:a});l!==void 0&&(t[a]=s?s(l):l)}};return n("id",Qe.id),n("title",Qe.title,t.id),n("excerpt",Qe.excerpt,t.id),n("image",Qe.image,t.id),n("price",Qe.price,t.id,a=>parseFloat(a)),n("currency",Qe.currency,t.id),n("url",Qe.url,t.id),n("pass",Qe.pass,t.id),n("accessLevel",Qe.accessLevel,t.id,a=>a||"entitlement"),t}async function sy(r,e){const t=typeof r=="string"?document.querySelector(r):r;if(!t)throw new Error("Could not find element");const n=ks(t);if(!n?.url)throw new Error("Could not find content for element");const a=await tn.entitlements.hasAccess(n.url||"",n.pass?.split(",")||[]);if(!a)throw new Error("User does not have access to the content");const i=await tn.entitlements.access(a.id);if(!i.token)throw new Error("Could not get access token");const o=e||hv(t.parentElement||t);return tn.proxy.getContent(i.token,n.url,o)}let mv=!1,nn,fn,Vo;function gv(r){return JSON.stringify(r.map(e=>{const{campaign:t,...n}=e.properties||{};return{anonymousId:e.anonymousId,userId:e.userId,type:e.type,properties:n,clientId:Vo,requestId:Math.random().toString(36).slice(2,9),sessionId:ny(),timestamp:new Date().toISOString(),version:_s,event:e.event,context:{...e.context,page:{url:window.location.href,title:document.title,referrer:document.referrer,itemSrc:st("sesamy:item-src"),publisherContentId:st("sesamy:publisher-content-id")},campaign:t,locale:navigator.language,library:cv,userAgent:navigator.userAgent,clientId:Vo}}}))}const yv=ty(async r=>{if(r.length>0){const e=gv(r);mv?navigator.sendBeacon(fn,e):(await fetch(fn,{method:"POST",body:e,headers:{"Content-Type":"text/plain"}})).ok}},{max:10,interval:3e3});function Lo(r){if(r.anonymousId)if(r.properties?.flushing){const e={...r};delete e.properties.flushing,navigator.sendBeacon(fn,gv([e]))}else yv.push(r)}function uy(){return mv=!0,yv.flush()}function cy(r,e,t){nn=e,fn=`${vr("logs",t)}/events`,Vo=r}const ly={name:"custom-analytics-plugin",page:({payload:r})=>{if(!nn)return;const{properties:e,anonymousId:t,userId:n,event:a}=r;Lo({anonymousId:t,userId:n,properties:e,event:a,type:"page"})},track:({payload:r})=>{if(!nn)return;const{properties:e,anonymousId:t,userId:n,event:a}=r;Lo({anonymousId:t,userId:n,properties:e,event:a,type:"track"})},identify:({payload:r})=>{if(!nn)return;const{properties:e,anonymousId:t,userId:n}=r;Lo({anonymousId:t,userId:n,properties:e,type:"identify"})}},gd=["source","medium","campaign","term","content"],kr="utm_",fy=30*60*1e3;function wv(r){return r?Date.now()-parseInt(r,10)>fy:!0}function yd(){const r=document.referrer||"";if(!r)return;const e=Mr(`${kr}set_at`);(wv(e)||!Mr(`${kr}referrer`))&&cn(`${kr}referrer`,r)}function dy(){const r=()=>{const t={};for(const a of gd){const i=Mr(`${kr}${a}`);i&&(t[`utm_${a}`]=i)}const n=Mr(`${kr}referrer`);return n&&(t.utm_referrer=n),t};return{name:"attribution-tracking",initialize(){yd()},campaign({payload:t}){const n=t?.campaign||{},a=Mr(`${kr}set_at`);if(Object.keys(n).length>0&&wv(a)){for(const o of gd){const s=n[o];s&&cn(`${kr}${o}`,s)}cn(`${kr}set_at`,String(Date.now()))}yd()},page({payload:t}){return t.properties.campaign=r(),t},track({payload:t}){return t.properties.campaign=r(),t},getStoredCampaignData:r}}const hy=dy(),wd=new Map,bd=new Map;function vy({clientId:r,enabled:e=!0,environment:t}){cy(r,e,t),e&&(window.addEventListener("beforeunload",()=>{bd.forEach((n,a)=>{n.bind(a)()}),uy()}),window.addEventListener("visibilitychange",()=>{document.visibilityState!=="visible"&&wd.forEach((n,a)=>{n.bind(a)()})}),Bg(),dv(()=>{const n=new ry({element:document.body,viewCallback:()=>{br.page()},activeDurationCallback:(a,i,o)=>{br.track("activeDuration",{duration:a,durationStart:o,flushing:i})},idleDurationCallback:(a,i,o)=>{br.track("idleDuration",{duration:a,durationStart:o,flushing:i})},scrollCallback:a=>{br.track("scroll",{scroll:a.scrollMax})}});bd.set(document.body,()=>{n.flush()}),wd.set(document.body,()=>{n.handleVisibilityChange()})}),window.addEventListener(Je.AUTHENTICATED,async n=>{const a=n;await br.identify(a.detail.sub)}),window.addEventListener(Je.LOGOUT,async()=>{await br.track("logout",{}),await br.reset()}))}const br=Fg({app:cv,version:_s,plugins:[hy,ly]});function bv(r,e){br.track(r,e)}function Sv(r,e,t=!1){const n={name:r,data:e},a=new CustomEvent(r,{detail:n,cancelable:t,bubbles:!0});bv(`event:${r}`,{...e,timestamp:new Date().toISOString()});const i=window.dispatchEvent(a);return t&&!i?{canceled:!0,message:n.cancellationMessage}:{canceled:!1}}function py(r,e){r.cancelable&&(r.detail.cancellationMessage=e,r.preventDefault())}function my(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function gy(){return/android/i.test(navigator.userAgent)}let Ne,Iv,Jo=!1,an=!1;Lt()&&window.addEventListener("pageshow",()=>{an=!1});let Pv=!1,Ev=!1;const ft="sesamyAccessToken",qo="sesamyRefreshToken";async function jn(){return Jo?!0:new Promise((r,e)=>{const t=setTimeout(()=>{Jo?r(!0):e(new Error("Initialization failed: Timeout"))},2e3);window.addEventListener(Je.AUTH_INITIALIZED,()=>{clearTimeout(t),r(!0)})})}async function yy(r){if(!r)return null;const e=localStorage.getItem(qo);if(!e)return ye("No refresh token found in localstorage"),null;const t=new URLSearchParams;t.set("client_id",r.iss),t.set("refresh_token",e),t.set("grant_type","refresh_token");const n=new URL(r.iss);n.pathname="/oauth/token",n.searchParams.set("user_id",r.sub);try{const a=await fetch(n.href,{body:t.toString(),method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"}});if(!a.ok)throw localStorage.removeItem(qo),new Error("Renew token failed");const i=await a.json();return localStorage.setItem(qo,i.refresh_token),localStorage.setItem(ft,i.access_token),i.access_token}catch{Cs()}}async function Os(){const r=localStorage.getItem(ft);if(!r)return null;const e=As(r);if(!e||!e.exp||e.exp<new Date().getTime()/1e3){const t=await yy(e);if(t)return t;localStorage.removeItem(ft)}return r}let Xt=null;function wy(){try{if(Xt!==null)return Xt;const e=Object.keys(localStorage).filter(t=>t.startsWith("@@auth0spajs@@"));for(const t of e){const n=JSON.parse(localStorage.getItem(t)||"{}");if(typeof n=="object"&&"refresh_token"in n)return Xt=!0,!0}}catch(r){ye(`Error checking for existing auth0 tokens: ${r.message}`)}return Xt=!1,!1}function Sd(r){try{const e=new URL(r).hostname,t=e.split(".");return t.length>1?t.slice(-2).join("."):e}catch{return null}}async function by(r){if(r.enabled===!1)return;r.usePopupForSafari&&(Pv=!0),r.usePopupForAndroid&&(Ev=!0),Iv=r.organization;const e=r.domain&&!wy()?r.domain:Hh("token",r.environment),t={domain:e,clientId:r.clientId,useCookiesForTransactions:!0};t.cacheLocation="localstorage",Sd(window.location.href)!==Sd(`https://${e}`)&&(t.useRefreshTokens=!0),ye(`Initializing auth0 client: ${JSON.stringify(t)}`),Ne=await $m(t);const n=new URLSearchParams(window.location.search),a=n.get("code"),i=n.get("state");if(a)if(window.opener)ye("Code found in URL, posting to opener"),window.opener.postMessage({type:"authorization_response",response:{code:a,state:i}},window.location.origin);else{ye("Code found in URL, handling redirect");try{const c=await Ne.handleRedirectCallback();ye(`Login result: ${JSON.stringify(c)}`);const l=await Ne.getUser();if(!l)throw ye("No user found"),new Error("No user found");ye(`User found ${JSON.stringify(l)}`),Ir(Je.AUTHENTICATED,l),ye("Rewrite url")}catch(c){alert("There was an error logging in"),console.error(c)}const o=new URL(location.href),s=o.searchParams;s.delete("code"),s.delete("state"),o.search=s.toString(),window.history.replaceState({},document.title,o.toString())}Jo=!0,Ir(Je.AUTH_INITIALIZED,{})}async function Nt(){return await jn(),await Os()?!0:Ne?Ne.isAuthenticated():!1}async function Sy(){return await jn(),await Os()?(ye("Using local user"),{sub:"local",name:"Local User"}):Ne?Ne.getUser():null}function Rv(r){if(an)return ye("Login already in progress"),null;if(an=!0,setTimeout(()=>{an=!1},3e3),localStorage.removeItem(ft),!Ne)throw new Error("Auth0 client not initialized");const e=r?.authorizationParams||{};return{...r,authorizationParams:{organization:Iv,redirect_uri:window.location.href,ui_locales:on(),incognito:bs(),...e}}}async function Un(r){const e=Rv(r);if(e)return Ne.loginWithRedirect(e)}async function Tv(r){const e=Rv(r);if(!e)return;await Ne.loginWithPopup(e,{timeoutInSeconds:30*60}),Sv(Je.AUTHENTICATED,await Ne.getUser()).canceled||window.location.reload()}async function Iy(r){return my()&&(bs()||Pv)||gy()&&Ev?Tv(r):Un(r)}async function rt(r=!0,e=!1){await jn();const t=await Os();if(t)return t;try{if(!Ne)return ye("Auth client not initialized"),null;let n=await Ne.getTokenSilently();const a=As(n);return e&&a?.exp&&a.exp+3600<new Date().getTime()/1e3&&(n=await Ne.getTokenSilently({cacheMode:e?"off":"on"})),n}catch(n){const a=n;if(ye(`Failed to get token silently: ${a.message}`),await Ne.isAuthenticated()&&(a.message==="Invalid refresh token"||a.message.includes("Missing Refresh Token"))&&await Cs(),r)throw n;return null}}async function Cs(r={}){if(await jn(),localStorage.removeItem(ft),Ir(Je.LOGOUT,{}),!!Ne)return ye(`Logout with options: ${JSON.stringify(r)}`),Ne.logout({...r,logoutParams:{returnTo:window.location.href,...r.logoutParams}})}function As(r){const e=r.split(".");if(e.length!==3)return null;const n=e[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 Zo(r){const e=As(r);if(!e||!e.exp||e.exp<new Date().getTime()/1e3)throw new Error("Invalid token");ye("Set token"),localStorage.setItem(ft,r),Ir(Je.AUTHENTICATED,e)}const Py=(r,e)=>e.skipDedupe||e.method!=="GET",Ey=(r,e)=>e.method+"@"+r,Ry=r=>r.clone(),Id=({skip:r=Py,key:e=Ey,resolver:t=Ry}={})=>{const n=new Map;return a=>(i,o)=>{if(r(i,o))return a(i,o);const s=e(i,o);if(!n.has(s))n.set(s,[]);else return new Promise((c,l)=>{n.get(s).push([c,l])});try{return a(i,o).then(c=>(n.get(s).forEach(([l])=>l(t(c))),n.delete(s),c)).catch(c=>{throw n.get(s).forEach(([,l])=>l(c)),n.delete(s),c})}catch(c){return n.delete(s),Promise.reject(c)}}},Ty=(r,e)=>r*e,_y=r=>r&&r.ok,Pd=({delayTimer:r=500,delayRamp:e=Ty,maxAttempts:t=10,until:n=_y,onRetry:a=null,retryOnNetworkError:i=!1,resolveWithLatestResponse:o=!1,skip:s}={})=>c=>(l,u)=>{let f=0;if(s&&s(l,u))return c(l,u);const h=(d,v)=>Promise.resolve(n(d,v)).then(p=>p?d&&o?d:v?Promise.reject(v):d:(f++,!t||f<=t?new Promise(g=>{const E=e(r,f);setTimeout(()=>{typeof a=="function"?Promise.resolve(a({response:d,error:v,url:l,options:u})).then((b={})=>{var y,m;g(c((y=b&&b.url)!==null&&y!==void 0?y:l,(m=b&&b.options)!==null&&m!==void 0?m:u))}):g(c(l,u))},E)}).then(h).catch(g=>{if(!i)throw g;return h(null,g)}):d&&o?d:Promise.reject(v||new Error("Number of attempts exceeded."))));return c(l,u).then(h).catch(d=>{if(!i)throw d;return h(null,d)})},ky="application/json",_v="Content-Type",Qr=Symbol(),kv=Symbol();function Ed(r={}){var e;const t=r instanceof Array?Object.fromEntries(r):r;return(e=Object.entries(t).find(([n])=>n.toLowerCase()===_v.toLowerCase()))===null||e===void 0?void 0:e[1]}function Rd(r){return/^application\/.*json.*/.test(r)}const Fr=function(r,e,t=!1){return Object.entries(e).reduce((n,[a,i])=>{const o=r[a];return Array.isArray(o)&&Array.isArray(i)?n[a]=t?[...o,...i]:i:typeof o=="object"&&typeof i=="object"?n[a]=Fr(o,i,t):n[a]=i,n},{...r})},dt={options:{},errorType:"text",polyfills:{},polyfill(r,e=!0,t=!1,...n){const a=this.polyfills[r]||(typeof self<"u"?self[r]:null)||(typeof global<"u"?global[r]:null);if(e&&!a)throw new Error(r+" is not defined");return t&&a?new a(...n):a}};function Oy(r,e=!1){dt.options=e?r:Fr(dt.options,r)}function Cy(r,e=!1){dt.polyfills=e?r:Fr(dt.polyfills,r)}function Ay(r){dt.errorType=r}const jy=r=>e=>r.reduceRight((t,n)=>n(t),e)||e;class Ov extends Error{}const Uy=r=>{const e=Object.create(null);r=r._addons.reduce((y,m)=>m.beforeRequest&&m.beforeRequest(y,r._options,e)||y,r);const{_url:t,_options:n,_config:a,_catchers:i,_resolvers:o,_middlewares:s,_addons:c}=r,l=new Map(i),u=Fr(a.options,n);let f=t;const h=jy(s)((y,m)=>(f=y,a.polyfill("fetch")(y,m)))(t,u),d=new Error,v=h.catch(y=>{throw{[Qr]:y}}).then(y=>{var m;if(!y.ok){const w=new Ov;if(w.cause=d,w.stack=w.stack+`
36
+ CAUSE: `+d.stack,w.response=y,w.status=y.status,w.url=f,y.type==="opaque")throw w;const O=a.errorType==="json"||((m=y.headers.get("Content-Type"))===null||m===void 0?void 0:m.split(";")[0])==="application/json";return(a.errorType?O?y.text():y[a.errorType]():Promise.resolve(y.body)).then(A=>{throw w.message=typeof A=="string"?A:y.statusText,A&&(O&&typeof A=="string"?(w.text=A,w.json=JSON.parse(A)):w[a.errorType]=A),w})}return y}),p=y=>y.catch(m=>{const w=Object.prototype.hasOwnProperty.call(m,Qr),O=w?m[Qr]:m,N=O?.status&&l.get(O.status)||l.get(O?.name)||w&&l.has(Qr)&&l.get(Qr);if(N)return N(O,r);const A=l.get(kv);if(A)return A(O,r);throw O}),g=y=>m=>p(y?v.then(w=>w&&w[y]()).then(w=>m?m(w):w):v.then(w=>m?m(w):w)),E={_wretchReq:r,_fetchReq:h,_sharedState:e,res:g(null),json:g("json"),blob:g("blob"),formData:g("formData"),arrayBuffer:g("arrayBuffer"),text:g("text"),error(y,m){return l.set(y,m),this},badRequest(y){return this.error(400,y)},unauthorized(y){return this.error(401,y)},forbidden(y){return this.error(403,y)},notFound(y){return this.error(404,y)},timeout(y){return this.error(408,y)},internalError(y){return this.error(500,y)},fetchError(y){return this.error(Qr,y)}},b=c.reduce((y,m)=>({...y,...typeof m.resolver=="function"?m.resolver(y):m.resolver}),E);return o.reduce((y,m)=>m(y,r),b)},Ly={_url:"",_options:{},_config:dt,_catchers:new Map,_resolvers:[],_deferred:[],_middlewares:[],_addons:[],addon(r){return{...this,_addons:[...this._addons,r],...r.wretch}},errorType(r){return{...this,_config:{...this._config,errorType:r}}},polyfills(r,e=!1){return{...this,_config:{...this._config,polyfills:e?r:Fr(this._config.polyfills,r)}}},url(r,e=!1){if(e)return{...this,_url:r};const t=this._url.split("?");return{...this,_url:t.length>1?t[0]+r+"?"+t[1]:this._url+r}},options(r,e=!1){return{...this,_options:e?r:Fr(this._options,r)}},headers(r){const e=r?Array.isArray(r)?Object.fromEntries(r):"entries"in r?Object.fromEntries(r.entries()):r:{};return{...this,_options:Fr(this._options,{headers:e})}},accept(r){return this.headers({Accept:r})},content(r){return this.headers({[_v]:r})},auth(r){return this.headers({Authorization:r})},catcher(r,e){const t=new Map(this._catchers);return t.set(r,e),{...this,_catchers:t}},catcherFallback(r){return this.catcher(kv,r)},resolve(r,e=!1){return{...this,_resolvers:e?[r]:[...this._resolvers,r]}},defer(r,e=!1){return{...this,_deferred:e?[r]:[...this._deferred,r]}},middlewares(r,e=!1){return{...this,_middlewares:e?r:[...this._middlewares,...r]}},fetch(r=this._options.method,e="",t=null){let n=this.url(e).options({method:r});const a=Ed(n._options.headers),i=this._config.polyfill("FormData",!1),o=typeof t=="object"&&!(i&&t instanceof i)&&(!n._options.headers||!a||Rd(a));return n=t?o?n.json(t,a):n.body(t):n,Uy(n._deferred.reduce((s,c)=>c(s,s._url,s._options),n))},get(r=""){return this.fetch("GET",r)},delete(r=""){return this.fetch("DELETE",r)},put(r,e=""){return this.fetch("PUT",e,r)},post(r,e=""){return this.fetch("POST",e,r)},patch(r,e=""){return this.fetch("PATCH",e,r)},head(r=""){return this.fetch("HEAD",r)},opts(r=""){return this.fetch("OPTIONS",r)},body(r){return{...this,_options:{...this._options,body:r}}},json(r,e){const t=Ed(this._options.headers);return this.content(e||Rd(t)&&t||ky).body(JSON.stringify(r))}};function mr(r="",e={}){return{...Ly,_url:r,_options:e}}mr.default=mr;mr.options=Oy;mr.errorType=Ay;mr.polyfills=Cy;mr.WretchError=Ov;function nr(){return sessionStorage.removeItem(Ho),ye("Cache cleared"),Ir(Je.CLEAR_CACHE,{}),"Cache cleared"}function Yo(r){let e;try{e=new URL(r)}catch{return!1}return e.protocol==="http:"||e.protocol==="https:"}function Cv(r,e){if(Yo(r))return{itemSrc:r};const[t,n,a]=r.split(":");return{sku:`${t}:${n}`,purchaseOption:e||a}}function Td(r){return r.endsWith("/")?r.slice(0,-1):r}function _d(r,e){if(!Yo(r)||!Yo(e))return!1;const t=new URL(r),n=new URL(e);return t.origin===n.origin&&Td(t.pathname)===Td(n.pathname)}function qy(r,e,t){const n=new URL(`${vr("checkout3",r.environment)}`);if(e.language&&n.searchParams.set("lang",e.language),e.sku)n.searchParams.set("sku",e.sku),e.purchaseOptionId&&n.searchParams.set("po-id",e.purchaseOptionId);else if(e.itemSrc){const{sku:s,purchaseOption:c,itemSrc:l}=Cv(e.itemSrc,e.purchaseOptionId);l&&n.searchParams.set("url",l),s&&n.searchParams.set("sku",s),c&&n.searchParams.set("po-id",c)}e.email&&n.searchParams.set("email",e.email),e.business&&n.searchParams.set("business","true"),e.currency&&n.searchParams.set("currency",e.currency),e.price&&n.searchParams.set("price",e.price.toString()),e.discountCode&&n.searchParams.set("discount-code",e.discountCode),e.attributionItemSrc?n.searchParams.set("itemSrc",e.attributionItemSrc):t.itemSrc&&n.searchParams.set("itemSrc",t.itemSrc),e.attributionPublisherContentId?n.searchParams.set("publisherContentId",e.attributionPublisherContentId):t.publisherContentId&&n.searchParams.set("publisherContentId",t.publisherContentId),e.utmSource?n.searchParams.set("utm_source",e.utmSource):t.utmSource&&n.searchParams.set("utm_source",t.utmSource),e.utmMedium?n.searchParams.set("utm_medium",e.utmMedium):t.utmMedium&&n.searchParams.set("utm_medium",t.utmMedium),e.utmCampaign?n.searchParams.set("utm_campaign",e.utmCampaign):t.utmCampaign&&n.searchParams.set("utm_campaign",t.utmCampaign),e.utmTerm?n.searchParams.set("utm_term",e.utmTerm):t.utmTerm&&n.searchParams.set("utm_term",t.utmTerm),e.utmContent?n.searchParams.set("utm_content",e.utmContent):t.utmContent&&n.searchParams.set("utm_content",t.utmContent);const a=["_ga","_gid","_fbp","_fbc"];document.cookie.split(";").map(s=>{const[c,l]=s.trim().split("=");return{key:c,value:l}}).filter(s=>a.some(c=>c===s.key)).forEach(s=>{n.searchParams.append(s.key,s.value)});let o=new URL(window.location.href);if(e.redirectUrl)try{o=new URL(e.redirectUrl)}catch{console.warn("Invalid redirect URL provided, using current URL instead:",e.redirectUrl)}return o.searchParams.set("force-refetch-entitlements","true"),e.itemSrc&&o.searchParams.set("sesamy-purchase",e.itemSrc),n.searchParams.set("redirect-url",o.toString()),e.paymentMethodsFilter&&n.searchParams.set("paymentmethods-filter",e.paymentMethodsFilter.flatMap(({provider:s,methods:c})=>c?c.map(l=>`${s}|${l}`):s).join(",")),n}const Av="sesamySignedURLs";function js(){const r=sessionStorage.getItem(Av);return r?JSON.parse(r):[]}function Ny(r){const e=js();e.push(r),ye(`Adding signed URL: ${r}`),sessionStorage.setItem(Av,JSON.stringify(e))}function xy(r){const e={};return Object.keys(r).forEach(t=>{const n=r[t];n!=null&&(e[t]=n.toString())}),e}const Xo="sesamyAttribution";function Dy(r){const e=localStorage.getItem(r);if(!e)return null;try{return JSON.parse(e).value}catch{return console.error(`Failed to parse ${r}`),null}}function $y(r){return Object.keys(r).find(e=>e.startsWith("utm_"))?{utmSource:void 0,utmMedium:void 0,utmCampaign:void 0,...r}:r}function dn(){return Dy(Xo)||{}}function jv(r){if(r===null)localStorage.removeItem(Xo);else{ye(`Setting attribution ${JSON.stringify(r)}`);const e=dn()??{},t=xy({...e,...$y(r)});localStorage.setItem(Xo,JSON.stringify({value:t}))}}function My(r){const e=vr("api2",r.environment),t=_=>async(M,J)=>{let ve=sessionStorage.getItem(Ho);ve||(ve=Date.now().toString(),sessionStorage.setItem(Ho,ve));const pe={...J,headers:{...J.headers,"Cache-Timestamp":ve}};return _(M,pe)},n=(_=!0)=>M=>async(J,ve)=>{let pe=null;if(pe=await rt(_),!pe){if(_)throw new Error("No access token available");return M(J,ve)}const me={...ve,headers:{...ve.headers,...pe?{Authorization:`Bearer ${pe}`}:{}}};return M(J,me)},a=_=>(M,J)=>{if(J.headers&&"Authorization"in J.headers)return _(M,J);const ve=localStorage.getItem("__anon_id"),pe=btoa(`${r.clientId}|${ve}:`),me={...J,headers:{...J.headers,Authorization:`Basic ${pe}`}};return _(M,me)},i=mr(e).headers({"Content-Type":"application/json"}).middlewares([t,n(),Id(),Pd({delayTimer:1e3,delayRamp:(_,M)=>_*M,maxAttempts:3,until:_=>!!(_&&(_.ok||_.status>=400&&_.status<500)),retryOnNetworkError:!1})]),o=mr(e).headers({"Content-Type":"application/json"}).middlewares([t,n(!1),a,Id(),Pd({delayTimer:1e3,delayRamp:(_,M)=>_*M,maxAttempts:3,until:_=>!!(_&&(_.ok||_.status>=400&&_.status<500)),retryOnNetworkError:!1})]);async function s(_={}){const{waitForEntitlementAfter:M,includeSignedLinks:J=!0}=_,ve=M?`?wait-for-entitlement-after=${M.toISOString()}`:"",pe=await Nt()?await i.get(`/entitlements${ve}`).json():[];return J&&pe.push(...js()),pe}async function c(_,M=[]){return(await s())?.find(pe=>{const{sku:me,purchaseOption:Ae}=Cv(_);let Ye="sku"in pe&&me===pe.sku;Ye&&Ae&&"purchaseOptionId"in pe&&(Ye=Ae===pe.purchaseOptionId);const F=_d(_,pe.url),ee=M.some(le=>_d(le,pe.url));return Ye||F||ee})}async function l(_){return(await i.get("/entitlements").json())?.find(J=>J.id===_)}async function u(_){return i.get(`/entitlements/${encodeURIComponent(_)}/access`).json()}async function f(_,M,J){const ve=new URL(vr("api2",r.environment));return ve.pathname="/proxy",ve.searchParams.set("url",M),J&&ve.searchParams.set("selector",J),mr(ve.toString()).headers({Authorization:`Bearer ${_}`}).get().text()}async function h(_){if(!_)throw new Error("SKU is required to get fulfillments");return await Nt()?await i.get(`/fulfillments?sku=${encodeURIComponent(_)}`).json():[]}async function d(_,M){if(!_||!M)throw new Error("SKU and itemId are required to request delivery");return(await i.post({sku:_},`/fulfillments/${encodeURIComponent(M)}/request-delivery?`).res()).ok}async function v(){return i.get("/contracts").json()}async function p(_){return(await i.get("/contracts").json())?.find(J=>J.id===_)}async function g(_){const M=await i.post({},`/contracts/${encodeURIComponent(_)}/cancel`).res();return nr(),M.ok}async function E(){return console.warn("getSubscriptions is deprecated, use getContracts instead"),i.get("/subscriptions").json()}async function b(){return i.get("/bills").json()}async function y(_){return(await i.get("/bills").json())?.find(J=>J.id===_)}async function m(){return i.get("/transactions").json()}async function w(_){return(await i.get("/transactions").json())?.find(J=>J.id===_)}async function O(_,M){const J=await i.url(`/user-metadata/${encodeURIComponent(_)}`).put(M).json();return Ir(Je.USER_ATTRIBUTE_CHANGED,{}),nr(),J}async function N(_){const M=await i.url(`/user-metadata/${encodeURIComponent(_)}`).delete().res();return nr(),M.ok}async function A(){return await i.url("/user-metadata").get().json()}async function K(_){return(await A())[_]||null}async function z(){return await i.url("/tags").get().json()}async function ae(_){const M=await i.url(`/tags/${encodeURIComponent(_)}`).delete().res();return nr(),M.ok}async function L(_){const M=await i.url("/tags").post(encodeURIComponent(_)).res();return Ir(Je.USER_ATTRIBUTE_CHANGED,{}),nr(),M.ok}async function $(_){return(await o.url("/tallies").get().json())[_]}async function q(){return await o.url("/tallies").get().json()}async function k(_){const M=await o.url(`/tallies/${_}`).delete().res();return nr(),M.ok}async function Y(_,M){return await o.url(`/tallies/${encodeURIComponent(_)}/push`).post(M).json()}async function re(_){return await i.url(`/products/${encodeURIComponent(_)}`).get().json()}async function Q(){return await rt(!1)?await i.url("/profile").get().json():null}async function S(_){const M=await i.url("/profile").patch(_).res();return nr(),M.ok}async function T(){return await i.url("/payment-issues").get().json()}async function x(){return(await i.url("/profile/spotify-link").get().json()).isSpotifyLinked}async function H(){return(await i.url("/profile/unlink-spotify").post().res()).ok}async function B(_){const M=await rt(!1);if(!M)throw new Error("No access token available");const J=new URL(`${vr("access-sync",r.environment)}/spotify/sesamy-callback`);J.searchParams.set("access_token",M),J.searchParams.set("state",_),window.location.href=J.toString()}async function Z(_){const M=await i.url(`/products/${encodeURIComponent(_)}/auto-onboard`).post().json();return M.length&&nr(),M}async function fe(_,M=3600){const{shortlink:J}=await mr(Hm).post({url:_,ttl:M}).json();return J}async function ie(_){const M=await rt(!1,!0);let J;const ve=_.language||on(),pe=dn();switch(_.target){case"account":J=new URL(`${vr("account",r.environment)}/${encodeURIComponent(_.language||ve)}/subscriptions/${encodeURIComponent(r.clientId)}${_.contractId?`/${encodeURIComponent(_.contractId)}`:""}`),J.searchParams.set("sesamy-redirect-url",_.redirectUrl||window.location.href);break;case"change-payment":J=new URL(`${vr("account",r.environment)}/${encodeURIComponent(_.language||ve)}/subscriptions/${encodeURIComponent(r.clientId)}/${encodeURIComponent(_.contractId)}/change-payment-method`),J.searchParams.set("sesamy-redirect-url",_.redirectUrl||window.location.href);break;case"change-plan":J=new URL(`${vr("account",r.environment)}/${encodeURIComponent(_.language||ve)}/subscriptions/${encodeURIComponent(r.clientId)}/${encodeURIComponent(_.contractId)}/edit-plan`),J.searchParams.set("sesamy-redirect-url",_.redirectUrl||window.location.href);break;case"consume":J=new URL(`${vr("consume",r.environment)}/${encodeURIComponent(_.language||ve)}/@${encodeURIComponent(r.clientId)}/${encodeURIComponent(_.sku)}`),_.episodeId?J.href+=`/${_.episodeId}`:J.href+="/listen",J.searchParams.set("sesamy-redirect-url",_.redirectUrl||window.location.href);break;case"checkout":J=qy(r,{language:ve,..._},pe);break;default:throw new Error("Invalid target")}return M&&(J.hash=`#access_token=${M}`),_.shorten?fe(J.href,_.ttl):J.href}async function ce(_){const M=dn(),J=["_ga","_gid","_fbp","_fbc"];return document.cookie.split(";").forEach(pe=>{const me=M,[Ae,Ye]=pe.trim().split("=");J.includes(Ae)&&!me[Ae]&&(me[Ae]=Ye)}),(await o.url("/checkouts").post({language:on(),..._,attribution:{...M,..._.attribution},vendorId:r.clientId})).json()}async function oe(_,M){return(await o.url(`/checkouts/${_}`).patch(M)).json()}async function Re(_){return(await o.url(`/checkouts/${_}`).get()).json()}async function _e(_){return(await o.url(`/paywalls/${_}`).get()).json()}async function Fe(){return(await o.url("/vendor").get()).json()}async function Ce(){return(await i.url("/vendors").get()).json()}async function Ze(_){return(await i.url(`/contracts/${encodeURIComponent(_.contractId)}/amendments`).post({amendmentType:_.amendmentType,discountCode:_.discountCode})).json()}async function lr(_){return await i.url(`/amendments/${encodeURIComponent(_)}/confirm`).post(),!0}async function fr(){const _=await rt(!1),M=new URL(`${vr("account",r.environment)}/subscriptions/${r.clientId}`);_&&(M.hash=`#access_token=${_}`),window.location.href=M.toString()}return{autoOnboardProduct:Z,cancelContract:g,confirmAmendment:lr,createAmendment:Ze,createCheckout:ce,deleteTag:ae,deleteTally:k,deleteUserMetadata:N,generateLink:ie,getBill:y,getBills:b,getCheckout:Re,getProxyContent:f,getContract:p,getContracts:v,getEntitlement:l,getEntitlementAccess:u,getEntitlements:s,getFulfillments:h,requestDelivery:d,getPaywall:_e,getPaymentIssues:T,getProfile:Q,getProduct:re,getSubscriptions:E,getTally:$,getTallies:q,getTags:z,getTransaction:w,getTransactions:m,getUserMetadata:K,hasAccess:c,isSpotifyLinked:x,linkSpotify:B,listUserMetadata:A,openHostedAccountPage:fr,pushTally:Y,setTag:L,setUserMetadata:O,unlinkSpotify:H,updateCheckout:oe,updateProfile:S,getVendorSettings:Fe,listVendors:Ce}}const Fy=["AdHeader","AdContainer","AD_Top","homead","ad-lead"];function Hy(){return new Promise(r=>{const e=Fy.map(t=>{const n=document.createElement("div");return n.innerHTML="&nbsp;",n.id=t,n.style.position="absolute",document.body.appendChild(n),n});window.setTimeout(()=>{const t=!e.every(n=>document.querySelector(`#${n.id}`)?.offsetParent);e.forEach(n=>n.remove()),r(t)},100)})}function Ky(){const r=navigator.userAgent.toLowerCase(),e=[{name:"Facebook",regex:/fbav|fban/i},{name:"LinkedIn",regex:/linkedin/i},{name:"Instagram",regex:/instagram/i},{name:"Gmail",regex:/gmail/i},{name:"Twitter",regex:/twitter/i},{name:"WeChat",regex:/micromessenger/i},{name:"Line",regex:/line/i},{name:"Snapchat",regex:/snapchat/i},{name:"Pinterest",regex:/pinterest/i},{name:"Kakao",regex:/kakaotalk/i},{name:"Skype",regex:/skype/i},{name:"WhatsApp",regex:/whatsapp/i}];for(const t of e)if(t.regex.test(r))return{isInAppBrowser:!0,browserName:t.name};return/; wv\)/.test(r)?{isInAppBrowser:!0,browserName:"Unknown In-App Browser"}:{isInAppBrowser:!1,browserName:null}}const Uv="sesamyFlags";async function Lv(r){try{localStorage.setItem(Uv,JSON.stringify(r))}catch{ye("Failed to save flags to localStorage")}}async function zy(r,e){const t=await Ln();t[r]=e,await Lv(t)}async function By(r){return(await Ln())[r]}async function Gy(r){const e=await Ln();r in e&&(delete e[r],await Lv(e))}async function Ln(){try{const r=localStorage.getItem(Uv);return r?JSON.parse(r):{}}catch{return{}}}function Wy(r){const{autoOnboardProduct:e,cancelContract:t,createCheckout:n,deleteTag:a,deleteTally:i,deleteUserMetadata:o,generateLink:s,getBill:c,getBills:l,getCheckout:u,getContract:f,getContracts:h,getEntitlement:d,getEntitlementAccess:v,getEntitlements:p,getFulfillments:g,getPaywall:E,getPaymentIssues:b,getProfile:y,getProduct:m,getProxyContent:w,getSubscriptions:O,getTags:N,getTally:A,getTallies:K,getTransaction:z,getTransactions:ae,getUserMetadata:L,getVendorSettings:$,listVendors:q,hasAccess:k,isSpotifyLinked:Y,linkSpotify:re,listUserMetadata:Q,openHostedAccountPage:S,pushTally:T,requestDelivery:x,setTag:H,setUserMetadata:B,unlinkSpotify:Z,updateCheckout:fe,updateProfile:ie}=My(r),ce={analytics:{track:bv},attribution:{get:dn,set:jv},auth:{getUser:y,getTokenSilently:rt,isAuthenticated:Nt,loginWithRedirect:Un,loginWithPopup:Tv,login:Iy,logout:Cs,setToken:Zo},bills:{get:c,list:l},browser:{detectAdblock:Hy,isInAppBrowser:Ky,isIncognito:bs},checkouts:{create:n,get:u,update:fe},clearCache:nr,content:{list:oy,get:ks,getLanguage:on,unlock:sy,getPropertyFromHTML:pv},contracts:{cancel:t,get:f,list:h},entitlements:{access:v,get:d,hasAccess:k,list:p,signedLinks:js},events:{emit:Sv,cancel:py},flags:{get:By,set:zy,list:Ln,delete:Gy},fulfillments:{list:g,requestDelivery:x},generateLink:s,getPaymentIssues:b,getVersion:Vy,isReady:()=>exports.isInitialized,log:ye,paywalls:{get:E},products:{autoOnboard:e,get:m,linkSpotify:re},profile:{get:y,isSpotifyLinked:Y,openHostedAccountPage:S,unlinkSpotify:Z,update:ie},proxy:{getContent:w},subscriptions:{list:O},tags:{delete:a,list:N,set:H},tallies:{delete:i,get:A,list:K,push:T},transactions:{get:z,list:ae},userMetadata:{delete:o,get:L,list:Q,set:B},vendors:{get:$,list:q},setToken:Zo};return r.namespace&&(window[r.namespace]=ce),ce}function Vy(){return _s}function Jy(r,e){r.style.position="relative",r.style.height="200px",r.style.overflow="hidden";let n=0;const a=Array.from(r.children);for(const o of a){const s=o.offsetHeight;n+s>200?o.remove():n+=s}const i=document.createElement("style");i.innerHTML=`
37
+ ${e.selector}::before {
38
38
  content: '';
39
39
  position: absolute;
40
40
  bottom: 0;
@@ -44,4 +44,4 @@ CAUSE: `+d.stack,w.response=g,w.status=g.status,w.url=f,g.type==="opaque")throw
44
44
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), white);
45
45
  pointer-events: none;
46
46
  }
47
- `,document.head.appendChild(i)}async function Ey(e){try{const r=await fetch(e);return r.ok?await r.text():(console.error(`Failed to fetch content from ${e}: ${r.statusText}`),null)}catch(r){return console.error(`Error fetching content from ${e}:`,r),null}}async function Ts(e){if(e.contentType==="selector"&&e.content){const r=document.querySelector(e.content);if(r)return r.innerHTML;console.warn(`Source element for selector '${e.content}' not found`)}else if(e.contentType==="url"&&e.content){const r=await Ey(e.content);if(r)return r;console.warn(`Failed to fetch content from URL '${e.content}'`)}else if(e.content)return e.content;return""}async function Ry(e,r){const t=r.insertionPoint||"inside",n=await Ts(r);switch(t){case"before":e.insertAdjacentHTML("beforebegin",n);break;case"after":e.insertAdjacentHTML("afterend",n);break;case"inside":default:e.innerHTML+=n;break}}async function _y(e,r){const t=await Ts(r);e.innerHTML=t}async function Ty(e,r){const t=await Ts(r);e.innerHTML=t.replace("${content}",e.innerHTML)}async function Oy({enabled:e=!1,rules:r}){e&&Qh(async()=>{const t=await jt(),n=window.location.href;for(const a of r){const i=document.querySelectorAll(a.selector);if(!(a.path&&!new RegExp(a.path).test(n)))for(const o of i){const s=o;if(!(a.authenticated!==void 0&&a.authenticated!==t))switch(a.transform){case"insert":await Ry(s,a);break;case"replace":await _y(s,a);break;case"remove":o.remove();break;case"wrap":await Ty(s,a);break;case"gradient":Py(s,a);break;default:console.warn(`Unknown transform type: ${a.transform}`)}}}})}const bd="access_token";function ky(){const e=new URLSearchParams(window.location.hash.substring(1)),r=e.get(bd);if(r){Ho(r);const t=new URL(window.location.href);e.delete(bd),t.hash=e.toString(),window.history.replaceState(null,"",t)}}const Sd="sesamy-refresh",Id="force-refetch-entitlements";function Cy(){const e=new URLSearchParams(window.location.search),r=e.get(Id),t=e.get(Sd);if(r!==null||t!==null){const n=new URL(window.location.href);e.delete(Id),e.delete(Sd),n.search=e.toString(),nr(),window.history.replaceState(null,"",n)}}function Ay(e){const r=e.split(".")[1],t=atob(r);return JSON.parse(t)}function jy(){const e=new URLSearchParams(window.location.search),r=e.get("sesamy-token")||e.get("token");if(!r)return;try{const n=Ay(r),a=new Date(n.exp*1e3),i={id:"",title:n.p?.toString(),sku:n.s?.toString(),purchaseOptionsId:n.pid?.toString(),url:n.url?.toString(),token:r,type:"article",expiresAt:a.toISOString(),createdAt:new Date(n.iat).toISOString(),updatedAt:new Date(n.iat).toISOString()};ly(i)}catch(n){ye(`Failed to extract signed link ${n}`)}const t=new URL(window.location.href);t.searchParams.delete("ss"),t.searchParams.delete("se"),t.searchParams.delete("sp"),t.searchParams.delete("so"),t.searchParams.delete("token"),t.searchParams.delete("sesamy-token"),window.history.replaceState(null,"",t)}const Pd="sesamy-user";async function Uy(){const r=new URLSearchParams(window.location.search).get(Pd)?.toLowerCase();if(!r)return;const t=await Jg();t?.email!==r?(ye(`Current user does not match sesamy user: ${t?.email} !== ${r}`),nr(),kn({authorizationParams:{login_hint:r}})):ye(`Current user matches sesamy user: ${t?.email} === ${r}`);const n=new URL(window.location.href);n.searchParams.delete(Pd),window.history.replaceState(null,"",n)}const Ed="sesamy-purchase";function Ly(){const e=new URLSearchParams(window.location.search),r=e.get(Ed);if(r!==null){const t=new URL(window.location.href);e.delete(Ed),t.search=e.toString(),ye(`Purchase ${r}`),Ir(Ve.PURCHASE,{itemSrc:r}),nr(),window.history.replaceState(null,"",t)}}const Rd="sesamy-login",qy="sesamy_login";async function xy(){const e=new URLSearchParams(window.location.search);if(!(e.get(Rd)||e.get(qy)))return;await jt()||kn();const n=new URL(window.location.href);n.searchParams.delete(Rd),window.history.replaceState(null,"",n)}const _d="sesamy-debug";async function Ny(){const r=new URLSearchParams(window.location.search).get(_d)?.toLowerCase();if(!r)return;Fp(r==="true");const t=new URL(window.location.href);t.searchParams.delete(_d),window.history.replaceState(null,"",t)}function $y(){if(!document.referrer.length)return;const e=new URL(document.referrer);if(!(e.hostname===window.location.hostname||e.hostname.includes("sesamy")))return document.referrer}async function Dy(e){if(!Ct())return;const r=new URLSearchParams(window.location.search),t={utmSource:r.get("utm_source")??void 0,utmMedium:r.get("utm_medium")??void 0,utmCampaign:r.get("utm_campaign")??void 0,utmTerm:r.get("utm_term")??void 0,utmContent:r.get("utm_content")??void 0,ref:r.get("ref")??void 0,referrer:$y()},[n]=e.content.list();n?.url&&(t.itemSrc=n.url,t.publisherContentId=n.id),wv(t)}function My(){const e=new URLSearchParams(window.location.search);let r=!1;try{r=!!window.opener&&window.opener.location.origin===window.location.origin}catch{r=!1}const t=sessionStorage.getItem(Uf)==="true",n=e.has("code")||e.has("error")||e.has("state");!r||t||(sessionStorage.setItem(Uf,"true"),n||(ye("Reloading page to get query params in incognito browser"),window.location.reload()))}async function Fy(e){const r=a=>i=>{i.preventDefault();try{a()}catch(o){console.error("Error handling click:",o)}},t=(a,i)=>{try{document.querySelectorAll(a).forEach(s=>{s.addEventListener("click",r(i))})}catch(o){console.error(`Error attaching event handlers (selector: ${a}):`,o)}};t('[sesamy-link="login"]',()=>e.auth.loginWithRedirect()),t('[sesamy-link="logout"]',()=>e.auth.logout());const n=await e.generateLink({target:"account"});n&&t('[sesamy-link="account"]',()=>{window.location.href=n})}async function By(e){const r=await e.auth.isAuthenticated();try{document.querySelectorAll(`[sesamy-visibility="${r?"not-logged-in":"logged-in"}"]`).forEach(a=>{a instanceof HTMLElement&&(a.style.display="none")}),document.querySelectorAll(`[sesamy-visibility="${r?"logged-in":"not-logged-in"}"]`).forEach(a=>{a instanceof HTMLElement&&(a.style.display="")})}catch(t){console.error("Error handling visibility:",t)}}async function zy(e){const r=it("sesamy:locked-content-redirect-url");if(!r)return;const[t]=e.content.list();if(!t)return;await e.entitlements.hasAccess(t.url||"",t.pass?.split(",")||[])||(location.href=r)}exports.isInitialized=!1;async function Td(e,r){ye(`Init with config: ${JSON.stringify(e)}`);try{My(),Bg({clientId:e.clientId,environment:e.environment,...e.analytics}),await Vg({clientId:e.clientId,organization:e.organization,environment:e.environment,...e.auth}),jg(e,r),e.transform&&await Oy(e.transform),wm(),Ny(),Dy(r),ky(),Cy(),jy(),await xy(),await Uy(),Ly(),await By(r),await Fy(r),await zy(r),exports.isInitialized=!0,Ir(Ve.READY,{})}catch(t){ye(`Failed to init ${t.message}`)}}async function Iv(e){ye("Initializing Sesamy");const r=e.api?.namespace||"sesamy";if(Ct()&&r in window)return ye("Sesamy already initialized. This is likely due to a duplicate import"),exports.isInitialized=!0,window[r];const t=Sy({clientId:e.clientId,environment:e.environment,...e.api});return Ct()?(e.awaitAllServices?await Td(e,t):Td(e,t),t):(exports.isInitialized=!0,t)}if(Ct()){const e=document.getElementById("sesamy-js");if(e?.textContent)try{const r=JSON.parse(e.textContent);Iv(r)}catch(r){console.error("Failed to parse config",r)}}exports.init=Iv;
47
+ `,document.head.appendChild(i)}async function Zy(r){try{const e=await fetch(r);return e.ok?await e.text():(console.error(`Failed to fetch content from ${r}: ${e.statusText}`),null)}catch(e){return console.error(`Error fetching content from ${r}:`,e),null}}async function Us(r){if(r.contentType==="selector"&&r.content){const e=document.querySelector(r.content);if(e)return e.innerHTML;console.warn(`Source element for selector '${r.content}' not found`)}else if(r.contentType==="url"&&r.content){const e=await Zy(r.content);if(e)return e;console.warn(`Failed to fetch content from URL '${r.content}'`)}else if(r.content)return r.content;return""}async function Yy(r,e){const t=e.insertionPoint||"inside",n=await Us(e);switch(t){case"before":r.insertAdjacentHTML("beforebegin",n);break;case"after":r.insertAdjacentHTML("afterend",n);break;case"inside":default:r.innerHTML+=n;break}}async function Xy(r,e){const t=await Us(e);r.innerHTML=t}async function Qy(r,e){const t=await Us(e);r.innerHTML=t.replace("${content}",r.innerHTML)}async function ew({enabled:r=!1,rules:e}){r&&dv(async()=>{const t=await Nt(),n=window.location.href;for(const a of e){const i=document.querySelectorAll(a.selector);if(!(a.path&&!new RegExp(a.path).test(n)))for(const o of i){const s=o;if(!(a.authenticated!==void 0&&a.authenticated!==t))switch(a.transform){case"insert":await Yy(s,a);break;case"replace":await Xy(s,a);break;case"remove":o.remove();break;case"wrap":await Qy(s,a);break;case"gradient":Jy(s,a);break;default:console.warn(`Unknown transform type: ${a.transform}`)}}}})}const kd="access_token";function rw(){const r=new URLSearchParams(window.location.hash.substring(1)),e=r.get(kd);if(e){Zo(e);const t=new URL(window.location.href);r.delete(kd),t.hash=r.toString(),window.history.replaceState(null,"",t)}}const Od="sesamy-refresh",Cd="force-refetch-entitlements";function tw(){const r=new URLSearchParams(window.location.search),e=r.get(Cd),t=r.get(Od);if(e!==null||t!==null){const n=new URL(window.location.href);r.delete(Cd),r.delete(Od),n.search=r.toString(),nr(),window.history.replaceState(null,"",n)}}function nw(r){const e=r.split(".")[1],t=atob(e);return JSON.parse(t)}function aw(){const r=new URLSearchParams(window.location.search),e=r.get("sesamy-token")||r.get("token");if(!e)return;try{const n=nw(e),a=new Date(n.exp*1e3),i={id:"",title:n.p?.toString(),sku:n.s?.toString(),purchaseOptionsId:n.pid?.toString(),url:n.url?.toString(),token:e,type:"article",expiresAt:a.toISOString(),createdAt:new Date(n.iat).toISOString(),updatedAt:new Date(n.iat).toISOString()};Ny(i)}catch(n){ye(`Failed to extract signed link ${n}`)}const t=new URL(window.location.href);t.searchParams.delete("ss"),t.searchParams.delete("se"),t.searchParams.delete("sp"),t.searchParams.delete("so"),t.searchParams.delete("token"),t.searchParams.delete("sesamy-token"),window.history.replaceState(null,"",t)}const Ad="sesamy-user";async function iw(){const e=new URLSearchParams(window.location.search).get(Ad)?.toLowerCase();if(!e)return;const t=await Sy();t?.email!==e?(ye(`Current user does not match sesamy user: ${t?.email} !== ${e}`),nr(),Un({authorizationParams:{login_hint:e}})):ye(`Current user matches sesamy user: ${t?.email} === ${e}`);const n=new URL(window.location.href);n.searchParams.delete(Ad),window.history.replaceState(null,"",n)}const jd="sesamy-purchase";function ow(){const r=new URLSearchParams(window.location.search),e=r.get(jd);if(e!==null){const t=new URL(window.location.href);r.delete(jd),t.search=r.toString(),ye(`Purchase ${e}`),Ir(Je.PURCHASE,{itemSrc:e}),nr(),window.history.replaceState(null,"",t)}}const Ud="sesamy-login",sw="sesamy_login";async function uw(){const r=new URLSearchParams(window.location.search);if(!(r.get(Ud)||r.get(sw)))return;await Nt()||Un();const n=new URL(window.location.href);n.searchParams.delete(Ud),window.history.replaceState(null,"",n)}const Ld="sesamy-debug";async function cw(){const e=new URLSearchParams(window.location.search).get(Ld)?.toLowerCase();if(!e)return;em(e==="true");const t=new URL(window.location.href);t.searchParams.delete(Ld),window.history.replaceState(null,"",t)}function lw(){if(!document.referrer.length)return;const r=new URL(document.referrer);if(!(r.hostname===window.location.hostname||r.hostname.includes("sesamy")))return document.referrer}async function fw(r){if(!Lt())return;const e=new URLSearchParams(window.location.search),t={utmSource:e.get("utm_source")??void 0,utmMedium:e.get("utm_medium")??void 0,utmCampaign:e.get("utm_campaign")??void 0,utmTerm:e.get("utm_term")??void 0,utmContent:e.get("utm_content")??void 0,ref:e.get("ref")??void 0,referrer:lw()},[n]=r.content.list();n?.url&&(t.itemSrc=n.url,t.publisherContentId=n.id),jv(t)}function dw(){const r=new URLSearchParams(window.location.search);let e=!1;try{e=!!window.opener&&window.opener.location.origin===window.location.origin}catch{e=!1}const t=sessionStorage.getItem(Ff)==="true",n=r.has("code")||r.has("error")||r.has("state");!e||t||(sessionStorage.setItem(Ff,"true"),n||(ye("Reloading page to get query params in incognito browser"),window.location.reload()))}async function hw(r){const e=a=>i=>{i.preventDefault();try{a()}catch(o){console.error("Error handling click:",o)}},t=(a,i)=>{try{document.querySelectorAll(a).forEach(s=>{s.addEventListener("click",e(i))})}catch(o){console.error(`Error attaching event handlers (selector: ${a}):`,o)}};t('[sesamy-link="login"]',()=>r.auth.loginWithRedirect()),t('[sesamy-link="logout"]',()=>r.auth.logout());const n=await r.generateLink({target:"account"});n&&t('[sesamy-link="account"]',()=>{window.location.href=n})}async function vw(r){const e=await r.auth.isAuthenticated();try{document.querySelectorAll(`[sesamy-visibility="${e?"not-logged-in":"logged-in"}"]`).forEach(a=>{a instanceof HTMLElement&&(a.style.display="none")}),document.querySelectorAll(`[sesamy-visibility="${e?"logged-in":"not-logged-in"}"]`).forEach(a=>{a instanceof HTMLElement&&(a.style.display="")})}catch(t){console.error("Error handling visibility:",t)}}async function pw(r){const e=st("sesamy:locked-content-redirect-url");if(!e)return;const[t]=r.content.list();if(!t)return;await r.entitlements.hasAccess(t.url||"",t.pass?.split(",")||[])||(location.href=e)}exports.isInitialized=!1;async function qd(r,e){ye(`Init with config: ${JSON.stringify(r)}`);try{dw(),vy({clientId:r.clientId,environment:r.environment,...r.analytics}),await by({clientId:r.clientId,organization:r.organization,environment:r.environment,...r.auth}),ay(r,e),r.transform&&await ew(r.transform),Bm(),cw(),fw(e),rw(),tw(),aw(),await uw(),await iw(),ow(),await vw(e),await hw(e),await pw(e),exports.isInitialized=!0,Ir(Je.READY,{})}catch(t){ye(`Failed to init ${t.message}`)}}async function qv(r){ye("Initializing Sesamy");const e=r.api?.namespace||"sesamy";if(Lt()&&e in window)return ye("Sesamy already initialized. This is likely due to a duplicate import"),exports.isInitialized=!0,window[e];const t=Wy({clientId:r.clientId,environment:r.environment,...r.api});return Lt()?(r.awaitAllServices?await qd(r,t):qd(r,t),t):(exports.isInitialized=!0,t)}if(Lt()){const r=document.getElementById("sesamy-js");if(r?.textContent)try{const e=JSON.parse(r.textContent);qv(e)}catch(e){console.error("Failed to parse config",e)}}exports.init=qv;