"use strict";(()=>{var Zo=Object.create;var lr=Object.defineProperty;var ec=Object.getOwnPropertyDescriptor;var tc=Object.getOwnPropertyNames;var nc=Object.getPrototypeOf,rc=Object.prototype.hasOwnProperty;var d=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ic=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of tc(t))!rc.call(e,i)&&i!==n&&lr(e,i,{get:()=>t[i],enumerable:!(r=ec(t,i))||r.enumerable});return e};var $=(e,t,n)=>(n=e!=null?Zo(nc(e)):{},ic(t||!e||!e.__esModule?lr(n,"default",{value:e,enumerable:!0}):n,e));var L=d((Cf,ur)=>{var sc=ur.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=sc)});var O=d((Rf,dr)=>{var ac=dr.exports={version:"2.6.12"};typeof __e=="number"&&(__e=ac)});var K=d((Of,fr)=>{fr.exports=function(e){return typeof e=="object"?e!==null:typeof e=="function"}});var F=d((Mf,pr)=>{var oc=K();pr.exports=function(e){if(!oc(e))throw TypeError(e+" is not an object!");return e}});var Ge=d((Df,mr)=>{mr.exports=function(e){try{return!!e()}catch{return!0}}});var z=d((Pf,yr)=>{yr.exports=!Ge()(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})});var $e=d((kf,gr)=>{var hr=K(),Dt=L().document,cc=hr(Dt)&&hr(Dt.createElement);gr.exports=function(e){return cc?Dt.createElement(e):{}}});var Ar=d((qf,vr)=>{vr.exports=!z()&&!Ge()(function(){return Object.defineProperty($e()("div"),"a",{get:function(){return 7}}).a!=7})});var Er=d((jf,Tr)=>{var Ke=K();Tr.exports=function(e,t){if(!Ke(e))return e;var n,r;if(t&&typeof(n=e.toString)=="function"&&!Ke(r=n.call(e))||typeof(n=e.valueOf)=="function"&&!Ke(r=n.call(e))||!t&&typeof(n=e.toString)=="function"&&!Ke(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}});var Ee=d(Ir=>{var br=F(),lc=Ar(),uc=Er(),dc=Object.defineProperty;Ir.f=z()?Object.defineProperty:function(t,n,r){if(br(t),n=uc(n,!0),br(r),lc)try{return dc(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}});var Pt=d((Nf,xr)=>{xr.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var Y=d((Ff,_r)=>{var fc=Ee(),pc=Pt();_r.exports=z()?function(e,t,n){return fc.f(e,t,pc(1,n))}:function(e,t,n){return e[t]=n,e}});var be=d((Uf,Sr)=>{var mc={}.hasOwnProperty;Sr.exports=function(e,t){return mc.call(e,t)}});var ze=d((Vf,Lr)=>{var yc=0,hc=Math.random();Lr.exports=function(e){return"Symbol(".concat(e===void 0?"":e,")_",(++yc+hc).toString(36))}});var Ye=d((Bf,wr)=>{wr.exports=!1});var Je=d((Qf,Mr)=>{var gc=O(),Cr=L(),Rr="__core-js_shared__",Or=Cr[Rr]||(Cr[Rr]={});(Mr.exports=function(e,t){return Or[e]||(Or[e]=t!==void 0?t:{})})("versions",[]).push({version:gc.version,mode:Ye()?"pure":"global",copyright:"\xA9 2020 Denis Pushkarev (zloirock.ru)"})});var Pr=d((Wf,Dr)=>{Dr.exports=Je()("native-function-to-string",Function.toString)});var ie=d((Gf,jr)=>{var vc=L(),Xe=Y(),kr=be(),kt=ze()("src"),qt=Pr(),qr="toString",Ac=(""+qt).split(qr);O().inspectSource=function(e){return qt.call(e)};(jr.exports=function(e,t,n,r){var i=typeof n=="function";i&&(kr(n,"name")||Xe(n,"name",t)),e[t]!==n&&(i&&(kr(n,kt)||Xe(n,kt,e[t]?""+e[t]:Ac.join(String(t)))),e===vc?e[t]=n:r?e[t]?e[t]=n:Xe(e,t,n):(delete e[t],Xe(e,t,n)))})(Function.prototype,qr,function(){return typeof this=="function"&&this[kt]||qt.call(this)})});var Ie=d(($f,Hr)=>{Hr.exports=function(e){if(typeof e!="function")throw TypeError(e+" is not a function!");return e}});var xe=d((Kf,Nr)=>{var Tc=Ie();Nr.exports=function(e,t,n){if(Tc(e),t===void 0)return e;switch(n){case 1:return function(r){return e.call(t,r)};case 2:return function(r,i){return e.call(t,r,i)};case 3:return function(r,i,s){return e.call(t,r,i,s)}}return function(){return e.apply(t,arguments)}}});var U=d((zf,Ur)=>{var se=L(),Ze=O(),Ec=Y(),bc=ie(),Fr=xe(),jt="prototype",S=function(e,t,n){var r=e&S.F,i=e&S.G,s=e&S.S,o=e&S.P,c=e&S.B,l=i?se:s?se[t]||(se[t]={}):(se[t]||{})[jt],u=i?Ze:Ze[t]||(Ze[t]={}),p=u[jt]||(u[jt]={}),f,m,A,q;i&&(n=t);for(f in n)m=!r&&l&&l[f]!==void 0,A=(m?l:n)[f],q=c&&m?Fr(A,se):o&&typeof A=="function"?Fr(Function.call,A):A,l&&bc(l,f,A,e&S.U),u[f]!=A&&Ec(u,f,q),o&&p[f]!=A&&(p[f]=A)};se.core=Ze;S.F=1;S.G=2;S.S=4;S.P=8;S.B=16;S.W=32;S.U=64;S.R=128;Ur.exports=S});var ae=d((Yf,Vr)=>{var Ic={}.toString;Vr.exports=function(e){return Ic.call(e).slice(8,-1)}});var Ht=d((Jf,Br)=>{var xc=ae();Br.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return xc(e)=="String"?e.split(""):Object(e)}});var _e=d((Xf,Qr)=>{Qr.exports=function(e){if(e==null)throw TypeError("Can't call method on  "+e);return e}});var et=d((Zf,Wr)=>{var _c=Ht(),Sc=_e();Wr.exports=function(e){return _c(Sc(e))}});var tt=d((ep,Gr)=>{var Lc=Math.ceil,wc=Math.floor;Gr.exports=function(e){return isNaN(e=+e)?0:(e>0?wc:Lc)(e)}});var Nt=d((tp,$r)=>{var Cc=tt(),Rc=Math.min;$r.exports=function(e){return e>0?Rc(Cc(e),9007199254740991):0}});var zr=d((np,Kr)=>{var Oc=tt(),Mc=Math.max,Dc=Math.min;Kr.exports=function(e,t){return e=Oc(e),e<0?Mc(e+t,0):Dc(e,t)}});var Ft=d((rp,Yr)=>{var Pc=et(),kc=Nt(),qc=zr();Yr.exports=function(e){return function(t,n,r){var i=Pc(t),s=kc(i.length),o=qc(r,s),c;if(e&&n!=n){for(;s>o;)if(c=i[o++],c!=c)return!0}else for(;s>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}}});var I=d((ip,Xr)=>{var Ut=Je()("wks"),jc=ze(),Vt=L().Symbol,Jr=typeof Vt=="function",Hc=Xr.exports=function(e){return Ut[e]||(Ut[e]=Jr&&Vt[e]||(Jr?Vt:jc)("Symbol."+e))};Hc.store=Ut});var Wt=d((sp,Zr)=>{var Bt=I()("unscopables"),Qt=Array.prototype;Qt[Bt]==null&&Y()(Qt,Bt,{});Zr.exports=function(e){Qt[Bt][e]=!0}});var ti=d(()=>{"use strict";var ei=U(),Nc=Ft()(!0);ei(ei.P,"Array",{includes:function(t){return Nc(this,t,arguments.length>1?arguments[1]:void 0)}});Wt()("includes")});var ri=d((cp,ni)=>{ti();ni.exports=O().Array.includes});var nt=d((lp,si)=>{var ii=Je()("keys"),Fc=ze();si.exports=function(e){return ii[e]||(ii[e]=Fc(e))}});var ci=d((up,oi)=>{var ai=be(),Uc=et(),Vc=Ft()(!1),Bc=nt()("IE_PROTO");oi.exports=function(e,t){var n=Uc(e),r=0,i=[],s;for(s in n)s!=Bc&&ai(n,s)&&i.push(s);for(;t.length>r;)ai(n,s=t[r++])&&(~Vc(i,s)||i.push(s));return i}});var Gt=d((dp,li)=>{li.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")});var rt=d((fp,ui)=>{var Qc=ci(),Wc=Gt();ui.exports=Object.keys||function(t){return Qc(t,Wc)}});var fi=d(di=>{di.f=Object.getOwnPropertySymbols});var mi=d(pi=>{pi.f={}.propertyIsEnumerable});var $t=d((yp,yi)=>{var Gc=_e();yi.exports=function(e){return Object(Gc(e))}});var vi=d((hp,gi)=>{"use strict";var $c=z(),hi=rt(),Kc=fi(),zc=mi(),Yc=$t(),Jc=Ht(),it=Object.assign;gi.exports=!it||Ge()(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(i){t[i]=i}),it({},e)[n]!=7||Object.keys(it({},t)).join("")!=r})?function(t,n){for(var r=Yc(t),i=arguments.length,s=1,o=Kc.f,c=zc.f;i>s;)for(var l=Jc(arguments[s++]),u=o?hi(l).concat(o(l)):hi(l),p=u.length,f=0,m;p>f;)m=u[f++],(!$c||c.call(l,m))&&(r[m]=l[m]);return r}:it});var Ai=d(()=>{var Kt=U();Kt(Kt.S+Kt.F,"Object",{assign:vi()})});var Ei=d((Ap,Ti)=>{Ai();Ti.exports=O().Object.assign});var st=d((Tp,bi)=>{var zt=ae(),Xc=I()("toStringTag"),Zc=zt(function(){return arguments}())=="Arguments",el=function(e,t){try{return e[t]}catch{}};bi.exports=function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=el(t=Object(e),Xc))=="string"?n:Zc?zt(t):(r=zt(t))=="Object"&&typeof t.callee=="function"?"Arguments":r}});var xi=d(()=>{"use strict";var tl=st(),Ii={};Ii[I()("toStringTag")]="z";Ii+""!="[object z]"&&ie()(Object.prototype,"toString",function(){return"[object "+tl(this)+"]"},!0)});var Si=d((Ip,_i)=>{var nl=tt(),rl=_e();_i.exports=function(e){return function(t,n){var r=String(rl(t)),i=nl(n),s=r.length,o,c;return i<0||i>=s?e?"":void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===s||(c=r.charCodeAt(i+1))<56320||c>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(c-56320)+65536)}}});var oe=d((xp,Li)=>{Li.exports={}});var Ci=d((_p,wi)=>{var il=Ee(),sl=F(),al=rt();wi.exports=z()?Object.defineProperties:function(t,n){sl(t);for(var r=al(n),i=r.length,s=0,o;i>s;)il.f(t,o=r[s++],n[o]);return t}});var Yt=d((Sp,Oi)=>{var Ri=L().document;Oi.exports=Ri&&Ri.documentElement});var Pi=d((Lp,Di)=>{var ol=F(),cl=Ci(),Mi=Gt(),ll=nt()("IE_PROTO"),Jt=function(){},Xt="prototype",at=function(){var e=$e()("iframe"),t=Mi.length,n="<",r=">",i;for(e.style.display="none",Yt().appendChild(e),e.src="javascript:",i=e.contentWindow.document,i.open(),i.write(n+"script"+r+"document.F=Object"+n+"/script"+r),i.close(),at=i.F;t--;)delete at[Xt][Mi[t]];return at()};Di.exports=Object.create||function(t,n){var r;return t!==null?(Jt[Xt]=ol(t),r=new Jt,Jt[Xt]=null,r[ll]=t):r=at(),n===void 0?r:cl(r,n)}});var ot=d((wp,qi)=>{var ul=Ee().f,dl=be(),ki=I()("toStringTag");qi.exports=function(e,t,n){e&&!dl(e=n?e:e.prototype,ki)&&ul(e,ki,{configurable:!0,value:t})}});var Ni=d((Cp,Hi)=>{"use strict";var fl=Pi(),pl=Pt(),ml=ot(),ji={};Y()(ji,I()("iterator"),function(){return this});Hi.exports=function(e,t,n){e.prototype=fl(ji,{next:pl(1,n)}),ml(e,t+" Iterator")}});var Vi=d((Rp,Ui)=>{var yl=be(),hl=$t(),Fi=nt()("IE_PROTO"),gl=Object.prototype;Ui.exports=Object.getPrototypeOf||function(e){return e=hl(e),yl(e,Fi)?e[Fi]:typeof e.constructor=="function"&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?gl:null}});var tn=d((Op,Ki)=>{"use strict";var Bi=Ye(),Zt=U(),vl=ie(),Qi=Y(),Wi=oe(),Al=Ni(),Tl=ot(),El=Vi(),Se=I()("iterator"),en=!([].keys&&"next"in[].keys()),bl="@@iterator",Gi="keys",ct="values",$i=function(){return this};Ki.exports=function(e,t,n,r,i,s,o){Al(n,t,r);var c=function(G){if(!en&&G in f)return f[G];switch(G){case Gi:return function(){return new n(this,G)};case ct:return function(){return new n(this,G)}}return function(){return new n(this,G)}},l=t+" Iterator",u=i==ct,p=!1,f=e.prototype,m=f[Se]||f[bl]||i&&f[i],A=m||c(i),q=i?u?c("entries"):A:void 0,Qe=t=="Array"&&f.entries||m,y,We,re;if(Qe&&(re=El(Qe.call(new e)),re!==Object.prototype&&re.next&&(Tl(re,l,!0),!Bi&&typeof re[Se]!="function"&&Qi(re,Se,$i))),u&&m&&m.name!==ct&&(p=!0,A=function(){return m.call(this)}),(!Bi||o)&&(en||p||!f[Se])&&Qi(f,Se,A),Wi[t]=A,Wi[l]=$i,i)if(y={values:u?A:c(ct),keys:s?A:c(Gi),entries:q},o)for(We in y)We in f||vl(f,We,y[We]);else Zt(Zt.P+Zt.F*(en||p),t,y);return y}});var zi=d(()=>{"use strict";var Il=Si()(!0);tn()(String,"String",function(e){this._t=String(e),this._i=0},function(){var e=this._t,t=this._i,n;return t>=e.length?{value:void 0,done:!0}:(n=Il(e,t),this._i+=n.length,{value:n,done:!1})})});var Ji=d((Pp,Yi)=>{Yi.exports=function(e,t){return{value:t,done:!!e}}});var es=d((kp,Zi)=>{"use strict";var nn=Wt(),lt=Ji(),Xi=oe(),xl=et();Zi.exports=tn()(Array,"Array",function(e,t){this._t=xl(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,lt(1)):t=="keys"?lt(0,n):t=="values"?lt(0,e[n]):lt(0,[n,e[n]])},"values");Xi.Arguments=Xi.Array;nn("keys");nn("values");nn("entries")});var us=d(()=>{var ts=es(),_l=rt(),Sl=ie(),Ll=L(),ns=Y(),cs=oe(),ls=I(),rs=ls("iterator"),is=ls("toStringTag"),ss=cs.Array,as={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1};for(rn=_l(as),ut=0;ut<rn.length;ut++)if(Le=rn[ut],os=as[Le],sn=Ll[Le],V=sn&&sn.prototype,V&&(V[rs]||ns(V,rs,ss),V[is]||ns(V,is,Le),cs[Le]=ss,os))for(we in ts)V[we]||Sl(V,we,ts[we],!0);var Le,os,sn,V,we,rn,ut});var fs=d((Hp,ds)=>{ds.exports=function(e,t,n,r){if(!(e instanceof t)||r!==void 0&&r in e)throw TypeError(n+": incorrect invocation!");return e}});var ys=d((Np,ms)=>{var ps=F();ms.exports=function(e,t,n,r){try{return r?t(ps(n)[0],n[1]):t(n)}catch(s){var i=e.return;throw i!==void 0&&ps(i.call(e)),s}}});var gs=d((Fp,hs)=>{var wl=oe(),Cl=I()("iterator"),Rl=Array.prototype;hs.exports=function(e){return e!==void 0&&(wl.Array===e||Rl[Cl]===e)}});var As=d((Up,vs)=>{var Ol=st(),Ml=I()("iterator"),Dl=oe();vs.exports=O().getIteratorMethod=function(e){if(e!=null)return e[Ml]||e["@@iterator"]||Dl[Ol(e)]}});var Es=d((dt,Ts)=>{var Pl=xe(),kl=ys(),ql=gs(),jl=F(),Hl=Nt(),Nl=As(),an={},on={},dt=Ts.exports=function(e,t,n,r,i){var s=i?function(){return e}:Nl(e),o=Pl(n,r,t?2:1),c=0,l,u,p,f;if(typeof s!="function")throw TypeError(e+" is not iterable!");if(ql(s)){for(l=Hl(e.length);l>c;c++)if(f=t?o(jl(u=e[c])[0],u[1]):o(e[c]),f===an||f===on)return f}else for(p=s.call(e);!(u=p.next()).done;)if(f=kl(p,o,u.value,t),f===an||f===on)return f};dt.BREAK=an;dt.RETURN=on});var cn=d((Vp,Is)=>{var bs=F(),Fl=Ie(),Ul=I()("species");Is.exports=function(e,t){var n=bs(e).constructor,r;return n===void 0||(r=bs(n)[Ul])==null?t:Fl(r)}});var _s=d((Bp,xs)=>{xs.exports=function(e,t,n){var r=n===void 0;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}});var yn=d((Qp,Ms)=>{var ft=xe(),Vl=_s(),Ss=Yt(),Ls=$e(),j=L(),ws=j.process,pn=j.setImmediate,mn=j.clearImmediate,Cs=j.MessageChannel,ln=j.Dispatch,un=0,Re={},Rs="onreadystatechange",J,dn,fn,Ce=function(){var e=+this;if(Re.hasOwnProperty(e)){var t=Re[e];delete Re[e],t()}},Os=function(e){Ce.call(e.data)};(!pn||!mn)&&(pn=function(t){for(var n=[],r=1;arguments.length>r;)n.push(arguments[r++]);return Re[++un]=function(){Vl(typeof t=="function"?t:Function(t),n)},J(un),un},mn=function(t){delete Re[t]},ae()(ws)=="process"?J=function(e){ws.nextTick(ft(Ce,e,1))}:ln&&ln.now?J=function(e){ln.now(ft(Ce,e,1))}:Cs?(dn=new Cs,fn=dn.port2,dn.port1.onmessage=Os,J=ft(fn.postMessage,fn,1)):j.addEventListener&&typeof postMessage=="function"&&!j.importScripts?(J=function(e){j.postMessage(e+"","*")},j.addEventListener("message",Os,!1)):Rs in Ls("script")?J=function(e){Ss.appendChild(Ls("script"))[Rs]=function(){Ss.removeChild(this),Ce.call(e)}}:J=function(e){setTimeout(ft(Ce,e,1),0)});Ms.exports={set:pn,clear:mn}});var qs=d((Wp,ks)=>{var X=L(),Bl=yn().set,Ds=X.MutationObserver||X.WebKitMutationObserver,gn=X.process,hn=X.Promise,Ps=ae()(gn)=="process";ks.exports=function(){var e,t,n,r=function(){var c,l;for(Ps&&(c=gn.domain)&&c.exit();e;){l=e.fn,e=e.next;try{l()}catch(u){throw e?n():t=void 0,u}}t=void 0,c&&c.enter()};if(Ps)n=function(){gn.nextTick(r)};else if(Ds&&!(X.navigator&&X.navigator.standalone)){var i=!0,s=document.createTextNode("");new Ds(r).observe(s,{characterData:!0}),n=function(){s.data=i=!i}}else if(hn&&hn.resolve){var o=hn.resolve(void 0);n=function(){o.then(r)}}else n=function(){Bl.call(X,r)};return function(c){var l={fn:c,next:void 0};t&&(t.next=l),e||(e=l,n()),t=l}}});var pt=d((Gp,Hs)=>{"use strict";var js=Ie();function Ql(e){var t,n;this.promise=new e(function(r,i){if(t!==void 0||n!==void 0)throw TypeError("Bad Promise constructor");t=r,n=i}),this.resolve=js(t),this.reject=js(n)}Hs.exports.f=function(e){return new Ql(e)}});var vn=d(($p,Ns)=>{Ns.exports=function(e){try{return{e:!1,v:e()}}catch(t){return{e:!0,v:t}}}});var Vs=d((Kp,Us)=>{var Wl=L(),Fs=Wl.navigator;Us.exports=Fs&&Fs.userAgent||""});var An=d((zp,Bs)=>{var Gl=F(),$l=K(),Kl=pt();Bs.exports=function(e,t){if(Gl(e),$l(t)&&t.constructor===e)return t;var n=Kl.f(e),r=n.resolve;return r(t),n.promise}});var Ws=d((Yp,Qs)=>{var zl=ie();Qs.exports=function(e,t,n){for(var r in t)zl(e,r,t[r],n);return e}});var Ks=d((Jp,$s)=>{"use strict";var Yl=L(),Jl=Ee(),Xl=z(),Gs=I()("species");$s.exports=function(e){var t=Yl[e];Xl&&t&&!t[Gs]&&Jl.f(t,Gs,{configurable:!0,get:function(){return this}})}});var Js=d((Xp,Ys)=>{var En=I()("iterator"),zs=!1;try{Tn=[7][En](),Tn.return=function(){zs=!0},Array.from(Tn,function(){throw 2})}catch{}var Tn;Ys.exports=function(e,t){if(!t&&!zs)return!1;var n=!1;try{var r=[7],i=r[En]();i.next=function(){return{done:n=!0}},r[En]=function(){return i},e(r)}catch{}return n}});var la=d(()=>{"use strict";var Xs=Ye(),B=L(),ce=xe(),Zl=st(),w=U(),eu=K(),tu=Ie(),nu=fs(),Zs=Es(),ru=cn(),ra=yn().set,ia=qs()(),sa=pt(),bn=vn(),iu=Vs(),su=An(),Q="Promise",aa=B.TypeError,ue=B.process,ea=ue&&ue.versions,au=ea&&ea.v8||"",D=B[Q],Oe=Zl(ue)=="process",yt=function(){},mt,oa,ta,xn,Me=oa=sa.f,De=!!function(){try{var e=D.resolve(1),t=(e.constructor={})[I()("species")]=function(n){n(yt,yt)};return(Oe||typeof PromiseRejectionEvent=="function")&&e.then(yt)instanceof t&&au.indexOf("6.6")!==0&&iu.indexOf("Chrome/66")===-1}catch{}}(),ca=function(e){var t;return eu(e)&&typeof(t=e.then)=="function"?t:!1},_n=function(e,t){if(!e._n){e._n=!0;var n=e._c;ia(function(){for(var r=e._v,i=e._s==1,s=0,o=function(c){var l=i?c.ok:c.fail,u=c.resolve,p=c.reject,f=c.domain,m,A,q;try{l?(i||(e._h==2&&cu(e),e._h=1),l===!0?m=r:(f&&f.enter(),m=l(r),f&&(f.exit(),q=!0)),m===c.promise?p(aa("Promise-chain cycle")):(A=ca(m))?A.call(m,u,p):u(m)):p(r)}catch(Qe){f&&!q&&f.exit(),p(Qe)}};n.length>s;)o(n[s++]);e._c=[],e._n=!1,t&&!e._h&&ou(e)})}},ou=function(e){ra.call(B,function(){var t=e._v,n=na(e),r,i,s;if(n&&(r=bn(function(){Oe?ue.emit("unhandledRejection",t,e):(i=B.onunhandledrejection)?i({promise:e,reason:t}):(s=B.console)&&s.error&&s.error("Unhandled promise rejection",t)}),e._h=Oe||na(e)?2:1),e._a=void 0,n&&r.e)throw r.v})},na=function(e){return e._h!==1&&(e._a||e._c).length===0},cu=function(e){ra.call(B,function(){var t;Oe?ue.emit("rejectionHandled",e):(t=B.onrejectionhandled)&&t({promise:e,reason:e._v})})},le=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),_n(t,!0))},In=function(e){var t=this,n;if(!t._d){t._d=!0,t=t._w||t;try{if(t===e)throw aa("Promise can't be resolved itself");(n=ca(e))?ia(function(){var r={_w:t,_d:!1};try{n.call(e,ce(In,r,1),ce(le,r,1))}catch(i){le.call(r,i)}}):(t._v=e,t._s=1,_n(t,!1))}catch(r){le.call({_w:t,_d:!1},r)}}};De||(D=function(t){nu(this,D,Q,"_h"),tu(t),mt.call(this);try{t(ce(In,this,1),ce(le,this,1))}catch(n){le.call(this,n)}},mt=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},mt.prototype=Ws()(D.prototype,{then:function(t,n){var r=Me(ru(this,D));return r.ok=typeof t=="function"?t:!0,r.fail=typeof n=="function"&&n,r.domain=Oe?ue.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&_n(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),ta=function(){var e=new mt;this.promise=e,this.resolve=ce(In,e,1),this.reject=ce(le,e,1)},sa.f=Me=function(e){return e===D||e===xn?new ta(e):oa(e)});w(w.G+w.W+w.F*!De,{Promise:D});ot()(D,Q);Ks()(Q);xn=O()[Q];w(w.S+w.F*!De,Q,{reject:function(t){var n=Me(this),r=n.reject;return r(t),n.promise}});w(w.S+w.F*(Xs||!De),Q,{resolve:function(t){return su(Xs&&this===xn?D:this,t)}});w(w.S+w.F*!(De&&Js()(function(e){D.all(e).catch(yt)})),Q,{all:function(t){var n=this,r=Me(n),i=r.resolve,s=r.reject,o=bn(function(){var c=[],l=0,u=1;Zs(t,!1,function(p){var f=l++,m=!1;c.push(void 0),u++,n.resolve(p).then(function(A){m||(m=!0,c[f]=A,--u||i(c))},s)}),--u||i(c)});return o.e&&s(o.v),r.promise},race:function(t){var n=this,r=Me(n),i=r.reject,s=bn(function(){Zs(t,!1,function(o){n.resolve(o).then(r.resolve,i)})});return s.e&&i(s.v),r.promise}})});var da=d(()=>{"use strict";var Sn=U(),lu=O(),uu=L(),du=cn(),ua=An();Sn(Sn.P+Sn.R,"Promise",{finally:function(e){var t=du(this,lu.Promise||uu.Promise),n=typeof e=="function";return this.then(n?function(r){return ua(t,e()).then(function(){return r})}:e,n?function(r){return ua(t,e()).then(function(){throw r})}:e)}})});var pa=d(()=>{"use strict";var fa=U(),fu=pt(),pu=vn();fa(fa.S,"Promise",{try:function(e){var t=fu.f(this),n=pu(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})});var ya=d((sm,ma)=>{xi();zi();us();la();da();pa();ma.exports=O().Promise});var ga=d((am,ha)=>{var mu=K(),yu=ae(),hu=I()("match");ha.exports=function(e){var t;return mu(e)&&((t=e[hu])!==void 0?!!t:yu(e)=="RegExp")}});var Aa=d((om,va)=>{var gu=ga(),vu=_e();va.exports=function(e,t,n){if(gu(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(vu(e))}});var Ea=d((cm,Ta)=>{var Au=I()("match");Ta.exports=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[Au]=!1,!"/./"[e](t)}catch{}}return!0}});var Ia=d(()=>{"use strict";var Ln=U(),Tu=Aa(),ba="includes";Ln(Ln.P+Ln.F*Ea()(ba),"String",{includes:function(t){return!!~Tu(this,t,ba).indexOf(t,arguments.length>1?arguments[1]:void 0)}})});var _a=d((dm,xa)=>{Ia();xa.exports=O().String.includes});var Et=d((Im,Fa)=>{Fa.exports=Na;function Na(e,t){if(!e)throw new Error(t||"Assertion failed")}Na.equal=function(t,n,r){if(t!=n)throw new Error(r||"Assertion failed: "+t+" != "+n)}});var Ua=d((xm,Dn)=>{typeof Object.create=="function"?Dn.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Dn.exports=function(t,n){if(n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}}});var bt=d(g=>{"use strict";var xu=Et(),_u=Ua();g.inherits=_u;function Su(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function Lu(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if(typeof e=="string")if(t){if(t==="hex")for(e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var r=0,i=0;i<e.length;i++){var s=e.charCodeAt(i);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=s&63|128):Su(e,i)?(s=65536+((s&1023)<<10)+(e.charCodeAt(++i)&1023),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=s&63|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=s&63|128)}else for(i=0;i<e.length;i++)n[i]=e[i]|0;return n}g.toArray=Lu;function wu(e){for(var t="",n=0;n<e.length;n++)t+=Ba(e[n].toString(16));return t}g.toHex=wu;function Va(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}g.htonl=Va;function Cu(e,t){for(var n="",r=0;r<e.length;r++){var i=e[r];t==="little"&&(i=Va(i)),n+=Qa(i.toString(16))}return n}g.toHex32=Cu;function Ba(e){return e.length===1?"0"+e:e}g.zero2=Ba;function Qa(e){return e.length===7?"0"+e:e.length===6?"00"+e:e.length===5?"000"+e:e.length===4?"0000"+e:e.length===3?"00000"+e:e.length===2?"000000"+e:e.length===1?"0000000"+e:e}g.zero8=Qa;function Ru(e,t,n,r){var i=n-t;xu(i%4===0);for(var s=new Array(i/4),o=0,c=t;o<s.length;o++,c+=4){var l;r==="big"?l=e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:l=e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c],s[o]=l>>>0}return s}g.join32=Ru;function Ou(e,t){for(var n=new Array(e.length*4),r=0,i=0;r<e.length;r++,i+=4){var s=e[r];t==="big"?(n[i]=s>>>24,n[i+1]=s>>>16&255,n[i+2]=s>>>8&255,n[i+3]=s&255):(n[i+3]=s>>>24,n[i+2]=s>>>16&255,n[i+1]=s>>>8&255,n[i]=s&255)}return n}g.split32=Ou;function Mu(e,t){return e>>>t|e<<32-t}g.rotr32=Mu;function Du(e,t){return e<<t|e>>>32-t}g.rotl32=Du;function Pu(e,t){return e+t>>>0}g.sum32=Pu;function ku(e,t,n){return e+t+n>>>0}g.sum32_3=ku;function qu(e,t,n,r){return e+t+n+r>>>0}g.sum32_4=qu;function ju(e,t,n,r,i){return e+t+n+r+i>>>0}g.sum32_5=ju;function Hu(e,t,n,r){var i=e[t],s=e[t+1],o=r+s>>>0,c=(o<r?1:0)+n+i;e[t]=c>>>0,e[t+1]=o}g.sum64=Hu;function Nu(e,t,n,r){var i=t+r>>>0,s=(i<t?1:0)+e+n;return s>>>0}g.sum64_hi=Nu;function Fu(e,t,n,r){var i=t+r;return i>>>0}g.sum64_lo=Fu;function Uu(e,t,n,r,i,s,o,c){var l=0,u=t;u=u+r>>>0,l+=u<t?1:0,u=u+s>>>0,l+=u<s?1:0,u=u+c>>>0,l+=u<c?1:0;var p=e+n+i+o+l;return p>>>0}g.sum64_4_hi=Uu;function Vu(e,t,n,r,i,s,o,c){var l=t+r+s+c;return l>>>0}g.sum64_4_lo=Vu;function Bu(e,t,n,r,i,s,o,c,l,u){var p=0,f=t;f=f+r>>>0,p+=f<t?1:0,f=f+s>>>0,p+=f<s?1:0,f=f+c>>>0,p+=f<c?1:0,f=f+u>>>0,p+=f<u?1:0;var m=e+n+i+o+l+p;return m>>>0}g.sum64_5_hi=Bu;function Qu(e,t,n,r,i,s,o,c,l,u){var p=t+r+s+c+u;return p>>>0}g.sum64_5_lo=Qu;function Wu(e,t,n){var r=t<<32-n|e>>>n;return r>>>0}g.rotr64_hi=Wu;function Gu(e,t,n){var r=e<<32-n|t>>>n;return r>>>0}g.rotr64_lo=Gu;function $u(e,t,n){return e>>>n}g.shr64_hi=$u;function Ku(e,t,n){var r=e<<32-n|t>>>n;return r>>>0}g.shr64_lo=Ku});var $a=d(Ga=>{"use strict";var Wa=bt(),zu=Et();function It(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Ga.BlockHash=It;It.prototype.update=function(t,n){if(t=Wa.toArray(t,n),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var r=t.length%this._delta8;this.pending=t.slice(t.length-r,t.length),this.pending.length===0&&(this.pending=null),t=Wa.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this};It.prototype.digest=function(t){return this.update(this._pad()),zu(this.pending===null),this._digest(t)};It.prototype._pad=function(){var t=this.pendingTotal,n=this._delta8,r=n-(t+this.padLength)%n,i=new Array(r+this.padLength);i[0]=128;for(var s=1;s<r;s++)i[s]=0;if(t<<=3,this.endian==="big"){for(var o=8;o<this.padLength;o++)i[s++]=0;i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=t>>>24&255,i[s++]=t>>>16&255,i[s++]=t>>>8&255,i[s++]=t&255}else for(i[s++]=t&255,i[s++]=t>>>8&255,i[s++]=t>>>16&255,i[s++]=t>>>24&255,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0,o=8;o<this.padLength;o++)i[s++]=0;return i}});var Ja=d(H=>{"use strict";var Yu=bt(),P=Yu.rotr32;function Ju(e,t,n,r){if(e===0)return Ka(t,n,r);if(e===1||e===3)return Ya(t,n,r);if(e===2)return za(t,n,r)}H.ft_1=Ju;function Ka(e,t,n){return e&t^~e&n}H.ch32=Ka;function za(e,t,n){return e&t^e&n^t&n}H.maj32=za;function Ya(e,t,n){return e^t^n}H.p32=Ya;function Xu(e){return P(e,2)^P(e,13)^P(e,22)}H.s0_256=Xu;function Zu(e){return P(e,6)^P(e,11)^P(e,25)}H.s1_256=Zu;function ed(e){return P(e,7)^P(e,18)^e>>>3}H.g0_256=ed;function td(e){return P(e,17)^P(e,19)^e>>>10}H.g1_256=td});var eo=d((wm,Za)=>{"use strict";var de=bt(),nd=$a(),fe=Ja(),rd=Et(),M=de.sum32,id=de.sum32_4,sd=de.sum32_5,ad=fe.ch32,od=fe.maj32,cd=fe.s0_256,ld=fe.s1_256,ud=fe.g0_256,dd=fe.g1_256,Xa=nd.BlockHash,fd=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function k(){if(!(this instanceof k))return new k;Xa.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=fd,this.W=new Array(64)}de.inherits(k,Xa);Za.exports=k;k.blockSize=512;k.outSize=256;k.hmacStrength=192;k.padLength=64;k.prototype._update=function(t,n){for(var r=this.W,i=0;i<16;i++)r[i]=t[n+i];for(;i<r.length;i++)r[i]=id(dd(r[i-2]),r[i-7],ud(r[i-15]),r[i-16]);var s=this.h[0],o=this.h[1],c=this.h[2],l=this.h[3],u=this.h[4],p=this.h[5],f=this.h[6],m=this.h[7];for(rd(this.k.length===r.length),i=0;i<r.length;i++){var A=sd(m,ld(u),ad(u,p,f),this.k[i],r[i]),q=M(cd(s),od(s,o,c));m=f,f=p,p=u,u=M(l,A),l=c,c=o,o=s,s=M(A,q)}this.h[0]=M(this.h[0],s),this.h[1]=M(this.h[1],o),this.h[2]=M(this.h[2],c),this.h[3]=M(this.h[3],l),this.h[4]=M(this.h[4],u),this.h[5]=M(this.h[5],p),this.h[6]=M(this.h[6],f),this.h[7]=M(this.h[7],m)};k.prototype._digest=function(t){return t==="hex"?de.toHex32(this.h,"big"):de.split32(this.h,"big")}});var to=d(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});var md=function(){function e(){var t=this;this.locked=new Map,this.addToLocked=function(n,r){var i=t.locked.get(n);i===void 0?r===void 0?t.locked.set(n,[]):t.locked.set(n,[r]):r!==void 0&&(i.unshift(r),t.locked.set(n,i))},this.isLocked=function(n){return t.locked.has(n)},this.lock=function(n){return new Promise(function(r,i){t.isLocked(n)?t.addToLocked(n,r):(t.addToLocked(n),r())})},this.unlock=function(n){var r=t.locked.get(n);if(r===void 0||r.length===0){t.locked.delete(n);return}var i=r.pop();t.locked.set(n,r),i!==void 0&&setTimeout(i,0)}}return e.getInstance=function(){return e.instance===void 0&&(e.instance=new e),e.instance},e}();function yd(){return md.getInstance()}qn.default=yd});var Fn=d(ee=>{"use strict";var pe=ee&&ee.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,s){function o(u){try{l(r.next(u))}catch(p){s(p)}}function c(u){try{l(r.throw(u))}catch(p){s(p)}}function l(u){u.done?i(u.value):new n(function(p){p(u.value)}).then(o,c)}l((r=r.apply(e,t||[])).next())})},me=ee&&ee.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,o;return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(u){return function(p){return l([u,p])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){n.label=u[1];break}if(u[0]===6&&n.label<s[1]){n.label=s[1],s=u;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(u);break}s[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(p){u=[6,p],i=0}finally{r=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(ee,"__esModule",{value:!0});var ye=to(),jn="browser-tabs-lock-key";function Hn(e){return new Promise(function(t){return setTimeout(t,e)})}function Nn(e){for(var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",n="",r=0;r<e;r++){var i=Math.floor(Math.random()*t.length);n+=t[i]}return n}function hd(){return Date.now().toString()+Nn(15)}var gd=function(){function e(){this.acquiredIatSet=new Set,this.id=hd(),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),e.waiters===void 0&&(e.waiters=[])}return e.prototype.acquireLock=function(t,n){return n===void 0&&(n=5e3),pe(this,void 0,void 0,function(){var r,i,s,o,c,l,u;return me(this,function(p){switch(p.label){case 0:r=Date.now()+Nn(4),i=Date.now()+n,s=jn+"-"+t,o=window.localStorage,p.label=1;case 1:return Date.now()<i?[4,Hn(30)]:[3,8];case 2:return p.sent(),c=o.getItem(s),c!==null?[3,5]:(l=this.id+"-"+t+"-"+r,[4,Hn(Math.floor(Math.random()*25))]);case 3:return p.sent(),o.setItem(s,JSON.stringify({id:this.id,iat:r,timeoutKey:l,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,Hn(30)];case 4:return p.sent(),u=o.getItem(s),u!==null&&(u=JSON.parse(u),u.id===this.id&&u.iat===r)?(this.acquiredIatSet.add(r),this.refreshLockWhileAcquired(s,r),[2,!0]):[3,7];case 5:return e.lockCorrector(),[4,this.waitForSomethingToChange(i)];case 6:p.sent(),p.label=7;case 7:return r=Date.now()+Nn(4),[3,1];case 8:return[2,!1]}})})},e.prototype.refreshLockWhileAcquired=function(t,n){return pe(this,void 0,void 0,function(){var r=this;return me(this,function(i){return setTimeout(function(){return pe(r,void 0,void 0,function(){var s,o;return me(this,function(c){switch(c.label){case 0:return[4,ye.default().lock(n)];case 1:if(c.sent(),!this.acquiredIatSet.has(n))return ye.default().unlock(n),[2];if(s=window.localStorage,o=s.getItem(t),o!==null)o=JSON.parse(o),o.timeRefreshed=Date.now(),s.setItem(t,JSON.stringify(o)),ye.default().unlock(n);else return ye.default().unlock(n),[2];return this.refreshLockWhileAcquired(t,n),[2]}})})},1e3),[2]})})},e.prototype.waitForSomethingToChange=function(t){return pe(this,void 0,void 0,function(){return me(this,function(n){switch(n.label){case 0:return[4,new Promise(function(r){var i=!1,s=Date.now(),o=50,c=!1;function l(){if(c||(window.removeEventListener("storage",l),e.removeFromWaiting(l),clearTimeout(u),c=!0),!i){i=!0;var p=o-(Date.now()-s);p>0?setTimeout(r,p):r()}}window.addEventListener("storage",l),e.addToWaiting(l);var u=setTimeout(l,Math.max(0,t-Date.now()))})];case 1:return n.sent(),[2]}})})},e.addToWaiting=function(t){this.removeFromWaiting(t),e.waiters!==void 0&&e.waiters.push(t)},e.removeFromWaiting=function(t){e.waiters!==void 0&&(e.waiters=e.waiters.filter(function(n){return n!==t}))},e.notifyWaiters=function(){if(e.waiters!==void 0){var t=e.waiters.slice();t.forEach(function(n){return n()})}},e.prototype.releaseLock=function(t){return pe(this,void 0,void 0,function(){return me(this,function(n){switch(n.label){case 0:return[4,this.releaseLock__private__(t)];case 1:return[2,n.sent()]}})})},e.prototype.releaseLock__private__=function(t){return pe(this,void 0,void 0,function(){var n,r,i;return me(this,function(s){switch(s.label){case 0:return n=window.localStorage,r=jn+"-"+t,i=n.getItem(r),i===null?[2]:(i=JSON.parse(i),i.id!==this.id?[3,2]:[4,ye.default().lock(i.iat)]);case 1:s.sent(),this.acquiredIatSet.delete(i.iat),n.removeItem(r),ye.default().unlock(i.iat),e.notifyWaiters(),s.label=2;case 2:return[2]}})})},e.lockCorrector=function(){for(var t=Date.now()-5e3,n=window.localStorage,r=Object.keys(n),i=!1,s=0;s<r.length;s++){var o=r[s];if(o.includes(jn)){var c=n.getItem(o);c!==null&&(c=JSON.parse(c),(c.timeRefreshed===void 0&&c.timeAcquired<t||c.timeRefreshed!==void 0&&c.timeRefreshed<t)&&(n.removeItem(o),i=!0))}}i&&e.notifyWaiters()},e.waiters=void 0,e}();ee.default=gd});var qg=$(ri()),jg=$(Ei()),Hg=$(ya()),Ng=$(_a());var ht,Eu=new Uint8Array(16);function wn(){if(!ht&&(ht=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ht))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ht(Eu)}var b=[];for(let e=0;e<256;++e)b.push((e+256).toString(16).slice(1));function Sa(e,t=0){return(b[e[t+0]]+b[e[t+1]]+b[e[t+2]]+b[e[t+3]]+"-"+b[e[t+4]]+b[e[t+5]]+"-"+b[e[t+6]]+b[e[t+7]]+"-"+b[e[t+8]]+b[e[t+9]]+"-"+b[e[t+10]]+b[e[t+11]]+b[e[t+12]]+b[e[t+13]]+b[e[t+14]]+b[e[t+15]]).toLowerCase()}var bu=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Cn={randomUUID:bu};function Iu(e,t,n){if(Cn.randomUUID&&!t&&!e)return Cn.randomUUID();e=e||{};let r=e.random||(e.rng||wn)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return Sa(r)}var Pe=Iu;var a;(c=>{let e;(y=>(y.Blog="Blog",y.Custom="Custom",y.CustomEvent="CustomEvent",y.Document="Document",y.Form="Form",y.ObjectEntry="ObjectEntry",y.Page="Page",y.WebContent="WebContent"))(e=c.ApplicationId||(c.ApplicationId={}));let t;(h=>(h.AssetClicked="assetClicked",h.AssetDepthReached="assetDepthReached",h.AssetDownloaded="assetDownloaded",h.AssetSubmitted="assetSubmitted",h.AssetViewed="assetViewed",h.BlogClicked="blogClicked",h.BlogDepthReached="blogDepthReached",h.BlogImpressionMade="blogImpressionMade",h.BlogViewed="blogViewed",h.DocumentDownloaded="documentDownloaded",h.DocumentImpressionMade="documentImpressionMade",h.DocumentPreviewed="documentPreviewed",h.FieldBlurred="fieldBlurred",h.FieldFocused="fieldFocused",h.FormSubmitted="formSubmitted",h.FormViewed="formViewed",h.ObjectEntryDownloaded="objectEntryDownloaded",h.ObjectEntryImpressionMade="objectEntryImpressionMade",h.ObjectEntryViewed="objectEntryViewed",h.PageDepthReached="pageDepthReached",h.PageLoaded="pageLoaded",h.PageRead="pageRead",h.PageUnloaded="pageUnloaded",h.PageViewed="pageViewed",h.TabBlurred="tabBlurred",h.TabFocused="tabFocused",h.WebContentClicked="webContentClicked",h.WebContentImpressionMade="webContentImpressionMade",h.WebContentViewed="webContentViewed"))(t=c.EventId||(c.EventId={}));let n;(f=>(f.View="view",f.Impression="impression",f.Download="download"))(n=c.ElementAction||(c.ElementAction={}));let r;(y=>(y.Blog="blog",y.BlogsEntry="com.liferay.blogs.model.BlogsEntry",y.Custom="custom",y.Document="document",y.FileEntry="com.liferay.portal.kernel.repository.model.FileEntry",y.JournalArticle="com.liferay.journal.model.JournalArticle",y.ObjectEntry="object-entry",y.WebContent="web-content"))(r=c.ElementType||(c.ElementType={}));let i;(_=>(_.AnalyticsAssetMimeType="analyticsAssetMimeType",_.AnalyticsAssetAction="analyticsAssetAction",_.AnalyticsAssetCategories="analyticsAssetCategories",_.AnalyticsAssetCategory="analyticsAssetCategory",_.AnalyticsAssetId="analyticsAssetId",_.AnalyticsAssetSubtype="analyticsAssetSubtype",_.AnalyticsAssetTags="analyticsAssetTags",_.AnalyticsAssetTitle="analyticsAssetTitle",_.AnalyticsAssetType="analyticsAssetType",_.AnalyticsAssetVersion="analyticsAssetVersion",_.AnalyticsAssetVocabularies="analyticsAssetVocabularies",_.AnalyticsExternalReferenceCode="analyticsExternalReferenceCode",_.AnalyticsObjectDefinitionName="analyticsObjectDefinitionName",_.AnalyticsObjectType="analyticsObjectType",_.AnalyticsWebContentResourcePk="analyticsWebContentResourcePk"))(i=c.DataSetList||(c.DataSetList={}));let s;(y=>(y.ChannelId="ac_client_channel_id",y.Contexts="ac_client_context",y.DemandbaseAccount="ac_client_demandbase_account",y.DisableTracking="ac_client_disable_tracking",y.Identity="ac_client_identity",y.PrevEmailAddressHash="ac_client_previous_email_address_hash",y.StorageVersion="ac_client_storage_version",y.UserId="ac_client_user_id"))(s=c.Keys||(c.Keys={}));let o;(m=>(m.AccountMessage="ac_message_queue_account",m.Events="ac_client_batch",m.IdentityMessage="ac_message_queue_identity",m.Messages="ac_message_queue"))(o=c.Queues||(c.Queues={}))})(a||(a={}));var La="1.3.6",gt="analyticsBatchSegmentExternalReferenceCodes";var vt="OSB-Asah-Project-ID";var ke="loadEventStartSPA",W="navigationStartSPA",wa="pageLoadTimeSPA",At="viewDurationSPA",Rn="p_p_id",Ca="com_liferay_portlet_configuration_web_portlet_PortletConfigurationPortlet",Ra="p_l_mode",Oa="com_liferay_layout_content_page_editor_web_internal_portlet_ContentPageEditorPortlet",On="view";var Ma=new Set(["ja","ko","zh"]),Tt=75,Mn=.75,Da=265,Pa=108e5,ka=2048,qa=25,ja=255,Ha=1024;var Pn=$(eo());function kn(e){return typeof e!="object"||e===null?e:Array.isArray(e)?e.map(kn).sort():Object.keys(e).sort().reduce((t,n)=>(t[n]=kn(e[n]),t),{})}function pd(e){if(typeof e=="object"){let t=JSON.stringify(kn(e));return(0,Pn.default)().update(t).digest("hex")}return(0,Pn.default)().update(e).digest("hex")}var Z=pd;var no=$(Fn()),Un=()=>{let e=window.Liferay,t=e?.Util?.LocalStorage,n=e?.Util?.Cookie?.get?.("CONSENT_TYPE_PERFORMANCE");return t&&n==="true"},E=e=>{let t=window.Liferay,n;try{let r;Un()?r=t?.Util?.LocalStorage?.getItem(e,t?.Util?.LocalStorage?.TYPES?.PERFORMANCE):r=localStorage.getItem(e),n=JSON.parse(r)}catch{return}return n},T=(e,t)=>{let n=window.Liferay;try{Un()?n?.Util?.LocalStorage?.setItem(e,JSON.stringify(t),n?.Util?.LocalStorage?.TYPES?.PERFORMANCE):localStorage.setItem(e,JSON.stringify(t))}catch{return}},xt=e=>{let t=window.Liferay;try{Un()?t?.Util?.LocalStorage?.removeItem(e,t?.Util?.LocalStorage?.TYPES?.PERFORMANCE):localStorage.removeItem(e)}catch{return}},vd=e=>Number(JSON.stringify(e).length*2/1024),ro=(e,t)=>{let n=E(e);if(!n?.length)return Promise.resolve();let r=new no.default;return r.acquireLock(e).then(i=>{if(i)return vd(n)>t&&T(e,n.slice(1)),r.releaseLock(e)})};var _t=class{constructor(t){this.analyticsInstance=t}waitForReadiness(t=5e3){try{let n=window.Demandbase?.IpApi?.CompanyProfile;if(n)return Promise.resolve(n)}catch{return Promise.resolve(null)}return new Promise(n=>{let r={},i=!1,s=o=>{i||(i=!0,r.pollId&&clearInterval(r.pollId),r.timeoutId&&clearTimeout(r.timeoutId),n(o))};try{window.Demandbase?.Utilities?.Callbacks?.registerCallback?.(()=>{try{s(window.Demandbase?.IpApi?.CompanyProfile??null)}catch{s(null)}})}catch{}r.pollId=setInterval(()=>{try{let o=window.Demandbase?.IpApi?.CompanyProfile;o&&s(o)}catch{s(null)}},500),r.timeoutId=setTimeout(()=>s(null),t)})}sendAccountMessage(t){this.waitForReadiness().then(n=>{if(this.analyticsInstance._disposed)return;if(!n){xt(a.Keys.DemandbaseAccount),this.analyticsInstance[a.Queues.AccountMessage].reset();return}let{emailAddressHashed:r}=this.analyticsInstance.config.identity,i=Z({emailAddressHashed:r,userId:t,webSite:n.web_site}),s=E(a.Keys.DemandbaseAccount);i!==s&&(T(a.Keys.DemandbaseAccount,i),this.analyticsInstance[a.Queues.AccountMessage].addItem({...n,emailAddressHashed:r,id:i,userId:t}))})}};function io(e=new Date){return new Date(e.getTime()-e.getTimezoneOffset()*60*1e3)}function so(e=new Date){let t=e.getTimezoneOffset()/60,n=t>0?"-":"+",r=Math.abs(t%1),i=`${n}${("00"+Math.abs(~~t)).slice(-2)}`;return r?`${i}:${60*r}`:`${i}:00`}function qe(e,t){return(document.querySelector(e)||{})[t]||""}function Ed(e){return Object.assign(e.context,{canonicalUrl:qe("link[rel=canonical]","href"),contentLanguageId:qe("html","lang"),description:qe('meta[name="description"]',"content"),keywords:qe('meta[name="keywords"]',"content"),languageId:navigator.language,referrer:document.referrer,timezoneOffset:so(),title:qe("title","textContent"),url:location.href,userAgent:navigator.userAgent}),e}var ao=Ed;var bd=[/^og:.*/,/^music:/,/^video:/,/^article:/,/^book:/,/^profile:/,/^fb:/];function Id(e){let t=!1;if(e&&e.getAttribute){let n=e.getAttribute("property");n&&(t=bd.some(r=>n.match(r)))}return t}function xd(e){let r=[].slice.call(document.querySelectorAll("meta")).filter(Id).reduce((i,s)=>Object.assign(i,{[s.getAttribute("property")]:s.getAttribute("content")}),{});return Object.assign(e.context,r),e}var oo=xd;function _d(e){let t=window.devicePixelRatio||1,n=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,r=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;return Object.assign(e.context,{devicePixelRatio:t,screenHeight:n,screenWidth:r}),e}var co=_d;var Vn=[ao,oo,co];function N(e,t=""){return typeof e=="object"?e.map(n=>`[data-analytics-asset-type="${n}"]${t}`).join(", "):`[data-analytics-asset-type="${e}"]${t}`}function te(e,t){return je(e,N(t))}function je(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(e!==null&&e.nodeType===1);return null}function he({innerText:e}){let t=e.split(/\s+/).filter(Boolean);return e!==""?t.length:0}function v(e,t){let n=[a.DataSetList.AnalyticsAssetId,a.DataSetList.AnalyticsAssetTitle,a.DataSetList.AnalyticsAssetType];return!!(e&&(t||n).every(i=>i in e.dataset))}Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector);function C(e,t){return function n(){let r=arguments;Sd(n),n.id=setTimeout(()=>{e.apply(null,r)},t)}}function Sd(e){clearTimeout(e.id)}var x=e=>(document.readyState==="interactive"||document.readyState==="complete"?e():document.addEventListener("DOMContentLoaded",e),()=>document.removeEventListener("DOMContentLoaded",e)),St=(e,t)=>(e.forEach(n=>document.addEventListener(n,t)),()=>{e.forEach(n=>{document.removeEventListener(n,t)})}),ge=({analytics:e,applicationId:t,eventType:n,getPayload:r,isTrackable:i,type:s})=>{let o=c=>{let l=c.target,u=te(l,s);if(!i(u)||l.control)return;let p=l.tagName.toLowerCase(),f=u?r(u):{};Object.assign(f,{tagName:p}),p==="a"?Object.assign(f,{href:l.href,text:l.innerText}):p==="img"&&Object.assign(f,{src:l.src}),e.send(n,t,f)};return document.addEventListener("click",o),()=>document.removeEventListener("click",o)};function lo(e,t,n,r){let i=new Date,s=i.toISOString(),o=io(i).toISOString();return{applicationId:t,contextHash:r,eventDate:s,eventId:e,eventLocalDate:o,properties:n}}var uo=(e,t)=>{let n=e.flatMap(({value:r})=>r.events);return t.filter(({contextHash:r,eventDate:i,eventId:s})=>!n.some(({contextHash:o,eventDate:c,eventId:l})=>r===o&&s===l&&i===c))};function Ld(){return window.pageYOffset||document.documentElement.scrollTop}function wd(){let e=[document.body.clientHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight];return Math.max.apply(null,e)}function Cd(e){let t=wd(),n=Ld(),r={bottom:0,height:t,top:n};if(e){let i=e.getBoundingClientRect(),{bottom:s,height:o,top:c}=i;r={bottom:s,height:o,top:c}}return r}function Lt(e){let{bottom:t,left:n,right:r,top:i}=e.getBoundingClientRect(),s=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth,c=i<=s&&t>=0,l=n<=o&&r>=0;return c&&l}var R=class{constructor(t=4){this.steps=t,this.stepsReached=[]}dispose(){this.steps=null,this.stepsReached=null}getDepthValue(t){let{bottom:n,height:r,top:i}=Cd(t),s=window.innerHeight,o=(s-i)/r;return i<=0&&n>=0?o=s/(r+i):t||(o=(i+s)/r),o}getDepth(t){let n=this.getDepthValue(t),r=Math.round(n*100);return Math.min(Math.max(r,0),100)}onDepthReached(t,n){let r=this.getDepth(n),i=Math.floor(100/this.steps),s=Math.floor(r/i);this.stepsReached?.every(o=>o<s)&&(this.stepsReached.push(s),s>0&&t(s*i))}};function Bn({dataset:e}){let t={entryId:e.analyticsAssetId.trim()};return e.analyticsAssetCategories&&Object.assign(t,{assetCategories:e.analyticsAssetCategories.trim()}),e.analyticsAssetMimeType&&Object.assign(t,{mimeType:e.analyticsAssetMimeType.trim()}),e.analyticsAssetSubtype&&Object.assign(t,{subtype:e.analyticsAssetSubtype.trim()}),e.analyticsAssetTags&&Object.assign(t,{assetTags:e.analyticsAssetTags.trim()}),e.analyticsAssetTitle&&Object.assign(t,{title:e.analyticsAssetTitle.trim()}),e.analyticsAssetType&&Object.assign(t,{type:e.analyticsAssetType.trim()}),e.analyticsAssetVocabularies&&Object.assign(t,{assetVocabularies:e.analyticsAssetVocabularies.trim()}),e.analyticsExternalReferenceCode&&Object.assign(t,{externalReferenceCode:e.analyticsExternalReferenceCode.trim()}),t}function Rd(e,t){let n=new Date().toISOString(),r=new R,i=C(()=>{t.forEach(s=>{r.onDepthReached(o=>{let c=Bn(s);Object.assign(c,{depth:o,sessionId:n}),e.send(a.EventId.BlogDepthReached,a.ApplicationId.Blog,c)},s)})},1500);return document.addEventListener("scroll",i),()=>{document.removeEventListener("scroll",i)}}function fo(e,{eventId:t,isTrackable:n}){let r=[],i=N([a.ElementType.Blog,a.ElementType.BlogsEntry]),s=x(()=>{Array.prototype.slice.call(document.querySelectorAll(i)).filter(n).forEach(c=>{let l=Bn(c);Object.assign(l,{numberOfWords:he(c)}),r.push(c),e.send(t,a.ApplicationId.Blog,l)})}),o=Rd(e,r);return()=>{o(),s()}}function Od(e){return ge({analytics:e,applicationId:a.ApplicationId.Blog,eventType:a.EventId.BlogClicked,getPayload:Bn,isTrackable:v,type:a.ElementType.Blog})}function Md(e){let t=Od(e),n=fo(e,{eventId:a.EventId.BlogImpressionMade,isTrackable:i=>v(i)&&i.dataset?.analyticsAssetAction===a.ElementAction.Impression}),r=fo(e,{eventId:a.EventId.BlogViewed,isTrackable:i=>v(i)&&(!i.dataset?.analyticsAssetAction||i.dataset?.analyticsAssetAction===a.ElementAction.View)});return()=>{t(),n(),r()}}var po=Md;function He({dataset:e}){let t={assetId:e.analyticsAssetId.trim()};return e.analyticsAssetCategory&&Object.assign(t,{category:e.analyticsAssetCategory.trim()}),e.analyticsAssetCategories&&Object.assign(t,{assetCategories:e.analyticsAssetCategories.trim()}),e.analyticsAssetMimeType&&Object.assign(t,{mimeType:e.analyticsAssetMimeType.trim()}),e.analyticsAssetTags&&Object.assign(t,{assetTags:e.analyticsAssetTags.trim()}),e.analyticsAssetTitle&&Object.assign(t,{title:e.analyticsAssetTitle.trim()}),e.analyticsAssetVocabularies&&Object.assign(t,{assetVocabularies:e.analyticsAssetVocabularies.trim()}),t}function Dd(e){let t=n=>{let r=n.target,i=je(r,'[data-analytics-asset-action="download"]'),s=te(r,a.ElementType.Custom);i&&v(s,[a.DataSetList.AnalyticsAssetId,a.DataSetList.AnalyticsAssetType])&&e.send(a.EventId.AssetDownloaded,a.ApplicationId.Custom,He(s))};return document.addEventListener("click",t),()=>document.removeEventListener("click",t)}function Pd(e,t){let n=new Date().toISOString(),r=new R,i=C(()=>{t.forEach(s=>{r.onDepthReached(o=>{let c=He(s);Object.assign(c,{depth:o,sessionId:n}),e.send(a.EventId.AssetDepthReached,a.ApplicationId.Custom,c)},s)})},1500);return document.addEventListener("scroll",i),()=>{document.removeEventListener("scroll",i)}}function kd(e){let t=n=>{let r=n.target,i=te(r,a.ElementType.Custom),s=v(i,[a.DataSetList.AnalyticsAssetId,a.DataSetList.AnalyticsAssetType]);!s||s&&(r.tagName!=="FORM"||n.defaultPrevented)||e.send(a.EventId.AssetSubmitted,a.ApplicationId.Custom,He(i))};return document.addEventListener("submit",t),()=>document.removeEventListener("submit",t)}function qd(e){let t=[],n=x(()=>{Array.prototype.slice.call(document.querySelectorAll('[data-analytics-asset-type="custom"]')).filter(i=>v(i,[a.DataSetList.AnalyticsAssetId,a.DataSetList.AnalyticsAssetType])).forEach(i=>{let s=!!i.getElementsByTagName("form").length,o=He(i);Object.assign(o,{formEnabled:s}),t.push(i),e.send(a.EventId.AssetViewed,a.ApplicationId.Custom,o)})}),r=Pd(e,t);return()=>{r(),n()}}function jd(e){return ge({analytics:e,applicationId:a.ApplicationId.Custom,eventType:a.EventId.AssetClicked,getPayload:He,isTrackable:t=>v(t,[a.DataSetList.AnalyticsAssetId,a.DataSetList.AnalyticsAssetType]),type:a.ElementType.Custom})}function Hd(e){let t=jd(e),n=Dd(e),r=kd(e),i=qd(e);return()=>{t(),n(),r(),i()}}var mo=Hd;function yo({dataset:e}){let t={fileEntryId:e.analyticsAssetId.trim()};return e.analyticsAssetCategories&&Object.assign(t,{assetCategories:e.analyticsAssetCategories.trim()}),e.analyticsAssetMimeType&&Object.assign(t,{mimeType:e.analyticsAssetMimeType.trim()}),e.analyticsAssetTags&&Object.assign(t,{assetTags:e.analyticsAssetTags.trim()}),e.analyticsAssetTitle&&Object.assign(t,{title:e.analyticsAssetTitle.trim()}),e.analyticsAssetVersion&&Object.assign(t,{fileEntryVersion:e.analyticsAssetVersion.trim()}),e.analyticsAssetVocabularies&&Object.assign(t,{assetVocabularies:e.analyticsAssetVocabularies.trim()}),e.analyticsExternalReferenceCode&&Object.assign(t,{externalReferenceCode:e.analyticsExternalReferenceCode.trim()}),t}function Nd(e){let t=n=>{let r=n.target,i=je(r,'[data-analytics-asset-action="download"]'),s=te(r,a.ElementType.Document);i&&v(s)&&e.send(a.EventId.DocumentDownloaded,a.ApplicationId.Document,yo(s))};return document.addEventListener("click",t),()=>document.removeEventListener("click",t)}function Fd(e){let t=x(()=>{Array.prototype.slice.call(document.querySelectorAll('[data-analytics-asset-action="preview"]')).filter(n=>v(n)).forEach(n=>{let r=yo(n);e.send(a.EventId.DocumentPreviewed,a.ApplicationId.Document,r)})});return()=>t()}function Ud(e){let t=Nd(e),n=Fd(e);return()=>{t(),n()}}var ho=Ud;function go({dataset:e}){let t={fileEntryId:e.analyticsAssetId.trim()};return e.analyticsAssetCategories&&Object.assign(t,{assetCategories:e.analyticsAssetCategories.trim()}),e.analyticsAssetMimeType&&Object.assign(t,{mimeType:e.analyticsAssetMimeType.trim()}),e.analyticsAssetSubtype&&Object.assign(t,{subtype:e.analyticsAssetSubtype.trim()}),e.analyticsAssetTags&&Object.assign(t,{assetTags:e.analyticsAssetTags.trim()}),e.analyticsAssetTitle&&Object.assign(t,{title:e.analyticsAssetTitle.trim()}),e.analyticsAssetType&&Object.assign(t,{type:e.analyticsAssetType.trim()}),e.analyticsAssetVersion&&Object.assign(t,{fileEntryVersion:e.analyticsAssetVersion.trim()}),e.analyticsAssetVocabularies&&Object.assign(t,{assetVocabularies:e.analyticsAssetVocabularies.trim()}),e.analyticsExternalReferenceCode&&Object.assign(t,{externalReferenceCode:e.analyticsExternalReferenceCode.trim()}),t}function Vd(e){let t=n=>{let r=n.target,i=r.parentElement,s=[r,i].find(o=>o?.dataset.analyticsAssetAction==="download");s&&v(s)&&e.send(a.EventId.DocumentDownloaded,a.ApplicationId.Document,go(s))};return document.addEventListener("click",t),()=>document.removeEventListener("click",t)}function Bd(e,{eventId:t,isTrackable:n}){let r=N(a.ElementType.FileEntry),i=x(()=>{Array.prototype.slice.call(document.querySelectorAll(r)).filter(s=>n(s)).forEach(s=>{let o=go(s);e.send(t,a.ApplicationId.Document,o)})});return()=>i()}function Qd(e){let t=Vd(e),n=Bd(e,{eventId:a.EventId.DocumentImpressionMade,isTrackable:r=>v(r)&&r.dataset.analyticsAssetAction===a.ElementAction.Impression||v(r)&&r.dataset.analyticsAssetAction===a.ElementAction.Download});return()=>{t(),n()}}var vo=Qd;function Ao(){if(window.URLSearchParams)return new window.URLSearchParams(location.search);let e=new Map;return(location.search.startsWith("?")?location.search.slice(1):location.search).split("&").forEach(r=>{if(!r)return;let[i,s]=r.includes("=")?r.split("=").map(decodeURIComponent):[r,""];e.set(i,s)}),{get:r=>e.get(r)}}function Ne(e,t,n){window.performance.measure(e,t,n);let r=window.performance.getEntriesByName(e).pop();return r&&typeof r.duration=="number"?~~r.duration:0}function ve(e){window.performance.clearMarks(e),window.performance.mark(e)}function Wd(e){let t=window.Liferay;function n(){e.send(a.EventId.PageUnloaded,a.ApplicationId.Page,{externalReferenceCode:e._getContext().layoutExternalReferenceCode,viewDuration:Ne(At,W)})}function r(){e.send(a.EventId.PageLoaded,a.ApplicationId.Page,{externalReferenceCode:e._getContext().layoutExternalReferenceCode,pageLoadTime:Ne(wa,ke,W)})}function i(c){return c.get(Rn)===Ca}function s(c){return c.get(Rn)===Oa}function o(c){return(c.get(Ra)||On)===On}if(t){let c=Ao();if(i(c)||s(c)||!o(c))return e._disposeInternal();if(t.SPA){let l=window.performance.getEntriesByName(ke);if(ve(W),!l.length){let u=ve.bind(null,ke);ve(ke),t?.on?.("beforeNavigate",u)}document.readyState==="complete"&&r(),t?.once?.("beforeNavigate",n)}}}var To=Wd;function Eo(e){return e.dataset.analyticsAssetId||e.id||e.getAttribute("name")||e.action}function bo({form:e,name:t}){return{fieldName:t,...Qn(e)}}function Qn(e){let t={formId:Eo(e).trim()};return e.dataset.analyticsAssetCategories&&Object.assign(t,{assetCategories:e.dataset.analyticsAssetCategories.trim()}),e.dataset.analyticsAssetMimeType&&Object.assign(t,{mimeType:e.dataset.analyticsAssetMimeType.trim()}),e.dataset.analyticsAssetTags&&Object.assign(t,{assetTags:e.dataset.analyticsAssetTags.trim()}),e.dataset.analyticsAssetTitle&&Object.assign(t,{title:e.dataset.analyticsAssetTitle.trim()}),e.dataset.analyticsAssetVocabularies&&Object.assign(t,{assetVocabularies:e.dataset.analyticsAssetVocabularies.trim()}),e.dataset.analyticsExternalReferenceCode&&Object.assign(t,{externalReferenceCode:e.dataset.analyticsExternalReferenceCode.trim()}),t}function Fe(e){return v(e)&&!!Eo(e)}function Gd(e){let t=n=>{let r=n.target,{form:i}=r;if(!i||!Fe(i))return;let s=bo(r),o=`${s.formId}${s.fieldName}blurred`;performance.mark(o);let c=`${s.formId}${s.fieldName}focused`;performance.measure("focusDuration",c,o);let l=performance.getEntriesByName("focusDuration").pop(),u=l&&typeof l.duration=="number"?~~l.duration:0;Object.assign(s,{focusDuration:u}),e.send(a.EventId.FieldBlurred,a.ApplicationId.Form,s),performance.clearMarks("focusDuration")};return document.addEventListener("blur",t,!0),()=>document.removeEventListener("blur",t,!0)}function $d(e){let t=n=>{let r=n.target,{form:i}=r;if(!i||!Fe(i))return;let s=bo(r),o=`${s.formId}${s.fieldName}focused`;performance.mark(o),e.send(a.EventId.FieldFocused,a.ApplicationId.Form,s)};return document.addEventListener("focus",t,!0),()=>document.removeEventListener("focus",t,!0)}function Kd(e){let t=n=>{let r=n.target;!Fe(r)||Fe(r)&&n.defaultPrevented||e.send(a.EventId.FormSubmitted,a.ApplicationId.Form,Qn(r))};return document.addEventListener("submit",t,!0),()=>document.removeEventListener("submit",t,!0)}function zd(e){return x(()=>{Array.prototype.slice.call(document.querySelectorAll("form")).filter(t=>Fe(t)).forEach(t=>{let n=Qn(t);e.send(a.EventId.FormViewed,a.ApplicationId.Form,n)})})}function Yd(e){let t=Gd(e),n=$d(e),r=Kd(e),i=zd(e);return()=>{t(),n(),r(),i()}}var Io=Yd;var Wn=[a.DataSetList.AnalyticsAssetAction,a.DataSetList.AnalyticsAssetType,a.DataSetList.AnalyticsExternalReferenceCode,a.DataSetList.AnalyticsObjectDefinitionName];function _o({dataset:e}){let t={externalReferenceCode:e.analyticsExternalReferenceCode.trim(),objectDefinitionName:e.analyticsObjectDefinitionName.trim()};return e.analyticsAssetCategories&&Object.assign(t,{assetCategories:e.analyticsAssetCategories.trim()}),e.analyticsAssetMimeType&&Object.assign(t,{mimeType:e.analyticsAssetMimeType.trim()}),e.analyticsAssetTags&&Object.assign(t,{assetTags:e.analyticsAssetTags.trim()}),e.analyticsAssetTitle&&Object.assign(t,{title:e.analyticsAssetTitle.trim()}),e.analyticsAssetVocabularies&&Object.assign(t,{assetVocabularies:e.analyticsAssetVocabularies.trim()}),e.analyticsObjectType&&Object.assign(t,{objectType:e.analyticsObjectType.trim()}),t}function Jd(e){let t=n=>{let r=n.target;v(r,Wn)&&r.dataset.analyticsAssetAction==="download"&&e.send(a.EventId.ObjectEntryDownloaded,a.ApplicationId.ObjectEntry,_o(r))};return document.addEventListener("click",t),()=>document.removeEventListener("click",t)}function xo(e,{eventId:t,isTrackable:n}){let r=N(a.ElementType.ObjectEntry,':not([data-analytics-asset-viewed="true"])'),i=C(()=>{Array.prototype.slice.call(document.querySelectorAll(r)).filter(n).forEach(l=>{if(Lt(l)){let u=_o(l);l.dataset.analyticsAssetViewed=!0,e.send(t,a.ApplicationId.ObjectEntry,u)}})},250),s=x(i),o=St(["scroll","resize"],i);return()=>{o(),s()}}function Xd(e){let t=Jd(e),n=xo(e,{eventId:a.EventId.ObjectEntryImpressionMade,isTrackable:i=>v(i,Wn)&&i.dataset?.analyticsAssetAction===a.ElementAction.Impression}),r=xo(e,{eventId:a.EventId.ObjectEntryViewed,isTrackable:i=>v(i,Wn)&&(!i.dataset?.analyticsAssetAction||i.dataset?.analyticsAssetAction===a.ElementAction.View)});return()=>{t(),n(),r()}}var So=Xd;function Lo(){let{clientHeight:e,scrollHeight:t}=document.documentElement;return e*100/t<=Tt}var wt=class{constructor(){this.timeReached=!1,this.depthReached=!Lo()}dispose(){this.timeReached=!1,this.depthReached=!Lo(),this.timeoutId&&clearTimeout(this.timeoutId)}setExpectedViewDuration(t,n){n&&!this.timeoutId&&(this.timeoutId=setTimeout(()=>this.onTimeReached(t),~~n))}onDepthReached(t){this.depthReached||(this.depthReached=!0,this.checkIsRead(t))}onTimeReached(t){this.timeReached=!0,this.checkIsRead(t)}checkIsRead(t){this.timeReached&&this.depthReached&&t()}};var wo=6e4;function ef(){let e=document.getElementById("main-content"),t=document.querySelector("meta[name='data-analytics-readable-content']");return t&&t.getAttribute("content")==="true"&&e?e.innerText:""}function tf(){return document.documentElement.lang}function nf(e){return e.replace(/\s+/gm,"").length/500*wo*Mn}function rf(e){return he({innerText:e})/Da*wo*Mn}function sf(e){let t=tf();return Ma.has(t)?nf(e):rf(e)}function af(e){let t=new wt,n=new R,r=x(()=>{let s=ef();t.setExpectedViewDuration(()=>e.send(a.EventId.PageRead,a.ApplicationId.Page,{externalReferenceCode:e._getContext().layoutExternalReferenceCode}),sf(s))}),i=C(()=>{n.onDepthReached(s=>{s>=Tt&&t.onDepthReached(()=>{e.send(a.EventId.PageRead,a.ApplicationId.Page,{externalReferenceCode:e._getContext().layoutExternalReferenceCode})})})},1500);return document.addEventListener("scroll",i),()=>{r(),document.removeEventListener("scroll",i),t.dispose(),n=new R}}var Co=af;function of(e){let t=new R,n=C(()=>{t.onDepthReached(i=>{e.send(a.EventId.PageDepthReached,a.ApplicationId.Page,{depth:i,externalReferenceCode:e._getContext().layoutExternalReferenceCode})})},1500);document.addEventListener("scroll",n);let r=()=>{t.dispose(),t=new R};return window.addEventListener("load",r),()=>{document.removeEventListener("scroll",n),window.removeEventListener("load",r)}}var Ro=of;function cf(e){let t=window.performance.timing,n=t.loadEventStart-t.navigationStart,r={externalReferenceCode:e._getContext().layoutExternalReferenceCode,pageLoadTime:n};e.send(a.EventId.PageLoaded,a.ApplicationId.Page,r)}function lf(e){let n=window.performance.getEntriesByName(W).length?W:"navigationStart",r=Ne(At,n),i={externalReferenceCode:e._getContext().layoutExternalReferenceCode,viewDuration:r};e.send(a.EventId.PageUnloaded,a.ApplicationId.Page,i)}function Oo(e){e.persisted&&ve(W)}function uf(e){let t=cf.bind(null,e);window.addEventListener("load",t);let n=lf.bind(null,e);return window.addEventListener("pagehide",n),window.addEventListener("pageshow",Oo),()=>{window.removeEventListener("load",t),window.removeEventListener("pagehide",n),window.removeEventListener("pageshow",Oo)}}var Mo=uf;var Gn=!0;function ko(){let e,t,n=document;return typeof n.hidden<"u"?(e="hidden",t="visibilitychange"):typeof n.msHidden<"u"?(e="msHidden",t="msvisibilitychange"):typeof n.webkitHidden<"u"&&(e="webkitHidden",t="webkitvisibilitychange"),{hidden:e,visibilityChange:t}}function df(e){let{hidden:t}=ko();Gn&&(document[t]?e.send(a.EventId.TabBlurred,a.ApplicationId.Page):e.send(a.EventId.TabFocused,a.ApplicationId.Page))}function ff(e){let{visibilityChange:t}=ko();if(t){let n=df.bind(null,e);return window.addEventListener("beforeunload",Do),window.addEventListener("pageshow",Po),document.addEventListener(t,n),()=>{window.removeEventListener("beforeunload",Do),window.removeEventListener("pageshow",Po),document.removeEventListener(t,n)}}}function Do(){Gn=!1}function Po(e){e.persisted&&(Gn=!0)}var qo=ff;function Ho({dataset:e}){let t={articleId:e.analyticsAssetId.trim()};return e.analyticsAssetCategories&&Object.assign(t,{assetCategories:e.analyticsAssetCategories.trim()}),e.analyticsAssetMimeType&&Object.assign(t,{mimeType:e.analyticsAssetMimeType.trim()}),e.analyticsAssetSubtype&&Object.assign(t,{subtype:e.analyticsAssetSubtype.trim()}),e.analyticsAssetTags&&Object.assign(t,{assetTags:e.analyticsAssetTags.trim()}),e.analyticsAssetTitle&&Object.assign(t,{title:e.analyticsAssetTitle.trim()}),e.analyticsAssetType&&Object.assign(t,{type:e.analyticsAssetType.trim()}),e.analyticsAssetVocabularies&&Object.assign(t,{assetVocabularies:e.analyticsAssetVocabularies.trim()}),e.analyticsWebContentResourcePk&&Object.assign(t,{webContentResourcePk:e.analyticsWebContentResourcePk.trim()}),e.analyticsExternalReferenceCode&&Object.assign(t,{externalReferenceCode:e.analyticsExternalReferenceCode.trim()}),t}function pf(e){return ge({analytics:e,applicationId:a.ApplicationId.WebContent,eventType:a.EventId.WebContentClicked,getPayload:Ho,isTrackable:v,type:[a.ElementType.WebContent,a.ElementType.JournalArticle]})}function jo(e,{eventId:t,isTrackable:n}){let r=N([a.ElementType.WebContent,a.ElementType.JournalArticle],':not([data-analytics-asset-viewed="true"])'),i=C(()=>{Array.prototype.slice.call(document.querySelectorAll(r)).filter(n).forEach(l=>{if(Lt(l)){let u=Ho(l);Object.assign(u,{numberOfWords:he(l)}),l.dataset.analyticsAssetViewed=!0,e.send(t,a.ApplicationId.WebContent,u)}})},250),s=x(i),o=St(["scroll","resize"],i);return()=>{o(),s()}}function mf(e){let t=pf(e),n=jo(e,{eventId:a.EventId.WebContentImpressionMade,isTrackable:i=>v(i)&&i.dataset?.analyticsAssetAction===a.ElementAction.Impression}),r=jo(e,{eventId:a.EventId.WebContentViewed,isTrackable:i=>v(i)&&(!i.dataset?.analyticsAssetAction||i.dataset?.analyticsAssetAction===a.ElementAction.View)});return()=>{t(),n(),r()}}var No=mf;var Fo=[To,po,mo,ho,vo,Io,So,Co,Ro,Mo,qo,No];function $n(e){return e<=1?1:$n(e-1)+$n(e-2)}function Kn(e,t){return $n(Math.min(e,t))*1e3}var zn=class{constructor(t){this.processInterval=null;this.attemptNumber=1,this.initialFlushInterval=t.flushInterval||2e3,this.processing=!1,this.queues=[],this.flushInterval=this.initialFlushInterval,this._startsFlushLoop()}addQueue(t,n={}){this.queues.push(Object.assign(n,{instance:t,name:t.name})),this.queues.sort(this._prioritize)}removeQueue(t){this.queues=this.queues.filter(({name:n})=>t!==n)}_prioritize({priority:t=1},{priority:n=1}){return n-t}_onFlushFail(){this.flushInterval=Kn(++this.attemptNumber,7),this._startsFlushLoop()}_onFlushSuccess(){this.attemptNumber=1,this.flushInterval!==this.initialFlushInterval&&(this.flushInterval=this.initialFlushInterval,this._startsFlushLoop())}flush(){this.processing||this.queues.reduce((t,{instance:n})=>t.then(()=>!n.hasItems()||!n.shouldFlush()?Promise.resolve():n.acquireLock().then(r=>{if(!r)return Promise.resolve();this.processing=!0;let i=()=>n.releaseLock().then(()=>{this.processing=!1});return Promise.allSettled(n.onFlush()).then(s=>(this._onFlushSuccess(),n.onFlushSuccess(s),i(),Promise.resolve()))})).catch(()=>(this._onFlushFail(),n.onFlushFail(),Promise.reject())),Promise.resolve()).catch(()=>{})}_startsFlushLoop(){this.processInterval&&clearInterval(this.processInterval),this.processInterval=setInterval(()=>this.flush(),this.flushInterval)}dispose(){this.processInterval&&clearInterval(this.processInterval),this.flushInterval=this.initialFlushInterval,this.queues=[]}};var Uo=zn;var Jn=class{constructor({endpointUrl:t,projectId:n,timeout:r}){this.projectId=n,this.timeout=r||5e3,this.url=t}_getRequestParameters(){let t={"Content-Type":"application/json"};return this.projectId&&Object.assign(t,{[vt]:this.projectId}),{cache:"default",credentials:"same-origin",headers:t,method:"POST",mode:"cors"}}_validateResponse(t){let n=t;return t.ok||(n=new Promise((r,i)=>i(t))),n}sendWithTimeout(t){return Promise.race([this.send(t),this._timeout()])}send(t){let n=this._getRequestParameters();return Object.assign(n,{body:JSON.stringify(t)}),fetch(this.url,n).then(this._validateResponse)}_timeout(){return new Promise((t,n)=>setTimeout(n,this.timeout))}};var Vo=Jn;var Bo=$(Fn());var Xn=class{constructor({analyticsInstance:t,name:n}){this.maxSize=512,this.name=n,this.lock=new Bo.default,this.analyticsInstance=t,E(this.name)||T(this.name,[]),this.addItem=this.addItem.bind(this)}addItem(t){this._enqueue(t),ro(this.name,this.maxSize)}_dequeue(t){let n=this.getItems();T(this.name,n.filter(({id:r,item:i})=>i?i.id!==t:t!==r))}_enqueue(t){let n=this.getItems();n.push(t),T(this.name,n)}getItems(){return E(this.name)||[]}hasItems(){return!!this.getItems().length}acquireLock(){return this.lock.acquireLock(this.name)}releaseLock(){return this.lock.releaseLock(this.name)}reset(){T(this.name,[])}shouldFlush(){return this.analyticsInstance._isTrackingDisabled()?(this.analyticsInstance._disposeInternal(),!1):!0}onFlush(){throw Error("onFlush should be implemented on the new class")}onFlushFail(){}onFlushSuccess(){}};var Ct=Xn;var Zn=class extends Ct{constructor({analyticsInstance:t,flushTo:n,name:r}){super({analyticsInstance:t,name:r}),this.clientAdapter=new Vo({endpointUrl:n,projectId:t.config.projectId})}onFlush(){return this.getItems().map(n=>this.clientAdapter.sendWithTimeout(n).then(()=>{this._dequeue(n.id)}).catch(r=>{let{status:i}=r||{};return(i===400||i===403)&&this._dequeue(n.id),Promise.reject(r)}))}};var Ae=Zn;var er=class extends Ae{constructor({analyticsInstance:t,name:n=a.Queues.AccountMessage}){super({analyticsInstance:t,flushTo:t.config.demandbaseAccountEndpoint,name:n})}};var Qo=er;var tr=class extends Ae{constructor({analyticsInstance:t,name:n=a.Queues.Messages}){super({analyticsInstance:t,flushTo:t.config.endpointUrl,name:n})}};var Wo=tr;function Go(e){let t=[];return e.forEach((n,r)=>t.push([r,n])),t}var Rt=(e=a.Keys.Contexts)=>{let t=E(e),n=new Map;return t&&t.forEach(([r,i])=>n.set(r,i)),n},Ve=(e,t=a.Keys.Contexts)=>{T(t,Go(e))};var nr=class extends Ct{constructor({analyticsInstance:t,flushTo:n,name:r}){super({analyticsInstance:t,name:r}),this.analyticsInstance=t,this.flushTo=n}onFlush(){let t=this.getItems(),n=Rt(),r=this._groupEventsByContextHash(t),i=this.analyticsInstance._getUserId(),s=[];return n.forEach((o,c)=>{let l=r[c];l&&s.push(this.analyticsInstance[this.flushTo].addItem(this._createMessage({context:o,events:l,userId:i})))}),s}onFlushSuccess(t){let n=this.getItems(),r=t?.filter(s=>s&&s.value&&s.value.events),i=uo(r,n);T(this.name,i),this.analyticsInstance.resetContext(),this.reset()}_createMessage({context:t,events:n,userId:r}){let{channelId:i,...s}=t,{dataSourceId:o,identity:{emailAddressHashed:c}}=this.analyticsInstance.config;return{channelId:i,context:{...s},dataSourceId:o,emailAddressHashed:c,events:n,id:Pe(),userId:r}}_groupEventsByContextHash(t){return t.reduce((n,r)=>(n[r.contextHash]?n[r.contextHash].push(r):n[r.contextHash]=[r],n),{})}};var $o=nr;var rr=class extends $o{constructor({analyticsInstance:t,name:n=a.Queues.Events}){super({analyticsInstance:t,flushTo:a.Queues.Messages,name:n})}};var Ko=rr;var ir=class extends Ae{constructor({analyticsInstance:t,name:n=a.Queues.IdentityMessage}){super({analyticsInstance:t,flushTo:t.config.identityEndpoint,name:n})}};var zo=ir;var Ot=class{constructor(t){this.instance=t}getBatchSegmentExternalReferenceCodes(){let t=this._getIndividualId(),n=E(gt);if(n&&n[t]){let r=new Date,i=n[t];if(r.getTime()-i.createDate<Pa)return Promise.resolve(i.segmentExternalReferenceCodes)}return this._fetchSegmentExternalReferenceCodes(t,"batch-segment-external-reference-codes").then(r=>{try{let i=new Date,s=E(gt)||{};return T(gt,{...s,[t]:{createDate:i.getTime(),segmentExternalReferenceCodes:r}}),r}catch{return r}})}getRealTimeSegmentExternalReferenceCodes(){return this._fetchSegmentExternalReferenceCodes(this._getIndividualId(),"real-time-segment-external-reference-codes")}_getIndividualId(){let{config:t}=this.instance;return t.identity?.emailAddressHashed||this.instance._getUserId()}_fetchSegmentExternalReferenceCodes(t,n){let{config:r}=this.instance,i={"Content-Type":"application/json"};return r.projectId&&Object.assign(i,{[vt]:r.projectId}),fetch(`${r.faroBackendUrl}/api/1.0/segment-memberships/${t}/${n}`,{cache:"default",credentials:"same-origin",headers:i,method:"GET",mode:"cors"}).then(s=>s.json())}};var sr=1,vf=[[1,()=>{let e=E(a.Keys.Contexts);e&&!Array.isArray(e[0])&&Ve(new Map)}]];function Af(){let e=E(a.Keys.StorageVersion);return e?parseFloat(e):0}function Tf(e=sr){return T(a.Keys.StorageVersion,e.toString())}function Yo(){let e=Af();return e===sr||(vf.forEach(([t,n])=>{t>e&&n()}),Tf(sr)),!0}var Ef=[a.ApplicationId.Blog,a.ApplicationId.Custom,a.ApplicationId.Document,a.ApplicationId.Form,a.ApplicationId.Page,a.ApplicationId.WebContent],Mt=e=>t=>e.map(n=>{if(typeof n=="function")return n(t)}).filter(Boolean),bf=e=>{let t="";return["string","number","boolean"].includes(typeof e)||(t="Attribute must be a String, Number, or Boolean."),t},Jo=e=>t=>{let n="";return String(t).length||(n=`${e} is required.`),n},If=e=>t=>{let n="";return typeof t!="string"&&(n=`${e} must be a string.`),n},ar=(e=ja)=>t=>{let n="";return String(t).length>e&&(n=`${t} exceeds maximum length of ${e}`),n},xf=(e=qa)=>({eventId:t,eventProps:n={}})=>{let r="";return Object.keys(n).length>e&&(r=`The Event ${t} attributes list exceeds maximum length of ${e}`),r},_f=e=>e.forEach(t=>console.error(new Error(t))),Xo=({applicationId:e,eventId:t,eventProps:n})=>{let r=Mt([If("eventId"),Jo("eventId"),ar()]),i=Mt([xf()]),s=Mt([Jo("eventPropKey"),ar()]),o=[];Ef.includes(e)||(o=[bf,ar(Ha)]);let c=Mt(o),l=[];if(l=l.concat(r(t)),n){l=l.concat(i({eventId:t,eventProps:n}));for(let u in n)l=l.concat(s(u),c(n[u]))}return l.length?(_f(l),!1):!0};var Te=window||global,Be=class Be{constructor(t,n){this._disposed=!1;this._pluginDisposers=[];this.config={channelId:"",dataSourceId:"",demandbaseAccountEndpoint:"",endpointUrl:"",faroBackendUrl:"",flushInterval:0,identity:{emailAddressHashed:""},identityEndpoint:"",projectId:"",userId:""};this.middlewares=[];this.version="";if(this._isTrackingDisabled())return this;this._disposed=!1;let r=(t.endpointUrl||"").replace(/\/$/,""),i=(t.faroBackendUrl||"").replace(/\/$/,"");return this.config=Object.assign(t,{demandbaseAccountEndpoint:`${r}/demandbase-account`,endpointUrl:r,faroBackendUrl:i,flushInterval:t.flushInterval||2e3,identityEndpoint:`${r}/identity`}),this.version=La,n.forEach(s=>this.registerMiddleware(s)),this._queueFlushService=new Uo(this.config),this._initializeEventQueue(),this._initializeEventMessageQueue(),this._initializeIdentityMessageQueue(),this._initializeAccountMessageQueue(),this.demandbase=new _t(this),this.segment=new Ot(this),Yo(),this._pluginDisposers=Fo.map(s=>s(this)),this._ensureIntegrity(),this}static create(t,n=[]){let r=new Be(t,n),i=window.Liferay;Te.Analytics=r,Te.Analytics.create=Be.create,Te.Analytics.dispose=Be.dispose;let s="",o="";return i&&i.ThemeDisplay&&i.ThemeDisplay.getUserEmailAddress&&i.ThemeDisplay.getUserEmailAddress().length&&i.ThemeDisplay.getUserName&&i.ThemeDisplay.getUserName().length&&(s=i.ThemeDisplay.getUserEmailAddress(),o=i.ThemeDisplay.getUserName()),r.setIdentity({email:s,name:o}),r}static dispose(){let t=Te.Analytics;t&&!t._isTrackingDisabled()&&t._disposeInternal()}getEvents(){return this[a.Queues.Events].getItems()}getBatchSegmentExternalReferenceCodes(){return this.segment.getBatchSegmentExternalReferenceCodes()}getRealTimeSegmentExternalReferenceCodes(){return this.segment.getRealTimeSegmentExternalReferenceCodes()}registerPlugin(t){typeof t=="function"&&t(this)}registerMiddleware(t){this._isTrackingDisabled()||typeof t=="function"&&Vn.push(t)}reset(){this._isTrackingDisabled()||(this[a.Queues.Events].reset(),this.resetContext())}resetContext(){let t=this._getContext(),n=new Map;n.set(Z(t),t),Ve(n)}track(t,n,r={}){let{assetType:i,...s}=n||{},o={applicationId:a.ApplicationId.CustomEvent,...r},c=i||o.applicationId;if(this._isTrackingDisabled()||this._disposed||!Xo({applicationId:c,eventId:t,eventProps:s}))return;let l=this._getCurrentContextHash();this[a.Queues.Events].addItem(lo(t,c,s,l))}send(t,n,r){n&&this.track(t,r,{applicationId:n})}setIdentity(t){if(this._isTrackingDisabled())return;let n={emailAddressHashed:t.email?Z(t.email.toLowerCase()):""};this.config.identity=n;let r=this._getUserId();return this._sendIdentity(n,r),this.demandbase.sendAccountMessage(r),Promise.resolve(r)}_disposeInternal(){this._disposed=!0,this._queueFlushService&&this._queueFlushService.dispose(),this._pluginDisposers.length&&this._pluginDisposers.filter(t=>typeof t=="function").forEach(t=>t())}_ensureIntegrity(){let t=E(a.Keys.UserId);t&&this._setCookie(a.Keys.UserId,t)}_getCurrentContextHash(){let t=this._getContext(),n=Z(t),r=Rt();return r.has(n)||(r.set(n,t),Ve(r)),n}_getContext(){let{context:t}=Vn.reduce((r,i)=>i(r),{context:{channelId:this.config.channelId}}),n={...t};for(let r in n)n[r]=String(n[r]).slice(0,ka);return n}_getIdentityHash(t,n,r){return Z({dataSourceId:t,identity:n,userId:r})}_getUserId(){let t=E(a.Keys.UserId),{emailAddressHashed:n}=this.config.identity,r=E(a.Keys.PrevEmailAddressHash);return t||(t=this._generateUserId()),n&&n!==r&&(r&&(t=this._generateUserId()),T(a.Keys.PrevEmailAddressHash,n)),t}_generateUserId(){let t=Pe();return T(a.Keys.UserId,t),this._setCookie(a.Keys.UserId,t),xt(a.Keys.Identity),t}_isTrackingDisabled(){return Te[a.Keys.DisableTracking]||navigator.doNotTrack==="1"||navigator.doNotTrack==="yes"}_sendIdentity(t,n){let{dataSourceId:r}=this.config,{channelId:i}=this._getContext(),s=this._getIdentityHash(r,t,n),o=E(a.Keys.Identity),c=E(a.Keys.ChannelId);if(s!==o||i!==c){let{emailAddressHashed:l}=t;T(a.Keys.ChannelId,i),T(a.Keys.Identity,s),this[a.Queues.IdentityMessage].addItem({channelId:i,dataSourceId:r,emailAddressHashed:l,id:s,userId:n})}}_setCookie(t,n){let r=window.Liferay,i=new Date;if(i.setDate(i.getDate()+365),r?.Util?.Cookie)r.Util.Cookie.set?.(t,n,r?.Util?.Cookie?.TYPES?.PERSONALIZATION,{expires:i,secure:!0});else{let s=r?.ThemeDisplay?.getPathContext?.()||"/";document.cookie=`${t}=${n}; expires=${i.toUTCString()}; path=${s}; Secure`}}_initializeEventQueue(){let t=new Ko({analyticsInstance:this});this[a.Queues.Events]=t,this._queueFlushService.addQueue(t,{priority:1})}_initializeEventMessageQueue(){let t=new Wo({analyticsInstance:this});this[a.Queues.Messages]=t,this._queueFlushService.addQueue(t,{priority:1})}_initializeIdentityMessageQueue(){let t=new zo({analyticsInstance:this});this[a.Queues.IdentityMessage]=t,this._queueFlushService.addQueue(t,{priority:10})}_initializeAccountMessageQueue(){let t=new Qo({analyticsInstance:this});this[a.Queues.AccountMessage]=t,this._queueFlushService.addQueue(t,{priority:10})}};a.Queues.AccountMessage,a.Queues.Events,a.Queues.Messages,a.Queues.IdentityMessage;var or=Be;Te.Analytics={create:or.create};})();
//# sourceMappingURL=analytics-all-min.js.map
