UNPKG

@splunk/otel-web-session-recorder

Version:
2 lines 388 kB
/*! For license information please see index.js.LICENSE.txt */ (()=>{"use strict";var e={0:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getGlobal=function(){var e;return null===(e=globalThis[r])||void 0===e?void 0:e[n]},t.getSplunkRumVersion=function(){var e;return null===(e=globalThis[r])||void 0===e?void 0:e[o]};const r=Symbol.for("opentelemetry.js.api.1"),n="splunk.rum",o=`${n}.version`},33:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevelNumber=void 0,function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e[e.CRITICAL=4]="CRITICAL"}(r||(t.LogLevelNumber=r={}))},41:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SessionReplay=void 0;var n=r(423);Object.defineProperty(t,"SessionReplay",{enumerable:!0,get:function(){return n.SessionReplay}})},63:function(e,t,r){var n=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};Object.defineProperty(t,"__esModule",{value:!0}),t.apiFetch=void 0;const o=r(488),i=r(637),s=r(731),a={headers:{}},c={"Content-Type":"text/plain;charset=UTF-8"},u=new Map;t.apiFetch=async(e,t)=>{var{abortPreviousRequest:r,baseUrl:l,body:d,discardExistingPath:f,doNotConvert:h=!1,doNotRetryOnDocumentHidden:p=!1,headers:v,logPayloadOnError:y=!1,retryCount:g=3,retryInterval:m=1e3,throwOnConvert:b=!1,waitForOnlineStatus:w=!1}=t,O=n(t,["abortPreviousRequest","baseUrl","body","discardExistingPath","doNotConvert","doNotRetryOnDocumentHidden","headers","logPayloadOnError","retryCount","retryInterval","throwOnConvert","waitForOnlineStatus"]);const E=l?(0,s.createUrl)({baseUrl:l,discardExistingPath:f,pathName:e}):new URL(e,window.location.origin);let S=u.get(E.href);S&&r&&(o.log.debug("Aborting previous request",E),S.abort("Aborted previous request.")),S=new AbortController,u.set(E.href,S);const P=Object.assign(Object.assign(Object.assign(Object.assign({},a),{body:d}),O),{signal:S.signal});let T;P.headers=void 0===v?c:v;let _,R=null,A=performance.now(),I=0,j=-1;for(let e=1;e<=g;e++){w&&await(0,s.waitForOnline)(),j=e;try{if(1===e)A=performance.now(),T=await fetch(E.href,P);else{const t=[],r=new Promise(t=>{setTimeout(()=>{t()},m*Math.pow(2,e-1))});if(t.push(r),p){const e=new Promise(e=>{const t=r=>{(0,s.isTrustedEvent)(r)&&"hidden"===document.visibilityState&&(document.removeEventListener("visibilitychange",t),e())};document.addEventListener("visibilitychange",t),"hidden"===document.visibilityState&&(document.removeEventListener("visibilitychange",t),e())});t.push(e)}if(await Promise.race(t),p&&"hidden"===document.visibilityState)throw new Error("Document is hidden and flag `doNotRetryOnDocumentHidden` is set to true.");w&&await(0,s.waitForOnline)(),A=performance.now(),T=await fetch(E.href,P)}_=void 0}catch(t){if(_=t,t instanceof Error&&"AbortError"===t.name)throw u.delete(E.href),new i.ApiError("Request was aborted.",-1,{fetchTotalMs:I,finalRetries:j},S.signal,y?JSON.stringify(d):"Payload not logged.",void 0,t);if(e<g&&(!p||"hidden"!==document.visibilityState))continue}finally{I=performance.now()-A}if(u.delete(E.href),!T)throw new i.ApiError(`API request to ${E.href} failed due to connection error.`,-1,{fetchTotalMs:I,finalRetries:j},S.signal,y?JSON.stringify(d):"Payload not logged.",void 0,_);if(T.status>399){try{R=await T.json()}catch(e){if(e instanceof Error&&("AbortError"===e.name||"TypeError"===e.name))throw new i.ApiError(`API request to ${E.href} failed with status code ${T.status}.`,T.status,{fetchTotalMs:I,finalRetries:j},S.signal,"Payload not logged.",T,e)}try{R||(R=await T.text())}catch(e){if(e instanceof Error&&("AbortError"===e.name||"TypeError"===e.name))throw new i.ApiError(`API request to ${E.href} failed with status code ${T.status}.`,T.status,{fetchTotalMs:I,finalRetries:j},S.signal,"Payload not logged.",T,e)}throw new i.ApiError(`API request to ${E.href} failed with status code ${T.status}`,T.status,{fetchTotalMs:I,finalRetries:j},S.signal,y?JSON.stringify(d):"Payload not logged.",T,void 0,{responseData:R})}if(204===T.status)break;if(h)break;try{R=await T.json();break}catch(t){if(t instanceof Error&&("AbortError"===t.name||"TypeError"===t.name)&&e<g)continue;if(b&&t instanceof Error)throw"AbortError"===t.name||"TypeError"===t.name?new i.ApiError(`API request to ${E.href} failed due to connection error.`,-1,{fetchTotalMs:I,finalRetries:j},S.signal,y?JSON.stringify(d):"Payload not logged.",void 0,_):new Error(`Could not convert data to JSON in ${E.href} request`);if(b)throw new Error(`Unknown error happened during API call. ${JSON.stringify(t)}`);break}}if(void 0===T)throw new Error("Response object is undefined.");return{data:R,response:T}}},107:(e,t)=>{var r={},n=function(e,t,n,o,i){var s=new Worker(r[t]||(r[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return s.onmessage=function(e){var t=e.data,r=t.$e$;if(r){var n=new Error(r[0]);n.code=r[1],n.stack=r[2],i(n,null)}else i(null,t)},s.postMessage(n,o),s},o=Uint8Array,i=Uint16Array,s=Int32Array,a=new o([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),c=new o([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),u=new o([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=function(e,t){for(var r=new i(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];var o=new s(r[30]);for(n=1;n<30;++n)for(var a=r[n];a<r[n+1];++a)o[a]=a-r[n]<<5|n;return{b:r,r:o}},d=l(a,2),f=d.b,h=d.r;f[28]=258,h[258]=28;for(var p=l(c,0),v=p.b,y=p.r,g=new i(32768),m=0;m<32768;++m){var b=(43690&m)>>1|(21845&m)<<1;b=(61680&(b=(52428&b)>>2|(13107&b)<<2))>>4|(3855&b)<<4,g[m]=((65280&b)>>8|(255&b)<<8)>>1}var w=function(e,t,r){for(var n=e.length,o=0,s=new i(t);o<n;++o)e[o]&&++s[e[o]-1];var a,c=new i(t);for(o=1;o<t;++o)c[o]=c[o-1]+s[o-1]<<1;if(r){a=new i(1<<t);var u=15-t;for(o=0;o<n;++o)if(e[o])for(var l=o<<4|e[o],d=t-e[o],f=c[e[o]-1]++<<d,h=f|(1<<d)-1;f<=h;++f)a[g[f]>>u]=l}else for(a=new i(n),o=0;o<n;++o)e[o]&&(a[o]=g[c[e[o]-1]++]>>15-e[o]);return a},O=new o(288);for(m=0;m<144;++m)O[m]=8;for(m=144;m<256;++m)O[m]=9;for(m=256;m<280;++m)O[m]=7;for(m=280;m<288;++m)O[m]=8;var E=new o(32);for(m=0;m<32;++m)E[m]=5;var S=w(O,9,0),P=w(O,9,1),T=w(E,5,0),_=w(E,5,1),R=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},A=function(e,t,r){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(7&t)&r},I=function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(7&t)},j=function(e){return(e+7)/8|0},C=function(e,t,r){return(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length),new o(e.subarray(t,r))};t.FlateErrorCode={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14};var x=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],L=function(e,t,r){var n=new Error(t||x[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,L),!r)throw n;return n},N=function(e,t,r,n){var i=e.length,s=n?n.length:0;if(!i||t.f&&!t.l)return r||new o(0);var l=!r,d=l||2!=t.i,h=t.i;l&&(r=new o(3*i));var p=function(e){var t=r.length;if(e>t){var n=new o(Math.max(2*t,e));n.set(r),r=n}},y=t.f||0,g=t.p||0,m=t.b||0,b=t.l,O=t.d,E=t.m,S=t.n,T=8*i;do{if(!b){y=A(e,g,1);var x=A(e,g+1,3);if(g+=3,!x){var N=e[($=j(g)+4)-4]|e[$-3]<<8,M=$+N;if(M>i){h&&L(0);break}d&&p(m+N),r.set(e.subarray($,M),m),t.b=m+=N,t.p=g=8*M,t.f=y;continue}if(1==x)b=P,O=_,E=9,S=5;else if(2==x){var k=A(e,g,31)+257,D=A(e,g+10,15)+4,B=k+A(e,g+5,31)+1;g+=14;for(var U=new o(B),F=new o(19),W=0;W<D;++W)F[u[W]]=A(e,g+3*W,7);g+=3*D;var z=R(F),V=(1<<z)-1,G=w(F,z,1);for(W=0;W<B;){var $,X=G[A(e,g,V)];if(g+=15&X,($=X>>4)<16)U[W++]=$;else{var q=0,H=0;for(16==$?(H=3+A(e,g,3),g+=2,q=U[W-1]):17==$?(H=3+A(e,g,7),g+=3):18==$&&(H=11+A(e,g,127),g+=7);H--;)U[W++]=q}}var K=U.subarray(0,k),Q=U.subarray(k);E=R(K),S=R(Q),b=w(K,E,1),O=w(Q,S,1)}else L(1);if(g>T){h&&L(0);break}}d&&p(m+131072);for(var Y=(1<<E)-1,J=(1<<S)-1,Z=g;;Z=g){var ee=(q=b[I(e,g)&Y])>>4;if((g+=15&q)>T){h&&L(0);break}if(q||L(2),ee<256)r[m++]=ee;else{if(256==ee){Z=g,b=null;break}var te=ee-254;if(ee>264){var re=a[W=ee-257];te=A(e,g,(1<<re)-1)+f[W],g+=re}var ne=O[I(e,g)&J],oe=ne>>4;if(ne||L(3),g+=15&ne,Q=v[oe],oe>3&&(re=c[oe],Q+=I(e,g)&(1<<re)-1,g+=re),g>T){h&&L(0);break}d&&p(m+131072);var ie=m+te;if(m<Q){var se=s-Q,ae=Math.min(Q,ie);for(se+m<0&&L(3);m<ae;++m)r[m]=n[se+m]}for(;m<ie;++m)r[m]=r[m-Q]}}t.l=b,t.p=Z,t.b=m,t.f=y,b&&(y=1,t.m=E,t.d=O,t.n=S)}while(!y);return m!=r.length&&l?C(r,0,m):r.subarray(0,m)},M=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},k=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},D=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var s=r.length,a=r.slice();if(!s)return{t:G,l:0};if(1==s){var c=new o(r[0].s+1);return c[r[0].s]=1,{t:c,l:1}}r.sort(function(e,t){return e.f-t.f}),r.push({s:-1,f:25001});var u=r[0],l=r[1],d=0,f=1,h=2;for(r[0]={s:-1,f:u.f+l.f,l:u,r:l};f!=s-1;)u=r[r[d].f<r[h].f?d++:h++],l=r[d!=f&&r[d].f<r[h].f?d++:h++],r[f++]={s:-1,f:u.f+l.f,l:u,r:l};var p=a[0].s;for(n=1;n<s;++n)a[n].s>p&&(p=a[n].s);var v=new i(p+1),y=B(r[f-1],v,0);if(y>t){n=0;var g=0,m=y-t,b=1<<m;for(a.sort(function(e,t){return v[t.s]-v[e.s]||e.f-t.f});n<s;++n){var w=a[n].s;if(!(v[w]>t))break;g+=b-(1<<y-v[w]),v[w]=t}for(g>>=m;g>0;){var O=a[n].s;v[O]<t?g-=1<<t-v[O]++-1:++n}for(;n>=0&&g;--n){var E=a[n].s;v[E]==t&&(--v[E],++g)}y=t}return{t:new o(v),l:y}},B=function(e,t,r){return-1==e.s?Math.max(B(e.l,t,r+1),B(e.r,t,r+1)):t[e.s]=r},U=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new i(++t),n=0,o=e[0],s=1,a=function(e){r[n++]=e},c=1;c<=t;++c)if(e[c]==o&&c!=t)++s;else{if(!o&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(o),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(o);s=1,o=e[c]}return{c:r.subarray(0,n),n:t}},F=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},W=function(e,t,r){var n=r.length,o=j(t+2);e[o]=255&n,e[o+1]=n>>8,e[o+2]=255^e[o],e[o+3]=255^e[o+1];for(var i=0;i<n;++i)e[o+i+4]=r[i];return 8*(o+4+n)},z=function(e,t,r,n,o,s,l,d,f,h,p){M(t,p++,r),++o[256];for(var v=D(o,15),y=v.t,g=v.l,m=D(s,15),b=m.t,P=m.l,_=U(y),R=_.c,A=_.n,I=U(b),j=I.c,C=I.n,x=new i(19),L=0;L<R.length;++L)++x[31&R[L]];for(L=0;L<j.length;++L)++x[31&j[L]];for(var N=D(x,7),B=N.t,z=N.l,V=19;V>4&&!B[u[V-1]];--V);var G,$,X,q,H=h+5<<3,K=F(o,O)+F(s,E)+l,Q=F(o,y)+F(s,b)+l+14+3*V+F(x,B)+2*x[16]+3*x[17]+7*x[18];if(f>=0&&H<=K&&H<=Q)return W(t,p,e.subarray(f,f+h));if(M(t,p,1+(Q<K)),p+=2,Q<K){G=w(y,g,0),$=y,X=w(b,P,0),q=b;var Y=w(B,z,0);for(M(t,p,A-257),M(t,p+5,C-1),M(t,p+10,V-4),p+=14,L=0;L<V;++L)M(t,p+3*L,B[u[L]]);p+=3*V;for(var J=[R,j],Z=0;Z<2;++Z){var ee=J[Z];for(L=0;L<ee.length;++L){var te=31&ee[L];M(t,p,Y[te]),p+=B[te],te>15&&(M(t,p,ee[L]>>5&127),p+=ee[L]>>12)}}}else G=S,$=O,X=T,q=E;for(L=0;L<d;++L){var re=n[L];if(re>255){k(t,p,G[257+(te=re>>18&31)]),p+=$[te+257],te>7&&(M(t,p,re>>23&31),p+=a[te]);var ne=31&re;k(t,p,X[ne]),p+=q[ne],ne>3&&(k(t,p,re>>5&8191),p+=c[ne])}else k(t,p,G[re]),p+=$[re]}return k(t,p,G[256]),p+$[256]},V=new s([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),G=new o(0),$=function(e,t,r,n,u,l){var d=l.z||e.length,f=new o(n+d+5*(1+Math.ceil(d/7e3))+u),p=f.subarray(n,f.length-u),v=l.l,g=7&(l.r||0);if(t){g&&(p[0]=l.r>>3);for(var m=V[t-1],b=m>>13,w=8191&m,O=(1<<r)-1,E=l.p||new i(32768),S=l.h||new i(O+1),P=Math.ceil(r/3),T=2*P,_=function(t){return(e[t]^e[t+1]<<P^e[t+2]<<T)&O},R=new s(25e3),A=new i(288),I=new i(32),x=0,L=0,N=l.i||0,M=0,k=l.w||0,D=0;N+2<d;++N){var B=_(N),U=32767&N,F=S[B];if(E[U]=F,S[B]=U,k<=N){var G=d-N;if((x>7e3||M>24576)&&(G>423||!v)){g=z(e,p,0,R,A,I,L,M,D,N-D,g),M=x=L=0,D=N;for(var $=0;$<286;++$)A[$]=0;for($=0;$<30;++$)I[$]=0}var X=2,q=0,H=w,K=U-F&32767;if(G>2&&B==_(N-K))for(var Q=Math.min(b,G)-1,Y=Math.min(32767,N),J=Math.min(258,G);K<=Y&&--H&&U!=F;){if(e[N+X]==e[N+X-K]){for(var Z=0;Z<J&&e[N+Z]==e[N+Z-K];++Z);if(Z>X){if(X=Z,q=K,Z>Q)break;var ee=Math.min(K,Z-2),te=0;for($=0;$<ee;++$){var re=N-K+$&32767,ne=re-E[re]&32767;ne>te&&(te=ne,F=re)}}}K+=(U=F)-(F=E[U])&32767}if(q){R[M++]=268435456|h[X]<<18|y[q];var oe=31&h[X],ie=31&y[q];L+=a[oe]+c[ie],++A[257+oe],++I[ie],k=N+X,++x}else R[M++]=e[N],++A[e[N]]}}for(N=Math.max(N,k);N<d;++N)R[M++]=e[N],++A[e[N]];g=z(e,p,v,R,A,I,L,M,D,N-D,g),v||(l.r=7&g|p[g/8|0]<<3,g-=7,l.h=S,l.p=E,l.i=N,l.w=k)}else{for(N=l.w||0;N<d+v;N+=65535){var se=N+65535;se>=d&&(p[g/8|0]=v,se=d),g=W(p,g+1,e.subarray(N,se))}l.i=d}return C(f,0,n+j(g)+u)},X=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(1&r&&-306674912)^r>>>1;e[t]=r}return e}(),q=function(){var e=-1;return{p:function(t){for(var r=e,n=0;n<t.length;++n)r=X[255&r^t[n]]^r>>>8;e=r},d:function(){return~e}}},H=function(){var e=1,t=0;return{p:function(r){for(var n=e,o=t,i=0|r.length,s=0;s!=i;){for(var a=Math.min(s+2655,i);s<a;++s)o+=n+=r[s];n=(65535&n)+15*(n>>16),o=(65535&o)+15*(o>>16)}e=n,t=o},d:function(){return(255&(e%=65521))<<24|(65280&e)<<8|(255&(t%=65521))<<8|t>>8}}},K=function(e,t,r,n,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),a=new o(s.length+e.length);a.set(s),a.set(e,s.length),e=a,i.w=s.length}return $(e,null==t.level?6:t.level,null==t.mem?i.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,r,n,i)},Q=function(e,t){var r={};for(var n in e)r[n]=e[n];for(var n in t)r[n]=t[n];return r},Y=function(e,t,r){for(var n=e(),o=e.toString(),i=o.slice(o.indexOf("[")+1,o.lastIndexOf("]")).replace(/\s+/g,"").split(","),s=0;s<n.length;++s){var a=n[s],c=i[s];if("function"==typeof a){t+=";"+c+"=";var u=a.toString();if(a.prototype)if(-1!=u.indexOf("[native code]")){var l=u.indexOf(" ",8)+1;t+=u.slice(l,u.indexOf("(",l))}else for(var d in t+=u,a.prototype)t+=";"+c+".prototype."+d+"="+a.prototype[d].toString();else t+=u}else r[c]=a}return t},J=[],Z=function(e,t,r,o){if(!J[r]){for(var i="",s={},a=e.length-1,c=0;c<a;++c)i=Y(e[c],i,s);J[r]={c:Y(e[a],i,s),e:s}}var u=Q({},J[r].e);return n(J[r].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",r,u,function(e){var t=[];for(var r in e)e[r].buffer&&t.push((e[r]=new e[r].constructor(e[r])).buffer);return t}(u),o)},ee=function(){return[o,i,s,a,c,u,f,v,P,_,g,x,w,R,A,I,j,C,L,N,Ie,se,ae]},te=function(){return[o,i,s,a,c,u,h,y,S,O,T,E,g,V,G,w,M,k,D,B,U,F,W,z,j,C,$,K,Te,se]},re=function(){return[ve,me,pe,q,X]},ne=function(){return[ye,ge]},oe=function(){return[be,pe,H]},ie=function(){return[we]},se=function(e){return postMessage(e,[e.buffer])},ae=function(e){return e&&{out:e.size&&new o(e.size),dictionary:e.dictionary}},ce=function(e,t,r,n,o,i){var s=Z(r,n,o,function(e,t){s.terminate(),i(e,t)});return s.postMessage([e,t],t.consume?[e.buffer]:[]),function(){s.terminate()}},ue=function(e){return e.ondata=function(e,t){return postMessage([e,t],[e.buffer])},function(t){t.data.length?(e.push(t.data[0],t.data[1]),postMessage([t.data[0].length])):e.flush()}},le=function(e,t,r,n,o,i,s){var a,c=Z(e,n,o,function(e,r){e?(c.terminate(),t.ondata.call(t,e)):Array.isArray(r)?1==r.length?(t.queuedSize-=r[0],t.ondrain&&t.ondrain(r[0])):(r[1]&&c.terminate(),t.ondata.call(t,e,r[0],r[1])):s(r)});c.postMessage(r),t.queuedSize=0,t.push=function(e,r){t.ondata||L(5),a&&t.ondata(L(4,0,1),null,!!r),t.queuedSize+=e.length,c.postMessage([e,a=r],[e.buffer])},t.terminate=function(){c.terminate()},i&&(t.flush=function(){c.postMessage([])})},de=function(e,t){return e[t]|e[t+1]<<8},fe=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},he=function(e,t){return fe(e,t)+4294967296*fe(e,t+4)},pe=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},ve=function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&pe(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var n=0;n<=r.length;++n)e[n+10]=r.charCodeAt(n)}},ye=function(e){31==e[0]&&139==e[1]&&8==e[2]||L(6,"invalid gzip data");var t=e[3],r=10;4&t&&(r+=2+(e[10]|e[11]<<8));for(var n=(t>>3&1)+(t>>4&1);n>0;n-=!e[r++]);return r+(2&t)},ge=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},me=function(e){return 10+(e.filename?e.filename.length+1:0)},be=function(e,t){var r=t.level,n=0==r?0:r<6?1:9==r?3:2;if(e[0]=120,e[1]=n<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var o=H();o.p(t.dictionary),pe(e,2,o.d())}},we=function(e,t){return(8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31)&&L(6,"invalid zlib data"),(e[1]>>5&1)==+!t&&L(6,"invalid zlib data: "+(32&e[1]?"need":"unexpected")+" dictionary"),2+(e[1]>>3&4)};function Oe(e,t){return"function"==typeof e&&(t=e,e={}),this.ondata=t,e}var Ee=function(){function e(e,t){if("function"==typeof e&&(t=e,e={}),this.ondata=t,this.o=e||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new o(98304),this.o.dictionary){var r=this.o.dictionary.subarray(-32768);this.b.set(r,32768-r.length),this.s.i=32768-r.length}}return e.prototype.p=function(e,t){this.ondata(K(e,this.o,0,0,this.s),t)},e.prototype.push=function(e,t){this.ondata||L(5),this.s.l&&L(4);var r=e.length+this.s.z;if(r>this.b.length){if(r>2*this.b.length-32768){var n=new o(-32768&r);n.set(this.b.subarray(0,this.s.z)),this.b=n}var i=this.b.length-this.s.z;this.b.set(e.subarray(0,i),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(e.subarray(i),32768),this.s.z=e.length-i+32768,this.s.i=32766,this.s.w=32768}else this.b.set(e,this.s.z),this.s.z+=e.length;this.s.l=1&t,(this.s.z>this.s.w+8191||t)&&(this.p(this.b,t||!1),this.s.w=this.s.i,this.s.i-=2)},e.prototype.flush=function(){this.ondata||L(5),this.s.l&&L(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},e}();t.Deflate=Ee;var Se=function(){return function(e,t){le([te,function(){return[ue,Ee]}],this,Oe.call(this,e,t),function(e){var t=new Ee(e.data);onmessage=ue(t)},6,1)}}();function Pe(e,t,r){return r||(r=t,t={}),"function"!=typeof r&&L(7),ce(e,t,[te],function(e){return se(Te(e.data[0],e.data[1]))},0,r)}function Te(e,t){return K(e,t||{},0,0)}t.AsyncDeflate=Se,t.deflate=Pe,t.deflateSync=Te;var _e=function(){function e(e,t){"function"==typeof e&&(t=e,e={}),this.ondata=t;var r=e&&e.dictionary&&e.dictionary.subarray(-32768);this.s={i:0,b:r?r.length:0},this.o=new o(32768),this.p=new o(0),r&&this.o.set(r)}return e.prototype.e=function(e){if(this.ondata||L(5),this.d&&L(4),this.p.length){if(e.length){var t=new o(this.p.length+e.length);t.set(this.p),t.set(e,this.p.length),this.p=t}}else this.p=e},e.prototype.c=function(e){this.s.i=+(this.d=e||!1);var t=this.s.b,r=N(this.p,this.s,this.o);this.ondata(C(r,t,this.s.b),this.d),this.o=C(r,this.s.b-32768),this.s.b=this.o.length,this.p=C(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}();t.Inflate=_e;var Re=function(){return function(e,t){le([ee,function(){return[ue,_e]}],this,Oe.call(this,e,t),function(e){var t=new _e(e.data);onmessage=ue(t)},7,0)}}();function Ae(e,t,r){return r||(r=t,t={}),"function"!=typeof r&&L(7),ce(e,t,[ee],function(e){return se(Ie(e.data[0],ae(e.data[1])))},1,r)}function Ie(e,t){return N(e,{i:2},t&&t.out,t&&t.dictionary)}t.AsyncInflate=Re,t.inflate=Ae,t.inflateSync=Ie;var je=function(){function e(e,t){this.c=q(),this.l=0,this.v=1,Ee.call(this,e,t)}return e.prototype.push=function(e,t){this.c.p(e),this.l+=e.length,Ee.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){var r=K(e,this.o,this.v&&me(this.o),t&&8,this.s);this.v&&(ve(r,this.o),this.v=0),t&&(pe(r,r.length-8,this.c.d()),pe(r,r.length-4,this.l)),this.ondata(r,t)},e.prototype.flush=function(){Ee.prototype.flush.call(this)},e}();t.Gzip=je,t.Compress=je;var Ce=function(){return function(e,t){le([te,re,function(){return[ue,Ee,je]}],this,Oe.call(this,e,t),function(e){var t=new je(e.data);onmessage=ue(t)},8,1)}}();function xe(e,t,r){return r||(r=t,t={}),"function"!=typeof r&&L(7),ce(e,t,[te,re,function(){return[Le]}],function(e){return se(Le(e.data[0],e.data[1]))},2,r)}function Le(e,t){t||(t={});var r=q(),n=e.length;r.p(e);var o=K(e,t,me(t),8),i=o.length;return ve(o,t),pe(o,i-8,r.d()),pe(o,i-4,n),o}t.AsyncGzip=Ce,t.AsyncCompress=Ce,t.gzip=xe,t.compress=xe,t.gzipSync=Le,t.compressSync=Le;var Ne=function(){function e(e,t){this.v=1,this.r=0,_e.call(this,e,t)}return e.prototype.push=function(e,t){if(_e.prototype.e.call(this,e),this.r+=e.length,this.v){var r=this.p.subarray(this.v-1),n=r.length>3?ye(r):4;if(n>r.length){if(!t)return}else this.v>1&&this.onmember&&this.onmember(this.r-r.length);this.p=r.subarray(n),this.v=0}_e.prototype.c.call(this,t),!this.s.f||this.s.l||t||(this.v=j(this.s.p)+9,this.s={i:0},this.o=new o(0),this.push(new o(0),t))},e}();t.Gunzip=Ne;var Me=function(){return function(e,t){var r=this;le([ee,ne,function(){return[ue,_e,Ne]}],this,Oe.call(this,e,t),function(e){var t=new Ne(e.data);t.onmember=function(e){return postMessage(e)},onmessage=ue(t)},9,0,function(e){return r.onmember&&r.onmember(e)})}}();function ke(e,t,r){return r||(r=t,t={}),"function"!=typeof r&&L(7),ce(e,t,[ee,ne,function(){return[De]}],function(e){return se(De(e.data[0],e.data[1]))},3,r)}function De(e,t){var r=ye(e);return r+8>e.length&&L(6,"invalid gzip data"),N(e.subarray(r,-8),{i:2},t&&t.out||new o(ge(e)),t&&t.dictionary)}t.AsyncGunzip=Me,t.gunzip=ke,t.gunzipSync=De;var Be=function(){function e(e,t){this.c=H(),this.v=1,Ee.call(this,e,t)}return e.prototype.push=function(e,t){this.c.p(e),Ee.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){var r=K(e,this.o,this.v&&(this.o.dictionary?6:2),t&&4,this.s);this.v&&(be(r,this.o),this.v=0),t&&pe(r,r.length-4,this.c.d()),this.ondata(r,t)},e.prototype.flush=function(){Ee.prototype.flush.call(this)},e}();t.Zlib=Be;var Ue=function(){return function(e,t){le([te,oe,function(){return[ue,Ee,Be]}],this,Oe.call(this,e,t),function(e){var t=new Be(e.data);onmessage=ue(t)},10,1)}}();function Fe(e,t){t||(t={});var r=H();r.p(e);var n=K(e,t,t.dictionary?6:2,4);return be(n,t),pe(n,n.length-4,r.d()),n}t.AsyncZlib=Ue,t.zlib=function(e,t,r){return r||(r=t,t={}),"function"!=typeof r&&L(7),ce(e,t,[te,oe,function(){return[Fe]}],function(e){return se(Fe(e.data[0],e.data[1]))},4,r)},t.zlibSync=Fe;var We=function(){function e(e,t){_e.call(this,e,t),this.v=e&&e.dictionary?2:1}return e.prototype.push=function(e,t){if(_e.prototype.e.call(this,e),this.v){if(this.p.length<6&&!t)return;this.p=this.p.subarray(we(this.p,this.v-1)),this.v=0}t&&(this.p.length<4&&L(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),_e.prototype.c.call(this,t)},e}();t.Unzlib=We;var ze=function(){return function(e,t){le([ee,ie,function(){return[ue,_e,We]}],this,Oe.call(this,e,t),function(e){var t=new We(e.data);onmessage=ue(t)},11,0)}}();function Ve(e,t,r){return r||(r=t,t={}),"function"!=typeof r&&L(7),ce(e,t,[ee,ie,function(){return[Ge]}],function(e){return se(Ge(e.data[0],ae(e.data[1])))},5,r)}function Ge(e,t){return N(e.subarray(we(e,t&&t.dictionary),-4),{i:2},t&&t.out,t&&t.dictionary)}t.AsyncUnzlib=ze,t.unzlib=Ve,t.unzlibSync=Ge;var $e=function(){function e(e,t){this.o=Oe.call(this,e,t)||{},this.G=Ne,this.I=_e,this.Z=We}return e.prototype.i=function(){var e=this;this.s.ondata=function(t,r){e.ondata(t,r)}},e.prototype.push=function(e,t){if(this.ondata||L(5),this.s)this.s.push(e,t);else{if(this.p&&this.p.length){var r=new o(this.p.length+e.length);r.set(this.p),r.set(e,this.p.length)}else this.p=e;this.p.length>2&&(this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(this.o):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o):new this.Z(this.o),this.i(),this.s.push(this.p,t),this.p=null)}},e}();t.Decompress=$e;var Xe=function(){function e(e,t){$e.call(this,e,t),this.queuedSize=0,this.G=Me,this.I=Re,this.Z=ze}return e.prototype.i=function(){var e=this;this.s.ondata=function(t,r,n){e.ondata(t,r,n)},this.s.ondrain=function(t){e.queuedSize-=t,e.ondrain&&e.ondrain(t)}},e.prototype.push=function(e,t){this.queuedSize+=e.length,$e.prototype.push.call(this,e,t)},e}();t.AsyncDecompress=Xe,t.decompress=function(e,t,r){return r||(r=t,t={}),"function"!=typeof r&&L(7),31==e[0]&&139==e[1]&&8==e[2]?ke(e,t,r):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?Ae(e,t,r):Ve(e,t,r)},t.decompressSync=function(e,t){return 31==e[0]&&139==e[1]&&8==e[2]?De(e,t):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?Ie(e,t):Ge(e,t)};var qe=function(e,t,r,n){for(var i in e){var s=e[i],a=t+i,c=n;Array.isArray(s)&&(c=Q(n,s[1]),s=s[0]),s instanceof o?r[a]=[s,c]:(r[a+="/"]=[new o(0),c],qe(s,a,r,n))}},He="undefined"!=typeof TextEncoder&&new TextEncoder,Ke="undefined"!=typeof TextDecoder&&new TextDecoder,Qe=0;try{Ke.decode(G,{stream:!0}),Qe=1}catch(e){}var Ye=function(e){for(var t="",r=0;;){var n=e[r++],o=(n>127)+(n>223)+(n>239);if(r+o>e.length)return{s:t,r:C(e,r-1)};o?3==o?(n=((15&n)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536,t+=String.fromCharCode(55296|n>>10,56320|1023&n)):t+=1&o?String.fromCharCode((31&n)<<6|63&e[r++]):String.fromCharCode((15&n)<<12|(63&e[r++])<<6|63&e[r++]):t+=String.fromCharCode(n)}},Je=function(){function e(e){this.ondata=e,Qe?this.t=new TextDecoder:this.p=G}return e.prototype.push=function(e,t){if(this.ondata||L(5),t=!!t,this.t)return this.ondata(this.t.decode(e,{stream:!0}),t),void(t&&(this.t.decode().length&&L(8),this.t=null));this.p||L(4);var r=new o(this.p.length+e.length);r.set(this.p),r.set(e,this.p.length);var n=Ye(r),i=n.s,s=n.r;t?(s.length&&L(8),this.p=null):this.p=s,this.ondata(i,t)},e}();t.DecodeUTF8=Je;var Ze=function(){function e(e){this.ondata=e}return e.prototype.push=function(e,t){this.ondata||L(5),this.d&&L(4),this.ondata(et(e),this.d=t||!1)},e}();function et(e,t){if(t){for(var r=new o(e.length),n=0;n<e.length;++n)r[n]=e.charCodeAt(n);return r}if(He)return He.encode(e);var i=e.length,s=new o(e.length+(e.length>>1)),a=0,c=function(e){s[a++]=e};for(n=0;n<i;++n){if(a+5>s.length){var u=new o(a+8+(i-n<<1));u.set(s),s=u}var l=e.charCodeAt(n);l<128||t?c(l):l<2048?(c(192|l>>6),c(128|63&l)):l>55295&&l<57344?(c(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++n))>>18),c(128|l>>12&63),c(128|l>>6&63),c(128|63&l)):(c(224|l>>12),c(128|l>>6&63),c(128|63&l))}return C(s,0,a)}function tt(e,t){if(t){for(var r="",n=0;n<e.length;n+=16384)r+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return r}if(Ke)return Ke.decode(e);var o=Ye(e),i=o.s;return(r=o.r).length&&L(8),i}t.EncodeUTF8=Ze,t.strToU8=et,t.strFromU8=tt;var rt=function(e){return 1==e?3:e<6?2:9==e?1:0},nt=function(e,t){return t+30+de(e,t+26)+de(e,t+28)},ot=function(e,t,r){var n=de(e,t+28),o=tt(e.subarray(t+46,t+46+n),!(2048&de(e,t+8))),i=t+46+n,s=fe(e,t+20),a=r&&4294967295==s?it(e,i):[s,fe(e,t+24),fe(e,t+42)],c=a[0],u=a[1],l=a[2];return[de(e,t+10),c,u,o,i+de(e,t+30)+de(e,t+32),l]},it=function(e,t){for(;1!=de(e,t);t+=4+de(e,t+2));return[he(e,t+12),he(e,t+4),he(e,t+20)]},st=function(e){var t=0;if(e)for(var r in e){var n=e[r].length;n>65535&&L(9),t+=n+4}return t},at=function(e,t,r,n,o,i,s,a){var c=n.length,u=r.extra,l=a&&a.length,d=st(u);pe(e,t,null!=s?33639248:67324752),t+=4,null!=s&&(e[t++]=20,e[t++]=r.os),e[t]=20,t+=2,e[t++]=r.flag<<1|(i<0&&8),e[t++]=o&&8,e[t++]=255&r.compression,e[t++]=r.compression>>8;var f=new Date(null==r.mtime?Date.now():r.mtime),h=f.getFullYear()-1980;if((h<0||h>119)&&L(10),pe(e,t,h<<25|f.getMonth()+1<<21|f.getDate()<<16|f.getHours()<<11|f.getMinutes()<<5|f.getSeconds()>>1),t+=4,-1!=i&&(pe(e,t,r.crc),pe(e,t+4,i<0?-i-2:i),pe(e,t+8,r.size)),pe(e,t+12,c),pe(e,t+14,d),t+=16,null!=s&&(pe(e,t,l),pe(e,t+6,r.attrs),pe(e,t+10,s),t+=14),e.set(n,t),t+=c,d)for(var p in u){var v=u[p],y=v.length;pe(e,t,+p),pe(e,t+2,y),e.set(v,t+4),t+=4+y}return l&&(e.set(a,t),t+=l),t},ct=function(e,t,r,n,o){pe(e,t,101010256),pe(e,t+8,r),pe(e,t+10,r),pe(e,t+12,n),pe(e,t+16,o)},ut=function(){function e(e){this.filename=e,this.c=q(),this.size=0,this.compression=0}return e.prototype.process=function(e,t){this.ondata(null,e,t)},e.prototype.push=function(e,t){this.ondata||L(5),this.c.p(e),this.size+=e.length,t&&(this.crc=this.c.d()),this.process(e,t||!1)},e}();t.ZipPassThrough=ut;var lt=function(){function e(e,t){var r=this;t||(t={}),ut.call(this,e),this.d=new Ee(t,function(e,t){r.ondata(null,e,t)}),this.compression=8,this.flag=rt(t.level)}return e.prototype.process=function(e,t){try{this.d.push(e,t)}catch(e){this.ondata(e,null,t)}},e.prototype.push=function(e,t){ut.prototype.push.call(this,e,t)},e}();t.ZipDeflate=lt;var dt=function(){function e(e,t){var r=this;t||(t={}),ut.call(this,e),this.d=new Se(t,function(e,t,n){r.ondata(e,t,n)}),this.compression=8,this.flag=rt(t.level),this.terminate=this.d.terminate}return e.prototype.process=function(e,t){this.d.push(e,t)},e.prototype.push=function(e,t){ut.prototype.push.call(this,e,t)},e}();t.AsyncZipDeflate=dt;var ft=function(){function e(e){this.ondata=e,this.u=[],this.d=1}return e.prototype.add=function(e){var t=this;if(this.ondata||L(5),2&this.d)this.ondata(L(4+8*(1&this.d),0,1),null,!1);else{var r=et(e.filename),n=r.length,i=e.comment,s=i&&et(i),a=n!=e.filename.length||s&&i.length!=s.length,c=n+st(e.extra)+30;n>65535&&this.ondata(L(11,0,1),null,!1);var u=new o(c);at(u,0,e,r,a,-1);var l=[u],d=function(){for(var e=0,r=l;e<r.length;e++){var n=r[e];t.ondata(null,n,!1)}l=[]},f=this.d;this.d=0;var h=this.u.length,p=Q(e,{f:r,u:a,o:s,t:function(){e.terminate&&e.terminate()},r:function(){if(d(),f){var e=t.u[h+1];e?e.r():t.d=1}f=1}}),v=0;e.ondata=function(r,n,i){if(r)t.ondata(r,n,i),t.terminate();else if(v+=n.length,l.push(n),i){var s=new o(16);pe(s,0,134695760),pe(s,4,e.crc),pe(s,8,v),pe(s,12,e.size),l.push(s),p.c=v,p.b=c+v+16,p.crc=e.crc,p.size=e.size,f&&p.r(),f=1}else f&&d()},this.u.push(p)}},e.prototype.end=function(){var e=this;2&this.d?this.ondata(L(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&e.d&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3)},e.prototype.e=function(){for(var e=0,t=0,r=0,n=0,i=this.u;n<i.length;n++)r+=46+(u=i[n]).f.length+st(u.extra)+(u.o?u.o.length:0);for(var s=new o(r+22),a=0,c=this.u;a<c.length;a++){var u=c[a];at(s,e,u,u.f,u.u,-u.c-2,t,u.o),e+=46+u.f.length+st(u.extra)+(u.o?u.o.length:0),t+=u.b}ct(s,e,this.u.length,r,t),this.ondata(null,s,!0),this.d=2},e.prototype.terminate=function(){for(var e=0,t=this.u;e<t.length;e++)t[e].t();this.d=2},e}();t.Zip=ft,t.zip=function(e,t,r){r||(r=t,t={}),"function"!=typeof r&&L(7);var n={};qe(e,"",n,t);var i=Object.keys(n),s=i.length,a=0,c=0,u=s,l=new Array(s),d=[],f=function(){for(var e=0;e<d.length;++e)d[e]()},h=function(e,t){gt(function(){r(e,t)})};gt(function(){h=r});var p=function(){var e=new o(c+22),t=a,r=c-a;c=0;for(var n=0;n<u;++n){var i=l[n];try{var s=i.c.length;at(e,c,i,i.f,i.u,s);var d=30+i.f.length+st(i.extra),f=c+d;e.set(i.c,f),at(e,a,i,i.f,i.u,s,c,i.m),a+=16+d+(i.m?i.m.length:0),c=f+s}catch(e){return h(e,null)}}ct(e,a,l.length,r,t),h(null,e)};s||p();for(var v=function(e){var t=i[e],r=n[t],o=r[0],u=r[1],v=q(),y=o.length;v.p(o);var g=et(t),m=g.length,b=u.comment,w=b&&et(b),O=w&&w.length,E=st(u.extra),S=0==u.level?0:8,P=function(r,n){if(r)f(),h(r,null);else{var o=n.length;l[e]=Q(u,{size:y,crc:v.d(),c:n,f:g,m:w,u:m!=t.length||w&&b.length!=O,compression:S}),a+=30+m+E+o,c+=76+2*(m+E)+(O||0)+o,--s||p()}};if(m>65535&&P(L(11,0,1),null),S)if(y<16e4)try{P(null,Te(o,u))}catch(e){P(e,null)}else d.push(Pe(o,u,P));else P(null,o)},y=0;y<u;++y)v(y);return f},t.zipSync=function(e,t){t||(t={});var r={},n=[];qe(e,"",r,t);var i=0,s=0;for(var a in r){var c=r[a],u=c[0],l=c[1],d=0==l.level?0:8,f=(P=et(a)).length,h=l.comment,p=h&&et(h),v=p&&p.length,y=st(l.extra);f>65535&&L(11);var g=d?Te(u,l):u,m=g.length,b=q();b.p(u),n.push(Q(l,{size:u.length,crc:b.d(),c:g,f:P,m:p,u:f!=a.length||p&&h.length!=v,o:i,compression:d})),i+=30+f+y+m,s+=76+2*(f+y)+(v||0)+m}for(var w=new o(s+22),O=i,E=s-i,S=0;S<n.length;++S){var P=n[S];at(w,P.o,P,P.f,P.u,P.c.length);var T=30+P.f.length+st(P.extra);w.set(P.c,P.o+T),at(w,i,P,P.f,P.u,P.c.length,P.o,P.m),i+=16+T+(P.m?P.m.length:0)}return ct(w,i,n.length,E,O),w};var ht=function(){function e(){}return e.prototype.push=function(e,t){this.ondata(null,e,t)},e.compression=0,e}();t.UnzipPassThrough=ht;var pt=function(){function e(){var e=this;this.i=new _e(function(t,r){e.ondata(null,t,r)})}return e.prototype.push=function(e,t){try{this.i.push(e,t)}catch(e){this.ondata(e,null,t)}},e.compression=8,e}();t.UnzipInflate=pt;var vt=function(){function e(e,t){var r=this;t<32e4?this.i=new _e(function(e,t){r.ondata(null,e,t)}):(this.i=new Re(function(e,t,n){r.ondata(e,t,n)}),this.terminate=this.i.terminate)}return e.prototype.push=function(e,t){this.i.terminate&&(e=C(e,0)),this.i.push(e,t)},e.compression=8,e}();t.AsyncUnzipInflate=vt;var yt=function(){function e(e){this.onfile=e,this.k=[],this.o={0:ht},this.p=G}return e.prototype.push=function(e,t){var r=this;if(this.onfile||L(5),this.p||L(4),this.c>0){var n=Math.min(this.c,e.length),i=e.subarray(0,n);if(this.c-=n,this.d?this.d.push(i,!this.c):this.k[0].push(i),(e=e.subarray(n)).length)return this.push(e,t)}else{var s=0,a=0,c=void 0,u=void 0;this.p.length?e.length?((u=new o(this.p.length+e.length)).set(this.p),u.set(e,this.p.length)):u=this.p:u=e;for(var l=u.length,d=this.c,f=d&&this.d,h=function(){var e,t=fe(u,a);if(67324752==t){s=1,c=a,p.d=null,p.c=0;var n=de(u,a+6),o=de(u,a+8),i=2048&n,f=8&n,h=de(u,a+26),v=de(u,a+28);if(l>a+30+h+v){var y=[];p.k.unshift(y),s=2;var g,m=fe(u,a+18),b=fe(u,a+22),w=tt(u.subarray(a+30,a+=30+h),!i);4294967295==m?(e=f?[-2]:it(u,a),m=e[0],b=e[1]):f&&(m=-1),a+=v,p.c=m;var O={name:w,compression:o,start:function(){if(O.ondata||L(5),m){var e=r.o[o];e||O.ondata(L(14,"unknown compression type "+o,1),null,!1),(g=m<0?new e(w):new e(w,m,b)).ondata=function(e,t,r){O.ondata(e,t,r)};for(var t=0,n=y;t<n.length;t++){var i=n[t];g.push(i,!1)}r.k[0]==y&&r.c?r.d=g:g.push(G,!0)}else O.ondata(null,G,!0)},terminate:function(){g&&g.terminate&&g.terminate()}};m>=0&&(O.size=m,O.originalSize=b),p.onfile(O)}return"break"}if(d){if(134695760==t)return c=a+=12+(-2==d&&8),s=3,p.c=0,"break";if(33639248==t)return c=a-=4,s=3,p.c=0,"break"}},p=this;a<l-4&&"break"!==h();++a);if(this.p=G,d<0){var v=s?u.subarray(0,c-12-(-2==d&&8)-(134695760==fe(u,c-16)&&4)):u.subarray(0,a);f?f.push(v,!!s):this.k[+(2==s)].push(v)}if(2&s)return this.push(u.subarray(a),t);this.p=u.subarray(a)}t&&(this.c&&L(13),this.p=null)},e.prototype.register=function(e){this.o[e.compression]=e},e}();t.Unzip=yt;var gt="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()};t.unzip=function(e,t,r){r||(r=t,t={}),"function"!=typeof r&&L(7);var n=[],i=function(){for(var e=0;e<n.length;++e)n[e]()},s={},a=function(e,t){gt(function(){r(e,t)})};gt(function(){a=r});for(var c=e.length-22;101010256!=fe(e,c);--c)if(!c||e.length-c>65558)return a(L(13,0,1),null),i;var u=de(e,c+8);if(u){var l=u,d=fe(e,c+16),f=4294967295==d||65535==l;if(f){var h=fe(e,c-12);(f=101075792==fe(e,h))&&(l=u=fe(e,h+32),d=fe(e,h+48))}for(var p=t&&t.filter,v=function(t){var r=ot(e,d,f),c=r[0],l=r[1],h=r[2],v=r[3],y=r[4],g=r[5],m=nt(e,g);d=y;var b=function(e,t){e?(i(),a(e,null)):(t&&(s[v]=t),--u||a(null,s))};if(!p||p({name:v,size:l,originalSize:h,compression:c}))if(c)if(8==c){var w=e.subarray(m,m+l);if(h<524288||l>.8*h)try{b(null,Ie(w,{out:new o(h)}))}catch(e){b(e,null)}else n.push(Ae(w,{size:h},b))}else b(L(14,"unknown compression type "+c,1),null);else b(null,C(e,m,m+l));else b(null,null)},y=0;y<l;++y)v()}else a(null,{});return i},t.unzipSync=function(e,t){for(var r={},n=e.length-22;101010256!=fe(e,n);--n)(!n||e.length-n>65558)&&L(13);var i=de(e,n+8);if(!i)return{};var s=fe(e,n+16),a=4294967295==s||65535==i;if(a){var c=fe(e,n-12);(a=101075792==fe(e,c))&&(i=fe(e,c+32),s=fe(e,c+48))}for(var u=t&&t.filter,l=0;l<i;++l){var d=ot(e,s,a),f=d[0],h=d[1],p=d[2],v=d[3],y=d[4],g=d[5],m=nt(e,g);s=y,u&&!u({name:v,size:h,originalSize:p,compression:f})||(f?8==f?r[v]=Ie(e.subarray(m,m+h),{out:new o(p)}):L(14,"unknown compression type "+f):r[v]=C(e,m,m+h))}return r}},140:(e,t,r)=>{r.d(t,{U:()=>o,q:()=>n});var n={get:function(e,t){if(null!=e)return e[t]},keys:function(e){return null==e?[]:Object.keys(e)}},o={set:function(e,t,r){null!=e&&(e[t]=r)}}},209:(e,t,r)=>{r.r(t),r.d(t,{DiagConsoleLogger:()=>c,DiagLogLevel:()=>u.u,INVALID_SPANID:()=>G.w9,INVALID_SPAN_CONTEXT:()=>G.dM,INVALID_TRACEID:()=>G.RH,ProxyTracer:()=>L.y,ProxyTracerProvider:()=>N.n,ROOT_CONTEXT:()=>s.l,SamplingDecision:()=>M.i,SpanKind:()=>j,SpanStatusCode:()=>C,TraceFlags:()=>k.X,ValueType:()=>o,baggageEntryMetadataFromString:()=>i.B,context:()=>$._,createContextKey:()=>s.n,createNoopMeter:()=>I,createTraceState:()=>z,default:()=>ee,defaultTextMapGetter:()=>x.q,defaultTextMapSetter:()=>x.U,diag:()=>X.s,isSpanContextValid:()=>V.YA,isValidSpanId:()=>V.wN,isValidTraceId:()=>V.hX,metrics:()=>Y,propagation:()=>J.$,trace:()=>Z.u});var n,o,i=r(645),s=r(536),a=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],c=function(){function e(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(console){var n=console[e];if("function"!=typeof n&&(n=console.log),"function"==typeof n)return n.apply(console,t)}}}for(var t=0;t<a.length;t++)this[a[t].n]=e(a[t].c)},u=r(766),l=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),d=function(){function e(){}return e.prototype.createGauge=function(e,t){return S},e.prototype.createHistogram=function(e,t){return P},e.prototype.createCounter=function(e,t){return E},e.prototype.createUpDownCounter=function(e,t){return T},e.prototype.createObservableGauge=function(e,t){return R},e.prototype.createObservableCounter=function(e,t){return _},e.prototype.createObservableUpDownCounter=function(e,t){return A},e.prototype.addBatchObservableCallback=function(e,t){},e.prototype.removeBatchObservableCallback=function(e){},e}(),f=function(){},h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.add=function(e,t){},t}(f),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.add=function(e,t){},t}(f),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.record=function(e,t){},t}(f),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.record=function(e,t){},t}(f),g=function(){function e(){}return e.prototype.addCallback=function(e){},e.prototype.removeCallback=function(e){},e}(),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t}(g),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t}(g),w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t}(g),O=new d,E=new h,S=new v,P=new y,T=new p,_=new m,R=new b,A=new w;function I(){return O}!function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"}(o||(o={}));var j,C,x=r(140),L=r(268),N=r(885),M=r(729);!function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"}(j||(j={})),function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"}(C||(C={}));var k=r(844),D="[_0-9a-z-*/]",B=new RegExp("^(?:[a-z]"+D+"{0,255}|[a-z0-9]"+D+"{0,240}@[a-z]"+D+"{0,13})$"),U=/^[ -~]{0,255}[!-~]$/,F=/,|=/,W=function(){function e(e){this._internalState=new Map,e&&this._parse(e)}return e.prototype.set=function(e,t){var r=this._clone();return r._internalState.has(e)&&r._internalState.delete(e),r._internalState.set(e,t),r},e.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},e.prototype.get=function(e){return this._internalState.get(e)},e.prototype.serialize=function(){var e=this;return this._keys().reduce(function(t,r){return t.push(r+"="+e.get(r)),t},[]).join(",")},e.prototype._parse=function(e){e.length>512||(this._internalState=e.split(",").reverse().reduce(function(e,t){var r=t.trim(),n=r.indexOf("=");if(-1!==n){var o=r.slice(0,n),i=r.slice(n+1,t.length);(function(e){return B.test(e)})(o)&&function(e){return U.test(e)&&!F.test(e)}(i)&&e.set(o,i)}return e},new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}();function z(e){return new W(e)}var V=r(250),G=r(519),$=r(213),X=r(569),q=new(function(){function e(){}return e.prototype.getMeter=function(e,t,r){return O},e}()),H=r(867),K=r(976),Q="metrics",Y=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(e){return(0,H.$G)(Q,e,K.K.instance())},e.prototype.getMeterProvider=function(){return(0,H.mS)(Q)||q},e.prototype.getMeter=function(e,t,r){return this.getMeterProvider().getMeter(e,t,r)},e.prototype.disable=function(){(0,H.kv)(Q,K.K.instance())},e}().getInstance(),J=r(962),Z=r(743);const ee={context:$._,diag:X.s,metrics:Y,propagation:J.$,trace:Z.u}},213:(e,t,r)=>{r.d(t,{_:()=>n});var n=r(382)._.getInstance()},214:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isString=void 0,t.isObject=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},t.isNumber=function(e){return"number"==typeof e},t.isBoolean=function(e){return"boolean"==typeof e},t.isString=e=>"string"==typeof e},250:(e,t,r)=>{r.d(t,{IP:()=>l,YA:()=>u,hX:()=>a,wN:()=>c});var n=r(519),o=r(591),i=/^([0-9a-f]{32})$/i,s=/^[0-9a-f]{16}$/i;function a(e){return i.test(e)&&e!==n.RH}function c(e){return s.test(e)&&e!==n.w9}function u(e){return a(e.traceId)&&c(e.spanId)}function l(e){return new o.d(e)}},268:(e,t,r)=>{r.d(t,{y:()=>o});var n=new(r(772).o),o=function(){function e(e,t,r,n){this._provider=e,this.name=t,this.version=r,this.options=n}return e.prototype.startSpan=function(e,t,r){return this._getTracer().startSpan(e,t,r)},e.prototype.startActiveSpan=function(e,t,r,n){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):n},e}()},279:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(214),t)},330:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.removeQueuedLogs=t.removeQueuedLog=t.addLogToQueue=t.getQueuedLogs=void 0;const n=r(488),o=r(820),i="_splunk_session_recorder_queue_data";t.getQueuedLogs=()=>{const e=(0,o.safelyGetLocalStorage)(i);if(!e)return null;try{const t=JSON.parse(e);return l(t)?t:(n.log.warn("Invalid queued log data found in local storage",t),null)}catch(t){return n.log.warn("Malformed queued log data found in local storage",e),null}},t.addLogToQueue=e=>{var r;const o=null!==(r=(0,t.getQueuedLogs)())&&void 0!==r?r:[];if(a(o,e)){const t=s(o),r=s([e]),i=Math.round(t/1024),a=Math.round(r/1024),c=Math.round(2048);return n.log.warn(`Cannot add log to queue - would exceed 2MB limit. Current queue: ${i}KB, New log: ${a}KB, Limit: ${c}KB`),!1}return o.push(e),c(o)};const s=e=>{const t=JSON.stringify(e);return(new TextEncoder).encode(t).length},a=(e,t)=>{const r=[...e,t];return s(r)>2097152},c=e=>{if(0===e.length)return(0,t.removeQueuedLogs)(),!0;const r=JSON.stringify(e);return(0,o.safelySetLocalStorage)(i,r)};t.removeQueuedLog=e=>{var r;const n=(null!==(r=(0,t.getQueuedLogs)())&&void 0!==r?r:[]).filter(t=>t.requestId!==e.requestId);return c(n)},t.removeQueuedLogs=()=>{(0,o.safelyRemoveFromLocalStorage)(i)};const u=e=>{if("object"!=typeof e||null===e)return!1;const t=Object.keys(e);return["data","requestId","timestamp","url","headers"].every(e=>t.includes(e))},l=e=>!!Array.isArray(e)&&e.every(u)},380:(e,t,r)=>{r.r(t),r.d(t,{customAlphabet:()=>s,customRandom:()=>i,nanoid:()=>a,random:()=>o,urlAlphabet:()=>n});const n="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let o=e=>crypto.getRandomValues(new Uint8Array(e)),i=(e,t,r)=>{let n=(2<<Math.log2(e.length-1))-1,o=-~(1.6*n*t/e.length);return(i=t)=>{let s="";for(;;){let t=r(o),a=0|o;for(;a--;)if(s+=e[t[a]&n]||"",s.length>=i)return s}}},s=(e,t=21)=>i(e,0|t,o),a=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=n[63&r[e]];return t}},382:(e,t,r)=>{r.d(t,{_:()=>u});var n=r(536),o=function(){function e(){}return e.prototype.active=function(){return n.l},e.prototype.with=function(e,t,r){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o];return t.call.apply(t,function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([r],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}(n),!1))},e.prototype.bind=function(e,t){return t},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),i=r(867),s=r(976),a="context",c=new o,u=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(e){return(0,i.$G)(a,e,s.K.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(e,t,r){for(var n,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];return(n=this._getContextManager()).with.apply(n,function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([e,t,r],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}(o),!1))},e.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},e.prototype._getContextManager=function(){return(0,i.mS)(a)||c},e.prototype.disable=function(){this._getContextManager().disable(),(0,i.kv)(a,s.K.instance())},e}()},390:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSplunkRecorderConfig=void 0;const n=r(959),o=r(607);t.getSplunkRecorderConfig=e=>{const t=(0,o.migrateRRWebConfigToSplunkConfig)(e);return(0,n.mergeRecorderConfig)(e,t)}},399:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const n=r(209),o=r(951),i=r(107),s=r(380),a=r(422),c=r(330),u=r(488),l=r(975),d=r(929),f={"Content-Encoding":"gzip","Content-Type":"application/json"};function h(e){return Array.isArray(e)}function p(e){return function(e){return!!e&&"object"==typeof e&&!h(e)}(e)?{kvlistValue:{values:Object.entries(e).map(([e,t])=>({key:e,value:p(t)}))}}:h(e)?{arrayValue:{values:e.map(e=>p(e))}}:"string"==typeof e?{stringValue:e}:"number"==typeof e?{doubleValue:e}:"boolean"==typeof e?{boolValue:e}:{}}class v{constructor(e){this.config=e,this.exportQueuedLogs()}constructLogData(e){var t;return{resourceLogs:[{resource:{attributes:null===(t=p(this.config.getResourceAttributes()||{}).kvlistValue)||void 0===t?void 0:t.values},scopeLogs:[{logRecords:e.map(e=>{var t;return{attributes:null===(t=p(e.attributes||{}).kvlistValue)||void 0===t?void 0:t.values,body:p(e.body),timeUnixNano:e.timeUnixNano}}),scope:{name:"splunk.rr-web",version:d.VERSION}}]}]}}export(e){if(0===e.length)return;const t=this.config.headers?Object.assign({},f,this.config.headers):f,r=this.constructLogData(e);u.log.debug("OTLPLogExporter: export",r);const n=this.config.beaconUrl,o=(0,i.strToU8)(JSON.stringify(r)),a=(0,s.nanoid)(),l=this.config.usePersistentExportQueue?{data:r,headers:t,requestId:a,sessionId:this.config.sessionId,timestamp:Date.now(),url:n}:null;l&&(u.log.debug("Adding log to queue",Object.assign(Object.assign({},l),{data:"[truncated]"})),(0,c.addLogToQueue)(l)||u.log.debug("Failed to add log to queue",Object.assign(Object.assign({},l),{data:"[truncated]"}))),v.sendDataToBackend(l,o,n,t)}exportQueuedLogs(){var e;let t=[];t=null!==(e=(0,c.getQueuedLogs)())&&void 0!==e?e:[],(0,c.removeQueuedLogs)();for(const e of t){if(u.log.debug("Found queued log",Object.assign(Object.assign({},e),{data:"[truncated]"})),e.sessionId!==this.config.sessionId){u.log.debug("exportQueuedLogs - session mismatch",Object.assign(Object.assign({},e),{data:"[truncated]"}),{sessionId:this.config.sessionId});co