@mcpjam/inspector 3.12.2 → 3.12.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/client/assets/OAuthDesktopReturnNotice-B2D5moE-.css +2 -0
  2. package/dist/client/assets/{OAuthDesktopReturnNotice-BvaAi4cq.js → OAuthDesktopReturnNotice-CTGRhDuo.js} +2 -2
  3. package/dist/client/assets/{app-bootstrap-BW4kwx2v.js → app-bootstrap-B7TKDg4p.js} +365 -365
  4. package/dist/client/assets/{button-DnQ-Tv1N.js → button-BgMj96d7.js} +2 -2
  5. package/dist/client/assets/{chunk-YOKDWASO-D9rkUgct.js → chunk-YOKDWASO-DiKLTu3U.js} +5 -5
  6. package/dist/client/assets/{dead-clicks-autocapture-DmzB74X1.js → dead-clicks-autocapture-B2D_6BXS.js} +2 -2
  7. package/dist/client/assets/{error-reporting-fkIkUpXy.js → error-reporting-6uZvG5HZ.js} +4 -4
  8. package/dist/client/assets/{error-reporting-C6hkRPpb.js → error-reporting-xR8v_8my.js} +1 -1
  9. package/dist/client/assets/{exception-autocapture-BJuba1BH.js → exception-autocapture-Xx2wbAOf.js} +2 -2
  10. package/dist/client/assets/{failed-request-tracker-Biouu9sg.js → failed-request-tracker-BH4w1sBR.js} +2 -2
  11. package/dist/client/assets/{highlighted-body-KPVGNVTW-C5fdYDQ6.js → highlighted-body-KPVGNVTW-DIgOE9D7.js} +2 -2
  12. package/dist/client/assets/{index-DcaDaXoT.js → index-Cu4ySOft.js} +3 -3
  13. package/dist/client/assets/{jszip.min-DbcCjjhc.js → jszip.min-C24J_3Y_.js} +2 -2
  14. package/dist/client/assets/{mermaid-HWGCJPDP-C0opeW_Z.js → mermaid-HWGCJPDP-BTzLBCkg.js} +1 -1
  15. package/dist/client/assets/{posthog-recorder-C0Eve_v2.js → posthog-recorder-CEtP2mh8.js} +2 -2
  16. package/dist/client/assets/{preload-helper-6yXzl-We.js → preload-helper-Cfn3cu1N.js} +2 -2
  17. package/dist/client/assets/{rolldown-runtime-aO8ZncHb.js → rolldown-runtime-BPNN4GNu.js} +1 -1
  18. package/dist/client/assets/{surveys-CYgi8qEu.js → surveys-CWniVjxJ.js} +2 -2
  19. package/dist/client/assets/{trace-timeline-BipssVoa.js → trace-timeline-D-nhBNaR.js} +1 -1
  20. package/dist/client/assets/{trace-timeline-BQ5wej-R.js → trace-timeline-D9qZRjVv.js} +2 -2
  21. package/dist/client/assets/{web-vitals-O0au_1Qc.js → web-vitals-zTwn9Gi6.js} +2 -2
  22. package/dist/client/index.html +7 -7
  23. package/dist/server/{chunk-PPGJCZNJ.js → chunk-5RE7KJ2M.js} +4 -3
  24. package/dist/server/{chunk-KML2Y7FH.js → chunk-5T6DFO27.js} +4 -3
  25. package/dist/server/{consent-lifetime-DYWG3A3P.js → consent-lifetime-PTGAZQSU.js} +2 -2
  26. package/dist/server/harness-install-cli.js +1 -1
  27. package/dist/server/index.js +6661 -4347
  28. package/package.json +4 -4
  29. package/dist/client/assets/OAuthDesktopReturnNotice-C95FI7VH.css +0 -2
@@ -1,4 +1,4 @@
1
- (function(){try{var Ue=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};Ue.SENTRY_RELEASE={id:"3.12.2"};var Pn=new Ue.Error().stack;Pn&&(Ue._sentryDebugIds=Ue._sentryDebugIds||{},Ue._sentryDebugIds[Pn]="29730856-25d9-4f30-b900-e128b0e1fd3e",Ue._sentryDebugIdIdentifier="sentry-dbid-29730856-25d9-4f30-b900-e128b0e1fd3e")}catch{}})();(function(){function Ue(e){return Ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ue(e)}function Pn(e,t,n){return(t=(function(r){var i=(function(s){if(Ue(s)!="object"||!s)return s;var c=s[Symbol.toPrimitive];if(c!==void 0){var l=c.call(s,"string");if(Ue(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(s)})(r);return Ue(i)=="symbol"?i:i+""})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function B(e){for(var t=1;arguments.length>t;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lr(Object(n),!0).forEach(function(r){Pn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fi(e,t,n,r,i,s,c){try{var l=e[s](c),o=l.value}catch(a){n(a);return}l.done?t(o):Promise.resolve(o).then(r,i)}function Ve(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function c(o){Fi(s,r,i,c,l,"next",o)}function l(o){Fi(s,r,i,c,l,"throw",o)}c(void 0)})}}const ka=["type"];var te=(function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e})({}),j=(function(e){return 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})({}),He=(function(e){return 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})({}),gt=(function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e})({}),Qt=(function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e})({}),en=(function(e){return 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})({}),Re=(function(e){return 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})({});function Pi(e,t){return e.indexOf(t)!==-1}"Mobile".toLowerCase(),"Tablet".toLowerCase(),"0".repeat(32),"0".repeat(16);var $i={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},Bi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},$n={};function Bn(e){if($n[e])return $n[e];const t=(function(u){var h,d;const p=(h=globalThis)===null||h===void 0||(h=h.Zone)===null||h===void 0||(d=h.__symbol__)===null||d===void 0?void 0:d.call(h,u);return p&&globalThis[p]?globalThis[p]:void 0})(e)||globalThis[e],n=t.prototype,r=e in $i?$i[e]:void 0,i=!!(r&&r.every(u=>{var h;return!!(!((h=Object.getOwnPropertyDescriptor(n,u))===null||h===void 0||(h=h.get)===null||h===void 0)&&h.toString().includes("[native code]"))})),s=e in Bi?Bi[e]:void 0,c=!!(s&&s.every(u=>{var h;return typeof n[u]=="function"&&((h=n[u])===null||h===void 0?void 0:h.toString().includes("[native code]"))}));if(i&&c)return $n[e]=t.prototype,t.prototype;const l=document.createElement("iframe");l.style.display="none";let o=!1;try{document.body.appendChild(l);const u=l.contentWindow;if(!u)return t.prototype;const h=u[e].prototype;return h?(Pi(a=navigator.userAgent,"AppleWebKit")&&!Pi(a,"Chrome")&&(l.classList.add("rr-block","ph-no-capture"),l.setAttribute("__rrwebUntaintedPrototype",e),o=!0),$n[e]=h):n}catch{return n}finally{!o&&l.parentNode&&document.body.removeChild(l)}var a}var tn=Object.create(null);function Rt(e,t,n){var r;const i=tn[e],s=i[n];if(s)return s.call(t);const c=Bn(e),l=(r=Object.getOwnPropertyDescriptor(c,n))===null||r===void 0?void 0:r.get;return l?(i[n]=l,l.call(t)):t[n]}tn.Node=Object.create(null),tn.ShadowRoot=Object.create(null),tn.MutationObserver=Object.create(null),tn.Element=Object.create(null);var Hn,Or={};function zn(e,t,n){const r=`${e}.${String(n)}`;if(Or[r])return Or[r].bind(t);const i=Bn(e)[n];return typeof i!="function"?t[n]:(Or[r]=i,i.bind(t))}function Hi(){return Bn("MutationObserver").constructor}function ct(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i={next:r},s=n(function(...c){return i.next.apply(this,c)});return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r},__rrweb_layer__:{enumerable:!1,value:i}})),e[t]=s,()=>{if(e[t]===s)return void(e[t]=i.next);const c=a=>{var u;return typeof a=="function"?(u=a.__rrweb_layer__)!==null&&u!==void 0?u:a.__posthog_layer__:void 0};let l=e[t],o=c(l);for(;o;){if(o.next===s)return void(o.next=i.next);l=o.next,o=c(l)}}}catch{return()=>{}}}var N={childNodes:e=>Rt("Node",e,"childNodes"),parentNode:e=>Rt("Node",e,"parentNode"),parentElement:e=>Rt("Node",e,"parentElement"),textContent:e=>Rt("Node",e,"textContent"),isConnected(e){if(Hn===void 0){var t;const n=(t=Object.getOwnPropertyDescriptor(Bn("Node"),"isConnected"))===null||t===void 0?void 0:t.get;Hn=n?.toString().includes("[native code]")?n:null}return Hn?.call(e)},contains:(e,t)=>zn("Node",e,"contains")(t),getRootNode:e=>zn("Node",e,"getRootNode")(),host:e=>e&&"host"in e?Rt("ShadowRoot",e,"host"):null,styleSheets:e=>e.styleSheets,shadowRoot:e=>e&&"shadowRoot"in e?Rt("Element",e,"shadowRoot"):null,querySelector:(e,t)=>zn("Element",e,"querySelector")(t),querySelectorAll:(e,t)=>zn("Element",e,"querySelectorAll")(t),mutationObserver:Hi,patch:ct};function Ge(){try{if(typeof performance<"u"&&performance.now)return performance.now()}catch{}return Date.now()}var vt=0,Nr=0;function Ia(){vt+=1}function zi(){return vt}function Dr(e,t){return(t!==vt||e>6e4)&&(Nr+=1,!0)}var tt=0,Fr=0,Pr=0,$e={durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0},Wn=null,Et=null,nn=[],rn=0,qn=0,jn={slowestBatchMs:0},ut={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0};function Wi(e){var t;(tt+=1)>1||($e={durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0},nn=[],rn=0,Et=(t=e)&&t>0?t:null,Fr=Ge(),Pr=vt)}function qi(){return tt===0?Wn||{durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0}:(tt-=1)>0?$e:($e.durationMs=Ge()-Fr,$e.deferredStylesheetCount=rn,ut.deferredCount+=rn,Et=null,Dr($e.durationMs,Pr)?$e:Wn=$e)}function Un(e,t,n){let r=e.length;if(n>=32)return r;for(let i=0;e.length>i;i++){const s=e[i];try{const c=s.cssRules;if(c&&c.length)r+=Un(c,t,n+1);else if(t&&s.styleSheet){const l=s.styleSheet;if(!t.has(l)){t.add(l);const o=l.rules||l.cssRules;o&&(r+=Un(o,t,n+1))}}}catch{}}return r}function Vn(e){if(tt===0)return;const t=Un(e,null,0);$e.cssRuleCount+=t,qn>0&&($e.nonDeferrableCssRuleCount+=t)}function ji(e){qn+=1;try{return e()}finally{qn-=1}}function $r(e){tt>0&&($e.stylesheetMs+=e)}function Ui(e){if(tt===0||Et===null)return!1;const t=$e.cssRuleCount-$e.nonDeferrableCssRuleCount;return t>=Et||t+(function(n){try{const r=n&&(n.rules||n.cssRules);if(!r)return 0;const i=new WeakSet;return i.add(n),Un(r,i,0)}catch{return 0}})(e)>Et}function Ca(){const e=nn;return nn=[],e}function Gn(){ut.failedCount+=1}function Vi(e){e>0&&(ut.abandonedCount+=e)}function sn(e){return sn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sn(e)}function I(e,t,n){return(t=(function(r){var i=(function(s){if(sn(s)!="object"||!s)return s;var c=s[Symbol.toPrimitive];if(c!==void 0){var l=c.call(s,"string");if(sn(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(s)})(r);return sn(i)=="symbol"?i:i+""})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Br(e){return e.nodeType===e.ELEMENT_NODE}function on(e){const t=e&&"host"in e&&"mode"in e&&N.host(e)||null;return!!(t&&"shadowRoot"in t&&N.shadowRoot(t)===e)}function an(e){return{}.toString.call(e)==="[object ShadowRoot]"}function Gi(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function Yi(e){const{cssText:t}=e;if(3>t.split('"').length)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(" ")+";"}var Hr=0;function ln(e){const t=Hr===0,n=t?Ge():0;Hr+=1;try{const r=e.rules||e.cssRules;if(!r)return null;Vn(r);let i=e.href;return!i&&e.ownerNode&&(i=e.ownerNode.baseURI),Gi(Array.from(r,s=>Zi(s,i)).join(""))}catch{return null}finally{Hr-=1,t&&$r(Ge()-n)}}function Zi(e,t){if(Wr(e)){let r;try{r=ln(e.styleSheet)||Yi(e)}catch{r=e.cssText}try{var n;if(r&&(!((n=e.styleSheet)===null||n===void 0)&&n.href))return yt(r,e.styleSheet.href)}catch{}return r}{let r=e.cssText;return Yn(e)&&e.selectorText.includes(":")&&(r=zr(r)),t?yt(r,t):r}}function zr(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function Wr(e){return"styleSheet"in e}function Yn(e){return"selectorText"in e}var Xi=/^-?[A-Za-z_][\w-]*$/,Ma=/^-?[A-Za-z_][\w-]*(\.-?[A-Za-z_][\w-]*)*$/;function Ra(e){const t=[];let n=!1,r=null;const i=new Map;function s(o){const a=t.pop();if(a.kind==="group"){if(o===null){for(;t.length>0&&t[t.length-1].kind==="group";)t.pop();s(null);return}const u=t[t.length-1];u.parts.push(o),u.index+=1;return}if(!a.importRule)return n=!0,void(r=o);c(t[t.length-1],a.importRule,o)}function c(o,a,u){try{let d;try{d=u||Yi(a)}catch{d=a.cssText}try{var h;d&&(h=a.styleSheet)!==null&&h!==void 0&&h.href&&(d=yt(d,a.styleSheet.href))}catch{}d&&o.parts.push(d),o.index+=1}catch{s(null)}}function l(o){const a=o.rules[o.index];if(o.kind==="sheet"&&Wr(a)){const h=i.get(a);h===null?(o.parts.push(a.cssText),o.index+=1):h?t.push({kind:"sheet",sheet:h.sheet,rules:h.rules,sheetHref:h.sheetHref,index:0,parts:[],importRule:a}):c(o,a,null);return}if((function(h,d){try{const p=(function(m){const y=m;if(!y.cssRules||y.cssRules.length===0)return null;if(y.media&&typeof y.media.mediaText=="string")return`@media ${y.media.mediaText} {`;if(Yn(m)){if(typeof y.type=="number"&&y.type!==1)return null;const v=y.style?y.style.cssText:"";return`${m.selectorText} {${v?" "+v:""}`}if("containerName"in y)return typeof y.containerQuery!="string"||y.containerName&&!Xi.test(y.containerName)?null:`@container ${y.containerName?`${y.containerName} `:""}${y.containerQuery} {`;if(typeof y.conditionText=="string"){let v="";try{var g;v=((g=m.constructor)===null||g===void 0?void 0:g.name)||""}catch{return null}return v===""||v==="Object"||v==="CSSSupportsRule"?`@supports ${y.conditionText} {`:null}return typeof y.name=="string"?"keyText"in y.cssRules[0]?Xi.test(y.name)?`@keyframes ${y.name} {`:null:y.name===""?"@layer {":Ma.test(y.name)?`@layer ${y.name} {`:null:null})(h);if(p===null)return!1;const f=d.sheetHref;return t.push({kind:"group",rules:Array.from(h.cssRules),sheetHref:f,index:0,parts:[],prelude:f?yt(p,f):p,fixColons:d.kind==="sheet"&&Yn(h)&&h.selectorText.includes(":")}),!0}catch{return!1}})(a,o))return;let u=a.cssText;o.kind==="sheet"&&Yn(a)&&a.selectorText.includes(":")&&(u=zr(u)),o.parts.push(o.sheetHref?yt(u,o.sheetHref):u),o.index+=1}return(function(o){try{const a=o.rules||o.cssRules;if(!a)return!1;Vn(a);let u=o.href;!u&&o.ownerNode&&(u=o.ownerNode.baseURI);const h=Array.from(a);return t.push({kind:"sheet",sheet:o,rules:h,sheetHref:u,index:0,parts:[],importRule:null}),(function(d,p){const f=[{sheet:p,rules:d,index:0}];for(;f.length>0;){const m=f[f.length-1];if(m.index>=m.rules.length){f.pop();continue}const y=m.rules[m.index];if(m.index+=1,!Wr(y)||i.has(y))continue;let g=null;try{g=y.styleSheet}catch{i.set(y,null);continue}if(g&&!f.some(v=>v.sheet===g))try{const v=g.rules||g.cssRules;if(!v)continue;Vn(v);let w=g.href;!w&&g.ownerNode&&(w=g.ownerNode.baseURI);const _=Array.from(v);i.set(y,{sheet:g,rules:_,sheetHref:w}),f.push({sheet:g,rules:_,index:0})}catch{}}})(h,o),!0}catch{return!1}})(e)||(n=!0),{advance(o){if(n)return!0;const a=Ge();let u=o>0?o:1;try{for(;!n&&u>0;){const h=t[t.length-1];if(h.index>=h.rules.length){let d=null;try{if(h.kind==="group"){const p=h.prelude+h.parts.join("")+"}";d=h.fixColons?zr(p):p}else d=Gi(h.parts.join(""))}catch{}s(d);continue}u-=1;try{l(h)}catch{s(null)}}}catch{n=!0,r=null}finally{$r(Ge()-a)}return n},text:()=>n?r:null,remainingRules(){if(n)return 0;let o=0;for(const a of t)o+=a.rules.length-a.index;return o}}}var Ji=class{constructor(){I(this,"idNodeMap",new Map),I(this,"nodeMetaMap",new WeakMap)}getId(e){var t,n;return e&&(t=(n=this.getMeta(e))===null||n===void 0?void 0:n.id)!==null&&t!==void 0?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);if(this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n)),Br(e)){const n=N.shadowRoot(e);n&&this.removeNodeFromMap(n),e.nodeName==="IFRAME"&&e.contentDocument&&this.removeNodeFromMap(e.contentDocument)}}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){this.idNodeMap.set(t.id,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Zn({element:e,maskInputOptions:t,tagName:n,type:r,value:i,maskInputFn:s}){let c=i||"";const l=r&&nt(r);return(t[n.toLowerCase()]||l&&t[l])&&(c=s?s(c,e):"*".repeat(c.length)),c}function nt(e){return e.toLowerCase()}var Ea=new Set(["rr_width","rr_height","rr_left","rr_top","rr_position","rr_transform","rr_display","rr_scrollleft","rr_scrolltop","rr_mediastate","rr_open_mode"]);function Xn({element:e,name:t,value:n,maskAllElementAttributes:r,maskAttributeFn:i,isGenerated:s=!1}){return n&&(r?s&&Ea.has(nt(t))?n:"*".repeat(n.length):i?i(t,n,e):n)}var Ki="__rrweb_original__";function Jn(e){try{const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?nt(t):null}catch{return null}}var Ta=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,xa=/^(?:[a-z+]+:)?\/\//i,Aa=/^www\..*/i,La=/^(data:)([^,]*),(.*)/i;function yt(e,t){return(e||"").replace(Ta,(n,r,i,s,c,l)=>{const o=i||c||l,a=r||s||"";if(!o)return n;if(xa.test(o)||Aa.test(o))return`url(${a}${o}${a})`;if(La.test(o))return`url(${a}${o}${a})`;if(o[0]==="/")return`url(${a}${(function(d){let p="";return p=d.indexOf("//")>-1?d.split("/").slice(0,3).join("/"):d.split("/")[0],p=p.split("?")[0],p})(t)+o}${a})`;const u=t.split("/"),h=o.split("/");u.pop();for(const d of h)d!=="."&&(d===".."?u.pop():u.push(d));return`url(${a}${u.join("/")}${a})`})}var Tt,Qi,cn=new Map,Oa=1,Na=new RegExp("[^a-z0-9-_:]");function es(){return Oa++}var ts=!1,Da=/^[^ \t\n\r\u000c]+/,Fa=/^[, \t\n\r\u000c]+/,ns=new WeakMap;function xt(e,t){return t&&t.trim()!==""?qr(e,t):t}function qr(e,t){let n=ns.get(e);if(n||(n=e.createElement("a"),ns.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function jr(e,t){return t?.maxBase64ImageLength?(function(n,r){return r&&n.length>r?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==":n})(e,t.maxBase64ImageLength):e}function rs(e,t,n,r,i,s){if(!r)return r;if(n==="src"||n==="href"&&(t!=="use"||r[0]!=="#")){if(t==="link"&&i){var c;const o=(c=i.sheet)===null||c===void 0?void 0:c.href;if(o)return o}const l=xt(e,r);if(l.startsWith("data:")){if(t==="img"&&i){let o=l;return(s!=null&&s.type||s?.quality!==void 0)&&(o=(function(a,u,h,d){if(1e5>u.length||!a.complete||a.naturalWidth===0||a.naturalWidth>4096||a.naturalHeight>4096)return u;const p=cn.get(u);if(p&&p.type===h&&p.quality===d)return p.result;try{const f=document.createElement("canvas");f.width=a.naturalWidth,f.height=a.naturalHeight;const m=f.getContext("2d");if(!m)return u;m.drawImage(a,0,0);const y=f.toDataURL(h||"image/webp",d??.4),g=u.length>y.length?y:u;if(cn.size>=10){const v=cn.keys().next().value;v!==void 0&&cn.delete(v)}return cn.set(u,{type:h,quality:d,result:g}),g}catch{return u}})(i,l,s.type,s.quality)),jr(o,s)}if(t==="image")return jr(l,s)}return l}if(n==="xlink:href"&&r[0]!=="#"){const l=xt(e,r);return t==="image"&&l.startsWith("data:")?jr(l,s):l}return n!=="background"||t!=="table"&&t!=="td"&&t!=="th"?n==="srcset"?(function(l,o){if(o.trim()==="")return o;let a=0;function u(d){let p;const f=d.exec(o.substring(a));return f?(p=f[0],a+=p.length,p):""}const h=[];for(;u(Fa),o.length>a;){let d=u(Da);if(d.slice(-1)===",")d=xt(l,d.substring(0,d.length-1)),h.push(d);else{let p="";d=xt(l,d);let f=!1;for(;;){const m=o.charAt(a);if(m===""){h.push((d+p).trim());break}if(f)m===")"&&(f=!1);else{if(m===","){a+=1,h.push((d+p).trim());break}m==="("&&(f=!0)}p+=m,a+=1}}}return h.join(", ")})(e,r):n==="style"?yt(r,qr(e)):t==="object"&&n==="data"?xt(e,r):r:xt(e,r)}function is(e,t,n){return(e==="video"||e==="audio")&&nt(t)==="autoplay"}function ss(e){return typeof e=="string"&&nt(e).split(/\s+/).includes("stylesheet")}function Kn(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&Kn(N.parentNode(e),t,n);for(let r=e.classList.length;r--;)if(t.test(e.classList[r]))return!0;return!!n&&Kn(N.parentNode(e),t,n)}function os(e,t,n,r){let i;if(Br(e)){if(i=e,!N.childNodes(i).length)return!1}else{if(N.parentElement(e)===null)return!1;i=N.parentElement(e)}try{if(typeof t=="string"){if(r){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(Kn(i,t,r))return!0;if(n){if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}}catch{}return!1}function At(e,t,n){const r=e.removeEventListener;typeof r=="function"&&r.call(e,t,n)}var un=new Map;function as(e,t){return Array.from(e.styleSheets).find(n=>n.href===t)}function Ye(e){return e==null?"":e.toLowerCase()}var Ur=!1,Vr=!1;function Lt(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:s,maskTextClass:c,maskTextSelector:l,skipChild:o=!1,inlineStylesheet:a=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:d,maskAllElementAttributes:p=!1,maskAttributeFn:f,slimDOMOptions:m,dataURLOptions:y={},inlineImages:g=!1,recordCanvas:v=!1,canvasMaskingConfigured:w,onSerialize:_,onIframeLoad:S,iframeLoadTimeout:b=5e3,onIframeListenerRegistered:k,onStylesheetLoad:C,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:E=()=>!1,newlyAddedElement:R=!1,depth:A=0,maxDepth:$=50}=t;let{needsMask:W}=t,{preserveWhiteSpace:ue=!0}=t;if(A>=$)return Vr=!0,Ur||(Ur=!0,console.warn(`[rrweb-snapshot] DOM tree depth exceeded max depth of ${$}. Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.`)),null;W||(W=os(e,c,l,W===void 0)),tt>0&&($e.nodeCount+=1);const ie=(function(T,D){const{doc:ee,mirror:V,blockClass:ae,blockSelector:ge,needsMask:_e,inlineStylesheet:Ae,maskInputOptions:de={},maskTextFn:ke,maskInputFn:fe,maskAllElementAttributes:Be=!1,maskAttributeFn:Ne,dataURLOptions:Je={},inlineImages:Yt,recordCanvas:Zt,canvasMaskingConfigured:Ie,keepIframeSrcFn:ye,newlyAddedElement:mt=!1}=D,qe=(function(O,L){if(!L.hasNode(O))return;const re=L.getId(O);return re===1?void 0:re})(ee,V);switch(T.nodeType){case T.DOCUMENT_NODE:return T.compatMode!=="CSS1Compat"?{type:Re.Document,childNodes:[],compatMode:T.compatMode}:{type:Re.Document,childNodes:[]};case T.DOCUMENT_TYPE_NODE:return{type:Re.DocumentType,name:T.name,publicId:T.publicId,systemId:T.systemId,rootId:qe};case T.ELEMENT_NODE:return(function(O,L){const{doc:re,blockClass:he,blockSelector:P,inlineStylesheet:Z,maskInputOptions:je={},maskInputFn:H,maskAllElementAttributes:G=!1,maskAttributeFn:F,dataURLOptions:X={},inlineImages:ne,recordCanvas:et,canvasMaskingConfigured:Ke,keepIframeSrcFn:Xt,newlyAddedElement:Ct=!1,rootId:Jt}=L,Ce=(function(x,Q,Me){try{if(typeof Q=="string"){if(x.classList.contains(Q))return!0}else for(let Le=x.classList.length;Le--;)if(Q.test(x.classList[Le]))return!0;if(Me)return x.matches(Me)}catch{}return!1})(O,he,P),se=(function(x){if(x instanceof HTMLFormElement)return"form";const Q=nt(x.tagName);return Na.test(Q)?"div":Q})(O),be=new Set;let q={};const Di=O.attributes.length;for(let x=0;Di>x;x++){const Q=O.attributes[x];is(se,Q.name)||(q[Q.name]=rs(re,se,nt(Q.name),Q.value,O,X))}if(se==="link"&&Z&&!Ce&&ss(q.rel)){let x=O.sheet;if(!x){const Me=(function(Le){return Le.href})(O);Me&&(x=as(re,Me),!x&&Me.includes(".css"))&&(x=as(re,window.location.origin+"/"+Me.replace(window.location.href,"")))}let Q=null;x&&(Ui(x)?tt>0&&(nn.push(O),rn+=1):Q=ln(x)),Q&&(delete q.rel,delete q.href,q._cssText=Q)}var Kt;if(se==="style"&&O.sheet&&!(O.innerText||N.textContent(O)||"").trim().length){const x=ji(()=>ln(O.sheet));x&&(q._cssText=x)}if(se==="input"||se==="textarea"||se==="select"){const x=O.value,Q=O.checked;q.type!=="radio"&&q.type!=="checkbox"&&q.type!=="submit"&&q.type!=="button"&&x?q.value=Zn({element:O,type:Jn(O),tagName:se,value:x,maskInputOptions:je,maskInputFn:H}):Q&&(q.checked=Q)}if(se==="option"&&(O.selected&&!je.select?q.selected=!0:delete q.selected),se==="dialog"&&O.open){try{q.rr_open_mode=O.matches("dialog:modal")?"modal":"non-modal"}catch{q.rr_open_mode="modal",q.ph_rr_could_not_detect_modal=!0}be.add("rr_open_mode")}if(se==="canvas"&&et&&!Ke?.())try{if(O.__context==="2d")(function(x){const Q=x.getContext("2d");if(!Q)return!0;for(let Me=0;x.width>Me;Me+=50)for(let Le=0;x.height>Le;Le+=50){const Se=Q.getImageData,Mt=Ki in Se?Se[Ki]:Se;let Fn;try{Fn=Mt.call(Q,Me,Le,Math.min(50,x.width-Me),Math.min(50,x.height-Le))}catch{return!1}if(new Uint32Array(Fn.data.buffer).some(wa=>wa!==0))return!1}return!0})(O)||(q.rr_dataURL=O.toDataURL(X.type,X.quality));else if(!("__context"in O)){const x=O.toDataURL(X.type,X.quality),Q=re.createElement("canvas");Q.width=O.width,Q.height=O.height,x!==Q.toDataURL(X.type,X.quality)&&(q.rr_dataURL=x)}}catch(x){((Kt=x)==null?void 0:Kt.name)==="SecurityError"?ts||(ts=!0,console.warn("Cannot read canvas pixels, so this canvas is left out of the recording. A cross-origin image or video drawn into it taints it.",Kt)):console.warn("Cannot read canvas pixels, so this canvas is left out of the recording.",Kt)}let xr,Ar=!1;if(se==="img"&&ne){Tt||(Tt=re.createElement("canvas"),Qi=Tt.getContext("2d"));const x=O,Q=x.currentSrc||x.getAttribute("src")||"<unknown-src>",Me=x.crossOrigin,Le=(Mt,Fn)=>Ar?Xn({element:O,name:Mt,value:Fn,maskAllElementAttributes:G,maskAttributeFn:F}):Fn,Se=()=>{At(x,"load",Se);try{Tt.width=x.naturalWidth,Tt.height=x.naturalHeight,Qi.drawImage(x,0,0);const Mt=Tt.toDataURL(X.type,X.quality);q.rr_dataURL=Le("rr_dataURL",Mt)}catch(Mt){if(x.crossOrigin!=="anonymous")return x.crossOrigin="anonymous",void(x.complete&&x.naturalWidth!==0?Se():x.addEventListener("load",Se));console.warn(`Cannot inline img src=${Q}! Error: ${Mt}`)}x.crossOrigin==="anonymous"&&(Me?q.crossOrigin=Le("crossOrigin",Me):x.removeAttribute("crossorigin"))};x.complete&&x.naturalWidth!==0?Se():x.addEventListener("load",Se)}if(se==="audio"||se==="video"){const x=q;x.rr_mediaState=O.paused?"paused":"played",be.add("rr_mediaState"),x.rr_mediaCurrentTime=O.currentTime,x.rr_mediaPlaybackRate=O.playbackRate,x.rr_mediaMuted=O.muted,x.rr_mediaLoop=O.loop,x.rr_mediaVolume=O.volume}if(Ct||(O.scrollLeft&&(q.rr_scrollLeft=O.scrollLeft),O.scrollTop&&(q.rr_scrollTop=O.scrollTop)),Ce){var Ln,On,Nn;const{width:x,height:Q,left:Me,top:Le}=O.getBoundingClientRect(),Se=(Ln=re.defaultView)===null||Ln===void 0?void 0:Ln.getComputedStyle(O);q={class:q.class,rr_width:`${x}px`,rr_height:`${Q}px`,rr_left:`${Math.floor(Me+(((On=re.defaultView)===null||On===void 0?void 0:On.scrollX)||0))}px`,rr_top:`${Math.floor(Le+(((Nn=re.defaultView)===null||Nn===void 0?void 0:Nn.scrollY)||0))}px`},be.add("rr_width"),be.add("rr_height"),be.add("rr_left"),be.add("rr_top"),Se&&(q.rr_position=Se.position||"static",be.add("rr_position"),Se.transform&&Se.transform!=="none"&&(q.rr_transform=Se.transform,be.add("rr_transform")),Se.display&&Se.display.startsWith("inline")&&(q.rr_display=Se.display,be.add("rr_display")))}if(se!=="iframe"||Xt(q.src)||(O.contentDocument||(q.rr_src=q.src),delete q.src),G||F)for(const[x,Q]of Object.entries(q))typeof Q!="string"&&Q!==null||(q[x]=Xn({element:O,name:x,value:Q,maskAllElementAttributes:G,maskAttributeFn:F,isGenerated:be.has(x)}));Ar=!0;try{customElements.get(se)&&(xr=!0)}catch{}return{type:Re.Element,tagName:se,attributes:q,childNodes:[],isSVG:(Dn=O,!!(Dn.tagName==="svg"||Dn.ownerSVGElement)||void 0),needBlock:Ce,rootId:Jt,isCustom:xr};var Dn})(T,{doc:ee,blockClass:ae,blockSelector:ge,inlineStylesheet:Ae,maskInputOptions:de,maskInputFn:fe,maskAllElementAttributes:Be,maskAttributeFn:Ne,dataURLOptions:Je,inlineImages:Yt,recordCanvas:Zt,canvasMaskingConfigured:Ie,keepIframeSrcFn:ye,newlyAddedElement:mt,rootId:qe});case T.TEXT_NODE:return(function(O,L){const{needsMask:re,maskTextFn:he,rootId:P}=L,Z=N.parentNode(O),je=Z&&Z.tagName;let H=N.textContent(O);const G=je==="STYLE"||void 0,F=je==="SCRIPT"||void 0;if(G&&H){try{var X;if(!(O.nextSibling||O.previousSibling)){if(!Ui(Z.sheet)){if(!((X=Z.sheet)===null||X===void 0)&&X.cssRules){const ne=ln(Z.sheet);ne&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(ne)&&(H=ne)}}}}catch(ne){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${ne}`,O)}H=yt(H,qr(L.doc))}return F&&(H="SCRIPT_PLACEHOLDER"),!G&&!F&&H&&re&&(H=he?he(H,N.parentElement(O)):H.replace(/[\S]/g,"*")),{type:Re.Text,textContent:H||"",isStyle:G,rootId:P}})(T,{doc:ee,needsMask:_e,maskTextFn:ke,rootId:qe});case T.CDATA_SECTION_NODE:return{type:Re.CDATA,textContent:"",rootId:qe};case T.COMMENT_NODE:return{type:Re.Comment,textContent:N.textContent(T)||"",rootId:qe};default:return!1}})(e,{doc:n,mirror:r,blockClass:i,blockSelector:s,needsMask:W,inlineStylesheet:a,maskInputOptions:u,maskTextFn:h,maskInputFn:d,maskAllElementAttributes:p,maskAttributeFn:f,dataURLOptions:y,inlineImages:g,recordCanvas:v,canvasMaskingConfigured:w,keepIframeSrcFn:E,newlyAddedElement:R});if(!ie)return console.warn(e,"not serialized"),null;let oe;oe=r.hasNode(e)?r.getId(e):(function(T,D){return!!(D.comment&&T.type===Re.Comment||T.type===Re.Element&&(D.script&&(T.tagName==="script"||T.tagName==="link"&&(T.attributes.rel==="preload"&&T.attributes.as==="script"||T.attributes.rel==="modulepreload")||T.tagName==="link"&&T.attributes.rel==="prefetch"&&typeof T.attributes.href=="string"&&(function(ee){var V;let ae;try{ae=new URL(ee,window.location.href)}catch{return null}const ge=ae.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(V=ge?.[1])!==null&&V!==void 0?V:null})(T.attributes.href)==="js")||D.headFavicon&&(T.tagName==="link"&&T.attributes.rel==="shortcut icon"||T.tagName==="meta"&&(Ye(T.attributes.name).match(/^msapplication-tile(image|color)$/)||Ye(T.attributes.name)==="application-name"||["icon","apple-touch-icon","shortcut icon"].includes(Ye(T.attributes.rel))))||T.tagName==="meta"&&(D.headMetaDescKeywords&&Ye(T.attributes.name).match(/^description|keywords$/)||D.headMetaSocial&&(Ye(T.attributes.property).match(/^(og|twitter|fb):/)||Ye(T.attributes.name).match(/^(og|twitter):/)||Ye(T.attributes.name)==="pinterest")||D.headMetaRobots&&["robots","googlebot","bingbot"].includes(Ye(T.attributes.name))||D.headMetaHttpEquiv&&T.attributes["http-equiv"]!==void 0||D.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(Ye(T.attributes.name))||Ye(T.attributes.property).match(/^article:/)||Ye(T.attributes.property).match(/^product:/))||D.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(Ye(T.attributes.name)))))})(ie,m)||!ue&&ie.type===Re.Text&&!ie.isStyle&&!ie.textContent.replace(/^\s+|\s+$/gm,"").length?-2:es();const z=Object.assign(ie,{id:oe});if(r.add(e,z),oe===-2)return null;_&&_(e);let ce=!o;if(z.type===Re.Element){ce=ce&&!z.needBlock,delete z.needBlock;const T=N.shadowRoot(e);T&&an(T)&&(z.isShadowHost=!0)}if((z.type===Re.Document||z.type===Re.Element)&&ce){m.headWhitespace&&z.type===Re.Element&&z.tagName==="head"&&(ue=!1);const T={doc:n,mirror:r,blockClass:i,blockSelector:s,needsMask:W,maskTextClass:c,maskTextSelector:l,skipChild:o,inlineStylesheet:a,maskInputOptions:u,maskTextFn:h,maskInputFn:d,maskAllElementAttributes:p,maskAttributeFn:f,slimDOMOptions:m,dataURLOptions:y,inlineImages:g,recordCanvas:v,canvasMaskingConfigured:w,preserveWhiteSpace:ue,onSerialize:_,onIframeLoad:S,iframeLoadTimeout:b,onIframeListenerRegistered:k,onStylesheetLoad:C,stylesheetLoadTimeout:M,keepIframeSrcFn:E,depth:A+1,maxDepth:$};if(!(z.type===Re.Element&&z.tagName==="textarea"&&z.attributes.value!==void 0))for(const ee of Array.from(N.childNodes(e))){const V=Lt(ee,T);V&&z.childNodes.push(V)}let D=null;if(Br(e)&&(D=N.shadowRoot(e)))for(const ee of Array.from(N.childNodes(D))){const V=Lt(ee,T);V&&(an(D)&&(V.isShadow=!0),z.childNodes.push(V))}}const Oe=N.parentNode(e);if(Oe&&on(Oe)&&an(Oe)&&(z.isShadow=!0),z.type===Re.Element&&z.tagName==="iframe"){const T=(function(D,ee,V){const ae=()=>{},ge=D.contentWindow;if(!ge)return ae;let _e;try{_e=ge.document.readyState}catch{return ae}const Ae=()=>ee();if(_e!=="complete"){let fe=!1,Be=null;const Ne=()=>{fe||(fe=!0,Be!==null&&(clearTimeout(Be),Be=null),At(D,"load",Je),D.addEventListener("load",Ae),ee())},Je=()=>Ne();return Be=setTimeout(Ne,V),D.addEventListener("load",Je),()=>{Be!==null&&(clearTimeout(Be),Be=null),fe?At(D,"load",Ae):(fe=!0,At(D,"load",Je))}}const de="about:blank";let ke;try{ke=ge.location.href}catch{return ae}if(ke!==de||D.src===de||D.src===""){const fe=setTimeout(ee,0);return D.addEventListener("load",Ae),()=>{clearTimeout(fe),At(D,"load",Ae)}}return D.addEventListener("load",Ae),()=>{At(D,"load",Ae)}})(e,()=>{const D=e.contentDocument;if(D&&S){const ee=Lt(D,{doc:D,mirror:r,blockClass:i,blockSelector:s,needsMask:W,maskTextClass:c,maskTextSelector:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:u,maskTextFn:h,maskInputFn:d,maskAllElementAttributes:p,maskAttributeFn:f,slimDOMOptions:m,dataURLOptions:y,inlineImages:g,recordCanvas:v,canvasMaskingConfigured:w,preserveWhiteSpace:ue,onSerialize:_,onIframeLoad:S,iframeLoadTimeout:b,onIframeListenerRegistered:k,onStylesheetLoad:C,stylesheetLoadTimeout:M,keepIframeSrcFn:E,depth:A+1,maxDepth:$});ee&&S(e,ee)}},b);k?.(e,T)}return z.type===Re.Element&&z.tagName==="link"&&ss(z.attributes.rel)&&(function(T,D,ee){if(un.has(T))return;let V;try{V=T.sheet}catch{return}if(V)return;const ae=new AbortController;let ge=!1;const _e=()=>{if(!ge){ge=!0;try{(()=>{if(C){const de=Lt(e,{doc:n,mirror:r,blockClass:i,blockSelector:s,needsMask:W,maskTextClass:c,maskTextSelector:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:u,maskTextFn:h,maskInputFn:d,maskAllElementAttributes:p,maskAttributeFn:f,slimDOMOptions:m,dataURLOptions:y,inlineImages:g,recordCanvas:v,canvasMaskingConfigured:w,preserveWhiteSpace:ue,onSerialize:_,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:M,keepIframeSrcFn:E,depth:A,maxDepth:$});de&&C(e,de)}})()}finally{un.delete(T),ae.abort()}}},Ae=setTimeout(_e,ee);ae.signal.addEventListener("abort",()=>clearTimeout(Ae),{once:!0}),T.addEventListener("load",_e,{signal:ae.signal,once:!0}),un.set(T,ae)})(e,0,M),z}function ls(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e===!1?{}:e}var Pa=class _a{constructor(...t){I(this,"parentElement",null),I(this,"parentNode",null),I(this,"ownerDocument",void 0),I(this,"firstChild",null),I(this,"lastChild",null),I(this,"previousSibling",null),I(this,"nextSibling",null),I(this,"ELEMENT_NODE",1),I(this,"TEXT_NODE",3),I(this,"nodeType",void 0),I(this,"nodeName",void 0),I(this,"RRNodeType",void 0)}get childNodes(){const t=[];let n=this.firstChild;for(;n;)t.push(n),n=n.nextSibling;return t}contains(t){if(!(t instanceof _a)||t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};function me(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>Ot(n,e,t,r)}function Ot(e,t,n,r){it(()=>{const i=e.removeEventListener;typeof i=="function"&&(r!==void 0?i.call(e,t,n,r):i.call(e,t,n))})}function it(e){try{e()}catch(t){if(!(t instanceof DOMException&&t.name==="SecurityError"))throw t}}function Gr(e){e.forEach(t=>{if(typeof t=="function")try{t()}catch{}})}var Nt=`Please stop import mirror directly. Instead of that,\r
1
+ (function(){try{var Ue=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};Ue.SENTRY_RELEASE={id:"3.12.4"};var Pn=new Ue.Error().stack;Pn&&(Ue._sentryDebugIds=Ue._sentryDebugIds||{},Ue._sentryDebugIds[Pn]="29730856-25d9-4f30-b900-e128b0e1fd3e",Ue._sentryDebugIdIdentifier="sentry-dbid-29730856-25d9-4f30-b900-e128b0e1fd3e")}catch{}})();(function(){function Ue(e){return Ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ue(e)}function Pn(e,t,n){return(t=(function(r){var i=(function(s){if(Ue(s)!="object"||!s)return s;var c=s[Symbol.toPrimitive];if(c!==void 0){var l=c.call(s,"string");if(Ue(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(s)})(r);return Ue(i)=="symbol"?i:i+""})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function B(e){for(var t=1;arguments.length>t;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lr(Object(n),!0).forEach(function(r){Pn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lr(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fi(e,t,n,r,i,s,c){try{var l=e[s](c),o=l.value}catch(a){n(a);return}l.done?t(o):Promise.resolve(o).then(r,i)}function Ve(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function c(o){Fi(s,r,i,c,l,"next",o)}function l(o){Fi(s,r,i,c,l,"throw",o)}c(void 0)})}}const ka=["type"];var te=(function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e})({}),j=(function(e){return 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})({}),He=(function(e){return 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})({}),gt=(function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e})({}),Qt=(function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e})({}),en=(function(e){return 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})({}),Re=(function(e){return 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})({});function Pi(e,t){return e.indexOf(t)!==-1}"Mobile".toLowerCase(),"Tablet".toLowerCase(),"0".repeat(32),"0".repeat(16);var $i={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},Bi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},$n={};function Bn(e){if($n[e])return $n[e];const t=(function(u){var h,d;const p=(h=globalThis)===null||h===void 0||(h=h.Zone)===null||h===void 0||(d=h.__symbol__)===null||d===void 0?void 0:d.call(h,u);return p&&globalThis[p]?globalThis[p]:void 0})(e)||globalThis[e],n=t.prototype,r=e in $i?$i[e]:void 0,i=!!(r&&r.every(u=>{var h;return!!(!((h=Object.getOwnPropertyDescriptor(n,u))===null||h===void 0||(h=h.get)===null||h===void 0)&&h.toString().includes("[native code]"))})),s=e in Bi?Bi[e]:void 0,c=!!(s&&s.every(u=>{var h;return typeof n[u]=="function"&&((h=n[u])===null||h===void 0?void 0:h.toString().includes("[native code]"))}));if(i&&c)return $n[e]=t.prototype,t.prototype;const l=document.createElement("iframe");l.style.display="none";let o=!1;try{document.body.appendChild(l);const u=l.contentWindow;if(!u)return t.prototype;const h=u[e].prototype;return h?(Pi(a=navigator.userAgent,"AppleWebKit")&&!Pi(a,"Chrome")&&(l.classList.add("rr-block","ph-no-capture"),l.setAttribute("__rrwebUntaintedPrototype",e),o=!0),$n[e]=h):n}catch{return n}finally{!o&&l.parentNode&&document.body.removeChild(l)}var a}var tn=Object.create(null);function Rt(e,t,n){var r;const i=tn[e],s=i[n];if(s)return s.call(t);const c=Bn(e),l=(r=Object.getOwnPropertyDescriptor(c,n))===null||r===void 0?void 0:r.get;return l?(i[n]=l,l.call(t)):t[n]}tn.Node=Object.create(null),tn.ShadowRoot=Object.create(null),tn.MutationObserver=Object.create(null),tn.Element=Object.create(null);var Hn,Or={};function zn(e,t,n){const r=`${e}.${String(n)}`;if(Or[r])return Or[r].bind(t);const i=Bn(e)[n];return typeof i!="function"?t[n]:(Or[r]=i,i.bind(t))}function Hi(){return Bn("MutationObserver").constructor}function ct(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i={next:r},s=n(function(...c){return i.next.apply(this,c)});return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r},__rrweb_layer__:{enumerable:!1,value:i}})),e[t]=s,()=>{if(e[t]===s)return void(e[t]=i.next);const c=a=>{var u;return typeof a=="function"?(u=a.__rrweb_layer__)!==null&&u!==void 0?u:a.__posthog_layer__:void 0};let l=e[t],o=c(l);for(;o;){if(o.next===s)return void(o.next=i.next);l=o.next,o=c(l)}}}catch{return()=>{}}}var N={childNodes:e=>Rt("Node",e,"childNodes"),parentNode:e=>Rt("Node",e,"parentNode"),parentElement:e=>Rt("Node",e,"parentElement"),textContent:e=>Rt("Node",e,"textContent"),isConnected(e){if(Hn===void 0){var t;const n=(t=Object.getOwnPropertyDescriptor(Bn("Node"),"isConnected"))===null||t===void 0?void 0:t.get;Hn=n?.toString().includes("[native code]")?n:null}return Hn?.call(e)},contains:(e,t)=>zn("Node",e,"contains")(t),getRootNode:e=>zn("Node",e,"getRootNode")(),host:e=>e&&"host"in e?Rt("ShadowRoot",e,"host"):null,styleSheets:e=>e.styleSheets,shadowRoot:e=>e&&"shadowRoot"in e?Rt("Element",e,"shadowRoot"):null,querySelector:(e,t)=>zn("Element",e,"querySelector")(t),querySelectorAll:(e,t)=>zn("Element",e,"querySelectorAll")(t),mutationObserver:Hi,patch:ct};function Ge(){try{if(typeof performance<"u"&&performance.now)return performance.now()}catch{}return Date.now()}var vt=0,Nr=0;function Ia(){vt+=1}function zi(){return vt}function Dr(e,t){return(t!==vt||e>6e4)&&(Nr+=1,!0)}var tt=0,Fr=0,Pr=0,$e={durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0},Wn=null,Et=null,nn=[],rn=0,qn=0,jn={slowestBatchMs:0},ut={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0};function Wi(e){var t;(tt+=1)>1||($e={durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0},nn=[],rn=0,Et=(t=e)&&t>0?t:null,Fr=Ge(),Pr=vt)}function qi(){return tt===0?Wn||{durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0}:(tt-=1)>0?$e:($e.durationMs=Ge()-Fr,$e.deferredStylesheetCount=rn,ut.deferredCount+=rn,Et=null,Dr($e.durationMs,Pr)?$e:Wn=$e)}function Un(e,t,n){let r=e.length;if(n>=32)return r;for(let i=0;e.length>i;i++){const s=e[i];try{const c=s.cssRules;if(c&&c.length)r+=Un(c,t,n+1);else if(t&&s.styleSheet){const l=s.styleSheet;if(!t.has(l)){t.add(l);const o=l.rules||l.cssRules;o&&(r+=Un(o,t,n+1))}}}catch{}}return r}function Vn(e){if(tt===0)return;const t=Un(e,null,0);$e.cssRuleCount+=t,qn>0&&($e.nonDeferrableCssRuleCount+=t)}function ji(e){qn+=1;try{return e()}finally{qn-=1}}function $r(e){tt>0&&($e.stylesheetMs+=e)}function Ui(e){if(tt===0||Et===null)return!1;const t=$e.cssRuleCount-$e.nonDeferrableCssRuleCount;return t>=Et||t+(function(n){try{const r=n&&(n.rules||n.cssRules);if(!r)return 0;const i=new WeakSet;return i.add(n),Un(r,i,0)}catch{return 0}})(e)>Et}function Ca(){const e=nn;return nn=[],e}function Gn(){ut.failedCount+=1}function Vi(e){e>0&&(ut.abandonedCount+=e)}function sn(e){return sn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sn(e)}function I(e,t,n){return(t=(function(r){var i=(function(s){if(sn(s)!="object"||!s)return s;var c=s[Symbol.toPrimitive];if(c!==void 0){var l=c.call(s,"string");if(sn(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(s)})(r);return sn(i)=="symbol"?i:i+""})(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Br(e){return e.nodeType===e.ELEMENT_NODE}function on(e){const t=e&&"host"in e&&"mode"in e&&N.host(e)||null;return!!(t&&"shadowRoot"in t&&N.shadowRoot(t)===e)}function an(e){return{}.toString.call(e)==="[object ShadowRoot]"}function Gi(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function Yi(e){const{cssText:t}=e;if(3>t.split('"').length)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(" ")+";"}var Hr=0;function ln(e){const t=Hr===0,n=t?Ge():0;Hr+=1;try{const r=e.rules||e.cssRules;if(!r)return null;Vn(r);let i=e.href;return!i&&e.ownerNode&&(i=e.ownerNode.baseURI),Gi(Array.from(r,s=>Zi(s,i)).join(""))}catch{return null}finally{Hr-=1,t&&$r(Ge()-n)}}function Zi(e,t){if(Wr(e)){let r;try{r=ln(e.styleSheet)||Yi(e)}catch{r=e.cssText}try{var n;if(r&&(!((n=e.styleSheet)===null||n===void 0)&&n.href))return yt(r,e.styleSheet.href)}catch{}return r}{let r=e.cssText;return Yn(e)&&e.selectorText.includes(":")&&(r=zr(r)),t?yt(r,t):r}}function zr(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function Wr(e){return"styleSheet"in e}function Yn(e){return"selectorText"in e}var Xi=/^-?[A-Za-z_][\w-]*$/,Ma=/^-?[A-Za-z_][\w-]*(\.-?[A-Za-z_][\w-]*)*$/;function Ra(e){const t=[];let n=!1,r=null;const i=new Map;function s(o){const a=t.pop();if(a.kind==="group"){if(o===null){for(;t.length>0&&t[t.length-1].kind==="group";)t.pop();s(null);return}const u=t[t.length-1];u.parts.push(o),u.index+=1;return}if(!a.importRule)return n=!0,void(r=o);c(t[t.length-1],a.importRule,o)}function c(o,a,u){try{let d;try{d=u||Yi(a)}catch{d=a.cssText}try{var h;d&&(h=a.styleSheet)!==null&&h!==void 0&&h.href&&(d=yt(d,a.styleSheet.href))}catch{}d&&o.parts.push(d),o.index+=1}catch{s(null)}}function l(o){const a=o.rules[o.index];if(o.kind==="sheet"&&Wr(a)){const h=i.get(a);h===null?(o.parts.push(a.cssText),o.index+=1):h?t.push({kind:"sheet",sheet:h.sheet,rules:h.rules,sheetHref:h.sheetHref,index:0,parts:[],importRule:a}):c(o,a,null);return}if((function(h,d){try{const p=(function(m){const y=m;if(!y.cssRules||y.cssRules.length===0)return null;if(y.media&&typeof y.media.mediaText=="string")return`@media ${y.media.mediaText} {`;if(Yn(m)){if(typeof y.type=="number"&&y.type!==1)return null;const v=y.style?y.style.cssText:"";return`${m.selectorText} {${v?" "+v:""}`}if("containerName"in y)return typeof y.containerQuery!="string"||y.containerName&&!Xi.test(y.containerName)?null:`@container ${y.containerName?`${y.containerName} `:""}${y.containerQuery} {`;if(typeof y.conditionText=="string"){let v="";try{var g;v=((g=m.constructor)===null||g===void 0?void 0:g.name)||""}catch{return null}return v===""||v==="Object"||v==="CSSSupportsRule"?`@supports ${y.conditionText} {`:null}return typeof y.name=="string"?"keyText"in y.cssRules[0]?Xi.test(y.name)?`@keyframes ${y.name} {`:null:y.name===""?"@layer {":Ma.test(y.name)?`@layer ${y.name} {`:null:null})(h);if(p===null)return!1;const f=d.sheetHref;return t.push({kind:"group",rules:Array.from(h.cssRules),sheetHref:f,index:0,parts:[],prelude:f?yt(p,f):p,fixColons:d.kind==="sheet"&&Yn(h)&&h.selectorText.includes(":")}),!0}catch{return!1}})(a,o))return;let u=a.cssText;o.kind==="sheet"&&Yn(a)&&a.selectorText.includes(":")&&(u=zr(u)),o.parts.push(o.sheetHref?yt(u,o.sheetHref):u),o.index+=1}return(function(o){try{const a=o.rules||o.cssRules;if(!a)return!1;Vn(a);let u=o.href;!u&&o.ownerNode&&(u=o.ownerNode.baseURI);const h=Array.from(a);return t.push({kind:"sheet",sheet:o,rules:h,sheetHref:u,index:0,parts:[],importRule:null}),(function(d,p){const f=[{sheet:p,rules:d,index:0}];for(;f.length>0;){const m=f[f.length-1];if(m.index>=m.rules.length){f.pop();continue}const y=m.rules[m.index];if(m.index+=1,!Wr(y)||i.has(y))continue;let g=null;try{g=y.styleSheet}catch{i.set(y,null);continue}if(g&&!f.some(v=>v.sheet===g))try{const v=g.rules||g.cssRules;if(!v)continue;Vn(v);let w=g.href;!w&&g.ownerNode&&(w=g.ownerNode.baseURI);const _=Array.from(v);i.set(y,{sheet:g,rules:_,sheetHref:w}),f.push({sheet:g,rules:_,index:0})}catch{}}})(h,o),!0}catch{return!1}})(e)||(n=!0),{advance(o){if(n)return!0;const a=Ge();let u=o>0?o:1;try{for(;!n&&u>0;){const h=t[t.length-1];if(h.index>=h.rules.length){let d=null;try{if(h.kind==="group"){const p=h.prelude+h.parts.join("")+"}";d=h.fixColons?zr(p):p}else d=Gi(h.parts.join(""))}catch{}s(d);continue}u-=1;try{l(h)}catch{s(null)}}}catch{n=!0,r=null}finally{$r(Ge()-a)}return n},text:()=>n?r:null,remainingRules(){if(n)return 0;let o=0;for(const a of t)o+=a.rules.length-a.index;return o}}}var Ji=class{constructor(){I(this,"idNodeMap",new Map),I(this,"nodeMetaMap",new WeakMap)}getId(e){var t,n;return e&&(t=(n=this.getMeta(e))===null||n===void 0?void 0:n.id)!==null&&t!==void 0?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);if(this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n)),Br(e)){const n=N.shadowRoot(e);n&&this.removeNodeFromMap(n),e.nodeName==="IFRAME"&&e.contentDocument&&this.removeNodeFromMap(e.contentDocument)}}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){this.idNodeMap.set(t.id,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Zn({element:e,maskInputOptions:t,tagName:n,type:r,value:i,maskInputFn:s}){let c=i||"";const l=r&&nt(r);return(t[n.toLowerCase()]||l&&t[l])&&(c=s?s(c,e):"*".repeat(c.length)),c}function nt(e){return e.toLowerCase()}var Ea=new Set(["rr_width","rr_height","rr_left","rr_top","rr_position","rr_transform","rr_display","rr_scrollleft","rr_scrolltop","rr_mediastate","rr_open_mode"]);function Xn({element:e,name:t,value:n,maskAllElementAttributes:r,maskAttributeFn:i,isGenerated:s=!1}){return n&&(r?s&&Ea.has(nt(t))?n:"*".repeat(n.length):i?i(t,n,e):n)}var Ki="__rrweb_original__";function Jn(e){try{const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?nt(t):null}catch{return null}}var Ta=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,xa=/^(?:[a-z+]+:)?\/\//i,Aa=/^www\..*/i,La=/^(data:)([^,]*),(.*)/i;function yt(e,t){return(e||"").replace(Ta,(n,r,i,s,c,l)=>{const o=i||c||l,a=r||s||"";if(!o)return n;if(xa.test(o)||Aa.test(o))return`url(${a}${o}${a})`;if(La.test(o))return`url(${a}${o}${a})`;if(o[0]==="/")return`url(${a}${(function(d){let p="";return p=d.indexOf("//")>-1?d.split("/").slice(0,3).join("/"):d.split("/")[0],p=p.split("?")[0],p})(t)+o}${a})`;const u=t.split("/"),h=o.split("/");u.pop();for(const d of h)d!=="."&&(d===".."?u.pop():u.push(d));return`url(${a}${u.join("/")}${a})`})}var Tt,Qi,cn=new Map,Oa=1,Na=new RegExp("[^a-z0-9-_:]");function es(){return Oa++}var ts=!1,Da=/^[^ \t\n\r\u000c]+/,Fa=/^[, \t\n\r\u000c]+/,ns=new WeakMap;function xt(e,t){return t&&t.trim()!==""?qr(e,t):t}function qr(e,t){let n=ns.get(e);if(n||(n=e.createElement("a"),ns.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function jr(e,t){return t?.maxBase64ImageLength?(function(n,r){return r&&n.length>r?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==":n})(e,t.maxBase64ImageLength):e}function rs(e,t,n,r,i,s){if(!r)return r;if(n==="src"||n==="href"&&(t!=="use"||r[0]!=="#")){if(t==="link"&&i){var c;const o=(c=i.sheet)===null||c===void 0?void 0:c.href;if(o)return o}const l=xt(e,r);if(l.startsWith("data:")){if(t==="img"&&i){let o=l;return(s!=null&&s.type||s?.quality!==void 0)&&(o=(function(a,u,h,d){if(1e5>u.length||!a.complete||a.naturalWidth===0||a.naturalWidth>4096||a.naturalHeight>4096)return u;const p=cn.get(u);if(p&&p.type===h&&p.quality===d)return p.result;try{const f=document.createElement("canvas");f.width=a.naturalWidth,f.height=a.naturalHeight;const m=f.getContext("2d");if(!m)return u;m.drawImage(a,0,0);const y=f.toDataURL(h||"image/webp",d??.4),g=u.length>y.length?y:u;if(cn.size>=10){const v=cn.keys().next().value;v!==void 0&&cn.delete(v)}return cn.set(u,{type:h,quality:d,result:g}),g}catch{return u}})(i,l,s.type,s.quality)),jr(o,s)}if(t==="image")return jr(l,s)}return l}if(n==="xlink:href"&&r[0]!=="#"){const l=xt(e,r);return t==="image"&&l.startsWith("data:")?jr(l,s):l}return n!=="background"||t!=="table"&&t!=="td"&&t!=="th"?n==="srcset"?(function(l,o){if(o.trim()==="")return o;let a=0;function u(d){let p;const f=d.exec(o.substring(a));return f?(p=f[0],a+=p.length,p):""}const h=[];for(;u(Fa),o.length>a;){let d=u(Da);if(d.slice(-1)===",")d=xt(l,d.substring(0,d.length-1)),h.push(d);else{let p="";d=xt(l,d);let f=!1;for(;;){const m=o.charAt(a);if(m===""){h.push((d+p).trim());break}if(f)m===")"&&(f=!1);else{if(m===","){a+=1,h.push((d+p).trim());break}m==="("&&(f=!0)}p+=m,a+=1}}}return h.join(", ")})(e,r):n==="style"?yt(r,qr(e)):t==="object"&&n==="data"?xt(e,r):r:xt(e,r)}function is(e,t,n){return(e==="video"||e==="audio")&&nt(t)==="autoplay"}function ss(e){return typeof e=="string"&&nt(e).split(/\s+/).includes("stylesheet")}function Kn(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&Kn(N.parentNode(e),t,n);for(let r=e.classList.length;r--;)if(t.test(e.classList[r]))return!0;return!!n&&Kn(N.parentNode(e),t,n)}function os(e,t,n,r){let i;if(Br(e)){if(i=e,!N.childNodes(i).length)return!1}else{if(N.parentElement(e)===null)return!1;i=N.parentElement(e)}try{if(typeof t=="string"){if(r){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(Kn(i,t,r))return!0;if(n){if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}}catch{}return!1}function At(e,t,n){const r=e.removeEventListener;typeof r=="function"&&r.call(e,t,n)}var un=new Map;function as(e,t){return Array.from(e.styleSheets).find(n=>n.href===t)}function Ye(e){return e==null?"":e.toLowerCase()}var Ur=!1,Vr=!1;function Lt(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:s,maskTextClass:c,maskTextSelector:l,skipChild:o=!1,inlineStylesheet:a=!0,maskInputOptions:u={},maskTextFn:h,maskInputFn:d,maskAllElementAttributes:p=!1,maskAttributeFn:f,slimDOMOptions:m,dataURLOptions:y={},inlineImages:g=!1,recordCanvas:v=!1,canvasMaskingConfigured:w,onSerialize:_,onIframeLoad:S,iframeLoadTimeout:b=5e3,onIframeListenerRegistered:k,onStylesheetLoad:C,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:E=()=>!1,newlyAddedElement:R=!1,depth:A=0,maxDepth:$=50}=t;let{needsMask:W}=t,{preserveWhiteSpace:ue=!0}=t;if(A>=$)return Vr=!0,Ur||(Ur=!0,console.warn(`[rrweb-snapshot] DOM tree depth exceeded max depth of ${$}. Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.`)),null;W||(W=os(e,c,l,W===void 0)),tt>0&&($e.nodeCount+=1);const ie=(function(T,D){const{doc:ee,mirror:V,blockClass:ae,blockSelector:ge,needsMask:_e,inlineStylesheet:Ae,maskInputOptions:de={},maskTextFn:ke,maskInputFn:fe,maskAllElementAttributes:Be=!1,maskAttributeFn:Ne,dataURLOptions:Je={},inlineImages:Yt,recordCanvas:Zt,canvasMaskingConfigured:Ie,keepIframeSrcFn:ye,newlyAddedElement:mt=!1}=D,qe=(function(O,L){if(!L.hasNode(O))return;const re=L.getId(O);return re===1?void 0:re})(ee,V);switch(T.nodeType){case T.DOCUMENT_NODE:return T.compatMode!=="CSS1Compat"?{type:Re.Document,childNodes:[],compatMode:T.compatMode}:{type:Re.Document,childNodes:[]};case T.DOCUMENT_TYPE_NODE:return{type:Re.DocumentType,name:T.name,publicId:T.publicId,systemId:T.systemId,rootId:qe};case T.ELEMENT_NODE:return(function(O,L){const{doc:re,blockClass:he,blockSelector:P,inlineStylesheet:Z,maskInputOptions:je={},maskInputFn:H,maskAllElementAttributes:G=!1,maskAttributeFn:F,dataURLOptions:X={},inlineImages:ne,recordCanvas:et,canvasMaskingConfigured:Ke,keepIframeSrcFn:Xt,newlyAddedElement:Ct=!1,rootId:Jt}=L,Ce=(function(x,Q,Me){try{if(typeof Q=="string"){if(x.classList.contains(Q))return!0}else for(let Le=x.classList.length;Le--;)if(Q.test(x.classList[Le]))return!0;if(Me)return x.matches(Me)}catch{}return!1})(O,he,P),se=(function(x){if(x instanceof HTMLFormElement)return"form";const Q=nt(x.tagName);return Na.test(Q)?"div":Q})(O),be=new Set;let q={};const Di=O.attributes.length;for(let x=0;Di>x;x++){const Q=O.attributes[x];is(se,Q.name)||(q[Q.name]=rs(re,se,nt(Q.name),Q.value,O,X))}if(se==="link"&&Z&&!Ce&&ss(q.rel)){let x=O.sheet;if(!x){const Me=(function(Le){return Le.href})(O);Me&&(x=as(re,Me),!x&&Me.includes(".css"))&&(x=as(re,window.location.origin+"/"+Me.replace(window.location.href,"")))}let Q=null;x&&(Ui(x)?tt>0&&(nn.push(O),rn+=1):Q=ln(x)),Q&&(delete q.rel,delete q.href,q._cssText=Q)}var Kt;if(se==="style"&&O.sheet&&!(O.innerText||N.textContent(O)||"").trim().length){const x=ji(()=>ln(O.sheet));x&&(q._cssText=x)}if(se==="input"||se==="textarea"||se==="select"){const x=O.value,Q=O.checked;q.type!=="radio"&&q.type!=="checkbox"&&q.type!=="submit"&&q.type!=="button"&&x?q.value=Zn({element:O,type:Jn(O),tagName:se,value:x,maskInputOptions:je,maskInputFn:H}):Q&&(q.checked=Q)}if(se==="option"&&(O.selected&&!je.select?q.selected=!0:delete q.selected),se==="dialog"&&O.open){try{q.rr_open_mode=O.matches("dialog:modal")?"modal":"non-modal"}catch{q.rr_open_mode="modal",q.ph_rr_could_not_detect_modal=!0}be.add("rr_open_mode")}if(se==="canvas"&&et&&!Ke?.())try{if(O.__context==="2d")(function(x){const Q=x.getContext("2d");if(!Q)return!0;for(let Me=0;x.width>Me;Me+=50)for(let Le=0;x.height>Le;Le+=50){const Se=Q.getImageData,Mt=Ki in Se?Se[Ki]:Se;let Fn;try{Fn=Mt.call(Q,Me,Le,Math.min(50,x.width-Me),Math.min(50,x.height-Le))}catch{return!1}if(new Uint32Array(Fn.data.buffer).some(wa=>wa!==0))return!1}return!0})(O)||(q.rr_dataURL=O.toDataURL(X.type,X.quality));else if(!("__context"in O)){const x=O.toDataURL(X.type,X.quality),Q=re.createElement("canvas");Q.width=O.width,Q.height=O.height,x!==Q.toDataURL(X.type,X.quality)&&(q.rr_dataURL=x)}}catch(x){((Kt=x)==null?void 0:Kt.name)==="SecurityError"?ts||(ts=!0,console.warn("Cannot read canvas pixels, so this canvas is left out of the recording. A cross-origin image or video drawn into it taints it.",Kt)):console.warn("Cannot read canvas pixels, so this canvas is left out of the recording.",Kt)}let xr,Ar=!1;if(se==="img"&&ne){Tt||(Tt=re.createElement("canvas"),Qi=Tt.getContext("2d"));const x=O,Q=x.currentSrc||x.getAttribute("src")||"<unknown-src>",Me=x.crossOrigin,Le=(Mt,Fn)=>Ar?Xn({element:O,name:Mt,value:Fn,maskAllElementAttributes:G,maskAttributeFn:F}):Fn,Se=()=>{At(x,"load",Se);try{Tt.width=x.naturalWidth,Tt.height=x.naturalHeight,Qi.drawImage(x,0,0);const Mt=Tt.toDataURL(X.type,X.quality);q.rr_dataURL=Le("rr_dataURL",Mt)}catch(Mt){if(x.crossOrigin!=="anonymous")return x.crossOrigin="anonymous",void(x.complete&&x.naturalWidth!==0?Se():x.addEventListener("load",Se));console.warn(`Cannot inline img src=${Q}! Error: ${Mt}`)}x.crossOrigin==="anonymous"&&(Me?q.crossOrigin=Le("crossOrigin",Me):x.removeAttribute("crossorigin"))};x.complete&&x.naturalWidth!==0?Se():x.addEventListener("load",Se)}if(se==="audio"||se==="video"){const x=q;x.rr_mediaState=O.paused?"paused":"played",be.add("rr_mediaState"),x.rr_mediaCurrentTime=O.currentTime,x.rr_mediaPlaybackRate=O.playbackRate,x.rr_mediaMuted=O.muted,x.rr_mediaLoop=O.loop,x.rr_mediaVolume=O.volume}if(Ct||(O.scrollLeft&&(q.rr_scrollLeft=O.scrollLeft),O.scrollTop&&(q.rr_scrollTop=O.scrollTop)),Ce){var Ln,On,Nn;const{width:x,height:Q,left:Me,top:Le}=O.getBoundingClientRect(),Se=(Ln=re.defaultView)===null||Ln===void 0?void 0:Ln.getComputedStyle(O);q={class:q.class,rr_width:`${x}px`,rr_height:`${Q}px`,rr_left:`${Math.floor(Me+(((On=re.defaultView)===null||On===void 0?void 0:On.scrollX)||0))}px`,rr_top:`${Math.floor(Le+(((Nn=re.defaultView)===null||Nn===void 0?void 0:Nn.scrollY)||0))}px`},be.add("rr_width"),be.add("rr_height"),be.add("rr_left"),be.add("rr_top"),Se&&(q.rr_position=Se.position||"static",be.add("rr_position"),Se.transform&&Se.transform!=="none"&&(q.rr_transform=Se.transform,be.add("rr_transform")),Se.display&&Se.display.startsWith("inline")&&(q.rr_display=Se.display,be.add("rr_display")))}if(se!=="iframe"||Xt(q.src)||(O.contentDocument||(q.rr_src=q.src),delete q.src),G||F)for(const[x,Q]of Object.entries(q))typeof Q!="string"&&Q!==null||(q[x]=Xn({element:O,name:x,value:Q,maskAllElementAttributes:G,maskAttributeFn:F,isGenerated:be.has(x)}));Ar=!0;try{customElements.get(se)&&(xr=!0)}catch{}return{type:Re.Element,tagName:se,attributes:q,childNodes:[],isSVG:(Dn=O,!!(Dn.tagName==="svg"||Dn.ownerSVGElement)||void 0),needBlock:Ce,rootId:Jt,isCustom:xr};var Dn})(T,{doc:ee,blockClass:ae,blockSelector:ge,inlineStylesheet:Ae,maskInputOptions:de,maskInputFn:fe,maskAllElementAttributes:Be,maskAttributeFn:Ne,dataURLOptions:Je,inlineImages:Yt,recordCanvas:Zt,canvasMaskingConfigured:Ie,keepIframeSrcFn:ye,newlyAddedElement:mt,rootId:qe});case T.TEXT_NODE:return(function(O,L){const{needsMask:re,maskTextFn:he,rootId:P}=L,Z=N.parentNode(O),je=Z&&Z.tagName;let H=N.textContent(O);const G=je==="STYLE"||void 0,F=je==="SCRIPT"||void 0;if(G&&H){try{var X;if(!(O.nextSibling||O.previousSibling)){if(!Ui(Z.sheet)){if(!((X=Z.sheet)===null||X===void 0)&&X.cssRules){const ne=ln(Z.sheet);ne&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(ne)&&(H=ne)}}}}catch(ne){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${ne}`,O)}H=yt(H,qr(L.doc))}return F&&(H="SCRIPT_PLACEHOLDER"),!G&&!F&&H&&re&&(H=he?he(H,N.parentElement(O)):H.replace(/[\S]/g,"*")),{type:Re.Text,textContent:H||"",isStyle:G,rootId:P}})(T,{doc:ee,needsMask:_e,maskTextFn:ke,rootId:qe});case T.CDATA_SECTION_NODE:return{type:Re.CDATA,textContent:"",rootId:qe};case T.COMMENT_NODE:return{type:Re.Comment,textContent:N.textContent(T)||"",rootId:qe};default:return!1}})(e,{doc:n,mirror:r,blockClass:i,blockSelector:s,needsMask:W,inlineStylesheet:a,maskInputOptions:u,maskTextFn:h,maskInputFn:d,maskAllElementAttributes:p,maskAttributeFn:f,dataURLOptions:y,inlineImages:g,recordCanvas:v,canvasMaskingConfigured:w,keepIframeSrcFn:E,newlyAddedElement:R});if(!ie)return console.warn(e,"not serialized"),null;let oe;oe=r.hasNode(e)?r.getId(e):(function(T,D){return!!(D.comment&&T.type===Re.Comment||T.type===Re.Element&&(D.script&&(T.tagName==="script"||T.tagName==="link"&&(T.attributes.rel==="preload"&&T.attributes.as==="script"||T.attributes.rel==="modulepreload")||T.tagName==="link"&&T.attributes.rel==="prefetch"&&typeof T.attributes.href=="string"&&(function(ee){var V;let ae;try{ae=new URL(ee,window.location.href)}catch{return null}const ge=ae.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(V=ge?.[1])!==null&&V!==void 0?V:null})(T.attributes.href)==="js")||D.headFavicon&&(T.tagName==="link"&&T.attributes.rel==="shortcut icon"||T.tagName==="meta"&&(Ye(T.attributes.name).match(/^msapplication-tile(image|color)$/)||Ye(T.attributes.name)==="application-name"||["icon","apple-touch-icon","shortcut icon"].includes(Ye(T.attributes.rel))))||T.tagName==="meta"&&(D.headMetaDescKeywords&&Ye(T.attributes.name).match(/^description|keywords$/)||D.headMetaSocial&&(Ye(T.attributes.property).match(/^(og|twitter|fb):/)||Ye(T.attributes.name).match(/^(og|twitter):/)||Ye(T.attributes.name)==="pinterest")||D.headMetaRobots&&["robots","googlebot","bingbot"].includes(Ye(T.attributes.name))||D.headMetaHttpEquiv&&T.attributes["http-equiv"]!==void 0||D.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(Ye(T.attributes.name))||Ye(T.attributes.property).match(/^article:/)||Ye(T.attributes.property).match(/^product:/))||D.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(Ye(T.attributes.name)))))})(ie,m)||!ue&&ie.type===Re.Text&&!ie.isStyle&&!ie.textContent.replace(/^\s+|\s+$/gm,"").length?-2:es();const z=Object.assign(ie,{id:oe});if(r.add(e,z),oe===-2)return null;_&&_(e);let ce=!o;if(z.type===Re.Element){ce=ce&&!z.needBlock,delete z.needBlock;const T=N.shadowRoot(e);T&&an(T)&&(z.isShadowHost=!0)}if((z.type===Re.Document||z.type===Re.Element)&&ce){m.headWhitespace&&z.type===Re.Element&&z.tagName==="head"&&(ue=!1);const T={doc:n,mirror:r,blockClass:i,blockSelector:s,needsMask:W,maskTextClass:c,maskTextSelector:l,skipChild:o,inlineStylesheet:a,maskInputOptions:u,maskTextFn:h,maskInputFn:d,maskAllElementAttributes:p,maskAttributeFn:f,slimDOMOptions:m,dataURLOptions:y,inlineImages:g,recordCanvas:v,canvasMaskingConfigured:w,preserveWhiteSpace:ue,onSerialize:_,onIframeLoad:S,iframeLoadTimeout:b,onIframeListenerRegistered:k,onStylesheetLoad:C,stylesheetLoadTimeout:M,keepIframeSrcFn:E,depth:A+1,maxDepth:$};if(!(z.type===Re.Element&&z.tagName==="textarea"&&z.attributes.value!==void 0))for(const ee of Array.from(N.childNodes(e))){const V=Lt(ee,T);V&&z.childNodes.push(V)}let D=null;if(Br(e)&&(D=N.shadowRoot(e)))for(const ee of Array.from(N.childNodes(D))){const V=Lt(ee,T);V&&(an(D)&&(V.isShadow=!0),z.childNodes.push(V))}}const Oe=N.parentNode(e);if(Oe&&on(Oe)&&an(Oe)&&(z.isShadow=!0),z.type===Re.Element&&z.tagName==="iframe"){const T=(function(D,ee,V){const ae=()=>{},ge=D.contentWindow;if(!ge)return ae;let _e;try{_e=ge.document.readyState}catch{return ae}const Ae=()=>ee();if(_e!=="complete"){let fe=!1,Be=null;const Ne=()=>{fe||(fe=!0,Be!==null&&(clearTimeout(Be),Be=null),At(D,"load",Je),D.addEventListener("load",Ae),ee())},Je=()=>Ne();return Be=setTimeout(Ne,V),D.addEventListener("load",Je),()=>{Be!==null&&(clearTimeout(Be),Be=null),fe?At(D,"load",Ae):(fe=!0,At(D,"load",Je))}}const de="about:blank";let ke;try{ke=ge.location.href}catch{return ae}if(ke!==de||D.src===de||D.src===""){const fe=setTimeout(ee,0);return D.addEventListener("load",Ae),()=>{clearTimeout(fe),At(D,"load",Ae)}}return D.addEventListener("load",Ae),()=>{At(D,"load",Ae)}})(e,()=>{const D=e.contentDocument;if(D&&S){const ee=Lt(D,{doc:D,mirror:r,blockClass:i,blockSelector:s,needsMask:W,maskTextClass:c,maskTextSelector:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:u,maskTextFn:h,maskInputFn:d,maskAllElementAttributes:p,maskAttributeFn:f,slimDOMOptions:m,dataURLOptions:y,inlineImages:g,recordCanvas:v,canvasMaskingConfigured:w,preserveWhiteSpace:ue,onSerialize:_,onIframeLoad:S,iframeLoadTimeout:b,onIframeListenerRegistered:k,onStylesheetLoad:C,stylesheetLoadTimeout:M,keepIframeSrcFn:E,depth:A+1,maxDepth:$});ee&&S(e,ee)}},b);k?.(e,T)}return z.type===Re.Element&&z.tagName==="link"&&ss(z.attributes.rel)&&(function(T,D,ee){if(un.has(T))return;let V;try{V=T.sheet}catch{return}if(V)return;const ae=new AbortController;let ge=!1;const _e=()=>{if(!ge){ge=!0;try{(()=>{if(C){const de=Lt(e,{doc:n,mirror:r,blockClass:i,blockSelector:s,needsMask:W,maskTextClass:c,maskTextSelector:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:u,maskTextFn:h,maskInputFn:d,maskAllElementAttributes:p,maskAttributeFn:f,slimDOMOptions:m,dataURLOptions:y,inlineImages:g,recordCanvas:v,canvasMaskingConfigured:w,preserveWhiteSpace:ue,onSerialize:_,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:M,keepIframeSrcFn:E,depth:A,maxDepth:$});de&&C(e,de)}})()}finally{un.delete(T),ae.abort()}}},Ae=setTimeout(_e,ee);ae.signal.addEventListener("abort",()=>clearTimeout(Ae),{once:!0}),T.addEventListener("load",_e,{signal:ae.signal,once:!0}),un.set(T,ae)})(e,0,M),z}function ls(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e===!1?{}:e}var Pa=class _a{constructor(...t){I(this,"parentElement",null),I(this,"parentNode",null),I(this,"ownerDocument",void 0),I(this,"firstChild",null),I(this,"lastChild",null),I(this,"previousSibling",null),I(this,"nextSibling",null),I(this,"ELEMENT_NODE",1),I(this,"TEXT_NODE",3),I(this,"nodeType",void 0),I(this,"nodeName",void 0),I(this,"RRNodeType",void 0)}get childNodes(){const t=[];let n=this.firstChild;for(;n;)t.push(n),n=n.nextSibling;return t}contains(t){if(!(t instanceof _a)||t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};function me(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>Ot(n,e,t,r)}function Ot(e,t,n,r){it(()=>{const i=e.removeEventListener;typeof i=="function"&&(r!==void 0?i.call(e,t,n,r):i.call(e,t,n))})}function it(e){try{e()}catch(t){if(!(t instanceof DOMException&&t.name==="SecurityError"))throw t}}function Gr(e){e.forEach(t=>{if(typeof t=="function")try{t()}catch{}})}var Nt=`Please stop import mirror directly. Instead of that,\r
2
2
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
3
3
  or you can use record.mirror to access the mirror instance during recording.`,cs={map:{},getId(){return console.warn(Nt),-1},getNode(){return console.warn(Nt),null},removeNodeFromMap(){console.warn(Nt)},has(){return console.warn(Nt),!1},reset(){console.warn(Nt)}};function dn(e,t,n={}){let r=null,i=0;return function(...s){const c=Date.now();i||n.leading!==!1||(i=c);const l=t-(c-i),o=this;0>=l||l>t?(r&&(clearTimeout(r),r=null),i=c,e.apply(o,s)):r||n.trailing===!1||(r=setTimeout(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(o,s)},l))}}function Qn(e,t,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(e,t),c=()=>Qn(e,t,s||{},!0);if(r)return i.Object.defineProperty(e,t,n),c;const l=(function(o){let a=typeof o.setTimeout=="function"?o.setTimeout:void 0;try{var u,h;const p=(u=o.Zone)===null||u===void 0||(h=u.__symbol__)===null||h===void 0?void 0:h.call(u,"setTimeout"),f=p?o[p]:void 0;typeof f=="function"&&(a=f)}catch{}if(!a)return()=>{};const d=a;return p=>{try{d.call(o,p,0)}catch{}}})(i);return i.Object.defineProperty(e,t,{set(o){if(l(()=>{try{n.set.call(this,o)}catch{}}),s&&s.set){if(s.get)try{s.get.call(this)}catch{return}s.set.call(this,o)}}}),c}typeof window<"u"&&window.Proxy&&window.Reflect&&(cs=new Proxy(cs,{get(e,t,n){return t==="map"&&console.warn(Nt),Reflect.get(e,t,n)}}));var er=Date.now;function us(e){var t,n,r,i;const s=e.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:s.documentElement.scrollLeft||s?.body&&((t=N.parentElement(s.body))===null||t===void 0?void 0:t.scrollLeft)||(s==null||(n=s.body)===null||n===void 0?void 0:n.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:s?.documentElement.scrollTop||s?.body&&((r=N.parentElement(s.body))===null||r===void 0?void 0:r.scrollTop)||(s==null||(i=s.body)===null||i===void 0?void 0:i.scrollTop)||0}}function ds(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function hs(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ps(e){return e?e.nodeType===e.ELEMENT_NODE?e:N.parentElement(e):null}function ve(e,t,n,r){if(!e)return!1;const i=ps(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||r&&i.closest("."+t)!==null)return!0}else if(Kn(i,t,r))return!0}catch{}return!!(n&&(i.matches(n)||r&&i.closest(n)!==null))}function Yr(e,t,n){return!(e.tagName!=="TITLE"||!n.headTitleMutations)||t.getId(e)===-2}function fs(e,t){if(on(e))return!1;const n=t.getId(e);if(!t.has(n))return!0;const r=N.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||fs(r,t))}function Zr(e){return!!e.changedTouches}function ms(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function gs(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Xr(e){return!!e&&(e instanceof Pa&&"shadowRoot"in e?!!e.shadowRoot:!!N.shadowRoot(e))}/[1-9][0-9]{12}/.test(Date.now().toString())||(er=()=>new Date().getTime());var $a=class{constructor(){I(this,"id",1),I(this,"styleIDMap",new WeakMap),I(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!==null&&t!==void 0?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=t===void 0?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 vs(e){var t;let n=null;return"getRootNode"in e&&((t=N.getRootNode(e))===null||t===void 0?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&N.host(N.getRootNode(e))&&(n=N.host(N.getRootNode(e))),n}function ys(e){const t=e.ownerDocument;if(!t)return!1;if(N.contains(t,e))return!0;const n=N.isConnected(e);return typeof n=="boolean"?n:(function(r){const i=r.ownerDocument;if(!i)return!1;const s=(function(c){let l,o=c;for(;l=vs(o);)o=l;return o})(r);return N.contains(i,s)})(e)}function bs(e){return"__ln"in e}var hn,Ba=class{constructor(){I(this,"length",0),I(this,"head",null),I(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;e>n;n++)t=t?.next||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&bs(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&&bs(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;t.next===null&&(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--)}},Ss=(e,t)=>`${e}@${t}`,Ha=class{constructor(){I(this,"frozen",!1),I(this,"locked",!1),I(this,"texts",[]),I(this,"attributes",[]),I(this,"attributeMap",new WeakMap),I(this,"generatedAttributes",new WeakMap),I(this,"removes",[]),I(this,"mapRemoves",new Set),I(this,"movedMap",{}),I(this,"addedSet",new Set),I(this,"movedSet",new Set),I(this,"droppedSet",new Set),I(this,"removesSubTreeCache",new Set),I(this,"mutationCb",void 0),I(this,"blockClass",void 0),I(this,"blockSelector",void 0),I(this,"maskTextClass",void 0),I(this,"maskTextSelector",void 0),I(this,"inlineStylesheet",void 0),I(this,"maskInputOptions",void 0),I(this,"maskTextFn",void 0),I(this,"maskInputFn",void 0),I(this,"maskAllElementAttributes",void 0),I(this,"maskAttributeFn",void 0),I(this,"keepIframeSrcFn",void 0),I(this,"recordCanvas",void 0),I(this,"canvasMaskingConfigured",void 0),I(this,"inlineImages",void 0),I(this,"slimDOMOptions",void 0),I(this,"dataURLOptions",void 0),I(this,"doc",void 0),I(this,"mirror",void 0),I(this,"iframeManager",void 0),I(this,"stylesheetManager",void 0),I(this,"shadowDomManager",void 0),I(this,"canvasManager",void 0),I(this,"processedNodeManager",void 0),I(this,"unattachedDoc",void 0),I(this,"canvasManagerReleased",!1),I(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),I(this,"emit",()=>{if(this.frozen||this.locked)return;const e=Ge(),t=zi();try{this.processBufferedMutations()}finally{n=Ge()-e,r=t,tt>0||Dr(n,r??vt)||n>jn.slowestBatchMs&&(jn.slowestBatchMs=n)}var n,r}),I(this,"processBufferedMutations",()=>{const e=[],t=new Set,n=new Ba,r=o=>{let a=o,u=-2;for(;u===-2;)a=a&&a.nextSibling,u=a&&this.mirror.getId(a);return u};let i;const s=o=>{var a;const u=N.parentNode(o);if(!u||!ys(o)||u.tagName==="TEXTAREA"||this.isBlockedAtEmission(u))return;const h=on(u)?this.mirror.getId(vs(o)):this.mirror.getId(u),d=r(o);if(h===-1||d===-1)return n.addNode(o);(a=i)!==null&&a!==void 0||(i={doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,canvasMaskingConfigured:this.canvasMaskingConfigured,inlineImages:this.inlineImages,onSerialize:f=>{ms(f,this.mirror)&&this.iframeManager.addIframe(f),gs(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),Xr(f)&&!ve(f,this.blockClass,this.blockSelector,!0)&&this.shadowDomManager.addShadowRoot(N.shadowRoot(f),this.doc)},onIframeLoad:(f,m)=>{this.iframeManager.attachIframe(f,m),this.shadowDomManager.observeAttachShadow(f)},onIframeListenerRegistered:(f,m)=>{this.iframeManager.registerLoadListenerDisposer(f,m)},onStylesheetLoad:(f,m)=>{this.stylesheetManager.attachLinkElement(f,m)}});const p=Lt(o,i);p&&(e.push({parentId:h,nextId:d,node:p}),t.add(p.id))};for(const o of this.mapRemoves)this.mapRemoves.delete(o),this.mirror.removeNodeFromMap(o);for(const o of this.movedSet)_s(this.removesSubTreeCache,o)&&!this.movedSet.has(N.parentNode(o))||s(o);for(const o of this.addedSet)ks(this.droppedSet,o)||_s(this.removesSubTreeCache,o)?ks(this.movedSet,o)?s(o):this.droppedSet.add(o):s(o);let c=null;for(;n.length;){let o=null;if(c){const a=this.mirror.getId(N.parentNode(c.value)),u=r(c.value);a!==-1&&u!==-1&&(o=c)}if(!o){let a=n.tail;for(;a;){const u=a;if(a=a.previous,u){const h=this.mirror.getId(N.parentNode(u.value));if(r(u.value)===-1)continue;if(h!==-1){o=u;break}{const d=N.parentNode(u.value);if(d&&d.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=N.host(d);if(this.mirror.getId(p)!==-1){o=u;break}}}}}}if(!o){for(;n.head;)n.removeNode(n.head.value);break}c=o.previous,n.removeNode(o.value),s(o.value)}const l={texts:this.texts.filter(o=>!this.isBlockedAtEmission(o.node)).map(o=>{const a=o.node,u=N.parentNode(a);return u&&u.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u),{id:this.mirror.getId(a),value:o.value}}).filter(o=>!t.has(o.id)).filter(o=>this.mirror.has(o.id)),attributes:this.attributes.filter(o=>!this.isBlockedAtEmission(o.node)).map(o=>{const{attributes:a}=o;if(!this.maskAllElementAttributes&&!this.maskAttributeFn&&typeof a.style=="string"){const h=JSON.stringify(o.styleDiff),d=JSON.stringify(o._unchangedStyles);a.style.length>h.length&&(h+d).split("var(").length===a.style.split("var(").length&&(a.style=o.styleDiff)}if(this.maskAllElementAttributes||this.maskAttributeFn){for(const[h,d]of Object.entries(a))if(typeof d=="string"||d===null){var u;a[h]=Xn({element:o.node,name:h,value:d,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,isGenerated:(u=this.generatedAttributes.get(o.node))===null||u===void 0?void 0:u.has(h)})}}return{id:this.mirror.getId(o.node),attributes:a}}).filter(o=>!t.has(o.id)).filter(o=>this.mirror.has(o.id)),removes:this.removes,adds:e};this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.generatedAttributes=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},(l.texts.length||l.attributes.length||l.removes.length||l.adds.length)&&this.mutationCb(l)}),I(this,"bufferBelongsToIframe",e=>this.doc===e.contentDocument),I(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const n=Array.from(N.childNodes(e),r=>N.textContent(r)||"").join("");t.attributes.value=Zn({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Jn(e),value:n,maskInputFn:this.maskInputFn})}),I(this,"processMutation",e=>{if(!Yr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const r=N.textContent(e.target);ve(e.target,this.blockClass,this.blockSelector,!1)||r===e.oldValue||this.texts.push({value:os(e.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,ps(e.target)):r.replace(/[\S]/g,"*"):r,node:e.target});break}case"attributes":{var t;const r=e.target,i=nt(r.tagName),s=e.attributeName,c=(t=e.attributeNamespace)!==null&&t!==void 0?t:null;let l=(function(h,d,p){if(!p)return d;const f=h.getAttributeNodeNS(p,d);if(f)return f.name;if(p==="http://www.w3.org/1999/xlink")return`xlink:${d}`;if(p==="http://www.w3.org/XML/1998/namespace")return`xml:${d}`;if(p==="http://www.w3.org/2000/xmlns/")return d==="xmlns"?d:`xmlns:${d}`;const m=h.lookupPrefix(p);return m?`${m}:${d}`:d})(r,s,c),o=c?r.getAttributeNS(c,s):e.target.getAttribute(s);if(l==="value"){const h=r,d=Jn(h);o=Zn({element:h,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:d,value:o,maskInputFn:this.maskInputFn})}if(ve(e.target,this.blockClass,this.blockSelector,!1)||o===e.oldValue)return;let a=this.attributeMap.get(e.target);const u=i==="iframe"&&l==="src";if(u&&!this.keepIframeSrcFn(o)&&r.contentDocument)return;if(l==="type"&&i==="input"&&(e.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!is(i,l)){var n;a||(a={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(e.target,a));const h=rs(this.doc,i,nt(l),o,r,this.dataURLOptions);if(u&&!this.keepIframeSrcFn(o)&&(l="rr_src"),a.attributes[l]=h,(n=this.generatedAttributes.get(e.target))===null||n===void 0||n.delete(l),l==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const d=this.unattachedDoc.createElement("span"),p=r.style;e.oldValue&&(d.style.cssText=e.oldValue);for(const f of Array.from(p)){const m=p.getPropertyValue(f),y=p.getPropertyPriority(f);m!==d.style.getPropertyValue(f)||y!==d.style.getPropertyPriority(f)?a.styleDiff[f]=y===""?m:[m,y]:a._unchangedStyles[f]=[m,y]}for(const f of Array.from(d.style))p.getPropertyValue(f)===""&&(a.styleDiff[f]=!1)}else if(l==="open"&&i==="dialog"){a.attributes.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal";let d=this.generatedAttributes.get(e.target);d||(d=new Set,this.generatedAttributes.set(e.target,d)),d.add("rr_open_mode")}}break}case"childList":if(ve(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA")return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach(r=>this.genAdds(r,e.target)),e.removedNodes.forEach(r=>{const i=this.mirror.getId(r),s=on(e.target)?this.mirror.getId(N.host(e.target)):this.mirror.getId(e.target);ve(e.target,this.blockClass,this.blockSelector,!1)||Yr(r,this.mirror,this.slimDOMOptions)||!(function(c,l){return l.getId(c)!==-1})(r,this.mirror)||(this.addedSet.has(r)?(ws(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(e.target)&&i===-1||fs(e.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Ss(i,s)]?ws(this.movedSet,r):(this.removes.push({parentId:s,id:i,isShadow:!(!on(e.target)||!an(e.target))||void 0}),(function(c,l){const o=[c];for(;o.length;){const a=o.pop();l.has(a)||(l.add(a),N.childNodes(a).forEach(u=>o.push(u)))}})(r,this.removesSubTreeCache))),this.mapRemoves.add(r))})}}),I(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)){if(this.addedSet.has(e))return this.addedSet.delete(e),void this.addedSet.add(e);if(!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Yr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[Ss(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);if(!ve(e,this.blockClass,this.blockSelector,!1)){if(e.nodeType===e.TEXT_NODE)return;const n=N.childNodes(e);for(let r=0,i=n.length;i>r;r++){const s=n[r];s&&this.genAdds(s)}if(Xr(e)){const r=N.childNodes(N.shadowRoot(e));for(let i=0,s=r.length;s>i;i++){const c=r[i];c&&(this.processedNodeManager.add(c,this),this.genAdds(c,e))}}}}}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","maskAllElementAttributes","maskAttributeFn","keepIframeSrcFn","recordCanvas","canvasMaskingConfigured","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]}),this.canvasManager.acquire()}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.releaseCanvasManager()}releaseCanvasManager(){this.canvasManagerReleased||(this.canvasManagerReleased=!0,this.canvasManager.reset())}bufferDoc(){return this.doc}destroy(){for(const e of this.mapRemoves)this.mapRemoves.delete(e),this.mirror.removeNodeFromMap(e)}isBlockedAtEmission(e){const t=this.blockClass,n=t&&typeof t!="string"&&(t.global||t.sticky)?new RegExp(t):null;for(;e;){if(n&&(n.lastIndex=0),ve(e,n||t,this.blockSelector,!0))return!0;const r="getRootNode"in e?N.getRootNode(e):null;e=r?.nodeType===Node.DOCUMENT_FRAGMENT_NODE?N.host(r):null}return!1}};function ws(e,t){const n=[t];for(;n.length;){const r=n.pop();if(e.delete(r),r.nodeType===r.TEXT_NODE)continue;const i=N.childNodes(r);for(let s=0,c=i.length;c>s;s++){const l=i[s];l&&n.push(l)}}}function _s(e,t,n){return e.size!==0&&(function(r,i){const s=N.parentNode(i);return!!s&&r.has(s)})(e,t)}function ks(e,t){if(e.size===0)return!1;let n=N.parentNode(t);for(;n;){if(e.has(n))return!0;n=N.parentNode(n)}return!1}function za(e){hn=e}function Wa(){hn=void 0}var J=(e,t="rrweb")=>hn?(...n)=>{try{return e(...n)}catch(r){if(hn&&hn(r,t)===!0)return;throw r}}:e,ze=[];function pn(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 Is(e,t){const n=new Ha;let r;n.init(e);try{r=new(Hi())(J(n.processMutations.bind(n)));const i={attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0};return e.attributeFilter&&e.attributeFilter.length>0&&(i.attributeFilter=e.attributeFilter),r.observe(t,i),ze.push(n),{observer:r,buffer:n}}catch(i){try{r?.disconnect(),n.destroy(),n.reset()}catch{}throw i}}function Cs({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,sampling:s}){const c=new Map,l=a=>{const u=pn(a);if(!u||ve(u,r,i,!0))return;const h=n.getId(u);let d,p;if(u===t&&t.defaultView){const m=us(t.defaultView);d=m.left,p=m.top}else d=u.scrollLeft,p=u.scrollTop;const f=`${d},${p}`;c.get(h)!==f&&(c.set(h,f),e({id:h,x:d,y:p}))},o=[me("scroll",J(dn(J(a=>l(a)),s.scroll||100)),t)];return"onscrollend"in t&&o.push(me("scrollend",J(l),t)),()=>o.forEach(a=>a())}function Ms(e,t){for(let n=ze.length-1;n>=0;n--){const r=ze[n];if(!r)continue;let i=r.bufferBelongsToIframe(e);!i&&t&&t.has(r.bufferDoc())&&(i=!0),i&&(r.reset(),ze.splice(n,1))}}var qa=["INPUT","TEXTAREA","SELECT"],Rs=new WeakMap;function tr(e){return(function t(n,r){if(nr("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||nr("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||nr("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||nr("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){const i=Array.from(n.parentRule.cssRules).indexOf(n);return r.unshift(i),t(n.parentRule,r)}if(n.parentStyleSheet){const i=Array.from(n.parentStyleSheet.cssRules).indexOf(n);r.unshift(i)}return r})(e,[])}function dt(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function Es({mirror:e,stylesheetManager:t},n){var r,i;let s=null;s=e.getId(n.nodeName==="#document"?n:N.host(n));const c=n.nodeName==="#document"?(r=n.defaultView)===null||r===void 0?void 0:r.Document:(i=n.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0?void 0:i.ShadowRoot,l=c?.prototype?Object.getOwnPropertyDescriptor(c?.prototype,"adoptedStyleSheets"):void 0;return s!==null&&s!==-1&&c&&l?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var o;return(o=l.get)===null||o===void 0?void 0:o.call(this)},set(o){let a;try{var u;a=(u=l.set)===null||u===void 0?void 0:u.call(this,o)}catch(h){if(h&&typeof h=="object"&&h.name==="NotAllowedError")return;throw h}if(s!==null&&s!==-1)try{t.adoptStyleSheets(o,s)}catch{}return a}}),J(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}var Jr=new Set;function ja(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r,i;(function(o,a){const{mutationCb:u,mousemoveCb:h,mouseInteractionCb:d,scrollCb:p,viewportResizeCb:f,inputCb:m,mediaInteractionCb:y,styleSheetRuleCb:g,styleDeclarationCb:v,canvasMutationCb:w,fontCb:_,selectionCb:S,customElementCb:b}=o;o.mutationCb=(...k)=>{a.mutation&&a.mutation(...k),u(...k)},o.mousemoveCb=(...k)=>{a.mousemove&&a.mousemove(...k),h(...k)},o.mouseInteractionCb=(...k)=>{a.mouseInteraction&&a.mouseInteraction(...k),d(...k)},o.scrollCb=(...k)=>{a.scroll&&a.scroll(...k),p(...k)},o.viewportResizeCb=(...k)=>{a.viewportResize&&a.viewportResize(...k),f(...k)},o.inputCb=(...k)=>{a.input&&a.input(...k),m(...k)},o.mediaInteractionCb=(...k)=>{a.mediaInteaction&&a.mediaInteaction(...k),y(...k)},o.styleSheetRuleCb=(...k)=>{a.styleSheetRule&&a.styleSheetRule(...k),g(...k)},o.styleDeclarationCb=(...k)=>{a.styleDeclaration&&a.styleDeclaration(...k),v(...k)},o.canvasMutationCb=(...k)=>{a.canvasMutation&&a.canvasMutation(...k),w(...k)},o.fontCb=(...k)=>{a.font&&a.font(...k),_(...k)},o.selectionCb=(...k)=>{a.selection&&a.selection(...k),S(...k)},o.customElementCb=(...k)=>{a.customElement&&a.customElement(...k),b(...k)}})(e,t);const s=[],c=J(()=>{try{if(i)try{i.destroy(),i.reset()}finally{const o=ze.indexOf(i);o!==-1&&ze.splice(o,1)}e.shadowDomManager.resetForDoc(e.doc),r?.disconnect()}finally{Gr(s)}}),l=(o,a)=>{const u=J(()=>{try{return a()}catch(h){throw Jr.add(o),h}})();typeof u=="function"&&s.push(u)};try{if(e.recordDOM&&l("mutation",()=>{const o=Is(e,e.doc);r=o.observer,i=o.buffer}),l("move",()=>(function({mousemoveCb:o,sampling:a,doc:u,mirror:h}){if(a.mousemove===!1)return()=>{};const d=typeof a.mousemove=="number"?a.mousemove:50,p=typeof a.mousemoveCallback=="number"?a.mousemoveCallback:500;let f,m=[];const y=dn(J(w=>{const _=Date.now()-f;o(m.map(S=>(S.timeOffset-=_,S)),w),m=[],f=null}),p),g=J(dn(J(w=>{const _=pn(w),{clientX:S,clientY:b}=Zr(w)?w.changedTouches[0]:w;f||(f=er()),m.push({x:S,y:b,id:h.getId(_),timeOffset:er()-f}),y(typeof DragEvent<"u"&&w instanceof DragEvent?j.Drag:w instanceof MouseEvent?j.MouseMove:j.TouchMove)}),d,{trailing:!1})),v=[me("mousemove",g,u),me("touchmove",g,u),me("drag",g,u)];return J(()=>{v.forEach(w=>w())})})(e)),l("mouseInteraction",()=>(function({mouseInteractionCb:o,doc:a,mirror:u,blockClass:h,blockSelector:d,sampling:p}){if(p.mouseInteraction===!1)return()=>{};const f=p.mouseInteraction===!0||p.mouseInteraction===void 0?{}:p.mouseInteraction,m=[];let y=null;return Object.keys(He).filter(g=>Number.isNaN(Number(g))&&!g.endsWith("_Departed")&&f[g]!==!1).forEach(g=>{let v=nt(g);const w=(_=>S=>{const b=pn(S);if(ve(b,h,d,!0))return;let k=null,C=_;if("pointerType"in S){switch(S.pointerType){case"mouse":k=gt.Mouse;break;case"touch":k=gt.Touch;break;case"pen":k=gt.Pen}k===gt.Touch&&(He[_]===He.MouseDown?C="TouchStart":He[_]===He.MouseUp&&(C="TouchEnd"))}else Zr(S)&&(k=gt.Touch);k!==null?(y=k,(C.startsWith("Touch")&&k===gt.Touch||C.startsWith("Mouse")&&k===gt.Mouse)&&(k=null)):He[_]===He.Click&&(k=y,y=null);const M=Zr(S)?S.changedTouches[0]:S;if(!M)return;const E=u.getId(b),{clientX:R,clientY:A}=M;J(o)(B({type:He[C],id:E,x:R,y:A},k!==null&&{pointerType:k}))})(g);if(window.PointerEvent)switch(He[g]){case He.MouseDown:case He.MouseUp:v=v.replace("mouse","pointer");break;case He.TouchStart:case He.TouchEnd:return}m.push(me(v,w,a))}),J(()=>{m.forEach(g=>g())})})(e)),l("scroll",()=>Cs(e)),l("viewportResize",()=>(function({viewportResizeCb:o},{win:a}){let u=-1,h=-1;return me("resize",J(dn(J(()=>{const d=ds(),p=hs();u===d&&h===p||(o({width:Number(p),height:Number(d)}),u=d,h=p)}),200)),a)})(e,{win:n})),l("input",()=>(function({inputCb:o,doc:a,mirror:u,blockClass:h,blockSelector:d,ignoreClass:p,ignoreSelector:f,maskInputOptions:m,maskInputFn:y,sampling:g,userTriggeredOnInput:v}){function w(C){let M=pn(C);const E=C.isTrusted,R=a.defaultView;if(M&&R&&!(M instanceof R.HTMLElement))return;const A=M&&M.tagName;if(M&&A==="OPTION"&&(M=N.parentElement(M)),!M||!A||0>qa.indexOf(A)||ve(M,h,d,!0)||M.classList.contains(p)||f&&M.matches(f))return;let $=M.value,W=!1;const ue=Jn(M)||"";ue==="radio"||ue==="checkbox"?W=M.checked:(m[A.toLowerCase()]||m[ue])&&($=Zn({element:M,maskInputOptions:m,tagName:A,type:ue,value:$,maskInputFn:y})),_(M,v?{text:$,isChecked:W,userTriggered:E}:{text:$,isChecked:W});const ie=M.name;ue==="radio"&&ie&&W&&a.querySelectorAll(`input[type="radio"][name="${ie}"]`).forEach(oe=>{if(oe!==M){const z=oe.value;_(oe,v?{text:z,isChecked:!W,userTriggered:!1}:{text:z,isChecked:!W})}})}function _(C,M){const E=Rs.get(C);if(!E||E.text!==M.text||E.isChecked!==M.isChecked){Rs.set(C,M);const R=u.getId(C);J(o)(B(B({},M),{},{id:R}))}}const S=(g.input==="last"?["change"]:["input","change"]).map(C=>me(C,J(w),a)),b=a.defaultView;if(!b)return()=>{S.forEach(C=>C())};const k=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value");return k&&k.set&&S.push(...[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]].map(C=>Qn(C[0],C[1],{set(){J(w)({target:this,isTrusted:!1})}},!1,b))),J(()=>{Gr(S)})})(e)),l("mediaInteraction",()=>(function({mediaInteractionCb:o,blockClass:a,blockSelector:u,mirror:h,sampling:d,doc:p}){const f=J(y=>dn(J(g=>{const v=pn(g);if(!v||ve(v,a,u,!0))return;const{currentTime:w,volume:_,muted:S,playbackRate:b,loop:k}=v;o({type:y,id:h.getId(v),currentTime:w,volume:_,muted:S,playbackRate:b,loop:k})}),d.media||500)),m=[me("play",f(en.Play),p),me("pause",f(en.Pause),p),me("seeked",f(en.Seeked),p),me("volumechange",f(en.VolumeChange),p),me("ratechange",f(en.RateChange),p)];return J(()=>{m.forEach(y=>y())})})(e)),e.recordDOM){const o=(function(a){const u=new Map,h=new Set;let d=!0;const p=m=>{if(d)try{m()}catch{}},f=m=>{var y;const g=u.get(m);if(g){for(;!((y=g[0])===null||y===void 0)&&y.ready;){const v=g.shift();v!=null&&v.emit&&p(v.emit)}g.length===0&&u.delete(m)}};return{queueMutation(m,y){if(!m)return void p(y);const g=u.get(m);g?(g.push({emit:y,ready:!0}),f(m)):p(y)},queuePendingMutation(m,y,g){if(!d)return()=>{};let v=u.get(m);v||(v=[],u.set(m,v));const w={emit:y,ready:!1};v.push(w);let _,S=!1,b=!1;const k=()=>{S||b||(S=!0,_!==void 0&&h.delete(_),w.ready=!0,w.emit=void 0,f(m))};try{_=a.setTimeout(k,5e3),S||b?a.clearTimeout(_):h.add(_)}catch{k()}return C=>{!b&&d&&(b=!0,_!==void 0&&(a.clearTimeout(_),h.delete(_)),S?C&&p(g):(w.ready=!0,C||(w.emit=void 0),f(m)))}},reset(){d=!1,h.forEach(m=>a.clearTimeout(m)),h.clear(),u.clear()}}})(n);s.push(o.reset),l("styleSheet",()=>(function({styleSheetRuleCb:a,mirror:u,stylesheetManager:h},{win:d,mutationQueue:p}){if(!d.CSSStyleSheet||!d.CSSStyleSheet.prototype)return()=>{};const f=d.CSSStyleSheet.prototype.insertRule;d.CSSStyleSheet.prototype.insertRule=new Proxy(f,{apply:J((_,S,b)=>{const[k]=b,C=_.apply(S,b);h.onCssomSheetMutation(S);const{id:M,styleId:E}=dt(S,u,h.styleMirror);return(M&&M!==-1||E&&E!==-1)&&p.queueMutation(S,()=>a({id:M,styleId:E,adds:[{rule:k,index:C}]})),C},"host")}),d.CSSStyleSheet.prototype.addRule=function(_,S,b=this.cssRules.length){return d.CSSStyleSheet.prototype.insertRule.apply(this,[`${_} { ${S} }`,b])};const m=d.CSSStyleSheet.prototype.deleteRule;let y,g;d.CSSStyleSheet.prototype.deleteRule=new Proxy(m,{apply:J((_,S,b)=>{const[k]=b,C=_.apply(S,b);h.onCssomSheetMutation(S);const{id:M,styleId:E}=dt(S,u,h.styleMirror);return(M&&M!==-1||E&&E!==-1)&&p.queueMutation(S,()=>a({id:M,styleId:E,removes:[{index:k}]})),C},"host")}),d.CSSStyleSheet.prototype.removeRule=function(_){return d.CSSStyleSheet.prototype.deleteRule.apply(this,[_])},d.CSSStyleSheet.prototype.replace&&(y=d.CSSStyleSheet.prototype.replace,d.CSSStyleSheet.prototype.replace=new Proxy(y,{apply:J((_,S,b)=>{const[k]=b,C=_.apply(S,b);try{const M=C?.then;if(S.ownerNode||!C||typeof M!="function")return C;h.onCssomSheetMutation(S);const{id:E,styleId:R}=dt(S,u,h.styleMirror);if(!(E&&E!==-1||R&&R!==-1))return C;const A=p.queuePendingMutation(S,()=>a({id:E,styleId:R,replace:k}),()=>{const $=ln(S);$!==null&&a({id:E,styleId:R,replace:$})});try{M.call(C,()=>A(!0),()=>A(!1))}catch{A(!1)}}catch{}return C},"host")})),d.CSSStyleSheet.prototype.replaceSync&&(g=d.CSSStyleSheet.prototype.replaceSync,d.CSSStyleSheet.prototype.replaceSync=new Proxy(g,{apply:J((_,S,b)=>{const[k]=b,C=_.apply(S,b);h.onCssomSheetMutation(S);const{id:M,styleId:E}=dt(S,u,h.styleMirror);return(M&&M!==-1||E&&E!==-1)&&p.queueMutation(S,()=>a({id:M,styleId:E,replaceSync:k})),C},"host")}));const v={};rr("CSSGroupingRule")?v.CSSGroupingRule=d.CSSGroupingRule:(rr("CSSMediaRule")&&(v.CSSMediaRule=d.CSSMediaRule),rr("CSSConditionRule")&&(v.CSSConditionRule=d.CSSConditionRule),rr("CSSSupportsRule")&&(v.CSSSupportsRule=d.CSSSupportsRule));const w={};return Object.entries(v).forEach(([_,S])=>{w[_]={insertRule:S.prototype.insertRule,deleteRule:S.prototype.deleteRule},S.prototype.insertRule=new Proxy(w[_].insertRule,{apply:J((b,k,C)=>{const[M]=C,E=b.apply(k,C);h.onCssomSheetMutation(k.parentStyleSheet);const{id:R,styleId:A}=dt(k.parentStyleSheet,u,h.styleMirror);if(k.parentStyleSheet&&(R&&R!==-1||A&&A!==-1)){const $=[...tr(k),E];p.queueMutation(k.parentStyleSheet,()=>a({id:R,styleId:A,adds:[{rule:M,index:$}]}))}return E},"host")}),S.prototype.deleteRule=new Proxy(w[_].deleteRule,{apply:J((b,k,C)=>{const[M]=C,E=b.apply(k,C);h.onCssomSheetMutation(k.parentStyleSheet);const{id:R,styleId:A}=dt(k.parentStyleSheet,u,h.styleMirror);if(k.parentStyleSheet&&(R&&R!==-1||A&&A!==-1)){const $=[...tr(k),M];p.queueMutation(k.parentStyleSheet,()=>a({id:R,styleId:A,removes:[{index:$}]}))}return E},"host")})}),J(()=>{d.CSSStyleSheet.prototype.insertRule=f,d.CSSStyleSheet.prototype.deleteRule=m,y&&(d.CSSStyleSheet.prototype.replace=y),g&&(d.CSSStyleSheet.prototype.replaceSync=g),Object.entries(v).forEach(([_,S])=>{S.prototype.insertRule=w[_].insertRule,S.prototype.deleteRule=w[_].deleteRule})})})(e,{win:n,mutationQueue:o})),l("adoptedStyleSheet",()=>Es(e,e.doc)),l("styleDeclaration",()=>(function({styleDeclarationCb:a,mirror:u,ignoreCSSAttributes:h,stylesheetManager:d},{win:p,mutationQueue:f}){const m=p.CSSStyleDeclaration.prototype.setProperty;p.CSSStyleDeclaration.prototype.setProperty=new Proxy(m,{apply:J((g,v,w)=>{var _;const[S,b,k]=w,C=g.apply(v,w);if(h.has(S))return C;const M=(_=v.parentRule)===null||_===void 0?void 0:_.parentStyleSheet;d.onCssomSheetMutation(M);const{id:E,styleId:R}=dt(M,u,d.styleMirror);if(E&&E!==-1||R&&R!==-1){const A=tr(v.parentRule);f.queueMutation(M,()=>a({id:E,styleId:R,set:{property:S,value:b,priority:k},index:A}))}return C},"host")});const y=p.CSSStyleDeclaration.prototype.removeProperty;return p.CSSStyleDeclaration.prototype.removeProperty=new Proxy(y,{apply:J((g,v,w)=>{var _;const[S]=w,b=g.apply(v,w);if(h.has(S))return b;const k=(_=v.parentRule)===null||_===void 0?void 0:_.parentStyleSheet;d.onCssomSheetMutation(k);const{id:C,styleId:M}=dt(k,u,d.styleMirror);if(C&&C!==-1||M&&M!==-1){const E=tr(v.parentRule);f.queueMutation(k,()=>a({id:C,styleId:M,remove:{property:S},index:E}))}return b},"host")}),J(()=>{p.CSSStyleDeclaration.prototype.setProperty=m,p.CSSStyleDeclaration.prototype.removeProperty=y})})(e,{win:n,mutationQueue:o})),e.collectFonts&&l("font",()=>(function({fontCb:a,doc:u}){const h=u.defaultView;if(!h)return()=>{};const d=[],p=new WeakMap,f=h.FontFace;h.FontFace=function(y,g,v){const w=new f(y,g,v);return p.set(w,{family:y,buffer:typeof g!="string",descriptors:v,fontSource:typeof g=="string"?g:JSON.stringify(Array.from(new Uint8Array(g)))}),w};const m=ct(u.fonts,"add",function(y){return function(g){return setTimeout(J(()=>{const v=p.get(g);v&&(a(v),p.delete(g))}),0),y.apply(this,[g])}});return d.push(()=>{h.FontFace=f}),d.push(m),J(()=>{d.forEach(y=>y())})})(e))}l("selection",()=>(function(o){const{doc:a,mirror:u,blockClass:h,blockSelector:d,selectionCb:p}=o;let f=!0;const m=J(()=>{const y=a.getSelection();if(!y||f&&y?.isCollapsed)return;f=y.isCollapsed||!1;const g=[],v=y.rangeCount||0;for(let w=0;v>w;w++){const{startContainer:_,startOffset:S,endContainer:b,endOffset:k}=y.getRangeAt(w);ve(_,h,d,!0)||ve(b,h,d,!0)||g.push({start:u.getId(_),startOffset:S,end:u.getId(b),endOffset:k})}p({ranges:g})});return m(),me("selectionchange",m)})(e)),l("customElement",()=>(function({doc:o,customElementCb:a}){const u=o.defaultView;return u&&u.customElements?ct(u.customElements,"define",function(h){return function(d,p,f){try{a({define:{name:d}})}catch{console.warn(`Custom element callback failed for ${d}`)}return h.apply(this,[d,p,f])}}):()=>{}})(e));for(const o of e.plugins)l(`plugin:${o.name}`,()=>o.observer(o.callback,n,o.options))}catch(o){try{c()}catch{}throw o}return c}function nr(e){return window[e]!==void 0}function rr(e){return!!(window[e]!==void 0&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var Ts=class{constructor(e){I(this,"generateIdFn",void 0),I(this,"iframeRemoteIdToLocalIdMap",new WeakMap),I(this,"iframeLocalIdToRemoteIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,n,r){if(0>t)return t;const i=n||this.getRemoteIdToLocalIdMap(e),s=r||this.getLocalIdToRemoteIdMap(e);let c=i.get(t);return c===void 0&&(c=this.generateIdFn(),i.set(t,c),s.set(c,t)),c}getIds(e,t){const n=this.getRemoteIdToLocalIdMap(e),r=this.getLocalIdToRemoteIdMap(e);return t.map(i=>this.getId(e,i,n,r))}getRemoteId(e,t,n){var r;return typeof t!="number"||0>t?t:(r=(n||this.getLocalIdToRemoteIdMap(e)).get(t))!==null&&r!==void 0?r:-1}getRemoteIds(e,t){const n=this.getLocalIdToRemoteIdMap(e);return t.map(r=>this.getRemoteId(e,r,n))}reset(e){if(!e)return this.iframeRemoteIdToLocalIdMap=new WeakMap,void(this.iframeLocalIdToRemoteIdMap=new WeakMap);this.iframeRemoteIdToLocalIdMap.delete(e),this.iframeLocalIdToRemoteIdMap.delete(e)}getRemoteIdToLocalIdMap(e){let t=this.iframeRemoteIdToLocalIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToLocalIdMap.set(e,t)),t}getLocalIdToRemoteIdMap(e){let t=this.iframeLocalIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeLocalIdToRemoteIdMap.set(e,t)),t}},Ua=class{constructor(e){I(this,"iframes",new WeakMap),I(this,"crossOriginIframeMap",new WeakMap),I(this,"crossOriginIframeMirror",new Ts(es)),I(this,"crossOriginIframeStyleMirror",void 0),I(this,"crossOriginIframeRootIdMap",new WeakMap),I(this,"mirror",void 0),I(this,"mutationCb",void 0),I(this,"wrappedEmit",void 0),I(this,"loadListener",void 0),I(this,"pageHideListener",void 0),I(this,"stylesheetManager",void 0),I(this,"recordCrossOriginIframes",void 0),I(this,"messageHandler",void 0),I(this,"nestedIframeListeners",new Map),I(this,"attachedWindows",new WeakMap),I(this,"attachedDocuments",new WeakMap),I(this,"attachedIframes",new Map),I(this,"loadListenerDisposers",new WeakMap),I(this,"iframeElementsById",new Map),I(this,"pageHideHandlers",new WeakMap),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ts(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}registerLoadListenerDisposer(e,t){let n=this.loadListenerDisposers.get(e);n||(n=new Set,this.loadListenerDisposers.set(e,n)),n.add(t);const r=this.mirror.getId(e);r!==-1&&this.iframeElementsById.set(r,e)}getIframeElementById(e){var t,n,r;return(t=(n=(r=this.attachedIframes.get(e))===null||r===void 0?void 0:r.element)!==null&&n!==void 0?n:this.iframeElementsById.get(e))!==null&&t!==void 0?t:null}forgetIframeId(e){this.attachedIframes.delete(e),this.iframeElementsById.delete(e)}disposeLoadListeners(e){const t=this.loadListenerDisposers.get(e);t&&(t.forEach(n=>it(n)),this.loadListenerDisposers.delete(e))}removePageHideListener(e){const t=this.pageHideHandlers.get(e);t&&(t.forEach(({win:n,handler:r})=>{Ot(n,"pagehide",r)}),this.pageHideHandlers.delete(e))}addLoadListener(e){this.loadListener=e}addPageHideListener(e){this.pageHideListener=e}removeLoadListener(){this.loadListener=void 0}trackIframeContent(e,t){const n=this.mirror.getId(e);return this.attachedIframes.set(n,{element:e,content:t}),n}attachIframe(e,t){var n;const r=this.trackIframeContent(e,t);if(e.contentDocument){let s=this.attachedDocuments.get(e);s||(s=new Set,this.attachedDocuments.set(e,s)),s.add(e.contentDocument)}this.mutationCb({adds:[{parentId:r,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0});const i=e.contentWindow;if(this.recordCrossOriginIframes&&i&&!this.nestedIframeListeners.has(i)){const s=this.handleMessage.bind(this);it(()=>{i.addEventListener("message",s),this.nestedIframeListeners.set(i,s);let c=this.attachedWindows.get(e);c||(c=new Set,this.attachedWindows.set(e,c)),c.add(i)})}it(()=>{const s=e.contentWindow;if(!s)return;let c=this.pageHideHandlers.get(e);if(c){for(const o of c)if(o.win===s)return}const l=()=>{var o;(o=this.pageHideListener)===null||o===void 0||o.call(this,e),e.contentDocument&&this.mirror.removeNodeFromMap(e.contentDocument)};s.addEventListener("pagehide",l),c||(c=new Set,this.pageHideHandlers.set(e,c)),c.add({win:s,handler:l})}),(n=this.loadListener)===null||n===void 0||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case te.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),this.trackIframeContent(e,t.data.node),{timestamp:t.timestamp,type:te.IncrementalSnapshot,data:{source:j.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case te.Meta:case te.Load:case te.DomContentLoaded:return!1;case te.Plugin:return t;case te.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case te.IncrementalSnapshot:switch(t.data.source){case j.Mutation:return t.data.adds.forEach(r=>{this.replaceIds(r,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,e);const i=this.crossOriginIframeRootIdMap.get(e);i&&this.patchRootIdOnNode(r.node,i)}),t.data.removes.forEach(r=>{this.replaceIds(r,e,["parentId","id"])}),t.data.attributes.forEach(r=>{this.replaceIds(r,e,["id"])}),t.data.texts.forEach(r=>{this.replaceIds(r,e,["id"])}),t;case j.Drag:case j.TouchMove:case j.MouseMove:return t.data.positions.forEach(r=>{this.replaceIds(r,e,["id"])}),t;case j.ViewportResize:return!1;case j.MediaInteraction:case j.MouseInteraction:case j.Scroll:case j.CanvasMutation:case j.Input:return this.replaceIds(t.data,e,["id"]),t;case j.StyleSheetRule:case j.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case j.Font:return t;case j.Selection:return t.data.ranges.forEach(r=>{this.replaceIds(r,e,["start","end"])}),t;case j.AdoptedStyleSheet:var n;return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(n=t.data.styles)===null||n===void 0||n.forEach(r=>{this.replaceStyleIds(r,e,["styleId"])}),t}}return!1}replace(e,t,n,r){for(const i of r)(Array.isArray(t[i])||typeof t[i]=="number")&&(t[i]=Array.isArray(t[i])?e.getIds(n,t[i]):e.getId(n,t[i]));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.forEach(n=>{this.replaceIdOnNode(n,t)})}patchRootIdOnNode(e,t){e.type===Re.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(n=>{this.patchRootIdOnNode(n,t)})}removeIframeById(e){const t=this.attachedIframes.get(e),n=t?.element||this.iframeElementsById.get(e)||this.mirror.getNode(e);if(this.iframeElementsById.delete(e),n){const r=n.contentWindow,i=this.attachedWindows.get(n);i&&(i.forEach(c=>{const l=this.nestedIframeListeners.get(c);l&&(Ot(c,"message",l),this.nestedIframeListeners.delete(c)),this.crossOriginIframeMap.delete(c)}),this.attachedWindows.delete(n)),r&&this.nestedIframeListeners.has(r)&&(Ot(r,"message",this.nestedIframeListeners.get(r)),this.nestedIframeListeners.delete(r)),r&&this.crossOriginIframeMap.delete(r),this.iframes.delete(n),this.disposeLoadListeners(n),this.removePageHideListener(n);const s=this.attachedDocuments.get(n);s&&(s.forEach(c=>{it(()=>this.mirror.removeNodeFromMap(c))}),it(()=>Ms(n,s)),this.attachedDocuments.delete(n))}t&&this.attachedIframes.delete(e)}cleanupDetachedIframes(){if(this.attachedIframes.size===0)return;const e=[];this.attachedIframes.forEach((t,n)=>{this.mirror.has(n)||e.push(n)}),e.forEach(t=>this.removeIframeById(t))}reattachIframes(){this.attachedIframes.forEach(({content:e},t)=>{this.mirror.has(t)?this.mutationCb({adds:[{parentId:t,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(t)})}destroy(){this.recordCrossOriginIframes&&Ot(window,"message",this.messageHandler),this.nestedIframeListeners.forEach((t,n)=>{Ot(n,"message",t)}),this.nestedIframeListeners.clear();const e=new Set;this.iframeElementsById.forEach(t=>e.add(t)),this.attachedIframes.forEach(({element:t})=>e.add(t)),e.forEach(t=>{this.disposeLoadListeners(t),this.removePageHideListener(t)}),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap,this.loadListenerDisposers=new WeakMap,this.pageHideHandlers=new WeakMap,this.attachedDocuments=new WeakMap,this.attachedWindows=new WeakMap,this.iframeElementsById=new Map}},Va=class{constructor(e){I(this,"shadowDoms",new WeakSet),I(this,"mutationCb",void 0),I(this,"scrollCb",void 0),I(this,"bypassOptions",void 0),I(this,"mirror",void 0),I(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){var n,r;if(!an(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const i=(n=(r=N.host(e))===null||r===void 0?void 0:r.ownerDocument)!==null&&n!==void 0?n:t,{observer:s,buffer:c}=Is(B(B({},this.bypassOptions),{},{doc:i,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push({doc:i,handler(){s.disconnect(),c.destroy(),c.releaseCanvasManager();const l=ze.indexOf(c);l!==-1&&ze.splice(l,1)}}),this.restoreHandlers.push({doc:i,handler:Cs(B(B({},this.bypassOptions),{},{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))}),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(N.host(e))),this.restoreHandlers.push({doc:i,handler:Es({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)})},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push({doc:t,handler:ct(e.prototype,"attachShadow",function(r){return function(i){const s=r.call(this,i),c=N.shadowRoot(this);return c&&ys(this)&&n.addShadowRoot(c,t),s}})})}reset(){this.restoreHandlers.forEach(({handler:e})=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}resetForDoc(e){const t=[];for(const n of this.restoreHandlers)if(n.doc===e)try{n.handler()}catch{}else t.push(n);this.restoreHandlers=t}},xs="skip-frame";function Ga(e){if(typeof e!="object"||e===null)return!1;const{x:t,y:n,width:r,height:i}=e;return Number.isFinite(t)&&Number.isFinite(n)&&Number.isFinite(r)&&Number.isFinite(i)&&r>=0&&i>=0}for(var fn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ya=typeof Uint8Array>"u"?[]:new Uint8Array(256),ir=0;64>ir;ir++)Ya[fn.charCodeAt(ir)]=ir;var Za=function(e){var t,n=new Uint8Array(e),r=n.length,i="";for(t=0;r>t;t+=3)i+=fn[n[t]>>2],i+=fn[(3&n[t])<<4|n[t+1]>>4],i+=fn[(15&n[t+1])<<2|n[t+2]>>6],i+=fn[63&n[t+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i},As=!1,Ls=new Map,Os=(e,t,n)=>{if(!e||!Ds(e,t)&&typeof e!="object")return;const r=(function(s,c){let l=Ls.get(s);return l||(l=new Map,Ls.set(s,l)),l.has(c)||l.set(c,[]),l.get(c)})(n,e.constructor.name);let i=r.indexOf(e);return i===-1&&(i=r.length,r.push(e)),i};function sr(e,t,n,r){if(e instanceof Array)return e.map(i=>sr(i,t,n,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:Za(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[sr(e.buffer,t,n,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const i=e.constructor.name,{src:s}=e;return{rr_type:i,src:s}}if(e instanceof HTMLCanvasElement){const i="HTMLImageElement";let s;try{s=e.toDataURL(r.type,r.quality)}catch(c){throw(function(l){l?.name==="SecurityError"?As||(As=!0,console.warn("[replay] canvas capture: skipping a canvas draw because its pixels cannot be read. A cross-origin image or video drawn into it taints it.",l)):console.warn("[replay] canvas capture: skipping a canvas draw because its pixels cannot be read.",l)})(c),c}return{rr_type:i,src:s}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[sr(e.data,t,n,r),e.width,e.height]}:Ds(e,t)||typeof e=="object"?{rr_type:e.constructor.name,index:Os(e,t,n)}:e}var Ns=(e,t,n,r)=>e.map(i=>sr(i,t,n,r)),Ds=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof t[r]=="function").find(r=>e instanceof t[r]),Xa=["webgl","webgl2"];function Fs(e){return"nodeType"in e}function Ps(e,t,n,r){const i=[];try{if(r){const c=(function(l,o,a){const u=l.GPUCanvasContext;if(u?.prototype&&typeof u.prototype.configure=="function")return ct(u.prototype,"configure",function(h){return function(d){const p=(function(m){const{canvas:y}=m;return y&&typeof y=="object"?y:null})(this);if(!p||Fs(p)&&ve(p,o,a,!0))return h.call(this,d);Fs(p)&&!("__context"in p)&&(p.__context="webgpu");const f=(function(m){const y=m.GPUTextureUsage;return y?y.COPY_SRC|y.RENDER_ATTACHMENT:null})(l);return h.call(this,f!==null&&d?B(B({},d),{},{usage:typeof d.usage=="number"?d.usage|f:f}):d)}})})(e,t,n);c&&i.push(c)}const s=ct(e.HTMLCanvasElement.prototype,"getContext",function(c){return function(l,...o){const a=(function(u){return u==="experimental-webgl"?"webgl":u})(l);if(!ve(this,t,n,!0)&&("__context"in this||(this.__context=a),r&&Xa.includes(a)))if(o[0]&&typeof o[0]=="object"){const u=o[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0});return c.apply(this,[l,...o])}});i.push(s)}catch{console.warn("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(s=>s())}}function $s(e,t,n,r,i,s,c){const l=[],o=Object.getOwnPropertyNames(e);for(const a of o)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof e[a]!="function")continue;const u=ct(e,a,function(h){return function(...d){const p=h.apply(this,d);if(Os(p,s,this),this.canvas&&"tagName"in this.canvas&&!ve(this.canvas,r,i,!0)){let f;try{f=Ns(d,s,this,c)}catch{}f&&n(this.canvas,{type:t,property:a,args:f})}return p}});l.push(u)}catch{const h=Qn(e,a,{set(d){this.canvas&&"tagName"in this.canvas&&!ve(this.canvas,r,i,!0)&&n(this.canvas,{type:t,property:a,args:[d],setter:!0})}});l.push(h)}return l}var Bs=`(function() {
4
4
  //#region ../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/base64-arraybuffer/1.0.2/f63fa6b5c318cf1c9f6bdd1d4292ad2f15f76f2ec78475025a2d44070e896fe9/node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js
@@ -107,4 +107,4 @@ or you can use record.mirror to access the mirror instance during recording.`,cs
107
107
  `).filter(function(t){return!!t.match(nl)&&!t.match(/^Error created at/)},this).map(function(t){const n=t.split("@"),r=this.extractLocation(n.pop());return new Dt({functionName:(n.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})},this)}};function il(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let n=e.localName;if(!n)break;n=n.toLowerCase();const r=e.parentElement,i=[];if(r.children&&r.children.length>0)for(let s=0;r.children.length>s;s++){const c=r.children[s];c.localName&&c.localName.toLowerCase&&c.localName.toLowerCase()===n&&i.push(c)}i.length>1&&(n+=`:eq(${i.indexOf(e)})`),t=n+(t?">"+t:""),e=r}return t}function js(e){return Array.isArray(e)}function ei(e){return typeof e=="object"&&e!==null&&!js(e)}function Us(e,t){if(t===0)return!0;const n=Object.keys(e);for(const r of n)if(ei(e[r])&&Us(e[r],t-1))return!0;return!1}function Ft(e,t){const n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);const r=[],i=[];return JSON.stringify(e,function(s,c){if(r.length>0){const o=r.indexOf(this);~o?r.splice(o+1):r.push(this),~o?i.splice(o,1/0,s):i.push(s),~r.indexOf(c)&&(c=r[0]===c?"[Circular ~]":"[Circular ~."+i.slice(0,r.indexOf(c)).join(".")+"]")}else r.push(c);if(c===null)return c;if(c===void 0)return"undefined";if(ei(l=c)&&Object.keys(l).length>n.numOfKeysLimit||typeof l=="function"||ei(l)&&Us(l,n.depthOfLimit))return(function(o){let a=o.toString();return n.stringLengthLimit&&a.length>n.stringLengthLimit&&(a=`${a.slice(0,n.stringLengthLimit)}...`),a})(c);var l;if(typeof c=="bigint")return c.toString()+"n";if(c instanceof Event){const o={};for(const a in c){const u=c[a];o[a]=js(u)?il(u.length?u[0]:null):u}return o}return c instanceof Node?c instanceof HTMLElement?c?c.outerHTML:"":c.nodeName:c instanceof Error?c.stack?c.stack+`
108
108
  End of stack for Error object`:c.name+": "+c.message:c})}var Vs={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function sl(e,t,n){const r=n?Object.assign({},Vs,n):Vs,i=r.logger;if(!i)return()=>{};let s;s=typeof i=="string"?t[i]:i;let c=0,l=!1,o=!0;const a=[];if(r.level.includes("error")){const h=p=>{const f=p.message;e({level:"error",trace:Qr.parse(p.error).map(m=>m.toString()),payload:[Ft(f,r.stringifyOptions)]})};t.addEventListener("error",h),a.push(()=>{t.removeEventListener("error",h)});const d=p=>{let f,m;p.reason instanceof Error?(f=p.reason,m=[Ft(`Uncaught (in promise) ${f.name}: ${f.message}`,r.stringifyOptions)]):(f=new Error,m=[Ft("Uncaught (in promise)",r.stringifyOptions),Ft(p.reason,r.stringifyOptions)]),e({level:"error",trace:Qr.parse(f).map(y=>y.toString()),payload:m})};t.addEventListener("unhandledrejection",d),a.push(()=>{t.removeEventListener("unhandledrejection",d)})}for(const h of r.level)a.push(u(s,h));return()=>{o=!1,a.forEach(h=>h())};function u(h,d){return h[d]?(function(p,f){try{if(!(f in p))return()=>{};const m=p[f],y={next:m},g=(v=>(...w)=>{if(v.apply(h,w),o&&!(d==="assert"&&w[0]||l)){l=!0;try{const _=Qr.parse(new Error).map(b=>b.toString()).splice(1),S=(d==="assert"?w.slice(1):w).map(b=>Ft(b,r.stringifyOptions));c++,r.lengthThreshold>c?e({level:d,trace:_,payload:S}):c===r.lengthThreshold&&e({level:"warn",trace:[],payload:[Ft("The number of log records reached the threshold.")]})}catch(_){v.apply(h,["rrweb logger error:",_,...w])}finally{l=!1}}})(function(...v){return y.next.apply(this,v)});return typeof g=="function"&&(g.prototype=g.prototype||{},Object.defineProperties(g,{__rrweb_original__:{enumerable:!1,value:m},__rrweb_layer__:{enumerable:!1,value:y}})),p[f]=g,()=>{if(p[f]===g)return void(p[f]=y.next);const v=S=>{var b;return typeof S=="function"?(b=S.__rrweb_layer__)!==null&&b!==void 0?b:S.__posthog_layer__:void 0};let w=p[f],_=v(w);for(;_;){if(_.next===g)return void(_.next=y.next);w=_.next,_=v(w)}}}catch{return()=>{}}})(h,d):()=>{}}}const Y="u">typeof window?window:void 0,bt="u">typeof globalThis?globalThis:Y,rt=bt?.document,ol=bt?.location;bt!=null&&bt.XMLHttpRequest&&new bt.XMLHttpRequest;const yn=typeof globalThis<"u"?globalThis:Y;yn&&typeof self>"u"&&(yn.self=yn),yn&&typeof File>"u"&&(yn.File=function(){});const st=Y??{},Gs=Object.prototype,ti=Gs.hasOwnProperty,dr=Gs.toString,Te=Array.isArray||function(e){return dr.call(e)==="[object Array]"},De=e=>typeof e=="function",xe=e=>e===Object(e)&&!Te(e),U=e=>e===void 0,ht=e=>dr.call(e)=="[object String]",Fe=e=>e===null,Ze=e=>U(e)||Fe(e),we=e=>dr.call(e)=="[object Number]"&&e==e,Qe=e=>dr.call(e)==="[object Boolean]",Ys=e=>e instanceof FormData;function pt(e,t,n,r,i){return t>n&&(r.warn("min cannot be greater than max."),t=n),we(e)?e>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):t>e?(r.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+i),pt(i??n,t,n,r))}var al=class{constructor(e){this.C={},this.I=e.I,this.R=pt(e.bucketSize,0,100,e.$),this.A=pt(e.refillRate,0,this.R,e.$),this.O=pt(e.refillInterval,0,864e5,e.$)}F(e,t){const n=Math.floor((t-e.lastAccess)/this.O);n>0&&(e.tokens=Math.min(e.tokens+n*this.A,this.R),e.lastAccess=e.lastAccess+n*this.O)}consumeRateLimit(e){var t;const n=Date.now(),r=String(e);let i=this.C[r];return i?this.F(i,n):(i={tokens:this.R,lastAccess:n},this.C[r]=i),i.tokens===0||(i.tokens--,i.tokens===0&&((t=this.I)===null||t===void 0||t.call(this,e)),i.tokens===0)}stop(){this.C={}}};function Zs(e){return e&&e.split("#")[0]}const Xs="NativeGzipValidationError";let bn;const hr=e=>{throw(function(t,n){const r=new Error(n);try{Object.defineProperty(r,"name",{value:t,writable:!0,enumerable:!0,configurable:!0})}catch{}return r})(Xs,`Native gzip produced invalid output: ${e}`)},ll=(Js=Ve(function*(e,t){18>e.size&&hr("too-short");const n=new Uint8Array(yield e.slice(0,10).arrayBuffer());var r;(2>(r=n).length||r[0]!==31||r[1]!==139||n[2]!==8)&&hr("invalid-header");const i=new DataView(yield e.slice(e.size-8).arrayBuffer());i.getUint32(0,!0)!==(c=>{const l=(()=>{if(bn)return bn;bn=[];for(let a=0;256>a;a++){let u=a;for(let h=0;8>h;h++)u=1&u?3988292384^u>>>1:u>>>1;bn[a]=u>>>0}return bn})();let o=4294967295;for(let a=0;c.length>a;a++)o=l[255&(o^c[a])]^o>>>8;return(4294967295^o)>>>0})(t)&&hr("invalid-crc");const s=t.length>>>0;i.getUint32(4,!0)!==s&&hr("invalid-size")}),function(e,t){return Js.apply(this,arguments)});var Js;function ni(){return ni=Ve(function*(e,t=!0,n){try{const i=new TextEncoder().encode(e),s=new globalThis.CompressionStream("gzip"),c=s.writable.getWriter(),l=c.write(i).then(()=>c.close()).catch((r=Ve(function*(u){try{yield c.abort(u)}catch{}throw u}),function(u){return r.apply(this,arguments)})),o=new Response(s.readable).blob(),[a]=yield Promise.all([o,l]);return yield ll(a,i),a}catch(i){if(n?.rethrow)throw i;return t&&console.error("Failed to gzip compress data",i),null}var r}),ni.apply(this,arguments)}const Ks="0.9.0",Sn={DEBUG:!1,LIB_VERSION:Ks,LIB_NAME:"browser-common",JS_SDK_VERSION:Ks},Qs=(e,{debugEnabled:t}={})=>{const n={N(r,...i){Y&&(Sn.DEBUG||Y.POSTHOG_DEBUG||t)&&!U(Y.console)&&Y.console&&("__rrweb_original__"in Y.console[r]?Y.console[r].__rrweb_original__:Y.console[r])(e,...i)},debug(...r){n.N("debug",...r)},info(...r){n.N("log",...r)},warn(...r){n.N("warn",...r)},error(...r){n.N("error",...r)},critical(...r){console.error(e,...r)},uninitializedWarning(r){n.error(`You must initialize PostHog before calling ${r}`)},createLogger:(r,i)=>Qs(`${e} ${r}`,i)};return n},ot=Qs("[PostHog.js]"),Pt=ot.createLogger;function ri(e,t){if(!Ze(e))if(Te(e))e.forEach(t);else if(Ys(e))e.forEach((n,r)=>t(n,r));else for(const n in e)ti.call(e,n)&&t(e[n],n)}function wn(e,t,n,r){const{capture:i=!1,passive:s=!0}=r??{};e?.addEventListener(t,n,{capture:i,passive:s})}const cl=["localhost","127.0.0.1"],eo=e=>{const t=rt?.createElement("a");return U(t)?null:(t.href=e,t)},to=()=>{},no=e=>{var t;if(De(e))return(t=e.__posthog_layer__)!==null&&t!==void 0?t:e.__rrweb_layer__};function ro(e,t,n){try{if(!(t in e))return to;const r={next:e[t]},i=n(function(...s){return r.next.apply(this,s)});return De(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0},__posthog_layer__:{enumerable:!1,value:r}})),e[t]=i,()=>{if(e[t]===i)return void(e[t]=r.next);let s=e[t],c=no(s);for(;c;){if(c.next===i)return void(c.next=r.next);s=c.next,c=no(s)}}}catch{return to}}function ii(e,t){var n;const r=(function(s){try{return typeof s=="string"?new URL(s).hostname:"url"in s?new URL(s.url).hostname:s.hostname}catch{return null}})(e),i={hostname:r,isHostDenied:!1};if(!(!((n=t.payloadHostDenyList)===null||n===void 0)&&n.length)||!r?.trim().length)return i;for(const s of t.payloadHostDenyList)if(r.endsWith(s))return{hostname:r,isHostDenied:!0};return i}function si(e){var t;const n=Y==null||(t=Y.location)===null||t===void 0?void 0:t.href;return U(n)?void 0:(function(r,i){var s;const c=r==null||(s=r.config)===null||s===void 0?void 0:s.get_current_url;if(!De(c))return i;try{const l=c(i);return ht(l)&&l?l:i}catch(l){return ot.error("Error in get_current_url, falling back to window.location.href",l),i}})(e,n)}const io=new RegExp("^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$"),so=/(^|[^0-9A-Za-z_])([0-9][0-9 -]*[0-9])(?=$|[^0-9A-Za-z_])/g,ul=[16,15,14,13],dl=new RegExp("^(\\d{3}-?\\d{2}-?\\d{4})$"),oo=new RegExp("(^|[^0-9])((?!000|666)[0-9]{3}-?(?!00)[0-9]{2}-?(?!0000)[0-9]{4})(?=$|([^0-9]))","g"),ao=/[0-9A-Za-z_]/;function hl(e){let t=0,n=!1;for(let r=e.length-1;r>=0;r--){let i=e.charCodeAt(r)-48;n&&(i*=2,i>9&&(i-=9)),t+=i,n=!n}return t%10==0}const oi=1e6;function lo(e){var t;return Math.min(oi,(t=e.payloadSizeLimitBytes)!==null&&t!==void 0?t:oi)}const $t={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:e=>e,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:oi,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","google-analytics.com","analytics.google.com","nr-data.net","datadoghq.com","datadoghq.eu","ddog-gov.com","segment.io","rudderstack.com","amplitude.com","mixpanel.com","hotjar.com","hotjar.io","fullstory.com"],streamNetworkBody:!1},pl=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],fl=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],ml=["auth","token","secret","session","api-key","apikey","api_key","credential","password","passwd","cookie","csrf","xsrf"],co=e=>{Ze(e)||ri(Object.keys(e),t=>{(n=>{const r=n.toLowerCase();return pl.includes(r)||ml.some(i=>r.includes(i))})(t)&&(e[t]="redacted")})},gl=["/s/","/e/","/i/"];function uo(e,t,n,r){if(Ze(e))return e;let i=t?.["content-length"]||(function(s){return new Blob([s]).size})(e);return ht(i)&&(i=parseInt(i)),i>n?`[SessionRecording] ${r} body too large to record (${i} bytes)`:e}function ho(e,t){if(Ze(e))return e;let n=e;return(function(r,i=!0){return!(Ze(r)||ht(r)&&(r=r.trim(),(i?io.test((r||"").replace(/[- ]/g,"")):(function(s){let c;for(so.lastIndex=0;c=so.exec(s);){const l=c[2];if(!l)continue;const o=l.replace(/[- ]/g,"");for(let a=0;o.length>a;a++)for(const u of ul){const h=a+u;if(o.length>=h){const d=o.slice(a,h);if(io.test(d)&&hl(d))return!0}}}return!1})(r))||(i?dl.test(r):(function(s){let c;for(oo.lastIndex=0;c=oo.exec(s);){const l=c[1],o=c[3];if(!(l&&o&&ao.test(l)&&ao.test(o)))return!0}return!1})(r))))})(n,!1)||(n="[SessionRecording] "+t+" body redacted"),ri(fl,r=>{n!=null&&n.length&&n?.indexOf(r)!==-1&&(n="[SessionRecording] "+t+" body redacted as might contain: "+r)}),n}const po=new WeakSet,St=Pt("[Recorder]"),fo=e=>e.entryType==="navigation",ai=e=>e.entryType==="resource",vl=()=>{};function mo(e,t){var n;return fo(t)&&((n=e.document)===null||n===void 0?void 0:n.readyState)==="complete"&&t.loadEventEnd>0}function yl(e,t){return t.recordInitialRequests?e.performance.getEntries().filter(n=>mo(e,n)||ai(n)&&t.initiatorTypes.includes(n.initiatorType)):t.performanceEntryTypeToObserve.includes("navigation")?(function(n){var r;return((r=n.document)===null||r===void 0?void 0:r.readyState)!=="complete"?[]:n.performance.getEntriesByType("navigation").filter(i=>mo(n,i))})(e):[]}function pr(e,t){return!!t&&(Qe(t)||t[e])}function go(e){if(typeof Request>"u")return!1;if(e instanceof Request)return!0;try{return{}.toString.call(e)==="[object Request]"}catch{return!1}}const bl=["image/","video/","audio/","font/","application/octet-stream","application/pdf","application/zip","application/wasm"];function fr({type:e,recordBody:t,headers:n,url:r}){function i(c){const l=Object.keys(n).find(a=>a.toLowerCase()==="content-type"),o=l&&n[l];return c.some(a=>o?.toLowerCase().includes(a))}if(!t||(function c(l){try{return typeof l=="string"?l.startsWith("blob:"):l instanceof URL?l.protocol==="blob:":!!go(l)&&c(l.url)}catch{return!1}})(r)||i(bl))return!1;if(Qe(t))return!0;if(Te(t))return i(t);const s=t[e];return Qe(s)?s:i(s)}function li(e,t,n,r,i){return ci.apply(this,arguments)}function ci(){return ci=Ve(function*(e,t,n,r,i,s=0){return s>10?(St.warn("Failed to get performance entry for request",{url:n,initiatorType:t}),null):(function(c,l){for(let o=c.length-1;o>=0;o-=1)if(l(c[o]))return c[o]})(e.performance.getEntriesByName(n),c=>ai(c)&&c.initiatorType===t&&(U(r)||c.startTime>=r)&&(U(i)||i>=c.startTime))||(yield new Promise(c=>setTimeout(c,50*s)),li(e,t,n,r,i,s+1))}),ci.apply(this,arguments)}function vo({body:e,options:t,url:n}){if(Ze(e))return null;const{hostname:r,isHostDenied:i}=ii(n,t);if(i)return r+" is in deny list";if(ht(e))return e;if((s=>"u">typeof Document&&s instanceof Document)(e))return e.textContent;if(Ys(e))return(function(s,c="&"){let l,o;const a=[];return ri(s,function(u,h){U(u)||U(h)||h==="undefined"||(l=encodeURIComponent((d=>d instanceof File)(u)?u.name:u.toString()),o=encodeURIComponent(h),a[a.length]=o+"="+l)}),a.join(c)})(e);if(xe(e))try{return JSON.stringify(e)}catch{return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(e)}const Sl=e=>!Fe(e)&&(e.entryType==="navigation"||e.entryType==="resource");function mr(e,{entry:t,method:n,status:r,networkRequest:i,isInitial:s,start:c,end:l,url:o,initiatorType:a}){c=t?t.startTime:c,l=t?t.responseEnd:l;const u=Math.floor(Date.now()-e.performance.now()),h=Math.floor(u+(c||0)),d=[B(B({},t?t.toJSON():{name:o}),{},{startTime:U(c)?void 0:Math.round(c),endTime:U(l)?void 0:Math.round(l),timeOrigin:u,timestamp:h,method:n,initiatorType:a||(t?t.initiatorType:void 0),status:r,requestHeaders:i.requestHeaders,requestBody:i.requestBody,responseHeaders:i.responseHeaders,responseBody:i.responseBody,isInitial:s})];if(Sl(t))for(const p of t.serverTiming||[])d.push({timeOrigin:u,timestamp:h,startTime:Math.round(t.startTime),name:p.name,duration:p.duration,entryType:"serverTiming"});return d}const wl=["video/","audio/"];function yo(e){return xe(e)&&De(e.getReader)&&De(e.tee)}const bo="[SessionReplay] Timeout while trying to read body",_n="[SessionReplay] Failed to read body";function ui(e){return`${_n}: ${e}`}function So(e){return`[SessionReplay] Body too large to record (> ${e} bytes)`}function wo(e,t){if(!t.streamNetworkBody)return(function(r){return new Promise(i=>{const s=setTimeout(()=>i(bo),500);try{r.clone().text().then(c=>i(c),c=>i(ui(c))).finally(()=>clearTimeout(s))}catch{clearTimeout(s),i(_n)}})})(e);const n=lo(t);return(function(r,i){try{var s,c;const l=(s=r.headers)===null||s===void 0||(c=s.get)===null||c===void 0?void 0:c.call(s,"content-length");if(!l)return!1;const o=parseInt(l,10);return Number.isFinite(o)&&o>i}catch{return!1}})(e,n)?Promise.resolve(So(n)):(function(r,i){return new Promise(s=>{let c,l=!1;function o(){try{c?.cancel().catch(()=>{})}catch{}}function a(m){l||(l=!0,clearTimeout(u),o(),s(m))}const u=setTimeout(()=>a(bo),500);let h;try{h=r.clone()}catch{a(_n);return}const d=h.body;if(!yo(d)||typeof TextDecoder>"u"){try{h.text().then(m=>a(m),m=>a(ui(m)))}catch{a(_n)}return}try{c=d.getReader()}catch{a(_n);return}const p=[];let f=0;(function m(){c.read().then(({done:y,value:g})=>{if(l)o();else if(y)a(new TextDecoder().decode((function(v,w){const _=new Uint8Array(w);let S=0;for(const b of v)_.set(b,S),S+=b.byteLength;return _})(p,f)));else{if(g){if(f+g.byteLength>i)return void a(So(i));f+=g.byteLength,p.push(g)}m()}},y=>a(ui(y)))})()})})(e,n)}function _o(){return(_o=Ve(function*({r:e,options:t,url:n}){const{hostname:r,isHostDenied:i}=ii(n,t);return i?Promise.resolve(r+" is in deny list"):wo(e,t)})).apply(this,arguments)}function ko(){return(ko=Ve(function*({r:e,options:t,url:n}){const r=(function({r:i,options:s,url:c}){var l;if(i.headers.get("Transfer-Encoding")==="chunked")return"Chunked Transfer-Encoding is not supported";const o=(l=i.headers.get("Content-Type"))===null||l===void 0?void 0:l.toLowerCase(),a=wl.some(d=>o?.startsWith(d));if(o&&a)return`Content-Type ${o} is not supported`;const{hostname:u,isHostDenied:h}=ii(c,s);return h?u+" is in deny list":null})({r:e,options:t,url:n});return Fe(r)?wo(e,t):Promise.resolve(r)})).apply(this,arguments)}let gr=null;function _l(e,t,n){if(!("performance"in t))return()=>{};if(gr)return St.warn("Network observer already initialised, doing nothing"),()=>{};const r=n?Object.assign({},$t,n):$t;let i=!0;const s=u=>{if(!i)return;const h=[];let d=!1;u.requests.forEach(p=>{const f=p.entryType==="serverTiming";if(f&&d)return;const m=r.maskRequestFn(p);f||(d=!m||(y=>!!y&&po.has(y))(m)),m&&h.push(m)}),h.length>0&&e(B(B({},u),{},{requests:h}))},c=(function(u,h,d){try{u({requests:yl(h,d).flatMap(g=>mr(h,{entry:g,method:void 0,status:void 0,networkRequest:{},isInitial:!0})),isInitial:!0})}catch(g){St.error("Failed to capture initial performance entries for network capture",g)}const p=h.PerformanceObserver,f=p?.supportedEntryTypes;if(!p||!Te(f))return;const m=f.filter(g=>d.performanceEntryTypeToObserve.includes(g));if(!m.length)return;const y=new p(g=>{u({requests:g.getEntries().filter(v=>fo(v)||ai(v)&&d.initiatorTypes.includes(v.initiatorType)&&(w=>!d.recordBody&&!d.recordHeaders||w.initiatorType!=="xmlhttprequest"&&w.initiatorType!=="fetch")(v)).flatMap(v=>mr(h,{entry:v,method:void 0,status:void 0,networkRequest:{}}))})});return y.observe({entryTypes:m}),()=>{y.disconnect()}})(s,t,r),l=r.recordHeaders||r.recordBody;if(!c&&!l)return i=!1,vl;let o=()=>{},a=()=>{};return l&&(o=(function(u,h,d){if(!d.initiatorTypes.includes("xmlhttprequest"))return()=>{};const p=pr("request",d.recordHeaders),f=pr("response",d.recordHeaders),m=ro(h.XMLHttpRequest.prototype,"open",y=>function(g,v,w=!0,_,S){const b=this;try{const k=new Request(v),C={};let M,E;const R={},A=b.setRequestHeader.bind(b);b.setRequestHeader=(ie,oe)=>(R[ie]=oe,A(ie,oe)),p&&(C.requestHeaders=R);const $=b.send.bind(b);b.send=ie=>(fr({type:"request",headers:R,url:v,recordBody:d.recordBody})&&(C.requestBody=vo({body:ie,options:d,url:v})),M=h.performance.now(),$(ie));const W=()=>{b.removeEventListener("readystatechange",ue),b.removeEventListener("error",W),b.removeEventListener("abort",W),b.removeEventListener("timeout",W)},ue=()=>{if(b.readyState!==b.DONE)return;W(),E=h.performance.now();const ie={};b.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(oe=>{const z=oe.split(": "),ce=z.shift(),Oe=z.join(": ");ce&&(ie[ce]=Oe)}),f&&(C.responseHeaders=ie),fr({type:"response",headers:ie,url:v,recordBody:d.recordBody})&&(C.responseBody=vo({body:b.response,options:d,url:v})),li(h,"xmlhttprequest",k.url,M,E).then(oe=>{u({requests:mr(h,{entry:oe,method:g,status:b?.status,networkRequest:C,start:M,end:E,url:v.toString(),initiatorType:"xmlhttprequest"})})}).catch(()=>{})};b.addEventListener("readystatechange",ue),b.addEventListener("error",W),b.addEventListener("abort",W),b.addEventListener("timeout",W)}catch(k){St.error("Failed to instrument XHR for network capture",k)}y.call(b,g,v.toString(),w,_,S)});return()=>{m()}})(s,t,r),a=(function(u,h,d){if(!d.initiatorTypes.includes("fetch"))return()=>{};const p=pr("request",d.recordHeaders),f=pr("response",d.recordHeaders),m=ro(h,"fetch",y=>(function(){var g=Ve(function*(v,w){let _,S;try{_=new Request(v,w)}catch(M){return St.error("Failed to instrument fetch for network capture",M),y(v,w)}const b={};let k,C;try{try{const M={};_.headers.forEach((E,R)=>{M[R]=E}),p&&(b.requestHeaders=M),!yo(w?.body)&&fr({type:"request",headers:M,url:v,recordBody:d.recordBody})&&(b.requestBody=yield(function(E){return _o.apply(this,arguments)})({r:_,options:d,url:v}))}catch(M){St.error("Failed to record fetch request for network capture",M)}k=h.performance.now(),S=go(v)?yield y(_):yield y(v,w),C=h.performance.now();try{const M={};S.headers.forEach((E,R)=>{M[R]=E}),f&&(b.responseHeaders=M),fr({type:"response",headers:M,url:v,recordBody:d.recordBody})&&(b.responseBody=yield(function(E){return ko.apply(this,arguments)})({r:S,options:d,url:v}))}catch(M){St.error("Failed to record fetch response for network capture",M)}return S}finally{li(h,"fetch",_.url,k,C).then(M=>{u({requests:mr(h,{entry:M,method:_.method,status:S?.status,networkRequest:b,start:k,end:C,url:_.url,initiatorType:"fetch"})})}).catch(()=>{})}});return function(v,w){return g.apply(this,arguments)}})());return()=>{m()}})(s,t,r)),gr=()=>{i=!1,c?.(),o(),a(),gr=null},gr}const Io="$replay_override_sampling",Co="$replay_override_linked_flag",Mo="$replay_override_url_trigger",Ro="$replay_override_event_trigger",di="$session_is_sampled",Eo="$session_recording_url_trigger_activated_session",To="$session_recording_event_trigger_activated_session",xo="$posthog_sr_group_event_trigger_",Ao="$posthog_sr_group_url_trigger_",Lo="$sess_rec_flush_size",Oo="$stored_person_properties",kl="$sdk_debug_replay_event_trigger_status",Il="$sdk_debug_replay_linked_flag_trigger_status",Cl="$sdk_debug_replay_matched_recording_trigger_groups",hi="$sdk_debug_replay_pending_trigger_conditions",No="$sdk_debug_replay_remote_trigger_matching_config",Ml="$sdk_debug_replay_trigger_groups_count",Rl="$sdk_debug_replay_url_trigger_status",El="$sdk_debug_rrweb_attached",Tl="$sdk_debug_rrweb_start_attempted",xl="$session_recording_start_reason",ft="disabled",pi="sampled",fi="active",Bt="buffering",mi="paused",gi="rrweb_error",Ht="trigger_activated",wt="trigger_pending",zt="trigger_disabled";function Do(e,t,n,r,i,s){return t===0?zt:e?.get_property(n?r+n:i)===s?Ht:wt}function vr(e,t,n){return t.some(r=>{var i;return r.matching==="regex"&&((i=n?.get(r.url))!==null&&i!==void 0?i:new RegExp(r.url)).test(e)})}function Fo(e){return e.includes("trigger_activated")?Ht:e.includes("trigger_pending")?wt:zt}function Po(e){const t=new Set(e);switch(t.delete(zt),t.size){case 0:return zt;case 1:return Array.from(t)[0];default:return wt}}var vi=class{constructor(e){this.q=e}triggerStatus(e){return Fo(this.q.map(t=>t.triggerStatus(e)))}triggerStatusNoSideEffects(e){return Fo(this.q.map(t=>t.triggerStatusNoSideEffects(e)))}stop(){this.q.forEach(e=>e.stop())}},yi=class{constructor(e){this.q=e}triggerStatus(e){return Po(this.q.map(t=>t.triggerStatus(e)))}triggerStatusNoSideEffects(e){return Po(this.q.map(t=>t.triggerStatusNoSideEffects(e)))}stop(){this.q.forEach(e=>e.stop())}},Al=class{triggerStatus(){return this.triggerStatusNoSideEffects()}triggerStatusNoSideEffects(){return Ht}stop(){}};const yr=e=>"sessionRecording"in e;var $o=class{constructor(e,t){this._instance=e,this.j=[],this.B=[],this.H=new Map,this.U=new Map,this.W="",this.urlBlocked=!1,this.V=t}onConfig(e){var t,n;this.j=(yr(e)?xe(e.sessionRecording)?(t=e.sessionRecording)===null||t===void 0?void 0:t.urlTriggers:[]:e?.urlTriggers)||[],this.B=(yr(e)?xe(e.sessionRecording)?(n=e.sessionRecording)===null||n===void 0?void 0:n.urlBlocklist:[]:e?.urlBlocklist)||[],this.Z()}Z(){this.H.clear(),this.U.clear();for(const e of this.j)if(e.matching==="regex"&&!this.H.has(e.url))try{this.H.set(e.url,new RegExp(e.url))}catch(t){ot.error("Invalid URL trigger regex pattern:",e.url,t)}for(const e of this.B)if(e.matching==="regex"&&!this.U.has(e.url))try{this.U.set(e.url,new RegExp(e.url))}catch(t){ot.error("Invalid URL blocklist regex pattern:",e.url,t)}}onRemoteConfig(e){this.onConfig(e)}G(e){return Do(this._instance,this.j.length,this.V,Ao,Eo,e)}triggerStatus(e){const t=this.triggerStatusNoSideEffects(e);return this._instance.register_for_session({[Rl]:t}),t}triggerStatusNoSideEffects(e){return this.G(e)}isCurrentUrlBlocked(){const e=si(this._instance);if(!e)return!1;try{return vr(e,this.B,this.U)}catch{return!0}}checkUrlBlocklist(e,t){const n=si(this._instance);if(!n||n===this.W)return;this.W=n;const r=this.urlBlocked,i=vr(n,this.B,this.U);r&&i||(i&&!r?e():!i&&r&&t())}checkUrlTriggerConditions(e,t,n,r){const i=si(this._instance);if(!i||i===this.W)return;this.W=i;const s=this.urlBlocked,c=vr(i,this.B,this.U);c&&!s?e():!c&&s&&t();const l=this.G(r)===Ht,o=vr(i,this.j,this.H);!l&&o&&n("url",i)}stop(){this.W=""}},Bo=class{constructor(e){this._instance=e,this.linkedFlag=null,this.linkedFlagSeen=!1,this.J=()=>{}}triggerStatus(){const e=this.triggerStatusNoSideEffects();return this._instance.register_for_session({[Il]:e}),e}triggerStatusNoSideEffects(){let e=wt;return Ze(this.linkedFlag)&&(e=zt),this.linkedFlagSeen&&(e=Ht),e}onConfig(e,t){var n;if(this.linkedFlag=(yr(e)?xe(e.sessionRecording)?(n=e.sessionRecording)===null||n===void 0?void 0:n.linkedFlag:null:e?.linkedFlag)||null,!Ze(this.linkedFlag)&&!this.linkedFlagSeen){const r=ht(this.linkedFlag)?this.linkedFlag:this.linkedFlag.flag,i=ht(this.linkedFlag)?null:this.linkedFlag.variant;this.J=this._instance.onFeatureFlags((s,c)=>{let l=!1;if(xe(c)&&r in c){const a=c[r];l=Qe(a)?a===!0:i?a===i:!!a}const o=l&&!this.linkedFlagSeen;this.linkedFlagSeen=l,o&&t(r,i)})}}onRemoteConfig(e,t){this.onConfig(e,t)}stop(){this.J()}},Ho=class{constructor(e,t){this._instance=e,this.K=[],this.V=t}onConfig(e){var t;this.K=(yr(e)?xe(e.sessionRecording)?(t=e.sessionRecording)===null||t===void 0?void 0:t.eventTriggers:[]:e?.eventTriggers)||[]}onRemoteConfig(e){this.onConfig(e)}X(e){return Do(this._instance,this.K.length,this.V,xo,To,e)}triggerStatus(e){const t=this.triggerStatusNoSideEffects(e);return this._instance.register_for_session({[kl]:t}),t}triggerStatusNoSideEffects(e){return this.X(e)}checkEventTriggerConditions(e,t,n){if(this.K.length===0)return;const r=this.X(n)===Ht,i=this.K.includes(e);!r&&i&&t("event",e)}stop(){}},Ll=class{constructor(e,t,n){if(this._instance=e,this.group=t,this.Y=new $o(e,t.id),this.tt=new Ho(e,t.id),this.et=new Bo(e),t.conditions.events&&t.conditions.events.length>0||t.conditions.urls&&t.conditions.urls.length>0||t.conditions.flag){const r=(t.conditions.events||[]).map(c=>c.name),i={urlTriggers:t.conditions.urls||[],eventTriggers:r,linkedFlag:t.conditions.flag||null,urlBlocklist:[]};this.Y.onConfig(i),this.tt.onConfig(i),this.et.onConfig(i,n);const s=[this.tt,this.Y,this.et];this.nt=t.conditions.matchType==="any"?new vi(s):new yi(s)}else this.nt=new Al}triggerStatus(e){return this.nt.triggerStatus(e)}triggerStatusNoSideEffects(e){return this.nt.triggerStatusNoSideEffects(e)}getPendingTriggerConditions(e){return this.triggerStatusNoSideEffects(e)!=="trigger_pending"?[]:[{label:"URL condition not matched",status:this.Y.triggerStatusNoSideEffects(e)},{label:"event condition not matched",status:this.tt.triggerStatusNoSideEffects(e)},{label:"linked flag condition not matched",status:this.et.triggerStatusNoSideEffects()}].filter(({status:t})=>t===wt).map(({label:t})=>t)}checkEventTriggerConditions(e,t,n){this.tt.checkEventTriggerConditions(e,t,n)}checkUrlTriggerConditions(e,t,n,r){this.Y.checkUrlTriggerConditions(e,t,n,r)}activateTrigger(e,t){var n;const r=e==="url"?Ao+this.group.id:xo+this.group.id;(n=this._instance.persistence)===null||n===void 0||n.register({[r]:t})}stop(){this.Y.stop(),this.tt.stop(),this.et.stop()}};function Ol(e){if(e.rrwebError)return gi;if(!e.receivedFlags)return Bt;if(!e.isRecordingEnabled)return ft;if(e.urlTriggerMatching.urlBlocked)return mi;const t=e.isSampled===!0,n=new vi([e.eventTriggerMatching,e.urlTriggerMatching,e.linkedFlagMatching]).triggerStatus(e.sessionId);return t?pi:n==="trigger_activated"?fi:n==="trigger_pending"?Bt:e.isSampled===!1?ft:fi}function zo(e){if(e.rrwebError)return gi;if(!e.receivedFlags)return Bt;if(!e.isRecordingEnabled)return ft;if(e.urlTriggerMatching.urlBlocked)return mi;const t=new yi([e.eventTriggerMatching,e.urlTriggerMatching,e.linkedFlagMatching]).triggerStatus(e.sessionId),n=t!==zt,r=Qe(e.isSampled);return n&&t==="trigger_pending"?Bt:n&&t==="trigger_disabled"||r&&!e.isSampled?ft:e.isSampled===!0?pi:fi}function Wo(){const e=[];return function(t,n){if(xe(n)||Te(n)){for(;e.length>0&&e[e.length-1]!==this;)e.pop();return e.includes(n)?"[Circular]":(e.push(n),n)}return n}}function Wt(e){try{const t=JSON.stringify(e,Wo());return t?new Blob([t]).size:0}catch{return-1}}function br(e){if(Fe(e))return 4;if(U(e))return 0;switch(typeof e){case"string":return e.length+2;case"number":return String(e).length;case"boolean":return e?4:5;case"object":{if(Te(e)){let i=2;for(let s=0;e.length>s;s++){s>0&&(i+=1);const c=e[s];i+=U(c)||Fe(c)?4:br(c)}return i}const t=e;let n=2,r=!0;for(const i in t){if(!{}.hasOwnProperty.call(t,i))continue;const s=t[i];U(s)||(r||(n+=1),r=!1,n+=i.length+3+br(s))}return n}default:return 0}}function bi(e,t=66060288e-1){if(e.size>=t&&e.data.length>1){const n=Math.floor(e.data.length/2),r=e.sizes.slice(0,n),i=e.sizes.slice(n);return[bi({size:r.reduce((s,c)=>s+c,0),data:e.data.slice(0,n),sizes:r,sessionId:e.sessionId,windowId:e.windowId}),bi({size:i.reduce((s,c)=>s+c,0),data:e.data.slice(n),sizes:i,sessionId:e.sessionId,windowId:e.windowId})].flatMap(s=>s)}return[e]}var We=Uint8Array,Pe=Uint16Array,qt=Uint32Array,Si=new We([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]),wi=new We([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]),qo=new We([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),jo=function(e,t){for(var n=new Pe(31),r=0;31>r;++r)n[r]=t+=1<<e[r-1];var i=new qt(n[30]);for(r=1;30>r;++r)for(var s=n[r];n[r+1]>s;++s)i[s]=s-n[r]<<5|r;return[n,i]},Uo=jo(Si,2),_i=Uo[1];Uo[0][28]=258,_i[258]=28;for(var Vo=jo(wi,0)[1],ki=new Pe(32768),le=0;32768>le;++le){var jt=(43690&le)>>>1|(21845&le)<<1;ki[le]=((65280&(jt=(61680&(jt=(52428&jt)>>>2|(13107&jt)<<2))>>>4|(3855&jt)<<4))>>>8|(255&jt)<<8)>>>1}var kn=function(e,t,n){for(var r=e.length,i=0,s=new Pe(t);r>i;++i)++s[e[i]-1];var c,l=new Pe(t);for(i=0;t>i;++i)l[i]=l[i-1]+s[i-1]<<1;if(n){c=new Pe(1<<t);var o=15-t;for(i=0;r>i;++i)if(e[i])for(var a=i<<4|e[i],u=t-e[i],h=l[e[i]-1]++<<u,d=h|(1<<u)-1;d>=h;++h)c[ki[h]>>>o]=a}else for(c=new Pe(r),i=0;r>i;++i)c[i]=ki[l[e[i]-1]++]>>>15-e[i];return c},_t=new We(288);for(le=0;144>le;++le)_t[le]=8;for(le=144;256>le;++le)_t[le]=9;for(le=256;280>le;++le)_t[le]=7;for(le=280;288>le;++le)_t[le]=8;var Sr=new We(32);for(le=0;32>le;++le)Sr[le]=5;var Nl=kn(_t,9,0),Dl=kn(Sr,5,0),Go=function(e){return(e/8|0)+(7&e&&1)},Yo=function(e,t,n){(t==null||0>t)&&(t=0),(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof Pe?Pe:e instanceof qt?qt:We)(n-t);return r.set(e.subarray(t,n)),r},at=function(e,t,n){var r=t/8|0;e[r]|=n<<=7&t,e[r+1]|=n>>>8},In=function(e,t,n){var r=t/8|0;e[r]|=n<<=7&t,e[r+1]|=n>>>8,e[r+2]|=n>>>16},Ii=function(e,t){for(var n=[],r=0;e.length>r;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,s=n.slice();if(!i)return[new We(0),0];if(i==1){var c=new We(n[0].s+1);return c[n[0].s]=1,[c,1]}n.sort(function(S,b){return S.f-b.f}),n.push({s:-1,f:25001});var l=n[0],o=n[1],a=0,u=1,h=2;for(n[0]={s:-1,f:l.f+o.f,l,r:o};u!=i-1;)l=n[n[h].f>n[a].f?a++:h++],o=n[a!=u&&n[h].f>n[a].f?a++:h++],n[u++]={s:-1,f:l.f+o.f,l,r:o};var d=s[0].s;for(r=1;i>r;++r)s[r].s>d&&(d=s[r].s);var p=new Pe(d+1),f=Ci(n[u-1],p,0);if(f>t){r=0;var m=0,y=f-t,g=1<<y;for(s.sort(function(S,b){return p[b.s]-p[S.s]||S.f-b.f});i>r;++r){var v=s[r].s;if(t>=p[v])break;m+=g-(1<<f-p[v]),p[v]=t}for(m>>>=y;m>0;){var w=s[r].s;t>p[w]?m-=1<<t-p[w]++-1:++r}for(;r>=0&&m;--r){var _=s[r].s;p[_]==t&&(--p[_],++m)}f=t}return[new We(p),f]},Ci=function(e,t,n){return e.s==-1?Math.max(Ci(e.l,t,n+1),Ci(e.r,t,n+1)):t[e.s]=n},Zo=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Pe(++t),r=0,i=e[0],s=1,c=function(o){n[r++]=o},l=1;t>=l;++l)if(e[l]==i&&l!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)c(32754);s>2&&(c(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(c(i),--s;s>6;s-=6)c(8304);s>2&&(c(s-3<<5|8208),s=0)}for(;s--;)c(i);s=1,i=e[l]}return[n.subarray(0,r),t]},Cn=function(e,t){for(var n=0,r=0;t.length>r;++r)n+=e[r]*t[r];return n},wr=function(e,t,n){var r=n.length,i=Go(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var s=0;r>s;++s)e[i+s+4]=n[s];return 8*(i+4+r)},Xo=function(e,t,n,r,i,s,c,l,o,a,u){at(t,u++,n),++i[256];for(var h=Ii(i,15),d=h[0],p=h[1],f=Ii(s,15),m=f[0],y=f[1],g=Zo(d),v=g[0],w=g[1],_=Zo(m),S=_[0],b=_[1],k=new Pe(19),C=0;v.length>C;++C)k[31&v[C]]++;for(C=0;S.length>C;++C)k[31&S[C]]++;for(var M=Ii(k,7),E=M[0],R=M[1],A=19;A>4&&!E[qo[A-1]];--A);var $,W,ue,ie,oe=a+5<<3,z=Cn(i,_t)+Cn(s,Sr)+c,ce=Cn(i,d)+Cn(s,m)+c+14+3*A+Cn(k,E)+(2*k[16]+3*k[17]+7*k[18]);if(z>=oe&&ce>=oe)return wr(t,u,e.subarray(o,o+a));if(at(t,u,1+(z>ce)),u+=2,z>ce){$=kn(d,p,0),W=d,ue=kn(m,y,0),ie=m;var Oe=kn(E,R,0);for(at(t,u,w-257),at(t,u+5,b-1),at(t,u+10,A-4),u+=14,C=0;A>C;++C)at(t,u+3*C,E[qo[C]]);u+=3*A;for(var T=[v,S],D=0;2>D;++D){var ee=T[D];for(C=0;ee.length>C;++C)at(t,u,Oe[V=31&ee[C]]),u+=E[V],V>15&&(at(t,u,ee[C]>>>5&127),u+=ee[C]>>>12)}}else $=Nl,W=_t,ue=Dl,ie=Sr;for(C=0;l>C;++C)if(r[C]>255){var V;In(t,u,$[257+(V=r[C]>>>18&31)]),u+=W[V+257],V>7&&(at(t,u,r[C]>>>23&31),u+=Si[V]);var ae=31&r[C];In(t,u,ue[ae]),u+=ie[ae],ae>3&&(In(t,u,r[C]>>>5&8191),u+=wi[ae])}else In(t,u,$[r[C]]),u+=W[r[C]];return In(t,u,$[256]),u+W[256]},Fl=new qt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Pl=new We(0),$l=(function(){for(var e=new qt(256),t=0;256>t;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e})(),Mi=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function Bl(e,t){t===void 0&&(t={});var n=(function(){var d=4294967295;return{p(p){for(var f=d,m=0;p.length>m;++m)f=$l[255&f^p[m]]^f>>>8;d=f},d(){return 4294967295^d}}})(),r=e.length;n.p(e);var i,s,c,l,o,a,u=(l=10+((i=t).filename&&i.filename.length+1||0),o=8,(function(d,p,f,m,y,g){var v=d.length,w=new We(m+v+5*(1+Math.floor(v/7e3))+y),_=w.subarray(m,w.length-y),S=0;if(!p||8>v)for(var b=0;v>=b;b+=65535){var k=b+65535;v>k?S=wr(_,S,d.subarray(b,k)):(_[b]=g,S=wr(_,S,d.subarray(b,v)))}else{for(var C=Fl[p-1],M=C>>>13,E=8191&C,R=(1<<f)-1,A=new Pe(32768),$=new Pe(R+1),W=Math.ceil(f/3),ue=2*W,ie=function(he){return(d[he]^d[he+1]<<W^d[he+2]<<ue)&R},oe=new qt(25e3),z=new Pe(288),ce=new Pe(32),Oe=0,T=0,D=(b=0,0),ee=0,V=0;v>b;++b){var ae=ie(b),ge=32767&b,_e=$[ae];if(A[ge]=_e,$[ae]=ge,b>=ee){var Ae=v-b;if((Oe>7e3||D>24576)&&Ae>423){S=Xo(d,_,0,oe,z,ce,T,D,V,b-V,S),D=Oe=T=0,V=b;for(var de=0;286>de;++de)z[de]=0;for(de=0;30>de;++de)ce[de]=0}var ke=2,fe=0,Be=E,Ne=ge-_e&32767;if(Ae>2&&ae==ie(b-Ne))for(var Je=Math.min(M,Ae)-1,Yt=Math.min(32767,b),Zt=Math.min(258,Ae);Yt>=Ne&&--Be&&ge!=_e;){if(d[b+ke]==d[b+ke-Ne]){for(var Ie=0;Zt>Ie&&d[b+Ie]==d[b+Ie-Ne];++Ie);if(Ie>ke){if(ke=Ie,fe=Ne,Ie>Je)break;var ye=Math.min(Ne,Ie-2),mt=0;for(de=0;ye>de;++de){var qe=b-Ne+de+32768&32767,O=qe-A[qe]+32768&32767;O>mt&&(mt=O,_e=qe)}}}Ne+=(ge=_e)-(_e=A[ge])+32768&32767}if(fe){oe[D++]=268435456|_i[ke]<<18|Vo[fe];var L=31&_i[ke],re=31&Vo[fe];T+=Si[L]+wi[re],++z[257+L],++ce[re],ee=b+ke,++Oe}else oe[D++]=d[b],++z[d[b]]}}S=Xo(d,_,g,oe,z,ce,T,D,V,b-V,S),g||(S=wr(_,S,Pl))}return Yo(w,0,m+Go(S)+y)})(s=e,(c=t).level==null?6:c.level,c.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+c.mem,l,o,!a)),h=u.length;return(function(d,p){var f=p.filename;if(d[0]=31,d[1]=139,d[2]=8,d[8]=2>p.level?4:p.level==9?2:0,d[9]=3,p.mtime!=0&&Mi(d,4,Math.floor(new Date(p.mtime||Date.now())/1e3)),f){d[3]=8;for(var m=0;f.length>=m;++m)d[m+10]=f.charCodeAt(m)}})(u,t),Mi(u,h-8,n.d()),Mi(u,h-4,r),u}function Jo(e,t){var n="";if(!t&&typeof TextDecoder<"u")return new TextDecoder().decode(e);for(var r=0;e.length>r;){var i=e[r++];128>i||t?n+=String.fromCharCode(i):224>i?n+=String.fromCharCode((31&i)<<6|63&e[r++]):240>i?n+=String.fromCharCode((15&i)<<12|(63&e[r++])<<6|63&e[r++]):(i=((15&i)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536,n+=String.fromCharCode(55296|i>>10,56320|1023&i))}return n}var Hl=class{constructor(e,t={}){var n,r,i,s;this._rrweb=e,this.it=t,this.rt={},this.ot=Date.now(),this.st=-1/0,this.ut=()=>{const l=Date.now(),o=l-this.ot;o>0?(this.ct=Math.min(this.dt,this.ct+o/1e3*this.ht),this.ot=l):this.ot=l},this.ft=l=>{if(!this.rt[l]){var o,a;this.rt[l]=!0;const u=this.vt(l);(o=(a=this.it).onBlockedNode)===null||o===void 0||o.call(a,l,u)}},this.yt=l=>{const o=this.vt(l);if(o?.nodeName!=="svg"&&o instanceof Element){const a=o.closest("svg");if(a)return[this._rrweb.mirror.getId(a),a]}return[l,o]},this.vt=l=>this._rrweb.mirror.getNode(l),this.bt=l=>{var o,a,u,h,d,p,f,m;return((o=(a=l.removes)===null||a===void 0?void 0:a.length)!==null&&o!==void 0?o:0)+((u=(h=l.attributes)===null||h===void 0?void 0:h.length)!==null&&u!==void 0?u:0)+((d=(p=l.texts)===null||p===void 0?void 0:p.length)!==null&&d!==void 0?d:0)+((f=(m=l.adds)===null||m===void 0?void 0:m.length)!==null&&f!==void 0?f:0)},this.throttleMutations=l=>{if(l.type!==3||l.data.source!==0)return l;const o=l.data,a=this.bt(o);if(o.attributes){const y=o.attributes.length;o.attributes=o.attributes.filter(v=>{const[w]=this.yt(v.id);return!this.wt.consumeRateLimit(w)&&v});const g=y-o.attributes.length;var u,h;g>0&&((u=(h=this.it).onDroppedAttributeMutations)===null||u===void 0||u.call(h,g))}const d=this.bt(o);if(d===0&&a!==d)return;if(this.kt)return l;this.ut();const p=br(l);var f,m;return p>this.ct?((f=(m=this.it).onDroppedOversizedMutation)===null||f===void 0||f.call(m,p),void this._t()):(this.ct-=p,l)},this._t=()=>{if(this.St)return;const l=Math.max(0,this.xt-(Date.now()-this.st));this.St=setTimeout(()=>{var o,a;this.St=void 0,this.st=Date.now(),(o=(a=this.it).requestFullSnapshot)===null||o===void 0||o.call(a)},l)},this.wt=new al({bucketSize:(n=this.it.bucketSize)!==null&&n!==void 0?n:100,refillRate:(r=this.it.refillRate)!==null&&r!==void 0?r:10,refillInterval:1e3,I:this.ft,$:ot}),this.dt=(i=this.it.bytesBucketSize)!==null&&i!==void 0?i:0,this.ht=(s=this.it.bytesRefillRate)!==null&&s!==void 0?s:25600,this.kt=!Number.isFinite(this.dt)||0>=this.dt,this.ct=this.dt;const c=this.it.resyncIntervalMs;this.xt=we(c)&&Number.isFinite(c)&&c>0?c:3e5}reset(){this.rt={},this.St&&(clearTimeout(this.St),this.St=void 0),this.st=Date.now()}stop(){this.wt.stop(),this.reset(),this.ct=this.dt,this.ot=Date.now(),this.st=-1/0}};Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return we(e)&&isFinite(e)&&Math.floor(e)===e}),Y&&!U(Y.crypto)&&crypto;let kt=null;const Xe={Et(){if(!Fe(kt))return kt;if(kt=!0,U(Y))kt=!1;else try{const e="__support__";Xe.At(e,"xyz"),Xe.Ot(e)!=='"xyz"'&&(kt=!1),Xe.Lt(e)}catch{kt=!1}return kt},Pt(e){ot.error("sessionStorage error: ",e)},Ot(e){try{return Y?.sessionStorage.getItem(e)}catch(t){Xe.Pt(t)}return null},Dt(e){try{return JSON.parse(Xe.Ot(e))||null}catch{}return null},At(e,t){try{return Y?.sessionStorage.setItem(e,JSON.stringify(t)),!0}catch(n){Xe.Pt(n)}return!1},Lt(e){try{Y?.sessionStorage.removeItem(e)}catch(t){Xe.Pt(t)}}};Sn.DEBUG=!1,Sn.LIB_VERSION="1.434.12",Sn.LIB_NAME="web";var Ri=Sn,zl=class{constructor(e){if(!e.persistence)throw new Error("it is not valid to not have persistence and be this far into setting up the application");this.Ft=e.get_property.bind(e),this.Nt=e.persistence.set_property.bind(e.persistence)}trackSize(e,t){this.Nt(Lo,{sessionId:e,size:this.currentTrackedSize(e)+t})}currentTrackedSize(e){const t=this.Ft(Lo);return xe(n=t)&&ht(n.sessionId)&&we(n.size)&&t.sessionId===e?t.size:0;var n}};function Ko(e,t){return(function(n){let r=0;for(let i=0;n.length>i;i++)r=(r<<5)-r+n.charCodeAt(i),r|=0;return Math.abs(r)})(e)%100<pt(100*t,0,100,ot)}const Qo=(e,t)=>{if(!(n=>{try{new RegExp(n)}catch{return!1}return!0})(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}},_r=e=>e.toLowerCase(),Wl={exact:(e,t)=>t.some(n=>e.some(r=>n===r)),is_not:(e,t)=>t.every(n=>e.every(r=>n!==r)),regex:(e,t)=>t.some(n=>e.some(r=>Qo(n,r))),not_regex:(e,t)=>t.every(n=>e.every(r=>!Qo(n,r))),icontains:(e,t)=>t.map(_r).some(n=>e.map(_r).some(r=>n.includes(r))),not_icontains:(e,t)=>t.map(_r).every(n=>e.map(_r).every(r=>!n.includes(r))),gt:(e,t)=>t.some(n=>{const r=parseFloat(n);return!isNaN(r)&&e.some(i=>r>parseFloat(i))}),lt:(e,t)=>t.some(n=>{const r=parseFloat(n);return!isNaN(r)&&e.some(i=>r<parseFloat(i))})},ql=new Set(["is_not","not_icontains","not_regex"]);function ea(e,t,n){return!e||e.length===0||e.every(r=>{const i=r.type==="person"?n:t,s=i?.[r.key],c=r.operator||"exact";if(U(s)||Fe(s))return ql.has(c);const l=Wl[c];return!!l&&!U(r.value)&&!Fe(r.value)&&l(Te(r.value)?r.value.map(String):[String(r.value)],Te(s)?s.map(String):[String(s)])})}const Mn=Pt("[SessionRecording]");function jl(e,t){return t?e:"!"+e}function Ei(e,t){return e===t||e!=="!"+t&&null}var Ul=class{constructor(e,t,n,r,i,s,c){this._instance=e,this.Y=t,this.tt=n,this.et=r,this.qt=i,this.jt=s,this.Bt=c,this.Ht=null,this.zt=zo}onRemoteConfig(e){this.Ht=we(e.sampleRate)?e.sampleRate:null,e.triggerMatchType==="any"?(this.Ut=new vi([this.tt,this.Y]),this.zt=Ol):(this.Ut=new yi([this.tt,this.Y]),this.zt=zo),this._instance.register_for_session({[No]:e.triggerMatchType}),this.Y.onConfig(e),this.tt.onConfig(e),this.et.onConfig(e,(t,n)=>{this.qt("linked_flag_matched",{flag:t,variant:n}),this.Bt()})}getStatus(e){return this.zt({receivedFlags:!0,isRecordingEnabled:!0,isSampled:e.isSampled,rrwebError:e.rrwebError,urlTriggerMatching:e.urlTriggerMatching,eventTriggerMatching:e.eventTriggerMatching,linkedFlagMatching:e.linkedFlagMatching,sessionId:e.sessionId})}getMinimumDuration(e){const t=this._instance.get_property("$session_recording_remote_config"),n=t?.minimumDurationMilliseconds;return we(n)?n:null}checkUrlTriggers(e,t,n,r){this.Y.checkUrlTriggerConditions(t,n,r,e)}setupEventTriggerListeners(e,t,n){if(this.tt.K.length!==0&&Ze(this.Wt))return this.Wt=e(r=>{try{this.tt.checkEventTriggerConditions(r.event,n,t)}catch(i){Mn.error("Could not activate event trigger",i)}}),this.Wt}makeSamplingDecisions(e){var t;const n=this.Ht;var r,i;if(!we(n))return(r=this._instance.persistence)===null||r===void 0||r.unregister("$session_is_sampled"),void((i=this._instance.persistence)===null||i===void 0||i.unregister("$replay_sample_rate"));const s=this._instance.get_property(di),c=this._instance.get_property("$replay_sample_rate"),l=Ei(s,e),o=we(c)&&c!==n,a=U(c)&&s===e,u=o||a||!Qe(l),h=u?Ko(e,n):l;u&&(h?this.qt("sampled"):Mn.warn(`Sample rate (${n}) has determined that this sessionId (${e}) will not be sent to the server.`)),(t=this._instance.persistence)===null||t===void 0||t.register({$session_is_sampled:jl(e,h),$replay_sample_rate:Fe(c)&&s===e?null:n})}ensureSamplingDecision(e){if(!we(this.Ht))return;const t=this._instance.get_property(di);Qe(Ei(t,e))||this.makeSamplingDecisions(e)}onFlushComplete(){}clearConditionalRecordingPersistence(){var e,t,n,r,i;(e=this._instance.persistence)===null||e===void 0||e.unregister("$session_recording_event_trigger_activated_session"),(t=this._instance.persistence)===null||t===void 0||t.unregister("$session_recording_url_trigger_activated_session"),(n=this._instance.persistence)===null||n===void 0||n.unregister("$session_is_sampled"),(r=this._instance.persistence)===null||r===void 0||r.unregister("$replay_sample_rate"),(i=this._instance.persistence)===null||i===void 0||i.unregister("$session_past_minimum_duration")}updateActiveTriggers(e){}hasPendingTriggers(e){var t;return((t=this.Ut)===null||t===void 0?void 0:t.triggerStatus(e))===wt}getPendingTriggerConditions(e){return[{label:"URL condition not matched",status:this.Y.triggerStatusNoSideEffects(e)},{label:"event condition not matched",status:this.tt.triggerStatusNoSideEffects(e)},{label:"linked flag condition not matched",status:this.et.triggerStatusNoSideEffects()}].filter(({status:t})=>t===wt).map(({label:t})=>t)}stop(){var e;(e=this.Wt)===null||e===void 0||e.call(this),this.Wt=void 0,this.tt.stop(),this.Y.stop(),this.et.stop()}},Vl=class{constructor(e,t,n,r,i){this._instance=e,this.Y=t,this.qt=n,this.Vt=r,this.Bt=i,this.Zt=[],this.Gt=new Map,this.Qt=!1}onRemoteConfig(e){e.triggerGroups&&e.triggerGroups.length!==0?(this.Jt(e.triggerGroups),this._instance.register_for_session({[No]:"v2_trigger_groups",[Ml]:e.triggerGroups.length}),this.Y.onConfig(e)):Mn.warn("[V2Strategy] No trigger groups configured")}getStatus(e){return(function(t){if(t.rrwebError)return gi;if(!t.receivedFlags)return Bt;if(!t.isRecordingEnabled)return ft;if(t.urlTriggerMatching.urlBlocked)return mi;const n=t.triggerGroupMatchers,r=t.triggerGroupSamplingResults;if(n.length===0)return ft;let i=!1,s=!1;for(const c of n){const l=c.triggerStatus(t.sessionId);if(l==="trigger_activated"){const o=c.group.id,a=r.get(o);U(a)?ot.warn("[V2 Triggers] Group activated but no sampling decision found",{groupId:o}):a===!0&&(s=!0)}else l==="trigger_pending"&&(i=!0)}return s?pi:i?Bt:ft})({receivedFlags:!0,isRecordingEnabled:!0,isSampled:e.isSampled,rrwebError:e.rrwebError,urlTriggerMatching:e.urlTriggerMatching,eventTriggerMatching:e.eventTriggerMatching,linkedFlagMatching:e.linkedFlagMatching,sessionId:e.sessionId,triggerGroupMatchers:this.Zt,triggerGroupSamplingResults:this.Gt,minimumDuration:this.getMinimumDuration(e.sessionId)})}getMinimumDuration(e){let t=null;for(const n of this.Zt)if(n.triggerStatus(e)==="trigger_activated"){const r=n.group.minDurationMs;we(r)&&(Fe(t)||t>r)&&(t=r)}return t}checkUrlTriggers(e,t,n,r){this.Y.checkUrlBlocklist(t,n);for(const i of this.Zt)i.checkUrlTriggerConditions(t,n,s=>{this.Kt(i,void 0)&&(i.activateTrigger(s,e),this.updateActiveTriggers(e),this.Bt(s))},e)}setupEventTriggerListeners(e,t,n){return this.Wt=e(r=>{var i;if(this.Qt)return Mn.info("[SessionRecorder] Stopping trigger checks - initial buffer flushed"),(i=this.Wt)===null||i===void 0||i.call(this),void(this.Wt=void 0);try{for(const s of this.Zt)s.checkEventTriggerConditions(r.event,c=>{if(!this.Kt(s,r.properties))return;const l=(s.group.conditions.events||[]).filter(a=>a.name===r.event),o=this._instance.get_property(Oo);l.some(a=>!a.properties||a.properties.length===0||ea(a.properties,r.properties,o))&&(s.activateTrigger(c,t),this.updateActiveTriggers(t),this.Bt(c))},t)}catch(s){Mn.error("Could not activate event trigger for trigger groups",s)}}),this.Wt}makeSamplingDecisions(e){for(const n of this.Zt){var t;const r=n.group,i=r.id,s=r.sampleRate,c="$posthog_sr_group_sampling_"+i,l=this._instance.get_property(c);let o=null,a=!1,u=!1,h=!1;if(xe(l)){const f=l.sessionId,m=l.sampleRate,y=l.sampled;a=typeof f=="string"&&f!==e,u=we(m)&&m!==s,o=f===e&&we(m)&&m===s&&Qe(y)?y:null}else o=l===e||null,a=typeof l=="string"&&l!==e,h=l===e;const d=a||u||h||!Qe(o),p=d?Ko(e+i,s):o;d&&this.Vt("triggerGroupSamplingDecisionMade",{group_id:i,group_name:r.name,sampleRate:s,isSampled:p}),this.Gt.set(i,p),(t=this._instance.persistence)===null||t===void 0||t.register({[c]:{sessionId:e,sampleRate:s,sampled:p}})}this.updateActiveTriggers(e)}ensureSamplingDecision(e){}onFlushComplete(){this.Qt=!0}clearConditionalRecordingPersistence(){var e,t,n;(e=this._instance.persistence)===null||e===void 0||e.unregister("$session_is_sampled"),(t=this._instance.persistence)===null||t===void 0||t.unregister("$replay_sample_rate"),(n=this._instance.persistence)===null||n===void 0||n.unregister("$session_past_minimum_duration");for(const c of this.Zt){var r,i,s;const l=c.group.id;(r=this._instance.persistence)===null||r===void 0||r.unregister("$posthog_sr_group_event_trigger_"+l),(i=this._instance.persistence)===null||i===void 0||i.unregister("$posthog_sr_group_url_trigger_"+l),(s=this._instance.persistence)===null||s===void 0||s.unregister("$posthog_sr_group_sampling_"+l)}}updateActiveTriggers(e){const t=[];for(const n of this.Zt){const r=n.group,i=r.id,s=n.triggerStatus(e)==="trigger_activated",c=this.Gt.get(i)===!0;s&&t.push({id:i,name:r.name,matched:!0,sampled:c})}this._instance.register_for_session({[Cl]:t})}hasPendingTriggers(e){for(const t of this.Zt)if(t.triggerStatus(e)==="trigger_pending")return!0;return!1}getPendingTriggerConditions(e){return this.Zt.flatMap(t=>t.triggerStatusNoSideEffects(e)!=="trigger_pending"?[]:t.getPendingTriggerConditions(e).map(n=>`trigger group "${t.group.name}": ${n}`))}stop(){var e;(e=this.Wt)===null||e===void 0||e.call(this),this.Wt=void 0,this.Zt.forEach(t=>t.stop()),this.Zt=[],this.Gt.clear(),this.Y.stop()}Kt(e,t){const n=e.group.conditions.properties;return!n||n.length===0||ea(n,t,this._instance.get_property(Oo))}Jt(e){this.Zt.forEach(t=>t.stop()),this.Zt=[],this.Gt.clear();for(const t of e){const n=new Ll(this._instance,t,(r,i)=>{this.qt("linked_flag_matched",{flag:r,variant:i,group_id:t.id,group_name:t.name}),this.Bt()});this.Zt.push(n)}}};const Gl=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],ta=1e5,Yl=/^[A-Za-z0-9]*[A-Za-z][A-Za-z0-9]*$/,na=[],ra=()=>!1,Zl="@type @id actionStatus availability bestRating contentRating encodingFormat eventAttendanceMode eventStatus highPrice inLanguage isAccessibleForFree isFamilyFriendly itemCondition itemListOrder lowPrice maximumAttendeeCapacity nonprofitStatus numberOfItems offerCount position price priceCurrency priceValidUntil publicAccess ratingCount ratingValue reviewCount smokingAllowed worstRating".split(" "),Xl="Action BorrowAction ReadAction SearchAction SeekToAction SolveMathAction WatchAction".split(" "),Rn="AutoDealer Bakery BarOrPub CafeOrCoffeeShop CollegeOrUniversity Corporation DaySpa Dentist EducationalOrganization Electrician FoodEstablishment GovernmentOrganization HealthClub Hotel LegalService Library LibrarySystem LocalBusiness Locksmith LodgingBusiness MedicalBusiness NGO OnlineStore Organization PerformingGroup Pharmacy Physician Plumber RealEstateAgent Restaurant School SportsOrganization Store".split(" "),ia="Accommodation AdministrativeArea Country Place State".split(" "),It={AggregateOffer:{offers:["Offer"]},Brand:{name:!0},BreadcrumbList:{itemListElement:["ListItem"]},CreativeWork:{genre:!0,dateCreated:!0,dateModified:!0,datePublished:!0,expires:!0,learningResourceType:!0,educationalLevel:!0,educationalUse:!0,interactivityType:!0,aggregateRating:["AggregateRating"],potentialAction:Xl,publisher:Rn},Event:{startDate:!0,endDate:!0,previousStartDate:!0,aggregateRating:["AggregateRating"],offers:["AggregateOffer","Offer"]},ItemList:{itemListElement:["ListItem"]},ListItem:{item:na},Offer:{seller:Rn},Organization:{name:!0,legalName:!0,foundingDate:!0,dissolutionDate:!0,aggregateRating:["AggregateRating"],brand:["Brand"]},Place:{aggregateRating:["AggregateRating"]},Product:{name:!0,sku:!0,mpn:!0,gtin:!0,gtin8:!0,gtin12:!0,gtin13:!0,gtin14:!0,productID:!0,productGroupID:!0,asin:!0,model:!0,category:!0,color:!0,material:!0,pattern:!0,size:!0,productionDate:!0,releaseDate:!0,brand:["Brand","Organization"],manufacturer:Rn,offers:["Offer","AggregateOffer"],aggregateRating:["AggregateRating"]},Service:{name:!0,serviceType:!0,category:!0,provider:Rn,areaServed:ia,offers:["AggregateOffer","Offer"],aggregateRating:["AggregateRating"]},OfferCatalog:{name:!0,itemListElement:na}},Jl=[["3DModel AboutPage Answer Article AudioObject Blog BlogPosting Book Clip CollectionPage Comment ContactPage Course CreativeWorkSeason CreativeWorkSeries DataCatalog DataDownload DataFeed Dataset DiscussionForumPosting Episode FAQPage Game HowTo HowToDirection HowToSection HowToStep HowToTip ImageObject LearningResource MediaObject Message MobileApplication Movie MusicPlaylist MusicRecording NewsArticle Photograph PodcastEpisode PodcastSeries ProfilePage QAPage Question Quiz Recipe Review ScholarlyArticle SearchResultsPage SiteNavigationElement SocialMediaPosting SoftwareApplication TVEpisode TVSeries TechArticle VacationRental VideoGame VideoObject WebApplication WebPage WebPageElement WebSite".split(" "),It.CreativeWork],["BroadcastEvent BusinessEvent EducationEvent Festival MusicEvent SportsEvent TheaterEvent".split(" "),It.Event],[Rn,It.Organization],[ia,It.Place],["Car IndividualProduct ProductGroup ProductModel".split(" "),It.Product]];function Ut(e,t){return ti.call(e,t)?e[t]:void 0}function sa(e){const t=typeof e;return Fe(e)||t==="string"||t==="number"||t==="boolean"}function oa(e,t){return t&&(function(n){return ht(n)&&/^(https?:\/\/|\/|\.\.?\/)/i.test(n.trim())})(e)?t(e.trim())||void 0:e}function aa(e,t){return Te(e)&&e.every(sa)?e.map(n=>oa(n,t)).filter(n=>!U(n)):sa(e)?oa(e,t):void 0}function Kl(e,t){if(typeof e!="string")return;const n=e.trim(),r=n.indexOf("#"),i=0>r?n:n.slice(r+1);if(!(!i||0>r&&(/^[a-z][a-z\d+.-]*:/i.test(n)||n.includes("/")||n.includes("?"))))try{return t(i)?i:void 0}catch{return}}function la(e){if(ti.call(It,e))return It[e];for(const[t,n]of Jl)if(t.includes(e))return n}function kr(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0})}function Ti(e,t,n,r){if(Te(e)){const i=e.map(s=>Ti(s,t,n,r)).filter(s=>!U(s));return i.length?i:void 0}return ca(e,t,n,r)||void 0}function ca(e,t,n,r){if(!xe(e)||!(function(a){return a.remainingNodes?(a.remainingNodes--,!0):(a.exceeded=!0,!1)})(n))return null;const i=Ut(e,"@type"),s=(function(a){const u=new Set,h=typeof a=="string"?[a]:Te(a)?a:[],d=[];for(const p of h){if(typeof p!="string")continue;const f=p.replace(/^https?:\/\/schema\.org\//,"");if(100>=f.length&&Yl.test(f)&&!u.has(f)&&(u.add(f),d.push(f),d.length===20))break}return d})(i),c=s.filter(a=>!!la(a)&&(!r||!r.length||r.includes(a))),l={};for(const a of Zl){const u=a==="@type"?s.length?typeof i=="string"?s[0]:s:void 0:a==="@id"?Kl(Ut(e,a),t):aa(Ut(e,a),n.maskUrl);U(u)||kr(l,a,u)}for(const a of c){const u=la(a);for(const h of Object.keys(u)){const d=Ut(e,h),p=u[h];if(p===!0){const f=aa(d,n.maskUrl);U(f)||kr(l,h,f)}else{const f=Ti(d,t,n,p);U(f)||kr(l,h,f)}}}const o=Ti(Ut(e,"@graph"),t,n);return U(o)||kr(l,"@graph",o),Object.keys(l).length?l:null}function ua(e,t,n){if(!xe(e))return null;const r=Ut(e,"@context");if(typeof r!="string"||!/^https?:\/\/schema\.org\/?$/.test(r))return null;const i=ca(e,t,n);return i?B({"@context":"https://schema.org"},i):null}function En(e){var t;return e.nodeName==="SCRIPT"&&((t=e.getAttribute("type"))===null||t===void 0?void 0:t.trim().toLowerCase())==="application/ld+json"}function Ql(e,t,n){if(typeof t=="string"?e.classList.contains(t):t&&Array.from(e.classList).some(r=>(t.lastIndex=0,t.test(r))))return!0;try{return!!n&&e.matches(n)}catch{return!1}}function xi(e,t,n){for(let r=e;r;){if(Ql(r,t,n))return!0;const i=r.parentNode;r=r.parentElement||(i&&i.nodeType===i.DOCUMENT_FRAGMENT_NODE?i.host:null)}return!1}function da(e){return En(e)?[e]:e.nodeType!==e.ELEMENT_NODE?[]:Array.from(e.querySelectorAll("script")).filter(En)}function Tn(e){return U(e)?void 0:Math.round(e)}function ha(e){return xe(e)?e.network_timing:e}const K=Pt("[SessionRecording]"),ec=[1,2,3,4,5,6,7,12],pa=e=>({rrwebMethod:e,enqueuedAt:Date.now(),attempt:1});function lt(){var e;return st==null||(e=st.__PosthogExtensions__)===null||e===void 0?void 0:e.rrweb}function Ir(){var e;return(e=lt())===null||e===void 0?void 0:e.record}function fa(e){try{return JSON.stringify(e)}catch(t){if(t instanceof RangeError)throw t;return JSON.stringify(e,Wo())}}function xn(e){return Jo(Bl((function(t){var n=t.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(t);for(var r=new We(t.length+(t.length>>>1)),i=0,s=function(a){r[i++]=a},c=0;n>c;++c){if(i+5>r.length){var l=new We(i+8+(n-c<<1));l.set(r),r=l}var o=t.charCodeAt(c);128>o?s(o):2048>o?(s(192|o>>>6),s(128|63&o)):o>55295&&57344>o?(s(240|(o=65536+(1047552&o)|1023&t.charCodeAt(++c))>>>18),s(128|o>>>12&63),s(128|o>>>6&63),s(128|63&o)):(s(224|o>>>12),s(128|o>>>6&63),s(128|63&o))}return Yo(r,0,i)})(fa(e))),!0)}function An(e){return Ai.apply(this,arguments)}function Ai(){return Ai=Ve(function*(e){const t=yield(function(n){return ni.apply(this,arguments)})(fa(e),Ri.DEBUG,{rethrow:!0});return Jo(new Uint8Array(yield t.arrayBuffer()),!0)}),Ai.apply(this,arguments)}let Vt,Cr;const tc=typeof globalThis<"u"&&"CompressionStream"in globalThis&&"TextEncoder"in globalThis&&"Response"in globalThis&&typeof Response.prototype.blob=="function";let ma=!1;function Mr(e){var t;return Te(e)&&e.length===0?(Vt=(t=Vt)!==null&&t!==void 0?t:xn([]),Vt):xn(e)}function Rr(e){return ga.apply(this,arguments)}function ga(){return(ga=Ve(function*(e){var t;return Te(e)&&e.length===0?Vt||(Cr=(t=Cr)!==null&&t!==void 0?t:An([]).then(n=>(Vt=n,n)).catch(n=>{throw Vt=void 0,Cr=void 0,n}),Cr):An(e)})).apply(this,arguments)}function va(e){return tc&&!ma&&(function(t){return t.type===2||t.type===3&&(t.data.source===0||t.data.source===8)})(e)}function Gt(e){return{event:e,size:br(e)}}function ya(e,t){return B(B({},e),{},{data:t,cv:"2024-10"})}function Er(e,t){return B(B({},e),{},{cv:"2024-10",data:B(B({},e.data),t)})}function Tr(e){try{if(e.type===2)return Gt(ya(e,xn(e.data)));if(e.type===3&&e.data.source===0)return Gt(Er(e,{texts:Mr(e.data.texts),attributes:Mr(e.data.attributes),removes:Mr(e.data.removes),adds:Mr(e.data.adds)}));if(e.type===3&&e.data.source===8)return Gt(Er(e,{adds:e.data.adds?xn(e.data.adds):void 0,removes:e.data.removes?xn(e.data.removes):void 0}))}catch(t){K.warn("could not compress event - will use uncompressed event",t)}return{event:e,size:Wt(e)}}function ba(){return(ba=Ve(function*(e){try{if(e.type===2)return Gt(ya(e,yield An(e.data)));if(e.type===3&&e.data.source===0){const[t,n,r,i]=yield Promise.all([Rr(e.data.texts),Rr(e.data.attributes),Rr(e.data.removes),Rr(e.data.adds)]);return Gt(Er(e,{texts:t,attributes:n,removes:r,adds:i}))}if(e.type===3&&e.data.source===8){const[t,n]=yield Promise.all([e.data.adds?An(e.data.adds):void 0,e.data.removes?An(e.data.removes):void 0]);return Gt(Er(e,{adds:t,removes:n}))}}catch(t){return(n=>{if(!n||typeof n!="object")return!1;const r="name"in n?String(n.name):"";return(i=>!(!i||typeof i!="object")&&("name"in i?String(i.name):"")==="NotReadableError")(n)||r===Xs})(t)&&(ma=!0),K.warn("could not compress event asynchronously - trying synchronous compression",t),Tr(e)}return{event:e,size:Wt(e)}})).apply(this,arguments)}function Li(e,t){return e.type===5&&e.data.tag===t}function Sa(e){return Li(e,"sessionIdle")}function Oi(e){return Li(e,"$session_ending")}function Ni(e){return Li(e,"$session_starting")}var nc=class{get sessionId(){return this.Xt}get Yt(){if(!this._instance.sessionManager)throw new Error("[SessionRecording] must be started with a valid sessionManager.");return this._instance.sessionManager}get te(){return this._instance.config.session_recording.session_idle_threshold_ms||3e5}get ee(){return Ei(this._instance.get_property(di),this.sessionId)}get Ht(){var e;const t=(e=this.ne)===null||e===void 0?void 0:e.sampleRate;return we(t)?t:null}get ie(){var e,t;return(e=(t=this.re)===null||t===void 0?void 0:t.getMinimumDuration(this.sessionId))!==null&&e!==void 0?e:null}constructor(e,t){this._instance=e,this.oe="/s/",this._forceAllowLocalhostNetworkCapture=!1,this.se=void 0,this.ae=!1,this.le=Date.now(),this.ue=!1,this.ce=[],this.de="unknown",this.he=0,this.fe=0,this.ve=0,this.pe=0,this.me=0,this.ge=!1,this.ye=!1,this.be=!1,this.we=!1,this.ke=!1,this._e=!1,this.Se=!1,this.xe=!1,this.Ce=!1,this.Me=!1,this.Ie=!1,this.Te=!1,this.Re=[],this.$e=void 0,this.Ee=void 0,this.Ae=!1,this.Oe=[],this.Le=0,this.Pe=0,this.De=!1,this.Fe=void 0,this.Wt=void 0,this.Ne=void 0,this.qe=void 0,this.je=void 0,this.Be=(s,c,l)=>{var o,a,u,h;if(!l||s===this.Xt&&c===this.He)return;const d=!l.noSessionId&&(l.activityTimeout||l.sessionPastMaximumLength),p=this.Xt,f=this.He;var m;if(d&&this.Vt("$session_ending",{currentSessionId:p,currentWindowId:f,nextSessionId:s,nextWindowId:c,changeReason:l,lastActivityTimestamp:this.le,flushed_size:(m=this.ze)===null||m===void 0?void 0:m.currentTrackedSize(p)}),(o=this._instance.persistence)===null||o===void 0||o.unregister("$debug_first_full_snapshot_timestamp"),this.Se=!1,(a=lt())===null||a===void 0||(u=a.resetMaxDepthState)===null||u===void 0||u.call(a),this.Vt("$session_id_change",{sessionId:s,windowId:c,changeReason:l}),this.Ue(),!(this.de===!1&&this.isStarted||this.Xt===s&&this.He===c)){const y=this.Xt!==s&&this.de!==!1;this.de="unknown",this.We(y)}d&&this.Vt("$session_starting",{previousSessionId:p,previousWindowId:f,nextSessionId:s,nextWindowId:c,changeReason:l,lastActivityTimestamp:this.le}),(h=this.re)===null||h===void 0||h.makeSamplingDecisions(s)},this.Ve=!1,this.Ze=()=>{var s;return((s=this._instance.persistence)===null||s===void 0?void 0:s.props.$session_past_minimum_duration)===this.Xt},this.Ge=()=>{var s,c;if(this.Rt.data.length===0)return null;const l=(s=this.Rt.data[0])===null||s===void 0?void 0:s.timestamp,o=(c=this.Rt.data[this.Rt.data.length-1])===null||c===void 0?void 0:c.timestamp;return we(l)&&we(o)?o-l:null},this.Qe=()=>{var s,c;const l=this.ie;if(!we(l))return!1;if((s=(c=this._instance.config.session_recording)===null||c===void 0?void 0:c.strictMinimumDuration)===null||s===void 0||!s){const u=this.Je;return we(u)&&u>=0&&l>u}if(this.Ze())return!1;const o=this.Ge();return!!Fe(o)||l>o||((a=this._instance.persistence)===null||a===void 0||a.register({$session_past_minimum_duration:this.Xt}),!1);var a},this.Ke=()=>{this.status!=="buffering"?(this.ge&&this.ye&&this.Xe&&!this.be&&this.Ye(void 0),this.tn(),this.en(!0)):this.nn()},this.rn=()=>{this.Ke()},this.sn=()=>{this.Vt("browser offline",{})},this.an=()=>{this.Vt("browser online",{})},this.ln=()=>{rt!=null&&rt.visibilityState&&(rt.visibilityState==="visible"&&(this.Xe=!0),this.Vt("window "+rt.visibilityState,{}))},this.Xe=t==null||t;const{sessionId:n,windowId:r,sessionStartTimestamp:i}=this.Yt.checkAndGetSessionAndWindowId();this.Xt=n,this.He=r,this._sessionStartTimestamp=i,this.et=new Bo(this._instance),this.Y=new $o(this._instance),this.tt=new Ho(this._instance),this.Rt=this.nn(),this.un="ph_replay_pending_buffer_"+JSON.stringify([this._instance.config.persistence_name||this._instance.config.token,this._instance.config.token]),this.Yt.sessionTimeoutMs>this.te||K.warn(`session_idle_threshold_ms (${this.te}) is greater than the session timeout (${this.Yt.sessionTimeoutMs}). Session will never be detected as idle`),this.ze=new zl(this._instance)}setDocumentWasEverVisible(e){e&&(this.Xe=!0)}get cn(){var e,t,n,r,i,s,c,l,o;const a=(e=this.ne)===null||e===void 0?void 0:e.masking,u={maskAllInputs:(t=this._instance.config.session_recording)===null||t===void 0?void 0:t.maskAllInputs,maskTextSelector:(n=this._instance.config.session_recording)===null||n===void 0?void 0:n.maskTextSelector,blockSelector:(r=this._instance.config.session_recording)===null||r===void 0?void 0:r.blockSelector,maskAllElementAttributes:(i=this._instance.config.session_recording)===null||i===void 0?void 0:i.maskAllElementAttributes},h=(s=u?.maskAllInputs)!==null&&s!==void 0?s:a?.maskAllInputs,d=(c=u?.maskTextSelector)!==null&&c!==void 0?c:a?.maskTextSelector,p=(l=u?.blockSelector)!==null&&l!==void 0?l:a?.blockSelector,f=(o=u?.maskAllElementAttributes)!==null&&o!==void 0?o:a?.maskAllElementAttributes;return U(h)&&U(d)&&U(p)&&U(f)?void 0:{maskAllInputs:h==null||h,maskTextSelector:d,blockSelector:p,maskAllElementAttributes:f}}dn(){var e;if(this.Ce)return;const t=(e=this.ne)===null||e===void 0?void 0:e.masking;if(Ze(t))return;const n=this._instance.config.session_recording,r=["maskAllInputs","maskTextSelector","blockSelector","maskAllElementAttributes"].filter(i=>{const s=n?.[i],c=t[i];return!U(s)&&s!==c});r.length!==0&&(this.Ce=!0,K.warn('Session recording masking is configured both in `posthog.init` and in your project settings, and they differ. The `session_recording` options in `posthog.init` take precedence, so the project ("Privacy and masking") setting is ignored for: '+r.join(", ")+". Remove these masking options from `posthog.init` to use the project setting instead. See https://posthog.com/docs/session-replay/privacy",{client:{maskAllInputs:n?.maskAllInputs,maskTextSelector:n?.maskTextSelector,blockSelector:n?.blockSelector,maskAllElementAttributes:n?.maskAllElementAttributes},project:t}))}get hn(){var e;return pt((e=this._instance.config.session_recording.canvasCapture)===null||e===void 0?void 0:e.resolutionScale,.1,1,Pt("canvas recording resolution scale"),1)}get fn(){var e,t,n,r,i,s,c;const l=this._instance.config.session_recording.captureCanvas,o=(e=this.ne)===null||e===void 0?void 0:e.canvasRecording,a=(t=(n=l?.recordCanvas)!==null&&n!==void 0?n:o?.enabled)!==null&&t!==void 0&&t,u=(r=(i=l?.canvasFps)!==null&&i!==void 0?i:o?.fps)!==null&&r!==void 0?r:4;let h=(s=(c=l?.canvasQuality)!==null&&c!==void 0?c:o?.quality)!==null&&s!==void 0?s:.4;if(typeof h=="string"){const d=parseFloat(h);h=isNaN(d)?.4:d}return{enabled:a,fps:pt(u,0,12,Pt("canvas recording fps"),4),quality:pt(h,0,1,Pt("canvas recording quality"),.4)}}get vn(){var e;const t=!!(!((e=this.ne)===null||e===void 0)&&e.consoleLogRecordingEnabled),n=this._instance.config.enable_recording_console_log;return n??t}get pn(){var e,t,n;const r=(e=this.ne)===null||e===void 0?void 0:e.networkPayloadCapture,i={recordHeaders:(t=this._instance.config.session_recording)===null||t===void 0?void 0:t.recordHeaders,recordBody:(n=this._instance.config.session_recording)===null||n===void 0?void 0:n.recordBody},s=i?.recordHeaders||r?.recordHeaders,c=i?.recordBody||r?.recordBody,l=ha(this._instance.config.capture_performance),o=ha(r?.capturePerformance),a=!!(Qe(l)?l:o);return s||c||a?{recordHeaders:s,recordBody:c,recordPerformance:a}:void 0}mn(){var e,t;const n=[],r=(e=st.__PosthogExtensions__)===null||e===void 0||(e=e.rrwebPlugins)===null||e===void 0?void 0:e.getRecordConsolePlugin;r&&this.vn&&n.push(r());const i=(t=st.__PosthogExtensions__)===null||t===void 0||(t=t.rrwebPlugins)===null||t===void 0?void 0:t.getRecordNetworkPlugin;if(this.pn&&De(i))if(!cl.includes(ol.hostname)||this._forceAllowLocalhostNetworkCapture){const s=De(this._instance.requestRouter.isIngestionEndpoint)?this._instance.requestRouter.isIngestionEndpoint.bind(this._instance.requestRouter):void 0;n.push(i(((c,l,o)=>{const a={payloadSizeLimitBytes:$t.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...$t.performanceEntryTypeToObserve],payloadHostDenyList:[...l.payloadHostDenyList||[],...$t.payloadHostDenyList]},u=c.session_recording.recordHeaders!==!1&&l.recordHeaders,h=c.session_recording.recordBody!==!1&&l.recordBody,d=c.capture_performance!==!1&&l.recordPerformance,p=(y=>{const g=lo(y);return v=>(v!=null&&v.requestBody&&(v.requestBody=uo(v.requestBody,v.requestHeaders,g,"Request")),v!=null&&v.responseBody&&(v.responseBody=uo(v.responseBody,v.responseHeaders,g,"Response")),v)})(a),f=y=>{return p(((v,w,_)=>{var S;if(_?.(v.name))return;const b=eo(v.name);let k=w.indexOf("http")===0?(S=eo(w))===null||S===void 0?void 0:S.pathname:w;k==="/"&&(k="");const C=b?.pathname.replace(k||"","");return b&&C&&gl.some(M=>C.indexOf(M)===0)?void 0:v})((co((g=y).requestHeaders),co(g.responseHeaders),g),c.api_host,o));var g},m=De(c.session_recording.maskNetworkRequestFn);return m&&De(c.session_recording.maskCapturedNetworkRequestFn)&&ot.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),m&&(c.session_recording.maskCapturedNetworkRequestFn=y=>{const g=c.session_recording.maskNetworkRequestFn({url:y.name});return!g&&y.isInitial?g:B(B({},y),{},{name:g?.url})}),a.maskRequestFn=De(c.session_recording.maskCapturedNetworkRequestFn)?y=>{var g,v;const w=f(y);if(!w)return;const _=w.isInitial?{name:"",entryType:w.entryType,startTime:w.startTime,duration:w.duration,endTime:w.endTime,timeOrigin:w.timeOrigin,timestamp:w.timestamp,isInitial:!0}:void 0,S=(g=(v=c.session_recording).maskCapturedNetworkRequestFn)===null||g===void 0?void 0:g.call(v,w);return Ze(S)&&_?(po.add(_),_):S??void 0}:y=>(function(g){if(!U(g))return g.requestBody=ho(g.requestBody,"Request"),g.responseBody=ho(g.responseBody,"Response"),g})(f(y)),B(B(B({},$t),a),{},{recordHeaders:u,recordBody:h,recordPerformance:d,recordInitialRequests:d,streamNetworkBody:c.session_recording.streamNetworkBody===!0})})(this._instance.config,this.pn,s)))}else K.info("NetworkCapture not started because we are on localhost.");return n}gn(e){return this._instance.config.disable_capture_url_hashes?Zs(e):e}yn(e,t=!1){const n=t?Zs(e):this.gn(e),r=this._instance.config.mask_personal_data_properties?[...Gl,...this._instance.config.custom_personal_data_properties||[]]:[];return this.bn((function(i,s){if(!i||!s||!s.length)return i;const c=i.split("#"),l=c[1],o=(c[0]||"").split("?"),a=o[1],u=o[0],h=(a||"").split("&"),d=[];for(let f=0;h.length>f;f++){const m=h[f].split("=");Te(m)&&(s.includes(m[0])?d.push(m[0]+"=<masked>"):d.push(h[f]))}let p=u;return a!=null&&(p+="?"+d.join("&")),l!=null&&(p+="#"+l),p})(n,r))}bn(e){const t=this._instance.config.session_recording;if(t.maskCapturedNetworkRequestFn){var n;const r=t.maskCapturedNetworkRequestFn({name:e});return(n=r?.name)!==null&&n!==void 0?n:r?.url}if(t.maskNetworkRequestFn){const r=t.maskNetworkRequestFn({url:e});return r?.url}return e}wn(e){try{return e.rrwebMethod(),!0}catch(t){return 10>this.ce.length?this.ce.push({enqueuedAt:e.enqueuedAt||Date.now(),attempt:e.attempt+1,rrwebMethod:e.rrwebMethod}):K.warn("could not emit queued rrweb event.",t,e),!1}}Vt(e,t){return this.wn(pa(()=>Ir().addCustomEvent(e,t)))}kn(){var e;return this.ae&&((e=this._instance.config.session_recording)===null||e===void 0?void 0:e.captureJsonLd)===!0&&!this.Y.urlBlocked&&this.de!==!0}_n(e){if(!this.kn())return!1;try{const t=Ir();return!!t&&(t.addCustomEvent("$json_ld",e),this.kn())}catch{return!1}}Sn(e=!1){Promise.resolve().then(()=>{var t;return(t=this.xn)===null||t===void 0?void 0:t.scan(e)})}Cn(){try{if(this._instance.config.capture_pageview||!Y)return;const e=new URL(Y.location.href),t=this.yn(e.origin+e.pathname+e.search);this.Mn!==t&&(this.Mn=t,this.Vt("$url_changed",{href:t}))}catch{}}In(){if(this.ce.length){const e=[...this.ce];this.ce=[],e.forEach(t=>{Date.now()-t.enqueuedAt>2e3||this.wn(t)})}}jt(){return this.wn(pa(()=>Ir().takeFullSnapshot()))}get Tn(){var e,t,n;if(!((e=this.re)===null||e===void 0)&&e.hasPendingTriggers(this.sessionId)&&!["sampled","active"].includes(this.status)){var r;const i=(r=this._instance.config.session_recording)===null||r===void 0?void 0:r.trigger_pending_buffer_interval_millis;return we(i)&&Number.isFinite(i)&&i>=1e3&&36e5>=i?i:6e4}return(t=(n=this._instance.config.session_recording)===null||n===void 0?void 0:n.full_snapshot_interval_millis)!==null&&t!==void 0?t:3e5}Rn(){if(this.$n&&clearInterval(this.$n),this.de===!0)return;const e=this.Tn;e&&(this.$n=setInterval(()=>{this.jt()},e))}Bt(e){e==="event"&&this.En(),!this.Y.urlBlocked&&["sampled","active"].includes(this.status)&&this.Rn()}An(){var e;this.Y.urlBlocked||(this.Y.urlBlocked=!0,(e=this.xn)===null||e===void 0||e.scan(),clearInterval(this.$n),K.info("recording paused due to URL blocker"),this.Vt("recording paused",{reason:"url blocker"}))}On(){var e;this.Y.urlBlocked&&((e=this.xn)===null||e===void 0||e.scan(),this.Y.urlBlocked=!1,this.jt(),this.Sn(),this.Rn(),this.Vt("recording resumed",{reason:"left blocked url"}),K.info("recording resumed"))}Ln(e,t){var n;if(e==="event"&&this.En(),!this.ue&&((n=this.re)===null||n===void 0?void 0:n.hasPendingTriggers(this.sessionId))){this.ue=!0;try{var r,i;const s=e==="url"?Eo:To;(r=this._instance.persistence)===null||r===void 0||r.register({[s]:this.sessionId}),(i=this.re)===null||i===void 0||i.updateActiveTriggers(this.sessionId),this.Bt(),this.en(),this.qt(e+"_trigger_matched",{[e==="url"?"matchedUrl":"matchedEvent"]:t})}finally{this.ue=!1}}}get isStarted(){return!!this.se}get ne(){const e=this._instance.get_property("$session_recording_remote_config");if(!e)return;let t;try{t=xe(e)?e:JSON.parse(e)}catch(r){K.warn("persisted remote config for session recording is invalid and will be ignored",r);return}if(!this.isStarted&&!this.Ve){var n;const r=(n=t.cache_timestamp)!==null&&n!==void 0?n:Date.now();if(Date.now()-r>36e5)return void K.info("persisted remote config for session recording is stale and will be ignored",{cacheTimestamp:r,persistedConfig:e})}return t}Pn(e,t,n){this._instance.get_property(e)&&(t(),n())}start(e){var t,n;const r=this.ne;if(!r)return void K.info("remote config must be stored in persistence before recording can start");if(!this.isStarted){const l=this.de!==!1&&!this.we;this.Ye(l?"no_interaction_since_recording_started":void 0),this.we=!1,this.ye=l,this.be=!1}this.De&&(this.Dn(),this.nn());const{sessionId:i,windowId:s,sessionStartTimestamp:c}=this.Yt.checkAndGetSessionAndWindowId();this.Xt=i,this.He=s,this._sessionStartTimestamp=c,this.Fn(),(t=this._instance.persistence)===null||t===void 0||t.unregister("$debug_first_full_snapshot_timestamp"),r!=null&&r.endpoint&&(this.oe=r?.endpoint),this.re=r?.version===2&&r?.triggerGroups&&r.triggerGroups.length>0?new Vl(this._instance,this.Y,this.qt.bind(this),this.Vt.bind(this),this.Bt.bind(this)):new Ul(this._instance,this.Y,this.tt,this.et,this.qt.bind(this),this.jt.bind(this),this.Bt.bind(this)),this.re.onRemoteConfig(r),(n=this.Wt)===null||n===void 0||n.call(this),this.Wt=this.re.setupEventTriggerListeners(this._instance.on.bind(this._instance,"eventCaptured"),this.sessionId,(l,o)=>this.Ln(l,o)),this.Pn(Io,()=>{this.overrideSampling()},()=>{var l;return(l=this._instance.persistence)===null||l===void 0?void 0:l.unregister(Io)}),this.Pn(Co,()=>{this.overrideLinkedFlag()},()=>{var l;return(l=this._instance.persistence)===null||l===void 0?void 0:l.unregister(Co)}),this.Pn(Ro,()=>{this.overrideTrigger("event")},()=>{var l;return(l=this._instance.persistence)===null||l===void 0?void 0:l.unregister(Ro)}),this.Pn(Mo,()=>{this.overrideTrigger("url")},()=>{var l;return(l=this._instance.persistence)===null||l===void 0?void 0:l.unregister(Mo)}),this.re.makeSamplingDecisions(this.sessionId),this.Nn(),this.ke||(wn(Y,"beforeunload",this.Ke),wn(Y,"pagehide",this.rn),wn(Y,"offline",this.sn),wn(Y,"online",this.an),wn(rt,"visibilitychange",this.ln),!this.Ne&&De(this.Yt.onSessionId)&&(this.Ne=this.Yt.onSessionId(this.Be)),!this.qe&&De(this.Yt.on)?this.qe=this.Yt.on("forcedIdleReset",()=>{this.Ue(),this.de="unknown",this.stop(),this.je=this.Yt.onSessionId((l,o,a)=>{var u;(u=this.je)===null||u===void 0||u.call(this),this.je=void 0,this.Be(l,o,a)})}):De(this.Yt.on)||K.warn("bundled core has no SessionIdManager.on (requires posthog-js >= 1.268.6); recording will start but skip forced-idle-reset handling"),Ze(this.Fe)&&(this.Fe=this._instance.on("eventCaptured",l=>{try{if(l.event==="$pageview"){const o=l?.properties.$current_url?this.yn(l.properties.$current_url):"";if(!o)return;this.Vt("$pageview",{href:o})}}catch(o){K.error("Could not add $pageview to rrweb session",o)}})),this.status==="active"&&this.qt(e||"recording_initialized"))}qn(){var e,t,n,r,i,s;Y?.removeEventListener("beforeunload",this.Ke),Y?.removeEventListener("pagehide",this.rn),Y?.removeEventListener("offline",this.sn),Y?.removeEventListener("online",this.an),rt?.removeEventListener("visibilitychange",this.ln),clearInterval(this.$n),this.jn(),(e=this.Fe)===null||e===void 0||e.call(this),this.Fe=void 0,(t=this.Wt)===null||t===void 0||t.call(this),this.Wt=void 0,(n=this.Ne)===null||n===void 0||n.call(this),this.Ne=void 0,(r=this.qe)===null||r===void 0||r.call(this),this.qe=void 0,(i=this.je)===null||i===void 0||i.call(this),this.je=void 0,(s=this.re)===null||s===void 0||s.stop(),this.Bn(),this.Dn()}Dn(){this.Pe+=1,this.Oe=[],this.Le=0,this.Hn=void 0,this.De=!1}Bn(){var e,t;(e=this.zn)===null||e===void 0||e.stop(),this.ce=[],(t=this.xn)===null||t===void 0||t.stop(),this.xn=void 0,this.ae=!1;try{var n;(n=this.se)===null||n===void 0||n.call(this)}catch(r){K.warn("could not stop rrweb",r)}this.se=void 0}Un(){if(!this.Hn||this.Le===0)return!1;if(this.De)return!0;this.De=!0,this.Wn=void 0;const e=this.Pe;return this.jn(),this.Bn(),this.Hn.catch(()=>{}).then(()=>{e===this.Pe&&(this.De=!1,this.en(),this.nn(),this.Vn(),this.qn(),K.info("stopped"))}).catch(()=>{this.De=!1,this.Vn(),this.qn(),K.info("stopped")}),!0}stop(){if(this.Bn(),this.Ve)this.tn();else if(this.Un())return;this.en(),this.nn(),this.Vn(),this.qn(),K.info("stopped")}Vn(){this.Ye(void 0,{preserveLogDedup:this.Ve}),this.ye=!1}flushBeforeIdentityReset(){(this.isStarted||this.De)&&(this.tn(),this.en())}We(e){this.Ve=!0,this.le=Date.now();try{var t,n;this.stop(),this.Zn=void 0,this.Gn=void 0,this.fe=0,this.ve=0,this.pe=0,this.me=0,(t=lt())===null||t===void 0||(n=t.resetSnapshotCostState)===null||n===void 0||n.call(t),this.start("session_id_changed")}finally{this.Ve=!1}this.Ye(e?"no_interaction_since_session_rotated":void 0),this.ye=!1}Ye(e,{preserveLogDedup:t=!1}={}){if(this.ge=!U(e),this.Wn=e,U(e))return void(t||(this.Qn=void 0));if(this.Ve)return;const n=`${this.sessionId}:${e}`;n!==this.Qn&&(this.Qn=n,K.info(`holding buffer: ${e}. nothing is uploaded until the user interacts with the page`))}En(){this.isStarted||(this.we=!0),this.ge&&(this.Ye(void 0),this.ye=!1,this.be&&(this.be=!1,this.jt()),this.Jn())}discard({discardProducerEvents:e=!1}={}){this.ge=!0,e&&(this.nn(),this.Bn()),this.nn(),this.qn(),this.nn(),this.Vn(),K.info("discarded")}Kn(e,t,n,r,i){if(n===-1)return this.me+=1,void K.warn("could not stringify event - dropping it to keep the rest of the recording");const s={$snapshot_bytes:n,$snapshot_data:t,$session_id:r,$window_id:i};this.status!=="disabled"?(this.Xn(e,r),this.Yn(s)):this.nn()}ti(){try{this.ei()}catch(e){this.xe||(this.xe=!0,K.error("could not track full snapshot cost",e))}}ei(){var e,t;const n=(e=lt())===null||e===void 0||(t=e.getLastSnapshotCost)===null||t===void 0?void 0:t.call(e);n&&n!==this.Gn&&(this.Gn=n,this.Zn&&this.Zn.durationMs>=n.durationMs||(this.Zn=n),500>n.durationMs||K.warn("full snapshot was slow, the page may have been unresponsive while it ran",{durationMs:Math.round(n.durationMs),stylesheetMs:Math.round(n.stylesheetMs),nodeCount:n.nodeCount,cssRuleCount:n.cssRuleCount,nonDeferrableCssRuleCount:n.nonDeferrableCssRuleCount,deferredStylesheetCount:n.deferredStylesheetCount}))}Xn(e,t){e.type!==2?e.type===3&&(U(this.$e)||this.$e===t||this.Ee===t||(this.Ee=t,K.info("incremental snapshot for a session with no full snapshot - requesting one",{sessionId:t}),this.jt())):this.$e=t}ni(e){e.counted&&e.generation===this.Pe&&(this.Le=Math.max(0,this.Le-1)),e.counted=!1,this.Oe=this.Oe.filter(t=>t!==e)}ii(e,t,n){e.processed||e.generation!==this.Pe||(e.processed=!0,this.Kn(e.event,t,n,e.targetSessionId,e.targetWindowId))}ri(e){try{let t,n=e.event;if(e.compressionEnabled)try{({event:n,size:t}=Tr(e.event))}catch(r){K.warn("could not process queued compression event - will use uncompressed event",r)}U(t)&&(t=Wt(e.event));try{this.ii(e,n,t)}catch(r){K.warn("could not capture queued compression event",r)}}finally{this.ni(e)}}tn(){[...this.Oe].forEach(e=>{try{this.ri(e)}catch(t){K.warn("could not drain queued compression event",t)}})}oi(e,t,n,r){var i=this;const s={event:e,compressionEnabled:t,targetSessionId:n,targetWindowId:r,generation:this.Pe,processed:!1,counted:!0};this.Oe.push(s),this.Le+=1;const c=(l=Ve(function*(){try{if(s.processed)return;let o,a;try{const u=t?va(e)?yield(function(h){return ba.apply(this,arguments)})(e):Tr(e):{event:e,size:Wt(e)};o=u.event,a=u.size}catch(u){K.warn("could not process queued compression event - will use uncompressed event",u),o=e,a=Wt(e)}i.ii(s,o,a)}finally{i.ni(s)}}),function(){return l.apply(this,arguments)});var l;this.Hn=this.Hn?this.Hn.catch(()=>{}).then(c):c()}onRRwebEmit(e){var t,n,r,i,s,c,l,o,a,u,h,d,p,f;if(!this._instance.sessionManager||(this.In(),!e||!xe(e)))return;if(e.type===4){const R=this.yn(e.data.href);if(this.Mn=R,!R)return;e.data.href=R}else this.Cn();if((t=this.re)===null||t===void 0||t.checkUrlTriggers(this.sessionId,()=>this.An(),()=>this.On(),(R,A)=>this.Ln(R,A)),this.Y.urlBlocked&&((u=e).type!==5||u.data.tag!=="recording paused"))return;e.type===2&&((h=lt())!==null&&h!==void 0&&(d=h.wasMaxDepthReached)!==null&&d!==void 0&&d.call(h)&&(this.Se=!0),this.ti(),Promise.resolve().then(()=>this.ti()),this.Rn(),(p=this.zn)===null||p===void 0||p.reset(),(f=this._instance.persistence)===null||f===void 0||f.register_once({$debug_first_full_snapshot_timestamp:e.timestamp},void 0));const m=e.type===2&&((n=this.re)===null||n===void 0?void 0:n.hasPendingTriggers(this.sessionId));m&&this.si();const y=this.zn?this.zn.throttleMutations(e):e;if(!y)return void(this.de===!0&&this.he++);const g=(function(R){const A=R;if(A&&xe(A)&&A.type===6&&xe(A.data)&&A.data.plugin==="rrweb/console@1"){A.data.payload.payload.length>10&&(A.data.payload.payload=A.data.payload.payload.slice(0,10),A.data.payload.payload.push("...[truncated]"));const $=[];for(let W=0;A.data.payload.payload.length>W;W++)$.push(A.data.payload.payload[W]&&A.data.payload.payload[W].length>2e3?A.data.payload.payload[W].slice(0,2e3)+"...[truncated]":A.data.payload.payload[W]);return A.data.payload.payload=$,R}return R})(y),v=(function(R){return Oi(R)?R.data.payload:null})(g),w=(function(R){return Ni(R)?R.data.payload:null})(g),_=(function(R){return Sa(R)?R.data.payload:null})(g);v||w?v!=null&&v.lastActivityTimestamp&&(g.timestamp=v.lastActivityTimestamp):_!=null&&_.sessionId||this.ai(g),e.type===2&&(this.Re.push([this.Xt,e.timestamp]),this.Re.length>6&&(this.Re=this.Re.slice(-6)));const S=(r=(i=(s=v?.currentSessionId)!==null&&s!==void 0?s:w?.nextSessionId)!==null&&i!==void 0?i:_?.sessionId)!==null&&r!==void 0?r:this.Xt,b=(c=(l=(o=v?.currentWindowId)!==null&&o!==void 0?o:w?.nextWindowId)!==null&&l!==void 0?l:_?.windowId)!==null&&c!==void 0?c:this.He;if(this.de===!0&&!(function(R){return Sa(R)||Oi(R)||Ni(R)})(g))return void((function(R){return R.type===2||R.type===4||R.type===3&&R.data.source!==9})(g)&&this.he++);g.type===2&&(this.he=0),_&&(g.timestamp=_.lastActivityTimestamp+_.threshold);const k=this.ae;this.ae=!0,m?this.Sn(!0):k||this.Sn();const C=(a=this._instance.config.session_recording.compress_events)===null||a===void 0||a;if(g.type===5&&g.data.tag==="$json_ld"){let R;try{R=Y?this.yn(Y.location.href):void 0}catch{}g.data.href=R}if(this.Le>0||C&&va(g))return void this.oi(g,C,S,b);const{event:M,size:E}=C?Tr(g):{event:g,size:Wt(g)};this.Kn(g,M,E,S,b)}get status(){return this.re?this.re.getStatus({instance:this._instance,sessionId:this.sessionId,isSampled:this.ee,rrwebError:this.ke,urlTriggerMatching:this.Y,eventTriggerMatching:this.tt,linkedFlagMatching:this.et,remoteConfig:this.ne}):ft}log(e,t="log"){var n;(n=this._instance.sessionRecording)===null||n===void 0||n.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:t,trace:[],payload:[JSON.stringify(e)]}},timestamp:Date.now()})}overrideLinkedFlag(){this.et.linkedFlagSeen=!0,this.jt(),this.En(),this.qt("linked_flag_overridden")}overrideSampling(){var e;(e=this._instance.persistence)===null||e===void 0||e.register({$session_is_sampled:this.sessionId,$replay_sample_rate:null}),this.jt(),this.En(),this.qt("sampling_overridden")}overrideTrigger(e){this.Ln(e),this.En()}li(){try{var e;const t=Y==null||(e=Y.location)===null||e===void 0?void 0:e.href;if(!t)return;const n=this.yn(t);return n&&new URL(n).hostname||void 0}catch{return}}jn(){this.ui&&(clearTimeout(this.ui),this.ui=void 0)}Jn(){this.ui||(this.ui=setTimeout(()=>{this.en()},2e3))}ci(){return this.$e!==this.Rt.sessionId&&this.Rt.data.length!==0&&this.Rt.data.every(e=>e?.type===5&&!Oi(e)&&!Ni(e))}di(){var e,t;return(e=(t=this.re)===null||t===void 0?void 0:t.getPendingTriggerConditions(this.sessionId))!==null&&e!==void 0?e:[]}hi(e){if(e!=="buffering")return U(this.fi)||this._instance.register_for_session({[hi]:[]}),void(this.fi=void 0);const t=this.di();if(t.length===0)return U(this.fi)||this._instance.register_for_session({[hi]:[]}),void(this.fi=void 0);const n=t.join(", "),r=`${this.sessionId}:${n}`;r!==this.fi&&(this.fi=r,this._instance.register_for_session({[hi]:t}),K.info(`buffering: ${n}`))}pi(){var e;return this._instance.config.persistence!=="memory"&&((e=this._instance.persistence)===null||e===void 0?void 0:e.mi)!==!0&&Xe.Et()}gi(){this.Rt.data.length!==0&&this.Rt.size!==this.yi&&943718.4>=this.Rt.size&&this.pi()&&(this.yi=this.Rt.size,Xe.At(this.un,this.Rt))}Fn(){if(this.Ae||!this.pi())return;this.Ae=!0;const e=Xe.Dt(this.un);Xe.Lt(this.un),xe(e)&&Te(e.data)&&e.data.length!==0&&Te(e.sizes)&&e.sizes.length===e.data.length&&we(e.size)&&e.sessionId===this.Xt&&e.windowId===this.He&&(this.Rt.data.length>0||(this.Rt=e))}en(e=!1){var t;if(this.jn(),this.ge)return this.Rt;if(this.ci())return this.Rt.size>943718.4?this.nn():(e&&this.gi(),this.Rt);const n=this.Rt;(t=this.re)===null||t===void 0||t.ensureSamplingDecision(this.sessionId);const r=this.Qe(),i=this.status;if(this.hi(i),i==="buffering"||i==="paused"||i==="disabled"||r)return!e||i!=="active"&&i!=="sampled"||this.gi(),this.Jn(),this.Rt;if(this.Rt!==n)return this.Rt;if(n.data.length>0){var s;const c=this.li();bi(n).forEach(l=>{try{var o;(o=this.ze)===null||o===void 0||o.trackSize(l.sessionId,l.size),this.bi(B({$snapshot_bytes:l.size,$snapshot_data:l.data,$session_id:l.sessionId,$window_id:l.windowId,$lib:Ri.LIB_NAME,$lib_version:Ri.LIB_VERSION,$snapshot_host:c},this.me>0?{$sdk_debug_replay_unstringifiable_events_dropped:this.me}:{}))}catch(a){K.warn("could not capture snapshot chunk - skipping it",a)}}),U(this.yi)||(Xe.Lt(this.un),this.yi=void 0),(s=this.re)===null||s===void 0||s.onFlushComplete()}return this.nn()}Yn(e){var t;const n=2+(((t=this.Rt)===null||t===void 0?void 0:t.data.length)||0),r=e.$session_id,i=this.Rt.sessionId!==r;if(i||this.de!==!0&&!this.ge&&this.Rt.size+e.$snapshot_bytes+n>943718.4){const s=this.Xt;if(this.Rt=this.en(),this.Xt!==s)return;i&&this.Rt.data.length>0&&(this.Rt=this.nn()),this.Rt.sessionId=r,this.Rt.windowId=e.$window_id}this.ge&&(this.be||this.Rt.size+e.$snapshot_bytes+n>943718.4)?this.be||(this.be=!0,this.Rt=this.nn()):(this.Rt.size+=e.$snapshot_bytes,this.Rt.data.push(e.$snapshot_data),this.Rt.sizes.push(e.$snapshot_bytes),this.de===!0||this.ge||this.Jn())}bi(e){this._instance.capture("$snapshot",e,{_url:this._instance.requestRouter.endpointFor("api",this.oe),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}get Je(){var e,t;const n=(e=this.Rt)===null||e===void 0?void 0:e.data[((t=this.Rt)===null||t===void 0?void 0:t.data.length)-1];return n?n.timestamp-this._sessionStartTimestamp:null}si(){if(!this.Rt||this.Rt.data.length===0)return this.nn();let e=-1;for(let t=this.Rt.data.length-1;t>=0;t--)if(this.Rt.data[t].type===4){e=t;break}return 0>e?this.nn():(this.Rt.data=this.Rt.data.slice(e),this.Rt.sizes=this.Rt.sizes.slice(e),this.Rt.size=this.Rt.sizes.reduce((t,n)=>t+n,0),this.Rt)}nn(){return this.Rt={size:0,data:[],sizes:[],sessionId:this.Xt,windowId:this.He},this.Rt}qt(e,t){this._instance.register_for_session({[xl]:e}),K.info(e.replace("_"," "),t),e!=="session_id_changed"&&this.Vt("$recording_started",B({reason:e},t))}wi(e){var t;return e.type===3&&ec.indexOf((t=e.data)===null||t===void 0?void 0:t.source)!==-1}ai(e){const t=this.wi(e);t||this.de===!0||e.timestamp-this.le>this.te&&(this.de=!0,clearInterval(this.$n),this.Vt("sessionIdle",{eventTimestamp:e.timestamp,lastActivityTimestamp:this.le,threshold:this.te,bufferLength:this.Rt.data.length,bufferSize:this.Rt.size,sessionId:this.Xt,windowId:this.He}),this.en());const{windowId:n,sessionId:r}=this.Yt.checkAndGetSessionAndWindowId(!t,e.timestamp);let i=!1;if(t&&(this.le=e.timestamp,this.de)){const o=this.de==="unknown";this.de=!1,o||(this.Vt("sessionNoLongerIdle",{reason:"user activity",type:e.type}),i=!0)}const s=this.Xt!==r,c=this.He!==n;if(this.He=n,this.Xt=r,s||c){const o=s&&this.de!==!1;o&&(this.de="unknown"),this.We(o)}else if(t&&this.En(),i){var l;const o=["sampled","active"].includes(this.status)||((l=this.re)===null||l===void 0?void 0:l.hasPendingTriggers(this.sessionId));this.he>0&&o&&this.jt(),this.Sn(),this.Rn()}}Ue(){var e;(e=this.re)===null||e===void 0||e.clearConditionalRecordingPersistence()}get sdkDebugProperties(){var e,t,n,r,i,s,c,l,o,a,u,h,d,p;const f=(e=lt())===null||e===void 0||(t=e.getDeferredStylesheetStats)===null||t===void 0?void 0:t.call(e);return{$recording_status:this.status,$sdk_debug_replay_flush_hold_reason:this.Wn,$sdk_debug_replay_internal_buffer_length:this.Rt.data.length,$sdk_debug_replay_internal_buffer_size:this.Rt.size,$sdk_debug_current_session_duration:this.Je,$sdk_debug_session_start:this._sessionStartTimestamp,$sdk_debug_replay_flushed_size:(n=this.ze)===null||n===void 0?void 0:n.currentTrackedSize(this.sessionId),$sdk_debug_replay_full_snapshots:this.Re,$snapshot_max_depth_exceeded:this.Se,$sdk_debug_replay_slowest_full_snapshot_ms:Tn((r=this.Zn)===null||r===void 0?void 0:r.durationMs),$sdk_debug_replay_slowest_full_snapshot_stylesheet_ms:Tn((i=this.Zn)===null||i===void 0?void 0:i.stylesheetMs),$sdk_debug_replay_slowest_full_snapshot_nodes:(s=this.Zn)===null||s===void 0?void 0:s.nodeCount,$sdk_debug_replay_slowest_full_snapshot_css_rules:(c=this.Zn)===null||c===void 0?void 0:c.cssRuleCount,$sdk_debug_replay_slowest_full_snapshot_css_rules_non_deferrable:(l=this.Zn)===null||l===void 0?void 0:l.nonDeferrableCssRuleCount,$sdk_debug_replay_deferred_stylesheets:f?.deferredCount,$sdk_debug_replay_deferred_stylesheets_failed:f?.failedCount,$sdk_debug_replay_deferred_stylesheets_abandoned:f?.abandonedCount,$sdk_debug_replay_deferred_stylesheet_ms:Tn(f?.totalMs),$sdk_debug_replay_deferred_stylesheet_slowest_slice_ms:Tn(f?.slowestSliceMs),$sdk_debug_replay_slowest_mutation_batch_ms:Tn((o=lt())===null||o===void 0||(a=o.getMutationCost)===null||a===void 0||(a=a.call(o))===null||a===void 0?void 0:a.slowestBatchMs),$sdk_debug_replay_discarded_duration_samples:(u=lt())===null||u===void 0||(h=u.getDiscardedDurationSamples)===null||h===void 0?void 0:h.call(u),$sdk_debug_replay_throttled_mutations_dropped:this.fe,$sdk_debug_replay_oversized_mutations_dropped:this.ve,$sdk_debug_replay_oversized_mutation_bytes_dropped:this.pe,$sdk_debug_replay_unstringifiable_events_dropped:this.me,$sdk_debug_replay_rrweb_error:this.ke,$sdk_debug_replay_observer_init_failures:(d=lt())===null||d===void 0||(p=d.getObserverInitFailures)===null||p===void 0?void 0:p.call(d),[El]:!!this.se,[Tl]:this._e}}Nn(){var e;if(this.se)return;this._e=!0;const t={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,maskAllElementAttributes:!1,maskAttributeFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,inlineStylesheetBudgetRules:1e4,recordCrossOriginIframes:!1,sampling:void 0,attributeFilter:void 0},n=this._instance.config.session_recording;for(const[a,u]of Object.entries(n||{}))if(a in t)if(a==="maskInputOptions")t.maskInputOptions=B({password:!0},u);else if(a==="sampling"){const h=u??{},d={};U(h.mousemove)||(d.mousemove=h.mousemove),U(h.mouseInteraction)||(d.mouseInteraction=h.mouseInteraction),t.sampling=d}else t[a]=u;var r,i,s,c;n?.captureJsonLd===!0&&t.slimDOMOptions!==!0&&t.slimDOMOptions!=="all"&&(t.slimDOMOptions=B(B({},t.slimDOMOptions),{},{script:!0})),this.fn&&this.fn.enabled&&(t.recordCanvas=!0,t.sampling=B(B({},t.sampling),{},{canvas:this.fn.fps}),t.dataURLOptions={type:"image/webp",quality:this.fn.quality},t.canvasResolutionScale=this.hn,t.canvasMasking={configured:()=>{var a;return De((a=this._instance.config.session_recording)===null||a===void 0||(a=a.canvasCapture)===null||a===void 0?void 0:a.maskRegionsFn)},regionsFn:a=>{var u;const h=(u=this._instance.config.session_recording)===null||u===void 0||(u=u.canvasCapture)===null||u===void 0?void 0:u.maskRegionsFn;if(De(h))try{var d;return(d=h(a))!==null&&d!==void 0?d:null}catch(p){return this.Ie||(this.Ie=!0,K.warn("canvasCapture.maskRegionsFn threw, canvas frames will be skipped",p)),null}}}),this.cn&&(t.maskAllInputs=(r=this.cn.maskAllInputs)===null||r===void 0||r,t.maskTextSelector=(i=this.cn.maskTextSelector)!==null&&i!==void 0?i:void 0,t.blockSelector=(s=this.cn.blockSelector)!==null&&s!==void 0?s:void 0,t.maskAllElementAttributes=(c=this.cn.maskAllElementAttributes)!==null&&c!==void 0&&c),t.maskAllElementAttributes&&t.maskAttributeFn&&(t.maskAttributeFn=void 0,this.Me||(this.Me=!0,K.warn('`maskAllElementAttributes` and `maskAttributeFn` are mutually exclusive, and `maskAttributeFn` is being ignored. Remove one of the two. Note that `maskAllElementAttributes` can also come from your project\'s "Privacy and masking" settings. See https://posthog.com/docs/session-replay/privacy'))),this.dn();const l=Ir();if(!l)return void K.error("_startRecorder was called but rrwebRecord is not available. This indicates something has gone wrong.");this.zn=(e=this.zn)!==null&&e!==void 0?e:new Hl(l,{refillRate:this._instance.config.session_recording.__mutationThrottlerRefillRate,bucketSize:this._instance.config.session_recording.__mutationThrottlerBucketSize,onBlockedNode:(a,u)=>{const h=`Too many mutations on node '${a}'. Rate limiting. This could be due to SVG animations or something similar`;K.info(h,{node:u}),this.log("[SessionRecording] "+h,"warn")},onDroppedAttributeMutations:a=>this.fe+=a,bytesRefillRate:this._instance.config.session_recording.__mutationBytesRefillRate,bytesBucketSize:this._instance.config.session_recording.__mutationBytesBucketSize,resyncIntervalMs:this.Tn,onDroppedOversizedMutation:a=>{this.ve===0&&this.log("[SessionRecording] Dropped an oversized DOM mutation to keep the recording playable. The recording will resync with a full snapshot.","warn"),this.ve+=1,this.pe+=a},requestFullSnapshot:()=>this.jt()});const o=this.mn();if(this.se=l(B({emit:a=>{this.onRRwebEmit(a)},plugins:o,errorHandler:(a,u)=>u==="rrweb"&&(this.Te||(this.Te=!0,K.error("rrweb internal error - recording will continue but may be incomplete",a)),!0)},t)),!this.se)return this.ke=!0,void K.error("rrweb failed to start - Loss of recording data is possible. Check the browser console for rrweb errors.");this.ke=!1,n?.captureJsonLd===!0&&rt&&Y!=null&&Y.MutationObserver&&!this.xn&&(this.xn=(function(a,u,h){const d=new WeakMap,p=h.getCaptureState||(()=>!0);let f=ta;const m=(function(g,v){const w=v.attributeFilter;return v.maskAllElementAttributes||v.maskAttributeFn||w?.length&&!w.includes("id")?ra:_=>{const S=g.getElementById(_);return!!S&&S.nodeName!=="SCRIPT"&&(!v.isRecordedElement||v.isRecordedElement(S))&&!xi(S,v.blockClass,v.blockSelector)}})(a,h),y=g=>{try{const v=p();if(!f||v===!1||!g.isConnected||g.ownerDocument!==a||(function(b,k){return xi(b,k.blockClass,k.blockSelector)||xi(b,k.maskTextClass,k.maskTextSelector)})(g,h))return;const w=(function(b,k=ra,C){if(!b||b.length>ta)return null;try{const M=JSON.parse(b),E={maskUrl:C,remainingNodes:2048,exceeded:!1},R=Te(M)?M.map($=>ua($,k,E)):ua(M,k,E);if(E.exceeded||Fe(R)||Te(R)&&(!R.length||R.some(Fe)))return null;const A=JSON.stringify(R);return A.length>2e4?null:[R,A]}catch{return null}})(g.text,m,h.maskUrl);if(!w)return void d.delete(g);const[_,S]=w;if(Fe(v))return void d.set(g,S);if(d.get(g)!==S){if(S.length>f)return void(f=0);h.emit(_)&&(d.set(g,S),f-=S.length)}}catch{return}};try{const g=new u(v=>{try{if(!f||p()===!1)return;const w=_=>{for(const S of da(_))y(S)};for(const _ of v)if(_.type==="childList")En(_.target)&&y(_.target),_.addedNodes.forEach(w);else if(_.type==="characterData"){const S=_.target.parentNode;S&&En(S)&&y(S)}else _.type==="attributes"&&En(_.target)&&y(_.target)}catch{return}});return g.observe(a,{attributes:!0,attributeFilter:["type"],characterData:!0,childList:!0,subtree:!0}),{scan(v=!1){f&&p()!==!1&&da(a.documentElement).forEach(w=>{v&&d.delete(w),y(w)})},stop(){return g.disconnect()}}}catch{return{scan(){},stop(){}}}})(rt,Y.MutationObserver,{maskUrl:a=>this.yn(a),attributeFilter:t.attributeFilter,blockClass:t.blockClass,blockSelector:t.blockSelector,isRecordedElement:a=>l.mirror.getId(a)>0,maskAllElementAttributes:t.maskAllElementAttributes,maskAttributeFn:t.maskAttributeFn,maskTextClass:t.maskTextClass,maskTextSelector:t.maskTextSelector,getCaptureState:()=>{var a;return((a=this._instance.config.session_recording)===null||a===void 0?void 0:a.captureJsonLd)!==!0||this.Y.urlBlocked||this.Y.isCurrentUrlBlocked()?null:this.kn()},emit:a=>this._n(a)}),this.Y.isCurrentUrlBlocked()&&this.xn.scan()),this.le=Date.now(),this.de=Qe(this.de)?this.de:"unknown",this.tryAddCustomEvent("$remote_config_received",this.ne),this.Vt("$session_options",{sessionRecordingOptions:t,activePlugins:o.map(a=>a?.name)}),this.Vt("$posthog_config",{config:this._instance.config})}tryAddCustomEvent(e,t){return this.Vt(e,t)}};st.__PosthogExtensions__=st.__PosthogExtensions__||{},st.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:e=>({name:"rrweb/console@1",observer:sl,options:e}),getRecordNetworkPlugin:e=>({name:"rrweb/network@1",observer:_l,options:e})},st.__PosthogExtensions__.rrweb={record:gn,version:"v2",wasMaxDepthReached:()=>Vr,resetMaxDepthState(){Vr=!1,Ur=!1},getLastSnapshotCost:()=>Wn,getMutationCost:()=>B({},jn),getDeferredStylesheetStats:()=>B({},ut),getDiscardedDurationSamples:()=>Nr,getObserverInitFailures:()=>Jr.size?Array.from(Jr):void 0,resetSnapshotCostState(){tt=0,Fr=0,Pr=0,vt=0,Nr=0,$e={durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0},Wn=null,Et=null,nn=[],rn=0,qn=0,jn={slowestBatchMs:0},ut={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0}}},st.__PosthogExtensions__.initSessionRecording=(e,t)=>new nc(e,t)})();
109
109
 
110
- //# sourceMappingURL=posthog-recorder-C0Eve_v2.js.map
110
+ //# sourceMappingURL=posthog-recorder-CEtP2mh8.js.map