@launchdarkly/browser-telemetry 0.0.3 → 0.0.5

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.
Files changed (31) hide show
  1. package/dist/cjs/bundle.cjs.js +7 -2
  2. package/dist/cjs/bundle.cjs.js.map +1 -1
  3. package/dist/cjs/package.json +1 -1
  4. package/dist/cjs/src/BrowserTelemetryImpl.d.ts.map +1 -1
  5. package/dist/cjs/src/collectors/rrweb/ContinuousReplay.d.ts +1 -1
  6. package/dist/cjs/src/collectors/rrweb/ContinuousReplay.d.ts.map +1 -1
  7. package/dist/cjs/src/collectors/rrweb/SessionReplay.d.ts.map +1 -1
  8. package/dist/cjs/src/stack/StackFrame.d.ts +25 -0
  9. package/dist/cjs/src/stack/StackFrame.d.ts.map +1 -0
  10. package/dist/cjs/src/stack/StackParser.d.ts +40 -0
  11. package/dist/cjs/src/stack/StackParser.d.ts.map +1 -0
  12. package/dist/cjs/src/stack/StackTrace.d.ts +5 -0
  13. package/dist/cjs/src/stack/StackTrace.d.ts.map +1 -0
  14. package/dist/esm/bundle.es.js +7 -2
  15. package/dist/esm/bundle.es.js.map +1 -1
  16. package/dist/esm/package.json +1 -1
  17. package/dist/esm/src/BrowserTelemetryImpl.d.ts.map +1 -1
  18. package/dist/esm/src/collectors/rrweb/ContinuousReplay.d.ts +1 -1
  19. package/dist/esm/src/collectors/rrweb/ContinuousReplay.d.ts.map +1 -1
  20. package/dist/esm/src/collectors/rrweb/SessionReplay.d.ts.map +1 -1
  21. package/dist/esm/src/stack/StackFrame.d.ts +25 -0
  22. package/dist/esm/src/stack/StackFrame.d.ts.map +1 -0
  23. package/dist/esm/src/stack/StackParser.d.ts +40 -0
  24. package/dist/esm/src/stack/StackParser.d.ts.map +1 -0
  25. package/dist/esm/src/stack/StackTrace.d.ts +5 -0
  26. package/dist/esm/src/stack/StackTrace.d.ts.map +1 -0
  27. package/package.json +3 -2
  28. package/dist/cjs/src/collectors/rrweb/patches.d.ts +0 -3
  29. package/dist/cjs/src/collectors/rrweb/patches.d.ts.map +0 -1
  30. package/dist/esm/src/collectors/rrweb/patches.d.ts +0 -3
  31. package/dist/esm/src/collectors/rrweb/patches.d.ts.map +0 -1
@@ -1,4 +1,9 @@
1
- "use strict";class e{constructor(){window.addEventListener("click",(e=>{var t;const r=function(e){try{return e.target}catch(e){return}}(e);r&&(null===(t=this.destination)||void 0===t||t.addBreadcrumb({type:"click",target:{id:r.id}}))}),!0)}register(e){this.destination=e}unregister(){this.destination=void 0}}class t{constructor(){window.addEventListener("error",(e=>{var t;null===(t=this.destination)||void 0===t||t.captureErrorEvent(e)}),!0)}register(e){this.destination=e}unregister(){this.destination=void 0}}class r{constructor(r){this.pendingEvents=[],this.breadcrumbs=[],this.inspectorInstances=[],this.collectors=[],this.collectors.push(new t),this.collectors.push(...r.collectors),this.maxPendingEvents=r.maxPendingEvents,this.maxBreadcrumbs=r.breadcrumbs.maxBreadcrumbs,r.breadcrumbs.click&&this.collectors.push(new e),this.collectors.forEach((e=>e.register(this)));const n=[];!function(e,t,r){e.breadcrumbs.evaluations&&t.push({type:"flag-used",name:"launchdarkly-browser-telemetry-flag-used",synchronous:!0,method(e,t,n){r.handleFlagUsed(e,t,n)}}),e.breadcrumbs.flagChange&&t.push({type:"flag-detail-changed",name:"launchdarkly-browser-telemetry-flag-used",synchronous:!0,method(e,t){r.handleFlagDetailChanged(e,t)}})}(r,n,this),this.inspectorInstances.push(...n)}register(e){this.client=e}inspectors(){return this.inspectorInstances}capture(e,t){var r;void 0===this.client&&(this.pendingEvents.push(e),this.pendingEvents.length>this.maxPendingEvents&&this.pendingEvents.shift()),null===(r=this.client)||void 0===r||r.track(`$ld:telemetry:${t}`,e)}captureError(e){this.capture({message:e.message,name:e.name,stack:e.stack,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,r){this.addBreadcrumb({type:"flag-evaluated",flagKey:e,value:t.value,timestamp:(new Date).getTime()}),this.dispatchFlagUsed(e,t,r)}handleFlagDetailChanged(e,t){this.addBreadcrumb({type:"flag-detail-changed",flagKey:e,detail:t}),this.dispatchFlagDetailChanged(e,t)}dispatchError(e){this.collectors.forEach((t=>{var r;null===(r=t.handleErrorEvent)||void 0===r||r.call(t,e.name,e.message)}))}dispatchFlagUsed(e,t,r){this.collectors.forEach((n=>{var o;null===(o=n.handleFlagUsed)||void 0===o||o.call(n,e,t,r)}))}dispatchFlagDetailChanged(e,t){this.collectors.forEach((r=>{var n;null===(n=r.handleFlagDetailChanged)||void 0===n||n.call(r,e,t)}))}}var n;function o(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function s(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function i(e){try{var t=e.rules||e.cssRules;return t?((r=Array.from(t).map(a).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),r):null}catch(e){return null}var r}function a(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=i(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"}(n||(n={}));var l=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var r=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=r?r:-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,r=this.getId(e);this.idNodeMap.delete(r),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 r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function c(e){var t=e.maskInputOptions,r=e.tagName,n=e.type,o=e.value,s=e.maskInputFn,i=o||"";return(t[r.toLowerCase()]||t[n])&&(i=s?s(i):"*".repeat(i.length)),i}var d="__rrweb_original__";var u,h,p=1,g=new RegExp("[^a-z0-9-_:]"),m=-2;function I(){return p++}var C=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,f=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,y=/^(data:)([^,]*),(.*)/i;function b(e,t){return(e||"").replace(C,(function(e,r,n,o,s,i){var a,l=n||s||i,c=r||o||"";if(!l)return e;if(!f.test(l))return"url(".concat(c).concat(l).concat(c,")");if(y.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 d=t.split("/"),u=l.split("/");d.pop();for(var h=0,p=u;h<p.length;h++){var g=p[h];"."!==g&&(".."===g?d.pop():d.push(g))}return"url(".concat(c).concat(d.join("/")).concat(c,")")}))}var v=/^[^ \t\n\r\u000c]+/,S=/^[, \t\n\r\u000c]+/;function A(e,t){if(!t||""===t.trim())return t;var r=e.createElement("a");return r.href=t,r.href}function k(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function w(){var e=document.createElement("a");return e.href="",e.href}function M(e,t,r,n){return"src"===r||"href"===r&&n&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&n&&"#"!==n[0]?A(e,n):"background"!==r||!n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r&&n?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,o=e.exec(t.substring(r));return o?(n=o[0],r+=n.length,n):""}for(var o=[];n(S),!(r>=t.length);){var s=n(v);if(","===s.slice(-1))s=A(e,s.substring(0,s.length-1)),o.push(s);else{var i="";s=A(e,s);for(var a=!1;;){var l=t.charAt(r);if(""===l){o.push((s+i).trim());break}if(a)")"===l&&(a=!1);else{if(","===l){r+=1,o.push((s+i).trim());break}"("===l&&(a=!0)}i+=l,r+=1}}}return o.join(", ")}(e,n):"style"===r&&n?b(n,w()):"object"===t&&"data"===r&&n?A(e,n):n:A(e,n)}function T(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&T(e.parentNode,t,r);for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}return!!r&&T(e.parentNode,t,r)}function E(e,t,r){var n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===n)return!1;if("string"==typeof t){if(n.classList.contains(t))return!0;if(n.closest(".".concat(t)))return!0}else if(T(n,t,!0))return!0;if(r){if(n.matches(r))return!0;if(n.closest(r))return!0}return!1}function R(e,t){var r=t.doc,o=t.mirror,s=t.blockClass,a=t.blockSelector,l=t.maskTextClass,p=t.maskTextSelector,m=t.inlineStylesheet,I=t.maskInputOptions,C=void 0===I?{}:I,f=t.maskTextFn,y=t.maskInputFn,v=t.dataURLOptions,S=void 0===v?{}:v,A=t.inlineImages,T=t.recordCanvas,R=t.keepIframeSrcFn,N=t.newlyAddedElement,O=void 0!==N&&N,x=function(e,t){if(!t.hasNode(e))return;var r=t.getId(e);return 1===r?void 0:r}(r,o);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:n.Document,childNodes:[],compatMode:e.compatMode}:{type:n.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:n.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:x};case e.ELEMENT_NODE:return function(e,t){for(var r=t.doc,o=t.blockClass,s=t.blockSelector,a=t.inlineStylesheet,l=t.maskInputOptions,p=void 0===l?{}:l,m=t.maskInputFn,I=t.dataURLOptions,C=void 0===I?{}:I,f=t.inlineImages,y=t.recordCanvas,v=t.keepIframeSrcFn,S=t.newlyAddedElement,A=void 0!==S&&S,T=t.rootId,E=function(e,t,r){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}return!!r&&e.matches(r)}(e,o,s),R=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return g.test(t)?"div":t}(e),N={},O=e.attributes.length,x=0;x<O;x++){var F=e.attributes[x];N[F.name]=M(r,R,F.name,F.value)}if("link"===R&&a){var L=Array.from(r.styleSheets).find((function(t){return t.href===e.href})),D=null;L&&(D=i(L)),D&&(delete N.rel,delete N.href,N._cssText=b(D,L.href))}if("style"===R&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){(D=i(e.sheet))&&(N._cssText=b(D,w()))}if("input"===R||"textarea"===R||"select"===R){var B=e.value,W=e.checked;"radio"!==N.type&&"checkbox"!==N.type&&"submit"!==N.type&&"button"!==N.type&&B?N.value=c({type:N.type,tagName:R,value:B,maskInputOptions:p,maskInputFn:m}):W&&(N.checked=W)}"option"===R&&(e.selected&&!p.select?N.selected=!0:delete N.selected);if("canvas"===R&&y)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r<e.width;r+=50)for(var n=0;n<e.height;n+=50){var o=t.getImageData,s=d in o?o[d]:o;if(new Uint32Array(s.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(e)||(N.rr_dataURL=e.toDataURL(C.type,C.quality));else if(!("__context"in e)){var Z=e.toDataURL(C.type,C.quality),G=document.createElement("canvas");G.width=e.width,G.height=e.height,Z!==G.toDataURL(C.type,C.quality)&&(N.rr_dataURL=Z)}if("img"===R&&f){u||(u=r.createElement("canvas"),h=u.getContext("2d"));var V=e,U=V.crossOrigin;V.crossOrigin="anonymous";var K=function(){try{u.width=V.naturalWidth,u.height=V.naturalHeight,h.drawImage(V,0,0),N.rr_dataURL=u.toDataURL(C.type,C.quality)}catch(e){console.warn("Cannot inline img src=".concat(V.currentSrc,"! Error: ").concat(e))}U?N.crossOrigin=U:V.removeAttribute("crossorigin")};V.complete&&0!==V.naturalWidth?K():V.onload=K}"audio"!==R&&"video"!==R||(N.rr_mediaState=e.paused?"paused":"played",N.rr_mediaCurrentTime=e.currentTime);A||(e.scrollLeft&&(N.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(N.rr_scrollTop=e.scrollTop));if(E){var Y=e.getBoundingClientRect(),_=Y.width,P=Y.height;N={class:N.class,rr_width:"".concat(_,"px"),rr_height:"".concat(P,"px")}}"iframe"!==R||v(N.src)||(e.contentDocument||(N.rr_src=N.src),delete N.src);return{type:n.Element,tagName:R,attributes:N,childNodes:[],isSVG:k(e)||void 0,needBlock:E,rootId:T}}(e,{doc:r,blockClass:s,blockSelector:a,inlineStylesheet:m,maskInputOptions:C,maskInputFn:y,dataURLOptions:S,inlineImages:A,recordCanvas:T,keepIframeSrcFn:R,newlyAddedElement:O,rootId:x});case e.TEXT_NODE:return function(e,t){var r,o=t.maskTextClass,s=t.maskTextSelector,i=t.maskTextFn,a=t.rootId,l=e.parentNode&&e.parentNode.tagName,c=e.textContent,d="STYLE"===l||void 0,u="SCRIPT"===l||void 0;if(d&&c){try{e.nextSibling||e.previousSibling||(null===(r=e.parentNode.sheet)||void 0===r?void 0:r.cssRules)&&(c=(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)}c=b(c,w())}var h;u&&(c="SCRIPT_PLACEHOLDER");!d&&!u&&c&&E(e,o,s)&&(c=i?i(c):c.replace(/[\S]/g,"*"));return{type:n.Text,textContent:c||"",isStyle:d,rootId:a}}(e,{maskTextClass:l,maskTextSelector:p,maskTextFn:f,rootId:x});case e.CDATA_SECTION_NODE:return{type:n.CDATA,textContent:"",rootId:x};case e.COMMENT_NODE:return{type:n.Comment,textContent:e.textContent||"",rootId:x};default:return!1}}function N(e){return void 0===e?"":e.toLowerCase()}function O(e,t){var r,i=t.doc,a=t.mirror,l=t.blockClass,c=t.blockSelector,d=t.maskTextClass,u=t.maskTextSelector,h=t.skipChild,p=void 0!==h&&h,g=t.inlineStylesheet,C=void 0===g||g,f=t.maskInputOptions,y=void 0===f?{}:f,b=t.maskTextFn,v=t.maskInputFn,S=t.slimDOMOptions,A=t.dataURLOptions,k=void 0===A?{}:A,w=t.inlineImages,M=void 0!==w&&w,T=t.recordCanvas,E=void 0!==T&&T,x=t.onSerialize,F=t.onIframeLoad,L=t.iframeLoadTimeout,D=void 0===L?5e3:L,B=t.onStylesheetLoad,W=t.stylesheetLoadTimeout,Z=void 0===W?5e3:W,G=t.keepIframeSrcFn,V=void 0===G?function(){return!1}:G,U=t.newlyAddedElement,K=void 0!==U&&U,Y=t.preserveWhiteSpace,_=void 0===Y||Y,P=R(e,{doc:i,mirror:a,blockClass:l,blockSelector:c,maskTextClass:d,maskTextSelector:u,inlineStylesheet:C,maskInputOptions:y,maskTextFn:b,maskInputFn:v,dataURLOptions:k,inlineImages:M,recordCanvas:E,keepIframeSrcFn:V,newlyAddedElement:K});if(!P)return console.warn(e,"not serialized"),null;r=a.hasNode(e)?a.getId(e):!function(e,t){if(t.comment&&e.type===n.Comment)return!0;if(e.type===n.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&&(N(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===N(e.attributes.name)||"icon"===N(e.attributes.rel)||"apple-touch-icon"===N(e.attributes.rel)||"shortcut icon"===N(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&N(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(N(e.attributes.property).match(/^(og|twitter|fb):/)||N(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===N(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===N(e.attributes.name)||"googlebot"===N(e.attributes.name)||"bingbot"===N(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===N(e.attributes.name)||"generator"===N(e.attributes.name)||"framework"===N(e.attributes.name)||"publisher"===N(e.attributes.name)||"progid"===N(e.attributes.name)||N(e.attributes.property).match(/^article:/)||N(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===N(e.attributes.name)||"yandex-verification"===N(e.attributes.name)||"csrf-token"===N(e.attributes.name)||"p:domain_verify"===N(e.attributes.name)||"verify-v1"===N(e.attributes.name)||"verification"===N(e.attributes.name)||"shopify-checkout-api-token"===N(e.attributes.name)))return!0}}return!1}(P,S)&&(_||P.type!==n.Text||P.isStyle||P.textContent.replace(/^\s+|\s+$/gm,"").length)?I():m;var z=Object.assign(P,{id:r});if(a.add(e,z),r===m)return null;x&&x(e);var H=!p;if(z.type===n.Element){H=H&&!z.needBlock,delete z.needBlock;var J=e.shadowRoot;J&&s(J)&&(z.isShadowHost=!0)}if((z.type===n.Document||z.type===n.Element)&&H){S.headWhitespace&&z.type===n.Element&&"head"===z.tagName&&(_=!1);for(var Q={doc:i,mirror:a,blockClass:l,blockSelector:c,maskTextClass:d,maskTextSelector:u,skipChild:p,inlineStylesheet:C,maskInputOptions:y,maskTextFn:b,maskInputFn:v,slimDOMOptions:S,dataURLOptions:k,inlineImages:M,recordCanvas:E,preserveWhiteSpace:_,onSerialize:x,onIframeLoad:F,iframeLoadTimeout:D,onStylesheetLoad:B,stylesheetLoadTimeout:Z,keepIframeSrcFn:V},X=0,j=Array.from(e.childNodes);X<j.length;X++){(ee=O(j[X],Q))&&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=O($[q],Q))&&(s(e.shadowRoot)&&(ee.isShadow=!0),z.childNodes.push(ee))}}return e.parentNode&&o(e.parentNode)&&s(e.parentNode)&&(z.isShadow=!0),z.type===n.Element&&"iframe"===z.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var o,s=!1;try{o=n.document.readyState}catch(e){return}if("complete"===o){var i="about:blank";if(n.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)}),r);e.addEventListener("load",(function(){clearTimeout(a),s=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&F){var r=O(t,{doc:t,mirror:a,blockClass:l,blockSelector:c,maskTextClass:d,maskTextSelector:u,skipChild:!1,inlineStylesheet:C,maskInputOptions:y,maskTextFn:b,maskInputFn:v,slimDOMOptions:S,dataURLOptions:k,inlineImages:M,recordCanvas:E,preserveWhiteSpace:_,onSerialize:x,onIframeLoad:F,iframeLoadTimeout:D,onStylesheetLoad:B,stylesheetLoadTimeout:Z,keepIframeSrcFn:V});r&&F(e,r)}}),D),z.type===n.Element&&"link"===z.tagName&&"stylesheet"===z.attributes.rel&&function(e,t,r){var n,o=!1;try{n=e.sheet}catch(e){return}if(!n){var s=setTimeout((function(){o||(t(),o=!0)}),r);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}(e,(function(){if(B){var t=O(e,{doc:i,mirror:a,blockClass:l,blockSelector:c,maskTextClass:d,maskTextSelector:u,skipChild:!1,inlineStylesheet:C,maskInputOptions:y,maskTextFn:b,maskInputFn:v,slimDOMOptions:S,dataURLOptions:k,inlineImages:M,recordCanvas:E,preserveWhiteSpace:_,onSerialize:x,onIframeLoad:F,iframeLoadTimeout:D,onStylesheetLoad:B,stylesheetLoadTimeout:Z,keepIframeSrcFn:V});t&&B(e,t)}}),Z),z}function x(e,t,r=document){const n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}const F="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 L={map:{},getId:()=>(console.error(F),-1),getNode:()=>(console.error(F),null),removeNodeFromMap(){console.error(F)},has:()=>(console.error(F),!1),reset(){console.error(F)}};function D(e,t,r={}){let n=null,o=0;return function(...s){const i=Date.now();o||!1!==r.leading||(o=i);const a=t-(i-o),l=this;a<=0||a>t?(n&&(clearTimeout(n),n=null),o=i,e.apply(l,s)):n||!1===r.trailing||(n=setTimeout((()=>{o=!1===r.leading?0:Date.now(),n=null,e.apply(l,s)}),a))}}function B(e,t,r,n,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,n?r:{set(e){setTimeout((()=>{r.set.call(this,e)}),0),s&&s.set&&s.set.call(this,e)}}),()=>B(e,t,s||{},!0)}function W(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],o=r(n);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,()=>{e[t]=n}}catch(e){return()=>{}}}function Z(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function G(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function V(e,t,r,n){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(n&&null!==o.closest("."+t))return!0}else if(T(o,t,n))return!0;if(r){if(e.matches(r))return!0;if(n&&null!==o.closest(r))return!0}return!1}function U(e,t){return t.getId(e)===m}function K(e,t){if(o(e))return!1;const r=t.getId(e);return!t.has(r)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||K(e.parentNode,t))}function Y(e){return Boolean(e.changedTouches)}function _(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function P(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function z(e){return Boolean(null==e?void 0:e.shadowRoot)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(L=new Proxy(L,{get:(e,t,r)=>("map"===t&&console.error(F),Reflect.get(e,t,r))}));class H{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 r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}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 J=(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))(J||{}),Q=(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))(Q||{}),X=(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))(X||{}),j=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(j||{});function q(e){return"__ln"in e}class ${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 r=0;r<e;r++)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&&q(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&q(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.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 ee=(e,t)=>`${e}@${t}`;class te{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 $,r=e=>{let t=e,r=m;for(;r===m;)t=t&&t.nextSibling,r=t&&this.mirror.getId(t);return r},n=n=>{var s,i,a,l;let c=null;(null===(i=null===(s=n.getRootNode)||void 0===s?void 0:s.call(n))||void 0===i?void 0:i.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&n.getRootNode().host&&(c=n.getRootNode().host);let d=c;for(;(null===(l=null===(a=null==d?void 0:d.getRootNode)||void 0===a?void 0:a.call(d))||void 0===l?void 0:l.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&d.getRootNode().host;)d=d.getRootNode().host;const u=!(this.doc.contains(n)||d&&this.doc.contains(d));if(!n.parentNode||u)return;const h=o(n.parentNode)?this.mirror.getId(c):this.mirror.getId(n.parentNode),p=r(n);if(-1===h||-1===p)return t.addNode(n);const g=O(n,{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=>{_(e,this.mirror)&&this.iframeManager.addIframe(e),P(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),z(n)&&this.shadowDomManager.addShadowRoot(n.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:h,nextId:p,node:g})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of Array.from(this.movedSet.values()))ne(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||n(e);for(const e of Array.from(this.addedSet.values()))se(this.droppedSet,e)||ne(this.removes,e,this.mirror)?se(this.movedSet,e)?n(e):this.droppedSet.add(e):n(e);let s=null;for(;t.length;){let e=null;if(s){const t=this.mirror.getId(s.value.parentNode),n=r(s.value);-1!==t&&-1!==n&&(e=s)}if(!e)for(let n=t.length-1;n>=0;n--){const o=t.get(n);if(o){const t=this.mirror.getId(o.value.parentNode);if(-1===r(o.value))continue;if(-1!==t){e=o;break}{const t=o.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=o;break}}}}}if(!e){for(;t.head;)t.removeNode(t.head.value);break}s=e.previous,t.removeNode(e.value),n(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(!U(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;V(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:E(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 r=e.target.getAttribute(e.attributeName);if("value"===e.attributeName&&(r=c({maskInputOptions:this.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),V(e.target,this.blockClass,this.blockSelector,!1)||r===e.oldValue)return;let n=this.attributes.find((t=>t.node===e.target));if("IFRAME"===t.tagName&&"src"===e.attributeName&&!this.keepIframeSrcFn(r)){if(t.contentDocument)return;e.attributeName="rr_src"}if(n||(n={node:e.target,attributes:{}},this.attributes.push(n)),"style"===e.attributeName){const r=this.doc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue),void 0!==n.attributes.style&&null!==n.attributes.style||(n.attributes.style={});const o=n.attributes.style;for(const e of Array.from(t.style)){const n=t.style.getPropertyValue(e),s=t.style.getPropertyPriority(e);n===r.style.getPropertyValue(e)&&s===r.style.getPropertyPriority(e)||(o[e]=""===s?n:[n,s])}for(const e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(o[e]=!1)}else n.attributes[e.attributeName]=M(this.doc,t.tagName,e.attributeName,r);break}case"childList":if(V(e.target,this.blockClass,this.blockSelector,!0))return;e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const r=this.mirror.getId(t),n=o(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);V(e.target,this.blockClass,this.blockSelector,!1)||U(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(re(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||K(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ee(r,n)]?re(this.movedSet,t):this.removes.push({parentId:n,id:r,isShadow:!(!o(e.target)||!s(e.target))||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(this.mirror.hasNode(e)){if(U(e,this.mirror))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[ee(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);V(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 re(e,t){e.delete(t),t.childNodes.forEach((t=>re(e,t)))}function ne(e,t,r){return 0!==e.length&&oe(e,t,r)}function oe(e,t,r){const{parentNode:n}=t;if(!n)return!1;const o=r.getId(n);return!!e.some((e=>e.id===o))||oe(e,n,r)}function se(e,t){return 0!==e.size&&ie(e,t)}function ie(e,t){const{parentNode:r}=t;return!!r&&(!!e.has(r)||ie(e,r))}const ae=[],le="undefined"!=typeof CSSGroupingRule,ce="undefined"!=typeof CSSMediaRule,de="undefined"!=typeof CSSSupportsRule,ue="undefined"!=typeof CSSConditionRule;function he(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 pe(e,t){var r,n;const o=new te;ae.push(o),o.init(e);let s=window.MutationObserver||window.__rrMutationObserver;const i=null===(n=null===(r=null===window||void 0===window?void 0:window.Zone)||void 0===r?void 0:r.__symbol__)||void 0===n?void 0:n.call(r,"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 ge({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,sampling:s}){if(!1===s.mouseInteraction)return()=>{};const i=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,a=[];return Object.keys(X).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==i[e])).forEach((s=>{const i=s.toLowerCase(),l=(t=>s=>{const i=he(s);if(V(i,n,o,!0))return;const a=Y(s)?s.changedTouches[0]:s;if(!a)return;const l=r.getId(i),{clientX:c,clientY:d}=a;e({type:X[t],id:l,x:c,y:d})})(s);a.push(x(i,l,t))})),()=>{a.forEach((e=>e()))}}function me({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,sampling:s}){return x("scroll",D((s=>{const i=he(s);if(!i||V(i,n,o,!0))return;const a=r.getId(i);if(i===t){const r=t.scrollingElement||t.documentElement;e({id:a,x:r.scrollLeft,y:r.scrollTop})}else e({id:a,x:i.scrollLeft,y:i.scrollTop})}),s.scroll||100),t)}function Ie(e,t){const r=Object.assign({},e);return t||delete r.userTriggered,r}const Ce=["INPUT","TEXTAREA","SELECT"],fe=new WeakMap;function ye(e){return function(e,t){if(le&&e.parentRule instanceof CSSGroupingRule||ce&&e.parentRule instanceof CSSMediaRule||de&&e.parentRule instanceof CSSSupportsRule||ue&&e.parentRule instanceof CSSConditionRule){const r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){const r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function be(e,t,r){let n,o;return e?(e.ownerNode?n=t.getId(e.ownerNode):o=r.getId(e),{styleId:o,id:n}):{}}function ve({mirror:e,stylesheetManager:t},r){var n,o,s;let i=null;i="#document"===r.nodeName?e.getId(r):e.getId(r.host);const a="#document"===r.nodeName?null===(n=r.defaultView)||void 0===n?void 0:n.Document:null===(s=null===(o=r.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(r,"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 r;const n=null===(r=l.set)||void 0===r?void 0:r.call(this,e);if(null!==i&&-1!==i)try{t.adoptStyleSheets(e,i)}catch(e){}return n}}),()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}):()=>{}}function Se(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};!function(e,t){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:o,scrollCb:s,viewportResizeCb:i,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:d,canvasMutationCb:u,fontCb:h,selectionCb:p}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),n(...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),d(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),u(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),h(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),p(...e)}}(e,t);const n=pe(e,e.doc),o=function({mousemoveCb:e,sampling:t,doc:r,mirror:n}){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=D((t=>{const r=Date.now()-i;e(a.map((e=>(e.timeOffset-=r,e))),t),a=[],i=null}),s),c=D((e=>{const t=he(e),{clientX:r,clientY:o}=Y(e)?e.changedTouches[0]:e;i||(i=Date.now()),a.push({x:r,y:o,id:n.getId(t),timeOffset:Date.now()-i}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?Q.Drag:e instanceof MouseEvent?Q.MouseMove:Q.TouchMove)}),o,{trailing:!1}),d=[x("mousemove",c,r),x("touchmove",c,r),x("drag",c,r)];return()=>{d.forEach((e=>e()))}}(e),s=ge(e),i=me(e),a=function({viewportResizeCb:e}){let t=-1,r=-1;return x("resize",D((()=>{const n=Z(),o=G();t===n&&r===o||(e({width:Number(o),height:Number(n)}),t=n,r=o)}),200),window)}(e),l=function({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,ignoreClass:s,maskInputOptions:i,maskInputFn:a,sampling:l,userTriggeredOnInput:d}){function u(e){let r=he(e);const l=e.isTrusted;if(r&&"OPTION"===r.tagName&&(r=r.parentElement),!r||!r.tagName||Ce.indexOf(r.tagName)<0||V(r,n,o,!0))return;const u=r.type;if(r.classList.contains(s))return;let p=r.value,g=!1;"radio"===u||"checkbox"===u?g=r.checked:(i[r.tagName.toLowerCase()]||i[u])&&(p=c({maskInputOptions:i,tagName:r.tagName,type:u,value:p,maskInputFn:a})),h(r,Ie({text:p,isChecked:g,userTriggered:l},d));const m=r.name;"radio"===u&&m&&g&&t.querySelectorAll(`input[type="radio"][name="${m}"]`).forEach((e=>{e!==r&&h(e,Ie({text:e.value,isChecked:!g,userTriggered:!1},d))}))}function h(t,n){const o=fe.get(t);if(!o||o.text!==n.text||o.isChecked!==n.isChecked){fe.set(t,n);const o=r.getId(t);e(Object.assign(Object.assign({},n),{id:o}))}}const p=("last"===l.input?["change"]:["input","change"]).map((e=>x(e,u,t))),g=t.defaultView;if(!g)return()=>{p.forEach((e=>e()))};const m=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),I=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&p.push(...I.map((e=>B(e[0],e[1],{set(){u({target:this})}},!1,g)))),()=>{p.forEach((e=>e()))}}(e),d=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:o}){const s=s=>D((o=>{const i=he(o);if(!i||V(i,t,r,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:d}=i;e({type:s,id:n.getId(i),currentTime:a,volume:l,muted:c,playbackRate:d})}),o.media||500),i=[x("play",s(0)),x("pause",s(1)),x("seeked",s(2)),x("volumechange",s(3)),x("ratechange",s(4))];return()=>{i.forEach((e=>e()))}}(e),u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){const o=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=function(n,s){const{id:i,styleId:a}=be(this,t,r.styleMirror);return(i&&-1!==i||a&&-1!==a)&&e({id:i,styleId:a,adds:[{rule:n,index:s}]}),o.apply(this,[n,s])};const s=n.CSSStyleSheet.prototype.deleteRule;let i,a;n.CSSStyleSheet.prototype.deleteRule=function(n){const{id:o,styleId:i}=be(this,t,r.styleMirror);return(o&&-1!==o||i&&-1!==i)&&e({id:o,styleId:i,removes:[{index:n}]}),s.apply(this,[n])},n.CSSStyleSheet.prototype.replace&&(i=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=function(n){const{id:o,styleId:s}=be(this,t,r.styleMirror);return(o&&-1!==o||s&&-1!==s)&&e({id:o,styleId:s,replace:n}),i.apply(this,[n])}),n.CSSStyleSheet.prototype.replaceSync&&(a=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=function(n){const{id:o,styleId:s}=be(this,t,r.styleMirror);return(o&&-1!==o||s&&-1!==s)&&e({id:o,styleId:s,replaceSync:n}),a.apply(this,[n])});const l={};le?l.CSSGroupingRule=n.CSSGroupingRule:(ce&&(l.CSSMediaRule=n.CSSMediaRule),ue&&(l.CSSConditionRule=n.CSSConditionRule),de&&(l.CSSSupportsRule=n.CSSSupportsRule));const c={};return Object.entries(l).forEach((([n,o])=>{c[n]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=function(o,s){const{id:i,styleId:a}=be(this.parentStyleSheet,t,r.styleMirror);return(i&&-1!==i||a&&-1!==a)&&e({id:i,styleId:a,adds:[{rule:o,index:[...ye(this),s||0]}]}),c[n].insertRule.apply(this,[o,s])},o.prototype.deleteRule=function(o){const{id:s,styleId:i}=be(this.parentStyleSheet,t,r.styleMirror);return(s&&-1!==s||i&&-1!==i)&&e({id:s,styleId:i,removes:[{index:[...ye(this),o]}]}),c[n].deleteRule.apply(this,[o])}})),()=>{n.CSSStyleSheet.prototype.insertRule=o,n.CSSStyleSheet.prototype.deleteRule=s,i&&(n.CSSStyleSheet.prototype.replace=i),a&&(n.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach((([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule}))}}(e,{win:r}),h=ve(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=function(o,i,a){var l;if(r.has(o))return s.apply(this,[o,i,a]);const{id:c,styleId:d}=be(null===(l=this.parentRule)||void 0===l?void 0:l.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||d&&-1!==d)&&e({id:c,styleId:d,set:{property:o,value:i,priority:a},index:ye(this.parentRule)}),s.apply(this,[o,i,a])};const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=function(o){var s;if(r.has(o))return i.apply(this,[o]);const{id:a,styleId:l}=be(null===(s=this.parentRule)||void 0===s?void 0:s.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,remove:{property:o},index:ye(this.parentRule)}),i.apply(this,[o])},()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i}}(e,{win:r}),g=e.collectFonts?function({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const n=[],o=new WeakMap,s=r.FontFace;r.FontFace=function(e,t,r){const n=new s(e,t,r);return o.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};const i=W(t.fonts,"add",(function(t){return function(r){return setTimeout((()=>{const t=o.get(r);t&&(e(t),o.delete(r))}),0),t.apply(this,[r])}}));return n.push((()=>{r.FontFace=s})),n.push(i),()=>{n.forEach((e=>e()))}}(e):()=>{},m=function(e){const{doc:t,mirror:r,blockClass:n,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:d}=s;V(i,n,o,!0)||V(c,n,o,!0)||a.push({start:r.getId(i),startOffset:l,end:r.getId(c),endOffset:d})}s({ranges:a})};return a(),x("selectionchange",a)}(e),I=[];for(const t of e.plugins)I.push(t.observer(t.callback,r,t.options));return()=>{ae.forEach((e=>e.reset())),n.disconnect(),o(),s(),i(),a(),l(),d(),u(),h(),p(),g(),m(),I.forEach((e=>e()))}}class Ae{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,r,n){const o=r||this.getIdToRemoteIdMap(e),s=n||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 r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,r,n)))}getRemoteId(e,t,r){const n=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const o=n.get(t);return o||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,r)))}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 ke{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Ae(I),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ae(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 r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(r=this.loadListener)||void 0===r||r.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 r=this.transformCrossOriginEvent(t,e.data.event);r&&this.wrappedEmit(r,e.data.isCheckout)}}transformCrossOriginEvent(e,t){var r;switch(t.type){case J.FullSnapshot:return this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e),{timestamp:t.timestamp,type:J.IncrementalSnapshot,data:{source:Q.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case J.Meta:case J.Load:case J.DomContentLoaded:return!1;case J.Plugin:return t;case J.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case J.IncrementalSnapshot:switch(t.data.source){case Q.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 Q.Drag:case Q.TouchMove:case Q.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case Q.ViewportResize:return!1;case Q.MediaInteraction:case Q.MouseInteraction:case Q.Scroll:case Q.CanvasMutation:case Q.Input:return this.replaceIds(t.data,e,["id"]),t;case Q.StyleSheetRule:case Q.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Q.Font:return t;case Q.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case Q.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(r=t.data.styles)||void 0===r||r.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}}replace(e,t,r,n){for(const o of n)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(r,t[o]):t[o]=e.getId(r,t[o]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}}class we{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(W(Element.prototype,"attachShadow",(function(e){return function(r){const n=e.call(this,r);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,this.ownerDocument),n}})))}addShadowRoot(e,t){s(e)&&(this.shadowDoms.has(e)||(this.shadowDoms.add(e),pe(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),me(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)),ve({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)}),0)))}observeAttachShadow(e){if(e.contentWindow){const t=this;this.restorePatches.push(W(e.contentWindow.HTMLElement.prototype,"attachShadow",(function(r){return function(n){const o=r.call(this,n);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),o}})))}}reset(){this.restorePatches.forEach((e=>e())),this.shadowDoms=new WeakSet}}
1
+ "use strict";class e{constructor(){window.addEventListener("click",(e=>{var t;const n=function(e){try{return e.target}catch(e){return}}(e);n&&(null===(t=this.destination)||void 0===t||t.addBreadcrumb({type:"click",target:{id:n.id}}))}),!0)}register(e){this.destination=e}unregister(){this.destination=void 0}}class t{constructor(){window.addEventListener("error",(e=>{var t;null===(t=this.destination)||void 0===t||t.captureErrorEvent(e)}),!0)}register(e){this.destination=e}unregister(){this.destination=void 0}}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o={exports:{}};
2
+ /**
3
+ * https://github.com/csnover/TraceKit
4
+ * @license MIT
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("<","(?:<|&lt;)").replace(">","(?:>|&gt;)").replace("&","(?:&|&amp;)").replace('"','(?:"|&quot;)').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}}
2
7
  /*! *****************************************************************************
3
8
  Copyright (c) Microsoft Corporation.
4
9
 
@@ -12,5 +17,5 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
17
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
18
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
19
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */function Me(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}l((n=n.apply(e,t||[])).next())}))}for(var Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ee="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Re=0;Re<64;Re++)Ee[Te.charCodeAt(Re)]=Re;const Ne=new Map;const Oe=(e,t,r)=>{if(!e||!Le(e,t)&&"object"!=typeof e)return;const n=function(e,t){let r=Ne.get(e);return r||(r=new Map,Ne.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name);let o=n.indexOf(e);return-1===o&&(o=n.length,n.push(e)),o};function xe(e,t,r){if(e instanceof Array)return e.map((e=>xe(e,t,r)));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,r=function(e){var t,r=new Uint8Array(e),n=r.length,o="";for(t=0;t<n;t+=3)o+=Te[r[t]>>2],o+=Te[(3&r[t])<<4|r[t+1]>>4],o+=Te[(15&r[t+1])<<2|r[t+2]>>6],o+=Te[63&r[t+2]];return n%3==2?o=o.substring(0,o.length-1)+"=":n%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e);return{rr_type:t,base64:r}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[xe(e.buffer,t,r),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:r}=e;return{rr_type:t,src:r}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[xe(e.data,t,r),e.width,e.height]}}if(Le(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Oe(e,t,r)}}return e}const Fe=(e,t,r)=>[...e].map((e=>xe(e,t,r))),Le=(e,t)=>{const r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(r.find((r=>e instanceof t[r])))};function De(e,t,r){const n=[];try{const o=W(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(n,...o){return V(this,t,r,!0)||"__context"in this||(this.__context=n),e.apply(this,[n,...o])}}));n.push(o)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach((e=>e()))}}function Be(e,t,r,n,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=W(e,s,(function(e){return function(...a){const l=e.apply(this,a);if(Oe(l,i,this),!V(this.canvas,n,o,!0)){const e=Fe([...a],i,this),n={type:t,property:s,args:e};r(this.canvas,n)}return l}}));a.push(l)}catch(n){const o=B(e,s,{set(e){r(this.canvas,{type:t,property:s,args:[e],setter:!0})}});a.push(o)}return a}var We=null;try{var Ze="undefined"!=typeof module&&"function"==typeof module.require&&module.require("worker_threads")||"function"==typeof __non_webpack_require__&&__non_webpack_require__("worker_threads")||"function"==typeof require&&require("worker_threads");We=Ze.Worker}catch(e){}function Ge(e,t,r){var n=void 0===t?null:t,o=function(e,t){return Buffer.from(e,"base64").toString(t?"utf16":"utf8")}(e,void 0!==r&&r),s=o.indexOf("\n",10)+1,i=o.substring(s)+(n?"//# sourceMappingURL="+n:"");return function(e){return new We(i,Object.assign({},e,{eval:!0}))}}function Ve(e,t,r){var n=void 0===t?null:t,o=function(e,t){var r=atob(e);if(t){for(var n=new Uint8Array(r.length),o=0,s=r.length;o<s;++o)n[o]=r.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(n.buffer))}return r}(e,void 0!==r&&r),s=o.indexOf("\n",10)+1,i=o.substring(s)+(n?"//# sourceMappingURL="+n:""),a=new Blob([i],{type:"application/javascript"});return URL.createObjectURL(a)}var Ue="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0);var Ke,Ye,_e,Pe=(Ke="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",Ye=null,_e=!1,Ue?Ge(Ke,Ye,_e):function(e,t,r){var n;return function(o){return n=n||Ve(e,t,r),new Worker(n,o)}}(Ke,Ye,_e));class ze{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:r,blockClass:n,blockSelector:o,recordCanvas:s,dataURLOptions:i}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,s&&"all"===t&&this.initCanvasMutationObserver(r,n,o),s&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,n,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,r,n,o){const s=De(t,r,n),i=new Map,a=new Pe;a.onmessage=e=>{const{id:t}=e.data;if(i.set(t,!1),!("base64"in e.data))return;const{base64:r,type:n,width:o,height:s}=e.data;this.mutationCb({id:t,type:j["2D"],commands:[{property:"clearRect",args:[0,0,o,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:n}]},0,0]}]})};const l=1e3/e;let c,d=0;const u=e=>{d&&e-d<l||(d=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach((t=>{V(t,r,n,!0)||e.push(t)})),e})().forEach((e=>Me(this,void 0,void 0,(function*(){var t;const r=this.mirror.getId(e);if(i.get(r))return;if(i.set(r,!0),["webgl","webgl2"].includes(e.__context)){const r=e.getContext(e.__context);!1===(null===(t=null==r?void 0:r.getContextAttributes())||void 0===t?void 0:t.preserveDrawingBuffer)&&(null==r||r.clear(r.COLOR_BUFFER_BIT))}const n=yield createImageBitmap(e);a.postMessage({id:r,bitmap:n,width:e.width,height:e.height,dataURLOptions:o.dataURLOptions},[n])}))))),c=requestAnimationFrame(u)};c=requestAnimationFrame(u),this.resetObservers=()=>{s(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const n=De(e,t,r),o=function(e,t,r,n){const o=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const i of s)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[i])continue;const s=W(t.CanvasRenderingContext2D.prototype,i,(function(o){return function(...s){return V(this.canvas,r,n,!0)||setTimeout((()=>{const r=Fe([...s],t,this);e(this.canvas,{type:j["2D"],property:i,args:r})}),0),o.apply(this,s)}}));o.push(s)}catch(r){const n=B(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:j["2D"],property:i,args:[t],setter:!0})}});o.push(n)}return()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r),s=function(e,t,r,n,o){const s=[];return s.push(...Be(t.WebGLRenderingContext.prototype,j.WebGL,e,r,n,0,t)),void 0!==t.WebGL2RenderingContext&&s.push(...Be(t.WebGL2RenderingContext.prototype,j.WebGL2,e,r,n,0,t)),()=>{s.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r,this.mirror);this.resetObservers=()=>{n(),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 r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;const n=r.map((e=>{const t=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["type"]);return t})),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:n}),this.pendingCanvasMutations.delete(e)}}class He{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new H,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 r={id:t,styleIds:[]},n=[];for(const t of e){let e;if(this.styleMirror.has(t))e=this.styleMirror.getId(t);else{e=this.styleMirror.add(t);const r=Array.from(t.rules||CSSRule);n.push({styleId:e,rules:r.map(((e,t)=>({rule:a(e),index:t})))})}r.styleIds.push(e)}n.length>0&&(r.styles=n),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}function Je(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}let Qe,Xe,je,qe=!1;const $e=new l;function et(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:o="rr-block",blockSelector:s=null,ignoreClass:i="rr-ignore",maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:d=!0,maskAllInputs:u,maskInputOptions:h,slimDOMOptions:p,maskInputFn:g,maskTextFn:m,hooks:I,packFn:C,sampling:f={},dataURLOptions:y={},mousemoveWait:b,recordCanvas:v=!1,recordCrossOriginIframes:S=!1,userTriggeredOnInput:A=!1,collectFonts:k=!1,inlineImages:w=!1,plugins:M,keepIframeSrcFn:T=(()=>!1),ignoreCSSAttributes:E=new Set([])}=e,R=!S||window.parent===window;let N=!1;if(!R)try{window.parent.document,N=!1}catch(e){N=!0}if(R&&!t)throw new Error("emit function is required");void 0!==b&&void 0===f.mousemove&&(f.mousemove=b),$e.reset();const F=!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!==h?h:{password:!0},L=!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===p,headMetaDescKeywords:"all"===p}:p||{};let D;!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 B=0;const W=e=>{for(const t of M||[])t.eventProcessor&&(e=t.eventProcessor(e));return C&&(e=C(e)),e};Qe=(e,o)=>{var s;if(!(null===(s=ae[0])||void 0===s?void 0:s.isFrozen())||e.type===J.FullSnapshot||e.type===J.IncrementalSnapshot&&e.data.source===Q.Mutation||ae.forEach((e=>e.unfreeze())),R)null==t||t(W(e),o);else if(N){const t={type:"rrweb",event:W(e),isCheckout:o};window.parent.postMessage(t,"*")}if(e.type===J.FullSnapshot)D=e,B=0;else if(e.type===J.IncrementalSnapshot){if(e.data.source===Q.Mutation&&e.data.isAttachIframe)return;B++;const t=n&&B>=n,o=r&&e.timestamp-D.timestamp>r;(t||o)&&Xe(!0)}};const V=e=>{Qe(Je({type:J.IncrementalSnapshot,data:Object.assign({source:Q.Mutation},e)}))},U=e=>Qe(Je({type:J.IncrementalSnapshot,data:Object.assign({source:Q.Scroll},e)})),K=e=>Qe(Je({type:J.IncrementalSnapshot,data:Object.assign({source:Q.CanvasMutation},e)})),Y=new He({mutationCb:V,adoptedStyleSheetCb:e=>Qe(Je({type:J.IncrementalSnapshot,data:Object.assign({source:Q.AdoptedStyleSheet},e)}))}),H=new ke({mirror:$e,mutationCb:V,stylesheetManager:Y,recordCrossOriginIframes:S,wrappedEmit:Qe});for(const e of M||[])e.getMirror&&e.getMirror({nodeMirror:$e,crossOriginIframeMirror:H.crossOriginIframeMirror,crossOriginIframeStyleMirror:H.crossOriginIframeStyleMirror});je=new ze({recordCanvas:v,mutationCb:K,win:window,blockClass:o,blockSelector:s,mirror:$e,sampling:f.canvas,dataURLOptions:y});const X=new we({mutationCb:V,scrollCb:U,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:c,inlineStylesheet:d,maskInputOptions:F,dataURLOptions:y,maskTextFn:m,maskInputFn:g,recordCanvas:v,inlineImages:w,sampling:f,slimDOMOptions:L,iframeManager:H,stylesheetManager:Y,canvasManager:je,keepIframeSrcFn:T},mirror:$e});Xe=(e=!1)=>{var t,r,n,i,u,h;Qe(Je({type:J.Meta,data:{href:window.location.href,width:G(),height:Z()}}),e),Y.reset(),ae.forEach((e=>e.lock()));const p=function(e,t){var r=t||{},n=r.mirror,o=void 0===n?new l:n,s=r.blockClass,i=void 0===s?"rr-block":s,a=r.blockSelector,c=void 0===a?null:a,d=r.maskTextClass,u=void 0===d?"rr-mask":d,h=r.maskTextSelector,p=void 0===h?null:h,g=r.inlineStylesheet,m=void 0===g||g,I=r.inlineImages,C=void 0!==I&&I,f=r.recordCanvas,y=void 0!==f&&f,b=r.maskAllInputs,v=void 0!==b&&b,S=r.maskTextFn,A=r.maskInputFn,k=r.slimDOM,w=void 0!==k&&k,M=r.dataURLOptions,T=r.preserveWhiteSpace,E=r.onSerialize,R=r.onIframeLoad,N=r.iframeLoadTimeout,x=r.onStylesheetLoad,F=r.stylesheetLoadTimeout,L=r.keepIframeSrcFn;return O(e,{doc:e,mirror:o,blockClass:i,blockSelector:c,maskTextClass:u,maskTextSelector:p,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: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:C,recordCanvas:y,preserveWhiteSpace:T,onSerialize:E,onIframeLoad:R,iframeLoadTimeout:N,onStylesheetLoad:x,stylesheetLoadTimeout:F,keepIframeSrcFn:void 0===L?function(){return!1}:L,newlyAddedElement:!1})}(document,{mirror:$e,blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:c,inlineStylesheet:d,maskAllInputs:F,maskTextFn:m,slimDOM:L,dataURLOptions:y,recordCanvas:v,inlineImages:w,onSerialize:e=>{_(e,$e)&&H.addIframe(e),P(e,$e)&&Y.trackLinkElement(e),z(e)&&X.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{H.attachIframe(e,t),X.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Y.attachLinkElement(e,t)},keepIframeSrcFn:T});if(!p)return console.warn("Failed to snapshot the document");Qe(Je({type:J.FullSnapshot,data:{node:p,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(r=null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.parentElement)||void 0===r?void 0:r.scrollLeft)||(null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.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===(h=null===document||void 0===document?void 0:document.body)||void 0===h?void 0:h.scrollTop)||0}}})),ae.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Y.adoptStyleSheets(document.adoptedStyleSheets,$e.getId(document))};try{const e=[];e.push(x("DOMContentLoaded",(()=>{Qe(Je({type:J.DomContentLoaded,data:{}}))})));const t=e=>{var t;return Se({mutationCb:V,mousemoveCb:(e,t)=>Qe(Je({type:J.IncrementalSnapshot,data:{source:t,positions:e}})),mouseInteractionCb:e=>Qe(Je({type:J.IncrementalSnapshot,data:Object.assign({source:Q.MouseInteraction},e)})),scrollCb:U,viewportResizeCb:e=>Qe(Je({type:J.IncrementalSnapshot,data:Object.assign({source:Q.ViewportResize},e)})),inputCb:e=>Qe(Je({type:J.IncrementalSnapshot,data:Object.assign({source:Q.Input},e)})),mediaInteractionCb:e=>Qe(Je({type:J.IncrementalSnapshot,data:Object.assign({source:Q.MediaInteraction},e)})),styleSheetRuleCb:e=>Qe(Je({type:J.IncrementalSnapshot,data:Object.assign({source:Q.StyleSheetRule},e)})),styleDeclarationCb:e=>Qe(Je({type:J.IncrementalSnapshot,data:Object.assign({source:Q.StyleDeclaration},e)})),canvasMutationCb:K,fontCb:e=>Qe(Je({type:J.IncrementalSnapshot,data:Object.assign({source:Q.Font},e)})),selectionCb:e=>{Qe(Je({type:J.IncrementalSnapshot,data:Object.assign({source:Q.Selection},e)}))},blockClass:o,ignoreClass:i,maskTextClass:a,maskTextSelector:c,maskInputOptions:F,inlineStylesheet:d,sampling:f,recordCanvas:v,inlineImages:w,userTriggeredOnInput:A,collectFonts:k,doc:e,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:T,blockSelector:s,slimDOMOptions:L,dataURLOptions:y,mirror:$e,iframeManager:H,stylesheetManager:Y,shadowDomManager:X,canvasManager:je,ignoreCSSAttributes:E,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=>Qe(Je({type:J.Plugin,data:{plugin:e.name,payload:t}}))}))))||[]},I)};H.addLoadListener((r=>{e.push(t(r.contentDocument))}));const r=()=>{Xe(),e.push(t(document)),qe=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():e.push(x("load",(()=>{Qe(Je({type:J.Load,data:{}})),r()}),window)),()=>{e.forEach((e=>e())),qe=!1}}catch(e){console.warn(e)}}et.addCustomEvent=(e,t)=>{if(!qe)throw new Error("please add custom event after start recording");Qe(Je({type:J.Custom,data:{tag:e,payload:t}}))},et.freezePage=()=>{ae.forEach((e=>e.freeze()))},et.takeFullSnapshot=e=>{if(!qe)throw new Error("please take full snapshot after start recording");Xe(e)},et.mirror=$e;const tt=crypto.randomUUID(),rt=`session-id/${tt}`;class nt extends XMLHttpRequest{constructor(){super(...arguments),this.tagsHeaderSet=!1,this.isLikelyLdSdk=!1}setRequestHeader(e,t){"x-launchdarkly-user-agent"===e.toLowerCase()&&(this.isLikelyLdSdk=!0);const r="x-launchdarkly-tags"===e,n=r?`${t} ${rt}`:t;super.setRequestHeader(e,n),r&&(this.tagsHeaderSet=!0)}send(e){!this.tagsHeaderSet&&this.isLikelyLdSdk&&super.setRequestHeader("x-launchdarkly-tags",rt),super.send(e)}}class ot{constructor(e){this.options=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){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:tt,events:[...this.buffer],index:this.index}),this.index+=1}startCapture(){const{buffer:e}=this;this.stopper=et({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 st{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 it{constructor(e,t){this.buffers=[],this.writePointer=0,this.headPointer=0;for(let r=0;r<t;r+=1)this.buffers.push(new st(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 r=this.headPointer;r<this.headPointer+t;r+=1){const t=r%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 at{constructor(e){this.options=e,this.index=0,this.buffer=new it(e.eventSegmentLength,e.segmentBufferLength),this.startCapture()}startCapture(){this.stopper=et({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()}}function lt(e,t){return null!=e?e:t}exports.SessionReplay=class{constructor(e){window.XMLHttpRequest=nt;const t=null==e?void 0:e.capture;var r;"continuous"===(null==(r=t)?void 0:r.type)?this.impl=new ot(t):!function(e){return"rolling"===(null==e?void 0:e.type)}(t)?this.impl=new ot({type:"continuous",intervalMs:5e3}):this.impl=new at(t)}register(e){this.impl.register(e)}unregister(){this.impl.unregister()}handleFlagUsed(e,t,r){et.addCustomEvent("flag-used",{key:e,detail:t})}handleFlagDetailChanged(e,t){et.addCustomEvent("flag-detail-changed",{key:e,detail:t})}handleErrorEvent(e,t){et.addCustomEvent("error",{name:e,message:t})}},exports.initializeTelemetry=function(e){const t=function(e){var t,r,n,o;const s={breadcrumbs:{maxBreadcrumbs:50,evaluations:!0,flagChange:!0,click:!0},maxPendingEvents:100,collectors:[]};return{breadcrumbs:{maxBreadcrumbs:lt(null===(t=e.breadcrumbs)||void 0===t?void 0:t.maxBreadcrumbs,s.breadcrumbs.maxBreadcrumbs),evaluations:lt(null===(r=e.breadcrumbs)||void 0===r?void 0:r.evaluations,s.breadcrumbs.evaluations),flagChange:lt(null===(n=e.breadcrumbs)||void 0===n?void 0:n.flagChange,s.breadcrumbs.flagChange),click:lt(null===(o=e.breadcrumbs)||void 0===o?void 0:o.click,s.breadcrumbs.click)},maxPendingEvents:lt(e.maxPendingEvents,s.maxPendingEvents),collectors:[...lt(e.collectors,s.collectors)]}}(e||{});return new r(t)};
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&&"function"==typeof module.require&&module.require("worker_threads")||"function"==typeof __non_webpack_require__&&__non_webpack_require__("worker_threads")||"function"==typeof require&&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()}}function pt(e,t){return null!=e?e:t}exports.SessionReplay=class{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})}},exports.initializeTelemetry=function(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:pt(null===(t=e.breadcrumbs)||void 0===t?void 0:t.maxBreadcrumbs,i.breadcrumbs.maxBreadcrumbs),evaluations:pt(null===(n=e.breadcrumbs)||void 0===n?void 0:n.evaluations,i.breadcrumbs.evaluations),flagChange:pt(null===(r=e.breadcrumbs)||void 0===r?void 0:r.flagChange,i.breadcrumbs.flagChange),click:pt(null===(o=e.breadcrumbs)||void 0===o?void 0:o.click,i.breadcrumbs.click)},maxPendingEvents:pt(e.maxPendingEvents,i.maxPendingEvents),collectors:[...pt(e.collectors,i.collectors)]}}(e||{});return new u(t)};
16
21
  //# sourceMappingURL=bundle.cjs.js.map