@sesamy/sesamy-js 1.98.0 → 1.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sesamy-js.cjs +4 -4
- package/dist/sesamy-js.d.ts +5 -1
- package/dist/sesamy-js.iife.js +4 -4
- package/dist/sesamy-js.mjs +456 -448
- package/package.json +1 -1
package/dist/sesamy-js.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Hs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Gs={},Nn,Ws;function Ae(){return Ws||(Ws=1,Nn=function(e){try{return!!e()}catch{return!0}}),Nn}var jn,Vs;function dn(){if(Vs)return jn;Vs=1;var e=Ae();return jn=!e(function(){var r=(function(){}).bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),jn}var Dn,zs;function pe(){if(zs)return Dn;zs=1;var e=dn(),r=Function.prototype,t=r.call,n=e&&r.bind.bind(t,t);return Dn=e?n:function(a){return function(){return t.apply(a,arguments)}},Dn}var Mn,Ks;function vn(){if(Ks)return Mn;Ks=1;var e=pe(),r=e({}.toString),t=e("".slice);return Mn=function(n){return t(r(n),8,-1)},Mn}var Fn,Js;function Fd(){if(Js)return Fn;Js=1;var e=pe(),r=Ae(),t=vn(),n=Object,a=e("".split);return Fn=r(function(){return!n("z").propertyIsEnumerable(0)})?function(i){return t(i)==="String"?a(i,""):n(i)}:n,Fn}var Bn,Ys;function hn(){return Ys||(Ys=1,Bn=function(e){return e==null}),Bn}var Hn,Qs;function pn(){if(Qs)return Hn;Qs=1;var e=hn(),r=TypeError;return Hn=function(t){if(e(t))throw new r("Can't call method on "+t);return t},Hn}var Gn,Xs;function Ut(){if(Xs)return Gn;Xs=1;var e=Fd(),r=pn();return Gn=function(t){return e(r(t))},Gn}var wt,Zs;function me(){if(Zs)return wt;Zs=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 Hs=="object"&&Hs)||e(typeof wt=="object"&&wt)||(function(){return this})()||Function("return this")(),wt}var Wn={exports:{}},Vn,eu;function sr(){return eu||(eu=1,Vn=!1),Vn}var zn,ru;function as(){if(ru)return zn;ru=1;var e=me(),r=Object.defineProperty;return zn=function(t,n){try{r(e,t,{value:n,configurable:!0,writable:!0})}catch{e[t]=n}return n},zn}var tu;function is(){if(tu)return Wn.exports;tu=1;var e=sr(),r=me(),t=as(),n="__core-js_shared__",a=Wn.exports=r[n]||t(n,{});return(a.versions||(a.versions=[])).push({version:"3.46.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Wn.exports}var Kn,nu;function Bd(){if(nu)return Kn;nu=1;var e=is();return Kn=function(r,t){return e[r]||(e[r]=t||{})},Kn}var Jn,au;function mn(){if(au)return Jn;au=1;var e=pn(),r=Object;return Jn=function(t){return r(e(t))},Jn}var Yn,iu;function ze(){if(iu)return Yn;iu=1;var e=pe(),r=mn(),t=e({}.hasOwnProperty);return Yn=Object.hasOwn||function(a,i){return t(r(a),i)},Yn}var Qn,ou;function Hd(){if(ou)return Qn;ou=1;var e=pe(),r=0,t=Math.random(),n=e(1.1.toString);return Qn=function(a){return"Symbol("+(a===void 0?"":a)+")_"+n(++r+t,36)},Qn}var Xn,su;function Lt(){if(su)return Xn;su=1;var e=me(),r=e.navigator,t=r&&r.userAgent;return Xn=t?String(t):"",Xn}var Zn,uu;function Gd(){if(uu)return Zn;uu=1;var e=me(),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]))),Zn=s,Zn}var ea,cu;function Wd(){if(cu)return ea;cu=1;var e=Gd(),r=Ae(),t=me(),n=t.String;return ea=!!Object.getOwnPropertySymbols&&!r(function(){var a=Symbol("symbol detection");return!n(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&e&&e<41}),ea}var ra,lu;function Vd(){if(lu)return ra;lu=1;var e=Wd();return ra=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ra}var ta,fu;function ke(){if(fu)return ta;fu=1;var e=me(),r=Bd(),t=ze(),n=Hd(),a=Wd(),i=Vd(),o=e.Symbol,s=r("wks"),u=i?o.for||o:o&&o.withoutSetter||n;return ta=function(c){return t(s,c)||(s[c]=a&&t(o,c)?o[c]:u("Symbol."+c)),s[c]},ta}var na,du;function we(){if(du)return na;du=1;var e=typeof document=="object"&&document.all;return na=typeof e>"u"&&e!==void 0?function(r){return typeof r=="function"||r===e}:function(r){return typeof r=="function"},na}var aa,vu;function Ke(){if(vu)return aa;vu=1;var e=we();return aa=function(r){return typeof r=="object"?r!==null:e(r)},aa}var ia,hu;function rr(){if(hu)return ia;hu=1;var e=Ke(),r=String,t=TypeError;return ia=function(n){if(e(n))return n;throw new t(r(n)+" is not an object")},ia}var oa={},sa,pu;function qe(){if(pu)return sa;pu=1;var e=Ae();return sa=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),sa}var ua,mu;function zd(){if(mu)return ua;mu=1;var e=qe(),r=Ae();return ua=e&&r(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),ua}var ca={},la,gu;function gn(){if(gu)return la;gu=1;var e=me(),r=Ke(),t=e.document,n=r(t)&&r(t.createElement);return la=function(a){return n?t.createElement(a):{}},la}var fa,yu;function Kd(){if(yu)return fa;yu=1;var e=qe(),r=Ae(),t=gn();return fa=!e&&!r(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),fa}var da,bu;function Le(){if(bu)return da;bu=1;var e=dn(),r=Function.prototype.call;return da=e?r.bind(r):function(){return r.apply(r,arguments)},da}var va,wu;function Je(){if(wu)return va;wu=1;var e=me(),r=we(),t=function(n){return r(n)?n:void 0};return va=function(n,a){return arguments.length<2?t(e[n]):e[n]&&e[n][a]},va}var ha,Su;function yn(){if(Su)return ha;Su=1;var e=pe();return ha=e({}.isPrototypeOf),ha}var pa,Iu;function Jd(){if(Iu)return pa;Iu=1;var e=Je(),r=we(),t=yn(),n=Vd(),a=Object;return pa=n?function(i){return typeof i=="symbol"}:function(i){var o=e("Symbol");return r(o)&&t(o.prototype,a(i))},pa}var ma,Pu;function bn(){if(Pu)return ma;Pu=1;var e=String;return ma=function(r){try{return e(r)}catch{return"Object"}},ma}var ga,Eu;function tr(){if(Eu)return ga;Eu=1;var e=we(),r=bn(),t=TypeError;return ga=function(n){if(e(n))return n;throw new t(r(n)+" is not a function")},ga}var ya,Ru;function os(){if(Ru)return ya;Ru=1;var e=tr(),r=hn();return ya=function(t,n){var a=t[n];return r(a)?void 0:e(a)},ya}var ba,Tu;function Fh(){if(Tu)return ba;Tu=1;var e=Le(),r=we(),t=Ke(),n=TypeError;return ba=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")},ba}var wa,Ou;function Bh(){if(Ou)return wa;Ou=1;var e=Le(),r=Ke(),t=Jd(),n=os(),a=Fh(),i=ke(),o=TypeError,s=i("toPrimitive");return wa=function(u,c){if(!r(u)||t(u))return u;var l=n(u,s),f;if(l){if(c===void 0&&(c="default"),f=e(l,u,c),!r(f)||t(f))return f;throw new o("Can't convert object to primitive value")}return c===void 0&&(c="number"),a(u,c)},wa}var Sa,Cu;function Yd(){if(Cu)return Sa;Cu=1;var e=Bh(),r=Jd();return Sa=function(t){var n=e(t,"string");return r(n)?n:n+""},Sa}var _u;function gr(){if(_u)return ca;_u=1;var e=qe(),r=Kd(),t=zd(),n=rr(),a=Yd(),i=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",c="configurable",l="writable";return ca.f=e?t?function(v,d,h){if(n(v),d=a(d),n(h),typeof v=="function"&&d==="prototype"&&"value"in h&&l in h&&!h[l]){var p=s(v,d);p&&p[l]&&(v[d]=h.value,h={configurable:c in h?h[c]:p[c],enumerable:u in h?h[u]:p[u],writable:!1})}return o(v,d,h)}:o:function(v,d,h){if(n(v),d=a(d),n(h),r)try{return o(v,d,h)}catch{}if("get"in h||"set"in h)throw new i("Accessors not supported");return"value"in h&&(v[d]=h.value),v},ca}var Ia,Au;function Hh(){if(Au)return Ia;Au=1;var e=Math.ceil,r=Math.floor;return Ia=Math.trunc||function(n){var a=+n;return(a>0?r:e)(a)},Ia}var Pa,ku;function ss(){if(ku)return Pa;ku=1;var e=Hh();return Pa=function(r){var t=+r;return t!==t||t===0?0:e(t)},Pa}var Ea,qu;function Qd(){if(qu)return Ea;qu=1;var e=ss(),r=Math.max,t=Math.min;return Ea=function(n,a){var i=e(n);return i<0?r(i+a,0):t(i,a)},Ea}var Ra,$u;function Gh(){if($u)return Ra;$u=1;var e=ss(),r=Math.min;return Ra=function(t){var n=e(t);return n>0?r(n,9007199254740991):0},Ra}var Ta,Uu;function us(){if(Uu)return Ta;Uu=1;var e=Gh();return Ta=function(r){return e(r.length)},Ta}var Oa,Lu;function Wh(){if(Lu)return Oa;Lu=1;var e=Ut(),r=Qd(),t=us(),n=function(a){return function(i,o,s){var u=e(i),c=t(u);if(c===0)return!a&&-1;var l=r(s,c),f;if(a&&o!==o){for(;c>l;)if(f=u[l++],f!==f)return!0}else for(;c>l;l++)if((a||l in u)&&u[l]===o)return a||l||0;return!a&&-1}};return Oa={includes:n(!0),indexOf:n(!1)},Oa}var Ca,xu;function cs(){return xu||(xu=1,Ca={}),Ca}var _a,Nu;function Xd(){if(Nu)return _a;Nu=1;var e=pe(),r=ze(),t=Ut(),n=Wh().indexOf,a=cs(),i=e([].push);return _a=function(o,s){var u=t(o),c=0,l=[],f;for(f in u)!r(a,f)&&r(u,f)&&i(l,f);for(;s.length>c;)r(u,f=s[c++])&&(~n(l,f)||i(l,f));return l},_a}var Aa,ju;function ls(){return ju||(ju=1,Aa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Aa}var ka,Du;function Zd(){if(Du)return ka;Du=1;var e=Xd(),r=ls();return ka=Object.keys||function(n){return e(n,r)},ka}var Mu;function Vh(){if(Mu)return oa;Mu=1;var e=qe(),r=zd(),t=gr(),n=rr(),a=Ut(),i=Zd();return oa.f=e&&!r?Object.defineProperties:function(s,u){n(s);for(var c=a(u),l=i(u),f=l.length,v=0,d;f>v;)t.f(s,d=l[v++],c[d]);return s},oa}var qa,Fu;function ev(){if(Fu)return qa;Fu=1;var e=Je();return qa=e("document","documentElement"),qa}var $a,Bu;function fs(){if(Bu)return $a;Bu=1;var e=Bd(),r=Hd(),t=e("keys");return $a=function(n){return t[n]||(t[n]=r(n))},$a}var Ua,Hu;function xt(){if(Hu)return Ua;Hu=1;var e=rr(),r=Vh(),t=ls(),n=cs(),a=ev(),i=gn(),o=fs(),s=">",u="<",c="prototype",l="script",f=o("IE_PROTO"),v=function(){},d=function(I){return u+l+s+I+u+"/"+l+s},h=function(I){I.write(d("")),I.close();var g=I.parentWindow.Object;return I=null,g},p=function(){var I=i("iframe"),g="java"+l+":",b;return I.style.display="none",a.appendChild(I),I.src=String(g),b=I.contentWindow.document,b.open(),b.write(d("document.F=Object")),b.close(),b.F},S,R=function(){try{S=new ActiveXObject("htmlfile")}catch{}R=typeof document<"u"?document.domain&&S?h(S):p():h(S);for(var I=t.length;I--;)delete R[c][t[I]];return R()};return n[f]=!0,Ua=Object.create||function(g,b){var y;return g!==null?(v[c]=e(g),y=new v,v[c]=null,y[f]=g):y=R(),b===void 0?y:r.f(y,b)},Ua}var La,Gu;function zh(){if(Gu)return La;Gu=1;var e=ke(),r=xt(),t=gr().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 xa,Wu;function Nt(){return Wu||(Wu=1,xa={}),xa}var Na,Vu;function Kh(){if(Vu)return Na;Vu=1;var e=me(),r=we(),t=e.WeakMap;return Na=r(t)&&/native code/.test(String(t)),Na}var ja,zu;function Gr(){return zu||(zu=1,ja=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}),ja}var Da,Ku;function Wr(){if(Ku)return Da;Ku=1;var e=qe(),r=gr(),t=Gr();return Da=e?function(n,a,i){return r.f(n,a,t(1,i))}:function(n,a,i){return n[a]=i,n},Da}var Ma,Ju;function ft(){if(Ju)return Ma;Ju=1;var e=Kh(),r=me(),t=Ke(),n=Wr(),a=ze(),i=is(),o=fs(),s=cs(),u="Object already initialized",c=r.TypeError,l=r.WeakMap,f,v,d,h=function(I){return d(I)?v(I):f(I,{})},p=function(I){return function(g){var b;if(!t(g)||(b=v(g)).type!==I)throw new c("Incompatible receiver, "+I+" required");return b}};if(e||i.state){var S=i.state||(i.state=new l);S.get=S.get,S.has=S.has,S.set=S.set,f=function(I,g){if(S.has(I))throw new c(u);return g.facade=I,S.set(I,g),g},v=function(I){return S.get(I)||{}},d=function(I){return S.has(I)}}else{var R=o("state");s[R]=!0,f=function(I,g){if(a(I,R))throw new c(u);return g.facade=I,n(I,R,g),g},v=function(I){return a(I,R)?I[R]:{}},d=function(I){return a(I,R)}}return Ma={set:f,get:v,has:d,enforce:h,getterFor:p},Ma}var Fa={},Ba={},Yu;function rv(){if(Yu)return Ba;Yu=1;var e={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,t=r&&!e.call({1:2},1);return Ba.f=t?function(a){var i=r(this,a);return!!i&&i.enumerable}:e,Ba}var Qu;function tv(){if(Qu)return Fa;Qu=1;var e=qe(),r=Le(),t=rv(),n=Gr(),a=Ut(),i=Yd(),o=ze(),s=Kd(),u=Object.getOwnPropertyDescriptor;return Fa.f=e?u:function(l,f){if(l=a(l),f=i(f),s)try{return u(l,f)}catch{}if(o(l,f))return n(!r(t.f,l,f),l[f])},Fa}var Ha={exports:{}},Ga,Xu;function nv(){if(Xu)return Ga;Xu=1;var e=qe(),r=ze(),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 Ga={EXISTS:a,PROPER:i,CONFIGURABLE:o},Ga}var Wa,Zu;function ds(){if(Zu)return Wa;Zu=1;var e=pe(),r=we(),t=is(),n=e(Function.toString);return r(t.inspectSource)||(t.inspectSource=function(a){return n(a)}),Wa=t.inspectSource,Wa}var ec;function av(){if(ec)return Ha.exports;ec=1;var e=pe(),r=Ae(),t=we(),n=ze(),a=qe(),i=nv().CONFIGURABLE,o=ds(),s=ft(),u=s.enforce,c=s.get,l=String,f=Object.defineProperty,v=e("".slice),d=e("".replace),h=e([].join),p=a&&!r(function(){return f(function(){},"length",{value:8}).length!==8}),S=String(String).split("String"),R=Ha.exports=function(I,g,b){v(l(g),0,7)==="Symbol("&&(g="["+d(l(g),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),b&&b.getter&&(g="get "+g),b&&b.setter&&(g="set "+g),(!n(I,"name")||i&&I.name!==g)&&(a?f(I,"name",{value:g,configurable:!0}):I.name=g),p&&b&&n(b,"arity")&&I.length!==b.arity&&f(I,"length",{value:b.arity});try{b&&n(b,"constructor")&&b.constructor?a&&f(I,"prototype",{writable:!1}):I.prototype&&(I.prototype=void 0)}catch{}var y=u(I);return n(y,"source")||(y.source=h(S,typeof g=="string"?g:"")),I};return Function.prototype.toString=R(function(){return t(this)&&c(this).source||o(this)},"toString"),Ha.exports}var Va,rc;function Ye(){if(rc)return Va;rc=1;var e=we(),r=gr(),t=av(),n=as();return Va=function(a,i,o,s){s||(s={});var u=s.enumerable,c=s.name!==void 0?s.name:i;if(e(o)&&t(o,c,s),s.global)u?a[i]=o:n(i,o);else{try{s.unsafe?a[i]&&(u=!0):delete a[i]}catch{}u?a[i]=o:r.f(a,i,{value:o,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return a},Va}var za={},tc;function Jh(){if(tc)return za;tc=1;var e=Xd(),r=ls(),t=r.concat("length","prototype");return za.f=Object.getOwnPropertyNames||function(a){return e(a,t)},za}var Ka={},nc;function iv(){return nc||(nc=1,Ka.f=Object.getOwnPropertySymbols),Ka}var Ja,ac;function Yh(){if(ac)return Ja;ac=1;var e=Je(),r=pe(),t=Jh(),n=iv(),a=rr(),i=r([].concat);return Ja=e("Reflect","ownKeys")||function(s){var u=t.f(a(s)),c=n.f;return c?i(u,c(s)):u},Ja}var Ya,ic;function ov(){if(ic)return Ya;ic=1;var e=ze(),r=Yh(),t=tv(),n=gr();return Ya=function(a,i,o){for(var s=r(i),u=n.f,c=t.f,l=0;l<s.length;l++){var f=s[l];!e(a,f)&&!(o&&e(o,f))&&u(a,f,c(i,f))}},Ya}var Qa,oc;function sv(){if(oc)return Qa;oc=1;var e=Ae(),r=we(),t=/#|\.prototype\./,n=function(u,c){var l=i[a(u)];return l===s?!0:l===o?!1:r(c)?e(c):!!c},a=n.normalize=function(u){return String(u).replace(t,".").toLowerCase()},i=n.data={},o=n.NATIVE="N",s=n.POLYFILL="P";return Qa=n,Qa}var Xa,sc;function Pe(){if(sc)return Xa;sc=1;var e=me(),r=tv().f,t=Wr(),n=Ye(),a=as(),i=ov(),o=sv();return Xa=function(s,u){var c=s.target,l=s.global,f=s.stat,v,d,h,p,S,R;if(l?d=e:f?d=e[c]||a(c,{}):d=e[c]&&e[c].prototype,d)for(h in u){if(S=u[h],s.dontCallGetSet?(R=r(d,h),p=R&&R.value):p=d[h],v=o(l?h:c+(f?".":"#")+h,s.forced),!v&&p!==void 0){if(typeof S==typeof p)continue;i(S,p)}(s.sham||p&&p.sham)&&t(S,"sham",!0),n(d,h,S,s)}},Xa}var Za,uc;function Qh(){if(uc)return Za;uc=1;var e=Ae();return Za=!e(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),Za}var ei,cc;function vs(){if(cc)return ei;cc=1;var e=ze(),r=we(),t=mn(),n=fs(),a=Qh(),i=n("IE_PROTO"),o=Object,s=o.prototype;return ei=a?o.getPrototypeOf:function(u){var c=t(u);if(e(c,i))return c[i];var l=c.constructor;return r(l)&&c instanceof l?l.prototype:c instanceof o?s:null},ei}var ri,lc;function uv(){if(lc)return ri;lc=1;var e=Ae(),r=we(),t=Ke(),n=xt(),a=vs(),i=Ye(),o=ke(),s=sr(),u=o("iterator"),c=!1,l,f,v;[].keys&&(v=[].keys(),"next"in v?(f=a(a(v)),f!==Object.prototype&&(l=f)):c=!0);var d=!t(l)||e(function(){var h={};return l[u].call(h)!==h});return d?l={}:s&&(l=n(l)),r(l[u])||i(l,u,function(){return this}),ri={IteratorPrototype:l,BUGGY_SAFARI_ITERATORS:c},ri}var ti,fc;function dt(){if(fc)return ti;fc=1;var e=gr().f,r=ze(),t=ke(),n=t("toStringTag");return ti=function(a,i,o){a&&!o&&(a=a.prototype),a&&!r(a,n)&&e(a,n,{configurable:!0,value:i})},ti}var ni,dc;function cv(){if(dc)return ni;dc=1;var e=uv().IteratorPrototype,r=xt(),t=Gr(),n=dt(),a=Nt(),i=function(){return this};return ni=function(o,s,u,c){var l=s+" Iterator";return o.prototype=r(e,{next:t(+!c,u)}),n(o,l,!1,!0),a[l]=i,o},ni}var ai,vc;function Xh(){if(vc)return ai;vc=1;var e=pe(),r=tr();return ai=function(t,n,a){try{return e(r(Object.getOwnPropertyDescriptor(t,n)[a]))}catch{}},ai}var ii,hc;function Zh(){if(hc)return ii;hc=1;var e=Ke();return ii=function(r){return e(r)||r===null},ii}var oi,pc;function ep(){if(pc)return oi;pc=1;var e=Zh(),r=String,t=TypeError;return oi=function(n){if(e(n))return n;throw new t("Can't set "+r(n)+" as a prototype")},oi}var si,mc;function hs(){if(mc)return si;mc=1;var e=Xh(),r=Ke(),t=pn(),n=ep();return si=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(u,c){return t(u),n(c),r(u)&&(a?o(u,c):u.__proto__=c),u}})():void 0),si}var ui,gc;function lv(){if(gc)return ui;gc=1;var e=Pe(),r=Le(),t=sr(),n=nv(),a=we(),i=cv(),o=vs(),s=hs(),u=dt(),c=Wr(),l=Ye(),f=ke(),v=Nt(),d=uv(),h=n.PROPER,p=n.CONFIGURABLE,S=d.IteratorPrototype,R=d.BUGGY_SAFARI_ITERATORS,I=f("iterator"),g="keys",b="values",y="entries",A=function(){return this};return ui=function(q,j,G,K,re,L,M){i(G,j,K);var N=function(J){if(J===re&&w)return w;if(!R&&J&&J in U)return U[J];switch(J){case g:return function(){return new G(this,J)};case b:return function(){return new G(this,J)};case y:return function(){return new G(this,J)}}return function(){return new G(this)}},m=j+" Iterator",C=!1,U=q.prototype,F=U[I]||U["@@iterator"]||re&&U[re],w=!R&&F||N(re),T=j==="Array"&&U.entries||F,x,H,Q;if(T&&(x=o(T.call(new q)),x!==Object.prototype&&x.next&&(!t&&o(x)!==S&&(s?s(x,S):a(x[I])||l(x,I,A)),u(x,m,!0,!0),t&&(v[m]=A))),h&&re===b&&F&&F.name!==b&&(!t&&p?c(U,"name",b):(C=!0,w=function(){return r(F,this)})),re)if(H={values:N(b),keys:L?w:N(g),entries:N(y)},M)for(Q in H)(R||C||!(Q in U))&&l(U,Q,H[Q]);else e({target:j,proto:!0,forced:R||C},H);return(!t||M)&&U[I]!==w&&l(U,I,w,{name:re}),v[j]=w,H},ui}var ci,yc;function ps(){return yc||(yc=1,ci=function(e,r){return{value:e,done:r}}),ci}var li,bc;function ms(){if(bc)return li;bc=1;var e=Ut(),r=zh(),t=Nt(),n=ft(),a=gr().f,i=lv(),o=ps(),s=sr(),u=qe(),c="Array Iterator",l=n.set,f=n.getterFor(c);li=i(Array,"Array",function(d,h){l(this,{type:c,target:e(d),index:0,kind:h})},function(){var d=f(this),h=d.target,p=d.index++;if(!h||p>=h.length)return d.target=null,o(void 0,!0);switch(d.kind){case"keys":return o(p,!1);case"values":return o(h[p],!1)}return o([p,h[p]],!1)},"values");var v=t.Arguments=t.Array;if(r("keys"),r("values"),r("entries"),!s&&u&&v.name!=="values")try{a(v,"name",{value:"values"})}catch{}return li}var wc={},Sc;function rp(){if(Sc)return wc;Sc=1;var e=Pe(),r=pe(),t=Qd(),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(c){for(var l=[],f=arguments.length,v=0,d;f>v;){if(d=+arguments[v++],t(d,1114111)!==d)throw new n(d+" is not a valid code point");l[v]=d<65536?a(d):a(((d-=65536)>>10)+55296,d%1024+56320)}return o(l,"")}}),wc}var fi,Ic;function fv(){if(Ic)return fi;Ic=1;var e=me(),r=qe(),t=Object.getOwnPropertyDescriptor;return fi=function(n){if(!r)return e[n];var a=t(e,n);return a&&a.value},fi}var di,Pc;function wn(){if(Pc)return di;Pc=1;var e=Ae(),r=ke(),t=qe(),n=sr(),a=r("iterator");return di=!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"),u="";return i.pathname="c%20d",o.forEach(function(c,l){o.delete("b"),u+=l+c}),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"||u!=="a1c3"||new URL("https://x",void 0).host!=="x"}),di}var vi,Ec;function Sn(){if(Ec)return vi;Ec=1;var e=av(),r=gr();return vi=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)},vi}var hi,Rc;function tp(){if(Rc)return hi;Rc=1;var e=Ye();return hi=function(r,t,n){for(var a in t)e(r,a,t[a],n);return r},hi}var pi,Tc;function gs(){if(Tc)return pi;Tc=1;var e=yn(),r=TypeError;return pi=function(t,n){if(e(n,t))return t;throw new r("Incorrect invocation")},pi}var mi,Oc;function np(){if(Oc)return mi;Oc=1;var e=vn(),r=pe();return mi=function(t){if(e(t)==="Function")return r(t)},mi}var gi,Cc;function vt(){if(Cc)return gi;Cc=1;var e=np(),r=tr(),t=dn(),n=e(e.bind);return gi=function(a,i){return r(a),i===void 0?a:t?n(a,i):function(){return a.apply(i,arguments)}},gi}var yi,_c;function ys(){if(_c)return yi;_c=1;var e=ke(),r=e("toStringTag"),t={};return t[r]="z",yi=String(t)==="[object z]",yi}var bi,Ac;function jt(){if(Ac)return bi;Ac=1;var e=ys(),r=we(),t=vn(),n=ke(),a=n("toStringTag"),i=Object,o=t((function(){return arguments})())==="Arguments",s=function(u,c){try{return u[c]}catch{}};return bi=e?t:function(u){var c,l,f;return u===void 0?"Undefined":u===null?"Null":typeof(l=s(c=i(u),a))=="string"?l:o?t(c):(f=t(c))==="Object"&&r(c.callee)?"Arguments":f},bi}var wi,kc;function yr(){if(kc)return wi;kc=1;var e=jt(),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 Si,qc;function In(){if(qc)return Si;qc=1;var e=jt(),r=os(),t=hn(),n=Nt(),a=ke(),i=a("iterator");return Si=function(o){if(!t(o))return r(o,i)||r(o,"@@iterator")||n[e(o)]},Si}var Ii,$c;function bs(){if($c)return Ii;$c=1;var e=Le(),r=tr(),t=rr(),n=bn(),a=In(),i=TypeError;return Ii=function(o,s){var u=arguments.length<2?a(o):s;if(r(u))return t(e(u,o));throw new i(n(o)+" is not iterable")},Ii}var Pi,Uc;function Vr(){if(Uc)return Pi;Uc=1;var e=TypeError;return Pi=function(r,t){if(r<t)throw new e("Not enough arguments");return r},Pi}var Ei,Lc;function Pn(){if(Lc)return Ei;Lc=1;var e=pe();return Ei=e([].slice),Ei}var Ri,xc;function ap(){if(xc)return Ri;xc=1;var e=Pn(),r=Math.floor,t=function(n,a){var i=n.length;if(i<8)for(var o=1,s,u;o<i;){for(u=o,s=n[o];u&&a(n[u-1],s)>0;)n[u]=n[--u];u!==o++&&(n[u]=s)}else for(var c=r(i/2),l=t(e(n,0,c),a),f=t(e(n,c),a),v=l.length,d=f.length,h=0,p=0;h<v||p<d;)n[h+p]=h<v&&p<d?a(l[h],f[p])<=0?l[h++]:f[p++]:h<v?l[h++]:f[p++];return n};return Ri=t,Ri}var Ti,Nc;function dv(){if(Nc)return Ti;Nc=1,ms(),rp();var e=Pe(),r=me(),t=fv(),n=Je(),a=Le(),i=pe(),o=qe(),s=wn(),u=Ye(),c=Sn(),l=tp(),f=dt(),v=cv(),d=ft(),h=gs(),p=we(),S=ze(),R=vt(),I=jt(),g=rr(),b=Ke(),y=yr(),A=xt(),q=Gr(),j=bs(),G=In(),K=ps(),re=Vr(),L=ke(),M=ap(),N=L("iterator"),m="URLSearchParams",C=m+"Iterator",U=d.set,F=d.getterFor(m),w=d.getterFor(C),T=t("fetch"),x=t("Request"),H=t("Headers"),Q=x&&x.prototype,J=H&&H.prototype,le=r.TypeError,ne=r.encodeURIComponent,ue=String.fromCharCode,ae=n("String","fromCodePoint"),Re=parseInt,xe=i("".charAt),je=i([].join),$e=i([].push),Qe=i("".replace),wr=i([].shift),Sr=i([].splice),_r=i("".split),Ar=i("".slice),yt=i(/./.exec),zr=/\+/g,kr="�",ye=/^[0-9a-f]+$/i,Xe=function(D,V){var z=Ar(D,V,V+2);return yt(ye,z)?Re(z,16):NaN},qr=function(D){for(var V=0,z=128;z>0&&(D&z)!==0;z>>=1)V++;return V},B=function(D){var V=null;switch(D.length){case 1:V=D[0];break;case 2:V=(D[0]&31)<<6|D[1]&63;break;case 3:V=(D[0]&15)<<12|(D[1]&63)<<6|D[2]&63;break;case 4:V=(D[0]&7)<<18|(D[1]&63)<<12|(D[2]&63)<<6|D[3]&63;break}return V>1114111?null:V},X=function(D){D=Qe(D,zr," ");for(var V=D.length,z="",Y=0;Y<V;){var ie=xe(D,Y);if(ie==="%"){if(xe(D,Y+1)==="%"||Y+3>V){z+="%",Y++;continue}var se=Xe(D,Y+1);if(se!==se){z+=ie,Y++;continue}Y+=2;var ve=qr(se);if(ve===0)ie=ue(se);else{if(ve===1||ve>4){z+=kr,Y++;continue}for(var he=[se],Se=1;Se<ve&&(Y++,!(Y+3>V||xe(D,Y)!=="%"));){var Ue=Xe(D,Y+1);if(Ue!==Ue){Y+=3;break}if(Ue>191||Ue<128)break;$e(he,Ue),Y+=2,Se++}if(he.length!==ve){z+=kr;continue}var nr=B(he);nr===null?z+=kr:ie=ae(nr)}}z+=ie,Y++}return z},oe=/[!'()~]|%20/g,ce={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},fe=function(D){return ce[D]},He=function(D){return Qe(ne(D),oe,fe)},Te=v(function(V,z){U(this,{type:C,target:F(V).entries,index:0,kind:z})},m,function(){var V=w(this),z=V.target,Y=V.index++;if(!z||Y>=z.length)return V.target=null,K(void 0,!0);var ie=z[Y];switch(V.kind){case"keys":return K(ie.key,!1);case"values":return K(ie.value,!1)}return K([ie.key,ie.value],!1)},!0),De=function(D){this.entries=[],this.url=null,D!==void 0&&(b(D)?this.parseObject(D):this.parseQuery(typeof D=="string"?xe(D,0)==="?"?Ar(D,1):D:y(D)))};De.prototype={type:m,bindURL:function(D){this.url=D,this.update()},parseObject:function(D){var V=this.entries,z=G(D),Y,ie,se,ve,he,Se,Ue;if(z)for(Y=j(D,z),ie=Y.next;!(se=a(ie,Y)).done;){if(ve=j(g(se.value)),he=ve.next,(Se=a(he,ve)).done||(Ue=a(he,ve)).done||!a(he,ve).done)throw new le("Expected sequence with length 2");$e(V,{key:y(Se.value),value:y(Ue.value)})}else for(var nr in D)S(D,nr)&&$e(V,{key:nr,value:y(D[nr])})},parseQuery:function(D){if(D)for(var V=this.entries,z=_r(D,"&"),Y=0,ie,se;Y<z.length;)ie=z[Y++],ie.length&&(se=_r(ie,"="),$e(V,{key:X(wr(se)),value:X(je(se,"="))}))},serialize:function(){for(var D=this.entries,V=[],z=0,Y;z<D.length;)Y=D[z++],$e(V,He(Y.key)+"="+He(Y.value));return je(V,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Oe=function(){h(this,Ge);var V=arguments.length>0?arguments[0]:void 0,z=U(this,new De(V));o||(this.size=z.entries.length)},Ge=Oe.prototype;if(l(Ge,{append:function(V,z){var Y=F(this);re(arguments.length,2),$e(Y.entries,{key:y(V),value:y(z)}),o||this.length++,Y.updateURL()},delete:function(D){for(var V=F(this),z=re(arguments.length,1),Y=V.entries,ie=y(D),se=z<2?void 0:arguments[1],ve=se===void 0?se:y(se),he=0;he<Y.length;){var Se=Y[he];if(Se.key===ie&&(ve===void 0||Se.value===ve)){if(Sr(Y,he,1),ve!==void 0)break}else he++}o||(this.size=Y.length),V.updateURL()},get:function(V){var z=F(this).entries;re(arguments.length,1);for(var Y=y(V),ie=0;ie<z.length;ie++)if(z[ie].key===Y)return z[ie].value;return null},getAll:function(V){var z=F(this).entries;re(arguments.length,1);for(var Y=y(V),ie=[],se=0;se<z.length;se++)z[se].key===Y&&$e(ie,z[se].value);return ie},has:function(V){for(var z=F(this).entries,Y=re(arguments.length,1),ie=y(V),se=Y<2?void 0:arguments[1],ve=se===void 0?se:y(se),he=0;he<z.length;){var Se=z[he++];if(Se.key===ie&&(ve===void 0||Se.value===ve))return!0}return!1},set:function(V,z){var Y=F(this);re(arguments.length,1);for(var ie=Y.entries,se=!1,ve=y(V),he=y(z),Se=0,Ue;Se<ie.length;Se++)Ue=ie[Se],Ue.key===ve&&(se?Sr(ie,Se--,1):(se=!0,Ue.value=he));se||$e(ie,{key:ve,value:he}),o||(this.size=ie.length),Y.updateURL()},sort:function(){var V=F(this);M(V.entries,function(z,Y){return z.key>Y.key?1:-1}),V.updateURL()},forEach:function(V){for(var z=F(this).entries,Y=R(V,arguments.length>1?arguments[1]:void 0),ie=0,se;ie<z.length;)se=z[ie++],Y(se.value,se.key,this)},keys:function(){return new Te(this,"keys")},values:function(){return new Te(this,"values")},entries:function(){return new Te(this,"entries")}},{enumerable:!0}),u(Ge,N,Ge.entries,{name:"entries"}),u(Ge,"toString",function(){return F(this).serialize()},{enumerable:!0}),o&&c(Ge,"size",{get:function(){return F(this).entries.length},configurable:!0,enumerable:!0}),f(Oe,m),e({global:!0,constructor:!0,forced:!s},{URLSearchParams:Oe}),!s&&p(H)){var Kr=i(J.has),bt=i(J.set),Jr=function(D){if(b(D)){var V=D.body,z;if(I(V)===m)return z=D.headers?new H(D.headers):new H,Kr(z,"content-type")||bt(z,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),A(D,{body:q(0,y(V)),headers:q(0,z)})}return D};if(p(T)&&e({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(V){return T(V,arguments.length>1?Jr(arguments[1]):{})}}),p(x)){var Yr=function(V){return h(this,Q),new x(V,arguments.length>1?Jr(arguments[1]):{})};Q.constructor=Yr,Yr.prototype=Q,e({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Yr})}}return Ti={URLSearchParams:Oe,getState:F},Ti}var jc;function ip(){return jc||(jc=1,dv()),Gs}var Dc={},Mc;function op(){if(Mc)return Dc;Mc=1;var e=Ye(),r=pe(),t=yr(),n=Vr(),a=URLSearchParams,i=a.prototype,o=r(i.append),s=r(i.delete),u=r(i.forEach),c=r([].push),l=new a("a=1&a=2&b=3");return l.delete("a",1),l.delete("b",void 0),l+""!="a=2"&&e(i,"delete",function(f){var v=arguments.length,d=v<2?void 0:arguments[1];if(v&&d===void 0)return s(this,f);var h=[];u(this,function(A,q){c(h,{key:q,value:A})}),n(v,1);for(var p=t(f),S=t(d),R=0,I=0,g=!1,b=h.length,y;R<b;)y=h[R++],g||y.key===p?(g=!0,s(this,y.key)):I++;for(;I<b;)y=h[I++],y.key===p&&y.value===S||o(this,y.key,y.value)},{enumerable:!0,unsafe:!0}),Dc}var Fc={},Bc;function sp(){if(Bc)return Fc;Bc=1;var e=Ye(),r=pe(),t=yr(),n=Vr(),a=URLSearchParams,i=a.prototype,o=r(i.getAll),s=r(i.has),u=new a("a=1");return(u.has("a",2)||!u.has("a",void 0))&&e(i,"has",function(l){var f=arguments.length,v=f<2?void 0:arguments[1];if(f&&v===void 0)return s(this,l);var d=o(this,l);n(f,1);for(var h=t(v),p=0;p<d.length;)if(d[p++]===h)return!0;return!1},{enumerable:!0,unsafe:!0}),Fc}var Hc={},Gc;function up(){if(Gc)return Hc;Gc=1;var e=qe(),r=pe(),t=Sn(),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}),Hc}var Oi,Wc;function En(){if(Wc)return Oi;Wc=1;var e=me();return Oi=e,Oi}var Ci,Vc;function vv(){if(Vc)return Ci;Vc=1,ip(),op(),sp(),up();var e=En();return Ci=e.URLSearchParams,Ci}var zc={},Kc={},Jc={},_i,Yc;function hv(){if(Yc)return _i;Yc=1;var e=pe(),r=ss(),t=yr(),n=pn(),a=e("".charAt),i=e("".charCodeAt),o=e("".slice),s=function(u){return function(c,l){var f=t(n(c)),v=r(l),d=f.length,h,p;return v<0||v>=d?u?"":void 0:(h=i(f,v),h<55296||h>56319||v+1===d||(p=i(f,v+1))<56320||p>57343?u?a(f,v):h:u?o(f,v,v+2):(h-55296<<10)+(p-56320)+65536)}};return _i={codeAt:s(!1),charAt:s(!0)},_i}var Qc;function pv(){if(Qc)return Jc;Qc=1;var e=hv().charAt,r=yr(),t=ft(),n=lv(),a=ps(),i="String Iterator",o=t.set,s=t.getterFor(i);return n(String,"String",function(u){o(this,{type:i,string:r(u),index:0})},function(){var c=s(this),l=c.string,f=c.index,v;return f>=l.length?a(void 0,!0):(v=e(l,f),c.index+=v.length,a(v,!1))}),Jc}var Ai,Xc;function cp(){if(Xc)return Ai;Xc=1;var e=qe(),r=pe(),t=Le(),n=Ae(),a=Zd(),i=iv(),o=rv(),s=mn(),u=Fd(),c=Object.assign,l=Object.defineProperty,f=r([].concat);return Ai=!c||n(function(){if(e&&c({b:1},c(l({},"a",{enumerable:!0,get:function(){l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var v={},d={},h=Symbol("assign detection"),p="abcdefghijklmnopqrst";return v[h]=7,p.split("").forEach(function(S){d[S]=S}),c({},v)[h]!==7||a(c({},d)).join("")!==p})?function(d,h){for(var p=s(d),S=arguments.length,R=1,I=i.f,g=o.f;S>R;)for(var b=u(arguments[R++]),y=I?f(a(b),I(b)):a(b),A=y.length,q=0,j;A>q;)j=y[q++],(!e||t(g,b,j))&&(p[j]=b[j]);return p}:c,Ai}var ki,Zc;function mv(){if(Zc)return ki;Zc=1;var e=Le(),r=rr(),t=os();return ki=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(u){s=!0,o=u}if(a==="throw")throw i;if(s)throw o;return r(o),i},ki}var qi,el;function lp(){if(el)return qi;el=1;var e=rr(),r=mv();return qi=function(t,n,a,i){try{return i?n(e(a)[0],a[1]):n(a)}catch(o){r(t,"throw",o)}},qi}var $i,rl;function gv(){if(rl)return $i;rl=1;var e=ke(),r=Nt(),t=e("iterator"),n=Array.prototype;return $i=function(a){return a!==void 0&&(r.Array===a||n[t]===a)},$i}var Ui,tl;function yv(){if(tl)return Ui;tl=1;var e=pe(),r=Ae(),t=we(),n=jt(),a=Je(),i=ds(),o=function(){},s=a("Reflect","construct"),u=/^\s*(?:class|function)\b/,c=e(u.exec),l=!u.test(o),f=function(h){if(!t(h))return!1;try{return s(o,[],h),!0}catch{return!1}},v=function(h){if(!t(h))return!1;switch(n(h)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return l||!!c(u,i(h))}catch{return!0}};return v.sham=!0,Ui=!s||r(function(){var d;return f(f.call)||!f(Object)||!f(function(){d=!0})||d})?v:f,Ui}var Li,nl;function fp(){if(nl)return Li;nl=1;var e=qe(),r=gr(),t=Gr();return Li=function(n,a,i){e?r.f(n,a,t(0,i)):n[a]=i},Li}var xi,al;function dp(){if(al)return xi;al=1;var e=vt(),r=Le(),t=mn(),n=lp(),a=gv(),i=yv(),o=us(),s=fp(),u=bs(),c=In(),l=Array;return xi=function(v){var d=t(v),h=i(this),p=arguments.length,S=p>1?arguments[1]:void 0,R=S!==void 0;R&&(S=e(S,p>2?arguments[2]:void 0));var I=c(d),g=0,b,y,A,q,j,G;if(I&&!(this===l&&a(I)))for(y=h?new this:[],q=u(d,I),j=q.next;!(A=r(j,q)).done;g++)G=R?n(q,S,[A.value,g],!0):A.value,s(y,g,G);else for(b=o(d),y=h?new this(b):l(b);b>g;g++)G=R?S(d[g],g):d[g],s(y,g,G);return y.length=g,y},xi}var Ni,il;function vp(){if(il)return Ni;il=1;var e=pe(),r=2147483647,t=36,n=1,a=26,i=38,o=700,s=72,u=128,c="-",l=/[^\0-\u007E]/,f=/[.\u3002\uFF0E\uFF61]/g,v="Overflow: input needs wider integers to process",d=t-n,h=RangeError,p=e(f.exec),S=Math.floor,R=String.fromCharCode,I=e("".charCodeAt),g=e([].join),b=e([].push),y=e("".replace),A=e("".split),q=e("".toLowerCase),j=function(L){for(var M=[],N=0,m=L.length;N<m;){var C=I(L,N++);if(C>=55296&&C<=56319&&N<m){var U=I(L,N++);(U&64512)===56320?b(M,((C&1023)<<10)+(U&1023)+65536):(b(M,C),N--)}else b(M,C)}return M},G=function(L){return L+22+75*(L<26)},K=function(L,M,N){var m=0;for(L=N?S(L/o):L>>1,L+=S(L/M);L>d*a>>1;)L=S(L/d),m+=t;return S(m+(d+1)*L/(L+i))},re=function(L){var M=[];L=j(L);var N=L.length,m=u,C=0,U=s,F,w;for(F=0;F<L.length;F++)w=L[F],w<128&&b(M,R(w));var T=M.length,x=T;for(T&&b(M,c);x<N;){var H=r;for(F=0;F<L.length;F++)w=L[F],w>=m&&w<H&&(H=w);var Q=x+1;if(H-m>S((r-C)/Q))throw new h(v);for(C+=(H-m)*Q,m=H,F=0;F<L.length;F++){if(w=L[F],w<m&&++C>r)throw new h(v);if(w===m){for(var J=C,le=t;;){var ne=le<=U?n:le>=U+a?a:le-U;if(J<ne)break;var ue=J-ne,ae=t-ne;b(M,R(G(ne+ue%ae))),J=S(ue/ae),le+=t}b(M,R(G(J))),U=K(C,Q,x===T),C=0,x++}}C++,m++}return g(M,"")};return Ni=function(L){var M=[],N=A(y(q(L),f,"."),"."),m,C;for(m=0;m<N.length;m++)C=N[m],b(M,p(l,C)?"xn--"+re(C):C);return g(M,".")},Ni}var ol;function hp(){if(ol)return Kc;ol=1,pv();var e=Pe(),r=qe(),t=wn(),n=me(),a=vt(),i=pe(),o=Ye(),s=Sn(),u=gs(),c=ze(),l=cp(),f=dp(),v=Pn(),d=hv().codeAt,h=vp(),p=yr(),S=dt(),R=Vr(),I=dv(),g=ft(),b=g.set,y=g.getterFor("URL"),A=I.URLSearchParams,q=I.getState,j=n.URL,G=n.TypeError,K=n.parseInt,re=Math.floor,L=Math.pow,M=i("".charAt),N=i(/./.exec),m=i([].join),C=i(1.1.toString),U=i([].pop),F=i([].push),w=i("".replace),T=i([].shift),x=i("".split),H=i("".slice),Q=i("".toLowerCase),J=i([].unshift),le="Invalid authority",ne="Invalid scheme",ue="Invalid host",ae="Invalid port",Re=/[a-z]/i,xe=/[\d+-.a-z]/i,je=/\d/,$e=/^0x/i,Qe=/^[0-7]+$/,wr=/^\d+$/,Sr=/^[\da-f]+$/i,_r=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Ar=/[\0\t\n\r #/:<>?@[\\\]^|]/,yt=/^[\u0000-\u0020]+/,zr=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,kr=/[\t\n\r]/g,ye,Xe=function(E){var $=x(E,"."),O,P,_,te,W,be,Ie;if($.length&&$[$.length-1]===""&&$.length--,O=$.length,O>4)return E;for(P=[],_=0;_<O;_++){if(te=$[_],te==="")return E;if(W=10,te.length>1&&M(te,0)==="0"&&(W=N($e,te)?16:8,te=H(te,W===8?1:2)),te==="")be=0;else{if(!N(W===10?wr:W===8?Qe:Sr,te))return E;be=K(te,W)}F(P,be)}for(_=0;_<O;_++)if(be=P[_],_===O-1){if(be>=L(256,5-O))return null}else if(be>255)return null;for(Ie=U(P),_=0;_<P.length;_++)Ie+=P[_]*L(256,3-_);return Ie},qr=function(E){var $=[0,0,0,0,0,0,0,0],O=0,P=null,_=0,te,W,be,Ie,Ce,Ve,k,Ee=function(){return M(E,_)};if(Ee()===":"){if(M(E,1)!==":")return;_+=2,O++,P=O}for(;Ee();){if(O===8)return;if(Ee()===":"){if(P!==null)return;_++,O++,P=O;continue}for(te=W=0;W<4&&N(Sr,Ee());)te=te*16+K(Ee(),16),_++,W++;if(Ee()==="."){if(W===0||(_-=W,O>6))return;for(be=0;Ee();){if(Ie=null,be>0)if(Ee()==="."&&be<4)_++;else return;if(!N(je,Ee()))return;for(;N(je,Ee());){if(Ce=K(Ee(),10),Ie===null)Ie=Ce;else{if(Ie===0)return;Ie=Ie*10+Ce}if(Ie>255)return;_++}$[O]=$[O]*256+Ie,be++,(be===2||be===4)&&O++}if(be!==4)return;break}else if(Ee()===":"){if(_++,!Ee())return}else if(Ee())return;$[O++]=te}if(P!==null)for(Ve=O-P,O=7;O!==0&&Ve>0;)k=$[O],$[O--]=$[P+Ve-1],$[P+--Ve]=k;else if(O!==8)return;return $},B=function(E){for(var $=null,O=1,P=null,_=0,te=0;te<8;te++)E[te]!==0?(_>O&&($=P,O=_),P=null,_=0):(P===null&&(P=te),++_);return _>O?P:$},X=function(E){var $,O,P,_;if(typeof E=="number"){for($=[],O=0;O<4;O++)J($,E%256),E=re(E/256);return m($,".")}if(typeof E=="object"){for($="",P=B(E),O=0;O<8;O++)_&&E[O]===0||(_&&(_=!1),P===O?($+=O?":":"::",_=!0):($+=C(E[O],16),O<7&&($+=":")));return"["+$+"]"}return E},oe={},ce=l({},oe,{" ":1,'"':1,"<":1,">":1,"`":1}),fe=l({},ce,{"#":1,"?":1,"{":1,"}":1}),He=l({},fe,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Te=function(E,$){var O=d(E,0);return O>32&&O<127&&!c($,E)?E:encodeURIComponent(E)},De={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Oe=function(E,$){var O;return E.length===2&&N(Re,M(E,0))&&((O=M(E,1))===":"||!$&&O==="|")},Ge=function(E){var $;return E.length>1&&Oe(H(E,0,2))&&(E.length===2||($=M(E,2))==="/"||$==="\\"||$==="?"||$==="#")},Kr=function(E){return E==="."||Q(E)==="%2e"},bt=function(E){return E=Q(E),E===".."||E==="%2e."||E===".%2e"||E==="%2e%2e"},Jr={},Yr={},D={},V={},z={},Y={},ie={},se={},ve={},he={},Se={},Ue={},nr={},qn={},Ns={},$n={},Qr={},ar={},js={},$r={},ur={},Un=function(E,$,O){var P=p(E),_,te,W;if($){if(te=this.parse(P),te)throw new G(te);this.searchParams=null}else{if(O!==void 0&&(_=new Un(O,!0)),te=this.parse(P,null,_),te)throw new G(te);W=q(new A),W.bindURL(this),this.searchParams=W}};Un.prototype={type:"URL",parse:function(E,$,O){var P=this,_=$||Jr,te=0,W="",be=!1,Ie=!1,Ce=!1,Ve,k,Ee,cr;for(E=p(E),$||(P.scheme="",P.username="",P.password="",P.host=null,P.port=null,P.path=[],P.query=null,P.fragment=null,P.cannotBeABaseURL=!1,E=w(E,yt,""),E=w(E,zr,"$1")),E=w(E,kr,""),Ve=f(E);te<=Ve.length;){switch(k=Ve[te],_){case Jr:if(k&&N(Re,k))W+=Q(k),_=Yr;else{if($)return ne;_=D;continue}break;case Yr:if(k&&(N(xe,k)||k==="+"||k==="-"||k==="."))W+=Q(k);else if(k===":"){if($&&(P.isSpecial()!==c(De,W)||W==="file"&&(P.includesCredentials()||P.port!==null)||P.scheme==="file"&&!P.host))return;if(P.scheme=W,$){P.isSpecial()&&De[P.scheme]===P.port&&(P.port=null);return}W="",P.scheme==="file"?_=qn:P.isSpecial()&&O&&O.scheme===P.scheme?_=V:P.isSpecial()?_=se:Ve[te+1]==="/"?(_=z,te++):(P.cannotBeABaseURL=!0,F(P.path,""),_=js)}else{if($)return ne;W="",_=D,te=0;continue}break;case D:if(!O||O.cannotBeABaseURL&&k!=="#")return ne;if(O.cannotBeABaseURL&&k==="#"){P.scheme=O.scheme,P.path=v(O.path),P.query=O.query,P.fragment="",P.cannotBeABaseURL=!0,_=ur;break}_=O.scheme==="file"?qn:Y;continue;case V:if(k==="/"&&Ve[te+1]==="/")_=ve,te++;else{_=Y;continue}break;case z:if(k==="/"){_=he;break}else{_=ar;continue}case Y:if(P.scheme=O.scheme,k===ye)P.username=O.username,P.password=O.password,P.host=O.host,P.port=O.port,P.path=v(O.path),P.query=O.query;else if(k==="/"||k==="\\"&&P.isSpecial())_=ie;else if(k==="?")P.username=O.username,P.password=O.password,P.host=O.host,P.port=O.port,P.path=v(O.path),P.query="",_=$r;else if(k==="#")P.username=O.username,P.password=O.password,P.host=O.host,P.port=O.port,P.path=v(O.path),P.query=O.query,P.fragment="",_=ur;else{P.username=O.username,P.password=O.password,P.host=O.host,P.port=O.port,P.path=v(O.path),P.path.length--,_=ar;continue}break;case ie:if(P.isSpecial()&&(k==="/"||k==="\\"))_=ve;else if(k==="/")_=he;else{P.username=O.username,P.password=O.password,P.host=O.host,P.port=O.port,_=ar;continue}break;case se:if(_=ve,k!=="/"||M(W,te+1)!=="/")continue;te++;break;case ve:if(k!=="/"&&k!=="\\"){_=he;continue}break;case he:if(k==="@"){be&&(W="%40"+W),be=!0,Ee=f(W);for(var Ln=0;Ln<Ee.length;Ln++){var Fs=Ee[Ln];if(Fs===":"&&!Ce){Ce=!0;continue}var Bs=Te(Fs,He);Ce?P.password+=Bs:P.username+=Bs}W=""}else if(k===ye||k==="/"||k==="?"||k==="#"||k==="\\"&&P.isSpecial()){if(be&&W==="")return le;te-=f(W).length+1,W="",_=Se}else W+=k;break;case Se:case Ue:if($&&P.scheme==="file"){_=$n;continue}else if(k===":"&&!Ie){if(W==="")return ue;if(cr=P.parseHost(W),cr)return cr;if(W="",_=nr,$===Ue)return}else if(k===ye||k==="/"||k==="?"||k==="#"||k==="\\"&&P.isSpecial()){if(P.isSpecial()&&W==="")return ue;if($&&W===""&&(P.includesCredentials()||P.port!==null))return;if(cr=P.parseHost(W),cr)return cr;if(W="",_=Qr,$)return;continue}else k==="["?Ie=!0:k==="]"&&(Ie=!1),W+=k;break;case nr:if(N(je,k))W+=k;else if(k===ye||k==="/"||k==="?"||k==="#"||k==="\\"&&P.isSpecial()||$){if(W!==""){var xn=K(W,10);if(xn>65535)return ae;P.port=P.isSpecial()&&xn===De[P.scheme]?null:xn,W=""}if($)return;_=Qr;continue}else return ae;break;case qn:if(P.scheme="file",k==="/"||k==="\\")_=Ns;else if(O&&O.scheme==="file")switch(k){case ye:P.host=O.host,P.path=v(O.path),P.query=O.query;break;case"?":P.host=O.host,P.path=v(O.path),P.query="",_=$r;break;case"#":P.host=O.host,P.path=v(O.path),P.query=O.query,P.fragment="",_=ur;break;default:Ge(m(v(Ve,te),""))||(P.host=O.host,P.path=v(O.path),P.shortenPath()),_=ar;continue}else{_=ar;continue}break;case Ns:if(k==="/"||k==="\\"){_=$n;break}O&&O.scheme==="file"&&!Ge(m(v(Ve,te),""))&&(Oe(O.path[0],!0)?F(P.path,O.path[0]):P.host=O.host),_=ar;continue;case $n:if(k===ye||k==="/"||k==="\\"||k==="?"||k==="#"){if(!$&&Oe(W))_=ar;else if(W===""){if(P.host="",$)return;_=Qr}else{if(cr=P.parseHost(W),cr)return cr;if(P.host==="localhost"&&(P.host=""),$)return;W="",_=Qr}continue}else W+=k;break;case Qr:if(P.isSpecial()){if(_=ar,k!=="/"&&k!=="\\")continue}else if(!$&&k==="?")P.query="",_=$r;else if(!$&&k==="#")P.fragment="",_=ur;else if(k!==ye&&(_=ar,k!=="/"))continue;break;case ar:if(k===ye||k==="/"||k==="\\"&&P.isSpecial()||!$&&(k==="?"||k==="#")){if(bt(W)?(P.shortenPath(),k!=="/"&&!(k==="\\"&&P.isSpecial())&&F(P.path,"")):Kr(W)?k!=="/"&&!(k==="\\"&&P.isSpecial())&&F(P.path,""):(P.scheme==="file"&&!P.path.length&&Oe(W)&&(P.host&&(P.host=""),W=M(W,0)+":"),F(P.path,W)),W="",P.scheme==="file"&&(k===ye||k==="?"||k==="#"))for(;P.path.length>1&&P.path[0]==="";)T(P.path);k==="?"?(P.query="",_=$r):k==="#"&&(P.fragment="",_=ur)}else W+=Te(k,fe);break;case js:k==="?"?(P.query="",_=$r):k==="#"?(P.fragment="",_=ur):k!==ye&&(P.path[0]+=Te(k,oe));break;case $r:!$&&k==="#"?(P.fragment="",_=ur):k!==ye&&(k==="'"&&P.isSpecial()?P.query+="%27":k==="#"?P.query+="%23":P.query+=Te(k,oe));break;case ur:k!==ye&&(P.fragment+=Te(k,ce));break}te++}},parseHost:function(E){var $,O,P;if(M(E,0)==="["){if(M(E,E.length-1)!=="]"||($=qr(H(E,1,-1)),!$))return ue;this.host=$}else if(this.isSpecial()){if(E=h(E),N(_r,E)||($=Xe(E),$===null))return ue;this.host=$}else{if(N(Ar,E))return ue;for($="",O=f(E),P=0;P<O.length;P++)$+=Te(O[P],oe);this.host=$}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return c(De,this.scheme)},shortenPath:function(){var E=this.path,$=E.length;$&&(this.scheme!=="file"||$!==1||!Oe(E[0],!0))&&E.length--},serialize:function(){var E=this,$=E.scheme,O=E.username,P=E.password,_=E.host,te=E.port,W=E.path,be=E.query,Ie=E.fragment,Ce=$+":";return _!==null?(Ce+="//",E.includesCredentials()&&(Ce+=O+(P?":"+P:"")+"@"),Ce+=X(_),te!==null&&(Ce+=":"+te)):$==="file"&&(Ce+="//"),Ce+=E.cannotBeABaseURL?W[0]:W.length?"/"+m(W,"/"):"",be!==null&&(Ce+="?"+be),Ie!==null&&(Ce+="#"+Ie),Ce},setHref:function(E){var $=this.parse(E);if($)throw new G($);this.searchParams.update()},getOrigin:function(){var E=this.scheme,$=this.port;if(E==="blob")try{return new Xr(E.path[0]).origin}catch{return"null"}return E==="file"||!this.isSpecial()?"null":E+"://"+X(this.host)+($!==null?":"+$:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(E){this.parse(p(E)+":",Jr)},getUsername:function(){return this.username},setUsername:function(E){var $=f(p(E));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var O=0;O<$.length;O++)this.username+=Te($[O],He)}},getPassword:function(){return this.password},setPassword:function(E){var $=f(p(E));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var O=0;O<$.length;O++)this.password+=Te($[O],He)}},getHost:function(){var E=this.host,$=this.port;return E===null?"":$===null?X(E):X(E)+":"+$},setHost:function(E){this.cannotBeABaseURL||this.parse(E,Se)},getHostname:function(){var E=this.host;return E===null?"":X(E)},setHostname:function(E){this.cannotBeABaseURL||this.parse(E,Ue)},getPort:function(){var E=this.port;return E===null?"":p(E)},setPort:function(E){this.cannotHaveUsernamePasswordPort()||(E=p(E),E===""?this.port=null:this.parse(E,nr))},getPathname:function(){var E=this.path;return this.cannotBeABaseURL?E[0]:E.length?"/"+m(E,"/"):""},setPathname:function(E){this.cannotBeABaseURL||(this.path=[],this.parse(E,Qr))},getSearch:function(){var E=this.query;return E?"?"+E:""},setSearch:function(E){E=p(E),E===""?this.query=null:(M(E,0)==="?"&&(E=H(E,1)),this.query="",this.parse(E,$r)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var E=this.fragment;return E?"#"+E:""},setHash:function(E){if(E=p(E),E===""){this.fragment=null;return}M(E,0)==="#"&&(E=H(E,1)),this.fragment="",this.parse(E,ur)},update:function(){this.query=this.searchParams.serialize()||null}};var Xr=function($){var O=u(this,Ne),P=R(arguments.length,1)>1?arguments[1]:void 0,_=b(O,new Un($,!1,P));r||(O.href=_.serialize(),O.origin=_.getOrigin(),O.protocol=_.getProtocol(),O.username=_.getUsername(),O.password=_.getPassword(),O.host=_.getHost(),O.hostname=_.getHostname(),O.port=_.getPort(),O.pathname=_.getPathname(),O.search=_.getSearch(),O.searchParams=_.getSearchParams(),O.hash=_.getHash())},Ne=Xr.prototype,We=function(E,$){return{get:function(){return y(this)[E]()},set:$&&function(O){return y(this)[$](O)},configurable:!0,enumerable:!0}};if(r&&(s(Ne,"href",We("serialize","setHref")),s(Ne,"origin",We("getOrigin")),s(Ne,"protocol",We("getProtocol","setProtocol")),s(Ne,"username",We("getUsername","setUsername")),s(Ne,"password",We("getPassword","setPassword")),s(Ne,"host",We("getHost","setHost")),s(Ne,"hostname",We("getHostname","setHostname")),s(Ne,"port",We("getPort","setPort")),s(Ne,"pathname",We("getPathname","setPathname")),s(Ne,"search",We("getSearch","setSearch")),s(Ne,"searchParams",We("getSearchParams")),s(Ne,"hash",We("getHash","setHash"))),o(Ne,"toJSON",function(){return y(this).serialize()},{enumerable:!0}),o(Ne,"toString",function(){return y(this).serialize()},{enumerable:!0}),j){var Ds=j.createObjectURL,Ms=j.revokeObjectURL;Ds&&o(Xr,"createObjectURL",a(Ds,j)),Ms&&o(Xr,"revokeObjectURL",a(Ms,j))}return S(Xr,"URL"),e({global:!0,constructor:!0,forced:!t,sham:!r},{URL:Xr}),Kc}var sl;function pp(){return sl||(sl=1,hp()),zc}var ul={},cl;function mp(){if(cl)return ul;cl=1;var e=Pe(),r=Je(),t=Ae(),n=Vr(),a=yr(),i=wn(),o=r("URL"),s=i&&t(function(){o.canParse()}),u=t(function(){return o.canParse.length!==1});return e({target:"URL",stat:!0,forced:!s||u},{canParse:function(l){var f=n(arguments.length,1),v=a(l),d=f<2||arguments[1]===void 0?void 0:a(arguments[1]);try{return!!new o(v,d)}catch{return!1}}}),ul}var ll={},fl;function gp(){if(fl)return ll;fl=1;var e=Pe(),r=Je(),t=Vr(),n=yr(),a=wn(),i=r("URL");return e({target:"URL",stat:!0,forced:!a},{parse:function(s){var u=t(arguments.length,1),c=n(s),l=u<2||arguments[1]===void 0?void 0:n(arguments[1]);try{return new i(c,l)}catch{return null}}}),ll}var dl={},vl;function yp(){if(vl)return dl;vl=1;var e=Pe(),r=Le();return e({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}}),dl}var ji,hl;function bp(){if(hl)return ji;hl=1,vv(),pp(),mp(),gp(),yp();var e=En();return ji=e.URL,ji}var Di,pl;function wp(){if(pl)return Di;pl=1;var e=bp();return Di=e,Di}var Mi,ml;function Sp(){if(ml)return Mi;ml=1;var e=wp();return Mi=e,Mi}Sp();var gl={},Fi,yl;function Ip(){return yl||(yl=1,Fi={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}),Fi}var Bi,bl;function Pp(){if(bl)return Bi;bl=1;var e=gn(),r=e("span").classList,t=r&&r.constructor&&r.constructor.prototype;return Bi=t===Object.prototype?void 0:t,Bi}var wl;function bv(){if(wl)return gl;wl=1;var e=me(),r=Ip(),t=Pp(),n=ms(),a=Wr(),i=dt(),o=ke(),s=o("iterator"),u=n.values,c=function(f,v){if(f){if(f[s]!==u)try{a(f,s,u)}catch{f[s]=u}if(i(f,v,!0),r[v]){for(var d in n)if(f[d]!==n[d])try{a(f,d,n[d])}catch{f[d]=n[d]}}}};for(var l in r)c(e[l]&&e[l].prototype,l);return c(t,"DOMTokenList"),gl}var Hi,Sl;function Ep(){if(Sl)return Hi;Sl=1;var e=vv();return bv(),Hi=e,Hi}var Gi,Il;function Rp(){if(Il)return Gi;Il=1;var e=Ep();return Gi=e,Gi}Rp();var Pl={},El={},Wi,Rl;function Tp(){if(Rl)return Wi;Rl=1;var e=Ke(),r=Wr();return Wi=function(t,n){e(n)&&"cause"in n&&r(t,"cause",n.cause)},Wi}var Vi,Tl;function Op(){if(Tl)return Vi;Tl=1;var e=pe(),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 Vi=function(o,s){if(i&&typeof o=="string"&&!r.prepareStackTrace)for(;s--;)o=t(o,a,"");return o},Vi}var zi,Ol;function Cp(){if(Ol)return zi;Ol=1;var e=Ae(),r=Gr();return zi=!e(function(){var t=new Error("a");return"stack"in t?(Object.defineProperty(t,"stack",r(1,7)),t.stack!==7):!0}),zi}var Ki,Cl;function _p(){if(Cl)return Ki;Cl=1;var e=Wr(),r=Op(),t=Cp(),n=Error.captureStackTrace;return Ki=function(a,i,o,s){t&&(n?n(a,i):e(a,"stack",r(o,s)))},Ki}var Ji,_l;function Dt(){if(_l)return Ji;_l=1;var e=vt(),r=Le(),t=rr(),n=bn(),a=gv(),i=us(),o=yn(),s=bs(),u=In(),c=mv(),l=TypeError,f=function(d,h){this.stopped=d,this.result=h},v=f.prototype;return Ji=function(d,h,p){var S=p&&p.that,R=!!(p&&p.AS_ENTRIES),I=!!(p&&p.IS_RECORD),g=!!(p&&p.IS_ITERATOR),b=!!(p&&p.INTERRUPTED),y=e(h,S),A,q,j,G,K,re,L,M=function(m){return A&&c(A,"normal"),new f(!0,m)},N=function(m){return R?(t(m),b?y(m[0],m[1],M):y(m[0],m[1])):b?y(m,M):y(m)};if(I)A=d.iterator;else if(g)A=d;else{if(q=u(d),!q)throw new l(n(d)+" is not iterable");if(a(q)){for(j=0,G=i(d);G>j;j++)if(K=N(d[j]),K&&o(v,K))return K;return new f(!1)}A=s(d,q)}for(re=I?d.next:A.next;!(L=r(re,A)).done;){try{K=N(L.value)}catch(m){c(A,"throw",m)}if(typeof K=="object"&&K&&o(v,K))return K}return new f(!1)},Ji}var Yi,Al;function Ap(){if(Al)return Yi;Al=1;var e=yr();return Yi=function(r,t){return r===void 0?arguments.length<2?"":t:e(r)},Yi}var kl;function kp(){if(kl)return El;kl=1;var e=Pe(),r=yn(),t=vs(),n=hs(),a=ov(),i=xt(),o=Wr(),s=Gr(),u=Tp(),c=_p(),l=Dt(),f=Ap(),v=ke(),d=v("toStringTag"),h=Error,p=[].push,S=function(g,b){var y=r(R,this),A;n?A=n(new h,y?t(this):R):(A=y?this:i(R),o(A,d,"Error")),b!==void 0&&o(A,"message",f(b)),c(A,S,A.stack,1),arguments.length>2&&u(A,arguments[2]);var q=[];return l(g,p,{that:q}),o(A,"errors",q),A};n?n(S,h):a(S,h,{name:!0});var R=S.prototype=i(h.prototype,{constructor:s(1,S),message:s(1,""),name:s(1,"AggregateError")});return e({global:!0,constructor:!0,arity:2},{AggregateError:S}),El}var ql;function qp(){return ql||(ql=1,kp()),Pl}var $l={},Qi,Ul;function $p(){if(Ul)return Qi;Ul=1;var e=ys(),r=jt();return Qi=e?{}.toString:function(){return"[object "+r(this)+"]"},Qi}var Ll;function Up(){if(Ll)return $l;Ll=1;var e=ys(),r=Ye(),t=$p();return e||r(Object.prototype,"toString",t,{unsafe:!0}),$l}var xl={},Nl={},Xi,jl;function wv(){if(jl)return Xi;jl=1;var e=me(),r=Lt(),t=vn(),n=function(a){return r.slice(0,a.length)===a};return Xi=(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"})(),Xi}var Zi,Dl;function ws(){if(Dl)return Zi;Dl=1;var e=wv();return Zi=e==="NODE",Zi}var eo,Ml;function Lp(){if(Ml)return eo;Ml=1;var e=Je(),r=Sn(),t=ke(),n=qe(),a=t("species");return eo=function(i){var o=e(i);n&&o&&!o[a]&&r(o,a,{configurable:!0,get:function(){return this}})},eo}var ro,Fl;function xp(){if(Fl)return ro;Fl=1;var e=yv(),r=bn(),t=TypeError;return ro=function(n){if(e(n))return n;throw new t(r(n)+" is not a constructor")},ro}var to,Bl;function Sv(){if(Bl)return to;Bl=1;var e=rr(),r=xp(),t=hn(),n=ke(),a=n("species");return to=function(i,o){var s=e(i).constructor,u;return s===void 0||t(u=e(s)[a])?o:r(u)},to}var no,Hl;function Iv(){if(Hl)return no;Hl=1;var e=dn(),r=Function.prototype,t=r.apply,n=r.call;return no=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(t):function(){return n.apply(t,arguments)}),no}var ao,Gl;function Pv(){if(Gl)return ao;Gl=1;var e=Lt();return ao=/(?:ipad|iphone|ipod).*applewebkit/i.test(e),ao}var io,Wl;function Ev(){if(Wl)return io;Wl=1;var e=me(),r=Iv(),t=vt(),n=we(),a=ze(),i=Ae(),o=ev(),s=Pn(),u=gn(),c=Vr(),l=Pv(),f=ws(),v=e.setImmediate,d=e.clearImmediate,h=e.process,p=e.Dispatch,S=e.Function,R=e.MessageChannel,I=e.String,g=0,b={},y="onreadystatechange",A,q,j,G;i(function(){A=e.location});var K=function(N){if(a(b,N)){var m=b[N];delete b[N],m()}},re=function(N){return function(){K(N)}},L=function(N){K(N.data)},M=function(N){e.postMessage(I(N),A.protocol+"//"+A.host)};return(!v||!d)&&(v=function(m){c(arguments.length,1);var C=n(m)?m:S(m),U=s(arguments,1);return b[++g]=function(){r(C,void 0,U)},q(g),g},d=function(m){delete b[m]},f?q=function(N){h.nextTick(re(N))}:p&&p.now?q=function(N){p.now(re(N))}:R&&!l?(j=new R,G=j.port2,j.port1.onmessage=L,q=t(G.postMessage,G)):e.addEventListener&&n(e.postMessage)&&!e.importScripts&&A&&A.protocol!=="file:"&&!i(M)?(q=M,e.addEventListener("message",L,!1)):y in u("script")?q=function(N){o.appendChild(u("script"))[y]=function(){o.removeChild(this),K(N)}}:q=function(N){setTimeout(re(N),0)}),io={set:v,clear:d},io}var oo,Vl;function Rv(){if(Vl)return oo;Vl=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}}},oo=e,oo}var so,zl;function Np(){if(zl)return so;zl=1;var e=Lt();return so=/ipad|iphone|ipod/i.test(e)&&typeof Pebble<"u",so}var uo,Kl;function jp(){if(Kl)return uo;Kl=1;var e=Lt();return uo=/web0s(?!.*chrome)/i.test(e),uo}var co,Jl;function Dp(){if(Jl)return co;Jl=1;var e=me(),r=fv(),t=vt(),n=Ev().set,a=Rv(),i=Pv(),o=Np(),s=jp(),u=ws(),c=e.MutationObserver||e.WebKitMutationObserver,l=e.document,f=e.process,v=e.Promise,d=r("queueMicrotask"),h,p,S,R,I;if(!d){var g=new a,b=function(){var y,A;for(u&&(y=f.domain)&&y.exit();A=g.get();)try{A()}catch(q){throw g.head&&h(),q}y&&y.enter()};!i&&!u&&!s&&c&&l?(p=!0,S=l.createTextNode(""),new c(b).observe(S,{characterData:!0}),h=function(){S.data=p=!p}):!o&&v&&v.resolve?(R=v.resolve(void 0),R.constructor=v,I=t(R.then,R),h=function(){I(b)}):u?h=function(){f.nextTick(b)}:(n=t(n,e),h=function(){n(b)}),d=function(y){g.head||h(),g.add(y)}}return co=d,co}var lo,Yl;function Mp(){return Yl||(Yl=1,lo=function(e,r){try{arguments.length===1?console.error(e):console.error(e,r)}catch{}}),lo}var fo,Ql;function ht(){return Ql||(Ql=1,fo=function(e){try{return{error:!1,value:e()}}catch(r){return{error:!0,value:r}}}),fo}var vo,Xl;function pt(){if(Xl)return vo;Xl=1;var e=me();return vo=e.Promise,vo}var ho,Zl;function Mt(){if(Zl)return ho;Zl=1;var e=me(),r=pt(),t=we(),n=sv(),a=ds(),i=ke(),o=wv(),s=sr(),u=Gd(),c=r&&r.prototype,l=i("species"),f=!1,v=t(e.PromiseRejectionEvent),d=n("Promise",function(){var h=a(r),p=h!==String(r);if(!p&&u===66||s&&!(c.catch&&c.finally))return!0;if(!u||u<51||!/native code/.test(h)){var S=new r(function(g){g(1)}),R=function(g){g(function(){},function(){})},I=S.constructor={};if(I[l]=R,f=S.then(function(){})instanceof R,!f)return!0}return!p&&(o==="BROWSER"||o==="DENO")&&!v});return ho={CONSTRUCTOR:d,REJECTION_EVENT:v,SUBCLASSING:f},ho}var po={},ef;function br(){if(ef)return po;ef=1;var e=tr(),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 po.f=function(n){return new t(n)},po}var rf;function Fp(){if(rf)return Nl;rf=1;var e=Pe(),r=sr(),t=ws(),n=me(),a=En(),i=Le(),o=Ye(),s=hs(),u=dt(),c=Lp(),l=tr(),f=we(),v=Ke(),d=gs(),h=Sv(),p=Ev().set,S=Dp(),R=Mp(),I=ht(),g=Rv(),b=ft(),y=pt(),A=Mt(),q=br(),j="Promise",G=A.CONSTRUCTOR,K=A.REJECTION_EVENT,re=A.SUBCLASSING,L=b.getterFor(j),M=b.set,N=y&&y.prototype,m=y,C=N,U=n.TypeError,F=n.document,w=n.process,T=q.f,x=T,H=!!(F&&F.createEvent&&n.dispatchEvent),Q="unhandledrejection",J="rejectionhandled",le=0,ne=1,ue=2,ae=1,Re=2,xe,je,$e,Qe,wr=function(B){var X;return v(B)&&f(X=B.then)?X:!1},Sr=function(B,X){var oe=X.value,ce=X.state===ne,fe=ce?B.ok:B.fail,He=B.resolve,Te=B.reject,De=B.domain,Oe,Ge,Kr;try{fe?(ce||(X.rejection===Re&&kr(X),X.rejection=ae),fe===!0?Oe=oe:(De&&De.enter(),Oe=fe(oe),De&&(De.exit(),Kr=!0)),Oe===B.promise?Te(new U("Promise-chain cycle")):(Ge=wr(Oe))?i(Ge,Oe,He,Te):He(Oe)):Te(oe)}catch(bt){De&&!Kr&&De.exit(),Te(bt)}},_r=function(B,X){B.notified||(B.notified=!0,S(function(){for(var oe=B.reactions,ce;ce=oe.get();)Sr(ce,B);B.notified=!1,X&&!B.rejection&&yt(B)}))},Ar=function(B,X,oe){var ce,fe;H?(ce=F.createEvent("Event"),ce.promise=X,ce.reason=oe,ce.initEvent(B,!1,!0),n.dispatchEvent(ce)):ce={promise:X,reason:oe},!K&&(fe=n["on"+B])?fe(ce):B===Q&&R("Unhandled promise rejection",oe)},yt=function(B){i(p,n,function(){var X=B.facade,oe=B.value,ce=zr(B),fe;if(ce&&(fe=I(function(){t?w.emit("unhandledRejection",oe,X):Ar(Q,X,oe)}),B.rejection=t||zr(B)?Re:ae,fe.error))throw fe.value})},zr=function(B){return B.rejection!==ae&&!B.parent},kr=function(B){i(p,n,function(){var X=B.facade;t?w.emit("rejectionHandled",X):Ar(J,X,B.value)})},ye=function(B,X,oe){return function(ce){B(X,ce,oe)}},Xe=function(B,X,oe){B.done||(B.done=!0,oe&&(B=oe),B.value=X,B.state=ue,_r(B,!0))},qr=function(B,X,oe){if(!B.done){B.done=!0,oe&&(B=oe);try{if(B.facade===X)throw new U("Promise can't be resolved itself");var ce=wr(X);ce?S(function(){var fe={done:!1};try{i(ce,X,ye(qr,fe,B),ye(Xe,fe,B))}catch(He){Xe(fe,He,B)}}):(B.value=X,B.state=ne,_r(B,!1))}catch(fe){Xe({done:!1},fe,B)}}};if(G&&(m=function(X){d(this,C),l(X),i(xe,this);var oe=L(this);try{X(ye(qr,oe),ye(Xe,oe))}catch(ce){Xe(oe,ce)}},C=m.prototype,xe=function(X){M(this,{type:j,done:!1,notified:!1,parent:!1,reactions:new g,rejection:!1,state:le,value:null})},xe.prototype=o(C,"then",function(X,oe){var ce=L(this),fe=T(h(this,m));return ce.parent=!0,fe.ok=f(X)?X:!0,fe.fail=f(oe)&&oe,fe.domain=t?w.domain:void 0,ce.state===le?ce.reactions.add(fe):S(function(){Sr(fe,ce)}),fe.promise}),je=function(){var B=new xe,X=L(B);this.promise=B,this.resolve=ye(qr,X),this.reject=ye(Xe,X)},q.f=T=function(B){return B===m||B===$e?new je(B):x(B)},!r&&f(y)&&N!==Object.prototype)){Qe=N.then,re||o(N,"then",function(X,oe){var ce=this;return new m(function(fe,He){i(Qe,ce,fe,He)}).then(X,oe)},{unsafe:!0});try{delete N.constructor}catch{}s&&s(N,C)}return e({global:!0,constructor:!0,wrap:!0,forced:G},{Promise:m}),$e=a.Promise,u(m,j,!1,!0),c(j),Nl}var tf={},mo,nf;function Bp(){if(nf)return mo;nf=1;var e=ke(),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 mo=function(i,o){try{if(!o&&!t)return!1}catch{return!1}var s=!1;try{var u={};u[r]=function(){return{next:function(){return{done:s=!0}}}},i(u)}catch{}return s},mo}var go,af;function Rn(){if(af)return go;af=1;var e=pt(),r=Bp(),t=Mt().CONSTRUCTOR;return go=t||!r(function(n){e.all(n).then(void 0,function(){})}),go}var of;function Hp(){if(of)return tf;of=1;var e=Pe(),r=Le(),t=tr(),n=br(),a=ht(),i=Dt(),o=Rn();return e({target:"Promise",stat:!0,forced:o},{all:function(u){var c=this,l=n.f(c),f=l.resolve,v=l.reject,d=a(function(){var h=t(c.resolve),p=[],S=0,R=1;i(u,function(I){var g=S++,b=!1;R++,r(h,c,I).then(function(y){b||(b=!0,p[g]=y,--R||f(p))},v)}),--R||f(p)});return d.error&&v(d.value),l.promise}}),tf}var sf={},uf;function Gp(){if(uf)return sf;uf=1;var e=Pe(),r=sr(),t=Mt().CONSTRUCTOR,n=pt(),a=Je(),i=we(),o=Ye(),s=n&&n.prototype;if(e({target:"Promise",proto:!0,forced:t,real:!0},{catch:function(c){return this.then(void 0,c)}}),!r&&i(n)){var u=a("Promise").prototype.catch;s.catch!==u&&o(s,"catch",u,{unsafe:!0})}return sf}var cf={},lf;function Wp(){if(lf)return cf;lf=1;var e=Pe(),r=Le(),t=tr(),n=br(),a=ht(),i=Dt(),o=Rn();return e({target:"Promise",stat:!0,forced:o},{race:function(u){var c=this,l=n.f(c),f=l.reject,v=a(function(){var d=t(c.resolve);i(u,function(h){r(d,c,h).then(l.resolve,f)})});return v.error&&f(v.value),l.promise}}),cf}var ff={},df;function Vp(){if(df)return ff;df=1;var e=Pe(),r=br(),t=Mt().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}}),ff}var vf={},yo,hf;function Tv(){if(hf)return yo;hf=1;var e=rr(),r=Ke(),t=br();return yo=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},yo}var pf;function zp(){if(pf)return vf;pf=1;var e=Pe(),r=Je(),t=sr(),n=pt(),a=Mt().CONSTRUCTOR,i=Tv(),o=r("Promise"),s=t&&!a;return e({target:"Promise",stat:!0,forced:t||a},{resolve:function(c){return i(s&&this===o?n:this,c)}}),vf}var mf;function Kp(){return mf||(mf=1,Fp(),Hp(),Gp(),Wp(),Vp(),zp()),xl}var gf={},yf;function Jp(){if(yf)return gf;yf=1;var e=Pe(),r=Le(),t=tr(),n=br(),a=ht(),i=Dt(),o=Rn();return e({target:"Promise",stat:!0,forced:o},{allSettled:function(u){var c=this,l=n.f(c),f=l.resolve,v=l.reject,d=a(function(){var h=t(c.resolve),p=[],S=0,R=1;i(u,function(I){var g=S++,b=!1;R++,r(h,c,I).then(function(y){b||(b=!0,p[g]={status:"fulfilled",value:y},--R||f(p))},function(y){b||(b=!0,p[g]={status:"rejected",reason:y},--R||f(p))})}),--R||f(p)});return d.error&&v(d.value),l.promise}}),gf}var bf={},wf;function Yp(){if(wf)return bf;wf=1;var e=Pe(),r=Le(),t=tr(),n=Je(),a=br(),i=ht(),o=Dt(),s=Rn(),u="No one promise resolved";return e({target:"Promise",stat:!0,forced:s},{any:function(l){var f=this,v=n("AggregateError"),d=a.f(f),h=d.resolve,p=d.reject,S=i(function(){var R=t(f.resolve),I=[],g=0,b=1,y=!1;o(l,function(A){var q=g++,j=!1;b++,r(R,f,A).then(function(G){j||y||(y=!0,h(G))},function(G){j||y||(j=!0,I[q]=G,--b||p(new v(I,u)))})}),--b||p(new v(I,u))});return S.error&&p(S.value),d.promise}}),bf}var Sf={},If;function Ov(){if(If)return Sf;If=1;var e=Pe(),r=me(),t=Iv(),n=Pn(),a=br(),i=tr(),o=ht(),s=r.Promise,u=!1,c=!s||!s.try||o(function(){s.try(function(l){u=l===8},8)}).error||!u;return e({target:"Promise",stat:!0,forced:c},{try:function(l){var f=arguments.length>1?n(arguments,1):[],v=a.f(this),d=o(function(){return t(i(l),void 0,f)});return(d.error?v.reject:v.resolve)(d.value),v.promise}}),Sf}var Pf={},Ef;function Cv(){if(Ef)return Pf;Ef=1;var e=Pe(),r=br();return e({target:"Promise",stat:!0},{withResolvers:function(){var n=r.f(this);return{promise:n.promise,resolve:n.resolve,reject:n.reject}}}),Pf}var Rf={},Tf;function Qp(){if(Tf)return Rf;Tf=1;var e=Pe(),r=sr(),t=pt(),n=Ae(),a=Je(),i=we(),o=Sv(),s=Tv(),u=Ye(),c=t&&t.prototype,l=!!t&&n(function(){c.finally.call({then:function(){}},function(){})});if(e({target:"Promise",proto:!0,real:!0,forced:l},{finally:function(v){var d=o(this,a("Promise")),h=i(v);return this.then(h?function(p){return s(d,v()).then(function(){return p})}:v,h?function(p){return s(d,v()).then(function(){throw p})}:v)}}),!r&&i(t)){var f=a("Promise").prototype.finally;c.finally!==f&&u(c,"finally",f,{unsafe:!0})}return Rf}var bo,Of;function Xp(){if(Of)return bo;Of=1,qp(),ms(),Up(),Kp(),Jp(),Yp(),Ov(),Cv(),Qp(),pv();var e=En();return bo=e.Promise,bo}var wo,Cf;function Zp(){if(Cf)return wo;Cf=1;var e=Xp();return bv(),wo=e,wo}var _f={},Af;function em(){return Af||(Af=1,Ov()),_f}var kf={},qf;function rm(){return qf||(qf=1,Cv()),kf}var So,$f;function tm(){if($f)return So;$f=1;var e=Zp();return em(),rm(),So=e,So}tm();const _v="sesamy-debug";function nm(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 am(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 im(e){nm(_v,e.toString(),1)}function om(){return am(_v)==="true"}function de(e){om()&&console.log(e)}function Lr(e,r){if(typeof window>"u")return;const t=new CustomEvent(e,{detail:r,bubbles:!0,composed:!0});de(`Triggering event: ${e}`),dispatchEvent(t)}const sm=Object.freeze(Object.defineProperty({__proto__:null,triggerEvent:Lr},Symbol.toStringTag,{value:"Module"}));let Av=null;function Ss(e){Av=e}function kv(){return Av}var er=(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))(er||{});const um=Object.freeze(Object.defineProperty({__proto__:null,Events:er},Symbol.toStringTag,{value:"Module"})),qv="sesamy_is_authenticated";function cm(){try{return document.cookie.split(";").some(e=>e.trim().startsWith(`${qv}=true`))}catch{return!1}}function Io(e){try{const r=e?2592e3:0,t=window.location.protocol==="https:"?"; Secure":"";document.cookie=`${qv}=${e}; path=/; max-age=${r}; SameSite=Lax${t}`}catch{}}function lm(e={}){let r=e.baseUrl??"",t="",n=!1,a=null,i=null;async function o(){try{const u=await fetch(`${r}/auth/userinfo`,{credentials:"include",headers:{Accept:"application/json"}});return u.ok?await u.json():null}catch(u){return de(`[cookie-auth] Failed to fetch userinfo: ${u.message}`),null}}const s={async init(u){if(t=u.vendorId||u.clientId||"",de(`[cookie-auth] Initializing with baseUrl: ${r}`),cm()){const c=await o();c===null?de("[cookie-auth] userinfo fetch failed transiently; retaining session hint"):c.authenticated&&c.sub?(a=!0,i=c,Io(!0),Lr(er.AUTHENTICATED,{sub:c.sub,appState:void 0})):(a=!1,Io(!1))}else a=!1;n=!0,Lr(er.AUTH_INITIALIZED,{})},async isAuthenticated(){if(!n)return!1;if(a!==null)return a;const u=await o();return u===null?(de("[cookie-auth] userinfo fetch failed transiently in isAuthenticated; will retry"),!1):(a=u.authenticated,a)},async getTokenSilently(u,c){return null},async getUser(){if(!n)return null;if(i)return i;const u=await o();return u?.authenticated&&u.sub?(i=u,i):null},async login(u){if(!t)throw new Error("[cookie-auth] vendorId is required to build a login URL");const c=u?.returnTo??window.location.href,l=new URL(`${r}/auth/${encodeURIComponent(t)}/login`,window.location.origin);l.searchParams.set("return_to",c),window.location.href=l.toString()},async loginWithRedirect(u){return s.login(u)},async loginWithPopup(u){return de("[cookie-auth] loginWithPopup called — falling back to redirect"),s.login(u)},async logout(u){a=!1,i=null,Io(!1),Lr(er.LOGOUT,{});const c=u?.returnTo??window.location.href,l=new URL(`${r}/auth/logout`,window.location.origin);l.searchParams.set("return_to",c),u?.localOnly&&l.searchParams.set("local_only","true"),window.location.href=l.toString()}};return s}const fm="sesamyAccessToken";let qt=!1;function Cr(){const e=kv();if(!e)throw new Error("[sesamy-js] No auth plugin registered. This should not happen.");return e}async function dm(e){if(e.enabled===!1){de("Auth disabled via config"),qt=!0;return}if(e.useHttpCookies)de("useHttpCookies=true — using cookie-based BFF plugin"),Ss(lm());else if(!kv())throw new Error("[sesamy-js] No auth plugin registered. Load the auth0-plugin bundle before sesamy-js, or set useHttpCookies: true to use the cookie-based BFF plugin.");await Cr().init(e),qt=!0}async function dr(){return qt?Cr().isAuthenticated():!1}async function fr(e=!0,r=!1){return qt?Cr().getTokenSilently(e,r):null}async function vm(){return qt?Cr().getUser():null}async function hm(e){return Cr().login(e)}async function Is(e){return Cr().loginWithRedirect(e)}async function pm(e){return Cr().loginWithPopup(e)}async function mm(e={}){return Cr().logout(e)}async function Do(e){const r=e.split(".");if(r.length!==3)throw new Error("Invalid token");const t=decodeURIComponent(atob(r[1].replace(/-/g,"+").replace(/_/g,"/")).split("").map(o=>"%"+("00"+o.charCodeAt(0).toString(16)).slice(-2)).join("")),n=JSON.parse(t);if(!n?.exp||n.exp<Date.now()/1e3)throw new Error("Invalid token");de("Set token"),localStorage.setItem(fm,e);const{triggerEvent:a}=await Promise.resolve().then(()=>sm),{Events:i}=await Promise.resolve().then(()=>um);a(i.AUTHENTICATED,{...n,appState:void 0})}const gm=(e,r)=>r.skipDedupe||r.method!=="GET",ym=(e,r)=>r.method+"@"+e,bm=e=>e.clone(),wm=({skip:e=gm,key:r=ym,resolver:t=bm}={})=>{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((u,c)=>{n.get(s).push([u,c])});try{return a(i,o).then(u=>(n.get(s).forEach(([c])=>c(t(u))),n.delete(s),u)).catch(u=>{throw n.get(s).forEach(([,c])=>c(u)),n.delete(s),u})}catch(u){return n.delete(s),Promise.reject(u)}}},Sm=(e,r)=>e*r,Im=e=>e&&e.ok,Pm=({delayTimer:e=500,delayRamp:r=Sm,maxAttempts:t=10,until:n=Im,onRetry:a=null,retryOnNetworkError:i=!1,resolveWithLatestResponse:o=!1,skip:s}={})=>u=>(c,l)=>{let f=0;if(s&&s(c,l))return u(c,l);const v=(d,h)=>Promise.resolve(n(d,h)).then(p=>p?d&&o?d:h?Promise.reject(h):d:(f++,!t||f<=t?new Promise(S=>{const R=r(e,f);setTimeout(()=>{typeof a=="function"?Promise.resolve(a({response:d,error:h,url:c,options:l})).then((I={})=>{var g,b;S(u((g=I&&I.url)!==null&&g!==void 0?g:c,(b=I&&I.options)!==null&&b!==void 0?b:l))}):S(u(c,l))},R)}).then(v).catch(S=>{if(!i)throw S;return v(null,S)}):d&&o?d:Promise.reject(h||new Error("Number of attempts exceeded."))));return u(c,l).then(v).catch(d=>{if(!i)throw d;return v(null,d)})};let Po=class $v extends Error{status;statusText;url;body;constructor(r,t,n,a,i){super(a),this.name="APIError",this.status=r,this.statusText=t,this.url=n,this.body=i,Error.captureStackTrace&&Error.captureStackTrace(this,$v)}isClientError(){return this.status>=400&&this.status<500}isServerError(){return this.status>=500}isForbiddenError(){return this.status===403}isNotFoundError(){return this.status===404}};var rn=(e=>(e.BROWSER="browser",e.NORMAL="normal",e))(rn||{});const Em="application/json",Uv="Content-Type",Zr=Symbol(),Lv=Symbol();function Uf(e={}){var r;const t=e instanceof Array?Object.fromEntries(e):e;return(r=Object.entries(t).find(([n])=>n.toLowerCase()===Uv.toLowerCase()))===null||r===void 0?void 0:r[1]}function Lf(e){return/^application\/.*json.*/.test(e)}const xr=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]=xr(o,i,t):n[a]=i,n},{...e})},st={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 Rm(e,r=!1){st.options=r?e:xr(st.options,e)}function Tm(e,r=!1){st.polyfills=r?e:xr(st.polyfills,e)}function Om(e){st.errorType=e}const Cm=e=>r=>e.reduceRight((t,n)=>n(t),r)||r;let xv=class extends Error{};const _m=e=>{const r=Object.create(null);e=e._addons.reduce((g,b)=>b.beforeRequest&&b.beforeRequest(g,e._options,r)||g,e);const{_url:t,_options:n,_config:a,_catchers:i,_resolvers:o,_middlewares:s,_addons:u}=e,c=new Map(i),l=xr(a.options,n);let f=t;const v=Cm(s)((g,b)=>(f=g,a.polyfill("fetch")(g,b)))(t,l),d=new Error,h=v.catch(g=>{throw{[Zr]:g}}).then(g=>{var b;if(!g.ok){const y=new xv;if(y.cause=d,y.stack=y.stack+`
|
|
2
|
-
CAUSE: `+d.stack,y.response=g,y.status=g.status,y.url=f,g.type==="opaque")throw y;const A=a.errorType==="json"||((b=g.headers.get("Content-Type"))===null||b===void 0?void 0:b.split(";")[0])==="application/json";return(a.errorType?A?g.text():g[a.errorType]():Promise.resolve(g.body)).then(q=>{if(y.message=typeof q=="string"?q:g.statusText,q)if(A&&typeof q=="string"){y.text=q;try{y.json=JSON.parse(q)}catch{}}else y[a.errorType]=q;throw y})}return g}),p=g=>g.catch(b=>{const y=Object.prototype.hasOwnProperty.call(b,Zr),A=y?b[Zr]:b,q=A?.status&&c.get(A.status)||c.get(A?.name)||y&&c.has(Zr)&&c.get(Zr);if(q)return q(A,e);const j=c.get(Lv);if(j)return j(A,e);throw A}),S=g=>b=>p(g?h.then(y=>y&&y[g]()).then(y=>b?b(y):y):h.then(y=>b?b(y):y)),R={_wretchReq:e,_fetchReq:v,_sharedState:r,res:S(null),json:S("json"),blob:S("blob"),formData:S("formData"),arrayBuffer:S("arrayBuffer"),text:S("text"),error(g,b){return c.set(g,b),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(Zr,g)}},I=u.reduce((g,b)=>({...g,...typeof b.resolver=="function"?b.resolver(g):b.resolver}),R);return o.reduce((g,b)=>b(g,e),I)},Am={_url:"",_options:{},_config:st,_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:xr(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:xr(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:xr(this._options,{headers:r})}},accept(e){return this.headers({Accept:e})},content(e){return this.headers({[Uv]: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(Lv,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=Uf(n._options.headers),i=this._config.polyfill("FormData",!1),o=typeof t=="object"&&!(i&&t instanceof i)&&(!n._options.headers||!a||Lf(a));return n=t?o?n.json(t,a):n.body(t):n,_m(n._deferred.reduce((s,u)=>u(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=Uf(this._options.headers);return this.content(r||Lf(t)&&t||Em).body(JSON.stringify(e))}};function or(e="",r={}){return{...Am,_url:e,_options:r}}or.default=or;or.options=Rm;or.errorType=Om;or.polyfills=Tm;or.WretchError=xv;const km=(e,r)=>r.skipDedupe||r.method!=="GET",qm=(e,r)=>r.method+"@"+e,$m=e=>e.clone(),Um=({skip:e=km,key:r=qm,resolver:t=$m}={})=>{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((u,c)=>{n.get(s).push([u,c])});try{return a(i,o).then(u=>(n.get(s).forEach(([c])=>c(t(u))),n.delete(s),u)).catch(u=>{throw n.get(s).forEach(([,c])=>c(u)),n.delete(s),u})}catch(u){return n.delete(s),Promise.reject(u)}}},Lm=(e,r)=>r.skipCache||r.method!=="GET",xm=(e,r)=>r.method+"@"+e,Nm=()=>!1,jm=()=>null,Dm=e=>e.ok,Mm=({throttle:e=1e3,skip:r=Lm,key:t=xm,clear:n=Nm,invalidate:a=jm,condition:i=Dm,flagResponseOnCacheHit:o="__cached"}={})=>{const s=new Map,u=new Map,c=new Set,l=v=>{e&&!c.has(v)&&(c.add(v),setTimeout(()=>{c.delete(v)},e))},f=v=>(d,h)=>{const p=t(d,h);let S=a(d,h);if(S&&(S instanceof Array||(S=[S]),S.forEach(R=>{typeof R=="string"?s.delete(R):R instanceof RegExp&&s.forEach((I,g)=>{R.test(g)&&s.delete(g)})})),n(d,h)&&s.clear(),r(d,h))return v(d,h);if(c.has(p)){if(s.has(p)){const R=s.get(p).clone();return o&&Object.defineProperty(R,o,{value:p,enumerable:!1}),Promise.resolve(R)}else if(u.has(p))return new Promise((R,I)=>{u.get(p).push([R,I])})}return u.has(p)||u.set(p,[]),l(p),v(d,h).then(R=>(i(R.clone())&&s.set(p,R.clone()),u.get(p).forEach(([I])=>I(R.clone())),u.delete(p),R)).catch(R=>{throw u.get(p).forEach(([,I])=>I(R)),u.delete(p),R})};return f.cacheResponse=function(v,d){l(v),s.set(v,d)},f.cache=s,f.inflight=u,f.throttling=c,f},Fm=(e,r)=>e*r,Bm=e=>e&&e.ok,Hm=({delayTimer:e=500,delayRamp:r=Fm,maxAttempts:t=10,until:n=Bm,onRetry:a=null,retryOnNetworkError:i=!1,resolveWithLatestResponse:o=!1,skip:s}={})=>u=>(c,l)=>{let f=0;if(s&&s(c,l))return u(c,l);const v=(d,h)=>Promise.resolve(n(d,h)).then(p=>p?d&&o?d:h?Promise.reject(h):d:(f++,!t||f<=t?new Promise(S=>{const R=r(e,f);setTimeout(()=>{typeof a=="function"?Promise.resolve(a({response:d,error:h,url:c,options:l})).then((I={})=>{var g,b;S(u((g=I&&I.url)!==null&&g!==void 0?g:c,(b=I&&I.options)!==null&&b!==void 0?b:l))}):S(u(c,l))},R)}).then(v).catch(S=>{if(!i)throw S;return v(null,S)}):d&&o?d:Promise.reject(h||new Error("Number of attempts exceeded."))));return u(c,l).then(v).catch(d=>{if(!i)throw d;return v(null,d)})},Gm="@sesamy/sdk",Wm="1.23.0";let Vm=class{cache=new Map;get(r){return this.cache.get(r)||null}set(r,t){this.cache.set(r,t)}remove(r){this.cache.delete(r)}clear(){this.cache.clear()}};const Tt="sesamyCacheTimestamp",zm=e=>{const{libraryName:r=Gm,libraryVersion:t=Wm,cache:n}=e,a=n?.storage||new Vm,i=[s=>async(u,c)=>{if(n?.mode===rn.BROWSER){let l;typeof sessionStorage<"u"?(l=sessionStorage.getItem(Tt),l||(l=Date.now().toString(),sessionStorage.setItem(Tt,l))):(l=a.get(Tt),l||(l=Date.now().toString(),a.set(Tt,l)));const f={...c,headers:{...c.headers,"Cache-Timestamp":l}};return s(u,f)}return s(u,c)},s=>async(u,c)=>{const l=await e.tokenProvider();if(l===null)return s(u,c);const f={...c,headers:{...c.headers,Authorization:l}};return s(u,f)},Um()];n?.mode===rn.NORMAL&&i.push(Mm({throttle:300*1e3,skip:(s,u)=>u.method!=="GET"})),i.push(Hm({delayTimer:1e3,delayRamp:(s,u)=>s*u,maxAttempts:3,until:s=>!!(s&&(s.ok||s.status>=400&&s.status<500)),retryOnNetworkError:!1}));const o=or(e.baseUrl).headers({"Content-Type":"application/json","X-Sesamy-Client":`${r}/${t}`,...e.headers}).middlewares(i);return{async request(s,u={}){try{const c=/^https?:\/\//.test(s);let l=o.url(s,c);u.headers&&(l=l.headers(u.headers));const f=(u.method||"GET").toLowerCase();let v;switch(f){case"get":v=l.get();break;case"post":v=l.post(u.body);break;case"put":v=l.put(u.body);break;case"patch":v=l.patch(u.body);break;case"delete":v=l.delete();break;default:v=l.get()}const d=await v.res();if(d.ok&&["post","patch","put","delete"].includes(f)&&vr(),d.status===204)return null;if(!d.ok){const h=await d.text().catch(()=>"Unknown error");throw new Po(d.status,d.statusText,d.url,`API Error ${d.status}: ${h}`,h)}return await d.json()}catch(c){if(c instanceof Po)throw c;const l=c.status||500,f=c.message||"Unknown error",v=`${e.baseUrl}${s}`;throw new Po(l,f,v,`API Error ${l}: ${c.message||"Unknown error"}`,c.message||"Unknown error")}}}},vr=()=>(typeof sessionStorage<"u"&&sessionStorage.removeItem(Tt),"Cache cleared"),St={get:async(e,r)=>e.request(`/profile/${r}`),update:async(e,r,t)=>e.request(`/profile/${r}`,{method:"PATCH",body:JSON.stringify(t)}),checkSpotifyLink:async e=>e.request("/profile/spotify-link"),unlinkSpotify:async e=>e.request("/profile/unlink-spotify",{method:"POST"}),delete:async e=>{await e.request("/profile",{method:"DELETE"})}},Eo={list:async(e,r)=>{const t=new URLSearchParams;r?.type&&t.append("type",r.type),r?.sku&&t.append("sku",r.sku),r?.purchaseOptionId&&t.append("purchase-option-id",r.purchaseOptionId),r?.waitForEntitlementAfter&&t.append("wait-for-entitlement-after",r.waitForEntitlementAfter);const n=t.toString(),a=n?`/entitlements?${n}`:"/entitlements";return e.request(a)},get:async(e,r)=>e.request(`/entitlements/${r}`),getAccess:async(e,r)=>e.request(`/entitlements/${r}/access`)},xf={list:async e=>e.request("/subscriptions"),get:async(e,r)=>e.request(`/subscriptions/${r}`)},Nf={get:async(e,r)=>e.request(`/products/${r}`),autoOnboard:async(e,r)=>e.request(`/products/${r}/auto-onboard`,{method:"POST"})},Km=(e,r)=>{if(!e||!r)return e;const t=new URL(e);return t.hash=`access_token=${r}`,t.toString()},jf=(e,r)=>!e.manageUrl||!r?e:{...e,manageUrl:Km(e.manageUrl,r)},It={list:async e=>e.request("/contracts"),get:async(e,r)=>e.request(`/contracts/${r}`),cancel:async(e,r)=>e.request(`/contracts/${r}/cancel`,{method:"POST"}),createAmendment:async(e,r,t)=>e.request(`/contracts/${r}/amendments`,{method:"POST",body:JSON.stringify(t)}),confirmAmendment:async(e,r,t)=>e.request(`/contracts/${r}/amendments/${t}/confirm`,{method:"POST"})},Ro={get:async e=>e.request("/user-metadata"),set:async(e,r,t)=>{await e.request(`/user-metadata/${r}`,{method:"PUT",body:t})},delete:async(e,r)=>{await e.request(`/user-metadata/${r}`,{method:"DELETE"})}},et={list:async e=>e.request("/tallies"),get:async(e,r)=>e.request(`/tallies/${r}`),update:async(e,r,t)=>e.request(`/tallies/${r}`,{method:"PUT",body:JSON.stringify(t)}),create:async(e,r)=>e.request("/tallies",{method:"POST",body:JSON.stringify(r)}),delete:async(e,r)=>{try{return await e.request(`/tallies/${r}`,{method:"DELETE"}),!0}catch{return!1}},push:async(e,r,t)=>e.request(`/tallies/${r}/push`,{method:"POST",body:JSON.stringify(t)})},To={list:async e=>e.request("/tags"),add:async(e,r)=>{await e.request("/tags",{method:"POST",body:JSON.stringify({tag:r})})},remove:async(e,r)=>{await e.request(`/tags/${r}`,{method:"DELETE"})}},rt={generateCheckoutLink:(e,r)=>{const t=new URL(`${e.apiUrl}/checkouts`);return r.items&&t.searchParams.set("items",JSON.stringify(r.items)),r.email&&t.searchParams.set("email",r.email),r.language&&t.searchParams.set("lang",r.language),r.redirectUrl&&t.searchParams.set("redirect-url",r.redirectUrl),r.giftMode&&t.searchParams.set("gift-mode","true"),r.payerEmail&&t.searchParams.set("payer-email",r.payerEmail),r.requireAddress&&t.searchParams.set("require-address","true"),r.metadata&&Object.entries(r.metadata).forEach(([n,a])=>{t.searchParams.set(`metadata.${n}`,a)}),t.toString()},generateAccountLink:(e,r)=>{const t=r.language||"en",n=new URL(`${e.baseUrl}/account/${encodeURIComponent(t)}/subscriptions/${encodeURIComponent(e.clientId)}${r.contractId?`/${encodeURIComponent(r.contractId)}`:""}`);return n.searchParams.set("sesamy-redirect-url",r.redirectUrl||"/"),n.toString()},generateChangePaymentLink:(e,r)=>{const t=r.language||"en",n=new URL(`${e.baseUrl}/account/${encodeURIComponent(t)}/subscriptions/${encodeURIComponent(e.clientId)}/${encodeURIComponent(r.contractId)}/change-payment-method`);return n.searchParams.set("sesamy-redirect-url",r.redirectUrl||"/"),n.toString()},generateChangePlanLink:(e,r)=>{const t=r.language||"en",n=new URL(`${e.baseUrl}/account/${encodeURIComponent(t)}/subscriptions/${encodeURIComponent(e.clientId)}/${encodeURIComponent(r.contractId)}/edit-plan`);return n.searchParams.set("sesamy-redirect-url",r.redirectUrl||"/"),n.toString()},generateConsumeLink:(e,r)=>{const t=r.language||"en";let n=new URL(`${e.baseUrl}/consume/${encodeURIComponent(t)}/@${encodeURIComponent(e.clientId)}/${encodeURIComponent(r.sku)}`);return r.episodeId?n.href+=`/${encodeURIComponent(r.episodeId)}`:n.href+="/listen",n.searchParams.set("sesamy-redirect-url",r.redirectUrl||"/"),n.toString()}},Oo={generateLink:(e,r)=>{const t=new URL(`${e.apiUrl}/checkouts`);return r.items&&t.searchParams.set("items",JSON.stringify(r.items)),r.email&&t.searchParams.set("email",r.email),r.language&&t.searchParams.set("lang",r.language),r.redirectUrl&&t.searchParams.set("redirect-url",r.redirectUrl),r.giftMode&&t.searchParams.set("gift-mode","true"),r.payerEmail&&t.searchParams.set("payer-email",r.payerEmail),r.requireAddress&&t.searchParams.set("require-address","true"),r.metadata&&Object.entries(r.metadata).forEach(([n,a])=>{t.searchParams.set(`metadata.${n}`,a)}),t.toString()},create:async(e,r)=>e.request("/checkouts",{method:"POST",body:JSON.stringify(r)}),get:async(e,r)=>e.request(`/checkouts/${r}`),update:async(e,r,t)=>e.request(`/checkouts/${r}`,{method:"PATCH",body:JSON.stringify(t)})},Df={list:async e=>e.request("/bills"),get:async(e,r)=>e.request(`/bills/${r}`)},Mf={list:async e=>e.request("/fulfillments"),create:async(e,r)=>e.request("/fulfillments",{method:"POST",body:JSON.stringify(r)})},Jm={get:async(e,r)=>{try{return new URL(r),e.request(r)}catch{return e.request(`/paywalls/${r}`)}}},Ym={list:async e=>e.request("/payment-issues")},Qm={content:async(e,r,t,n,a)=>{const i=new URLSearchParams({url:r});return t&&i.append("selector",t),n&&i.append("cache",n),e.request(`/proxy?${i.toString()}`,a)}},Xm={list:async(e,r)=>{const t=(r?new URLSearchParams({q:r}):new URLSearchParams).toString(),n=t?`/transactions?${t}`:"/transactions";return e.request(n)}},Ff={get:async e=>e.request("/vendor"),list:async e=>e.request("/vendors")},Zm=e=>{const r=zm(e);return{profile:{get:t=>St.get(r,t),update:(t,n)=>St.update(r,t,n),checkSpotifyLink:()=>St.checkSpotifyLink(r),unlinkSpotify:()=>St.unlinkSpotify(r),delete:()=>St.delete(r)},entitlements:{list:t=>Eo.list(r,t),get:t=>Eo.get(r,t),getAccess:t=>Eo.getAccess(r,t)},subscriptions:{list:()=>xf.list(r),get:t=>xf.get(r,t)},products:{get:t=>Nf.get(r,t),autoOnboard:t=>Nf.autoOnboard(r,t)},contracts:{list:async()=>{const t=await It.list(r),n=await e.tokenProvider();if(!n.toLowerCase().startsWith("bearer "))return t;const a=n.substring(7);return t.map(i=>jf(i,a))},get:async t=>{const n=await It.get(r,t),a=await e.tokenProvider();if(!a.toLowerCase().startsWith("bearer "))return n;const i=a.substring(7);return jf(n,i)},cancel:t=>It.cancel(r,t),createAmendment:(t,n)=>It.createAmendment(r,t,n),confirmAmendment:(t,n)=>It.confirmAmendment(r,t,n)},userMetadata:{get:()=>Ro.get(r),set:(t,n)=>Ro.set(r,t,n),delete:t=>Ro.delete(r,t)},tallies:{list:()=>et.list(r),get:t=>et.get(r,t),update:(t,n)=>et.update(r,t,n),create:t=>et.create(r,t),delete:t=>et.delete(r,t),push:(t,n)=>et.push(r,t,n)},tags:{list:()=>To.list(r),add:t=>To.add(r,t),remove:t=>To.remove(r,t)},checkouts:{generateLink:(t,n)=>rt.generateCheckoutLink(t,n),create:t=>Oo.create(r,t),get:t=>Oo.get(r,t),update:(t,n)=>Oo.update(r,t,n)},links:{generateCheckoutLink:(t,n)=>rt.generateCheckoutLink(t,n),generateAccountLink:(t,n)=>rt.generateAccountLink(t,n),generateChangePaymentLink:(t,n)=>rt.generateChangePaymentLink(t,n),generateChangePlanLink:(t,n)=>rt.generateChangePlanLink(t,n),generateConsumeLink:(t,n)=>rt.generateConsumeLink(t,n)},bills:{list:()=>Df.list(r),get:t=>Df.get(r,t)},fulfillments:{list:()=>Mf.list(r),create:t=>Mf.create(r,t)},paywalls:{get:t=>Jm.get(r,t)},paymentIssues:{list:()=>Ym.list(r)},proxy:{content:(t,n,a,i)=>Qm.content(r,t,n,a,i)},transactions:{list:t=>Xm.list(r,t)},vendor:{get:()=>Ff.get(r),list:()=>Ff.list(r)}}},eg="sesamy.com",rg="sesamy.dev",tg="https://sesa.my",Bf="sesamyCacheTimestamp",Hf="sesamyContentReloaded";class ng{get(r){return typeof sessionStorage>"u"?null:sessionStorage.getItem(r)}set(r,t){typeof sessionStorage<"u"&&sessionStorage.setItem(r,t)}remove(r){typeof sessionStorage<"u"&&sessionStorage.removeItem(r)}clear(){}}function ag(e,r){return`${e}.${r==="dev"?rg:eg}`}function ir(e,r){return`https://${ag(e,r)}`}function Qt(){let r=(document.documentElement.getAttribute("lang")??navigator.language??"en").split("-")[0]?.toLowerCase()??"en";return r==="nn"&&(r="nb"),r}function Mo(e){let r;try{r=new URL(e)}catch{return!1}return r.protocol==="http:"||r.protocol==="https:"}function Nv(e,r){if(Mo(e))return{itemSrc:e};const t=e.split(":");if(t.length<2)throw new Error(`Invalid itemSrc format: expected at least 2 segments separated by ':', got ${t.length}`);const[n,a,i]=t;if(!a)throw new Error("Invalid itemSrc format: sku segment is empty");return{sku:`${n}:${a}`,purchaseOption:r||i}}function Gf(e){return e.endsWith("/")?e.slice(0,-1):e}function Wf(e,r){if(!Mo(e)||!Mo(r))return!1;const t=new URL(e),n=new URL(r);return t.origin===n.origin&&Gf(t.pathname)===Gf(n.pathname)}function ig(e,r,t){const n=new URL(`${ir("checkout3",e.environment)}`);r.language&&n.searchParams.set("lang",r.language);let a=r.sku,i=r.purchaseOptionId,o=r.itemSrc;if(r.itemSrc){const l=Nv(r.itemSrc,r.purchaseOptionId);a=l.sku||a,i=l.purchaseOption||i,o=l.itemSrc}a?(n.searchParams.set("sku",a),i&&n.searchParams.set("po-id",i)):o&&n.searchParams.set("url",o),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 s=["_ga","_gid","_fbp","_fbc"];document.cookie.split(";").map(l=>{const[f,v]=l.trim().split("=");return{key:f,value:v}}).filter(l=>s.some(f=>f===l.key)).forEach(l=>{n.searchParams.append(l.key,l.value)});let c=new URL(window.location.href);if(r.redirectUrl)try{c=new URL(r.redirectUrl)}catch{console.warn("Invalid redirect URL provided, using current URL instead:",r.redirectUrl)}return c.searchParams.set("force-refetch-entitlements","true"),r.itemSrc&&c.searchParams.set("sesamy-purchase",r.itemSrc),n.searchParams.set("redirect-url",c.toString()),r.paymentMethodsFilter&&n.searchParams.set("paymentmethods-filter",r.paymentMethodsFilter.flatMap(({provider:l,methods:f})=>f?f.map(v=>`${l}|${v}`):l).join(",")),r.requireAddress&&n.searchParams.set("require-address","true"),r.giftMode&&n.searchParams.set("gift-mode","true"),r.payerEmail&&n.searchParams.set("payer-email",r.payerEmail),r.metadata&&Object.entries(r.metadata).forEach(([l,f])=>{n.searchParams.set(`metadata.${l}`,String(f))}),n}const jv="sesamySignedURLs";function Ps(){const e=sessionStorage.getItem(jv);return e?JSON.parse(e):[]}function Vf(e){const r=Ps();r.push(e),de(`Adding signed URL: ${e}`),sessionStorage.setItem(jv,JSON.stringify(r))}function og(e){const r={};return Object.keys(e).forEach(t=>{const n=e[t];n!=null&&(r[t]=n.toString())}),r}const Fo="sesamyAttribution";function sg(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 ug(e){return Object.keys(e).find(r=>r.startsWith("utm_"))?{utmSource:void 0,utmMedium:void 0,utmCampaign:void 0,...e}:e}function tn(){return sg(Fo)||{}}function Dv(e){if(e===null)localStorage.removeItem(Fo);else{de(`Setting attribution ${JSON.stringify(e)}`);const r=tn()??{},t=og({...r,...ug(e)});localStorage.setItem(Fo,JSON.stringify({value:t}))}}const Es="@sesamy/sesamy-js",Ft="1.98.0",Mv="sesamyFlags";async function Fv(e){try{localStorage.setItem(Mv,JSON.stringify(e))}catch{de("Failed to save flags to localStorage")}}async function Bv(e,r){const t=await Bt();t[e]=r,await Fv(t)}async function Hv(e){return(await Bt())[e]}async function Gv(e){const r=await Bt();e in r&&(delete r[e],await Fv(r))}async function Bt(){try{const e=localStorage.getItem(Mv);return e?JSON.parse(e):{}}catch{return{}}}function Wv(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),u=s.indexOf(i)+1,c=i.tagName.toLowerCase();s.filter(f=>f.tagName.toLowerCase()===c).length>1?a.unshift(`${c}:nth-child(${u})`):a.unshift(c)}i=i.parentElement}return a.join(" > ")}return t(e)}function Vv(e){return e?Object.fromEntries(Object.entries(e).filter(([r,t])=>t!==void 0)):{}}function cg(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}let Me={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"},paywallUrl:{selector:"sesamy-article",attribute:"paywall-url"}},zv=[],Kv=!1,Rr;function Rs(){const e=window.location.pathname,r=new URLSearchParams(window.location.search),t=navigator.userAgent;return zv.find(n=>{if(n.path&&!e.includes(n.path)||n.queryParam&&r.get(n.queryParam.key)!==n.queryParam.value)return!1;if(n.headers){const a=n.headers.name.toLowerCase(),i=n.headers.contains.toLowerCase();if(a==="user-agent"){if(!t.toLowerCase().includes(i))return!1}else return!1}return!(n.userAgentContains&&!t.includes(n.userAgentContains))})}function lg(){return Rs()}function fg(e,r){zv=e.content||[];const t=Rs();t&&t.type==="article"&&(Me={...Me,...Vv(t.selectors)},Kv=t.enablePaywallSettingsUrlFallback||!1),Rr=r}function dg(e,r){const{selector:t,attribute:n}=r;return t===Me.article.selector||n&&e.hasAttribute(n)?e:e.querySelector(t)}function Jv(e,r,t=!1){if(e){if(r.attribute){if(r.attribute==="textContent")return e.textContent??void 0;const n=e.getAttribute(r.attribute),a=Jv(e.parentElement,r,t);if(t){const i=[];return n&&i.push(...n.split(",").map(o=>o.trim()).filter(Boolean)),a&&i.push(...a.split(",").map(o=>o.trim()).filter(Boolean)),i.length>0?[...new Set(i)].join(","):void 0}return n??a}return e.textContent??void 0}}function ge(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 Ot(e){const r=[];return document.head.querySelectorAll(`[property~='${e}'][content]`).forEach(a=>{a.content&&r.push(a.content)}),document.head.querySelectorAll(`[name~='${e}'][content]`).forEach(a=>{a.content&&r.push(a.content)}),r}let Ct=null;function Yv(){const e=[],r=document.querySelectorAll('script[type="application/ld+json"]');for(const t of r)try{const n=JSON.parse(t.textContent||"");Array.isArray(n)?e.push(...n):n["@graph"]&&Array.isArray(n["@graph"])?e.push(...n["@graph"]):e.push(n)}catch{}return e}function _t(e){const r=Yv(),t=n=>!e||n["@type"]===e||Array.isArray(n["@type"])&&n["@type"].includes(e);return r.find(t)||null}function vg(e){const r=Yv(),t=n=>!e||n["@type"]===e||Array.isArray(n["@type"])&&n["@type"].includes(e);return r.filter(t)}function Bo(e,r,t){if(!e||typeof e!="object")return typeof e=="string"?e:void 0;const a=e[r];if(typeof a=="string")return a;if(a&&typeof a=="object"&&t)return a[t]}function hg(e){if(!e)return;const t=(Array.isArray(e)?e:[e]).map(n=>{if(typeof n=="string")return{name:n};if(typeof n=="object"&&n!==null){const a=n,i=a.name;return i?{name:i,url:a.url,image:Bo(a,"image","url"),jobTitle:a.jobTitle,sameAs:a.sameAs}:null}return null}).filter(n=>n!==null&&!!n.name);return t.length>0?t:void 0}function Co(e){if(Array.isArray(e))return e.filter(r=>typeof r=="string");if(typeof e=="string"){const r=e.split(",").map(t=>t.trim()).filter(Boolean);return r.length>0?r:void 0}}function Qv(){if(Ct)return Ct;const e=_t("NewsArticle")||_t("Article")||_t("BlogPosting")||_t("WebPage"),r=(...a)=>a.find(i=>i!=null&&i!=="")||void 0,t=(...a)=>a.find(i=>i&&i.length>0),n={contentType:e?Array.isArray(e["@type"])?e["@type"][0]:e["@type"]:void 0,authors:hg(e?.author)||(Ot("article:author").length>0?Ot("article:author").map(a=>({name:a})):void 0)||(ge("author")?[{name:ge("author")}]:void 0),keywords:t(Co(e?.keywords),Co(ge("keywords"))),tags:Ot("article:tag").length>0?Ot("article:tag"):void 0,categories:Co(ge("news_keywords")),section:r(e?.articleSection,ge("article:section")),publishedAt:r(e?.datePublished,ge("article:published_time")),modifiedAt:r(e?.dateModified,ge("article:modified_time")),ogType:ge("og:type"),ogSiteName:ge("og:site_name"),ogLocale:ge("og:locale"),twitterCard:ge("twitter:card"),twitterSite:ge("twitter:site"),twitterCreator:ge("twitter:creator"),creator:r(ge("creator"),ge("dc.creator")),mainEntityOfPage:e?Bo(e.mainEntityOfPage,"@id")||(typeof e.mainEntityOfPage=="string"?e.mainEntityOfPage:void 0):void 0,isAccessibleForFree:typeof e?.isAccessibleForFree=="boolean"?e.isAccessibleForFree:void 0,wordCount:typeof e?.wordCount=="number"?e.wordCount:void 0,publisher:e?.publisher&&typeof e.publisher=="object"?{name:e.publisher.name||"",url:e.publisher.url,logo:Bo(e.publisher,"logo","url")}:void 0};return Ct=Vv(n),Ct}function pg(){Ct=null}function Ts({publisherContentId:e,key:r,defaultValue:t=""}){const n=e?document.body.querySelector(`sesamy-content-data[id='${e}']`):null,a=r.replace(/-([a-z])/g,(i,o)=>o.toUpperCase());return n?.getAttribute(r)||ge(`sesamy:${r}`)||ge(`sesamy:${a}`)||ge(`og:${r}`)||ge(r)||t}function Xv(){const e=document.querySelectorAll(Me.article.selector);return Array.from(e).map(Ht).filter(r=>r!==null)}function Ht(e){const r=typeof e=="string"?document.querySelector(e):e;if(!r)return null;const t={element:r,selector:typeof e=="string"?e:Wv(r)},n=(i,o,s,u)=>{const{transform:c,collect:l=!1}=u||{},f=dg(r,o),v=Jv(f,o,l),d=Ts({publisherContentId:s,key:cg(String(i))}),h=v||d||void 0;h&&(t[i]=c?c(h):h)};n("id",Me.id),n("title",Me.title,t.id),n("excerpt",Me.excerpt,t.id),n("image",Me.image,t.id),n("price",Me.price,t.id,{transform:i=>{const o=parseFloat(i);return Number.isNaN(o)?void 0:o}}),n("currency",Me.currency,t.id),n("url",Me.url,t.id),n("pass",Me.pass,t.id,{collect:!0}),n("paywallUrl",Me.paywallUrl,t.id),n("accessLevel",Me.accessLevel,t.id,{transform:i=>i||"entitlement"});const a=Rs();if(a&&a.type==="article"&&(a.pass&&(t.pass=t.pass?`${t.pass},${a.pass}`:a.pass),a.price&&!t.price&&(t.price=a.price.amount),a.price?.currency&&!t.currency&&(t.currency=a.price.currency),a.paywallUrl&&!t.paywallUrl&&(t.paywallUrl=a.paywallUrl)),Kv&&!t.paywallUrl){const i=document.querySelector("sesamy-paywall");if(i){const o=i.getAttribute("settings-url");o&&(t.paywallUrl=o)}}return t.url||(t.url=window.location.href),t.metadata=Qv(),t}async function mg(e){const r=Ht(e);if(!r)throw new Error("Could not find article element");if(r.accessLevel==="public")return!0;if(r.accessLevel==="logged-in"&&!r.paywallUrl)return await Rr.auth.isAuthenticated()?!0:null;if(r.paywallUrl&&((await Rr.paywalls.get(r.paywallUrl)).settings.template==="LOGIN"?"logged-in":"entitlement")==="logged-in")return await Rr.auth.isAuthenticated()?!0:null;if(!r.url)throw new Error("Article must have a URL");return await Rr.entitlements.hasAccess(r.url,r.pass?.split(",")||[])||null}async function Zv(e,r){const t=typeof e=="string"?document.querySelector(e):e;if(!t)throw new Error("Could not find element");const n=Ht(t);if(!n?.url)throw new Error("Could not find content for element");const a=await Rr.entitlements.hasAccess(n.url,n.pass?.split(",")||[]);if(!a)throw new Error("User does not have access to the content");let i;if(a.token)i=a.token;else{const s=await Rr.entitlements.access(a.id);if(!s.token)throw new Error("Could not get access token");i=s.token}const o=r||Wv(t.parentElement||t);return Rr.proxy.getContent(i,n.url,o)}function eh(e,r={}){const{closeOnBackdropClick:t=!0,closeOnEscape:n=!0,zIndex:a=2147483647,backdropBlur:i="5px",overlayBackground:o="rgba(0,0,0,0.5)"}=r,s=document.createElement("div");s.setAttribute("data-sesamy-modal","true"),Object.assign(s.style,{position:"fixed",top:"0",left:"0",width:"100vw",height:"100vh",background:o,zIndex:String(a),display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:`blur(${i})`});const u=document.createElement("div");u.setAttribute("data-sesamy-modal-content","true"),typeof e=="string"?u.innerHTML=e:u.appendChild(e),s.appendChild(u);const c=()=>{s.remove(),n&&document.removeEventListener("keydown",l)},l=f=>{f.key==="Escape"&&c()};return t&&s.addEventListener("click",f=>{f.target===s&&c()}),n&&document.addEventListener("keydown",l),document.body.appendChild(s),{element:s,close:c}}function gg(e,r={}){const{position:t="top",fixed:n=!0,zIndex:a=2147483647,autoDismissMs:i,pushContent:o=!1,height:s,transitionDuration:u="0.3s"}=r,c=document.createElement("div");c.setAttribute("data-sesamy-notification-bar","true"),c.setAttribute("data-sesamy-notification-position",t),Object.assign(c.style,{position:n?"fixed":"absolute",[t]:"0",left:"0",width:"100%",zIndex:String(a),boxSizing:"border-box",...s&&{height:s}}),typeof e=="string"?c.innerHTML=e:c.appendChild(e);let l,f,v;const d=()=>{if(v&&clearTimeout(v),o&&s){const h=document.documentElement;h.style.transform=l||"",setTimeout(()=>{c.remove(),h.style.transition=f||""},parseFloat(u)*1e3)}else c.remove()};if(i&&(v=setTimeout(d,i)),o&&s){const h=document.documentElement;l=h.style.transform,f=h.style.transition,h.style.transition=`transform ${u} ease`,c.style.transition=`transform ${u} ease`,t==="top"?(h.style.transform=`translateY(${s})`,c.style.transform=`translateY(-${s})`):(h.style.transform=`translateY(-${s})`,c.style.transform=`translateY(${s})`),document.documentElement.prepend(c)}else document.body.appendChild(c);return{element:c,close:d}}function yg(e){const r=e.endpoint??ir("api2",e.environment),n=Zm({baseUrl:r,tokenProvider:async()=>{if(await dr())try{const U=await fr(!1);return U?`Bearer ${U}`:null}catch{}const m=localStorage.getItem("__anon_id");return`Basic ${btoa(`${e.vendorId||e.clientId}|${m}:`)}`},libraryName:Es,libraryVersion:Ft,vendorId:e.vendorId,cache:{mode:rn.BROWSER,storage:new ng}}),a=m=>async(C,U)=>{let F=sessionStorage.getItem(Bf);F||(F=Date.now().toString(),sessionStorage.setItem(Bf,F));const w={...U,headers:{...U.headers,"Cache-Timestamp":F}};return m(C,w)},i=(m=!0)=>C=>async(U,F)=>{const w=await fr(m);if(!w){if(await dr()){const x={...F,credentials:"include"};return C(U,x)}if(m)throw new Error("No access token available");return C(U,F)}const T={...F,headers:{...F.headers,Authorization:`Bearer ${w}`}};return C(U,T)},o=or(r).headers({"Content-Type":"application/json"}).middlewares([a,i(),wm(),Pm({delayTimer:1e3,delayRamp:(m,C)=>m*C,maxAttempts:3,until:m=>!!(m&&(m.ok||m.status>=400&&m.status<500)),retryOnNetworkError:!1})]);async function s(m={}){const{waitForEntitlementAfter:C,includeSignedLinks:U=!0}=m,F=await dr()?await n.entitlements.list({waitForEntitlementAfter:C?.toISOString()}):[];return U&&F.push(...Ps()),F}async function u(m,C=[]){return(await s())?.find(w=>{if(m){const{sku:T,purchaseOption:x}=Nv(m);if("sku"in w&&T===w.sku||x&&"purchaseOptionsId"in w&&x===w.purchaseOptionsId||Wf(m,w.url))return!0}return!!C.some(T=>Wf(T,w.url))})}async function c(m,C,U){const F=new URL(r,window.location.origin);return F.pathname=F.pathname.replace(/\/$/,"")+"/proxy",F.searchParams.set("url",C),U&&F.searchParams.set("selector",U),or(F.toString()).headers({Authorization:`Bearer ${m}`}).get().text()}async function l(m){if(!m)throw new Error("SKU is required to get fulfillments");return await dr()?await o.get(`/fulfillments?sku=${encodeURIComponent(m)}`).json():[]}async function f(m,C){if(!m||!C)throw new Error("SKU and itemId are required to request delivery");return(await o.post({sku:m},`/fulfillments/${encodeURIComponent(C)}/request-delivery?`).res()).ok}async function v(){return console.warn("getSubscriptions is deprecated, use getContracts instead"),o.get("/subscriptions").json()}async function d(m){return(await n.transactions.list())?.find(U=>U.id===m)}async function h(){return await o.url("/tags").get().json()}async function p(m){const C=await o.url(`/tags/${encodeURIComponent(m)}`).delete().res();return vr(),C.ok}async function S(m){const C=await o.url("/tags").post(encodeURIComponent(m)).res();return Lr(er.USER_ATTRIBUTE_CHANGED,{}),vr(),C.ok}async function R(m){return(await n.tallies.get(m)).value}async function I(){const m=await n.tallies.list(),C={};for(const U of m)C[U.id]=U.value;return C}async function g(m){return await n.tallies.delete(m)}async function b(m,C){return await n.tallies.push(m,C)}async function y(){return await fr(!1)?await o.url("/profile").get().json():null}async function A(m){const C=await o.url("/profile").patch(m).res();return vr(),C.ok}async function q(){return(await o.url("/profile/spotify-link").get().json()).isSpotifyLinked}async function j(){return(await o.url("/profile/unlink-spotify").post().res()).ok}async function G(m){const C=await fr(!1);if(!C)throw new Error("No access token available");const U=new URL(`${ir("access-sync",e.environment)}/spotify/sesamy-callback`);U.searchParams.set("access_token",C),U.searchParams.set("state",m),window.location.href=U.toString()}async function K(m){const C=await o.url(`/products/${encodeURIComponent(m)}/auto-onboard`).post().json();return C.length&&vr(),C}async function re(m,C=3600){const{shortlink:U}=await or(tg).post({url:m,ttl:C}).json();return U}async function L(m){const C=await fr(!1,!0);let U;const F=m.language||Qt(),w=tn();switch(m.target){case"account":U=new URL(`${ir("account",e.environment)}/${encodeURIComponent(m.language||F)}/subscriptions/${encodeURIComponent(e.vendorId||e.clientId)}${m.contractId?`/${encodeURIComponent(m.contractId)}`:""}`),U.searchParams.set("sesamy-redirect-url",m.redirectUrl||window.location.href);break;case"change-payment":U=new URL(`${ir("account",e.environment)}/${encodeURIComponent(m.language||F)}/subscriptions/${encodeURIComponent(e.vendorId||e.clientId)}/${encodeURIComponent(m.contractId)}/change-payment-method`),U.searchParams.set("sesamy-redirect-url",m.redirectUrl||window.location.href);break;case"change-plan":U=new URL(`${ir("account",e.environment)}/${encodeURIComponent(m.language||F)}/subscriptions/${encodeURIComponent(e.vendorId||e.clientId)}/${encodeURIComponent(m.contractId)}/edit-plan`),U.searchParams.set("sesamy-redirect-url",m.redirectUrl||window.location.href);break;case"consume":U=new URL(`${ir("consume",e.environment)}/${encodeURIComponent(m.language||F)}/@${encodeURIComponent(e.vendorId||e.clientId)}/${encodeURIComponent(m.sku)}`),m.episodeId?U.href+=`/${m.episodeId}`:U.href+="/listen",U.searchParams.set("sesamy-redirect-url",m.redirectUrl||window.location.href);break;case"checkout":U=ig(e,{language:F,...m},w);break;default:throw new Error("Invalid target")}return C&&(U.hash=`#access_token=${C}`),m.shorten?re(U.href,m.ttl):U.href}async function M(){const m=await fr(!1),C=new URL(`${ir("account",e.environment)}/subscriptions/${e.vendorId||e.clientId}`);m&&(C.hash=`#access_token=${m}`),window.location.href=C.toString()}async function N(m){const C=tn(),U=["_ga","_gid","_fbp","_fbc"];return document.cookie.split(";").forEach(F=>{const[w,T]=F.trim().split("=");U.includes(w)&&!C[w]&&(C[w]=T)}),n.checkouts.create({language:Qt(),...m,attribution:{...C,...m.attribution}})}return{autoOnboardProduct:K,bills:n.bills,checkouts:{create:N,get:n.checkouts.get,update:n.checkouts.update},content:{list:Xv,get:Ht,getLanguage:Qt,unlock:Zv,getPropertyFromHTML:Ts},contracts:n.contracts,deleteTag:p,deleteTally:g,entitlements:n.entitlements,flags:{get:Hv,set:Bv,list:Bt,delete:Gv},generateLink:L,getProxyContent:c,getEntitlements:s,getFulfillments:l,requestDelivery:f,hasAccess:u,isSpotifyLinked:q,linkSpotify:G,openHostedAccountPage:M,paywalls:n.paywalls,paymentIssues:n.paymentIssues,getProfile:y,products:n.products,getSubscriptions:v,getTally:R,getTallies:I,getTags:h,getTransaction:d,transactions:n.transactions,userMetadata:n.userMetadata,pushTally:b,setTag:S,unlinkSpotify:j,updateProfile:A,vendor:n.vendor}}function zf(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 bg="function",wg="string",Ze="undefined",Sg="boolean",nn="object",Ig="array",Pg="number",Eg="symbol",Rg="null",Ho=function(){},rh="any",th="*",Fr="__",Tg="form",Og="input",Cg="button",_g="select",an=typeof process!==Ze?process:{};an.env&&an.env.NODE_ENV;var _e=typeof document!==Ze;an.versions!=null&&an.versions.node!=null;typeof Deno!==Ze&&Deno.core;_e&&window.name==="nodejs"||typeof navigator!==Ze&&typeof navigator.userAgent!==Ze&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));function nh(e,r){return r.charAt(0)[e]()+r.slice(1)}var Ag=nh.bind(null,"toUpperCase"),kg=nh.bind(null,"toLowerCase");function qg(e){return ah(e)?Ag(Rg):typeof e===nn?xg(e):Object.prototype.toString.call(e).slice(8,-1)}function on(e,r){r===void 0&&(r=!0);var t=qg(e);return r?kg(t):t}function Gt(e,r){return typeof r===e}var Be=Gt.bind(null,bg),Tr=Gt.bind(null,wg),tt=Gt.bind(null,Ze),$g=Gt.bind(null,Sg);Gt.bind(null,Eg);function ah(e){return e===null}function Ug(e){return on(e)===Pg&&!isNaN(e)}function ih(e){return on(e)===Ig}function Fe(e){if(!Lg(e))return!1;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}function Lg(e){return e&&(typeof e===nn||e!==null)}function xg(e){return Be(e.constructor)?e.constructor.name:null}function Ng(e){return e instanceof Error||Tr(e.message)&&e.constructor&&Ug(e.constructor.stackTraceLimit)}function oh(e,r){if(typeof r!="object"||ah(r))return!1;if(r instanceof e)return!0;var t=on(new e(""));if(Ng(r))for(;r;){if(on(r)===t)return!0;r=Object.getPrototypeOf(r)}return!1}oh.bind(null,TypeError);oh.bind(null,SyntaxError);function Tn(e,r){var t=e instanceof Element||e instanceof HTMLDocument;return t&&r?jg(e,r):t}function jg(e,r){return r===void 0&&(r=""),e&&e.nodeName===r.toUpperCase()}function On(e){var r=[].slice.call(arguments,1);return function(){return e.apply(void 0,[].slice.call(arguments).concat(r))}}On(Tn,Tg);On(Tn,Cg);On(Tn,Og);On(Tn,_g);function Dg(e){return e?ih(e)?e:[e]:[]}function Kf(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function Mg(){if(_e){var e=navigator,r=e.languages;return e.userLanguage||(r&&r.length?r[0]:e.language)}}function Fg(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function Bg(e){return(function(r){for(var t,n=Object.create(null),a=/([^&=]+)=?([^&]*)/g;t=a.exec(r);){var i=Kf(t[1]),o=Kf(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 u in n){var c=u.split("[");c.length>1&&(Hg(n,c.map(function(l){return l.replace(/[?[\]\\ ]/g,"")}),n[u]),delete n[u])}return n})((function(r){return _e&&window.location.search.substring(1)})())}function Hg(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 Cn(){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 Gg(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 u=new Date;o||(o=u);var c=r-(u-o);return t=this,n=arguments,c<=0?(clearTimeout(i),i=null,o=u,a=e.apply(t,n)):i||(i=setTimeout(s,c)),a}}var Nr="global",ut=Fr+Nr+Fr,ct=typeof self===nn&&self.self===self&&self||typeof global===nn&&global[Nr]===global&&global||void 0;function Br(e){return ct[ut][e]}function Hr(e,r){return ct[ut][e]=r}function mt(e){delete ct[ut][e]}function gt(e,r,t){var n;try{if(Os(e)){var a=window[e];n=a[r].bind(a)}}catch{}return n||t}ct[ut]||(ct[ut]={});var Wt={};function Os(e){if(typeof Wt[e]!==Ze)return Wt[e];try{var r=window[e];r.setItem(Ze,Ze),r.removeItem(Ze)}catch{return Wt[e]=!1}return Wt[e]=!0}function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},ee.apply(null,arguments)}var Pr="function",hr="undefined",kt="reducer",sh="@@redux/",Go=sh+"INIT",Wg=sh+Math.random().toString(36),Jf=(function(){return typeof Symbol===Pr&&Symbol.observable||"@@observable"})(),Vt=" != "+Pr;function uh(e,r,t){var n;if(typeof r===Pr&&typeof t===hr&&(t=r,r=void 0),typeof t!==hr){if(typeof t!==Pr)throw new Error("enhancer"+Vt);return t(uh)(e,r)}if(typeof e!==Pr)throw new Error(kt+Vt);var a=e,i=r,o=[],s=o,u=!1;function c(){s===o&&(s=o.slice())}function l(){return i}function f(d){if(typeof d!==Pr)throw new Error("Listener"+Vt);var h=!0;return c(),s.push(d),function(){if(h){h=!1,c();var p=s.indexOf(d);s.splice(p,1)}}}function v(d){if(!Fe(d))throw new Error("Act != obj");if(typeof d.type===hr)throw new Error("ActType "+hr);if(u)throw new Error("Dispatch in "+kt);try{u=!0,i=a(i,d)}finally{u=!1}for(var h=o=s,p=0;p<h.length;p++)(0,h[p])();return d}return v({type:Go}),(n={dispatch:v,subscribe:f,getState:l,replaceReducer:function(d){if(typeof d!==Pr)throw new Error("next "+kt+Vt);a=d,v({type:Go})}})[Jf]=function(){var d,h=f;return(d={subscribe:function(p){if(typeof p!="object")throw new TypeError("Observer != obj");function S(){p.next&&p.next(l())}return S(),{unsubscribe:h(S)}}})[Jf]=function(){return this},d},n}function Vg(e,r){var t=r&&r.type;return"action "+(t&&t.toString()||"?")+kt+" "+e+" returns "+hr}function lt(){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 zg(){var e=arguments;return function(r){return function(t,n,a){var i,o=r(t,n,a),s=o.dispatch,u={getState:o.getState,dispatch:function(c){return s(c)}};return i=[].slice.call(e).map(function(c){return c(u)}),ee({},o,{dispatch:s=lt.apply(void 0,i)(o.dispatch)})}}}var Or=Fr+"anon_id",jr=Fr+"user_id",at=Fr+"user_traits",Wo="analytics",Ir="userId",nt="anonymousId",Xt=["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"],Vo=["name","EVENTS","config","loaded"],Z=Xt.reduce(function(e,r){return e[r]=r,e},{registerPluginType:function(e){return"registerPlugin:"+e},pluginReadyType:function(e){return"ready:"+e}}),Yf=/^utm_/,Qf=/^an_prop_/,Xf=/^an_trait_/;function Kg(e){var r=e.storage.setItem;return function(t){return function(n){return function(a){if(a.type===Z.bootstrap){var i=a.params,o=a.user,s=a.persistedUser,u=a.initialUser,c=s.userId===o.userId;s.anonymousId!==o.anonymousId&&r(Or,o.anonymousId),c||r(jr,o.userId),u.traits&&r(at,ee({},c&&s.traits?s.traits:{},u.traits));var l=Object.keys(a.params);if(l.length){var f=i.an_uid,v=i.an_event,d=l.reduce(function(h,p){if(p.match(Yf)||p.match(/^(d|g)clid/)){var S=p.replace(Yf,"");h.campaign[S==="campaign"?"name":S]=i[p]}return p.match(Qf)&&(h.props[p.replace(Qf,"")]=i[p]),p.match(Xf)&&(h.traits[p.replace(Xf,"")]=i[p]),h},{campaign:{},props:{},traits:{}});t.dispatch(ee({type:Z.params,raw:i},d,f?{userId:f}:{})),f&&setTimeout(function(){return e.identify(f,d.traits)},0),v&&setTimeout(function(){return e.track(v,d.props)},0),Object.keys(d.campaign).length&&t.dispatch({type:Z.campaign,campaign:d.campaign})}}return n(a)}}}}function Jg(e){return function(r,t){if(r===void 0&&(r={}),t===void 0&&(t={}),t.type===Z.setItemEnd){if(t.key===Or)return ee({},r,{anonymousId:t.value});if(t.key===jr)return ee({},r,{userId:t.value})}switch(t.type){case Z.identify:return Object.assign({},r,{userId:t.userId,traits:ee({},r.traits,t.traits)});case Z.reset:return[jr,Or,at].forEach(function(n){e.removeItem(n)}),Object.assign({},r,{userId:null,anonymousId:null,traits:{}});default:return r}}}function Zf(e){return{userId:e.getItem(jr),anonymousId:e.getItem(Or),traits:e.getItem(at)}}var zo=function(e){return Fr+"TEMP"+Fr+e};function Yg(e){var r=e.storage,t=r.setItem,n=r.removeItem,a=r.getItem;return function(i){return function(o){return function(s){var u=s.userId,c=s.traits,l=s.options;if(s.type===Z.reset&&([jr,at,Or].forEach(function(d){n(d)}),[Ir,nt,"traits"].forEach(function(d){mt(zo(d))})),s.type===Z.identify){a(Or)||t(Or,Cn());var f=a(jr),v=a(at)||{};f&&f!==u&&i.dispatch({type:Z.userIdChanged,old:{userId:f,traits:v},new:{userId:u,traits:c},options:l}),u&&t(jr,u),c&&t(at,ee({},v,c))}return o(s)}}}}var At={};function ed(e,r){At[e]&&Be(At[e])&&(At[e](r),delete At[e])}function ch(e,r,t){return new Promise(function(n,a){return r()?n(e):t<1?a(ee({},e,{queue:!0})):new Promise(function(i){return setTimeout(i,10)}).then(function(i){return ch(e,r,t-10).then(n,a)})})}function Qg(e){return{abort:e}}function lh(e,r,t){var n={},a=r(),i=e.getState(),o=i.plugins,s=i.queue,u=i.user;if(!i.context.offline&&s&&s.actions&&s.actions.length){var c=s.actions.reduce(function(f,v,d){return o[v.plugin].loaded?(f.process.push(v),f.processIndex.push(d)):(f.requeue.push(v),f.requeueIndex.push(d)),f},{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(c.processIndex&&c.processIndex.length){c.processIndex.forEach(function(f){var v=s.actions[f],d=v.plugin,h=v.payload.type,p=a[d][h];if(p&&Be(p)){var S,R=(function(b,y){return b===void 0&&(b={}),y===void 0&&(y={}),[Ir,nt].reduce(function(A,q){return b.hasOwnProperty(q)&&y[q]&&y[q]!==b[q]&&(A[q]=y[q]),A},b)})(v.payload,u),I=n[R.meta.rid];if(!I&&(S=p({payload:R,config:o[d].config,instance:t,abort:Qg}))&&Fe(S)&&S.abort)return void(n[R.meta.rid]=!0);if(!I){var g=h+":"+d;e.dispatch(ee({},R,{type:g,_:{called:g,from:"queueDrain"}}))}}});var l=s.actions.filter(function(f,v){return!~c.processIndex.indexOf(v)});s.actions=l}}}var _o=function(e){var r=e.data,t=e.action,n=e.instance,a=e.state,i=e.allPlugins,o=e.allMatches,s=e.store,u=e.EVENTS;try{var c=a.plugins,l=a.context,f=t.type,v=f.match(it),d=r.exact.map(function(S){return S.pluginName});v&&(d=o.during.map(function(S){return S.pluginName}));var h=(function(S,R){return function(I,g,b){var y=g.config,A=g.name,q=A+"."+I.type;b&&(q=b.event);var j=I.type.match(it)?(function(G,K,re,L,M){return function(N,m){var C=L?L.name:G,U=m&&$t(m)?m:re;if(L&&(!(U=m&&$t(m)?m:[G]).includes(G)||U.length!==1))throw new Error("Method "+K+" can only abort "+G+" plugin. "+JSON.stringify(U)+" input valid");return ee({},M,{abort:{reason:N,plugins:U,caller:K,_:C}})}})(A,q,R,b,I):(function(G,K){return function(){throw new Error(G.type+" action not cancellable. Remove abort in "+K)}})(I,q);return{payload:Xg(I),instance:S,config:y||{},abort:j}}})(n,d),p=r.exact.reduce(function(S,R){var I=R.pluginName,g=R.methodName,b=!1;return g.match(/^initialize/)||g.match(/^reset/)||(b=!c[I].loaded),l.offline&&g.match(/^(page|track|identify)/)&&(b=!0),S[""+I]=b,S},{});return Promise.resolve(r.exact.reduce(function(S,R,I){var g=R.pluginName;return Promise.resolve(S).then(function(b){function y(){return Promise.resolve(b)}var A=(function(){if(r.namespaced&&r.namespaced[g])return Promise.resolve(r.namespaced[g].reduce(function(q,j,G){return Promise.resolve(q).then(function(K){return j.method&&Be(j.method)?((function(N,m){var C=sd(N);if(C&&C.name===m){var U=sd(C.method);throw new Error([m+" plugin is calling method "+N,"Plugins cant call self","Use "+C.method+" "+(U?"or "+U.method:"")+" in "+m+" plugin insteadof "+N].join(`
|
|
3
|
-
`))}})(j.methodName,j.pluginName),Promise.resolve(j.method({payload:K,instance:n,abort:(re=K,L=g,M=j.pluginName,function(N,m){return ee({},re,{abort:{reason:N,plugins:m||[L],caller:f,from:M||L}})}),config:nd(j.pluginName,c,i),plugins:c})).then(function(N){var m=Fe(N)?N:{};return Promise.resolve(ee({},K,m))})):K;var re,L,M})},Promise.resolve(t))).then(function(q){b[g]=q});b[g]=t})();return A&&A.then?A.then(y):y()})},Promise.resolve({}))).then(function(S){return Promise.resolve(r.exact.reduce(function(R,I,g){try{var b=r.exact.length===g+1,y=I.pluginName,A=i[y];return Promise.resolve(R).then(function(q){var j=S[y]?S[y]:{};if(v&&(j=q),ko(j,y))return Ao({data:j,method:f,instance:n,pluginName:y,store:s}),Promise.resolve(q);if(ko(q,y))return b&&Ao({data:q,method:f,instance:n,store:s}),Promise.resolve(q);if(p.hasOwnProperty(y)&&p[y]===!0)return s.dispatch({type:"queue",plugin:y,payload:j,_:{called:"queue",from:"queueMechanism"}}),Promise.resolve(q);var G=h(S[y],i[y]);return Promise.resolve(A[f]({abort:G.abort,payload:j,instance:n,config:nd(y,c,i),plugins:c})).then(function(K){var re=Fe(K)?K:{},L=ee({},q,re),M=S[y];if(ko(M,y))Ao({data:M,method:f,instance:n,pluginName:y,store:s});else{var N=f+":"+y;(N.match(/:/g)||[]).length<2&&!f.match(rd)&&!f.match(td)&&n.dispatch(ee({},v?L:j,{type:N,_:{called:N,from:"submethod"}}))}return Promise.resolve(L)})})}catch(q){return Promise.reject(q)}},Promise.resolve(t))).then(function(R){if(!(f.match(it)||f.match(/^registerPlugin/)||f.match(td)||f.match(rd)||f.match(/^params/)||f.match(/^userIdChanged/))){if(u.plugins.includes(f),R._&&R._.originalAction===f)return R;var I=ee({},R,{_:{originalAction:R.type,called:R.type,from:"engineEnd"}});fh(R,r.exact.length)&&!f.match(/End$/)&&(I=ee({},I,{type:R.type+"Aborted"})),s.dispatch(I)}return R})})}catch(S){return Promise.reject(S)}},it=/Start$/,rd=/^bootstrap/,td=/^ready/;function Ao(e){var r=e.pluginName,t=e.method+"Aborted"+(r?":"+r:"");e.store.dispatch(ee({},e.data,{type:t,_:{called:t,from:"abort"}}))}function nd(e,r,t){var n=r[e]||t[e];return n&&n.config?n.config:{}}function ad(e,r){return r.reduce(function(t,n){return n[e]?t.concat({methodName:e,pluginName:n.name,method:n[e]}):t},[])}function id(e,r){var t=e.replace(it,""),n=r?":"+r:"";return[""+e+n,""+t+n,t+"End"+n]}function ko(e,r){var t=e.abort;return!!t&&(t===!0||od(t,r)||t&&od(t.plugins,r))}function fh(e,r){var t=e.abort;if(!t)return!1;if(t===!0||Tr(t))return!0;var n=t.plugins;return $t(t)&&t.length===r||$t(n)&&n.length===r}function $t(e){return Array.isArray(e)}function od(e,r){return!(!e||!$t(e))&&e.includes(r)}function sd(e){var r=e.match(/(.*):(.*)/);return!!r&&{method:r[1],name:r[2]}}function Xg(e){return Object.keys(e).reduce(function(r,t){return t==="type"||(r[t]=Fe(e[t])?Object.assign({},e[t]):e[t]),r},{})}function Zg(e,r,t){var n={};return function(a){return function(i){return function(o){try{var s,u=function(b){return s?b:i(f)},c=o.type,l=o.plugins,f=o;if(o.abort)return Promise.resolve(i(o));if(c===Z.enablePlugin&&a.dispatch({type:Z.initializeStart,plugins:l,disabled:[],fromEnable:!0,meta:o.meta}),c===Z.disablePlugin&&setTimeout(function(){return ed(o.meta.rid,{payload:o})},0),c===Z.initializeEnd){var v=r(),d=Object.keys(v),h=d.filter(function(b){return l.includes(b)}).map(function(b){return v[b]}),p=[],S=[],R=o.disabled,I=h.map(function(b){var y=b.loaded,A=b.name,q=b.config;return ch(b,function(){return y({config:q})},1e4).then(function(j){return n[A]||(a.dispatch({type:Z.pluginReadyType(A),name:A,events:Object.keys(b).filter(function(G){return!Vo.includes(G)})}),n[A]=!0),p=p.concat(A),b}).catch(function(j){if(j instanceof Error)throw new Error(j);return S=S.concat(j.name),j})});Promise.all(I).then(function(b){var y={plugins:p,failed:S,disabled:R};setTimeout(function(){d.length===I.length+R.length&&a.dispatch(ee({},{type:Z.ready},y))},0)})}var g=(function(){if(c!==Z.bootstrap)return/^ready:([^:]*)$/.test(c)&&setTimeout(function(){return lh(a,r,e)},0),Promise.resolve((function(b,y,A,q,j){try{var G=Be(y)?y():y,K=b.type,re=K.replace(it,"");if(b._&&b._.called)return Promise.resolve(b);var L=A.getState(),M=(C=G,(U=L.plugins)===void 0&&(U={}),(F=b.options)===void 0&&(F={}),Object.keys(C).filter(function(w){var T=F.plugins||{};return $g(T[w])?T[w]:T.all!==!1&&(!U[w]||U[w].enabled!==!1)}).map(function(w){return C[w]}));K===Z.initializeStart&&b.fromEnable&&(M=Object.keys(L.plugins).filter(function(w){var T=L.plugins[w];return b.plugins.includes(w)&&!T.initialized}).map(function(w){return G[w]}));var N=M.map(function(w){return w.name}),m=(function(w,T){var x=id(w).map(function(H){return ad(H,T)});return T.reduce(function(H,Q){var J=Q.name,le=id(w,J).map(function(Re){return ad(Re,T)}),ne=le[0],ue=le[1],ae=le[2];return ne.length&&(H.beforeNS[J]=ne),ue.length&&(H.duringNS[J]=ue),ae.length&&(H.afterNS[J]=ae),H},{before:x[0],beforeNS:{},during:x[1],duringNS:{},after:x[2],afterNS:{}})})(K,M);return Promise.resolve(_o({action:b,data:{exact:m.before,namespaced:m.beforeNS},state:L,allPlugins:G,allMatches:m,instance:A,store:q,EVENTS:j})).then(function(w){function T(){var Q=(function(){if(K.match(it))return Promise.resolve(_o({action:ee({},x,{type:re+"End"}),data:{exact:m.after,namespaced:m.afterNS},state:L,allPlugins:G,allMatches:m,instance:A,store:q,EVENTS:j})).then(function(J){J.meta&&J.meta.hasCallback&&ed(J.meta.rid,{payload:J})})})();return Q&&Q.then?Q.then(function(){return w}):w}if(fh(w,N.length))return w;var x,H=(function(){if(K!==re)return Promise.resolve(_o({action:ee({},w,{type:re}),data:{exact:m.during,namespaced:m.duringNS},state:L,allPlugins:G,allMatches:m,instance:A,store:q,EVENTS:j})).then(function(Q){x=Q});x=w})();return H&&H.then?H.then(T):T()})}catch(w){return Promise.reject(w)}var C,U,F})(o,r,e,a,t)).then(function(b){var y=i(b);return s=1,y})})();return Promise.resolve(g&&g.then?g.then(u):u(g))}catch(b){return Promise.reject(b)}}}}}function ey(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===Z.setItem||a===Z.removeItem){if(n.abort)return t(n);a===Z.setItem?e.setItem(i,o,s):e.removeItem(i,s)}return t(n)}}}}var ry=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 lt.apply(void 0,o)(n)(a)}}}}};function ty(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=ud(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},ee({},r,n)}if(/^initialize:([^:]*)$/.test(t.type)){var u=ud(t.type,Z.initialize),c=e()[u];return c&&u?(n[u]=ee({},r[u],{initialized:!0,loaded:!!c.loaded({config:c.config})}),ee({},r,n)):r}if(/^ready:([^:]*)$/.test(t.type))return n[t.name]=ee({},r[t.name],{loaded:!0}),ee({},r,n);switch(t.type){case Z.disablePlugin:return ee({},r,cd(t.plugins,!1,r));case Z.enablePlugin:return ee({},r,cd(t.plugins,!0,r));default:return r}}}function ud(e,r){return e.substring(r.length+1,e.length)}function cd(e,r,t){return e.reduce(function(n,a){return n[a]=ee({},t[a],{enabled:r}),n},t)}function dh(e){try{return JSON.parse(JSON.stringify(e))}catch{}return e}var ny={last:{},history:[]};function ay(e,r){e===void 0&&(e=ny);var t=r.options,n=r.meta;if(r.type===Z.track){var a=dh(ee({event:r.event,properties:r.properties},Object.keys(t).length&&{options:t},{meta:n}));return ee({},e,{last:a,history:e.history.concat(a)})}return e}var iy={actions:[]};function oy(e,r){e===void 0&&(e=iy);var t=r.payload;switch(r.type){case"queue":var n;return n=t&&t.type&&t.type===Z.identify?[r].concat(e.actions):e.actions.concat(r),ee({},e,{actions:n});case"dequeue":return[];default:return e}}var vh=/#.*$/;function sy(e){var r=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(e);return"/"+(r&&r[3]?r[3].split("?")[0].replace(vh,""):"")}var hh,ph,mh,gh,uy=function(e){if(e===void 0&&(e={}),!_e)return e;var r=document,t=r.title,n=r.referrer,a=window,i=a.location,o=a.innerWidth,s=a.innerHeight,u=i.hash,c=i.search,l=(function(v){var d=(function(){if(_e){for(var h,p=document.getElementsByTagName("link"),S=0;h=p[S];S++)if(h.getAttribute("rel")==="canonical")return h.getAttribute("href")}})();return d?d.match(/\?/)?d:d+v:window.location.href.replace(vh,"")})(c),f={title:t,url:l,path:sy(l),hash:u,search:c,width:o,height:s};return n&&n!==""&&(f.referrer=n),ee({},f,e)},cy={last:{},history:[]};function ly(e,r){e===void 0&&(e=cy);var t=r.options;if(r.type===Z.page){var n=dh(ee({properties:r.properties,meta:r.meta},Object.keys(t).length&&{options:t}));return ee({},e,{last:n,history:e.history.concat(n)})}return e}hh=(function(){if(!_e)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"})(),ph=_e?document.referrer:null,mh=Mg(),gh=Fg();var ld={initialized:!1,sessionId:Cn(),app:null,version:null,debug:!1,offline:!!_e&&!navigator.onLine,os:{name:hh},userAgent:_e?navigator.userAgent:"node",library:{name:Wo,version:"0.13.1"},timezone:gh,locale:mh,campaign:{},referrer:ph};function fy(e,r){e===void 0&&(e=ld);var t=e.initialized,n=r.campaign;switch(r.type){case Z.campaign:return ee({},e,{campaign:n});case Z.offline:return ee({},e,{offline:!0});case Z.online:return ee({},e,{offline:!1});default:return t?e:ee({},ld,e,{initialized:!0})}}var dy=["plugins","reducers","storage"];function vy(e,r,t){if(_e){var n=window[(t?"add":"remove")+"EventListener"];e.split(" ").forEach(function(a){n(a,r)})}}function hy(e){var r=vy.bind(null,"online offline",function(t){return Promise.resolve(!navigator.onLine).then(e)});return r(!0),function(t){return r(!1)}}function yh(){return Hr(Wo,[]),function(e){return function(r,t,n){var a=e(r,t,n),i=a.dispatch;return Object.assign(a,{dispatch:function(o){return ct[ut][Wo].push(o.action||o),i(o)}})}}}function fd(e){return function(){return lt(lt.apply(null,arguments),yh())}}function qo(e){return e?ih(e)?e:[e]:[]}function dd(e,r,t){e===void 0&&(e={});var n,a,i=Cn();return r&&(At[i]=(n=r,a=(function(o){for(var s,u=o||Array.prototype.slice.call(arguments),c=0;c<u.length;c++)if(Be(u[c])){s=u[c];break}return s})(t),function(o){a&&a(o),n(o)})),ee({},e,{rid:i,ts:new Date().getTime()},r?{hasCallback:!0}:{})}function py(e){e===void 0&&(e={});var r=e.reducers||{},t=e.initialUser||{},n=(e.plugins||[]).reduce(function(w,T){if(Be(T))return w.middlewares=w.middlewares.concat(T),w;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(J){return T.EVENTS[J]}):[];w.pluginEnabled[T.name]=!(T.enabled===!1||T.config.enabled===!1),delete T.enabled,T.methods&&(w.methods[T.name]=Object.keys(T.methods).reduce(function(J,le){var ne;return J[le]=(ne=T.methods[le],function(){for(var ue=Array.prototype.slice.call(arguments),ae=new Array(ne.length),Re=0;Re<ue.length;Re++)ae[Re]=ue[Re];return ae[ae.length]=y,ne.apply({instance:y},ae)}),J},{}),delete T.methods);var H=Object.keys(T).concat(x),Q=new Set(w.events.concat(H));if(w.events=Array.from(Q),w.pluginsArray=w.pluginsArray.concat(T),w.plugins[T.name])throw new Error(T.name+"AlreadyLoaded");return w.plugins[T.name]=T,w.plugins[T.name].loaded||(w.plugins[T.name].loaded=function(){return!0}),w},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),a=e.storage?e.storage:{getItem:Br,setItem:Hr,removeItem:mt},i=(function(w){return function(T,x,H){return x.getState("user")[T]||(H&&Fe(H)&&H[T]?H[T]:Zf(w)[T]||Br(zo(T))||null)}})(a),o=n.plugins,s=n.events.filter(function(w){return!Vo.includes(w)}).sort(),u=new Set(s.concat(Xt).filter(function(w){return!Vo.includes(w)})),c=Array.from(u).sort(),l=function(){return o},f=new ry,v=f.addMiddleware,d=f.removeMiddleware,h=f.dynamicMiddlewares,p=function(){throw new Error("Abort disabled inListener")},S=Bg(),R=Zf(a),I=ee({},R,t,S.an_uid?{userId:S.an_uid}:{},S.an_aid?{anonymousId:S.an_aid}:{});I.anonymousId||(I.anonymousId=Cn());var g=ee({enable:function(w,T){return new Promise(function(x){m.dispatch({type:Z.enablePlugin,plugins:qo(w),_:{originalAction:Z.enablePlugin}},x,[T])})},disable:function(w,T){return new Promise(function(x){m.dispatch({type:Z.disablePlugin,plugins:qo(w),_:{originalAction:Z.disablePlugin}},x,[T])})}},n.methods),b=!1,y={identify:function(w,T,x,H){try{var Q=Tr(w)?w:null,J=Fe(w)?w:T,le=x||{},ne=y.user();Hr(zo(Ir),Q);var ue=Q||J.userId||i(Ir,y,J);return Promise.resolve(new Promise(function(ae){m.dispatch(ee({type:Z.identifyStart,userId:ue,traits:J||{},options:le,anonymousId:ne.anonymousId},ne.id&&ne.id!==Q&&{previousId:ne.id}),ae,[T,x,H])}))}catch(ae){return Promise.reject(ae)}},track:function(w,T,x,H){try{var Q=Fe(w)?w.event:w;if(!Q||!Tr(Q))throw new Error("EventMissing");var J=Fe(w)?w:T||{},le=Fe(x)?x:{};return Promise.resolve(new Promise(function(ne){m.dispatch({type:Z.trackStart,event:Q,properties:J,options:le,userId:i(Ir,y,T),anonymousId:i(nt,y,T)},ne,[T,x,H])}))}catch(ne){return Promise.reject(ne)}},page:function(w,T,x){try{var H=Fe(w)?w:{},Q=Fe(T)?T:{};return Promise.resolve(new Promise(function(J){m.dispatch({type:Z.pageStart,properties:uy(H),options:Q,userId:i(Ir,y,H),anonymousId:i(nt,y,H)},J,[w,T,x])}))}catch(J){return Promise.reject(J)}},user:function(w){if(w===Ir||w==="id")return i(Ir,y);if(w===nt||w==="anonId")return i(nt,y);var T=y.getState("user");return w?zf(T,w):T},reset:function(w){return new Promise(function(T){m.dispatch({type:Z.resetStart},T,w)})},ready:function(w){return b&&w({plugins:g,instance:y}),y.on(Z.ready,function(T){w&&w(T),b=!0})},on:function(w,T){if(!w||!Be(T))return!1;if(w===Z.bootstrap)throw new Error(".on disabled for "+w);var x=/Start$|Start:/;if(w==="*"){var H=function(ne){return function(ue){return function(ae){return ae.type.match(x)&&T({payload:ae,instance:y,plugins:o}),ue(ae)}}},Q=function(ne){return function(ue){return function(ae){return ae.type.match(x)||T({payload:ae,instance:y,plugins:o}),ue(ae)}}};return v(H,zt),v(Q,Kt),function(){d(H,zt),d(Q,Kt)}}var J=w.match(x)?zt:Kt,le=function(ne){return function(ue){return function(ae){return ae.type===w&&T({payload:ae,instance:y,plugins:o,abort:p}),ue(ae)}}};return v(le,J),function(){return d(le,J)}},once:function(w,T){if(!w||!Be(T))return!1;if(w===Z.bootstrap)throw new Error(".once disabled for "+w);var x=y.on(w,function(H){T({payload:H.payload,instance:y,plugins:o,abort:p}),x()});return x},getState:function(w){var T=m.getState();return w?zf(T,w):Object.assign({},T)},dispatch:function(w){var T=Tr(w)?{type:w}:w;if(Xt.includes(T.type))throw new Error("reserved action "+T.type);var x=ee({},T,{_:ee({originalAction:T.type},w._||{})});m.dispatch(x)},enablePlugin:g.enable,disablePlugin:g.disable,plugins:g,storage:{getItem:a.getItem,setItem:function(w,T,x){m.dispatch({type:Z.setItemStart,key:w,value:T,options:x})},removeItem:function(w,T){m.dispatch({type:Z.removeItemStart,key:w,options:T})}},setAnonymousId:function(w,T){y.storage.setItem(Or,w,T)},events:{core:Xt,plugins:s}},A=n.middlewares.concat([function(w){return function(T){return function(x){return x.meta||(x.meta=dd()),T(x)}}},h(zt),Zg(y,l,{all:c,plugins:s}),ey(a),Kg(y),Yg(y),h(Kt)]),q={context:fy,user:Jg(a),page:ly,track:ay,plugins:ty(l),queue:oy},j=lt,G=lt;if(_e&&e.debug){var K=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;K&&(j=K({trace:!0,traceLimit:25})),G=function(){return arguments.length===0?yh():Fe(typeof arguments[0])?fd():fd().apply(null,arguments)}}var re,L=(function(w){return Object.keys(w).reduce(function(T,x){return dy.includes(x)||(T[x]=w[x]),T},{})})(e),M=n.pluginsArray.reduce(function(w,T){var x=T.name,H=T.config,Q=T.loaded,J=n.pluginEnabled[x];return w[x]={enabled:J,initialized:!!J&&!T.initialize,loaded:!!Q({config:H}),config:H},w},{}),N={context:L,user:I,plugins:M},m=uh((function(w){for(var T=Object.keys(w),x={},H=0;H<T.length;H++){var Q=T[H];typeof w[Q]===Pr&&(x[Q]=w[Q])}var J,le=Object.keys(x);try{(function(ne){Object.keys(ne).forEach(function(ue){var ae=ne[ue];if(typeof ae(void 0,{type:Go})===hr||typeof ae(void 0,{type:Wg})===hr)throw new Error(kt+" "+ue+" "+hr)})})(x)}catch(ne){J=ne}return function(ne,ue){if(ne===void 0&&(ne={}),J)throw J;for(var ae=!1,Re={},xe=0;xe<le.length;xe++){var je=le[xe],$e=ne[je],Qe=(0,x[je])($e,ue);if(typeof Qe===hr){var wr=Vg(je,ue);throw new Error(wr)}Re[je]=Qe,ae=ae||Qe!==$e}return ae?Re:ne}})(ee({},q,r)),N,G(j(zg.apply(void 0,A))));m.dispatch=(re=m.dispatch,function(w,T,x){var H=ee({},w,{meta:dd(w.meta,T,qo(x))});return re.apply(null,[H])});var C=Object.keys(o);m.dispatch({type:Z.bootstrap,plugins:C,config:L,params:S,user:I,initialUser:t,persistedUser:R});var U=C.filter(function(w){return n.pluginEnabled[w]}),F=C.filter(function(w){return!n.pluginEnabled[w]});return m.dispatch({type:Z.registerPlugins,plugins:C,enabled:n.pluginEnabled}),n.pluginsArray.map(function(w,T){var x=w.bootstrap,H=w.config,Q=w.name;x&&Be(x)&&x({instance:y,config:H,payload:w}),m.dispatch({type:Z.registerPluginType(Q),name:Q,enabled:n.pluginEnabled[Q],plugin:w}),n.pluginsArray.length===T+1&&m.dispatch({type:Z.initializeStart,plugins:U,disabled:F})}),hy(function(w){m.dispatch({type:w?Z.offline:Z.online})}),(function(w,T,x){setInterval(function(){return lh(w,T,x)},3e3)})(m,l,y),y}var zt="before",Kt="after",Dr="cookie",Ur=Sh(),bh=_n,my=_n;function wh(e){return Ur?_n(e,"",-1):mt(e)}function Sh(){if(Ur!==void 0)return Ur;var e=Dr+Dr;try{_n(e,e),Ur=document.cookie.indexOf(e)!==-1,wh(e)}catch{Ur=!1}return Ur}function _n(e,r,t,n,a,i){if(typeof window<"u"){var o=arguments.length>1;return Ur===!1&&(o?Hr(e,r):Br(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 pr="localStorage",gy=Os.bind(null,pr);gt(pr,"getItem",Br);gt(pr,"setItem",Hr);gt(pr,"removeItem",mt);var mr="sessionStorage",yy=Os.bind(null,mr);gt(mr,"getItem",Br);gt(mr,"setItem",Hr);gt(mr,"removeItem",mt);function ot(e){var r=e;try{if((r=JSON.parse(e))==="true")return!0;if(r==="false")return!1;if(Fe(r))return r;parseFloat(r)===r&&(r=parseFloat(r))}catch{}if(r!==null&&r!=="")return r}var by=gy(),wy=yy(),Sy=Sh();function Mr(e,r){if(e){var t=Cs(r),n=!qs(t),a=_s(t)?ot(localStorage.getItem(e)):void 0;if(n&&!tt(a))return a;var i=As(t)?ot(bh(e)):void 0;if(n&&i)return i;var o=ks(t)?ot(sessionStorage.getItem(e)):void 0;if(n&&o)return o;var s=Br(e);return n?s:{localStorage:a,sessionStorage:o,cookie:i,global:s}}}function sn(e,r,t){if(e&&!tt(r)){var n={},a=Cs(t),i=JSON.stringify(r),o=!qs(a);return _s(a)&&(n[pr]=Jt(pr,r,ot(localStorage.getItem(e))),localStorage.setItem(e,i),o)?n[pr]:As(a)&&(n[Dr]=Jt(Dr,r,ot(bh(e))),my(e,i),o)?n[Dr]:ks(a)&&(n[mr]=Jt(mr,r,ot(sessionStorage.getItem(e))),sessionStorage.setItem(e,i),o)?n[mr]:(n[Nr]=Jt(Nr,r,Br(e)),Hr(e,r),o?n[Nr]:n)}}function Iy(e,r){if(e){var t=Cs(r),n=Mr(e,th),a={};return!tt(n.localStorage)&&_s(t)&&(localStorage.removeItem(e),a[pr]=n.localStorage),!tt(n.cookie)&&As(t)&&(wh(e),a[Dr]=n.cookie),!tt(n.sessionStorage)&&ks(t)&&(sessionStorage.removeItem(e),a[mr]=n.sessionStorage),!tt(n.global)&&An(t,Nr)&&(mt(e),a[Nr]=n.global),a}}function Cs(e){return e?Tr(e)?e:e.storage:rh}function _s(e){return by&&An(e,pr)}function As(e){return Sy&&An(e,Dr)}function ks(e){return wy&&An(e,mr)}function qs(e){return e===th||e==="all"}function An(e,r){return e===rh||e===r||qs(e)}function Jt(e,r,t){return{location:e,current:r,previous:t}}var Py={setItem:sn,getItem:Mr,removeItem:Iy};function Ey(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function vd(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 hd(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?vd(Object(t),!0).forEach(function(n){Ey(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vd(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ry(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r={storage:Py};return py(hd(hd({},r),e))}function Ty(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(...u){const c=u[2]?.toString()||"",l=Cy(c);return a!==l&&(a=l,setTimeout(()=>e(c),0)),s.apply(t,u)}})}function Oy(e,r){const t=e.indexOf(r);return t>-1?e.slice(0,t):e}function Cy(e){return["#","?"].forEach(r=>e=Oy(e,r)),e}function _y(){Ty(()=>{lr.page()})}var $o="up",Uo="down";function Ay(e){if(e===void 0&&(e={}),!_e)return Ho;var r=md(),t=Ko(),n=pd(),a=Yt(n,r),i=Yt(t,r),o=[],s=[],u=[],c=n,l=a,f=i,v=Object.keys(e);if(!v.length)return Ho;var d=v.map(function(p){return Number(p)}),h=Gg(function(){var p=md(),S=(function(L,M){return M.map(function(N){return N===100?L-5:L*(N/100)})})(p,d),R=Ko(),I=pd(),g=Yt(I,p),b=Yt(R,p);if(l=g>l?g:l,f=b<f?b:f,!(o.length>=d.length)){var y=c===I,A=$o;y?A="initial":c<=I&&(A=Uo);var q=S,j=d;(A===$o||y)&&(q=S.slice().reverse(),j=d.slice().reverse());var G=j.reduce(function(L,M,N){var m=q[N];return u.includes(M)&&I<=m&&(u=u.filter(function(C){return C!==M}),L.singleFunction=M),A===Uo&&!o.includes(M)&&I>=m&&M>i?(s.push(M),L.callbacks=L.callbacks.concat(M),L):A===$o&&!o.includes(M)&&I<=m&&M<=g?(L.foundFunc=[M],L):(y&&I>=m&&L.foundFunc.length===0&&(L.foundFunc=[M]),!s.includes(M)&&I>=m&&(s.push(M),L.singleFunction?u.push(M):L.singleFunction=M),L)},{foundFunc:[],singleFunction:null,callbacks:[],direction:A});if(c=I,A===Uo&&G.callbacks&&G.callbacks.forEach(function(L){Be(e[L])&&(e[L]({trigger:L,direction:A,scrollMin:f,scrollMax:l,range:[f,l]}),o.push(L))}),G.singleFunction){var K=G.singleFunction,re=G.direction;Be(e[K])&&e[K]({trigger:K,direction:re,scrollMin:f,scrollMax:l,range:[f,l]}),o.push(K)}}},500);return window.addEventListener("scroll",h),function(){return window.removeEventListener("scroll",h)}}function Ko(){return _e?document.body.scrollTop||document.documentElement.scrollTop:0}function ky(){return _e?window.innerHeight||document.documentElement.clientHeight:0}function pd(){return Math.round(Ko()+ky())}function md(){if(!_e)return 0;var e=document.body,r=document.documentElement;return Math.max(e.scrollHeight,e.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight)}function Yt(e,r){return Math.round(e/r*100)}var $s="Event",gd=$s+"Listener";function qy(e){return function(r,t,n,a){var i=n||Ho,o=a||!1;if(!_e)return i;var s=un(t),u=un(r,!0);if(!u.length)throw new Error("noElements");if(!s.length)throw new Error("no"+$s);var c=[];return(function l(f){f&&(c=[]);for(var v=f?"add"+gd:"remove"+gd,d=0;d<u.length;d++){var h=u[d];c[d]=f?o&&o.once?$y(i):i:c[d]||i;for(var p=0;p<s.length;p++)h[v]?h["on"+s[p]]=f?c[d]:null:h[v](s[p],c[d],o)}return l.bind(null,!f)})(e)}}function un(e,r){if(Tr(e))return r?un(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=Dg(e);return r?i.map(function(o){return Tr(o)?un(o,!0):o}).flat():i}function $y(e,r){var t;return function(){return e&&(t=e.apply(this,arguments),e=null),t}}var Lo=qy($s);function Ih(e,r){return _e&&Be(window[e])?(t=window[e],n=r,(a=window)===void 0&&(a=null),Be(t)?function(){t.apply(a,arguments),n.apply(a,arguments)}:n):window[e]=r;var t,n,a}Ih.bind(null,"onerror");Ih.bind(null,"onload");var Ph=typeof window>"u",yd="hidden";function Uy(e){if(Ph)return!1;var r=Ly(),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 Ly(){var e=["webkit","moz","ms","o"];return Ph||yd in document?yd:e.reduce(function(r,t){var n=t+"Hidden";return!r&&n in document?n:r},null)}var xy=["mousemove","mousedown","touchmove","touchstart","touchend","keydown"];function Ny(e,r){r===void 0&&(r={});var t=(function(o,s){var u=this,c=!1;return function(l){c||(o.call(u,l),c=!0,setTimeout(function(){return c=!1},s))}})(e,r.throttle||1e4),n=[];function a(){var o=Uy(function(s){s||t({type:"tabVisible"})});return n=[o].concat(xy.map(function(s){return Lo(document,s,t)})).concat(Lo(window,"load",t)).concat(Lo(window,"scroll",t,{capture:!0,passive:!0})),i}function i(){n.map(function(o){return o()})}return a(),function(){return i(),a}}function jy(e){var r,t,n=e.onIdle,a=e.onWakeUp,i=e.onHeartbeat,o=e.timeout,s=o,u=e.throttle,c=u===void 0?2e3:u,l=!1,f=!1,v=new Date,d=function(){return clearTimeout(r)};function h(S){d(),i&&!l&&i(Pt(v),S),a&&l&&(l=!1,a(Pt(t),S),v=new Date),r=setTimeout(function(){l=!0,n&&(t=new Date,n(Pt(v),S))},s)}var p=Ny(h,{throttle:c});return{disable:function(){f=!0,l=!1,d();var S=p();return function(){return f=!1,v=new Date,h({type:"load"}),S()}},getStatus:function(){return{isIdle:l,isDisabled:f,active:l?0:Pt(v,f),idle:l?Pt(t,f):0}}}}function Pt(e,r){return r?0:Math.round((new Date-e)/1e3)}const bd=5e3;class Dy{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),jy({onIdle:t=>this.handleAwake(!1,t),onWakeUp:t=>this.handleAwake(!0,t),timeout:bd}),Ay({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*bd: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 Eh(e){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()}function My(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(u){return n=a.push(u),n>=i&&o(),n},size:function(){return a.length},end:function(u){u&&o(),clearInterval(t)}}}const wd="sesamy_session_id";function Fy(){let e=sessionStorage.getItem(wd);return e||(e=Math.random().toString(36).slice(2,9),sessionStorage.setItem(wd,e)),e}let Rh=!1,Zt,cn,Jo;function Th(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:Jo,requestId:Math.random().toString(36).slice(2,9),sessionId:Fy(),timestamp:new Date().toISOString(),version:Ft,event:r.event,context:{...r.context,page:{url:window.location.href,title:document.title,referrer:document.referrer,itemSrc:ge("sesamy:item-src"),publisherContentId:ge("sesamy:publisher-content-id")},campaign:t,locale:navigator.language,library:Es,userAgent:navigator.userAgent,clientId:Jo}}}))}const Oh=My(async e=>{if(e.length>0){const r=Th(e);Rh?navigator.sendBeacon(cn,r):(await fetch(cn,{method:"POST",body:r,headers:{"Content-Type":"text/plain"}})).ok}},{max:10,interval:3e3});function xo(e){if(e.anonymousId)if(e.properties?.flushing){const r={...e};delete r.properties.flushing,navigator.sendBeacon(cn,Th([r]))}else Oh.push(e)}function By(){return Rh=!0,Oh.flush()}function Hy(e,r,t){Zt=r,cn=`${ir("logs",t)}/events`,Jo=e}const Gy={name:"custom-analytics-plugin",page:({payload:e})=>{if(!Zt)return;const{properties:r,anonymousId:t,userId:n,event:a}=e;xo({anonymousId:t,userId:n,properties:r,event:a,type:"page"})},track:({payload:e})=>{if(!Zt)return;const{properties:r,anonymousId:t,userId:n,event:a}=e;xo({anonymousId:t,userId:n,properties:r,event:a,type:"track"})},identify:({payload:e})=>{if(!Zt)return;const{properties:r,anonymousId:t,userId:n}=e;xo({anonymousId:t,userId:n,properties:r,type:"identify"})}},Sd=["source","medium","campaign","term","content"],Er="utm_",Wy=1800*1e3;function Ch(e){return e?Date.now()-parseInt(e,10)>Wy:!0}function Id(){const e=document.referrer||"";if(!e)return;const r=Mr(`${Er}set_at`);(Ch(r)||!Mr(`${Er}referrer`))&&sn(`${Er}referrer`,e)}function Vy(){const e=()=>{const t={};for(const a of Sd){const i=Mr(`${Er}${a}`);i&&(t[`utm_${a}`]=i)}const n=Mr(`${Er}referrer`);return n&&(t.utm_referrer=n),t};return{name:"attribution-tracking",initialize(){Id()},campaign({payload:t}){const n=t?.campaign||{},a=Mr(`${Er}set_at`);if(Object.keys(n).length>0&&Ch(a)){for(const o of Sd){const s=n[o];s&&sn(`${Er}${o}`,s)}sn(`${Er}set_at`,String(Date.now()))}Id()},page({payload:t}){return t.properties.campaign=e(),t},track({payload:t}){return t.properties.campaign=e(),t},getStoredCampaignData:e}}const zy=Vy(),Pd=new Map,Ed=new Map;function Ky({clientId:e,enabled:r=!0,environment:t}){Hy(e,r,t),r&&(window.addEventListener("beforeunload",()=>{Ed.forEach((n,a)=>{n.bind(a)()}),By()}),window.addEventListener("visibilitychange",()=>{document.visibilityState!=="visible"&&Pd.forEach((n,a)=>{n.bind(a)()})}),_y(),Eh(()=>{const n=new Dy({element:document.body,viewCallback:()=>{lr.page()},activeDurationCallback:(a,i,o)=>{lr.track("activeDuration",{duration:a,durationStart:o,flushing:i})},idleDurationCallback:(a,i,o)=>{lr.track("idleDuration",{duration:a,durationStart:o,flushing:i})},scrollCallback:a=>{lr.track("scroll",{scroll:a.scrollMax})}});Ed.set(document.body,()=>{n.flush()}),Pd.set(document.body,()=>{n.handleVisibilityChange()})}),window.addEventListener(er.AUTHENTICATED,async n=>{const a=n;await lr.identify(a.detail.sub)}),window.addEventListener(er.LOGOUT,async()=>{await lr.track("logout",{}),await lr.reset()}))}const lr=Ry({app:Es,version:Ft,plugins:[zy,Gy]});function _h(e,r){lr.track(e,r)}const Jy=["AdHeader","AdContainer","AD_Top","homead","ad-lead"];function Ah(){return new Promise(e=>{const r=Jy.map(t=>{const n=document.createElement("div");return n.innerHTML=" ",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 kh(){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}}/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Hs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Gs={},Nn,Ws;function Ae(){return Ws||(Ws=1,Nn=function(e){try{return!!e()}catch{return!0}}),Nn}var jn,Vs;function dn(){if(Vs)return jn;Vs=1;var e=Ae();return jn=!e(function(){var r=(function(){}).bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),jn}var Dn,zs;function pe(){if(zs)return Dn;zs=1;var e=dn(),r=Function.prototype,t=r.call,n=e&&r.bind.bind(t,t);return Dn=e?n:function(a){return function(){return t.apply(a,arguments)}},Dn}var Mn,Ks;function vn(){if(Ks)return Mn;Ks=1;var e=pe(),r=e({}.toString),t=e("".slice);return Mn=function(n){return t(r(n),8,-1)},Mn}var Fn,Js;function Fd(){if(Js)return Fn;Js=1;var e=pe(),r=Ae(),t=vn(),n=Object,a=e("".split);return Fn=r(function(){return!n("z").propertyIsEnumerable(0)})?function(i){return t(i)==="String"?a(i,""):n(i)}:n,Fn}var Bn,Ys;function hn(){return Ys||(Ys=1,Bn=function(e){return e==null}),Bn}var Hn,Qs;function pn(){if(Qs)return Hn;Qs=1;var e=hn(),r=TypeError;return Hn=function(t){if(e(t))throw new r("Can't call method on "+t);return t},Hn}var Gn,Xs;function Ut(){if(Xs)return Gn;Xs=1;var e=Fd(),r=pn();return Gn=function(t){return e(r(t))},Gn}var wt,Zs;function me(){if(Zs)return wt;Zs=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 Hs=="object"&&Hs)||e(typeof wt=="object"&&wt)||(function(){return this})()||Function("return this")(),wt}var Wn={exports:{}},Vn,eu;function sr(){return eu||(eu=1,Vn=!1),Vn}var zn,ru;function as(){if(ru)return zn;ru=1;var e=me(),r=Object.defineProperty;return zn=function(t,n){try{r(e,t,{value:n,configurable:!0,writable:!0})}catch{e[t]=n}return n},zn}var tu;function is(){if(tu)return Wn.exports;tu=1;var e=sr(),r=me(),t=as(),n="__core-js_shared__",a=Wn.exports=r[n]||t(n,{});return(a.versions||(a.versions=[])).push({version:"3.46.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Wn.exports}var Kn,nu;function Bd(){if(nu)return Kn;nu=1;var e=is();return Kn=function(r,t){return e[r]||(e[r]=t||{})},Kn}var Jn,au;function mn(){if(au)return Jn;au=1;var e=pn(),r=Object;return Jn=function(t){return r(e(t))},Jn}var Yn,iu;function ze(){if(iu)return Yn;iu=1;var e=pe(),r=mn(),t=e({}.hasOwnProperty);return Yn=Object.hasOwn||function(a,i){return t(r(a),i)},Yn}var Qn,ou;function Hd(){if(ou)return Qn;ou=1;var e=pe(),r=0,t=Math.random(),n=e(1.1.toString);return Qn=function(a){return"Symbol("+(a===void 0?"":a)+")_"+n(++r+t,36)},Qn}var Xn,su;function Lt(){if(su)return Xn;su=1;var e=me(),r=e.navigator,t=r&&r.userAgent;return Xn=t?String(t):"",Xn}var Zn,uu;function Gd(){if(uu)return Zn;uu=1;var e=me(),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]))),Zn=s,Zn}var ea,cu;function Wd(){if(cu)return ea;cu=1;var e=Gd(),r=Ae(),t=me(),n=t.String;return ea=!!Object.getOwnPropertySymbols&&!r(function(){var a=Symbol("symbol detection");return!n(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&e&&e<41}),ea}var ra,lu;function Vd(){if(lu)return ra;lu=1;var e=Wd();return ra=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ra}var ta,fu;function ke(){if(fu)return ta;fu=1;var e=me(),r=Bd(),t=ze(),n=Hd(),a=Wd(),i=Vd(),o=e.Symbol,s=r("wks"),u=i?o.for||o:o&&o.withoutSetter||n;return ta=function(c){return t(s,c)||(s[c]=a&&t(o,c)?o[c]:u("Symbol."+c)),s[c]},ta}var na,du;function we(){if(du)return na;du=1;var e=typeof document=="object"&&document.all;return na=typeof e>"u"&&e!==void 0?function(r){return typeof r=="function"||r===e}:function(r){return typeof r=="function"},na}var aa,vu;function Ke(){if(vu)return aa;vu=1;var e=we();return aa=function(r){return typeof r=="object"?r!==null:e(r)},aa}var ia,hu;function rr(){if(hu)return ia;hu=1;var e=Ke(),r=String,t=TypeError;return ia=function(n){if(e(n))return n;throw new t(r(n)+" is not an object")},ia}var oa={},sa,pu;function qe(){if(pu)return sa;pu=1;var e=Ae();return sa=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),sa}var ua,mu;function zd(){if(mu)return ua;mu=1;var e=qe(),r=Ae();return ua=e&&r(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),ua}var ca={},la,gu;function gn(){if(gu)return la;gu=1;var e=me(),r=Ke(),t=e.document,n=r(t)&&r(t.createElement);return la=function(a){return n?t.createElement(a):{}},la}var fa,yu;function Kd(){if(yu)return fa;yu=1;var e=qe(),r=Ae(),t=gn();return fa=!e&&!r(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),fa}var da,bu;function Le(){if(bu)return da;bu=1;var e=dn(),r=Function.prototype.call;return da=e?r.bind(r):function(){return r.apply(r,arguments)},da}var va,wu;function Je(){if(wu)return va;wu=1;var e=me(),r=we(),t=function(n){return r(n)?n:void 0};return va=function(n,a){return arguments.length<2?t(e[n]):e[n]&&e[n][a]},va}var ha,Su;function yn(){if(Su)return ha;Su=1;var e=pe();return ha=e({}.isPrototypeOf),ha}var pa,Iu;function Jd(){if(Iu)return pa;Iu=1;var e=Je(),r=we(),t=yn(),n=Vd(),a=Object;return pa=n?function(i){return typeof i=="symbol"}:function(i){var o=e("Symbol");return r(o)&&t(o.prototype,a(i))},pa}var ma,Pu;function bn(){if(Pu)return ma;Pu=1;var e=String;return ma=function(r){try{return e(r)}catch{return"Object"}},ma}var ga,Eu;function tr(){if(Eu)return ga;Eu=1;var e=we(),r=bn(),t=TypeError;return ga=function(n){if(e(n))return n;throw new t(r(n)+" is not a function")},ga}var ya,Ru;function os(){if(Ru)return ya;Ru=1;var e=tr(),r=hn();return ya=function(t,n){var a=t[n];return r(a)?void 0:e(a)},ya}var ba,Tu;function Fh(){if(Tu)return ba;Tu=1;var e=Le(),r=we(),t=Ke(),n=TypeError;return ba=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")},ba}var wa,Ou;function Bh(){if(Ou)return wa;Ou=1;var e=Le(),r=Ke(),t=Jd(),n=os(),a=Fh(),i=ke(),o=TypeError,s=i("toPrimitive");return wa=function(u,c){if(!r(u)||t(u))return u;var l=n(u,s),f;if(l){if(c===void 0&&(c="default"),f=e(l,u,c),!r(f)||t(f))return f;throw new o("Can't convert object to primitive value")}return c===void 0&&(c="number"),a(u,c)},wa}var Sa,Cu;function Yd(){if(Cu)return Sa;Cu=1;var e=Bh(),r=Jd();return Sa=function(t){var n=e(t,"string");return r(n)?n:n+""},Sa}var _u;function gr(){if(_u)return ca;_u=1;var e=qe(),r=Kd(),t=zd(),n=rr(),a=Yd(),i=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",c="configurable",l="writable";return ca.f=e?t?function(v,d,h){if(n(v),d=a(d),n(h),typeof v=="function"&&d==="prototype"&&"value"in h&&l in h&&!h[l]){var p=s(v,d);p&&p[l]&&(v[d]=h.value,h={configurable:c in h?h[c]:p[c],enumerable:u in h?h[u]:p[u],writable:!1})}return o(v,d,h)}:o:function(v,d,h){if(n(v),d=a(d),n(h),r)try{return o(v,d,h)}catch{}if("get"in h||"set"in h)throw new i("Accessors not supported");return"value"in h&&(v[d]=h.value),v},ca}var Ia,Au;function Hh(){if(Au)return Ia;Au=1;var e=Math.ceil,r=Math.floor;return Ia=Math.trunc||function(n){var a=+n;return(a>0?r:e)(a)},Ia}var Pa,ku;function ss(){if(ku)return Pa;ku=1;var e=Hh();return Pa=function(r){var t=+r;return t!==t||t===0?0:e(t)},Pa}var Ea,qu;function Qd(){if(qu)return Ea;qu=1;var e=ss(),r=Math.max,t=Math.min;return Ea=function(n,a){var i=e(n);return i<0?r(i+a,0):t(i,a)},Ea}var Ra,$u;function Gh(){if($u)return Ra;$u=1;var e=ss(),r=Math.min;return Ra=function(t){var n=e(t);return n>0?r(n,9007199254740991):0},Ra}var Ta,Uu;function us(){if(Uu)return Ta;Uu=1;var e=Gh();return Ta=function(r){return e(r.length)},Ta}var Oa,Lu;function Wh(){if(Lu)return Oa;Lu=1;var e=Ut(),r=Qd(),t=us(),n=function(a){return function(i,o,s){var u=e(i),c=t(u);if(c===0)return!a&&-1;var l=r(s,c),f;if(a&&o!==o){for(;c>l;)if(f=u[l++],f!==f)return!0}else for(;c>l;l++)if((a||l in u)&&u[l]===o)return a||l||0;return!a&&-1}};return Oa={includes:n(!0),indexOf:n(!1)},Oa}var Ca,xu;function cs(){return xu||(xu=1,Ca={}),Ca}var _a,Nu;function Xd(){if(Nu)return _a;Nu=1;var e=pe(),r=ze(),t=Ut(),n=Wh().indexOf,a=cs(),i=e([].push);return _a=function(o,s){var u=t(o),c=0,l=[],f;for(f in u)!r(a,f)&&r(u,f)&&i(l,f);for(;s.length>c;)r(u,f=s[c++])&&(~n(l,f)||i(l,f));return l},_a}var Aa,ju;function ls(){return ju||(ju=1,Aa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Aa}var ka,Du;function Zd(){if(Du)return ka;Du=1;var e=Xd(),r=ls();return ka=Object.keys||function(n){return e(n,r)},ka}var Mu;function Vh(){if(Mu)return oa;Mu=1;var e=qe(),r=zd(),t=gr(),n=rr(),a=Ut(),i=Zd();return oa.f=e&&!r?Object.defineProperties:function(s,u){n(s);for(var c=a(u),l=i(u),f=l.length,v=0,d;f>v;)t.f(s,d=l[v++],c[d]);return s},oa}var qa,Fu;function ev(){if(Fu)return qa;Fu=1;var e=Je();return qa=e("document","documentElement"),qa}var $a,Bu;function fs(){if(Bu)return $a;Bu=1;var e=Bd(),r=Hd(),t=e("keys");return $a=function(n){return t[n]||(t[n]=r(n))},$a}var Ua,Hu;function xt(){if(Hu)return Ua;Hu=1;var e=rr(),r=Vh(),t=ls(),n=cs(),a=ev(),i=gn(),o=fs(),s=">",u="<",c="prototype",l="script",f=o("IE_PROTO"),v=function(){},d=function(I){return u+l+s+I+u+"/"+l+s},h=function(I){I.write(d("")),I.close();var g=I.parentWindow.Object;return I=null,g},p=function(){var I=i("iframe"),g="java"+l+":",b;return I.style.display="none",a.appendChild(I),I.src=String(g),b=I.contentWindow.document,b.open(),b.write(d("document.F=Object")),b.close(),b.F},S,R=function(){try{S=new ActiveXObject("htmlfile")}catch{}R=typeof document<"u"?document.domain&&S?h(S):p():h(S);for(var I=t.length;I--;)delete R[c][t[I]];return R()};return n[f]=!0,Ua=Object.create||function(g,b){var y;return g!==null?(v[c]=e(g),y=new v,v[c]=null,y[f]=g):y=R(),b===void 0?y:r.f(y,b)},Ua}var La,Gu;function zh(){if(Gu)return La;Gu=1;var e=ke(),r=xt(),t=gr().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 xa,Wu;function Nt(){return Wu||(Wu=1,xa={}),xa}var Na,Vu;function Kh(){if(Vu)return Na;Vu=1;var e=me(),r=we(),t=e.WeakMap;return Na=r(t)&&/native code/.test(String(t)),Na}var ja,zu;function Gr(){return zu||(zu=1,ja=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}),ja}var Da,Ku;function Wr(){if(Ku)return Da;Ku=1;var e=qe(),r=gr(),t=Gr();return Da=e?function(n,a,i){return r.f(n,a,t(1,i))}:function(n,a,i){return n[a]=i,n},Da}var Ma,Ju;function ft(){if(Ju)return Ma;Ju=1;var e=Kh(),r=me(),t=Ke(),n=Wr(),a=ze(),i=is(),o=fs(),s=cs(),u="Object already initialized",c=r.TypeError,l=r.WeakMap,f,v,d,h=function(I){return d(I)?v(I):f(I,{})},p=function(I){return function(g){var b;if(!t(g)||(b=v(g)).type!==I)throw new c("Incompatible receiver, "+I+" required");return b}};if(e||i.state){var S=i.state||(i.state=new l);S.get=S.get,S.has=S.has,S.set=S.set,f=function(I,g){if(S.has(I))throw new c(u);return g.facade=I,S.set(I,g),g},v=function(I){return S.get(I)||{}},d=function(I){return S.has(I)}}else{var R=o("state");s[R]=!0,f=function(I,g){if(a(I,R))throw new c(u);return g.facade=I,n(I,R,g),g},v=function(I){return a(I,R)?I[R]:{}},d=function(I){return a(I,R)}}return Ma={set:f,get:v,has:d,enforce:h,getterFor:p},Ma}var Fa={},Ba={},Yu;function rv(){if(Yu)return Ba;Yu=1;var e={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,t=r&&!e.call({1:2},1);return Ba.f=t?function(a){var i=r(this,a);return!!i&&i.enumerable}:e,Ba}var Qu;function tv(){if(Qu)return Fa;Qu=1;var e=qe(),r=Le(),t=rv(),n=Gr(),a=Ut(),i=Yd(),o=ze(),s=Kd(),u=Object.getOwnPropertyDescriptor;return Fa.f=e?u:function(l,f){if(l=a(l),f=i(f),s)try{return u(l,f)}catch{}if(o(l,f))return n(!r(t.f,l,f),l[f])},Fa}var Ha={exports:{}},Ga,Xu;function nv(){if(Xu)return Ga;Xu=1;var e=qe(),r=ze(),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 Ga={EXISTS:a,PROPER:i,CONFIGURABLE:o},Ga}var Wa,Zu;function ds(){if(Zu)return Wa;Zu=1;var e=pe(),r=we(),t=is(),n=e(Function.toString);return r(t.inspectSource)||(t.inspectSource=function(a){return n(a)}),Wa=t.inspectSource,Wa}var ec;function av(){if(ec)return Ha.exports;ec=1;var e=pe(),r=Ae(),t=we(),n=ze(),a=qe(),i=nv().CONFIGURABLE,o=ds(),s=ft(),u=s.enforce,c=s.get,l=String,f=Object.defineProperty,v=e("".slice),d=e("".replace),h=e([].join),p=a&&!r(function(){return f(function(){},"length",{value:8}).length!==8}),S=String(String).split("String"),R=Ha.exports=function(I,g,b){v(l(g),0,7)==="Symbol("&&(g="["+d(l(g),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),b&&b.getter&&(g="get "+g),b&&b.setter&&(g="set "+g),(!n(I,"name")||i&&I.name!==g)&&(a?f(I,"name",{value:g,configurable:!0}):I.name=g),p&&b&&n(b,"arity")&&I.length!==b.arity&&f(I,"length",{value:b.arity});try{b&&n(b,"constructor")&&b.constructor?a&&f(I,"prototype",{writable:!1}):I.prototype&&(I.prototype=void 0)}catch{}var y=u(I);return n(y,"source")||(y.source=h(S,typeof g=="string"?g:"")),I};return Function.prototype.toString=R(function(){return t(this)&&c(this).source||o(this)},"toString"),Ha.exports}var Va,rc;function Ye(){if(rc)return Va;rc=1;var e=we(),r=gr(),t=av(),n=as();return Va=function(a,i,o,s){s||(s={});var u=s.enumerable,c=s.name!==void 0?s.name:i;if(e(o)&&t(o,c,s),s.global)u?a[i]=o:n(i,o);else{try{s.unsafe?a[i]&&(u=!0):delete a[i]}catch{}u?a[i]=o:r.f(a,i,{value:o,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return a},Va}var za={},tc;function Jh(){if(tc)return za;tc=1;var e=Xd(),r=ls(),t=r.concat("length","prototype");return za.f=Object.getOwnPropertyNames||function(a){return e(a,t)},za}var Ka={},nc;function iv(){return nc||(nc=1,Ka.f=Object.getOwnPropertySymbols),Ka}var Ja,ac;function Yh(){if(ac)return Ja;ac=1;var e=Je(),r=pe(),t=Jh(),n=iv(),a=rr(),i=r([].concat);return Ja=e("Reflect","ownKeys")||function(s){var u=t.f(a(s)),c=n.f;return c?i(u,c(s)):u},Ja}var Ya,ic;function ov(){if(ic)return Ya;ic=1;var e=ze(),r=Yh(),t=tv(),n=gr();return Ya=function(a,i,o){for(var s=r(i),u=n.f,c=t.f,l=0;l<s.length;l++){var f=s[l];!e(a,f)&&!(o&&e(o,f))&&u(a,f,c(i,f))}},Ya}var Qa,oc;function sv(){if(oc)return Qa;oc=1;var e=Ae(),r=we(),t=/#|\.prototype\./,n=function(u,c){var l=i[a(u)];return l===s?!0:l===o?!1:r(c)?e(c):!!c},a=n.normalize=function(u){return String(u).replace(t,".").toLowerCase()},i=n.data={},o=n.NATIVE="N",s=n.POLYFILL="P";return Qa=n,Qa}var Xa,sc;function Pe(){if(sc)return Xa;sc=1;var e=me(),r=tv().f,t=Wr(),n=Ye(),a=as(),i=ov(),o=sv();return Xa=function(s,u){var c=s.target,l=s.global,f=s.stat,v,d,h,p,S,R;if(l?d=e:f?d=e[c]||a(c,{}):d=e[c]&&e[c].prototype,d)for(h in u){if(S=u[h],s.dontCallGetSet?(R=r(d,h),p=R&&R.value):p=d[h],v=o(l?h:c+(f?".":"#")+h,s.forced),!v&&p!==void 0){if(typeof S==typeof p)continue;i(S,p)}(s.sham||p&&p.sham)&&t(S,"sham",!0),n(d,h,S,s)}},Xa}var Za,uc;function Qh(){if(uc)return Za;uc=1;var e=Ae();return Za=!e(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),Za}var ei,cc;function vs(){if(cc)return ei;cc=1;var e=ze(),r=we(),t=mn(),n=fs(),a=Qh(),i=n("IE_PROTO"),o=Object,s=o.prototype;return ei=a?o.getPrototypeOf:function(u){var c=t(u);if(e(c,i))return c[i];var l=c.constructor;return r(l)&&c instanceof l?l.prototype:c instanceof o?s:null},ei}var ri,lc;function uv(){if(lc)return ri;lc=1;var e=Ae(),r=we(),t=Ke(),n=xt(),a=vs(),i=Ye(),o=ke(),s=sr(),u=o("iterator"),c=!1,l,f,v;[].keys&&(v=[].keys(),"next"in v?(f=a(a(v)),f!==Object.prototype&&(l=f)):c=!0);var d=!t(l)||e(function(){var h={};return l[u].call(h)!==h});return d?l={}:s&&(l=n(l)),r(l[u])||i(l,u,function(){return this}),ri={IteratorPrototype:l,BUGGY_SAFARI_ITERATORS:c},ri}var ti,fc;function dt(){if(fc)return ti;fc=1;var e=gr().f,r=ze(),t=ke(),n=t("toStringTag");return ti=function(a,i,o){a&&!o&&(a=a.prototype),a&&!r(a,n)&&e(a,n,{configurable:!0,value:i})},ti}var ni,dc;function cv(){if(dc)return ni;dc=1;var e=uv().IteratorPrototype,r=xt(),t=Gr(),n=dt(),a=Nt(),i=function(){return this};return ni=function(o,s,u,c){var l=s+" Iterator";return o.prototype=r(e,{next:t(+!c,u)}),n(o,l,!1,!0),a[l]=i,o},ni}var ai,vc;function Xh(){if(vc)return ai;vc=1;var e=pe(),r=tr();return ai=function(t,n,a){try{return e(r(Object.getOwnPropertyDescriptor(t,n)[a]))}catch{}},ai}var ii,hc;function Zh(){if(hc)return ii;hc=1;var e=Ke();return ii=function(r){return e(r)||r===null},ii}var oi,pc;function ep(){if(pc)return oi;pc=1;var e=Zh(),r=String,t=TypeError;return oi=function(n){if(e(n))return n;throw new t("Can't set "+r(n)+" as a prototype")},oi}var si,mc;function hs(){if(mc)return si;mc=1;var e=Xh(),r=Ke(),t=pn(),n=ep();return si=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(u,c){return t(u),n(c),r(u)&&(a?o(u,c):u.__proto__=c),u}})():void 0),si}var ui,gc;function lv(){if(gc)return ui;gc=1;var e=Pe(),r=Le(),t=sr(),n=nv(),a=we(),i=cv(),o=vs(),s=hs(),u=dt(),c=Wr(),l=Ye(),f=ke(),v=Nt(),d=uv(),h=n.PROPER,p=n.CONFIGURABLE,S=d.IteratorPrototype,R=d.BUGGY_SAFARI_ITERATORS,I=f("iterator"),g="keys",b="values",y="entries",A=function(){return this};return ui=function($,j,G,K,re,x,M){i(G,j,K);var N=function(Y){if(Y===re&&w)return w;if(!R&&Y&&Y in L)return L[Y];switch(Y){case g:return function(){return new G(this,Y)};case b:return function(){return new G(this,Y)};case y:return function(){return new G(this,Y)}}return function(){return new G(this)}},m=j+" Iterator",C=!1,L=$.prototype,F=L[I]||L["@@iterator"]||re&&L[re],w=!R&&F||N(re),T=j==="Array"&&L.entries||F,k,H,J;if(T&&(k=o(T.call(new $)),k!==Object.prototype&&k.next&&(!t&&o(k)!==S&&(s?s(k,S):a(k[I])||l(k,I,A)),u(k,m,!0,!0),t&&(v[m]=A))),h&&re===b&&F&&F.name!==b&&(!t&&p?c(L,"name",b):(C=!0,w=function(){return r(F,this)})),re)if(H={values:N(b),keys:x?w:N(g),entries:N(y)},M)for(J in H)(R||C||!(J in L))&&l(L,J,H[J]);else e({target:j,proto:!0,forced:R||C},H);return(!t||M)&&L[I]!==w&&l(L,I,w,{name:re}),v[j]=w,H},ui}var ci,yc;function ps(){return yc||(yc=1,ci=function(e,r){return{value:e,done:r}}),ci}var li,bc;function ms(){if(bc)return li;bc=1;var e=Ut(),r=zh(),t=Nt(),n=ft(),a=gr().f,i=lv(),o=ps(),s=sr(),u=qe(),c="Array Iterator",l=n.set,f=n.getterFor(c);li=i(Array,"Array",function(d,h){l(this,{type:c,target:e(d),index:0,kind:h})},function(){var d=f(this),h=d.target,p=d.index++;if(!h||p>=h.length)return d.target=null,o(void 0,!0);switch(d.kind){case"keys":return o(p,!1);case"values":return o(h[p],!1)}return o([p,h[p]],!1)},"values");var v=t.Arguments=t.Array;if(r("keys"),r("values"),r("entries"),!s&&u&&v.name!=="values")try{a(v,"name",{value:"values"})}catch{}return li}var wc={},Sc;function rp(){if(Sc)return wc;Sc=1;var e=Pe(),r=pe(),t=Qd(),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(c){for(var l=[],f=arguments.length,v=0,d;f>v;){if(d=+arguments[v++],t(d,1114111)!==d)throw new n(d+" is not a valid code point");l[v]=d<65536?a(d):a(((d-=65536)>>10)+55296,d%1024+56320)}return o(l,"")}}),wc}var fi,Ic;function fv(){if(Ic)return fi;Ic=1;var e=me(),r=qe(),t=Object.getOwnPropertyDescriptor;return fi=function(n){if(!r)return e[n];var a=t(e,n);return a&&a.value},fi}var di,Pc;function wn(){if(Pc)return di;Pc=1;var e=Ae(),r=ke(),t=qe(),n=sr(),a=r("iterator");return di=!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"),u="";return i.pathname="c%20d",o.forEach(function(c,l){o.delete("b"),u+=l+c}),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"||u!=="a1c3"||new URL("https://x",void 0).host!=="x"}),di}var vi,Ec;function Sn(){if(Ec)return vi;Ec=1;var e=av(),r=gr();return vi=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)},vi}var hi,Rc;function tp(){if(Rc)return hi;Rc=1;var e=Ye();return hi=function(r,t,n){for(var a in t)e(r,a,t[a],n);return r},hi}var pi,Tc;function gs(){if(Tc)return pi;Tc=1;var e=yn(),r=TypeError;return pi=function(t,n){if(e(n,t))return t;throw new r("Incorrect invocation")},pi}var mi,Oc;function np(){if(Oc)return mi;Oc=1;var e=vn(),r=pe();return mi=function(t){if(e(t)==="Function")return r(t)},mi}var gi,Cc;function vt(){if(Cc)return gi;Cc=1;var e=np(),r=tr(),t=dn(),n=e(e.bind);return gi=function(a,i){return r(a),i===void 0?a:t?n(a,i):function(){return a.apply(i,arguments)}},gi}var yi,_c;function ys(){if(_c)return yi;_c=1;var e=ke(),r=e("toStringTag"),t={};return t[r]="z",yi=String(t)==="[object z]",yi}var bi,Ac;function jt(){if(Ac)return bi;Ac=1;var e=ys(),r=we(),t=vn(),n=ke(),a=n("toStringTag"),i=Object,o=t((function(){return arguments})())==="Arguments",s=function(u,c){try{return u[c]}catch{}};return bi=e?t:function(u){var c,l,f;return u===void 0?"Undefined":u===null?"Null":typeof(l=s(c=i(u),a))=="string"?l:o?t(c):(f=t(c))==="Object"&&r(c.callee)?"Arguments":f},bi}var wi,kc;function yr(){if(kc)return wi;kc=1;var e=jt(),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 Si,qc;function In(){if(qc)return Si;qc=1;var e=jt(),r=os(),t=hn(),n=Nt(),a=ke(),i=a("iterator");return Si=function(o){if(!t(o))return r(o,i)||r(o,"@@iterator")||n[e(o)]},Si}var Ii,$c;function bs(){if($c)return Ii;$c=1;var e=Le(),r=tr(),t=rr(),n=bn(),a=In(),i=TypeError;return Ii=function(o,s){var u=arguments.length<2?a(o):s;if(r(u))return t(e(u,o));throw new i(n(o)+" is not iterable")},Ii}var Pi,Uc;function Vr(){if(Uc)return Pi;Uc=1;var e=TypeError;return Pi=function(r,t){if(r<t)throw new e("Not enough arguments");return r},Pi}var Ei,Lc;function Pn(){if(Lc)return Ei;Lc=1;var e=pe();return Ei=e([].slice),Ei}var Ri,xc;function ap(){if(xc)return Ri;xc=1;var e=Pn(),r=Math.floor,t=function(n,a){var i=n.length;if(i<8)for(var o=1,s,u;o<i;){for(u=o,s=n[o];u&&a(n[u-1],s)>0;)n[u]=n[--u];u!==o++&&(n[u]=s)}else for(var c=r(i/2),l=t(e(n,0,c),a),f=t(e(n,c),a),v=l.length,d=f.length,h=0,p=0;h<v||p<d;)n[h+p]=h<v&&p<d?a(l[h],f[p])<=0?l[h++]:f[p++]:h<v?l[h++]:f[p++];return n};return Ri=t,Ri}var Ti,Nc;function dv(){if(Nc)return Ti;Nc=1,ms(),rp();var e=Pe(),r=me(),t=fv(),n=Je(),a=Le(),i=pe(),o=qe(),s=wn(),u=Ye(),c=Sn(),l=tp(),f=dt(),v=cv(),d=ft(),h=gs(),p=we(),S=ze(),R=vt(),I=jt(),g=rr(),b=Ke(),y=yr(),A=xt(),$=Gr(),j=bs(),G=In(),K=ps(),re=Vr(),x=ke(),M=ap(),N=x("iterator"),m="URLSearchParams",C=m+"Iterator",L=d.set,F=d.getterFor(m),w=d.getterFor(C),T=t("fetch"),k=t("Request"),H=t("Headers"),J=k&&k.prototype,Y=H&&H.prototype,le=r.TypeError,ne=r.encodeURIComponent,ue=String.fromCharCode,ae=n("String","fromCodePoint"),Re=parseInt,xe=i("".charAt),je=i([].join),$e=i([].push),Qe=i("".replace),wr=i([].shift),Sr=i([].splice),_r=i("".split),Ar=i("".slice),yt=i(/./.exec),zr=/\+/g,kr="�",ye=/^[0-9a-f]+$/i,Xe=function(D,V){var z=Ar(D,V,V+2);return yt(ye,z)?Re(z,16):NaN},qr=function(D){for(var V=0,z=128;z>0&&(D&z)!==0;z>>=1)V++;return V},B=function(D){var V=null;switch(D.length){case 1:V=D[0];break;case 2:V=(D[0]&31)<<6|D[1]&63;break;case 3:V=(D[0]&15)<<12|(D[1]&63)<<6|D[2]&63;break;case 4:V=(D[0]&7)<<18|(D[1]&63)<<12|(D[2]&63)<<6|D[3]&63;break}return V>1114111?null:V},X=function(D){D=Qe(D,zr," ");for(var V=D.length,z="",Q=0;Q<V;){var ie=xe(D,Q);if(ie==="%"){if(xe(D,Q+1)==="%"||Q+3>V){z+="%",Q++;continue}var se=Xe(D,Q+1);if(se!==se){z+=ie,Q++;continue}Q+=2;var ve=qr(se);if(ve===0)ie=ue(se);else{if(ve===1||ve>4){z+=kr,Q++;continue}for(var he=[se],Se=1;Se<ve&&(Q++,!(Q+3>V||xe(D,Q)!=="%"));){var Ue=Xe(D,Q+1);if(Ue!==Ue){Q+=3;break}if(Ue>191||Ue<128)break;$e(he,Ue),Q+=2,Se++}if(he.length!==ve){z+=kr;continue}var nr=B(he);nr===null?z+=kr:ie=ae(nr)}}z+=ie,Q++}return z},oe=/[!'()~]|%20/g,ce={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},fe=function(D){return ce[D]},He=function(D){return Qe(ne(D),oe,fe)},Te=v(function(V,z){L(this,{type:C,target:F(V).entries,index:0,kind:z})},m,function(){var V=w(this),z=V.target,Q=V.index++;if(!z||Q>=z.length)return V.target=null,K(void 0,!0);var ie=z[Q];switch(V.kind){case"keys":return K(ie.key,!1);case"values":return K(ie.value,!1)}return K([ie.key,ie.value],!1)},!0),De=function(D){this.entries=[],this.url=null,D!==void 0&&(b(D)?this.parseObject(D):this.parseQuery(typeof D=="string"?xe(D,0)==="?"?Ar(D,1):D:y(D)))};De.prototype={type:m,bindURL:function(D){this.url=D,this.update()},parseObject:function(D){var V=this.entries,z=G(D),Q,ie,se,ve,he,Se,Ue;if(z)for(Q=j(D,z),ie=Q.next;!(se=a(ie,Q)).done;){if(ve=j(g(se.value)),he=ve.next,(Se=a(he,ve)).done||(Ue=a(he,ve)).done||!a(he,ve).done)throw new le("Expected sequence with length 2");$e(V,{key:y(Se.value),value:y(Ue.value)})}else for(var nr in D)S(D,nr)&&$e(V,{key:nr,value:y(D[nr])})},parseQuery:function(D){if(D)for(var V=this.entries,z=_r(D,"&"),Q=0,ie,se;Q<z.length;)ie=z[Q++],ie.length&&(se=_r(ie,"="),$e(V,{key:X(wr(se)),value:X(je(se,"="))}))},serialize:function(){for(var D=this.entries,V=[],z=0,Q;z<D.length;)Q=D[z++],$e(V,He(Q.key)+"="+He(Q.value));return je(V,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Oe=function(){h(this,Ge);var V=arguments.length>0?arguments[0]:void 0,z=L(this,new De(V));o||(this.size=z.entries.length)},Ge=Oe.prototype;if(l(Ge,{append:function(V,z){var Q=F(this);re(arguments.length,2),$e(Q.entries,{key:y(V),value:y(z)}),o||this.length++,Q.updateURL()},delete:function(D){for(var V=F(this),z=re(arguments.length,1),Q=V.entries,ie=y(D),se=z<2?void 0:arguments[1],ve=se===void 0?se:y(se),he=0;he<Q.length;){var Se=Q[he];if(Se.key===ie&&(ve===void 0||Se.value===ve)){if(Sr(Q,he,1),ve!==void 0)break}else he++}o||(this.size=Q.length),V.updateURL()},get:function(V){var z=F(this).entries;re(arguments.length,1);for(var Q=y(V),ie=0;ie<z.length;ie++)if(z[ie].key===Q)return z[ie].value;return null},getAll:function(V){var z=F(this).entries;re(arguments.length,1);for(var Q=y(V),ie=[],se=0;se<z.length;se++)z[se].key===Q&&$e(ie,z[se].value);return ie},has:function(V){for(var z=F(this).entries,Q=re(arguments.length,1),ie=y(V),se=Q<2?void 0:arguments[1],ve=se===void 0?se:y(se),he=0;he<z.length;){var Se=z[he++];if(Se.key===ie&&(ve===void 0||Se.value===ve))return!0}return!1},set:function(V,z){var Q=F(this);re(arguments.length,1);for(var ie=Q.entries,se=!1,ve=y(V),he=y(z),Se=0,Ue;Se<ie.length;Se++)Ue=ie[Se],Ue.key===ve&&(se?Sr(ie,Se--,1):(se=!0,Ue.value=he));se||$e(ie,{key:ve,value:he}),o||(this.size=ie.length),Q.updateURL()},sort:function(){var V=F(this);M(V.entries,function(z,Q){return z.key>Q.key?1:-1}),V.updateURL()},forEach:function(V){for(var z=F(this).entries,Q=R(V,arguments.length>1?arguments[1]:void 0),ie=0,se;ie<z.length;)se=z[ie++],Q(se.value,se.key,this)},keys:function(){return new Te(this,"keys")},values:function(){return new Te(this,"values")},entries:function(){return new Te(this,"entries")}},{enumerable:!0}),u(Ge,N,Ge.entries,{name:"entries"}),u(Ge,"toString",function(){return F(this).serialize()},{enumerable:!0}),o&&c(Ge,"size",{get:function(){return F(this).entries.length},configurable:!0,enumerable:!0}),f(Oe,m),e({global:!0,constructor:!0,forced:!s},{URLSearchParams:Oe}),!s&&p(H)){var Kr=i(Y.has),bt=i(Y.set),Jr=function(D){if(b(D)){var V=D.body,z;if(I(V)===m)return z=D.headers?new H(D.headers):new H,Kr(z,"content-type")||bt(z,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),A(D,{body:$(0,y(V)),headers:$(0,z)})}return D};if(p(T)&&e({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(V){return T(V,arguments.length>1?Jr(arguments[1]):{})}}),p(k)){var Yr=function(V){return h(this,J),new k(V,arguments.length>1?Jr(arguments[1]):{})};J.constructor=Yr,Yr.prototype=J,e({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Yr})}}return Ti={URLSearchParams:Oe,getState:F},Ti}var jc;function ip(){return jc||(jc=1,dv()),Gs}var Dc={},Mc;function op(){if(Mc)return Dc;Mc=1;var e=Ye(),r=pe(),t=yr(),n=Vr(),a=URLSearchParams,i=a.prototype,o=r(i.append),s=r(i.delete),u=r(i.forEach),c=r([].push),l=new a("a=1&a=2&b=3");return l.delete("a",1),l.delete("b",void 0),l+""!="a=2"&&e(i,"delete",function(f){var v=arguments.length,d=v<2?void 0:arguments[1];if(v&&d===void 0)return s(this,f);var h=[];u(this,function(A,$){c(h,{key:$,value:A})}),n(v,1);for(var p=t(f),S=t(d),R=0,I=0,g=!1,b=h.length,y;R<b;)y=h[R++],g||y.key===p?(g=!0,s(this,y.key)):I++;for(;I<b;)y=h[I++],y.key===p&&y.value===S||o(this,y.key,y.value)},{enumerable:!0,unsafe:!0}),Dc}var Fc={},Bc;function sp(){if(Bc)return Fc;Bc=1;var e=Ye(),r=pe(),t=yr(),n=Vr(),a=URLSearchParams,i=a.prototype,o=r(i.getAll),s=r(i.has),u=new a("a=1");return(u.has("a",2)||!u.has("a",void 0))&&e(i,"has",function(l){var f=arguments.length,v=f<2?void 0:arguments[1];if(f&&v===void 0)return s(this,l);var d=o(this,l);n(f,1);for(var h=t(v),p=0;p<d.length;)if(d[p++]===h)return!0;return!1},{enumerable:!0,unsafe:!0}),Fc}var Hc={},Gc;function up(){if(Gc)return Hc;Gc=1;var e=qe(),r=pe(),t=Sn(),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}),Hc}var Oi,Wc;function En(){if(Wc)return Oi;Wc=1;var e=me();return Oi=e,Oi}var Ci,Vc;function vv(){if(Vc)return Ci;Vc=1,ip(),op(),sp(),up();var e=En();return Ci=e.URLSearchParams,Ci}var zc={},Kc={},Jc={},_i,Yc;function hv(){if(Yc)return _i;Yc=1;var e=pe(),r=ss(),t=yr(),n=pn(),a=e("".charAt),i=e("".charCodeAt),o=e("".slice),s=function(u){return function(c,l){var f=t(n(c)),v=r(l),d=f.length,h,p;return v<0||v>=d?u?"":void 0:(h=i(f,v),h<55296||h>56319||v+1===d||(p=i(f,v+1))<56320||p>57343?u?a(f,v):h:u?o(f,v,v+2):(h-55296<<10)+(p-56320)+65536)}};return _i={codeAt:s(!1),charAt:s(!0)},_i}var Qc;function pv(){if(Qc)return Jc;Qc=1;var e=hv().charAt,r=yr(),t=ft(),n=lv(),a=ps(),i="String Iterator",o=t.set,s=t.getterFor(i);return n(String,"String",function(u){o(this,{type:i,string:r(u),index:0})},function(){var c=s(this),l=c.string,f=c.index,v;return f>=l.length?a(void 0,!0):(v=e(l,f),c.index+=v.length,a(v,!1))}),Jc}var Ai,Xc;function cp(){if(Xc)return Ai;Xc=1;var e=qe(),r=pe(),t=Le(),n=Ae(),a=Zd(),i=iv(),o=rv(),s=mn(),u=Fd(),c=Object.assign,l=Object.defineProperty,f=r([].concat);return Ai=!c||n(function(){if(e&&c({b:1},c(l({},"a",{enumerable:!0,get:function(){l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var v={},d={},h=Symbol("assign detection"),p="abcdefghijklmnopqrst";return v[h]=7,p.split("").forEach(function(S){d[S]=S}),c({},v)[h]!==7||a(c({},d)).join("")!==p})?function(d,h){for(var p=s(d),S=arguments.length,R=1,I=i.f,g=o.f;S>R;)for(var b=u(arguments[R++]),y=I?f(a(b),I(b)):a(b),A=y.length,$=0,j;A>$;)j=y[$++],(!e||t(g,b,j))&&(p[j]=b[j]);return p}:c,Ai}var ki,Zc;function mv(){if(Zc)return ki;Zc=1;var e=Le(),r=rr(),t=os();return ki=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(u){s=!0,o=u}if(a==="throw")throw i;if(s)throw o;return r(o),i},ki}var qi,el;function lp(){if(el)return qi;el=1;var e=rr(),r=mv();return qi=function(t,n,a,i){try{return i?n(e(a)[0],a[1]):n(a)}catch(o){r(t,"throw",o)}},qi}var $i,rl;function gv(){if(rl)return $i;rl=1;var e=ke(),r=Nt(),t=e("iterator"),n=Array.prototype;return $i=function(a){return a!==void 0&&(r.Array===a||n[t]===a)},$i}var Ui,tl;function yv(){if(tl)return Ui;tl=1;var e=pe(),r=Ae(),t=we(),n=jt(),a=Je(),i=ds(),o=function(){},s=a("Reflect","construct"),u=/^\s*(?:class|function)\b/,c=e(u.exec),l=!u.test(o),f=function(h){if(!t(h))return!1;try{return s(o,[],h),!0}catch{return!1}},v=function(h){if(!t(h))return!1;switch(n(h)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return l||!!c(u,i(h))}catch{return!0}};return v.sham=!0,Ui=!s||r(function(){var d;return f(f.call)||!f(Object)||!f(function(){d=!0})||d})?v:f,Ui}var Li,nl;function fp(){if(nl)return Li;nl=1;var e=qe(),r=gr(),t=Gr();return Li=function(n,a,i){e?r.f(n,a,t(0,i)):n[a]=i},Li}var xi,al;function dp(){if(al)return xi;al=1;var e=vt(),r=Le(),t=mn(),n=lp(),a=gv(),i=yv(),o=us(),s=fp(),u=bs(),c=In(),l=Array;return xi=function(v){var d=t(v),h=i(this),p=arguments.length,S=p>1?arguments[1]:void 0,R=S!==void 0;R&&(S=e(S,p>2?arguments[2]:void 0));var I=c(d),g=0,b,y,A,$,j,G;if(I&&!(this===l&&a(I)))for(y=h?new this:[],$=u(d,I),j=$.next;!(A=r(j,$)).done;g++)G=R?n($,S,[A.value,g],!0):A.value,s(y,g,G);else for(b=o(d),y=h?new this(b):l(b);b>g;g++)G=R?S(d[g],g):d[g],s(y,g,G);return y.length=g,y},xi}var Ni,il;function vp(){if(il)return Ni;il=1;var e=pe(),r=2147483647,t=36,n=1,a=26,i=38,o=700,s=72,u=128,c="-",l=/[^\0-\u007E]/,f=/[.\u3002\uFF0E\uFF61]/g,v="Overflow: input needs wider integers to process",d=t-n,h=RangeError,p=e(f.exec),S=Math.floor,R=String.fromCharCode,I=e("".charCodeAt),g=e([].join),b=e([].push),y=e("".replace),A=e("".split),$=e("".toLowerCase),j=function(x){for(var M=[],N=0,m=x.length;N<m;){var C=I(x,N++);if(C>=55296&&C<=56319&&N<m){var L=I(x,N++);(L&64512)===56320?b(M,((C&1023)<<10)+(L&1023)+65536):(b(M,C),N--)}else b(M,C)}return M},G=function(x){return x+22+75*(x<26)},K=function(x,M,N){var m=0;for(x=N?S(x/o):x>>1,x+=S(x/M);x>d*a>>1;)x=S(x/d),m+=t;return S(m+(d+1)*x/(x+i))},re=function(x){var M=[];x=j(x);var N=x.length,m=u,C=0,L=s,F,w;for(F=0;F<x.length;F++)w=x[F],w<128&&b(M,R(w));var T=M.length,k=T;for(T&&b(M,c);k<N;){var H=r;for(F=0;F<x.length;F++)w=x[F],w>=m&&w<H&&(H=w);var J=k+1;if(H-m>S((r-C)/J))throw new h(v);for(C+=(H-m)*J,m=H,F=0;F<x.length;F++){if(w=x[F],w<m&&++C>r)throw new h(v);if(w===m){for(var Y=C,le=t;;){var ne=le<=L?n:le>=L+a?a:le-L;if(Y<ne)break;var ue=Y-ne,ae=t-ne;b(M,R(G(ne+ue%ae))),Y=S(ue/ae),le+=t}b(M,R(G(Y))),L=K(C,J,k===T),C=0,k++}}C++,m++}return g(M,"")};return Ni=function(x){var M=[],N=A(y($(x),f,"."),"."),m,C;for(m=0;m<N.length;m++)C=N[m],b(M,p(l,C)?"xn--"+re(C):C);return g(M,".")},Ni}var ol;function hp(){if(ol)return Kc;ol=1,pv();var e=Pe(),r=qe(),t=wn(),n=me(),a=vt(),i=pe(),o=Ye(),s=Sn(),u=gs(),c=ze(),l=cp(),f=dp(),v=Pn(),d=hv().codeAt,h=vp(),p=yr(),S=dt(),R=Vr(),I=dv(),g=ft(),b=g.set,y=g.getterFor("URL"),A=I.URLSearchParams,$=I.getState,j=n.URL,G=n.TypeError,K=n.parseInt,re=Math.floor,x=Math.pow,M=i("".charAt),N=i(/./.exec),m=i([].join),C=i(1.1.toString),L=i([].pop),F=i([].push),w=i("".replace),T=i([].shift),k=i("".split),H=i("".slice),J=i("".toLowerCase),Y=i([].unshift),le="Invalid authority",ne="Invalid scheme",ue="Invalid host",ae="Invalid port",Re=/[a-z]/i,xe=/[\d+-.a-z]/i,je=/\d/,$e=/^0x/i,Qe=/^[0-7]+$/,wr=/^\d+$/,Sr=/^[\da-f]+$/i,_r=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Ar=/[\0\t\n\r #/:<>?@[\\\]^|]/,yt=/^[\u0000-\u0020]+/,zr=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,kr=/[\t\n\r]/g,ye,Xe=function(E){var U=k(E,"."),O,P,_,te,W,be,Ie;if(U.length&&U[U.length-1]===""&&U.length--,O=U.length,O>4)return E;for(P=[],_=0;_<O;_++){if(te=U[_],te==="")return E;if(W=10,te.length>1&&M(te,0)==="0"&&(W=N($e,te)?16:8,te=H(te,W===8?1:2)),te==="")be=0;else{if(!N(W===10?wr:W===8?Qe:Sr,te))return E;be=K(te,W)}F(P,be)}for(_=0;_<O;_++)if(be=P[_],_===O-1){if(be>=x(256,5-O))return null}else if(be>255)return null;for(Ie=L(P),_=0;_<P.length;_++)Ie+=P[_]*x(256,3-_);return Ie},qr=function(E){var U=[0,0,0,0,0,0,0,0],O=0,P=null,_=0,te,W,be,Ie,Ce,Ve,q,Ee=function(){return M(E,_)};if(Ee()===":"){if(M(E,1)!==":")return;_+=2,O++,P=O}for(;Ee();){if(O===8)return;if(Ee()===":"){if(P!==null)return;_++,O++,P=O;continue}for(te=W=0;W<4&&N(Sr,Ee());)te=te*16+K(Ee(),16),_++,W++;if(Ee()==="."){if(W===0||(_-=W,O>6))return;for(be=0;Ee();){if(Ie=null,be>0)if(Ee()==="."&&be<4)_++;else return;if(!N(je,Ee()))return;for(;N(je,Ee());){if(Ce=K(Ee(),10),Ie===null)Ie=Ce;else{if(Ie===0)return;Ie=Ie*10+Ce}if(Ie>255)return;_++}U[O]=U[O]*256+Ie,be++,(be===2||be===4)&&O++}if(be!==4)return;break}else if(Ee()===":"){if(_++,!Ee())return}else if(Ee())return;U[O++]=te}if(P!==null)for(Ve=O-P,O=7;O!==0&&Ve>0;)q=U[O],U[O--]=U[P+Ve-1],U[P+--Ve]=q;else if(O!==8)return;return U},B=function(E){for(var U=null,O=1,P=null,_=0,te=0;te<8;te++)E[te]!==0?(_>O&&(U=P,O=_),P=null,_=0):(P===null&&(P=te),++_);return _>O?P:U},X=function(E){var U,O,P,_;if(typeof E=="number"){for(U=[],O=0;O<4;O++)Y(U,E%256),E=re(E/256);return m(U,".")}if(typeof E=="object"){for(U="",P=B(E),O=0;O<8;O++)_&&E[O]===0||(_&&(_=!1),P===O?(U+=O?":":"::",_=!0):(U+=C(E[O],16),O<7&&(U+=":")));return"["+U+"]"}return E},oe={},ce=l({},oe,{" ":1,'"':1,"<":1,">":1,"`":1}),fe=l({},ce,{"#":1,"?":1,"{":1,"}":1}),He=l({},fe,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Te=function(E,U){var O=d(E,0);return O>32&&O<127&&!c(U,E)?E:encodeURIComponent(E)},De={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Oe=function(E,U){var O;return E.length===2&&N(Re,M(E,0))&&((O=M(E,1))===":"||!U&&O==="|")},Ge=function(E){var U;return E.length>1&&Oe(H(E,0,2))&&(E.length===2||(U=M(E,2))==="/"||U==="\\"||U==="?"||U==="#")},Kr=function(E){return E==="."||J(E)==="%2e"},bt=function(E){return E=J(E),E===".."||E==="%2e."||E===".%2e"||E==="%2e%2e"},Jr={},Yr={},D={},V={},z={},Q={},ie={},se={},ve={},he={},Se={},Ue={},nr={},qn={},Ns={},$n={},Qr={},ar={},js={},$r={},ur={},Un=function(E,U,O){var P=p(E),_,te,W;if(U){if(te=this.parse(P),te)throw new G(te);this.searchParams=null}else{if(O!==void 0&&(_=new Un(O,!0)),te=this.parse(P,null,_),te)throw new G(te);W=$(new A),W.bindURL(this),this.searchParams=W}};Un.prototype={type:"URL",parse:function(E,U,O){var P=this,_=U||Jr,te=0,W="",be=!1,Ie=!1,Ce=!1,Ve,q,Ee,cr;for(E=p(E),U||(P.scheme="",P.username="",P.password="",P.host=null,P.port=null,P.path=[],P.query=null,P.fragment=null,P.cannotBeABaseURL=!1,E=w(E,yt,""),E=w(E,zr,"$1")),E=w(E,kr,""),Ve=f(E);te<=Ve.length;){switch(q=Ve[te],_){case Jr:if(q&&N(Re,q))W+=J(q),_=Yr;else{if(U)return ne;_=D;continue}break;case Yr:if(q&&(N(xe,q)||q==="+"||q==="-"||q==="."))W+=J(q);else if(q===":"){if(U&&(P.isSpecial()!==c(De,W)||W==="file"&&(P.includesCredentials()||P.port!==null)||P.scheme==="file"&&!P.host))return;if(P.scheme=W,U){P.isSpecial()&&De[P.scheme]===P.port&&(P.port=null);return}W="",P.scheme==="file"?_=qn:P.isSpecial()&&O&&O.scheme===P.scheme?_=V:P.isSpecial()?_=se:Ve[te+1]==="/"?(_=z,te++):(P.cannotBeABaseURL=!0,F(P.path,""),_=js)}else{if(U)return ne;W="",_=D,te=0;continue}break;case D:if(!O||O.cannotBeABaseURL&&q!=="#")return ne;if(O.cannotBeABaseURL&&q==="#"){P.scheme=O.scheme,P.path=v(O.path),P.query=O.query,P.fragment="",P.cannotBeABaseURL=!0,_=ur;break}_=O.scheme==="file"?qn:Q;continue;case V:if(q==="/"&&Ve[te+1]==="/")_=ve,te++;else{_=Q;continue}break;case z:if(q==="/"){_=he;break}else{_=ar;continue}case Q:if(P.scheme=O.scheme,q===ye)P.username=O.username,P.password=O.password,P.host=O.host,P.port=O.port,P.path=v(O.path),P.query=O.query;else if(q==="/"||q==="\\"&&P.isSpecial())_=ie;else if(q==="?")P.username=O.username,P.password=O.password,P.host=O.host,P.port=O.port,P.path=v(O.path),P.query="",_=$r;else if(q==="#")P.username=O.username,P.password=O.password,P.host=O.host,P.port=O.port,P.path=v(O.path),P.query=O.query,P.fragment="",_=ur;else{P.username=O.username,P.password=O.password,P.host=O.host,P.port=O.port,P.path=v(O.path),P.path.length--,_=ar;continue}break;case ie:if(P.isSpecial()&&(q==="/"||q==="\\"))_=ve;else if(q==="/")_=he;else{P.username=O.username,P.password=O.password,P.host=O.host,P.port=O.port,_=ar;continue}break;case se:if(_=ve,q!=="/"||M(W,te+1)!=="/")continue;te++;break;case ve:if(q!=="/"&&q!=="\\"){_=he;continue}break;case he:if(q==="@"){be&&(W="%40"+W),be=!0,Ee=f(W);for(var Ln=0;Ln<Ee.length;Ln++){var Fs=Ee[Ln];if(Fs===":"&&!Ce){Ce=!0;continue}var Bs=Te(Fs,He);Ce?P.password+=Bs:P.username+=Bs}W=""}else if(q===ye||q==="/"||q==="?"||q==="#"||q==="\\"&&P.isSpecial()){if(be&&W==="")return le;te-=f(W).length+1,W="",_=Se}else W+=q;break;case Se:case Ue:if(U&&P.scheme==="file"){_=$n;continue}else if(q===":"&&!Ie){if(W==="")return ue;if(cr=P.parseHost(W),cr)return cr;if(W="",_=nr,U===Ue)return}else if(q===ye||q==="/"||q==="?"||q==="#"||q==="\\"&&P.isSpecial()){if(P.isSpecial()&&W==="")return ue;if(U&&W===""&&(P.includesCredentials()||P.port!==null))return;if(cr=P.parseHost(W),cr)return cr;if(W="",_=Qr,U)return;continue}else q==="["?Ie=!0:q==="]"&&(Ie=!1),W+=q;break;case nr:if(N(je,q))W+=q;else if(q===ye||q==="/"||q==="?"||q==="#"||q==="\\"&&P.isSpecial()||U){if(W!==""){var xn=K(W,10);if(xn>65535)return ae;P.port=P.isSpecial()&&xn===De[P.scheme]?null:xn,W=""}if(U)return;_=Qr;continue}else return ae;break;case qn:if(P.scheme="file",q==="/"||q==="\\")_=Ns;else if(O&&O.scheme==="file")switch(q){case ye:P.host=O.host,P.path=v(O.path),P.query=O.query;break;case"?":P.host=O.host,P.path=v(O.path),P.query="",_=$r;break;case"#":P.host=O.host,P.path=v(O.path),P.query=O.query,P.fragment="",_=ur;break;default:Ge(m(v(Ve,te),""))||(P.host=O.host,P.path=v(O.path),P.shortenPath()),_=ar;continue}else{_=ar;continue}break;case Ns:if(q==="/"||q==="\\"){_=$n;break}O&&O.scheme==="file"&&!Ge(m(v(Ve,te),""))&&(Oe(O.path[0],!0)?F(P.path,O.path[0]):P.host=O.host),_=ar;continue;case $n:if(q===ye||q==="/"||q==="\\"||q==="?"||q==="#"){if(!U&&Oe(W))_=ar;else if(W===""){if(P.host="",U)return;_=Qr}else{if(cr=P.parseHost(W),cr)return cr;if(P.host==="localhost"&&(P.host=""),U)return;W="",_=Qr}continue}else W+=q;break;case Qr:if(P.isSpecial()){if(_=ar,q!=="/"&&q!=="\\")continue}else if(!U&&q==="?")P.query="",_=$r;else if(!U&&q==="#")P.fragment="",_=ur;else if(q!==ye&&(_=ar,q!=="/"))continue;break;case ar:if(q===ye||q==="/"||q==="\\"&&P.isSpecial()||!U&&(q==="?"||q==="#")){if(bt(W)?(P.shortenPath(),q!=="/"&&!(q==="\\"&&P.isSpecial())&&F(P.path,"")):Kr(W)?q!=="/"&&!(q==="\\"&&P.isSpecial())&&F(P.path,""):(P.scheme==="file"&&!P.path.length&&Oe(W)&&(P.host&&(P.host=""),W=M(W,0)+":"),F(P.path,W)),W="",P.scheme==="file"&&(q===ye||q==="?"||q==="#"))for(;P.path.length>1&&P.path[0]==="";)T(P.path);q==="?"?(P.query="",_=$r):q==="#"&&(P.fragment="",_=ur)}else W+=Te(q,fe);break;case js:q==="?"?(P.query="",_=$r):q==="#"?(P.fragment="",_=ur):q!==ye&&(P.path[0]+=Te(q,oe));break;case $r:!U&&q==="#"?(P.fragment="",_=ur):q!==ye&&(q==="'"&&P.isSpecial()?P.query+="%27":q==="#"?P.query+="%23":P.query+=Te(q,oe));break;case ur:q!==ye&&(P.fragment+=Te(q,ce));break}te++}},parseHost:function(E){var U,O,P;if(M(E,0)==="["){if(M(E,E.length-1)!=="]"||(U=qr(H(E,1,-1)),!U))return ue;this.host=U}else if(this.isSpecial()){if(E=h(E),N(_r,E)||(U=Xe(E),U===null))return ue;this.host=U}else{if(N(Ar,E))return ue;for(U="",O=f(E),P=0;P<O.length;P++)U+=Te(O[P],oe);this.host=U}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return c(De,this.scheme)},shortenPath:function(){var E=this.path,U=E.length;U&&(this.scheme!=="file"||U!==1||!Oe(E[0],!0))&&E.length--},serialize:function(){var E=this,U=E.scheme,O=E.username,P=E.password,_=E.host,te=E.port,W=E.path,be=E.query,Ie=E.fragment,Ce=U+":";return _!==null?(Ce+="//",E.includesCredentials()&&(Ce+=O+(P?":"+P:"")+"@"),Ce+=X(_),te!==null&&(Ce+=":"+te)):U==="file"&&(Ce+="//"),Ce+=E.cannotBeABaseURL?W[0]:W.length?"/"+m(W,"/"):"",be!==null&&(Ce+="?"+be),Ie!==null&&(Ce+="#"+Ie),Ce},setHref:function(E){var U=this.parse(E);if(U)throw new G(U);this.searchParams.update()},getOrigin:function(){var E=this.scheme,U=this.port;if(E==="blob")try{return new Xr(E.path[0]).origin}catch{return"null"}return E==="file"||!this.isSpecial()?"null":E+"://"+X(this.host)+(U!==null?":"+U:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(E){this.parse(p(E)+":",Jr)},getUsername:function(){return this.username},setUsername:function(E){var U=f(p(E));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var O=0;O<U.length;O++)this.username+=Te(U[O],He)}},getPassword:function(){return this.password},setPassword:function(E){var U=f(p(E));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var O=0;O<U.length;O++)this.password+=Te(U[O],He)}},getHost:function(){var E=this.host,U=this.port;return E===null?"":U===null?X(E):X(E)+":"+U},setHost:function(E){this.cannotBeABaseURL||this.parse(E,Se)},getHostname:function(){var E=this.host;return E===null?"":X(E)},setHostname:function(E){this.cannotBeABaseURL||this.parse(E,Ue)},getPort:function(){var E=this.port;return E===null?"":p(E)},setPort:function(E){this.cannotHaveUsernamePasswordPort()||(E=p(E),E===""?this.port=null:this.parse(E,nr))},getPathname:function(){var E=this.path;return this.cannotBeABaseURL?E[0]:E.length?"/"+m(E,"/"):""},setPathname:function(E){this.cannotBeABaseURL||(this.path=[],this.parse(E,Qr))},getSearch:function(){var E=this.query;return E?"?"+E:""},setSearch:function(E){E=p(E),E===""?this.query=null:(M(E,0)==="?"&&(E=H(E,1)),this.query="",this.parse(E,$r)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var E=this.fragment;return E?"#"+E:""},setHash:function(E){if(E=p(E),E===""){this.fragment=null;return}M(E,0)==="#"&&(E=H(E,1)),this.fragment="",this.parse(E,ur)},update:function(){this.query=this.searchParams.serialize()||null}};var Xr=function(U){var O=u(this,Ne),P=R(arguments.length,1)>1?arguments[1]:void 0,_=b(O,new Un(U,!1,P));r||(O.href=_.serialize(),O.origin=_.getOrigin(),O.protocol=_.getProtocol(),O.username=_.getUsername(),O.password=_.getPassword(),O.host=_.getHost(),O.hostname=_.getHostname(),O.port=_.getPort(),O.pathname=_.getPathname(),O.search=_.getSearch(),O.searchParams=_.getSearchParams(),O.hash=_.getHash())},Ne=Xr.prototype,We=function(E,U){return{get:function(){return y(this)[E]()},set:U&&function(O){return y(this)[U](O)},configurable:!0,enumerable:!0}};if(r&&(s(Ne,"href",We("serialize","setHref")),s(Ne,"origin",We("getOrigin")),s(Ne,"protocol",We("getProtocol","setProtocol")),s(Ne,"username",We("getUsername","setUsername")),s(Ne,"password",We("getPassword","setPassword")),s(Ne,"host",We("getHost","setHost")),s(Ne,"hostname",We("getHostname","setHostname")),s(Ne,"port",We("getPort","setPort")),s(Ne,"pathname",We("getPathname","setPathname")),s(Ne,"search",We("getSearch","setSearch")),s(Ne,"searchParams",We("getSearchParams")),s(Ne,"hash",We("getHash","setHash"))),o(Ne,"toJSON",function(){return y(this).serialize()},{enumerable:!0}),o(Ne,"toString",function(){return y(this).serialize()},{enumerable:!0}),j){var Ds=j.createObjectURL,Ms=j.revokeObjectURL;Ds&&o(Xr,"createObjectURL",a(Ds,j)),Ms&&o(Xr,"revokeObjectURL",a(Ms,j))}return S(Xr,"URL"),e({global:!0,constructor:!0,forced:!t,sham:!r},{URL:Xr}),Kc}var sl;function pp(){return sl||(sl=1,hp()),zc}var ul={},cl;function mp(){if(cl)return ul;cl=1;var e=Pe(),r=Je(),t=Ae(),n=Vr(),a=yr(),i=wn(),o=r("URL"),s=i&&t(function(){o.canParse()}),u=t(function(){return o.canParse.length!==1});return e({target:"URL",stat:!0,forced:!s||u},{canParse:function(l){var f=n(arguments.length,1),v=a(l),d=f<2||arguments[1]===void 0?void 0:a(arguments[1]);try{return!!new o(v,d)}catch{return!1}}}),ul}var ll={},fl;function gp(){if(fl)return ll;fl=1;var e=Pe(),r=Je(),t=Vr(),n=yr(),a=wn(),i=r("URL");return e({target:"URL",stat:!0,forced:!a},{parse:function(s){var u=t(arguments.length,1),c=n(s),l=u<2||arguments[1]===void 0?void 0:n(arguments[1]);try{return new i(c,l)}catch{return null}}}),ll}var dl={},vl;function yp(){if(vl)return dl;vl=1;var e=Pe(),r=Le();return e({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return r(URL.prototype.toString,this)}}),dl}var ji,hl;function bp(){if(hl)return ji;hl=1,vv(),pp(),mp(),gp(),yp();var e=En();return ji=e.URL,ji}var Di,pl;function wp(){if(pl)return Di;pl=1;var e=bp();return Di=e,Di}var Mi,ml;function Sp(){if(ml)return Mi;ml=1;var e=wp();return Mi=e,Mi}Sp();var gl={},Fi,yl;function Ip(){return yl||(yl=1,Fi={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}),Fi}var Bi,bl;function Pp(){if(bl)return Bi;bl=1;var e=gn(),r=e("span").classList,t=r&&r.constructor&&r.constructor.prototype;return Bi=t===Object.prototype?void 0:t,Bi}var wl;function bv(){if(wl)return gl;wl=1;var e=me(),r=Ip(),t=Pp(),n=ms(),a=Wr(),i=dt(),o=ke(),s=o("iterator"),u=n.values,c=function(f,v){if(f){if(f[s]!==u)try{a(f,s,u)}catch{f[s]=u}if(i(f,v,!0),r[v]){for(var d in n)if(f[d]!==n[d])try{a(f,d,n[d])}catch{f[d]=n[d]}}}};for(var l in r)c(e[l]&&e[l].prototype,l);return c(t,"DOMTokenList"),gl}var Hi,Sl;function Ep(){if(Sl)return Hi;Sl=1;var e=vv();return bv(),Hi=e,Hi}var Gi,Il;function Rp(){if(Il)return Gi;Il=1;var e=Ep();return Gi=e,Gi}Rp();var Pl={},El={},Wi,Rl;function Tp(){if(Rl)return Wi;Rl=1;var e=Ke(),r=Wr();return Wi=function(t,n){e(n)&&"cause"in n&&r(t,"cause",n.cause)},Wi}var Vi,Tl;function Op(){if(Tl)return Vi;Tl=1;var e=pe(),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 Vi=function(o,s){if(i&&typeof o=="string"&&!r.prepareStackTrace)for(;s--;)o=t(o,a,"");return o},Vi}var zi,Ol;function Cp(){if(Ol)return zi;Ol=1;var e=Ae(),r=Gr();return zi=!e(function(){var t=new Error("a");return"stack"in t?(Object.defineProperty(t,"stack",r(1,7)),t.stack!==7):!0}),zi}var Ki,Cl;function _p(){if(Cl)return Ki;Cl=1;var e=Wr(),r=Op(),t=Cp(),n=Error.captureStackTrace;return Ki=function(a,i,o,s){t&&(n?n(a,i):e(a,"stack",r(o,s)))},Ki}var Ji,_l;function Dt(){if(_l)return Ji;_l=1;var e=vt(),r=Le(),t=rr(),n=bn(),a=gv(),i=us(),o=yn(),s=bs(),u=In(),c=mv(),l=TypeError,f=function(d,h){this.stopped=d,this.result=h},v=f.prototype;return Ji=function(d,h,p){var S=p&&p.that,R=!!(p&&p.AS_ENTRIES),I=!!(p&&p.IS_RECORD),g=!!(p&&p.IS_ITERATOR),b=!!(p&&p.INTERRUPTED),y=e(h,S),A,$,j,G,K,re,x,M=function(m){return A&&c(A,"normal"),new f(!0,m)},N=function(m){return R?(t(m),b?y(m[0],m[1],M):y(m[0],m[1])):b?y(m,M):y(m)};if(I)A=d.iterator;else if(g)A=d;else{if($=u(d),!$)throw new l(n(d)+" is not iterable");if(a($)){for(j=0,G=i(d);G>j;j++)if(K=N(d[j]),K&&o(v,K))return K;return new f(!1)}A=s(d,$)}for(re=I?d.next:A.next;!(x=r(re,A)).done;){try{K=N(x.value)}catch(m){c(A,"throw",m)}if(typeof K=="object"&&K&&o(v,K))return K}return new f(!1)},Ji}var Yi,Al;function Ap(){if(Al)return Yi;Al=1;var e=yr();return Yi=function(r,t){return r===void 0?arguments.length<2?"":t:e(r)},Yi}var kl;function kp(){if(kl)return El;kl=1;var e=Pe(),r=yn(),t=vs(),n=hs(),a=ov(),i=xt(),o=Wr(),s=Gr(),u=Tp(),c=_p(),l=Dt(),f=Ap(),v=ke(),d=v("toStringTag"),h=Error,p=[].push,S=function(g,b){var y=r(R,this),A;n?A=n(new h,y?t(this):R):(A=y?this:i(R),o(A,d,"Error")),b!==void 0&&o(A,"message",f(b)),c(A,S,A.stack,1),arguments.length>2&&u(A,arguments[2]);var $=[];return l(g,p,{that:$}),o(A,"errors",$),A};n?n(S,h):a(S,h,{name:!0});var R=S.prototype=i(h.prototype,{constructor:s(1,S),message:s(1,""),name:s(1,"AggregateError")});return e({global:!0,constructor:!0,arity:2},{AggregateError:S}),El}var ql;function qp(){return ql||(ql=1,kp()),Pl}var $l={},Qi,Ul;function $p(){if(Ul)return Qi;Ul=1;var e=ys(),r=jt();return Qi=e?{}.toString:function(){return"[object "+r(this)+"]"},Qi}var Ll;function Up(){if(Ll)return $l;Ll=1;var e=ys(),r=Ye(),t=$p();return e||r(Object.prototype,"toString",t,{unsafe:!0}),$l}var xl={},Nl={},Xi,jl;function wv(){if(jl)return Xi;jl=1;var e=me(),r=Lt(),t=vn(),n=function(a){return r.slice(0,a.length)===a};return Xi=(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"})(),Xi}var Zi,Dl;function ws(){if(Dl)return Zi;Dl=1;var e=wv();return Zi=e==="NODE",Zi}var eo,Ml;function Lp(){if(Ml)return eo;Ml=1;var e=Je(),r=Sn(),t=ke(),n=qe(),a=t("species");return eo=function(i){var o=e(i);n&&o&&!o[a]&&r(o,a,{configurable:!0,get:function(){return this}})},eo}var ro,Fl;function xp(){if(Fl)return ro;Fl=1;var e=yv(),r=bn(),t=TypeError;return ro=function(n){if(e(n))return n;throw new t(r(n)+" is not a constructor")},ro}var to,Bl;function Sv(){if(Bl)return to;Bl=1;var e=rr(),r=xp(),t=hn(),n=ke(),a=n("species");return to=function(i,o){var s=e(i).constructor,u;return s===void 0||t(u=e(s)[a])?o:r(u)},to}var no,Hl;function Iv(){if(Hl)return no;Hl=1;var e=dn(),r=Function.prototype,t=r.apply,n=r.call;return no=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(t):function(){return n.apply(t,arguments)}),no}var ao,Gl;function Pv(){if(Gl)return ao;Gl=1;var e=Lt();return ao=/(?:ipad|iphone|ipod).*applewebkit/i.test(e),ao}var io,Wl;function Ev(){if(Wl)return io;Wl=1;var e=me(),r=Iv(),t=vt(),n=we(),a=ze(),i=Ae(),o=ev(),s=Pn(),u=gn(),c=Vr(),l=Pv(),f=ws(),v=e.setImmediate,d=e.clearImmediate,h=e.process,p=e.Dispatch,S=e.Function,R=e.MessageChannel,I=e.String,g=0,b={},y="onreadystatechange",A,$,j,G;i(function(){A=e.location});var K=function(N){if(a(b,N)){var m=b[N];delete b[N],m()}},re=function(N){return function(){K(N)}},x=function(N){K(N.data)},M=function(N){e.postMessage(I(N),A.protocol+"//"+A.host)};return(!v||!d)&&(v=function(m){c(arguments.length,1);var C=n(m)?m:S(m),L=s(arguments,1);return b[++g]=function(){r(C,void 0,L)},$(g),g},d=function(m){delete b[m]},f?$=function(N){h.nextTick(re(N))}:p&&p.now?$=function(N){p.now(re(N))}:R&&!l?(j=new R,G=j.port2,j.port1.onmessage=x,$=t(G.postMessage,G)):e.addEventListener&&n(e.postMessage)&&!e.importScripts&&A&&A.protocol!=="file:"&&!i(M)?($=M,e.addEventListener("message",x,!1)):y in u("script")?$=function(N){o.appendChild(u("script"))[y]=function(){o.removeChild(this),K(N)}}:$=function(N){setTimeout(re(N),0)}),io={set:v,clear:d},io}var oo,Vl;function Rv(){if(Vl)return oo;Vl=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}}},oo=e,oo}var so,zl;function Np(){if(zl)return so;zl=1;var e=Lt();return so=/ipad|iphone|ipod/i.test(e)&&typeof Pebble<"u",so}var uo,Kl;function jp(){if(Kl)return uo;Kl=1;var e=Lt();return uo=/web0s(?!.*chrome)/i.test(e),uo}var co,Jl;function Dp(){if(Jl)return co;Jl=1;var e=me(),r=fv(),t=vt(),n=Ev().set,a=Rv(),i=Pv(),o=Np(),s=jp(),u=ws(),c=e.MutationObserver||e.WebKitMutationObserver,l=e.document,f=e.process,v=e.Promise,d=r("queueMicrotask"),h,p,S,R,I;if(!d){var g=new a,b=function(){var y,A;for(u&&(y=f.domain)&&y.exit();A=g.get();)try{A()}catch($){throw g.head&&h(),$}y&&y.enter()};!i&&!u&&!s&&c&&l?(p=!0,S=l.createTextNode(""),new c(b).observe(S,{characterData:!0}),h=function(){S.data=p=!p}):!o&&v&&v.resolve?(R=v.resolve(void 0),R.constructor=v,I=t(R.then,R),h=function(){I(b)}):u?h=function(){f.nextTick(b)}:(n=t(n,e),h=function(){n(b)}),d=function(y){g.head||h(),g.add(y)}}return co=d,co}var lo,Yl;function Mp(){return Yl||(Yl=1,lo=function(e,r){try{arguments.length===1?console.error(e):console.error(e,r)}catch{}}),lo}var fo,Ql;function ht(){return Ql||(Ql=1,fo=function(e){try{return{error:!1,value:e()}}catch(r){return{error:!0,value:r}}}),fo}var vo,Xl;function pt(){if(Xl)return vo;Xl=1;var e=me();return vo=e.Promise,vo}var ho,Zl;function Mt(){if(Zl)return ho;Zl=1;var e=me(),r=pt(),t=we(),n=sv(),a=ds(),i=ke(),o=wv(),s=sr(),u=Gd(),c=r&&r.prototype,l=i("species"),f=!1,v=t(e.PromiseRejectionEvent),d=n("Promise",function(){var h=a(r),p=h!==String(r);if(!p&&u===66||s&&!(c.catch&&c.finally))return!0;if(!u||u<51||!/native code/.test(h)){var S=new r(function(g){g(1)}),R=function(g){g(function(){},function(){})},I=S.constructor={};if(I[l]=R,f=S.then(function(){})instanceof R,!f)return!0}return!p&&(o==="BROWSER"||o==="DENO")&&!v});return ho={CONSTRUCTOR:d,REJECTION_EVENT:v,SUBCLASSING:f},ho}var po={},ef;function br(){if(ef)return po;ef=1;var e=tr(),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 po.f=function(n){return new t(n)},po}var rf;function Fp(){if(rf)return Nl;rf=1;var e=Pe(),r=sr(),t=ws(),n=me(),a=En(),i=Le(),o=Ye(),s=hs(),u=dt(),c=Lp(),l=tr(),f=we(),v=Ke(),d=gs(),h=Sv(),p=Ev().set,S=Dp(),R=Mp(),I=ht(),g=Rv(),b=ft(),y=pt(),A=Mt(),$=br(),j="Promise",G=A.CONSTRUCTOR,K=A.REJECTION_EVENT,re=A.SUBCLASSING,x=b.getterFor(j),M=b.set,N=y&&y.prototype,m=y,C=N,L=n.TypeError,F=n.document,w=n.process,T=$.f,k=T,H=!!(F&&F.createEvent&&n.dispatchEvent),J="unhandledrejection",Y="rejectionhandled",le=0,ne=1,ue=2,ae=1,Re=2,xe,je,$e,Qe,wr=function(B){var X;return v(B)&&f(X=B.then)?X:!1},Sr=function(B,X){var oe=X.value,ce=X.state===ne,fe=ce?B.ok:B.fail,He=B.resolve,Te=B.reject,De=B.domain,Oe,Ge,Kr;try{fe?(ce||(X.rejection===Re&&kr(X),X.rejection=ae),fe===!0?Oe=oe:(De&&De.enter(),Oe=fe(oe),De&&(De.exit(),Kr=!0)),Oe===B.promise?Te(new L("Promise-chain cycle")):(Ge=wr(Oe))?i(Ge,Oe,He,Te):He(Oe)):Te(oe)}catch(bt){De&&!Kr&&De.exit(),Te(bt)}},_r=function(B,X){B.notified||(B.notified=!0,S(function(){for(var oe=B.reactions,ce;ce=oe.get();)Sr(ce,B);B.notified=!1,X&&!B.rejection&&yt(B)}))},Ar=function(B,X,oe){var ce,fe;H?(ce=F.createEvent("Event"),ce.promise=X,ce.reason=oe,ce.initEvent(B,!1,!0),n.dispatchEvent(ce)):ce={promise:X,reason:oe},!K&&(fe=n["on"+B])?fe(ce):B===J&&R("Unhandled promise rejection",oe)},yt=function(B){i(p,n,function(){var X=B.facade,oe=B.value,ce=zr(B),fe;if(ce&&(fe=I(function(){t?w.emit("unhandledRejection",oe,X):Ar(J,X,oe)}),B.rejection=t||zr(B)?Re:ae,fe.error))throw fe.value})},zr=function(B){return B.rejection!==ae&&!B.parent},kr=function(B){i(p,n,function(){var X=B.facade;t?w.emit("rejectionHandled",X):Ar(Y,X,B.value)})},ye=function(B,X,oe){return function(ce){B(X,ce,oe)}},Xe=function(B,X,oe){B.done||(B.done=!0,oe&&(B=oe),B.value=X,B.state=ue,_r(B,!0))},qr=function(B,X,oe){if(!B.done){B.done=!0,oe&&(B=oe);try{if(B.facade===X)throw new L("Promise can't be resolved itself");var ce=wr(X);ce?S(function(){var fe={done:!1};try{i(ce,X,ye(qr,fe,B),ye(Xe,fe,B))}catch(He){Xe(fe,He,B)}}):(B.value=X,B.state=ne,_r(B,!1))}catch(fe){Xe({done:!1},fe,B)}}};if(G&&(m=function(X){d(this,C),l(X),i(xe,this);var oe=x(this);try{X(ye(qr,oe),ye(Xe,oe))}catch(ce){Xe(oe,ce)}},C=m.prototype,xe=function(X){M(this,{type:j,done:!1,notified:!1,parent:!1,reactions:new g,rejection:!1,state:le,value:null})},xe.prototype=o(C,"then",function(X,oe){var ce=x(this),fe=T(h(this,m));return ce.parent=!0,fe.ok=f(X)?X:!0,fe.fail=f(oe)&&oe,fe.domain=t?w.domain:void 0,ce.state===le?ce.reactions.add(fe):S(function(){Sr(fe,ce)}),fe.promise}),je=function(){var B=new xe,X=x(B);this.promise=B,this.resolve=ye(qr,X),this.reject=ye(Xe,X)},$.f=T=function(B){return B===m||B===$e?new je(B):k(B)},!r&&f(y)&&N!==Object.prototype)){Qe=N.then,re||o(N,"then",function(X,oe){var ce=this;return new m(function(fe,He){i(Qe,ce,fe,He)}).then(X,oe)},{unsafe:!0});try{delete N.constructor}catch{}s&&s(N,C)}return e({global:!0,constructor:!0,wrap:!0,forced:G},{Promise:m}),$e=a.Promise,u(m,j,!1,!0),c(j),Nl}var tf={},mo,nf;function Bp(){if(nf)return mo;nf=1;var e=ke(),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 mo=function(i,o){try{if(!o&&!t)return!1}catch{return!1}var s=!1;try{var u={};u[r]=function(){return{next:function(){return{done:s=!0}}}},i(u)}catch{}return s},mo}var go,af;function Rn(){if(af)return go;af=1;var e=pt(),r=Bp(),t=Mt().CONSTRUCTOR;return go=t||!r(function(n){e.all(n).then(void 0,function(){})}),go}var of;function Hp(){if(of)return tf;of=1;var e=Pe(),r=Le(),t=tr(),n=br(),a=ht(),i=Dt(),o=Rn();return e({target:"Promise",stat:!0,forced:o},{all:function(u){var c=this,l=n.f(c),f=l.resolve,v=l.reject,d=a(function(){var h=t(c.resolve),p=[],S=0,R=1;i(u,function(I){var g=S++,b=!1;R++,r(h,c,I).then(function(y){b||(b=!0,p[g]=y,--R||f(p))},v)}),--R||f(p)});return d.error&&v(d.value),l.promise}}),tf}var sf={},uf;function Gp(){if(uf)return sf;uf=1;var e=Pe(),r=sr(),t=Mt().CONSTRUCTOR,n=pt(),a=Je(),i=we(),o=Ye(),s=n&&n.prototype;if(e({target:"Promise",proto:!0,forced:t,real:!0},{catch:function(c){return this.then(void 0,c)}}),!r&&i(n)){var u=a("Promise").prototype.catch;s.catch!==u&&o(s,"catch",u,{unsafe:!0})}return sf}var cf={},lf;function Wp(){if(lf)return cf;lf=1;var e=Pe(),r=Le(),t=tr(),n=br(),a=ht(),i=Dt(),o=Rn();return e({target:"Promise",stat:!0,forced:o},{race:function(u){var c=this,l=n.f(c),f=l.reject,v=a(function(){var d=t(c.resolve);i(u,function(h){r(d,c,h).then(l.resolve,f)})});return v.error&&f(v.value),l.promise}}),cf}var ff={},df;function Vp(){if(df)return ff;df=1;var e=Pe(),r=br(),t=Mt().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}}),ff}var vf={},yo,hf;function Tv(){if(hf)return yo;hf=1;var e=rr(),r=Ke(),t=br();return yo=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},yo}var pf;function zp(){if(pf)return vf;pf=1;var e=Pe(),r=Je(),t=sr(),n=pt(),a=Mt().CONSTRUCTOR,i=Tv(),o=r("Promise"),s=t&&!a;return e({target:"Promise",stat:!0,forced:t||a},{resolve:function(c){return i(s&&this===o?n:this,c)}}),vf}var mf;function Kp(){return mf||(mf=1,Fp(),Hp(),Gp(),Wp(),Vp(),zp()),xl}var gf={},yf;function Jp(){if(yf)return gf;yf=1;var e=Pe(),r=Le(),t=tr(),n=br(),a=ht(),i=Dt(),o=Rn();return e({target:"Promise",stat:!0,forced:o},{allSettled:function(u){var c=this,l=n.f(c),f=l.resolve,v=l.reject,d=a(function(){var h=t(c.resolve),p=[],S=0,R=1;i(u,function(I){var g=S++,b=!1;R++,r(h,c,I).then(function(y){b||(b=!0,p[g]={status:"fulfilled",value:y},--R||f(p))},function(y){b||(b=!0,p[g]={status:"rejected",reason:y},--R||f(p))})}),--R||f(p)});return d.error&&v(d.value),l.promise}}),gf}var bf={},wf;function Yp(){if(wf)return bf;wf=1;var e=Pe(),r=Le(),t=tr(),n=Je(),a=br(),i=ht(),o=Dt(),s=Rn(),u="No one promise resolved";return e({target:"Promise",stat:!0,forced:s},{any:function(l){var f=this,v=n("AggregateError"),d=a.f(f),h=d.resolve,p=d.reject,S=i(function(){var R=t(f.resolve),I=[],g=0,b=1,y=!1;o(l,function(A){var $=g++,j=!1;b++,r(R,f,A).then(function(G){j||y||(y=!0,h(G))},function(G){j||y||(j=!0,I[$]=G,--b||p(new v(I,u)))})}),--b||p(new v(I,u))});return S.error&&p(S.value),d.promise}}),bf}var Sf={},If;function Ov(){if(If)return Sf;If=1;var e=Pe(),r=me(),t=Iv(),n=Pn(),a=br(),i=tr(),o=ht(),s=r.Promise,u=!1,c=!s||!s.try||o(function(){s.try(function(l){u=l===8},8)}).error||!u;return e({target:"Promise",stat:!0,forced:c},{try:function(l){var f=arguments.length>1?n(arguments,1):[],v=a.f(this),d=o(function(){return t(i(l),void 0,f)});return(d.error?v.reject:v.resolve)(d.value),v.promise}}),Sf}var Pf={},Ef;function Cv(){if(Ef)return Pf;Ef=1;var e=Pe(),r=br();return e({target:"Promise",stat:!0},{withResolvers:function(){var n=r.f(this);return{promise:n.promise,resolve:n.resolve,reject:n.reject}}}),Pf}var Rf={},Tf;function Qp(){if(Tf)return Rf;Tf=1;var e=Pe(),r=sr(),t=pt(),n=Ae(),a=Je(),i=we(),o=Sv(),s=Tv(),u=Ye(),c=t&&t.prototype,l=!!t&&n(function(){c.finally.call({then:function(){}},function(){})});if(e({target:"Promise",proto:!0,real:!0,forced:l},{finally:function(v){var d=o(this,a("Promise")),h=i(v);return this.then(h?function(p){return s(d,v()).then(function(){return p})}:v,h?function(p){return s(d,v()).then(function(){throw p})}:v)}}),!r&&i(t)){var f=a("Promise").prototype.finally;c.finally!==f&&u(c,"finally",f,{unsafe:!0})}return Rf}var bo,Of;function Xp(){if(Of)return bo;Of=1,qp(),ms(),Up(),Kp(),Jp(),Yp(),Ov(),Cv(),Qp(),pv();var e=En();return bo=e.Promise,bo}var wo,Cf;function Zp(){if(Cf)return wo;Cf=1;var e=Xp();return bv(),wo=e,wo}var _f={},Af;function em(){return Af||(Af=1,Ov()),_f}var kf={},qf;function rm(){return qf||(qf=1,Cv()),kf}var So,$f;function tm(){if($f)return So;$f=1;var e=Zp();return em(),rm(),So=e,So}tm();const _v="sesamy-debug";function nm(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 am(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 im(e){nm(_v,e.toString(),1)}function om(){return am(_v)==="true"}function de(e){om()&&console.log(e)}function Lr(e,r){if(typeof window>"u")return;const t=new CustomEvent(e,{detail:r,bubbles:!0,composed:!0});de(`Triggering event: ${e}`),dispatchEvent(t)}const sm=Object.freeze(Object.defineProperty({__proto__:null,triggerEvent:Lr},Symbol.toStringTag,{value:"Module"}));let Av=null;function Ss(e){Av=e}function kv(){return Av}var er=(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))(er||{});const um=Object.freeze(Object.defineProperty({__proto__:null,Events:er},Symbol.toStringTag,{value:"Module"})),qv="sesamy_is_authenticated";function cm(){try{return document.cookie.split(";").some(e=>e.trim().startsWith(`${qv}=true`))}catch{return!1}}function Io(e){try{const r=e?2592e3:0,t=window.location.protocol==="https:"?"; Secure":"";document.cookie=`${qv}=${e}; path=/; max-age=${r}; SameSite=Lax${t}`}catch{}}function lm(e={}){let r=e.baseUrl??"",t="",n=!1,a=null,i=null;async function o(){try{const u=await fetch(`${r}/auth/userinfo`,{credentials:"include",headers:{Accept:"application/json"}});return u.ok?await u.json():null}catch(u){return de(`[cookie-auth] Failed to fetch userinfo: ${u.message}`),null}}const s={async init(u){if(t=u.vendorId||u.clientId||"",de(`[cookie-auth] Initializing with baseUrl: ${r}`),cm()){const c=await o();c===null?de("[cookie-auth] userinfo fetch failed transiently; retaining session hint"):c.authenticated&&c.sub?(a=!0,i=c,Io(!0),Lr(er.AUTHENTICATED,{sub:c.sub,appState:void 0})):(a=!1,Io(!1))}else a=!1;n=!0,Lr(er.AUTH_INITIALIZED,{})},async isAuthenticated(){if(!n)return!1;if(a!==null)return a;const u=await o();return u===null?(de("[cookie-auth] userinfo fetch failed transiently in isAuthenticated; will retry"),!1):(a=u.authenticated,a)},async getTokenSilently(u,c){return null},async getUser(){if(!n)return null;if(i)return i;const u=await o();return u?.authenticated&&u.sub?(i=u,i):null},async login(u){if(!t)throw new Error("[cookie-auth] vendorId is required to build a login URL");const c=u?.returnTo??window.location.href,l=new URL(`${r}/auth/${encodeURIComponent(t)}/login`,window.location.origin);l.searchParams.set("return_to",c),window.location.href=l.toString()},async loginWithRedirect(u){return s.login(u)},async loginWithPopup(u){return de("[cookie-auth] loginWithPopup called — falling back to redirect"),s.login(u)},async logout(u){a=!1,i=null,Io(!1),Lr(er.LOGOUT,{});const c=u?.returnTo??window.location.href,l=new URL(`${r}/auth/logout`,window.location.origin);l.searchParams.set("return_to",c),u?.localOnly&&l.searchParams.set("local_only","true"),window.location.href=l.toString()}};return s}const fm="sesamyAccessToken";let qt=!1;function Cr(){const e=kv();if(!e)throw new Error("[sesamy-js] No auth plugin registered. This should not happen.");return e}async function dm(e){if(e.enabled===!1){de("Auth disabled via config"),qt=!0;return}if(e.useHttpCookies)de("useHttpCookies=true — using cookie-based BFF plugin"),Ss(lm());else if(!kv())throw new Error("[sesamy-js] No auth plugin registered. Load the auth0-plugin bundle before sesamy-js, or set useHttpCookies: true to use the cookie-based BFF plugin.");await Cr().init(e),qt=!0}async function dr(){return qt?Cr().isAuthenticated():!1}async function fr(e=!0,r=!1){return qt?Cr().getTokenSilently(e,r):null}async function vm(){return qt?Cr().getUser():null}async function hm(e){return Cr().login(e)}async function Is(e){return Cr().loginWithRedirect(e)}async function pm(e){return Cr().loginWithPopup(e)}async function mm(e={}){return Cr().logout(e)}async function Do(e){const r=e.split(".");if(r.length!==3)throw new Error("Invalid token");const t=decodeURIComponent(atob(r[1].replace(/-/g,"+").replace(/_/g,"/")).split("").map(o=>"%"+("00"+o.charCodeAt(0).toString(16)).slice(-2)).join("")),n=JSON.parse(t);if(!n?.exp||n.exp<Date.now()/1e3)throw new Error("Invalid token");de("Set token"),localStorage.setItem(fm,e);const{triggerEvent:a}=await Promise.resolve().then(()=>sm),{Events:i}=await Promise.resolve().then(()=>um);a(i.AUTHENTICATED,{...n,appState:void 0})}const gm=(e,r)=>r.skipDedupe||r.method!=="GET",ym=(e,r)=>r.method+"@"+e,bm=e=>e.clone(),wm=({skip:e=gm,key:r=ym,resolver:t=bm}={})=>{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((u,c)=>{n.get(s).push([u,c])});try{return a(i,o).then(u=>(n.get(s).forEach(([c])=>c(t(u))),n.delete(s),u)).catch(u=>{throw n.get(s).forEach(([,c])=>c(u)),n.delete(s),u})}catch(u){return n.delete(s),Promise.reject(u)}}},Sm=(e,r)=>e*r,Im=e=>e&&e.ok,Pm=({delayTimer:e=500,delayRamp:r=Sm,maxAttempts:t=10,until:n=Im,onRetry:a=null,retryOnNetworkError:i=!1,resolveWithLatestResponse:o=!1,skip:s}={})=>u=>(c,l)=>{let f=0;if(s&&s(c,l))return u(c,l);const v=(d,h)=>Promise.resolve(n(d,h)).then(p=>p?d&&o?d:h?Promise.reject(h):d:(f++,!t||f<=t?new Promise(S=>{const R=r(e,f);setTimeout(()=>{typeof a=="function"?Promise.resolve(a({response:d,error:h,url:c,options:l})).then((I={})=>{var g,b;S(u((g=I&&I.url)!==null&&g!==void 0?g:c,(b=I&&I.options)!==null&&b!==void 0?b:l))}):S(u(c,l))},R)}).then(v).catch(S=>{if(!i)throw S;return v(null,S)}):d&&o?d:Promise.reject(h||new Error("Number of attempts exceeded."))));return u(c,l).then(v).catch(d=>{if(!i)throw d;return v(null,d)})};let Po=class $v extends Error{status;statusText;url;body;constructor(r,t,n,a,i){super(a),this.name="APIError",this.status=r,this.statusText=t,this.url=n,this.body=i,Error.captureStackTrace&&Error.captureStackTrace(this,$v)}isClientError(){return this.status>=400&&this.status<500}isServerError(){return this.status>=500}isForbiddenError(){return this.status===403}isNotFoundError(){return this.status===404}};var rn=(e=>(e.BROWSER="browser",e.NORMAL="normal",e))(rn||{});const Em="application/json",Uv="Content-Type",Zr=Symbol(),Lv=Symbol();function Uf(e={}){var r;const t=e instanceof Array?Object.fromEntries(e):e;return(r=Object.entries(t).find(([n])=>n.toLowerCase()===Uv.toLowerCase()))===null||r===void 0?void 0:r[1]}function Lf(e){return/^application\/.*json.*/.test(e)}const xr=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]=xr(o,i,t):n[a]=i,n},{...e})},st={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 Rm(e,r=!1){st.options=r?e:xr(st.options,e)}function Tm(e,r=!1){st.polyfills=r?e:xr(st.polyfills,e)}function Om(e){st.errorType=e}const Cm=e=>r=>e.reduceRight((t,n)=>n(t),r)||r;let xv=class extends Error{};const _m=e=>{const r=Object.create(null);e=e._addons.reduce((g,b)=>b.beforeRequest&&b.beforeRequest(g,e._options,r)||g,e);const{_url:t,_options:n,_config:a,_catchers:i,_resolvers:o,_middlewares:s,_addons:u}=e,c=new Map(i),l=xr(a.options,n);let f=t;const v=Cm(s)((g,b)=>(f=g,a.polyfill("fetch")(g,b)))(t,l),d=new Error,h=v.catch(g=>{throw{[Zr]:g}}).then(g=>{var b;if(!g.ok){const y=new xv;if(y.cause=d,y.stack=y.stack+`
|
|
2
|
+
CAUSE: `+d.stack,y.response=g,y.status=g.status,y.url=f,g.type==="opaque")throw y;const A=a.errorType==="json"||((b=g.headers.get("Content-Type"))===null||b===void 0?void 0:b.split(";")[0])==="application/json";return(a.errorType?A?g.text():g[a.errorType]():Promise.resolve(g.body)).then($=>{if(y.message=typeof $=="string"?$:g.statusText,$)if(A&&typeof $=="string"){y.text=$;try{y.json=JSON.parse($)}catch{}}else y[a.errorType]=$;throw y})}return g}),p=g=>g.catch(b=>{const y=Object.prototype.hasOwnProperty.call(b,Zr),A=y?b[Zr]:b,$=A?.status&&c.get(A.status)||c.get(A?.name)||y&&c.has(Zr)&&c.get(Zr);if($)return $(A,e);const j=c.get(Lv);if(j)return j(A,e);throw A}),S=g=>b=>p(g?h.then(y=>y&&y[g]()).then(y=>b?b(y):y):h.then(y=>b?b(y):y)),R={_wretchReq:e,_fetchReq:v,_sharedState:r,res:S(null),json:S("json"),blob:S("blob"),formData:S("formData"),arrayBuffer:S("arrayBuffer"),text:S("text"),error(g,b){return c.set(g,b),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(Zr,g)}},I=u.reduce((g,b)=>({...g,...typeof b.resolver=="function"?b.resolver(g):b.resolver}),R);return o.reduce((g,b)=>b(g,e),I)},Am={_url:"",_options:{},_config:st,_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:xr(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:xr(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:xr(this._options,{headers:r})}},accept(e){return this.headers({Accept:e})},content(e){return this.headers({[Uv]: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(Lv,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=Uf(n._options.headers),i=this._config.polyfill("FormData",!1),o=typeof t=="object"&&!(i&&t instanceof i)&&(!n._options.headers||!a||Lf(a));return n=t?o?n.json(t,a):n.body(t):n,_m(n._deferred.reduce((s,u)=>u(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=Uf(this._options.headers);return this.content(r||Lf(t)&&t||Em).body(JSON.stringify(e))}};function or(e="",r={}){return{...Am,_url:e,_options:r}}or.default=or;or.options=Rm;or.errorType=Om;or.polyfills=Tm;or.WretchError=xv;const km=(e,r)=>r.skipDedupe||r.method!=="GET",qm=(e,r)=>r.method+"@"+e,$m=e=>e.clone(),Um=({skip:e=km,key:r=qm,resolver:t=$m}={})=>{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((u,c)=>{n.get(s).push([u,c])});try{return a(i,o).then(u=>(n.get(s).forEach(([c])=>c(t(u))),n.delete(s),u)).catch(u=>{throw n.get(s).forEach(([,c])=>c(u)),n.delete(s),u})}catch(u){return n.delete(s),Promise.reject(u)}}},Lm=(e,r)=>r.skipCache||r.method!=="GET",xm=(e,r)=>r.method+"@"+e,Nm=()=>!1,jm=()=>null,Dm=e=>e.ok,Mm=({throttle:e=1e3,skip:r=Lm,key:t=xm,clear:n=Nm,invalidate:a=jm,condition:i=Dm,flagResponseOnCacheHit:o="__cached"}={})=>{const s=new Map,u=new Map,c=new Set,l=v=>{e&&!c.has(v)&&(c.add(v),setTimeout(()=>{c.delete(v)},e))},f=v=>(d,h)=>{const p=t(d,h);let S=a(d,h);if(S&&(S instanceof Array||(S=[S]),S.forEach(R=>{typeof R=="string"?s.delete(R):R instanceof RegExp&&s.forEach((I,g)=>{R.test(g)&&s.delete(g)})})),n(d,h)&&s.clear(),r(d,h))return v(d,h);if(c.has(p)){if(s.has(p)){const R=s.get(p).clone();return o&&Object.defineProperty(R,o,{value:p,enumerable:!1}),Promise.resolve(R)}else if(u.has(p))return new Promise((R,I)=>{u.get(p).push([R,I])})}return u.has(p)||u.set(p,[]),l(p),v(d,h).then(R=>(i(R.clone())&&s.set(p,R.clone()),u.get(p).forEach(([I])=>I(R.clone())),u.delete(p),R)).catch(R=>{throw u.get(p).forEach(([,I])=>I(R)),u.delete(p),R})};return f.cacheResponse=function(v,d){l(v),s.set(v,d)},f.cache=s,f.inflight=u,f.throttling=c,f},Fm=(e,r)=>e*r,Bm=e=>e&&e.ok,Hm=({delayTimer:e=500,delayRamp:r=Fm,maxAttempts:t=10,until:n=Bm,onRetry:a=null,retryOnNetworkError:i=!1,resolveWithLatestResponse:o=!1,skip:s}={})=>u=>(c,l)=>{let f=0;if(s&&s(c,l))return u(c,l);const v=(d,h)=>Promise.resolve(n(d,h)).then(p=>p?d&&o?d:h?Promise.reject(h):d:(f++,!t||f<=t?new Promise(S=>{const R=r(e,f);setTimeout(()=>{typeof a=="function"?Promise.resolve(a({response:d,error:h,url:c,options:l})).then((I={})=>{var g,b;S(u((g=I&&I.url)!==null&&g!==void 0?g:c,(b=I&&I.options)!==null&&b!==void 0?b:l))}):S(u(c,l))},R)}).then(v).catch(S=>{if(!i)throw S;return v(null,S)}):d&&o?d:Promise.reject(h||new Error("Number of attempts exceeded."))));return u(c,l).then(v).catch(d=>{if(!i)throw d;return v(null,d)})},Gm="@sesamy/sdk",Wm="1.23.0";let Vm=class{cache=new Map;get(r){return this.cache.get(r)||null}set(r,t){this.cache.set(r,t)}remove(r){this.cache.delete(r)}clear(){this.cache.clear()}};const Tt="sesamyCacheTimestamp",zm=e=>{const{libraryName:r=Gm,libraryVersion:t=Wm,cache:n}=e,a=n?.storage||new Vm,i=[s=>async(u,c)=>{if(n?.mode===rn.BROWSER){let l;typeof sessionStorage<"u"?(l=sessionStorage.getItem(Tt),l||(l=Date.now().toString(),sessionStorage.setItem(Tt,l))):(l=a.get(Tt),l||(l=Date.now().toString(),a.set(Tt,l)));const f={...c,headers:{...c.headers,"Cache-Timestamp":l}};return s(u,f)}return s(u,c)},s=>async(u,c)=>{const l=await e.tokenProvider();if(l===null)return s(u,c);const f={...c,headers:{...c.headers,Authorization:l}};return s(u,f)},Um()];n?.mode===rn.NORMAL&&i.push(Mm({throttle:300*1e3,skip:(s,u)=>u.method!=="GET"})),i.push(Hm({delayTimer:1e3,delayRamp:(s,u)=>s*u,maxAttempts:3,until:s=>!!(s&&(s.ok||s.status>=400&&s.status<500)),retryOnNetworkError:!1}));const o=or(e.baseUrl).headers({"Content-Type":"application/json","X-Sesamy-Client":`${r}/${t}`,...e.headers}).middlewares(i);return{async request(s,u={}){try{const c=/^https?:\/\//.test(s);let l=o.url(s,c);u.headers&&(l=l.headers(u.headers));const f=(u.method||"GET").toLowerCase();let v;switch(f){case"get":v=l.get();break;case"post":v=l.post(u.body);break;case"put":v=l.put(u.body);break;case"patch":v=l.patch(u.body);break;case"delete":v=l.delete();break;default:v=l.get()}const d=await v.res();if(d.ok&&["post","patch","put","delete"].includes(f)&&vr(),d.status===204)return null;if(!d.ok){const h=await d.text().catch(()=>"Unknown error");throw new Po(d.status,d.statusText,d.url,`API Error ${d.status}: ${h}`,h)}return await d.json()}catch(c){if(c instanceof Po)throw c;const l=c.status||500,f=c.message||"Unknown error",v=`${e.baseUrl}${s}`;throw new Po(l,f,v,`API Error ${l}: ${c.message||"Unknown error"}`,c.message||"Unknown error")}}}},vr=()=>(typeof sessionStorage<"u"&&sessionStorage.removeItem(Tt),"Cache cleared"),St={get:async(e,r)=>e.request(`/profile/${r}`),update:async(e,r,t)=>e.request(`/profile/${r}`,{method:"PATCH",body:JSON.stringify(t)}),checkSpotifyLink:async e=>e.request("/profile/spotify-link"),unlinkSpotify:async e=>e.request("/profile/unlink-spotify",{method:"POST"}),delete:async e=>{await e.request("/profile",{method:"DELETE"})}},Eo={list:async(e,r)=>{const t=new URLSearchParams;r?.type&&t.append("type",r.type),r?.sku&&t.append("sku",r.sku),r?.purchaseOptionId&&t.append("purchase-option-id",r.purchaseOptionId),r?.waitForEntitlementAfter&&t.append("wait-for-entitlement-after",r.waitForEntitlementAfter);const n=t.toString(),a=n?`/entitlements?${n}`:"/entitlements";return e.request(a)},get:async(e,r)=>e.request(`/entitlements/${r}`),getAccess:async(e,r)=>e.request(`/entitlements/${r}/access`)},xf={list:async e=>e.request("/subscriptions"),get:async(e,r)=>e.request(`/subscriptions/${r}`)},Nf={get:async(e,r)=>e.request(`/products/${r}`),autoOnboard:async(e,r)=>e.request(`/products/${r}/auto-onboard`,{method:"POST"})},Km=(e,r)=>{if(!e||!r)return e;const t=new URL(e);return t.hash=`access_token=${r}`,t.toString()},jf=(e,r)=>!e.manageUrl||!r?e:{...e,manageUrl:Km(e.manageUrl,r)},It={list:async e=>e.request("/contracts"),get:async(e,r)=>e.request(`/contracts/${r}`),cancel:async(e,r)=>e.request(`/contracts/${r}/cancel`,{method:"POST"}),createAmendment:async(e,r,t)=>e.request(`/contracts/${r}/amendments`,{method:"POST",body:JSON.stringify(t)}),confirmAmendment:async(e,r,t)=>e.request(`/contracts/${r}/amendments/${t}/confirm`,{method:"POST"})},Ro={get:async e=>e.request("/user-metadata"),set:async(e,r,t)=>{await e.request(`/user-metadata/${r}`,{method:"PUT",body:t})},delete:async(e,r)=>{await e.request(`/user-metadata/${r}`,{method:"DELETE"})}},et={list:async e=>e.request("/tallies"),get:async(e,r)=>e.request(`/tallies/${r}`),update:async(e,r,t)=>e.request(`/tallies/${r}`,{method:"PUT",body:JSON.stringify(t)}),create:async(e,r)=>e.request("/tallies",{method:"POST",body:JSON.stringify(r)}),delete:async(e,r)=>{try{return await e.request(`/tallies/${r}`,{method:"DELETE"}),!0}catch{return!1}},push:async(e,r,t)=>e.request(`/tallies/${r}/push`,{method:"POST",body:JSON.stringify(t)})},To={list:async e=>e.request("/tags"),add:async(e,r)=>{await e.request("/tags",{method:"POST",body:JSON.stringify({tag:r})})},remove:async(e,r)=>{await e.request(`/tags/${r}`,{method:"DELETE"})}},rt={generateCheckoutLink:(e,r)=>{const t=new URL(`${e.apiUrl}/checkouts`);return r.items&&t.searchParams.set("items",JSON.stringify(r.items)),r.email&&t.searchParams.set("email",r.email),r.language&&t.searchParams.set("lang",r.language),r.redirectUrl&&t.searchParams.set("redirect-url",r.redirectUrl),r.giftMode&&t.searchParams.set("gift-mode","true"),r.payerEmail&&t.searchParams.set("payer-email",r.payerEmail),r.requireAddress&&t.searchParams.set("require-address","true"),r.metadata&&Object.entries(r.metadata).forEach(([n,a])=>{t.searchParams.set(`metadata.${n}`,a)}),t.toString()},generateAccountLink:(e,r)=>{const t=r.language||"en",n=new URL(`${e.baseUrl}/account/${encodeURIComponent(t)}/subscriptions/${encodeURIComponent(e.clientId)}${r.contractId?`/${encodeURIComponent(r.contractId)}`:""}`);return n.searchParams.set("sesamy-redirect-url",r.redirectUrl||"/"),n.toString()},generateChangePaymentLink:(e,r)=>{const t=r.language||"en",n=new URL(`${e.baseUrl}/account/${encodeURIComponent(t)}/subscriptions/${encodeURIComponent(e.clientId)}/${encodeURIComponent(r.contractId)}/change-payment-method`);return n.searchParams.set("sesamy-redirect-url",r.redirectUrl||"/"),n.toString()},generateChangePlanLink:(e,r)=>{const t=r.language||"en",n=new URL(`${e.baseUrl}/account/${encodeURIComponent(t)}/subscriptions/${encodeURIComponent(e.clientId)}/${encodeURIComponent(r.contractId)}/edit-plan`);return n.searchParams.set("sesamy-redirect-url",r.redirectUrl||"/"),n.toString()},generateConsumeLink:(e,r)=>{const t=r.language||"en";let n=new URL(`${e.baseUrl}/consume/${encodeURIComponent(t)}/@${encodeURIComponent(e.clientId)}/${encodeURIComponent(r.sku)}`);return r.episodeId?n.href+=`/${encodeURIComponent(r.episodeId)}`:n.href+="/listen",n.searchParams.set("sesamy-redirect-url",r.redirectUrl||"/"),n.toString()}},Oo={generateLink:(e,r)=>{const t=new URL(`${e.apiUrl}/checkouts`);return r.items&&t.searchParams.set("items",JSON.stringify(r.items)),r.email&&t.searchParams.set("email",r.email),r.language&&t.searchParams.set("lang",r.language),r.redirectUrl&&t.searchParams.set("redirect-url",r.redirectUrl),r.giftMode&&t.searchParams.set("gift-mode","true"),r.payerEmail&&t.searchParams.set("payer-email",r.payerEmail),r.requireAddress&&t.searchParams.set("require-address","true"),r.metadata&&Object.entries(r.metadata).forEach(([n,a])=>{t.searchParams.set(`metadata.${n}`,a)}),t.toString()},create:async(e,r)=>e.request("/checkouts",{method:"POST",body:JSON.stringify(r)}),get:async(e,r)=>e.request(`/checkouts/${r}`),update:async(e,r,t)=>e.request(`/checkouts/${r}`,{method:"PATCH",body:JSON.stringify(t)})},Df={list:async e=>e.request("/bills"),get:async(e,r)=>e.request(`/bills/${r}`)},Mf={list:async e=>e.request("/fulfillments"),create:async(e,r)=>e.request("/fulfillments",{method:"POST",body:JSON.stringify(r)})},Jm={get:async(e,r)=>{try{return new URL(r),e.request(r)}catch{return e.request(`/paywalls/${r}`)}}},Ym={list:async e=>e.request("/payment-issues")},Qm={content:async(e,r,t,n,a)=>{const i=new URLSearchParams({url:r});return t&&i.append("selector",t),n&&i.append("cache",n),e.request(`/proxy?${i.toString()}`,a)}},Xm={list:async(e,r)=>{const t=(r?new URLSearchParams({q:r}):new URLSearchParams).toString(),n=t?`/transactions?${t}`:"/transactions";return e.request(n)}},Ff={get:async e=>e.request("/vendor"),list:async e=>e.request("/vendors")},Zm=e=>{const r=zm(e);return{profile:{get:t=>St.get(r,t),update:(t,n)=>St.update(r,t,n),checkSpotifyLink:()=>St.checkSpotifyLink(r),unlinkSpotify:()=>St.unlinkSpotify(r),delete:()=>St.delete(r)},entitlements:{list:t=>Eo.list(r,t),get:t=>Eo.get(r,t),getAccess:t=>Eo.getAccess(r,t)},subscriptions:{list:()=>xf.list(r),get:t=>xf.get(r,t)},products:{get:t=>Nf.get(r,t),autoOnboard:t=>Nf.autoOnboard(r,t)},contracts:{list:async()=>{const t=await It.list(r),n=await e.tokenProvider();if(!n.toLowerCase().startsWith("bearer "))return t;const a=n.substring(7);return t.map(i=>jf(i,a))},get:async t=>{const n=await It.get(r,t),a=await e.tokenProvider();if(!a.toLowerCase().startsWith("bearer "))return n;const i=a.substring(7);return jf(n,i)},cancel:t=>It.cancel(r,t),createAmendment:(t,n)=>It.createAmendment(r,t,n),confirmAmendment:(t,n)=>It.confirmAmendment(r,t,n)},userMetadata:{get:()=>Ro.get(r),set:(t,n)=>Ro.set(r,t,n),delete:t=>Ro.delete(r,t)},tallies:{list:()=>et.list(r),get:t=>et.get(r,t),update:(t,n)=>et.update(r,t,n),create:t=>et.create(r,t),delete:t=>et.delete(r,t),push:(t,n)=>et.push(r,t,n)},tags:{list:()=>To.list(r),add:t=>To.add(r,t),remove:t=>To.remove(r,t)},checkouts:{generateLink:(t,n)=>rt.generateCheckoutLink(t,n),create:t=>Oo.create(r,t),get:t=>Oo.get(r,t),update:(t,n)=>Oo.update(r,t,n)},links:{generateCheckoutLink:(t,n)=>rt.generateCheckoutLink(t,n),generateAccountLink:(t,n)=>rt.generateAccountLink(t,n),generateChangePaymentLink:(t,n)=>rt.generateChangePaymentLink(t,n),generateChangePlanLink:(t,n)=>rt.generateChangePlanLink(t,n),generateConsumeLink:(t,n)=>rt.generateConsumeLink(t,n)},bills:{list:()=>Df.list(r),get:t=>Df.get(r,t)},fulfillments:{list:()=>Mf.list(r),create:t=>Mf.create(r,t)},paywalls:{get:t=>Jm.get(r,t)},paymentIssues:{list:()=>Ym.list(r)},proxy:{content:(t,n,a,i)=>Qm.content(r,t,n,a,i)},transactions:{list:t=>Xm.list(r,t)},vendor:{get:()=>Ff.get(r),list:()=>Ff.list(r)}}},eg="sesamy.com",rg="sesamy.dev",tg="https://sesa.my",Bf="sesamyCacheTimestamp",Hf="sesamyContentReloaded";class ng{get(r){return typeof sessionStorage>"u"?null:sessionStorage.getItem(r)}set(r,t){typeof sessionStorage<"u"&&sessionStorage.setItem(r,t)}remove(r){typeof sessionStorage<"u"&&sessionStorage.removeItem(r)}clear(){}}function ag(e,r){return`${e}.${r==="dev"?rg:eg}`}function ir(e,r){return`https://${ag(e,r)}`}function Qt(){let r=(document.documentElement.getAttribute("lang")??navigator.language??"en").split("-")[0]?.toLowerCase()??"en";return r==="nn"&&(r="nb"),r}function Mo(e){let r;try{r=new URL(e)}catch{return!1}return r.protocol==="http:"||r.protocol==="https:"}function Nv(e,r){if(Mo(e))return{itemSrc:e};const t=e.split(":");if(t.length<2)throw new Error(`Invalid itemSrc format: expected at least 2 segments separated by ':', got ${t.length}`);const[n,a,i]=t;if(!a)throw new Error("Invalid itemSrc format: sku segment is empty");return{sku:`${n}:${a}`,purchaseOption:r||i}}function Gf(e){return e.endsWith("/")?e.slice(0,-1):e}function Wf(e,r){if(!Mo(e)||!Mo(r))return!1;const t=new URL(e),n=new URL(r);return t.origin===n.origin&&Gf(t.pathname)===Gf(n.pathname)}function ig(e,r,t){const n=new URL(`${ir("checkout3",e.environment)}`);r.language&&n.searchParams.set("lang",r.language);let a=r.sku,i=r.purchaseOptionId,o=r.itemSrc;if(r.itemSrc){const l=Nv(r.itemSrc,r.purchaseOptionId);a=l.sku||a,i=l.purchaseOption||i,o=l.itemSrc}a?(n.searchParams.set("sku",a),i&&n.searchParams.set("po-id",i)):o&&n.searchParams.set("url",o),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 s=["_ga","_gid","_fbp","_fbc"];document.cookie.split(";").map(l=>{const[f,v]=l.trim().split("=");return{key:f,value:v}}).filter(l=>s.some(f=>f===l.key)).forEach(l=>{n.searchParams.append(l.key,l.value)});let c=new URL(window.location.href);if(r.redirectUrl)try{c=new URL(r.redirectUrl)}catch{console.warn("Invalid redirect URL provided, using current URL instead:",r.redirectUrl)}return c.searchParams.set("force-refetch-entitlements","true"),r.itemSrc&&c.searchParams.set("sesamy-purchase",r.itemSrc),n.searchParams.set("redirect-url",c.toString()),r.paymentMethodsFilter&&n.searchParams.set("paymentmethods-filter",r.paymentMethodsFilter.flatMap(({provider:l,methods:f})=>f?f.map(v=>`${l}|${v}`):l).join(",")),r.requireAddress&&n.searchParams.set("require-address","true"),r.giftMode&&n.searchParams.set("gift-mode","true"),r.payerEmail&&n.searchParams.set("payer-email",r.payerEmail),r.metadata&&Object.entries(r.metadata).forEach(([l,f])=>{n.searchParams.set(`metadata.${l}`,String(f))}),n}const jv="sesamySignedURLs";function Ps(){const e=sessionStorage.getItem(jv);return e?JSON.parse(e):[]}function Vf(e){const r=Ps();r.push(e),de(`Adding signed URL: ${e}`),sessionStorage.setItem(jv,JSON.stringify(r))}function og(e){const r={};return Object.keys(e).forEach(t=>{const n=e[t];n!=null&&(r[t]=n.toString())}),r}const Fo="sesamyAttribution";function sg(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 ug(e){return Object.keys(e).find(r=>r.startsWith("utm_"))?{utmSource:void 0,utmMedium:void 0,utmCampaign:void 0,...e}:e}function tn(){return sg(Fo)||{}}function Dv(e){if(e===null)localStorage.removeItem(Fo);else{de(`Setting attribution ${JSON.stringify(e)}`);const r=tn()??{},t=og({...r,...ug(e)});localStorage.setItem(Fo,JSON.stringify({value:t}))}}const Es="@sesamy/sesamy-js",Ft="1.99.0",Mv="sesamyFlags";async function Fv(e){try{localStorage.setItem(Mv,JSON.stringify(e))}catch{de("Failed to save flags to localStorage")}}async function Bv(e,r){const t=await Bt();t[e]=r,await Fv(t)}async function Hv(e){return(await Bt())[e]}async function Gv(e){const r=await Bt();e in r&&(delete r[e],await Fv(r))}async function Bt(){try{const e=localStorage.getItem(Mv);return e?JSON.parse(e):{}}catch{return{}}}function Wv(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),u=s.indexOf(i)+1,c=i.tagName.toLowerCase();s.filter(f=>f.tagName.toLowerCase()===c).length>1?a.unshift(`${c}:nth-child(${u})`):a.unshift(c)}i=i.parentElement}return a.join(" > ")}return t(e)}function Vv(e){return e?Object.fromEntries(Object.entries(e).filter(([r,t])=>t!==void 0)):{}}function cg(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}let Me={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"},paywallUrl:{selector:"sesamy-article",attribute:"paywall-url"}},zv=[],Kv=!1,Rr;function Rs(){const e=window.location.pathname,r=new URLSearchParams(window.location.search),t=navigator.userAgent;return zv.find(n=>{if(n.path&&!e.includes(n.path)||n.queryParam&&r.get(n.queryParam.key)!==n.queryParam.value)return!1;if(n.headers){const a=n.headers.name.toLowerCase(),i=n.headers.contains.toLowerCase();if(a==="user-agent"){if(!t.toLowerCase().includes(i))return!1}else return!1}return!(n.userAgentContains&&!t.includes(n.userAgentContains))})}function lg(){return Rs()}function fg(e,r){zv=e.content||[];const t=Rs();t&&t.type==="article"&&(Me={...Me,...Vv(t.selectors)},Kv=t.enablePaywallSettingsUrlFallback||!1),Rr=r}function dg(e,r){const{selector:t,attribute:n}=r;return t===Me.article.selector||n&&e.hasAttribute(n)?e:e.querySelector(t)}function Jv(e,r,t=!1){if(e){if(r.attribute){if(r.attribute==="textContent")return e.textContent??void 0;const n=e.getAttribute(r.attribute),a=Jv(e.parentElement,r,t);if(t){const i=[];return n&&i.push(...n.split(",").map(o=>o.trim()).filter(Boolean)),a&&i.push(...a.split(",").map(o=>o.trim()).filter(Boolean)),i.length>0?[...new Set(i)].join(","):void 0}return n??a}return e.textContent??void 0}}function ge(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 Ot(e){const r=[];return document.head.querySelectorAll(`[property~='${e}'][content]`).forEach(a=>{a.content&&r.push(a.content)}),document.head.querySelectorAll(`[name~='${e}'][content]`).forEach(a=>{a.content&&r.push(a.content)}),r}let Ct=null;function Yv(){const e=[],r=document.querySelectorAll('script[type="application/ld+json"]');for(const t of r)try{const n=JSON.parse(t.textContent||"");Array.isArray(n)?e.push(...n):n["@graph"]&&Array.isArray(n["@graph"])?e.push(...n["@graph"]):e.push(n)}catch{}return e}function _t(e){const r=Yv(),t=n=>!e||n["@type"]===e||Array.isArray(n["@type"])&&n["@type"].includes(e);return r.find(t)||null}function vg(e){const r=Yv(),t=n=>!e||n["@type"]===e||Array.isArray(n["@type"])&&n["@type"].includes(e);return r.filter(t)}function Bo(e,r,t){if(!e||typeof e!="object")return typeof e=="string"?e:void 0;const a=e[r];if(typeof a=="string")return a;if(a&&typeof a=="object"&&t)return a[t]}function hg(e){if(!e)return;const t=(Array.isArray(e)?e:[e]).map(n=>{if(typeof n=="string")return{name:n};if(typeof n=="object"&&n!==null){const a=n,i=a.name;return i?{name:i,url:a.url,image:Bo(a,"image","url"),jobTitle:a.jobTitle,sameAs:a.sameAs}:null}return null}).filter(n=>n!==null&&!!n.name);return t.length>0?t:void 0}function Co(e){if(Array.isArray(e))return e.filter(r=>typeof r=="string");if(typeof e=="string"){const r=e.split(",").map(t=>t.trim()).filter(Boolean);return r.length>0?r:void 0}}function Qv(){if(Ct)return Ct;const e=_t("NewsArticle")||_t("Article")||_t("BlogPosting")||_t("WebPage"),r=(...a)=>a.find(i=>i!=null&&i!=="")||void 0,t=(...a)=>a.find(i=>i&&i.length>0),n={contentType:e?Array.isArray(e["@type"])?e["@type"][0]:e["@type"]:void 0,authors:hg(e?.author)||(Ot("article:author").length>0?Ot("article:author").map(a=>({name:a})):void 0)||(ge("author")?[{name:ge("author")}]:void 0),keywords:t(Co(e?.keywords),Co(ge("keywords"))),tags:Ot("article:tag").length>0?Ot("article:tag"):void 0,categories:Co(ge("news_keywords")),section:r(e?.articleSection,ge("article:section")),publishedAt:r(e?.datePublished,ge("article:published_time")),modifiedAt:r(e?.dateModified,ge("article:modified_time")),ogType:ge("og:type"),ogSiteName:ge("og:site_name"),ogLocale:ge("og:locale"),twitterCard:ge("twitter:card"),twitterSite:ge("twitter:site"),twitterCreator:ge("twitter:creator"),creator:r(ge("creator"),ge("dc.creator")),mainEntityOfPage:e?Bo(e.mainEntityOfPage,"@id")||(typeof e.mainEntityOfPage=="string"?e.mainEntityOfPage:void 0):void 0,isAccessibleForFree:typeof e?.isAccessibleForFree=="boolean"?e.isAccessibleForFree:void 0,wordCount:typeof e?.wordCount=="number"?e.wordCount:void 0,publisher:e?.publisher&&typeof e.publisher=="object"?{name:e.publisher.name||"",url:e.publisher.url,logo:Bo(e.publisher,"logo","url")}:void 0};return Ct=Vv(n),Ct}function pg(){Ct=null}function Ts({publisherContentId:e,key:r,defaultValue:t=""}){const n=e?document.body.querySelector(`sesamy-content-data[id='${e}']`):null,a=r.replace(/-([a-z])/g,(i,o)=>o.toUpperCase());return n?.getAttribute(r)||ge(`sesamy:${r}`)||ge(`sesamy:${a}`)||ge(`og:${r}`)||ge(r)||t}function Xv(){const e=document.querySelectorAll(Me.article.selector);return Array.from(e).map(Ht).filter(r=>r!==null)}function Ht(e){const r=typeof e=="string"?document.querySelector(e):e;if(!r)return null;const t={element:r,selector:typeof e=="string"?e:Wv(r)},n=(i,o,s,u)=>{const{transform:c,collect:l=!1}=u||{},f=dg(r,o),v=Jv(f,o,l),d=Ts({publisherContentId:s,key:cg(String(i))}),h=v||d||void 0;h&&(t[i]=c?c(h):h)};n("id",Me.id),n("title",Me.title,t.id),n("excerpt",Me.excerpt,t.id),n("image",Me.image,t.id),n("price",Me.price,t.id,{transform:i=>{const o=parseFloat(i);return Number.isNaN(o)?void 0:o}}),n("currency",Me.currency,t.id),n("url",Me.url,t.id),n("pass",Me.pass,t.id,{collect:!0}),n("paywallUrl",Me.paywallUrl,t.id),n("accessLevel",Me.accessLevel,t.id,{transform:i=>i||"entitlement"});const a=Rs();if(a&&a.type==="article"&&(a.pass&&(t.pass=t.pass?`${t.pass},${a.pass}`:a.pass),a.price&&!t.price&&(t.price=a.price.amount),a.price?.currency&&!t.currency&&(t.currency=a.price.currency),a.paywallUrl&&!t.paywallUrl&&(t.paywallUrl=a.paywallUrl)),Kv&&!t.paywallUrl){const i=document.querySelector("sesamy-paywall");if(i){const o=i.getAttribute("settings-url");o&&(t.paywallUrl=o)}}return t.url||(t.url=window.location.href),t.metadata=Qv(),t}async function mg(e){const r=Ht(e);if(!r)throw new Error("Could not find article element");if(r.accessLevel==="public")return!0;if(r.accessLevel==="logged-in"&&!r.paywallUrl)return await Rr.auth.isAuthenticated()?!0:null;if(r.paywallUrl&&((await Rr.paywalls.get(r.paywallUrl)).settings.template==="LOGIN"?"logged-in":"entitlement")==="logged-in")return await Rr.auth.isAuthenticated()?!0:null;if(!r.url)throw new Error("Article must have a URL");return await Rr.entitlements.hasAccess(r.url,r.pass?.split(",")||[])||null}async function Zv(e,r){const t=typeof e=="string"?document.querySelector(e):e;if(!t)throw new Error("Could not find element");const n=Ht(t);if(!n?.url)throw new Error("Could not find content for element");const a=await Rr.entitlements.hasAccess(n.url,n.pass?.split(",")||[]);if(!a)throw new Error("User does not have access to the content");let i;if(a.token)i=a.token;else{const s=await Rr.entitlements.access(a.id);if(!s.token)throw new Error("Could not get access token");i=s.token}const o=r||Wv(t.parentElement||t);return Rr.proxy.getContent(i,n.url,o)}function eh(e,r={}){const{closeOnBackdropClick:t=!0,closeOnEscape:n=!0,zIndex:a=2147483647,backdropBlur:i="5px",overlayBackground:o="rgba(0,0,0,0.5)"}=r,s=document.createElement("div");s.setAttribute("data-sesamy-modal","true"),Object.assign(s.style,{position:"fixed",top:"0",left:"0",width:"100vw",height:"100vh",background:o,zIndex:String(a),display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:`blur(${i})`});const u=document.createElement("div");u.setAttribute("data-sesamy-modal-content","true"),typeof e=="string"?u.innerHTML=e:u.appendChild(e),s.appendChild(u);const c=()=>{s.remove(),n&&document.removeEventListener("keydown",l)},l=f=>{f.key==="Escape"&&c()};return t&&s.addEventListener("click",f=>{f.target===s&&c()}),n&&document.addEventListener("keydown",l),document.body.appendChild(s),{element:s,close:c}}function gg(e,r={}){const{position:t="top",fixed:n=!0,zIndex:a=2147483647,autoDismissMs:i,pushContent:o=!1,height:s,transitionDuration:u="0.3s"}=r,c=document.createElement("div");c.setAttribute("data-sesamy-notification-bar","true"),c.setAttribute("data-sesamy-notification-position",t),Object.assign(c.style,{position:n?"fixed":"absolute",[t]:"0",left:"0",width:"100%",zIndex:String(a),boxSizing:"border-box",...s&&{height:s}}),typeof e=="string"?c.innerHTML=e:c.appendChild(e);let l,f,v;const d=()=>{if(v&&clearTimeout(v),o&&s){const h=document.documentElement;h.style.transform=l||"",setTimeout(()=>{c.remove(),h.style.transition=f||""},parseFloat(u)*1e3)}else c.remove()};if(i&&(v=setTimeout(d,i)),o&&s){const h=document.documentElement;l=h.style.transform,f=h.style.transition,h.style.transition=`transform ${u} ease`,c.style.transition=`transform ${u} ease`,t==="top"?(h.style.transform=`translateY(${s})`,c.style.transform=`translateY(-${s})`):(h.style.transform=`translateY(-${s})`,c.style.transform=`translateY(${s})`),document.documentElement.prepend(c)}else document.body.appendChild(c);return{element:c,close:d}}function yg(e){const r=e.endpoint??ir("api2",e.environment),n=Zm({baseUrl:r,tokenProvider:async()=>{if(await dr())try{const L=await fr(!1);return L?`Bearer ${L}`:null}catch{}const m=localStorage.getItem("__anon_id");return`Basic ${btoa(`${e.vendorId||e.clientId}|${m}:`)}`},libraryName:Es,libraryVersion:Ft,vendorId:e.vendorId,cache:{mode:rn.BROWSER,storage:new ng}}),a=m=>async(C,L)=>{let F=sessionStorage.getItem(Bf);F||(F=Date.now().toString(),sessionStorage.setItem(Bf,F));const w={...L,headers:{...L.headers,"Cache-Timestamp":F}};return m(C,w)},i=(m=!0)=>C=>async(L,F)=>{const w=await fr(m);if(!w){if(await dr()){const k={...F,credentials:"include"};return C(L,k)}if(m)throw new Error("No access token available");return C(L,F)}const T={...F,headers:{...F.headers,Authorization:`Bearer ${w}`}};return C(L,T)},o=or(r).headers({"Content-Type":"application/json"}).middlewares([a,i(),wm(),Pm({delayTimer:1e3,delayRamp:(m,C)=>m*C,maxAttempts:3,until:m=>!!(m&&(m.ok||m.status>=400&&m.status<500)),retryOnNetworkError:!1})]);async function s(m={}){const{waitForEntitlementAfter:C,includeSignedLinks:L=!0}=m,F=await dr()?await n.entitlements.list({waitForEntitlementAfter:C?.toISOString()}):[];return L&&F.push(...Ps()),F}async function u(m,C=[]){return(await s())?.find(w=>{if(m){const{sku:T,purchaseOption:k}=Nv(m);if("sku"in w&&T===w.sku||k&&"purchaseOptionsId"in w&&k===w.purchaseOptionsId||Wf(m,w.url))return!0}return!!C.some(T=>Wf(T,w.url))})}async function c(m,C,L){const F=new URL(r,window.location.origin);return F.pathname=F.pathname.replace(/\/$/,"")+"/proxy",F.searchParams.set("url",C),L&&F.searchParams.set("selector",L),or(F.toString()).headers({Authorization:`Bearer ${m}`}).get().text()}async function l(m){if(!m)throw new Error("SKU is required to get fulfillments");return await dr()?await o.get(`/fulfillments?sku=${encodeURIComponent(m)}`).json():[]}async function f(m,C){if(!m||!C)throw new Error("SKU and itemId are required to request delivery");return(await o.post({sku:m},`/fulfillments/${encodeURIComponent(C)}/request-delivery?`).res()).ok}async function v(){return console.warn("getSubscriptions is deprecated, use getContracts instead"),o.get("/subscriptions").json()}async function d(m){return(await n.transactions.list())?.find(L=>L.id===m)}async function h(){return await o.url("/tags").get().json()}async function p(m){const C=await o.url(`/tags/${encodeURIComponent(m)}`).delete().res();return vr(),C.ok}async function S(m){const C=await o.url("/tags").post(encodeURIComponent(m)).res();return Lr(er.USER_ATTRIBUTE_CHANGED,{}),vr(),C.ok}async function R(m){return(await n.tallies.get(m)).value}async function I(){const m=await n.tallies.list(),C={};for(const L of m)C[L.id]=L.value;return C}async function g(m){return await n.tallies.delete(m)}async function b(m,C){return await n.tallies.push(m,C)}async function y(){return await fr(!1)?await o.url("/profile").get().json():null}async function A(m){const C=await o.url("/profile").patch(m).res();return vr(),C.ok}async function $(){return(await o.url("/profile/spotify-link").get().json()).isSpotifyLinked}async function j(){return(await o.url("/profile/unlink-spotify").post().res()).ok}async function G(m){const C=await fr(!1);if(!C)throw new Error("No access token available");const L=new URL(`${ir("access-sync",e.environment)}/spotify/sesamy-callback`);L.searchParams.set("access_token",C),L.searchParams.set("state",m),window.location.href=L.toString()}async function K(m){const C=await o.url(`/products/${encodeURIComponent(m)}/auto-onboard`).post().json();return C.length&&vr(),C}async function re(m,C=3600){const{shortlink:L}=await or(tg).post({url:m,ttl:C}).json();return L}async function x(m){const C=await fr(!1,!0);let L;const F=m.language||Qt(),w=tn();switch(m.target){case"account":L=new URL(`${ir("account",e.environment)}/${encodeURIComponent(m.language||F)}/subscriptions/${encodeURIComponent(e.vendorId||e.clientId)}${m.contractId?`/${encodeURIComponent(m.contractId)}`:""}`),L.searchParams.set("sesamy-redirect-url",m.redirectUrl||window.location.href);break;case"change-payment":L=new URL(`${ir("account",e.environment)}/${encodeURIComponent(m.language||F)}/subscriptions/${encodeURIComponent(e.vendorId||e.clientId)}/${encodeURIComponent(m.contractId)}/change-payment-method`),L.searchParams.set("sesamy-redirect-url",m.redirectUrl||window.location.href);break;case"change-plan":L=new URL(`${ir("account",e.environment)}/${encodeURIComponent(m.language||F)}/subscriptions/${encodeURIComponent(e.vendorId||e.clientId)}/${encodeURIComponent(m.contractId)}/edit-plan`),L.searchParams.set("sesamy-redirect-url",m.redirectUrl||window.location.href);break;case"consume":L=new URL(`${ir("consume",e.environment)}/${encodeURIComponent(m.language||F)}/@${encodeURIComponent(e.vendorId||e.clientId)}/${encodeURIComponent(m.sku)}`),m.episodeId?L.href+=`/${m.episodeId}`:L.href+="/listen",L.searchParams.set("sesamy-redirect-url",m.redirectUrl||window.location.href);break;case"checkout":L=ig(e,{language:F,...m},w);break;default:throw new Error("Invalid target")}return C&&(L.hash=`#access_token=${C}`),m.shorten?re(L.href,m.ttl):L.href}async function M(){const m=await fr(!1),C=new URL(`${ir("account",e.environment)}/subscriptions/${e.vendorId||e.clientId}`);m&&(C.hash=`#access_token=${m}`),window.location.href=C.toString()}async function N(m){const C=tn(),L=["_ga","_gid","_fbp","_fbc"];return document.cookie.split(";").forEach(F=>{const[w,T]=F.trim().split("=");L.includes(w)&&!C[w]&&(C[w]=T)}),n.checkouts.create({language:Qt(),...m,attribution:{...C,...m.attribution}})}return{autoOnboardProduct:K,bills:n.bills,checkouts:{create:N,get:n.checkouts.get,update:n.checkouts.update},content:{list:Xv,get:Ht,getLanguage:Qt,unlock:Zv,getPropertyFromHTML:Ts},contracts:n.contracts,deleteTag:p,deleteTally:g,entitlements:n.entitlements,flags:{get:Hv,set:Bv,list:Bt,delete:Gv},generateLink:x,getProxyContent:c,getEntitlements:s,getFulfillments:l,requestDelivery:f,hasAccess:u,isSpotifyLinked:$,linkSpotify:G,openHostedAccountPage:M,paywalls:n.paywalls,paymentIssues:n.paymentIssues,getProfile:y,products:n.products,getSubscriptions:v,getTally:R,getTallies:I,getTags:h,getTransaction:d,transactions:n.transactions,userMetadata:n.userMetadata,pushTally:b,setTag:S,unlinkSpotify:j,updateProfile:A,vendor:n.vendor}}function zf(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 bg="function",wg="string",Ze="undefined",Sg="boolean",nn="object",Ig="array",Pg="number",Eg="symbol",Rg="null",Ho=function(){},rh="any",th="*",Fr="__",Tg="form",Og="input",Cg="button",_g="select",an=typeof process!==Ze?process:{};an.env&&an.env.NODE_ENV;var _e=typeof document!==Ze;an.versions!=null&&an.versions.node!=null;typeof Deno!==Ze&&Deno.core;_e&&window.name==="nodejs"||typeof navigator!==Ze&&typeof navigator.userAgent!==Ze&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));function nh(e,r){return r.charAt(0)[e]()+r.slice(1)}var Ag=nh.bind(null,"toUpperCase"),kg=nh.bind(null,"toLowerCase");function qg(e){return ah(e)?Ag(Rg):typeof e===nn?xg(e):Object.prototype.toString.call(e).slice(8,-1)}function on(e,r){r===void 0&&(r=!0);var t=qg(e);return r?kg(t):t}function Gt(e,r){return typeof r===e}var Be=Gt.bind(null,bg),Tr=Gt.bind(null,wg),tt=Gt.bind(null,Ze),$g=Gt.bind(null,Sg);Gt.bind(null,Eg);function ah(e){return e===null}function Ug(e){return on(e)===Pg&&!isNaN(e)}function ih(e){return on(e)===Ig}function Fe(e){if(!Lg(e))return!1;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}function Lg(e){return e&&(typeof e===nn||e!==null)}function xg(e){return Be(e.constructor)?e.constructor.name:null}function Ng(e){return e instanceof Error||Tr(e.message)&&e.constructor&&Ug(e.constructor.stackTraceLimit)}function oh(e,r){if(typeof r!="object"||ah(r))return!1;if(r instanceof e)return!0;var t=on(new e(""));if(Ng(r))for(;r;){if(on(r)===t)return!0;r=Object.getPrototypeOf(r)}return!1}oh.bind(null,TypeError);oh.bind(null,SyntaxError);function Tn(e,r){var t=e instanceof Element||e instanceof HTMLDocument;return t&&r?jg(e,r):t}function jg(e,r){return r===void 0&&(r=""),e&&e.nodeName===r.toUpperCase()}function On(e){var r=[].slice.call(arguments,1);return function(){return e.apply(void 0,[].slice.call(arguments).concat(r))}}On(Tn,Tg);On(Tn,Cg);On(Tn,Og);On(Tn,_g);function Dg(e){return e?ih(e)?e:[e]:[]}function Kf(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function Mg(){if(_e){var e=navigator,r=e.languages;return e.userLanguage||(r&&r.length?r[0]:e.language)}}function Fg(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function Bg(e){return(function(r){for(var t,n=Object.create(null),a=/([^&=]+)=?([^&]*)/g;t=a.exec(r);){var i=Kf(t[1]),o=Kf(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 u in n){var c=u.split("[");c.length>1&&(Hg(n,c.map(function(l){return l.replace(/[?[\]\\ ]/g,"")}),n[u]),delete n[u])}return n})((function(r){return _e&&window.location.search.substring(1)})())}function Hg(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 Cn(){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 Gg(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 u=new Date;o||(o=u);var c=r-(u-o);return t=this,n=arguments,c<=0?(clearTimeout(i),i=null,o=u,a=e.apply(t,n)):i||(i=setTimeout(s,c)),a}}var Nr="global",ut=Fr+Nr+Fr,ct=typeof self===nn&&self.self===self&&self||typeof global===nn&&global[Nr]===global&&global||void 0;function Br(e){return ct[ut][e]}function Hr(e,r){return ct[ut][e]=r}function mt(e){delete ct[ut][e]}function gt(e,r,t){var n;try{if(Os(e)){var a=window[e];n=a[r].bind(a)}}catch{}return n||t}ct[ut]||(ct[ut]={});var Wt={};function Os(e){if(typeof Wt[e]!==Ze)return Wt[e];try{var r=window[e];r.setItem(Ze,Ze),r.removeItem(Ze)}catch{return Wt[e]=!1}return Wt[e]=!0}function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},ee.apply(null,arguments)}var Pr="function",hr="undefined",kt="reducer",sh="@@redux/",Go=sh+"INIT",Wg=sh+Math.random().toString(36),Jf=(function(){return typeof Symbol===Pr&&Symbol.observable||"@@observable"})(),Vt=" != "+Pr;function uh(e,r,t){var n;if(typeof r===Pr&&typeof t===hr&&(t=r,r=void 0),typeof t!==hr){if(typeof t!==Pr)throw new Error("enhancer"+Vt);return t(uh)(e,r)}if(typeof e!==Pr)throw new Error(kt+Vt);var a=e,i=r,o=[],s=o,u=!1;function c(){s===o&&(s=o.slice())}function l(){return i}function f(d){if(typeof d!==Pr)throw new Error("Listener"+Vt);var h=!0;return c(),s.push(d),function(){if(h){h=!1,c();var p=s.indexOf(d);s.splice(p,1)}}}function v(d){if(!Fe(d))throw new Error("Act != obj");if(typeof d.type===hr)throw new Error("ActType "+hr);if(u)throw new Error("Dispatch in "+kt);try{u=!0,i=a(i,d)}finally{u=!1}for(var h=o=s,p=0;p<h.length;p++)(0,h[p])();return d}return v({type:Go}),(n={dispatch:v,subscribe:f,getState:l,replaceReducer:function(d){if(typeof d!==Pr)throw new Error("next "+kt+Vt);a=d,v({type:Go})}})[Jf]=function(){var d,h=f;return(d={subscribe:function(p){if(typeof p!="object")throw new TypeError("Observer != obj");function S(){p.next&&p.next(l())}return S(),{unsubscribe:h(S)}}})[Jf]=function(){return this},d},n}function Vg(e,r){var t=r&&r.type;return"action "+(t&&t.toString()||"?")+kt+" "+e+" returns "+hr}function lt(){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 zg(){var e=arguments;return function(r){return function(t,n,a){var i,o=r(t,n,a),s=o.dispatch,u={getState:o.getState,dispatch:function(c){return s(c)}};return i=[].slice.call(e).map(function(c){return c(u)}),ee({},o,{dispatch:s=lt.apply(void 0,i)(o.dispatch)})}}}var Or=Fr+"anon_id",jr=Fr+"user_id",at=Fr+"user_traits",Wo="analytics",Ir="userId",nt="anonymousId",Xt=["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"],Vo=["name","EVENTS","config","loaded"],Z=Xt.reduce(function(e,r){return e[r]=r,e},{registerPluginType:function(e){return"registerPlugin:"+e},pluginReadyType:function(e){return"ready:"+e}}),Yf=/^utm_/,Qf=/^an_prop_/,Xf=/^an_trait_/;function Kg(e){var r=e.storage.setItem;return function(t){return function(n){return function(a){if(a.type===Z.bootstrap){var i=a.params,o=a.user,s=a.persistedUser,u=a.initialUser,c=s.userId===o.userId;s.anonymousId!==o.anonymousId&&r(Or,o.anonymousId),c||r(jr,o.userId),u.traits&&r(at,ee({},c&&s.traits?s.traits:{},u.traits));var l=Object.keys(a.params);if(l.length){var f=i.an_uid,v=i.an_event,d=l.reduce(function(h,p){if(p.match(Yf)||p.match(/^(d|g)clid/)){var S=p.replace(Yf,"");h.campaign[S==="campaign"?"name":S]=i[p]}return p.match(Qf)&&(h.props[p.replace(Qf,"")]=i[p]),p.match(Xf)&&(h.traits[p.replace(Xf,"")]=i[p]),h},{campaign:{},props:{},traits:{}});t.dispatch(ee({type:Z.params,raw:i},d,f?{userId:f}:{})),f&&setTimeout(function(){return e.identify(f,d.traits)},0),v&&setTimeout(function(){return e.track(v,d.props)},0),Object.keys(d.campaign).length&&t.dispatch({type:Z.campaign,campaign:d.campaign})}}return n(a)}}}}function Jg(e){return function(r,t){if(r===void 0&&(r={}),t===void 0&&(t={}),t.type===Z.setItemEnd){if(t.key===Or)return ee({},r,{anonymousId:t.value});if(t.key===jr)return ee({},r,{userId:t.value})}switch(t.type){case Z.identify:return Object.assign({},r,{userId:t.userId,traits:ee({},r.traits,t.traits)});case Z.reset:return[jr,Or,at].forEach(function(n){e.removeItem(n)}),Object.assign({},r,{userId:null,anonymousId:null,traits:{}});default:return r}}}function Zf(e){return{userId:e.getItem(jr),anonymousId:e.getItem(Or),traits:e.getItem(at)}}var zo=function(e){return Fr+"TEMP"+Fr+e};function Yg(e){var r=e.storage,t=r.setItem,n=r.removeItem,a=r.getItem;return function(i){return function(o){return function(s){var u=s.userId,c=s.traits,l=s.options;if(s.type===Z.reset&&([jr,at,Or].forEach(function(d){n(d)}),[Ir,nt,"traits"].forEach(function(d){mt(zo(d))})),s.type===Z.identify){a(Or)||t(Or,Cn());var f=a(jr),v=a(at)||{};f&&f!==u&&i.dispatch({type:Z.userIdChanged,old:{userId:f,traits:v},new:{userId:u,traits:c},options:l}),u&&t(jr,u),c&&t(at,ee({},v,c))}return o(s)}}}}var At={};function ed(e,r){At[e]&&Be(At[e])&&(At[e](r),delete At[e])}function ch(e,r,t){return new Promise(function(n,a){return r()?n(e):t<1?a(ee({},e,{queue:!0})):new Promise(function(i){return setTimeout(i,10)}).then(function(i){return ch(e,r,t-10).then(n,a)})})}function Qg(e){return{abort:e}}function lh(e,r,t){var n={},a=r(),i=e.getState(),o=i.plugins,s=i.queue,u=i.user;if(!i.context.offline&&s&&s.actions&&s.actions.length){var c=s.actions.reduce(function(f,v,d){return o[v.plugin].loaded?(f.process.push(v),f.processIndex.push(d)):(f.requeue.push(v),f.requeueIndex.push(d)),f},{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(c.processIndex&&c.processIndex.length){c.processIndex.forEach(function(f){var v=s.actions[f],d=v.plugin,h=v.payload.type,p=a[d][h];if(p&&Be(p)){var S,R=(function(b,y){return b===void 0&&(b={}),y===void 0&&(y={}),[Ir,nt].reduce(function(A,$){return b.hasOwnProperty($)&&y[$]&&y[$]!==b[$]&&(A[$]=y[$]),A},b)})(v.payload,u),I=n[R.meta.rid];if(!I&&(S=p({payload:R,config:o[d].config,instance:t,abort:Qg}))&&Fe(S)&&S.abort)return void(n[R.meta.rid]=!0);if(!I){var g=h+":"+d;e.dispatch(ee({},R,{type:g,_:{called:g,from:"queueDrain"}}))}}});var l=s.actions.filter(function(f,v){return!~c.processIndex.indexOf(v)});s.actions=l}}}var _o=function(e){var r=e.data,t=e.action,n=e.instance,a=e.state,i=e.allPlugins,o=e.allMatches,s=e.store,u=e.EVENTS;try{var c=a.plugins,l=a.context,f=t.type,v=f.match(it),d=r.exact.map(function(S){return S.pluginName});v&&(d=o.during.map(function(S){return S.pluginName}));var h=(function(S,R){return function(I,g,b){var y=g.config,A=g.name,$=A+"."+I.type;b&&($=b.event);var j=I.type.match(it)?(function(G,K,re,x,M){return function(N,m){var C=x?x.name:G,L=m&&$t(m)?m:re;if(x&&(!(L=m&&$t(m)?m:[G]).includes(G)||L.length!==1))throw new Error("Method "+K+" can only abort "+G+" plugin. "+JSON.stringify(L)+" input valid");return ee({},M,{abort:{reason:N,plugins:L,caller:K,_:C}})}})(A,$,R,b,I):(function(G,K){return function(){throw new Error(G.type+" action not cancellable. Remove abort in "+K)}})(I,$);return{payload:Xg(I),instance:S,config:y||{},abort:j}}})(n,d),p=r.exact.reduce(function(S,R){var I=R.pluginName,g=R.methodName,b=!1;return g.match(/^initialize/)||g.match(/^reset/)||(b=!c[I].loaded),l.offline&&g.match(/^(page|track|identify)/)&&(b=!0),S[""+I]=b,S},{});return Promise.resolve(r.exact.reduce(function(S,R,I){var g=R.pluginName;return Promise.resolve(S).then(function(b){function y(){return Promise.resolve(b)}var A=(function(){if(r.namespaced&&r.namespaced[g])return Promise.resolve(r.namespaced[g].reduce(function($,j,G){return Promise.resolve($).then(function(K){return j.method&&Be(j.method)?((function(N,m){var C=sd(N);if(C&&C.name===m){var L=sd(C.method);throw new Error([m+" plugin is calling method "+N,"Plugins cant call self","Use "+C.method+" "+(L?"or "+L.method:"")+" in "+m+" plugin insteadof "+N].join(`
|
|
3
|
+
`))}})(j.methodName,j.pluginName),Promise.resolve(j.method({payload:K,instance:n,abort:(re=K,x=g,M=j.pluginName,function(N,m){return ee({},re,{abort:{reason:N,plugins:m||[x],caller:f,from:M||x}})}),config:nd(j.pluginName,c,i),plugins:c})).then(function(N){var m=Fe(N)?N:{};return Promise.resolve(ee({},K,m))})):K;var re,x,M})},Promise.resolve(t))).then(function($){b[g]=$});b[g]=t})();return A&&A.then?A.then(y):y()})},Promise.resolve({}))).then(function(S){return Promise.resolve(r.exact.reduce(function(R,I,g){try{var b=r.exact.length===g+1,y=I.pluginName,A=i[y];return Promise.resolve(R).then(function($){var j=S[y]?S[y]:{};if(v&&(j=$),ko(j,y))return Ao({data:j,method:f,instance:n,pluginName:y,store:s}),Promise.resolve($);if(ko($,y))return b&&Ao({data:$,method:f,instance:n,store:s}),Promise.resolve($);if(p.hasOwnProperty(y)&&p[y]===!0)return s.dispatch({type:"queue",plugin:y,payload:j,_:{called:"queue",from:"queueMechanism"}}),Promise.resolve($);var G=h(S[y],i[y]);return Promise.resolve(A[f]({abort:G.abort,payload:j,instance:n,config:nd(y,c,i),plugins:c})).then(function(K){var re=Fe(K)?K:{},x=ee({},$,re),M=S[y];if(ko(M,y))Ao({data:M,method:f,instance:n,pluginName:y,store:s});else{var N=f+":"+y;(N.match(/:/g)||[]).length<2&&!f.match(rd)&&!f.match(td)&&n.dispatch(ee({},v?x:j,{type:N,_:{called:N,from:"submethod"}}))}return Promise.resolve(x)})})}catch($){return Promise.reject($)}},Promise.resolve(t))).then(function(R){if(!(f.match(it)||f.match(/^registerPlugin/)||f.match(td)||f.match(rd)||f.match(/^params/)||f.match(/^userIdChanged/))){if(u.plugins.includes(f),R._&&R._.originalAction===f)return R;var I=ee({},R,{_:{originalAction:R.type,called:R.type,from:"engineEnd"}});fh(R,r.exact.length)&&!f.match(/End$/)&&(I=ee({},I,{type:R.type+"Aborted"})),s.dispatch(I)}return R})})}catch(S){return Promise.reject(S)}},it=/Start$/,rd=/^bootstrap/,td=/^ready/;function Ao(e){var r=e.pluginName,t=e.method+"Aborted"+(r?":"+r:"");e.store.dispatch(ee({},e.data,{type:t,_:{called:t,from:"abort"}}))}function nd(e,r,t){var n=r[e]||t[e];return n&&n.config?n.config:{}}function ad(e,r){return r.reduce(function(t,n){return n[e]?t.concat({methodName:e,pluginName:n.name,method:n[e]}):t},[])}function id(e,r){var t=e.replace(it,""),n=r?":"+r:"";return[""+e+n,""+t+n,t+"End"+n]}function ko(e,r){var t=e.abort;return!!t&&(t===!0||od(t,r)||t&&od(t.plugins,r))}function fh(e,r){var t=e.abort;if(!t)return!1;if(t===!0||Tr(t))return!0;var n=t.plugins;return $t(t)&&t.length===r||$t(n)&&n.length===r}function $t(e){return Array.isArray(e)}function od(e,r){return!(!e||!$t(e))&&e.includes(r)}function sd(e){var r=e.match(/(.*):(.*)/);return!!r&&{method:r[1],name:r[2]}}function Xg(e){return Object.keys(e).reduce(function(r,t){return t==="type"||(r[t]=Fe(e[t])?Object.assign({},e[t]):e[t]),r},{})}function Zg(e,r,t){var n={};return function(a){return function(i){return function(o){try{var s,u=function(b){return s?b:i(f)},c=o.type,l=o.plugins,f=o;if(o.abort)return Promise.resolve(i(o));if(c===Z.enablePlugin&&a.dispatch({type:Z.initializeStart,plugins:l,disabled:[],fromEnable:!0,meta:o.meta}),c===Z.disablePlugin&&setTimeout(function(){return ed(o.meta.rid,{payload:o})},0),c===Z.initializeEnd){var v=r(),d=Object.keys(v),h=d.filter(function(b){return l.includes(b)}).map(function(b){return v[b]}),p=[],S=[],R=o.disabled,I=h.map(function(b){var y=b.loaded,A=b.name,$=b.config;return ch(b,function(){return y({config:$})},1e4).then(function(j){return n[A]||(a.dispatch({type:Z.pluginReadyType(A),name:A,events:Object.keys(b).filter(function(G){return!Vo.includes(G)})}),n[A]=!0),p=p.concat(A),b}).catch(function(j){if(j instanceof Error)throw new Error(j);return S=S.concat(j.name),j})});Promise.all(I).then(function(b){var y={plugins:p,failed:S,disabled:R};setTimeout(function(){d.length===I.length+R.length&&a.dispatch(ee({},{type:Z.ready},y))},0)})}var g=(function(){if(c!==Z.bootstrap)return/^ready:([^:]*)$/.test(c)&&setTimeout(function(){return lh(a,r,e)},0),Promise.resolve((function(b,y,A,$,j){try{var G=Be(y)?y():y,K=b.type,re=K.replace(it,"");if(b._&&b._.called)return Promise.resolve(b);var x=A.getState(),M=(C=G,(L=x.plugins)===void 0&&(L={}),(F=b.options)===void 0&&(F={}),Object.keys(C).filter(function(w){var T=F.plugins||{};return $g(T[w])?T[w]:T.all!==!1&&(!L[w]||L[w].enabled!==!1)}).map(function(w){return C[w]}));K===Z.initializeStart&&b.fromEnable&&(M=Object.keys(x.plugins).filter(function(w){var T=x.plugins[w];return b.plugins.includes(w)&&!T.initialized}).map(function(w){return G[w]}));var N=M.map(function(w){return w.name}),m=(function(w,T){var k=id(w).map(function(H){return ad(H,T)});return T.reduce(function(H,J){var Y=J.name,le=id(w,Y).map(function(Re){return ad(Re,T)}),ne=le[0],ue=le[1],ae=le[2];return ne.length&&(H.beforeNS[Y]=ne),ue.length&&(H.duringNS[Y]=ue),ae.length&&(H.afterNS[Y]=ae),H},{before:k[0],beforeNS:{},during:k[1],duringNS:{},after:k[2],afterNS:{}})})(K,M);return Promise.resolve(_o({action:b,data:{exact:m.before,namespaced:m.beforeNS},state:x,allPlugins:G,allMatches:m,instance:A,store:$,EVENTS:j})).then(function(w){function T(){var J=(function(){if(K.match(it))return Promise.resolve(_o({action:ee({},k,{type:re+"End"}),data:{exact:m.after,namespaced:m.afterNS},state:x,allPlugins:G,allMatches:m,instance:A,store:$,EVENTS:j})).then(function(Y){Y.meta&&Y.meta.hasCallback&&ed(Y.meta.rid,{payload:Y})})})();return J&&J.then?J.then(function(){return w}):w}if(fh(w,N.length))return w;var k,H=(function(){if(K!==re)return Promise.resolve(_o({action:ee({},w,{type:re}),data:{exact:m.during,namespaced:m.duringNS},state:x,allPlugins:G,allMatches:m,instance:A,store:$,EVENTS:j})).then(function(J){k=J});k=w})();return H&&H.then?H.then(T):T()})}catch(w){return Promise.reject(w)}var C,L,F})(o,r,e,a,t)).then(function(b){var y=i(b);return s=1,y})})();return Promise.resolve(g&&g.then?g.then(u):u(g))}catch(b){return Promise.reject(b)}}}}}function ey(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===Z.setItem||a===Z.removeItem){if(n.abort)return t(n);a===Z.setItem?e.setItem(i,o,s):e.removeItem(i,s)}return t(n)}}}}var ry=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 lt.apply(void 0,o)(n)(a)}}}}};function ty(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=ud(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},ee({},r,n)}if(/^initialize:([^:]*)$/.test(t.type)){var u=ud(t.type,Z.initialize),c=e()[u];return c&&u?(n[u]=ee({},r[u],{initialized:!0,loaded:!!c.loaded({config:c.config})}),ee({},r,n)):r}if(/^ready:([^:]*)$/.test(t.type))return n[t.name]=ee({},r[t.name],{loaded:!0}),ee({},r,n);switch(t.type){case Z.disablePlugin:return ee({},r,cd(t.plugins,!1,r));case Z.enablePlugin:return ee({},r,cd(t.plugins,!0,r));default:return r}}}function ud(e,r){return e.substring(r.length+1,e.length)}function cd(e,r,t){return e.reduce(function(n,a){return n[a]=ee({},t[a],{enabled:r}),n},t)}function dh(e){try{return JSON.parse(JSON.stringify(e))}catch{}return e}var ny={last:{},history:[]};function ay(e,r){e===void 0&&(e=ny);var t=r.options,n=r.meta;if(r.type===Z.track){var a=dh(ee({event:r.event,properties:r.properties},Object.keys(t).length&&{options:t},{meta:n}));return ee({},e,{last:a,history:e.history.concat(a)})}return e}var iy={actions:[]};function oy(e,r){e===void 0&&(e=iy);var t=r.payload;switch(r.type){case"queue":var n;return n=t&&t.type&&t.type===Z.identify?[r].concat(e.actions):e.actions.concat(r),ee({},e,{actions:n});case"dequeue":return[];default:return e}}var vh=/#.*$/;function sy(e){var r=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(e);return"/"+(r&&r[3]?r[3].split("?")[0].replace(vh,""):"")}var hh,ph,mh,gh,uy=function(e){if(e===void 0&&(e={}),!_e)return e;var r=document,t=r.title,n=r.referrer,a=window,i=a.location,o=a.innerWidth,s=a.innerHeight,u=i.hash,c=i.search,l=(function(v){var d=(function(){if(_e){for(var h,p=document.getElementsByTagName("link"),S=0;h=p[S];S++)if(h.getAttribute("rel")==="canonical")return h.getAttribute("href")}})();return d?d.match(/\?/)?d:d+v:window.location.href.replace(vh,"")})(c),f={title:t,url:l,path:sy(l),hash:u,search:c,width:o,height:s};return n&&n!==""&&(f.referrer=n),ee({},f,e)},cy={last:{},history:[]};function ly(e,r){e===void 0&&(e=cy);var t=r.options;if(r.type===Z.page){var n=dh(ee({properties:r.properties,meta:r.meta},Object.keys(t).length&&{options:t}));return ee({},e,{last:n,history:e.history.concat(n)})}return e}hh=(function(){if(!_e)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"})(),ph=_e?document.referrer:null,mh=Mg(),gh=Fg();var ld={initialized:!1,sessionId:Cn(),app:null,version:null,debug:!1,offline:!!_e&&!navigator.onLine,os:{name:hh},userAgent:_e?navigator.userAgent:"node",library:{name:Wo,version:"0.13.1"},timezone:gh,locale:mh,campaign:{},referrer:ph};function fy(e,r){e===void 0&&(e=ld);var t=e.initialized,n=r.campaign;switch(r.type){case Z.campaign:return ee({},e,{campaign:n});case Z.offline:return ee({},e,{offline:!0});case Z.online:return ee({},e,{offline:!1});default:return t?e:ee({},ld,e,{initialized:!0})}}var dy=["plugins","reducers","storage"];function vy(e,r,t){if(_e){var n=window[(t?"add":"remove")+"EventListener"];e.split(" ").forEach(function(a){n(a,r)})}}function hy(e){var r=vy.bind(null,"online offline",function(t){return Promise.resolve(!navigator.onLine).then(e)});return r(!0),function(t){return r(!1)}}function yh(){return Hr(Wo,[]),function(e){return function(r,t,n){var a=e(r,t,n),i=a.dispatch;return Object.assign(a,{dispatch:function(o){return ct[ut][Wo].push(o.action||o),i(o)}})}}}function fd(e){return function(){return lt(lt.apply(null,arguments),yh())}}function qo(e){return e?ih(e)?e:[e]:[]}function dd(e,r,t){e===void 0&&(e={});var n,a,i=Cn();return r&&(At[i]=(n=r,a=(function(o){for(var s,u=o||Array.prototype.slice.call(arguments),c=0;c<u.length;c++)if(Be(u[c])){s=u[c];break}return s})(t),function(o){a&&a(o),n(o)})),ee({},e,{rid:i,ts:new Date().getTime()},r?{hasCallback:!0}:{})}function py(e){e===void 0&&(e={});var r=e.reducers||{},t=e.initialUser||{},n=(e.plugins||[]).reduce(function(w,T){if(Be(T))return w.middlewares=w.middlewares.concat(T),w;if(T.NAMESPACE&&(T.name=T.NAMESPACE),!T.name)throw new Error("https://lytics.dev/errors/1");T.config||(T.config={});var k=T.EVENTS?Object.keys(T.EVENTS).map(function(Y){return T.EVENTS[Y]}):[];w.pluginEnabled[T.name]=!(T.enabled===!1||T.config.enabled===!1),delete T.enabled,T.methods&&(w.methods[T.name]=Object.keys(T.methods).reduce(function(Y,le){var ne;return Y[le]=(ne=T.methods[le],function(){for(var ue=Array.prototype.slice.call(arguments),ae=new Array(ne.length),Re=0;Re<ue.length;Re++)ae[Re]=ue[Re];return ae[ae.length]=y,ne.apply({instance:y},ae)}),Y},{}),delete T.methods);var H=Object.keys(T).concat(k),J=new Set(w.events.concat(H));if(w.events=Array.from(J),w.pluginsArray=w.pluginsArray.concat(T),w.plugins[T.name])throw new Error(T.name+"AlreadyLoaded");return w.plugins[T.name]=T,w.plugins[T.name].loaded||(w.plugins[T.name].loaded=function(){return!0}),w},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),a=e.storage?e.storage:{getItem:Br,setItem:Hr,removeItem:mt},i=(function(w){return function(T,k,H){return k.getState("user")[T]||(H&&Fe(H)&&H[T]?H[T]:Zf(w)[T]||Br(zo(T))||null)}})(a),o=n.plugins,s=n.events.filter(function(w){return!Vo.includes(w)}).sort(),u=new Set(s.concat(Xt).filter(function(w){return!Vo.includes(w)})),c=Array.from(u).sort(),l=function(){return o},f=new ry,v=f.addMiddleware,d=f.removeMiddleware,h=f.dynamicMiddlewares,p=function(){throw new Error("Abort disabled inListener")},S=Bg(),R=Zf(a),I=ee({},R,t,S.an_uid?{userId:S.an_uid}:{},S.an_aid?{anonymousId:S.an_aid}:{});I.anonymousId||(I.anonymousId=Cn());var g=ee({enable:function(w,T){return new Promise(function(k){m.dispatch({type:Z.enablePlugin,plugins:qo(w),_:{originalAction:Z.enablePlugin}},k,[T])})},disable:function(w,T){return new Promise(function(k){m.dispatch({type:Z.disablePlugin,plugins:qo(w),_:{originalAction:Z.disablePlugin}},k,[T])})}},n.methods),b=!1,y={identify:function(w,T,k,H){try{var J=Tr(w)?w:null,Y=Fe(w)?w:T,le=k||{},ne=y.user();Hr(zo(Ir),J);var ue=J||Y.userId||i(Ir,y,Y);return Promise.resolve(new Promise(function(ae){m.dispatch(ee({type:Z.identifyStart,userId:ue,traits:Y||{},options:le,anonymousId:ne.anonymousId},ne.id&&ne.id!==J&&{previousId:ne.id}),ae,[T,k,H])}))}catch(ae){return Promise.reject(ae)}},track:function(w,T,k,H){try{var J=Fe(w)?w.event:w;if(!J||!Tr(J))throw new Error("EventMissing");var Y=Fe(w)?w:T||{},le=Fe(k)?k:{};return Promise.resolve(new Promise(function(ne){m.dispatch({type:Z.trackStart,event:J,properties:Y,options:le,userId:i(Ir,y,T),anonymousId:i(nt,y,T)},ne,[T,k,H])}))}catch(ne){return Promise.reject(ne)}},page:function(w,T,k){try{var H=Fe(w)?w:{},J=Fe(T)?T:{};return Promise.resolve(new Promise(function(Y){m.dispatch({type:Z.pageStart,properties:uy(H),options:J,userId:i(Ir,y,H),anonymousId:i(nt,y,H)},Y,[w,T,k])}))}catch(Y){return Promise.reject(Y)}},user:function(w){if(w===Ir||w==="id")return i(Ir,y);if(w===nt||w==="anonId")return i(nt,y);var T=y.getState("user");return w?zf(T,w):T},reset:function(w){return new Promise(function(T){m.dispatch({type:Z.resetStart},T,w)})},ready:function(w){return b&&w({plugins:g,instance:y}),y.on(Z.ready,function(T){w&&w(T),b=!0})},on:function(w,T){if(!w||!Be(T))return!1;if(w===Z.bootstrap)throw new Error(".on disabled for "+w);var k=/Start$|Start:/;if(w==="*"){var H=function(ne){return function(ue){return function(ae){return ae.type.match(k)&&T({payload:ae,instance:y,plugins:o}),ue(ae)}}},J=function(ne){return function(ue){return function(ae){return ae.type.match(k)||T({payload:ae,instance:y,plugins:o}),ue(ae)}}};return v(H,zt),v(J,Kt),function(){d(H,zt),d(J,Kt)}}var Y=w.match(k)?zt:Kt,le=function(ne){return function(ue){return function(ae){return ae.type===w&&T({payload:ae,instance:y,plugins:o,abort:p}),ue(ae)}}};return v(le,Y),function(){return d(le,Y)}},once:function(w,T){if(!w||!Be(T))return!1;if(w===Z.bootstrap)throw new Error(".once disabled for "+w);var k=y.on(w,function(H){T({payload:H.payload,instance:y,plugins:o,abort:p}),k()});return k},getState:function(w){var T=m.getState();return w?zf(T,w):Object.assign({},T)},dispatch:function(w){var T=Tr(w)?{type:w}:w;if(Xt.includes(T.type))throw new Error("reserved action "+T.type);var k=ee({},T,{_:ee({originalAction:T.type},w._||{})});m.dispatch(k)},enablePlugin:g.enable,disablePlugin:g.disable,plugins:g,storage:{getItem:a.getItem,setItem:function(w,T,k){m.dispatch({type:Z.setItemStart,key:w,value:T,options:k})},removeItem:function(w,T){m.dispatch({type:Z.removeItemStart,key:w,options:T})}},setAnonymousId:function(w,T){y.storage.setItem(Or,w,T)},events:{core:Xt,plugins:s}},A=n.middlewares.concat([function(w){return function(T){return function(k){return k.meta||(k.meta=dd()),T(k)}}},h(zt),Zg(y,l,{all:c,plugins:s}),ey(a),Kg(y),Yg(y),h(Kt)]),$={context:fy,user:Jg(a),page:ly,track:ay,plugins:ty(l),queue:oy},j=lt,G=lt;if(_e&&e.debug){var K=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;K&&(j=K({trace:!0,traceLimit:25})),G=function(){return arguments.length===0?yh():Fe(typeof arguments[0])?fd():fd().apply(null,arguments)}}var re,x=(function(w){return Object.keys(w).reduce(function(T,k){return dy.includes(k)||(T[k]=w[k]),T},{})})(e),M=n.pluginsArray.reduce(function(w,T){var k=T.name,H=T.config,J=T.loaded,Y=n.pluginEnabled[k];return w[k]={enabled:Y,initialized:!!Y&&!T.initialize,loaded:!!J({config:H}),config:H},w},{}),N={context:x,user:I,plugins:M},m=uh((function(w){for(var T=Object.keys(w),k={},H=0;H<T.length;H++){var J=T[H];typeof w[J]===Pr&&(k[J]=w[J])}var Y,le=Object.keys(k);try{(function(ne){Object.keys(ne).forEach(function(ue){var ae=ne[ue];if(typeof ae(void 0,{type:Go})===hr||typeof ae(void 0,{type:Wg})===hr)throw new Error(kt+" "+ue+" "+hr)})})(k)}catch(ne){Y=ne}return function(ne,ue){if(ne===void 0&&(ne={}),Y)throw Y;for(var ae=!1,Re={},xe=0;xe<le.length;xe++){var je=le[xe],$e=ne[je],Qe=(0,k[je])($e,ue);if(typeof Qe===hr){var wr=Vg(je,ue);throw new Error(wr)}Re[je]=Qe,ae=ae||Qe!==$e}return ae?Re:ne}})(ee({},$,r)),N,G(j(zg.apply(void 0,A))));m.dispatch=(re=m.dispatch,function(w,T,k){var H=ee({},w,{meta:dd(w.meta,T,qo(k))});return re.apply(null,[H])});var C=Object.keys(o);m.dispatch({type:Z.bootstrap,plugins:C,config:x,params:S,user:I,initialUser:t,persistedUser:R});var L=C.filter(function(w){return n.pluginEnabled[w]}),F=C.filter(function(w){return!n.pluginEnabled[w]});return m.dispatch({type:Z.registerPlugins,plugins:C,enabled:n.pluginEnabled}),n.pluginsArray.map(function(w,T){var k=w.bootstrap,H=w.config,J=w.name;k&&Be(k)&&k({instance:y,config:H,payload:w}),m.dispatch({type:Z.registerPluginType(J),name:J,enabled:n.pluginEnabled[J],plugin:w}),n.pluginsArray.length===T+1&&m.dispatch({type:Z.initializeStart,plugins:L,disabled:F})}),hy(function(w){m.dispatch({type:w?Z.offline:Z.online})}),(function(w,T,k){setInterval(function(){return lh(w,T,k)},3e3)})(m,l,y),y}var zt="before",Kt="after",Dr="cookie",Ur=Sh(),bh=_n,my=_n;function wh(e){return Ur?_n(e,"",-1):mt(e)}function Sh(){if(Ur!==void 0)return Ur;var e=Dr+Dr;try{_n(e,e),Ur=document.cookie.indexOf(e)!==-1,wh(e)}catch{Ur=!1}return Ur}function _n(e,r,t,n,a,i){if(typeof window<"u"){var o=arguments.length>1;return Ur===!1&&(o?Hr(e,r):Br(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 pr="localStorage",gy=Os.bind(null,pr);gt(pr,"getItem",Br);gt(pr,"setItem",Hr);gt(pr,"removeItem",mt);var mr="sessionStorage",yy=Os.bind(null,mr);gt(mr,"getItem",Br);gt(mr,"setItem",Hr);gt(mr,"removeItem",mt);function ot(e){var r=e;try{if((r=JSON.parse(e))==="true")return!0;if(r==="false")return!1;if(Fe(r))return r;parseFloat(r)===r&&(r=parseFloat(r))}catch{}if(r!==null&&r!=="")return r}var by=gy(),wy=yy(),Sy=Sh();function Mr(e,r){if(e){var t=Cs(r),n=!qs(t),a=_s(t)?ot(localStorage.getItem(e)):void 0;if(n&&!tt(a))return a;var i=As(t)?ot(bh(e)):void 0;if(n&&i)return i;var o=ks(t)?ot(sessionStorage.getItem(e)):void 0;if(n&&o)return o;var s=Br(e);return n?s:{localStorage:a,sessionStorage:o,cookie:i,global:s}}}function sn(e,r,t){if(e&&!tt(r)){var n={},a=Cs(t),i=JSON.stringify(r),o=!qs(a);return _s(a)&&(n[pr]=Jt(pr,r,ot(localStorage.getItem(e))),localStorage.setItem(e,i),o)?n[pr]:As(a)&&(n[Dr]=Jt(Dr,r,ot(bh(e))),my(e,i),o)?n[Dr]:ks(a)&&(n[mr]=Jt(mr,r,ot(sessionStorage.getItem(e))),sessionStorage.setItem(e,i),o)?n[mr]:(n[Nr]=Jt(Nr,r,Br(e)),Hr(e,r),o?n[Nr]:n)}}function Iy(e,r){if(e){var t=Cs(r),n=Mr(e,th),a={};return!tt(n.localStorage)&&_s(t)&&(localStorage.removeItem(e),a[pr]=n.localStorage),!tt(n.cookie)&&As(t)&&(wh(e),a[Dr]=n.cookie),!tt(n.sessionStorage)&&ks(t)&&(sessionStorage.removeItem(e),a[mr]=n.sessionStorage),!tt(n.global)&&An(t,Nr)&&(mt(e),a[Nr]=n.global),a}}function Cs(e){return e?Tr(e)?e:e.storage:rh}function _s(e){return by&&An(e,pr)}function As(e){return Sy&&An(e,Dr)}function ks(e){return wy&&An(e,mr)}function qs(e){return e===th||e==="all"}function An(e,r){return e===rh||e===r||qs(e)}function Jt(e,r,t){return{location:e,current:r,previous:t}}var Py={setItem:sn,getItem:Mr,removeItem:Iy};function Ey(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function vd(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 hd(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?vd(Object(t),!0).forEach(function(n){Ey(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vd(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ry(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r={storage:Py};return py(hd(hd({},r),e))}function Ty(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(...u){const c=u[2]?.toString()||"",l=Cy(c);return a!==l&&(a=l,setTimeout(()=>e(c),0)),s.apply(t,u)}})}function Oy(e,r){const t=e.indexOf(r);return t>-1?e.slice(0,t):e}function Cy(e){return["#","?"].forEach(r=>e=Oy(e,r)),e}function _y(){Ty(()=>{lr.page()})}var $o="up",Uo="down";function Ay(e){if(e===void 0&&(e={}),!_e)return Ho;var r=md(),t=Ko(),n=pd(),a=Yt(n,r),i=Yt(t,r),o=[],s=[],u=[],c=n,l=a,f=i,v=Object.keys(e);if(!v.length)return Ho;var d=v.map(function(p){return Number(p)}),h=Gg(function(){var p=md(),S=(function(x,M){return M.map(function(N){return N===100?x-5:x*(N/100)})})(p,d),R=Ko(),I=pd(),g=Yt(I,p),b=Yt(R,p);if(l=g>l?g:l,f=b<f?b:f,!(o.length>=d.length)){var y=c===I,A=$o;y?A="initial":c<=I&&(A=Uo);var $=S,j=d;(A===$o||y)&&($=S.slice().reverse(),j=d.slice().reverse());var G=j.reduce(function(x,M,N){var m=$[N];return u.includes(M)&&I<=m&&(u=u.filter(function(C){return C!==M}),x.singleFunction=M),A===Uo&&!o.includes(M)&&I>=m&&M>i?(s.push(M),x.callbacks=x.callbacks.concat(M),x):A===$o&&!o.includes(M)&&I<=m&&M<=g?(x.foundFunc=[M],x):(y&&I>=m&&x.foundFunc.length===0&&(x.foundFunc=[M]),!s.includes(M)&&I>=m&&(s.push(M),x.singleFunction?u.push(M):x.singleFunction=M),x)},{foundFunc:[],singleFunction:null,callbacks:[],direction:A});if(c=I,A===Uo&&G.callbacks&&G.callbacks.forEach(function(x){Be(e[x])&&(e[x]({trigger:x,direction:A,scrollMin:f,scrollMax:l,range:[f,l]}),o.push(x))}),G.singleFunction){var K=G.singleFunction,re=G.direction;Be(e[K])&&e[K]({trigger:K,direction:re,scrollMin:f,scrollMax:l,range:[f,l]}),o.push(K)}}},500);return window.addEventListener("scroll",h),function(){return window.removeEventListener("scroll",h)}}function Ko(){return _e?document.body.scrollTop||document.documentElement.scrollTop:0}function ky(){return _e?window.innerHeight||document.documentElement.clientHeight:0}function pd(){return Math.round(Ko()+ky())}function md(){if(!_e)return 0;var e=document.body,r=document.documentElement;return Math.max(e.scrollHeight,e.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight)}function Yt(e,r){return Math.round(e/r*100)}var $s="Event",gd=$s+"Listener";function qy(e){return function(r,t,n,a){var i=n||Ho,o=a||!1;if(!_e)return i;var s=un(t),u=un(r,!0);if(!u.length)throw new Error("noElements");if(!s.length)throw new Error("no"+$s);var c=[];return(function l(f){f&&(c=[]);for(var v=f?"add"+gd:"remove"+gd,d=0;d<u.length;d++){var h=u[d];c[d]=f?o&&o.once?$y(i):i:c[d]||i;for(var p=0;p<s.length;p++)h[v]?h["on"+s[p]]=f?c[d]:null:h[v](s[p],c[d],o)}return l.bind(null,!f)})(e)}}function un(e,r){if(Tr(e))return r?un(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=Dg(e);return r?i.map(function(o){return Tr(o)?un(o,!0):o}).flat():i}function $y(e,r){var t;return function(){return e&&(t=e.apply(this,arguments),e=null),t}}var Lo=qy($s);function Ih(e,r){return _e&&Be(window[e])?(t=window[e],n=r,(a=window)===void 0&&(a=null),Be(t)?function(){t.apply(a,arguments),n.apply(a,arguments)}:n):window[e]=r;var t,n,a}Ih.bind(null,"onerror");Ih.bind(null,"onload");var Ph=typeof window>"u",yd="hidden";function Uy(e){if(Ph)return!1;var r=Ly(),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 Ly(){var e=["webkit","moz","ms","o"];return Ph||yd in document?yd:e.reduce(function(r,t){var n=t+"Hidden";return!r&&n in document?n:r},null)}var xy=["mousemove","mousedown","touchmove","touchstart","touchend","keydown"];function Ny(e,r){r===void 0&&(r={});var t=(function(o,s){var u=this,c=!1;return function(l){c||(o.call(u,l),c=!0,setTimeout(function(){return c=!1},s))}})(e,r.throttle||1e4),n=[];function a(){var o=Uy(function(s){s||t({type:"tabVisible"})});return n=[o].concat(xy.map(function(s){return Lo(document,s,t)})).concat(Lo(window,"load",t)).concat(Lo(window,"scroll",t,{capture:!0,passive:!0})),i}function i(){n.map(function(o){return o()})}return a(),function(){return i(),a}}function jy(e){var r,t,n=e.onIdle,a=e.onWakeUp,i=e.onHeartbeat,o=e.timeout,s=o,u=e.throttle,c=u===void 0?2e3:u,l=!1,f=!1,v=new Date,d=function(){return clearTimeout(r)};function h(S){d(),i&&!l&&i(Pt(v),S),a&&l&&(l=!1,a(Pt(t),S),v=new Date),r=setTimeout(function(){l=!0,n&&(t=new Date,n(Pt(v),S))},s)}var p=Ny(h,{throttle:c});return{disable:function(){f=!0,l=!1,d();var S=p();return function(){return f=!1,v=new Date,h({type:"load"}),S()}},getStatus:function(){return{isIdle:l,isDisabled:f,active:l?0:Pt(v,f),idle:l?Pt(t,f):0}}}}function Pt(e,r){return r?0:Math.round((new Date-e)/1e3)}const bd=5e3;class Dy{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),jy({onIdle:t=>this.handleAwake(!1,t),onWakeUp:t=>this.handleAwake(!0,t),timeout:bd}),Ay({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*bd: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 Eh(e){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()}function My(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(u){return n=a.push(u),n>=i&&o(),n},size:function(){return a.length},end:function(u){u&&o(),clearInterval(t)}}}const wd="sesamy_session_id";function Fy(){let e=sessionStorage.getItem(wd);return e||(e=Math.random().toString(36).slice(2,9),sessionStorage.setItem(wd,e)),e}let Rh=!1,Zt,cn,Jo;function Th(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:Jo,requestId:Math.random().toString(36).slice(2,9),sessionId:Fy(),timestamp:new Date().toISOString(),version:Ft,event:r.event,context:{...r.context,page:{url:window.location.href,title:document.title,referrer:document.referrer,itemSrc:ge("sesamy:item-src"),publisherContentId:ge("sesamy:publisher-content-id")},campaign:t,locale:navigator.language,library:Es,userAgent:navigator.userAgent,clientId:Jo}}}))}const Oh=My(async e=>{if(e.length>0){const r=Th(e);Rh?navigator.sendBeacon(cn,r):(await fetch(cn,{method:"POST",body:r,headers:{"Content-Type":"text/plain"}})).ok}},{max:10,interval:3e3});function xo(e){if(e.anonymousId)if(e.properties?.flushing){const r={...e};delete r.properties.flushing,navigator.sendBeacon(cn,Th([r]))}else Oh.push(e)}function By(){return Rh=!0,Oh.flush()}function Hy(e,r,t){Zt=r,cn=`${ir("logs",t)}/events`,Jo=e}const Gy={name:"custom-analytics-plugin",page:({payload:e})=>{if(!Zt)return;const{properties:r,anonymousId:t,userId:n,event:a}=e;xo({anonymousId:t,userId:n,properties:r,event:a,type:"page"})},track:({payload:e})=>{if(!Zt)return;const{properties:r,anonymousId:t,userId:n,event:a}=e;xo({anonymousId:t,userId:n,properties:r,event:a,type:"track"})},identify:({payload:e})=>{if(!Zt)return;const{properties:r,anonymousId:t,userId:n}=e;xo({anonymousId:t,userId:n,properties:r,type:"identify"})}},Sd=["source","medium","campaign","term","content"],Er="utm_",Wy=1800*1e3;function Ch(e){return e?Date.now()-parseInt(e,10)>Wy:!0}function Id(){const e=document.referrer||"";if(!e)return;const r=Mr(`${Er}set_at`);(Ch(r)||!Mr(`${Er}referrer`))&&sn(`${Er}referrer`,e)}function Vy(){const e=()=>{const t={};for(const a of Sd){const i=Mr(`${Er}${a}`);i&&(t[`utm_${a}`]=i)}const n=Mr(`${Er}referrer`);return n&&(t.utm_referrer=n),t};return{name:"attribution-tracking",initialize(){Id()},campaign({payload:t}){const n=t?.campaign||{},a=Mr(`${Er}set_at`);if(Object.keys(n).length>0&&Ch(a)){for(const o of Sd){const s=n[o];s&&sn(`${Er}${o}`,s)}sn(`${Er}set_at`,String(Date.now()))}Id()},page({payload:t}){return t.properties.campaign=e(),t},track({payload:t}){return t.properties.campaign=e(),t},getStoredCampaignData:e}}const zy=Vy(),Pd=new Map,Ed=new Map;function Ky({clientId:e,enabled:r=!0,environment:t}){Hy(e,r,t),r&&(window.addEventListener("beforeunload",()=>{Ed.forEach((n,a)=>{n.bind(a)()}),By()}),window.addEventListener("visibilitychange",()=>{document.visibilityState!=="visible"&&Pd.forEach((n,a)=>{n.bind(a)()})}),_y(),Eh(()=>{const n=new Dy({element:document.body,viewCallback:()=>{lr.page()},activeDurationCallback:(a,i,o)=>{lr.track("activeDuration",{duration:a,durationStart:o,flushing:i})},idleDurationCallback:(a,i,o)=>{lr.track("idleDuration",{duration:a,durationStart:o,flushing:i})},scrollCallback:a=>{lr.track("scroll",{scroll:a.scrollMax})}});Ed.set(document.body,()=>{n.flush()}),Pd.set(document.body,()=>{n.handleVisibilityChange()})}),window.addEventListener(er.AUTHENTICATED,async n=>{const a=n;await lr.identify(a.detail.sub)}),window.addEventListener(er.LOGOUT,async()=>{await lr.track("logout",{}),await lr.reset()}))}const lr=Ry({app:Es,version:Ft,plugins:[zy,Gy]});function _h(e,r){lr.track(e,r)}const Jy=["AdHeader","AdContainer","AD_Top","homead","ad-lead"];function Ah(){return new Promise(e=>{const r=Jy.map(t=>{const n=document.createElement("div");return n.innerHTML=" ",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 kh(){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}}/*!
|
|
4
4
|
*
|
|
5
5
|
* detectIncognito v1.6.2
|
|
6
6
|
*
|
|
@@ -139,7 +139,7 @@ CAUSE: `+d.stack,y.response=g,y.status=g.status,y.url=f,g.type==="opaque")throw
|
|
|
139
139
|
<button class="btn-primary" data-action="send">Send Diagnostics</button>
|
|
140
140
|
</div>
|
|
141
141
|
<div class="status" style="display: none;"></div>
|
|
142
|
-
`,e}function Nh(e){return new Promise(r=>{const t=ob(),{close:n}=eh(t,{closeOnBackdropClick:!1,closeOnEscape:!0}),a=t.querySelector('[data-action="cancel"]'),i=t.querySelector('[data-action="send"]'),o=t.querySelector(".status"),s=(u,c)=>{o.style.display="block",o.className=`status ${c}`,c==="loading"?o.innerHTML=`<span class="spinner"></span>${u}`:o.textContent=u};a.addEventListener("click",()=>{n(),r({sent:!1})}),i.addEventListener("click",async()=>{i.disabled=!0,a.disabled=!0,s("Collecting diagnostics...","loading");try{const u=await xh(e);s("Sending diagnostics...","loading");const c=await ab(u,e.environment,e.clientId);s("Diagnostics sent successfully!","success"),setTimeout(()=>{n(),r({sent:!0,id:c.id})},1500)}catch(u){de(`Failed to send diagnostics: ${u.message}`),s(`Failed to send: ${u.message}`,"error"),i.disabled=!1,a.disabled=!1}})})}async function sb(e){const r=new URLSearchParams(window.location.search);if(r.get(Td)?.toLowerCase()!=="true")return;const n=r.get(Od);n&&(e.fallbackId=n),de("User diagnostics requested via query parameter");const a=new URL(window.location.href);a.searchParams.delete(Td),a.searchParams.delete(Od),window.history.replaceState(null,"",a);const i=await Nh(e);i.sent?de(`Diagnostics sent with ID: ${i.id}`):de("User cancelled diagnostics")}async function ub(e){return Nh(e)}function cb(e){const{autoOnboardProduct:r,bills:t,checkouts:n,contracts:a,deleteTag:i,deleteTally:o,entitlements:s,generateLink:u,getEntitlements:c,getFulfillments:l,getProfile:f,getProxyContent:v,getSubscriptions:d,getTags:h,getTally:p,getTallies:S,getTransaction:R,hasAccess:I,isSpotifyLinked:g,linkSpotify:b,openHostedAccountPage:y,paywalls:A,paymentIssues
|
|
142
|
+
`,e}function Nh(e){return new Promise(r=>{const t=ob(),{close:n}=eh(t,{closeOnBackdropClick:!1,closeOnEscape:!0}),a=t.querySelector('[data-action="cancel"]'),i=t.querySelector('[data-action="send"]'),o=t.querySelector(".status"),s=(u,c)=>{o.style.display="block",o.className=`status ${c}`,c==="loading"?o.innerHTML=`<span class="spinner"></span>${u}`:o.textContent=u};a.addEventListener("click",()=>{n(),r({sent:!1})}),i.addEventListener("click",async()=>{i.disabled=!0,a.disabled=!0,s("Collecting diagnostics...","loading");try{const u=await xh(e);s("Sending diagnostics...","loading");const c=await ab(u,e.environment,e.clientId);s("Diagnostics sent successfully!","success"),setTimeout(()=>{n(),r({sent:!0,id:c.id})},1500)}catch(u){de(`Failed to send diagnostics: ${u.message}`),s(`Failed to send: ${u.message}`,"error"),i.disabled=!1,a.disabled=!1}})})}async function sb(e){const r=new URLSearchParams(window.location.search);if(r.get(Td)?.toLowerCase()!=="true")return;const n=r.get(Od);n&&(e.fallbackId=n),de("User diagnostics requested via query parameter");const a=new URL(window.location.href);a.searchParams.delete(Td),a.searchParams.delete(Od),window.history.replaceState(null,"",a);const i=await Nh(e);i.sent?de(`Diagnostics sent with ID: ${i.id}`):de("User cancelled diagnostics")}async function ub(e){return Nh(e)}function cb(e){const{autoOnboardProduct:r,bills:t,checkouts:n,contracts:a,deleteTag:i,deleteTally:o,entitlements:s,generateLink:u,getEntitlements:c,getFulfillments:l,getProfile:f,getProxyContent:v,getSubscriptions:d,getTags:h,getTally:p,getTallies:S,getTransaction:R,hasAccess:I,isSpotifyLinked:g,linkSpotify:b,openHostedAccountPage:y,paywalls:A,paymentIssues:$,products:j,pushTally:G,requestDelivery:K,setTag:re,transactions:x,unlinkSpotify:M,updateProfile:N,userMetadata:m,vendor:C}=yg(e),L=()=>$.list(),T={analytics:{track:_h},attribution:{get:tn,set:Dv},auth:{getUser:f,getTokenSilently:fr,isAuthenticated:dr,loginWithRedirect:Is,loginWithPopup:pm,login:hm,logout:mm,setToken:Do},bills:t,browser:{detectAdblock:Ah,isInAppBrowser:kh,isIncognito:qh},checkouts:n,clearCache:vr,content:{list:Xv,get:Ht,getLanguage:Qt,hasAccess:mg,unlock:Zv,getPropertyFromHTML:Ts,showModal:eh,showNotificationBar:gg},contracts:a,diagnostics:{send:k=>ub({clientId:e.clientId||e.vendorId,environment:e.environment,fallbackId:k,getProfile:()=>f(),getEntitlements:()=>c(),getContracts:()=>a.list(),getTags:()=>h(),getTallies:()=>S()}),collect:k=>xh({clientId:e.clientId||e.vendorId,environment:e.environment,fallbackId:k,getProfile:()=>f(),getEntitlements:()=>c(),getContracts:()=>a.list(),getTags:()=>h(),getTallies:()=>S()})},entitlements:{...s,access:async k=>{try{const J=(await c()).find(Y=>Y.id===k||Y.sku===k);if(J?.token&&J?.url)return{id:J.id,url:J.url,token:J.token}}catch{}return s.getAccess(k)},hasAccess:I,list:c,signedLinks:Ps},events:{emit:Xy,cancel:Zy},flags:{get:Hv,set:Bv,list:Bt,delete:Gv},fulfillments:{list:l,requestDelivery:K},generateLink:u,getPaymentIssues:L,getVersion:lb,isReady:()=>exports.isInitialized,log:de,paywalls:A,paymentIssues:$,products:{...j,autoOnboard:r,linkSpotify:b},profile:{get:f,isSpotifyLinked:g,openHostedAccountPage:y,unlinkSpotify:M,update:N},proxy:{getContent:v},subscriptions:{list:d},tags:{delete:i,list:h,set:re},tallies:{delete:o,get:p,list:S,push:G},transactions:{...x,get:R},userMetadata:m,vendor:C,setToken:Do};return e.namespace&&typeof window<"u"&&(window[e.namespace]=T),T}function lb(){return Ft}function fb(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=`
|
|
143
143
|
${r.selector}::before {
|
|
144
144
|
content: '';
|
|
145
145
|
position: absolute;
|