alphana-sdk 1.5.0 → 1.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -0
- package/dist/alphana-sdk.global.js +4 -4
- package/dist/index.d.mts +34 -1
- package/dist/index.d.ts +34 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/dist/react/index.d.mts +13 -0
- package/dist/react/index.d.ts +13 -0
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +1 -1
- package/dist/react/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -131,6 +131,36 @@ tracker.init(); // safe no-op during SSR (`window` undefined)
|
|
|
131
131
|
tracker.destroy(); // teardown, timers, best-effort final send
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
+
### Script tag / Google Tag Manager
|
|
135
|
+
|
|
136
|
+
Use the CDN build when you cannot install npm packages. Add this to `<head>` or
|
|
137
|
+
as a GTM Custom HTML tag:
|
|
138
|
+
|
|
139
|
+
```html
|
|
140
|
+
<script
|
|
141
|
+
async
|
|
142
|
+
src="https://storage.alphana.ir/cdn/alphana-sdk/latest/alphana-sdk.js"
|
|
143
|
+
data-app-id="YOUR_APP_ID"
|
|
144
|
+
data-secret-key="YOUR_SECRET_KEY"
|
|
145
|
+
></script>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Optional config can also be added as `data-*` attributes on the same script:
|
|
149
|
+
|
|
150
|
+
```html
|
|
151
|
+
<script
|
|
152
|
+
async
|
|
153
|
+
src="https://storage.alphana.ir/cdn/alphana-sdk/latest/alphana-sdk.js"
|
|
154
|
+
data-app-id="YOUR_APP_ID"
|
|
155
|
+
data-secret-key="YOUR_SECRET_KEY"
|
|
156
|
+
data-track-heatmap="true"
|
|
157
|
+
data-session-replay="false"
|
|
158
|
+
></script>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
After the script loads, manual calls are available through `window.alphana`,
|
|
162
|
+
for example `window.alphana("identify", { email: "user@example.com" })`.
|
|
163
|
+
|
|
134
164
|
---
|
|
135
165
|
|
|
136
166
|
## Configuration reference
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";var AlphanaSDK=(()=>{var st=Object.defineProperty;var yr=Object.getOwnPropertyDescriptor;var Ir=Object.getOwnPropertyNames;var Cr=Object.prototype.hasOwnProperty;var at=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,r)=>(typeof require!="undefined"?require:e)[r]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Sr=(t,e)=>{for(var r in e)st(t,r,{get:e[r],enumerable:!0})},br=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ir(e))!Cr.call(t,n)&&n!==r&&st(t,n,{get:()=>e[n],enumerable:!(i=yr(e,n))||i.enumerable});return t};var wr=t=>br(st({},"__esModule",{value:!0}),t);var Ei={};Sr(Ei,{ALPHANA_SDK_VERSION:()=>rt,DEFAULT_ENDPOINT:()=>Rt,LogCapture:()=>ye,UserTracker:()=>nt,normalizeTrackerPath:()=>k});function ct(t){return t.replace(/\/events\/?$/,"")}var Et="__ut_vid__";function ke(){return typeof crypto!="undefined"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}function Mt(){if(typeof localStorage=="undefined")return ke();try{let t=localStorage.getItem(Et);if(t)return t;let e=ke();return localStorage.setItem(Et,e),e}catch(t){return ke()}}function k(t){if(!t)return t;let e=t.indexOf("?"),r=e>=0?t.slice(0,e):t,i=e>=0?t.slice(e):"",n=r;for(let a=0;a<5;a++)try{let s=decodeURIComponent(n);if(s===n)break;n=s}catch(s){break}let o=i;for(let a=0;a<5;a++)try{let s=decodeURIComponent(o);if(s===o)break;o=s}catch(s){break}return n+o}var Ot="__ut_last_pv_path__",Lt="__ut_last_pv_entry_ms__";function xt(t){if(typeof sessionStorage=="undefined")return null;try{return sessionStorage.getItem(t)}catch(e){return null}}function Nt(t,e){if(typeof sessionStorage!="undefined")try{sessionStorage.setItem(t,e)}catch(r){}}function Ar(t,e){Nt(Ot,t),Nt(Lt,String(e))}function kr(){if(typeof performance=="undefined")return;let e=performance.getEntriesByType("navigation")[0];if(e!=null&&e.type)return e.type;let r=performance.navigation;if((r==null?void 0:r.type)===2)return"back_forward"}var Te=class Te{constructor({emit:e,sessionId:r}){this.previousPath="";this.originalPushState=null;this.originalReplaceState=null;this.pageEntryTime=0;this.handlePopState=()=>{this.handleNavigation()};this.emit=e,this.sessionId=r}init(){let e=k(window.location.pathname+window.location.search);kr()==="back_forward"&&this.tryEmitMpaHistoryTraversalUturn(e),this.recordPageView(e),window.addEventListener("popstate",this.handlePopState),this.originalPushState=history.pushState.bind(history);let r=this.originalPushState;history.pushState=(n,o,a)=>{r(n,o,a),this.handleNavigation()},this.originalReplaceState=history.replaceState.bind(history);let i=this.originalReplaceState;history.replaceState=(n,o,a)=>{i(n,o,a),this.handleNavigation()}}destroy(){window.removeEventListener("popstate",this.handlePopState),this.originalPushState&&(history.pushState=this.originalPushState),this.originalReplaceState&&(history.replaceState=this.originalReplaceState)}tryEmitMpaHistoryTraversalUturn(e){let r=xt(Ot),i=xt(Lt),n=i?Number(i):0;if(!r||!Number.isFinite(n)||n<=0||k(r)===e)return;let o=Date.now()-n;o<0||o>Te.UTURN_THRESHOLD_MS||this.emitUturn(k(r),e,o)}handleNavigation(){let e=k(window.location.pathname+window.location.search);if(e!==this.previousPath){if(this.previousPath&&this.pageEntryTime>0){let r=Date.now()-this.pageEntryTime;r<=Te.UTURN_THRESHOLD_MS&&this.emitUturn(this.previousPath,e,r)}this.recordPageView(e)}}emitUturn(e,r,i){this.emit({type:"uturn",data:{fromPath:e,toPath:r,timeOnPageMs:i,timestamp:Date.now(),sessionId:this.sessionId}})}recordPageView(e){let r=k(e);this.previousPath=r,this.pageEntryTime=Date.now(),Ar(r,this.pageEntryTime),this.emit({type:"pageview",data:{path:r,title:document.title,timestamp:Date.now(),sessionId:this.sessionId,referrer:document.referrer||void 0}}),window.dispatchEvent(new CustomEvent("tracker:navigate",{detail:{path:r,title:document.title}}))}};Te.UTURN_THRESHOLD_MS=5e3;var Le=Te;var Fe=class{constructor({emit:e,sessionId:r}){this.currentPath="";this.startTime=0;this.tracking=!1;this.handleNavigate=e=>{this.stopTracking(),this.currentPath=k(e.detail.path),this.startTracking()};this.handleVisibilityChange=()=>{document.hidden?this.stopTracking():this.startTracking()};this.handleUnload=()=>{this.stopTracking()};this.emit=e,this.sessionId=r}init(){this.currentPath=k(window.location.pathname+window.location.search),this.startTracking(),window.addEventListener("tracker:navigate",this.handleNavigate),document.addEventListener("visibilitychange",this.handleVisibilityChange),window.addEventListener("beforeunload",this.handleUnload),window.addEventListener("pagehide",this.handleUnload)}destroy(){this.stopTracking(),window.removeEventListener("tracker:navigate",this.handleNavigate),document.removeEventListener("visibilitychange",this.handleVisibilityChange),window.removeEventListener("beforeunload",this.handleUnload),window.removeEventListener("pagehide",this.handleUnload)}startTracking(){this.startTime=Date.now(),this.tracking=!0}stopTracking(){if(!this.tracking||!this.currentPath)return;let e=Date.now()-this.startTime;if(e<100){this.tracking=!1;return}this.emit({type:"timespent",data:{path:this.currentPath,duration:e,sessionId:this.sessionId,timestamp:Date.now()}}),this.tracking=!1}};function lt(t,e){let r=0;return(...i)=>{let n=Date.now();n-r>=e&&(r=n,t(...i))}}var ae=class ae{constructor({emit:e,sessionId:r,sampleRate:i=.3,maxPoints:n=2e3,allowedPaths:o}){this.currentPath="";this.pointCounts={};this.recentClicks=[];this.handleMouseMove=e=>{if(Math.random()>this.sampleRate)return;let r=document.documentElement.scrollWidth,i=document.documentElement.scrollHeight,n=e.clientY+window.scrollY;this.recordPoint({x:e.clientX,y:n,xPct:r>0?e.clientX/r*100:0,yPct:i>0?n/i*100:0,pw:r,ph:i,type:"move"})};this.handleClick=e=>{if(Date.now()-this.lastTouchTime<500)return;let r=document.documentElement.scrollWidth,i=document.documentElement.scrollHeight,n=e.clientY+window.scrollY,o=this.getClickTarget(e);this.recordPoint({x:e.clientX,y:n,xPct:r>0?e.clientX/r*100:0,yPct:i>0?n/i*100:0,pw:r,ph:i,type:"click",...o?{target:o}:{}}),this.checkRageClick(e.clientX,n,this.currentPath)};this.lastTouchTime=0;this.handleTouchEnd=e=>{let r=e.changedTouches[0];if(!r)return;let i=document.documentElement.scrollWidth,n=document.documentElement.scrollHeight,o=r.clientY+window.scrollY;this.lastTouchTime=Date.now(),this.recordPoint({x:r.clientX,y:o,xPct:i>0?r.clientX/i*100:0,yPct:n>0?o/n*100:0,pw:i,ph:n,type:"click"}),this.checkRageClick(r.clientX,o,this.currentPath)};this.handleScroll=()=>{if(Math.random()>this.sampleRate)return;let e=document.documentElement.scrollWidth,r=document.documentElement.scrollHeight,i=window.innerWidth,n=window.scrollX,o=window.scrollY,a=n+i/2;this.recordPoint({x:i/2,y:o,xPct:e>0?a/e*100:50,yPct:r>0?o/r*100:0,pw:e,ph:r,type:"scroll"})};this.handleNavigate=e=>{this.currentPath=k(e.detail.path)};this.emit=e,this.sessionId=r,this.sampleRate=i,this.maxPoints=n,this.allowedPaths=o&&o.length>0?new Set(o.map(a=>k(a))):null,this.throttledMouseMove=lt(this.handleMouseMove,50),this.throttledScroll=lt(this.handleScroll,100)}init(){this.currentPath=k(window.location.pathname+window.location.search),document.addEventListener("mousemove",this.throttledMouseMove),document.addEventListener("click",this.handleClick),document.addEventListener("touchend",this.handleTouchEnd,{passive:!0}),window.addEventListener("scroll",this.throttledScroll,{passive:!0}),window.addEventListener("tracker:navigate",this.handleNavigate)}destroy(){document.removeEventListener("mousemove",this.throttledMouseMove),document.removeEventListener("click",this.handleClick),document.removeEventListener("touchend",this.handleTouchEnd),window.removeEventListener("scroll",this.throttledScroll),window.removeEventListener("tracker:navigate",this.handleNavigate)}canRecord(){var e;return this.allowedPaths!==null&&!this.allowedPaths.has(this.currentPath)?!1:((e=this.pointCounts[this.currentPath])!=null?e:0)<this.maxPoints}recordPoint(e){var r;this.canRecord()&&(this.pointCounts[this.currentPath]=((r=this.pointCounts[this.currentPath])!=null?r:0)+1,this.emit({type:"heatmap",data:{...e,path:this.currentPath,timestamp:Date.now()}}))}getClickTarget(e){var n,o,a,s;let r=e.target;return r&&(r.getAttribute("aria-label")||((n=r.closest("[aria-label]"))==null?void 0:n.getAttribute("aria-label"))||r.getAttribute("data-track-label")||r.getAttribute("id")||(r instanceof HTMLButtonElement||r instanceof HTMLAnchorElement?(o=r.innerText)==null?void 0:o.trim().slice(0,60):(s=(a=r.closest("button, a"))==null?void 0:a.textContent)==null?void 0:s.trim().slice(0,60)))||void 0}checkRageClick(e,r,i){let n=Date.now();this.recentClicks=this.recentClicks.filter(a=>n-a.t<ae.RAGE_WINDOW_MS),this.recentClicks.push({x:e,y:r,t:n});let o=this.recentClicks.filter(a=>Math.hypot(a.x-e,a.y-r)<=ae.RAGE_RADIUS_PX);o.length>=ae.RAGE_THRESHOLD&&(this.emit({type:"rageclik",data:{path:i,x:e,y:r,count:o.length,timestamp:n,sessionId:this.sessionId}}),this.recentClicks=[])}};ae.RAGE_THRESHOLD=3,ae.RAGE_WINDOW_MS=1e3,ae.RAGE_RADIUS_PX=50;var De=ae;var ye=class{constructor(e){this.prevOnError=null;this.prevOnUnhandledRejection=null;this.initialized=!1;try{let r=new URL(e.endpoint),i=r.pathname.replace(/\/$/,"").split("/");i.pop(),r.pathname=i.join("/")||"/",this.endpoint=r.toString().replace(/\/$/,"")}catch(r){this.endpoint=e.endpoint}this.sessionId=e.sessionId,this.appId=e.appId,this.authHeaders=e.secretKey?{Authorization:`Bearer ${e.secretKey}`}:{}}init(){typeof window=="undefined"||this.initialized||(this.origInfo=console.info.bind(console),this.origWarn=console.warn.bind(console),this.origError=console.error.bind(console),console.info=(...e)=>{this.origInfo(...e),this.send("info",this.format(e))},console.warn=(...e)=>{this.origWarn(...e),this.send("warn",this.format(e))},console.error=(...e)=>{this.origError(...e);let[r]=e,i=r instanceof Error?r.stack:void 0;this.send("error",this.format(e),{stack:i})},this.prevOnError=window.onerror,window.onerror=(e,r,i,n,o)=>(this.send("error",String(e),{stack:o==null?void 0:o.stack,meta:{src:r,line:i,col:n}}),typeof this.prevOnError=="function"?this.prevOnError(e,r,i,n,o):!1),this.prevOnUnhandledRejection=e=>{let r=e.reason,i=r instanceof Error?r.message:String(r!=null?r:"Unhandled promise rejection");this.send("error",i,{stack:r instanceof Error?r.stack:void 0})},window.addEventListener("unhandledrejection",this.prevOnUnhandledRejection),this.initialized=!0)}destroy(){this.initialized&&(console.info=this.origInfo,console.warn=this.origWarn,console.error=this.origError,window.onerror=this.prevOnError,this.prevOnUnhandledRejection&&window.removeEventListener("unhandledrejection",this.prevOnUnhandledRejection),this.initialized=!1)}capture(e,r,i){this.send(e,r,i)}format(e){return e.map(r=>{if(r instanceof Error)return r.message;if(typeof r=="object")try{return JSON.stringify(r)}catch(i){return String(r)}return String(r)}).join(" ")}send(e,r,i){let n={sessionId:this.sessionId,...this.appId?{appId:this.appId}:{},level:e,message:r,url:typeof window!="undefined"?window.location.href:void 0,stack:i==null?void 0:i.stack,meta:i==null?void 0:i.meta,timestamp:Date.now()},o=`${this.endpoint}/logs/ingest`,a=JSON.stringify(n);fetch(o,{method:"POST",headers:{"Content-Type":"application/json",...this.authHeaders},body:a,keepalive:!0}).catch(s=>{this.origError&&this.origError("[user-tracker] Failed to send log:",s)})}};var F;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(F||(F={}));function Tr(t){return t.nodeType===t.ELEMENT_NODE}function pe(t){var e=t==null?void 0:t.host;return(e==null?void 0:e.shadowRoot)===t}function ue(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function Rr(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),t}function dt(t){try{var e=t.rules||t.cssRules;return e?Rr(Array.from(e).map(ut).join("")):null}catch(r){return null}}function ut(t){var e=t.cssText;if(Er(t))try{e=dt(t.styleSheet)||e}catch(r){}return e}function Er(t){return"styleSheet"in t}var Pt=(function(){function t(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return t.prototype.getId=function(e){var r;if(!e)return-1;var i=(r=this.getMeta(e))===null||r===void 0?void 0:r.id;return i!=null?i:-1},t.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},t.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},t.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},t.prototype.removeNodeFromMap=function(e){var r=this,i=this.getId(e);this.idNodeMap.delete(i),e.childNodes&&e.childNodes.forEach(function(n){return r.removeNodeFromMap(n)})},t.prototype.has=function(e){return this.idNodeMap.has(e)},t.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},t.prototype.add=function(e,r){var i=r.id;this.idNodeMap.set(i,e),this.nodeMetaMap.set(e,r)},t.prototype.replace=function(e,r){var i=this.getNode(e);if(i){var n=this.nodeMetaMap.get(i);n&&this.nodeMetaMap.set(r,n)}this.idNodeMap.set(e,r)},t.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},t})();function Wt(){return new Pt}function Ee(t){var e=t.maskInputOptions,r=t.tagName,i=t.type,n=t.value,o=t.maskInputFn,a=n||"";return(e[r.toLowerCase()]||e[i])&&(o?a=o(a):a="*".repeat(a.length)),a}var Ft="__rrweb_original__";function Mr(t){var e=t.getContext("2d");if(!e)return!0;for(var r=50,i=0;i<t.width;i+=r)for(var n=0;n<t.height;n+=r){var o=e.getImageData,a=Ft in o?o[Ft]:o,s=new Uint32Array(a.call(e,i,n,Math.min(r,t.width-i),Math.min(r,t.height-n)).data.buffer);if(s.some(function(c){return c!==0}))return!1}return!0}var xr=1,Nr=new RegExp("[^a-z0-9-_:]"),he=-2;function ht(){return xr++}function Or(t){if(t instanceof HTMLFormElement)return"form";var e=t.tagName.toLowerCase().trim();return Nr.test(e)?"div":e}function Lr(t){return t.cssRules?Array.from(t.cssRules).map(function(e){return e.cssText||""}).join(""):""}function Fr(t){var e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var Ie,Dt,Dr=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Pr=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Wr=/^(data:)([^,]*),(.*)/i;function Pe(t,e){return(t||"").replace(Dr,function(r,i,n,o,a,s){var c=n||a||s,l=i||o||"";if(!c)return r;if(!Pr.test(c)||Wr.test(c))return"url(".concat(l).concat(c).concat(l,")");if(c[0]==="/")return"url(".concat(l).concat(Fr(e)+c).concat(l,")");var d=e.split("/"),u=c.split("/");d.pop();for(var p=0,f=u;p<f.length;p++){var h=f[p];h!=="."&&(h===".."?d.pop():d.push(h))}return"url(".concat(l).concat(d.join("/")).concat(l,")")})}var Br=/^[^ \t\n\r\u000c]+/,_r=/^[, \t\n\r\u000c]+/;function Vr(t,e){if(e.trim()==="")return e;var r=0;function i(l){var d,u=l.exec(e.substring(r));return u?(d=u[0],r+=d.length,d):""}for(var n=[];i(_r),!(r>=e.length);){var o=i(Br);if(o.slice(-1)===",")o=Ce(t,o.substring(0,o.length-1)),n.push(o);else{var a="";o=Ce(t,o);for(var s=!1;;){var c=e.charAt(r);if(c===""){n.push((o+a).trim());break}else if(s)c===")"&&(s=!1);else if(c===","){r+=1,n.push((o+a).trim());break}else c==="("&&(s=!0);a+=c,r+=1}}}return n.join(", ")}function Ce(t,e){if(!e||e.trim()==="")return e;var r=t.createElement("a");return r.href=e,r.href}function Gr(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function pt(){var t=document.createElement("a");return t.href="",t.href}function ft(t,e,r,i){return r==="src"||r==="href"&&i&&!(e==="use"&&i[0]==="#")||r==="xlink:href"&&i&&i[0]!=="#"||r==="background"&&i&&(e==="table"||e==="td"||e==="th")?Ce(t,i):r==="srcset"&&i?Vr(t,i):r==="style"&&i?Pe(i,pt()):e==="object"&&r==="data"&&i?Ce(t,i):i}function Ur(t,e,r){if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(var i=t.classList.length;i--;){var n=t.classList[i];if(e.test(n))return!0}return r?t.matches(r):!1}function Re(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return r?Re(t.parentNode,e,r):!1;for(var i=t.classList.length;i--;){var n=t.classList[i];if(e.test(n))return!0}return r?Re(t.parentNode,e,r):!1}function gt(t,e,r){var i=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(i===null)return!1;if(typeof e=="string"){if(i.classList.contains(e)||i.closest(".".concat(e)))return!0}else if(Re(i,e,!0))return!0;return!!(r&&(i.matches(r)||i.closest(r)))}function Hr(t,e,r){var i=t.contentWindow;if(i){var n=!1,o;try{o=i.document.readyState}catch(c){return}if(o!=="complete"){var a=setTimeout(function(){n||(e(),n=!0)},r);t.addEventListener("load",function(){clearTimeout(a),n=!0,e()});return}var s="about:blank";if(i.location.href!==s||t.src===s||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}}function Zr(t,e,r){var i=!1,n;try{n=t.sheet}catch(a){return}if(!n){var o=setTimeout(function(){i||(e(),i=!0)},r);t.addEventListener("load",function(){clearTimeout(o),i=!0,e()})}}function Kr(t,e){var r=e.doc,i=e.mirror,n=e.blockClass,o=e.blockSelector,a=e.maskTextClass,s=e.maskTextSelector,c=e.inlineStylesheet,l=e.maskInputOptions,d=l===void 0?{}:l,u=e.maskTextFn,p=e.maskInputFn,f=e.dataURLOptions,h=f===void 0?{}:f,v=e.inlineImages,C=e.recordCanvas,y=e.keepIframeSrcFn,g=e.newlyAddedElement,m=g===void 0?!1:g,A=zr(r,i);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:F.Document,childNodes:[],compatMode:t.compatMode}:{type:F.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:F.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:A};case t.ELEMENT_NODE:return Jr(t,{doc:r,blockClass:n,blockSelector:o,inlineStylesheet:c,maskInputOptions:d,maskInputFn:p,dataURLOptions:h,inlineImages:v,recordCanvas:C,keepIframeSrcFn:y,newlyAddedElement:m,rootId:A});case t.TEXT_NODE:return Yr(t,{maskTextClass:a,maskTextSelector:s,maskTextFn:u,rootId:A});case t.CDATA_SECTION_NODE:return{type:F.CDATA,textContent:"",rootId:A};case t.COMMENT_NODE:return{type:F.Comment,textContent:t.textContent||"",rootId:A};default:return!1}}function zr(t,e){if(e.hasNode(t)){var r=e.getId(t);return r===1?void 0:r}}function Yr(t,e){var r,i=e.maskTextClass,n=e.maskTextSelector,o=e.maskTextFn,a=e.rootId,s=t.parentNode&&t.parentNode.tagName,c=t.textContent,l=s==="STYLE"?!0:void 0,d=s==="SCRIPT"?!0:void 0;if(l&&c){try{t.nextSibling||t.previousSibling||!((r=t.parentNode.sheet)===null||r===void 0)&&r.cssRules&&(c=Lr(t.parentNode.sheet))}catch(u){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(u),t)}c=Pe(c,pt())}return d&&(c="SCRIPT_PLACEHOLDER"),!l&&!d&&c&>(t,i,n)&&(c=o?o(c):c.replace(/[\S]/g,"*")),{type:F.Text,textContent:c||"",isStyle:l,rootId:a}}function Jr(t,e){for(var r=e.doc,i=e.blockClass,n=e.blockSelector,o=e.inlineStylesheet,a=e.maskInputOptions,s=a===void 0?{}:a,c=e.maskInputFn,l=e.dataURLOptions,d=l===void 0?{}:l,u=e.inlineImages,p=e.recordCanvas,f=e.keepIframeSrcFn,h=e.newlyAddedElement,v=h===void 0?!1:h,C=e.rootId,y=Ur(t,i,n),g=Or(t),m={},A=t.attributes.length,B=0;B<A;B++){var D=t.attributes[B];m[D.name]=ft(r,g,D.name,D.value)}if(g==="link"&&o){var P=Array.from(r.styleSheets).find(function(Y){return Y.href===t.href}),T=null;P&&(T=dt(P)),T&&(delete m.rel,delete m.href,m._cssText=Pe(T,P.href))}if(g==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){var T=dt(t.sheet);T&&(m._cssText=Pe(T,pt()))}if(g==="input"||g==="textarea"||g==="select"){var Z=t.value,K=t.checked;m.type!=="radio"&&m.type!=="checkbox"&&m.type!=="submit"&&m.type!=="button"&&Z?m.value=Ee({type:m.type,tagName:g,value:Z,maskInputOptions:s,maskInputFn:c}):K&&(m.checked=K)}if(g==="option"&&(t.selected&&!s.select?m.selected=!0:delete m.selected),g==="canvas"&&p){if(t.__context==="2d")Mr(t)||(m.rr_dataURL=t.toDataURL(d.type,d.quality));else if(!("__context"in t)){var j=t.toDataURL(d.type,d.quality),Q=document.createElement("canvas");Q.width=t.width,Q.height=t.height;var X=Q.toDataURL(d.type,d.quality);j!==X&&(m.rr_dataURL=j)}}if(g==="img"&&u){Ie||(Ie=r.createElement("canvas"),Dt=Ie.getContext("2d"));var O=t,z=O.crossOrigin;O.crossOrigin="anonymous";var q=function(){try{Ie.width=O.naturalWidth,Ie.height=O.naturalHeight,Dt.drawImage(O,0,0),m.rr_dataURL=Ie.toDataURL(d.type,d.quality)}catch(Y){console.warn("Cannot inline img src=".concat(O.currentSrc,"! Error: ").concat(Y))}z?m.crossOrigin=z:O.removeAttribute("crossorigin")};O.complete&&O.naturalWidth!==0?q():O.onload=q}if((g==="audio"||g==="video")&&(m.rr_mediaState=t.paused?"paused":"played",m.rr_mediaCurrentTime=t.currentTime),v||(t.scrollLeft&&(m.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(m.rr_scrollTop=t.scrollTop)),y){var re=t.getBoundingClientRect(),ne=re.width,G=re.height;m={class:m.class,rr_width:"".concat(ne,"px"),rr_height:"".concat(G,"px")}}return g==="iframe"&&!f(m.src)&&(t.contentDocument||(m.rr_src=m.src),delete m.src),{type:F.Element,tagName:g,attributes:m,childNodes:[],isSVG:Gr(t)||void 0,needBlock:y,rootId:C}}function R(t){return t===void 0?"":t.toLowerCase()}function jr(t,e){if(e.comment&&t.type===F.Comment)return!0;if(t.type===F.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&t.attributes.rel==="preload"&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&t.attributes.href.endsWith(".js")))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(R(t.attributes.name).match(/^msapplication-tile(image|color)$/)||R(t.attributes.name)==="application-name"||R(t.attributes.rel)==="icon"||R(t.attributes.rel)==="apple-touch-icon"||R(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&R(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(R(t.attributes.property).match(/^(og|twitter|fb):/)||R(t.attributes.name).match(/^(og|twitter):/)||R(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(R(t.attributes.name)==="robots"||R(t.attributes.name)==="googlebot"||R(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(R(t.attributes.name)==="author"||R(t.attributes.name)==="generator"||R(t.attributes.name)==="framework"||R(t.attributes.name)==="publisher"||R(t.attributes.name)==="progid"||R(t.attributes.property).match(/^article:/)||R(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(R(t.attributes.name)==="google-site-verification"||R(t.attributes.name)==="yandex-verification"||R(t.attributes.name)==="csrf-token"||R(t.attributes.name)==="p:domain_verify"||R(t.attributes.name)==="verify-v1"||R(t.attributes.name)==="verification"||R(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function de(t,e){var r=e.doc,i=e.mirror,n=e.blockClass,o=e.blockSelector,a=e.maskTextClass,s=e.maskTextSelector,c=e.skipChild,l=c===void 0?!1:c,d=e.inlineStylesheet,u=d===void 0?!0:d,p=e.maskInputOptions,f=p===void 0?{}:p,h=e.maskTextFn,v=e.maskInputFn,C=e.slimDOMOptions,y=e.dataURLOptions,g=y===void 0?{}:y,m=e.inlineImages,A=m===void 0?!1:m,B=e.recordCanvas,D=B===void 0?!1:B,P=e.onSerialize,T=e.onIframeLoad,Z=e.iframeLoadTimeout,K=Z===void 0?5e3:Z,j=e.onStylesheetLoad,Q=e.stylesheetLoadTimeout,X=Q===void 0?5e3:Q,O=e.keepIframeSrcFn,z=O===void 0?function(){return!1}:O,q=e.newlyAddedElement,re=q===void 0?!1:q,ne=e.preserveWhiteSpace,G=ne===void 0?!0:ne,Y=Kr(t,{doc:r,mirror:i,blockClass:n,blockSelector:o,maskTextClass:a,maskTextSelector:s,inlineStylesheet:u,maskInputOptions:f,maskTextFn:h,maskInputFn:v,dataURLOptions:g,inlineImages:A,recordCanvas:D,keepIframeSrcFn:z,newlyAddedElement:re});if(!Y)return console.warn(t,"not serialized"),null;var se;i.hasNode(t)?se=i.getId(t):jr(Y,C)||!G&&Y.type===F.Text&&!Y.isStyle&&!Y.textContent.replace(/^\s+|\s+$/gm,"").length?se=he:se=ht();var N=Object.assign(Y,{id:se});if(i.add(t,N),se===he)return null;P&&P(t);var $=!l;if(N.type===F.Element){$=$&&!N.needBlock,delete N.needBlock;var ie=t.shadowRoot;ie&&ue(ie)&&(N.isShadowHost=!0)}if((N.type===F.Document||N.type===F.Element)&&$){C.headWhitespace&&N.type===F.Element&&N.tagName==="head"&&(G=!1);for(var ve={doc:r,mirror:i,blockClass:n,blockSelector:o,maskTextClass:a,maskTextSelector:s,skipChild:l,inlineStylesheet:u,maskInputOptions:f,maskTextFn:h,maskInputFn:v,slimDOMOptions:C,dataURLOptions:g,inlineImages:A,recordCanvas:D,preserveWhiteSpace:G,onSerialize:P,onIframeLoad:T,iframeLoadTimeout:K,onStylesheetLoad:j,stylesheetLoadTimeout:X,keepIframeSrcFn:z},I=0,_=Array.from(t.childNodes);I<_.length;I++){var U=_[I],E=de(U,ve);E&&N.childNodes.push(E)}if(Tr(t)&&t.shadowRoot)for(var J=0,w=Array.from(t.shadowRoot.childNodes);J<w.length;J++){var U=w[J],E=de(U,ve);E&&(ue(t.shadowRoot)&&(E.isShadow=!0),N.childNodes.push(E))}}return t.parentNode&&pe(t.parentNode)&&ue(t.parentNode)&&(N.isShadow=!0),N.type===F.Element&&N.tagName==="iframe"&&Hr(t,function(){var H=t.contentDocument;if(H&&T){var Ae=de(H,{doc:H,mirror:i,blockClass:n,blockSelector:o,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:u,maskInputOptions:f,maskTextFn:h,maskInputFn:v,slimDOMOptions:C,dataURLOptions:g,inlineImages:A,recordCanvas:D,preserveWhiteSpace:G,onSerialize:P,onIframeLoad:T,iframeLoadTimeout:K,onStylesheetLoad:j,stylesheetLoadTimeout:X,keepIframeSrcFn:z});Ae&&T(t,Ae)}},K),N.type===F.Element&&N.tagName==="link"&&N.attributes.rel==="stylesheet"&&Zr(t,function(){if(j){var H=de(t,{doc:r,mirror:i,blockClass:n,blockSelector:o,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:u,maskInputOptions:f,maskTextFn:h,maskInputFn:v,slimDOMOptions:C,dataURLOptions:g,inlineImages:A,recordCanvas:D,preserveWhiteSpace:G,onSerialize:P,onIframeLoad:T,iframeLoadTimeout:K,onStylesheetLoad:j,stylesheetLoadTimeout:X,keepIframeSrcFn:z});H&&j(t,H)}},X),N}function Bt(t,e){var r=e||{},i=r.mirror,n=i===void 0?new Pt:i,o=r.blockClass,a=o===void 0?"rr-block":o,s=r.blockSelector,c=s===void 0?null:s,l=r.maskTextClass,d=l===void 0?"rr-mask":l,u=r.maskTextSelector,p=u===void 0?null:u,f=r.inlineStylesheet,h=f===void 0?!0:f,v=r.inlineImages,C=v===void 0?!1:v,y=r.recordCanvas,g=y===void 0?!1:y,m=r.maskAllInputs,A=m===void 0?!1:m,B=r.maskTextFn,D=r.maskInputFn,P=r.slimDOM,T=P===void 0?!1:P,Z=r.dataURLOptions,K=r.preserveWhiteSpace,j=r.onSerialize,Q=r.onIframeLoad,X=r.iframeLoadTimeout,O=r.onStylesheetLoad,z=r.stylesheetLoadTimeout,q=r.keepIframeSrcFn,re=q===void 0?function(){return!1}:q,ne=A===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:A===!1?{password:!0}:A,G=T===!0||T==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:T==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:T===!1?{}:T;return de(t,{doc:t,mirror:n,blockClass:a,blockSelector:c,maskTextClass:d,maskTextSelector:p,skipChild:!1,inlineStylesheet:h,maskInputOptions:ne,maskTextFn:B,maskInputFn:D,slimDOMOptions:G,dataURLOptions:Z,inlineImages:C,recordCanvas:g,preserveWhiteSpace:K,onSerialize:j,onIframeLoad:Q,iframeLoadTimeout:X,onStylesheetLoad:O,stylesheetLoadTimeout:z,keepIframeSrcFn:re,newlyAddedElement:!1})}var Qr=/([^\\]):hover/,Ui=new RegExp(Qr.source,"g");function W(t,e,r=document){let i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>r.removeEventListener(t,e,i)}var Se=`Please stop import mirror directly. Instead of that,\r
|
|
1
|
+
"use strict";var AlphanaSDK=(()=>{var lt=Object.defineProperty;var Er=Object.getOwnPropertyDescriptor;var Mr=Object.getOwnPropertyNames;var xr=Object.prototype.hasOwnProperty;var ut=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,r)=>(typeof require!="undefined"?require:e)[r]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Nr=(t,e)=>{for(var r in e)lt(t,r,{get:e[r],enumerable:!0})},Or=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Mr(e))!xr.call(t,n)&&n!==r&<(t,n,{get:()=>e[n],enumerable:!(i=Er(e,n))||i.enumerable});return t};var Lr=t=>Or(lt({},"__esModule",{value:!0}),t);var Zi={};Nr(Zi,{ALPHANA_SDK_VERSION:()=>Be,DEFAULT_ENDPOINT:()=>Nt,LogCapture:()=>be,UserTracker:()=>We,command:()=>Ft,getTracker:()=>Gi,init:()=>Lt,renderHeatmap:()=>Bt});var be=class{constructor(e){this.prevOnError=null;this.prevOnUnhandledRejection=null;this.initialized=!1;try{let r=new URL(e.endpoint),i=r.pathname.replace(/\/$/,"").split("/");i.pop(),r.pathname=i.join("/")||"/",this.endpoint=r.toString().replace(/\/$/,"")}catch(r){this.endpoint=e.endpoint}this.sessionId=e.sessionId,this.appId=e.appId,this.authHeaders=e.secretKey?{Authorization:`Bearer ${e.secretKey}`}:{}}init(){typeof window=="undefined"||this.initialized||(this.origInfo=console.info.bind(console),this.origWarn=console.warn.bind(console),this.origError=console.error.bind(console),console.info=(...e)=>{this.origInfo(...e),this.send("info",this.format(e))},console.warn=(...e)=>{this.origWarn(...e),this.send("warn",this.format(e))},console.error=(...e)=>{this.origError(...e);let[r]=e,i=r instanceof Error?r.stack:void 0;this.send("error",this.format(e),{stack:i})},this.prevOnError=window.onerror,window.onerror=(e,r,i,n,o)=>(this.send("error",String(e),{stack:o==null?void 0:o.stack,meta:{src:r,line:i,col:n}}),typeof this.prevOnError=="function"?this.prevOnError(e,r,i,n,o):!1),this.prevOnUnhandledRejection=e=>{let r=e.reason,i=r instanceof Error?r.message:String(r!=null?r:"Unhandled promise rejection");this.send("error",i,{stack:r instanceof Error?r.stack:void 0})},window.addEventListener("unhandledrejection",this.prevOnUnhandledRejection),this.initialized=!0)}destroy(){this.initialized&&(console.info=this.origInfo,console.warn=this.origWarn,console.error=this.origError,window.onerror=this.prevOnError,this.prevOnUnhandledRejection&&window.removeEventListener("unhandledrejection",this.prevOnUnhandledRejection),this.initialized=!1)}capture(e,r,i){this.send(e,r,i)}format(e){return e.map(r=>{if(r instanceof Error)return r.message;if(typeof r=="object")try{return JSON.stringify(r)}catch(i){return String(r)}return String(r)}).join(" ")}send(e,r,i){let n={sessionId:this.sessionId,...this.appId?{appId:this.appId}:{},level:e,message:r,url:typeof window!="undefined"?window.location.href:void 0,stack:i==null?void 0:i.stack,meta:i==null?void 0:i.meta,timestamp:Date.now()},o=`${this.endpoint}/logs/ingest`,s=JSON.stringify(n);fetch(o,{method:"POST",headers:{"Content-Type":"application/json",...this.authHeaders},body:s,keepalive:!0}).catch(a=>{this.origError&&this.origError("[user-tracker] Failed to send log:",a)})}};var Be="1.0.2";function Dt(t){var r,i;let e=t.toLowerCase();return/ipad|tablet|(android(?!.*mobile))/i.test(e)?"tablet":/mobile|android|iphone|ipod|windows phone/i.test(e)?"mobile":typeof navigator!="undefined"&&navigator.maxTouchPoints>0&&typeof window!="undefined"&&((i=(r=window.matchMedia)==null?void 0:r.call(window,"(pointer: coarse)"))==null?void 0:i.matches)&&/macintosh|mac os x/i.test(e)?"tablet":"desktop"}function Fr(t){return/windows/i.test(t)?"Windows":/android/i.test(t)?"Android":/iphone|ipad|ipod/i.test(t)?"iOS":/mac os x|macintosh/i.test(t)?"macOS":/linux/i.test(t)?"Linux":"Other"}function Dr(t){return/edg\//i.test(t)?"Edge":/opr\/|opera/i.test(t)?"Opera":/chrome\/[0-9]/i.test(t)&&!/chromium/i.test(t)?"Chrome":/firefox\/[0-9]/i.test(t)?"Firefox":/safari\/[0-9]/i.test(t)&&!/chrome/i.test(t)?"Safari":"Other"}function Pr(){let e=navigator.userAgentData;return e?{mobile:e.mobile,platform:e.platform}:{}}function Wr(t,e){var i;let r=((i=e.platform)!=null?i:"").toLowerCase();return r==="ios"||r==="ipados"||r==="android"?e.mobile?"mobile":"tablet":e.mobile===!0?"mobile":Dt(t)}function Pt(t){var a,c,d,l,u,p,m,h,v,I,y,f;if(typeof window=="undefined"||typeof navigator=="undefined")return{sessionId:t,timestamp:Date.now(),device:"desktop",os:"Other",browser:"Other",language:"",languages:[],colorScheme:"",screenWidth:0,screenHeight:0,viewportWidth:0,viewportHeight:0,devicePixelRatio:1,timeZone:"",sdkVersion:Be};let e=navigator.userAgent||"",r=Pr(),i=r.mobile!==void 0||r.platform?Wr(e,r):Dt(e),n="";(c=(a=window.matchMedia)==null?void 0:a.call(window,"(prefers-color-scheme: dark)"))!=null&&c.matches?n="dark":(l=(d=window.matchMedia)==null?void 0:d.call(window,"(prefers-color-scheme: light)"))!=null&&l.matches&&(n="light");let o="";try{o=(u=Intl.DateTimeFormat().resolvedOptions().timeZone)!=null?u:""}catch(g){o=""}let s=typeof navigator.languages!="undefined"&&navigator.languages.length?[...navigator.languages]:navigator.language?[navigator.language]:[];return{sessionId:t,timestamp:Date.now(),device:i,os:Fr(e),browser:Dr(e),language:navigator.language||"",languages:s,colorScheme:n,screenWidth:(m=(p=window.screen)==null?void 0:p.width)!=null?m:0,screenHeight:(v=(h=window.screen)==null?void 0:h.height)!=null?v:0,viewportWidth:(I=window.innerWidth)!=null?I:0,viewportHeight:(y=window.innerHeight)!=null?y:0,devicePixelRatio:(f=window.devicePixelRatio)!=null?f:1,timeZone:o,sdkVersion:Be}}function Br(){let t=[[0,0,255],[0,255,255],[0,255,0],[255,255,0],[255,128,0],[255,0,0]],e=[],r=51;for(let i=0;i<t.length-1;i++){let[n,o,s]=t[i],[a,c,d]=t[i+1];for(let l=0;l<r;l++){let u=l/r;e.push([Math.round(n+(a-n)*u),Math.round(o+(c-o)*u),Math.round(s+(d-s)*u)])}}return e}var Wt=Br();function Bt(t,e,r={}){let{radius:i=25,maxOpacity:n=.85,minOpacity:o=0}=r,s=t.getContext("2d");if(!s)return;let{width:a,height:c}=t;if(s.clearRect(0,0,a,c),e.length===0)return;let d=document.createElement("canvas");d.width=a,d.height=c;let l=d.getContext("2d");if(!l)return;for(let I of e){let y=I.xPct/100*a,f=I.yPct/100*c,g=I.type==="click"?i*1.6:i,b=l.createRadialGradient(y,f,0,y,f,g);b.addColorStop(0,"rgba(0,0,0,0.15)"),b.addColorStop(1,"rgba(0,0,0,0)"),l.fillStyle=b,l.beginPath(),l.arc(y,f,g,0,Math.PI*2),l.fill()}let u=l.getImageData(0,0,a,c),p=s.createImageData(a,c),m=u.data,h=p.data,v=Wt.length-1;for(let I=0;I<m.length;I+=4){let y=m[I+3];if(y===0)continue;let f=y/255,g=Math.min(Math.floor(f*v),v),[b,B,L]=Wt[g],F=o+f*(n-o);h[I]=b,h[I+1]=B,h[I+2]=L,h[I+3]=Math.round(F*255)}s.putImageData(p,0,0)}function ht(t){return t.replace(/\/events\/?$/,"")}var _t="__ut_vid__";function Me(){return typeof crypto!="undefined"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}function Vt(){if(typeof localStorage=="undefined")return Me();try{let t=localStorage.getItem(_t);if(t)return t;let e=Me();return localStorage.setItem(_t,e),e}catch(t){return Me()}}function T(t){if(!t)return t;let e=t.indexOf("?"),r=e>=0?t.slice(0,e):t,i=e>=0?t.slice(e):"",n=r;for(let s=0;s<5;s++)try{let a=decodeURIComponent(n);if(a===n)break;n=a}catch(a){break}let o=i;for(let s=0;s<5;s++)try{let a=decodeURIComponent(o);if(a===o)break;o=a}catch(a){break}return n+o}var Ht="__ut_last_pv_path__",Zt="__ut_last_pv_entry_ms__";function Gt(t){if(typeof sessionStorage=="undefined")return null;try{return sessionStorage.getItem(t)}catch(e){return null}}function Ut(t,e){if(typeof sessionStorage!="undefined")try{sessionStorage.setItem(t,e)}catch(r){}}function _r(t,e){Ut(Ht,t),Ut(Zt,String(e))}function Vr(){if(typeof performance=="undefined")return;let e=performance.getEntriesByType("navigation")[0];if(e!=null&&e.type)return e.type;let r=performance.navigation;if((r==null?void 0:r.type)===2)return"back_forward"}var xe=class xe{constructor({emit:e,sessionId:r}){this.previousPath="";this.originalPushState=null;this.originalReplaceState=null;this.pageEntryTime=0;this.handlePopState=()=>{this.handleNavigation()};this.emit=e,this.sessionId=r}init(){let e=T(window.location.pathname+window.location.search);Vr()==="back_forward"&&this.tryEmitMpaHistoryTraversalUturn(e),this.recordPageView(e),window.addEventListener("popstate",this.handlePopState),this.originalPushState=history.pushState.bind(history);let r=this.originalPushState;history.pushState=(n,o,s)=>{r(n,o,s),this.handleNavigation()},this.originalReplaceState=history.replaceState.bind(history);let i=this.originalReplaceState;history.replaceState=(n,o,s)=>{i(n,o,s),this.handleNavigation()}}destroy(){window.removeEventListener("popstate",this.handlePopState),this.originalPushState&&(history.pushState=this.originalPushState),this.originalReplaceState&&(history.replaceState=this.originalReplaceState)}tryEmitMpaHistoryTraversalUturn(e){let r=Gt(Ht),i=Gt(Zt),n=i?Number(i):0;if(!r||!Number.isFinite(n)||n<=0||T(r)===e)return;let o=Date.now()-n;o<0||o>xe.UTURN_THRESHOLD_MS||this.emitUturn(T(r),e,o)}handleNavigation(){let e=T(window.location.pathname+window.location.search);if(e!==this.previousPath){if(this.previousPath&&this.pageEntryTime>0){let r=Date.now()-this.pageEntryTime;r<=xe.UTURN_THRESHOLD_MS&&this.emitUturn(this.previousPath,e,r)}this.recordPageView(e)}}emitUturn(e,r,i){this.emit({type:"uturn",data:{fromPath:e,toPath:r,timeOnPageMs:i,timestamp:Date.now(),sessionId:this.sessionId}})}recordPageView(e){let r=T(e);this.previousPath=r,this.pageEntryTime=Date.now(),_r(r,this.pageEntryTime),this.emit({type:"pageview",data:{path:r,title:document.title,timestamp:Date.now(),sessionId:this.sessionId,referrer:document.referrer||void 0}}),window.dispatchEvent(new CustomEvent("tracker:navigate",{detail:{path:r,title:document.title}}))}};xe.UTURN_THRESHOLD_MS=5e3;var _e=xe;var Ve=class{constructor({emit:e,sessionId:r}){this.currentPath="";this.startTime=0;this.tracking=!1;this.handleNavigate=e=>{this.stopTracking(),this.currentPath=T(e.detail.path),this.startTracking()};this.handleVisibilityChange=()=>{document.hidden?this.stopTracking():this.startTracking()};this.handleUnload=()=>{this.stopTracking()};this.emit=e,this.sessionId=r}init(){this.currentPath=T(window.location.pathname+window.location.search),this.startTracking(),window.addEventListener("tracker:navigate",this.handleNavigate),document.addEventListener("visibilitychange",this.handleVisibilityChange),window.addEventListener("beforeunload",this.handleUnload),window.addEventListener("pagehide",this.handleUnload)}destroy(){this.stopTracking(),window.removeEventListener("tracker:navigate",this.handleNavigate),document.removeEventListener("visibilitychange",this.handleVisibilityChange),window.removeEventListener("beforeunload",this.handleUnload),window.removeEventListener("pagehide",this.handleUnload)}startTracking(){this.startTime=Date.now(),this.tracking=!0}stopTracking(){if(!this.tracking||!this.currentPath)return;let e=Date.now()-this.startTime;if(e<100){this.tracking=!1;return}this.emit({type:"timespent",data:{path:this.currentPath,duration:e,sessionId:this.sessionId,timestamp:Date.now()}}),this.tracking=!1}};function pt(t,e){let r=0;return(...i)=>{let n=Date.now();n-r>=e&&(r=n,t(...i))}}var le=class le{constructor({emit:e,sessionId:r,sampleRate:i=.3,maxPoints:n=2e3,allowedPaths:o}){this.currentPath="";this.pointCounts={};this.recentClicks=[];this.handleMouseMove=e=>{if(Math.random()>this.sampleRate)return;let r=document.documentElement.scrollWidth,i=document.documentElement.scrollHeight,n=e.clientY+window.scrollY;this.recordPoint({x:e.clientX,y:n,xPct:r>0?e.clientX/r*100:0,yPct:i>0?n/i*100:0,pw:r,ph:i,type:"move"})};this.handleClick=e=>{if(Date.now()-this.lastTouchTime<500)return;let r=document.documentElement.scrollWidth,i=document.documentElement.scrollHeight,n=e.clientY+window.scrollY,o=this.getClickTarget(e);this.recordPoint({x:e.clientX,y:n,xPct:r>0?e.clientX/r*100:0,yPct:i>0?n/i*100:0,pw:r,ph:i,type:"click",...o?{target:o}:{}}),this.checkRageClick(e.clientX,n,this.currentPath)};this.lastTouchTime=0;this.handleTouchEnd=e=>{let r=e.changedTouches[0];if(!r)return;let i=document.documentElement.scrollWidth,n=document.documentElement.scrollHeight,o=r.clientY+window.scrollY;this.lastTouchTime=Date.now(),this.recordPoint({x:r.clientX,y:o,xPct:i>0?r.clientX/i*100:0,yPct:n>0?o/n*100:0,pw:i,ph:n,type:"click"}),this.checkRageClick(r.clientX,o,this.currentPath)};this.handleScroll=()=>{if(Math.random()>this.sampleRate)return;let e=document.documentElement.scrollWidth,r=document.documentElement.scrollHeight,i=window.innerWidth,n=window.scrollX,o=window.scrollY,s=n+i/2;this.recordPoint({x:i/2,y:o,xPct:e>0?s/e*100:50,yPct:r>0?o/r*100:0,pw:e,ph:r,type:"scroll"})};this.handleNavigate=e=>{this.currentPath=T(e.detail.path)};this.emit=e,this.sessionId=r,this.sampleRate=i,this.maxPoints=n,this.allowedPaths=o&&o.length>0?new Set(o.map(s=>T(s))):null,this.throttledMouseMove=pt(this.handleMouseMove,50),this.throttledScroll=pt(this.handleScroll,100)}init(){this.currentPath=T(window.location.pathname+window.location.search),document.addEventListener("mousemove",this.throttledMouseMove),document.addEventListener("click",this.handleClick),document.addEventListener("touchend",this.handleTouchEnd,{passive:!0}),window.addEventListener("scroll",this.throttledScroll,{passive:!0}),window.addEventListener("tracker:navigate",this.handleNavigate)}destroy(){document.removeEventListener("mousemove",this.throttledMouseMove),document.removeEventListener("click",this.handleClick),document.removeEventListener("touchend",this.handleTouchEnd),window.removeEventListener("scroll",this.throttledScroll),window.removeEventListener("tracker:navigate",this.handleNavigate)}canRecord(){var e;return this.allowedPaths!==null&&!this.allowedPaths.has(this.currentPath)?!1:((e=this.pointCounts[this.currentPath])!=null?e:0)<this.maxPoints}recordPoint(e){var r;this.canRecord()&&(this.pointCounts[this.currentPath]=((r=this.pointCounts[this.currentPath])!=null?r:0)+1,this.emit({type:"heatmap",data:{...e,path:this.currentPath,timestamp:Date.now()}}))}getClickTarget(e){var n,o,s,a;let r=e.target;return r&&(r.getAttribute("aria-label")||((n=r.closest("[aria-label]"))==null?void 0:n.getAttribute("aria-label"))||r.getAttribute("data-track-label")||r.getAttribute("id")||(r instanceof HTMLButtonElement||r instanceof HTMLAnchorElement?(o=r.innerText)==null?void 0:o.trim().slice(0,60):(a=(s=r.closest("button, a"))==null?void 0:s.textContent)==null?void 0:a.trim().slice(0,60)))||void 0}checkRageClick(e,r,i){let n=Date.now();this.recentClicks=this.recentClicks.filter(s=>n-s.t<le.RAGE_WINDOW_MS),this.recentClicks.push({x:e,y:r,t:n});let o=this.recentClicks.filter(s=>Math.hypot(s.x-e,s.y-r)<=le.RAGE_RADIUS_PX);o.length>=le.RAGE_THRESHOLD&&(this.emit({type:"rageclik",data:{path:i,x:e,y:r,count:o.length,timestamp:n,sessionId:this.sessionId}}),this.recentClicks=[])}};le.RAGE_THRESHOLD=3,le.RAGE_WINDOW_MS=1e3,le.RAGE_RADIUS_PX=50;var Ge=le;var W;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(W||(W={}));function Gr(t){return t.nodeType===t.ELEMENT_NODE}function ve(t){var e=t==null?void 0:t.host;return(e==null?void 0:e.shadowRoot)===t}function me(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function Ur(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),t}function ft(t){try{var e=t.rules||t.cssRules;return e?Ur(Array.from(e).map(mt).join("")):null}catch(r){return null}}function mt(t){var e=t.cssText;if(Hr(t))try{e=ft(t.styleSheet)||e}catch(r){}return e}function Hr(t){return"styleSheet"in t}var Yt=(function(){function t(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return t.prototype.getId=function(e){var r;if(!e)return-1;var i=(r=this.getMeta(e))===null||r===void 0?void 0:r.id;return i!=null?i:-1},t.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},t.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},t.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},t.prototype.removeNodeFromMap=function(e){var r=this,i=this.getId(e);this.idNodeMap.delete(i),e.childNodes&&e.childNodes.forEach(function(n){return r.removeNodeFromMap(n)})},t.prototype.has=function(e){return this.idNodeMap.has(e)},t.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},t.prototype.add=function(e,r){var i=r.id;this.idNodeMap.set(i,e),this.nodeMetaMap.set(e,r)},t.prototype.replace=function(e,r){var i=this.getNode(e);if(i){var n=this.nodeMetaMap.get(i);n&&this.nodeMetaMap.set(r,n)}this.idNodeMap.set(e,r)},t.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},t})();function Jt(){return new Yt}function Oe(t){var e=t.maskInputOptions,r=t.tagName,i=t.type,n=t.value,o=t.maskInputFn,s=n||"";return(e[r.toLowerCase()]||e[i])&&(o?s=o(s):s="*".repeat(s.length)),s}var Kt="__rrweb_original__";function Zr(t){var e=t.getContext("2d");if(!e)return!0;for(var r=50,i=0;i<t.width;i+=r)for(var n=0;n<t.height;n+=r){var o=e.getImageData,s=Kt in o?o[Kt]:o,a=new Uint32Array(s.call(e,i,n,Math.min(r,t.width-i),Math.min(r,t.height-n)).data.buffer);if(a.some(function(c){return c!==0}))return!1}return!0}var Kr=1,zr=new RegExp("[^a-z0-9-_:]"),ge=-2;function gt(){return Kr++}function Yr(t){if(t instanceof HTMLFormElement)return"form";var e=t.tagName.toLowerCase().trim();return zr.test(e)?"div":e}function Jr(t){return t.cssRules?Array.from(t.cssRules).map(function(e){return e.cssText||""}).join(""):""}function jr(t){var e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var we,zt,Qr=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,qr=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Xr=/^(data:)([^,]*),(.*)/i;function Ue(t,e){return(t||"").replace(Qr,function(r,i,n,o,s,a){var c=n||s||a,d=i||o||"";if(!c)return r;if(!qr.test(c)||Xr.test(c))return"url(".concat(d).concat(c).concat(d,")");if(c[0]==="/")return"url(".concat(d).concat(jr(e)+c).concat(d,")");var l=e.split("/"),u=c.split("/");l.pop();for(var p=0,m=u;p<m.length;p++){var h=m[p];h!=="."&&(h===".."?l.pop():l.push(h))}return"url(".concat(d).concat(l.join("/")).concat(d,")")})}var $r=/^[^ \t\n\r\u000c]+/,ei=/^[, \t\n\r\u000c]+/;function ti(t,e){if(e.trim()==="")return e;var r=0;function i(d){var l,u=d.exec(e.substring(r));return u?(l=u[0],r+=l.length,l):""}for(var n=[];i(ei),!(r>=e.length);){var o=i($r);if(o.slice(-1)===",")o=Ae(t,o.substring(0,o.length-1)),n.push(o);else{var s="";o=Ae(t,o);for(var a=!1;;){var c=e.charAt(r);if(c===""){n.push((o+s).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){r+=1,n.push((o+s).trim());break}else c==="("&&(a=!0);s+=c,r+=1}}}return n.join(", ")}function Ae(t,e){if(!e||e.trim()==="")return e;var r=t.createElement("a");return r.href=e,r.href}function ri(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function vt(){var t=document.createElement("a");return t.href="",t.href}function yt(t,e,r,i){return r==="src"||r==="href"&&i&&!(e==="use"&&i[0]==="#")||r==="xlink:href"&&i&&i[0]!=="#"||r==="background"&&i&&(e==="table"||e==="td"||e==="th")?Ae(t,i):r==="srcset"&&i?ti(t,i):r==="style"&&i?Ue(i,vt()):e==="object"&&r==="data"&&i?Ae(t,i):i}function ii(t,e,r){if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(var i=t.classList.length;i--;){var n=t.classList[i];if(e.test(n))return!0}return r?t.matches(r):!1}function Ne(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return r?Ne(t.parentNode,e,r):!1;for(var i=t.classList.length;i--;){var n=t.classList[i];if(e.test(n))return!0}return r?Ne(t.parentNode,e,r):!1}function It(t,e,r){var i=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(i===null)return!1;if(typeof e=="string"){if(i.classList.contains(e)||i.closest(".".concat(e)))return!0}else if(Ne(i,e,!0))return!0;return!!(r&&(i.matches(r)||i.closest(r)))}function ni(t,e,r){var i=t.contentWindow;if(i){var n=!1,o;try{o=i.document.readyState}catch(c){return}if(o!=="complete"){var s=setTimeout(function(){n||(e(),n=!0)},r);t.addEventListener("load",function(){clearTimeout(s),n=!0,e()});return}var a="about:blank";if(i.location.href!==a||t.src===a||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}}function oi(t,e,r){var i=!1,n;try{n=t.sheet}catch(s){return}if(!n){var o=setTimeout(function(){i||(e(),i=!0)},r);t.addEventListener("load",function(){clearTimeout(o),i=!0,e()})}}function ai(t,e){var r=e.doc,i=e.mirror,n=e.blockClass,o=e.blockSelector,s=e.maskTextClass,a=e.maskTextSelector,c=e.inlineStylesheet,d=e.maskInputOptions,l=d===void 0?{}:d,u=e.maskTextFn,p=e.maskInputFn,m=e.dataURLOptions,h=m===void 0?{}:m,v=e.inlineImages,I=e.recordCanvas,y=e.keepIframeSrcFn,f=e.newlyAddedElement,g=f===void 0?!1:f,b=si(r,i);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:W.Document,childNodes:[],compatMode:t.compatMode}:{type:W.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:W.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:b};case t.ELEMENT_NODE:return di(t,{doc:r,blockClass:n,blockSelector:o,inlineStylesheet:c,maskInputOptions:l,maskInputFn:p,dataURLOptions:h,inlineImages:v,recordCanvas:I,keepIframeSrcFn:y,newlyAddedElement:g,rootId:b});case t.TEXT_NODE:return ci(t,{maskTextClass:s,maskTextSelector:a,maskTextFn:u,rootId:b});case t.CDATA_SECTION_NODE:return{type:W.CDATA,textContent:"",rootId:b};case t.COMMENT_NODE:return{type:W.Comment,textContent:t.textContent||"",rootId:b};default:return!1}}function si(t,e){if(e.hasNode(t)){var r=e.getId(t);return r===1?void 0:r}}function ci(t,e){var r,i=e.maskTextClass,n=e.maskTextSelector,o=e.maskTextFn,s=e.rootId,a=t.parentNode&&t.parentNode.tagName,c=t.textContent,d=a==="STYLE"?!0:void 0,l=a==="SCRIPT"?!0:void 0;if(d&&c){try{t.nextSibling||t.previousSibling||!((r=t.parentNode.sheet)===null||r===void 0)&&r.cssRules&&(c=Jr(t.parentNode.sheet))}catch(u){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(u),t)}c=Ue(c,vt())}return l&&(c="SCRIPT_PLACEHOLDER"),!d&&!l&&c&&It(t,i,n)&&(c=o?o(c):c.replace(/[\S]/g,"*")),{type:W.Text,textContent:c||"",isStyle:d,rootId:s}}function di(t,e){for(var r=e.doc,i=e.blockClass,n=e.blockSelector,o=e.inlineStylesheet,s=e.maskInputOptions,a=s===void 0?{}:s,c=e.maskInputFn,d=e.dataURLOptions,l=d===void 0?{}:d,u=e.inlineImages,p=e.recordCanvas,m=e.keepIframeSrcFn,h=e.newlyAddedElement,v=h===void 0?!1:h,I=e.rootId,y=ii(t,i,n),f=Yr(t),g={},b=t.attributes.length,B=0;B<b;B++){var L=t.attributes[B];g[L.name]=yt(r,f,L.name,L.value)}if(f==="link"&&o){var F=Array.from(r.styleSheets).find(function(J){return J.href===t.href}),R=null;F&&(R=ft(F)),R&&(delete g.rel,delete g.href,g._cssText=Ue(R,F.href))}if(f==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){var R=ft(t.sheet);R&&(g._cssText=Ue(R,vt()))}if(f==="input"||f==="textarea"||f==="select"){var K=t.value,z=t.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&K?g.value=Oe({type:g.type,tagName:f,value:K,maskInputOptions:a,maskInputFn:c}):z&&(g.checked=z)}if(f==="option"&&(t.selected&&!a.select?g.selected=!0:delete g.selected),f==="canvas"&&p){if(t.__context==="2d")Zr(t)||(g.rr_dataURL=t.toDataURL(l.type,l.quality));else if(!("__context"in t)){var Q=t.toDataURL(l.type,l.quality),q=document.createElement("canvas");q.width=t.width,q.height=t.height;var X=q.toDataURL(l.type,l.quality);Q!==X&&(g.rr_dataURL=Q)}}if(f==="img"&&u){we||(we=r.createElement("canvas"),zt=we.getContext("2d"));var D=t,Y=D.crossOrigin;D.crossOrigin="anonymous";var $=function(){try{we.width=D.naturalWidth,we.height=D.naturalHeight,zt.drawImage(D,0,0),g.rr_dataURL=we.toDataURL(l.type,l.quality)}catch(J){console.warn("Cannot inline img src=".concat(D.currentSrc,"! Error: ").concat(J))}Y?g.crossOrigin=Y:D.removeAttribute("crossorigin")};D.complete&&D.naturalWidth!==0?$():D.onload=$}if((f==="audio"||f==="video")&&(g.rr_mediaState=t.paused?"paused":"played",g.rr_mediaCurrentTime=t.currentTime),v||(t.scrollLeft&&(g.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(g.rr_scrollTop=t.scrollTop)),y){var ne=t.getBoundingClientRect(),se=ne.width,U=ne.height;g={class:g.class,rr_width:"".concat(se,"px"),rr_height:"".concat(U,"px")}}return f==="iframe"&&!m(g.src)&&(t.contentDocument||(g.rr_src=g.src),delete g.src),{type:W.Element,tagName:f,attributes:g,childNodes:[],isSVG:ri(t)||void 0,needBlock:y,rootId:I}}function E(t){return t===void 0?"":t.toLowerCase()}function li(t,e){if(e.comment&&t.type===W.Comment)return!0;if(t.type===W.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&t.attributes.rel==="preload"&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&t.attributes.href.endsWith(".js")))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(E(t.attributes.name).match(/^msapplication-tile(image|color)$/)||E(t.attributes.name)==="application-name"||E(t.attributes.rel)==="icon"||E(t.attributes.rel)==="apple-touch-icon"||E(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&E(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(E(t.attributes.property).match(/^(og|twitter|fb):/)||E(t.attributes.name).match(/^(og|twitter):/)||E(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(E(t.attributes.name)==="robots"||E(t.attributes.name)==="googlebot"||E(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(E(t.attributes.name)==="author"||E(t.attributes.name)==="generator"||E(t.attributes.name)==="framework"||E(t.attributes.name)==="publisher"||E(t.attributes.name)==="progid"||E(t.attributes.property).match(/^article:/)||E(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(E(t.attributes.name)==="google-site-verification"||E(t.attributes.name)==="yandex-verification"||E(t.attributes.name)==="csrf-token"||E(t.attributes.name)==="p:domain_verify"||E(t.attributes.name)==="verify-v1"||E(t.attributes.name)==="verification"||E(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function fe(t,e){var r=e.doc,i=e.mirror,n=e.blockClass,o=e.blockSelector,s=e.maskTextClass,a=e.maskTextSelector,c=e.skipChild,d=c===void 0?!1:c,l=e.inlineStylesheet,u=l===void 0?!0:l,p=e.maskInputOptions,m=p===void 0?{}:p,h=e.maskTextFn,v=e.maskInputFn,I=e.slimDOMOptions,y=e.dataURLOptions,f=y===void 0?{}:y,g=e.inlineImages,b=g===void 0?!1:g,B=e.recordCanvas,L=B===void 0?!1:B,F=e.onSerialize,R=e.onIframeLoad,K=e.iframeLoadTimeout,z=K===void 0?5e3:K,Q=e.onStylesheetLoad,q=e.stylesheetLoadTimeout,X=q===void 0?5e3:q,D=e.keepIframeSrcFn,Y=D===void 0?function(){return!1}:D,$=e.newlyAddedElement,ne=$===void 0?!1:$,se=e.preserveWhiteSpace,U=se===void 0?!0:se,J=ai(t,{doc:r,mirror:i,blockClass:n,blockSelector:o,maskTextClass:s,maskTextSelector:a,inlineStylesheet:u,maskInputOptions:m,maskTextFn:h,maskInputFn:v,dataURLOptions:f,inlineImages:b,recordCanvas:L,keepIframeSrcFn:Y,newlyAddedElement:ne});if(!J)return console.warn(t,"not serialized"),null;var de;i.hasNode(t)?de=i.getId(t):li(J,I)||!U&&J.type===W.Text&&!J.isStyle&&!J.textContent.replace(/^\s+|\s+$/gm,"").length?de=ge:de=gt();var O=Object.assign(J,{id:de});if(i.add(t,O),de===ge)return null;F&&F(t);var ee=!d;if(O.type===W.Element){ee=ee&&!O.needBlock,delete O.needBlock;var oe=t.shadowRoot;oe&&me(oe)&&(O.isShadowHost=!0)}if((O.type===W.Document||O.type===W.Element)&&ee){I.headWhitespace&&O.type===W.Element&&O.tagName==="head"&&(U=!1);for(var Se={doc:r,mirror:i,blockClass:n,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:d,inlineStylesheet:u,maskInputOptions:m,maskTextFn:h,maskInputFn:v,slimDOMOptions:I,dataURLOptions:f,inlineImages:b,recordCanvas:L,preserveWhiteSpace:U,onSerialize:F,onIframeLoad:R,iframeLoadTimeout:z,onStylesheetLoad:Q,stylesheetLoadTimeout:X,keepIframeSrcFn:Y},C=0,V=Array.from(t.childNodes);C<V.length;C++){var H=V[C],M=fe(H,Se);M&&O.childNodes.push(M)}if(Gr(t)&&t.shadowRoot)for(var j=0,A=Array.from(t.shadowRoot.childNodes);j<A.length;j++){var H=A[j],M=fe(H,Se);M&&(me(t.shadowRoot)&&(M.isShadow=!0),O.childNodes.push(M))}}return t.parentNode&&ve(t.parentNode)&&me(t.parentNode)&&(O.isShadow=!0),O.type===W.Element&&O.tagName==="iframe"&&ni(t,function(){var Z=t.contentDocument;if(Z&&R){var Ee=fe(Z,{doc:Z,mirror:i,blockClass:n,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:m,maskTextFn:h,maskInputFn:v,slimDOMOptions:I,dataURLOptions:f,inlineImages:b,recordCanvas:L,preserveWhiteSpace:U,onSerialize:F,onIframeLoad:R,iframeLoadTimeout:z,onStylesheetLoad:Q,stylesheetLoadTimeout:X,keepIframeSrcFn:Y});Ee&&R(t,Ee)}},z),O.type===W.Element&&O.tagName==="link"&&O.attributes.rel==="stylesheet"&&oi(t,function(){if(Q){var Z=fe(t,{doc:r,mirror:i,blockClass:n,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:m,maskTextFn:h,maskInputFn:v,slimDOMOptions:I,dataURLOptions:f,inlineImages:b,recordCanvas:L,preserveWhiteSpace:U,onSerialize:F,onIframeLoad:R,iframeLoadTimeout:z,onStylesheetLoad:Q,stylesheetLoadTimeout:X,keepIframeSrcFn:Y});Z&&Q(t,Z)}},X),O}function jt(t,e){var r=e||{},i=r.mirror,n=i===void 0?new Yt:i,o=r.blockClass,s=o===void 0?"rr-block":o,a=r.blockSelector,c=a===void 0?null:a,d=r.maskTextClass,l=d===void 0?"rr-mask":d,u=r.maskTextSelector,p=u===void 0?null:u,m=r.inlineStylesheet,h=m===void 0?!0:m,v=r.inlineImages,I=v===void 0?!1:v,y=r.recordCanvas,f=y===void 0?!1:y,g=r.maskAllInputs,b=g===void 0?!1:g,B=r.maskTextFn,L=r.maskInputFn,F=r.slimDOM,R=F===void 0?!1:F,K=r.dataURLOptions,z=r.preserveWhiteSpace,Q=r.onSerialize,q=r.onIframeLoad,X=r.iframeLoadTimeout,D=r.onStylesheetLoad,Y=r.stylesheetLoadTimeout,$=r.keepIframeSrcFn,ne=$===void 0?function(){return!1}:$,se=b===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:b===!1?{password:!0}:b,U=R===!0||R==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:R==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:R===!1?{}:R;return fe(t,{doc:t,mirror:n,blockClass:s,blockSelector:c,maskTextClass:l,maskTextSelector:p,skipChild:!1,inlineStylesheet:h,maskInputOptions:se,maskTextFn:B,maskInputFn:L,slimDOMOptions:U,dataURLOptions:K,inlineImages:I,recordCanvas:f,preserveWhiteSpace:z,onSerialize:Q,onIframeLoad:q,iframeLoadTimeout:X,onStylesheetLoad:D,stylesheetLoadTimeout:Y,keepIframeSrcFn:ne,newlyAddedElement:!1})}var ui=/([^\\]):hover/,sn=new RegExp(ui.source,"g");function _(t,e,r=document){let i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>r.removeEventListener(t,e,i)}var ke=`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
|
-
or you can use record.mirror to access the mirror instance during recording.`,_t={map:{},getId(){return console.error(Se),-1},getNode(){return console.error(Se),null},removeNodeFromMap(){console.error(Se)},has(){return console.error(Se),!1},reset(){console.error(Se)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(_t=new Proxy(_t,{get(t,e,r){return e==="map"&&console.error(Se),Reflect.get(t,e,r)}}));function be(t,e,r={}){let i=null,n=0;return function(...o){let a=Date.now();!n&&r.leading===!1&&(n=a);let s=e-(a-n),c=this;s<=0||s>e?(i&&(clearTimeout(i),i=null),n=a,t.apply(c,o)):!i&&r.trailing!==!1&&(i=setTimeout(()=>{n=r.leading===!1?0:Date.now(),i=null,t.apply(c,o)},s))}}function fe(t,e,r,i,n=window){let o=n.Object.getOwnPropertyDescriptor(t,e);return n.Object.defineProperty(t,e,i?r:{set(a){setTimeout(()=>{r.set.call(this,a)},0),o&&o.set&&o.set.call(this,a)}}),()=>fe(t,e,o||{},!0)}function ee(t,e,r){try{if(!(e in t))return()=>{};let i=t[e],n=r(i);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(i){return()=>{}}}function Be(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function _e(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function M(t,e,r,i){if(!t)return!1;let n=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(!n)return!1;if(typeof e=="string"){if(n.classList.contains(e)||i&&n.closest("."+e)!==null)return!0}else if(Re(n,e,i))return!0;return!!(r&&(t.matches(r)||i&&n.closest(r)!==null))}function Vt(t,e){return e.getId(t)!==-1}function Ve(t,e){return e.getId(t)===he}function mt(t,e){if(pe(t))return!1;let r=e.getId(t);return e.has(r)?t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE?!1:t.parentNode?mt(t.parentNode,e):!0:!0}function vt(t){return!!t.changedTouches}function Gt(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let r=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function Ge(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function Ue(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function He(t){return!!(t!=null&&t.shadowRoot)}var We=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){var r;return(r=this.styleIDMap.get(e))!==null&&r!==void 0?r:-1}has(e){return this.styleIDMap.has(e)}add(e,r){if(this.has(e))return this.getId(e);let i;return r===void 0?i=this.id++:i=r,this.styleIDMap.set(e,i),this.idStyleMap.set(i,e),i}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};var b=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(b||{}),S=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t))(S||{}),Ze=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Ze||{}),oe=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(oe||{});function Ut(t){return"__ln"in t}var yt=class{constructor(){this.length=0,this.head=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let i=0;i<e;i++)r=(r==null?void 0:r.next)||null;return r}addNode(e){let r={value:e,previous:null,next:null};if(e.__ln=r,e.previousSibling&&Ut(e.previousSibling)){let i=e.previousSibling.__ln.next;r.next=i,r.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=r,i&&(i.previous=r)}else if(e.nextSibling&&Ut(e.nextSibling)&&e.nextSibling.__ln.previous){let i=e.nextSibling.__ln.previous;r.previous=i,r.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=r,i&&(i.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;this.length++}removeNode(e){let r=e.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next&&(r.next.previous=r.previous)):(this.head=r.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}},Ht=(t,e)=>`${t}@${e}`,Ke=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],r=new yt,i=s=>{let c=s,l=he;for(;l===he;)c=c&&c.nextSibling,l=c&&this.mirror.getId(c);return l},n=s=>{var c,l,d,u;let p=null;((l=(c=s.getRootNode)===null||c===void 0?void 0:c.call(s))===null||l===void 0?void 0:l.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&s.getRootNode().host&&(p=s.getRootNode().host);let f=p;for(;((u=(d=f==null?void 0:f.getRootNode)===null||d===void 0?void 0:d.call(f))===null||u===void 0?void 0:u.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&f.getRootNode().host;)f=f.getRootNode().host;let h=!this.doc.contains(s)&&(!f||!this.doc.contains(f));if(!s.parentNode||h)return;let v=pe(s.parentNode)?this.mirror.getId(p):this.mirror.getId(s.parentNode),C=i(s);if(v===-1||C===-1)return r.addNode(s);let y=de(s,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:g=>{Ge(g,this.mirror)&&this.iframeManager.addIframe(g),Ue(g,this.mirror)&&this.stylesheetManager.trackLinkElement(g),He(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(g,m)=>{this.iframeManager.attachIframe(g,m),this.shadowDomManager.observeAttachShadow(g)},onStylesheetLoad:(g,m)=>{this.stylesheetManager.attachLinkElement(g,m)}});y&&e.push({parentId:v,nextId:C,node:y})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let s of Array.from(this.movedSet.values()))Zt(this.removes,s,this.mirror)&&!this.movedSet.has(s.parentNode)||n(s);for(let s of Array.from(this.addedSet.values()))!Kt(this.droppedSet,s)&&!Zt(this.removes,s,this.mirror)||Kt(this.movedSet,s)?n(s):this.droppedSet.add(s);let o=null;for(;r.length;){let s=null;if(o){let c=this.mirror.getId(o.value.parentNode),l=i(o.value);c!==-1&&l!==-1&&(s=o)}if(!s)for(let c=r.length-1;c>=0;c--){let l=r.get(c);if(l){let d=this.mirror.getId(l.value.parentNode);if(i(l.value)===-1)continue;if(d!==-1){s=l;break}else{let p=l.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let f=p.parentNode.host;if(this.mirror.getId(f)!==-1){s=l;break}}}}}if(!s){for(;r.head;)r.removeNode(r.head.value);break}o=s.previous,r.removeNode(s.value),n(s.value)}let a={texts:this.texts.map(s=>({id:this.mirror.getId(s.node),value:s.value})).filter(s=>this.mirror.has(s.id)),attributes:this.attributes.map(s=>({id:this.mirror.getId(s.node),attributes:s.attributes})).filter(s=>this.mirror.has(s.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=e=>{if(!Ve(e.target,this.mirror))switch(e.type){case"characterData":{let r=e.target.textContent;!M(e.target,this.blockClass,this.blockSelector,!1)&&r!==e.oldValue&&this.texts.push({value:gt(e.target,this.maskTextClass,this.maskTextSelector)&&r?this.maskTextFn?this.maskTextFn(r):r.replace(/[\S]/g,"*"):r,node:e.target});break}case"attributes":{let r=e.target,i=e.target.getAttribute(e.attributeName);if(e.attributeName==="value"&&(i=Ee({maskInputOptions:this.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:i,maskInputFn:this.maskInputFn})),M(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributes.find(o=>o.node===e.target);if(r.tagName==="IFRAME"&&e.attributeName==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)e.attributeName="rr_src";else return;if(n||(n={node:e.target,attributes:{}},this.attributes.push(n)),e.attributeName==="style"){let o=this.doc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue),(n.attributes.style===void 0||n.attributes.style===null)&&(n.attributes.style={});let a=n.attributes.style;for(let s of Array.from(r.style)){let c=r.style.getPropertyValue(s),l=r.style.getPropertyPriority(s);(c!==o.style.getPropertyValue(s)||l!==o.style.getPropertyPriority(s))&&(l===""?a[s]=c:a[s]=[c,l])}for(let s of Array.from(o.style))r.style.getPropertyValue(s)===""&&(a[s]=!1)}else n.attributes[e.attributeName]=ft(this.doc,r.tagName,e.attributeName,i);break}case"childList":{if(M(e.target,this.blockClass,this.blockSelector,!0))return;e.addedNodes.forEach(r=>this.genAdds(r,e.target)),e.removedNodes.forEach(r=>{let i=this.mirror.getId(r),n=pe(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);M(e.target,this.blockClass,this.blockSelector,!1)||Ve(r,this.mirror)||!Vt(r,this.mirror)||(this.addedSet.has(r)?(It(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(e.target)&&i===-1||mt(e.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Ht(i,n)]?It(this.movedSet,r):this.removes.push({parentId:n,id:i,isShadow:pe(e.target)&&ue(e.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(e,r)=>{if(this.mirror.hasNode(e)){if(Ve(e,this.mirror))return;this.movedSet.add(e);let i=null;r&&this.mirror.hasNode(r)&&(i=this.mirror.getId(r)),i&&i!==-1&&(this.movedMap[Ht(this.mirror.getId(e),i)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);M(e,this.blockClass,this.blockSelector,!1)||e.childNodes.forEach(i=>this.genAdds(i))}}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach(r=>{this[r]=e[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function It(t,e){t.delete(e),e.childNodes.forEach(r=>It(t,r))}function Zt(t,e,r){return t.length===0?!1:zt(t,e,r)}function zt(t,e,r){let{parentNode:i}=e;if(!i)return!1;let n=r.getId(i);return t.some(o=>o.id===n)?!0:zt(t,i,r)}function Kt(t,e){return t.size===0?!1:Yt(t,e)}function Yt(t,e){let{parentNode:r}=e;return r?t.has(r)?!0:Yt(t,r):!1}var le=[],Qt=typeof CSSGroupingRule!="undefined",Xt=typeof CSSMediaRule!="undefined",qt=typeof CSSSupportsRule!="undefined",$t=typeof CSSConditionRule!="undefined";function Me(t){try{if("composedPath"in t){let e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0];return t.target}catch(e){return t.target}}function Ct(t,e){var r,i;let n=new Ke;le.push(n),n.init(t);let o=window.MutationObserver||window.__rrMutationObserver,a=(i=(r=window==null?void 0:window.Zone)===null||r===void 0?void 0:r.__symbol__)===null||i===void 0?void 0:i.call(r,"MutationObserver");a&&window[a]&&(o=window[a]);let s=new o(n.processMutations.bind(n));return s.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Xr({mousemoveCb:t,sampling:e,doc:r,mirror:i}){if(e.mousemove===!1)return()=>{};let n=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,a=[],s,c=be(u=>{let p=Date.now()-s;t(a.map(f=>(f.timeOffset-=p,f)),u),a=[],s=null},o),l=be(u=>{let p=Me(u),{clientX:f,clientY:h}=vt(u)?u.changedTouches[0]:u;s||(s=Date.now()),a.push({x:f,y:h,id:i.getId(p),timeOffset:Date.now()-s}),c(typeof DragEvent!="undefined"&&u instanceof DragEvent?S.Drag:u instanceof MouseEvent?S.MouseMove:S.TouchMove)},n,{trailing:!1}),d=[W("mousemove",l,r),W("touchmove",l,r),W("drag",l,r)];return()=>{d.forEach(u=>u())}}function qr({mouseInteractionCb:t,doc:e,mirror:r,blockClass:i,blockSelector:n,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,s=[],c=l=>d=>{let u=Me(d);if(M(u,i,n,!0))return;let p=vt(d)?d.changedTouches[0]:d;if(!p)return;let f=r.getId(u),{clientX:h,clientY:v}=p;t({type:Ze[l],id:f,x:h,y:v})};return Object.keys(Ze).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEach(l=>{let d=l.toLowerCase(),u=c(l);s.push(W(d,u,e))}),()=>{s.forEach(l=>l())}}function St({scrollCb:t,doc:e,mirror:r,blockClass:i,blockSelector:n,sampling:o}){let a=be(s=>{let c=Me(s);if(!c||M(c,i,n,!0))return;let l=r.getId(c);if(c===e){let d=e.scrollingElement||e.documentElement;t({id:l,x:d.scrollLeft,y:d.scrollTop})}else t({id:l,x:c.scrollLeft,y:c.scrollTop})},o.scroll||100);return W("scroll",a,e)}function $r({viewportResizeCb:t}){let e=-1,r=-1,i=be(()=>{let n=Be(),o=_e();(e!==n||r!==o)&&(t({width:Number(o),height:Number(n)}),e=n,r=o)},200);return W("resize",i,window)}function Jt(t,e){let r=Object.assign({},t);return e||delete r.userTriggered,r}var ei=["INPUT","TEXTAREA","SELECT"],jt=new WeakMap;function ti({inputCb:t,doc:e,mirror:r,blockClass:i,blockSelector:n,ignoreClass:o,maskInputOptions:a,maskInputFn:s,sampling:c,userTriggeredOnInput:l}){function d(y){let g=Me(y),m=y.isTrusted;if(g&&g.tagName==="OPTION"&&(g=g.parentElement),!g||!g.tagName||ei.indexOf(g.tagName)<0||M(g,i,n,!0))return;let A=g.type;if(g.classList.contains(o))return;let B=g.value,D=!1;A==="radio"||A==="checkbox"?D=g.checked:(a[g.tagName.toLowerCase()]||a[A])&&(B=Ee({maskInputOptions:a,tagName:g.tagName,type:A,value:B,maskInputFn:s})),u(g,Jt({text:B,isChecked:D,userTriggered:m},l));let P=g.name;A==="radio"&&P&&D&&e.querySelectorAll(`input[type="radio"][name="${P}"]`).forEach(T=>{T!==g&&u(T,Jt({text:T.value,isChecked:!D,userTriggered:!1},l))})}function u(y,g){let m=jt.get(y);if(!m||m.text!==g.text||m.isChecked!==g.isChecked){jt.set(y,g);let A=r.getId(y);t(Object.assign(Object.assign({},g),{id:A}))}}let f=(c.input==="last"?["change"]:["input","change"]).map(y=>W(y,d,e)),h=e.defaultView;if(!h)return()=>{f.forEach(y=>y())};let v=h.Object.getOwnPropertyDescriptor(h.HTMLInputElement.prototype,"value"),C=[[h.HTMLInputElement.prototype,"value"],[h.HTMLInputElement.prototype,"checked"],[h.HTMLSelectElement.prototype,"value"],[h.HTMLTextAreaElement.prototype,"value"],[h.HTMLSelectElement.prototype,"selectedIndex"],[h.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&f.push(...C.map(y=>fe(y[0],y[1],{set(){d({target:this})}},!1,h))),()=>{f.forEach(y=>y())}}function ze(t){let e=[];function r(i,n){if(Qt&&i.parentRule instanceof CSSGroupingRule||Xt&&i.parentRule instanceof CSSMediaRule||qt&&i.parentRule instanceof CSSSupportsRule||$t&&i.parentRule instanceof CSSConditionRule){let a=Array.from(i.parentRule.cssRules).indexOf(i);n.unshift(a)}else if(i.parentStyleSheet){let a=Array.from(i.parentStyleSheet.cssRules).indexOf(i);n.unshift(a)}return n}return r(t,e)}function ce(t,e,r){let i,n;return t?(t.ownerNode?i=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:i}):{}}function ri({styleSheetRuleCb:t,mirror:e,stylesheetManager:r},{win:i}){let n=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=function(d,u){let{id:p,styleId:f}=ce(this,e,r.styleMirror);return(p&&p!==-1||f&&f!==-1)&&t({id:p,styleId:f,adds:[{rule:d,index:u}]}),n.apply(this,[d,u])};let o=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=function(d){let{id:u,styleId:p}=ce(this,e,r.styleMirror);return(u&&u!==-1||p&&p!==-1)&&t({id:u,styleId:p,removes:[{index:d}]}),o.apply(this,[d])};let a;i.CSSStyleSheet.prototype.replace&&(a=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=function(d){let{id:u,styleId:p}=ce(this,e,r.styleMirror);return(u&&u!==-1||p&&p!==-1)&&t({id:u,styleId:p,replace:d}),a.apply(this,[d])});let s;i.CSSStyleSheet.prototype.replaceSync&&(s=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=function(d){let{id:u,styleId:p}=ce(this,e,r.styleMirror);return(u&&u!==-1||p&&p!==-1)&&t({id:u,styleId:p,replaceSync:d}),s.apply(this,[d])});let c={};Qt?c.CSSGroupingRule=i.CSSGroupingRule:(Xt&&(c.CSSMediaRule=i.CSSMediaRule),$t&&(c.CSSConditionRule=i.CSSConditionRule),qt&&(c.CSSSupportsRule=i.CSSSupportsRule));let l={};return Object.entries(c).forEach(([d,u])=>{l[d]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=function(p,f){let{id:h,styleId:v}=ce(this.parentStyleSheet,e,r.styleMirror);return(h&&h!==-1||v&&v!==-1)&&t({id:h,styleId:v,adds:[{rule:p,index:[...ze(this),f||0]}]}),l[d].insertRule.apply(this,[p,f])},u.prototype.deleteRule=function(p){let{id:f,styleId:h}=ce(this.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||h&&h!==-1)&&t({id:f,styleId:h,removes:[{index:[...ze(this),p]}]}),l[d].deleteRule.apply(this,[p])}}),()=>{i.CSSStyleSheet.prototype.insertRule=n,i.CSSStyleSheet.prototype.deleteRule=o,a&&(i.CSSStyleSheet.prototype.replace=a),s&&(i.CSSStyleSheet.prototype.replaceSync=s),Object.entries(c).forEach(([d,u])=>{u.prototype.insertRule=l[d].insertRule,u.prototype.deleteRule=l[d].deleteRule})}}function bt({mirror:t,stylesheetManager:e},r){var i,n,o;let a=null;r.nodeName==="#document"?a=t.getId(r):a=t.getId(r.host);let s=r.nodeName==="#document"?(i=r.defaultView)===null||i===void 0?void 0:i.Document:(o=(n=r.ownerDocument)===null||n===void 0?void 0:n.defaultView)===null||o===void 0?void 0:o.ShadowRoot,c=Object.getOwnPropertyDescriptor(s==null?void 0:s.prototype,"adoptedStyleSheets");return a===null||a===-1||!s||!c?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var l;return(l=c.get)===null||l===void 0?void 0:l.call(this)},set(l){var d;let u=(d=c.set)===null||d===void 0?void 0:d.call(this,l);if(a!==null&&a!==-1)try{e.adoptStyleSheets(l,a)}catch(p){}return u}}),()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})})}function ii({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:r,stylesheetManager:i},{win:n}){let o=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=function(s,c,l){var d;if(r.has(s))return o.apply(this,[s,c,l]);let{id:u,styleId:p}=ce((d=this.parentRule)===null||d===void 0?void 0:d.parentStyleSheet,e,i.styleMirror);return(u&&u!==-1||p&&p!==-1)&&t({id:u,styleId:p,set:{property:s,value:c,priority:l},index:ze(this.parentRule)}),o.apply(this,[s,c,l])};let a=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=function(s){var c;if(r.has(s))return a.apply(this,[s]);let{id:l,styleId:d}=ce((c=this.parentRule)===null||c===void 0?void 0:c.parentStyleSheet,e,i.styleMirror);return(l&&l!==-1||d&&d!==-1)&&t({id:l,styleId:d,remove:{property:s},index:ze(this.parentRule)}),a.apply(this,[s])},()=>{n.CSSStyleDeclaration.prototype.setProperty=o,n.CSSStyleDeclaration.prototype.removeProperty=a}}function ni({mediaInteractionCb:t,blockClass:e,blockSelector:r,mirror:i,sampling:n}){let o=s=>be(c=>{let l=Me(c);if(!l||M(l,e,r,!0))return;let{currentTime:d,volume:u,muted:p,playbackRate:f}=l;t({type:s,id:i.getId(l),currentTime:d,volume:u,muted:p,playbackRate:f})},n.media||500),a=[W("play",o(0)),W("pause",o(1)),W("seeked",o(2)),W("volumechange",o(3)),W("ratechange",o(4))];return()=>{a.forEach(s=>s())}}function oi({fontCb:t,doc:e}){let r=e.defaultView;if(!r)return()=>{};let i=[],n=new WeakMap,o=r.FontFace;r.FontFace=function(c,l,d){let u=new o(c,l,d);return n.set(u,{family:c,buffer:typeof l!="string",descriptors:d,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),u};let a=ee(e.fonts,"add",function(s){return function(c){return setTimeout(()=>{let l=n.get(c);l&&(t(l),n.delete(c))},0),s.apply(this,[c])}});return i.push(()=>{r.FontFace=o}),i.push(a),()=>{i.forEach(s=>s())}}function si(t){let{doc:e,mirror:r,blockClass:i,blockSelector:n,selectionCb:o}=t,a=!0,s=()=>{let c=e.getSelection();if(!c||a&&(c!=null&&c.isCollapsed))return;a=c.isCollapsed||!1;let l=[],d=c.rangeCount||0;for(let u=0;u<d;u++){let p=c.getRangeAt(u),{startContainer:f,startOffset:h,endContainer:v,endOffset:C}=p;M(f,i,n,!0)||M(v,i,n,!0)||l.push({start:r.getId(f),startOffset:h,end:r.getId(v),endOffset:C})}o({ranges:l})};return s(),W("selectionchange",s)}function ai(t,e){let{mutationCb:r,mousemoveCb:i,mouseInteractionCb:n,scrollCb:o,viewportResizeCb:a,inputCb:s,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:d,canvasMutationCb:u,fontCb:p,selectionCb:f}=t;t.mutationCb=(...h)=>{e.mutation&&e.mutation(...h),r(...h)},t.mousemoveCb=(...h)=>{e.mousemove&&e.mousemove(...h),i(...h)},t.mouseInteractionCb=(...h)=>{e.mouseInteraction&&e.mouseInteraction(...h),n(...h)},t.scrollCb=(...h)=>{e.scroll&&e.scroll(...h),o(...h)},t.viewportResizeCb=(...h)=>{e.viewportResize&&e.viewportResize(...h),a(...h)},t.inputCb=(...h)=>{e.input&&e.input(...h),s(...h)},t.mediaInteractionCb=(...h)=>{e.mediaInteaction&&e.mediaInteaction(...h),c(...h)},t.styleSheetRuleCb=(...h)=>{e.styleSheetRule&&e.styleSheetRule(...h),l(...h)},t.styleDeclarationCb=(...h)=>{e.styleDeclaration&&e.styleDeclaration(...h),d(...h)},t.canvasMutationCb=(...h)=>{e.canvasMutation&&e.canvasMutation(...h),u(...h)},t.fontCb=(...h)=>{e.font&&e.font(...h),p(...h)},t.selectionCb=(...h)=>{e.selection&&e.selection(...h),f(...h)}}function er(t,e={}){let r=t.doc.defaultView;if(!r)return()=>{};ai(t,e);let i=Ct(t,t.doc),n=Xr(t),o=qr(t),a=St(t),s=$r(t),c=ti(t),l=ni(t),d=ri(t,{win:r}),u=bt(t,t.doc),p=ii(t,{win:r}),f=t.collectFonts?oi(t):()=>{},h=si(t),v=[];for(let C of t.plugins)v.push(C.observer(C.callback,r,C.options));return()=>{le.forEach(C=>C.reset()),i.disconnect(),n(),o(),a(),s(),c(),l(),d(),u(),p(),f(),h(),v.forEach(C=>C())}}var xe=class{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,r,i,n){let o=i||this.getIdToRemoteIdMap(e),a=n||this.getRemoteIdToIdMap(e),s=o.get(r);return s||(s=this.generateIdFn(),o.set(r,s),a.set(s,r)),s}getIds(e,r){let i=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return r.map(o=>this.getId(e,o,i,n))}getRemoteId(e,r,i){let n=i||this.getRemoteIdToIdMap(e);if(typeof r!="number")return r;let o=n.get(r);return o||-1}getRemoteIds(e,r){let i=this.getRemoteIdToIdMap(e);return r.map(n=>this.getRemoteId(e,n,i))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let r=this.iframeIdToRemoteIdMap.get(e);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(e,r)),r}getRemoteIdToIdMap(e){let r=this.iframeRemoteIdToIdMap.get(e);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(e,r)),r}};var Ye=class{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new xe(ht),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new xe(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,r){var i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(i=this.loadListener)===null||i===void 0||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){if(e.data.type==="rrweb"){if(!e.source)return;let i=this.crossOriginIframeMap.get(e.source);if(!i)return;let n=this.transformCrossOriginEvent(i,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}}transformCrossOriginEvent(e,r){var i;switch(r.type){case b.FullSnapshot:return this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(r.data.node,e),{timestamp:r.timestamp,type:b.IncrementalSnapshot,data:{source:S.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case b.Meta:case b.Load:case b.DomContentLoaded:return!1;case b.Plugin:return r;case b.Custom:return this.replaceIds(r.data.payload,e,["id","parentId","previousId","nextId"]),r;case b.IncrementalSnapshot:switch(r.data.source){case S.Mutation:return r.data.adds.forEach(n=>{this.replaceIds(n,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,e)}),r.data.removes.forEach(n=>{this.replaceIds(n,e,["parentId","id"])}),r.data.attributes.forEach(n=>{this.replaceIds(n,e,["id"])}),r.data.texts.forEach(n=>{this.replaceIds(n,e,["id"])}),r;case S.Drag:case S.TouchMove:case S.MouseMove:return r.data.positions.forEach(n=>{this.replaceIds(n,e,["id"])}),r;case S.ViewportResize:return!1;case S.MediaInteraction:case S.MouseInteraction:case S.Scroll:case S.CanvasMutation:case S.Input:return this.replaceIds(r.data,e,["id"]),r;case S.StyleSheetRule:case S.StyleDeclaration:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleId"]),r;case S.Font:return r;case S.Selection:return r.data.ranges.forEach(n=>{this.replaceIds(n,e,["start","end"])}),r;case S.AdoptedStyleSheet:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleIds"]),(i=r.data.styles)===null||i===void 0||i.forEach(n=>{this.replaceStyleIds(n,e,["styleId"])}),r}}}replace(e,r,i,n){for(let o of n)!Array.isArray(r[o])&&typeof r[o]!="number"||(Array.isArray(r[o])?r[o]=e.getIds(i,r[o]):r[o]=e.getId(i,r[o]));return r}replaceIds(e,r,i){return this.replace(this.crossOriginIframeMirror,e,r,i)}replaceStyleIds(e,r,i){return this.replace(this.crossOriginIframeStyleMirror,e,r,i)}replaceIdOnNode(e,r){this.replaceIds(e,r,["id"]),"childNodes"in e&&e.childNodes.forEach(i=>{this.replaceIdOnNode(i,r)})}};var Je=class{constructor(e){this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;let r=this;this.restorePatches.push(ee(Element.prototype,"attachShadow",function(i){return function(n){let o=i.call(this,n);return this.shadowRoot&&r.addShadowRoot(this.shadowRoot,this.ownerDocument),o}}))}addShadowRoot(e,r){ue(e)&&(this.shadowDoms.has(e)||(this.shadowDoms.add(e),Ct(Object.assign(Object.assign({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),St(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),bt({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)},0)))}observeAttachShadow(e){if(e.contentWindow){let r=this;this.restorePatches.push(ee(e.contentWindow.HTMLElement.prototype,"attachShadow",function(i){return function(n){let o=i.call(this,n);return this.shadowRoot&&r.addShadowRoot(this.shadowRoot,e.contentDocument),o}}))}}reset(){this.restorePatches.forEach(e=>e()),this.shadowDoms=new WeakSet}};function tr(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(t);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n])&&(r[i[n]]=t[i[n]]);return r}function rr(t,e,r,i){function n(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(i.next(d))}catch(u){a(u)}}function c(d){try{l(i.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):n(d.value).then(s,c)}l((i=i.apply(t,e||[])).next())})}var we="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ci=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(Ne=0;Ne<we.length;Ne++)ci[we.charCodeAt(Ne)]=Ne;var Ne,ir=function(t){var e=new Uint8Array(t),r,i=e.length,n="";for(r=0;r<i;r+=3)n+=we[e[r]>>2],n+=we[(e[r]&3)<<4|e[r+1]>>4],n+=we[(e[r+1]&15)<<2|e[r+2]>>6],n+=we[e[r+2]&63];return i%3===2?n=n.substring(0,n.length-1)+"=":i%3===1&&(n=n.substring(0,n.length-2)+"=="),n};var nr=new Map;function li(t,e){let r=nr.get(t);return r||(r=new Map,nr.set(t,r)),r.has(e)||r.set(e,[]),r.get(e)}var wt=(t,e,r)=>{if(!t||!(or(t,e)||typeof t=="object"))return;let i=t.constructor.name,n=li(r,i),o=n.indexOf(t);return o===-1&&(o=n.length,n.push(t)),o};function je(t,e,r){if(t instanceof Array)return t.map(i=>je(i,e,r));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){let i=t.constructor.name,n=ir(t);return{rr_type:i,base64:n}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[je(t.buffer,e,r),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){let i=t.constructor.name,{src:n}=t;return{rr_type:i,src:n}}else if(t instanceof HTMLCanvasElement){let i="HTMLImageElement",n=t.toDataURL();return{rr_type:i,src:n}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[je(t.data,e,r),t.width,t.height]};if(or(t,e)||typeof t=="object"){let i=t.constructor.name,n=wt(t,e,r);return{rr_type:i,index:n}}}}return t}var Qe=(t,e,r)=>[...t].map(i=>je(i,e,r)),or=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof e[n]=="function").find(n=>t instanceof e[n]);function sr(t,e,r,i){let n=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let a of o)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;let s=ee(e.CanvasRenderingContext2D.prototype,a,function(c){return function(...l){return M(this.canvas,r,i,!0)||setTimeout(()=>{let d=Qe([...l],e,this);t(this.canvas,{type:oe["2D"],property:a,args:d})},0),c.apply(this,l)}});n.push(s)}catch(s){let c=fe(e.CanvasRenderingContext2D.prototype,a,{set(l){t(this.canvas,{type:oe["2D"],property:a,args:[l],setter:!0})}});n.push(c)}return()=>{n.forEach(a=>a())}}function At(t,e,r){let i=[];try{let n=ee(t.HTMLCanvasElement.prototype,"getContext",function(o){return function(a,...s){return M(this,e,r,!0)||"__context"in this||(this.__context=a),o.apply(this,[a,...s])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function ar(t,e,r,i,n,o,a){let s=[],c=Object.getOwnPropertyNames(t);for(let l of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof t[l]!="function")continue;let d=ee(t,l,function(u){return function(...p){let f=u.apply(this,p);if(wt(f,a,this),!M(this.canvas,i,n,!0)){let h=Qe([...p],a,this),v={type:e,property:l,args:h};r(this.canvas,v)}return f}});s.push(d)}catch(d){let u=fe(t,l,{set(p){r(this.canvas,{type:e,property:l,args:[p],setter:!0})}});s.push(u)}return s}function cr(t,e,r,i,n){let o=[];return o.push(...ar(e.WebGLRenderingContext.prototype,oe.WebGL,t,r,i,n,e)),typeof e.WebGL2RenderingContext!="undefined"&&o.push(...ar(e.WebGL2RenderingContext.prototype,oe.WebGL2,t,r,i,n,e)),()=>{o.forEach(a=>a())}}var kt=null;try{lr=typeof module!="undefined"&&typeof module.require=="function"&&module.require("worker_threads")||typeof __non_webpack_require__=="function"&&__non_webpack_require__("worker_threads")||typeof at=="function"&&at("worker_threads"),kt=lr.Worker}catch(t){}var lr;function di(t,e){return Buffer.from(t,"base64").toString(e?"utf16":"utf8")}function dr(t,e,r){var i=e===void 0?null:e,n=r===void 0?!1:r,o=di(t,n),a=o.indexOf(`
|
|
4
|
-
`,10)+1,
|
|
5
|
-
`,10)+1,s=o.substring(a)+(i?"//# sourceMappingURL="+i:""),c=new Blob([s],{type:"application/javascript"});return URL.createObjectURL(c)}function ur(t,e,r){var i;return function(o){return i=i||hi(t,e,r),new Worker(i,o)}}var pi=Object.prototype.toString.call(typeof process!="undefined"?process:0)==="[object process]";function hr(){return pi}function pr(t,e,r){return hr()?dr(t,e,r):ur(t,e,r)}var fr=pr("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",null,!1);var Xe=class{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(c,l)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(l)};let{sampling:r="all",win:i,blockClass:n,blockSelector:o,recordCanvas:a,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&r==="all"&&this.initCanvasMutationObserver(i,n,o),a&&typeof r=="number"&&this.initCanvasFPSObserver(r,i,n,o,{dataURLOptions:s})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,r,i,n,o){let a=At(r,i,n),s=new Map,c=new fr;c.onmessage=h=>{let{id:v}=h.data;if(s.set(v,!1),!("base64"in h.data))return;let{base64:C,type:y,width:g,height:m}=h.data;this.mutationCb({id:v,type:oe["2D"],commands:[{property:"clearRect",args:[0,0,g,m]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:C}],type:y}]},0,0]}]})};let l=1e3/e,d=0,u,p=()=>{let h=[];return r.document.querySelectorAll("canvas").forEach(v=>{M(v,i,n,!0)||h.push(v)}),h},f=h=>{if(d&&h-d<l){u=requestAnimationFrame(f);return}d=h,p().forEach(v=>rr(this,void 0,void 0,function*(){var C;let y=this.mirror.getId(v);if(s.get(y))return;if(s.set(y,!0),["webgl","webgl2"].includes(v.__context)){let m=v.getContext(v.__context);((C=m==null?void 0:m.getContextAttributes())===null||C===void 0?void 0:C.preserveDrawingBuffer)===!1&&(m==null||m.clear(m.COLOR_BUFFER_BIT))}let g=yield createImageBitmap(v);c.postMessage({id:y,bitmap:g,width:v.width,height:v.height,dataURLOptions:o.dataURLOptions},[g])})),u=requestAnimationFrame(f)};u=requestAnimationFrame(f),this.resetObservers=()=>{a(),cancelAnimationFrame(u)}}initCanvasMutationObserver(e,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let n=At(e,r,i),o=sr(this.processMutation.bind(this),e,r,i),a=cr(this.processMutation.bind(this),e,r,i,this.mirror);this.resetObservers=()=>{n(),o(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=r=>{this.rafStamps.latestId=r,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,r)=>{let i=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,r){if(this.frozen||this.locked)return;let i=this.pendingCanvasMutations.get(e);if(!i||r===-1)return;let n=i.map(a=>tr(a,["type"])),{type:o}=i[0];this.mutationCb({id:r,type:o,commands:n}),this.pendingCanvasMutations.delete(e)}};var qe=class{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new We,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,r){if(e.length===0)return;let i={id:r,styleIds:[]},n=[];for(let o of e){let a;if(this.styleMirror.has(o))a=this.styleMirror.getId(o);else{a=this.styleMirror.add(o);let s=Array.from(o.rules||CSSRule);n.push({styleId:a,rules:s.map((c,l)=>({rule:ut(c),index:l}))})}i.styleIds.push(a)}n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}};function L(t){return Object.assign(Object.assign({},t),{timestamp:Date.now()})}var x,$e,Tt,et=!1,te=Wt();function ge(t={}){let{emit:e,checkoutEveryNms:r,checkoutEveryNth:i,blockClass:n="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",maskTextClass:s="rr-mask",maskTextSelector:c=null,inlineStylesheet:l=!0,maskAllInputs:d,maskInputOptions:u,slimDOMOptions:p,maskInputFn:f,maskTextFn:h,hooks:v,packFn:C,sampling:y={},dataURLOptions:g={},mousemoveWait:m,recordCanvas:A=!1,recordCrossOriginIframes:B=!1,userTriggeredOnInput:D=!1,collectFonts:P=!1,inlineImages:T=!1,plugins:Z,keepIframeSrcFn:K=()=>!1,ignoreCSSAttributes:j=new Set([])}=t,Q=B?window.parent===window:!0,X=!1;if(!Q)try{window.parent.document,X=!1}catch(I){X=!0}if(Q&&!e)throw new Error("emit function is required");m!==void 0&&y.mousemove===void 0&&(y.mousemove=m),te.reset();let O=d===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:u!==void 0?u:{password:!0},z=p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:p==="all",headMetaDescKeywords:p==="all"}:p||{};Gt();let q,re=0,ne=I=>{for(let _ of Z||[])_.eventProcessor&&(I=_.eventProcessor(I));return C&&(I=C(I)),I};x=(I,_)=>{var U;if(!((U=le[0])===null||U===void 0)&&U.isFrozen()&&I.type!==b.FullSnapshot&&!(I.type===b.IncrementalSnapshot&&I.data.source===S.Mutation)&&le.forEach(E=>E.unfreeze()),Q)e==null||e(ne(I),_);else if(X){let E={type:"rrweb",event:ne(I),isCheckout:_};window.parent.postMessage(E,"*")}if(I.type===b.FullSnapshot)q=I,re=0;else if(I.type===b.IncrementalSnapshot){if(I.data.source===S.Mutation&&I.data.isAttachIframe)return;re++;let E=i&&re>=i,J=r&&I.timestamp-q.timestamp>r;(E||J)&&$e(!0)}};let G=I=>{x(L({type:b.IncrementalSnapshot,data:Object.assign({source:S.Mutation},I)}))},Y=I=>x(L({type:b.IncrementalSnapshot,data:Object.assign({source:S.Scroll},I)})),se=I=>x(L({type:b.IncrementalSnapshot,data:Object.assign({source:S.CanvasMutation},I)})),N=I=>x(L({type:b.IncrementalSnapshot,data:Object.assign({source:S.AdoptedStyleSheet},I)})),$=new qe({mutationCb:G,adoptedStyleSheetCb:N}),ie=new Ye({mirror:te,mutationCb:G,stylesheetManager:$,recordCrossOriginIframes:B,wrappedEmit:x});for(let I of Z||[])I.getMirror&&I.getMirror({nodeMirror:te,crossOriginIframeMirror:ie.crossOriginIframeMirror,crossOriginIframeStyleMirror:ie.crossOriginIframeStyleMirror});Tt=new Xe({recordCanvas:A,mutationCb:se,win:window,blockClass:n,blockSelector:o,mirror:te,sampling:y.canvas,dataURLOptions:g});let ve=new Je({mutationCb:G,scrollCb:Y,bypassOptions:{blockClass:n,blockSelector:o,maskTextClass:s,maskTextSelector:c,inlineStylesheet:l,maskInputOptions:O,dataURLOptions:g,maskTextFn:h,maskInputFn:f,recordCanvas:A,inlineImages:T,sampling:y,slimDOMOptions:z,iframeManager:ie,stylesheetManager:$,canvasManager:Tt,keepIframeSrcFn:K},mirror:te});$e=(I=!1)=>{var _,U,E,J,w,H;x(L({type:b.Meta,data:{href:window.location.href,width:_e(),height:Be()}}),I),$.reset(),le.forEach(V=>V.lock());let Ae=Bt(document,{mirror:te,blockClass:n,blockSelector:o,maskTextClass:s,maskTextSelector:c,inlineStylesheet:l,maskAllInputs:O,maskTextFn:h,slimDOM:z,dataURLOptions:g,recordCanvas:A,inlineImages:T,onSerialize:V=>{Ge(V,te)&&ie.addIframe(V),Ue(V,te)&&$.trackLinkElement(V),He(V)&&ve.addShadowRoot(V.shadowRoot,document)},onIframeLoad:(V,ot)=>{ie.attachIframe(V,ot),ve.observeAttachShadow(V)},onStylesheetLoad:(V,ot)=>{$.attachLinkElement(V,ot)},keepIframeSrcFn:K});if(!Ae)return console.warn("Failed to snapshot the document");x(L({type:b.FullSnapshot,data:{node:Ae,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:(document==null?void 0:document.documentElement.scrollLeft)||((U=(_=document==null?void 0:document.body)===null||_===void 0?void 0:_.parentElement)===null||U===void 0?void 0:U.scrollLeft)||((E=document==null?void 0:document.body)===null||E===void 0?void 0:E.scrollLeft)||0,top:window.pageYOffset!==void 0?window.pageYOffset:(document==null?void 0:document.documentElement.scrollTop)||((w=(J=document==null?void 0:document.body)===null||J===void 0?void 0:J.parentElement)===null||w===void 0?void 0:w.scrollTop)||((H=document==null?void 0:document.body)===null||H===void 0?void 0:H.scrollTop)||0}}})),le.forEach(V=>V.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&$.adoptStyleSheets(document.adoptedStyleSheets,te.getId(document))};try{let I=[];I.push(W("DOMContentLoaded",()=>{x(L({type:b.DomContentLoaded,data:{}}))}));let _=E=>{var J;return er({mutationCb:G,mousemoveCb:(w,H)=>x(L({type:b.IncrementalSnapshot,data:{source:H,positions:w}})),mouseInteractionCb:w=>x(L({type:b.IncrementalSnapshot,data:Object.assign({source:S.MouseInteraction},w)})),scrollCb:Y,viewportResizeCb:w=>x(L({type:b.IncrementalSnapshot,data:Object.assign({source:S.ViewportResize},w)})),inputCb:w=>x(L({type:b.IncrementalSnapshot,data:Object.assign({source:S.Input},w)})),mediaInteractionCb:w=>x(L({type:b.IncrementalSnapshot,data:Object.assign({source:S.MediaInteraction},w)})),styleSheetRuleCb:w=>x(L({type:b.IncrementalSnapshot,data:Object.assign({source:S.StyleSheetRule},w)})),styleDeclarationCb:w=>x(L({type:b.IncrementalSnapshot,data:Object.assign({source:S.StyleDeclaration},w)})),canvasMutationCb:se,fontCb:w=>x(L({type:b.IncrementalSnapshot,data:Object.assign({source:S.Font},w)})),selectionCb:w=>{x(L({type:b.IncrementalSnapshot,data:Object.assign({source:S.Selection},w)}))},blockClass:n,ignoreClass:a,maskTextClass:s,maskTextSelector:c,maskInputOptions:O,inlineStylesheet:l,sampling:y,recordCanvas:A,inlineImages:T,userTriggeredOnInput:D,collectFonts:P,doc:E,maskInputFn:f,maskTextFn:h,keepIframeSrcFn:K,blockSelector:o,slimDOMOptions:z,dataURLOptions:g,mirror:te,iframeManager:ie,stylesheetManager:$,shadowDomManager:ve,canvasManager:Tt,ignoreCSSAttributes:j,plugins:((J=Z==null?void 0:Z.filter(w=>w.observer))===null||J===void 0?void 0:J.map(w=>({observer:w.observer,options:w.options,callback:H=>x(L({type:b.Plugin,data:{plugin:w.name,payload:H}}))})))||[]},v)};ie.addLoadListener(E=>{I.push(_(E.contentDocument))});let U=()=>{$e(),I.push(_(document)),et=!0};return document.readyState==="interactive"||document.readyState==="complete"?U():I.push(W("load",()=>{x(L({type:b.Load,data:{}})),U()},window)),()=>{I.forEach(E=>E()),et=!1}}catch(I){console.warn(I)}}ge.addCustomEvent=(t,e)=>{if(!et)throw new Error("please add custom event after start recording");x(L({type:b.Custom,data:{tag:t,payload:e}}))};ge.freezePage=()=>{le.forEach(t=>t.freeze())};ge.takeFullSnapshot=t=>{if(!et)throw new Error("please take full snapshot after start recording");$e(t)};ge.mirror=te;var tt=class{constructor(e){this.opts=e;this.seq=0;this.buffer=[];this.stopRecording=null;this.flushTimer=null}start(){var e,r;typeof document=="undefined"||this.stopRecording||(this.stopRecording=(r=ge({emit:i=>{this.buffer.push(i),this.buffer.length>=this.opts.maxEventsPerBatch&&this.flush()},checkoutEveryNms:(e=this.opts.checkoutEveryNms)!=null?e:6e5}))!=null?r:null,this.flushTimer=setInterval(()=>{this.buffer.length>0&&this.flush()},this.opts.flushIntervalMs))}flush(){if(this.buffer.length===0)return;let e=this.buffer.splice(0,this.buffer.length);this.opts.emit({type:"session_replay",data:{seq:this.seq++,events:e}})}destroy(){var e;this.flushTimer!==null&&(clearInterval(this.flushTimer),this.flushTimer=null),this.flush(),(e=this.stopRecording)==null||e.call(this),this.stopRecording=null}};var rt="1.0.2";function gr(t){var r,i;let e=t.toLowerCase();return/ipad|tablet|(android(?!.*mobile))/i.test(e)?"tablet":/mobile|android|iphone|ipod|windows phone/i.test(e)?"mobile":typeof navigator!="undefined"&&navigator.maxTouchPoints>0&&typeof window!="undefined"&&((i=(r=window.matchMedia)==null?void 0:r.call(window,"(pointer: coarse)"))==null?void 0:i.matches)&&/macintosh|mac os x/i.test(e)?"tablet":"desktop"}function fi(t){return/windows/i.test(t)?"Windows":/android/i.test(t)?"Android":/iphone|ipad|ipod/i.test(t)?"iOS":/mac os x|macintosh/i.test(t)?"macOS":/linux/i.test(t)?"Linux":"Other"}function gi(t){return/edg\//i.test(t)?"Edge":/opr\/|opera/i.test(t)?"Opera":/chrome\/[0-9]/i.test(t)&&!/chromium/i.test(t)?"Chrome":/firefox\/[0-9]/i.test(t)?"Firefox":/safari\/[0-9]/i.test(t)&&!/chrome/i.test(t)?"Safari":"Other"}function mi(){let e=navigator.userAgentData;return e?{mobile:e.mobile,platform:e.platform}:{}}function vi(t,e){var i;let r=((i=e.platform)!=null?i:"").toLowerCase();return r==="ios"||r==="ipados"||r==="android"?e.mobile?"mobile":"tablet":e.mobile===!0?"mobile":gr(t)}function mr(t){var s,c,l,d,u,p,f,h,v,C,y,g;if(typeof window=="undefined"||typeof navigator=="undefined")return{sessionId:t,timestamp:Date.now(),device:"desktop",os:"Other",browser:"Other",language:"",languages:[],colorScheme:"",screenWidth:0,screenHeight:0,viewportWidth:0,viewportHeight:0,devicePixelRatio:1,timeZone:"",sdkVersion:rt};let e=navigator.userAgent||"",r=mi(),i=r.mobile!==void 0||r.platform?vi(e,r):gr(e),n="";(c=(s=window.matchMedia)==null?void 0:s.call(window,"(prefers-color-scheme: dark)"))!=null&&c.matches?n="dark":(d=(l=window.matchMedia)==null?void 0:l.call(window,"(prefers-color-scheme: light)"))!=null&&d.matches&&(n="light");let o="";try{o=(u=Intl.DateTimeFormat().resolvedOptions().timeZone)!=null?u:""}catch(m){o=""}let a=typeof navigator.languages!="undefined"&&navigator.languages.length?[...navigator.languages]:navigator.language?[navigator.language]:[];return{sessionId:t,timestamp:Date.now(),device:i,os:fi(e),browser:gi(e),language:navigator.language||"",languages:a,colorScheme:n,screenWidth:(f=(p=window.screen)==null?void 0:p.width)!=null?f:0,screenHeight:(v=(h=window.screen)==null?void 0:h.height)!=null?v:0,viewportWidth:(C=window.innerWidth)!=null?C:0,viewportHeight:(y=window.innerHeight)!=null?y:0,devicePixelRatio:(g=window.devicePixelRatio)!=null?g:1,timeZone:o,sdkVersion:rt}}var Rt="https://api.alphana.ir/api/events",yi={endpoint:Rt,trackNavigation:!0,trackTime:!0,trackHeatmap:!0,trackLogs:!0,mouseSampleRate:.1,maxHeatmapPoints:2e3,batchSize:20,flushInterval:5e3,sessionReplay:!1,sessionReplayCheckoutEveryNms:6e5,sessionReplayMaxEventsPerBatch:48,sessionReplayFlushIntervalMs:4e3},Oe="__alphana_first_touch__",it="__alphana_last_touch__",Ii={utm_source:"source",utm_medium:"medium",utm_campaign:"campaign",utm_term:"term",utm_content:"content"},Ci=["gclid","fbclid","ttclid","msclkid"];function Si(t){if(typeof localStorage=="undefined")return null;try{return localStorage.getItem(t)}catch(e){return null}}function bi(t,e){if(typeof localStorage!="undefined")try{localStorage.setItem(t,e)}catch(r){}}function me(t){let e=Si(t);if(e)try{let r=JSON.parse(e);return typeof r.landingPage=="string"&&typeof r.capturedAt=="number"?r:void 0}catch(r){return}}function vr(t,e){bi(t,JSON.stringify(e))}function wi(t){if(t)try{return new URL(t).hostname.replace(/^www\./,"").toLowerCase()}catch(e){return}}function Ai(){return typeof window=="undefined"?new URLSearchParams:new URLSearchParams(window.location.search)}function ki(t){var r;let e={};for(let[i,n]of Object.entries(Ii)){let o=(r=t.get(i))==null?void 0:r.trim();o&&(e[n]=o)}return Object.keys(e).length>0?e:void 0}function Ti(t){var r;let e={};for(let i of Ci){let n=(r=t.get(i))==null?void 0:r.trim();n&&(e[i]=n)}return Object.keys(e).length>0?e:void 0}function Ri(t){switch(t.type){case"pageview":return{type:"pageview",data:{...t.data,path:k(t.data.path)}};case"timespent":return{type:"timespent",data:{...t.data,path:k(t.data.path)}};case"heatmap":return{type:"heatmap",data:{...t.data,path:k(t.data.path)}};case"rageclik":return{type:"rageclik",data:{...t.data,path:k(t.data.path)}};case"uturn":return{type:"uturn",data:{...t.data,fromPath:k(t.data.fromPath),toPath:k(t.data.toPath)}};case"identify":return t;case"revenue":return t;case"goal":return{type:"goal",data:{...t.data,path:k(t.data.path)}};case"journey_step":return{type:"journey_step",data:{...t.data,path:k(t.data.path)}};case"client_context":return t;case"session_replay":return t;default:return t}}var nt=class{constructor(e={}){this.initialized=!1;this.subscribers=new Set;this.queue=[];this.flushTimer=null;this.heartbeatTimer=null;this.userProperties={};this.flags={};this.flagSubscribers=new Set;this.abVariants={};this.abTestSubscribers=new Set;this.handleVisibilityChange=()=>{document.visibilityState==="hidden"&&(this.queue.length>0&&this.flushBeacon(),this.sendDeactivate())};this.handlePageHide=()=>{this.queue.length>0&&this.flushBeacon(),this.sendDeactivate()};this.handleNavigate=e=>{};var r;this.cfg={...yi,...e};try{new URL(this.cfg.endpoint)}catch(i){throw new Error(`[alpha-tracker] Invalid endpoint URL: "${this.cfg.endpoint}"`)}this.session={id:(r=e.sessionId)!=null?r:ke(),visitorId:Mt(),startedAt:Date.now(),pageViews:[],timeSpent:{},heatmap:{},userProperties:{},attribution:{firstTouch:me(Oe),lastTouch:me(it)}}}updateAttributionForPageView(e,r){let i=Ai(),n=ki(i),o=Ti(i),a=me(Oe),c=!!(n||o||r)?{landingPage:e,referrer:r,referrerHost:wi(r),utm:n,clickIds:o,capturedAt:Date.now()}:void 0;!a&&c&&vr(Oe,c),c&&vr(it,c);let l={firstTouch:me(Oe),lastTouch:me(it)};return this.session.attribution=l,l}currentAttribution(){let e={firstTouch:me(Oe),lastTouch:me(it)};return this.session.attribution=e,e}init(){if(typeof window=="undefined"||this.initialized)return this;let e=this.emit.bind(this),{id:r}=this.session;return e({type:"client_context",data:mr(r)}),this.cfg.trackNavigation&&(this.navigation=new Le({emit:e,sessionId:r}),this.navigation.init()),this.cfg.trackTime&&(this.time=new Fe({emit:e,sessionId:r}),this.time.init()),this.cfg.trackHeatmap&&(this.heatmap=new De({emit:e,sessionId:r,sampleRate:this.cfg.mouseSampleRate,maxPoints:this.cfg.maxHeatmapPoints,allowedPaths:this.cfg.heatmapPages}),this.heatmap.init()),this.cfg.sessionReplay&&(this.sessionReplay=new tt({emit:e,checkoutEveryNms:this.cfg.sessionReplayCheckoutEveryNms,maxEventsPerBatch:this.cfg.sessionReplayMaxEventsPerBatch,flushIntervalMs:this.cfg.sessionReplayFlushIntervalMs}),this.sessionReplay.start()),this.cfg.endpoint&&(this.flushTimer=setInterval(()=>{this.queue.length>0&&this.flushQueue()},this.cfg.flushInterval),window.addEventListener("visibilitychange",this.handleVisibilityChange),window.addEventListener("pagehide",this.handlePageHide),this.heartbeatTimer=setInterval(()=>{document.visibilityState!=="hidden"&&this.sendHeartbeat()},3e4),this.cfg.trackLogs&&(this.logCapture=new ye({endpoint:this.cfg.endpoint,sessionId:this.session.id,secretKey:this.cfg.secretKey,appId:this.cfg.appId}),this.logCapture.init())),this.initialized=!0,this.fetchFlags(),this.fetchAbTests(),this}destroy(){var e,r,i,n,o;this.flushTimer!==null&&(clearInterval(this.flushTimer),this.flushTimer=null),this.heartbeatTimer!==null&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null),typeof window!="undefined"&&(window.removeEventListener("visibilitychange",this.handleVisibilityChange),window.removeEventListener("pagehide",this.handlePageHide)),(e=this.navigation)==null||e.destroy(),(r=this.time)==null||r.destroy(),(i=this.heatmap)==null||i.destroy(),(n=this.sessionReplay)==null||n.destroy(),this.sessionReplay=void 0,(o=this.logCapture)==null||o.destroy(),typeof window!="undefined"&&window.removeEventListener("tracker:navigate",this.handleNavigate),this.queue.length>0&&this.cfg.endpoint&&this.flushBeacon(),this.initialized=!1}async sendHeartbeat(){if(!this.cfg.endpoint)return;let e=`${this.cfg.endpoint}/heartbeat`,r=this.cfg.secretKey?{Authorization:`Bearer ${this.cfg.secretKey}`}:{},i=JSON.stringify({sessionId:this.session.id,visitorId:this.session.visitorId,path:k(typeof window!="undefined"?window.location.pathname+window.location.search:"/"),active:!0,...this.cfg.appId?{appId:this.cfg.appId}:{}});try{await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",...r},body:i,keepalive:!0})}catch(n){}}sendDeactivate(){if(!this.cfg.endpoint)return;let e=`${this.cfg.endpoint}/heartbeat`,r=this.cfg.secretKey?{Authorization:`Bearer ${this.cfg.secretKey}`}:{},i=JSON.stringify({sessionId:this.session.id,visitorId:this.session.visitorId,path:k(typeof window!="undefined"?window.location.pathname+window.location.search:"/"),active:!1,...this.cfg.appId?{appId:this.cfg.appId}:{}});typeof navigator!="undefined"&&navigator.sendBeacon?navigator.sendBeacon(e,new Blob([i],{type:"application/json"})):fetch(e,{method:"POST",headers:{"Content-Type":"application/json",...r},body:i,keepalive:!0}).catch(()=>{})}emit(e){var r,i,n,o;if(e=Ri(e),e.type==="pageview"){let a=this.updateAttributionForPageView(e.data.path,e.data.referrer);e={type:"pageview",data:{...e.data,utm:(r=a.lastTouch)==null?void 0:r.utm,attribution:a}}}switch(e.type){case"pageview":this.session.pageViews.push(e.data);break;case"timespent":{let a=(i=this.session.timeSpent[e.data.path])!=null?i:0;this.session.timeSpent[e.data.path]=a+e.data.duration;break}case"heatmap":{let a=e.data.path;this.session.heatmap[a]||(this.session.heatmap[a]=[]);let s=this.session.heatmap[a];s.length<this.cfg.maxHeatmapPoints&&s.push(e.data);break}case"rageclik":case"uturn":case"identify":case"revenue":case"goal":case"journey_step":case"client_context":case"session_replay":break}this.subscribers.forEach(a=>a(e)),(o=(n=this.cfg).onEvent)==null||o.call(n,e),this.cfg.endpoint&&(this.queue.push(e),this.queue.length>=this.cfg.batchSize&&this.flushQueue())}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}trackPageView(e){let r=k(e!=null?e:typeof window!="undefined"?window.location.pathname+window.location.search:"/");this.emit({type:"pageview",data:{path:r,title:typeof document!="undefined"?document.title:"",timestamp:Date.now(),sessionId:this.session.id,referrer:typeof document!="undefined"&&document.referrer||void 0}}),typeof window!="undefined"&&window.dispatchEvent(new CustomEvent("tracker:navigate",{detail:{path:r,title:document.title}}))}trackRevenue(e){var r,i;this.emit({type:"revenue",data:{...e,eventName:(r=e.eventName)!=null?r:"purchase",status:(i=e.status)!=null?i:"paid",sessionId:this.session.id,visitorId:this.session.visitorId,timestamp:Date.now(),attribution:this.currentAttribution()}})}trackGoal(e){let r=k(typeof window!="undefined"?window.location.pathname+window.location.search:"/");this.emit({type:"goal",data:{...e,sessionId:this.session.id,visitorId:this.session.visitorId,path:r,timestamp:Date.now()}})}trackJourneyStep(e){var i;let r=k((i=e.path)!=null?i:typeof window!="undefined"?window.location.pathname+window.location.search:"/");this.emit({type:"journey_step",data:{...e,path:r,sessionId:this.session.id,visitorId:this.session.visitorId,timestamp:Date.now()}})}identify(e){this.userProperties={...this.userProperties,...e},this.session.userProperties={...this.userProperties},this.emit({type:"identify",data:{properties:{...this.userProperties},visitorId:this.session.visitorId,timestamp:Date.now()}}),this.fetchFlags()}getFlags(){return{...this.flags}}isFeatureEnabled(e){return this.flags[e]===!0}onFlagsChange(e){return this.flagSubscribers.add(e),()=>this.flagSubscribers.delete(e)}async fetchFlags(){if(!this.cfg.endpoint||!this.cfg.secretKey)return;let e=ct(this.cfg.endpoint)+"/feature-flags/evaluate";try{let r=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.cfg.secretKey}`},body:JSON.stringify({userProperties:this.userProperties})});if(!r.ok)return;let i=await r.json();this.flags=i,this.flagSubscribers.forEach(n=>n({...this.flags}))}catch(r){}}getAbVariants(){return{...this.abVariants}}getAbVariant(e){let r=this.abVariants[e];return r!=null?r:null}isAbVariant(e,r){return this.abVariants[e]===r}onAbTestsChange(e){return this.abTestSubscribers.add(e),()=>this.abTestSubscribers.delete(e)}async fetchAbTests(e){if(!this.cfg.endpoint||!this.cfg.secretKey)return;let r=ct(this.cfg.endpoint)+"/ab-tests/evaluate";try{let i={visitorId:this.session.visitorId};e!=null&&e.length&&(i.keys=e);let n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.cfg.secretKey}`},body:JSON.stringify(i)});if(!n.ok)return;let o=await n.json();this.abVariants=e!=null&&e.length?{...this.abVariants,...o}:{...o},this.abTestSubscribers.forEach(a=>a({...this.abVariants}))}catch(i){}}getSession(){return this.session}getPageViews(){return[...this.session.pageViews]}getTimeSpent(){return{...this.session.timeSpent}}getHeatmapData(e){var r;return e!==void 0?[...(r=this.session.heatmap[e])!=null?r:[]]:Object.entries(this.session.heatmap).reduce((i,[n,o])=>(i[n]=[...o],i),{})}flush(){this.flushQueue()}async flushQueue(){if(this.queue.length===0)return;let e=this.queue.splice(0);await this.sendBatch(e)}flushBeacon(){if(this.queue.length===0)return;let e=this.queue.splice(0),r=`${this.cfg.endpoint}/batch`,i=new Blob([this.buildBatchBody(e)],{type:"application/json"});typeof navigator!="undefined"&&navigator.sendBeacon?navigator.sendBeacon(r,i):this.sendBatch(e)}buildBatchBody(e){return JSON.stringify({...this.cfg.appId?{appId:this.cfg.appId}:{},visitorId:this.session.visitorId,events:e.map(r=>({sessionId:this.session.id,type:r.type,data:r.data}))})}async sendBatch(e){let r=`${this.cfg.endpoint}/batch`,i=this.cfg.secretKey?{Authorization:`Bearer ${this.cfg.secretKey}`}:{};try{await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",...i},body:this.buildBatchBody(e),keepalive:!0})}catch(n){}}};return wr(Ei);})();
|
|
3
|
+
or you can use record.mirror to access the mirror instance during recording.`,Qt={map:{},getId(){return console.error(ke),-1},getNode(){return console.error(ke),null},removeNodeFromMap(){console.error(ke)},has(){return console.error(ke),!1},reset(){console.error(ke)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Qt=new Proxy(Qt,{get(t,e,r){return e==="map"&&console.error(ke),Reflect.get(t,e,r)}}));function Te(t,e,r={}){let i=null,n=0;return function(...o){let s=Date.now();!n&&r.leading===!1&&(n=s);let a=e-(s-n),c=this;a<=0||a>e?(i&&(clearTimeout(i),i=null),n=s,t.apply(c,o)):!i&&r.trailing!==!1&&(i=setTimeout(()=>{n=r.leading===!1?0:Date.now(),i=null,t.apply(c,o)},a))}}function ye(t,e,r,i,n=window){let o=n.Object.getOwnPropertyDescriptor(t,e);return n.Object.defineProperty(t,e,i?r:{set(s){setTimeout(()=>{r.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>ye(t,e,o||{},!0)}function te(t,e,r){try{if(!(e in t))return()=>{};let i=t[e],n=r(i);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(i){return()=>{}}}function Ze(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ke(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function x(t,e,r,i){if(!t)return!1;let n=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(!n)return!1;if(typeof e=="string"){if(n.classList.contains(e)||i&&n.closest("."+e)!==null)return!0}else if(Ne(n,e,i))return!0;return!!(r&&(t.matches(r)||i&&n.closest(r)!==null))}function qt(t,e){return e.getId(t)!==-1}function ze(t,e){return e.getId(t)===ge}function Ct(t,e){if(ve(t))return!1;let r=e.getId(t);return e.has(r)?t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE?!1:t.parentNode?Ct(t.parentNode,e):!0:!0}function St(t){return!!t.changedTouches}function Xt(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let r=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function Ye(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function Je(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function je(t){return!!(t!=null&&t.shadowRoot)}var He=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){var r;return(r=this.styleIDMap.get(e))!==null&&r!==void 0?r:-1}has(e){return this.styleIDMap.has(e)}add(e,r){if(this.has(e))return this.getId(e);let i;return r===void 0?i=this.id++:i=r,this.styleIDMap.set(e,i),this.idStyleMap.set(i,e),i}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};var w=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(w||{}),S=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t))(S||{}),Qe=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Qe||{}),ce=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(ce||{});function $t(t){return"__ln"in t}var bt=class{constructor(){this.length=0,this.head=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let i=0;i<e;i++)r=(r==null?void 0:r.next)||null;return r}addNode(e){let r={value:e,previous:null,next:null};if(e.__ln=r,e.previousSibling&&$t(e.previousSibling)){let i=e.previousSibling.__ln.next;r.next=i,r.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=r,i&&(i.previous=r)}else if(e.nextSibling&&$t(e.nextSibling)&&e.nextSibling.__ln.previous){let i=e.nextSibling.__ln.previous;r.previous=i,r.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=r,i&&(i.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;this.length++}removeNode(e){let r=e.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next&&(r.next.previous=r.previous)):(this.head=r.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}},er=(t,e)=>`${t}@${e}`,qe=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],r=new bt,i=a=>{let c=a,d=ge;for(;d===ge;)c=c&&c.nextSibling,d=c&&this.mirror.getId(c);return d},n=a=>{var c,d,l,u;let p=null;((d=(c=a.getRootNode)===null||c===void 0?void 0:c.call(a))===null||d===void 0?void 0:d.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&a.getRootNode().host&&(p=a.getRootNode().host);let m=p;for(;((u=(l=m==null?void 0:m.getRootNode)===null||l===void 0?void 0:l.call(m))===null||u===void 0?void 0:u.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&m.getRootNode().host;)m=m.getRootNode().host;let h=!this.doc.contains(a)&&(!m||!this.doc.contains(m));if(!a.parentNode||h)return;let v=ve(a.parentNode)?this.mirror.getId(p):this.mirror.getId(a.parentNode),I=i(a);if(v===-1||I===-1)return r.addNode(a);let y=fe(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{Ye(f,this.mirror)&&this.iframeManager.addIframe(f),Je(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),je(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(f,g)=>{this.iframeManager.attachIframe(f,g),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,g)=>{this.stylesheetManager.attachLinkElement(f,g)}});y&&e.push({parentId:v,nextId:I,node:y})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of Array.from(this.movedSet.values()))tr(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||n(a);for(let a of Array.from(this.addedSet.values()))!rr(this.droppedSet,a)&&!tr(this.removes,a,this.mirror)||rr(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){let c=this.mirror.getId(o.value.parentNode),d=i(o.value);c!==-1&&d!==-1&&(a=o)}if(!a)for(let c=r.length-1;c>=0;c--){let d=r.get(c);if(d){let l=this.mirror.getId(d.value.parentNode);if(i(d.value)===-1)continue;if(l!==-1){a=d;break}else{let p=d.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let m=p.parentNode.host;if(this.mirror.getId(m)!==-1){a=d;break}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),n(a.value)}let s={texts:this.texts.map(a=>({id:this.mirror.getId(a.node),value:a.value})).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>({id:this.mirror.getId(a.node),attributes:a.attributes})).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!s.texts.length&&!s.attributes.length&&!s.removes.length&&!s.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=e=>{if(!ze(e.target,this.mirror))switch(e.type){case"characterData":{let r=e.target.textContent;!x(e.target,this.blockClass,this.blockSelector,!1)&&r!==e.oldValue&&this.texts.push({value:It(e.target,this.maskTextClass,this.maskTextSelector)&&r?this.maskTextFn?this.maskTextFn(r):r.replace(/[\S]/g,"*"):r,node:e.target});break}case"attributes":{let r=e.target,i=e.target.getAttribute(e.attributeName);if(e.attributeName==="value"&&(i=Oe({maskInputOptions:this.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:i,maskInputFn:this.maskInputFn})),x(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributes.find(o=>o.node===e.target);if(r.tagName==="IFRAME"&&e.attributeName==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)e.attributeName="rr_src";else return;if(n||(n={node:e.target,attributes:{}},this.attributes.push(n)),e.attributeName==="style"){let o=this.doc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue),(n.attributes.style===void 0||n.attributes.style===null)&&(n.attributes.style={});let s=n.attributes.style;for(let a of Array.from(r.style)){let c=r.style.getPropertyValue(a),d=r.style.getPropertyPriority(a);(c!==o.style.getPropertyValue(a)||d!==o.style.getPropertyPriority(a))&&(d===""?s[a]=c:s[a]=[c,d])}for(let a of Array.from(o.style))r.style.getPropertyValue(a)===""&&(s[a]=!1)}else n.attributes[e.attributeName]=yt(this.doc,r.tagName,e.attributeName,i);break}case"childList":{if(x(e.target,this.blockClass,this.blockSelector,!0))return;e.addedNodes.forEach(r=>this.genAdds(r,e.target)),e.removedNodes.forEach(r=>{let i=this.mirror.getId(r),n=ve(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);x(e.target,this.blockClass,this.blockSelector,!1)||ze(r,this.mirror)||!qt(r,this.mirror)||(this.addedSet.has(r)?(wt(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(e.target)&&i===-1||Ct(e.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[er(i,n)]?wt(this.movedSet,r):this.removes.push({parentId:n,id:i,isShadow:ve(e.target)&&me(e.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(e,r)=>{if(this.mirror.hasNode(e)){if(ze(e,this.mirror))return;this.movedSet.add(e);let i=null;r&&this.mirror.hasNode(r)&&(i=this.mirror.getId(r)),i&&i!==-1&&(this.movedMap[er(this.mirror.getId(e),i)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);x(e,this.blockClass,this.blockSelector,!1)||e.childNodes.forEach(i=>this.genAdds(i))}}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach(r=>{this[r]=e[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function wt(t,e){t.delete(e),e.childNodes.forEach(r=>wt(t,r))}function tr(t,e,r){return t.length===0?!1:ir(t,e,r)}function ir(t,e,r){let{parentNode:i}=e;if(!i)return!1;let n=r.getId(i);return t.some(o=>o.id===n)?!0:ir(t,i,r)}function rr(t,e){return t.size===0?!1:nr(t,e)}function nr(t,e){let{parentNode:r}=e;return r?t.has(r)?!0:nr(t,r):!1}var he=[],sr=typeof CSSGroupingRule!="undefined",cr=typeof CSSMediaRule!="undefined",dr=typeof CSSSupportsRule!="undefined",lr=typeof CSSConditionRule!="undefined";function Le(t){try{if("composedPath"in t){let e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0];return t.target}catch(e){return t.target}}function At(t,e){var r,i;let n=new qe;he.push(n),n.init(t);let o=window.MutationObserver||window.__rrMutationObserver,s=(i=(r=window==null?void 0:window.Zone)===null||r===void 0?void 0:r.__symbol__)===null||i===void 0?void 0:i.call(r,"MutationObserver");s&&window[s]&&(o=window[s]);let a=new o(n.processMutations.bind(n));return a.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function hi({mousemoveCb:t,sampling:e,doc:r,mirror:i}){if(e.mousemove===!1)return()=>{};let n=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,s=[],a,c=Te(u=>{let p=Date.now()-a;t(s.map(m=>(m.timeOffset-=p,m)),u),s=[],a=null},o),d=Te(u=>{let p=Le(u),{clientX:m,clientY:h}=St(u)?u.changedTouches[0]:u;a||(a=Date.now()),s.push({x:m,y:h,id:i.getId(p),timeOffset:Date.now()-a}),c(typeof DragEvent!="undefined"&&u instanceof DragEvent?S.Drag:u instanceof MouseEvent?S.MouseMove:S.TouchMove)},n,{trailing:!1}),l=[_("mousemove",d,r),_("touchmove",d,r),_("drag",d,r)];return()=>{l.forEach(u=>u())}}function pi({mouseInteractionCb:t,doc:e,mirror:r,blockClass:i,blockSelector:n,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[],c=d=>l=>{let u=Le(l);if(x(u,i,n,!0))return;let p=St(l)?l.changedTouches[0]:l;if(!p)return;let m=r.getId(u),{clientX:h,clientY:v}=p;t({type:Qe[d],id:m,x:h,y:v})};return Object.keys(Qe).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&s[d]!==!1).forEach(d=>{let l=d.toLowerCase(),u=c(d);a.push(_(l,u,e))}),()=>{a.forEach(d=>d())}}function kt({scrollCb:t,doc:e,mirror:r,blockClass:i,blockSelector:n,sampling:o}){let s=Te(a=>{let c=Le(a);if(!c||x(c,i,n,!0))return;let d=r.getId(c);if(c===e){let l=e.scrollingElement||e.documentElement;t({id:d,x:l.scrollLeft,y:l.scrollTop})}else t({id:d,x:c.scrollLeft,y:c.scrollTop})},o.scroll||100);return _("scroll",s,e)}function fi({viewportResizeCb:t}){let e=-1,r=-1,i=Te(()=>{let n=Ze(),o=Ke();(e!==n||r!==o)&&(t({width:Number(o),height:Number(n)}),e=n,r=o)},200);return _("resize",i,window)}function or(t,e){let r=Object.assign({},t);return e||delete r.userTriggered,r}var mi=["INPUT","TEXTAREA","SELECT"],ar=new WeakMap;function gi({inputCb:t,doc:e,mirror:r,blockClass:i,blockSelector:n,ignoreClass:o,maskInputOptions:s,maskInputFn:a,sampling:c,userTriggeredOnInput:d}){function l(y){let f=Le(y),g=y.isTrusted;if(f&&f.tagName==="OPTION"&&(f=f.parentElement),!f||!f.tagName||mi.indexOf(f.tagName)<0||x(f,i,n,!0))return;let b=f.type;if(f.classList.contains(o))return;let B=f.value,L=!1;b==="radio"||b==="checkbox"?L=f.checked:(s[f.tagName.toLowerCase()]||s[b])&&(B=Oe({maskInputOptions:s,tagName:f.tagName,type:b,value:B,maskInputFn:a})),u(f,or({text:B,isChecked:L,userTriggered:g},d));let F=f.name;b==="radio"&&F&&L&&e.querySelectorAll(`input[type="radio"][name="${F}"]`).forEach(R=>{R!==f&&u(R,or({text:R.value,isChecked:!L,userTriggered:!1},d))})}function u(y,f){let g=ar.get(y);if(!g||g.text!==f.text||g.isChecked!==f.isChecked){ar.set(y,f);let b=r.getId(y);t(Object.assign(Object.assign({},f),{id:b}))}}let m=(c.input==="last"?["change"]:["input","change"]).map(y=>_(y,l,e)),h=e.defaultView;if(!h)return()=>{m.forEach(y=>y())};let v=h.Object.getOwnPropertyDescriptor(h.HTMLInputElement.prototype,"value"),I=[[h.HTMLInputElement.prototype,"value"],[h.HTMLInputElement.prototype,"checked"],[h.HTMLSelectElement.prototype,"value"],[h.HTMLTextAreaElement.prototype,"value"],[h.HTMLSelectElement.prototype,"selectedIndex"],[h.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&m.push(...I.map(y=>ye(y[0],y[1],{set(){l({target:this})}},!1,h))),()=>{m.forEach(y=>y())}}function Xe(t){let e=[];function r(i,n){if(sr&&i.parentRule instanceof CSSGroupingRule||cr&&i.parentRule instanceof CSSMediaRule||dr&&i.parentRule instanceof CSSSupportsRule||lr&&i.parentRule instanceof CSSConditionRule){let s=Array.from(i.parentRule.cssRules).indexOf(i);n.unshift(s)}else if(i.parentStyleSheet){let s=Array.from(i.parentStyleSheet.cssRules).indexOf(i);n.unshift(s)}return n}return r(t,e)}function ue(t,e,r){let i,n;return t?(t.ownerNode?i=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:i}):{}}function vi({styleSheetRuleCb:t,mirror:e,stylesheetManager:r},{win:i}){let n=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=function(l,u){let{id:p,styleId:m}=ue(this,e,r.styleMirror);return(p&&p!==-1||m&&m!==-1)&&t({id:p,styleId:m,adds:[{rule:l,index:u}]}),n.apply(this,[l,u])};let o=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=function(l){let{id:u,styleId:p}=ue(this,e,r.styleMirror);return(u&&u!==-1||p&&p!==-1)&&t({id:u,styleId:p,removes:[{index:l}]}),o.apply(this,[l])};let s;i.CSSStyleSheet.prototype.replace&&(s=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=function(l){let{id:u,styleId:p}=ue(this,e,r.styleMirror);return(u&&u!==-1||p&&p!==-1)&&t({id:u,styleId:p,replace:l}),s.apply(this,[l])});let a;i.CSSStyleSheet.prototype.replaceSync&&(a=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=function(l){let{id:u,styleId:p}=ue(this,e,r.styleMirror);return(u&&u!==-1||p&&p!==-1)&&t({id:u,styleId:p,replaceSync:l}),a.apply(this,[l])});let c={};sr?c.CSSGroupingRule=i.CSSGroupingRule:(cr&&(c.CSSMediaRule=i.CSSMediaRule),lr&&(c.CSSConditionRule=i.CSSConditionRule),dr&&(c.CSSSupportsRule=i.CSSSupportsRule));let d={};return Object.entries(c).forEach(([l,u])=>{d[l]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=function(p,m){let{id:h,styleId:v}=ue(this.parentStyleSheet,e,r.styleMirror);return(h&&h!==-1||v&&v!==-1)&&t({id:h,styleId:v,adds:[{rule:p,index:[...Xe(this),m||0]}]}),d[l].insertRule.apply(this,[p,m])},u.prototype.deleteRule=function(p){let{id:m,styleId:h}=ue(this.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||h&&h!==-1)&&t({id:m,styleId:h,removes:[{index:[...Xe(this),p]}]}),d[l].deleteRule.apply(this,[p])}}),()=>{i.CSSStyleSheet.prototype.insertRule=n,i.CSSStyleSheet.prototype.deleteRule=o,s&&(i.CSSStyleSheet.prototype.replace=s),a&&(i.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([l,u])=>{u.prototype.insertRule=d[l].insertRule,u.prototype.deleteRule=d[l].deleteRule})}}function Tt({mirror:t,stylesheetManager:e},r){var i,n,o;let s=null;r.nodeName==="#document"?s=t.getId(r):s=t.getId(r.host);let a=r.nodeName==="#document"?(i=r.defaultView)===null||i===void 0?void 0:i.Document:(o=(n=r.ownerDocument)===null||n===void 0?void 0:n.defaultView)===null||o===void 0?void 0:o.ShadowRoot,c=Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets");return s===null||s===-1||!a||!c?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var d;return(d=c.get)===null||d===void 0?void 0:d.call(this)},set(d){var l;let u=(l=c.set)===null||l===void 0?void 0:l.call(this,d);if(s!==null&&s!==-1)try{e.adoptStyleSheets(d,s)}catch(p){}return u}}),()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})})}function yi({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:r,stylesheetManager:i},{win:n}){let o=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=function(a,c,d){var l;if(r.has(a))return o.apply(this,[a,c,d]);let{id:u,styleId:p}=ue((l=this.parentRule)===null||l===void 0?void 0:l.parentStyleSheet,e,i.styleMirror);return(u&&u!==-1||p&&p!==-1)&&t({id:u,styleId:p,set:{property:a,value:c,priority:d},index:Xe(this.parentRule)}),o.apply(this,[a,c,d])};let s=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=function(a){var c;if(r.has(a))return s.apply(this,[a]);let{id:d,styleId:l}=ue((c=this.parentRule)===null||c===void 0?void 0:c.parentStyleSheet,e,i.styleMirror);return(d&&d!==-1||l&&l!==-1)&&t({id:d,styleId:l,remove:{property:a},index:Xe(this.parentRule)}),s.apply(this,[a])},()=>{n.CSSStyleDeclaration.prototype.setProperty=o,n.CSSStyleDeclaration.prototype.removeProperty=s}}function Ii({mediaInteractionCb:t,blockClass:e,blockSelector:r,mirror:i,sampling:n}){let o=a=>Te(c=>{let d=Le(c);if(!d||x(d,e,r,!0))return;let{currentTime:l,volume:u,muted:p,playbackRate:m}=d;t({type:a,id:i.getId(d),currentTime:l,volume:u,muted:p,playbackRate:m})},n.media||500),s=[_("play",o(0)),_("pause",o(1)),_("seeked",o(2)),_("volumechange",o(3)),_("ratechange",o(4))];return()=>{s.forEach(a=>a())}}function Ci({fontCb:t,doc:e}){let r=e.defaultView;if(!r)return()=>{};let i=[],n=new WeakMap,o=r.FontFace;r.FontFace=function(c,d,l){let u=new o(c,d,l);return n.set(u,{family:c,buffer:typeof d!="string",descriptors:l,fontSource:typeof d=="string"?d:JSON.stringify(Array.from(new Uint8Array(d)))}),u};let s=te(e.fonts,"add",function(a){return function(c){return setTimeout(()=>{let d=n.get(c);d&&(t(d),n.delete(c))},0),a.apply(this,[c])}});return i.push(()=>{r.FontFace=o}),i.push(s),()=>{i.forEach(a=>a())}}function Si(t){let{doc:e,mirror:r,blockClass:i,blockSelector:n,selectionCb:o}=t,s=!0,a=()=>{let c=e.getSelection();if(!c||s&&(c!=null&&c.isCollapsed))return;s=c.isCollapsed||!1;let d=[],l=c.rangeCount||0;for(let u=0;u<l;u++){let p=c.getRangeAt(u),{startContainer:m,startOffset:h,endContainer:v,endOffset:I}=p;x(m,i,n,!0)||x(v,i,n,!0)||d.push({start:r.getId(m),startOffset:h,end:r.getId(v),endOffset:I})}o({ranges:d})};return a(),_("selectionchange",a)}function bi(t,e){let{mutationCb:r,mousemoveCb:i,mouseInteractionCb:n,scrollCb:o,viewportResizeCb:s,inputCb:a,mediaInteractionCb:c,styleSheetRuleCb:d,styleDeclarationCb:l,canvasMutationCb:u,fontCb:p,selectionCb:m}=t;t.mutationCb=(...h)=>{e.mutation&&e.mutation(...h),r(...h)},t.mousemoveCb=(...h)=>{e.mousemove&&e.mousemove(...h),i(...h)},t.mouseInteractionCb=(...h)=>{e.mouseInteraction&&e.mouseInteraction(...h),n(...h)},t.scrollCb=(...h)=>{e.scroll&&e.scroll(...h),o(...h)},t.viewportResizeCb=(...h)=>{e.viewportResize&&e.viewportResize(...h),s(...h)},t.inputCb=(...h)=>{e.input&&e.input(...h),a(...h)},t.mediaInteractionCb=(...h)=>{e.mediaInteaction&&e.mediaInteaction(...h),c(...h)},t.styleSheetRuleCb=(...h)=>{e.styleSheetRule&&e.styleSheetRule(...h),d(...h)},t.styleDeclarationCb=(...h)=>{e.styleDeclaration&&e.styleDeclaration(...h),l(...h)},t.canvasMutationCb=(...h)=>{e.canvasMutation&&e.canvasMutation(...h),u(...h)},t.fontCb=(...h)=>{e.font&&e.font(...h),p(...h)},t.selectionCb=(...h)=>{e.selection&&e.selection(...h),m(...h)}}function ur(t,e={}){let r=t.doc.defaultView;if(!r)return()=>{};bi(t,e);let i=At(t,t.doc),n=hi(t),o=pi(t),s=kt(t),a=fi(t),c=gi(t),d=Ii(t),l=vi(t,{win:r}),u=Tt(t,t.doc),p=yi(t,{win:r}),m=t.collectFonts?Ci(t):()=>{},h=Si(t),v=[];for(let I of t.plugins)v.push(I.observer(I.callback,r,I.options));return()=>{he.forEach(I=>I.reset()),i.disconnect(),n(),o(),s(),a(),c(),d(),l(),u(),p(),m(),h(),v.forEach(I=>I())}}var Fe=class{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,r,i,n){let o=i||this.getIdToRemoteIdMap(e),s=n||this.getRemoteIdToIdMap(e),a=o.get(r);return a||(a=this.generateIdFn(),o.set(r,a),s.set(a,r)),a}getIds(e,r){let i=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return r.map(o=>this.getId(e,o,i,n))}getRemoteId(e,r,i){let n=i||this.getRemoteIdToIdMap(e);if(typeof r!="number")return r;let o=n.get(r);return o||-1}getRemoteIds(e,r){let i=this.getRemoteIdToIdMap(e);return r.map(n=>this.getRemoteId(e,n,i))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let r=this.iframeIdToRemoteIdMap.get(e);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(e,r)),r}getRemoteIdToIdMap(e){let r=this.iframeRemoteIdToIdMap.get(e);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(e,r)),r}};var $e=class{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Fe(gt),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Fe(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,r){var i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(i=this.loadListener)===null||i===void 0||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){if(e.data.type==="rrweb"){if(!e.source)return;let i=this.crossOriginIframeMap.get(e.source);if(!i)return;let n=this.transformCrossOriginEvent(i,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}}transformCrossOriginEvent(e,r){var i;switch(r.type){case w.FullSnapshot:return this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(r.data.node,e),{timestamp:r.timestamp,type:w.IncrementalSnapshot,data:{source:S.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case w.Meta:case w.Load:case w.DomContentLoaded:return!1;case w.Plugin:return r;case w.Custom:return this.replaceIds(r.data.payload,e,["id","parentId","previousId","nextId"]),r;case w.IncrementalSnapshot:switch(r.data.source){case S.Mutation:return r.data.adds.forEach(n=>{this.replaceIds(n,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,e)}),r.data.removes.forEach(n=>{this.replaceIds(n,e,["parentId","id"])}),r.data.attributes.forEach(n=>{this.replaceIds(n,e,["id"])}),r.data.texts.forEach(n=>{this.replaceIds(n,e,["id"])}),r;case S.Drag:case S.TouchMove:case S.MouseMove:return r.data.positions.forEach(n=>{this.replaceIds(n,e,["id"])}),r;case S.ViewportResize:return!1;case S.MediaInteraction:case S.MouseInteraction:case S.Scroll:case S.CanvasMutation:case S.Input:return this.replaceIds(r.data,e,["id"]),r;case S.StyleSheetRule:case S.StyleDeclaration:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleId"]),r;case S.Font:return r;case S.Selection:return r.data.ranges.forEach(n=>{this.replaceIds(n,e,["start","end"])}),r;case S.AdoptedStyleSheet:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleIds"]),(i=r.data.styles)===null||i===void 0||i.forEach(n=>{this.replaceStyleIds(n,e,["styleId"])}),r}}}replace(e,r,i,n){for(let o of n)!Array.isArray(r[o])&&typeof r[o]!="number"||(Array.isArray(r[o])?r[o]=e.getIds(i,r[o]):r[o]=e.getId(i,r[o]));return r}replaceIds(e,r,i){return this.replace(this.crossOriginIframeMirror,e,r,i)}replaceStyleIds(e,r,i){return this.replace(this.crossOriginIframeStyleMirror,e,r,i)}replaceIdOnNode(e,r){this.replaceIds(e,r,["id"]),"childNodes"in e&&e.childNodes.forEach(i=>{this.replaceIdOnNode(i,r)})}};var et=class{constructor(e){this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;let r=this;this.restorePatches.push(te(Element.prototype,"attachShadow",function(i){return function(n){let o=i.call(this,n);return this.shadowRoot&&r.addShadowRoot(this.shadowRoot,this.ownerDocument),o}}))}addShadowRoot(e,r){me(e)&&(this.shadowDoms.has(e)||(this.shadowDoms.add(e),At(Object.assign(Object.assign({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),kt(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),Tt({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)},0)))}observeAttachShadow(e){if(e.contentWindow){let r=this;this.restorePatches.push(te(e.contentWindow.HTMLElement.prototype,"attachShadow",function(i){return function(n){let o=i.call(this,n);return this.shadowRoot&&r.addShadowRoot(this.shadowRoot,e.contentDocument),o}}))}}reset(){this.restorePatches.forEach(e=>e()),this.shadowDoms=new WeakSet}};function hr(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(t);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n])&&(r[i[n]]=t[i[n]]);return r}function pr(t,e,r,i){function n(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{d(i.next(l))}catch(u){s(u)}}function c(l){try{d(i.throw(l))}catch(u){s(u)}}function d(l){l.done?o(l.value):n(l.value).then(a,c)}d((i=i.apply(t,e||[])).next())})}var Re="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wi=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(De=0;De<Re.length;De++)wi[Re.charCodeAt(De)]=De;var De,fr=function(t){var e=new Uint8Array(t),r,i=e.length,n="";for(r=0;r<i;r+=3)n+=Re[e[r]>>2],n+=Re[(e[r]&3)<<4|e[r+1]>>4],n+=Re[(e[r+1]&15)<<2|e[r+2]>>6],n+=Re[e[r+2]&63];return i%3===2?n=n.substring(0,n.length-1)+"=":i%3===1&&(n=n.substring(0,n.length-2)+"=="),n};var mr=new Map;function Ai(t,e){let r=mr.get(t);return r||(r=new Map,mr.set(t,r)),r.has(e)||r.set(e,[]),r.get(e)}var Rt=(t,e,r)=>{if(!t||!(gr(t,e)||typeof t=="object"))return;let i=t.constructor.name,n=Ai(r,i),o=n.indexOf(t);return o===-1&&(o=n.length,n.push(t)),o};function tt(t,e,r){if(t instanceof Array)return t.map(i=>tt(i,e,r));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){let i=t.constructor.name,n=fr(t);return{rr_type:i,base64:n}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[tt(t.buffer,e,r),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){let i=t.constructor.name,{src:n}=t;return{rr_type:i,src:n}}else if(t instanceof HTMLCanvasElement){let i="HTMLImageElement",n=t.toDataURL();return{rr_type:i,src:n}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[tt(t.data,e,r),t.width,t.height]};if(gr(t,e)||typeof t=="object"){let i=t.constructor.name,n=Rt(t,e,r);return{rr_type:i,index:n}}}}return t}var rt=(t,e,r)=>[...t].map(i=>tt(i,e,r)),gr=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(n=>typeof e[n]=="function").find(n=>t instanceof e[n]);function vr(t,e,r,i){let n=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let s of o)try{if(typeof e.CanvasRenderingContext2D.prototype[s]!="function")continue;let a=te(e.CanvasRenderingContext2D.prototype,s,function(c){return function(...d){return x(this.canvas,r,i,!0)||setTimeout(()=>{let l=rt([...d],e,this);t(this.canvas,{type:ce["2D"],property:s,args:l})},0),c.apply(this,d)}});n.push(a)}catch(a){let c=ye(e.CanvasRenderingContext2D.prototype,s,{set(d){t(this.canvas,{type:ce["2D"],property:s,args:[d],setter:!0})}});n.push(c)}return()=>{n.forEach(s=>s())}}function Et(t,e,r){let i=[];try{let n=te(t.HTMLCanvasElement.prototype,"getContext",function(o){return function(s,...a){return x(this,e,r,!0)||"__context"in this||(this.__context=s),o.apply(this,[s,...a])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function yr(t,e,r,i,n,o,s){let a=[],c=Object.getOwnPropertyNames(t);for(let d of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if(typeof t[d]!="function")continue;let l=te(t,d,function(u){return function(...p){let m=u.apply(this,p);if(Rt(m,s,this),!x(this.canvas,i,n,!0)){let h=rt([...p],s,this),v={type:e,property:d,args:h};r(this.canvas,v)}return m}});a.push(l)}catch(l){let u=ye(t,d,{set(p){r(this.canvas,{type:e,property:d,args:[p],setter:!0})}});a.push(u)}return a}function Ir(t,e,r,i,n){let o=[];return o.push(...yr(e.WebGLRenderingContext.prototype,ce.WebGL,t,r,i,n,e)),typeof e.WebGL2RenderingContext!="undefined"&&o.push(...yr(e.WebGL2RenderingContext.prototype,ce.WebGL2,t,r,i,n,e)),()=>{o.forEach(s=>s())}}var Mt=null;try{Cr=typeof module!="undefined"&&typeof module.require=="function"&&module.require("worker_threads")||typeof __non_webpack_require__=="function"&&__non_webpack_require__("worker_threads")||typeof ut=="function"&&ut("worker_threads"),Mt=Cr.Worker}catch(t){}var Cr;function ki(t,e){return Buffer.from(t,"base64").toString(e?"utf16":"utf8")}function Sr(t,e,r){var i=e===void 0?null:e,n=r===void 0?!1:r,o=ki(t,n),s=o.indexOf(`
|
|
4
|
+
`,10)+1,a=o.substring(s)+(i?"//# sourceMappingURL="+i:"");return function(d){return new Mt(a,Object.assign({},d,{eval:!0}))}}function Ti(t,e){var r=atob(t);if(e){for(var i=new Uint8Array(r.length),n=0,o=r.length;n<o;++n)i[n]=r.charCodeAt(n);return String.fromCharCode.apply(null,new Uint16Array(i.buffer))}return r}function Ri(t,e,r){var i=e===void 0?null:e,n=r===void 0?!1:r,o=Ti(t,n),s=o.indexOf(`
|
|
5
|
+
`,10)+1,a=o.substring(s)+(i?"//# sourceMappingURL="+i:""),c=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(c)}function br(t,e,r){var i;return function(o){return i=i||Ri(t,e,r),new Worker(i,o)}}var Ei=Object.prototype.toString.call(typeof process!="undefined"?process:0)==="[object process]";function wr(){return Ei}function Ar(t,e,r){return wr()?Sr(t,e,r):br(t,e,r)}var kr=Ar("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",null,!1);var it=class{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(c,d)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(d)};let{sampling:r="all",win:i,blockClass:n,blockSelector:o,recordCanvas:s,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,s&&r==="all"&&this.initCanvasMutationObserver(i,n,o),s&&typeof r=="number"&&this.initCanvasFPSObserver(r,i,n,o,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,r,i,n,o){let s=Et(r,i,n),a=new Map,c=new kr;c.onmessage=h=>{let{id:v}=h.data;if(a.set(v,!1),!("base64"in h.data))return;let{base64:I,type:y,width:f,height:g}=h.data;this.mutationCb({id:v,type:ce["2D"],commands:[{property:"clearRect",args:[0,0,f,g]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:I}],type:y}]},0,0]}]})};let d=1e3/e,l=0,u,p=()=>{let h=[];return r.document.querySelectorAll("canvas").forEach(v=>{x(v,i,n,!0)||h.push(v)}),h},m=h=>{if(l&&h-l<d){u=requestAnimationFrame(m);return}l=h,p().forEach(v=>pr(this,void 0,void 0,function*(){var I;let y=this.mirror.getId(v);if(a.get(y))return;if(a.set(y,!0),["webgl","webgl2"].includes(v.__context)){let g=v.getContext(v.__context);((I=g==null?void 0:g.getContextAttributes())===null||I===void 0?void 0:I.preserveDrawingBuffer)===!1&&(g==null||g.clear(g.COLOR_BUFFER_BIT))}let f=yield createImageBitmap(v);c.postMessage({id:y,bitmap:f,width:v.width,height:v.height,dataURLOptions:o.dataURLOptions},[f])})),u=requestAnimationFrame(m)};u=requestAnimationFrame(m),this.resetObservers=()=>{s(),cancelAnimationFrame(u)}}initCanvasMutationObserver(e,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let n=Et(e,r,i),o=vr(this.processMutation.bind(this),e,r,i),s=Ir(this.processMutation.bind(this),e,r,i,this.mirror);this.resetObservers=()=>{n(),o(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=r=>{this.rafStamps.latestId=r,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,r)=>{let i=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,r){if(this.frozen||this.locked)return;let i=this.pendingCanvasMutations.get(e);if(!i||r===-1)return;let n=i.map(s=>hr(s,["type"])),{type:o}=i[0];this.mutationCb({id:r,type:o,commands:n}),this.pendingCanvasMutations.delete(e)}};var nt=class{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new He,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,r){if(e.length===0)return;let i={id:r,styleIds:[]},n=[];for(let o of e){let s;if(this.styleMirror.has(o))s=this.styleMirror.getId(o);else{s=this.styleMirror.add(o);let a=Array.from(o.rules||CSSRule);n.push({styleId:s,rules:a.map((c,d)=>({rule:mt(c),index:d}))})}i.styleIds.push(s)}n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}};function P(t){return Object.assign(Object.assign({},t),{timestamp:Date.now()})}var N,ot,xt,at=!1,re=Jt();function Ie(t={}){let{emit:e,checkoutEveryNms:r,checkoutEveryNth:i,blockClass:n="rr-block",blockSelector:o=null,ignoreClass:s="rr-ignore",maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:d=!0,maskAllInputs:l,maskInputOptions:u,slimDOMOptions:p,maskInputFn:m,maskTextFn:h,hooks:v,packFn:I,sampling:y={},dataURLOptions:f={},mousemoveWait:g,recordCanvas:b=!1,recordCrossOriginIframes:B=!1,userTriggeredOnInput:L=!1,collectFonts:F=!1,inlineImages:R=!1,plugins:K,keepIframeSrcFn:z=()=>!1,ignoreCSSAttributes:Q=new Set([])}=t,q=B?window.parent===window:!0,X=!1;if(!q)try{window.parent.document,X=!1}catch(C){X=!0}if(q&&!e)throw new Error("emit function is required");g!==void 0&&y.mousemove===void 0&&(y.mousemove=g),re.reset();let D=l===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:u!==void 0?u:{password:!0},Y=p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:p==="all",headMetaDescKeywords:p==="all"}:p||{};Xt();let $,ne=0,se=C=>{for(let V of K||[])V.eventProcessor&&(C=V.eventProcessor(C));return I&&(C=I(C)),C};N=(C,V)=>{var H;if(!((H=he[0])===null||H===void 0)&&H.isFrozen()&&C.type!==w.FullSnapshot&&!(C.type===w.IncrementalSnapshot&&C.data.source===S.Mutation)&&he.forEach(M=>M.unfreeze()),q)e==null||e(se(C),V);else if(X){let M={type:"rrweb",event:se(C),isCheckout:V};window.parent.postMessage(M,"*")}if(C.type===w.FullSnapshot)$=C,ne=0;else if(C.type===w.IncrementalSnapshot){if(C.data.source===S.Mutation&&C.data.isAttachIframe)return;ne++;let M=i&&ne>=i,j=r&&C.timestamp-$.timestamp>r;(M||j)&&ot(!0)}};let U=C=>{N(P({type:w.IncrementalSnapshot,data:Object.assign({source:S.Mutation},C)}))},J=C=>N(P({type:w.IncrementalSnapshot,data:Object.assign({source:S.Scroll},C)})),de=C=>N(P({type:w.IncrementalSnapshot,data:Object.assign({source:S.CanvasMutation},C)})),O=C=>N(P({type:w.IncrementalSnapshot,data:Object.assign({source:S.AdoptedStyleSheet},C)})),ee=new nt({mutationCb:U,adoptedStyleSheetCb:O}),oe=new $e({mirror:re,mutationCb:U,stylesheetManager:ee,recordCrossOriginIframes:B,wrappedEmit:N});for(let C of K||[])C.getMirror&&C.getMirror({nodeMirror:re,crossOriginIframeMirror:oe.crossOriginIframeMirror,crossOriginIframeStyleMirror:oe.crossOriginIframeStyleMirror});xt=new it({recordCanvas:b,mutationCb:de,win:window,blockClass:n,blockSelector:o,mirror:re,sampling:y.canvas,dataURLOptions:f});let Se=new et({mutationCb:U,scrollCb:J,bypassOptions:{blockClass:n,blockSelector:o,maskTextClass:a,maskTextSelector:c,inlineStylesheet:d,maskInputOptions:D,dataURLOptions:f,maskTextFn:h,maskInputFn:m,recordCanvas:b,inlineImages:R,sampling:y,slimDOMOptions:Y,iframeManager:oe,stylesheetManager:ee,canvasManager:xt,keepIframeSrcFn:z},mirror:re});ot=(C=!1)=>{var V,H,M,j,A,Z;N(P({type:w.Meta,data:{href:window.location.href,width:Ke(),height:Ze()}}),C),ee.reset(),he.forEach(G=>G.lock());let Ee=jt(document,{mirror:re,blockClass:n,blockSelector:o,maskTextClass:a,maskTextSelector:c,inlineStylesheet:d,maskAllInputs:D,maskTextFn:h,slimDOM:Y,dataURLOptions:f,recordCanvas:b,inlineImages:R,onSerialize:G=>{Ye(G,re)&&oe.addIframe(G),Je(G,re)&&ee.trackLinkElement(G),je(G)&&Se.addShadowRoot(G.shadowRoot,document)},onIframeLoad:(G,dt)=>{oe.attachIframe(G,dt),Se.observeAttachShadow(G)},onStylesheetLoad:(G,dt)=>{ee.attachLinkElement(G,dt)},keepIframeSrcFn:z});if(!Ee)return console.warn("Failed to snapshot the document");N(P({type:w.FullSnapshot,data:{node:Ee,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:(document==null?void 0:document.documentElement.scrollLeft)||((H=(V=document==null?void 0:document.body)===null||V===void 0?void 0:V.parentElement)===null||H===void 0?void 0:H.scrollLeft)||((M=document==null?void 0:document.body)===null||M===void 0?void 0:M.scrollLeft)||0,top:window.pageYOffset!==void 0?window.pageYOffset:(document==null?void 0:document.documentElement.scrollTop)||((A=(j=document==null?void 0:document.body)===null||j===void 0?void 0:j.parentElement)===null||A===void 0?void 0:A.scrollTop)||((Z=document==null?void 0:document.body)===null||Z===void 0?void 0:Z.scrollTop)||0}}})),he.forEach(G=>G.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ee.adoptStyleSheets(document.adoptedStyleSheets,re.getId(document))};try{let C=[];C.push(_("DOMContentLoaded",()=>{N(P({type:w.DomContentLoaded,data:{}}))}));let V=M=>{var j;return ur({mutationCb:U,mousemoveCb:(A,Z)=>N(P({type:w.IncrementalSnapshot,data:{source:Z,positions:A}})),mouseInteractionCb:A=>N(P({type:w.IncrementalSnapshot,data:Object.assign({source:S.MouseInteraction},A)})),scrollCb:J,viewportResizeCb:A=>N(P({type:w.IncrementalSnapshot,data:Object.assign({source:S.ViewportResize},A)})),inputCb:A=>N(P({type:w.IncrementalSnapshot,data:Object.assign({source:S.Input},A)})),mediaInteractionCb:A=>N(P({type:w.IncrementalSnapshot,data:Object.assign({source:S.MediaInteraction},A)})),styleSheetRuleCb:A=>N(P({type:w.IncrementalSnapshot,data:Object.assign({source:S.StyleSheetRule},A)})),styleDeclarationCb:A=>N(P({type:w.IncrementalSnapshot,data:Object.assign({source:S.StyleDeclaration},A)})),canvasMutationCb:de,fontCb:A=>N(P({type:w.IncrementalSnapshot,data:Object.assign({source:S.Font},A)})),selectionCb:A=>{N(P({type:w.IncrementalSnapshot,data:Object.assign({source:S.Selection},A)}))},blockClass:n,ignoreClass:s,maskTextClass:a,maskTextSelector:c,maskInputOptions:D,inlineStylesheet:d,sampling:y,recordCanvas:b,inlineImages:R,userTriggeredOnInput:L,collectFonts:F,doc:M,maskInputFn:m,maskTextFn:h,keepIframeSrcFn:z,blockSelector:o,slimDOMOptions:Y,dataURLOptions:f,mirror:re,iframeManager:oe,stylesheetManager:ee,shadowDomManager:Se,canvasManager:xt,ignoreCSSAttributes:Q,plugins:((j=K==null?void 0:K.filter(A=>A.observer))===null||j===void 0?void 0:j.map(A=>({observer:A.observer,options:A.options,callback:Z=>N(P({type:w.Plugin,data:{plugin:A.name,payload:Z}}))})))||[]},v)};oe.addLoadListener(M=>{C.push(V(M.contentDocument))});let H=()=>{ot(),C.push(V(document)),at=!0};return document.readyState==="interactive"||document.readyState==="complete"?H():C.push(_("load",()=>{N(P({type:w.Load,data:{}})),H()},window)),()=>{C.forEach(M=>M()),at=!1}}catch(C){console.warn(C)}}Ie.addCustomEvent=(t,e)=>{if(!at)throw new Error("please add custom event after start recording");N(P({type:w.Custom,data:{tag:t,payload:e}}))};Ie.freezePage=()=>{he.forEach(t=>t.freeze())};Ie.takeFullSnapshot=t=>{if(!at)throw new Error("please take full snapshot after start recording");ot(t)};Ie.mirror=re;var st=class{constructor(e){this.opts=e;this.seq=0;this.buffer=[];this.stopRecording=null;this.flushTimer=null}start(){var e,r;typeof document=="undefined"||this.stopRecording||(this.stopRecording=(r=Ie({emit:i=>{this.buffer.push(i),this.buffer.length>=this.opts.maxEventsPerBatch&&this.flush()},checkoutEveryNms:(e=this.opts.checkoutEveryNms)!=null?e:6e5}))!=null?r:null,this.flushTimer=setInterval(()=>{this.buffer.length>0&&this.flush()},this.opts.flushIntervalMs))}flush(){if(this.buffer.length===0)return;let e=this.buffer.splice(0,this.buffer.length);this.opts.emit({type:"session_replay",data:{seq:this.seq++,events:e}})}destroy(){var e;this.flushTimer!==null&&(clearInterval(this.flushTimer),this.flushTimer=null),this.flush(),(e=this.stopRecording)==null||e.call(this),this.stopRecording=null}};var Nt="https://api.alphana.ir/api/events",Mi={endpoint:Nt,trackNavigation:!0,trackTime:!0,trackHeatmap:!0,trackLogs:!0,mouseSampleRate:.1,maxHeatmapPoints:2e3,batchSize:20,flushInterval:5e3,sessionReplay:!1,sessionReplayCheckoutEveryNms:6e5,sessionReplayMaxEventsPerBatch:48,sessionReplayFlushIntervalMs:4e3},Pe="__alphana_first_touch__",ct="__alphana_last_touch__",xi={utm_source:"source",utm_medium:"medium",utm_campaign:"campaign",utm_term:"term",utm_content:"content"},Ni=["gclid","fbclid","ttclid","msclkid"];function Oi(t){if(typeof localStorage=="undefined")return null;try{return localStorage.getItem(t)}catch(e){return null}}function Li(t,e){if(typeof localStorage!="undefined")try{localStorage.setItem(t,e)}catch(r){}}function Ce(t){let e=Oi(t);if(e)try{let r=JSON.parse(e);return typeof r.landingPage=="string"&&typeof r.capturedAt=="number"?r:void 0}catch(r){return}}function Tr(t,e){Li(t,JSON.stringify(e))}function Fi(t){if(t)try{return new URL(t).hostname.replace(/^www\./,"").toLowerCase()}catch(e){return}}function Di(){return typeof window=="undefined"?new URLSearchParams:new URLSearchParams(window.location.search)}function Pi(t){var r;let e={};for(let[i,n]of Object.entries(xi)){let o=(r=t.get(i))==null?void 0:r.trim();o&&(e[n]=o)}return Object.keys(e).length>0?e:void 0}function Wi(t){var r;let e={};for(let i of Ni){let n=(r=t.get(i))==null?void 0:r.trim();n&&(e[i]=n)}return Object.keys(e).length>0?e:void 0}function Bi(t){switch(t.type){case"pageview":return{type:"pageview",data:{...t.data,path:T(t.data.path)}};case"timespent":return{type:"timespent",data:{...t.data,path:T(t.data.path)}};case"heatmap":return{type:"heatmap",data:{...t.data,path:T(t.data.path)}};case"rageclik":return{type:"rageclik",data:{...t.data,path:T(t.data.path)}};case"uturn":return{type:"uturn",data:{...t.data,fromPath:T(t.data.fromPath),toPath:T(t.data.toPath)}};case"identify":return t;case"revenue":return t;case"goal":return{type:"goal",data:{...t.data,path:T(t.data.path)}};case"journey_step":return{type:"journey_step",data:{...t.data,path:T(t.data.path)}};case"client_context":return t;case"session_replay":return t;default:return t}}var We=class{constructor(e={}){this.initialized=!1;this.subscribers=new Set;this.queue=[];this.flushTimer=null;this.heartbeatTimer=null;this.userProperties={};this.flags={};this.flagSubscribers=new Set;this.abVariants={};this.abTestSubscribers=new Set;this.handleVisibilityChange=()=>{document.visibilityState==="hidden"&&(this.queue.length>0&&this.flushBeacon(),this.sendDeactivate())};this.handlePageHide=()=>{this.queue.length>0&&this.flushBeacon(),this.sendDeactivate()};this.handleNavigate=e=>{};var r;this.cfg={...Mi,...e};try{new URL(this.cfg.endpoint)}catch(i){throw new Error(`[alpha-tracker] Invalid endpoint URL: "${this.cfg.endpoint}"`)}this.session={id:(r=e.sessionId)!=null?r:Me(),visitorId:Vt(),startedAt:Date.now(),pageViews:[],timeSpent:{},heatmap:{},userProperties:{},attribution:{firstTouch:Ce(Pe),lastTouch:Ce(ct)}}}updateAttributionForPageView(e,r){let i=Di(),n=Pi(i),o=Wi(i),s=Ce(Pe),c=!!(n||o||r)?{landingPage:e,referrer:r,referrerHost:Fi(r),utm:n,clickIds:o,capturedAt:Date.now()}:void 0;!s&&c&&Tr(Pe,c),c&&Tr(ct,c);let d={firstTouch:Ce(Pe),lastTouch:Ce(ct)};return this.session.attribution=d,d}currentAttribution(){let e={firstTouch:Ce(Pe),lastTouch:Ce(ct)};return this.session.attribution=e,e}init(){if(typeof window=="undefined"||this.initialized)return this;let e=this.emit.bind(this),{id:r}=this.session;return e({type:"client_context",data:Pt(r)}),this.cfg.trackNavigation&&(this.navigation=new _e({emit:e,sessionId:r}),this.navigation.init()),this.cfg.trackTime&&(this.time=new Ve({emit:e,sessionId:r}),this.time.init()),this.cfg.trackHeatmap&&(this.heatmap=new Ge({emit:e,sessionId:r,sampleRate:this.cfg.mouseSampleRate,maxPoints:this.cfg.maxHeatmapPoints,allowedPaths:this.cfg.heatmapPages}),this.heatmap.init()),this.cfg.sessionReplay&&(this.sessionReplay=new st({emit:e,checkoutEveryNms:this.cfg.sessionReplayCheckoutEveryNms,maxEventsPerBatch:this.cfg.sessionReplayMaxEventsPerBatch,flushIntervalMs:this.cfg.sessionReplayFlushIntervalMs}),this.sessionReplay.start()),this.cfg.endpoint&&(this.flushTimer=setInterval(()=>{this.queue.length>0&&this.flushQueue()},this.cfg.flushInterval),window.addEventListener("visibilitychange",this.handleVisibilityChange),window.addEventListener("pagehide",this.handlePageHide),this.heartbeatTimer=setInterval(()=>{document.visibilityState!=="hidden"&&this.sendHeartbeat()},3e4),this.cfg.trackLogs&&(this.logCapture=new be({endpoint:this.cfg.endpoint,sessionId:this.session.id,secretKey:this.cfg.secretKey,appId:this.cfg.appId}),this.logCapture.init())),this.initialized=!0,this.fetchFlags(),this.fetchAbTests(),this}destroy(){var e,r,i,n,o;this.flushTimer!==null&&(clearInterval(this.flushTimer),this.flushTimer=null),this.heartbeatTimer!==null&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null),typeof window!="undefined"&&(window.removeEventListener("visibilitychange",this.handleVisibilityChange),window.removeEventListener("pagehide",this.handlePageHide)),(e=this.navigation)==null||e.destroy(),(r=this.time)==null||r.destroy(),(i=this.heatmap)==null||i.destroy(),(n=this.sessionReplay)==null||n.destroy(),this.sessionReplay=void 0,(o=this.logCapture)==null||o.destroy(),typeof window!="undefined"&&window.removeEventListener("tracker:navigate",this.handleNavigate),this.queue.length>0&&this.cfg.endpoint&&this.flushBeacon(),this.initialized=!1}async sendHeartbeat(){if(!this.cfg.endpoint)return;let e=`${this.cfg.endpoint}/heartbeat`,r=this.cfg.secretKey?{Authorization:`Bearer ${this.cfg.secretKey}`}:{},i=JSON.stringify({sessionId:this.session.id,visitorId:this.session.visitorId,path:T(typeof window!="undefined"?window.location.pathname+window.location.search:"/"),active:!0,...this.cfg.appId?{appId:this.cfg.appId}:{}});try{await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",...r},body:i,keepalive:!0})}catch(n){}}sendDeactivate(){if(!this.cfg.endpoint)return;let e=`${this.cfg.endpoint}/heartbeat`,r=this.cfg.secretKey?{Authorization:`Bearer ${this.cfg.secretKey}`}:{},i=JSON.stringify({sessionId:this.session.id,visitorId:this.session.visitorId,path:T(typeof window!="undefined"?window.location.pathname+window.location.search:"/"),active:!1,...this.cfg.appId?{appId:this.cfg.appId}:{}});!this.cfg.secretKey&&typeof navigator!="undefined"&&navigator.sendBeacon?navigator.sendBeacon(e,new Blob([i],{type:"application/json"})):fetch(e,{method:"POST",headers:{"Content-Type":"application/json",...r},body:i,keepalive:!0}).catch(()=>{})}emit(e){var r,i,n,o;if(e=Bi(e),e.type==="pageview"){let s=this.updateAttributionForPageView(e.data.path,e.data.referrer);e={type:"pageview",data:{...e.data,utm:(r=s.lastTouch)==null?void 0:r.utm,attribution:s}}}switch(e.type){case"pageview":this.session.pageViews.push(e.data);break;case"timespent":{let s=(i=this.session.timeSpent[e.data.path])!=null?i:0;this.session.timeSpent[e.data.path]=s+e.data.duration;break}case"heatmap":{let s=e.data.path;this.session.heatmap[s]||(this.session.heatmap[s]=[]);let a=this.session.heatmap[s];a.length<this.cfg.maxHeatmapPoints&&a.push(e.data);break}case"rageclik":case"uturn":case"identify":case"revenue":case"goal":case"journey_step":case"client_context":case"session_replay":break}this.subscribers.forEach(s=>s(e)),(o=(n=this.cfg).onEvent)==null||o.call(n,e),this.cfg.endpoint&&(this.queue.push(e),this.queue.length>=this.cfg.batchSize&&this.flushQueue())}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}trackPageView(e){let r=T(e!=null?e:typeof window!="undefined"?window.location.pathname+window.location.search:"/");this.emit({type:"pageview",data:{path:r,title:typeof document!="undefined"?document.title:"",timestamp:Date.now(),sessionId:this.session.id,referrer:typeof document!="undefined"&&document.referrer||void 0}}),typeof window!="undefined"&&window.dispatchEvent(new CustomEvent("tracker:navigate",{detail:{path:r,title:document.title}}))}trackRevenue(e){var r,i;this.emit({type:"revenue",data:{...e,eventName:(r=e.eventName)!=null?r:"purchase",status:(i=e.status)!=null?i:"paid",sessionId:this.session.id,visitorId:this.session.visitorId,timestamp:Date.now(),attribution:this.currentAttribution()}})}trackGoal(e){let r=T(typeof window!="undefined"?window.location.pathname+window.location.search:"/");this.emit({type:"goal",data:{...e,sessionId:this.session.id,visitorId:this.session.visitorId,path:r,timestamp:Date.now()}})}trackJourneyStep(e){var i;let r=T((i=e.path)!=null?i:typeof window!="undefined"?window.location.pathname+window.location.search:"/");this.emit({type:"journey_step",data:{...e,path:r,sessionId:this.session.id,visitorId:this.session.visitorId,timestamp:Date.now()}})}identify(e){this.userProperties={...this.userProperties,...e},this.session.userProperties={...this.userProperties},this.emit({type:"identify",data:{properties:{...this.userProperties},visitorId:this.session.visitorId,timestamp:Date.now()}}),this.fetchFlags()}getFlags(){return{...this.flags}}isFeatureEnabled(e){return this.flags[e]===!0}onFlagsChange(e){return this.flagSubscribers.add(e),()=>this.flagSubscribers.delete(e)}async fetchFlags(){if(!this.cfg.endpoint||!this.cfg.secretKey)return;let e=ht(this.cfg.endpoint)+"/feature-flags/evaluate";try{let r=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.cfg.secretKey}`},body:JSON.stringify({userProperties:this.userProperties})});if(!r.ok)return;let i=await r.json();this.flags=i,this.flagSubscribers.forEach(n=>n({...this.flags}))}catch(r){}}getAbVariants(){return{...this.abVariants}}getAbVariant(e){let r=this.abVariants[e];return r!=null?r:null}isAbVariant(e,r){return this.abVariants[e]===r}onAbTestsChange(e){return this.abTestSubscribers.add(e),()=>this.abTestSubscribers.delete(e)}async fetchAbTests(e){if(!this.cfg.endpoint||!this.cfg.secretKey)return;let r=ht(this.cfg.endpoint)+"/ab-tests/evaluate";try{let i={visitorId:this.session.visitorId};e!=null&&e.length&&(i.keys=e);let n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.cfg.secretKey}`},body:JSON.stringify(i)});if(!n.ok)return;let o=await n.json();this.abVariants=e!=null&&e.length?{...this.abVariants,...o}:{...o},this.abTestSubscribers.forEach(s=>s({...this.abVariants}))}catch(i){}}getSession(){return this.session}getPageViews(){return[...this.session.pageViews]}getTimeSpent(){return{...this.session.timeSpent}}getHeatmapData(e){var r;return e!==void 0?[...(r=this.session.heatmap[e])!=null?r:[]]:Object.entries(this.session.heatmap).reduce((i,[n,o])=>(i[n]=[...o],i),{})}flush(){this.flushQueue()}async flushQueue(){if(this.queue.length===0)return;let e=this.queue.splice(0);await this.sendBatch(e)}flushBeacon(){if(this.queue.length===0)return;let e=this.queue.splice(0);if(this.cfg.secretKey){this.sendBatch(e);return}let r=`${this.cfg.endpoint}/batch`,i=new Blob([this.buildBatchBody(e)],{type:"application/json"});typeof navigator!="undefined"&&navigator.sendBeacon?navigator.sendBeacon(r,i):this.sendBatch(e)}buildBatchBody(e){return JSON.stringify({...this.cfg.appId?{appId:this.cfg.appId}:{},visitorId:this.session.visitorId,events:e.map(r=>({sessionId:this.session.id,type:r.type,data:r.data}))})}async sendBatch(e){let r=`${this.cfg.endpoint}/batch`,i=this.cfg.secretKey?{Authorization:`Bearer ${this.cfg.secretKey}`}:{};try{await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",...i},body:this.buildBatchBody(e),keepalive:!0})}catch(n){}}};var k;function Ot(){typeof window=="undefined"||!window.AlphanaSDK||(k?window.AlphanaSDK.tracker=k:delete window.AlphanaSDK.tracker)}function ie(t,e){var i;let r=(i=t.dataset[e])==null?void 0:i.trim();return r||void 0}function ae(t,e){let r=ie(t,e);if(r!==void 0){if(["1","true","yes","on"].includes(r.toLowerCase()))return!0;if(["0","false","no","off"].includes(r.toLowerCase()))return!1}}function pe(t,e){let r=ie(t,e);if(r===void 0)return;let i=Number(r);return Number.isFinite(i)?i:void 0}function Rr(t,e){let r=ie(t,e);if(r===void 0)return;let i=r.split(",").map(n=>n.trim()).filter(Boolean);return i.length>0?i:void 0}function _i(){if(typeof document=="undefined")return{};let t=document.currentScript;return t instanceof HTMLScriptElement?{...ie(t,"endpoint")?{endpoint:ie(t,"endpoint")}:{},...ie(t,"appId")?{appId:ie(t,"appId")}:{},...ie(t,"secretKey")?{secretKey:ie(t,"secretKey")}:{},...ie(t,"sessionId")?{sessionId:ie(t,"sessionId")}:{},...ae(t,"trackNavigation")!==void 0?{trackNavigation:ae(t,"trackNavigation")}:{},...ae(t,"trackTime")!==void 0?{trackTime:ae(t,"trackTime")}:{},...ae(t,"trackHeatmap")!==void 0?{trackHeatmap:ae(t,"trackHeatmap")}:{},...ae(t,"trackLogs")!==void 0?{trackLogs:ae(t,"trackLogs")}:{},...ae(t,"sessionReplay")!==void 0?{sessionReplay:ae(t,"sessionReplay")}:{},...pe(t,"mouseSampleRate")!==void 0?{mouseSampleRate:pe(t,"mouseSampleRate")}:{},...pe(t,"maxHeatmapPoints")!==void 0?{maxHeatmapPoints:pe(t,"maxHeatmapPoints")}:{},...pe(t,"batchSize")!==void 0?{batchSize:pe(t,"batchSize")}:{},...pe(t,"flushInterval")!==void 0?{flushInterval:pe(t,"flushInterval")}:{},...Rr(t,"heatmapPages")?{heatmapPages:Rr(t,"heatmapPages")}:{}}:{}}function Vi(t){return Object.keys(t).length>0}function Lt(t={}){return k||(k=new We(t).init(),Ot(),k)}function Gi(){return k}function Ft(t,...e){var r,i;switch(t){case"init":return Lt((r=e[0])!=null?r:{});case"identify":k==null||k.identify((i=e[0])!=null?i:{});return;case"trackPageView":k==null||k.trackPageView(e[0]);return;case"trackRevenue":k==null||k.trackRevenue(e[0]);return;case"trackGoal":k==null||k.trackGoal(e[0]);return;case"trackJourneyStep":k==null||k.trackJourneyStep(e[0]);return;case"flush":k==null||k.flush();return;case"destroy":k==null||k.destroy(),k=void 0,Ot();return;default:return t}}function Ui(){var i;if(typeof window=="undefined")return[];let t=window.alphana,e=(i=t==null?void 0:t.q)!=null?i:[],r=((n,...o)=>Ft(n,...o));return r.q=[],window.alphana=r,e}function Hi(){var i;if(typeof window=="undefined")return;let t=Ui(),e=t.some(([n])=>n==="init"),r={..._i(),...(i=window.AlphanaSDKConfig)!=null?i:{}};!e&&Vi(r)&&Lt(r);for(let[n,...o]of t)Ft(n,...o);setTimeout(Ot,0)}Hi();return Lr(Zi);})();
|
|
6
6
|
/*! Bundled license information:
|
|
7
7
|
|
|
8
8
|
rrweb/es/rrweb/ext/tslib/tslib.es6.js:
|
package/dist/index.d.mts
CHANGED
|
@@ -316,6 +316,19 @@ declare global {
|
|
|
316
316
|
title: string;
|
|
317
317
|
}>;
|
|
318
318
|
}
|
|
319
|
+
interface Window {
|
|
320
|
+
/**
|
|
321
|
+
* Config read by the CDN browser bundle before it auto-initializes.
|
|
322
|
+
* Useful for Google Tag Manager or custom loaders that cannot rely on
|
|
323
|
+
* script `data-*` attributes.
|
|
324
|
+
*/
|
|
325
|
+
AlphanaSDKConfig?: TrackerConfig;
|
|
326
|
+
/**
|
|
327
|
+
* Hotjar-style command queue installed by the CDN browser bundle.
|
|
328
|
+
* Calls made before the bundle loads are replayed after initialization.
|
|
329
|
+
*/
|
|
330
|
+
alphana?: (command: string, ...args: unknown[]) => unknown;
|
|
331
|
+
}
|
|
319
332
|
}
|
|
320
333
|
|
|
321
334
|
type LogLevel = "info" | "warn" | "error";
|
|
@@ -531,6 +544,26 @@ declare class UserTracker {
|
|
|
531
544
|
private sendBatch;
|
|
532
545
|
}
|
|
533
546
|
|
|
547
|
+
/**
|
|
548
|
+
* Renders `points` onto `canvas` as a color heatmap.
|
|
549
|
+
*
|
|
550
|
+
* Algorithm:
|
|
551
|
+
* 1. Draw each point as a soft radial gradient on an off-screen canvas,
|
|
552
|
+
* accumulating "heat" in the alpha channel.
|
|
553
|
+
* 2. Map each pixel's accumulated alpha value through the color palette
|
|
554
|
+
* (blue → cyan → green → yellow → orange → red) and write to the
|
|
555
|
+
* destination canvas.
|
|
556
|
+
*
|
|
557
|
+
* Coordinates in `HeatmapPoint` are percentages (0–100) of page dimensions,
|
|
558
|
+
* which are scaled to the canvas size at render time — making it resolution
|
|
559
|
+
* independent.
|
|
560
|
+
*
|
|
561
|
+
* @param canvas Target canvas element (will NOT be resized automatically).
|
|
562
|
+
* @param points Array of heatmap points to render.
|
|
563
|
+
* @param options Visual tuning options.
|
|
564
|
+
*/
|
|
565
|
+
declare function renderHeatmap(canvas: HTMLCanvasElement, points: HeatmapPoint[], options?: HeatmapRenderOptions): void;
|
|
566
|
+
|
|
534
567
|
declare const ALPHANA_SDK_VERSION = "1.0.2";
|
|
535
568
|
|
|
536
569
|
/**
|
|
@@ -542,4 +575,4 @@ declare const ALPHANA_SDK_VERSION = "1.0.2";
|
|
|
542
575
|
*/
|
|
543
576
|
declare function normalizeTrackerPath(path: string): string;
|
|
544
577
|
|
|
545
|
-
export { ALPHANA_SDK_VERSION, type AbVariantsMap, type AttributionContext, type ClientContext, DEFAULT_ENDPOINT, type GeoLocation, type GoalEvent, type GoalEventPayload, type HeatmapPoint, type HeatmapRenderOptions, type JourneyStepEvent, type JourneyStepEventPayload, LogCapture, type LogEntry, type LogLevel, type PageView, type RageClick, type RevenueEvent, type RevenueEventPayload, type RevenueEventStatus, type RevenueLineItem, type SessionData, type TimeSpent, type TrackerConfig, type TrackerEvent, type UTurn, UserTracker, type UtmParams, normalizeTrackerPath };
|
|
578
|
+
export { ALPHANA_SDK_VERSION, type AbVariantsMap, type AttributionContext, type ClientContext, DEFAULT_ENDPOINT, type GeoLocation, type GoalEvent, type GoalEventPayload, type HeatmapPoint, type HeatmapRenderOptions, type JourneyStepEvent, type JourneyStepEventPayload, LogCapture, type LogEntry, type LogLevel, type PageView, type RageClick, type RevenueEvent, type RevenueEventPayload, type RevenueEventStatus, type RevenueLineItem, type SessionData, type TimeSpent, type TrackerConfig, type TrackerEvent, type UTurn, UserTracker, type UtmParams, normalizeTrackerPath, renderHeatmap };
|