PageSourceSearch

https://www.justcast.com/_next/static/chunks/396464d2-0682bcaf4911a521.js

js justcast.com collected 2026-10-02 04:30:40 UTC 129,994 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9119],{9069:function(e,t,r){let n,s,i,a,o,l;r.d(t,{Le:function(){return Replay$1}});var c,d,u,h,p,m,f,g,y=r(68463),S=r(83518),v=r(40109),_=r(89344),b=r(68017),w=r(5906),k=r(18041),E=r(30087),I=r(20607),M=r(43162),C=r(95550),R=r(55212),T=r(66630),x=r(1945),A=r(28718),N=r(16183),D=r(10927),O=r(28654),L=r(54495),B=r(93217),P=r(10469),W=r(94168),F=r(54241),z=r(44036),U=r(55568);let H=M.GLOBAL_OBJ,j="sentryReplaySession",q="Unable to send Replay";function _optionalChain$5(e){let t;let r=e[0],n=1;for(;n<e.length;){let s=e[n],i=e[n+1];if(n+=2,("optionalAccess"===s||"optionalCall"===s)&&null==r)return;"access"===s||"optionalAccess"===s?(t=r,r=i(r)):("call"===s||"optionalCall"===s)&&(r=i(function(){for(var e=arguments.length,n=Array(e),s=0;s<e;s++)n[s]=arguments[s];return r.call(t,...n)}),t=void 0)}return r}function isShadowRoot(e){let t=_optionalChain$5([e,"optionalAccess",e=>e.host]);return _optionalChain$5([t,"optionalAccess",e=>e.shadowRoot])===e}function isNativeShadowDom(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function stringifyStylesheet(e){try{var t;let r=e.rules||e.cssRules;return r?((t=Array.from(r,stringifyRule).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}}function stringifyRule(e){let t;if("styleSheet"in e)try{t=stringifyStylesheet(e.styleSheet)||function(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import","url(".concat(JSON.stringify(e.href),")")];return""===e.layerName?r.push("layer"):e.layerName&&r.push("layer(".concat(e.layerName,")")),e.supportsText&&r.push("supports(".concat(e.supportsText,")")),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(e){}else if("selectorText"in e&&e.selectorText.includes(":"))return e.cssText.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2");return t||e.cssText}(c=f||(f={}))[c.Document=0]="Document",c[c.DocumentType=1]="DocumentType",c[c.Element=2]="Element",c[c.Text=3]="Text",c[c.CDATA=4]="CDATA",c[c.Comment=5]="Comment";let Mirror=class Mirror{getId(e){if(!e)return -1;let t=_optionalChain$5([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]);return()=>-1,null!=t?t:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function shouldMaskInput(e){let{maskInputOptions:t,tagName:r,type:n}=e;return"OPTION"===r&&(r="SELECT"),!!(t[r.toLowerCase()]||n&&t[n]||"password"===n||"INPUT"===r&&!n&&t.text)}function maskInputValue(e){let{isMasked:t,element:r,value:n,maskInputFn:s}=e,i=n||"";return t?(s&&(i=s(i,r)),"*".repeat(i.length)):i}function toLowerCase(e){return e.toLowerCase()}function toUpperCase(e){return e.toUpperCase()}let $="__rrweb_original__";function getInputType(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?toLowerCase(t):null}function getInputValue(e,t,r){return"INPUT"===t&&("radio"===r||"checkbox"===r)?e.getAttribute("value")||"":e.value}let V=1,K=RegExp("[^a-z0-9-_:]");function genId(){return V++}let J=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Y=/^(?:[a-z+]+:)?\/\//i,G=/^www\..*/i,X=/^(data:)([^,]*),(.*)/i;function absoluteToStylesheet(e,t){return(e||"").replace(J,(e,r,n,s,i,a)=>{let o=n||i||a,l=r||s||"";if(!o)return e;if(Y.test(o)||G.test(o)||X.test(o))return"url(".concat(l).concat(o).concat(l,")");
1if("/"===o[0])return"url(".concat(l).concat((t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]+o).concat(l,")");let c=t.split("/"),d=o.split("/");for(let e of(c.pop(),d))"."!==e&&(".."===e?c.pop():c.push(e));return"url(".concat(l).concat(c.join("/")).concat(l,")")})}let Q=/^[^ \t\n\r\u000c]+/,Z=/^[, \t\n\r\u000c]+/;function absoluteToDoc(e,t){if(!t||""===t.trim())return t;let r=e.createElement("a");return r.href=t,r.href}function getHref(){let e=document.createElement("a");return e.href="",e.href}function transformAttribute(e,t,r,n,s,i){return n?"src"!==r&&("href"!==r||"use"===t&&"#"===n[0])&&("xlink:href"!==r||"#"===n[0])&&("background"!==r||"table"!==t&&"td"!==t&&"th"!==t)?"srcset"===r?function(e,t){if(""===t.trim())return t;let r=0;function collectCharacters(e){let n;let s=e.exec(t.substring(r));return s?(n=s[0],r+=n.length,n):""}let n=[];for(;collectCharacters(Z),!(r>=t.length);){let s=collectCharacters(Q);if(","===s.slice(-1))s=absoluteToDoc(e,s.substring(0,s.length-1)),n.push(s);else{let i="";s=absoluteToDoc(e,s);let a=!1;for(;;){let e=t.charAt(r);if(""===e){n.push((s+i).trim());break}if(a)")"===e&&(a=!1);else{if(","===e){r+=1,n.push((s+i).trim());break}"("===e&&(a=!0)}i+=e,r+=1}}}return n.join(", ")}(e,n):"style"===r?absoluteToStylesheet(n,getHref()):"object"===t&&"data"===r?absoluteToDoc(e,n):"function"==typeof i?i(r,n,s):n:absoluteToDoc(e,n):n}function ignoreAttribute(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function distanceToMatch(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return!e||e.nodeType!==e.ELEMENT_NODE||n>r?-1:t(e)?n:distanceToMatch(e.parentNode,t,r,n+1)}function createMatchPredicate(e,t){return r=>{if(null===r)return!1;try{if(e){if("string"==typeof e){if(r.matches(".".concat(e)))return!0}else if(function(e,t){for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}return!1}(r,e))return!0}if(t&&r.matches(t))return!0;return!1}catch(e){return!1}}}function needMaskingText(e,t,r,n,s,i){try{let a=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===a)return!1;if("INPUT"===a.tagName){let e=a.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let o=-1,l=-1;if(i){if((l=distanceToMatch(a,createMatchPredicate(n,s)))<0)return!0;o=distanceToMatch(a,createMatchPredicate(t,r),l>=0?l:1/0)}else{if((o=distanceToMatch(a,createMatchPredicate(t,r)))<0)return!1;l=distanceToMatch(a,createMatchPredicate(n,s),o>=0?o:1/0)}return o>=0?!(l>=0)||o<=l:!(l>=0)&&!!i}catch(e){}return!!i}function lowerIfExists(e){return null==e?"":e.toLowerCase()}function serializeNodeWithId(e,t){let r;let{doc:i,mirror:a,blockClass:o,blockSelector:l,unblockSelector:c,maskAllText:d,maskTextClass:u,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m,skipChild:g=!1,inlineStylesheet:y=!0,maskInputOptions:S={},maskAttributeFn:v,maskTextFn:_,maskInputFn:b,slimDOMOptions:w,dataURLOptions:k={},inlineImages:E=!1,recordCanvas:I=!1,onSerialize:M,onIframeLoad:C,iframeLoadTimeout:R=5e3,onStylesheetLoad:T,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:N=!1}=t,{preserveWhiteSpace:D=!0}=t,O=function(e,t){let{doc:r,mirror:i,blockClass:a,blockSelector:o,unblockSelector:l,maskAllText:c,maskAttributeFn:d,maskTextClass:u,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:g,maskInputOptions:y={},maskTextFn:S,maskInputFn:v,dataURLOptions:_={},inlineImages:b,recordCanvas:w,keepIframeSrcFn:k,newlyAddedElement:E=!1}=t,I=function(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return 1===r?void 0:r}(r,i);switch(e.nodeType){case e.DOCUMENT_NODE:if("CSS1Compat"!==e.compatMode)return{type:f.Document,childNodes:[],compatMode:e.compatMode};return{type:f.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:f.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:I};case e.ELEMENT_NODE:return function(e,t){let r;let{doc:i,blockClass:a,blockSelector:o,unblockSelector:l,inlineStylesheet:c,maskInputOptions:d={},maskAttributeFn:u,maskInputFn:h,dataURLOptions:p={},inlineImages:m,recordCanvas:g,keepIframeSrcFn:y,newlyAddedElement:S=!1,rootId:v,maskAllText:_,maskTextClass:b,unmaskTextClass:w,maskTextSelector:k,unmaskTextSelector:E}=t,I=function(e,t,r,n){try{if(n&&e.matches(n))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,a,o,l),M=function(e){if(e instanceof HTMLFormElement)return"form";let t=toLowerCase(e.tagName);return K.test(t)?"div":t}(e),C={},R=e.attributes.length;for(let t=0;t<R;t++){let r=e.attributes[t];r.name&&!ignoreAttribute(M,r.name,r.value)&&(C[r.name]=transformAttribute(i,M,toLowerCase(r.name),r.value,e,u))}if("link"===M&&c){let t=Array.from(i.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=stringifyStylesheet(t)),r&&(delete C.rel,delete C.href,C._cssText=absoluteToStylesheet(r,t.href))}if("style"===M&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let t=stringifyStylesheet(e.sheet);t&&(C._cssText=absoluteToStylesheet(t,getHref()))}if("input"===M||"textarea"===M||"select"===M||"option"===M){let t=getInputType(e),r=getInputValue(e,toUpperCase(M),t),n=e.checked;if("submit"!==t&&"button"!==t&&r){let n=needMaskingText(e,b,k,w,E,shouldMaskInput({type:t,tagName:toUpperCase(M),maskInputOptions:d}));C.value=maskInputValue({isMasked:n,element:e,value:r,maskInputFn:h})}n&&(C.checked=n)}if("option"===M&&(e.selected&&!d.select?C.selected=!0:delete C.selected),"canvas"===M&&g){if("2d"===e.__context)!function(e){let t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let n=0;n<e.height;n+=50){let s=t.getImageData,i=$ in s?s[$]:s,a=new Uint32Array(i.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer);if(a.some(e=>0!==e))return!1}return!0}(e)&&(C.rr_dataURL=e.toDataURL(p.type,p.quality));else if(!("__context"in e)){let t=e.toDataURL(p.type,p.quality),r=document.createElement("canvas");r.width=e.width,r.height=e.height;let n=r.toDataURL(p.type,p.quality);t!==n&&(C.rr_dataURL=t)}}if("img"===M&&m){n||(s=(n=i.createElement("canvas")).getContext("2d"));let t=e.crossOrigin;e.crossOrigin="anonymous";let recordInlineImage=()=>{e.removeEventListener("load",recordInlineImage);
1try{n.width=e.naturalWidth,n.height=e.naturalHeight,s.drawImage(e,0,0),C.rr_dataURL=n.toDataURL(p.type,p.quality)}catch(t){console.warn("Cannot inline img src=".concat(e.currentSrc,"! Error: ").concat(t))}t?C.crossOrigin=t:e.removeAttribute("crossorigin")};e.complete&&0!==e.naturalWidth?recordInlineImage():e.addEventListener("load",recordInlineImage)}if(("audio"===M||"video"===M)&&(C.rr_mediaState=e.paused?"paused":"played",C.rr_mediaCurrentTime=e.currentTime),!S&&(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),I){let{width:t,height:r}=e.getBoundingClientRect();C={class:C.class,rr_width:"".concat(t,"px"),rr_height:"".concat(r,"px")}}"iframe"!==M||y(C.src)||(e.contentDocument||(C.rr_src=C.src),delete C.src);try{customElements.get(M)&&(r=!0)}catch(e){}return{type:f.Element,tagName:M,attributes:C,childNodes:[],isSVG:!!("svg"===e.tagName||e.ownerSVGElement)||void 0,needBlock:I,rootId:v,isCustom:r}}(e,{doc:r,blockClass:a,blockSelector:o,unblockSelector:l,inlineStylesheet:g,maskAttributeFn:d,maskInputOptions:y,maskInputFn:v,dataURLOptions:_,inlineImages:b,recordCanvas:w,keepIframeSrcFn:k,newlyAddedElement:E,rootId:I,maskAllText:c,maskTextClass:u,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m});case e.TEXT_NODE:return function(e,t){let{maskAllText:r,maskTextClass:n,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:a,maskTextFn:o,maskInputOptions:l,maskInputFn:c,rootId:d}=t,u=e.parentNode&&e.parentNode.tagName,h=e.textContent,p="STYLE"===u||void 0,m="SCRIPT"===u||void 0,g="TEXTAREA"===u||void 0;if(p&&h){try{e.nextSibling||e.previousSibling||_optionalChain$5([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(h=stringifyStylesheet(e.parentNode.sheet))}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(t),e)}h=absoluteToStylesheet(h,getHref())}m&&(h="SCRIPT_PLACEHOLDER");let y=needMaskingText(e,n,i,s,a,r);if(p||m||g||!h||!y||(h=o?o(h,e.parentElement):h.replace(/[\S]/g,"*")),g&&h&&(l.textarea||y)&&(h=c?c(h,e.parentNode):h.replace(/[\S]/g,"*")),"OPTION"===u&&h){let t=shouldMaskInput({type:null,tagName:u,maskInputOptions:l});h=maskInputValue({isMasked:needMaskingText(e,n,i,s,a,t),element:e,value:h,maskInputFn:c})}return{type:f.Text,textContent:h||"",isStyle:p,rootId:d}}(e,{maskAllText:c,maskTextClass:u,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m,maskTextFn:S,maskInputOptions:y,maskInputFn:v,rootId:I});case e.CDATA_SECTION_NODE:return{type:f.CDATA,textContent:"",rootId:I};case e.COMMENT_NODE:return{type:f.Comment,textContent:e.textContent||"",rootId:I};default:return!1}}(e,{doc:i,mirror:a,blockClass:o,blockSelector:l,maskAllText:d,unblockSelector:c,maskTextClass:u,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:y,maskInputOptions:S,maskAttributeFn:v,maskTextFn:_,maskInputFn:b,dataURLOptions:k,inlineImages:E,recordCanvas:I,keepIframeSrcFn:A,newlyAddedElement:N});if(!O)return console.warn(e,"not serialized"),null;r=a.hasNode(e)?a.getId(e):!function(e,t){if(t.comment&&e.type===f.Comment)return!0;if(e.type===f.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js"))||t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(lowerIfExists(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===lowerIfExists(e.attributes.name)||"icon"===lowerIfExists(e.attributes.rel)||"apple-touch-icon"===lowerIfExists(e.attributes.rel)||"shortcut icon"===lowerIfExists(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&lowerIfExists(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(lowerIfExists(e.attributes.property).match(/^(og|twitter|fb):/)||lowerIfExists(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===lowerIfExists(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===lowerIfExists(e.attributes.name)||"googlebot"===lowerIfExists(e.attributes.name)||"bingbot"===lowerIfExists(e.attributes.name)))return!0;
1if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;else if(t.headMetaAuthorship&&("author"===lowerIfExists(e.attributes.name)||"generator"===lowerIfExists(e.attributes.name)||"framework"===lowerIfExists(e.attributes.name)||"publisher"===lowerIfExists(e.attributes.name)||"progid"===lowerIfExists(e.attributes.name)||lowerIfExists(e.attributes.property).match(/^article:/)||lowerIfExists(e.attributes.property).match(/^product:/)))return!0;else if(t.headMetaVerification&&("google-site-verification"===lowerIfExists(e.attributes.name)||"yandex-verification"===lowerIfExists(e.attributes.name)||"csrf-token"===lowerIfExists(e.attributes.name)||"p:domain_verify"===lowerIfExists(e.attributes.name)||"verify-v1"===lowerIfExists(e.attributes.name)||"verification"===lowerIfExists(e.attributes.name)||"shopify-checkout-api-token"===lowerIfExists(e.attributes.name)))return!0}}return!1}(O,w)&&(D||O.type!==f.Text||O.isStyle||O.textContent.replace(/^\s+|\s+$/gm,"").length)?genId():-2;let L=Object.assign(O,{id:r});if(a.add(e,L),-2===r)return null;M&&M(e);let B=!g;if(L.type===f.Element){B=B&&!L.needBlock,delete L.needBlock;let t=e.shadowRoot;t&&isNativeShadowDom(t)&&(L.isShadowHost=!0)}if((L.type===f.Document||L.type===f.Element)&&B){w.headWhitespace&&L.type===f.Element&&"head"===L.tagName&&(D=!1);let t={doc:i,mirror:a,blockClass:o,blockSelector:l,maskAllText:d,unblockSelector:c,maskTextClass:u,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m,skipChild:g,inlineStylesheet:y,maskInputOptions:S,maskAttributeFn:v,maskTextFn:_,maskInputFn:b,slimDOMOptions:w,dataURLOptions:k,inlineImages:E,recordCanvas:I,preserveWhiteSpace:D,onSerialize:M,onIframeLoad:C,iframeLoadTimeout:R,onStylesheetLoad:T,stylesheetLoadTimeout:x,keepIframeSrcFn:A};for(let r of Array.from(e.childNodes)){let e=serializeNodeWithId(r,t);e&&L.childNodes.push(e)}if(e.nodeType===e.ELEMENT_NODE&&e.shadowRoot)for(let r of Array.from(e.shadowRoot.childNodes)){let n=serializeNodeWithId(r,t);n&&(isNativeShadowDom(e.shadowRoot)&&(n.isShadow=!0),L.childNodes.push(n))}}return e.parentNode&&isShadowRoot(e.parentNode)&&isNativeShadowDom(e.parentNode)&&(L.isShadow=!0),L.type===f.Element&&"iframe"===L.tagName&&function(e,t,r){let n;let s=e.contentWindow;if(!s)return;let i=!1;try{n=s.document.readyState}catch(e){return}if("complete"!==n){let n=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(n),i=!0,t()});return}let a="about:blank";if(s.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{let t=e.contentDocument;if(t&&C){let r=serializeNodeWithId(t,{doc:t,mirror:a,blockClass:o,blockSelector:l,unblockSelector:c,maskAllText:d,maskTextClass:u,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m,skipChild:!1,inlineStylesheet:y,maskInputOptions:S,maskAttributeFn:v,maskTextFn:_,maskInputFn:b,slimDOMOptions:w,dataURLOptions:k,inlineImages:E,recordCanvas:I,preserveWhiteSpace:D,onSerialize:M,onIframeLoad:C,iframeLoadTimeout:R,onStylesheetLoad:T,stylesheetLoadTimeout:x,keepIframeSrcFn:A});r&&C(e,r)}},R),L.type===f.Element&&"link"===L.tagName&&"stylesheet"===L.attributes.rel&&function(e,t,r){let n,s=!1;try{n=e.sheet}catch(e){return}if(n)return;let i=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(i),s=!0,t()})}(e,()=>{if(T){let t=serializeNodeWithId(e,{doc:i,mirror:a,blockClass:o,blockSelector:l,unblockSelector:c,maskAllText:d,maskTextClass:u,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:m,skipChild:!1,inlineStylesheet:y,maskInputOptions:S,maskAttributeFn:v,maskTextFn:_,maskInputFn:b,slimDOMOptions:w,dataURLOptions:k,inlineImages:E,recordCanvas:I,preserveWhiteSpace:D,onSerialize:M,onIframeLoad:C,iframeLoadTimeout:R,onStylesheetLoad:T,stylesheetLoadTimeout:x,keepIframeSrcFn:A});t&&T(e,t)}},x),L}function _optionalChain$4(e){let t;let r=e[0],n=1;for(;n<e.length;){let s=e[n],i=e[n+1];if(n+=2,("optionalAccess"===s||"optionalCall"===s)&&null==r)return;"access"===s||"optionalAccess"===s?(t=r,r=i(r)):("call"===s||"optionalCall"===s)&&(r=i(function(){for(var e=arguments.length,n=Array(e),s=0;s<e;s++)n[s]=arguments[s];return r.call(t,...n)}),t=void 0)}return r}function on(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}let ee="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.",et={map:{},getId:()=>(console.error(ee),-1),getNode:()=>(console.error(ee),null),removeNodeFromMap(){console.error(ee)},has:()=>(console.error(ee),!1),reset(){console.error(ee)}};function throttle$1(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=null,s=0;return function(){for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];let l=Date.now();s||!1!==r.leading||(s=l);let c=t-(l-s),d=this;c<=0||c>t?(n&&(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];getImplementation("clearTimeout")(...t)}(n),n=null),s=l,e.apply(d,a)):n||!1===r.trailing||(n=setTimeout$1(()=>{s=!1===r.leading?0:Date.now(),n=null,e.apply(d,a)},c))}}function patch(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],s=r(n);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=s,()=>{e[t]=n}}catch(e){return()=>{}}}window.Proxy&&window.Reflect&&(et=new Proxy(et,{get:(e,t,r)=>("map"===t&&console.error(ee),Reflect.get(e,t,r))}));let er=Date.now;function getWindowScroll(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:_optionalChain$4([t,"o
1ptionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||_optionalChain$4([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||_optionalChain$4([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:_optionalChain$4([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||_optionalChain$4([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||_optionalChain$4([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function getWindowHeight(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function getWindowWidth(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function closestElementOfNode(e){if(!e)return null;let t=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;return t}function isBlocked(e,t,r,n,s){if(!e)return!1;let i=closestElementOfNode(e);if(!i)return!1;let a=createMatchPredicate(t,r);if(!s){let e=n&&i.matches(n);return a(i)&&!e}let o=distanceToMatch(i,a),l=-1;return!(o<0)&&(n&&(l=distanceToMatch(i,createMatchPredicate(null,n))),o>-1&&l<0||o<l)}function isIgnored(e,t){return -2===t.getId(e)}function legacy_isTouchEvent(e){return!!e.changedTouches}function isSerializedIframe(e,t){return!!("IFRAME"===e.nodeName&&t.getMeta(e))}function isSerializedStylesheet(e,t){return!!("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function hasShadowRoot(e){return!!_optionalChain$4([e,"optionalAccess",e=>e.shadowRoot])}/[1-9][0-9]{12}/.test(Date.now().toString())||(er=()=>new Date().getTime());let StyleSheetMirror=class StyleSheetMirror{getId(e){return(0,y.h)(this.styleIDMap.get(e),()=>-1)}has(e){return this.styleIDMap.has(e)}add(e,t){let r;return this.has(e)?this.getId(e):(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++}constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}};function getShadowHost(e){let t=null;return _optionalChain$4([e,"access",e=>e.getRootNode,"optionalCall",e=>e(),"optionalAccess",e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function inDom(e){let t=e.ownerDocument;return!!t&&(t.contains(e)||function(e){let t=e.ownerDocument;if(!t)return!1;let r=function(e){let t,r=e;for(;t=getShadowHost(r);)r=t;return r}(e);return t.contains(r)}(e))}let en={};function getImplementation(e){let t=en[e];if(t)return t;let r=window.document,n=window[e];if(r&&"function"==typeof r.createElement)try{let t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);let s=t.contentWindow;s&&s[e]&&(n=s[e]),r.head.removeChild(t)}catch(e){}return en[e]=n.bind(window)}function setTimeout$1(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return getImplementation("setTimeout")(...t)}var es=((d=es||{})[d.DomContentLoaded=0]="DomContentLoaded",d[d.Load=1]="Load",d[d.FullSnapshot=2]="FullSnapshot",d[d.IncrementalSnapshot=3]="IncrementalSnapshot",d[d.Meta=4]="Meta",d[d.Custom=5]="Custom",d[d.Plugin=6]="Plugin",d),ei=((u=ei||{})[u.Mutation=0]="Mutation",u[u.MouseMove=1]="MouseMove",u[u.MouseInteraction=2]="MouseInteraction",u[u.Scroll=3]="Scroll",u[u.ViewportResize=4]="ViewportResize",u[u.Input=5]="Input",u[u.TouchMove=6]="TouchMove",u[u.MediaInteraction=7]="MediaInteraction",u[u.StyleSheetRule=8]="StyleSheetRule",u[u.CanvasMutation=9]="CanvasMutation",u[u.Font=10]="Font",u[u.Log=11]="Log",u[u.Drag=12]="Drag",u[u.StyleDeclaration=13]="StyleDeclaration",u[u.Selection=14]="Selection",u[u.AdoptedStyleSheet=15]="AdoptedStyleSheet",u[u.CustomElement=16]="CustomElement",u),ea=((h=ea||{})[h.MouseUp=0]="MouseUp",h[h.MouseDown=1]="MouseDown",h[h.Click=2]="Click",h[h.ContextMenu=3]="ContextMenu",h[h.DblClick=4]="DblClick",h[h.Focus=5]="Focus",h[h.Blur=6]="Blur",h[h.TouchStart=7]="TouchStart",h[h.TouchMove_Departed=8]="TouchMove_Departed",h[h.TouchEnd=9]="TouchEnd",h[h.TouchCancel=10]="TouchCancel",h),eo=((p=eo||{})[p.Mouse=0]="Mouse",p[p.Pen=1]="Pen",p[p.Touch=2]="Touch",p);let DoubleLinkedList=class DoubleLinkedList{get(e){if(e>=this.length)throw Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=function(e){let t;let r=e[0],n=1;for(;n<e.length;){let s=e[n],i=e[n+1];if(n+=2,("optionalAccess"===s||"optionalCall"===s)&&null==r)return;"access"===s||"optionalAccess"===s?(t=r,r=i(r)):("call"===s||"optionalCall"===s)&&(r=i(function(){for(var e=arguments.length,n=Array(e),s=0;s<e;s++)n[s]=arguments[s];return r.call(t,...n)}),t=void 0)}return r}([t,"optionalAccess",e=>e.next])||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&"__ln"in e.previousSibling){let 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&&"__ln"in e.nextSibling&&e.nextSibling.__ln.previous){let 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;null===t.next&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;
1this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}constructor(){this.length=0,this.head=null,this.tail=null}};let moveKey=(e,t)=>"".concat(e,"@").concat(t);let MutationBuffer=class MutationBuffer{init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].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()}constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,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;let e=[],t=new Set,r=new DoubleLinkedList,getNextId=e=>{let t=e,r=-2;for(;-2===r;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},pushAdd=n=>{if(!n.parentNode||!inDom(n))return;let s=isShadowRoot(n.parentNode)?this.mirror.getId(getShadowHost(n)):this.mirror.getId(n.parentNode),i=getNextId(n);if(-1===s||-1===i)return r.addNode(n);let a=serializeNodeWithId(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{isSerializedIframe(e,this.mirror)&&this.iframeManager.addIframe(e),isSerializedStylesheet(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),hasShadowRoot(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)}});a&&(e.push({parentId:s,nextId:i,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)(!isParentRemoved(this.removes,e,this.mirror)||this.movedSet.has(e.parentNode))&&pushAdd(e);for(let e of this.addedSet)isAncestorInSet(this.droppedSet,e)||isParentRemoved(this.removes,e,this.mirror)?isAncestorInSet(this.movedSet,e)?pushAdd(e):this.droppedSet.add(e):pushAdd(e);let n=null;for(;r.length;){let e=null;if(n){let t=this.mirror.getId(n.value.parentNode),r=getNextId(n.value);-1!==t&&-1!==r&&(e=n)}if(!e){let t=r.tail;for(;t;){let r=t;if(t=t.previous,r){let t=this.mirror.getId(r.value.parentNode),n=getNextId(r.value);if(-1===n)continue;if(-1!==t){e=r;break}{let t=r.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let n=t.parentNode.host,s=this.mirror.getId(n);if(-1!==s){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}n=e.previous,r.removeNode(e.value),pushAdd(e.value)}let s={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if("string"==typeof t.style){let r=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+n).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}
1return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(s.texts.length||s.attributes.length||s.removes.length||s.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=e=>{if(!isIgnored(e.target,this.mirror))switch(e.type){case"characterData":{let t=e.target.textContent;isBlocked(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:needMaskingText(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,closestElementOfNode(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,n=e.target.getAttribute(r);if("value"===r){let r=getInputType(t),s=t.tagName;n=getInputValue(t,s,r);let i=shouldMaskInput({maskInputOptions:this.maskInputOptions,tagName:s,type:r}),a=needMaskingText(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,i);n=maskInputValue({isMasked:a,element:t,value:n,maskInputFn:this.maskInputFn})}if(isBlocked(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||n===e.oldValue)return;let s=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(n)){if(t.contentDocument)return;r="rr_src"}if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(e.target,s)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!ignoreAttribute(t.tagName,r)&&(s.attributes[r]=transformAttribute(this.doc,toLowerCase(t.tagName),toLowerCase(r),n,t,this.maskAttributeFn),"style"===r)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}let r=this.unattachedDoc.createElement("span");for(let n of(e.oldValue&&r.setAttribute("style",e.oldValue),Array.from(t.style))){let e=t.style.getPropertyValue(n),i=t.style.getPropertyPriority(n);e!==r.style.getPropertyValue(n)||i!==r.style.getPropertyPriority(n)?""===i?s.styleDiff[n]=e:s.styleDiff[n]=[e,i]:s._unchangedStyles[n]=[e,i]}for(let e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(s.styleDiff[e]=!1)}break}case"childList":if(isBlocked(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let r=this.mirror.getId(t),n=isShadowRoot(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);isBlocked(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||isIgnored(t,this.mirror)||-1===this.mirror.getId(t)||(this.addedSet.has(t)?(deepDelete(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||function isAncestorRemoved(e,t){if(isShadowRoot(e))return!1;let r=t.getId(e);return!t.has(r)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||isAncestorRemoved(e.parentNode,t))}(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[moveKey(r,n)]?deepDelete(this.movedSet,t):this.removes.push({parentId:n,id:r,isShadow:!!(isShadowRoot(e.target)&&isNativeShadowDom(e.target))||void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(isIgnored(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[moveKey(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);!isBlocked(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&(e.childNodes.forEach(e=>this.genAdds(e)),hasShadowRoot(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}};
1function deepDelete(e,t){e.delete(t),t.childNodes.forEach(t=>deepDelete(e,t))}function isParentRemoved(e,t,r){return 0!==e.length&&function _isParentRemoved(e,t,r){let{parentNode:n}=t;if(!n)return!1;let s=r.getId(n);return!!e.some(e=>e.id===s)||_isParentRemoved(e,n,r)}(e,t,r)}function isAncestorInSet(e,t){return 0!==e.size&&function _isAncestorInSet(e,t){let{parentNode:r}=t;return!!r&&(!!e.has(r)||_isAncestorInSet(e,r))}(e,t)}let callbackWrapper=e=>i?function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];try{return e(...r)}catch(e){if(i&&!0===i(e))return()=>{};throw e}}:e;function _optionalChain$2(e){let t;let r=e[0],n=1;for(;n<e.length;){let s=e[n],i=e[n+1];if(n+=2,("optionalAccess"===s||"optionalCall"===s)&&null==r)return;"access"===s||"optionalAccess"===s?(t=r,r=i(r)):("call"===s||"optionalCall"===s)&&(r=i(function(){for(var e=arguments.length,n=Array(e),s=0;s<e;s++)n[s]=arguments[s];return r.call(t,...n)}),t=void 0)}return r}let el=[];function getEventTarget(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function initMutationObserver(e,t){let r=new MutationBuffer;el.push(r),r.init(e);let n=window.MutationObserver||window.__rrMutationObserver,s=_optionalChain$2([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);s&&window[s]&&(n=window[s]);let i=new n(callbackWrapper(t=>{e.onMutation&&!1===e.onMutation(t)||r.processMutations.bind(r)(t)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function initScrollObserver(e){let{scrollCb:t,doc:r,mirror:n,blockClass:s,blockSelector:i,unblockSelector:a,sampling:o}=e,l=callbackWrapper(throttle$1(callbackWrapper(e=>{let o=getEventTarget(e);if(!o||isBlocked(o,s,i,a,!0))return;let l=n.getId(o);if(o===r&&r.defaultView){let e=getWindowScroll(r.defaultView);t({id:l,x:e.left,y:e.top})}else t({id:l,x:o.scrollLeft,y:o.scrollTop})}),o.scroll||100));return on("scroll",l,r)}let ec=["INPUT","TEXTAREA","SELECT"],ed=new WeakMap;function getNestedCSSRulePositions(e){return function(e,t){if(hasNestedCSSRule("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||hasNestedCSSRule("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||hasNestedCSSRule("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||hasNestedCSSRule("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){let r=Array.from(e.parentRule.cssRules),n=r.indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){let r=Array.from(e.parentStyleSheet.cssRules),n=r.indexOf(e);t.unshift(n)}return t}(e,[])}function getIdAndStyleId(e,t,r){let n,s;return e?(e.ownerNode?n=t.getId(e.ownerNode):s=r.getId(e),{styleId:s,id:n}):{}}function initAdoptedStyleSheetObserver(e,t){let{mirror:r,stylesheetManager:n}=e,s=null;s="#document"===t.nodeName?r.getId(t):r.getId(t.host);let i="#document"===t.nodeName?_optionalChain$2([t,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]):_optionalChain$2([t,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),a=_optionalChain$2([i,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(_optionalChain$2([i,"optionalAccess",e=>e.prototype]),"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&i&&a?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){return _optionalChain$2([a,"access",e=>e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){let t=_optionalChain$2([a,"access",e=>e.set,"optionalAccess",e=>e.call,"call",t=>t(this,e)]);if(null!==s&&-1!==s)try{n.adoptStyleSheets(e,s)}catch(e){}return t}}),callbackWrapper(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})})):()=>{}}function initObservers(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];let t=e.doc.defaultView;if(!t)return()=>{};let r=initMutationObserver(e,e.doc),n=function(e){let t,{mousemoveCb:r,sampling:n,doc:s,mirror:i}=e;if(!1===n.mousemove)return()=>{};let a="number"==typeof n.mousemove?n.mousemove:50,o="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,l=[],c=throttle$1(callbackWrapper(e=>{let n=Date.now()-t;r(l.map(e=>(e.timeOffset-=n,e)),e),l=[],t=null}),o),d=callbackWrapper(throttle$1(callbackWrapper(e=>{let r=getEventTarget(e),{clientX:n,clientY:s}=legacy_isTouchEvent(e)?e.changedTouches[0]:e;t||(t=er()),l.push({x:n,y:s,id:i.getId(r),timeOffset:er()-t}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?ei.Drag:e instanceof MouseEvent?ei.MouseMove:ei.TouchMove)}),a,{trailing:!1})),u=[on("mousemove",d,s),on("touchmove",d,s),on("drag",d,s)];return callbackWrapper(()=>
1{u.forEach(e=>e())})}(e),s=function(e){let{mouseInteractionCb:t,doc:r,mirror:n,blockClass:s,blockSelector:i,unblockSelector:a,sampling:o}=e;if(!1===o.mouseInteraction)return()=>{};let l=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,c=[],d=null,getHandler=e=>r=>{let o=getEventTarget(r);if(isBlocked(o,s,i,a,!0))return;let l=null,c=e;if("pointerType"in r){switch(r.pointerType){case"mouse":l=eo.Mouse;break;case"touch":l=eo.Touch;break;case"pen":l=eo.Pen}l===eo.Touch?ea[e]===ea.MouseDown?c="TouchStart":ea[e]===ea.MouseUp&&(c="TouchEnd"):eo.Pen}else legacy_isTouchEvent(r)&&(l=eo.Touch);null!==l?(d=l,(c.startsWith("Touch")&&l===eo.Touch||c.startsWith("Mouse")&&l===eo.Mouse)&&(l=null)):ea[e]===ea.Click&&(l=d,d=null);let u=legacy_isTouchEvent(r)?r.changedTouches[0]:r;if(!u)return;let h=n.getId(o),{clientX:p,clientY:m}=u;callbackWrapper(t)({type:ea[c],id:h,x:p,y:m,...null!==l&&{pointerType:l}})};return Object.keys(ea).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==l[e]).forEach(e=>{let t=toLowerCase(e),n=getHandler(e);if(window.PointerEvent)switch(ea[e]){case ea.MouseDown:case ea.MouseUp:t=t.replace("mouse","pointer");break;case ea.TouchStart:case ea.TouchEnd:return}c.push(on(t,n,r))}),callbackWrapper(()=>{c.forEach(e=>e())})}(e),i=initScrollObserver(e),a=function(e,t){let{viewportResizeCb:r}=e,{win:n}=t,s=-1,i=-1,a=callbackWrapper(throttle$1(callbackWrapper(()=>{let e=getWindowHeight(),t=getWindowWidth();(s!==e||i!==t)&&(r({width:Number(t),height:Number(e)}),s=e,i=t)}),200));return on("resize",a,n)}(e,{win:t}),o=function(e){let{inputCb:t,doc:r,mirror:n,blockClass:s,blockSelector:i,unblockSelector:a,ignoreClass:o,ignoreSelector:l,maskInputOptions:c,maskInputFn:d,sampling:u,userTriggeredOnInput:h,maskTextClass:p,unmaskTextClass:m,maskTextSelector:f,unmaskTextSelector:g}=e;function eventHandler(e){let t=getEventTarget(e),n=e.isTrusted,u=t&&toUpperCase(t.tagName);if("OPTION"===u&&(t=t.parentElement),!t||!u||0>ec.indexOf(u)||isBlocked(t,s,i,a,!0))return;let y=t;if(y.classList.contains(o)||l&&y.matches(l))return;let S=getInputType(t),v=getInputValue(y,u,S),_=!1,b=shouldMaskInput({maskInputOptions:c,tagName:u,type:S}),w=needMaskingText(t,p,f,m,g,b);("radio"===S||"checkbox"===S)&&(_=t.checked),v=maskInputValue({isMasked:w,element:t,value:v,maskInputFn:d}),cbWithDedup(t,h?{text:v,isChecked:_,userTriggered:n}:{text:v,isChecked:_});let k=t.name;"radio"===S&&k&&_&&r.querySelectorAll('input[type="radio"][name="'.concat(k,'"]')).forEach(e=>{if(e!==t){let t=maskInputValue({isMasked:w,element:e,value:getInputValue(e,u,S),maskInputFn:d});cbWithDedup(e,h?{text:t,isChecked:!_,userTriggered:!1}:{text:t,isChecked:!_})}})}function cbWithDedup(e,r){let s=ed.get(e);if(!s||s.text!==r.text||s.isChecked!==r.isChecked){ed.set(e,r);let s=n.getId(e);callbackWrapper(t)({...r,id:s})}}let y="last"===u.input?["change"]:["input","change"],S=y.map(e=>on(e,callbackWrapper(eventHandler),r)),v=r.defaultView;if(!v)return()=>{S.forEach(e=>e())};let _=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),b=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return _&&_.set&&S.push(...b.map(e=>(function hookSetter(e,t,r,n){let s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,n?r:{set(e){setTimeout$1(()=>{r.set.call(this,e)},0),i&&i.set&&i.set.call(this,e)}}),()=>hookSetter(e,t,i||{},!0)})(e[0],e[1],{set(){callbackWrapper(eventHandler)({target:this,isTrusted:!1})}},!1,v))),callbackWrapper(()=>{S.forEach(e=>e())})}(e),l=function(e){let{mediaInteractionCb:t,blockClass:r,blockSelector:n,unblockSelector:s,mirror:i,sampling:a,doc:o}=e,l=callbackWrapper(e=>throttle$1(callbackWrapper(a=>{let o=getEventTarget(a);if(!o||isBlocked(o,r,n,s,!0))return;let{currentTime:l,volume:c,muted:d,playbackRate:u}=o;t({type:e,id:i.getId(o),currentTime:l,volume:c,muted:d,playbackRate:u})}),a.media||500)),c=[on("play",l(0),o),on("pause",l(1),o),on("seeked",l
1(2),o),on("volumechange",l(3),o),on("ratechange",l(4),o)];return callbackWrapper(()=>{c.forEach(e=>e())})}(e),c=function(e,t){let r,n,{styleSheetRuleCb:s,mirror:i,stylesheetManager:a}=e,{win:o}=t;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return()=>{};let l=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(l,{apply:callbackWrapper((e,t,r)=>{let[n,o]=r,{id:l,styleId:c}=getIdAndStyleId(t,i,a.styleMirror);return(l&&-1!==l||c&&-1!==c)&&s({id:l,styleId:c,adds:[{rule:n,index:o}]}),e.apply(t,r)})});let c=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(c,{apply:callbackWrapper((e,t,r)=>{let[n]=r,{id:o,styleId:l}=getIdAndStyleId(t,i,a.styleMirror);return(o&&-1!==o||l&&-1!==l)&&s({id:o,styleId:l,removes:[{index:n}]}),e.apply(t,r)})}),o.CSSStyleSheet.prototype.replace&&(r=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(r,{apply:callbackWrapper((e,t,r)=>{let[n]=r,{id:o,styleId:l}=getIdAndStyleId(t,i,a.styleMirror);return(o&&-1!==o||l&&-1!==l)&&s({id:o,styleId:l,replace:n}),e.apply(t,r)})})),o.CSSStyleSheet.prototype.replaceSync&&(n=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(n,{apply:callbackWrapper((e,t,r)=>
1{let[n]=r,{id:o,styleId:l}=getIdAndStyleId(t,i,a.styleMirror);return(o&&-1!==o||l&&-1!==l)&&s({id:o,styleId:l,replaceSync:n}),e.apply(t,r)})}));let d={};canMonkeyPatchNestedCSSRule("CSSGroupingRule")?d.CSSGroupingRule=o.CSSGroupingRule:(canMonkeyPatchNestedCSSRule("CSSMediaRule")&&(d.CSSMediaRule=o.CSSMediaRule),canMonkeyPatchNestedCSSRule("CSSConditionRule")&&(d.CSSConditionRule=o.CSSConditionRule),canMonkeyPatchNestedCSSRule("CSSSupportsRule")&&(d.CSSSupportsRule=o.CSSSupportsRule));let u={};return Object.entries(d).forEach(e=>{let[t,r]=e;u[t]={insertRule:r.prototype.insertRule,deleteRule:r.prototype.deleteRule},r.prototype.insertRule=new Proxy(u[t].insertRule,{apply:callbackWrapper((e,t,r)=>{let[n,o]=r,{id:l,styleId:c}=getIdAndStyleId(t.parentStyleSheet,i,a.styleMirror);return(l&&-1!==l||c&&-1!==c)&&s({id:l,styleId:c,adds:[{rule:n,index:[...getNestedCSSRulePositions(t),o||0]}]}),e.apply(t,r)})}),r.prototype.deleteRule=new Proxy(u[t].deleteRule,{apply:callbackWrapper((e,t,r)=>{let[n]=r,{id:o,styleId:l}=getIdAndStyleId(t.parentStyleSheet,i,a.styleMirror);return(o&&-1!==o||l&&-1!==l)&&s({id:o,styleId:l,removes:[{index:[...getNestedCSSRulePositions(t),n]}]}),e.apply(t,r)})})}),callbackWrapper(()=>{o.CSSStyleSheet.prototype.insertRule=l,o.CSSStyleSheet.prototype.deleteRule=c,r&&(o.CSSStyleSheet.prototype.replace=r),n&&(o.CSSStyleSheet.prototype.replaceSync=n),Object.entries(d).forEach(e=>{let[t,r]=e;r.prototype.insertRule=u[t].insertRule,r.prototype.deleteRule=u[t].deleteRule})})}(e,{win:t}),d=initAdoptedStyleSheetObserver(e,e.doc),u=function(e,t){let{styleDeclarationCb:r,mirror:n,ignoreCSSAttributes:s,stylesheetManager:i}=e,{win:a}=t,o=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:callbackWrapper((e,t,a)=>{let[l,c,d]=a;if(s.has(l))return o.apply(t,[l,c,d]);let{id:u,styleId:h}=getIdAndStyleId(_optionalChain$2([t,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),n,i.styleMirror);return(u&&-1!==u||h&&-1!==h)&&r({id:u,styleId:h,set:{property:l,value:c,priority:d},index:getNestedCSSRulePositions(t.parentRule)}),e.apply(t,a)})});let l=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:callbackWrapper((e,t,a)=>{let[o]=a;if(s.has(o))return l.apply(t,[o]);let{id:c,styleId:d}=getIdAndStyleId(_optionalChain$2([t,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),n,i.styleMirror);return(c&&-1!==c||d&&-1!==d)&&r({id:c,styleId:d,remove:{property:o},index:getNestedCSSRulePositions(t.parentRule)}),e.apply(t,a)})}),callbackWrapper(()=>{a.CSSStyleDeclaration.prototype.setProperty=o,a.CSSStyleDeclaration.prototype.removeProperty=l})}(e,{win:t}),h=e.collectFonts?function(e){let{fontCb:t,doc:r}=e,n=r.defaultView;if(!n)return()=>{};let s=[],i=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,r){let n=new a(e,t,r);return i.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};let o=patch(r.fonts,"add",function(e){return function(r){return setTimeout$1(callbackWrapper(()=>{let e=i.get(r);e&&(t(e),i.delete(r))}),0),e.apply(this,[r])}});return s.push(()=>{n.FontFace=a}),s.push(o),callbackWrapper(()=>{s.forEach(e=>e())})}(e):()=>{},p=function(e){let{doc:t,mirror:r,blockClass:n,blockSelector:s,unblockSelector:i,selectionCb:a}=e,o=!0,l=callbackWrapper(()=>{let e=t.getSelection();if(!e||o&&_optionalChain$2([e,"optionalAccess",e=>e.isCollapsed]))return;o=e.isCollapsed||!1;let l=[],c=e.rangeCount||0;for(let t=0;t<c;t++){let a=e.getRangeAt(t),{startContainer:o,startOffset:c,endContainer:d,endOffset:u}=a,h=isBlocked(o,n,s,i,!0)||isBlocked(d,n,s,i,!0);h||l.push({start:r.getId(o),startOffset:c,end:r.getId(d),endOffset:u})}a({ranges:l})});return l(),on("selectionchange",l)}(e),m=function(e){let{doc:t,customElementCb:r}=e,n=t.defaultView;if(!n||!n.customElements)return()=>{};let s=patch(n.customElements,"define",function(e){return function(t,n,s){try{r({define:{name:t}})}catch(e){}return e.apply(this,[t,n,s])}});return s}(e),f=[];for(let r of e.plugins)f.push(r.observer(r.callback,t,r.options));return callbackWrapper(()=>
1{el.forEach(e=>e.reset()),r.disconnect(),n(),s(),i(),a(),o(),l(),c(),d(),u(),h(),p(),m(),f.forEach(e=>e())})}function hasNestedCSSRule(e){return void 0!==window[e]}function canMonkeyPatchNestedCSSRule(e){return!!(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}let CrossOriginIframeMirror=class CrossOriginIframeMirror{getId(e,t,r,n){let s=r||this.getIdToRemoteIdMap(e),i=n||this.getRemoteIdToIdMap(e),a=s.get(t);return a||(a=this.generateIdFn(),s.set(t,a),i.set(a,t)),a}getIds(e,t){let r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,n))}getRemoteId(e,t,r){let n=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;let s=n.get(t);return s||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}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}constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}};function _optionalChain$1(e){let t;let r=e[0],n=1;for(;n<e.length;){let s=e[n],i=e[n+1];if(n+=2,("optionalAccess"===s||"optionalCall"===s)&&null==r)return;"access"===s||"optionalAccess"===s?(t=r,r=i(r)):("call"===s||"optionalCall"===s)&&(r=i(function(){for(var e=arguments.length,n=Array(e),s=0;s<e;s++)n[s]=arguments[s];return r.call(t,...n)}),t=void 0)}return r}let IframeManagerNoop=class IframeManagerNoop{addIframe(){}addLoadListener(){}attachIframe(){}constructor(){this.crossOriginIframeMirror=new CrossOriginIframeMirror(genId),this.crossOriginIframeRootIdMap=new WeakMap}};let IframeManager=class IframeManager{addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),_optionalChain$1([this,"access",e=>e.loadListener,"optionalCall",t=>t(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||e.origin!==e.data.origin)return;let t=e.source;if(!t)return;let r=this.crossOriginIframeMap.get(e.source);if(!r)return;let n=this.transformCrossOriginEvent(r,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case es.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:es.IncrementalSnapshot,data:{source:ei.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case es.Meta:case es.Load:case es.DomContentLoaded:break;case es.Plugin:return t;case es.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case es.IncrementalSnapshot:switch(t.data.source){case ei.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);let r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)}),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 ei.Drag:case ei.TouchMove:case ei.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case ei.ViewportResize:return!1;case ei.MediaInteraction:case ei.MouseInteraction:case ei.Scroll:case ei.CanvasMutation:case ei.Input:return this.replaceIds(t.data,e,["id"]),t;case ei.StyleSheetRule:case ei.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case ei.Font:return t;
1case ei.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case ei.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),_optionalChain$1([t,"access",e=>e.data,"access",e=>e.styles,"optionalAccess",e=>e.forEach,"call",t=>t(t=>{this.replaceStyleIds(t,e,["styleId"])})]),t}}return!1}replace(e,t,r,n){for(let s of n)(Array.isArray(t[s])||"number"==typeof t[s])&&(Array.isArray(t[s])?t[s]=e.getIds(r,t[s]):t[s]=e.getId(r,t[s]));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","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===f.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new CrossOriginIframeMirror(genId),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new CrossOriginIframeMirror(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}};let ShadowDomManagerNoop=class ShadowDomManagerNoop{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}};let ShadowDomManager=class ShadowDomManager{init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!isNativeShadowDom(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=initMutationObserver({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(initScrollObserver({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout$1(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(initAdoptedStyleSheetObserver({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push(patch(e.prototype,"attachShadow",function(e){return function(n){let s=e.call(this,n);return this.shadowRoot&&inDom(this)&&r.addShadowRoot(this.shadowRoot,t),s}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}};let CanvasManagerNoop=class CanvasManagerNoop{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}};let StylesheetManager=class StylesheetManager{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;let r={id:t,styleIds:[]},n=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:stringifyRule(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){}constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=ne
1w StyleSheetMirror,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}};let ProcessedNodeManager=class ProcessedNodeManager{periodicallyClear(){!function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];getImplementation("requestAnimationFrame")(...t)}(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(e=>e!==t)}add(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}};let eu=new Mirror;function record(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{emit:r,checkoutEveryNms:n,checkoutEveryNth:s,blockClass:l="rr-block",blockSelector:c=null,unblockSelector:d=null,ignoreClass:u="rr-ignore",ignoreSelector:h=null,maskAllText:p=!1,maskTextClass:m="rr-mask",unmaskTextClass:f=null,maskTextSelector:g=null,unmaskTextSelector:y=null,inlineStylesheet:v=!0,maskAllInputs:_,maskInputOptions:b,slimDOMOptions:w,maskAttributeFn:k,maskInputFn:E,maskTextFn:I,maxCanvasSize:M=null,packFn:C,sampling:R={},dataURLOptions:T={},mousemoveWait:x,recordCanvas:A=!1,recordCrossOriginIframes:N=!1,recordAfter:D="DOMContentLoaded"===t.recordAfter?t.recordAfter:"load",userTriggeredOnInput:O=!1,collectFonts:L=!1,inlineImages:B=!1,plugins:P,keepIframeSrcFn:W=()=>!1,ignoreCSSAttributes:F=new Set([]),errorHandler:z,onMutation:U,getCanvasManager:H}=t;i=z;let j=!N||window.parent===window,q=!1;if(!j)try{window.parent.document&&(q=!1)}catch(e){q=!0}if(j&&!r)throw Error("emit function is required");void 0!==x&&void 0===R.mousemove&&(R.mousemove=x),eu.reset();let $=!0===_?{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,radio:!0,checkbox:!0}:void 0!==b?b:{},V=!0===w||"all"===w?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===w,headMetaDescKeywords:"all"===w}:w||{};!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;if("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){var t=this;Node.prototype.contains=function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];let s=r[0];if(!(0 in r))throw TypeError("1 argument is required");do if(t===s)return!0;while(s=s&&s.parentNode);return!1}}}();let K=0,eventProcessor=e=>{for(let t of P||[])t.eventProcessor&&(e=t.eventProcessor(e));return C&&!q&&(e=C(e)),e};a=(t,i)=>{if(t.timestamp=er(),(0,S.x)([el,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])&&t.type!==es.FullSnapshot&&!(t.type===es.IncrementalSnapshot&&t.data.source===ei.Mutation)&&el.forEach(e=>e.unfreeze()),j)(0,S.x)([r,"optionalCall",e=>e(eventProcessor(t),i)]);else if(q){let e={type:"rrweb",event:eventProcessor(t),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,"*")}if(t.type===es.FullSnapshot)e=t,K=0;else if(t.type===es.IncrementalSnapshot){if(t.data.source===ei.Mutation&&t.data.isAttachIframe)return;K++;let r=s&&K>=s,i=n&&e&&t.timestamp-e.timestamp>n;(r||i)&&takeFullSnapshot(!0)}};let wrappedMutationEmit=e=>{a({type:es.IncrementalSnapshot,data:{source:ei.Mutation,...e}})},wrappedScrollEmit=e=>a({type:es.IncrementalSnapshot,data:{source:ei.Scroll,...e}}),wrappedCanvasMutationEmit=e=>a({type:es.IncrementalSnapshot,data:{source:ei.CanvasMutation,...e}}),J=new StylesheetManager({mutationCb:wrappedMutationEmit,adoptedStyleSheetCb:e=>a({type:es.IncrementalSnapshot,data:{source:ei.AdoptedStyleSheet,...e}})}),Y="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new IframeManagerNoop:new IframeManager({mirror:eu,mutationCb:wrappedMutationEmit,stylesheetManager:J,recordCrossOriginIframes:N,wrappedEmit:a});for(let e of P||[])e.getMirror&&e.getMirror({nodeMirror:eu,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});let G=new ProcessedNodeManager,X=function(e,t){try{return e?e(t):new CanvasManagerNoop}catch(e){return console.warn("Unable to initialize CanvasManager"),new CanvasManagerNoop}}(H,{mirror:eu,win:window,mutationCb:e=>a({type:es.IncrementalSnapshot,data:{source:ei.CanvasMutation,...e}}),recordCanvas:A,blockClass:l,blockSelector:c,unblockSelector:d,maxCanvasSize:M,sampling:R.canvas,dataURLOptions:T,errorHandler:z}),Q="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new ShadowDomManagerNoop:new ShadowDomManager({mutationCb:wrappedMutationEmit,scrollCb:wrappedScrollEmit,bypassOptions:{onMutation:U,blockClass:l,blockSelector:c,unblockSelector:d,maskAllText:p,maskTextClass:m,unmaskTextClass:f,maskTextSelector:g,unmaskTextSelector:y,inl
1ineStylesheet:v,maskInputOptions:$,dataURLOptions:T,maskAttributeFn:k,maskTextFn:I,maskInputFn:E,recordCanvas:A,inlineImages:B,sampling:R,slimDOMOptions:V,iframeManager:Y,stylesheetManager:J,canvasManager:X,keepIframeSrcFn:W,processedNodeManager:G},mirror:eu}),takeFullSnapshot=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];a({type:es.Meta,data:{href:window.location.href,width:getWindowWidth(),height:getWindowHeight()}},e),J.reset(),Q.init(),el.forEach(e=>e.lock());let t=function(e,t){let{mirror:r=new Mirror,blockClass:n="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:a=!1,maskTextClass:o="rr-mask",unmaskTextClass:l=null,maskTextSelector:c=null,unmaskTextSelector:d=null,inlineStylesheet:u=!0,inlineImages:h=!1,recordCanvas:p=!1,maskAllInputs:m=!1,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOM:S=!1,dataURLOptions:v,preserveWhiteSpace:_,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:k,onStylesheetLoad:E,stylesheetLoadTimeout:I,keepIframeSrcFn:M=()=>!1}=t||{},C=!0===m?{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}:!1===m?{}:m,R=!0===S||"all"===S?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===S,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===S?{}:S;return serializeNodeWithId(e,{doc:e,mirror:r,blockClass:n,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:o,unmaskTextClass:l,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:u,maskInputOptions:C,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:R,dataURLOptions:v,inlineImages:h,recordCanvas:p,preserveWhiteSpace:_,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:k,onStylesheetLoad:E,stylesheetLoadTimeout:I,keepIframeSrcFn:M,newlyAddedElement:!1})}(document,{mirror:eu,blockClass:l,blockSelector:c,unblockSelector:d,maskAllText:p,maskTextClass:m,unmaskTextClass:f,maskTextSelector:g,unmaskTextSelector:y,inlineStylesheet:v,maskAllInputs:$,maskAttributeFn:k,maskInputFn:E,maskTextFn:I,slimDOM:V,dataURLOptions:T,recordCanvas:A,inlineImages:B,onSerialize:e=>{isSerializedIframe(e,eu)&&Y.addIframe(e),isSerializedStylesheet(e,eu)&&J.trackLinkElement(e),hasShadowRoot(e)&&Q.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Y.attachIframe(e,t),Q.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{J.attachLinkElement(e,t)},keepIframeSrcFn:W});if(!t)return console.warn("Failed to snapshot the document");a({type:es.FullSnapshot,data:{node:t,initialOffset:getWindowScroll(window)}}),el.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&J.adoptStyleSheets(document.adoptedStyleSheets,eu.getId(document))};o=takeFullSnapshot;try{let e=[],observe=e=>callbackWrapper(initObservers)({onMutation:U,mutationCb:wrappedMutationEmit,mousemoveCb:(e,t)=>a({type:es.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>a({type:es.IncrementalSnapshot,data:{source:ei.MouseInteraction,...e}}),scrollCb:wrappedScrollEmit,viewportResizeCb:e=>a({type:es.IncrementalSnapshot,data:{source:ei.ViewportResize,...e}}),inputCb:e=>a({type:es.IncrementalSnapshot,data:{source:ei.Input,...e}}),mediaInteractionCb:e=>a({type:es.IncrementalSnapshot,data:{source:ei.MediaInteraction,...e}}),styleSheetRuleCb:e=>a({type:es.IncrementalSnapshot,data:{source:ei.StyleSheetRule,...e}}),styleDeclarationCb:e=>a({type:es.IncrementalSnapshot,data:{source:ei.StyleDeclaration,...e}}),canvasMutationCb:wrappedCanvasMutationEmit,fontCb:e=>a({type:es.IncrementalSnapshot,data:{source:ei.Font,...e}}),selectionCb:e=>{a({type:es.IncrementalSnapshot,data:{source:ei.Selection,...e}})},customElementCb:e=>{a({type:es.IncrementalSnapshot,data:{source:ei.CustomElement,...e}})},blockClass:l,ignoreClass:u,ignoreSelector:h,maskAllText:p,maskTextClass:m,unmaskTextClass:f,maskTextSelector:g,unmaskTextSelector:y,maskInputOptions:$,inlineStylesheet:v,sampling:R,recordCanvas:A,inlineImages:B,userTriggeredOnInput:O,collectFonts:L,doc:e,maskAttributeFn:k,maskInputFn:E,maskTextFn:I,keepIframeSrcFn:W,blockSelector:c,unblockSelector:d,slimDOMOptions:V,dataURLOptions:T,mirror:eu,iframeManager:Y,stylesheetManager:J,shadowDomManager:Q,processedNodeManager:G,canvasManager:X,ignoreCSSAttributes:F,plugins:(0,S.x)([P,"optionalAccess",e=>e.filter,"call",e=>e(e=>e.observer),"optionalAccess",e=>e.map,"call",e=>e(e=>({observer:e.observer,options:e.options,callback:t=>a({type:es.Plugin,data:{plugin:e.name,payload:t}}
1)}))])||[]},{});Y.addLoadListener(t=>{try{e.push(observe(t.contentDocument))}catch(e){console.warn(e)}});let init=()=>{takeFullSnapshot(),e.push(observe(document))};return"interactive"===document.readyState||"complete"===document.readyState?init():(e.push(on("DOMContentLoaded",()=>{a({type:es.DomContentLoaded,data:{}}),"DOMContentLoaded"===D&&init()})),e.push(on("load",()=>{a({type:es.Load,data:{}}),"load"===D&&init()},window))),()=>{e.forEach(e=>e()),G.destroy(),o=void 0,i=void 0}}catch(e){console.warn(e)}}function timestampToMs(e){return e>9999999999?e:1e3*e}function timestampToS(e){return e>9999999999?e/1e3:e}function addBreadcrumbEvent(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:es.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:(0,C.Fv)(t,10,1e3)}}),"console"===t.category)))}function getClosestInteractive(e){let t=e.closest("button,a");return t||e}function getClickTargetNode(e){let t=getTargetNode(e);return t&&t instanceof Element?getClosestInteractive(t):t}function getTargetNode(e){return"object"==typeof e&&e&&"target"in e?e.target:e}record.mirror=eu,record.takeFullSnapshot=function(e){if(!o)throw Error("please take full snapshot after start recording");o(e)};let ClickDetector=class ClickDetector{addListeners(){var e;let t=(e=()=>{this._lastMutation=nowInSeconds()},l||(l=[],(0,R.hl)(H,"open",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];if(l)try{l.forEach(e=>e())}catch(e){}return e.apply(H,r)}})),l.push(e),()=>{let t=l?l.indexOf(e):-1;t>-1&&l.splice(t,1)});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){var r;if(r=this._ignoreSelector,!eh.includes(t.tagName)||"INPUT"===t.tagName&&!["submit","button"].includes(t.getAttribute("type")||"")||"A"===t.tagName&&(t.hasAttribute("download")||t.hasAttribute("target")&&"_self"!==t.getAttribute("target"))||r&&t.matches(r)||!(e.data&&"number"==typeof e.data.nodeId&&e.timestamp))return;let n={timestamp:timestampToS(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&1>Math.abs(e.timestamp-n.timestamp))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this._lastMutation=timestampToS(e)}registerScroll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this._lastScroll=timestampToS(e)}registerClick(e){let t=getClosestInteractive(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){let e=[],t=nowInSeconds();for(let r of(this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=t&&e.push(r)}),e)){let e=this._clicks.indexOf(r);e>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){let t=this._replay,r=e.scrollAfter&&e.scrollAfter<=this._scollTimeout,n=e.mutationAfter&&e.mutationAfter<=this._threshold,{clickCount:s,clickBreadcrumb:i}=e;if(!r&&!n){let r=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),n=r<1e3*this._timeout?"mutation":"timeout",a={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.slowClickDetected",data:{...i.data,url:H.location.href,route:t.getCurrentRoute(),timeAfterClickMs:r,endReason:n,clickCount:s||1}};this._addBreadcrumbEvent(t,a);return}if(s>1){let e={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.multiClick",data:{...i.data,url:H.location.href,route:t.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout(()=>this._checkClicks(),1e3)}constructor(e,t,r=addBreadcrumbEvent){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=r}};let eh=["A","BUTTON","INPUT"];function nowInSeconds(){return Date.now()/1e3}function createBreadcrumb(e){return{timestamp:Date.now()/1e3,type:"default",...e}}(m=g||(g={}))[m.Document=0]="Document",m[m.DocumentType=1]="DocumentType",m[m.Element=2]="Element",m[m.Text=3]="Text",m[m.CDATA=4]="CDATA",m[m.Comment=5]="Comment";let ep=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]),handleDomListener=e=>t=>{if(!e.isEnabled())return;let r=function(e){let{target:t,message:r}=function(e){let t;let r="click"===e.name,n=null;try{n=r?getClickTargetNode(e.event):getTargetNode(e.event),t=(0,T.Rt)(n,{maxStringLength:200})||"<unknown>"}catch(e){t="<unknown>"}return{target:n,message:t}}(e);return createBreadcrumb({category:"ui.".concat(e.name),...getBaseDomBreadcrumb(t,r)})}(t);if(!r)return;let n="click"===t.name,s=n?t.event:void 0;n&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&function(e,t,r){e.handleClick(t,r)}(e.clickDetector,r,getClickTargetNode(t.event)),addBreadcrumbEvent(e,r)};function getBaseDomBreadcrumb(e,t){let r=record.mirror.getId(e),n=r&&record.mirror.getNode(r),s=n&&record.mirror.getMeta(n),i=s&&s.type===g.Element?s:null;return{message:t,data:i?{nodeId:r,node:{id:r,tagName:i.tagName,textContent:Array.from(i.childNodes).map(e=>
1e.type===g.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(""),attributes:function(e){let t={};for(let r in e)if(ep.has(r)){let n=r;("data-testid"===r||"data-test-id"===r)&&(n="testId"),t[n]=e[r]}return t}(i.attributes)}}:{}}}let em={resource:function(e){let{entryType:t,initiatorType:r,name:n,responseEnd:s,startTime:i,decodedBodySize:a,encodedBodySize:o,responseStatus:l,transferSize:c}=e;return["fetch","xmlhttprequest"].includes(r)?null:{type:"".concat(t,".").concat(r),start:getAbsoluteTime(i),end:getAbsoluteTime(s),name:n,data:{size:c,statusCode:l,decodedBodySize:a,encodedBodySize:o}}},paint:function(e){let{duration:t,entryType:r,name:n,startTime:s}=e,i=getAbsoluteTime(s);return{type:r,name:n,start:i,end:i+t,data:void 0}},navigation:function(e){let{entryType:t,name:r,decodedBodySize:n,duration:s,domComplete:i,encodedBodySize:a,domContentLoadedEventStart:o,domContentLoadedEventEnd:l,domInteractive:c,loadEventStart:d,loadEventEnd:u,redirectCount:h,startTime:p,transferSize:m,type:f}=e;return 0===s?null:{type:"".concat(t,".").concat(f),start:getAbsoluteTime(p),end:getAbsoluteTime(i),name:r,data:{size:m,decodedBodySize:n,encodedBodySize:a,duration:s,domInteractive:c,domContentLoadedEventStart:o,domContentLoadedEventEnd:l,loadEventStart:d,loadEventEnd:u,domComplete:i,redirectCount:h}}}};function createPerformanceEntry(e){return em[e.entryType]?em[e.entryType](e):null}function getAbsoluteTime(e){return((x.Z1||H.performance.timeOrigin)+e)/1e3}let EventBufferSizeExceededError=class EventBufferSizeExceededError extends Error{constructor(){super("Event buffer exceeded maximum size of ".concat(2e7,"."))}};let EventBufferArray=class EventBufferArray{get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){let t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>2e7)throw new EventBufferSizeExceededError;this.events.push(e)}finish(){return new Promise(e=>{let t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=this.events.map(e=>e.timestamp).sort()[0];return e?timestampToMs(e):null}constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}};let WorkerHandler=class WorkerHandler{ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((e,t)=>{this._worker.addEventListener("message",r=>{let{data:n}=r;n.success?e():t()},{once:!0}),this._worker.addEventListener("error",e=>{t(e)},{once:!0})})),this._ensureReadyPromise}destroy(){this._worker.terminate()}postMessage(e,t){let r=this._getAndIncrementId();return new Promise((n,s)=>{let listener=t=>{let{data:i}=t;if(i.method===e&&i.id===r){if(this._worker.removeEventListener("message",listener),!i.success){s(Error("Error in compression worker"));return}n(i.response)}};this._worker.addEventListener("message",listener),this._worker.postMessage({id:r,method:e,arg:t})})}_getAndIncrementId(){return this._id++}constructor(e){this._worker=e,this._id=0}};let EventBufferCompressionWorker=class EventBufferCompressionWorker{get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){let t=timestampToMs(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);let r=JSON.stringify(e);return(this._totalSize+=r.length,this._totalSize>2e7)?Promise.reject(new EventBufferSizeExceededError):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){let e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}constructor(e){this._worker=new WorkerHandler(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}};let EventBufferProxy=class EventBufferProxy{get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}
1async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:e,hasCheckout:t}=this._fallback,r=[];for(let t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._used=this._compression;try{await Promise.all(r)}catch(e){}}constructor(e){this._fallback=new EventBufferArray,this._compression=new EventBufferCompressionWorker(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}};function hasSessionStorage(){try{return"sessionStorage"in H&&!!H.sessionStorage}catch(e){return!1}}function isSampled(e){return void 0!==e&&Math.random()<e}function makeSession(e){let t=Date.now(),r=e.id||(0,N.DM)(),n=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,a=e.sampled,o=e.previousSessionId;return{id:r,started:n,lastActivity:s,segmentId:i,sampled:a,previousSessionId:o}}function saveSession(e){if(hasSessionStorage())try{H.sessionStorage.setItem(j,JSON.stringify(e))}catch(e){}}function createSession(e){let{sessionSampleRate:t,allowBuffering:r,stickySession:n=!1}=e,{previousSessionId:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=isSampled(t)?"session":!!r&&"buffer",a=makeSession({sampled:i,previousSessionId:s});return n&&saveSession(a),a}function isExpired(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:+new Date;return null===e||void 0===t||t<0||0!==t&&e+t<=r}function isSessionExpired(e,t){let{maxReplayDuration:r,sessionIdleExpire:n,targetTime:s=Date.now()}=t;return isExpired(e.started,r,s)||isExpired(e.lastActivity,n,s)}function shouldRefreshSession(e,t){let{sessionIdleExpire:r,maxReplayDuration:n}=t;return!!isSessionExpired(e,{sessionIdleExpire:r,maxReplayDuration:n})&&("buffer"!==e.sampled||0!==e.segmentId)}function loadOrCreateSession(e,t){let{traceInternals:r,sessionIdleExpire:n,maxReplayDuration:s,previousSessionId:i}=e,a=t.stickySession&&function(e){if(!hasSessionStorage())return null;try{let e=H.sessionStorage.getItem(j);if(!e)return null;let t=JSON.parse(e);return makeSession(t)}catch(e){return null}}(0);return a?shouldRefreshSession(a,{sessionIdleExpire:n,maxReplayDuration:s})?createSession(t,{previousSessionId:a.id}):a:createSession(t,{previousSessionId:i})}function addEventSync(e,t,r){return!!shouldAddEvent(e,t)&&(_addEvent(e,t,r),!0)}async function _addEvent(e,t,r){if(!e.eventBuffer)return null;try{r&&"buffer"===e.recordingMode&&e.eventBuffer.clear(),r&&(e.eventBuffer.hasCheckout=!0);let n=e.getOptions(),s=function(e,t){try{if("function"==typeof t&&e.type===es.Custom)return t(e)}catch(e){return null}return e}(t,n.beforeAddRecordingEvent);if(!s)return;return await e.eventBuffer.addEvent(s)}catch(n){let t=n&&n instanceof EventBufferSizeExceededError?"addEventSizeExceeded":"addEvent";await e.stop({reason:t});let r=(0,v.s3)();r&&r.recordDroppedEvent("internal_sdk_error","replay")}}function shouldAddEvent(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let r=timestampToMs(t.timestamp);return!(r+e.timeouts.sessionIdlePause<Date.now())&&(!(r>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(e.getOptions()._experiments.traceInternals,!1))}function isTransactionEvent(e){return"transaction"===e.type}function isFeedbackEvent(e){return"feedback"===e.type}function handleAfterSendEvent(e){let t=function(){let e=(0,v.s3)();if(!e)return!1;let t=e.getTransport();return!!t&&(t.send.__sentry__baseTransport__||!1)}();return(r,n)=>{if(!e.isEnabled()||r.type&&!isTransactionEvent(r))return;let s=n&&n.statusCode;if(!t||s&&!(s<200)&&!(s>=300)){if(isTransactionEvent(r)){!function(e,t){let r=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&r.traceIds.size<100&&r.traceIds.add(t.contexts.trace.trace_id)}(e,r);return}!function(e,t){let r=e.getContext();if(t.event_id&&r.errorIds.size<100&&r.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;let{beforeErrorSampling:n}=e.getOptions();("function"!=typeof n||n(t))&&setTimeout(()=>{e.sendBufferedReplayOrFlush()})}(e,r)}}}function createPerformanceSpans(e,t){return t.map(t=>{let{type:r,start:n,end:s,name:i,data:a}=t,o=e.throttledAddEvent({type:es.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:r,description:i,startTimestamp:n,endTimestamp:s,data:a}}});return"string"==typeof o?Promise.resolve(null):o})}function addNetworkBreadcrumb(e,t){var r;
1e.isEnabled()&&null!==t&&(r=t.name,(0,_.W)(r,(0,v.s3)())||e.addUpdate(()=>(createPerformanceSpans(e,[t]),!0)))}function getBodySize(e,t){if(e)try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let r=_serializeFormData(e);return t.encode(r).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch(e){}}function parseContentLengthHeader(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function getBodyString(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[_serializeFormData(e)];if(!e)return[void 0]}catch(e){return[void 0,"BODY_PARSE_ERROR"]}return[void 0,"UNPARSEABLE_BODY_TYPE"]}function mergeWarning(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let r={...e._meta},n=r.warnings||[];return r.warnings=[...n,t],e._meta=r,e}function makeNetworkReplayBreadcrumb(e,t){if(!t)return null;let{startTimestamp:r,endTimestamp:n,url:s,method:i,statusCode:a,request:o,response:l}=t,c={type:e,start:r/1e3,end:n/1e3,name:s,data:(0,R.Jr)({method:i,statusCode:a,request:o,response:l})};return c}function buildSkippedNetworkRequestOrResponse(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function buildNetworkRequestOrResponse(e,t,r){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!r)return{headers:e,size:t};let n={headers:e,size:t},{body:s,warnings:i}=function(e){if(!e||"string"!=typeof e)return{body:e};let t=e.length>15e4,r=function(e){let t=e[0],r=e[e.length-1];return"["===t&&"]"===r||"{"===t&&"}"===r}(e);if(t){let t=e.slice(0,15e4);return r?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:"".concat(t,"…"),warnings:["TEXT_TRUNCATED"]}}if(r)try{let t=JSON.parse(e);return{body:t}}catch(e){}return{body:e}}(r);return n.body=s,i&&i.length>0&&(n._meta={warnings:i}),n}function getAllowedHeaders(e,t){return Object.keys(e).reduce((r,n)=>{let s=n.toLowerCase();return t.includes(s)&&e[n]&&(r[s]=e[n]),r},{})}function _serializeFormData(e){return new URLSearchParams(e).toString()}function urlMatches(e,t){let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H.document.baseURI;if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(H.location.origin))return e;let r=new URL(e,t);if(r.origin!==new URL(t).origin)return e;let n=r.href;return!e.endsWith("/")&&n.endsWith("/")?n.slice(0,-1):n}(e);return(0,O.U0)(r,t)}async function captureFetchBreadcrumbToReplay(e,t,r){try{let n=await _prepareFetchData(e,t,r),s=makeNetworkReplayBreadcrumb("resource.fetch",n);addNetworkBreadcrumb(r.replay,s)}catch(e){}}async function _prepareFetchData(e,t,r){let n=Date.now(),{startTimestamp:s=n,endTimestamp:i=n}=t,{url:a,method:o,status_code:l=0,request_body_size:c,response_body_size:d}=e.data,u=urlMatches(a,r.networkDetailAllowUrls)&&!urlMatches(a,r.networkDetailDenyUrls),h=u?function(e,t,r){let{networkCaptureBodies:n,networkRequestHeaders:s}=e,i=t?1===t.length&&"string"!=typeof t[0]?getHeadersFromOptions(t[0],s):2===t.length?getHeadersFromOptions(t[1],s):{}:{};if(!n)return buildNetworkRequestOrResponse(i,r,void 0);let a=_getFetchRequestArgBody(t),[o,l]=getBodyString(a),c=buildNetworkRequestOrResponse(i,r,o);return l?mergeWarning(c,l):c}(r,t.input,c):buildSkippedNetworkRequestOrResponse(c),p=await _getResponseInfo(u,r,t.response,d);return{startTimestamp:s,endTimestamp:i,url:a,method:o,statusCode:l,request:h,response:p}}async function _getResponseInfo(e,t,r,n){let{networkCaptureBodies:s,textEncoder:i,networkResponseHeaders:a}=t;if(!e&&void 0!==n)return buildSkippedNetworkRequestOrResponse(n);let o=r?getAllHeaders(r.headers,a):{};if(!r||!s&&void 0!==n)return buildNetworkRequestOrResponse(o,n,void 0);let[l,c]=await _parseFetchResponseBody(r),d=function(e,t){let{networkCaptureBodies:r,textEncoder:n,responseBodySize:s,captureDetails:i,headers:a}=t;try{let t=e&&e.length&&void 0===s?getBodySize(e,n):s;if(!i)return buildSkippedNetworkRequestOrResponse(t);if(r)return buildNetworkRequestOrResponse(a,t,e);
1return buildNetworkRequestOrResponse(a,t,void 0)}catch(e){return buildNetworkRequestOrResponse(a,s,void 0)}}(l,{networkCaptureBodies:s,textEncoder:i,responseBodySize:n,captureDetails:e,headers:o});return c?mergeWarning(d,c):d}async function _parseFetchResponseBody(e){let t=function(e){try{return e.clone()}catch(e){}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{let e=await new Promise((e,r)=>{let n=setTimeout(()=>r(Error("Timeout while trying to read response body")),500);_getResponseText(t).then(t=>e(t),e=>r(e)).finally(()=>clearTimeout(n))});return[e]}catch(e){return[void 0,"BODY_PARSE_ERROR"]}}function _getFetchRequestArgBody(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(2===e.length&&"object"==typeof e[1])return e[1].body}function getAllHeaders(e,t){let r={};return t.forEach(t=>{e.get(t)&&(r[t]=e.get(t))}),r}function getHeadersFromOptions(e,t){if(!e)return{};let r=e.headers;return r?r instanceof Headers?getAllHeaders(r,t):Array.isArray(r)?{}:getAllowedHeaders(r,t):{}}async function _getResponseText(e){return await e.text()}async function captureXhrBreadcrumbToReplay(e,t,r){try{let n=function(e,t,r){let n=Date.now(),{startTimestamp:s=n,endTimestamp:i=n,input:a,xhr:o}=t,{url:l,method:c,status_code:d=0,request_body_size:u,response_body_size:h}=e.data;if(!l)return null;if(!o||!urlMatches(l,r.networkDetailAllowUrls)||urlMatches(l,r.networkDetailDenyUrls)){let e=buildSkippedNetworkRequestOrResponse(u),t=buildSkippedNetworkRequestOrResponse(h);return{startTimestamp:s,endTimestamp:i,url:l,method:c,statusCode:d,request:e,response:t}}let p=o[D.xU],m=p?getAllowedHeaders(p.request_headers,r.networkRequestHeaders):{},f=getAllowedHeaders(function(e){let t=e.getAllResponseHeaders();return t?t.split("\r\n").reduce((e,t)=>{let[r,n]=t.split(": ");return e[r.toLowerCase()]=n,e},{}):{}}(o),r.networkResponseHeaders),[g,y]=r.networkCaptureBodies?getBodyString(a):[void 0],[S,v]=r.networkCaptureBodies?function(e){let t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return function(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(e){return[void 0,"BODY_PARSE_ERROR"]}return[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(e){t.push(e)}return[void 0]}(o):[void 0],_=buildNetworkRequestOrResponse(m,u,g),b=buildNetworkRequestOrResponse(f,h,S);return{startTimestamp:s,endTimestamp:i,url:l,method:c,statusCode:d,request:y?mergeWarning(_,y):_,response:v?mergeWarning(b,v):b}}(e,t,r),s=makeNetworkReplayBreadcrumb("resource.xhr",n);addNetworkBreadcrumb(r.replay,s)}catch(e){}}let ef=null,handleScopeListener=e=>t=>{if(!e.isEnabled())return;let r=function(e){let t=e.getLastBreadcrumb&&e.getLastBreadcrumb();return ef!==t&&t?(ef=t,!t.category||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))?null:"console"===t.category?function(e){let t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return createBreadcrumb(e);let r=!1,n=t.map(e=>{if(!e)return e;if("string"==typeof e)return e.length>5e3?(r=!0,"".concat(e.slice(0,5e3),"…")):e;if("object"==typeof e)try{let t=(0,C.Fv)(e,7),n=JSON.stringify(t);if(n.length>5e3)return r=!0,"".concat(JSON.stringify(t,null,2).slice(0,5e3),"…");return t}catch(e){}return e});return createBreadcrumb({...e,data:{...e.data,arguments:n,...r?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(t):createBreadcrumb(t):null}(t);r&&addBreadcrumbEvent(e,r)};async function addMemoryEntry(e){try{return Promise.all(createPerformanceSpans(e,[function(e){let{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:n}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:n}}}}(H.performance.memory)]))}catch(e){return[]}}async function prepareReplayEvent(e){let{client:t,scope:r,replayId:n,event:s}=e,i="object"!=typeof t._integrations||null===t._integrations||Array.isArray(t._integrations)?void 0:Object.keys(t._integrations),a={event_id:n,integrations:i};t.emit&&t.emit("preprocessEvent",s,a);let o=await (0,w.R)(t.getOptions(),s,a,r,t,(0,k.aF)());if(!o)return null;o.platform=o.platform||"javascript";let l=t.getSdkMetadata&&t.getSdkMetadata(),{name:c,version:d}=l&&l.sdk||{};return o.sdk={...o.sdk,name:c||"sentry.javascript.unknown",version:d||"0.0.0"},o}async function sendReplayRequest(e){var t;let r,{recordingData:n,replayId:s,segmentId:i,eventContext:a,timestamp:o,session:l}=e,c=function(e){let t,{recordingData:r,headers:n}=e,s="".concat(JSON.stringify(n),"\n");if("string"==typeof r)t="".concat(s).concat(r);else{let e=new TextEncoder,n=e.encode(s);
1(t=new Uint8Array(n.length+r.length)).set(n),t.set(r,n.length)}return t}({recordingData:n,headers:{segment_id:i}}),{urls:d,errorIds:u,traceIds:h,initialTimestamp:p}=a,m=(0,v.s3)(),f=(0,v.nZ)(),g=m&&m.getTransport(),y=m&&m.getDsn();if(!m||!g||!y||!l.sampled)return;let S={type:"replay_event",replay_start_timestamp:p/1e3,timestamp:o/1e3,error_ids:u,trace_ids:h,urls:d,replay_id:s,segment_id:i,replay_type:l.sampled},_=await prepareReplayEvent({scope:f,client:m,replayId:s,event:S});if(!_){m.recordDroppedEvent("event_processor","replay",S);return}delete _.sdkProcessingMetadata;let b=(t=m.getOptions().tunnel,(0,W.Jd)((0,W.Cd)(_,(0,W.HY)(_),t,y),[[{type:"replay_event"},_],[{type:"replay_recording",length:"string"==typeof c?new TextEncoder().encode(c).length:c.length},c]]));try{r=await g.send(b)}catch(t){let e=Error(q);try{e.cause=t}catch(e){}throw e}if(!r)return r;if("number"==typeof r.statusCode&&(r.statusCode<200||r.statusCode>=300))throw new TransportStatusCodeError(r.statusCode);let w=(0,F.WG)({},r);if((0,F.Q)(w,"replay"))throw new RateLimitError(w);return r}let TransportStatusCodeError=class TransportStatusCodeError extends Error{constructor(e){super("Transport returned status code ".concat(e))}};let RateLimitError=class RateLimitError extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}};async function sendReplay(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{count:0,interval:5e3},{recordingData:r,options:n}=e;if(r.length)try{return await sendReplayRequest(e),!0}catch(r){if(r instanceof TransportStatusCodeError||r instanceof RateLimitError)throw r;if((0,v.v)("Replays",{_retryCount:t.count}),t.count>=3){let e=Error("".concat(q," - max retries exceeded"));try{e.cause=r}catch(e){}throw e}return t.interval*=++t.count,new Promise((r,n)=>{setTimeout(async()=>{try{await sendReplay(e,t),r(!0)}catch(e){n(e)}},t.interval)})}}let eg="__THROTTLED";let ReplayContainer=class ReplayContainer{getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(e){let{errorSampleRate:t,sessionSampleRate:r}=this._options;if(!(t<=0)||!(r<=0)){if(this._initializeSessionForSampling(e),!this.session){this._handleException(Error("Unable to initialize and create session"));return}!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",this.recordingMode,this._options._experiments.traceInternals,this._initializeRecording())}}start(){if(this._isEnabled&&"session"===this.recordingMode)throw Error("Replay recording is already in progress");if(this._isEnabled&&"buffer"===this.recordingMode)throw Error("Replay buffering is in progress, call `flush()` to save the replay");this._options._experiments.traceInternals,this._updateUserActivity();let e=loadOrCreateSession({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw Error("Replay recording is already in progress");this._options._experiments.traceInternals;let e=loadOrCreateSession({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{var e;let t;let r=this._canvas;this._stopRecording=record({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:(e=this,t=!1,(r,n)=>{if(!e.checkAndHandleExpiredSession())return;let s=n||!t;t=!0,e.clickDetector&&function(e,t){try{if(3!==t.type)return;let{source:r}=t.data;if(r===ei.Mutation&&e.registerMutation(t.timestamp),r===ei.Scroll&&e.registerScroll(t.timestamp),t.data.source===ei.MouseInteraction){let{type:r,id:n}=t.data,s=record.mirror.getNode(n);s instanceof HTMLElement&&r===ea.Click&&e.registerClick(s)}}catch(e){}}(e.clickDetector,r),e.addUpdate(()=>{if("buffer"===e.recordingMode&&s&&e.setInitialState(),!addEventSync(e,r,s))return!0;
1if(!s)return!1;if(s&&e.session&&0===e.session.segmentId&&addEventSync(e,function(e){let t=e.getOptions();return{type:es.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1),e.session&&e.session.previousSessionId)return!0;if("buffer"===e.recordingMode&&e.session&&e.eventBuffer){let t=e.eventBuffer.getEarliestTimestamp();t&&(e.getOptions()._experiments.traceInternals,e.session.started=t,e.getOptions().stickySession&&saveSession(e.session))}return"session"===e.recordingMode&&e.flush(),!0})}),onMutation:this._onMutationHandler,...r?{recordCanvas:r.recordCanvas,getCanvasManager:r.getCanvasManager,sampling:r.sampling,dataURLOptions:r.dataURLOptions}:{}})}catch(e){this._handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this._handleException(e),!1}}async stop(){let{forceFlush:e=!1,reason:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._isEnabled){this._isEnabled=!1;try{this._options._experiments.traceInternals,this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,function(){if(hasSessionStorage())try{H.sessionStorage.removeItem(j)}catch(e){}}(),this.session=void 0}catch(e){this._handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),this._options._experiments.traceInternals)}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),this._options._experiments.traceInternals)}async sendBufferedReplayOrFlush(){let{continueRecording:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("session"===this.recordingMode)return this.flushImmediate();let t=Date.now();this._options._experiments.traceInternals,await this.flushImmediate();let r=this.stopRecording();e&&r&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){let t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&isExpired(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled){this.pause();return}return!!this._checkSession()}setInitialState(){let e="".concat(H.location.pathname).concat(H.location.hash).concat(H.location.search),t="".concat(H.location.origin).concat(e);this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){let r=this._throttledAddEvent(e,t);if(r===eg){let e=createBreadcrumb({category:"replay.throttled"});this.addUpdate(()=>!addEventSync(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}}))}return r}getCurrentRoute(){let e=this.lastTransaction||(0,v.nZ)().getTransaction(),t=e&&(0,E.XU)(e).data||{},r=t[I.Zj];if(e&&r&&["route","custom"].includes(r))return(0,E.XU)(e).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function(e){let{useCompression:t,workerUrl:r}=e;if(t&&window.Worker){let e=function(e){try{let t=e||("undefined"!=typeof __SENTRY_EXCLUDE_REPLAY_WORKER__&&__SENTRY_EXCLUDE_REPLAY_WORKER__?"":function(){let e=new Blob(['var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}
vendor: 5,353 bytes, line 1
1},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;
1++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(e)}());if(!t)return;let r=new Worker(t);return new EventBufferProxy(r)}catch(e){}}(r);if(e)return e}return new EventBufferArray}({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(e){}_initializeSessionForSampling(e){let t=this._options.errorSampleRate>0,r=loadOrCreateSession({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=r}_checkSession(){if(!this.session)return!1;let e=this.session;return!shouldRefreshSession(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{H.document.addEventListener("visibilitychange",this._handleVisibilityChange),H.addEventListener("blur",this._handleWindowBlur),H.addEventListener("focus",this._handleWindowFocus),H.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(function(e){let t=(0,v.nZ)(),r=(0,v.s3)();t.addScopeListener(handleScopeListener(e)),(0,B.O)(handleDomListener(e)),(0,P.a)(t=>{if(!e.isEnabled())return;let r=function(e){let{from:t,to:r}=e,n=Date.now()/1e3;return{type:"navigation.push",start:n,end:n,name:r,data:{previous:t}}}(t);null!==r&&(e.getContext().urls.push(r.name),e.triggerUserActivity(),e.addUpdate(()=>(createPerformanceSpans(e,[r]),!1)))}),function(e){let t=(0,v.s3)();try{let r=new TextEncoder,{networkDetailAllowUrls:n,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:o}=e.getOptions(),l={replay:e,textEncoder:r,networkDetailAllowUrls:n,networkDetailDenyUrls:s,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:o};t&&t.on?t.on("beforeAddBreadcrumb",(e,t)=>(function(e,t,r){if(t.data)try{var n,s;"xhr"===t.category&&(n=r)&&n.xhr&&(function(e,t,r){let{xhr:n,input:s}=t;if(!n)return;let i=getBodySize(s,r.textEncoder),a=n.getResponseHeader("content-length")?parseContentLengthHeader(n.getResponseHeader("content-length")):function(e,t,r){try{let n="json"===t&&e&&"object"==typeof e?JSON.stringify(e):e;return getBodySize(n,r)}catch(e){return}}(n.response,n.responseType,r.textEncoder);void 0!==i&&(e.data.request_body_size=i),void 0!==a&&(e.data.response_body_size=a
1)}(t,r,e),captureXhrBreadcrumbToReplay(t,r,e)),"fetch"===t.category&&(s=r)&&s.response&&(function(e,t,r){let{input:n,response:s}=t,i=n?_getFetchRequestArgBody(n):void 0,a=getBodySize(i,r.textEncoder),o=s?parseContentLengthHeader(s.headers.get("content-length")):void 0;void 0!==a&&(e.data.request_body_size=a),void 0!==o&&(e.data.response_body_size=o)}(t,r,e),captureFetchBreadcrumbToReplay(t,r,e))}catch(e){}})(l,e,t)):((0,L.U)(t=>{if(!e.isEnabled())return;let r=function(e){let{startTimestamp:t,endTimestamp:r,fetchData:n,response:s}=e;if(!r)return null;let{method:i,url:a}=n;return{type:"resource.fetch",start:t/1e3,end:r/1e3,name:a,data:{method:i,statusCode:s?s.status:void 0}}}(t);addNetworkBreadcrumb(e,r)}),(0,D.UK)(t=>{if(!e.isEnabled())return;let r=function(e){let{startTimestamp:t,endTimestamp:r,xhr:n}=e,s=n[D.xU];if(!t||!r||!s)return null;let{method:i,url:a,status_code:o}=s;return void 0===a?null:{type:"resource.xhr",name:a,start:t/1e3,end:r/1e3,data:{method:i,statusCode:o}}}(t);addNetworkBreadcrumb(e,r)}))}catch(e){}}(e);let n=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t?handleAfterSendEvent(e):void 0;return Object.assign((t,n)=>{if(!e.isEnabled())return t;if("replay_event"===t.type)return delete t.breadcrumbs,t;if(t.type&&!isTransactionEvent(t)&&!isFeedbackEvent(t))return t;let s=e.checkAndHandleExpiredSession();if(!s)return t;if(isFeedbackEvent(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:es.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)),t;if(!t.type&&t.exception&&t.exception.values&&t.exception.values.length&&n.originalException&&n.originalException.__rrweb__&&!e.getOptions()._experiments.captureExceptions)return null;let i="buffer"===e.recordingMode&&t.message!==q&&!!t.exception&&!t.type&&isSampled(e.getOptions().errorSampleRate),a=i||"session"===e.recordingMode;return a&&(t.tags={...t.tags,replayId:e.getSessionId()}),r&&r(t,{statusCode:200}),t},{id:"Replay"})}(e,!(r&&r.on));r&&r.addEventProcessor?r.addEventProcessor(n):(0,b.Q)(n),r&&r.on&&(r.on("beforeSendEvent",t=>{e.isEnabled()&&!t.type&&function(e,t){let r=t.exception&&t.exception.values&&t.exception.values[0].value;if("string"==typeof r&&(r.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||r.match(/(does not match server-rendered HTML|Hydration failed because)/i))){let t=createBreadcrumb({category:"replay.hydrate-error"});addBreadcrumbEvent(e,t)}}(e,t)}),r.on("afterSendEvent",handleAfterSendEvent(e)),r.on("createDsc",t=>{let r=e.getSessionId();if(r&&e.isEnabled()&&"session"===e.recordingMode){let n=e.checkAndHandleExpiredSession();n&&(t.replay_id=r)}}),r.on("startTransaction",t=>{e.lastTransaction=t}),r.on("finishTransaction",t=>{e.lastTransaction=t}),r.on("beforeSendFeedback",(t,r)=>{let n=e.getSessionId();r&&r.includeReplay&&e.isEnabled()&&n&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=n)}))}(this),this._hasInitializedCoreListeners=!0)}catch(e){this._handleException(e)}this._performanceCleanupCallback=function(e){function addPerformanceEntry(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function onEntries(e){let{entries:t}=e;t.forEach(addPerformanceEntry)}let t=[];return["navigation","paint","resource"].forEach(e=>{t.push((0,U._j)(e,onEntries))}),t.push((0,U.$A)(t=>{let{metric:r}=t;e.replayPerformanceEntries.push(function(e){let t=e.entries,r=t[t.length-1],n=r?r.element:void 0,s=e.value,i=getAbsoluteTime(s),a={type:"largest-contentful-paint",name:"largest-contentful-paint",start:i,end:i,data:{value:s,size:s,nodeId:n?record.mirror.getId(n):void 0}};return a}(r))})),()=>{t.forEach(e=>e())}}(this)}_removeListeners(){try{H.document.removeEventListener("visibilitychange",this._handleVisibilityChange),H.removeEventListener("blur",this._handleWindowBlur),H.removeEventListener("focus",this._handleWindowFocus),H.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this._handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===H.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroun
1dTasks()}}__init2(){this._handleWindowBlur=()=>{let e=createBreadcrumb({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{let e=createBreadcrumb({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{!function(e,t){if(!e.isEnabled())return;e.updateUserActivity();let r=function(e){var t;let{metaKey:r,shiftKey:n,ctrlKey:s,altKey:i,key:a,target:o}=e;if(!o||"INPUT"===(t=o).tagName||"TEXTAREA"===t.tagName||t.isContentEditable||!a)return null;let l=1===a.length;if(!(r||s||i)&&l)return null;let c=(0,T.Rt)(o,{maxStringLength:200})||"<unknown>",d=getBaseDomBreadcrumb(o,c);return createBreadcrumb({category:"ui.keyDown",message:c,data:{...d.data,metaKey:r,shiftKey:n,ctrlKey:s,altKey:i,key:a}})}(t);r&&addBreadcrumbEvent(e,r)}(this,e)}}_doChangeToBackgroundTasks(e){if(!this.session)return;let t=isSessionExpired(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire});t||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){if(!this.session)return;let t=this.checkAndHandleExpiredSession();t&&e&&this._createCustomBreadcrumb(e)}_updateUserActivity(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this._lastActivity=e}_updateSessionActivity(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:es.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=this.performanceEntries.map(createPerformanceEntry).filter(Boolean).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(createPerformanceSpans(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:e,eventBuffer:t}=this;if(!e||!t||e.segmentId)return;let r=t.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}
1_popEventContext(){let e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){let e=this.getSessionId();if(this.session&&this.eventBuffer&&e&&(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents)&&(await addMemoryEntry(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw Error("Session is too long, not sending replay");let r=this._popEventContext(),n=this.session.segmentId++;this._maybeSaveSession();let s=await this.eventBuffer.finish();await sendReplay({replayId:e,recordingData:s,segmentId:n,eventContext:r,session:this.session,options:this.getOptions(),timestamp:t})}catch(t){this._handleException(t),this.stop({reason:"sendReplay"});let e=(0,v.s3)();e&&e.recordDroppedEvent("send_error","replay")}}__init5(){var e=this;this._flush=async function(){let{force:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e._isEnabled&&!t||!e.checkAndHandleExpiredSession()||!e.session)return;let r=e.session.started,n=Date.now(),s=n-r;e._debouncedFlush.cancel();let i=s<e._options.minReplayDuration,a=s>e._options.maxReplayDuration+5e3;if(i||a){"[Replay] Session duration (".concat(Math.floor(s/1e3),"s) is too ").concat(i?"short":"long",", not sending replay."),e._options._experiments.traceInternals,i&&e._debouncedFlush();return}let o=e.eventBuffer;if(o&&0===e.session.segmentId&&!o.hasCheckout&&e._options._experiments.traceInternals,!e._flushLock){e._flushLock=e._runFlush(),await e._flushLock,e._flushLock=void 0;return}try{await e._flushLock}catch(e){}finally{e._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&saveSession(this.session)}__init6(){this._onMutationHandler=e=>{let t=e.length,r=this._options.mutationLimit,n=this._options.mutationBreadcrumbLimit,s=r&&t>r;if(t>n||s){let e=createBreadcrumb({category:"replay.mutations",data:{count:t,limit:s}});this._createCustomBreadcrumb(e)}return!s||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}constructor({options:e,recordingOptions:t}){ReplayContainer.prototype.__init.call(this),ReplayContainer.prototype.__init2.call(this),ReplayContainer.prototype.__init3.call(this),ReplayContainer.prototype.__init4.call(this),ReplayContainer.prototype.__init5.call(this),ReplayContainer.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=function(e,t,r){let n,s,i;let a=r&&r.maxWait?Math.max(r.maxWait,t):0;function invokeFunc(){return cancelTimers(),n=e()}function cancelTimers(){void 0!==s&&clearTimeout(s),void 0!==i&&clearTimeout(i),s=i=void 0}function debounced(){return s&&clearTimeout(s),s=setTimeout(invokeFunc,t),a&&void 0===i&&(i=setTimeout(invokeFunc,a)),n}return debounced.cancel=cancelTimers,debounced.flush=function(){return void 0!==s||void 0!==i?invokeFunc():n},debounced}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=function(e,t,r){let n=new Map,_cleanup=e=>{let t=e-5;n.forEach((e,r)=>{r<t&&n.delete(r)})},_getTotalCount=()=>[...n.values()].reduce((e,t)=>e+t,0),s=!1;return function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];let a=Math.floor(Date.now()/1e3);if(_cleanup(a),_getTotalCount()>=300){let e=s;return s=!0,e?"__SKIPPED":eg}s=!1;let o=n.get(a)||0;return n.set(a,o+1),e(...r)}}((e,t)=>shouldAddEvent(this,e)?_addEvent(this,e,t):Promise.resolve(null),0,0);let{slowClickTimeout:r,slowClickIgnoreSelectors:n}=this.getOptions(),s=r?{threshold:Math.min(3e3,r),timeout:r,scrollTimeout:300,ignoreSelector:n?n.join(","):""}:void 0;s&&(this.clickDetector=new ClickDetector(this,s))}};function getOption(e,t,r,n){let s="string"==typeof n?n.split(","):[],i=[...e,...s,...t];return void 0!==r&&("string"==typeof r&&i.push(".".concat(r)),(0,A.Cf)(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),i.join(",")}let ey='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',eS=["content-length","content-type","accept"],ev=!1;let Replay$1=class Replay$1{static __initStatic(){this.id="Replay"}get _isInitialized(){return ev}set _isInitialized(e){ev=e}setupOnce(){(0,z.j)()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}
1startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay&&this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_initialize(){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){let e=function(e){let t=(0,v.s3)(),r=t&&t.getOptions(),n={sessionSampleRate:0,errorSampleRate:0,...(0,R.Jr)(e)};return r?(null==e.sessionSampleRate&&null==e.errorSampleRate&&null==r.replaysSessionSampleRate&&null==r.replaysOnErrorSampleRate&&(0,A.Cf)(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),"number"==typeof r.replaysSessionSampleRate&&(n.sessionSampleRate=r.replaysSessionSampleRate),"number"==typeof r.replaysOnErrorSampleRate&&(n.errorSampleRate=r.replaysOnErrorSampleRate)):(0,A.Cf)(()=>{console.warn("SDK client is not available.")}),n}(this._initialOptions);this._replay=new ReplayContainer({options:e,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{let e=(0,v.s3)(),t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch(e){}}constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:r=4999,maxReplayDuration:n=36e5,stickySession:s=!0,useCompression:i=!0,workerUrl:a,_experiments:o={},sessionSampleRate:l,errorSampleRate:c,maskAllText:d=!0,maskAllInputs:u=!0,blockAllMedia:h=!0,mutationBreadcrumbLimit:p=750,mutationLimit:m=1e4,slowClickTimeout:f=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:S=[],networkCaptureBodies:v=!0,networkRequestHeaders:_=[],networkResponseHeaders:b=[],mask:w=[],maskAttributes:k=["title","placeholder"],unmask:E=[],block:I=[],unblock:M=[],ignore:C=[],maskFn:R,beforeAddRecordingEvent:T,beforeErrorSampling:x,blockClass:A,blockSelector:N,maskInputOptions:D,maskTextClass:O,maskTextSelector:L,ignoreClass:B}={}){this.name=Replay$1.id;let P=function(e){let{mask:t,unmask:r,block:n,unblock:s,ignore:i,blockClass:a,blockSelector:o,maskTextClass:l,maskTextSelector:c,ignoreClass:d}=e,u=getOption(t,[".sentry-mask","[data-sentry-mask]"],l,c),h=getOption(r,[".sentry-unmask","[data-sentry-unmask]"]),p={maskTextSelector:u,unmaskTextSelector:h,blockSelector:getOption(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],a,o),unblockSelector:getOption(s,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:getOption(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],d)};return a instanceof RegExp&&(p.blockClass=a),l instanceof RegExp&&(p.maskTextClass=l),p}({mask:w,unmask:E,block:I,unblock:M,ignore:C,blockClass:A,blockSelector:N,maskTextClass:O,maskTextSelector:L,ignoreClass:B});if(this._recordingOptions={maskAllInputs:u,maskAllText:d,maskInputOptions:{...D||{},password:!0},maskTextFn:R,maskInputFn:R,maskAttributeFn:(e,t,r)=>(function(e){let{el:t,key:r,maskAttributes:n,maskAllText:s,privacyOptions:i,value:a}=e;return!s||i.unmaskTextSelector&&t.matches(i.unmaskTextSelector)?a:n.includes(r)||"value"===r&&"INPUT"===t.tagName&&["submit","button"].includes(t.getAttribute("type")||"")?a.replace(/[\S]/g,"*"):a})({maskAttributes:k,maskAllText:d,privacyOptions:P,key:e,value:t,el:r}),...P,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch(e){}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(r,15e3),maxReplayDuration:Math.min(n,36e5),stickySession:s,sessionSampleRate:l,errorSampleRate:c,useCompression:i,workerUrl:a,blockAllMedia:h,maskAllInputs:u,maskAllText:d,mutationBreadcrumbLimit:p,mutationLimit:m,slowClickTimeout:f,slowClickIgnoreSelectors:g,networkDetailAllowUrls:y,networkDetailDenyUrls:S,networkCaptureBodies:v,networkRequestHeaders:_getMergedNetworkHeaders(_),networkResponseHeaders:_getMergedNetworkHeaders(b),beforeAddRecordingEvent:T,beforeErrorSampling:x,_experiments:o},"number"==typeof l&&(console.warn("[Replay] You are passing `sessionSampleRate` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure `replaysSessionSampleRate` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ".concat(l," })")),this._initialOptions.sessionSampleRate=l),"number"==typeof c&&(console.warn("[Replay] You are passing `errorSampleRate` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure `replaysOnErrorSampleRate` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ".concat(c," })")),this._initialOptions.errorSampleRate=c),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?"".concat(this._recordingOptions.blockSelector,",").concat(ey):ey),this._isInitialized&&(0,z.j)())throw Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}};function _getMergedNetworkHeaders(e){return[...eS,...e.map(e=>e.toLowerCase())]}Replay$1.__initStatic()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.