PageSourceSearch

https://videohighlight.com/website/_next/static/chunks/899d4a40.364658eeb052f152.js

js videohighlight.com collected 2026-10-03 19:17:45 UTC 125,032 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7028],{35431:(e,t,n)=>{n.d(t,{M:()=>ys,w:()=>ps});var s=n(87842),r=n(68610),o=n(34844),i=n(51885),a=n(47962),c=n(9897),l=n(28189),u=n(60308),d=n(36812),h=n(25091),p=n(46583),m=n(75948),f=n(77277),y=n(55070),g=n(29670),S=n(49764),k=n(42967),b=n(14898),v=n(73444),w=n(77348),_=n(88863),I=n(40682),C=n(84358),E=n(90731),x=n(98810),M=n(38081),T=n(97043),R=n(14991);const A=s.O,O="sentryReplaySession",D="Unable to send Replay",N=15e4,L=5e3,F=2e7;var B=Object.defineProperty,P=(e,t,n)=>((e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),U=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(U||{});function z(e){const t=e?.host;return Boolean(t?.shadowRoot===e)}function W(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function j(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n,H).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}var t}function H(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=j(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(e){}else if(function(e){return"selectorText"in e}(e)){let t=e.cssText;const n=e.selectorText.includes(":"),s="string"==typeof e.style.all&&e.style.all;if(s&&(t=function(e){let t="";for(let n=0;n<e.style.length;n++){const s=e.style,r=s[n],o=s.getPropertyPriority(r);t+=`${r}:${s.getPropertyValue(r)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}(e)),n&&(t=t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),n||s)return t}return t||e.cssText}class ${constructor(){P(this,"idNodeMap",new Map),P(this,"nodeMetaMap",new WeakMap)}getId(e){if(!e)return-1;const t=this.getMeta(e)?.id;return 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){const 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){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function q({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),Boolean(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function K({isMasked:e,element:t,value:n,maskInputFn:s}){let r=n||"";return e?(s&&(r=s(r,t)),"*".repeat(r.length)):r}function V(e){return e.toLowerCase()}function J(e){return e.toUpperCase()}const G="__rrweb_original__";function Y(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?V(t):null}function X(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function Q(e,t){let n;try{n=new URL(e,t??window.location.href)}catch(e){return null}const s=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return s?.[1]??null}const Z={};function ee(e){const t=Z[e];if(t)return t;const n=window.document;let s=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const r=t.contentWindow;r&&r[e]&&(s=r[e]),n.head.removeChild(t)}catch(e){}return Z[e]=s.bind(window)}function te(...e){return ee("setTimeout")(...e)}function ne(...e){return ee("clearTimeout")(...e)}function se(e){try{return e.contentDocument}catch(e){}}let re=1;const oe=new RegExp("[^a-z0-9-_:]");function ie(){return re++}let ae,ce;const le=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ue=/^(?:[a-z+]+:)?\/\//i,de=/^www\..*/i,he=/^(data:)([^,]*),(.*)/i;function pe(e,t){return(e||"").replace(le,(e,n,s,r,o,i)=>{const a=s||o||i,c=n||r||"";if(!a)return e;if(ue.test(a)||de.test(a))return`url(${c}${a}${c})`;if(he.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${c})`;const l=t.split("/"),u=a.split("/");l.pop();for(const e of u)"."!==e&&(".."===e?l.pop():l.push(e));return`url(${c}${l.join("/")}${c})`})}const me=/^[^ \t\n\r\u000c]+/,fe=/^[, \t\n\r\u000c]+/,ye=new WeakMap;function ge(e,t){return t&&""!==t.trim()?Se(e,t):t}function Se(e,t){let n=ye.get(e);if(n||(n=e.createElement("a"),ye.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}
1function ke(e,t,n,s,r,o,i){if(!s)return s;if("src"===n||"href"===n&&("use"!==t||"#"!==s[0]))return ge(e,s);if("xlink:href"===n&&"#"!==s[0])return ge(e,s);if("background"===n&&("table"===t||"td"===t||"th"===t))return ge(e,s);if("srcset"===n)return function(e,t){if(""===t.trim())return t;let n=0;function s(e){let s;const r=e.exec(t.substring(n));return r?(s=r[0],n+=s.length,s):""}const r=[];for(;s(fe),!(n>=t.length);){let o=s(me);if(","===o.slice(-1))o=ge(e,o.substring(0,o.length-1)),r.push(o);else{let s="";o=ge(e,o);let i=!1;for(;;){const e=t.charAt(n);if(""===e){r.push((o+s).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){n+=1,r.push((o+s).trim());break}"("===e&&(i=!0)}s+=e,n+=1}}}return r.join(", ")}(e,s);if("style"===n){let t=pe(s,Se(e));return i&&i.size>0&&(t=function(e,t){if(!e||0===t.size)return e;try{const n=e.split(";"),s=[];for(let e of n){if(e=e.trim(),!e)continue;const n=e.indexOf(":");if(-1===n){s.push(e);continue}const r=e.slice(0,n).trim();t.has(r)||s.push(e)}return s.join("; ")+(s.length>0&&e.endsWith(";")?";":"")}catch(t){return console.warn("Error filtering CSS properties:",t),e}}(t,i)),t}return"object"===t&&"data"===n?ge(e,s):"function"==typeof o?o(n,s,r):s}function be(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function ve(e,t,n=1/0,s=0){return e?e.nodeType!==e.ELEMENT_NODE||s>n?-1:t(e)?s:ve(e.parentNode,t,n,s+1):-1}function we(e,t){return n=>{const s=n;
1if(null===s)return!1;try{if(e)if("string"==typeof e){if(s.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){const s=e.classList[n];if(t.test(s))return!0}return!1}(s,e))return!0;return!(!t||!s.matches(t))}catch{return!1}}}function _e(e,t,n,s,r,o){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("INPUT"===i.tagName){const e=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,c=-1;if(o){if(c=ve(i,we(s,r)),c<0)return!0;a=ve(i,we(t,n),c>=0?c:1/0)}else{if(a=ve(i,we(t,n)),a<0)return!1;c=ve(i,we(s,r),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0||!o)}catch(e){}return!!o}function Ie(e){return null==e?"":e.toLowerCase()}function Ce(e,t){const{doc:n,mirror:s,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:h=!1,inlineStylesheet:p=!0,maskInputOptions:m={},maskAttributeFn:f,maskTextFn:y,maskInputFn:g,slimDOMOptions:S,dataURLOptions:k={},inlineImages:b=!1,recordCanvas:v=!1,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:I=5e3,onBlockedImageLoad:C,onStylesheetLoad:E,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:M=()=>!1,newlyAddedElement:T=!1,ignoreCSSAttributes:R}=t;let{preserveWhiteSpace:A=!0}=t;const O=function(e,t){const{doc:n,mirror:s,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:h,inlineStylesheet:p,maskInputOptions:m={},maskTextFn:f,maskInputFn:y,dataURLOptions:g={},inlineImages:S,recordCanvas:k,keepIframeSrcFn:b,newlyAddedElement:v=!1,ignoreCSSAttributes:w}=t,_=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,s);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:U.Document,childNodes:[],compatMode:e.compatMode}:{type:U.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:U.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:_};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:s,blockSelector:r,unblockSelector:o,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:h,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:f,maskTextClass:y,unmaskTextClass:g,maskTextSelector:S,unmaskTextSelector:k,ignoreCSSAttributes:b}=t,v=function(e,t,n,s){try{if(s&&e.matches(s))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const s=e.classList[n];if(t.test(s))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,s,r,o),w=function(e){if(e instanceof HTMLFormElement)return"form";const t=V(e.tagName);return oe.test(t)?"div":t}(e);let _={};const I=e.attributes.length;for(let t=0;t<I;t++){const s=e.attributes[t];s.name&&!be(w,s.name,s.value)&&(_[s.name]=ke(n,w,V(s.name),s.value,e,c,b))}if("link"===w&&i){const t=Array.from(n.styleSheets).find(t=>t.href===e.href);let s=null;t&&(s=j(t)),s&&(_.rel=null,_.href=null,_.crossorigin=null,_._cssText=pe(s,t.href))}if("style"===w&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=j(e.sheet);t&&(_._cssText=pe(t,Se(n)))}if("input"===w||"textarea"===w||"select"===w||"option"===w){const t=e,n=Y(t),s=X(t,J(w),n),r=t.checked;if("submit"!==n&&"button"!==n&&s){const e=_e(t,y,S,g,k,q({type:n,tagName:J(w),maskInputOptions:a}));_.value=K({isMasked:e,element:t,value:s,maskInputFn:l})}r&&(_.checked=r)}if("option"===w&&(e.selected&&!a.select?_.selected=!0:delete _.selected),"canvas"===w&&h)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let s=0;s<e.height;s+=50){const r=t.getImageData,o=G in r?r[G]:r;if(new Uint32Array(o.call(t,n,s,Math.min(50,e.width-n),Math.min(50,e.height-s)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(_.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const t=e.toDataURL(u.type,u.quality),s=n.createElement("canvas");s.width=e.width,s.height=e.height,t!==s.toDataURL(u.type,u.quality)&&(_.rr_dataURL=t)}if("img"===w&&d){ae||(ae=n.createElement("canvas"),ce=ae.getContext("2d"));const t=e,s=t.currentSrc||t.getAttribute("src")||"<unknown-src>",r=t.crossOrigin,o=()=>{t.removeEventListener("load",o);
1try{ae.width=t.naturalWidth,ae.height=t.naturalHeight,ce.drawImage(t,0,0),_.rr_dataURL=ae.toDataURL(u.type,u.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o));console.warn(`Cannot inline img src=${s}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(r?_.crossOrigin=r:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if("audio"!==w&&"video"!==w||(_.rr_mediaState=e.paused?"paused":"played",_.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(_.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(_.rr_scrollTop=e.scrollTop)),v){const{width:t,height:n}=e.getBoundingClientRect();_={class:_.class,rr_width:`${t}px`,rr_height:`${n}px`}}let C;"iframe"!==w||p(_.src)||(v||se(e)||(_.rr_src=_.src),delete _.src);try{customElements.get(w)&&(C=!0)}catch(e){}return{type:U.Element,tagName:w,attributes:_,childNodes:[],isSVG:(E=e,Boolean("svg"===E.tagName||E.ownerSVGElement)||void 0),needBlock:v,rootId:f,isCustom:C};var E}(e,{doc:n,blockClass:r,blockSelector:o,unblockSelector:i,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:m,maskInputFn:y,dataURLOptions:g,inlineImages:S,recordCanvas:k,keepIframeSrcFn:b,newlyAddedElement:v,rootId:_,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:h,ignoreCSSAttributes:w});case e.TEXT_NODE:return function(e,t){const{maskAllText:n,maskTextClass:s,unmaskTextClass:r,maskTextSelector:o,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName;let h=e.textContent;const p="STYLE"===d||void 0,m="SCRIPT"===d||void 0,f="TEXTAREA"===d||void 0;if(p&&h){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(h=j(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}h=pe(h,Se(t.doc))}m&&(h="SCRIPT_PLACEHOLDER");const y=_e(e,s,o,r,i,n);return p||m||f||!h||!y||(h=a?a(h,e.parentElement):h.replace(/[\S]/g,"*")),f&&h&&(c.textarea||y)&&(h=l?l(h,e.parentNode):h.replace(/[\S]/g,"*")),"OPTION"===d&&h&&(h=K({isMasked:_e(e,s,o,r,i,q({type:null,tagName:d,maskInputOptions:c})),element:e,value:h,maskInputFn:l})),{type:U.Text,textContent:h||"",isStyle:p,rootId:u}}(e,{doc:n,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:h,maskTextFn:f,maskInputOptions:m,maskInputFn:y,rootId:_});case e.CDATA_SECTION_NODE:return{type:U.CDATA,textContent:"",rootId:_};case e.COMMENT_NODE:return{type:U.Comment,textContent:e.textContent||"",rootId:_};default:return!1}}(e,{doc:n,mirror:s,blockClass:r,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:f,maskTextFn:y,maskInputFn:g,dataURLOptions:k,inlineImages:b,recordCanvas:v,keepIframeSrcFn:M,newlyAddedElement:T,ignoreCSSAttributes:R});if(!O)return console.warn(e,"not serialized"),null;let D;D=s.hasNode(e)?s.getId(e):!function(e,t){if(t.comment&&e.type===U.Comment)return!0;if(e.type===U.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===Q(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Ie(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Ie(e.attributes.name)||"icon"===Ie(e.attributes.rel)||"apple-touch-icon"===Ie(e.attributes.rel)||"shortcut icon"===Ie(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Ie(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Ie(e.attributes.property).match(/^(og|twitter|fb):/)||Ie(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Ie(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Ie(e.attributes.name)||"googlebot"===Ie(e.attributes.name)||"bingbot"===Ie(e.attributes.name)))return!0;
1if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Ie(e.attributes.name)||"generator"===Ie(e.attributes.name)||"framework"===Ie(e.attributes.name)||"publisher"===Ie(e.attributes.name)||"progid"===Ie(e.attributes.name)||Ie(e.attributes.property).match(/^article:/)||Ie(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Ie(e.attributes.name)||"yandex-verification"===Ie(e.attributes.name)||"csrf-token"===Ie(e.attributes.name)||"p:domain_verify"===Ie(e.attributes.name)||"verify-v1"===Ie(e.attributes.name)||"verification"===Ie(e.attributes.name)||"shopify-checkout-api-token"===Ie(e.attributes.name)))return!0}}return!1}(O,S)&&(A||O.type!==U.Text||O.isStyle||O.textContent.replace(/^\s+|\s+$/gm,"").length)?ie():-2;const N=Object.assign(O,{id:D});if(s.add(e,N),-2===D)return null;w&&w(e);let L=!h;if(N.type===U.Element){L=L&&!N.needBlock;const t=e.shadowRoot;t&&W(t)&&(N.isShadowHost=!0)}if((N.type===U.Document||N.type===U.Element)&&L){S.headWhitespace&&N.type===U.Element&&"head"===N.tagName&&(A=!1);const t={doc:n,mirror:s,blockClass:r,blockSelector:o,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:h,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:f,maskTextFn:y,maskInputFn:g,slimDOMOptions:S,dataURLOptions:k,inlineImages:b,recordCanvas:v,preserveWhiteSpace:A,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:I,onBlockedImageLoad:C,onStylesheetLoad:E,stylesheetLoadTimeout:x,keepIframeSrcFn:M,ignoreCSSAttributes:R},T=e.childNodes?Array.from(e.childNodes):[];for(const e of T){const n=Ce(e,t);n&&N.childNodes.push(n)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const s=Ce(n,t);s&&(W(e.shadowRoot)&&(s.isShadow=!0),N.childNodes.push(s))}}if(e.parentNode&&z(e.parentNode)&&W(e.parentNode)&&(N.isShadow=!0),N.type!==U.Element||"iframe"!==N.tagName||N.needBlock||function(e,t,n){const s=e.contentWindow;if(!s)return;let r,o=!1;try{r=s.document.readyState}catch(e){return}if("complete"!==r){const s=te(()=>{o||(t(),o=!0)},n);return void e.addEventListener("load",()=>{ne(s),o=!0,t()})}const i="about:blank";if(s.location.href!==i||e.src===i||""===e.src)return te(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=se(e);if(t&&_){const n=Ce(t,{doc:t,mirror:s,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:f,maskTextFn:y,maskInputFn:g,slimDOMOptions:S,dataURLOptions:k,inlineImages:b,recordCanvas:v,preserveWhiteSpace:A,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:I,onStylesheetLoad:E,stylesheetLoadTimeout:x,keepIframeSrcFn:M,ignoreCSSAttributes:R});n&&_(e,n)}},I),N.type===U.Element&&"img"===N.tagName&&!e.complete&&N.needBlock){const t=e,n=()=>{if(t.isConnected&&!t.complete&&C)try{const e=t.getBoundingClientRect();e.width>0&&e.height>0&&C(t,N,e)}catch(e){}t.removeEventListener("load",n)};t.isConnected&&t.addEventListener("load",n)}return N.type===U.Element&&"link"===N.tagName&&"string"==typeof N.attributes.rel&&("stylesheet"===N.attributes.rel||"preload"===N.attributes.rel&&"string"==typeof N.attributes.href&&"css"===Q(N.attributes.href))&&function(e,t,n){let s,r=!1;try{s=e.sheet}catch(e){return}if(s)return;const o=te(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{ne(o),r=!0,t()})}(e,()=>{if(E){const t=Ce(e,{doc:n,mirror:s,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:f,maskTextFn:y,maskInputFn:g,slimDOMOptions:S,dataURLOptions:k,inlineImages:b,recordCanvas:v,preserveWhiteSpace:A,onSerialize:w,onIframeLoad:_,iframeLoadTimeout:I,onStylesheetLoad:E,stylesheetLoadTimeout:x,keepIframeSrcFn:M,ignoreCSSAttributes:R});t&&E(e,t)}},x),N.type===U.Element&&delete N.needBlock,N}function Ee(e,t,n=document){const s={capture:!0,passive:!0};return n.addEventListener(e,t,s),()=>n.removeEventListener(e,t,s)}const xe="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let Me={map:{},getId:()=>(console.error(xe),-1),getNode:()=>(console.error(xe),null),removeNodeFromMap(){console.error(xe)},has:()=>(console.error(xe),!1),reset(){console.error(xe)}};function Te(e,t,n={}){let s=null,r=0;return function(...o){const i=Date.now();r||!1!==n.leading||(r=i);const a=t-(i-r),c=this;a<=0||a>t?(s&&(function(...e){Je("clearTimeout")(...e)}
1(s),s=null),r=i,e.apply(c,o)):s||!1===n.trailing||(s=Ge(()=>{r=!1===n.leading?0:Date.now(),s=null,e.apply(c,o)},a))}}function Re(e,t,n,s,r=window){const o=r.Object.getOwnPropertyDescriptor(e,t);return r.Object.defineProperty(e,t,s?n:{set(e){Ge(()=>{n.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>Re(e,t,o||{},!0)}function Ae(e,t,n){try{if(!(t in e))return()=>{};const s=e[t],r=n(s);return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=r,()=>{e[t]=s}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Me=new Proxy(Me,{get:(e,t,n)=>("map"===t&&console.error(xe),Reflect.get(e,t,n))}));let Oe=Date.now;function De(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function Ne(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Le(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Fe(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(e){return null}}function Be(e,t,n,s,r){if(!e)return!1;const o=Fe(e);if(!o)return!1;const i=we(t,n);if(!r){const e=s&&o.matches(s);return i(o)&&!e}const a=ve(o,i);let c=-1;return!(a<0)&&(s&&(c=ve(o,we(null,s))),a>-1&&c<0||a<c)}function Pe(e,t){return-2===t.getId(e)}function Ue(e,t){if(z(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||Ue(e.parentNode,t))}function ze(e){return Boolean(e.changedTouches)}function We(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function je(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function He(e){return Boolean(e?.shadowRoot)}/[1-9][0-9]{12}/.test(Date.now().toString())||(Oe=()=>(new Date).getTime());class $e{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function qe(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Ke(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||function(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=qe(n);)n=t;return n}(e);return t.contains(n)}(e))}const Ve={};function Je(e){const t=Ve[e];if(t)return t;const n=window.document;let s=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const r=t.contentWindow;r&&r[e]&&(s=r[e]),n.head.removeChild(t)}catch(e){}return Ve[e]=s.bind(window)}function Ge(...e){return Je("setTimeout")(...e)}var Ye=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Ye||{}),Xe=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Xe||{}),Qe=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Qe||{}
1),Ze=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ze||{}),et=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(et||{});function tt(e){try{return e.contentDocument}catch(e){}}function nt(e){return"__ln"in e}class st{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=t?.next||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&nt(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&nt(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const rt=(e,t)=>`${e}@${t}`;class ot{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;const e=[],t=new Set,n=new st,s=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},r=r=>{if(!r.parentNode||!Ke(r))return;const o=z(r.parentNode)?this.mirror.getId(qe(r)):this.mirror.getId(r.parentNode),i=s(r);if(-1===o||-1===i)return n.addNode(r);const a=Ce(r,{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=>{We(e,this.mirror)&&!Be(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),je(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),He(r)&&this.shadowDomManager.addShadowRoot(r.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{Be(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(e,t),e.contentWindow&&this.canvasManager.addWindow(e.contentWindow),this.shadowDomManager.observeAttachShadow(e))},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:s})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${s}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});a&&(e.push({parentId:o,nextId:i,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)at(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||r(e);for(const e of this.addedSet)ct(this.droppedSet,e)||at(this.removes,e,this.mirror)?ct(this.movedSet,e)?r(e):this.droppedSet.add(e):r(e);let o=null;for(;n.length;){let e=null;if(o){const t=this.mirror.getId(o.value.parentNode),n=s(o.value);-1!==t&&-1!==n&&(e=o)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===s(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const s=t.parentNode.host;if(-1!==this.mirror.getId(s)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}o=e.previous,n.removeNode(e.value),r(e.value)}const i={texts:this.texts.map(e=>
1({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=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),s=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+s).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{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};(i.texts.length||i.attributes.length||i.removes.length||i.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(i))},this.processMutation=e=>{if(!Pe(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;Be(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:_e(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,Fe(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,s=e.target.getAttribute(n);if("value"===n){const n=Y(t),r=t.tagName;s=X(t,r,n);const o=q({maskInputOptions:this.maskInputOptions,tagName:r,type:n});s=K({isMasked:_e(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,o),element:t,value:s,maskInputFn:this.maskInputFn})}if(Be(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===e.oldValue)return;let r=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(s)){if(tt(t))return;n="rr_src"}if(r||(r={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(e.target,r)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!be(t.tagName,n)&&(r.attributes[n]=ke(this.doc,V(t.tagName),V(n),s,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const s=t.style.getPropertyValue(e),o=t.style.getPropertyPriority(e);s!==n.style.getPropertyValue(e)||o!==n.style.getPropertyPriority(e)?r.styleDiff[e]=""===o?s:[s,o]:r._unchangedStyles[e]=[s,o]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(r.styleDiff[e]=!1)}break}case"childList":if(Be(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const n=this.mirror.getId(t),s=z(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Be(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Pe(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(it(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Ue(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[rt(n,s)]?it(this.movedSet,t):this.removes.push({parentId:s,id:n,isShadow:!(!z(e.target)||!W(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(Pe(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[rt(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Be(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(e=>this.genAdds(e)),He(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}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","ignoreCSSAttributes"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit
1()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function it(e,t){e.delete(t),t.childNodes?.forEach(t=>it(e,t))}function at(e,t,n){return 0!==e.length&&function(e,t,n){let s=t.parentNode;for(;s;){const t=n.getId(s);if(e.some(e=>e.id===t))return!0;s=s.parentNode}return!1}(e,t,n)}function ct(e,t){return 0!==e.size&&lt(e,t)}function lt(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||lt(e,n))}let ut;const dt=e=>ut?(...t)=>{try{return e(...t)}catch(e){if(ut&&!0===ut(e))return()=>{};throw e}}:e,ht=[];function pt(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function mt(e,t){const n=new ot;ht.push(n),n.init(e);let s=window.MutationObserver||window.__rrMutationObserver;const r=window?.Zone?.__symbol__?.("MutationObserver");r&&window[r]&&(s=window[r]);const o=new s(dt(t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)}));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function ft({scrollCb:e,doc:t,mirror:n,blockClass:s,blockSelector:r,unblockSelector:o,sampling:i}){return Ee("scroll",dt(Te(dt(i=>{const a=pt(i);if(!a||Be(a,s,r,o,!0))return;const c=n.getId(a);if(a===t&&t.defaultView){const n=De(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:a.scrollLeft,y:a.scrollTop})}),i.scroll||100)),t)}const yt=["INPUT","TEXTAREA","SELECT"],gt=new WeakMap;function St({inputCb:e,doc:t,mirror:n,blockClass:s,blockSelector:r,unblockSelector:o,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:h,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:f}){function y(e){let n=pt(e);const u=e.isTrusted,y=n&&J(n.tagName);if("OPTION"===y&&(n=n.parentElement),!n||!y||yt.indexOf(y)<0||Be(n,s,r,o,!0))return;const S=n;if(S.classList.contains(i)||a&&S.matches(a))return;const k=Y(n);let b=X(S,y,k),v=!1;const w=q({maskInputOptions:c,tagName:y,type:k}),_=_e(n,h,m,p,f,w);"radio"!==k&&"checkbox"!==k||(v=n.checked),b=K({isMasked:_,element:n,value:b,maskInputFn:l}),g(n,d?{text:b,isChecked:v,userTriggered:u}:{text:b,isChecked:v});const I=n.name;"radio"===k&&I&&v&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(e=>{if(e!==n){const t=K({isMasked:_,element:e,value:X(e,y,k),maskInputFn:l});g(e,d?{text:t,isChecked:!v,userTriggered:!1}:{text:t,isChecked:!v})}})}function g(t,s){const r=gt.get(t);if(!r||r.text!==s.text||r.isChecked!==s.isChecked){gt.set(t,s);const r=n.getId(t);dt(e)({...s,id:r})}}const S=("last"===u.input?["change"]:["input","change"]).map(e=>Ee(e,dt(y),t)),k=t.defaultView;if(!k)return()=>{S.forEach(e=>e())};const b=k.Object.getOwnPropertyDescriptor(k.HTMLInputElement.prototype,"value"),v=[[k.HTMLInputElement.prototype,"value"],[k.HTMLInputElement.prototype,"checked"],[k.HTMLSelectElement.prototype,"value"],[k.HTMLTextAreaElement.prototype,"value"],[k.HTMLSelectElement.prototype,"selectedIndex"],[k.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&S.push(...v.map(e=>Re(e[0],e[1],{set(){dt(y)({target:this,isTrusted:!1})}},!1,k))),dt(()=>{S.forEach(e=>e())})}function kt(e){return function(e,t){if(_t("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||_t("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||_t("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||_t("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function bt(e,t,n){let s,r;return e?(e.ownerNode?s=t.getId(e.ownerNode):r=n.getId(e),{styleId:r,id:s}):{}}function vt({mirror:e,stylesheetManager:t},n){let s=null;s="#document"===n.nodeName?e.getId(n):e.getId(n.host);const r="#document"===n.nodeName?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,o=r?.prototype?Object.getOwnPropertyDescriptor(r?.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&r&&o?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return o.get?.call(this)},set(e){const n=o.set?.call(this,e);if(null!==s&&-1!==s)try{t.adoptStyleSheets(e,s)}catch(e){}return n}}),dt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})})):()=>{}}function wt(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let s;
vendor: 4,111 bytes, line 1
1e.recordDOM&&(s=mt(e,e.doc));const r=function({mousemoveCb:e,sampling:t,doc:n,mirror:s}){if(!1===t.mousemove)return()=>{};const r="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const c=Te(dt(t=>{const n=Date.now()-i;e(a.map(e=>(e.timeOffset-=n,e)),t),a=[],i=null}),o),l=dt(Te(dt(e=>{const t=pt(e),{clientX:n,clientY:r}=ze(e)?e.changedTouches[0]:e;i||(i=Oe()),a.push({x:n,y:r,id:s.getId(t),timeOffset:Oe()-i}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?Xe.Drag:e instanceof MouseEvent?Xe.MouseMove:Xe.TouchMove)}),r,{trailing:!1})),u=[Ee("mousemove",l,n),Ee("touchmove",l,n),Ee("drag",l,n)];return dt(()=>{u.forEach(e=>e())})}(e),o=function({mouseInteractionCb:e,doc:t,mirror:n,blockClass:s,blockSelector:r,unblockSelector:o,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];let l=null;return Object.keys(Qe).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]).forEach(i=>{let a=V(i);const u=(t=>i=>{const a=pt(i);if(Be(a,s,r,o,!0))return;let c=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":c=Ze.Mouse;break;case"touch":c=Ze.Touch;break;case"pen":c=Ze.Pen}c===Ze.Touch?Qe[t]===Qe.MouseDown?u="TouchStart":Qe[t]===Qe.MouseUp&&(u="TouchEnd"):Ze.Pen}else ze(i)&&(c=Ze.Touch);null!==c?(l=c,(u.startsWith("Touch")&&c===Ze.Touch||u.startsWith("Mouse")&&c===Ze.Mouse)&&(c=null)):Qe[t]===Qe.Click&&(c=l,l=null);const d=ze(i)?i.changedTouches[0]:i;if(!d)return;const h=n.getId(a),{clientX:p,clientY:m}=d;dt(e)({type:Qe[u],id:h,x:p,y:m,...null!==c&&{pointerType:c}})})(i);if(window.PointerEvent)switch(Qe[i]){case Qe.MouseDown:case Qe.MouseUp:a=a.replace("mouse","pointer");break;case Qe.TouchStart:case Qe.TouchEnd:return}c.push(Ee(a,u,t))}),dt(()=>{c.forEach(e=>e())})}(e),i=ft(e),a=function({viewportResizeCb:e},{win:t}){let n=-1,s=-1;return Ee("resize",dt(Te(dt(()=>{const t=Ne(),r=Le();n===t&&s===r||(e({width:Number(r),height:Number(t)}),n=t,s=r)}),200)),t)}(e,{win:n}),c=St(e),l=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:s,mirror:r,sampling:o,doc:i}){const a=dt(i=>Te(dt(o=>{const a=pt(o);if(!a||Be(a,t,n,s,!0))return;const{currentTime:c,volume:l,muted:u,playbackRate:d}=a;e({type:i,id:r.getId(a),currentTime:c,volume:l,muted:u,playbackRate:d})}),o.media||500)),c=[Ee("play",a(et.Play),i),Ee("pause",a(et.Pause),i),Ee("seeked",a(et.Seeked),i),Ee("volumechange",a(et.VolumeChange),i),Ee("ratechange",a(et.RateChange),i)];return dt(()=>{c.forEach(e=>e())})}(e);let u=()=>{},d=()=>{},h=()=>{},p=()=>{};e.recordDOM&&(u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const r=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(r,{apply:dt((s,r,o)=>{const[i,a]=o,{id:c,styleId:l}=bt(r,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:a}]}),s.apply(r,o)})});const o=s.CSSStyleSheet.prototype.deleteRule;let i,a;s.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:dt((s,r,o)=>{const[i]=o,{id:a,styleId:c}=bt(r,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:i}]}),s.apply(r,o)})}),s.CSSStyleSheet.prototype.replace&&(i=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:dt((s,r,o)=>{const[i]=o,{id:a,styleId:c}=bt(r,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replace:i}),s.apply(r,o)})})),s.CSSStyleSheet.prototype.replaceSync&&(a=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:dt((s,r,o)=>{const[i]=o,{id:a,styleId:c}=bt(r,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replaceSync:i}),s.apply(r,o)})}));const c={};It("CSSGroupingRule")?c.CSSGroupingRule=s.CSSGroupingRule:(It("CSSMediaRule")&&(c.CSSMediaRule=s.CSSMediaRule),It("CSSConditionRule")&&(c.CSSConditionRule=s.CSSConditionRule),It("CSSSupportsRule")&&(c.CSSSupportsRule=s.CSSSupportsRule));const l={};
vendor: 3,912 bytes, line 1
1return Object.entries(c).forEach(([s,r])=>{l[s]={insertRule:r.prototype.insertRule,deleteRule:r.prototype.deleteRule},r.prototype.insertRule=new Proxy(l[s].insertRule,{apply:dt((s,r,o)=>{const[i,a]=o,{id:c,styleId:l}=bt(r.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:[...kt(r),a||0]}]}),s.apply(r,o)})}),r.prototype.deleteRule=new Proxy(l[s].deleteRule,{apply:dt((s,r,o)=>{const[i]=o,{id:a,styleId:c}=bt(r.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:[...kt(r),i]}]}),s.apply(r,o)})})}),dt(()=>{s.CSSStyleSheet.prototype.insertRule=r,s.CSSStyleSheet.prototype.deleteRule=o,i&&(s.CSSStyleSheet.prototype.replace=i),a&&(s.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}(e,{win:n}),d=vt(e,e.doc),h=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:s},{win:r}){const o=r.CSSStyleDeclaration.prototype.setProperty;r.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:dt((r,i,a)=>{const[c,l,u]=a;if(n.has(c))return o.apply(i,[c,l,u]);const{id:d,styleId:h}=bt(i.parentRule?.parentStyleSheet,t,s.styleMirror);return(d&&-1!==d||h&&-1!==h)&&e({id:d,styleId:h,set:{property:c,value:l,priority:u},index:kt(i.parentRule)}),r.apply(i,a)})});const i=r.CSSStyleDeclaration.prototype.removeProperty;return r.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:dt((r,o,a)=>{const[c]=a;if(n.has(c))return i.apply(o,[c]);const{id:l,styleId:u}=bt(o.parentRule?.parentStyleSheet,t,s.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,remove:{property:c},index:kt(o.parentRule)}),r.apply(o,a)})}),dt(()=>{r.CSSStyleDeclaration.prototype.setProperty=o,r.CSSStyleDeclaration.prototype.removeProperty=i})}(e,{win:n}),e.collectFonts&&(p=function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const s=[],r=new WeakMap,o=n.FontFace;n.FontFace=function(e,t,n){const s=new o(e,t,n);return r.set(s,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),s};const i=Ae(t.fonts,"add",function(t){return function(n){return Ge(dt(()=>{const t=r.get(n);t&&(e(t),r.delete(n))}),0),t.apply(this,[n])}});return s.push(()=>{n.FontFace=o}),s.push(i),dt(()=>{s.forEach(e=>e())})}(e)));const m=function(e){const{doc:t,mirror:n,blockClass:s,blockSelector:r,unblockSelector:o,selectionCb:i}=e;let a=!0;const c=dt(()=>{const e=t.getSelection();if(!e||a&&e?.isCollapsed)return;a=e.isCollapsed||!1;const c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:a,startOffset:l,endContainer:u,endOffset:d}=i;Be(a,s,r,o,!0)||Be(u,s,r,o,!0)||c.push({start:n.getId(a),startOffset:l,end:n.getId(u),endOffset:d})}i({ranges:c})});return c(),Ee("selectionchange",c)}(e),f=function({doc:e,customElementCb:t}){const n=e.defaultView;return n&&n.customElements?Ae(n.customElements,"define",function(e){return function(n,s,r){try{t({define:{name:n}})}catch(e){}return e.apply(this,[n,s,r])}}):()=>{}}(e),y=[];for(const t of e.plugins)y.push(t.observer(t.callback,n,t.options));return dt(()=>{ht.forEach(e=>e.reset()),s?.disconnect(),r(),o(),i(),a(),c(),l(),u(),d(),h(),p(),m(),f(),y.forEach(e=>e())})}function _t(e){return void 0!==window[e]}function It(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Ct{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,s){const r=n||this.getIdToRemoteIdMap(e),o=s||this.getRemoteIdToIdMap(e);let i=r.get(t);return i||(i=this.generateIdFn(),r.set(t,i),o.set(i,t)),i}getIds(e,t){const n=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,s))}
1getRemoteId(e,t,n){const s=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;return s.get(t)||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Et{constructor(){this.crossOriginIframeMirror=new Ct(ie),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class xt{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Ct(ie),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ct(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&e.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(e);const n=tt(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const s=this.transformCrossOriginEvent(n,t.data.event);s&&this.wrappedEmit(s,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case Ye.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Ye.IncrementalSnapshot,data:{source:Xe.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Ye.Meta:case Ye.Load:case Ye.DomContentLoaded:return!1;case Ye.Plugin:return t;case Ye.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Ye.IncrementalSnapshot:switch(t.data.source){case Xe.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),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 Xe.Drag:case Xe.TouchMove:case Xe.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Xe.ViewportResize:return!1;case Xe.MediaInteraction:case Xe.MouseInteraction:case Xe.Scroll:case Xe.CanvasMutation:case Xe.Input:return this.replaceIds(t.data,e,["id"]),t;case Xe.StyleSheetRule:case Xe.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Xe.Font:return t;case Xe.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case Xe.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),t.data.styles?.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,n,s){for(const r of s)(Array.isArray(t[r])||"number"==typeof t[r])&&(Array.isArray(t[r])?t[r]=e.getIds(n,t[r]):t[r]=e.getId(n,t[r]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEac
1h(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===U.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class Mt{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Tt{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()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!W(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=mt({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(ft({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),Ge(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(vt({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){const t=tt(e),n=function(e){try{return e.contentWindow}catch(e){}}(e);t&&n&&this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(Ae(e.prototype,"attachShadow",function(e){return function(s){const r=e.call(this,s);return this.shadowRoot&&Ke(this)&&n.addShadowRoot(this.shadowRoot,t),r}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}for(var Rt="undefined"==typeof Uint8Array?[]:new Uint8Array(256),At=0;At<64;At++)Rt["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(At)]=At;class Ot{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class Dt{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new $e,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},s=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),s.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:H(e),index:t}))})),n.styleIds.push(e)}s.length>0&&(n.styles=s),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Nt{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,function(...e){Je("requestAnimationFrame")(...e)}(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let Lt,Ft;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Bt=new $;function Pt(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:s,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:h=null,unmaskTextSelector:p=null,inlineStylesheet:m=!0,maskAllInputs:f,maskInputOptions:y,slimDOMOptions:g,maskAttributeFn:S,maskInputFn:k,maskTextFn:b,maxCanvasSize:v=null,packFn:w,sampling:_={},dataURLOptions:I={},mousemoveWait:C,recordDOM:E=!0,recordCanvas:x=!1,recordCrossOriginIframes:M=!1,recordAfter:T=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:R=!1,collectFonts:A=!1,inlineImages:O=!1,plugins:D,keepIframeSrcFn:N=()=>!1,ignoreCSSAttributes:L=new Set([]),errorHandler:F,onMutation:B,getCanvasManager:P}=e;ut=F;const U=!M||window.parent===window;let z=!1;if(!U)try{window.parent.document&&(z=!1)}catch(e){z=!0}if(U&&!t)throw new Error("emit function is required");if(!U&&!z)return()=>{};void 0!==C&&void 0===_.mousemove&&(_.mousemove=C),Bt.reset();const W=!0===f?{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!==y?y:{},j=!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===g,headMetaDescKeywords:"all"===g}:g||{};let H;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let q=0;const K=e=>{for(const t of D||[])t.eventProcessor&&(e=t.eventProcessor(e));return w&&!z&&(e=w(e)),e};Lt=(e,r)=>{const o=e;if(o.timestamp=Oe(),!ht[0]?.isFrozen()||o.type===Ye.FullSnapshot||o.type===Ye.IncrementalSnapshot&&o.data.source===Xe.Mutation||ht.forEach(e
1=>e.unfreeze()),U)t?.(K(o),r);else if(z){const e={type:"rrweb",event:K(o),origin:window.location.origin,isCheckout:r};window.parent.postMessage(e,"*")}if(o.type===Ye.FullSnapshot)H=o,q=0;else if(o.type===Ye.IncrementalSnapshot){if(o.data.source===Xe.Mutation&&o.data.isAttachIframe)return;q++;const e=s&&q>=s,t=n&&H&&o.timestamp-H.timestamp>n;(e||t)&&te(!0)}};const V=e=>{Lt({type:Ye.IncrementalSnapshot,data:{source:Xe.Mutation,...e}})},J=e=>Lt({type:Ye.IncrementalSnapshot,data:{source:Xe.Scroll,...e}}),G=e=>Lt({type:Ye.IncrementalSnapshot,data:{source:Xe.CanvasMutation,...e}}),Y=new Dt({mutationCb:V,adoptedStyleSheetCb:e=>Lt({type:Ye.IncrementalSnapshot,data:{source:Xe.AdoptedStyleSheet,...e}})}),X="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new Et:new xt({mirror:Bt,mutationCb:V,stylesheetManager:Y,recordCrossOriginIframes:M,wrappedEmit:Lt});for(const e of D||[])e.getMirror&&e.getMirror({nodeMirror:Bt,crossOriginIframeMirror:X.crossOriginIframeMirror,crossOriginIframeStyleMirror:X.crossOriginIframeStyleMirror});const Q=new Nt,Z=function(e,t){try{return e?e(t):new Ot}catch{return console.warn("Unable to initialize CanvasManager"),new Ot}}(P,{mirror:Bt,win:window,mutationCb:e=>Lt({type:Ye.IncrementalSnapshot,data:{source:Xe.CanvasMutation,...e}}),recordCanvas:x,blockClass:r,blockSelector:o,unblockSelector:i,maxCanvasSize:v,sampling:_.canvas,dataURLOptions:I,errorHandler:F}),ee="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Mt:new Tt({mutationCb:V,scrollCb:J,bypassOptions:{onMutation:B,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:W,dataURLOptions:I,maskAttributeFn:S,maskTextFn:b,maskInputFn:k,recordCanvas:x,inlineImages:O,sampling:_,slimDOMOptions:j,iframeManager:X,stylesheetManager:Y,canvasManager:Z,keepIframeSrcFn:N,processedNodeManager:Q,ignoreCSSAttributes:L},mirror:Bt}),te=(e=!1)=>{if(!E)return;Lt({type:Ye.Meta,data:{href:window.location.href,width:Le(),height:Ne()}},e),Y.reset(),ee.init(),ht.forEach(e=>e.lock());const t=function(e,t){const{mirror:n=new $,blockClass:s="rr-block",blockSelector:r=null,unblockSelector:o=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:h=!1,recordCanvas:p=!1,maskAllInputs:m=!1,maskAttributeFn:f,maskTextFn:y,maskInputFn:g,slimDOM:S=!1,dataURLOptions:k,preserveWhiteSpace:b,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:_,onBlockedImageLoad:I,onStylesheetLoad:C,stylesheetLoadTimeout:E,keepIframeSrcFn:x=()=>!1,ignoreCSSAttributes:M=new Set([])}=t||{};return Ce(e,{doc:e,mirror:n,blockClass:s,blockSelector:r,unblockSelector:o,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:!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,maskAttributeFn:f,maskTextFn:y,maskInputFn:g,slimDOMOptions:!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,dataURLOptions:k,inlineImages:h,recordCanvas:p,preserveWhiteSpace:b,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:_,onBlockedImageLoad:I,onStylesheetLoad:C,stylesheetLoadTimeout:E,keepIframeSrcFn:x,newlyAddedElement:!1,ignoreCSSAttributes:M})}(document,{mirror:Bt,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:p,inlineStylesheet:m,maskAllInputs:W,maskAttributeFn:S,maskInputFn:k,maskTextFn:b,slimDOM:j,dataURLOptions:I,recordCanvas:x,inlineImages:O,onSerialize:e=>{We(e,Bt)&&X.addIframe(e),je(e,Bt)&&Y.trackLinkElement(e),He(e)&&ee.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{X.attachIframe(e,t),e.contentWindow&&Z.addWindow(e.contentWindow),ee.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Y.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:s})=>{V({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${s}px`}}}]})},keepIframeSrcFn:N,ignoreCSSAttributes:L});if(!t)return console.warn("Failed to snapshot the document");Lt({type:Ye.FullSnapshot,data:{node:t,initialOffset:De(window)}}
1),ht.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Y.adoptStyleSheets(document.adoptedStyleSheets,Bt.getId(document))};Ft=te;try{const e=[],t=e=>dt(wt)({onMutation:B,mutationCb:V,mousemoveCb:(e,t)=>Lt({type:Ye.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Lt({type:Ye.IncrementalSnapshot,data:{source:Xe.MouseInteraction,...e}}),scrollCb:J,viewportResizeCb:e=>Lt({type:Ye.IncrementalSnapshot,data:{source:Xe.ViewportResize,...e}}),inputCb:e=>Lt({type:Ye.IncrementalSnapshot,data:{source:Xe.Input,...e}}),mediaInteractionCb:e=>Lt({type:Ye.IncrementalSnapshot,data:{source:Xe.MediaInteraction,...e}}),styleSheetRuleCb:e=>Lt({type:Ye.IncrementalSnapshot,data:{source:Xe.StyleSheetRule,...e}}),styleDeclarationCb:e=>Lt({type:Ye.IncrementalSnapshot,data:{source:Xe.StyleDeclaration,...e}}),canvasMutationCb:G,fontCb:e=>Lt({type:Ye.IncrementalSnapshot,data:{source:Xe.Font,...e}}),selectionCb:e=>{Lt({type:Ye.IncrementalSnapshot,data:{source:Xe.Selection,...e}})},customElementCb:e=>{Lt({type:Ye.IncrementalSnapshot,data:{source:Xe.CustomElement,...e}})},blockClass:r,ignoreClass:a,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:h,unmaskTextSelector:p,maskInputOptions:W,inlineStylesheet:m,sampling:_,recordDOM:E,recordCanvas:x,inlineImages:O,userTriggeredOnInput:R,collectFonts:A,doc:e,maskAttributeFn:S,maskInputFn:k,maskTextFn:b,keepIframeSrcFn:N,blockSelector:o,unblockSelector:i,slimDOMOptions:j,dataURLOptions:I,mirror:Bt,iframeManager:X,stylesheetManager:Y,shadowDomManager:ee,processedNodeManager:Q,canvasManager:Z,ignoreCSSAttributes:L,plugins:D?.filter(e=>e.observer)?.map(e=>({observer:e.observer,options:e.options,callback:t=>Lt({type:Ye.Plugin,data:{plugin:e.name,payload:t}})}))||[]},{});X.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});const n=()=>{te(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(Ee("DOMContentLoaded",()=>{Lt({type:Ye.DomContentLoaded,data:{}}),"DOMContentLoaded"===T&&n()})),e.push(Ee("load",()=>{Lt({type:Ye.Load,data:{}}),"load"===T&&n()},window))),()=>{e.forEach(e=>e()),Q.destroy(),Ft=void 0,ut=void 0}}catch(e){console.warn(e)}}var Ut,zt;function Wt(e){return e>9999999999?e:1e3*e}function jt(e){return e>9999999999?e/1e3:e}function Ht(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Ye.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:(0,r.S8)(t,10,1e3)}}),"console"===t.category)))}function $t(e){return e.closest("button,a")||e}function qt(e){const t=Kt(e);return t&&t instanceof Element?$t(t):t}function Kt(e){return function(e){return"object"==typeof e&&!!e&&"target"in e}(e)?e.target:e}let Vt;Pt.mirror=Bt,Pt.takeFullSnapshot=function(e){if(!Ft)throw new Error("please take full snapshot after start recording");Ft(e)},(zt=Ut||(Ut={}))[zt.NotStarted=0]="NotStarted",zt[zt.Running=1]="Running",zt[zt.Stopped=2]="Stopped";const Jt=new Set([Xe.Mutation,Xe.StyleSheetRule,Xe.StyleDeclaration,Xe.AdoptedStyleSheet,Xe.CanvasMutation,Xe.Selection,Xe.MediaInteraction]);class Gt{constructor(e,t,n=Ht){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=(t=()=>{this._lastMutation=Xt()},Vt||(Vt=[],(0,o.GS)(A,"open",function(e){return function(...t){if(Vt)try{Vt.forEach(e=>e())}catch{}return e.apply(A,t)}})),Vt.push(t),()=>{const e=Vt?Vt.indexOf(t):-1;e>-1&&Vt.splice(e,1)});var t;this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(function(e,t){return!Yt.includes(e.tagName)||("INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||"")||(!("A"!==e.tagName||!(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target")))||!(!t||!e.matches(t))))}(t,this._ignoreSelector)||!function(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}(e))return;const n={timestamp:jt(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1)||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=jt(e)}registerScroll(e=Date.now()){this._lastScroll=jt(e)}registerClick(e){const t=$t(e);this._handleMultiClick(t)}
1_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){const e=[],t=Xt();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,s=e.mutationAfter&&e.mutationAfter<=this._threshold,r=!n&&!s,{clickCount:o,clickBreadcrumb:i}=e;if(r){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),s=n<1e3*this._timeout?"mutation":"timeout",r={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.slowClickDetected",data:{...i.data,url:A.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:s,clickCount:o||1}};return void this._addBreadcrumbEvent(t,r)}if(o>1){const e={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.multiClick",data:{...i.data,url:A.location.href,route:t.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=(0,C.wg)(()=>this._checkClicks(),1e3)}}const Yt=["A","BUTTON","INPUT"];function Xt(){return Date.now()/1e3}function Qt(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Zt=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Zt||{});const en=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function tn(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(en.has(n)){let s=n;"data-testid"!==n&&"data-test-id"!==n||(s="testId"),t[s]=e[n]}return t}function nn(e,t){const n=Pt.mirror.getId(e),s=n&&Pt.mirror.getNode(n),r=s&&Pt.mirror.getMeta(s),o=r&&function(e){return e.type===Zt.Element}(r)?r:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(e=>e.type===Zt.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(""),attributes:tn(o.attributes)}}:{}}}const sn={resource:function(e){const{entryType:t,initiatorType:n,name:s,responseEnd:r,startTime:o,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:an(o),end:an(r),name:s,data:{size:l,statusCode:c,decodedBodySize:i,encodedBodySize:a}}},paint:function(e){const{duration:t,entryType:n,name:s,startTime:r}=e,o=an(r);return{type:n,name:s,start:o,end:o+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:s,duration:r,domComplete:o,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:h,startTime:p,transferSize:m,type:f}=e;return 0===r?null:{type:`${t}.${f}`,start:an(p),end:an(o),name:n,data:{size:m,decodedBodySize:s,encodedBodySize:i,duration:r,domInteractive:l,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:o,redirectCount:h}}}};function rn(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function on(e){const t=sn[e.entryType];return t?t(e):null}function an(e){return(((0,a.k3)()||A.performance.timeOrigin)+e)/1e3}function cn(e){const t=e.entries[e.entries.length-1];return hn(e,"largest-contentful-paint",t?.element?[t.element]:void 0)}function ln(e){return void 0!==e.sources}function un(e){const t=[],n=[];for(const s of e.entries)if(ln(s)){const e=[];for(const t of s.sources)if(t.node){n.push(t.node);const s=Pt.mirror.getId(t.node);s&&e.push(s)}
1t.push({value:s.value,nodeIds:e.length?e:void 0})}return hn(e,"cumulative-layout-shift",n,t)}function dn(e){const t=e.entries[e.entries.length-1];return hn(e,"interaction-to-next-paint",t?.target?[t.target]:void 0)}function hn(e,t,n,s){const r=e.value,o=e.rating,i=an(r);return{type:"web-vital",name:t,start:i,end:i,data:{value:r,size:r,rating:o,nodeIds:n?n.map(e=>Pt.mirror.getId(e)):void 0,attributions:s}}}const pn="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,mn=["log","warn","error"],fn="[Replay] ";function yn(e,t="info"){(0,c.Z)({category:"console",data:{logger:"replay"},level:t,message:`${fn}${e}`},{level:t})}const gn=function(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return pn?(mn.forEach(e=>{n[e]=(...n)=>{l.Yz[e](fn,...n),t&&yn(n.join(""),(0,u.t)(e))}}),n.exception=(s,...r)=>{r.length&&n.error&&n.error(...r),l.Yz.error(fn,s),e?(0,d.Cp)(s,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&yn(s,"error")},n.infoTick=(...e)=>{l.Yz.log(fn,...e),t&&setTimeout(()=>yn(e[0]),0)}):mn.forEach(e=>{n[e]=()=>{}}),n}();
1class Sn extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class kn{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>F)throw new Sn;this.events.push(e)}finish(){return new Promise(e=>{const t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=null;for(const{timestamp:t}of this.events)(null===e||t<e)&&(e=t);return null===e?e:Wt(e)}}class bn{constructor(e){bn.prototype.__init.call(this),this._worker=e,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((e,t)=>{this._worker.addEventListener("message",({data:n})=>{n.success?e():(pn&&gn.warn("Received worker message with unsuccessful status",n),t(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",e=>{pn&&gn.warn("Failed to load Replay compression worker",e),t(new Error(`Failed to load Replay compression worker: ${e instanceof ErrorEvent&&e.message?e.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})})),this._ensureReadyPromise}destroy(){pn&&gn.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(e=>e.reject(new Error("Worker destroyed"))),this._pending.clear(),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise((s,r)=>{this._pending.set(n,{method:e,resolve:s,reject:r});try{this._worker.postMessage({id:n,method:e,arg:t})}catch(e){this._pending.delete(n),r(e)}})}__init(){this._onMessage=({data:e})=>{const t=e;if("number"!=typeof t.id)return;const n=this._pending.get(t.id);if(n&&n.method===t.method){if(this._pending.delete(t.id),!t.success)return pn&&gn.error("Error in compression worker: ",t.response),void n.reject(new Error("Error in compression worker"));n.resolve(t.response)}}}_getAndIncrementId(){return this._id++}}class vn{constructor(e){this._worker=new bn(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=Wt(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>F?Promise.reject(new Sn):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{pn&&gn.exception(e,'Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class wn{constructor(e){this._fallback=new kn,this._compression=new vn(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}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}set waitForCheckout(e){this._used.waitForCheckout=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)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}
1ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void(pn&&gn.exception(e,"Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,s=[];for(const t of e)s.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(s),this._fallback.clear()}catch(e){pn&&gn.exception(e,"Failed to add events when switching buffers.")}}}function _n(){try{return"sessionStorage"in A&&!!A.sessionStorage}catch{return!1}}function In(e){return void 0!==e&&Math.random()<e}function Cn(e){if(_n())try{A.sessionStorage.setItem(O,JSON.stringify(e))}catch{}}function En(e){const t=Date.now();return{id:e.id||(0,h.eJ)(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId,dirty:e.dirty||!1}}function xn({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:s}={}){const r=function(e,t){return In(e)?"session":!!t&&"buffer"}(e,t),o=En({sampled:r,previousSessionId:s});return n&&Cn(o),o}function Mn(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function Tn(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!!function(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:s=Date.now()}){return Mn(e.started,t,s)||Mn(e.lastActivity,n,s)}(e,{sessionIdleExpire:t,maxReplayDuration:n})&&("buffer"!==e.sampled||0!==e.segmentId)}function Rn({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},s){const r=s.stickySession&&function(){if(!_n())return null;try{const e=A.sessionStorage.getItem(O);if(!e)return null;const t=JSON.parse(e);return pn&&gn.infoTick("Loading existing session"),En(t)}catch{return null}}();return r?Tn(r,{sessionIdleExpire:e,maxReplayDuration:t})?(pn&&gn.infoTick("Session in sessionStorage is expired, creating new one..."),xn(s,{previousSessionId:r.id})):r:(pn&&gn.infoTick("Creating new session"),xn(s,{previousSessionId:n}))}function An(e,t,n){return!!Dn(e,t)&&(On(e,t,n),!0)}async function On(e,t,n){const{eventBuffer:s}=e;if(!s||s.waitForCheckout&&!n)return null;const r="buffer"===e.recordingMode;try{n&&r&&s.clear(),n&&(s.hasCheckout=!0,s.waitForCheckout=!1);const o=function(e,t){try{if("function"==typeof t&&function(e){return e.type===Ye.Custom}(e))return t(e)}catch(e){return pn&&gn.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}(t,e.getOptions().beforeAddRecordingEvent);if(!o)return;return await s.addEvent(o)}catch(t){const n=t&&t instanceof Sn,o=n?"eventBufferOverflow":"eventBufferError",i=(0,p.KU)();if(i){const e=n?"buffer_overflow":"internal_sdk_error";i.recordDroppedEvent(e,"replay")}if(n&&r)return s.clear(),s.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:o})}}function Dn(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Wt(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now()||n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration&&(pn&&gn.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),1))}function Nn(e){return!e.type}function Ln(e){return"transaction"===e.type}function Fn(e){return"feedback"===e.type}function Bn(e){return!!e.category}function Pn(){const e=(0,p.o5)().getPropagationContext().dsc;e&&delete e.replay_id;const t=(0,m.Bk)();t&&delete(0,f.k1)(t).replay_id}function Un(e,t){return t.map(({type:t,start:n,end:s,name:r,data:o})=>{const i=e.throttledAddEvent({type:Ye.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:r,startTimestamp:n,endTimestamp:s,data:o}}});return"string"==typeof i?Promise.resolve(null):i})}function zn(e,t){e.isEnabled()&&null!==t&&(function(e,t){return(!pn||!e.getOptions()._experiments.traceInternals)&&(0,y.A)(t,(0,p.KU)())}(e,t.name)||e.addUpdate(()=>(Un(e,[t]),!0)))}function Wn(e){if(!e)return;const t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=(0,x.P4)(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function jn(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Hn(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},s=n.warnings||[];return n.warnings=[...s,t],e._meta=n,e}function $n(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:s,url:r,method:o,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:s/1e3,name:r,data:{method:o,statusCode:i,request:a,response:c}}}function qn(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Kn(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const s={headers:e,size:t},{body:r,warnings:o}=function(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>N,n=function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){const t=e.slice(0,N);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}\u2026`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}(n);return s.body=r,o?.length&&(s._meta={warnings:o}),s}function Vn(e,t){return Object.entries(e).reduce((n,[s,r])=>{const o=s.toLowerCase();return t.includes(o)&&e[s]&&(n[o]=r),n},{})}function Jn(e,t){const n=function(e,t=A.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(A.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const s=n.href;return!e.endsWith("/")&&s.endsWith("/")?s.slice(0,-1):s}(e);return(0,g.Xr)(n,t)}function Gn(e,t){const n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function Yn(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?Gn(n,t):Array.isArray(n)?{}:Vn(n,t):{}}function Xn(e){const t=(0,p.KU)();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:s,networkCaptureBodies:r,networkRequestHeaders:o,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:s,networkCaptureBodies:r,networkRequestHeaders:o,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",(e,t)=>function(e,t,n){if(t.data)try{(function(e){return"xhr"===e.category})(t)&&function(e){return e?.xhr}(n)&&(function(e,t){const{xhr:n,input:s}=t;if(!n)return;const r=Wn(s),o=n.getResponseHeader("content-length")?jn(n.getResponseHeader("content-length")):function(e,t){try{return Wn("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch{return}}(n.response,n.responseType);void 0!==r&&(e.data.request_body_size=r),void 0!==o&&(e.data.response_body_size=o)}(t,n),async function(e,t,n){try{const s=function(e,t,n){const s=Date.now(),{startTimestamp:r=s,endTimestamp:o=s,input:i,xhr:a}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:h}=e.data;if(!c)return null;if(!a||!Jn(c,n.networkDetailAllowUrls)||Jn(c,n.networkDetailDenyUrls))return{startTimestamp:r,endTimestamp:o,url:c,method:l,statusCode:u,request:qn(d),response:qn(h)};const p=a[M.Er],m=p?Vn(p.request_headers,n.networkRequestHeaders):{},f=Vn((0,x.ti)(a),n.networkResponseHeaders),[y,g]=n.networkCaptureBodies?(0,x.sY)(i,gn):[void 0],[S,k]=n.networkCaptureBodies?function(e){const 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(t){return pn&&gn.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return pn&&gn.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(e){t.push(e)}return pn&&gn.warn("Failed to get xhr response body",...t),[void 0]}(a):[void 0],b=Kn(m,d,y),v=Kn(f,h,S);return{startTimestamp:r,endTimestamp:o,url:c,method:l,statusCode:u,request:g?Hn(b,g):b,response:k?Hn(v,k):v}}(e,t,n),r=$n("resource.xhr",s);zn(n.replay,r)}catch(e){pn&&gn.exception(e,"Failed to capture xhr breadcrumb")}}
1(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return e?.response}(n)&&(function(e,t){const{input:n,response:s}=t,r=Wn(n?(0,x.Gv)(n):void 0),o=s?jn(s.headers.get("content-length")):void 0;void 0!==r&&(e.data.request_body_size=r),void 0!==o&&(e.data.response_body_size=o)}(t,n),async function(e,t,n){try{const s=await async function(e,t,n){const s=Date.now(),{startTimestamp:r=s,endTimestamp:o=s}=t,{url:i,method:a,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=Jn(i,n.networkDetailAllowUrls)&&!Jn(i,n.networkDetailDenyUrls),h=d?function({networkCaptureBodies:e,networkRequestHeaders:t},n,s){const r=n?(i=t,1===(o=n).length&&"string"!=typeof o[0]?Yn(o[0],i):2===o.length?Yn(o[1],i):{}):{};var o,i;if(!e)return Kn(r,s,void 0);const a=(0,x.Gv)(n),[c,l]=(0,x.sY)(a,gn),u=Kn(r,s,c);return l?Hn(u,l):u}(n,t.input,l):qn(l),p=await async function(e,{networkCaptureBodies:t,networkResponseHeaders:n},s,r){if(!e&&void 0!==r)return qn(r);const o=s?Gn(s.headers,n):{};if(!s||!t&&void 0!==r)return Kn(o,r,void 0);const[i,a]=await async function(e){const t=function(e){try{return e.clone()}catch(e){pn&&gn.exception(e,"Failed to clone response body")}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{const e=await function(e){return new Promise((t,n)=>{const s=(0,C.wg)(()=>n(new Error("Timeout while trying to read response body")),500);(async function(e){return await e.text()})(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(s))})}(t);return[e]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(pn&&gn.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(pn&&gn.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}(s),c=function(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:s,headers:r}){try{const o=e?.length&&void 0===n?Wn(e):n;return s?Kn(r,o,t?e:void 0):qn(o)}catch(e){return pn&&gn.exception(e,"Failed to serialize response body"),Kn(r,n,void 0)}}(i,{networkCaptureBodies:t,responseBodySize:r,captureDetails:e,headers:o});return a?Hn(c,a):c}(d,n,t.response,u);return{startTimestamp:r,endTimestamp:o,url:i,method:a,statusCode:c,request:h,response:p}}(e,t,n),r=$n("resource.fetch",s);zn(n.replay,r)}catch(e){pn&&gn.exception(e,"Failed to capture fetch breadcrumb")}}(t,n,e))}catch(e){pn&&gn.exception(e,"Error when enriching network breadcrumb")}}(a,e,t))}catch{}}function Qn(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:s}=e,r=Date.now()/1e3;return{type:"memory",name:"memory",start:r,end:r,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:s}}}}const Zn=s.O.navigator;function es(e){let t=!1;return(n,s)=>{if(!e.checkAndHandleExpiredSession())return void(pn&&gn.warn("Received replay event after session expired."));const r=s||!t;t=!0,function(e){const t=e.data;if(e.type===Ye.IncrementalSnapshot&&t&&"object"==typeof t&&"source"in t&&t.source===Xe.Mutation&&"attributes"in t&&Array.isArray(t.attributes))for(const e of t.attributes){const t=Pt.mirror.getNode(e.id),n=t&&Pt.mirror.getMeta(t);if(n?.type===Zt.Element)for(const[t,s]of Object.entries(e.attributes))null===s?delete n.attributes[t]:n.attributes[t]=s}}(n),e.clickDetector&&function(e,t){try{if(!function(e){return 3===e.type}(t))return;const{source:n}=t.data;if(Jt.has(n)&&e.registerMutation(t.timestamp),n===Xe.Scroll&&e.registerScroll(t.timestamp),function(e){return e.data.source===Xe.MouseInteraction}(t)){const{type:n,id:s}=t.data,r=Pt.mirror.getNode(s);r instanceof HTMLElement&&n===Qe.Click&&e.registerClick(r)}}catch{}}(e.clickDetector,n),e.addUpdate(()=>{if("buffer"===e.recordingMode&&r&&e.setInitialState(),!An(e,n,r))return!0;if(!r)return!1;const t=e.session;if(function(e,t){t&&0===e.session?.segmentId&&An(e,function(e){const t=e.getOptions();return{type:Ye.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,r),"buffer"===e.recordingMode&&t&&e.eventBuffer&&!t.dirty){const n=e.eventBuffer.getEarliestTimestamp();n&&(pn&&gn.log(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&Cn(t))}return t?.previousSessionId||"session"===e.recordingMode&&e.flush(),!0})}}
1class ts extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class ns extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}class ss extends Error{constructor(){super("Session is too long, not sending replay")}}async function rs(e,t={count:0,interval:5e3}){const{recordingData:n,onError:s}=e;if(n.length)try{return await async function({recordingData:e,replayId:t,segmentId:n,eventContext:s,timestamp:r,session:o}){const i=function({recordingData:e,headers:t}){let n;const s=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${s}${e}`;else{const t=(new TextEncoder).encode(s);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:l,initialTimestamp:u}=s,d=(0,p.KU)(),h=(0,p.o5)(),m=d?.getTransport(),f=d?.getDsn();if(!(d&&m&&f&&o.sampled))return Promise.resolve({});const y={type:"replay_event",replay_start_timestamp:u/1e3,timestamp:r/1e3,error_ids:c,trace_ids:l,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled},g=await async function({client:e,scope:t,replayId:n,event:s}){const r={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",s,r);const o=await(0,b.mG)(e.getOptions(),s,r,t,e,(0,p.rm)());if(!o)return null;e.emit("postprocessEvent",o,r),o.platform=o.platform||"javascript";const i=e.getSdkMetadata(),{name:a,version:c,settings:l}=i?.sdk||{};return o.sdk={...o.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0",settings:l},o}({scope:h,client:d,replayId:t,event:y});if(!g)return d.recordDroppedEvent("event_processor","replay"),pn&&gn.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete g.sdkProcessingMetadata;const S=function(e,t,n,s){return(0,k.h4)((0,k.n2)(e,(0,k.Cj)(e),s,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(g,i,f,d.getOptions().tunnel);let w;try{w=await m.send(S)}catch(e){const t=new Error(D);try{t.cause=e}catch{}throw t}const _=(0,v.wq)({},w);if((0,v.Jz)(_,"replay"))throw new ns(_);if("number"==typeof w.statusCode&&(w.statusCode<200||w.statusCode>=300))throw new ts(w.statusCode);return w}(e),!0}catch(n){if(n instanceof ts||n instanceof ns)throw n;if((0,d.o)("Replays",{_retryCount:t.count}),s&&s(n),t.count>=3){const e=new Error(`${D} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise((n,s)=>{(0,C.wg)(async()=>{try{await rs(e,t),n(!0)}catch(e){s(e)}},t.interval)})}}const os="__THROTTLED";class is{constructor({options:e,recordingOptions:t}){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._requiresManualStart=!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,n){return(0,S.s)(e,t,{...n,setTimeoutImpl:C.wg})}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=function(e,t,n){const s=new Map;let r=!1;return(...o)=>{const i=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;s.forEach((e,n)=>{n<t&&s.delete(n)})})(i),[...s.values()].reduce((e,t)=>e+t,0)>=t){const e=r;return r=!0,e?"__SKIPPED":os}r=!1;const a=s.get(i)||0;return s.set(i,a+1),e(...o)}}((e,t)=>function(e,t,n){return Dn(e,t)?On(e,t,n):Promise.resolve(null)}(this,e,t),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:s}=this.getOptions(),r=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:s?s.join(","):""}:void 0;if(r&&(this.clickDetector=new Gt(this,r)),pn){const t=e._experiments;gn.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}this._handleVisibilityChange=()=>{"visible"===A.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroun
1dTasks()},this._handleWindowBlur=()=>{const e=Qt({category:"ui.blur"});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{const e=Qt({category:"ui.focus"});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{!function(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e){const{metaKey:t,shiftKey:n,ctrlKey:s,altKey:r,key:o,target:a}=e;if(!a||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(a)||!o)return null;const c=t||s||r,l=1===o.length;if(!c&&l)return null;const u=(0,i.Hd)(a,{maxStringLength:200})||"<unknown>";return Qt({category:"ui.keyDown",message:u,data:{...nn(a,u).data,metaKey:t,shiftKey:n,ctrlKey:s,altKey:r,key:o}})}(t);n&&Ht(e,n)}(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}handleException(e){pn&&gn.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,s=t<=0&&n<=0;this._requiresManualStart=s,s||(this._initializeSessionForSampling(e),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",pn&&gn.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording()):pn&&gn.exception(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(pn&&gn.log("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(pn&&gn.log("Buffering is in progress, call `flush()` to save the replay"));pn&&gn.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=Rn({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(pn&&gn.log("Buffering is in progress, call `flush()` to save the replay"));pn&&gn.infoTick("Starting replay in buffer mode");const e=Rn({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=Pt({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:es(this),.../iPhone|iPad|iPod/i.test(Zn?.userAgent??"")||/Macintosh/i.test(Zn?.userAgent??"")&&Zn?.maxTouchPoints&&Zn?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{},onMutation:this._onMutationHandler.bind(this),...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.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({forceFlush:e=!1,reason:t}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";const n=t??"manual";(0,p.KU)()?.emit("replayEnd",{sessionId:this.session?.id,reason:n});try{pn&&gn.log(`Stopping Replay triggered by ${n}`),Pn(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,s=this,function(){if(_n())try{A.sessionStorage.removeItem(O)}catch{}}(),s.session=void 0}catch(e){this.handleException(e)}var s}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),pn&&gn.log("Pausing replay"))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),pn&&gn.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();pn&&gn.log("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();e&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&this._isEnabled&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}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(e){if(!e||!1!==this.session?.sampled)return this.session?.id}
1checkAndHandleExpiredSession(){if(!this._lastActivity||!Mn(this._lastActivity,this.timeouts.sessionIdlePause)||"session"!==this.session?.sampled)return!!this._checkSession();this.pause()}setInitialState(){const e=`${A.location.pathname}${A.location.hash}${A.location.search}`,t=`${A.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===os){const e=Qt({category:"replay.throttled"});this.addUpdate(()=>!An(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}}))}return n}getCurrentRoute(){const e=this.lastActiveSpan||(0,m.Bk)(),t=e&&(0,m.zU)(e),n=(t&&(0,m.et)(t).data||{})[w.i_];if(t&&n&&["route","custom"].includes(n))return(0,m.et)(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=function(e){try{const t=e||("undefined"!=typeof __SENTRY_EXCLUDE_REPLAY_WORKER__&&__SENTRY_EXCLUDE_REPLAY_WORKER__?"":function(){const e=new Blob(['
vendor: 10,329 bytes, line 1
1var 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]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(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,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(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},_=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},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=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:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(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,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}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 s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),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=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+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(U,C,0),R=U;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[s[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=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(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;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=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,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];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(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[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=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),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(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,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 s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),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(s),32768),this.s.z=n.length-s+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.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!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,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.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)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}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.prototype.flush=function(){j.prototype.flush.call(this)},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(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}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(const r of t)n+=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});
1']);return URL.createObjectURL(e)}());if(!t)return;pn&&gn.log("Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new wn(n)}catch(e){pn&&gn.exception(e,"Failed to create compression worker")}}(t);if(e)return e}return pn&&gn.log("Using simple buffer"),new kn}({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&(0,p.KU)()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),"session"===this.recordingMode&&this.session&&function(e){const t=(0,p.o5)().getPropagationContext().dsc;t&&(t.replay_id=e);const n=(0,m.Bk)();n&&((0,f.k1)(n).replay_id=e)}(this.session.id)}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=Rn({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!Tn(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(e.id))}_addListeners(){try{A.document.addEventListener("visibilitychange",this._handleVisibilityChange),A.addEventListener("blur",this._handleWindowBlur),A.addEventListener("focus",this._handleWindowFocus),A.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(function(e){const t=(0,p.KU)();(0,T.i)((e=>t=>{if(!e.isEnabled())return;const n=function(e){const{target:t,message:n}=function(e){const t="click"===e.name;let n,s=null;try{s=t?qt(e.event):Kt(e.event),n=(0,i.Hd)(s,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:s,message:n}}(e);return Qt({category:`ui.${e.name}`,...nn(t,n)})}(t);if(!n)return;const s="click"===t.name,r=s?t.event:void 0;var o,a,c;!(s&&e.clickDetector&&r?.target)||r.altKey||r.metaKey||r.ctrlKey||r.shiftKey||(o=e.clickDetector,a=n,c=qt(t.event),o.handleClick(a,c)),Ht(e,n)})(e)),(0,R._)(function(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,s=Date.now()/1e3;return{type:"navigation.push",start:s,end:s,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Un(e,[n]),!1)))}}(e)),function(e){const t=(0,p.KU)();t&&t.on("beforeAddBreadcrumb",t=>function(e,t){if(!e.isEnabled()||!Bn(t))return;const n=function(e){return!Bn(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:"console"===e.category?function(e){const t=e.data?.arguments;if(!Array.isArray(t)||0===t.length)return Qt(e);let n=!1;const s=t.map(e=>{if(!e)return e;if("string"==typeof e)return e.length>L?(n=!0,`${e.slice(0,L)}\u2026`):e;if("object"==typeof e)try{const t=(0,r.S8)(e,7);return JSON.stringify(t).length>L?(n=!0,`${JSON.stringify(t,null,2).slice(0,L)}\u2026`):t}catch{}return e});return Qt({...e,data:{...e.data,arguments:s,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e):Qt(e)}(t);n&&Ht(e,n)}(e,t))}(e),Xn(e);const n=function(e){return Object.assign((t,n)=>{if(e.session&&Tn(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&Pn(),!e.isEnabled()||e.isPaused())return t;if(function(e){return"replay_event"===e.type}(t))return delete t.breadcrumbs,t;if(!Nn(t)&&!Ln(t)&&!Fn(t))return t;if(!e.checkAndHandleExpiredSession())return Pn(),t;if(Fn(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),function(e,t){e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:Ye.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1))}(e,t),t;if(function(e,t){return!(e.type||!e.exception?.values?.length||!t.originalException?.__rrweb__)}(t,n)&&!e.getOptions()._experiments.captureExceptions)return pn&&gn.log("Ignoring error from rrweb internals",t),null;const s=function(e,t){return"buffer"===e.recordingMode&&t.message!==D&&!(!t.exception||t.type)&&In(e.getOptions().errorSampleRate)}(e,t);if((s||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),s&&"buffer"===e.recordingMode&&"buffer"===e.session?.sampled){const t=e.session;t.dirty=!0,e.getOptions().stickySession&&Cn(t)}return t},{id:"Replay"})}(e);(0,d.SA)(n),t&&(t.on("beforeSendEvent",function(e){return t=>{e.isEnabled()&&Nn(t)&&function(e,t){const n=t.exception?.values?.[0]?.value;"string"==typeof n&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&Ht(e,Qt({category:"replay.hydrate-error",data:{url:(0,i.$N)()}}))}(e,t)}}(e)),t.on("afterSendEvent",function(e){return(t,n)=>{if(!e.isEnabled()||!Nn(t)&&!Ln(t))return;const s=n.statusCode;!s||s<200||s>=300||(Ln(t)?function(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}(e,t):function(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags?.replayId)return;const{beforeErrorSampling:s}=e.getOptions();("function"!=typeof s||s(t))&&(0,C.wg)(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}(e,t))}}(e)),t.on("createDsc",t=>{const n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)}),t.on("spanStart",t=>{e.lastActiveSpan=t}),t.on("spanEnd",t=>{e.lastActiveSpan=t}),t.on("beforeSendFeedback",async(t,n)=>{const s=e.getSessionId();n?.includeReplay&&e.isEnabled()&&s&&t.contexts?.feedback&&("api"===t.contexts.feedback.source&&await e.sendBufferedReplayOrFlush(),t.contexts.feedback.replay_id=s)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=function(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const s=[];
1return["navigation","paint","resource"].forEach(e=>{s.push((0,E.wv)(e,n))}),s.push((0,E.Pt)(rn(cn,e)),(0,E.a9)(rn(un,e)),(0,E.hT)(rn(dn,e))),()=>{s.forEach(e=>e())}}(this)}_removeListeners(){try{A.document.removeEventListener("visibilitychange",this._handleVisibilityChange),A.removeEventListener("blur",this._handleWindowBlur),A.removeEventListener("focus",this._handleWindowFocus),A.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){this.session&&(Tn(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})?Pn():(e&&this._createCustomBreadcrumb(e),this.conditionalFlush()))}_doChangeToForegroundTasks(e){this.session&&(this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):pn&&gn.log("Document has become active, but session has expired"))}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:Ye.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=(t=this.performanceEntries,t.map(on).filter(Boolean)).concat(this.replayPerformanceEntries);var t;if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(Un(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart)return;if(e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const 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(){const e=this.getSessionId();if(this.session&&this.eventBuffer&&e){if(await this._addPerformanceEntries(),this.eventBuffer?.hasEvents&&(await async function(e){try{return Promise.all(Un(e,[Qn(A.performance.memory)]))}catch{return[]}}(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new ss;const n=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const r=await this.eventBuffer.finish();await rs({replayId:e,recordingData:r,segmentId:s,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:"sendError"});const t=(0,p.KU)();if(t){let n;n=e instanceof ns?"ratelimit_backoff":e instanceof ss?"invalid":"send_error",t.recordDroppedEvent(n,"replay")}}}else pn&&gn.error("No session or eventBuffer found to flush.")}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(pn&&gn.error("Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const s=n<this._options.minReplayDuration,r=n>this._options.maxReplayDuration+5e3;if(s||r)return pn&&gn.log(`Session duration (${Math.floor(n/1e3)}s) is too ${s?"short":"long"}, not sending replay.`),void(s&&this._debouncedFlush());const o=this.eventBuffer;o&&0===this.session.segmentId&&!o.hasCheckout&&pn&&gn.log("Flushing initial segment without checkout.");const i=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,i&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Cn(this.session)}_onMutationHandler(e){const{ignoreMutations:t}=this._options._experiments;if(t?.length&&e.some(e=>{const n=function(e){if(!e)return null;
1try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}(e.target),s=t.join(",");return n?.matches(s)}))return!1;const n=e.length,s=this._options.mutationLimit,r=s&&n>s;if(n>this._options.mutationBreadcrumbLimit||r){const e=Qt({category:"replay.mutations",data:{count:n,limit:r}});this._createCustomBreadcrumb(e)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}function as(e,t){return[...e,...t].join(",")}const cs='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',ls=["content-length","content-type","accept"],us=Symbol.for("sentry__originalRequestBody");let ds=!1,hs=!1;const ps=e=>new ms(e);class ms{constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:s=36e5,stickySession:r=!0,useCompression:o=!0,workerUrl:i,_experiments:a={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:h=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:f=[],networkDetailDenyUrls:y=[],networkCaptureBodies:g=!0,networkRequestHeaders:S=[],networkResponseHeaders:k=[],mask:b=[],maskAttributes:v=["title","placeholder","aria-label"],unmask:w=[],block:I=[],unblock:C=[],ignore:E=[],maskFn:x,beforeAddRecordingEvent:M,beforeErrorSampling:T,onError:R,attachRawBodyFromRequest:A=!1}={}){this.name="Replay";const O=function({mask:e,unmask:t,block:n,unblock:s,ignore:r}){return{maskTextSelector:as(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:as(t,[]),blockSelector:as(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:as(s,[]),ignoreSelector:as(r,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:b,unmask:w,block:I,unblock:C,ignore:E});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:x,maskInputFn:x,maskAttributeFn:(e,t,n)=>function({el:e,key:t,maskAttributes:n,maskAllText:s,privacyOptions:r,value:o}){if(r.unmaskTextSelector&&e.matches(r.unmaskTextSelector))return o;const i=n.includes(t),a=s&&"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"");return i||a?o.replace(/[\S]/g,"*"):o}({maskAttributes:v,maskAllText:c,privacyOptions:O,key:e,value:t,el:n}),...O,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}},recordCrossOriginIframes:Boolean(a.recordCrossOriginIframes)},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,5e4),maxReplayDuration:Math.min(s,36e5),stickySession:r,useCompression:o,workerUrl:i,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:h,slowClickTimeout:p,slowClickIgnoreSelectors:m,networkDetailAllowUrls:f,networkDetailDenyUrls:y,networkCaptureBodies:g,networkRequestHeaders:fs(S),networkResponseHeaders:fs(k),beforeAddRecordingEvent:M,beforeErrorSampling:T,onError:R,attachRawBodyFromRequest:A,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${cs}`:cs,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&(0,_.B)())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return ds}set _isInitialized(e){ds=e}afterAllSetup(e){(0,_.B)()&&!this._replay&&(this._initialOptions.attachRawBodyFromRequest&&function(){if("undefined"==typeof Request||hs)return;const e=Request;try{const t=function(t,n){const s=new e(t,n);return null!=n?.body&&(s[us]=n.body),s};t.prototype=e.prototype,s.O.Request=t,hs=!0}catch{}}(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode,reason:"manual"}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(e){if(this._replay?.isEnabled())return this._replay.getSessionId(e)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=function(e,t){const n=t.getOptions(),s={sessionSampleRate:0,errorSampleRate:0,...e},r=(0,I.i)(n.replaysSessionSampleRate),o=(0,I.i)(n.replaysOnErrorSampleRate);return null==r&&null==o&&(0,l.pq)(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),null!=r&&(s.sessionSampleRate=r),null!=o&&(s.errorSampleRate=o),s}(this._initialOptions,e);this._replay=new is({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}}function fs(e){return[...ls,...e.map(e=>e.toLowerCase())]}function ys(){const e=(0,p.KU)();return e?.getIntegrationByName("Replay")}}}]);

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.