UNPKG

@splunk/otel-web-session-recorder

Version:
2 lines 328 kB
/*! For license information please see index.js.LICENSE.txt */ var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var t="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof e.g?e.g:{},r="1.9.0",n=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,o=function(e){var t=new Set([e]),r=new Set,o=e.match(n);if(!o)return function(){return!1};var i=+o[1],s=+o[2],a=+o[3];if(null!=o[4])return function(t){return t===e};function c(e){return r.add(e),!1}function l(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(r.has(e))return!1;var o=e.match(n);if(!o)return c(e);var u=+o[1],d=+o[2],h=+o[3];return null!=o[4]||i!==u?c(e):0===i?s===d&&a<=h?l(e):c(e):s<=d?l(e):c(e)}}(r),i=r.split(".")[0],s=Symbol.for("opentelemetry.js.api."+i),a=t;function c(e,t,n,o){var i;void 0===o&&(o=!1);var c=a[s]=null!==(i=a[s])&&void 0!==i?i:{version:r};if(!o&&c[e]){var l=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return n.error(l.stack||l.message),!1}return c.version!==r?(l=new Error("@opentelemetry/api: Registration of version v"+c.version+" for "+e+" does not match previously registered API v"+r),n.error(l.stack||l.message),!1):(c[e]=t,n.debug("@opentelemetry/api: Registered a global for "+e+" v"+r+"."),!0)}function l(e){var t,r,n=null===(t=a[s])||void 0===t?void 0:t.version;if(n&&o(n))return null===(r=a[s])||void 0===r?void 0:r[e]}function u(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+r+".");var n=a[s];n&&delete n[e]}function d(e){return Symbol.for(e)}var h,f=new function e(t){var r=this;r._currentContext=t?new Map(t):new Map,r.getValue=function(e){return r._currentContext.get(e)},r.setValue=function(t,n){var o=new e(r._currentContext);return o._currentContext.set(t,n),o},r.deleteValue=function(t){var n=new e(r._currentContext);return n._currentContext.delete(t),n}},p=function(){function e(){}return e.prototype.active=function(){return f},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}(),v=function(){function e(e){this._namespace=e.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return y("debug",this._namespace,e)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return y("error",this._namespace,e)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return y("info",this._namespace,e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return y("warn",this._namespace,e)},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return y("verbose",this._namespace,e)},e}();function y(e,t,r){var n=l("diag");if(n)return r.unshift(t),n[e].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))}([],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}(r),!1))}!function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"}(h||(h={}));var g,m=function(){function e(){function e(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=l("diag");if(n)return n[e].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))}([],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}(t),!1))}}var t=this;t.setLogger=function(e,r){var n,o,i;if(void 0===r&&(r={logLevel:h.INFO}),e===t){var s=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return t.error(null!==(n=s.stack)&&void 0!==n?n:s.message),!1}"number"==typeof r&&(r={logLevel:r});var a=l("diag"),u=function(e,t){function r(r,n){var o=t[r];return"function"==typeof o&&e>=n?o.bind(t):function(){}}return e<h.NONE?e=h.NONE:e>h.ALL&&(e=h.ALL),t=t||{},{error:r("error",h.ERROR),warn:r("warn",h.WARN),info:r("info",h.INFO),debug:r("debug",h.DEBUG),verbose:r("verbose",h.VERBOSE)}}(null!==(o=r.logLevel)&&void 0!==o?o:h.INFO,e);if(a&&!r.suppressOverrideMessage){var d=null!==(i=(new Error).stack)&&void 0!==i?i:"<failed to generate stacktrace>";a.warn("Current logger will be overwritten from "+d),u.warn("Current logger will overwrite one already registered from "+d)}return c("diag",u,t,!0)},t.disable=function(){u("diag",t)},t.createComponentLogger=function(e){return new v(e)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),b="context",w=new p,O=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(e){return c(b,e,m.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 l(b)||w},e.prototype.disable=function(){this._getContextManager().disable(),u(b,m.instance())},e}();!function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"}(g||(g={}));var S="0000000000000000",E="00000000000000000000000000000000",P={traceId:E,spanId:S,traceFlags:g.NONE},T=function(){function e(e){void 0===e&&(e=P),this._spanContext=e}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.addLink=function(e){return this},e.prototype.addLinks=function(e){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}(),j=d("OpenTelemetry Context Key SPAN");function A(e){return e.getValue(j)||void 0}function I(){return A(O.getInstance().active())}function x(e,t){return e.setValue(j,t)}function k(e){return e.deleteValue(j)}function R(e,t){return x(e,new T(t))}function C(e){var t;return null===(t=A(e))||void 0===t?void 0:t.spanContext()}var M=/^([0-9a-f]{32})$/i,N=/^[0-9a-f]{16}$/i;function L(e){return r=e.traceId,M.test(r)&&r!==E&&(t=e.spanId,N.test(t)&&t!==S);var t,r}function _(e){return new T(e)}var D,B,W=O.getInstance(),U=function(){function e(){}return e.prototype.startSpan=function(e,t,r){if(void 0===r&&(r=W.active()),Boolean(null==t?void 0:t.root))return new T;var n,o=r&&C(r);return"object"==typeof(n=o)&&"string"==typeof n.spanId&&"string"==typeof n.traceId&&"number"==typeof n.traceFlags&&L(o)?new T(o):new T},e.prototype.startActiveSpan=function(e,t,r,n){var o,i,s;if(!(arguments.length<2)){2===arguments.length?s=t:3===arguments.length?(o=t,s=r):(o=t,i=r,s=n);var a=null!=i?i:W.active(),c=this.startSpan(e,o,a),l=x(a,c);return W.with(l,s,void 0,c)}},e}(),F=new U,z=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):F},e}(),V=new(function(){function e(){}return e.prototype.getTracer=function(e,t,r){return new U},e}()),$=function(){function e(){}return e.prototype.getTracer=function(e,t,r){var n;return null!==(n=this.getDelegateTracer(e,t,r))&&void 0!==n?n:new z(this,e,t,r)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:V},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateTracer=function(e,t,r){var n;return null===(n=this._delegate)||void 0===n?void 0:n.getTracer(e,t,r)},e}(),q="trace",G=function(){function e(){this._proxyTracerProvider=new $,this.wrapSpanContext=_,this.isSpanContextValid=L,this.deleteSpan=k,this.getSpan=A,this.getActiveSpan=I,this.getSpanContext=C,this.setSpan=x,this.setSpanContext=R}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(e){var t=c(q,this._proxyTracerProvider,m.instance());return t&&this._proxyTracerProvider.setDelegate(e),t},e.prototype.getTracerProvider=function(){return l(q)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){u(q,m.instance()),this._proxyTracerProvider=new $},e}().getInstance(),K=function(){function e(){var e=this;this._promise=new Promise(function(t,r){e._resolve=t,e._reject=r})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(e){this._resolve(e)},e.prototype.reject=function(e){this._reject(e)},e}(),H=function(){function e(e,t){this._callback=e,this._that=t,this._isCalled=!1,this._deferred=new K}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var e,t=this,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((e=this._callback).call.apply(e,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))}([this._that],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}(r),!1))).then(function(e){return t._deferred.resolve(e)},function(e){return t._deferred.reject(e)})}catch(e){this._deferred.reject(e)}}return this._deferred.promise},e}(),Q=(D=function(e,t){return D=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])},D(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}D(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),J=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return Q(t,e),t}(Error),Y=m.instance();class X{constructor(e,t){var r;this.exporter=e,this.exportTimeoutMillis=3e4,this.finishedLogs=[],this.scheduledDelayMillis=null!==(r=null==t?void 0:t.scheduledDelayMillis)&&void 0!==r?r:5e3,this.shutdownOnce=new H(this.shutdown,this),this.onInit()}forceFlush(){return this.shutdownOnce.isCalled?this.shutdownOnce.promise:this.flushAll()}onEmit(e){this.shutdownOnce.isCalled||this.addToBuffer(e)}onShutdown(){this.visibilityChangeListener&&document.removeEventListener("visibilitychange",this.visibilityChangeListener),this.pageHideListener&&document.removeEventListener("pagehide",this.pageHideListener)}addToBuffer(e){this.finishedLogs.push(e),this.maybeStartTimer()}clearTimer(){void 0!==this.timer&&(clearTimeout(this.timer),this.timer=void 0)}exportLogs(e){return this.exporter.export(e),Promise.resolve()}flushAll(){return new Promise((e,t)=>{const r=[];r.push(this.flushOneBatch()),Promise.all(r).then(()=>{e()}).catch(t)})}flushOneBatch(){return this.clearTimer(),0===this.finishedLogs.length?Promise.resolve():new Promise((e,t)=>{var r,n,o,i;(r=this.exportLogs(this.finishedLogs.splice(0)),n=this.exportTimeoutMillis,i=new Promise(function(e,t){o=setTimeout(function(){t(new J("Operation timed out."))},n)}),Promise.race([r,i]).then(function(e){return clearTimeout(o),e},function(e){throw clearTimeout(o),e})).then(e).catch(t)})}maybeStartTimer(){void 0===this.timer&&(this.timer=setTimeout(()=>{this.flushOneBatch().then(()=>{this.finishedLogs.length>0&&(this.clearTimer(),this.maybeStartTimer())}).catch(e=>{!function(e){try{!function(e){Y.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){for(var t={},r=e;null!==r;)Object.getOwnPropertyNames(r).forEach(function(e){if(!t[e]){var n=r[e];n&&(t[e]=String(n))}}),r=Object.getPrototypeOf(r);return t}(e))}(e))}(e)}catch(e){}}(e)})},this.scheduledDelayMillis),this.timer)}onInit(){this.visibilityChangeListener=()=>{"hidden"===document.visibilityState&&this.forceFlush()},this.pageHideListener=()=>{this.forceFlush()},document.addEventListener("visibilitychange",this.visibilityChangeListener),document.addEventListener("pagehide",this.pageHideListener)}async shutdown(){this.onShutdown(),await this.flushAll()}}function Z(e,t,r){return{attributes:r,body:e,timeUnixNano:t}}!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"}(B||(B={}));class ee{constructor(){this.groupLoggingIntervalId=null,this.groupsByKey=new Map,this.isGroupLoggingEnabled=!1,this.loggingLevel=null,this.loggingPrefix="",this.middlewares=[],this.critical=(e,...t)=>{this.processMiddlewares("console","critical",e,...t),null!==this.loggingLevel&&B.CRITICAL>=this.loggingLevel&&console.error(`${this.loggingPrefix}${e}`,...t)},this.debug=(e,...t)=>{this.processMiddlewares("console","debug",e,...t),null!==this.loggingLevel&&B.DEBUG>=this.loggingLevel&&console.debug(`${this.loggingPrefix}${e}`,...t)},this.debugGroup=(e,...t)=>{this.isGroupLoggingEnabled?null!==this.loggingLevel&&B.DEBUG>=this.loggingLevel&&this.pushToGroup("debug",e,...t):this.debug(e,...t)},this.debugNoConsole=(e,...t)=>{this.processMiddlewares("internal","debug",e,...t)},this.enableGroupLogging=()=>{this.isGroupLoggingEnabled=!0,null!==this.groupLoggingIntervalId&&(this.groupLoggingIntervalId=window.setInterval(()=>{const e=this.groupsByKey;this.groupsByKey=new Map;for(const[t,r]of e.entries()){console.groupCollapsed(t);for(const[e,...t]of r)"critical"===e?console.error(...t):console[e](...t);console.groupEnd()}},1e3))},this.error=(e,...t)=>{this.processMiddlewares("console","error",e,...t),null!==this.loggingLevel&&B.ERROR>=this.loggingLevel&&console.error(`${this.loggingPrefix}${e}`,...t)},this.errorGroup=(e,...t)=>{this.isGroupLoggingEnabled?null!==this.loggingLevel&&B.ERROR>=this.loggingLevel&&this.pushToGroup("error",e,...t):this.error(e,...t)},this.errorNoConsole=(e,...t)=>{this.processMiddlewares("internal","error",e,...t)},this.info=(e,...t)=>{this.processMiddlewares("console","info",e,...t),null!==this.loggingLevel&&B.INFO>=this.loggingLevel&&console.log(`${this.loggingPrefix}${e}`,...t)},this.infoGroup=(e,...t)=>{this.isGroupLoggingEnabled?null!==this.loggingLevel&&B.INFO>=this.loggingLevel&&this.pushToGroup("info",e,...t):this.info(e,...t)},this.infoNoConsole=(e,...t)=>{this.processMiddlewares("internal","info",e,...t)},this.setLoggingLevel=e=>{this.loggingLevel=ee.convertLogLevelToNumber(e)},this.setLoggingPrefix=e=>{this.loggingPrefix=e},this.setMiddleware=e=>{this.middlewares.push(e)},this.warn=(e,...t)=>{this.processMiddlewares("console","warn",e,...t),null!==this.loggingLevel&&B.WARN>=this.loggingLevel&&console.warn(`${this.loggingPrefix}${e}`,...t)},this.warnGroup=(e,...t)=>{this.isGroupLoggingEnabled?null!==this.loggingLevel&&B.WARN>=this.loggingLevel&&this.pushToGroup("warn",e,...t):this.warn(e,...t)},this.warnNoConsole=(e,...t)=>{this.processMiddlewares("internal","warn",e,...t)},this.processMiddlewares=(e,t,r,...n)=>{this.middlewares.forEach(o=>o(e,t,r,...n))}}pushToGroup(e,t,...r){let n=this.groupsByKey.get(t);n||(n=[],this.groupsByKey.set(t,n)),n.push([e,...r])}}ee.convertLogLevelToNumber=e=>{switch(e){case"debug":return B.DEBUG;case"info":return B.INFO;case"warn":return B.WARN;case"error":default:return B.ERROR;case"critical":return B.CRITICAL}};const te=new ee;var re=O.getInstance(),ne=d("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function oe(e){return e.setValue(ne,!0)}var ie={},se=Uint8Array,ae=Uint16Array,ce=Int32Array,le=new se([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]),ue=new se([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]),de=new se([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),he=function(e,t){for(var r=new ae(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];var o=new ce(r[30]);for(n=1;n<30;++n)for(var i=r[n];i<r[n+1];++i)o[i]=i-r[n]<<5|n;return{b:r,r:o}},fe=he(le,2),pe=fe.b,ve=fe.r;pe[28]=258,ve[258]=28;for(var ye=he(ue,0),ge=(ye.b,ye.r),me=new ae(32768),be=0;be<32768;++be){var we=(43690&be)>>1|(21845&be)<<1;we=(61680&(we=(52428&we)>>2|(13107&we)<<2))>>4|(3855&we)<<4,me[be]=((65280&we)>>8|(255&we)<<8)>>1}var Oe=function(e,t,r){for(var n=e.length,o=0,i=new ae(t);o<n;++o)e[o]&&++i[e[o]-1];var s,a=new ae(t);for(o=1;o<t;++o)a[o]=a[o-1]+i[o-1]<<1;if(r){s=new ae(1<<t);var c=15-t;for(o=0;o<n;++o)if(e[o])for(var l=o<<4|e[o],u=t-e[o],d=a[e[o]-1]++<<u,h=d|(1<<u)-1;d<=h;++d)s[me[d]>>c]=l}else for(s=new ae(n),o=0;o<n;++o)e[o]&&(s[o]=me[a[e[o]-1]++]>>15-e[o]);return s},Se=new se(288);for(be=0;be<144;++be)Se[be]=8;for(be=144;be<256;++be)Se[be]=9;for(be=256;be<280;++be)Se[be]=7;for(be=280;be<288;++be)Se[be]=8;var Ee=new se(32);for(be=0;be<32;++be)Ee[be]=5;var Pe=Oe(Se,9,0),Te=Oe(Ee,5,0),je=function(e){return(e+7)/8|0},Ae=function(e,t,r){return(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length),new se(e.subarray(t,r))},Ie=["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"],xe=function(e,t,r){var n=new Error(t||Ie[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,xe),!r)throw n;return n},ke=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},Re=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},Ce=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var o=r.length,i=r.slice();if(!o)return{t:We,l:0};if(1==o){var s=new se(r[0].s+1);return s[r[0].s]=1,{t:s,l:1}}r.sort(function(e,t){return e.f-t.f}),r.push({s:-1,f:25001});var a=r[0],c=r[1],l=0,u=1,d=2;for(r[0]={s:-1,f:a.f+c.f,l:a,r:c};u!=o-1;)a=r[r[l].f<r[d].f?l++:d++],c=r[l!=u&&r[l].f<r[d].f?l++:d++],r[u++]={s:-1,f:a.f+c.f,l:a,r:c};var h=i[0].s;for(n=1;n<o;++n)i[n].s>h&&(h=i[n].s);var f=new ae(h+1),p=Me(r[u-1],f,0);if(p>t){n=0;var v=0,y=p-t,g=1<<y;for(i.sort(function(e,t){return f[t.s]-f[e.s]||e.f-t.f});n<o;++n){var m=i[n].s;if(!(f[m]>t))break;v+=g-(1<<p-f[m]),f[m]=t}for(v>>=y;v>0;){var b=i[n].s;f[b]<t?v-=1<<t-f[b]++-1:++n}for(;n>=0&&v;--n){var w=i[n].s;f[w]==t&&(--f[w],++v)}p=t}return{t:new se(f),l:p}},Me=function(e,t,r){return-1==e.s?Math.max(Me(e.l,t,r+1),Me(e.r,t,r+1)):t[e.s]=r},Ne=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new ae(++t),n=0,o=e[0],i=1,s=function(e){r[n++]=e},a=1;a<=t;++a)if(e[a]==o&&a!=t)++i;else{if(!o&&i>2){for(;i>138;i-=138)s(32754);i>2&&(s(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(s(o),--i;i>6;i-=6)s(8304);i>2&&(s(i-3<<5|8208),i=0)}for(;i--;)s(o);i=1,o=e[a]}return{c:r.subarray(0,n),n:t}},Le=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},_e=function(e,t,r){var n=r.length,o=je(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)},De=function(e,t,r,n,o,i,s,a,c,l,u){ke(t,u++,r),++o[256];for(var d=Ce(o,15),h=d.t,f=d.l,p=Ce(i,15),v=p.t,y=p.l,g=Ne(h),m=g.c,b=g.n,w=Ne(v),O=w.c,S=w.n,E=new ae(19),P=0;P<m.length;++P)++E[31&m[P]];for(P=0;P<O.length;++P)++E[31&O[P]];for(var T=Ce(E,7),j=T.t,A=T.l,I=19;I>4&&!j[de[I-1]];--I);var x,k,R,C,M=l+5<<3,N=Le(o,Se)+Le(i,Ee)+s,L=Le(o,h)+Le(i,v)+s+14+3*I+Le(E,j)+2*E[16]+3*E[17]+7*E[18];if(c>=0&&M<=N&&M<=L)return _e(t,u,e.subarray(c,c+l));if(ke(t,u,1+(L<N)),u+=2,L<N){x=Oe(h,f,0),k=h,R=Oe(v,y,0),C=v;var _=Oe(j,A,0);for(ke(t,u,b-257),ke(t,u+5,S-1),ke(t,u+10,I-4),u+=14,P=0;P<I;++P)ke(t,u+3*P,j[de[P]]);u+=3*I;for(var D=[m,O],B=0;B<2;++B){var W=D[B];for(P=0;P<W.length;++P){var U=31&W[P];ke(t,u,_[U]),u+=j[U],U>15&&(ke(t,u,W[P]>>5&127),u+=W[P]>>12)}}}else x=Pe,k=Se,R=Te,C=Ee;for(P=0;P<a;++P){var F=n[P];if(F>255){Re(t,u,x[257+(U=F>>18&31)]),u+=k[U+257],U>7&&(ke(t,u,F>>23&31),u+=le[U]);var z=31&F;Re(t,u,R[z]),u+=C[z],z>3&&(Re(t,u,F>>5&8191),u+=ue[z])}else Re(t,u,x[F]),u+=k[F]}return Re(t,u,x[256]),u+k[256]},Be=new ce([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),We=new se(0),Ue=function(e,t,r,n,o,i){var s=i.z||e.length,a=new se(n+s+5*(1+Math.ceil(s/7e3))+o),c=a.subarray(n,a.length-o),l=i.l,u=7&(i.r||0);if(t){u&&(c[0]=i.r>>3);for(var d=Be[t-1],h=d>>13,f=8191&d,p=(1<<r)-1,v=i.p||new ae(32768),y=i.h||new ae(p+1),g=Math.ceil(r/3),m=2*g,b=function(t){return(e[t]^e[t+1]<<g^e[t+2]<<m)&p},w=new ce(25e3),O=new ae(288),S=new ae(32),E=0,P=0,T=i.i||0,j=0,A=i.w||0,I=0;T+2<s;++T){var x=b(T),k=32767&T,R=y[x];if(v[k]=R,y[x]=k,A<=T){var C=s-T;if((E>7e3||j>24576)&&(C>423||!l)){u=De(e,c,0,w,O,S,P,j,I,T-I,u),j=E=P=0,I=T;for(var M=0;M<286;++M)O[M]=0;for(M=0;M<30;++M)S[M]=0}var N=2,L=0,_=f,D=k-R&32767;if(C>2&&x==b(T-D))for(var B=Math.min(h,C)-1,W=Math.min(32767,T),U=Math.min(258,C);D<=W&&--_&&k!=R;){if(e[T+N]==e[T+N-D]){for(var F=0;F<U&&e[T+F]==e[T+F-D];++F);if(F>N){if(N=F,L=D,F>B)break;var z=Math.min(D,F-2),V=0;for(M=0;M<z;++M){var $=T-D+M&32767,q=$-v[$]&32767;q>V&&(V=q,R=$)}}}D+=(k=R)-(R=v[k])&32767}if(L){w[j++]=268435456|ve[N]<<18|ge[L];var G=31&ve[N],K=31&ge[L];P+=le[G]+ue[K],++O[257+G],++S[K],A=T+N,++E}else w[j++]=e[T],++O[e[T]]}}for(T=Math.max(T,A);T<s;++T)w[j++]=e[T],++O[e[T]];u=De(e,c,l,w,O,S,P,j,I,T-I,u),l||(i.r=7&u|c[u/8|0]<<3,u-=7,i.h=y,i.p=v,i.i=T,i.w=A)}else{for(T=i.w||0;T<s+l;T+=65535){var H=T+65535;H>=s&&(c[u/8|0]=l,H=s),u=_e(c,u+1,e.subarray(T,H))}i.i=s}return Ae(a,0,n+je(u)+o)},Fe=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}(),ze=function(){var e=-1;return{p:function(t){for(var r=e,n=0;n<t.length;++n)r=Fe[255&r^t[n]]^r>>>8;e=r},d:function(){return~e}}},Ve=function(e,t,r,n,o){if(!o&&(o={l:1},t.dictionary)){var i=t.dictionary.subarray(-32768),s=new se(i.length+e.length);s.set(i),s.set(e,i.length),e=s,o.w=i.length}return Ue(e,null==t.level?6:t.level,null==t.mem?o.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,r,n,o)},$e=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 l=a.toString();if(a.prototype)if(-1!=l.indexOf("[native code]")){var u=l.indexOf(" ",8)+1;t+=l.slice(u,l.indexOf("(",u))}else for(var d in t+=l,a.prototype)t+=";"+c+".prototype."+d+"="+a.prototype[d].toString();else t+=l}else r[c]=a}return t},qe=[],Ge=function(){return[se,ae,ce,le,ue,de,ve,ge,Pe,Se,Te,Ee,me,Be,We,Oe,ke,Re,Ce,Me,Ne,Le,_e,De,je,Ae,Ue,Ve,Ze,He]},Ke=function(){return[Ye,Xe,Je,ze,Fe]},He=function(e){return postMessage(e,[e.buffer])},Qe=function(e,t,r,n,o,i){var s=function(e,t,r,n){if(!qe[r]){for(var o="",i={},s=e.length-1,a=0;a<s;++a)o=$e(e[a],o,i);qe[r]={c:$e(e[s],o,i),e:i}}var c=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}({},qe[r].e);return function(e,t,r,n,o){var i=new Worker(ie[t]||(ie[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 i.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],o(n,null)}else o(null,t)},i.postMessage(r,n),i}(qe[r].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",r,c,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}(c),n)}(r,n,o,function(e,t){s.terminate(),i(e,t)});return s.postMessage([e,t],t.consume?[e.buffer]:[]),function(){s.terminate()}},Je=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},Ye=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&&Je(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)}},Xe=function(e){return 10+(e.filename?e.filename.length+1:0)};function Ze(e,t){return Ve(e,t||{},0,0)}function et(e,t){t||(t={});var r=ze(),n=e.length;r.p(e);var o=Ve(e,t,Xe(t),8),i=o.length;return Ye(o,t),Je(o,i-8,r.d()),Je(o,i-4,n),o}var tt="undefined"!=typeof TextEncoder&&new TextEncoder,rt="undefined"!=typeof TextDecoder&&new TextDecoder;try{rt.decode(We,{stream:!0})}catch(wt){}function nt(e,t){if(t){for(var r=new se(e.length),n=0;n<e.length;++n)r[n]=e.charCodeAt(n);return r}if(tt)return tt.encode(e);var o=e.length,i=new se(e.length+(e.length>>1)),s=0,a=function(e){i[s++]=e};for(n=0;n<o;++n){if(s+5>i.length){var c=new se(s+8+(o-n<<1));c.set(i),i=c}var l=e.charCodeAt(n);l<128||t?a(l):l<2048?(a(192|l>>6),a(128|63&l)):l>55295&&l<57344?(a(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++n))>>18),a(128|l>>12&63),a(128|l>>6&63),a(128|63&l)):(a(224|l>>12),a(128|l>>6&63),a(128|63&l))}return Ae(i,0,s)}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout;class ot extends Error{get isConnectionError(){return this.status<0&&!this.isAbortedByRecorder&&!this.isAbortedByUserAgent}get isAbortedByRecorder(){return this.isSignalAborted}get isAbortedByUserAgent(){var e;return this.originalError instanceof Error&&"AbortError"===(null===(e=this.originalError)||void 0===e?void 0:e.name)&&!this.isSignalAborted}constructor(e,t,r,n,o,i,s,a,c){super(e),this.status=t,this.responseTimingData=r,this.requestPayload=o,this.originalError=s,this.responseData=a,this.additionalData=c,this.name="ApiError",Object.setPrototypeOf(this,ot.prototype),this.responseDebugData=i?(e=>({bodyUsed:e.bodyUsed,headers:e.headers?Array.from(e.headers):void 0,ok:e.ok,redirected:e.redirected,type:e.type,url:e.url}))(i):void 0,this.isSignalAborted=null==n?void 0:n.aborted,this.visibilityState=document.visibilityState,this.isOffline=!1===navigator.onLine,this.wasBeaconFallbackUsed=!1}}const it=async()=>{navigator.onLine||await new Promise(e=>{const t=()=>{window.removeEventListener("online",t),e()};window.addEventListener("online",t),navigator.onLine&&(e(),window.removeEventListener("online",t))})};const st={headers:{}},at={"Content-Type":"text/plain;charset=UTF-8"},ct=new Map,lt=async(e,t)=>{var{abortPreviousRequest:r,baseUrl:n,body:o,discardExistingPath:i,doNotConvert:s=!1,doNotRetryOnDocumentHidden:a=!1,headers:c,logPayloadOnError:l=!1,retryCount:u=3,retryInterval:d=1e3,throwOnConvert:h=!1,waitForOnlineStatus:f=!1}=t,p=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}(t,["abortPreviousRequest","baseUrl","body","discardExistingPath","doNotConvert","doNotRetryOnDocumentHidden","headers","logPayloadOnError","retryCount","retryInterval","throwOnConvert","waitForOnlineStatus"]);const v=n?(({baseUrl:e,discardExistingPath:t,pathName:r})=>{const n=new URL((e=>/^https?:\/\//.test(e)?e:`https://${e}`)(e));if(!r)return n;if(t)return new URL(r,n.origin);{let e=n.pathname;return e.endsWith("/")&&r.startsWith("/")&&(e=e.slice(0,-1)),new URL(`${e}${r}`,n.origin)}})({baseUrl:n,discardExistingPath:i,pathName:e}):new URL(e,window.location.origin);let y=ct.get(v.href);y&&r&&(te.debug("Aborting previous request",v),y.abort("Aborted previous request.")),y=new AbortController,ct.set(v.href,y);const g=Object.assign(Object.assign(Object.assign(Object.assign({},st),{body:o}),p),{signal:y.signal});let m;g.headers=void 0===c?at:c;let b,w=null,O=performance.now(),S=0,E=-1;for(let e=1;e<=u;e++){f&&await it(),E=e;try{if(1===e)O=performance.now(),m=await fetch(v.href,g);else{const t=[],r=new Promise(t=>{setTimeout(()=>{t()},d*Math.pow(2,e-1))});if(t.push(r),a){const e=new Promise(e=>{const t=r=>{var n;(void 0===(n=r).isTrusted||n.isTrusted)&&"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),a&&"hidden"===document.visibilityState)throw new Error("Document is hidden and flag `doNotRetryOnDocumentHidden` is set to true.");f&&await it(),O=performance.now(),m=await fetch(v.href,g)}b=void 0}catch(t){if(b=t,t instanceof Error&&"AbortError"===t.name)throw ct.delete(v.href),new ot("Request was aborted.",-1,{fetchTotalMs:S,finalRetries:E},y.signal,l?JSON.stringify(o):"Payload not logged.",void 0,t);if(e<u&&(!a||"hidden"!==document.visibilityState))continue}finally{S=performance.now()-O}if(ct.delete(v.href),!m)throw new ot(`API request to ${v.href} failed due to connection error.`,-1,{fetchTotalMs:S,finalRetries:E},y.signal,l?JSON.stringify(o):"Payload not logged.",void 0,b);if(m.status>399){try{w=await m.json()}catch(e){if(e instanceof Error&&("AbortError"===e.name||"TypeError"===e.name))throw new ot(`API request to ${v.href} failed with status code ${m.status}.`,m.status,{fetchTotalMs:S,finalRetries:E},y.signal,"Payload not logged.",m,e)}try{w||(w=await m.text())}catch(e){if(e instanceof Error&&("AbortError"===e.name||"TypeError"===e.name))throw new ot(`API request to ${v.href} failed with status code ${m.status}.`,m.status,{fetchTotalMs:S,finalRetries:E},y.signal,"Payload not logged.",m,e)}throw new ot(`API request to ${v.href} failed with status code ${m.status}`,m.status,{fetchTotalMs:S,finalRetries:E},y.signal,l?JSON.stringify(o):"Payload not logged.",m,void 0,{responseData:w})}if(204===m.status)break;if(s)break;try{w=await m.json();break}catch(t){if(t instanceof Error&&("AbortError"===t.name||"TypeError"===t.name)&&e<u)continue;if(h&&t instanceof Error)throw"AbortError"===t.name||"TypeError"===t.name?new ot(`API request to ${v.href} failed due to connection error.`,-1,{fetchTotalMs:S,finalRetries:E},y.signal,l?JSON.stringify(o):"Payload not logged.",void 0,b):new Error(`Could not convert data to JSON in ${v.href} request`);if(h)throw new Error(`Unknown error happened during API call. ${JSON.stringify(t)}`);break}}if(void 0===m)throw new Error("Response object is undefined.");return{data:w,response:m}},ut="_splunk_session_recorder_queue_data",dt=()=>{const e=(e=>{let t=null;try{t=window.localStorage.getItem(e)}catch(e){}return t})(ut);if(!e)return null;try{const t=JSON.parse(e);return bt(t)?t:(te.warn("Invalid queued log data found in local storage",t),null)}catch(t){return te.warn("Malformed queued log data found in local storage",e),null}},ht=e=>{var t;const r=null!==(t=dt())&&void 0!==t?t:[];if(pt(r,e)){const t=ft(r),n=ft([e]),o=Math.round(t/1024),i=Math.round(n/1024),s=Math.round(2048);return te.warn(`Cannot add log to queue - would exceed 2MB limit. Current queue: ${o}KB, New log: ${i}KB, Limit: ${s}KB`),!1}return r.push(e),vt(r)},ft=e=>{const t=JSON.stringify(e);return(new TextEncoder).encode(t).length},pt=(e,t)=>{const r=[...e,t];return ft(r)>2097152},vt=e=>{if(0===e.length)return gt(),!0;const t=JSON.stringify(e);return((e,t)=>{try{return window.localStorage.setItem(e,t),!0}catch(e){return!1}})(ut,t)},yt=e=>{var t;const r=(null!==(t=dt())&&void 0!==t?t:[]).filter(t=>t.requestId!==e.requestId);return vt(r)},gt=()=>{(e=>{try{window.localStorage.removeItem(e)}catch(e){}})(ut)},mt=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))},bt=e=>!!Array.isArray(e)&&e.every(mt);var wt={4105:function(){"arrayBuffer"in Blob.prototype||Object.defineProperty(Blob.prototype,"arrayBuffer",{value:function(){return new Response(this).arrayBuffer()}})},4325:function(){Element.prototype.append||(Element.prototype.append=Element.prototype.appendChild)},4713:function(){Event.prototype.composedPath||(Event.prototype.composedPath=function(){let e=this.target,t=[];for(;e;)t.push(e),e=e.parentNode;return t.push(window),t})},7197:function(){Object.hasOwn||Object.defineProperty(Object,"hasOwn",{configurable:!0,enumerable:!1,value:function(e,t){if(null==e)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)},writable:!0}),Object.assign||(Object.assign=function(...e){let t=e[0];if(null==t)throw TypeError("Cannot convert undefined or null to object");let r=Object(t);for(let t=1;t<e.length;t++){let n=e[t];if(null!=n)for(let e in n)Object.hasOwn(n,e)&&(r[e]=n[e])}return r}),Object.fromEntries||(Object.fromEntries=e=>[...e].reduce((e,[t,r])=>(e[t]=r,e),{})),Object.entries||(Object.entries=e=>Object.keys(e).map(t=>[t,e[t]])),Object.values||(Object.values=e=>Object.keys(e).map(t=>e[t]))},2858:function(){function e(e,t,r,n,o,i,s){try{var a=e[i](s),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,o)}Promise.any||(Promise.any=t=>{var r;return(r=function*(){return Promise.all([...t].map(e=>new Promise((t,r)=>Promise.resolve(e).then(r,t)))).then(e=>Promise.reject(e),e=>Promise.resolve(e))},function(){var t=this,n=arguments;return new Promise(function(o,i){var s=r.apply(t,n);function a(t){e(s,o,i,a,c,"next",t)}function c(t){e(s,o,i,a,c,"throw",t)}a(void 0)})})()})},3679:function(){"function"!=typeof window.queueMicrotask&&(window.queueMicrotask=function(e){Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))})},4861:function(){window.Reflect||(window.Reflect={}),"function"!=typeof window.Reflect.apply&&Object.defineProperty(Reflect,"apply",{configurable:!0,enumerable:!1,value:function(e,t,r){return Function.prototype.apply.call(e,t,r)},writable:!0})},8114:function(){let e=(e,{timeout:t})=>{let r=requestAnimationFrame(t=>{clearTimeout(n),e(t)}),n=setTimeout(()=>{cancelAnimationFrame(r),e(performance.now())},t)},t=1/120*1e3,r=1,n=new Set,o=new Set;void 0===window.requestIdleCallback&&(window.requestIdleCallback=(i,s)=>{var a;let c=r;r+=1,n.add(c);let l=performance.now(),u=new MessageChannel,d=u.port1;return u.port2.onmessage=r=>{let a=Math.max(0,t-(performance.now()-r.data));if(o.has(c))return o.delete(c),void n.delete(c);let u=performance.now(),h=u-l;if(0===a&&(void 0===(null==s?void 0:s.timeout)||h<s.timeout)){var f;e(()=>{d.postMessage(u)},{timeout:null!=(f=null==s?void 0:s.timeout)?f:500})}else{let e=void 0!==(null==s?void 0:s.timeout)&&h>s.timeout;i({didTimeout:e,timeRemaining:()=>{let t=performance.now()-u;return e?0:Math.max(0,a-t)}}),n.delete(c)}},e(()=>{d.postMessage(l)},{timeout:null!=(a=null==s?void 0:s.timeout)?a:500}),c},window.cancelIdleCallback=e=>{n.has(e)&&o.add(e)},setInterval(()=>{new Promise(e=>{let t=performance.now(),r=0,n=o=>{r+=1,o-t>=1e3?e(r):requestAnimationFrame(n)};requestAnimationFrame(n)}).then(e=>{t=1/Math.min(Math.max(30,e),120)*1e3})},5e3))},2291:function(){String.prototype.includes||(String.prototype.includes=function(e,t){return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}),String.prototype.endsWith||(String.prototype.endsWith=function(e){return-1!==this.indexOf(e,this.length-e.length)}),String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return void 0===t?0===this.indexOf(e):this.indexOf(e)===t})},1982:function(){"undefined"!=typeof Symbol&&Symbol.asyncIterator||(Symbol.asyncIterator=Symbol.for("Symbol.asyncIterator"))},5561:function(e,t,r){var n;n=function(){function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function t(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(n.key),n)}}function o(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(t,r){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t){if(t){if("string"==typeof t)return e(t,void 0);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,void 0):void 0}}(t))||r&&t&&"number"==typeof t.length){n&&(t=n);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,s=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw s}}}}function s(){return(s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=a(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}}).apply(null,arguments)}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}function l(e,t){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}(u="undefined"!=typeof self?self:r.g).AbortSignal,u.AbortController;var u,d=o(function e(){t(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})},[{key:"addEventListener",value:function(e,t,r){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:r})}},{key:"removeEventListener",value:function(e,t){if(e in this.listeners)for(var r=this.listeners[e],n=0,o=r.length;n<o;n++)if(r[n].callback===t)return void r.splice(n,1)}},{key:"dispatchEvent",value:function(e){var t=this;if(e.type in this.listeners){for(var r=this.listeners[e.type].slice(),n=0,o=r.length;n<o;n++)!function(){var o=r[n];try{o.callback.call(t,e)}catch(e){Promise.resolve().then(function(){throw e})}o.options&&o.options.once&&t.removeEventListener(e.type,o.callback)}();return!e.defaultPrevented}}}]),h=function(e){function r(){var e,n;return t(this,r),n=a(n=r),(e=function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,c()?Reflect.construct(n,[],a(this).constructor):n.apply(this,void 0))).listeners||d.call(e),Object.defineProperty(e,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(e,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(e,"reason",{value:void 0,writable:!0,configurable:!0}),e}if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),e&&l(r,e),o(r,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(e){var t,n;"abort"===e.type&&(this.aborted=!0,"function"==typeof this.onabort&&this.onabort.call(this,e)),(t=this,"function"==typeof(n=s(a(r.prototype),"dispatchEvent",t))?function(e){return n.apply(t,e)}:n)([e])}},{key:"throwIfAborted",value:function(){var e=this.aborted,t=this.reason;if(e)throw void 0===t?"Aborted":t}}],[{key:"timeout",value:function(e){var t=new f;return setTimeout(function(){return t.abort(new DOMException("This signal is timeout in ".concat(e,"ms"),"TimeoutError"))},e),t.signal}},{key:"any",value:function(e){var t=new f;function r(){t.abort(this.reason),function(){var t,n=i(e);try{for(n.s();!(t=n.n()).done;)t.value.removeEventListener("abort",r)}catch(e){n.e(e)}finally{n.f()}}()}var n,o=i(e);try{for(o.s();!(n=o.n()).done;){var s=n.value;if(s.aborted){t.abort(s.reason);break}s.addEventListener("abort",r)}}catch(e){o.e(e)}finally{o.f()}return t.signal}}])}(d),f=o(function e(){t(this,e),Object.defineProperty(this,"signal",{value:new h,writable:!0,configurable:!0})},[{key:"abort",value:function(e){var t=function(e){if(void 0===e)if("undefined"==typeof document)(e=Error("This operation was aborted")).name="AbortError";else try{e=new DOMException("signal is aborted without reason"),Object.defineProperty(e,"name",{value:"AbortError"})}catch(t){(e=Error("This operation was aborted")).name="AbortError"}return e}(e),r=function(e){var t;try{t=new Event("abort")}catch(e){"undefined"!=typeof document?document.createEvent?(t=document.createEvent("Event")).initEvent("abort",!1,!1):(t=document.createEventObject()).type="abort":t={type:"abort",bubbles:!1,cancelable:!1}}return t.reason=e,t}(t);this.signal.reason=t,this.signal.dispatchEvent(r)}},{key:"toString",value:function(){return"[object AbortController]"}}]);function p(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):"function"==typeof e.Request&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}"undefined"!=typeof Symbol&&Symbol.toStringTag&&(f.prototype[Symbol.toStringTag]="AbortController",h.prototype[Symbol.toStringTag]="AbortSignal"),function(e){if(p(e)){if(!e.fetch)return console.warn("fetch() is not available, cannot install abortcontroller-polyfill");var t=function(e){"function"==typeof e&&(e={fetch:e});var t=e,r=t.fetch,n=t.Request,o=void 0===n?r.Request:n,i=t.AbortController,s=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,a=void 0!==s&&s;if(!p({fetch:r,Request:o,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:a}))return{fetch:r,Request:c};var c=o;return(c&&!c.prototype.hasOwnProperty("signal")||a)&&((c=function(e,t){t&&t.signal&&(r=t.signal,delete t.signal);var r,n=new o(e,t);return r&&Object.defineProperty(n,"signal",{writable:!1,enumerable:!1,configurable:!0,value:r}),n}).prototype=o.prototype),{fetch:function(e,t){var n=c&&c.prototype.isPrototypeOf(e)?e.signal:t?t.signal:void 0;if(n){try{o=new DOMException("Aborted","AbortError")}catch(e){(o=Error("Aborted")).name="AbortError"}if(n.aborted)return Promise.reject(o);var o,i=new Promise(function(e,t){n.addEventListener("abort",function(){return t(o)},{once:!0})});return t&&t.signal&&delete t.signal,Promise.race([i,r(e,t)])}return r(e,t)},Request:c}}(e),r=t.fetch,n=t.Request;e.fetch=r,e.Request=n,Object.defineProperty(e,"AbortController",{writable:!0,enumerable:!1,configurable:!0,value:f}),Object.defineProperty(e,"AbortSignal",{writable:!0,enumerable:!1,configurable:!0,value:h})}}("undefined"!=typeof self?self:r.g)},"function"==typeof define&&define.amd?define(n):n()},1924:function(e,t,r){e.exports=r(3371)},198:function(e,t,r){r(5376)},323:function(e,t,r){var n=r(2614),o=r(2052),i=TypeError;e.exports=function(e){if(n(e))return e;throw new i(o(e)+" is not a function")}},7031:function(e,t,r){var n=r(1398),o=String,i=TypeError;e.exports=function(e){if(n(e))return e;throw new i("Can't set "+o(e)+" as a prototype")}},9196:function(e,t,r){var n=r(2785),o=String,i=TypeError;e.exports=function(e){if(n(e))return e;throw new i(o(e)+" is not an object")}},5326:function(e){e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},3157:function(e,t,r){var n,o,i,s=r(5326),a=r(3771),c=r(9731),l=r(2614),u=r(2785),d=r(8136),h=r(9912),f=r(2052),p=r(6190),v=r(8723),y=r(2511),g=r(3404),m=r(2280),b=r(1972),w=r(6708),O=r(8567),S=r(7928),E=S.enforce,P=S.get,T=c.Int8Array,j=T&&T.prototype,A=c.Uint8ClampedArray,I=A&&A.prototype,x=T&&m(T),k=j&&m(j),R=Object.prototype,C=c.TypeError,M=w("toStringTag"),N=O("TYPED_ARRAY_TAG"),L="TypedArrayConstructor",_=s&&!!b&&"Opera"!==h(c.opera),D=!1,B={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},W={BigInt64Array:8,BigUint64Array:8},U=function(e){var t=m(e);if(u(t)){var r=P(t);return r&&d(r,L)?r[L]:U(t)}},F=function(e){if(!u(e))return!1;var t=h(e);return d(B,t)||d(W,t)};for(n in B)(i=(o=c[n])&&o.prototype)?E(i)[L]=o:_=!1;for(n in W)(i=(o=c[n])&&o.prototype)&&(E(i)[L]=o);if((!_||!l(x)||x===Function.prototype)&&(x=function(){throw new C("Incorrect invocation")},_))for(n in B)c[n]&&b(c[n],x);if((!_||!k||k===R)&&(k=x.prototype,_))for(n in B)c[n]&&b(c[n].prototype,k);if(_&&m(I)!==k&&b(I,k),a&&!d(k,M))for(n in D=!0,y(k,M,{configurable:!0,get:function(){return u(this)?this[N]:void 0}}),B)c[n]&&p(c[n],N,n);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:_,TYPED_ARRAY_TAG:D&&N,aTypedArray:function(e){if(F(e))return e;throw new C("Target is not a typed array")},aTypedArrayConstructor:function(e){if(l(e)&&(!b||g(x,e)))return e;throw new C(f(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(a){if(r)for(var o in B){var i=c[o];if(i&&d(i.prototype,e))try{delete i.prototype[e]}catch(r){try{i.prototype[e]=t}catch(e){}}}(!k[e]||r)&&v(k,e,r?t:_&&j[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,o;if(a){if(b){if(r)for(n in B)if((o=c[n])&&d(o,e))try{delete o[e]}catch(e){}if(x[e]&&!r)return;try{return v(x,e,r?t:_&&x[e]||t)}catch(e){}}for(n in B)(o=c[n])&&(!o[e]||r)&&v(o,e,t)}},getTypedArrayConstructor:U,isView:function(e){if(!u(e))return!1;var t=h(e);return"DataView"===t||d(B,t)||d(W,t)},isTypedArray:F,TypedArray:x,TypedArrayPrototype:k}},2736:function(e,t,r){var n=r(6418),o=r(3781),i=r(5451),s=function(e){return function(t,r,s){var a,c=n(t),l=i(c);if(0===l)return!e&&-1;var u=o(s,l);if(e&&r!=r){for(;l>u;)if((a=c[u++])!=a)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===r)return e||u||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},4311:function(e,t,r){var n=r(323),o=r(4694),i=r(7862),s=r(5451),a=TypeError,c="Reduce of empty array with no initial value",l=function(e){return function(t,r,l,u){var d=o(t),h=i(d),f=s(d);if(n(r),0===f&&l<2)throw new a(c);var p=e?f-1:0,v=e?-1:1;if(l<2)for(;;){if(p in h){u=h[p],p+=v;break}if(p+=v,e?p<0:f<=p)throw new a(c)}for(;e?p>=0:f>p;p+=v)p in h&&(u=r(u,h[p],p,d));return u}};e.exports={left:l(!1),right:l(!0)}},3797:function(e,t,r){var n=r(6708)("iterator"),o=!1;try{var i=0,s={next:function(){return{done:!!i++}},return:function(){o=!0}};s[n]=function(){return this},Array.from(s,function(){throw 2})}catch(e){}e.exports=function(e,t){try{if(!t&&!o)return!1}catch(e){return!1}var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},e(i)}catch(e){}return r}},2699:function(e,t,r){var n=r(1319),o=n({}.toString),i=n("".slice);e.exports=function(e){return i(o(e),8,-1)}},9912:function(e,t,r){var n=r(4123),o=r(2614),i=r(2699),s=r(6708)("toStringTag"),a=Object,c="Arguments"===i(function(){return a