@launchdarkly/browser-telemetry 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/bundle.cjs.js +3 -3
- package/dist/cjs/bundle.cjs.js.map +1 -1
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/src/BrowserTelemetryImpl.d.ts +5 -3
- package/dist/cjs/src/BrowserTelemetryImpl.d.ts.map +1 -1
- package/dist/cjs/src/api/Breadcrumb.d.ts +102 -1
- package/dist/cjs/src/api/Breadcrumb.d.ts.map +1 -1
- package/dist/cjs/src/api/BrowserTelemetry.d.ts +2 -2
- package/dist/cjs/src/api/BrowserTelemetry.d.ts.map +1 -1
- package/dist/cjs/src/api/Collector.d.ts +1 -1
- package/dist/cjs/src/api/Collector.d.ts.map +1 -1
- package/dist/cjs/src/api/ErrorData.d.ts +10 -0
- package/dist/cjs/src/api/ErrorData.d.ts.map +1 -0
- package/dist/cjs/src/api/EventData.d.ts +4 -0
- package/dist/cjs/src/api/EventData.d.ts.map +1 -0
- package/dist/cjs/src/api/Options.d.ts +95 -0
- package/dist/cjs/src/api/Options.d.ts.map +1 -1
- package/dist/cjs/src/collectors/dom/ClickCollector.d.ts +12 -0
- package/dist/cjs/src/collectors/dom/ClickCollector.d.ts.map +1 -0
- package/dist/cjs/src/collectors/dom/KeypressCollector.d.ts +14 -0
- package/dist/cjs/src/collectors/dom/KeypressCollector.d.ts.map +1 -0
- package/dist/cjs/src/collectors/dom/getTarget.d.ts +11 -0
- package/dist/cjs/src/collectors/dom/getTarget.d.ts.map +1 -0
- package/dist/cjs/src/collectors/dom/toSelector.d.ts +59 -0
- package/dist/cjs/src/collectors/dom/toSelector.d.ts.map +1 -0
- package/dist/cjs/src/collectors/error.d.ts.map +1 -1
- package/dist/cjs/src/collectors/http/HttpCollectorOptions.d.ts +13 -0
- package/dist/cjs/src/collectors/http/HttpCollectorOptions.d.ts.map +1 -0
- package/dist/cjs/src/collectors/http/fetch.d.ts +13 -0
- package/dist/cjs/src/collectors/http/fetch.d.ts.map +1 -0
- package/dist/cjs/src/collectors/http/fetchDecorator.d.ts +22 -0
- package/dist/cjs/src/collectors/http/fetchDecorator.d.ts.map +1 -0
- package/dist/cjs/src/collectors/http/xhr.d.ts +14 -0
- package/dist/cjs/src/collectors/http/xhr.d.ts.map +1 -0
- package/dist/cjs/src/collectors/http/xhrDecorator.d.ts +8 -0
- package/dist/cjs/src/collectors/http/xhrDecorator.d.ts.map +1 -0
- package/dist/cjs/src/collectors/rrweb/ContinuousReplay.d.ts +2 -2
- package/dist/cjs/src/collectors/rrweb/ContinuousReplay.d.ts.map +1 -1
- package/dist/cjs/src/collectors/rrweb/RollingReplay.d.ts +2 -1
- package/dist/cjs/src/collectors/rrweb/RollingReplay.d.ts.map +1 -1
- package/dist/cjs/src/collectors/rrweb/SessionReplay.d.ts +1 -1
- package/dist/cjs/src/collectors/rrweb/SessionReplay.d.ts.map +1 -1
- package/dist/cjs/src/filters/defaultUrlFilter.d.ts +8 -0
- package/dist/cjs/src/filters/defaultUrlFilter.d.ts.map +1 -0
- package/dist/cjs/src/filters/filterHttpBreadcrumb.d.ts +9 -0
- package/dist/cjs/src/filters/filterHttpBreadcrumb.d.ts.map +1 -0
- package/dist/cjs/src/filters/filterUrl.d.ts +3 -0
- package/dist/cjs/src/filters/filterUrl.d.ts.map +1 -0
- package/dist/cjs/src/options.d.ts +44 -1
- package/dist/cjs/src/options.d.ts.map +1 -1
- package/dist/cjs/src/randomUuidV4.d.ts +12 -0
- package/dist/cjs/src/randomUuidV4.d.ts.map +1 -0
- package/dist/cjs/src/stack/StackFrame.d.ts +12 -0
- package/dist/cjs/src/stack/StackFrame.d.ts.map +1 -1
- package/dist/cjs/src/stack/StackParser.d.ts +17 -1
- package/dist/cjs/src/stack/StackParser.d.ts.map +1 -1
- package/dist/esm/bundle.es.js +3 -3
- package/dist/esm/bundle.es.js.map +1 -1
- package/dist/esm/package.json +1 -1
- package/dist/esm/src/BrowserTelemetryImpl.d.ts +5 -3
- package/dist/esm/src/BrowserTelemetryImpl.d.ts.map +1 -1
- package/dist/esm/src/api/Breadcrumb.d.ts +102 -1
- package/dist/esm/src/api/Breadcrumb.d.ts.map +1 -1
- package/dist/esm/src/api/BrowserTelemetry.d.ts +2 -2
- package/dist/esm/src/api/BrowserTelemetry.d.ts.map +1 -1
- package/dist/esm/src/api/Collector.d.ts +1 -1
- package/dist/esm/src/api/Collector.d.ts.map +1 -1
- package/dist/esm/src/api/ErrorData.d.ts +10 -0
- package/dist/esm/src/api/ErrorData.d.ts.map +1 -0
- package/dist/esm/src/api/EventData.d.ts +4 -0
- package/dist/esm/src/api/EventData.d.ts.map +1 -0
- package/dist/esm/src/api/Options.d.ts +95 -0
- package/dist/esm/src/api/Options.d.ts.map +1 -1
- package/dist/esm/src/collectors/dom/ClickCollector.d.ts +12 -0
- package/dist/esm/src/collectors/dom/ClickCollector.d.ts.map +1 -0
- package/dist/esm/src/collectors/dom/KeypressCollector.d.ts +14 -0
- package/dist/esm/src/collectors/dom/KeypressCollector.d.ts.map +1 -0
- package/dist/esm/src/collectors/dom/getTarget.d.ts +11 -0
- package/dist/esm/src/collectors/dom/getTarget.d.ts.map +1 -0
- package/dist/esm/src/collectors/dom/toSelector.d.ts +59 -0
- package/dist/esm/src/collectors/dom/toSelector.d.ts.map +1 -0
- package/dist/esm/src/collectors/error.d.ts.map +1 -1
- package/dist/esm/src/collectors/http/HttpCollectorOptions.d.ts +13 -0
- package/dist/esm/src/collectors/http/HttpCollectorOptions.d.ts.map +1 -0
- package/dist/esm/src/collectors/http/fetch.d.ts +13 -0
- package/dist/esm/src/collectors/http/fetch.d.ts.map +1 -0
- package/dist/esm/src/collectors/http/fetchDecorator.d.ts +22 -0
- package/dist/esm/src/collectors/http/fetchDecorator.d.ts.map +1 -0
- package/dist/esm/src/collectors/http/xhr.d.ts +14 -0
- package/dist/esm/src/collectors/http/xhr.d.ts.map +1 -0
- package/dist/esm/src/collectors/http/xhrDecorator.d.ts +8 -0
- package/dist/esm/src/collectors/http/xhrDecorator.d.ts.map +1 -0
- package/dist/esm/src/collectors/rrweb/ContinuousReplay.d.ts +2 -2
- package/dist/esm/src/collectors/rrweb/ContinuousReplay.d.ts.map +1 -1
- package/dist/esm/src/collectors/rrweb/RollingReplay.d.ts +2 -1
- package/dist/esm/src/collectors/rrweb/RollingReplay.d.ts.map +1 -1
- package/dist/esm/src/collectors/rrweb/SessionReplay.d.ts +1 -1
- package/dist/esm/src/collectors/rrweb/SessionReplay.d.ts.map +1 -1
- package/dist/esm/src/filters/defaultUrlFilter.d.ts +8 -0
- package/dist/esm/src/filters/defaultUrlFilter.d.ts.map +1 -0
- package/dist/esm/src/filters/filterHttpBreadcrumb.d.ts +9 -0
- package/dist/esm/src/filters/filterHttpBreadcrumb.d.ts.map +1 -0
- package/dist/esm/src/filters/filterUrl.d.ts +3 -0
- package/dist/esm/src/filters/filterUrl.d.ts.map +1 -0
- package/dist/esm/src/options.d.ts +44 -1
- package/dist/esm/src/options.d.ts.map +1 -1
- package/dist/esm/src/randomUuidV4.d.ts +12 -0
- package/dist/esm/src/randomUuidV4.d.ts.map +1 -0
- package/dist/esm/src/stack/StackFrame.d.ts +12 -0
- package/dist/esm/src/stack/StackFrame.d.ts.map +1 -1
- package/dist/esm/src/stack/StackParser.d.ts +17 -1
- package/dist/esm/src/stack/StackParser.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/src/api/Event.d.ts +0 -4
- package/dist/cjs/src/api/Event.d.ts.map +0 -1
- package/dist/cjs/src/collectors/click.d.ts +0 -9
- package/dist/cjs/src/collectors/click.d.ts.map +0 -1
- package/dist/esm/src/api/Event.d.ts +0 -4
- package/dist/esm/src/api/Event.d.ts.map +0 -1
- package/dist/esm/src/collectors/click.d.ts +0 -9
- package/dist/esm/src/collectors/click.d.ts.map +0 -1
package/dist/esm/bundle.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n={exports:{}};
|
|
2
2
|
/**
|
|
3
3
|
* https://github.com/csnover/TraceKit
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @namespace TraceKit
|
|
6
|
-
*/!function(e){!function(t,n){if(t){var r={},o=t.TraceKit,i=[].slice,s="?",a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;r.noConflict=function(){return t.TraceKit=o,r},r.wrap=function(e){return function(){try{return e.apply(this,arguments)}catch(e){throw r.report(e),e}}},r.report=function(){var e,n,o,i,s=[],c=null,u=null;function d(e,t,n){var o=null;if(!t||r.collectWindowErrors){for(var i in s)if(l(s,i))try{s[i](e,t,n)}catch(e){o=e}if(o)throw o}}function h(t,n,o,i,s){if(u)r.computeStackTrace.augmentStackTraceWithInitialElement(u,n,o,t),g();else if(s)d(r.computeStackTrace(s),!0,s);else{var l,c={url:n,line:o,column:i},h=t;if("[object String]"==={}.toString.call(t)){var p=t.match(a);p&&(l=p[1],h=p[2])}c.func=r.computeStackTrace.guessFunctionName(c.url,c.line),c.context=r.computeStackTrace.gatherContext(c.url,c.line),d({name:l,message:h,mode:"onerror",stack:[c]},!0,null)}return!!e&&e.apply(this,arguments)}function p(e){d(r.computeStackTrace(e.reason),!0,e.reason)}function g(){var e=u,t=c;u=null,c=null,d(e,!1,t)}function m(e){if(u){if(c===e)return;g()}var t=r.computeStackTrace(e);throw u=t,c=e,setTimeout((function(){c===e&&g()}),t.incomplete?2e3:0),e}return m.subscribe=function(r){!function(){if(!0===n)return;e=t.onerror,t.onerror=h,n=!0}(),function(){if(!0===i)return;o=t.onunhandledrejection,t.onunhandledrejection=p,i=!0}(),s.push(r)},m.unsubscribe=function(r){for(var a=s.length-1;a>=0;--a)s[a]===r&&s.splice(a,1);0===s.length&&(n&&(t.onerror=e,n=!1),i&&(t.onunhandledrejection=o,i=!1))},m}(),r.computeStackTrace=function(){var e={};function n(n){if("string"!=typeof n)return[];if(!l(e,n)){var o="",i="";try{i=t.document.domain}catch(e){}var s=/(.*)\:\/\/([^:\/]+)([:\d]*)\/{0,1}([\s\S]*)/.exec(n);s&&s[2]===i&&(o=function(e){if(!r.remoteFetching)return"";try{var n=function(){try{return new t.XMLHttpRequest}catch(e){return new t.ActiveXObject("Microsoft.XMLHTTP")}}();return n.open("GET",e,!1),n.send(""),n.responseText}catch(e){return""}}(n)),e[n]=o?o.split("\n"):[]}return e[n]}function o(e,t){var r,o=/function ([^(]*)\(([^)]*)\)/,i=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,a="",l=n(e);if(!l.length)return s;for(var u=0;u<10;++u)if(!c(a=l[t-u]+a)){if(r=i.exec(a))return r[1];if(r=o.exec(a))return r[1]}return s}function i(e,t){var o=n(e);if(!o.length)return null;var i=[],s=Math.floor(r.linesOfContext/2),a=s+r.linesOfContext%2,l=Math.max(0,t-s-1),u=Math.min(o.length,t+a-1);t-=1;for(var d=l;d<u;++d)c(o[d])||i.push(o[d]);return i.length>0?i:null}function a(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function u(e){return a(e).replace("<","(?:<|<)").replace(">","(?:>|>)").replace("&","(?:&|&)").replace('"','(?:"|")').replace(/\s+/g,"\\s+")}function d(e,t){for(var r,o,i=0,s=t.length;i<s;++i)if((r=n(t[i])).length&&(r=r.join("\n"),o=e.exec(r)))return{url:t[i],line:r.substring(0,o.index).split("\n").length,column:o.index-r.lastIndexOf("\n",o.index)-1};return null}function h(e,t,r){var o,i=n(t),s=new RegExp("\\b"+a(e)+"\\b");return r-=1,i&&i.length>r&&(o=s.exec(i[r]))?o.index:null}function p(e){if(!c(t&&t.document)){for(var n,r,o,i,s=[t.location.href],l=t.document.getElementsByTagName("script"),h=""+e,p=0;p<l.length;++p){var g=l[p];g.src&&s.push(g.src)}if(o=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/.exec(h)){var m=o[1]?"\\s+"+o[1]:"",f=o[2].split(",").join("\\s*,\\s*");n=a(o[3]).replace(/;$/,";?"),r=new RegExp("function"+m+"\\s*\\(\\s*"+f+"\\s*\\)\\s*{\\s*"+n+"\\s*}")}else r=new RegExp(a(h).replace(/\s+/g,"\\s+"));if(i=d(r,s))return i;if(o=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/.exec(h)){var I=o[1];if(n=u(o[2]),i=d(r=new RegExp("on"+I+"=[\\'\"]\\s*"+n+"\\s*[\\'\"]","i"),s[0]))return i;if(i=d(r=new RegExp(n),s))return i}return null}}function g(e){if(!e.stack)return null;for(var t,n,r,a=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,l=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,u=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,d=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,p=/\((\S*)(?::(\d+))(?::(\d+))\)/,g=e.stack.split("\n"),m=[],f=/^(.*) is undefined$/.exec(e.message),I=0,C=g.length;I<C;++I){if(n=a.exec(g[I])){var y=n[2]&&0===n[2].indexOf("native");n[2]&&0===n[2].indexOf("eval")&&(t=p.exec(n[2]))&&(n[2]=t[1],n[3]=t[2],n[4]=t[3]),r={url:y?null:n[2],func:n[1]||s,args:y?[n[2]]:[],line:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}else if(n=u.exec(g[I]))r={url:n[2],func:n[1]||s,args:[],line:+n[3],column:n[4]?+n[4]:null};else{if(!(n=l.exec(g[I])))continue;n[3]&&n[3].indexOf(" > eval")>-1&&(t=d.exec(n[3]))?(n[3]=t[1],n[4]=t[2],n[5]=null):0!==I||n[5]||c(e.columnNumber)||(m[0].column=e.columnNumber+1),r={url:n[3],func:n[1]||s,args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}!r.func&&r.line&&(r.func=o(r.url,r.line)),r.context=r.line?i(r.url,r.line):null,m.push(r)}return m.length?(m[0]&&m[0].line&&!m[0].column&&f&&(m[0].column=h(f[1],m[0].url,m[0].line)),{mode:"stack",name:e.name,message:e.message,stack:m}):null}function m(e,t,n,r){var s={url:t,line:n};if(s.url&&s.line){e.incomplete=!1,s.func||(s.func=o(s.url,s.line)),s.context||(s.context=i(s.url,s.line));var a=/ '([^']+)' /.exec(r);if(a&&(s.column=h(a[1],s.url,s.line)),e.stack.length>0&&e.stack[0].url===s.url){if(e.stack[0].line===s.line)return!1;if(!e.stack[0].line&&e.stack[0].func===s.func)return e.stack[0].line=s.line,e.stack[0].context=s.context,!1}return e.stack.unshift(s),e.partial=!0,!0}return e.incomplete=!0,!1}function f(e,t){for(var n,i,a,l=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,c=[],u={},d=!1,g=f.caller;g&&!d;g=g.caller)if(g!==I&&g!==r.report){if(i={url:null,func:s,args:[],line:null,column:null},g.name?i.func=g.name:(n=l.exec(g.toString()))&&(i.func=n[1]),void 0===i.func)try{i.func=n.input.substring(0,n.input.indexOf("{"))}catch(e){}if(a=p(g)){i.url=a.url,i.line=a.line,i.func===s&&(i.func=o(i.url,i.line));var C=/ '([^']+)' /.exec(e.message||e.description);C&&(i.column=h(C[1],a.url,a.line))}u[""+g]?d=!0:u[""+g]=!0,c.push(i)}t&&c.splice(0,t);var y={mode:"callers",name:e.name,message:e.message,stack:c};return m(y,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),y}function I(e,r){var s=null;r=null==r?0:+r;try{if(s=function(e){var t=e.stacktrace;if(t){for(var n,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,s=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,a=t.split("\n"),l=[],c=0;c<a.length;c+=2){var u=null;if((n=r.exec(a[c]))?u={url:n[2],line:+n[1],column:null,func:n[3],args:[]}:(n=s.exec(a[c]))&&(u={url:n[6],line:+n[1],column:+n[2],func:n[3]||n[4],args:n[5]?n[5].split(","):[]}),u){if(!u.func&&u.line&&(u.func=o(u.url,u.line)),u.line)try{u.context=i(u.url,u.line)}catch(e){}u.context||(u.context=[a[c+1]]),l.push(u)}}return l.length?{mode:"stacktrace",name:e.name,message:e.message,stack:l}:null}}(e),s)return s}catch(e){}try{if(s=g(e))return s}catch(e){}try{if(s=function(e){var r=e.message.split("\n");if(r.length<4)return null;var s,a=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,c=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,h=/^\s*Line (\d+) of function script\s*$/i,p=[],g=t&&t.document&&t.document.getElementsByTagName("script"),m=[];for(var f in g)l(g,f)&&!g[f].src&&m.push(g[f]);for(var I=2;I<r.length;I+=2){var C=null;if(s=a.exec(r[I]))C={url:s[2],func:s[3],args:[],line:+s[1],column:null};else if(s=c.exec(r[I])){C={url:s[3],func:s[4],args:[],line:+s[1],column:null};var y=+s[1],v=m[s[2]-1];if(v){var b=n(C.url);if(b){var S=(b=b.join("\n")).indexOf(v.innerText);S>=0&&(C.line=y+b.substring(0,S).split("\n").length)}}}else if(s=h.exec(r[I])){var A=t.location.href.replace(/#.*$/,""),k=d(new RegExp(u(r[I+1])),[A]);C={url:A,func:"",args:[],line:k?k.line:s[1],column:null}}if(C){C.func||(C.func=o(C.url,C.line));var w=i(C.url,C.line),M=w?w[Math.floor(w.length/2)]:null;w&&M.replace(/^\s*/,"")===r[I+1].replace(/^\s*/,"")?C.context=w:C.context=[r[I+1]],p.push(C)}}return p.length?{mode:"multiline",name:e.name,message:r[0],stack:p}:null}(e),s)return s}catch(e){}try{if(s=f(e,r+1))return s}catch(e){}return{name:e.name,message:e.message,mode:"failed"}}return I.augmentStackTraceWithInitialElement=m,I.computeStackTraceFromStackProp=g,I.guessFunctionName=o,I.gatherContext=i,I.ofCaller=function(e){e=1+(null==e?0:+e);try{throw new Error}catch(t){return I(t,e+1)}},I.getSource=n,I}(),r.extendToAsynchronousCallbacks=function(){var e=function(e){var n=t[e];t[e]=function(){var e=i.call(arguments),t=e[0];return"function"==typeof t&&(e[0]=r.wrap(t)),n.apply?n.apply(this,e):n(e[0],e[1])}};e("setTimeout"),e("setInterval")},r.remoteFetching||(r.remoteFetching=!0),r.collectWindowErrors||(r.collectWindowErrors=!0),(!r.linesOfContext||r.linesOfContext<1)&&(r.linesOfContext=11),e.exports&&t.module!==e?e.exports=r:t.TraceKit=r}function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e){return void 0===e}}("undefined"!=typeof window?window:n)}(o);var i=o.exports,s=r(i);null==s||(s.linesOfContext=1);const a="(index)";function l(e,t){let n=e;return e.startsWith(t)&&(n=e.slice(t.length),n.startsWith("/")&&(n=n.slice(1)),""===n&&(n=a),n.endsWith("/")&&(n+=a)),n}function c(e,t,n){if(t.length<=e.maxLength)return t;const r=Math.max(0,n-e.beforeColumnCharacters),o=Math.min(t.length,r+e.maxLength);return t.slice(r,o)}class u{constructor(n){this.pendingEvents=[],this.breadcrumbs=[],this.inspectorInstances=[],this.collectors=[],this.collectors.push(new t),this.collectors.push(...n.collectors),this.maxPendingEvents=n.maxPendingEvents,this.maxBreadcrumbs=n.breadcrumbs.maxBreadcrumbs,n.breadcrumbs.click&&this.collectors.push(new e),this.collectors.forEach((e=>e.register(this)));const r=[];!function(e,t,n){e.breadcrumbs.evaluations&&t.push({type:"flag-used",name:"launchdarkly-browser-telemetry-flag-used",synchronous:!0,method(e,t,r){n.handleFlagUsed(e,t,r)}}),e.breadcrumbs.flagChange&&t.push({type:"flag-detail-changed",name:"launchdarkly-browser-telemetry-flag-used",synchronous:!0,method(e,t){n.handleFlagDetailChanged(e,t)}})}(n,r,this),this.inspectorInstances.push(...r)}register(e){this.client=e}inspectors(){return this.inspectorInstances}capture(e,t){var n;void 0===this.client&&(this.pendingEvents.push(e),this.pendingEvents.length>this.maxPendingEvents&&this.pendingEvents.shift()),null===(n=this.client)||void 0===n||n.track(`$ld:telemetry:${t}`,e)}captureError(e){var t;this.capture({message:e.message,name:e.name,stack:(t=e,{frames:i.computeStackTrace(t).stack.reverse().map((e=>{var t;return{fileName:l(e.url,window.location.origin),function:e.func,line:e.line,col:e.column,srcLine:c({maxLength:280,beforeColumnCharacters:280},null===(t=e.context)||void 0===t?void 0:t[0],e.column)}}))}),breadcrumbs:[...this.breadcrumbs]},"error"),this.dispatchError(e)}captureErrorEvent(e){this.captureError(e.error)}captureSession(e){this.capture(Object.assign(Object.assign({},e),{breadcrumbs:[...this.breadcrumbs]}),"sessionCapture")}addBreadcrumb(e){this.breadcrumbs.push(e),this.breadcrumbs.length>this.maxBreadcrumbs&&this.breadcrumbs.shift()}close(){this.collectors.forEach((e=>e.unregister()))}handleFlagUsed(e,t,n){this.addBreadcrumb({type:"flag-evaluated",flagKey:e,value:t.value,timestamp:(new Date).getTime()}),this.dispatchFlagUsed(e,t,n)}handleFlagDetailChanged(e,t){this.addBreadcrumb({type:"flag-detail-changed",flagKey:e,detail:t}),this.dispatchFlagDetailChanged(e,t)}dispatchError(e){this.collectors.forEach((t=>{var n;null===(n=t.handleErrorEvent)||void 0===n||n.call(t,e.name,e.message)}))}dispatchFlagUsed(e,t,n){this.collectors.forEach((r=>{var o;null===(o=r.handleFlagUsed)||void 0===o||o.call(r,e,t,n)}))}dispatchFlagDetailChanged(e,t){this.collectors.forEach((n=>{var r;null===(r=n.handleFlagDetailChanged)||void 0===r||r.call(n,e,t)}))}}var d;function h(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function p(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function g(e){try{var t=e.rules||e.cssRules;return t?((n=Array.from(t).map(m).join("")).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),n):null}catch(e){return null}var n}function m(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=g(e.styleSheet)||t}catch(e){}return t}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(d||(d={}));var f=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=n?n:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function I(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,i=e.maskInputFn,s=o||"";return(t[n.toLowerCase()]||t[r])&&(s=i?i(s):"*".repeat(s.length)),s}var C="__rrweb_original__";var y,v,b=1,S=new RegExp("[^a-z0-9-_:]"),A=-2;function k(){return b++}var w=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,M=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,T=/^(data:)([^,]*),(.*)/i;function x(e,t){return(e||"").replace(w,(function(e,n,r,o,i,s){var a,l=r||i||s,c=n||o||"";if(!l)return e;if(!M.test(l))return"url(".concat(c).concat(l).concat(c,")");if(T.test(l))return"url(".concat(c).concat(l).concat(c,")");if("/"===l[0])return"url(".concat(c).concat((a=t,(a.indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+l)).concat(c,")");var u=t.split("/"),d=l.split("/");u.pop();for(var h=0,p=d;h<p.length;h++){var g=p[h];"."!==g&&(".."===g?u.pop():u.push(g))}return"url(".concat(c).concat(u.join("/")).concat(c,")")}))}var E=/^[^ \t\n\r\u000c]+/,N=/^[, \t\n\r\u000c]+/;function R(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function O(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function F(){var e=document.createElement("a");return e.href="",e.href}function L(e,t,n,r){return"src"===n||"href"===n&&r&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&r&&"#"!==r[0]?R(e,r):"background"!==n||!r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n&&r?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}for(var o=[];r(N),!(n>=t.length);){var i=r(E);if(","===i.slice(-1))i=R(e,i.substring(0,i.length-1)),o.push(i);else{var s="";i=R(e,i);for(var a=!1;;){var l=t.charAt(n);if(""===l){o.push((i+s).trim());break}if(a)")"===l&&(a=!1);else{if(","===l){n+=1,o.push((i+s).trim());break}"("===l&&(a=!0)}s+=l,n+=1}}}return o.join(", ")}(e,r):"style"===n&&r?x(r,F()):"object"===t&&"data"===n&&r?R(e,r):r:R(e,r)}function D(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&D(e.parentNode,t,n);for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return!!n&&D(e.parentNode,t,n)}function W(e,t,n){var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===r)return!1;if("string"==typeof t){if(r.classList.contains(t))return!0;if(r.closest(".".concat(t)))return!0}else if(D(r,t,!0))return!0;if(n){if(r.matches(n))return!0;if(r.closest(n))return!0}return!1}function B(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,i=t.blockSelector,s=t.maskTextClass,a=t.maskTextSelector,l=t.inlineStylesheet,c=t.maskInputOptions,u=void 0===c?{}:c,h=t.maskTextFn,p=t.maskInputFn,m=t.dataURLOptions,f=void 0===m?{}:m,b=t.inlineImages,A=t.recordCanvas,k=t.keepIframeSrcFn,w=t.newlyAddedElement,M=void 0!==w&&w,T=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:d.Document,childNodes:[],compatMode:e.compatMode}:{type:d.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:d.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:T};case e.ELEMENT_NODE:return function(e,t){for(var n=t.doc,r=t.blockClass,o=t.blockSelector,i=t.inlineStylesheet,s=t.maskInputOptions,a=void 0===s?{}:s,l=t.maskInputFn,c=t.dataURLOptions,u=void 0===c?{}:c,h=t.inlineImages,p=t.recordCanvas,m=t.keepIframeSrcFn,f=t.newlyAddedElement,b=void 0!==f&&f,A=t.rootId,k=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return!!n&&e.matches(n)}(e,r,o),w=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return S.test(t)?"div":t}(e),M={},T=e.attributes.length,E=0;E<T;E++){var N=e.attributes[E];M[N.name]=L(n,w,N.name,N.value)}if("link"===w&&i){var R=Array.from(n.styleSheets).find((function(t){return t.href===e.href})),D=null;R&&(D=g(R)),D&&(delete M.rel,delete M.href,M._cssText=x(D,R.href))}if("style"===w&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){(D=g(e.sheet))&&(M._cssText=x(D,F()))}if("input"===w||"textarea"===w||"select"===w){var W=e.value,B=e.checked;"radio"!==M.type&&"checkbox"!==M.type&&"submit"!==M.type&&"button"!==M.type&&W?M.value=I({type:M.type,tagName:w,value:W,maskInputOptions:a,maskInputFn:l}):B&&(M.checked=B)}"option"===w&&(e.selected&&!a.select?M.selected=!0:delete M.selected);if("canvas"===w&&p)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var o=t.getImageData,i=C in o?o[C]:o;if(new Uint32Array(i.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(e)||(M.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){var Z=e.toDataURL(u.type,u.quality),G=document.createElement("canvas");G.width=e.width,G.height=e.height,Z!==G.toDataURL(u.type,u.quality)&&(M.rr_dataURL=Z)}if("img"===w&&h){y||(y=n.createElement("canvas"),v=y.getContext("2d"));var U=e,V=U.crossOrigin;U.crossOrigin="anonymous";var K=function(){try{y.width=U.naturalWidth,y.height=U.naturalHeight,v.drawImage(U,0,0),M.rr_dataURL=y.toDataURL(u.type,u.quality)}catch(e){console.warn("Cannot inline img src=".concat(U.currentSrc,"! Error: ").concat(e))}V?M.crossOrigin=V:U.removeAttribute("crossorigin")};U.complete&&0!==U.naturalWidth?K():U.onload=K}"audio"!==w&&"video"!==w||(M.rr_mediaState=e.paused?"paused":"played",M.rr_mediaCurrentTime=e.currentTime);b||(e.scrollLeft&&(M.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(M.rr_scrollTop=e.scrollTop));if(k){var Y=e.getBoundingClientRect(),_=Y.width,P=Y.height;M={class:M.class,rr_width:"".concat(_,"px"),rr_height:"".concat(P,"px")}}"iframe"!==w||m(M.src)||(e.contentDocument||(M.rr_src=M.src),delete M.src);return{type:d.Element,tagName:w,attributes:M,childNodes:[],isSVG:O(e)||void 0,needBlock:k,rootId:A}}(e,{doc:n,blockClass:o,blockSelector:i,inlineStylesheet:l,maskInputOptions:u,maskInputFn:p,dataURLOptions:f,inlineImages:b,recordCanvas:A,keepIframeSrcFn:k,newlyAddedElement:M,rootId:T});case e.TEXT_NODE:return function(e,t){var n,r=t.maskTextClass,o=t.maskTextSelector,i=t.maskTextFn,s=t.rootId,a=e.parentNode&&e.parentNode.tagName,l=e.textContent,c="STYLE"===a||void 0,u="SCRIPT"===a||void 0;if(c&&l){try{e.nextSibling||e.previousSibling||(null===(n=e.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(l=(h=e.parentNode.sheet).cssRules?Array.from(h.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(t),e)}l=x(l,F())}var h;u&&(l="SCRIPT_PLACEHOLDER");!c&&!u&&l&&W(e,r,o)&&(l=i?i(l):l.replace(/[\S]/g,"*"));return{type:d.Text,textContent:l||"",isStyle:c,rootId:s}}(e,{maskTextClass:s,maskTextSelector:a,maskTextFn:h,rootId:T});case e.CDATA_SECTION_NODE:return{type:d.CDATA,textContent:"",rootId:T};case e.COMMENT_NODE:return{type:d.Comment,textContent:e.textContent||"",rootId:T};default:return!1}}function Z(e){return void 0===e?"":e.toLowerCase()}function G(e,t){var n,r=t.doc,o=t.mirror,i=t.blockClass,s=t.blockSelector,a=t.maskTextClass,l=t.maskTextSelector,c=t.skipChild,u=void 0!==c&&c,g=t.inlineStylesheet,m=void 0===g||g,f=t.maskInputOptions,I=void 0===f?{}:f,C=t.maskTextFn,y=t.maskInputFn,v=t.slimDOMOptions,b=t.dataURLOptions,S=void 0===b?{}:b,w=t.inlineImages,M=void 0!==w&&w,T=t.recordCanvas,x=void 0!==T&&T,E=t.onSerialize,N=t.onIframeLoad,R=t.iframeLoadTimeout,O=void 0===R?5e3:R,F=t.onStylesheetLoad,L=t.stylesheetLoadTimeout,D=void 0===L?5e3:L,W=t.keepIframeSrcFn,U=void 0===W?function(){return!1}:W,V=t.newlyAddedElement,K=void 0!==V&&V,Y=t.preserveWhiteSpace,_=void 0===Y||Y,P=B(e,{doc:r,mirror:o,blockClass:i,blockSelector:s,maskTextClass:a,maskTextSelector:l,inlineStylesheet:m,maskInputOptions:I,maskTextFn:C,maskInputFn:y,dataURLOptions:S,inlineImages:M,recordCanvas:x,keepIframeSrcFn:U,newlyAddedElement:K});if(!P)return console.warn(e,"not serialized"),null;n=o.hasNode(e)?o.getId(e):!function(e,t){if(t.comment&&e.type===d.Comment)return!0;if(e.type===d.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Z(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Z(e.attributes.name)||"icon"===Z(e.attributes.rel)||"apple-touch-icon"===Z(e.attributes.rel)||"shortcut icon"===Z(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Z(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Z(e.attributes.property).match(/^(og|twitter|fb):/)||Z(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Z(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Z(e.attributes.name)||"googlebot"===Z(e.attributes.name)||"bingbot"===Z(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Z(e.attributes.name)||"generator"===Z(e.attributes.name)||"framework"===Z(e.attributes.name)||"publisher"===Z(e.attributes.name)||"progid"===Z(e.attributes.name)||Z(e.attributes.property).match(/^article:/)||Z(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Z(e.attributes.name)||"yandex-verification"===Z(e.attributes.name)||"csrf-token"===Z(e.attributes.name)||"p:domain_verify"===Z(e.attributes.name)||"verify-v1"===Z(e.attributes.name)||"verification"===Z(e.attributes.name)||"shopify-checkout-api-token"===Z(e.attributes.name)))return!0}}return!1}(P,v)&&(_||P.type!==d.Text||P.isStyle||P.textContent.replace(/^\s+|\s+$/gm,"").length)?k():A;var z=Object.assign(P,{id:n});if(o.add(e,z),n===A)return null;E&&E(e);var J=!u;if(z.type===d.Element){J=J&&!z.needBlock,delete z.needBlock;var Q=e.shadowRoot;Q&&p(Q)&&(z.isShadowHost=!0)}if((z.type===d.Document||z.type===d.Element)&&J){v.headWhitespace&&z.type===d.Element&&"head"===z.tagName&&(_=!1);for(var H={doc:r,mirror:o,blockClass:i,blockSelector:s,maskTextClass:a,maskTextSelector:l,skipChild:u,inlineStylesheet:m,maskInputOptions:I,maskTextFn:C,maskInputFn:y,slimDOMOptions:v,dataURLOptions:S,inlineImages:M,recordCanvas:x,preserveWhiteSpace:_,onSerialize:E,onIframeLoad:N,iframeLoadTimeout:O,onStylesheetLoad:F,stylesheetLoadTimeout:D,keepIframeSrcFn:U},j=0,X=Array.from(e.childNodes);j<X.length;j++){(ee=G(X[j],H))&&z.childNodes.push(ee)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(var q=0,$=Array.from(e.shadowRoot.childNodes);q<$.length;q++){var ee;(ee=G($[q],H))&&(p(e.shadowRoot)&&(ee.isShadow=!0),z.childNodes.push(ee))}}return e.parentNode&&h(e.parentNode)&&p(e.parentNode)&&(z.isShadow=!0),z.type===d.Element&&"iframe"===z.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var o,i=!1;try{o=r.document.readyState}catch(e){return}if("complete"===o){var s="about:blank";if(r.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var a=setTimeout((function(){i||(t(),i=!0)}),n);e.addEventListener("load",(function(){clearTimeout(a),i=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&N){var n=G(t,{doc:t,mirror:o,blockClass:i,blockSelector:s,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:m,maskInputOptions:I,maskTextFn:C,maskInputFn:y,slimDOMOptions:v,dataURLOptions:S,inlineImages:M,recordCanvas:x,preserveWhiteSpace:_,onSerialize:E,onIframeLoad:N,iframeLoadTimeout:O,onStylesheetLoad:F,stylesheetLoadTimeout:D,keepIframeSrcFn:U});n&&N(e,n)}}),O),z.type===d.Element&&"link"===z.tagName&&"stylesheet"===z.attributes.rel&&function(e,t,n){var r,o=!1;try{r=e.sheet}catch(e){return}if(!r){var i=setTimeout((function(){o||(t(),o=!0)}),n);e.addEventListener("load",(function(){clearTimeout(i),o=!0,t()}))}}(e,(function(){if(F){var t=G(e,{doc:r,mirror:o,blockClass:i,blockSelector:s,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:m,maskInputOptions:I,maskTextFn:C,maskInputFn:y,slimDOMOptions:v,dataURLOptions:S,inlineImages:M,recordCanvas:x,preserveWhiteSpace:_,onSerialize:E,onIframeLoad:N,iframeLoadTimeout:O,onStylesheetLoad:F,stylesheetLoadTimeout:D,keepIframeSrcFn:U});t&&F(e,t)}}),D),z}function U(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const V="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let K={map:{},getId:()=>(console.error(V),-1),getNode:()=>(console.error(V),null),removeNodeFromMap(){console.error(V)},has:()=>(console.error(V),!1),reset(){console.error(V)}};function Y(e,t,n={}){let r=null,o=0;return function(...i){const s=Date.now();o||!1!==n.leading||(o=s);const a=t-(s-o),l=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),o=s,e.apply(l,i)):r||!1===n.trailing||(r=setTimeout((()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(l,i)}),a))}}function _(e,t,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>_(e,t,i||{},!0)}function P(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch(e){return()=>{}}}function z(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function J(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Q(e,t,n,r){if(!e)return!1;const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!o)return!1;if("string"==typeof t){if(o.classList.contains(t))return!0;if(r&&null!==o.closest("."+t))return!0}else if(D(o,t,r))return!0;if(n){if(e.matches(n))return!0;if(r&&null!==o.closest(n))return!0}return!1}function H(e,t){return t.getId(e)===A}function j(e,t){if(h(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||j(e.parentNode,t))}function X(e){return Boolean(e.changedTouches)}function q(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function $(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function ee(e){return Boolean(null==e?void 0:e.shadowRoot)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(K=new Proxy(K,{get:(e,t,n)=>("map"===t&&console.error(V),Reflect.get(e,t,n))}));class te{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}var ne=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(ne||{}),re=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e))(re||{}),oe=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(oe||{}),ie=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ie||{});function se(e){return"__ln"in e}class ae{constructor(){this.length=0,this.head=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&se(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&se(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}const le=(e,t)=>`${e}@${t}`;class ce{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new ae,n=e=>{let t=e,n=A;for(;n===A;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},r=r=>{var o,i,s,a;let l=null;(null===(i=null===(o=r.getRootNode)||void 0===o?void 0:o.call(r))||void 0===i?void 0:i.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&r.getRootNode().host&&(l=r.getRootNode().host);let c=l;for(;(null===(a=null===(s=null==c?void 0:c.getRootNode)||void 0===s?void 0:s.call(c))||void 0===a?void 0:a.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&c.getRootNode().host;)c=c.getRootNode().host;const u=!(this.doc.contains(r)||c&&this.doc.contains(c));if(!r.parentNode||u)return;const d=h(r.parentNode)?this.mirror.getId(l):this.mirror.getId(r.parentNode),p=n(r);if(-1===d||-1===p)return t.addNode(r);const g=G(r,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{q(e,this.mirror)&&this.iframeManager.addIframe(e),$(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),ee(r)&&this.shadowDomManager.addShadowRoot(r.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});g&&e.push({parentId:d,nextId:p,node:g})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of Array.from(this.movedSet.values()))de(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||r(e);for(const e of Array.from(this.addedSet.values()))pe(this.droppedSet,e)||de(this.removes,e,this.mirror)?pe(this.movedSet,e)?r(e):this.droppedSet.add(e):r(e);let o=null;for(;t.length;){let e=null;if(o){const t=this.mirror.getId(o.value.parentNode),r=n(o.value);-1!==t&&-1!==r&&(e=o)}if(!e)for(let r=t.length-1;r>=0;r--){const o=t.get(r);if(o){const t=this.mirror.getId(o.value.parentNode);if(-1===n(o.value))continue;if(-1!==t){e=o;break}{const t=o.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const n=t.parentNode.host;if(-1!==this.mirror.getId(n)){e=o;break}}}}}if(!e){for(;t.head;)t.removeNode(t.head.value);break}o=e.previous,t.removeNode(e.value),r(e.value)}const i={texts:this.texts.map((e=>({id:this.mirror.getId(e.node),value:e.value}))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>({id:this.mirror.getId(e.node),attributes:e.attributes}))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(i.texts.length||i.attributes.length||i.removes.length||i.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(i))},this.processMutation=e=>{if(!H(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;Q(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:W(e.target,this.maskTextClass,this.maskTextSelector)&&t?this.maskTextFn?this.maskTextFn(t):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.target.getAttribute(e.attributeName);if("value"===e.attributeName&&(n=I({maskInputOptions:this.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),Q(e.target,this.blockClass,this.blockSelector,!1)||n===e.oldValue)return;let r=this.attributes.find((t=>t.node===e.target));if("IFRAME"===t.tagName&&"src"===e.attributeName&&!this.keepIframeSrcFn(n)){if(t.contentDocument)return;e.attributeName="rr_src"}if(r||(r={node:e.target,attributes:{}},this.attributes.push(r)),"style"===e.attributeName){const n=this.doc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue),void 0!==r.attributes.style&&null!==r.attributes.style||(r.attributes.style={});const o=r.attributes.style;for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),i=t.style.getPropertyPriority(e);r===n.style.getPropertyValue(e)&&i===n.style.getPropertyPriority(e)||(o[e]=""===i?r:[r,i])}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(o[e]=!1)}else r.attributes[e.attributeName]=L(this.doc,t.tagName,e.attributeName,n);break}case"childList":if(Q(e.target,this.blockClass,this.blockSelector,!0))return;e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=h(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Q(e.target,this.blockClass,this.blockSelector,!1)||H(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(ue(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||j(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[le(n,r)]?ue(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!h(e.target)||!p(e.target))||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(this.mirror.hasNode(e)){if(H(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[le(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Q(e,this.blockClass,this.blockSelector,!1)||e.childNodes.forEach((e=>this.genAdds(e)))}}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function ue(e,t){e.delete(t),t.childNodes.forEach((t=>ue(e,t)))}function de(e,t,n){return 0!==e.length&&he(e,t,n)}function he(e,t,n){const{parentNode:r}=t;if(!r)return!1;const o=n.getId(r);return!!e.some((e=>e.id===o))||he(e,r,n)}function pe(e,t){return 0!==e.size&&ge(e,t)}function ge(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||ge(e,n))}const me=[],fe="undefined"!=typeof CSSGroupingRule,Ie="undefined"!=typeof CSSMediaRule,Ce="undefined"!=typeof CSSSupportsRule,ye="undefined"!=typeof CSSConditionRule;function ve(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(t){return e.target}}function be(e,t){var n,r;const o=new ce;me.push(o),o.init(e);let i=window.MutationObserver||window.__rrMutationObserver;const s=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");s&&window[s]&&(i=window[s]);const a=new i(o.processMutations.bind(o));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function Se({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const s=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,a=[];return Object.keys(oe).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e])).forEach((i=>{const s=i.toLowerCase(),l=(t=>i=>{const s=ve(i);if(Q(s,r,o,!0))return;const a=X(i)?i.changedTouches[0]:i;if(!a)return;const l=n.getId(s),{clientX:c,clientY:u}=a;e({type:oe[t],id:l,x:c,y:u})})(i);a.push(U(s,l,t))})),()=>{a.forEach((e=>e()))}}function Ae({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){return U("scroll",Y((i=>{const s=ve(i);if(!s||Q(s,r,o,!0))return;const a=n.getId(s);if(s===t){const n=t.scrollingElement||t.documentElement;e({id:a,x:n.scrollLeft,y:n.scrollTop})}else e({id:a,x:s.scrollLeft,y:s.scrollTop})}),i.scroll||100),t)}function ke(e,t){const n=Object.assign({},e);return t||delete n.userTriggered,n}const we=["INPUT","TEXTAREA","SELECT"],Me=new WeakMap;function Te(e){return function(e,t){if(fe&&e.parentRule instanceof CSSGroupingRule||Ie&&e.parentRule instanceof CSSMediaRule||Ce&&e.parentRule instanceof CSSSupportsRule||ye&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function xe(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function Ee({mirror:e,stylesheetManager:t},n){var r,o,i;let s=null;s="#document"===n.nodeName?e.getId(n):e.getId(n.host);const a="#document"===n.nodeName?null===(r=n.defaultView)||void 0===r?void 0:r.Document:null===(i=null===(o=n.ownerDocument)||void 0===o?void 0:o.defaultView)||void 0===i?void 0:i.ShadowRoot,l=Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets");return null!==s&&-1!==s&&a&&l?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null===(e=l.get)||void 0===e?void 0:e.call(this)},set(e){var n;const r=null===(n=l.set)||void 0===n?void 0:n.call(this,e);if(null!==s&&-1!==s)try{t.adoptStyleSheets(e,s)}catch(e){}return r}}),()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}):()=>{}}function Ne(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};!function(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:s,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:d,fontCb:h,selectionCb:p}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),n(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),r(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),o(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),i(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),s(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),u(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),d(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),h(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),p(...e)}}(e,t);const r=be(e,e.doc),o=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const o="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let s,a=[];const l=Y((t=>{const n=Date.now()-s;e(a.map((e=>(e.timeOffset-=n,e))),t),a=[],s=null}),i),c=Y((e=>{const t=ve(e),{clientX:n,clientY:o}=X(e)?e.changedTouches[0]:e;s||(s=Date.now()),a.push({x:n,y:o,id:r.getId(t),timeOffset:Date.now()-s}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?re.Drag:e instanceof MouseEvent?re.MouseMove:re.TouchMove)}),o,{trailing:!1}),u=[U("mousemove",c,n),U("touchmove",c,n),U("drag",c,n)];return()=>{u.forEach((e=>e()))}}(e),i=Se(e),s=Ae(e),a=function({viewportResizeCb:e}){let t=-1,n=-1;return U("resize",Y((()=>{const r=z(),o=J();t===r&&n===o||(e({width:Number(o),height:Number(r)}),t=r,n=o)}),200),window)}(e),l=function({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,ignoreClass:i,maskInputOptions:s,maskInputFn:a,sampling:l,userTriggeredOnInput:c}){function u(e){let n=ve(e);const l=e.isTrusted;if(n&&"OPTION"===n.tagName&&(n=n.parentElement),!n||!n.tagName||we.indexOf(n.tagName)<0||Q(n,r,o,!0))return;const u=n.type;if(n.classList.contains(i))return;let h=n.value,p=!1;"radio"===u||"checkbox"===u?p=n.checked:(s[n.tagName.toLowerCase()]||s[u])&&(h=I({maskInputOptions:s,tagName:n.tagName,type:u,value:h,maskInputFn:a})),d(n,ke({text:h,isChecked:p,userTriggered:l},c));const g=n.name;"radio"===u&&g&&p&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach((e=>{e!==n&&d(e,ke({text:e.value,isChecked:!p,userTriggered:!1},c))}))}function d(t,r){const o=Me.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){Me.set(t,r);const o=n.getId(t);e(Object.assign(Object.assign({},r),{id:o}))}}const h=("last"===l.input?["change"]:["input","change"]).map((e=>U(e,u,t))),p=t.defaultView;if(!p)return()=>{h.forEach((e=>e()))};const g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),m=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&h.push(...m.map((e=>_(e[0],e[1],{set(){u({target:this})}},!1,p)))),()=>{h.forEach((e=>e()))}}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:o}){const i=i=>Y((o=>{const s=ve(o);if(!s||Q(s,t,n,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:u}=s;e({type:i,id:r.getId(s),currentTime:a,volume:l,muted:c,playbackRate:u})}),o.media||500),s=[U("play",i(0)),U("pause",i(1)),U("seeked",i(2)),U("volumechange",i(3)),U("ratechange",i(4))];return()=>{s.forEach((e=>e()))}}(e),u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=function(r,i){const{id:s,styleId:a}=xe(this,t,n.styleMirror);return(s&&-1!==s||a&&-1!==a)&&e({id:s,styleId:a,adds:[{rule:r,index:i}]}),o.apply(this,[r,i])};const i=r.CSSStyleSheet.prototype.deleteRule;let s,a;r.CSSStyleSheet.prototype.deleteRule=function(r){const{id:o,styleId:s}=xe(this,t,n.styleMirror);return(o&&-1!==o||s&&-1!==s)&&e({id:o,styleId:s,removes:[{index:r}]}),i.apply(this,[r])},r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=function(r){const{id:o,styleId:i}=xe(this,t,n.styleMirror);return(o&&-1!==o||i&&-1!==i)&&e({id:o,styleId:i,replace:r}),s.apply(this,[r])}),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=function(r){const{id:o,styleId:i}=xe(this,t,n.styleMirror);return(o&&-1!==o||i&&-1!==i)&&e({id:o,styleId:i,replaceSync:r}),a.apply(this,[r])});const l={};fe?l.CSSGroupingRule=r.CSSGroupingRule:(Ie&&(l.CSSMediaRule=r.CSSMediaRule),ye&&(l.CSSConditionRule=r.CSSConditionRule),Ce&&(l.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(l).forEach((([r,o])=>{c[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=function(o,i){const{id:s,styleId:a}=xe(this.parentStyleSheet,t,n.styleMirror);return(s&&-1!==s||a&&-1!==a)&&e({id:s,styleId:a,adds:[{rule:o,index:[...Te(this),i||0]}]}),c[r].insertRule.apply(this,[o,i])},o.prototype.deleteRule=function(o){const{id:i,styleId:s}=xe(this.parentStyleSheet,t,n.styleMirror);return(i&&-1!==i||s&&-1!==s)&&e({id:i,styleId:s,removes:[{index:[...Te(this),o]}]}),c[r].deleteRule.apply(this,[o])}})),()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach((([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule}))}}(e,{win:n}),d=Ee(e,e.doc),h=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=function(o,s,a){var l;if(n.has(o))return i.apply(this,[o,s,a]);const{id:c,styleId:u}=xe(null===(l=this.parentRule)||void 0===l?void 0:l.parentStyleSheet,t,r.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,set:{property:o,value:s,priority:a},index:Te(this.parentRule)}),i.apply(this,[o,s,a])};const s=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=function(o){var i;if(n.has(o))return s.apply(this,[o]);const{id:a,styleId:l}=xe(null===(i=this.parentRule)||void 0===i?void 0:i.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,remove:{property:o},index:Te(this.parentRule)}),s.apply(this,[o])},()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=s}}(e,{win:n}),p=e.collectFonts?function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(e,t,n){const r=new i(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const s=P(t.fonts,"add",(function(t){return function(n){return setTimeout((()=>{const t=o.get(n);t&&(e(t),o.delete(n))}),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=i})),r.push(s),()=>{r.forEach((e=>e()))}}(e):()=>{},g=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:i}=e;let s=!0;const a=()=>{const e=t.getSelection();if(!e||s&&(null==e?void 0:e.isCollapsed))return;s=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:s,startOffset:l,endContainer:c,endOffset:u}=i;Q(s,r,o,!0)||Q(c,r,o,!0)||a.push({start:n.getId(s),startOffset:l,end:n.getId(c),endOffset:u})}i({ranges:a})};return a(),U("selectionchange",a)}(e),m=[];for(const t of e.plugins)m.push(t.observer(t.callback,n,t.options));return()=>{me.forEach((e=>e.reset())),r.disconnect(),o(),i(),s(),a(),l(),c(),u(),d(),h(),p(),g(),m.forEach((e=>e()))}}class Re{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),i=r||this.getRemoteIdToIdMap(e);let s=o.get(t);return s||(s=this.generateIdFn(),o.set(t,s),i.set(s,t)),s}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const o=r.get(t);return o||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Oe{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Re(k),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Re(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){if("rrweb"===e.data.type){if(!e.source)return;const t=this.crossOriginIframeMap.get(e.source);if(!t)return;const n=this.transformCrossOriginEvent(t,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}}transformCrossOriginEvent(e,t){var n;switch(t.type){case ne.FullSnapshot:return this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e),{timestamp:t.timestamp,type:ne.IncrementalSnapshot,data:{source:re.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case ne.Meta:case ne.Load:case ne.DomContentLoaded:return!1;case ne.Plugin:return t;case ne.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case ne.IncrementalSnapshot:switch(t.data.source){case re.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case re.Drag:case re.TouchMove:case re.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case re.ViewportResize:return!1;case re.MediaInteraction:case re.MouseInteraction:case re.Scroll:case re.CanvasMutation:case re.Input:return this.replaceIds(t.data,e,["id"]),t;case re.StyleSheetRule:case re.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case re.Font:return t;case re.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case re.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(n=t.data.styles)||void 0===n||n.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}}replace(e,t,n,r){for(const o of r)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}}class Fe{constructor(e){this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;const t=this;this.restorePatches.push(P(Element.prototype,"attachShadow",(function(e){return function(n){const r=e.call(this,n);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,this.ownerDocument),r}})))}addShadowRoot(e,t){p(e)&&(this.shadowDoms.has(e)||(this.shadowDoms.add(e),be(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),Ae(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),Ee({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)}),0)))}observeAttachShadow(e){if(e.contentWindow){const t=this;this.restorePatches.push(P(e.contentWindow.HTMLElement.prototype,"attachShadow",(function(n){return function(r){const o=n.call(this,r);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),o}})))}}reset(){this.restorePatches.forEach((e=>e())),this.shadowDoms=new WeakSet}}
|
|
6
|
+
*/!function(t){!function(e){if(e){var n={},r=e.TraceKit,o=[].slice,s="?",i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;n.noConflict=function(){return e.TraceKit=r,n},n.wrap=function(e){return function(){try{return e.apply(this,arguments)}catch(e){throw n.report(e),e}}},n.report=function(){var t,r,o,s,l=[],c=null,u=null;function d(e,t,r){var o=null;if(!t||n.collectWindowErrors){for(var s in l)if(a(l,s))try{l[s](e,t,r)}catch(e){o=e}if(o)throw o}}function h(e,r,o,s,a){if(u)n.computeStackTrace.augmentStackTraceWithInitialElement(u,r,o,e),m();else if(a)d(n.computeStackTrace(a),!0,a);else{var l,c={url:r,line:o,column:s},h=e;if("[object String]"==={}.toString.call(e)){var p=e.match(i);p&&(l=p[1],h=p[2])}c.func=n.computeStackTrace.guessFunctionName(c.url,c.line),c.context=n.computeStackTrace.gatherContext(c.url,c.line),d({name:l,message:h,mode:"onerror",stack:[c]},!0,null)}return!!t&&t.apply(this,arguments)}function p(e){d(n.computeStackTrace(e.reason),!0,e.reason)}function m(){var e=u,t=c;u=null,c=null,d(e,!1,t)}function g(e){if(u){if(c===e)return;m()}var t=n.computeStackTrace(e);throw u=t,c=e,setTimeout((function(){c===e&&m()}),t.incomplete?2e3:0),e}return g.subscribe=function(n){!function(){if(!0===r)return;t=e.onerror,e.onerror=h,r=!0}(),function(){if(!0===s)return;o=e.onunhandledrejection,e.onunhandledrejection=p,s=!0}(),l.push(n)},g.unsubscribe=function(n){for(var i=l.length-1;i>=0;--i)l[i]===n&&l.splice(i,1);0===l.length&&(r&&(e.onerror=t,r=!1),s&&(e.onunhandledrejection=o,s=!1))},g}(),n.computeStackTrace=function(){var t={};function r(r){if("string"!=typeof r)return[];if(!a(t,r)){var o="",s="";try{s=e.document.domain}catch(e){}var i=/(.*)\:\/\/([^:\/]+)([:\d]*)\/{0,1}([\s\S]*)/.exec(r);i&&i[2]===s&&(o=function(t){if(!n.remoteFetching)return"";try{var r=function(){try{return new e.XMLHttpRequest}catch(t){return new e.ActiveXObject("Microsoft.XMLHTTP")}}();return r.open("GET",t,!1),r.send(""),r.responseText}catch(e){return""}}(r)),t[r]=o?o.split("\n"):[]}return t[r]}function o(e,t){var n,o=/function ([^(]*)\(([^)]*)\)/,i=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,a="",c=r(e);if(!c.length)return s;for(var u=0;u<10;++u)if(!l(a=c[t-u]+a)){if(n=i.exec(a))return n[1];if(n=o.exec(a))return n[1]}return s}function i(e,t){var o=r(e);if(!o.length)return null;var s=[],i=Math.floor(n.linesOfContext/2),a=i+n.linesOfContext%2,c=Math.max(0,t-i-1),u=Math.min(o.length,t+a-1);t-=1;for(var d=c;d<u;++d)l(o[d])||s.push(o[d]);return s.length>0?s:null}function c(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function u(e){return c(e).replace("<","(?:<|<)").replace(">","(?:>|>)").replace("&","(?:&|&)").replace('"','(?:"|")').replace(/\s+/g,"\\s+")}function d(e,t){for(var n,o,s=0,i=t.length;s<i;++s)if((n=r(t[s])).length&&(n=n.join("\n"),o=e.exec(n)))return{url:t[s],line:n.substring(0,o.index).split("\n").length,column:o.index-n.lastIndexOf("\n",o.index)-1};return null}function h(e,t,n){var o,s=r(t),i=new RegExp("\\b"+c(e)+"\\b");return n-=1,s&&s.length>n&&(o=i.exec(s[n]))?o.index:null}function p(t){if(!l(e&&e.document)){for(var n,r,o,s,i=[e.location.href],a=e.document.getElementsByTagName("script"),h=""+t,p=0;p<a.length;++p){var m=a[p];m.src&&i.push(m.src)}if(o=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/.exec(h)){var g=o[1]?"\\s+"+o[1]:"",f=o[2].split(",").join("\\s*,\\s*");n=c(o[3]).replace(/;$/,";?"),r=new RegExp("function"+g+"\\s*\\(\\s*"+f+"\\s*\\)\\s*{\\s*"+n+"\\s*}")}else r=new RegExp(c(h).replace(/\s+/g,"\\s+"));if(s=d(r,i))return s;if(o=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/.exec(h)){var I=o[1];if(n=u(o[2]),s=d(r=new RegExp("on"+I+"=[\\'\"]\\s*"+n+"\\s*[\\'\"]","i"),i[0]))return s;if(s=d(r=new RegExp(n),i))return s}return null}}function m(e){if(!e.stack)return null;for(var t,n,r,a=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,c=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,u=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,d=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,p=/\((\S*)(?::(\d+))(?::(\d+))\)/,m=e.stack.split("\n"),g=[],f=/^(.*) is undefined$/.exec(e.message),I=0,C=m.length;I<C;++I){if(n=a.exec(m[I])){var y=n[2]&&0===n[2].indexOf("native");n[2]&&0===n[2].indexOf("eval")&&(t=p.exec(n[2]))&&(n[2]=t[1],n[3]=t[2],n[4]=t[3]),r={url:y?null:n[2],func:n[1]||s,args:y?[n[2]]:[],line:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}else if(n=u.exec(m[I]))r={url:n[2],func:n[1]||s,args:[],line:+n[3],column:n[4]?+n[4]:null};else{if(!(n=c.exec(m[I])))continue;n[3]&&n[3].indexOf(" > eval")>-1&&(t=d.exec(n[3]))?(n[3]=t[1],n[4]=t[2],n[5]=null):0!==I||n[5]||l(e.columnNumber)||(g[0].column=e.columnNumber+1),r={url:n[3],func:n[1]||s,args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}!r.func&&r.line&&(r.func=o(r.url,r.line)),r.context=r.line?i(r.url,r.line):null,g.push(r)}return g.length?(g[0]&&g[0].line&&!g[0].column&&f&&(g[0].column=h(f[1],g[0].url,g[0].line)),{mode:"stack",name:e.name,message:e.message,stack:g}):null}function g(e,t,n,r){var s={url:t,line:n};if(s.url&&s.line){e.incomplete=!1,s.func||(s.func=o(s.url,s.line)),s.context||(s.context=i(s.url,s.line));var a=/ '([^']+)' /.exec(r);if(a&&(s.column=h(a[1],s.url,s.line)),e.stack.length>0&&e.stack[0].url===s.url){if(e.stack[0].line===s.line)return!1;if(!e.stack[0].line&&e.stack[0].func===s.func)return e.stack[0].line=s.line,e.stack[0].context=s.context,!1}return e.stack.unshift(s),e.partial=!0,!0}return e.incomplete=!0,!1}function f(e,t){for(var r,i,a,l=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,c=[],u={},d=!1,m=f.caller;m&&!d;m=m.caller)if(m!==I&&m!==n.report){if(i={url:null,func:s,args:[],line:null,column:null},m.name?i.func=m.name:(r=l.exec(m.toString()))&&(i.func=r[1]),void 0===i.func)try{i.func=r.input.substring(0,r.input.indexOf("{"))}catch(e){}if(a=p(m)){i.url=a.url,i.line=a.line,i.func===s&&(i.func=o(i.url,i.line));var C=/ '([^']+)' /.exec(e.message||e.description);C&&(i.column=h(C[1],a.url,a.line))}u[""+m]?d=!0:u[""+m]=!0,c.push(i)}t&&c.splice(0,t);var y={mode:"callers",name:e.name,message:e.message,stack:c};return g(y,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),y}function I(t,n){var s=null;n=null==n?0:+n;try{if(s=function(e){var t=e.stacktrace;if(t){for(var n,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,s=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,a=t.split("\n"),l=[],c=0;c<a.length;c+=2){var u=null;if((n=r.exec(a[c]))?u={url:n[2],line:+n[1],column:null,func:n[3],args:[]}:(n=s.exec(a[c]))&&(u={url:n[6],line:+n[1],column:+n[2],func:n[3]||n[4],args:n[5]?n[5].split(","):[]}),u){if(!u.func&&u.line&&(u.func=o(u.url,u.line)),u.line)try{u.context=i(u.url,u.line)}catch(e){}u.context||(u.context=[a[c+1]]),l.push(u)}}return l.length?{mode:"stacktrace",name:e.name,message:e.message,stack:l}:null}}(t),s)return s}catch(e){}try{if(s=m(t))return s}catch(e){}try{if(s=function(t){var n=t.message.split("\n");if(n.length<4)return null;var s,l=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,c=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,h=/^\s*Line (\d+) of function script\s*$/i,p=[],m=e&&e.document&&e.document.getElementsByTagName("script"),g=[];for(var f in m)a(m,f)&&!m[f].src&&g.push(m[f]);for(var I=2;I<n.length;I+=2){var C=null;if(s=l.exec(n[I]))C={url:s[2],func:s[3],args:[],line:+s[1],column:null};else if(s=c.exec(n[I])){C={url:s[3],func:s[4],args:[],line:+s[1],column:null};var y=+s[1],v=g[s[2]-1];if(v){var b=r(C.url);if(b){var S=(b=b.join("\n")).indexOf(v.innerText);S>=0&&(C.line=y+b.substring(0,S).split("\n").length)}}}else if(s=h.exec(n[I])){var A=e.location.href.replace(/#.*$/,""),k=d(new RegExp(u(n[I+1])),[A]);C={url:A,func:"",args:[],line:k?k.line:s[1],column:null}}if(C){C.func||(C.func=o(C.url,C.line));var w=i(C.url,C.line),M=w?w[Math.floor(w.length/2)]:null;w&&M.replace(/^\s*/,"")===n[I+1].replace(/^\s*/,"")?C.context=w:C.context=[n[I+1]],p.push(C)}}return p.length?{mode:"multiline",name:t.name,message:n[0],stack:p}:null}(t),s)return s}catch(e){}try{if(s=f(t,n+1))return s}catch(e){}return{name:t.name,message:t.message,mode:"failed"}}return I.augmentStackTraceWithInitialElement=g,I.computeStackTraceFromStackProp=m,I.guessFunctionName=o,I.gatherContext=i,I.ofCaller=function(e){e=1+(null==e?0:+e);try{throw new Error}catch(t){return I(t,e+1)}},I.getSource=r,I}(),n.extendToAsynchronousCallbacks=function(){var t=function(t){var r=e[t];e[t]=function(){var e=o.call(arguments),t=e[0];return"function"==typeof t&&(e[0]=n.wrap(t)),r.apply?r.apply(this,e):r(e[0],e[1])}};t("setTimeout"),t("setInterval")},n.remoteFetching||(n.remoteFetching=!0),n.collectWindowErrors||(n.collectWindowErrors=!0),(!n.linesOfContext||n.linesOfContext<1)&&(n.linesOfContext=11),t.exports&&e.module!==t?t.exports=n:e.TraceKit=n}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){return void 0===e}}("undefined"!=typeof window?window:e)}(n);var r=n.exports,o=t(r);function s(e){try{return e.target}catch(e){return}}function i(e){return"object"==typeof e&&null!=e&&e.parentNode}function a(e){if(!e.tagName)return"";const t=[];t.push(e.tagName.toLowerCase()),e.id&&t.push(`#${e.id}`);const n=function(e){if("string"!=typeof e.className)return;let t=e.className;return e.className.includes(" ")&&(t=e.className.replace(" ",".")),""!==t?`.${t}`:void 0}(e);return n&&t.push(n),t.join("")}function l(e,t={maxDepth:10}){const n=[];let r=e;for(;i(r)&&r.parentNode&&n.length<t.maxDepth;){const e=a(r);if("html"===e)break;n.push(e),r=r.parentNode}return n.reverse().join(" > ")}class c{constructor(){window.addEventListener("click",(e=>{var t;const n=s(e);if(n){const e={class:"ui",type:"click",level:"info",timestamp:Date.now(),message:l(n)};null===(t=this.destination)||void 0===t||t.addBreadcrumb(e)}}),!0)}register(e,t){this.destination=e}unregister(){this.destination=void 0}}const u=["INPUT","TEXTAREA"];class d{constructor(){window.addEventListener("keypress",(e=>{var t;const n=s(e),r=n;if(n&&(u.includes(n.tagName)||(null==r?void 0:r.isContentEditable))){const e={class:"ui",type:"input",level:"info",timestamp:Date.now(),message:l(n)};this.shouldDeduplicate(e)||(null===(t=this.destination)||void 0===t||t.addBreadcrumb(e),this.lastEvent=e)}}),!0)}register(e,t){this.destination=e}unregister(){this.destination=void 0}shouldDeduplicate(e){if(this.lastEvent){const t=Math.abs(e.timestamp-this.lastEvent.timestamp);return this.lastEvent.message===e.message&&t<=1e3}return!1}}class h{constructor(){window.addEventListener("error",(e=>{var t;null===(t=this.destination)||void 0===t||t.captureErrorEvent(e)}),!0),window.addEventListener("unhandledrejection",(e=>{var t;e.reason&&(null===(t=this.destination)||void 0===t||t.captureError(e.reason))}),!0)}register(e){this.destination=e}unregister(){this.destination=void 0}}function p(e,t){var n,r,o;(null===(n=e.data)||void 0===n?void 0:n.url)&&(e.data.url=(r=t.urlFilters,(o=e.data.url)?r.reduce(((e,t)=>t(e)),o):""))}const m=window.fetch;function g(e,t){var n;let r="",o="GET";return"string"==typeof e&&(r=e),e instanceof Request&&(r=e.url),e instanceof URL&&(r=e.toString()),t&&(o=null!==(n=t.method)&&void 0!==n?n:o),{url:r,method:o}}class f{constructor(e){!function(e){function t(...t){const n=Date.now();return m.apply(this,t).then((r=>{const o={class:"http",timestamp:n,level:r.ok?"info":"error",type:"fetch",data:Object.assign(Object.assign({},g(t[0],t[1])),{statusCode:r.status,statusText:r.statusText})};return e(o),r}))}t.prototype=m.prototype;try{Object.defineProperty(t,"__LaunchDarkly_original_fetch",{value:m,writable:!0,configurable:!0})}catch(e){}window.fetch=t}((t=>{var n;p(t,e),null===(n=this.destination)||void 0===n||n.addBreadcrumb(t)}))}register(e,t){this.destination=e}unregister(){this.destination=void 0}}const I="__LaunchDarkly_original_xhr",C=`${I}_open`,y=`${I}_send`,v="__LaunchDarkly_data_xhr",b=window.XMLHttpRequest.prototype.open,S=window.XMLHttpRequest.prototype.send;class A{constructor(e){!function(e){window.XMLHttpRequest.prototype.open=function(...t){this.addEventListener("error",(function(e){this[v].error=!0})),this.addEventListener("loadend",(function(t){const n=this[v];n&&n.timestamp&&e({class:"http",timestamp:n.timestamp,level:n.error?"error":"info",type:"xhr",data:{url:n.url,method:n.method,statusCode:this.status,statusText:this.statusText}})}),!0),b.apply(this,t);try{const e={method:null==t?void 0:t[0],url:null==t?void 0:t[1]};Object.defineProperty(this,v,{value:e,writable:!0,configurable:!0})}catch(e){}},window.XMLHttpRequest.prototype.send=function(...e){S.apply(this,e);const t=this[v];t&&(t.timestamp=Date.now())};try{Object.defineProperties(window.XMLHttpRequest,{[C]:{value:b,writable:!0,configurable:!0},[y]:{value:S,writable:!0,configurable:!0}})}catch(e){}}((t=>{var n;p(t,e),null===(n=this.destination)||void 0===n||n.addBreadcrumb(t)}))}register(e,t){this.destination=e}unregister(){this.destination=void 0}}const k=/sdk\/evalx\/[^/]+\/contexts\/(?<context>[^/?]*)\??.*?/,w=/\/eval\/[^/]+\/(?<context>[^/?]*)\??.*?/;function M(e){var t,n;if(e.includes("/sdk/evalx")){const n=e.match(k),r=null===(t=null==n?void 0:n.groups)||void 0===t?void 0:t.context;if(r)return e.replace(r,"*".repeat(r.length))}if(e.includes("/eval/")){const t=e.match(w),r=null===(n=null==t?void 0:t.groups)||void 0===n?void 0:n.context;if(r)return e.replace(r,"*".repeat(r.length))}return e}const x={start:0,end:3},T={start:4,end:5},E={start:6,end:7},N={start:8,end:8},R={start:9,end:9},F={start:10,end:15};function O(e,t){let n="";for(let r=t.start;r<=t.end;r+=1)n+=e[r].toString(16).padStart(2,"0");return n}function L(){return function(e){return e[N.start]=191&e[N.start]|128,e[E.start]=15&e[E.start]|64,`${O(e,x)}-${O(e,T)}-${O(e,E)}-${O(e,N)}${O(e,R)}-${O(e,F)}`}(function(){if(crypto&&crypto.getRandomValues){const e=new Uint8Array(16);return crypto.getRandomValues(e),[...e.values()]}const e=[];for(let t=0;t<16;t+=1)e.push(Math.floor(256*Math.random()));return e}())}const D="(index)";function B(e,t){let n=e;return e.startsWith(t)&&(n=e.slice(t.length),n.startsWith("/")&&(n=n.slice(1)),""===n&&(n=D),n.endsWith("/")&&(n+=D)),n}function W(e,t,n){if(t.length<=e.maxLength)return t;const r=Math.max(0,n-e.beforeColumnCharacters),o=Math.min(t.length,r+e.maxLength);return t.slice(r,o)}function U(e,t,n,r){const o=e<0?0:e,s=t>n.length?n.length:t;return o<s?n.slice(o,s).map(r):[]}function Z(e,t){const n=r.computeStackTrace(e).stack.reverse().map((e=>Object.assign({fileName:B(e.url,window.location.origin),function:e.func,line:e.line,col:e.column},function(e,t){const{context:n}=e;if(!n)return{};const{maxLineLength:r}=t.source,o=Math.floor(r/2),s=e=>W({maxLength:t.source.maxLineLength,beforeColumnCharacters:o},e,0),i=Math.floor(n.length/2);return{srcBefore:U(i-t.source.beforeLines,i,n,s),srcLine:W({maxLength:r,beforeColumnCharacters:o},n[i],e.column||0),srcAfter:U(i+1,i+1+t.source.afterLines,n,s)}}(e,t))));return{frames:n}}const G="$ld:telemetry",V=`${G}:error`,K=`${G}:sessionCapture`;function _(e){switch(typeof e){case"string":case"boolean":case"number":return e;default:return}}class P{constructor(e){this.options=e,this.pendingEvents=[],this.breadcrumbs=[],this.inspectorInstances=[],this.collectors=[],this.sessionId=void 0!==typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():L(),function(e){const t=Math.max(e.source.afterLines,e.source.beforeLines);o.linesOfContext=2*t+1}(e.stack),this.collectors.push(new h),this.collectors.push(...e.collectors),this.maxPendingEvents=e.maxPendingEvents,this.maxBreadcrumbs=e.breadcrumbs.maxBreadcrumbs;const t=[M];e.breadcrumbs.http.customUrlFilter&&t.push(e.breadcrumbs.http.customUrlFilter),e.breadcrumbs.http.instrumentFetch&&this.collectors.push(new f({urlFilters:t})),e.breadcrumbs.http.instrumentXhr&&this.collectors.push(new A({urlFilters:t})),e.breadcrumbs.click&&this.collectors.push(new c),e.breadcrumbs.keyboardInput&&this.collectors.push(new d),this.collectors.forEach((e=>e.register(this,this.sessionId)));const n=[];!function(e,t,n){e.breadcrumbs.evaluations&&t.push({type:"flag-used",name:"launchdarkly-browser-telemetry-flag-used",synchronous:!0,method(e,t,r){n.handleFlagUsed(e,t,r)}}),e.breadcrumbs.flagChange&&t.push({type:"flag-detail-changed",name:"launchdarkly-browser-telemetry-flag-used",synchronous:!0,method(e,t){n.handleFlagDetailChanged(e,t)}})}(e,n,this),this.inspectorInstances.push(...n)}register(e){this.client=e,this.pendingEvents.forEach((e=>{var t;null===(t=this.client)||void 0===t||t.track(e.type,e.data)}))}inspectors(){return this.inspectorInstances}capture(e,t){var n;void 0===this.client&&(this.pendingEvents.push({type:e,data:t}),this.pendingEvents.length>this.maxPendingEvents&&this.pendingEvents.shift()),null===(n=this.client)||void 0===n||n.track(e,t)}captureError(e){const t={type:e.name||e.constructor.name||"generic",message:e.message,stack:Z(e,this.options.stack),breadcrumbs:[...this.breadcrumbs],sessionId:this.sessionId};this.capture(V,t),this.dispatchError(e)}captureErrorEvent(e){this.captureError(e.error)}captureSession(e){this.capture(K,Object.assign(Object.assign({},e),{breadcrumbs:[...this.breadcrumbs]}))}addBreadcrumb(e){this.breadcrumbs.push(e),this.breadcrumbs.length>this.maxBreadcrumbs&&this.breadcrumbs.shift()}close(){this.collectors.forEach((e=>e.unregister()))}handleFlagUsed(e,t,n){const r={type:"flag-evaluated",data:{key:e,value:_(t.value)},timestamp:(new Date).getTime(),class:"feature-management",level:"info"};this.addBreadcrumb(r),this.dispatchFlagUsed(e,t,n)}handleFlagDetailChanged(e,t){const n={type:"flag-detail-changed",data:{key:e,value:_(t.value)},timestamp:(new Date).getTime(),class:"feature-management",level:"info"};this.addBreadcrumb(n),this.dispatchFlagDetailChanged(e,t)}dispatchError(e){this.collectors.forEach((t=>{var n;null===(n=t.handleErrorEvent)||void 0===n||n.call(t,e.name,e.message)}))}dispatchFlagUsed(e,t,n){this.collectors.forEach((r=>{var o;null===(o=r.handleFlagUsed)||void 0===o||o.call(r,e,t,n)}))}dispatchFlagDetailChanged(e,t){this.collectors.forEach((n=>{var r;null===(r=n.handleFlagDetailChanged)||void 0===r||r.call(n,e,t)}))}}var Y;function z(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function j(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function J(e){try{var t=e.rules||e.cssRules;return t?((n=Array.from(t).map(H).join("")).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),n):null}catch(e){return null}var n}function H(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=J(e.styleSheet)||t}catch(e){}return t}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(Y||(Y={}));var Q=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=n?n:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function X(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,s=e.maskInputFn,i=o||"";return(t[n.toLowerCase()]||t[r])&&(i=s?s(i):"*".repeat(i.length)),i}var q="__rrweb_original__";var $,ee,te=1,ne=new RegExp("[^a-z0-9-_:]"),re=-2;function oe(){return te++}var se=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ie=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,ae=/^(data:)([^,]*),(.*)/i;function le(e,t){return(e||"").replace(se,(function(e,n,r,o,s,i){var a,l=r||s||i,c=n||o||"";if(!l)return e;if(!ie.test(l))return"url(".concat(c).concat(l).concat(c,")");if(ae.test(l))return"url(".concat(c).concat(l).concat(c,")");if("/"===l[0])return"url(".concat(c).concat((a=t,(a.indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+l)).concat(c,")");var u=t.split("/"),d=l.split("/");u.pop();for(var h=0,p=d;h<p.length;h++){var m=p[h];"."!==m&&(".."===m?u.pop():u.push(m))}return"url(".concat(c).concat(u.join("/")).concat(c,")")}))}var ce=/^[^ \t\n\r\u000c]+/,ue=/^[, \t\n\r\u000c]+/;function de(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function he(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function pe(){var e=document.createElement("a");return e.href="",e.href}function me(e,t,n,r){return"src"===n||"href"===n&&r&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&r&&"#"!==r[0]?de(e,r):"background"!==n||!r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n&&r?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}for(var o=[];r(ue),!(n>=t.length);){var s=r(ce);if(","===s.slice(-1))s=de(e,s.substring(0,s.length-1)),o.push(s);else{var i="";s=de(e,s);for(var a=!1;;){var l=t.charAt(n);if(""===l){o.push((s+i).trim());break}if(a)")"===l&&(a=!1);else{if(","===l){n+=1,o.push((s+i).trim());break}"("===l&&(a=!0)}i+=l,n+=1}}}return o.join(", ")}(e,r):"style"===n&&r?le(r,pe()):"object"===t&&"data"===n&&r?de(e,r):r:de(e,r)}function ge(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&ge(e.parentNode,t,n);for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return!!n&&ge(e.parentNode,t,n)}function fe(e,t,n){var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===r)return!1;if("string"==typeof t){if(r.classList.contains(t))return!0;if(r.closest(".".concat(t)))return!0}else if(ge(r,t,!0))return!0;if(n){if(r.matches(n))return!0;if(r.closest(n))return!0}return!1}function Ie(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,s=t.blockSelector,i=t.maskTextClass,a=t.maskTextSelector,l=t.inlineStylesheet,c=t.maskInputOptions,u=void 0===c?{}:c,d=t.maskTextFn,h=t.maskInputFn,p=t.dataURLOptions,m=void 0===p?{}:p,g=t.inlineImages,f=t.recordCanvas,I=t.keepIframeSrcFn,C=t.newlyAddedElement,y=void 0!==C&&C,v=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Y.Document,childNodes:[],compatMode:e.compatMode}:{type:Y.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Y.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return function(e,t){for(var n=t.doc,r=t.blockClass,o=t.blockSelector,s=t.inlineStylesheet,i=t.maskInputOptions,a=void 0===i?{}:i,l=t.maskInputFn,c=t.dataURLOptions,u=void 0===c?{}:c,d=t.inlineImages,h=t.recordCanvas,p=t.keepIframeSrcFn,m=t.newlyAddedElement,g=void 0!==m&&m,f=t.rootId,I=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return!!n&&e.matches(n)}(e,r,o),C=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return ne.test(t)?"div":t}(e),y={},v=e.attributes.length,b=0;b<v;b++){var S=e.attributes[b];y[S.name]=me(n,C,S.name,S.value)}if("link"===C&&s){var A=Array.from(n.styleSheets).find((function(t){return t.href===e.href})),k=null;A&&(k=J(A)),k&&(delete y.rel,delete y.href,y._cssText=le(k,A.href))}if("style"===C&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){(k=J(e.sheet))&&(y._cssText=le(k,pe()))}if("input"===C||"textarea"===C||"select"===C){var w=e.value,M=e.checked;"radio"!==y.type&&"checkbox"!==y.type&&"submit"!==y.type&&"button"!==y.type&&w?y.value=X({type:y.type,tagName:C,value:w,maskInputOptions:a,maskInputFn:l}):M&&(y.checked=M)}"option"===C&&(e.selected&&!a.select?y.selected=!0:delete y.selected);if("canvas"===C&&h)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var o=t.getImageData,s=q in o?o[q]:o;if(new Uint32Array(s.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(e)||(y.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){var x=e.toDataURL(u.type,u.quality),T=document.createElement("canvas");T.width=e.width,T.height=e.height,x!==T.toDataURL(u.type,u.quality)&&(y.rr_dataURL=x)}if("img"===C&&d){$||($=n.createElement("canvas"),ee=$.getContext("2d"));var E=e,N=E.crossOrigin;E.crossOrigin="anonymous";var R=function(){try{$.width=E.naturalWidth,$.height=E.naturalHeight,ee.drawImage(E,0,0),y.rr_dataURL=$.toDataURL(u.type,u.quality)}catch(e){console.warn("Cannot inline img src=".concat(E.currentSrc,"! Error: ").concat(e))}N?y.crossOrigin=N:E.removeAttribute("crossorigin")};E.complete&&0!==E.naturalWidth?R():E.onload=R}"audio"!==C&&"video"!==C||(y.rr_mediaState=e.paused?"paused":"played",y.rr_mediaCurrentTime=e.currentTime);g||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop));if(I){var F=e.getBoundingClientRect(),O=F.width,L=F.height;y={class:y.class,rr_width:"".concat(O,"px"),rr_height:"".concat(L,"px")}}"iframe"!==C||p(y.src)||(e.contentDocument||(y.rr_src=y.src),delete y.src);return{type:Y.Element,tagName:C,attributes:y,childNodes:[],isSVG:he(e)||void 0,needBlock:I,rootId:f}}(e,{doc:n,blockClass:o,blockSelector:s,inlineStylesheet:l,maskInputOptions:u,maskInputFn:h,dataURLOptions:m,inlineImages:g,recordCanvas:f,keepIframeSrcFn:I,newlyAddedElement:y,rootId:v});case e.TEXT_NODE:return function(e,t){var n,r=t.maskTextClass,o=t.maskTextSelector,s=t.maskTextFn,i=t.rootId,a=e.parentNode&&e.parentNode.tagName,l=e.textContent,c="STYLE"===a||void 0,u="SCRIPT"===a||void 0;if(c&&l){try{e.nextSibling||e.previousSibling||(null===(n=e.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(l=(d=e.parentNode.sheet).cssRules?Array.from(d.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(t),e)}l=le(l,pe())}var d;u&&(l="SCRIPT_PLACEHOLDER");!c&&!u&&l&&fe(e,r,o)&&(l=s?s(l):l.replace(/[\S]/g,"*"));return{type:Y.Text,textContent:l||"",isStyle:c,rootId:i}}(e,{maskTextClass:i,maskTextSelector:a,maskTextFn:d,rootId:v});case e.CDATA_SECTION_NODE:return{type:Y.CDATA,textContent:"",rootId:v};case e.COMMENT_NODE:return{type:Y.Comment,textContent:e.textContent||"",rootId:v};default:return!1}}function Ce(e){return void 0===e?"":e.toLowerCase()}function ye(e,t){var n,r=t.doc,o=t.mirror,s=t.blockClass,i=t.blockSelector,a=t.maskTextClass,l=t.maskTextSelector,c=t.skipChild,u=void 0!==c&&c,d=t.inlineStylesheet,h=void 0===d||d,p=t.maskInputOptions,m=void 0===p?{}:p,g=t.maskTextFn,f=t.maskInputFn,I=t.slimDOMOptions,C=t.dataURLOptions,y=void 0===C?{}:C,v=t.inlineImages,b=void 0!==v&&v,S=t.recordCanvas,A=void 0!==S&&S,k=t.onSerialize,w=t.onIframeLoad,M=t.iframeLoadTimeout,x=void 0===M?5e3:M,T=t.onStylesheetLoad,E=t.stylesheetLoadTimeout,N=void 0===E?5e3:E,R=t.keepIframeSrcFn,F=void 0===R?function(){return!1}:R,O=t.newlyAddedElement,L=void 0!==O&&O,D=t.preserveWhiteSpace,B=void 0===D||D,W=Ie(e,{doc:r,mirror:o,blockClass:s,blockSelector:i,maskTextClass:a,maskTextSelector:l,inlineStylesheet:h,maskInputOptions:m,maskTextFn:g,maskInputFn:f,dataURLOptions:y,inlineImages:b,recordCanvas:A,keepIframeSrcFn:F,newlyAddedElement:L});if(!W)return console.warn(e,"not serialized"),null;n=o.hasNode(e)?o.getId(e):!function(e,t){if(t.comment&&e.type===Y.Comment)return!0;if(e.type===Y.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Ce(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Ce(e.attributes.name)||"icon"===Ce(e.attributes.rel)||"apple-touch-icon"===Ce(e.attributes.rel)||"shortcut icon"===Ce(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Ce(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Ce(e.attributes.property).match(/^(og|twitter|fb):/)||Ce(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Ce(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Ce(e.attributes.name)||"googlebot"===Ce(e.attributes.name)||"bingbot"===Ce(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Ce(e.attributes.name)||"generator"===Ce(e.attributes.name)||"framework"===Ce(e.attributes.name)||"publisher"===Ce(e.attributes.name)||"progid"===Ce(e.attributes.name)||Ce(e.attributes.property).match(/^article:/)||Ce(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Ce(e.attributes.name)||"yandex-verification"===Ce(e.attributes.name)||"csrf-token"===Ce(e.attributes.name)||"p:domain_verify"===Ce(e.attributes.name)||"verify-v1"===Ce(e.attributes.name)||"verification"===Ce(e.attributes.name)||"shopify-checkout-api-token"===Ce(e.attributes.name)))return!0}}return!1}(W,I)&&(B||W.type!==Y.Text||W.isStyle||W.textContent.replace(/^\s+|\s+$/gm,"").length)?oe():re;var U=Object.assign(W,{id:n});if(o.add(e,U),n===re)return null;k&&k(e);var Z=!u;if(U.type===Y.Element){Z=Z&&!U.needBlock,delete U.needBlock;var G=e.shadowRoot;G&&j(G)&&(U.isShadowHost=!0)}if((U.type===Y.Document||U.type===Y.Element)&&Z){I.headWhitespace&&U.type===Y.Element&&"head"===U.tagName&&(B=!1);for(var V={doc:r,mirror:o,blockClass:s,blockSelector:i,maskTextClass:a,maskTextSelector:l,skipChild:u,inlineStylesheet:h,maskInputOptions:m,maskTextFn:g,maskInputFn:f,slimDOMOptions:I,dataURLOptions:y,inlineImages:b,recordCanvas:A,preserveWhiteSpace:B,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:x,onStylesheetLoad:T,stylesheetLoadTimeout:N,keepIframeSrcFn:F},K=0,_=Array.from(e.childNodes);K<_.length;K++){(H=ye(_[K],V))&&U.childNodes.push(H)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(var P=0,J=Array.from(e.shadowRoot.childNodes);P<J.length;P++){var H;(H=ye(J[P],V))&&(j(e.shadowRoot)&&(H.isShadow=!0),U.childNodes.push(H))}}return e.parentNode&&z(e.parentNode)&&j(e.parentNode)&&(U.isShadow=!0),U.type===Y.Element&&"iframe"===U.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var o,s=!1;try{o=r.document.readyState}catch(e){return}if("complete"===o){var i="about:blank";if(r.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var a=setTimeout((function(){s||(t(),s=!0)}),n);e.addEventListener("load",(function(){clearTimeout(a),s=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&w){var n=ye(t,{doc:t,mirror:o,blockClass:s,blockSelector:i,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskTextFn:g,maskInputFn:f,slimDOMOptions:I,dataURLOptions:y,inlineImages:b,recordCanvas:A,preserveWhiteSpace:B,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:x,onStylesheetLoad:T,stylesheetLoadTimeout:N,keepIframeSrcFn:F});n&&w(e,n)}}),x),U.type===Y.Element&&"link"===U.tagName&&"stylesheet"===U.attributes.rel&&function(e,t,n){var r,o=!1;try{r=e.sheet}catch(e){return}if(!r){var s=setTimeout((function(){o||(t(),o=!0)}),n);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}(e,(function(){if(T){var t=ye(e,{doc:r,mirror:o,blockClass:s,blockSelector:i,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskTextFn:g,maskInputFn:f,slimDOMOptions:I,dataURLOptions:y,inlineImages:b,recordCanvas:A,preserveWhiteSpace:B,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:x,onStylesheetLoad:T,stylesheetLoadTimeout:N,keepIframeSrcFn:F});t&&T(e,t)}}),N),U}function ve(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const be="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let Se={map:{},getId:()=>(console.error(be),-1),getNode:()=>(console.error(be),null),removeNodeFromMap(){console.error(be)},has:()=>(console.error(be),!1),reset(){console.error(be)}};function Ae(e,t,n={}){let r=null,o=0;return function(...s){const i=Date.now();o||!1!==n.leading||(o=i);const a=t-(i-o),l=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),o=i,e.apply(l,s)):r||!1===n.trailing||(r=setTimeout((()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(l,s)}),a))}}function ke(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),s&&s.set&&s.set.call(this,e)}}),()=>ke(e,t,s||{},!0)}function we(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch(e){return()=>{}}}function Me(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function xe(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Te(e,t,n,r){if(!e)return!1;const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!o)return!1;if("string"==typeof t){if(o.classList.contains(t))return!0;if(r&&null!==o.closest("."+t))return!0}else if(ge(o,t,r))return!0;if(n){if(e.matches(n))return!0;if(r&&null!==o.closest(n))return!0}return!1}function Ee(e,t){return t.getId(e)===re}function Ne(e,t){if(z(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||Ne(e.parentNode,t))}function Re(e){return Boolean(e.changedTouches)}function Fe(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Oe(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Le(e){return Boolean(null==e?void 0:e.shadowRoot)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Se=new Proxy(Se,{get:(e,t,n)=>("map"===t&&console.error(be),Reflect.get(e,t,n))}));class De{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}var Be=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Be||{}),We=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e))(We||{}),Ue=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Ue||{}),Ze=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ze||{});function Ge(e){return"__ln"in e}class Ve{constructor(){this.length=0,this.head=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Ge(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&Ge(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}const Ke=(e,t)=>`${e}@${t}`;class _e{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Ve,n=e=>{let t=e,n=re;for(;n===re;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},r=r=>{var o,s,i,a;let l=null;(null===(s=null===(o=r.getRootNode)||void 0===o?void 0:o.call(r))||void 0===s?void 0:s.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&r.getRootNode().host&&(l=r.getRootNode().host);let c=l;for(;(null===(a=null===(i=null==c?void 0:c.getRootNode)||void 0===i?void 0:i.call(c))||void 0===a?void 0:a.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&c.getRootNode().host;)c=c.getRootNode().host;const u=!(this.doc.contains(r)||c&&this.doc.contains(c));if(!r.parentNode||u)return;const d=z(r.parentNode)?this.mirror.getId(l):this.mirror.getId(r.parentNode),h=n(r);if(-1===d||-1===h)return t.addNode(r);const p=ye(r,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Fe(e,this.mirror)&&this.iframeManager.addIframe(e),Oe(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Le(r)&&this.shadowDomManager.addShadowRoot(r.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});p&&e.push({parentId:d,nextId:h,node:p})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of Array.from(this.movedSet.values()))Ye(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||r(e);for(const e of Array.from(this.addedSet.values()))je(this.droppedSet,e)||Ye(this.removes,e,this.mirror)?je(this.movedSet,e)?r(e):this.droppedSet.add(e):r(e);let o=null;for(;t.length;){let e=null;if(o){const t=this.mirror.getId(o.value.parentNode),r=n(o.value);-1!==t&&-1!==r&&(e=o)}if(!e)for(let r=t.length-1;r>=0;r--){const o=t.get(r);if(o){const t=this.mirror.getId(o.value.parentNode);if(-1===n(o.value))continue;if(-1!==t){e=o;break}{const t=o.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const n=t.parentNode.host;if(-1!==this.mirror.getId(n)){e=o;break}}}}}if(!e){for(;t.head;)t.removeNode(t.head.value);break}o=e.previous,t.removeNode(e.value),r(e.value)}const s={texts:this.texts.map((e=>({id:this.mirror.getId(e.node),value:e.value}))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>({id:this.mirror.getId(e.node),attributes:e.attributes}))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(s.texts.length||s.attributes.length||s.removes.length||s.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=e=>{if(!Ee(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;Te(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:fe(e.target,this.maskTextClass,this.maskTextSelector)&&t?this.maskTextFn?this.maskTextFn(t):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.target.getAttribute(e.attributeName);if("value"===e.attributeName&&(n=X({maskInputOptions:this.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),Te(e.target,this.blockClass,this.blockSelector,!1)||n===e.oldValue)return;let r=this.attributes.find((t=>t.node===e.target));if("IFRAME"===t.tagName&&"src"===e.attributeName&&!this.keepIframeSrcFn(n)){if(t.contentDocument)return;e.attributeName="rr_src"}if(r||(r={node:e.target,attributes:{}},this.attributes.push(r)),"style"===e.attributeName){const n=this.doc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue),void 0!==r.attributes.style&&null!==r.attributes.style||(r.attributes.style={});const o=r.attributes.style;for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),s=t.style.getPropertyPriority(e);r===n.style.getPropertyValue(e)&&s===n.style.getPropertyPriority(e)||(o[e]=""===s?r:[r,s])}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(o[e]=!1)}else r.attributes[e.attributeName]=me(this.doc,t.tagName,e.attributeName,n);break}case"childList":if(Te(e.target,this.blockClass,this.blockSelector,!0))return;e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=z(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Te(e.target,this.blockClass,this.blockSelector,!1)||Ee(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Pe(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Ne(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Ke(n,r)]?Pe(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!z(e.target)||!j(e.target))||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(this.mirror.hasNode(e)){if(Ee(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[Ke(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Te(e,this.blockClass,this.blockSelector,!1)||e.childNodes.forEach((e=>this.genAdds(e)))}}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Pe(e,t){e.delete(t),t.childNodes.forEach((t=>Pe(e,t)))}function Ye(e,t,n){return 0!==e.length&&ze(e,t,n)}function ze(e,t,n){const{parentNode:r}=t;if(!r)return!1;const o=n.getId(r);return!!e.some((e=>e.id===o))||ze(e,r,n)}function je(e,t){return 0!==e.size&&Je(e,t)}function Je(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||Je(e,n))}const He=[],Qe="undefined"!=typeof CSSGroupingRule,Xe="undefined"!=typeof CSSMediaRule,qe="undefined"!=typeof CSSSupportsRule,$e="undefined"!=typeof CSSConditionRule;function et(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(t){return e.target}}function tt(e,t){var n,r;const o=new _e;He.push(o),o.init(e);let s=window.MutationObserver||window.__rrMutationObserver;const i=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");i&&window[i]&&(s=window[i]);const a=new s(o.processMutations.bind(o));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function nt({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:s}){if(!1===s.mouseInteraction)return()=>{};const i=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,a=[];return Object.keys(Ue).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==i[e])).forEach((s=>{const i=s.toLowerCase(),l=(t=>s=>{const i=et(s);if(Te(i,r,o,!0))return;const a=Re(s)?s.changedTouches[0]:s;if(!a)return;const l=n.getId(i),{clientX:c,clientY:u}=a;e({type:Ue[t],id:l,x:c,y:u})})(s);a.push(ve(i,l,t))})),()=>{a.forEach((e=>e()))}}function rt({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:s}){return ve("scroll",Ae((s=>{const i=et(s);if(!i||Te(i,r,o,!0))return;const a=n.getId(i);if(i===t){const n=t.scrollingElement||t.documentElement;e({id:a,x:n.scrollLeft,y:n.scrollTop})}else e({id:a,x:i.scrollLeft,y:i.scrollTop})}),s.scroll||100),t)}function ot(e,t){const n=Object.assign({},e);return t||delete n.userTriggered,n}const st=["INPUT","TEXTAREA","SELECT"],it=new WeakMap;function at(e){return function(e,t){if(Qe&&e.parentRule instanceof CSSGroupingRule||Xe&&e.parentRule instanceof CSSMediaRule||qe&&e.parentRule instanceof CSSSupportsRule||$e&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function lt(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function ct({mirror:e,stylesheetManager:t},n){var r,o,s;let i=null;i="#document"===n.nodeName?e.getId(n):e.getId(n.host);const a="#document"===n.nodeName?null===(r=n.defaultView)||void 0===r?void 0:r.Document:null===(s=null===(o=n.ownerDocument)||void 0===o?void 0:o.defaultView)||void 0===s?void 0:s.ShadowRoot,l=Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets");return null!==i&&-1!==i&&a&&l?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null===(e=l.get)||void 0===e?void 0:e.call(this)},set(e){var n;const r=null===(n=l.set)||void 0===n?void 0:n.call(this,e);if(null!==i&&-1!==i)try{t.adoptStyleSheets(e,i)}catch(e){}return r}}),()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}):()=>{}}function ut(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};!function(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:s,viewportResizeCb:i,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:d,fontCb:h,selectionCb:p}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),n(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),r(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),o(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),s(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),i(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),u(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),d(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),h(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),p(...e)}}(e,t);const r=tt(e,e.doc),o=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const o="number"==typeof t.mousemove?t.mousemove:50,s="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const l=Ae((t=>{const n=Date.now()-i;e(a.map((e=>(e.timeOffset-=n,e))),t),a=[],i=null}),s),c=Ae((e=>{const t=et(e),{clientX:n,clientY:o}=Re(e)?e.changedTouches[0]:e;i||(i=Date.now()),a.push({x:n,y:o,id:r.getId(t),timeOffset:Date.now()-i}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?We.Drag:e instanceof MouseEvent?We.MouseMove:We.TouchMove)}),o,{trailing:!1}),u=[ve("mousemove",c,n),ve("touchmove",c,n),ve("drag",c,n)];return()=>{u.forEach((e=>e()))}}(e),s=nt(e),i=rt(e),a=function({viewportResizeCb:e}){let t=-1,n=-1;return ve("resize",Ae((()=>{const r=Me(),o=xe();t===r&&n===o||(e({width:Number(o),height:Number(r)}),t=r,n=o)}),200),window)}(e),l=function({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,ignoreClass:s,maskInputOptions:i,maskInputFn:a,sampling:l,userTriggeredOnInput:c}){function u(e){let n=et(e);const l=e.isTrusted;if(n&&"OPTION"===n.tagName&&(n=n.parentElement),!n||!n.tagName||st.indexOf(n.tagName)<0||Te(n,r,o,!0))return;const u=n.type;if(n.classList.contains(s))return;let h=n.value,p=!1;"radio"===u||"checkbox"===u?p=n.checked:(i[n.tagName.toLowerCase()]||i[u])&&(h=X({maskInputOptions:i,tagName:n.tagName,type:u,value:h,maskInputFn:a})),d(n,ot({text:h,isChecked:p,userTriggered:l},c));const m=n.name;"radio"===u&&m&&p&&t.querySelectorAll(`input[type="radio"][name="${m}"]`).forEach((e=>{e!==n&&d(e,ot({text:e.value,isChecked:!p,userTriggered:!1},c))}))}function d(t,r){const o=it.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){it.set(t,r);const o=n.getId(t);e(Object.assign(Object.assign({},r),{id:o}))}}const h=("last"===l.input?["change"]:["input","change"]).map((e=>ve(e,u,t))),p=t.defaultView;if(!p)return()=>{h.forEach((e=>e()))};const m=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),g=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&h.push(...g.map((e=>ke(e[0],e[1],{set(){u({target:this})}},!1,p)))),()=>{h.forEach((e=>e()))}}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:o}){const s=s=>Ae((o=>{const i=et(o);if(!i||Te(i,t,n,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:u}=i;e({type:s,id:r.getId(i),currentTime:a,volume:l,muted:c,playbackRate:u})}),o.media||500),i=[ve("play",s(0)),ve("pause",s(1)),ve("seeked",s(2)),ve("volumechange",s(3)),ve("ratechange",s(4))];return()=>{i.forEach((e=>e()))}}(e),u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=function(r,s){const{id:i,styleId:a}=lt(this,t,n.styleMirror);return(i&&-1!==i||a&&-1!==a)&&e({id:i,styleId:a,adds:[{rule:r,index:s}]}),o.apply(this,[r,s])};const s=r.CSSStyleSheet.prototype.deleteRule;let i,a;r.CSSStyleSheet.prototype.deleteRule=function(r){const{id:o,styleId:i}=lt(this,t,n.styleMirror);return(o&&-1!==o||i&&-1!==i)&&e({id:o,styleId:i,removes:[{index:r}]}),s.apply(this,[r])},r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=function(r){const{id:o,styleId:s}=lt(this,t,n.styleMirror);return(o&&-1!==o||s&&-1!==s)&&e({id:o,styleId:s,replace:r}),i.apply(this,[r])}),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=function(r){const{id:o,styleId:s}=lt(this,t,n.styleMirror);return(o&&-1!==o||s&&-1!==s)&&e({id:o,styleId:s,replaceSync:r}),a.apply(this,[r])});const l={};Qe?l.CSSGroupingRule=r.CSSGroupingRule:(Xe&&(l.CSSMediaRule=r.CSSMediaRule),$e&&(l.CSSConditionRule=r.CSSConditionRule),qe&&(l.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(l).forEach((([r,o])=>{c[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=function(o,s){const{id:i,styleId:a}=lt(this.parentStyleSheet,t,n.styleMirror);return(i&&-1!==i||a&&-1!==a)&&e({id:i,styleId:a,adds:[{rule:o,index:[...at(this),s||0]}]}),c[r].insertRule.apply(this,[o,s])},o.prototype.deleteRule=function(o){const{id:s,styleId:i}=lt(this.parentStyleSheet,t,n.styleMirror);return(s&&-1!==s||i&&-1!==i)&&e({id:s,styleId:i,removes:[{index:[...at(this),o]}]}),c[r].deleteRule.apply(this,[o])}})),()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=s,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach((([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule}))}}(e,{win:n}),d=ct(e,e.doc),h=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=function(o,i,a){var l;if(n.has(o))return s.apply(this,[o,i,a]);const{id:c,styleId:u}=lt(null===(l=this.parentRule)||void 0===l?void 0:l.parentStyleSheet,t,r.styleMirror);return(c&&-1!==c||u&&-1!==u)&&e({id:c,styleId:u,set:{property:o,value:i,priority:a},index:at(this.parentRule)}),s.apply(this,[o,i,a])};const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=function(o){var s;if(n.has(o))return i.apply(this,[o]);const{id:a,styleId:l}=lt(null===(s=this.parentRule)||void 0===s?void 0:s.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,remove:{property:o},index:at(this.parentRule)}),i.apply(this,[o])},()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i}}(e,{win:n}),p=e.collectFonts?function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(e,t,n){const r=new s(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const i=we(t.fonts,"add",(function(t){return function(n){return setTimeout((()=>{const t=o.get(n);t&&(e(t),o.delete(n))}),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=s})),r.push(i),()=>{r.forEach((e=>e()))}}(e):()=>{},m=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:s}=e;let i=!0;const a=()=>{const e=t.getSelection();if(!e||i&&(null==e?void 0:e.isCollapsed))return;i=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const s=e.getRangeAt(t),{startContainer:i,startOffset:l,endContainer:c,endOffset:u}=s;Te(i,r,o,!0)||Te(c,r,o,!0)||a.push({start:n.getId(i),startOffset:l,end:n.getId(c),endOffset:u})}s({ranges:a})};return a(),ve("selectionchange",a)}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,n,t.options));return()=>{He.forEach((e=>e.reset())),r.disconnect(),o(),s(),i(),a(),l(),c(),u(),d(),h(),p(),m(),g.forEach((e=>e()))}}class dt{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),s=r||this.getRemoteIdToIdMap(e);let i=o.get(t);return i||(i=this.generateIdFn(),o.set(t,i),s.set(i,t)),i}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const o=r.get(t);return o||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class ht{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new dt(oe),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new dt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){if("rrweb"===e.data.type){if(!e.source)return;const t=this.crossOriginIframeMap.get(e.source);if(!t)return;const n=this.transformCrossOriginEvent(t,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}}transformCrossOriginEvent(e,t){var n;switch(t.type){case Be.FullSnapshot:return this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e),{timestamp:t.timestamp,type:Be.IncrementalSnapshot,data:{source:We.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Be.Meta:case Be.Load:case Be.DomContentLoaded:return!1;case Be.Plugin:return t;case Be.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Be.IncrementalSnapshot:switch(t.data.source){case We.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case We.Drag:case We.TouchMove:case We.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case We.ViewportResize:return!1;case We.MediaInteraction:case We.MouseInteraction:case We.Scroll:case We.CanvasMutation:case We.Input:return this.replaceIds(t.data,e,["id"]),t;case We.StyleSheetRule:case We.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case We.Font:return t;case We.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case We.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(n=t.data.styles)||void 0===n||n.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}}replace(e,t,n,r){for(const o of r)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}}class pt{constructor(e){this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;const t=this;this.restorePatches.push(we(Element.prototype,"attachShadow",(function(e){return function(n){const r=e.call(this,n);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,this.ownerDocument),r}})))}addShadowRoot(e,t){j(e)&&(this.shadowDoms.has(e)||(this.shadowDoms.add(e),tt(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),rt(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),ct({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)}),0)))}observeAttachShadow(e){if(e.contentWindow){const t=this;this.restorePatches.push(we(e.contentWindow.HTMLElement.prototype,"attachShadow",(function(n){return function(r){const o=n.call(this,r);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),o}})))}}reset(){this.restorePatches.forEach((e=>e())),this.shadowDoms=new WeakSet}}
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
9
9
|
|
|
@@ -17,5 +17,5 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
17
17
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
18
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
19
|
PERFORMANCE OF THIS SOFTWARE.
|
|
20
|
-
***************************************************************************** */function Le(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))}for(var De="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",We="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Be=0;Be<64;Be++)We[De.charCodeAt(Be)]=Be;const Ze=new Map;const Ge=(e,t,n)=>{if(!e||!Ke(e,t)&&"object"!=typeof e)return;const r=function(e,t){let n=Ze.get(e);return n||(n=new Map,Ze.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name);let o=r.indexOf(e);return-1===o&&(o=r.length,r.push(e)),o};function Ue(e,t,n){if(e instanceof Array)return e.map((e=>Ue(e,t,n)));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){const t=e.constructor.name,n=function(e){var t,n=new Uint8Array(e),r=n.length,o="";for(t=0;t<r;t+=3)o+=De[n[t]>>2],o+=De[(3&n[t])<<4|n[t+1]>>4],o+=De[(15&n[t+1])<<2|n[t+2]>>6],o+=De[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e);return{rr_type:t,base64:n}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Ue(e.buffer,t,n),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Ue(e.data,t,n),e.width,e.height]}}if(Ke(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Ge(e,t,n)}}return e}const Ve=(e,t,n)=>[...e].map((e=>Ue(e,t,n))),Ke=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(n.find((n=>e instanceof t[n])))};function Ye(e,t,n){const r=[];try{const o=P(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(r,...o){return Q(this,t,n,!0)||"__context"in this||(this.__context=r),e.apply(this,[r,...o])}}));r.push(o)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach((e=>e()))}}function _e(e,t,n,r,o,i,s){const a=[],l=Object.getOwnPropertyNames(e);for(const i of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(i))try{if("function"!=typeof e[i])continue;const l=P(e,i,(function(e){return function(...a){const l=e.apply(this,a);if(Ge(l,s,this),!Q(this.canvas,r,o,!0)){const e=Ve([...a],s,this),r={type:t,property:i,args:e};n(this.canvas,r)}return l}}));a.push(l)}catch(r){const o=_(e,i,{set(e){n(this.canvas,{type:t,property:i,args:[e],setter:!0})}});a.push(o)}return a}var Pe=null;try{var ze="undefined"!=typeof module&&module.require("worker_threads")||"function"==typeof __non_webpack_require__&&__non_webpack_require__("worker_threads")||require("worker_threads");Pe=ze.Worker}catch(e){}function Je(e,t,n){var r=void 0===t?null:t,o=function(e,t){return Buffer.from(e,"base64").toString(t?"utf16":"utf8")}(e,void 0!==n&&n),i=o.indexOf("\n",10)+1,s=o.substring(i)+(r?"//# sourceMappingURL="+r:"");return function(e){return new Pe(s,Object.assign({},e,{eval:!0}))}}function Qe(e,t,n){var r=void 0===t?null:t,o=function(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,i=n.length;o<i;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}(e,void 0!==n&&n),i=o.indexOf("\n",10)+1,s=o.substring(i)+(r?"//# sourceMappingURL="+r:""),a=new Blob([s],{type:"application/javascript"});return URL.createObjectURL(a)}var He="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0);var je,Xe,qe,$e=(je="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",Xe=null,qe=!1,He?Je(je,Xe,qe):function(e,t,n){var r;return function(o){return r=r||Qe(e,t,n),new Worker(r,o)}}(je,Xe,qe));class et{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};const{sampling:t="all",win:n,blockClass:r,blockSelector:o,recordCanvas:i,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(n,r,o),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,n,r,o,{dataURLOptions:s})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,n,r,o){const i=Ye(t,n,r),s=new Map,a=new $e;a.onmessage=e=>{const{id:t}=e.data;if(s.set(t,!1),!("base64"in e.data))return;const{base64:n,type:r,width:o,height:i}=e.data;this.mutationCb({id:t,type:ie["2D"],commands:[{property:"clearRect",args:[0,0,o,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:r}]},0,0]}]})};const l=1e3/e;let c,u=0;const d=e=>{u&&e-u<l||(u=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach((t=>{Q(t,n,r,!0)||e.push(t)})),e})().forEach((e=>Le(this,void 0,void 0,(function*(){var t;const n=this.mirror.getId(e);if(s.get(n))return;if(s.set(n,!0),["webgl","webgl2"].includes(e.__context)){const n=e.getContext(e.__context);!1===(null===(t=null==n?void 0:n.getContextAttributes())||void 0===t?void 0:t.preserveDrawingBuffer)&&(null==n||n.clear(n.COLOR_BUFFER_BIT))}const r=yield createImageBitmap(e);a.postMessage({id:n,bitmap:r,width:e.width,height:e.height,dataURLOptions:o.dataURLOptions},[r])}))))),c=requestAnimationFrame(d)};c=requestAnimationFrame(d),this.resetObservers=()=>{i(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=Ye(e,t,n),o=function(e,t,n,r){const o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const s of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[s])continue;const i=P(t.CanvasRenderingContext2D.prototype,s,(function(o){return function(...i){return Q(this.canvas,n,r,!0)||setTimeout((()=>{const n=Ve([...i],t,this);e(this.canvas,{type:ie["2D"],property:s,args:n})}),0),o.apply(this,i)}}));o.push(i)}catch(n){const r=_(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:ie["2D"],property:s,args:[t],setter:!0})}});o.push(r)}return()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n),i=function(e,t,n,r,o){const i=[];return i.push(..._e(t.WebGLRenderingContext.prototype,ie.WebGL,e,n,r,0,t)),void 0!==t.WebGL2RenderingContext&&i.push(..._e(t.WebGL2RenderingContext.prototype,ie.WebGL2,e,n,r,0,t)),()=>{i.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=()=>{r(),o(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;const r=n.map((e=>{const t=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["type"]);return t})),{type:o}=n[0];this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}}class tt{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new te,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const t of e){let e;if(this.styleMirror.has(t))e=this.styleMirror.getId(t);else{e=this.styleMirror.add(t);const n=Array.from(t.rules||CSSRule);r.push({styleId:e,rules:n.map(((e,t)=>({rule:m(e),index:t})))})}n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}function nt(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}let rt,ot,it,st=!1;const at=new f;function lt(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,ignoreClass:s="rr-ignore",maskTextClass:a="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,maskAllInputs:u,maskInputOptions:d,slimDOMOptions:h,maskInputFn:p,maskTextFn:g,hooks:m,packFn:I,sampling:C={},dataURLOptions:y={},mousemoveWait:v,recordCanvas:b=!1,recordCrossOriginIframes:S=!1,userTriggeredOnInput:A=!1,collectFonts:k=!1,inlineImages:w=!1,plugins:M,keepIframeSrcFn:T=(()=>!1),ignoreCSSAttributes:x=new Set([])}=e,E=!S||window.parent===window;let N=!1;if(!E)try{window.parent.document,N=!1}catch(e){N=!0}if(E&&!t)throw new Error("emit function is required");void 0!==v&&void 0===C.mousemove&&(C.mousemove=v),at.reset();const R=!0===u?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==d?d:{password:!0},O=!0===h||"all"===h?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===h,headMetaDescKeywords:"all"===h}:h||{};let F;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let L=0;const D=e=>{for(const t of M||[])t.eventProcessor&&(e=t.eventProcessor(e));return I&&(e=I(e)),e};rt=(e,o)=>{var i;if(!(null===(i=me[0])||void 0===i?void 0:i.isFrozen())||e.type===ne.FullSnapshot||e.type===ne.IncrementalSnapshot&&e.data.source===re.Mutation||me.forEach((e=>e.unfreeze())),E)null==t||t(D(e),o);else if(N){const t={type:"rrweb",event:D(e),isCheckout:o};window.parent.postMessage(t,"*")}if(e.type===ne.FullSnapshot)F=e,L=0;else if(e.type===ne.IncrementalSnapshot){if(e.data.source===re.Mutation&&e.data.isAttachIframe)return;L++;const t=r&&L>=r,o=n&&e.timestamp-F.timestamp>n;(t||o)&&ot(!0)}};const W=e=>{rt(nt({type:ne.IncrementalSnapshot,data:Object.assign({source:re.Mutation},e)}))},B=e=>rt(nt({type:ne.IncrementalSnapshot,data:Object.assign({source:re.Scroll},e)})),Z=e=>rt(nt({type:ne.IncrementalSnapshot,data:Object.assign({source:re.CanvasMutation},e)})),V=new tt({mutationCb:W,adoptedStyleSheetCb:e=>rt(nt({type:ne.IncrementalSnapshot,data:Object.assign({source:re.AdoptedStyleSheet},e)}))}),K=new Oe({mirror:at,mutationCb:W,stylesheetManager:V,recordCrossOriginIframes:S,wrappedEmit:rt});for(const e of M||[])e.getMirror&&e.getMirror({nodeMirror:at,crossOriginIframeMirror:K.crossOriginIframeMirror,crossOriginIframeStyleMirror:K.crossOriginIframeStyleMirror});it=new et({recordCanvas:b,mutationCb:Z,win:window,blockClass:o,blockSelector:i,mirror:at,sampling:C.canvas,dataURLOptions:y});const Y=new Fe({mutationCb:W,scrollCb:B,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:l,inlineStylesheet:c,maskInputOptions:R,dataURLOptions:y,maskTextFn:g,maskInputFn:p,recordCanvas:b,inlineImages:w,sampling:C,slimDOMOptions:O,iframeManager:K,stylesheetManager:V,canvasManager:it,keepIframeSrcFn:T},mirror:at});ot=(e=!1)=>{var t,n,r,s,u,d;rt(nt({type:ne.Meta,data:{href:window.location.href,width:J(),height:z()}}),e),V.reset(),me.forEach((e=>e.lock()));const h=function(e,t){var n=t||{},r=n.mirror,o=void 0===r?new f:r,i=n.blockClass,s=void 0===i?"rr-block":i,a=n.blockSelector,l=void 0===a?null:a,c=n.maskTextClass,u=void 0===c?"rr-mask":c,d=n.maskTextSelector,h=void 0===d?null:d,p=n.inlineStylesheet,g=void 0===p||p,m=n.inlineImages,I=void 0!==m&&m,C=n.recordCanvas,y=void 0!==C&&C,v=n.maskAllInputs,b=void 0!==v&&v,S=n.maskTextFn,A=n.maskInputFn,k=n.slimDOM,w=void 0!==k&&k,M=n.dataURLOptions,T=n.preserveWhiteSpace,x=n.onSerialize,E=n.onIframeLoad,N=n.iframeLoadTimeout,R=n.onStylesheetLoad,O=n.stylesheetLoadTimeout,F=n.keepIframeSrcFn;return G(e,{doc:e,mirror:o,blockClass:s,blockSelector:l,maskTextClass:u,maskTextSelector:h,skipChild:!1,inlineStylesheet:g,maskInputOptions:!0===b?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===b?{password:!0}:b,maskTextFn:S,maskInputFn:A,slimDOMOptions:!0===w||"all"===w?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===w,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===w?{}:w,dataURLOptions:M,inlineImages:I,recordCanvas:y,preserveWhiteSpace:T,onSerialize:x,onIframeLoad:E,iframeLoadTimeout:N,onStylesheetLoad:R,stylesheetLoadTimeout:O,keepIframeSrcFn:void 0===F?function(){return!1}:F,newlyAddedElement:!1})}(document,{mirror:at,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:l,inlineStylesheet:c,maskAllInputs:R,maskTextFn:g,slimDOM:O,dataURLOptions:y,recordCanvas:b,inlineImages:w,onSerialize:e=>{q(e,at)&&K.addIframe(e),$(e,at)&&V.trackLinkElement(e),ee(e)&&Y.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{K.attachIframe(e,t),Y.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{V.attachLinkElement(e,t)},keepIframeSrcFn:T});if(!h)return console.warn("Failed to snapshot the document");rt(nt({type:ne.FullSnapshot,data:{node:h,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(u=null===(s=null===document||void 0===document?void 0:document.body)||void 0===s?void 0:s.parentElement)||void 0===u?void 0:u.scrollTop)||(null===(d=null===document||void 0===document?void 0:document.body)||void 0===d?void 0:d.scrollTop)||0}}})),me.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,at.getId(document))};try{const e=[];e.push(U("DOMContentLoaded",(()=>{rt(nt({type:ne.DomContentLoaded,data:{}}))})));const t=e=>{var t;return Ne({mutationCb:W,mousemoveCb:(e,t)=>rt(nt({type:ne.IncrementalSnapshot,data:{source:t,positions:e}})),mouseInteractionCb:e=>rt(nt({type:ne.IncrementalSnapshot,data:Object.assign({source:re.MouseInteraction},e)})),scrollCb:B,viewportResizeCb:e=>rt(nt({type:ne.IncrementalSnapshot,data:Object.assign({source:re.ViewportResize},e)})),inputCb:e=>rt(nt({type:ne.IncrementalSnapshot,data:Object.assign({source:re.Input},e)})),mediaInteractionCb:e=>rt(nt({type:ne.IncrementalSnapshot,data:Object.assign({source:re.MediaInteraction},e)})),styleSheetRuleCb:e=>rt(nt({type:ne.IncrementalSnapshot,data:Object.assign({source:re.StyleSheetRule},e)})),styleDeclarationCb:e=>rt(nt({type:ne.IncrementalSnapshot,data:Object.assign({source:re.StyleDeclaration},e)})),canvasMutationCb:Z,fontCb:e=>rt(nt({type:ne.IncrementalSnapshot,data:Object.assign({source:re.Font},e)})),selectionCb:e=>{rt(nt({type:ne.IncrementalSnapshot,data:Object.assign({source:re.Selection},e)}))},blockClass:o,ignoreClass:s,maskTextClass:a,maskTextSelector:l,maskInputOptions:R,inlineStylesheet:c,sampling:C,recordCanvas:b,inlineImages:w,userTriggeredOnInput:A,collectFonts:k,doc:e,maskInputFn:p,maskTextFn:g,keepIframeSrcFn:T,blockSelector:i,slimDOMOptions:O,dataURLOptions:y,mirror:at,iframeManager:K,stylesheetManager:V,shadowDomManager:Y,canvasManager:it,ignoreCSSAttributes:x,plugins:(null===(t=null==M?void 0:M.filter((e=>e.observer)))||void 0===t?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>rt(nt({type:ne.Plugin,data:{plugin:e.name,payload:t}}))}))))||[]},m)};K.addLoadListener((n=>{e.push(t(n.contentDocument))}));const n=()=>{ot(),e.push(t(document)),st=!0};return"interactive"===document.readyState||"complete"===document.readyState?n():e.push(U("load",(()=>{rt(nt({type:ne.Load,data:{}})),n()}),window)),()=>{e.forEach((e=>e())),st=!1}}catch(e){console.warn(e)}}lt.addCustomEvent=(e,t)=>{if(!st)throw new Error("please add custom event after start recording");rt(nt({type:ne.Custom,data:{tag:e,payload:t}}))},lt.freezePage=()=>{me.forEach((e=>e.freeze()))},lt.takeFullSnapshot=e=>{if(!st)throw new Error("please take full snapshot after start recording");ot(e)},lt.mirror=at;class ct{constructor(e){this.buffer=[],this.index=0,this.sessionId="",void 0!==typeof crypto&&"function"==typeof crypto.randomUUID&&(this.sessionId=crypto.randomUUID(),this.visibilityHandler=()=>{this.handleVisibilityChange()},document.addEventListener("visibilitychange",this.visibilityHandler,!0),this.timerHandle=setInterval((()=>{2!==this.buffer.length&&(this.recordCapture(),this.restartCapture())}),e.intervalMs),this.startCapture())}register(e){this.telemetry=e}unregister(){var e;null===(e=this.stopper)||void 0===e||e.call(this),this.telemetry=void 0,document.removeEventListener("visibilitychange",this.visibilityHandler),clearInterval(this.timerHandle)}handleVisibilityChange(){"hidden"===document.visibilityState&&(this.recordCapture(),this.restartCapture())}recordCapture(){var e;null===(e=this.telemetry)||void 0===e||e.captureSession({id:this.sessionId,events:[...this.buffer],index:this.index}),this.index+=1}startCapture(){const{buffer:e}=this;this.stopper=lt({emit:t=>{e.push(t)}})}restartCapture(){var e;null===(e=this.stopper)||void 0===e||e.call(this),this.buffer.length=0,this.startCapture()}}class ut{constructor(e){this.content=[],this.size=e}push(e){this.content.length<this.size&&this.content.push(e)}hasSpace(){return this.content.length<this.size}isPopulated(){return 0!==this.content.length}clear(){this.content=[]}}class dt{constructor(e,t){this.buffers=[],this.writePointer=0,this.headPointer=0;for(let n=0;n<t;n+=1)this.buffers.push(new ut(e))}push(e){const t=this.buffers[this.writePointer];if(!t.hasSpace())return this.writePointer<this.buffers.length-1?this.writePointer+=1:this.writePointer=0,this.buffers[this.writePointer].clear(),this.writePointer===this.headPointer&&(this.headPointer+=1,this.headPointer>=this.buffers.length-1&&(this.headPointer=0)),void this.push(e);t.push(e)}toArray(){const e=[],t=this.buffers.reduce(((e,t)=>t.isPopulated()?e+1:e),0);for(let n=this.headPointer;n<this.headPointer+t;n+=1){const t=n%this.buffers.length;e.push(...this.buffers[t].content)}return e}reset(){this.writePointer=0,this.headPointer=0,this.buffers.forEach((e=>e.clear()))}}class ht{constructor(e){this.options=e,this.index=0,this.buffer=new dt(e.eventSegmentLength,e.segmentBufferLength),this.startCapture()}startCapture(){this.stopper=lt({checkoutEveryNth:this.options.eventSegmentLength,emit:e=>{this.buffer.push(e)}})}register(e){this.telemetry=e}unregister(){var e;null===(e=this.stopper)||void 0===e||e.call(this),this.telemetry=void 0}capture(){var e;null===(e=this.telemetry)||void 0===e||e.captureSession({id:crypto.randomUUID(),events:this.buffer.toArray(),index:this.index}),this.index+=1,this.restartCapture()}restartCapture(){var e;this.buffer.reset(),null===(e=this.stopper)||void 0===e||e.call(this),this.startCapture()}}class pt{constructor(e){const t=null==e?void 0:e.capture;var n;"continuous"===(null==(n=t)?void 0:n.type)?this.impl=new ct(t):!function(e){return"rolling"===(null==e?void 0:e.type)}(t)?this.impl=new ct({type:"continuous",intervalMs:5e3}):this.impl=new ht(t)}register(e){this.impl.register(e)}unregister(){this.impl.unregister()}handleFlagUsed(e,t,n){lt.addCustomEvent("flag-used",{key:e,detail:t})}handleFlagDetailChanged(e,t){lt.addCustomEvent("flag-detail-changed",{key:e,detail:t})}handleErrorEvent(e,t){lt.addCustomEvent("error",{name:e,message:t})}}function gt(e,t){return null!=e?e:t}function mt(e){const t=function(e){var t,n,r,o;const i={breadcrumbs:{maxBreadcrumbs:50,evaluations:!0,flagChange:!0,click:!0},maxPendingEvents:100,collectors:[]};return{breadcrumbs:{maxBreadcrumbs:gt(null===(t=e.breadcrumbs)||void 0===t?void 0:t.maxBreadcrumbs,i.breadcrumbs.maxBreadcrumbs),evaluations:gt(null===(n=e.breadcrumbs)||void 0===n?void 0:n.evaluations,i.breadcrumbs.evaluations),flagChange:gt(null===(r=e.breadcrumbs)||void 0===r?void 0:r.flagChange,i.breadcrumbs.flagChange),click:gt(null===(o=e.breadcrumbs)||void 0===o?void 0:o.click,i.breadcrumbs.click)},maxPendingEvents:gt(e.maxPendingEvents,i.maxPendingEvents),collectors:[...gt(e.collectors,i.collectors)]}}(e||{});return new u(t)}export{pt as SessionReplay,mt as initializeTelemetry};
|
|
20
|
+
***************************************************************************** */function mt(e,t,n,r){return new(n||(n=Promise))((function(o,s){function i(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,a)}l((r=r.apply(e,t||[])).next())}))}for(var gt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ft="undefined"==typeof Uint8Array?[]:new Uint8Array(256),It=0;It<64;It++)ft[gt.charCodeAt(It)]=It;const Ct=new Map;const yt=(e,t,n)=>{if(!e||!St(e,t)&&"object"!=typeof e)return;const r=function(e,t){let n=Ct.get(e);return n||(n=new Map,Ct.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name);let o=r.indexOf(e);return-1===o&&(o=r.length,r.push(e)),o};function vt(e,t,n){if(e instanceof Array)return e.map((e=>vt(e,t,n)));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){const t=e.constructor.name,n=function(e){var t,n=new Uint8Array(e),r=n.length,o="";for(t=0;t<r;t+=3)o+=gt[n[t]>>2],o+=gt[(3&n[t])<<4|n[t+1]>>4],o+=gt[(15&n[t+1])<<2|n[t+2]>>6],o+=gt[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e);return{rr_type:t,base64:n}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[vt(e.buffer,t,n),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[vt(e.data,t,n),e.width,e.height]}}if(St(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:yt(e,t,n)}}return e}const bt=(e,t,n)=>[...e].map((e=>vt(e,t,n))),St=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(n.find((n=>e instanceof t[n])))};function At(e,t,n){const r=[];try{const o=we(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(r,...o){return Te(this,t,n,!0)||"__context"in this||(this.__context=r),e.apply(this,[r,...o])}}));r.push(o)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach((e=>e()))}}function kt(e,t,n,r,o,s,i){const a=[],l=Object.getOwnPropertyNames(e);for(const s of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(s))try{if("function"!=typeof e[s])continue;const l=we(e,s,(function(e){return function(...a){const l=e.apply(this,a);if(yt(l,i,this),!Te(this.canvas,r,o,!0)){const e=bt([...a],i,this),r={type:t,property:s,args:e};n(this.canvas,r)}return l}}));a.push(l)}catch(r){const o=ke(e,s,{set(e){n(this.canvas,{type:t,property:s,args:[e],setter:!0})}});a.push(o)}return a}var wt=null;try{var Mt="undefined"!=typeof module&&module.require("worker_threads")||"function"==typeof __non_webpack_require__&&__non_webpack_require__("worker_threads")||require("worker_threads");wt=Mt.Worker}catch(e){}function xt(e,t,n){var r=void 0===t?null:t,o=function(e,t){return Buffer.from(e,"base64").toString(t?"utf16":"utf8")}(e,void 0!==n&&n),s=o.indexOf("\n",10)+1,i=o.substring(s)+(r?"//# sourceMappingURL="+r:"");return function(e){return new wt(i,Object.assign({},e,{eval:!0}))}}function Tt(e,t,n){var r=void 0===t?null:t,o=function(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,s=n.length;o<s;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}(e,void 0!==n&&n),s=o.indexOf("\n",10)+1,i=o.substring(s)+(r?"//# sourceMappingURL="+r:""),a=new Blob([i],{type:"application/javascript"});return URL.createObjectURL(a)}var Et="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0);var Nt,Rt,Ft,Ot=(Nt="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",Rt=null,Ft=!1,Et?xt(Nt,Rt,Ft):function(e,t,n){var r;return function(o){return r=r||Tt(e,t,n),new Worker(r,o)}}(Nt,Rt,Ft));class Lt{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};const{sampling:t="all",win:n,blockClass:r,blockSelector:o,recordCanvas:s,dataURLOptions:i}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,s&&"all"===t&&this.initCanvasMutationObserver(n,r,o),s&&"number"==typeof t&&this.initCanvasFPSObserver(t,n,r,o,{dataURLOptions:i})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,n,r,o){const s=At(t,n,r),i=new Map,a=new Ot;a.onmessage=e=>{const{id:t}=e.data;if(i.set(t,!1),!("base64"in e.data))return;const{base64:n,type:r,width:o,height:s}=e.data;this.mutationCb({id:t,type:Ze["2D"],commands:[{property:"clearRect",args:[0,0,o,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:r}]},0,0]}]})};const l=1e3/e;let c,u=0;const d=e=>{u&&e-u<l||(u=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach((t=>{Te(t,n,r,!0)||e.push(t)})),e})().forEach((e=>mt(this,void 0,void 0,(function*(){var t;const n=this.mirror.getId(e);if(i.get(n))return;if(i.set(n,!0),["webgl","webgl2"].includes(e.__context)){const n=e.getContext(e.__context);!1===(null===(t=null==n?void 0:n.getContextAttributes())||void 0===t?void 0:t.preserveDrawingBuffer)&&(null==n||n.clear(n.COLOR_BUFFER_BIT))}const r=yield createImageBitmap(e);a.postMessage({id:n,bitmap:r,width:e.width,height:e.height,dataURLOptions:o.dataURLOptions},[r])}))))),c=requestAnimationFrame(d)};c=requestAnimationFrame(d),this.resetObservers=()=>{s(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=At(e,t,n),o=function(e,t,n,r){const o=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const i of s)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[i])continue;const s=we(t.CanvasRenderingContext2D.prototype,i,(function(o){return function(...s){return Te(this.canvas,n,r,!0)||setTimeout((()=>{const n=bt([...s],t,this);e(this.canvas,{type:Ze["2D"],property:i,args:n})}),0),o.apply(this,s)}}));o.push(s)}catch(n){const r=ke(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:Ze["2D"],property:i,args:[t],setter:!0})}});o.push(r)}return()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n),s=function(e,t,n,r){const o=[];return o.push(...kt(t.WebGLRenderingContext.prototype,Ze.WebGL,e,n,r,0,t)),void 0!==t.WebGL2RenderingContext&&o.push(...kt(t.WebGL2RenderingContext.prototype,Ze.WebGL2,e,n,r,0,t)),()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=()=>{r(),o(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;const r=n.map((e=>{const t=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["type"]);return t})),{type:o}=n[0];this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}}class Dt{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new De,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const t of e){let e;if(this.styleMirror.has(t))e=this.styleMirror.getId(t);else{e=this.styleMirror.add(t);const n=Array.from(t.rules||CSSRule);r.push({styleId:e,rules:n.map(((e,t)=>({rule:H(e),index:t})))})}n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}function Bt(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}let Wt,Ut,Zt,Gt=!1;const Vt=new Q;function Kt(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,ignoreClass:i="rr-ignore",maskTextClass:a="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,maskAllInputs:u,maskInputOptions:d,slimDOMOptions:h,maskInputFn:p,maskTextFn:m,hooks:g,packFn:f,sampling:I={},dataURLOptions:C={},mousemoveWait:y,recordCanvas:v=!1,recordCrossOriginIframes:b=!1,userTriggeredOnInput:S=!1,collectFonts:A=!1,inlineImages:k=!1,plugins:w,keepIframeSrcFn:M=()=>!1,ignoreCSSAttributes:x=new Set([])}=e,T=!b||window.parent===window;let E=!1;if(!T)try{window.parent.document,E=!1}catch(e){E=!0}if(T&&!t)throw new Error("emit function is required");void 0!==y&&void 0===I.mousemove&&(I.mousemove=y),Vt.reset();const N=!0===u?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==d?d:{password:!0},R=!0===h||"all"===h?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===h,headMetaDescKeywords:"all"===h}:h||{};let F;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let O=0;const L=e=>{for(const t of w||[])t.eventProcessor&&(e=t.eventProcessor(e));return f&&(e=f(e)),e};Wt=(e,o)=>{var s;if(!(null===(s=He[0])||void 0===s?void 0:s.isFrozen())||e.type===Be.FullSnapshot||e.type===Be.IncrementalSnapshot&&e.data.source===We.Mutation||He.forEach((e=>e.unfreeze())),T)null==t||t(L(e),o);else if(E){const t={type:"rrweb",event:L(e),isCheckout:o};window.parent.postMessage(t,"*")}if(e.type===Be.FullSnapshot)F=e,O=0;else if(e.type===Be.IncrementalSnapshot){if(e.data.source===We.Mutation&&e.data.isAttachIframe)return;O++;const t=r&&O>=r,o=n&&e.timestamp-F.timestamp>n;(t||o)&&Ut(!0)}};const D=e=>{Wt(Bt({type:Be.IncrementalSnapshot,data:Object.assign({source:We.Mutation},e)}))},B=e=>Wt(Bt({type:Be.IncrementalSnapshot,data:Object.assign({source:We.Scroll},e)})),W=e=>Wt(Bt({type:Be.IncrementalSnapshot,data:Object.assign({source:We.CanvasMutation},e)})),U=new Dt({mutationCb:D,adoptedStyleSheetCb:e=>Wt(Bt({type:Be.IncrementalSnapshot,data:Object.assign({source:We.AdoptedStyleSheet},e)}))}),Z=new ht({mirror:Vt,mutationCb:D,stylesheetManager:U,recordCrossOriginIframes:b,wrappedEmit:Wt});for(const e of w||[])e.getMirror&&e.getMirror({nodeMirror:Vt,crossOriginIframeMirror:Z.crossOriginIframeMirror,crossOriginIframeStyleMirror:Z.crossOriginIframeStyleMirror});Zt=new Lt({recordCanvas:v,mutationCb:W,win:window,blockClass:o,blockSelector:s,mirror:Vt,sampling:I.canvas,dataURLOptions:C});const G=new pt({mutationCb:D,scrollCb:B,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:l,inlineStylesheet:c,maskInputOptions:N,dataURLOptions:C,maskTextFn:m,maskInputFn:p,recordCanvas:v,inlineImages:k,sampling:I,slimDOMOptions:R,iframeManager:Z,stylesheetManager:U,canvasManager:Zt,keepIframeSrcFn:M},mirror:Vt});Ut=(e=!1)=>{var t,n,r,i,u,d;Wt(Bt({type:Be.Meta,data:{href:window.location.href,width:xe(),height:Me()}}),e),U.reset(),He.forEach((e=>e.lock()));const h=function(e,t){var n=t||{},r=n.mirror,o=void 0===r?new Q:r,s=n.blockClass,i=void 0===s?"rr-block":s,a=n.blockSelector,l=void 0===a?null:a,c=n.maskTextClass,u=void 0===c?"rr-mask":c,d=n.maskTextSelector,h=void 0===d?null:d,p=n.inlineStylesheet,m=void 0===p||p,g=n.inlineImages,f=void 0!==g&&g,I=n.recordCanvas,C=void 0!==I&&I,y=n.maskAllInputs,v=void 0!==y&&y,b=n.maskTextFn,S=n.maskInputFn,A=n.slimDOM,k=void 0!==A&&A,w=n.dataURLOptions,M=n.preserveWhiteSpace,x=n.onSerialize,T=n.onIframeLoad,E=n.iframeLoadTimeout,N=n.onStylesheetLoad,R=n.stylesheetLoadTimeout,F=n.keepIframeSrcFn;return ye(e,{doc:e,mirror:o,blockClass:i,blockSelector:l,maskTextClass:u,maskTextSelector:h,skipChild:!1,inlineStylesheet:m,maskInputOptions:!0===v?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===v?{password:!0}:v,maskTextFn:b,maskInputFn:S,slimDOMOptions:!0===k||"all"===k?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===k,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===k?{}:k,dataURLOptions:w,inlineImages:f,recordCanvas:C,preserveWhiteSpace:M,onSerialize:x,onIframeLoad:T,iframeLoadTimeout:E,onStylesheetLoad:N,stylesheetLoadTimeout:R,keepIframeSrcFn:void 0===F?function(){return!1}:F,newlyAddedElement:!1})}(document,{mirror:Vt,blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:l,inlineStylesheet:c,maskAllInputs:N,maskTextFn:m,slimDOM:R,dataURLOptions:C,recordCanvas:v,inlineImages:k,onSerialize:e=>{Fe(e,Vt)&&Z.addIframe(e),Oe(e,Vt)&&U.trackLinkElement(e),Le(e)&&G.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Z.attachIframe(e,t),G.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{U.attachLinkElement(e,t)},keepIframeSrcFn:M});if(!h)return console.warn("Failed to snapshot the document");Wt(Bt({type:Be.FullSnapshot,data:{node:h,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(u=null===(i=null===document||void 0===document?void 0:document.body)||void 0===i?void 0:i.parentElement)||void 0===u?void 0:u.scrollTop)||(null===(d=null===document||void 0===document?void 0:document.body)||void 0===d?void 0:d.scrollTop)||0}}})),He.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&U.adoptStyleSheets(document.adoptedStyleSheets,Vt.getId(document))};try{const e=[];e.push(ve("DOMContentLoaded",(()=>{Wt(Bt({type:Be.DomContentLoaded,data:{}}))})));const t=e=>{var t;return ut({mutationCb:D,mousemoveCb:(e,t)=>Wt(Bt({type:Be.IncrementalSnapshot,data:{source:t,positions:e}})),mouseInteractionCb:e=>Wt(Bt({type:Be.IncrementalSnapshot,data:Object.assign({source:We.MouseInteraction},e)})),scrollCb:B,viewportResizeCb:e=>Wt(Bt({type:Be.IncrementalSnapshot,data:Object.assign({source:We.ViewportResize},e)})),inputCb:e=>Wt(Bt({type:Be.IncrementalSnapshot,data:Object.assign({source:We.Input},e)})),mediaInteractionCb:e=>Wt(Bt({type:Be.IncrementalSnapshot,data:Object.assign({source:We.MediaInteraction},e)})),styleSheetRuleCb:e=>Wt(Bt({type:Be.IncrementalSnapshot,data:Object.assign({source:We.StyleSheetRule},e)})),styleDeclarationCb:e=>Wt(Bt({type:Be.IncrementalSnapshot,data:Object.assign({source:We.StyleDeclaration},e)})),canvasMutationCb:W,fontCb:e=>Wt(Bt({type:Be.IncrementalSnapshot,data:Object.assign({source:We.Font},e)})),selectionCb:e=>{Wt(Bt({type:Be.IncrementalSnapshot,data:Object.assign({source:We.Selection},e)}))},blockClass:o,ignoreClass:i,maskTextClass:a,maskTextSelector:l,maskInputOptions:N,inlineStylesheet:c,sampling:I,recordCanvas:v,inlineImages:k,userTriggeredOnInput:S,collectFonts:A,doc:e,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:M,blockSelector:s,slimDOMOptions:R,dataURLOptions:C,mirror:Vt,iframeManager:Z,stylesheetManager:U,shadowDomManager:G,canvasManager:Zt,ignoreCSSAttributes:x,plugins:(null===(t=null==w?void 0:w.filter((e=>e.observer)))||void 0===t?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>Wt(Bt({type:Be.Plugin,data:{plugin:e.name,payload:t}}))}))))||[]},g)};Z.addLoadListener((n=>{e.push(t(n.contentDocument))}));const n=()=>{Ut(),e.push(t(document)),Gt=!0};return"interactive"===document.readyState||"complete"===document.readyState?n():e.push(ve("load",(()=>{Wt(Bt({type:Be.Load,data:{}})),n()}),window)),()=>{e.forEach((e=>e())),Gt=!1}}catch(e){console.warn(e)}}Kt.addCustomEvent=(e,t)=>{if(!Gt)throw new Error("please add custom event after start recording");Wt(Bt({type:Be.Custom,data:{tag:e,payload:t}}))},Kt.freezePage=()=>{He.forEach((e=>e.freeze()))},Kt.takeFullSnapshot=e=>{if(!Gt)throw new Error("please take full snapshot after start recording");Ut(e)},Kt.mirror=Vt;class _t{constructor(e){this.buffer=[],this.index=0,this.visibilityHandler=()=>{this.handleVisibilityChange()},document.addEventListener("visibilitychange",this.visibilityHandler,!0),this.timerHandle=setInterval((()=>{2!==this.buffer.length&&(this.recordCapture(),this.restartCapture())}),e.intervalMs),this.startCapture()}register(e,t){this.telemetry=e,this.sessionId=t}unregister(){var e;null===(e=this.stopper)||void 0===e||e.call(this),this.telemetry=void 0,document.removeEventListener("visibilitychange",this.visibilityHandler),clearInterval(this.timerHandle)}handleVisibilityChange(){"hidden"===document.visibilityState&&(this.recordCapture(),this.restartCapture())}recordCapture(){this.telemetry&&this.sessionId&&this.telemetry.captureSession({id:this.sessionId,events:[...this.buffer],index:this.index}),this.index+=1}startCapture(){const{buffer:e}=this;this.stopper=Kt({emit:t=>{e.push(t)}})}restartCapture(){var e;null===(e=this.stopper)||void 0===e||e.call(this),this.buffer.length=0,this.startCapture()}}class Pt{constructor(e){this.content=[],this.size=e}push(e){this.content.length<this.size&&this.content.push(e)}hasSpace(){return this.content.length<this.size}isPopulated(){return 0!==this.content.length}clear(){this.content=[]}}class Yt{constructor(e,t){this.buffers=[],this.writePointer=0,this.headPointer=0;for(let n=0;n<t;n+=1)this.buffers.push(new Pt(e))}push(e){const t=this.buffers[this.writePointer];if(!t.hasSpace())return this.writePointer<this.buffers.length-1?this.writePointer+=1:this.writePointer=0,this.buffers[this.writePointer].clear(),this.writePointer===this.headPointer&&(this.headPointer+=1,this.headPointer>=this.buffers.length-1&&(this.headPointer=0)),void this.push(e);t.push(e)}toArray(){const e=[],t=this.buffers.reduce(((e,t)=>t.isPopulated()?e+1:e),0);for(let n=this.headPointer;n<this.headPointer+t;n+=1){const t=n%this.buffers.length;e.push(...this.buffers[t].content)}return e}reset(){this.writePointer=0,this.headPointer=0,this.buffers.forEach((e=>e.clear()))}}class zt{constructor(e){this.options=e,this.index=0,this.buffer=new Yt(e.eventSegmentLength,e.segmentBufferLength),this.startCapture()}startCapture(){this.stopper=Kt({checkoutEveryNth:this.options.eventSegmentLength,emit:e=>{this.buffer.push(e)}})}register(e,t){this.telemetry=e,this.sessionId=t}unregister(){var e;null===(e=this.stopper)||void 0===e||e.call(this),this.telemetry=void 0}capture(){var e;this.telemetry&&this.sessionId&&(null===(e=this.telemetry)||void 0===e||e.captureSession({id:this.sessionId,events:this.buffer.toArray(),index:this.index})),this.index+=1,this.restartCapture()}restartCapture(){var e;this.buffer.reset(),null===(e=this.stopper)||void 0===e||e.call(this),this.startCapture()}}class jt{constructor(e){const t=null==e?void 0:e.capture;var n;"continuous"===(null==(n=t)?void 0:n.type)?this.impl=new _t(t):!function(e){return"rolling"===(null==e?void 0:e.type)}(t)?this.impl=new _t({type:"continuous",intervalMs:5e3}):this.impl=new zt(t)}register(e,t){this.impl.register(e,t)}unregister(){this.impl.unregister()}handleFlagUsed(e,t,n){Kt.addCustomEvent("flag-used",{key:e,detail:t})}handleFlagDetailChanged(e,t){Kt.addCustomEvent("flag-detail-changed",{key:e,detail:t})}handleErrorEvent(e,t){Kt.addCustomEvent("error",{name:e,message:t})}}function Jt(e,t){return null!=e?e:t}function Ht(e,t){if(!1===e)return{instrumentFetch:!1,instrumentXhr:!1};const n=(null==e?void 0:e.customUrlFilter)&&"function"==typeof(null==e?void 0:e.customUrlFilter)?e.customUrlFilter:void 0;return{instrumentFetch:Jt(null==e?void 0:e.instrumentFetch,t.instrumentFetch),instrumentXhr:Jt(null==e?void 0:e.instrumentFetch,t.instrumentXhr),customUrlFilter:n}}function Qt(e,t){var n,r,o;return{source:{beforeLines:Jt(null===(n=null==e?void 0:e.source)||void 0===n?void 0:n.beforeLines,t.source.beforeLines),afterLines:Jt(null===(r=null==e?void 0:e.source)||void 0===r?void 0:r.afterLines,t.source.afterLines),maxLineLength:Jt(null===(o=null==e?void 0:e.source)||void 0===o?void 0:o.maxLineLength,t.source.maxLineLength)}}}function Xt(e){const t=function(e){var t,n,r,o,s,i;const a={breadcrumbs:{maxBreadcrumbs:50,evaluations:!0,flagChange:!0,click:!0,keyboardInput:!0,http:{instrumentFetch:!0,instrumentXhr:!0}},stack:{source:{beforeLines:3,afterLines:3,maxLineLength:280}},maxPendingEvents:100,collectors:[]};return{breadcrumbs:{maxBreadcrumbs:Jt(null===(t=e.breadcrumbs)||void 0===t?void 0:t.maxBreadcrumbs,a.breadcrumbs.maxBreadcrumbs),evaluations:Jt(null===(n=e.breadcrumbs)||void 0===n?void 0:n.evaluations,a.breadcrumbs.evaluations),flagChange:Jt(null===(r=e.breadcrumbs)||void 0===r?void 0:r.flagChange,a.breadcrumbs.flagChange),click:Jt(null===(o=e.breadcrumbs)||void 0===o?void 0:o.click,a.breadcrumbs.click),keyboardInput:Jt(null===(s=e.breadcrumbs)||void 0===s?void 0:s.keyboardInput,a.breadcrumbs.keyboardInput),http:Ht(null===(i=e.breadcrumbs)||void 0===i?void 0:i.http,a.breadcrumbs.http)},stack:Qt(e.stack,a.stack),maxPendingEvents:Jt(e.maxPendingEvents,a.maxPendingEvents),collectors:[...Jt(e.collectors,a.collectors)]}}(e||{});return new P(t)}export{jt as SessionReplay,Xt as initializeTelemetry};
|
|
21
21
|
//# sourceMappingURL=bundle.es.js.map
|