Socket
Socket
Sign inDemoInstall

rrweb

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rrweb - npm Package Compare versions

Comparing version 0.7.27 to 0.7.28

dist/packer/rrweb-packer.js

112

dist/record/rrweb-record.js

@@ -75,5 +75,13 @@ var rrwebRecord = (function () {

var _id = 1;
var symbolAndNumberRegex = RegExp('[^a-z]');
function genId() {
return _id++;
}
function getValidTagName(tagName) {
var processedTagName = tagName.toLowerCase().trim();
if (symbolAndNumberRegex.test(processedTagName)) {
return 'div';
}
return processedTagName;
}
function getCssRulesString(s) {

@@ -116,3 +124,3 @@ try {

function absoluteToStylesheet(cssText, href) {
return cssText.replace(URL_IN_CSS_REF, function (origin, path1, path2, path3) {
return (cssText || '').replace(URL_IN_CSS_REF, function (origin, path1, path2, path3) {
var filePath = path1 || path2 || path3;

@@ -172,3 +180,3 @@ if (!filePath) {

function absoluteToDoc(doc, attributeValue) {
if (attributeValue.trim() === '') {
if (!attributeValue || attributeValue.trim() === '') {
return attributeValue;

@@ -184,9 +192,9 @@ }

function transformAttribute(doc, name, value) {
if (name === 'src' || name === 'href') {
if (name === 'src' || (name === 'href' && value)) {
return absoluteToDoc(doc, value);
}
else if (name === 'srcset') {
else if (name === 'srcset' && value) {
return getAbsoluteSrcsetString(doc, value);
}
else if (name === 'style') {
else if (name === 'style' && value) {
return absoluteToStylesheet(value, location.href);

@@ -224,3 +232,3 @@ }

}
var tagName = n.tagName.toLowerCase();
var tagName = getValidTagName(n.tagName);
var attributes_1 = {};

@@ -247,4 +255,3 @@ for (var _i = 0, _a = Array.from(n.attributes); _i < _a.length; _i++) {

'').trim().length) {
var cssText = getCssRulesString(n
.sheet);
var cssText = getCssRulesString(n.sheet);
if (cssText) {

@@ -276,2 +283,7 @@ attributes_1._cssText = absoluteToStylesheet(cssText, location.href);

}
if (tagName === 'audio' || tagName === 'video') {
attributes_1.rr_mediaState = n.paused
? 'paused'
: 'played';
}
if (needBlock_1) {

@@ -515,2 +527,4 @@ var _c = n.getBoundingClientRect(), width = _c.width, height = _c.height;

IncrementalSource[IncrementalSource["TouchMove"] = 6] = "TouchMove";
IncrementalSource[IncrementalSource["MediaInteraction"] = 7] = "MediaInteraction";
IncrementalSource[IncrementalSource["StyleSheetRule"] = 8] = "StyleSheetRule";
})(IncrementalSource || (IncrementalSource = {}));

@@ -530,2 +544,7 @@ var MouseInteractions;

})(MouseInteractions || (MouseInteractions = {}));
var MediaInteractions;
(function (MediaInteractions) {
MediaInteractions[MediaInteractions["Play"] = 0] = "Play";
MediaInteractions[MediaInteractions["Pause"] = 1] = "Pause";
})(MediaInteractions || (MediaInteractions = {}));
var ReplayerEvents;

@@ -544,2 +563,3 @@ (function (ReplayerEvents) {

ReplayerEvents["MouseInteraction"] = "mouse-interaction";
ReplayerEvents["EventCast"] = "event-cast";
})(ReplayerEvents || (ReplayerEvents = {}));

@@ -951,4 +971,42 @@

}
function initStyleSheetObserver(cb) {
var insertRule = CSSStyleSheet.prototype.insertRule;
CSSStyleSheet.prototype.insertRule = function (rule, index) {
cb({
id: mirror.getId(this.ownerNode),
adds: [{ rule: rule, index: index }]
});
return insertRule.apply(this, arguments);
};
var deleteRule = CSSStyleSheet.prototype.deleteRule;
CSSStyleSheet.prototype.deleteRule = function (index) {
cb({
id: mirror.getId(this.ownerNode),
removes: [{ index: index }]
});
return deleteRule.apply(this, arguments);
};
return function () {
CSSStyleSheet.prototype.insertRule = insertRule;
CSSStyleSheet.prototype.deleteRule = deleteRule;
};
}
function initMediaInteractionObserver(mediaInteractionCb, blockClass) {
var handler = function (type) { return function (event) {
var target = event.target;
if (!target || isBlocked(target, blockClass)) {
return;
}
mediaInteractionCb({
type: type === 'play' ? MediaInteractions.Play : MediaInteractions.Pause,
id: mirror.getId(target)
});
}; };
var handlers = [on('play', handler('play')), on('pause', handler('pause'))];
return function () {
handlers.forEach(function (h) { return h(); });
};
}
function mergeHooks(o, hooks) {
var mutationCb = o.mutationCb, mousemoveCb = o.mousemoveCb, mouseInteractionCb = o.mouseInteractionCb, scrollCb = o.scrollCb, viewportResizeCb = o.viewportResizeCb, inputCb = o.inputCb;
var mutationCb = o.mutationCb, mousemoveCb = o.mousemoveCb, mouseInteractionCb = o.mouseInteractionCb, scrollCb = o.scrollCb, viewportResizeCb = o.viewportResizeCb, inputCb = o.inputCb, mediaInteractionCb = o.mediaInteractionCb, styleSheetRuleCb = o.styleSheetRuleCb;
o.mutationCb = function () {

@@ -1014,2 +1072,22 @@ var p = [];

};
o.mediaInteractionCb = function () {
var p = [];
for (var _i = 0; _i < arguments.length; _i++) {
p[_i] = arguments[_i];
}
if (hooks.mediaInteaction) {
hooks.mediaInteaction.apply(hooks, __spread(p));
}
mediaInteractionCb.apply(void 0, __spread(p));
};
o.styleSheetRuleCb = function () {
var p = [];
for (var _i = 0; _i < arguments.length; _i++) {
p[_i] = arguments[_i];
}
if (hooks.styleSheetRule) {
hooks.styleSheetRule.apply(hooks, __spread(p));
}
styleSheetRuleCb.apply(void 0, __spread(p));
};
}

@@ -1025,2 +1103,4 @@ function initObservers(o, hooks) {

var inputHandler = initInputObserver(o.inputCb, o.blockClass, o.ignoreClass, o.maskAllInputs);
var mediaInteractionHandler = initMediaInteractionObserver(o.mediaInteractionCb, o.blockClass);
var styleSheetObserver = initStyleSheetObserver(o.styleSheetRuleCb);
return function () {

@@ -1033,2 +1113,4 @@ mutationObserver.disconnect();

inputHandler();
mediaInteractionHandler();
styleSheetObserver();
};

@@ -1142,2 +1224,14 @@ }

},
mediaInteractionCb: function (p) {
return wrappedEmit(wrapEvent({
type: EventType.IncrementalSnapshot,
data: __assign({ source: IncrementalSource.MediaInteraction }, p)
}));
},
styleSheetRuleCb: function (r) {
return wrappedEmit(wrapEvent({
type: EventType.IncrementalSnapshot,
data: __assign({ source: IncrementalSource.StyleSheetRule }, r)
}));
},
blockClass: blockClass,

@@ -1144,0 +1238,0 @@ ignoreClass: ignoreClass,

2

dist/record/rrweb-record.min.js

@@ -1,2 +0,2 @@

var rrwebRecord=function(){"use strict";var e,t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function n(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function o(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(e||(e={}));var a=1;function i(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+(function(e){return"styleSheet"in e}(n=t)?i(n.styleSheet)||"":n.cssText);var n},""):null}catch(e){return null}}var u=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,c=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,s=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function l(e,t){return e.replace(u,function(e,n,r,o){var a,i=n||r||o;if(!i)return e;if(!c.test(i))return"url('"+i+"')";if(s.test(i))return"url("+i+")";if("/"===i[0])return"url('"+(((a=t).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+i)+"')";var u=t.split("/"),l=i.split("/");u.pop();for(var d=0,f=l;d<f.length;d++){var p=f[d];"."!==p&&(".."===p?u.pop():u.push(p))}return"url('"+u.join("/")+"')"})}function d(e,t){if(""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function f(e,t,n){return"src"===t||"href"===t?d(e,n):"srcset"===t?function(e,t){return""===t.trim()?t:t.split(",").map(function(t){var n=t.trimLeft().trimRight().split(" ");return 2===n.length?d(e,n[0])+" "+n[1]:1===n.length?""+d(e,n[0]):""}).join(",")}(e,n):"style"===t?l(n,location.href):n}function p(t,n,r,o,u,c,s){void 0===u&&(u=!1),void 0===c&&(c=!0),void 0===s&&(s=!1);var d,m=function(t,n,r,o,a){switch(t.nodeType){case t.DOCUMENT_NODE:return{type:e.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId};case t.ELEMENT_NODE:var u=!1;"string"==typeof r?u=t.classList.contains(r):t.classList.forEach(function(e){r.test(e)&&(u=!0)});for(var c=t.tagName.toLowerCase(),s={},d=0,p=Array.from(t.attributes);d<p.length;d++){var m=p[d],h=m.name,v=m.value;s[h]=f(n,h,v)}if("link"===c&&o){var y,g=Array.from(n.styleSheets).find(function(e){return e.href===t.href});(y=i(g))&&(delete s.rel,delete s.href,s._cssText=l(y,g.href))}if("style"===c&&t.sheet&&!(t.innerText||t.textContent||"").trim().length&&(y=i(t.sheet))&&(s._cssText=l(y,location.href)),"input"!==c&&"textarea"!==c&&"select"!==c||(v=t.value,"radio"!==s.type&&"checkbox"!==s.type&&v?s.value=a?"*".repeat(v.length):v:t.checked&&(s.checked=t.checked)),"option"===c){var b=t.parentElement;s.value===b.value&&(s.selected=t.selected)}if("canvas"===c&&(s.rr_dataURL=t.toDataURL()),u){var E=t.getBoundingClientRect(),C=E.width,w=E.height;s.rr_width=C+"px",s.rr_height=w+"px"}return{type:e.Element,tagName:c,attributes:s,childNodes:[],isSVG:(S=t,"svg"===S.tagName||S instanceof SVGElement||void 0),needBlock:u};case t.TEXT_NODE:var N=t.parentNode&&t.parentNode.tagName,T=t.textContent,I="STYLE"===N||void 0;return I&&T&&(T=l(T,location.href)),"SCRIPT"===N&&(T="SCRIPT_PLACEHOLDER"),{type:e.Text,textContent:T||"",isStyle:I};case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:""};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||""};default:return!1}var S}(t,n,o,c,s);if(!m)return console.warn(t,"not serialized"),null;d="__sn"in t?t.__sn.id:a++;var h=Object.assign(m,{id:d});t.__sn=h,r[d]=t;var v=!u;if(h.type===e.Element&&(v=v&&!h.needBlock,delete h.needBlock),(h.type===e.Document||h.type===e.Element)&&v)for(var y=0,g=Array.from(t.childNodes);y<g.length;y++){var b=p(g[y],n,r,o,u,c,s);b&&h.childNodes.push(b)}return h}function m(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var h,v,y,g,b={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return b.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete b.map[t],e.childNodes&&e.childNodes.forEach(function(e){return b.removeNodeFromMap(e)})},has:function(e){return b.map.hasOwnProperty(e)}};function E(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(a){var i=Date.now();o||!1!==n.leading||(o=i);var u=t-(i-o),c=this,s=arguments;u<=0||u>t?(r&&(window.clearTimeout(r),r=null),o=i,e.apply(c,s)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(c,s)},u))}}function C(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function w(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function N(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var n=!1;return"string"==typeof t?n=e.classList.contains(t):e.classList.forEach(function(e){t.test(e)&&(n=!0)}),n||N(e.parentNode,t)}return N(e.parentNode,t)}function T(e){return Boolean(e.changedTouches)}function I(e,t){e.delete(t),t.childNodes.forEach(function(t){return I(e,t)})}function S(e,t){var n=t.parentNode;if(!n)return!1;var r=b.getId(n);return!!e.some(function(e){return e.id===r})||S(e,n)}function D(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||D(e,n))}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom"}(h||(h={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove"}(v||(v={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(y||(y={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction"}(g||(g={}));var x=function(e,t){return e+"@"+t};function M(e){return"__sn"in e}function k(e,t,r,o){var a=new MutationObserver(function(a){var i,u,c,s,l=[],d=[],m=[],h=[],v=new Set,y=new Set,g=new Set,E={},C=function(e,n){if(!N(e,t)){if(M(e)){y.add(e);var r=null;n&&M(n)&&(r=n.__sn.id),r&&(E[x(e.__sn.id,r)]=!0)}else v.add(e),g.delete(e);e.childNodes.forEach(function(e){return C(e)})}};a.forEach(function(e){var n=e.type,r=e.target,o=e.oldValue,a=e.addedNodes,i=e.removedNodes,u=e.attributeName;switch(n){case"characterData":var c=r.textContent;N(r,t)||c===o||l.push({value:c,node:r});break;case"attributes":c=r.getAttribute(u);if(N(r,t)||c===o)return;var s=d.find(function(e){return e.node===r});s||(s={node:r,attributes:{}},d.push(s)),s.attributes[u]=f(document,u,c);break;case"childList":a.forEach(function(e){return C(e,r)}),i.forEach(function(e){var n=b.getId(e),o=b.getId(r);N(e,t)||(v.has(e)?(I(v,e),g.add(e)):v.has(r)&&-1===n||function e(t){var n=b.getId(t);return!b.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode))}(r)||(y.has(e)&&E[x(n,o)]?I(y,e):m.push({parentId:o,id:n})),b.removeNodeFromMap(e))})}});var w=[],T=function(e){var n=b.getId(e.parentNode);if(-1===n)return w.push(e);h.push({parentId:n,previousId:e.previousSibling?b.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?b.getId(e.nextSibling):e.nextSibling,node:p(e,document,b.map,t,!0,r,o)})};try{for(var k=n(y),L=k.next();!L.done;L=k.next()){T(A=L.value)}}catch(e){i={error:e}}finally{try{L&&!L.done&&(u=k.return)&&u.call(k)}finally{if(i)throw i.error}}try{for(var _=n(v),O=_.next();!O.done;O=_.next()){var A=O.value;D(g,A)||S(m,A)?D(y,A)?T(A):g.add(A):T(A)}}catch(e){c={error:e}}finally{try{O&&!O.done&&(s=_.return)&&s.call(_)}finally{if(c)throw c.error}}for(;w.length&&!w.every(function(e){return-1===b.getId(e.parentNode)});)T(w.shift());var R={texts:l.map(function(e){return{id:b.getId(e.node),value:e.value}}).filter(function(e){return b.has(e.id)}),attributes:d.map(function(e){return{id:b.getId(e.node),attributes:e.attributes}}).filter(function(e){return b.has(e.id)}),removes:m,adds:h};(R.texts.length||R.attributes.length||R.removes.length||R.adds.length)&&e(R)});return a.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function L(e,t){var n=[];return Object.keys(y).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(r){var o=r.toLowerCase(),a=function(n){return function(r){if(!N(r.target,t)){var o=b.getId(r.target),a=T(r)?r.changedTouches[0]:r,i=a.clientX,u=a.clientY;e({type:y[n],id:o,x:i,y:u})}}}(r);n.push(m(o,a))}),function(){n.forEach(function(e){return e()})}}var _,O=["INPUT","TEXTAREA","SELECT"],A=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],R=new WeakMap;function z(e,n,r,a){function i(e){var t=e.target;if(t&&t.tagName&&!(O.indexOf(t.tagName)<0)&&!N(t,n)){var o=t.type;if("password"!==o&&!t.classList.contains(r)){var i=t.value,c=!1,s=A.includes(o)||"TEXTAREA"===t.tagName;"radio"===o||"checkbox"===o?c=t.checked:s&&a&&(i="*".repeat(i.length)),u(t,{text:i,isChecked:c});var l=t.name;"radio"===o&&l&&c&&document.querySelectorAll('input[type="radio"][name="'+l+'"]').forEach(function(e){e!==t&&u(e,{text:e.value,isChecked:!c})})}}}function u(n,r){var o=R.get(n);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){R.set(n,r);var a=b.getId(n);e(t({},r,{id:a}))}}var c=["input","change"].map(function(e){return m(e,i)}),s=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),l=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return s&&s.set&&c.push.apply(c,o(l.map(function(e){return function e(t,n,r,o){var a=Object.getOwnPropertyDescriptor(t,n);return Object.defineProperty(t,n,o?r:{set:function(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),a&&a.set&&a.set.call(this,e)}}),function(){return e(t,n,a||{},!0)}}(e[0],e[1],{set:function(){i({target:this})}})}))),function(){c.forEach(function(e){return e()})}}function F(e,t){void 0===t&&(t={}),function(e,t){var n=e.mutationCb,r=e.mousemoveCb,a=e.mouseInteractionCb,i=e.scrollCb,u=e.viewportResizeCb,c=e.inputCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,o(e)),n.apply(void 0,o(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,o(e)),r.apply(void 0,o(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,o(e)),a.apply(void 0,o(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,o(e)),i.apply(void 0,o(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,o(e)),u.apply(void 0,o(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,o(e)),c.apply(void 0,o(e))}}(e,t);var n,r,a,i,u,c,s,l=k(e.mutationCb,e.blockClass,e.inlineStylesheet,e.maskAllInputs),d=(n=e.mousemoveCb,r=e.mousemoveWait,i=[],u=E(function(e){var t=Date.now()-a;n(i.map(function(e){return e.timeOffset-=t,e}),e?v.TouchMove:v.MouseMove),i=[],a=null},500),c=E(function(e){var t=e.target,n=T(e)?e.changedTouches[0]:e,r=n.clientX,o=n.clientY;a||(a=Date.now()),i.push({x:r,y:o,id:b.getId(t),timeOffset:Date.now()-a}),u(T(e))},r,{trailing:!1}),s=[m("mousemove",c),m("touchmove",c)],function(){s.forEach(function(e){return e()})}),f=L(e.mouseInteractionCb,e.blockClass),p=function(e,t){return m("scroll",E(function(n){if(n.target&&!N(n.target,t)){var r=b.getId(n.target);if(n.target===document){var o=document.scrollingElement||document.documentElement;e({id:r,x:o.scrollLeft,y:o.scrollTop})}else e({id:r,x:n.target.scrollLeft,y:n.target.scrollTop})}},100))}(e.scrollCb,e.blockClass),h=function(e){return m("resize",E(function(){var t=C(),n=w();e({width:Number(n),height:Number(t)})},200),window)}(e.viewportResizeCb),y=z(e.inputCb,e.blockClass,e.ignoreClass,e.maskAllInputs);return function(){l.disconnect(),d(),f(),p(),h(),y()}}function P(e){return t({},e,{timestamp:Date.now()})}function j(e){void 0===e&&(e={});var n,o=e.emit,a=e.checkoutEveryNms,i=e.checkoutEveryNth,u=e.blockClass,c=void 0===u?"rr-block":u,s=e.ignoreClass,l=void 0===s?"rr-ignore":s,d=e.inlineStylesheet,f=void 0===d||d,y=e.maskAllInputs,g=void 0!==y&&y,E=e.hooks,N=e.mousemoveWait,T=void 0===N?50:N;if(!o)throw new Error("emit function is required");"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach);var I=0;function S(e){void 0===e&&(e=!1),_(P({type:h.Meta,data:{href:window.location.href,width:w(),height:C()}}),e);var t=r(function(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[p(e,e,o,t,!1,n,r),o]}(document,c,f,g),2),n=t[0],o=t[1];if(!n)return console.warn("Failed to snapshot the document");b.map=o,_(P({type:h.FullSnapshot,data:{node:n,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}_=function(e,t){if(o(e,t),e.type===h.FullSnapshot)n=e,I=0;else if(e.type===h.IncrementalSnapshot){I++;var r=i&&I>=i,u=a&&e.timestamp-n.timestamp>a;(r||u)&&S(!0)}};try{var D=[];D.push(m("DOMContentLoaded",function(){_(P({type:h.DomContentLoaded,data:{}}))}));var x=function(){S(),D.push(F({mutationCb:function(e){return _(P({type:h.IncrementalSnapshot,data:t({source:v.Mutation},e)}))},mousemoveCb:function(e,t){return _(P({type:h.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return _(P({type:h.IncrementalSnapshot,data:t({source:v.MouseInteraction},e)}))},scrollCb:function(e){return _(P({type:h.IncrementalSnapshot,data:t({source:v.Scroll},e)}))},viewportResizeCb:function(e){return _(P({type:h.IncrementalSnapshot,data:t({source:v.ViewportResize},e)}))},inputCb:function(e){return _(P({type:h.IncrementalSnapshot,data:t({source:v.Input},e)}))},blockClass:c,ignoreClass:l,maskAllInputs:g,inlineStylesheet:f,mousemoveWait:T},E))};return"interactive"===document.readyState||"complete"===document.readyState?x():D.push(m("load",function(){_(P({type:h.Load,data:{}})),x()},window)),function(){D.forEach(function(e){return e()})}}catch(e){console.warn(e)}}return j.addCustomEvent=function(e,t){if(!_)throw new Error("please add custom event after start recording");_(P({type:h.Custom,data:{tag:e,payload:t}}))},j}();
var rrwebRecord=function(){"use strict";var e,t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function n(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function o(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(e||(e={}));var a=1,i=RegExp("[^a-z]");function u(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+(function(e){return"styleSheet"in e}(n=t)?u(n.styleSheet)||"":n.cssText);var n},""):null}catch(e){return null}}var c=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,l=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,s=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function d(e,t){return(e||"").replace(c,function(e,n,r,o){var a,i=n||r||o;if(!i)return e;if(!l.test(i))return"url('"+i+"')";if(s.test(i))return"url("+i+")";if("/"===i[0])return"url('"+(((a=t).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+i)+"')";var u=t.split("/"),c=i.split("/");u.pop();for(var d=0,p=c;d<p.length;d++){var f=p[d];"."!==f&&(".."===f?u.pop():u.push(f))}return"url('"+u.join("/")+"')"})}function p(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function f(e,t,n){return"src"===t||"href"===t&&n?p(e,n):"srcset"===t&&n?function(e,t){return""===t.trim()?t:t.split(",").map(function(t){var n=t.trimLeft().trimRight().split(" ");return 2===n.length?p(e,n[0])+" "+n[1]:1===n.length?""+p(e,n[0]):""}).join(",")}(e,n):"style"===t&&n?d(n,location.href):n}function h(t,n,r,o,a){switch(t.nodeType){case t.DOCUMENT_NODE:return{type:e.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId};case t.ELEMENT_NODE:var c=!1;"string"==typeof r?c=t.classList.contains(r):t.classList.forEach(function(e){r.test(e)&&(c=!0)});for(var l=function(e){var t=e.toLowerCase().trim();return i.test(t)?"div":t}(t.tagName),s={},p=0,h=Array.from(t.attributes);p<h.length;p++){var m=h[p],v=m.name,y=m.value;s[v]=f(n,v,y)}if("link"===l&&o){var g,b=Array.from(n.styleSheets).find(function(e){return e.href===t.href});(g=u(b))&&(delete s.rel,delete s.href,s._cssText=d(g,b.href))}if("style"===l&&t.sheet&&!(t.innerText||t.textContent||"").trim().length)(g=u(t.sheet))&&(s._cssText=d(g,location.href));if("input"===l||"textarea"===l||"select"===l){y=t.value;"radio"!==s.type&&"checkbox"!==s.type&&y?s.value=a?"*".repeat(y.length):y:t.checked&&(s.checked=t.checked)}if("option"===l){var S=t.parentElement;s.value===S.value&&(s.selected=t.selected)}if("canvas"===l&&(s.rr_dataURL=t.toDataURL()),"audio"!==l&&"video"!==l||(s.rr_mediaState=t.paused?"paused":"played"),c){var C=t.getBoundingClientRect(),E=C.width,w=C.height;s.rr_width=E+"px",s.rr_height=w+"px"}return{type:e.Element,tagName:l,attributes:s,childNodes:[],isSVG:(x=t,"svg"===x.tagName||x instanceof SVGElement||void 0),needBlock:c};case t.TEXT_NODE:var I=t.parentNode&&t.parentNode.tagName,N=t.textContent,T="STYLE"===I||void 0;return T&&N&&(N=d(N,location.href)),"SCRIPT"===I&&(N="SCRIPT_PLACEHOLDER"),{type:e.Text,textContent:N||"",isStyle:T};case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:""};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||""};default:return!1}var x}function m(t,n,r,o,i,u,c){void 0===i&&(i=!1),void 0===u&&(u=!0),void 0===c&&(c=!1);var l,s=h(t,n,o,u,c);if(!s)return console.warn(t,"not serialized"),null;l="__sn"in t?t.__sn.id:a++;var d=Object.assign(s,{id:l});t.__sn=d,r[l]=t;var p=!i;if(d.type===e.Element&&(p=p&&!d.needBlock,delete d.needBlock),(d.type===e.Document||d.type===e.Element)&&p)for(var f=0,v=Array.from(t.childNodes);f<v.length;f++){var y=m(v[f],n,r,o,i,u,c);y&&d.childNodes.push(y)}return d}function v(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var y,g,b,S,C,E={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return E.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete E.map[t],e.childNodes&&e.childNodes.forEach(function(e){return E.removeNodeFromMap(e)})},has:function(e){return E.map.hasOwnProperty(e)}};function w(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(a){var i=Date.now();o||!1!==n.leading||(o=i);var u=t-(i-o),c=this,l=arguments;u<=0||u>t?(r&&(window.clearTimeout(r),r=null),o=i,e.apply(c,l)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(c,l)},u))}}function I(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function N(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function T(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var n=!1;return"string"==typeof t?n=e.classList.contains(t):e.classList.forEach(function(e){t.test(e)&&(n=!0)}),n||T(e.parentNode,t)}return T(e.parentNode,t)}function x(e){return Boolean(e.changedTouches)}function M(e,t){e.delete(t),t.childNodes.forEach(function(t){return M(e,t)})}function D(e,t){var n=t.parentNode;if(!n)return!1;var r=E.getId(n);return!!e.some(function(e){return e.id===r})||D(e,n)}function k(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||k(e,n))}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom"}(y||(y={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule"}(g||(g={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(b||(b={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(S||(S={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast"}(C||(C={}));var L=function(e,t){return e+"@"+t};function _(e){return"__sn"in e}function R(e,t,r,o){var a=new MutationObserver(function(a){var i,u,c,l,s=[],d=[],p=[],h=[],v=new Set,y=new Set,g=new Set,b={},S=function(e,n){if(!T(e,t)){if(_(e)){y.add(e);var r=null;n&&_(n)&&(r=n.__sn.id),r&&(b[L(e.__sn.id,r)]=!0)}else v.add(e),g.delete(e);e.childNodes.forEach(function(e){return S(e)})}};a.forEach(function(e){var n=e.type,r=e.target,o=e.oldValue,a=e.addedNodes,i=e.removedNodes,u=e.attributeName;switch(n){case"characterData":var c=r.textContent;T(r,t)||c===o||s.push({value:c,node:r});break;case"attributes":c=r.getAttribute(u);if(T(r,t)||c===o)return;var l=d.find(function(e){return e.node===r});l||(l={node:r,attributes:{}},d.push(l)),l.attributes[u]=f(document,u,c);break;case"childList":a.forEach(function(e){return S(e,r)}),i.forEach(function(e){var n=E.getId(e),o=E.getId(r);T(e,t)||(v.has(e)?(M(v,e),g.add(e)):v.has(r)&&-1===n||function e(t){var n=E.getId(t);return!E.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode))}(r)||(y.has(e)&&b[L(n,o)]?M(y,e):p.push({parentId:o,id:n})),E.removeNodeFromMap(e))})}});var C=[],w=function(e){var n=E.getId(e.parentNode);if(-1===n)return C.push(e);h.push({parentId:n,previousId:e.previousSibling?E.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?E.getId(e.nextSibling):e.nextSibling,node:m(e,document,E.map,t,!0,r,o)})};try{for(var I=n(y),N=I.next();!N.done;N=I.next()){w(O=N.value)}}catch(e){i={error:e}}finally{try{N&&!N.done&&(u=I.return)&&u.call(I)}finally{if(i)throw i.error}}try{for(var x=n(v),R=x.next();!R.done;R=x.next()){var O=R.value;k(g,O)||D(p,O)?k(y,O)?w(O):g.add(O):w(O)}}catch(e){c={error:e}}finally{try{R&&!R.done&&(l=x.return)&&l.call(x)}finally{if(c)throw c.error}}for(;C.length&&!C.every(function(e){return-1===E.getId(e.parentNode)});)w(C.shift());var A={texts:s.map(function(e){return{id:E.getId(e.node),value:e.value}}).filter(function(e){return E.has(e.id)}),attributes:d.map(function(e){return{id:E.getId(e.node),attributes:e.attributes}}).filter(function(e){return E.has(e.id)}),removes:p,adds:h};(A.texts.length||A.attributes.length||A.removes.length||A.adds.length)&&e(A)});return a.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function O(e,t){var n=[];return Object.keys(b).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(r){var o=r.toLowerCase(),a=function(n){return function(r){if(!T(r.target,t)){var o=E.getId(r.target),a=x(r)?r.changedTouches[0]:r,i=a.clientX,u=a.clientY;e({type:b[n],id:o,x:i,y:u})}}}(r);n.push(v(o,a))}),function(){n.forEach(function(e){return e()})}}var A,P=["INPUT","TEXTAREA","SELECT"],z=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],F=new WeakMap;function j(e,n,r,a){function i(e){var t=e.target;if(t&&t.tagName&&!(P.indexOf(t.tagName)<0)&&!T(t,n)){var o=t.type;if("password"!==o&&!t.classList.contains(r)){var i=t.value,c=!1,l=z.includes(o)||"TEXTAREA"===t.tagName;"radio"===o||"checkbox"===o?c=t.checked:l&&a&&(i="*".repeat(i.length)),u(t,{text:i,isChecked:c});var s=t.name;"radio"===o&&s&&c&&document.querySelectorAll('input[type="radio"][name="'+s+'"]').forEach(function(e){e!==t&&u(e,{text:e.value,isChecked:!c})})}}}function u(n,r){var o=F.get(n);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){F.set(n,r);var a=E.getId(n);e(t({},r,{id:a}))}}var c=["input","change"].map(function(e){return v(e,i)}),l=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),s=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return l&&l.set&&c.push.apply(c,o(s.map(function(e){return function e(t,n,r,o){var a=Object.getOwnPropertyDescriptor(t,n);return Object.defineProperty(t,n,o?r:{set:function(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),a&&a.set&&a.set.call(this,e)}}),function(){return e(t,n,a||{},!0)}}(e[0],e[1],{set:function(){i({target:this})}})}))),function(){c.forEach(function(e){return e()})}}function H(e,t){void 0===t&&(t={}),function(e,t){var n=e.mutationCb,r=e.mousemoveCb,a=e.mouseInteractionCb,i=e.scrollCb,u=e.viewportResizeCb,c=e.inputCb,l=e.mediaInteractionCb,s=e.styleSheetRuleCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,o(e)),n.apply(void 0,o(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,o(e)),r.apply(void 0,o(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,o(e)),a.apply(void 0,o(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,o(e)),i.apply(void 0,o(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,o(e)),u.apply(void 0,o(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,o(e)),c.apply(void 0,o(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,o(e)),l.apply(void 0,o(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,o(e)),s.apply(void 0,o(e))}}(e,t);var n,r,a,i,u,c,l,s=R(e.mutationCb,e.blockClass,e.inlineStylesheet,e.maskAllInputs),d=(n=e.mousemoveCb,r=e.mousemoveWait,i=[],u=w(function(e){var t=Date.now()-a;n(i.map(function(e){return e.timeOffset-=t,e}),e?g.TouchMove:g.MouseMove),i=[],a=null},500),c=w(function(e){var t=e.target,n=x(e)?e.changedTouches[0]:e,r=n.clientX,o=n.clientY;a||(a=Date.now()),i.push({x:r,y:o,id:E.getId(t),timeOffset:Date.now()-a}),u(x(e))},r,{trailing:!1}),l=[v("mousemove",c),v("touchmove",c)],function(){l.forEach(function(e){return e()})}),p=O(e.mouseInteractionCb,e.blockClass),f=function(e,t){return v("scroll",w(function(n){if(n.target&&!T(n.target,t)){var r=E.getId(n.target);if(n.target===document){var o=document.scrollingElement||document.documentElement;e({id:r,x:o.scrollLeft,y:o.scrollTop})}else e({id:r,x:n.target.scrollLeft,y:n.target.scrollTop})}},100))}(e.scrollCb,e.blockClass),h=function(e){return v("resize",w(function(){var t=I(),n=N();e({width:Number(n),height:Number(t)})},200),window)}(e.viewportResizeCb),m=j(e.inputCb,e.blockClass,e.ignoreClass,e.maskAllInputs),y=function(e,t){var n=function(n){return function(r){var o=r.target;o&&!T(o,t)&&e({type:"play"===n?S.Play:S.Pause,id:E.getId(o)})}},r=[v("play",n("play")),v("pause",n("pause"))];return function(){r.forEach(function(e){return e()})}}(e.mediaInteractionCb,e.blockClass),b=function(e){var t=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(n,r){return e({id:E.getId(this.ownerNode),adds:[{rule:n,index:r}]}),t.apply(this,arguments)};var n=CSSStyleSheet.prototype.deleteRule;return CSSStyleSheet.prototype.deleteRule=function(t){return e({id:E.getId(this.ownerNode),removes:[{index:t}]}),n.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=t,CSSStyleSheet.prototype.deleteRule=n}}(e.styleSheetRuleCb);return function(){s.disconnect(),d(),p(),f(),h(),m(),y(),b()}}function U(e){return t({},e,{timestamp:Date.now()})}function V(e){void 0===e&&(e={});var n,o=e.emit,a=e.checkoutEveryNms,i=e.checkoutEveryNth,u=e.blockClass,c=void 0===u?"rr-block":u,l=e.ignoreClass,s=void 0===l?"rr-ignore":l,d=e.inlineStylesheet,p=void 0===d||d,f=e.maskAllInputs,h=void 0!==f&&f,b=e.hooks,S=e.mousemoveWait,C=void 0===S?50:S;if(!o)throw new Error("emit function is required");"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach);var w=0;function T(e){void 0===e&&(e=!1),A(U({type:y.Meta,data:{href:window.location.href,width:N(),height:I()}}),e);var t=r(function(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[m(e,e,o,t,!1,n,r),o]}(document,c,p,h),2),n=t[0],o=t[1];if(!n)return console.warn("Failed to snapshot the document");E.map=o,A(U({type:y.FullSnapshot,data:{node:n,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}A=function(e,t){if(o(e,t),e.type===y.FullSnapshot)n=e,w=0;else if(e.type===y.IncrementalSnapshot){w++;var r=i&&w>=i,u=a&&e.timestamp-n.timestamp>a;(r||u)&&T(!0)}};try{var x=[];x.push(v("DOMContentLoaded",function(){A(U({type:y.DomContentLoaded,data:{}}))}));var M=function(){T(),x.push(H({mutationCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.Mutation},e)}))},mousemoveCb:function(e,t){return A(U({type:y.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.MouseInteraction},e)}))},scrollCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.Scroll},e)}))},viewportResizeCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.ViewportResize},e)}))},inputCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.Input},e)}))},mediaInteractionCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return A(U({type:y.IncrementalSnapshot,data:t({source:g.StyleSheetRule},e)}))},blockClass:c,ignoreClass:s,maskAllInputs:h,inlineStylesheet:p,mousemoveWait:C},b))};return"interactive"===document.readyState||"complete"===document.readyState?M():x.push(v("load",function(){A(U({type:y.Load,data:{}})),M()},window)),function(){x.forEach(function(e){return e()})}}catch(e){console.warn(e)}}return V.addCustomEvent=function(e,t){if(!A)throw new Error("please add custom event after start recording");A(U({type:y.Custom,data:{tag:e,payload:t}}))},V}();
//# sourceMappingURL=rrweb-record.min.js.map

@@ -1,2 +0,2 @@

var rrweb=function(e){"use strict";var t,n=function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function r(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function i(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(t||(t={}));var a=1;function s(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+(function(e){return"styleSheet"in e}(n=t)?s(n.styleSheet)||"":n.cssText);var n},""):null}catch(e){return null}}var c=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,l=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,u=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function f(e,t){return e.replace(c,function(e,n,r,o){var i,a=n||r||o;if(!a)return e;if(!l.test(a))return"url('"+a+"')";if(u.test(a))return"url("+a+")";if("/"===a[0])return"url('"+(((i=t).indexOf("//")>-1?i.split("/").slice(0,3).join("/"):i.split("/")[0]).split("?")[0]+a)+"')";var s=t.split("/"),c=a.split("/");s.pop();for(var f=0,d=c;f<d.length;f++){var p=d[f];"."!==p&&(".."===p?s.pop():s.push(p))}return"url('"+s.join("/")+"')"})}function d(e,t){if(""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function p(e,t,n){return"src"===t||"href"===t?d(e,n):"srcset"===t?function(e,t){return""===t.trim()?t:t.split(",").map(function(t){var n=t.trimLeft().trimRight().split(" ");return 2===n.length?d(e,n[0])+" "+n[1]:1===n.length?""+d(e,n[0]):""}).join(",")}(e,n):"style"===t?f(n,location.href):n}function h(e,n,r,o,i,c,l){void 0===i&&(i=!1),void 0===c&&(c=!0),void 0===l&&(l=!1);var u,d=function(e,n,r,o,i){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:t.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:t.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:var a=!1;"string"==typeof r?a=e.classList.contains(r):e.classList.forEach(function(e){r.test(e)&&(a=!0)});for(var c=e.tagName.toLowerCase(),l={},u=0,d=Array.from(e.attributes);u<d.length;u++){var h=d[u],m=h.name,v=h.value;l[m]=p(n,m,v)}if("link"===c&&o){var y,g=Array.from(n.styleSheets).find(function(t){return t.href===e.href});(y=s(g))&&(delete l.rel,delete l.href,l._cssText=f(y,g.href))}if("style"===c&&e.sheet&&!(e.innerText||e.textContent||"").trim().length&&(y=s(e.sheet))&&(l._cssText=f(y,location.href)),"input"!==c&&"textarea"!==c&&"select"!==c||(v=e.value,"radio"!==l.type&&"checkbox"!==l.type&&v?l.value=i?"*".repeat(v.length):v:e.checked&&(l.checked=e.checked)),"option"===c){var b=e.parentElement;l.value===b.value&&(l.selected=e.selected)}if("canvas"===c&&(l.rr_dataURL=e.toDataURL()),a){var E=e.getBoundingClientRect(),w=E.width,T=E.height;l.rr_width=w+"px",l.rr_height=T+"px"}return{type:t.Element,tagName:c,attributes:l,childNodes:[],isSVG:(C=e,"svg"===C.tagName||C instanceof SVGElement||void 0),needBlock:a};case e.TEXT_NODE:var I=e.parentNode&&e.parentNode.tagName,S=e.textContent,N="STYLE"===I||void 0;return N&&S&&(S=f(S,location.href)),"SCRIPT"===I&&(S="SCRIPT_PLACEHOLDER"),{type:t.Text,textContent:S||"",isStyle:N};case e.CDATA_SECTION_NODE:return{type:t.CDATA,textContent:""};case e.COMMENT_NODE:return{type:t.Comment,textContent:e.textContent||""};default:return!1}var C}(e,n,o,c,l);if(!d)return console.warn(e,"not serialized"),null;u="__sn"in e?e.__sn.id:a++;var m=Object.assign(d,{id:u});e.__sn=m,r[u]=e;var v=!i;if(m.type===t.Element&&(v=v&&!m.needBlock,delete m.needBlock),(m.type===t.Document||m.type===t.Element)&&v)for(var y=0,g=Array.from(e.childNodes);y<g.length;y++){var b=h(g[y],n,r,o,i,c,l);b&&m.childNodes.push(b)}return m}var m=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g;function v(e,t){void 0===t&&(t={});var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=-1===o?r+e.length:e.length-o}function i(){var e={line:n,column:r};return function(t){return t.position=new a(e),p(),t}}var a=function(){return function(e){this.start=e,this.end={line:n,column:r},this.source=t.source}}();a.prototype.content=e;var s=[];function c(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;s.push(i)}function l(){return d(/^{\s*/)}function u(){return d(/^}/)}function f(){var t,n=[];for(p(),h(n);e.length&&"}"!==e.charAt(0)&&(t=x()||M());)!1!==t&&(n.push(t),h(n));return n}function d(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function p(){d(/^\s*/)}function h(e){var t;for(void 0===e&&(e=[]);t=v();)!1!==t&&e.push(t),t=v();return e}function v(){var t=i();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return c("End of comment missing");var a=e.slice(2,n-2);return r+=2,o(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function g(){var e=d(/^([^{]+)/);if(e)return y(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(e){return e.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(e){return e.replace(/\u200C/g,",")})}function b(){var e=i(),t=d(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=y(t[0]);if(!d(/^:\s*/))return c("property missing ':'");var r=d(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:n.replace(m,""),value:r?y(r[0]).replace(m,""):""});return d(/^[;\s]*/),o}}function E(){var e,t=[];if(!l())return c("missing '{'");for(h(t);e=b();)!1!==e&&(t.push(e),h(t)),e=b();return u()?t:c("missing '}'")}function w(){for(var e,t=[],n=i();e=d(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),d(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:E()})}var T,I=C("import"),S=C("charset"),N=C("namespace");function C(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=i(),r=d(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function x(){if("@"===e[0])return function(){var e=i(),t=d(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=d(/^([-\w]+)\s*/)))return c("@keyframes missing name");var r,o=t[1];if(!l())return c("@keyframes missing '{'");for(var a=h();r=w();)a.push(r),a=a.concat(h());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:a}):c("@keyframes missing '}'")}}()||function(){var e=i(),t=d(/^@media *([^{]+)/);if(t){var n=y(t[1]);if(!l())return c("@media missing '{'");var r=h().concat(f());return u()?e({type:"media",media:n,rules:r}):c("@media missing '}'")}}()||function(){var e=i(),t=d(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:y(t[1]),media:y(t[2])})}()||function(){var e=i(),t=d(/^@supports *([^{]+)/);if(t){var n=y(t[1]);if(!l())return c("@supports missing '{'");var r=h().concat(f());return u()?e({type:"supports",supports:n,rules:r}):c("@supports missing '}'")}}()||I()||S()||N()||function(){var e=i(),t=d(/^@([-\w]+)?document *([^{]+)/);if(t){var n=y(t[1]),r=y(t[2]);if(!l())return c("@document missing '{'");var o=h().concat(f());return u()?e({type:"document",document:r,vendor:n,rules:o}):c("@document missing '}'")}}()||function(){var e=i();if(d(/^@page */)){var t=g()||[];if(!l())return c("@page missing '{'");for(var n,r=h();n=b();)r.push(n),r=r.concat(h());return u()?e({type:"page",selectors:t,declarations:r}):c("@page missing '}'")}}()||function(){var e=i();if(d(/^@host\s*/)){if(!l())return c("@host missing '{'");var t=h().concat(f());return u()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=i();if(d(/^@font-face\s*/)){if(!l())return c("@font-face missing '{'");for(var t,n=h();t=b();)n.push(t),n=n.concat(h());return u()?e({type:"font-face",declarations:n}):c("@font-face missing '}'")}}()}function M(){var e=i(),t=g();return t?(h(),e({type:"rule",selectors:t,declarations:E()})):c("selector missing")}return function e(t,n){var r=t&&"string"==typeof t.type;var o=r?t:n;for(var i=0,a=Object.keys(t);i<a.length;i++){var s=a[i],c=t[s];Array.isArray(c)?c.forEach(function(t){e(t,o)}):c&&"object"==typeof c&&e(c,o)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((T=f(),{type:"stylesheet",stylesheet:{source:t.source,rules:T,parsingErrors:s}}))}function y(e){return e?e.replace(/^\s+|\s+$/g,""):""}var g={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var b=/([^\\]):hover/g;function E(e){var t=v(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach(function(t){"selectors"in t&&(t.selectors||[]).forEach(function(t){if(b.test(t)){var n=t.replace(b,"$1.\\:hover");e=e.replace(t,t+", "+n)}})}),e):e}function w(e,n,r){switch(e.type){case t.Document:return n.implementation.createDocument(null,"",null);case t.DocumentType:return n.implementation.createDocumentType(e.name,e.publicId,e.systemId);case t.Element:var o,i=function(e){var t=g[e.tagName]?g[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);o=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",i):n.createElement(i);var a=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var a=e.attributes[t];if(a="boolean"==typeof a?"":a,t.startsWith("rr_")){if("canvas"===i&&"rr_dataURL"===t){var s=document.createElement("img");s.src=a,s.onload=function(){var e=o.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}"rr_width"===t&&(o.style.width=a),"rr_height"===t&&(o.style.height=a)}else{var c="textarea"===i&&"value"===t,l="style"===i&&"_cssText"===t;if(l&&r&&(a=E(a)),c||l){for(var u=n.createTextNode(a),f=0,d=Array.from(o.childNodes);f<d.length;f++){var p=d[f];p.nodeType===o.TEXT_NODE&&o.removeChild(p)}return o.appendChild(u),"continue"}if("iframe"===i&&"src"===t)return"continue";try{e.isSVG&&"xlink:href"===t?o.setAttributeNS("http://www.w3.org/1999/xlink",t,a):o.setAttribute(t,a)}catch(e){}}};for(var s in e.attributes)a(s);return o;case t.Text:return n.createTextNode(e.isStyle&&r?E(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function T(e,n,r,o,i){void 0===o&&(o=!1),void 0===i&&(i=!0);var a=w(e,n,i);if(!a)return null;if(e.type===t.Document&&(n.close(),n.open(),a=n),a.__sn=e,r[e.id]=a,(e.type===t.Document||e.type===t.Element)&&!o)for(var s=0,c=e.childNodes;s<c.length;s++){var l=c[s],u=T(l,n,r,!1,i);u?a.appendChild(u):console.warn("Failed to rebuild",l)}return a}function I(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var S,N,C,x,M={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return M.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete M.map[t],e.childNodes&&e.childNodes.forEach(function(e){return M.removeNodeFromMap(e)})},has:function(e){return M.map.hasOwnProperty(e)}};function k(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(i){var a=Date.now();o||!1!==n.leading||(o=a);var s=t-(a-o),c=this,l=arguments;s<=0||s>t?(r&&(window.clearTimeout(r),r=null),o=a,e.apply(c,l)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(c,l)},s))}}function D(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function A(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function L(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var n=!1;return"string"==typeof t?n=e.classList.contains(t):e.classList.forEach(function(e){t.test(e)&&(n=!0)}),n||L(e.parentNode,t)}return L(e.parentNode,t)}function O(e){return Boolean(e.changedTouches)}function R(){"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)}function _(e,t){e.delete(t),t.childNodes.forEach(function(t){return _(e,t)})}function F(e,t){var n=t.parentNode;if(!n)return!1;var r=M.getId(n);return!!e.some(function(e){return e.id===r})||F(e,n)}function j(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||j(e,n))}(S=e.EventType||(e.EventType={}))[S.DomContentLoaded=0]="DomContentLoaded",S[S.Load=1]="Load",S[S.FullSnapshot=2]="FullSnapshot",S[S.IncrementalSnapshot=3]="IncrementalSnapshot",S[S.Meta=4]="Meta",S[S.Custom=5]="Custom",(N=e.IncrementalSource||(e.IncrementalSource={}))[N.Mutation=0]="Mutation",N[N.MouseMove=1]="MouseMove",N[N.MouseInteraction=2]="MouseInteraction",N[N.Scroll=3]="Scroll",N[N.ViewportResize=4]="ViewportResize",N[N.Input=5]="Input",N[N.TouchMove=6]="TouchMove",(C=e.MouseInteractions||(e.MouseInteractions={}))[C.MouseUp=0]="MouseUp",C[C.MouseDown=1]="MouseDown",C[C.Click=2]="Click",C[C.ContextMenu=3]="ContextMenu",C[C.DblClick=4]="DblClick",C[C.Focus=5]="Focus",C[C.Blur=6]="Blur",C[C.TouchStart=7]="TouchStart",C[C.TouchMove_Departed=8]="TouchMove_Departed",C[C.TouchEnd=9]="TouchEnd",(x=e.ReplayerEvents||(e.ReplayerEvents={})).Start="start",x.Pause="pause",x.Resume="resume",x.Resize="resize",x.Finish="finish",x.FullsnapshotRebuilded="fullsnapshot-rebuilded",x.LoadStylesheetStart="load-stylesheet-start",x.LoadStylesheetEnd="load-stylesheet-end",x.SkipStart="skip-start",x.SkipEnd="skip-end",x.MouseInteraction="mouse-interaction";var B=function(e,t){return e+"@"+t};function z(e){return"__sn"in e}function P(e,t,n,o){var i=new MutationObserver(function(i){var a,s,c,l,u=[],f=[],d=[],m=[],v=new Set,y=new Set,g=new Set,b={},E=function(e,n){if(!L(e,t)){if(z(e)){y.add(e);var r=null;n&&z(n)&&(r=n.__sn.id),r&&(b[B(e.__sn.id,r)]=!0)}else v.add(e),g.delete(e);e.childNodes.forEach(function(e){return E(e)})}};i.forEach(function(e){var n=e.type,r=e.target,o=e.oldValue,i=e.addedNodes,a=e.removedNodes,s=e.attributeName;switch(n){case"characterData":var c=r.textContent;L(r,t)||c===o||u.push({value:c,node:r});break;case"attributes":c=r.getAttribute(s);if(L(r,t)||c===o)return;var l=f.find(function(e){return e.node===r});l||(l={node:r,attributes:{}},f.push(l)),l.attributes[s]=p(document,s,c);break;case"childList":i.forEach(function(e){return E(e,r)}),a.forEach(function(e){var n=M.getId(e),o=M.getId(r);L(e,t)||(v.has(e)?(_(v,e),g.add(e)):v.has(r)&&-1===n||function e(t){var n=M.getId(t);return!M.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode))}(r)||(y.has(e)&&b[B(n,o)]?_(y,e):d.push({parentId:o,id:n})),M.removeNodeFromMap(e))})}});var w=[],T=function(e){var r=M.getId(e.parentNode);if(-1===r)return w.push(e);m.push({parentId:r,previousId:e.previousSibling?M.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?M.getId(e.nextSibling):e.nextSibling,node:h(e,document,M.map,t,!0,n,o)})};try{for(var I=r(y),S=I.next();!S.done;S=I.next()){T(x=S.value)}}catch(e){a={error:e}}finally{try{S&&!S.done&&(s=I.return)&&s.call(I)}finally{if(a)throw a.error}}try{for(var N=r(v),C=N.next();!C.done;C=N.next()){var x=C.value;j(g,x)||F(d,x)?j(y,x)?T(x):g.add(x):T(x)}}catch(e){c={error:e}}finally{try{C&&!C.done&&(l=N.return)&&l.call(N)}finally{if(c)throw c.error}}for(;w.length&&!w.every(function(e){return-1===M.getId(e.parentNode)});)T(w.shift());var k={texts:u.map(function(e){return{id:M.getId(e.node),value:e.value}}).filter(function(e){return M.has(e.id)}),attributes:f.map(function(e){return{id:M.getId(e.node),attributes:e.attributes}}).filter(function(e){return M.has(e.id)}),removes:d,adds:m};(k.texts.length||k.attributes.length||k.removes.length||k.adds.length)&&e(k)});return i.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function X(t,n){var r=[];return Object.keys(e.MouseInteractions).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(o){var i=o.toLowerCase(),a=function(r){return function(o){if(!L(o.target,n)){var i=M.getId(o.target),a=O(o)?o.changedTouches[0]:o,s=a.clientX,c=a.clientY;t({type:e.MouseInteractions[r],id:i,x:s,y:c})}}}(o);r.push(I(i,a))}),function(){r.forEach(function(e){return e()})}}var Y,U=["INPUT","TEXTAREA","SELECT"],H=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],V=new WeakMap;function W(e,t,r,o){function a(e){var n=e.target;if(n&&n.tagName&&!(U.indexOf(n.tagName)<0)&&!L(n,t)){var i=n.type;if("password"!==i&&!n.classList.contains(r)){var a=n.value,c=!1,l=H.includes(i)||"TEXTAREA"===n.tagName;"radio"===i||"checkbox"===i?c=n.checked:l&&o&&(a="*".repeat(a.length)),s(n,{text:a,isChecked:c});var u=n.name;"radio"===i&&u&&c&&document.querySelectorAll('input[type="radio"][name="'+u+'"]').forEach(function(e){e!==n&&s(e,{text:e.value,isChecked:!c})})}}}function s(t,r){var o=V.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){V.set(t,r);var i=M.getId(t);e(n({},r,{id:i}))}}var c=["input","change"].map(function(e){return I(e,a)}),l=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),u=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return l&&l.set&&c.push.apply(c,i(u.map(function(e){return function e(t,n,r,o){var i=Object.getOwnPropertyDescriptor(t,n);return Object.defineProperty(t,n,o?r:{set:function(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),i&&i.set&&i.set.call(this,e)}}),function(){return e(t,n,i||{},!0)}}(e[0],e[1],{set:function(){a({target:this})}})}))),function(){c.forEach(function(e){return e()})}}function G(t,n){void 0===n&&(n={}),function(e,t){var n=e.mutationCb,r=e.mousemoveCb,o=e.mouseInteractionCb,a=e.scrollCb,s=e.viewportResizeCb,c=e.inputCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,i(e)),n.apply(void 0,i(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,i(e)),r.apply(void 0,i(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,i(e)),o.apply(void 0,i(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,i(e)),a.apply(void 0,i(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,i(e)),s.apply(void 0,i(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,i(e)),c.apply(void 0,i(e))}}(t,n);var r,o,a,s,c,l,u,f=P(t.mutationCb,t.blockClass,t.inlineStylesheet,t.maskAllInputs),d=(r=t.mousemoveCb,o=t.mousemoveWait,s=[],c=k(function(t){var n=Date.now()-a;r(s.map(function(e){return e.timeOffset-=n,e}),t?e.IncrementalSource.TouchMove:e.IncrementalSource.MouseMove),s=[],a=null},500),l=k(function(e){var t=e.target,n=O(e)?e.changedTouches[0]:e,r=n.clientX,o=n.clientY;a||(a=Date.now()),s.push({x:r,y:o,id:M.getId(t),timeOffset:Date.now()-a}),c(O(e))},o,{trailing:!1}),u=[I("mousemove",l),I("touchmove",l)],function(){u.forEach(function(e){return e()})}),p=X(t.mouseInteractionCb,t.blockClass),h=function(e,t){return I("scroll",k(function(n){if(n.target&&!L(n.target,t)){var r=M.getId(n.target);if(n.target===document){var o=document.scrollingElement||document.documentElement;e({id:r,x:o.scrollLeft,y:o.scrollTop})}else e({id:r,x:n.target.scrollLeft,y:n.target.scrollTop})}},100))}(t.scrollCb,t.blockClass),m=function(e){return I("resize",k(function(){var t=D(),n=A();e({width:Number(n),height:Number(t)})},200),window)}(t.viewportResizeCb),v=W(t.inputCb,t.blockClass,t.ignoreClass,t.maskAllInputs);return function(){f.disconnect(),d(),p(),h(),m(),v()}}function q(e){return n({},e,{timestamp:Date.now()})}function $(t){void 0===t&&(t={});var r,i=t.emit,a=t.checkoutEveryNms,s=t.checkoutEveryNth,c=t.blockClass,l=void 0===c?"rr-block":c,u=t.ignoreClass,f=void 0===u?"rr-ignore":u,d=t.inlineStylesheet,p=void 0===d||d,m=t.maskAllInputs,v=void 0!==m&&m,y=t.hooks,g=t.mousemoveWait,b=void 0===g?50:g;if(!i)throw new Error("emit function is required");R();var E=0;function w(t){void 0===t&&(t=!1),Y(q({type:e.EventType.Meta,data:{href:window.location.href,width:A(),height:D()}}),t);var n=o(function(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[h(e,e,o,t,!1,n,r),o]}(document,l,p,v),2),r=n[0],i=n[1];if(!r)return console.warn("Failed to snapshot the document");M.map=i,Y(q({type:e.EventType.FullSnapshot,data:{node:r,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}Y=function(t,n){if(i(t,n),t.type===e.EventType.FullSnapshot)r=t,E=0;else if(t.type===e.EventType.IncrementalSnapshot){E++;var o=s&&E>=s,c=a&&t.timestamp-r.timestamp>a;(o||c)&&w(!0)}};try{var T=[];T.push(I("DOMContentLoaded",function(){Y(q({type:e.EventType.DomContentLoaded,data:{}}))}));var S=function(){w(),T.push(G({mutationCb:function(t){return Y(q({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Mutation},t)}))},mousemoveCb:function(t,n){return Y(q({type:e.EventType.IncrementalSnapshot,data:{source:n,positions:t}}))},mouseInteractionCb:function(t){return Y(q({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.MouseInteraction},t)}))},scrollCb:function(t){return Y(q({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Scroll},t)}))},viewportResizeCb:function(t){return Y(q({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.ViewportResize},t)}))},inputCb:function(t){return Y(q({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Input},t)}))},blockClass:l,ignoreClass:f,maskAllInputs:v,inlineStylesheet:p,mousemoveWait:b},y))};return"interactive"===document.readyState||"complete"===document.readyState?S():T.push(I("load",function(){Y(q({type:e.EventType.Load,data:{}})),S()},window)),function(){T.forEach(function(e){return e()})}}catch(e){console.warn(e)}}function Z(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map(function(e){e(n)}),(e["*"]||[]).slice().map(function(e){e(t,n)})}}}$.addCustomEvent=function(t,n){if(!Y)throw new Error("please add custom event after start recording");Y(q({type:e.EventType.Custom,data:{tag:t,payload:n}}))};var J=Object.freeze({default:Z});var K,Q=(function(e,t){!function(){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)){var n,r=e.HTMLElement||e.Element,o=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||c,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):i.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?i.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=function(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}(this),r=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(h.call(this,n,n.scrollLeft+o.left-r.left,n.scrollTop+o.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function c(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function f(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function d(e){var t=u(e,"Y")&&f(e,"Y"),n=u(e,"X")&&f(e,"X");return t||n}function p(t){var n,r,i,s,c=(a()-t.startTime)/o;s=c=c>1?1:c,n=.5*(1-Math.cos(Math.PI*s)),r=t.startX+(t.x-t.startX)*n,i=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,i),r===t.x&&i===t.y||e.requestAnimationFrame(p.bind(e,t))}function h(n,r,o){var s,l,u,f,d=a();n===t.body?(s=e,l=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,f=i.scroll):(s=n,l=n.scrollLeft,u=n.scrollTop,f=c),p({scrollable:s,method:f,startTime:d,startX:l,startY:u,x:r,y:o})}}}}()}(K={exports:{}},K.exports),K.exports).polyfill,ee=function(){function e(e,t){void 0===t&&(t=[]),this.timeOffset=0,this.actions=t,this.config=e}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){var t;(t=this.actions).push.apply(t,i(e))},e.prototype.start=function(){this.actions.sort(function(e,t){return e.delay-t.delay}),this.timeOffset=0;var e=performance.now(),t=this.actions,n=this.config,r=this;this.raf=requestAnimationFrame(function o(i){for(r.timeOffset+=(i-e)*n.speed,e=i;t.length;){var a=t[0];if(!(r.timeOffset>=a.delay))break;t.shift(),a.doAction()}(t.length>0||r.config.liveMode)&&(r.raf=requestAnimationFrame(o))})},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},e.prototype.findActionIndex=function(e){for(var t=0,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r;n=r-1}}return t},e}(),te=Z||J,ne=function(){function t(e,t){if(this.events=[],this.emitter=te(),this.baselineTime=0,this.noramlSpeed=-1,this.missingNodeRetryMap={},e.length<2)throw new Error("Replayer need at least 2 events.");this.events=e,this.handleResize=this.handleResize.bind(this);var n={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[]};this.config=Object.assign({},n,t),this.timer=new ee(this.config),Q(),R(),this.setupDom(),this.emitter.on("resize",this.handleResize)}return t.prototype.on=function(e,t){this.emitter.on(e,t)},t.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach(function(n){t.config[n]=e[n]}),this.config.skipInactive||(this.noramlSpeed=-1)},t.prototype.getMetaData=function(){var e=this.events[0];return{totalTime:this.events[this.events.length-1].timestamp-e.timestamp}},t.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},t.prototype.getTimeOffset=function(){return this.baselineTime-this.events[0].timestamp},t.prototype.play=function(t){var n,o;void 0===t&&(t=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+t;var i=new Array;try{for(var a=r(this.events),s=a.next();!s.done;s=a.next()){var c=s.value,l=c.timestamp<this.baselineTime,u=this.getCastFn(c,l);l?u():i.push({doAction:u,delay:this.getDelay(c)})}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}this.timer.addActions(i),this.timer.start(),this.emitter.emit(e.ReplayerEvents.Start)},t.prototype.pause=function(){this.timer.clear(),this.emitter.emit(e.ReplayerEvents.Pause)},t.prototype.resume=function(t){var n,o;void 0===t&&(t=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+t;var i=new Array;try{for(var a=r(this.events),s=a.next();!s.done;s=a.next()){var c=s.value;if(!(c.timestamp<=this.lastPlayedEvent.timestamp||c===this.lastPlayedEvent)){var l=this.getCastFn(c);i.push({doAction:l,delay:this.getDelay(c)})}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}this.timer.addActions(i),this.timer.start(),this.emitter.emit(e.ReplayerEvents.Resume)},t.prototype.addEvent=function(e){this.getCastFn(e,!0)()},t.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.iframe.setAttribute("scrolling","no"),this.iframe.setAttribute("style","pointer-events: none"),this.wrapper.appendChild(this.iframe)},t.prototype.handleResize=function(e){this.iframe.width=e.width+"px",this.iframe.height=e.height+"px"},t.prototype.getDelay=function(t){if(t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.MouseMove){var n=t.data.positions[0].timeOffset,r=t.timestamp+n;return t.delay=r-this.baselineTime,r-this.baselineTime}return t.delay=t.timestamp-this.baselineTime,t.timestamp-this.baselineTime},t.prototype.getCastFn=function(t,n){var o,i=this;switch(void 0===n&&(n=!1),t.type){case e.EventType.DomContentLoaded:case e.EventType.Load:break;case e.EventType.Meta:o=function(){return i.emitter.emit(e.ReplayerEvents.Resize,{width:t.data.width,height:t.data.height})};break;case e.EventType.FullSnapshot:o=function(){i.rebuildFullSnapshot(t),i.iframe.contentWindow.scrollTo(t.data.initialOffset)};break;case e.EventType.IncrementalSnapshot:o=function(){var o,a;if(i.applyIncremental(t,n),t===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.restoreSpeed()),i.config.skipInactive&&!i.nextUserInteractionEvent){try{for(var s=r(i.events),c=s.next();!c.done;c=s.next()){var l=c.value;if(!(l.timestamp<=t.timestamp)&&i.isUserInteraction(l)){l.delay-t.delay>1e4*i.config.speed&&(i.nextUserInteractionEvent=l);break}}}catch(e){o={error:e}}finally{try{c&&!c.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}if(i.nextUserInteractionEvent){i.noramlSpeed=i.config.speed;var u=i.nextUserInteractionEvent.delay-t.delay,f={speed:Math.min(Math.round(u/5e3),360)};i.setConfig(f),i.emitter.emit(e.ReplayerEvents.SkipStart,f)}}}}return function(){o&&o(),i.lastPlayedEvent=t,t===i.events[i.events.length-1]&&(i.restoreSpeed(),i.emitter.emit(e.ReplayerEvents.Finish))}},t.prototype.rebuildFullSnapshot=function(t){Object.keys(this.missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.missingNodeRetryMap),this.missingNodeRetryMap={},M.map=function(e,t,n){void 0===n&&(n=!0);var r={};return[T(e,t,r,!1,n),r]}(t.data.node,this.iframe.contentDocument)[1];var n=document.createElement("style"),r=this.iframe.contentDocument,o=r.documentElement,i=r.head;o.insertBefore(n,i);for(var a,s=(a=this.config.blockClass,["iframe, ."+a+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules),c=0;c<s.length;c++)n.sheet.insertRule(s[c],c);this.emitter.emit(e.ReplayerEvents.FullsnapshotRebuilded),this.waitForStylesheetLoad()},t.prototype.waitForStylesheetLoad=function(){var t=this,n=this.iframe.contentDocument.head;if(n){var r,o=new Set;n.querySelectorAll('link[rel="stylesheet"]').forEach(function(n){n.sheet||(0===o.size&&(t.pause(),t.emitter.emit(e.ReplayerEvents.LoadStylesheetStart),r=window.setTimeout(function(){t.resume(t.getCurrentTime()),r=-1},t.config.loadTimeout)),o.add(n),n.addEventListener("load",function(){o.delete(n),0===o.size&&-1!==r&&(t.resume(t.getCurrentTime()),t.emitter.emit(e.ReplayerEvents.LoadStylesheetEnd),r&&window.clearTimeout(r))}))})}},t.prototype.applyIncremental=function(t,r){var o=this,i=t.data;switch(i.source){case e.IncrementalSource.Mutation:i.removes.forEach(function(e){var t=M.getNode(e.id);if(!t)return o.warnNodeNotFound(i,e.id);var n=M.getNode(e.parentId);if(!n)return o.warnNodeNotFound(i,e.parentId);M.removeNodeFromMap(t),n&&n.removeChild(t)});var a=n({},this.missingNodeRetryMap),s=[],c=function(e){var t=M.getNode(e.parentId);if(!t)return s.push(e);var n=T(e.node,o.iframe.contentDocument,M.map,!0),r=null,i=null;e.previousId&&(r=M.getNode(e.previousId)),e.nextId&&(i=M.getNode(e.nextId)),-1!==e.previousId&&-1!==e.nextId?(r&&r.nextSibling&&r.nextSibling.parentNode?t.insertBefore(n,r.nextSibling):i&&i.parentNode?t.insertBefore(n,i):t.appendChild(n),(e.previousId||e.nextId)&&o.resolveMissingNode(a,t,n,e)):a[e.node.id]={node:n,mutation:e}};for(i.adds.forEach(function(e){c(e)});s.length;){if(s.every(function(e){return!Boolean(M.getNode(e.parentId))}))return s.forEach(function(e){return o.warnNodeNotFound(i,e.node.id)});var l=s.shift();c(l)}Object.keys(a).length&&Object.assign(this.missingNodeRetryMap,a),i.texts.forEach(function(e){var t=M.getNode(e.id);if(!t)return o.warnNodeNotFound(i,e.id);t.textContent=e.value}),i.attributes.forEach(function(e){var t=M.getNode(e.id);if(!t)return o.warnNodeNotFound(i,e.id);for(var n in e.attributes)if("string"==typeof n){var r=e.attributes[n];null!==r?t.setAttribute(n,r):t.removeAttribute(n)}});break;case e.IncrementalSource.MouseMove:if(r){var u=i.positions[i.positions.length-1];this.moveAndHover(i,u.x,u.y,u.id)}else i.positions.forEach(function(e){var n={doAction:function(){o.moveAndHover(i,e.x,e.y,e.id)},delay:e.timeOffset+t.timestamp-o.baselineTime};o.timer.addAction(n)});break;case e.IncrementalSource.MouseInteraction:if(-1===i.id)break;var f=new Event(e.MouseInteractions[i.type].toLowerCase());if(!(d=M.getNode(i.id)))return this.debugNodeNotFound(i,i.id);switch(this.emitter.emit(e.ReplayerEvents.MouseInteraction,{type:i.type,target:d}),i.type){case e.MouseInteractions.Blur:d.blur&&d.blur();break;case e.MouseInteractions.Focus:d.focus&&d.focus({preventScroll:!0});break;case e.MouseInteractions.Click:case e.MouseInteractions.TouchStart:case e.MouseInteractions.TouchEnd:r||(this.moveAndHover(i,i.x,i.y,i.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:d.dispatchEvent(f)}break;case e.IncrementalSource.Scroll:if(-1===i.id)break;if(!(d=M.getNode(i.id)))return this.debugNodeNotFound(i,i.id);if(d===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:i.y,left:i.x,behavior:r?"auto":"smooth"});else try{d.scrollTop=i.y,d.scrollLeft=i.x}catch(e){}break;case e.IncrementalSource.ViewportResize:this.emitter.emit(e.ReplayerEvents.Resize,{width:i.width,height:i.height});break;case e.IncrementalSource.Input:if(-1===i.id)break;var d;if(!(d=M.getNode(i.id)))return this.debugNodeNotFound(i,i.id);try{d.checked=i.isChecked,d.value=i.text}catch(e){}}},t.prototype.resolveMissingNode=function(e,t,n,r){var o=r.previousId,i=r.nextId,a=o&&e[o],s=i&&e[i];if(a){var c=a,l=c.node,u=c.mutation;t.insertBefore(l,n),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,l,u)}if(s){var f=s;l=f.node,u=f.mutation;t.insertBefore(l,n.nextSibling),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,l,u)}},t.prototype.moveAndHover=function(e,t,n,r){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px";var o=M.getNode(r);if(!o)return this.debugNodeNotFound(e,r);this.hoverElements(o)},t.prototype.hoverElements=function(e){this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach(function(e){e.classList.remove(":hover")});for(var t=e;t;)t.classList.add(":hover"),t=t.parentElement},t.prototype.isUserInteraction=function(t){return t.type===e.EventType.IncrementalSnapshot&&(t.data.source>e.IncrementalSource.Mutation&&t.data.source<=e.IncrementalSource.Input)},t.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var t={speed:this.noramlSpeed};this.setConfig(t),this.emitter.emit(e.ReplayerEvents.SkipEnd,t),this.noramlSpeed=-1}},t.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn("[replayer]","Node with id '"+t+"' not found in",e)},t.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log("[replayer]","Node with id '"+t+"' not found in",e)},t}(),re=$.addCustomEvent;return e.record=$,e.addCustomEvent=re,e.Replayer=ne,e.mirror=M,e}({});
var rrweb=function(e){"use strict";var t,n=function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function r(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function i(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(t||(t={}));var a=1,s=RegExp("[^a-z]");function c(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+(function(e){return"styleSheet"in e}(n=t)?c(n.styleSheet)||"":n.cssText);var n},""):null}catch(e){return null}}var l=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,u=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,d=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function f(e,t){return(e||"").replace(l,function(e,n,r,o){var i,a=n||r||o;if(!a)return e;if(!u.test(a))return"url('"+a+"')";if(d.test(a))return"url("+a+")";if("/"===a[0])return"url('"+(((i=t).indexOf("//")>-1?i.split("/").slice(0,3).join("/"):i.split("/")[0]).split("?")[0]+a)+"')";var s=t.split("/"),c=a.split("/");s.pop();for(var l=0,f=c;l<f.length;l++){var p=f[l];"."!==p&&(".."===p?s.pop():s.push(p))}return"url('"+s.join("/")+"')"})}function p(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function h(e,t,n){return"src"===t||"href"===t&&n?p(e,n):"srcset"===t&&n?function(e,t){return""===t.trim()?t:t.split(",").map(function(t){var n=t.trimLeft().trimRight().split(" ");return 2===n.length?p(e,n[0])+" "+n[1]:1===n.length?""+p(e,n[0]):""}).join(",")}(e,n):"style"===t&&n?f(n,location.href):n}function m(e,n,r,o,i){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:t.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:t.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:var a=!1;"string"==typeof r?a=e.classList.contains(r):e.classList.forEach(function(e){r.test(e)&&(a=!0)});for(var l=function(e){var t=e.toLowerCase().trim();return s.test(t)?"div":t}(e.tagName),u={},d=0,p=Array.from(e.attributes);d<p.length;d++){var m=p[d],v=m.name,y=m.value;u[v]=h(n,v,y)}if("link"===l&&o){var g,b=Array.from(n.styleSheets).find(function(t){return t.href===e.href});(g=c(b))&&(delete u.rel,delete u.href,u._cssText=f(g,b.href))}if("style"===l&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(g=c(e.sheet))&&(u._cssText=f(g,location.href));if("input"===l||"textarea"===l||"select"===l){y=e.value;"radio"!==u.type&&"checkbox"!==u.type&&y?u.value=i?"*".repeat(y.length):y:e.checked&&(u.checked=e.checked)}if("option"===l){var E=e.parentElement;u.value===E.value&&(u.selected=e.selected)}if("canvas"===l&&(u.rr_dataURL=e.toDataURL()),"audio"!==l&&"video"!==l||(u.rr_mediaState=e.paused?"paused":"played"),a){var S=e.getBoundingClientRect(),w=S.width,I=S.height;u.rr_width=w+"px",u.rr_height=I+"px"}return{type:t.Element,tagName:l,attributes:u,childNodes:[],isSVG:(x=e,"svg"===x.tagName||x instanceof SVGElement||void 0),needBlock:a};case e.TEXT_NODE:var T=e.parentNode&&e.parentNode.tagName,C=e.textContent,N="STYLE"===T||void 0;return N&&C&&(C=f(C,location.href)),"SCRIPT"===T&&(C="SCRIPT_PLACEHOLDER"),{type:t.Text,textContent:C||"",isStyle:N};case e.CDATA_SECTION_NODE:return{type:t.CDATA,textContent:""};case e.COMMENT_NODE:return{type:t.Comment,textContent:e.textContent||""};default:return!1}var x}function v(e,n,r,o,i,s,c){void 0===i&&(i=!1),void 0===s&&(s=!0),void 0===c&&(c=!1);var l,u=m(e,n,o,s,c);if(!u)return console.warn(e,"not serialized"),null;l="__sn"in e?e.__sn.id:a++;var d=Object.assign(u,{id:l});e.__sn=d,r[l]=e;var f=!i;if(d.type===t.Element&&(f=f&&!d.needBlock,delete d.needBlock),(d.type===t.Document||d.type===t.Element)&&f)for(var p=0,h=Array.from(e.childNodes);p<h.length;p++){var y=v(h[p],n,r,o,i,s,c);y&&d.childNodes.push(y)}return d}var y=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g;function g(e,t){void 0===t&&(t={});var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=-1===o?r+e.length:e.length-o}function i(){var e={line:n,column:r};return function(t){return t.position=new a(e),p(),t}}var a=function(){return function(e){this.start=e,this.end={line:n,column:r},this.source=t.source}}();a.prototype.content=e;var s=[];function c(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;s.push(i)}function l(){return f(/^{\s*/)}function u(){return f(/^}/)}function d(){var t,n=[];for(p(),h(n);e.length&&"}"!==e.charAt(0)&&(t=x()||M());)!1!==t&&(n.push(t),h(n));return n}function f(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function p(){f(/^\s*/)}function h(e){var t;for(void 0===e&&(e=[]);t=m();)!1!==t&&e.push(t),t=m();return e}function m(){var t=i();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return c("End of comment missing");var a=e.slice(2,n-2);return r+=2,o(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function v(){var e=f(/^([^{]+)/);if(e)return b(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(e){return e.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(e){return e.replace(/\u200C/g,",")})}function g(){var e=i(),t=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=b(t[0]);if(!f(/^:\s*/))return c("property missing ':'");var r=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:n.replace(y,""),value:r?b(r[0]).replace(y,""):""});return f(/^[;\s]*/),o}}function E(){var e,t=[];if(!l())return c("missing '{'");for(h(t);e=g();)!1!==e&&(t.push(e),h(t)),e=g();return u()?t:c("missing '}'")}function S(){for(var e,t=[],n=i();e=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),f(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:E()})}var w,I=N("import"),T=N("charset"),C=N("namespace");function N(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=i(),r=f(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function x(){if("@"===e[0])return function(){var e=i(),t=f(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=f(/^([-\w]+)\s*/)))return c("@keyframes missing name");var r,o=t[1];if(!l())return c("@keyframes missing '{'");for(var a=h();r=S();)a.push(r),a=a.concat(h());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:a}):c("@keyframes missing '}'")}}()||function(){var e=i(),t=f(/^@media *([^{]+)/);if(t){var n=b(t[1]);if(!l())return c("@media missing '{'");var r=h().concat(d());return u()?e({type:"media",media:n,rules:r}):c("@media missing '}'")}}()||function(){var e=i(),t=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:b(t[1]),media:b(t[2])})}()||function(){var e=i(),t=f(/^@supports *([^{]+)/);if(t){var n=b(t[1]);if(!l())return c("@supports missing '{'");var r=h().concat(d());return u()?e({type:"supports",supports:n,rules:r}):c("@supports missing '}'")}}()||I()||T()||C()||function(){var e=i(),t=f(/^@([-\w]+)?document *([^{]+)/);if(t){var n=b(t[1]),r=b(t[2]);if(!l())return c("@document missing '{'");var o=h().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):c("@document missing '}'")}}()||function(){var e=i();if(f(/^@page */)){var t=v()||[];if(!l())return c("@page missing '{'");for(var n,r=h();n=g();)r.push(n),r=r.concat(h());return u()?e({type:"page",selectors:t,declarations:r}):c("@page missing '}'")}}()||function(){var e=i();if(f(/^@host\s*/)){if(!l())return c("@host missing '{'");var t=h().concat(d());return u()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=i();if(f(/^@font-face\s*/)){if(!l())return c("@font-face missing '{'");for(var t,n=h();t=g();)n.push(t),n=n.concat(h());return u()?e({type:"font-face",declarations:n}):c("@font-face missing '}'")}}()}function M(){var e=i(),t=v();return t?(h(),e({type:"rule",selectors:t,declarations:E()})):c("selector missing")}return function e(t,n){var r=t&&"string"==typeof t.type;var o=r?t:n;for(var i=0,a=Object.keys(t);i<a.length;i++){var s=a[i],c=t[s];Array.isArray(c)?c.forEach(function(t){e(t,o)}):c&&"object"==typeof c&&e(c,o)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((w=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:w,parsingErrors:s}}))}function b(e){return e?e.replace(/^\s+|\s+$/g,""):""}var E={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var S=/([^\\]):hover/g;function w(e){var t=g(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach(function(t){"selectors"in t&&(t.selectors||[]).forEach(function(t){if(S.test(t)){var n=t.replace(S,"$1.\\:hover");e=e.replace(t,t+", "+n)}})}),e):e}function I(e,n,r){switch(e.type){case t.Document:return n.implementation.createDocument(null,"",null);case t.DocumentType:return n.implementation.createDocumentType(e.name,e.publicId,e.systemId);case t.Element:var o,i=function(e){var t=E[e.tagName]?E[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);o=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",i):n.createElement(i);var a=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var a=e.attributes[t];if(a="boolean"==typeof a?"":a,t.startsWith("rr_")){if("canvas"===i&&"rr_dataURL"===t){var s=document.createElement("img");s.src=a,s.onload=function(){var e=o.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(o.style.width=a),"rr_height"===t&&(o.style.height=a),"rr_mediaState"===t)switch(a){case"played":o.play();case"paused":o.pause()}}else{var c="textarea"===i&&"value"===t,l="style"===i&&"_cssText"===t;if(l&&r&&(a=w(a)),c||l){for(var u=n.createTextNode(a),d=0,f=Array.from(o.childNodes);d<f.length;d++){var p=f[d];p.nodeType===o.TEXT_NODE&&o.removeChild(p)}return o.appendChild(u),"continue"}if("iframe"===i&&"src"===t)return"continue";try{e.isSVG&&"xlink:href"===t?o.setAttributeNS("http://www.w3.org/1999/xlink",t,a):o.setAttribute(t,a)}catch(e){}}};for(var s in e.attributes)a(s);return o;case t.Text:return n.createTextNode(e.isStyle&&r?w(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function T(e,n,r,o,i){void 0===o&&(o=!1),void 0===i&&(i=!0);var a=I(e,n,i);if(!a)return null;if(e.type===t.Document&&(n.close(),n.open(),a=n),a.__sn=e,r[e.id]=a,(e.type===t.Document||e.type===t.Element)&&!o)for(var s=0,c=e.childNodes;s<c.length;s++){var l=c[s],u=T(l,n,r,!1,i);u?a.appendChild(u):console.warn("Failed to rebuild",l)}return a}function C(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var N,x,M,k,R,D={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return D.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete D.map[t],e.childNodes&&e.childNodes.forEach(function(e){return D.removeNodeFromMap(e)})},has:function(e){return D.map.hasOwnProperty(e)}};function A(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(i){var a=Date.now();o||!1!==n.leading||(o=a);var s=t-(a-o),c=this,l=arguments;s<=0||s>t?(r&&(window.clearTimeout(r),r=null),o=a,e.apply(c,l)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(c,l)},s))}}function L(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function O(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function _(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var n=!1;return"string"==typeof t?n=e.classList.contains(t):e.classList.forEach(function(e){t.test(e)&&(n=!0)}),n||_(e.parentNode,t)}return _(e.parentNode,t)}function F(e){return Boolean(e.changedTouches)}function P(){"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)}function j(e,t){e.delete(t),t.childNodes.forEach(function(t){return j(e,t)})}function z(e,t){var n=t.parentNode;if(!n)return!1;var r=D.getId(n);return!!e.some(function(e){return e.id===r})||z(e,n)}function B(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||B(e,n))}(N=e.EventType||(e.EventType={}))[N.DomContentLoaded=0]="DomContentLoaded",N[N.Load=1]="Load",N[N.FullSnapshot=2]="FullSnapshot",N[N.IncrementalSnapshot=3]="IncrementalSnapshot",N[N.Meta=4]="Meta",N[N.Custom=5]="Custom",(x=e.IncrementalSource||(e.IncrementalSource={}))[x.Mutation=0]="Mutation",x[x.MouseMove=1]="MouseMove",x[x.MouseInteraction=2]="MouseInteraction",x[x.Scroll=3]="Scroll",x[x.ViewportResize=4]="ViewportResize",x[x.Input=5]="Input",x[x.TouchMove=6]="TouchMove",x[x.MediaInteraction=7]="MediaInteraction",x[x.StyleSheetRule=8]="StyleSheetRule",(M=e.MouseInteractions||(e.MouseInteractions={}))[M.MouseUp=0]="MouseUp",M[M.MouseDown=1]="MouseDown",M[M.Click=2]="Click",M[M.ContextMenu=3]="ContextMenu",M[M.DblClick=4]="DblClick",M[M.Focus=5]="Focus",M[M.Blur=6]="Blur",M[M.TouchStart=7]="TouchStart",M[M.TouchMove_Departed=8]="TouchMove_Departed",M[M.TouchEnd=9]="TouchEnd",function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(k||(k={})),(R=e.ReplayerEvents||(e.ReplayerEvents={})).Start="start",R.Pause="pause",R.Resume="resume",R.Resize="resize",R.Finish="finish",R.FullsnapshotRebuilded="fullsnapshot-rebuilded",R.LoadStylesheetStart="load-stylesheet-start",R.LoadStylesheetEnd="load-stylesheet-end",R.SkipStart="skip-start",R.SkipEnd="skip-end",R.MouseInteraction="mouse-interaction",R.EventCast="event-cast";var X=function(e,t){return e+"@"+t};function H(e){return"__sn"in e}function U(e,t,n,o){var i=new MutationObserver(function(i){var a,s,c,l,u=[],d=[],f=[],p=[],m=new Set,y=new Set,g=new Set,b={},E=function(e,n){if(!_(e,t)){if(H(e)){y.add(e);var r=null;n&&H(n)&&(r=n.__sn.id),r&&(b[X(e.__sn.id,r)]=!0)}else m.add(e),g.delete(e);e.childNodes.forEach(function(e){return E(e)})}};i.forEach(function(e){var n=e.type,r=e.target,o=e.oldValue,i=e.addedNodes,a=e.removedNodes,s=e.attributeName;switch(n){case"characterData":var c=r.textContent;_(r,t)||c===o||u.push({value:c,node:r});break;case"attributes":c=r.getAttribute(s);if(_(r,t)||c===o)return;var l=d.find(function(e){return e.node===r});l||(l={node:r,attributes:{}},d.push(l)),l.attributes[s]=h(document,s,c);break;case"childList":i.forEach(function(e){return E(e,r)}),a.forEach(function(e){var n=D.getId(e),o=D.getId(r);_(e,t)||(m.has(e)?(j(m,e),g.add(e)):m.has(r)&&-1===n||function e(t){var n=D.getId(t);return!D.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode))}(r)||(y.has(e)&&b[X(n,o)]?j(y,e):f.push({parentId:o,id:n})),D.removeNodeFromMap(e))})}});var S=[],w=function(e){var r=D.getId(e.parentNode);if(-1===r)return S.push(e);p.push({parentId:r,previousId:e.previousSibling?D.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?D.getId(e.nextSibling):e.nextSibling,node:v(e,document,D.map,t,!0,n,o)})};try{for(var I=r(y),T=I.next();!T.done;T=I.next()){w(x=T.value)}}catch(e){a={error:e}}finally{try{T&&!T.done&&(s=I.return)&&s.call(I)}finally{if(a)throw a.error}}try{for(var C=r(m),N=C.next();!N.done;N=C.next()){var x=N.value;B(g,x)||z(f,x)?B(y,x)?w(x):g.add(x):w(x)}}catch(e){c={error:e}}finally{try{N&&!N.done&&(l=C.return)&&l.call(C)}finally{if(c)throw c.error}}for(;S.length&&!S.every(function(e){return-1===D.getId(e.parentNode)});)w(S.shift());var M={texts:u.map(function(e){return{id:D.getId(e.node),value:e.value}}).filter(function(e){return D.has(e.id)}),attributes:d.map(function(e){return{id:D.getId(e.node),attributes:e.attributes}}).filter(function(e){return D.has(e.id)}),removes:f,adds:p};(M.texts.length||M.attributes.length||M.removes.length||M.adds.length)&&e(M)});return i.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Y(t,n){var r=[];return Object.keys(e.MouseInteractions).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(o){var i=o.toLowerCase(),a=function(r){return function(o){if(!_(o.target,n)){var i=D.getId(o.target),a=F(o)?o.changedTouches[0]:o,s=a.clientX,c=a.clientY;t({type:e.MouseInteractions[r],id:i,x:s,y:c})}}}(o);r.push(C(i,a))}),function(){r.forEach(function(e){return e()})}}var V,W=["INPUT","TEXTAREA","SELECT"],G=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],q=new WeakMap;function $(e,t,r,o){function a(e){var n=e.target;if(n&&n.tagName&&!(W.indexOf(n.tagName)<0)&&!_(n,t)){var i=n.type;if("password"!==i&&!n.classList.contains(r)){var a=n.value,c=!1,l=G.includes(i)||"TEXTAREA"===n.tagName;"radio"===i||"checkbox"===i?c=n.checked:l&&o&&(a="*".repeat(a.length)),s(n,{text:a,isChecked:c});var u=n.name;"radio"===i&&u&&c&&document.querySelectorAll('input[type="radio"][name="'+u+'"]').forEach(function(e){e!==n&&s(e,{text:e.value,isChecked:!c})})}}}function s(t,r){var o=q.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){q.set(t,r);var i=D.getId(t);e(n({},r,{id:i}))}}var c=["input","change"].map(function(e){return C(e,a)}),l=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),u=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return l&&l.set&&c.push.apply(c,i(u.map(function(e){return function e(t,n,r,o){var i=Object.getOwnPropertyDescriptor(t,n);return Object.defineProperty(t,n,o?r:{set:function(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),i&&i.set&&i.set.call(this,e)}}),function(){return e(t,n,i||{},!0)}}(e[0],e[1],{set:function(){a({target:this})}})}))),function(){c.forEach(function(e){return e()})}}function Z(t,n){void 0===n&&(n={}),function(e,t){var n=e.mutationCb,r=e.mousemoveCb,o=e.mouseInteractionCb,a=e.scrollCb,s=e.viewportResizeCb,c=e.inputCb,l=e.mediaInteractionCb,u=e.styleSheetRuleCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,i(e)),n.apply(void 0,i(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,i(e)),r.apply(void 0,i(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,i(e)),o.apply(void 0,i(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,i(e)),a.apply(void 0,i(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,i(e)),s.apply(void 0,i(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,i(e)),c.apply(void 0,i(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,i(e)),l.apply(void 0,i(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,i(e)),u.apply(void 0,i(e))}}(t,n);var r,o,a,s,c,l,u,d=U(t.mutationCb,t.blockClass,t.inlineStylesheet,t.maskAllInputs),f=(r=t.mousemoveCb,o=t.mousemoveWait,s=[],c=A(function(t){var n=Date.now()-a;r(s.map(function(e){return e.timeOffset-=n,e}),t?e.IncrementalSource.TouchMove:e.IncrementalSource.MouseMove),s=[],a=null},500),l=A(function(e){var t=e.target,n=F(e)?e.changedTouches[0]:e,r=n.clientX,o=n.clientY;a||(a=Date.now()),s.push({x:r,y:o,id:D.getId(t),timeOffset:Date.now()-a}),c(F(e))},o,{trailing:!1}),u=[C("mousemove",l),C("touchmove",l)],function(){u.forEach(function(e){return e()})}),p=Y(t.mouseInteractionCb,t.blockClass),h=function(e,t){return C("scroll",A(function(n){if(n.target&&!_(n.target,t)){var r=D.getId(n.target);if(n.target===document){var o=document.scrollingElement||document.documentElement;e({id:r,x:o.scrollLeft,y:o.scrollTop})}else e({id:r,x:n.target.scrollLeft,y:n.target.scrollTop})}},100))}(t.scrollCb,t.blockClass),m=function(e){return C("resize",A(function(){var t=L(),n=O();e({width:Number(n),height:Number(t)})},200),window)}(t.viewportResizeCb),v=$(t.inputCb,t.blockClass,t.ignoreClass,t.maskAllInputs),y=function(e,t){var n=function(n){return function(r){var o=r.target;o&&!_(o,t)&&e({type:"play"===n?k.Play:k.Pause,id:D.getId(o)})}},r=[C("play",n("play")),C("pause",n("pause"))];return function(){r.forEach(function(e){return e()})}}(t.mediaInteractionCb,t.blockClass),g=function(e){var t=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(n,r){return e({id:D.getId(this.ownerNode),adds:[{rule:n,index:r}]}),t.apply(this,arguments)};var n=CSSStyleSheet.prototype.deleteRule;return CSSStyleSheet.prototype.deleteRule=function(t){return e({id:D.getId(this.ownerNode),removes:[{index:t}]}),n.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=t,CSSStyleSheet.prototype.deleteRule=n}}(t.styleSheetRuleCb);return function(){d.disconnect(),f(),p(),h(),m(),v(),y(),g()}}function J(e){return n({},e,{timestamp:Date.now()})}function K(t){void 0===t&&(t={});var r,i=t.emit,a=t.checkoutEveryNms,s=t.checkoutEveryNth,c=t.blockClass,l=void 0===c?"rr-block":c,u=t.ignoreClass,d=void 0===u?"rr-ignore":u,f=t.inlineStylesheet,p=void 0===f||f,h=t.maskAllInputs,m=void 0!==h&&h,y=t.hooks,g=t.mousemoveWait,b=void 0===g?50:g;if(!i)throw new Error("emit function is required");P();var E=0;function S(t){void 0===t&&(t=!1),V(J({type:e.EventType.Meta,data:{href:window.location.href,width:O(),height:L()}}),t);var n=o(function(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[v(e,e,o,t,!1,n,r),o]}(document,l,p,m),2),r=n[0],i=n[1];if(!r)return console.warn("Failed to snapshot the document");D.map=i,V(J({type:e.EventType.FullSnapshot,data:{node:r,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}V=function(t,n){if(i(t,n),t.type===e.EventType.FullSnapshot)r=t,E=0;else if(t.type===e.EventType.IncrementalSnapshot){E++;var o=s&&E>=s,c=a&&t.timestamp-r.timestamp>a;(o||c)&&S(!0)}};try{var w=[];w.push(C("DOMContentLoaded",function(){V(J({type:e.EventType.DomContentLoaded,data:{}}))}));var I=function(){S(),w.push(Z({mutationCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Mutation},t)}))},mousemoveCb:function(t,n){return V(J({type:e.EventType.IncrementalSnapshot,data:{source:n,positions:t}}))},mouseInteractionCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.MouseInteraction},t)}))},scrollCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Scroll},t)}))},viewportResizeCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.ViewportResize},t)}))},inputCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Input},t)}))},mediaInteractionCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.MediaInteraction},t)}))},styleSheetRuleCb:function(t){return V(J({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.StyleSheetRule},t)}))},blockClass:l,ignoreClass:d,maskAllInputs:m,inlineStylesheet:p,mousemoveWait:b},y))};return"interactive"===document.readyState||"complete"===document.readyState?I():w.push(C("load",function(){V(J({type:e.EventType.Load,data:{}})),I()},window)),function(){w.forEach(function(e){return e()})}}catch(e){console.warn(e)}}function Q(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map(function(e){e(n)}),(e["*"]||[]).slice().map(function(e){e(t,n)})}}}K.addCustomEvent=function(t,n){if(!V)throw new Error("please add custom event after start recording");V(J({type:e.EventType.Custom,data:{tag:t,payload:n}}))};var ee=Object.freeze({default:Q});var te,ne=(function(e,t){!function(){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)){var n,r=e.HTMLElement||e.Element,o=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||c,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):i.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?i.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=function(e){for(;e!==t.body&&!1===f(e);)e=e.parentNode||e.host;return e}(this),r=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(h.call(this,n,n.scrollLeft+o.left-r.left,n.scrollTop+o.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function c(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function f(e){var t=u(e,"Y")&&d(e,"Y"),n=u(e,"X")&&d(e,"X");return t||n}function p(t){var n,r,i,s,c=(a()-t.startTime)/o;s=c=c>1?1:c,n=.5*(1-Math.cos(Math.PI*s)),r=t.startX+(t.x-t.startX)*n,i=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,i),r===t.x&&i===t.y||e.requestAnimationFrame(p.bind(e,t))}function h(n,r,o){var s,l,u,d,f=a();n===t.body?(s=e,l=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(s=n,l=n.scrollLeft,u=n.scrollTop,d=c),p({scrollable:s,method:d,startTime:f,startX:l,startY:u,x:r,y:o})}}}}()}(te={exports:{}},te.exports),te.exports).polyfill,re=function(){function e(e,t){void 0===t&&(t=[]),this.timeOffset=0,this.actions=t,this.config=e}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){var t;(t=this.actions).push.apply(t,i(e))},e.prototype.start=function(){this.actions.sort(function(e,t){return e.delay-t.delay}),this.timeOffset=0;var e=performance.now(),t=this.actions,n=this.config,r=this;this.raf=requestAnimationFrame(function o(i){for(r.timeOffset+=(i-e)*n.speed,e=i;t.length;){var a=t[0];if(!(r.timeOffset>=a.delay))break;t.shift(),a.doAction()}(t.length>0||r.config.liveMode)&&(r.raf=requestAnimationFrame(o))})},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},e.prototype.findActionIndex=function(e){for(var t=0,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r;n=r-1}}return t},e}(),oe=Q||ee,ie=function(){function t(e,t){if(this.events=[],this.emitter=oe(),this.baselineTime=0,this.noramlSpeed=-1,this.missingNodeRetryMap={},e.length<2)throw new Error("Replayer need at least 2 events.");this.events=e,this.handleResize=this.handleResize.bind(this);var n={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[]};this.config=Object.assign({},n,t),this.timer=new re(this.config),ne(),P(),this.setupDom(),this.emitter.on("resize",this.handleResize)}return t.prototype.on=function(e,t){this.emitter.on(e,t)},t.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach(function(n){t.config[n]=e[n]}),this.config.skipInactive||(this.noramlSpeed=-1)},t.prototype.getMetaData=function(){var e=this.events[0];return{totalTime:this.events[this.events.length-1].timestamp-e.timestamp}},t.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},t.prototype.getTimeOffset=function(){return this.baselineTime-this.events[0].timestamp},t.prototype.play=function(t){var n,o,i=this;void 0===t&&(t=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+t;var a=new Array,s=function(t){var n=t.timestamp<c.baselineTime,r=c.getCastFn(t,n);n?r():a.push({doAction:function(){r(),i.emitter.emit(e.ReplayerEvents.EventCast,t)},delay:c.getDelay(t)})},c=this;try{for(var l=r(this.events),u=l.next();!u.done;u=l.next()){s(u.value)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}this.timer.addActions(a),this.timer.start(),this.emitter.emit(e.ReplayerEvents.Start)},t.prototype.pause=function(){this.timer.clear(),this.emitter.emit(e.ReplayerEvents.Pause)},t.prototype.resume=function(t){var n,o;void 0===t&&(t=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+t;var i=new Array;try{for(var a=r(this.events),s=a.next();!s.done;s=a.next()){var c=s.value;if(!(c.timestamp<=this.lastPlayedEvent.timestamp||c===this.lastPlayedEvent)){var l=this.getCastFn(c);i.push({doAction:l,delay:this.getDelay(c)})}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}this.timer.addActions(i),this.timer.start(),this.emitter.emit(e.ReplayerEvents.Resume)},t.prototype.addEvent=function(e){this.getCastFn(e,!0)()},t.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.iframe.setAttribute("scrolling","no"),this.iframe.setAttribute("style","pointer-events: none"),this.wrapper.appendChild(this.iframe)},t.prototype.handleResize=function(e){this.iframe.width=e.width+"px",this.iframe.height=e.height+"px"},t.prototype.getDelay=function(t){if(t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.MouseMove){var n=t.data.positions[0].timeOffset,r=t.timestamp+n;return t.delay=r-this.baselineTime,r-this.baselineTime}return t.delay=t.timestamp-this.baselineTime,t.timestamp-this.baselineTime},t.prototype.getCastFn=function(t,n){var o,i=this;switch(void 0===n&&(n=!1),t.type){case e.EventType.DomContentLoaded:case e.EventType.Load:break;case e.EventType.Meta:o=function(){return i.emitter.emit(e.ReplayerEvents.Resize,{width:t.data.width,height:t.data.height})};break;case e.EventType.FullSnapshot:o=function(){i.rebuildFullSnapshot(t),i.iframe.contentWindow.scrollTo(t.data.initialOffset)};break;case e.EventType.IncrementalSnapshot:o=function(){var o,a;if(i.applyIncremental(t,n),t===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.restoreSpeed()),i.config.skipInactive&&!i.nextUserInteractionEvent){try{for(var s=r(i.events),c=s.next();!c.done;c=s.next()){var l=c.value;if(!(l.timestamp<=t.timestamp)&&i.isUserInteraction(l)){l.delay-t.delay>1e4*i.config.speed&&(i.nextUserInteractionEvent=l);break}}}catch(e){o={error:e}}finally{try{c&&!c.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}if(i.nextUserInteractionEvent){i.noramlSpeed=i.config.speed;var u=i.nextUserInteractionEvent.delay-t.delay,d={speed:Math.min(Math.round(u/5e3),360)};i.setConfig(d),i.emitter.emit(e.ReplayerEvents.SkipStart,d)}}}}return function(){o&&o(),i.lastPlayedEvent=t,t===i.events[i.events.length-1]&&(i.restoreSpeed(),i.emitter.emit(e.ReplayerEvents.Finish))}},t.prototype.rebuildFullSnapshot=function(t){Object.keys(this.missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.missingNodeRetryMap),this.missingNodeRetryMap={},D.map=function(e,t,n){void 0===n&&(n=!0);var r={};return[T(e,t,r,!1,n),r]}(t.data.node,this.iframe.contentDocument)[1];var n=document.createElement("style"),r=this.iframe.contentDocument,o=r.documentElement,i=r.head;o.insertBefore(n,i);for(var a,s=(a=this.config.blockClass,["iframe, ."+a+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules),c=0;c<s.length;c++)n.sheet.insertRule(s[c],c);this.emitter.emit(e.ReplayerEvents.FullsnapshotRebuilded),this.waitForStylesheetLoad()},t.prototype.waitForStylesheetLoad=function(){var t=this,n=this.iframe.contentDocument.head;if(n){var r,o=new Set;n.querySelectorAll('link[rel="stylesheet"]').forEach(function(n){n.sheet||(0===o.size&&(t.pause(),t.emitter.emit(e.ReplayerEvents.LoadStylesheetStart),r=window.setTimeout(function(){t.resume(t.getCurrentTime()),r=-1},t.config.loadTimeout)),o.add(n),n.addEventListener("load",function(){o.delete(n),0===o.size&&-1!==r&&(t.resume(t.getCurrentTime()),t.emitter.emit(e.ReplayerEvents.LoadStylesheetEnd),r&&window.clearTimeout(r))}))})}},t.prototype.applyIncremental=function(t,r){var o=this,i=t.data;switch(i.source){case e.IncrementalSource.Mutation:i.removes.forEach(function(e){var t=D.getNode(e.id);if(!t)return o.warnNodeNotFound(i,e.id);var n=D.getNode(e.parentId);if(!n)return o.warnNodeNotFound(i,e.parentId);D.removeNodeFromMap(t),n&&n.removeChild(t)});var a=n({},this.missingNodeRetryMap),s=[],c=function(e){var t=D.getNode(e.parentId);if(!t)return s.push(e);var n=T(e.node,o.iframe.contentDocument,D.map,!0),r=null,i=null;e.previousId&&(r=D.getNode(e.previousId)),e.nextId&&(i=D.getNode(e.nextId)),-1!==e.previousId&&-1!==e.nextId?(r&&r.nextSibling&&r.nextSibling.parentNode?t.insertBefore(n,r.nextSibling):i&&i.parentNode?t.insertBefore(n,i):t.appendChild(n),(e.previousId||e.nextId)&&o.resolveMissingNode(a,t,n,e)):a[e.node.id]={node:n,mutation:e}};for(i.adds.forEach(function(e){c(e)});s.length;){if(s.every(function(e){return!Boolean(D.getNode(e.parentId))}))return s.forEach(function(e){return o.warnNodeNotFound(i,e.node.id)});var l=s.shift();c(l)}Object.keys(a).length&&Object.assign(this.missingNodeRetryMap,a),i.texts.forEach(function(e){var t=D.getNode(e.id);if(!t)return o.warnNodeNotFound(i,e.id);t.textContent=e.value}),i.attributes.forEach(function(e){var t=D.getNode(e.id);if(!t)return o.warnNodeNotFound(i,e.id);for(var n in e.attributes)if("string"==typeof n){var r=e.attributes[n];null!==r?t.setAttribute(n,r):t.removeAttribute(n)}});break;case e.IncrementalSource.MouseMove:if(r){var u=i.positions[i.positions.length-1];this.moveAndHover(i,u.x,u.y,u.id)}else i.positions.forEach(function(e){var n={doAction:function(){o.moveAndHover(i,e.x,e.y,e.id)},delay:e.timeOffset+t.timestamp-o.baselineTime};o.timer.addAction(n)});break;case e.IncrementalSource.MouseInteraction:if(-1===i.id)break;var d=new Event(e.MouseInteractions[i.type].toLowerCase());if(!(p=D.getNode(i.id)))return this.debugNodeNotFound(i,i.id);switch(this.emitter.emit(e.ReplayerEvents.MouseInteraction,{type:i.type,target:p}),i.type){case e.MouseInteractions.Blur:p.blur&&p.blur();break;case e.MouseInteractions.Focus:p.focus&&p.focus({preventScroll:!0});break;case e.MouseInteractions.Click:case e.MouseInteractions.TouchStart:case e.MouseInteractions.TouchEnd:r||(this.moveAndHover(i,i.x,i.y,i.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:p.dispatchEvent(d)}break;case e.IncrementalSource.Scroll:if(-1===i.id)break;if(!(p=D.getNode(i.id)))return this.debugNodeNotFound(i,i.id);if(p===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:i.y,left:i.x,behavior:r?"auto":"smooth"});else try{p.scrollTop=i.y,p.scrollLeft=i.x}catch(e){}break;case e.IncrementalSource.ViewportResize:this.emitter.emit(e.ReplayerEvents.Resize,{width:i.width,height:i.height});break;case e.IncrementalSource.Input:if(-1===i.id)break;if(!(p=D.getNode(i.id)))return this.debugNodeNotFound(i,i.id);try{p.checked=i.isChecked,p.value=i.text}catch(e){}break;case e.IncrementalSource.MediaInteraction:if(!(p=D.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var f=p;i.type===k.Pause&&f.pause(),i.type===k.Play&&(f.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?f.play():f.addEventListener("canplay",function(){f.play()}));break;case e.IncrementalSource.StyleSheetRule:var p;if(!(p=D.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var h=p.sheet;i.adds&&i.adds.forEach(function(e){var t=e.rule,n=e.index;h.insertRule(t,n)}),i.removes&&i.removes.forEach(function(e){var t=e.index;h.deleteRule(t)})}},t.prototype.resolveMissingNode=function(e,t,n,r){var o=r.previousId,i=r.nextId,a=o&&e[o],s=i&&e[i];if(a){var c=a,l=c.node,u=c.mutation;t.insertBefore(l,n),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,l,u)}if(s){var d=s;l=d.node,u=d.mutation;t.insertBefore(l,n.nextSibling),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,l,u)}},t.prototype.moveAndHover=function(e,t,n,r){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px";var o=D.getNode(r);if(!o)return this.debugNodeNotFound(e,r);this.hoverElements(o)},t.prototype.hoverElements=function(e){this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach(function(e){e.classList.remove(":hover")});for(var t=e;t;)t.classList.add(":hover"),t=t.parentElement},t.prototype.isUserInteraction=function(t){return t.type===e.EventType.IncrementalSnapshot&&(t.data.source>e.IncrementalSource.Mutation&&t.data.source<=e.IncrementalSource.Input)},t.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var t={speed:this.noramlSpeed};this.setConfig(t),this.emitter.emit(e.ReplayerEvents.SkipEnd,t),this.noramlSpeed=-1}},t.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn("[replayer]","Node with id '"+t+"' not found in",e)},t.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log("[replayer]","Node with id '"+t+"' not found in",e)},t}(),ae=K.addCustomEvent;return e.record=K,e.addCustomEvent=ae,e.Replayer=ie,e.mirror=D,e}({});
//# sourceMappingURL=rrweb.min.js.map

@@ -72,5 +72,13 @@ /*! *****************************************************************************

var _id = 1;
var symbolAndNumberRegex = RegExp('[^a-z]');
function genId() {
return _id++;
}
function getValidTagName(tagName) {
var processedTagName = tagName.toLowerCase().trim();
if (symbolAndNumberRegex.test(processedTagName)) {
return 'div';
}
return processedTagName;
}
function getCssRulesString(s) {

@@ -113,3 +121,3 @@ try {

function absoluteToStylesheet(cssText, href) {
return cssText.replace(URL_IN_CSS_REF, function (origin, path1, path2, path3) {
return (cssText || '').replace(URL_IN_CSS_REF, function (origin, path1, path2, path3) {
var filePath = path1 || path2 || path3;

@@ -169,3 +177,3 @@ if (!filePath) {

function absoluteToDoc(doc, attributeValue) {
if (attributeValue.trim() === '') {
if (!attributeValue || attributeValue.trim() === '') {
return attributeValue;

@@ -181,9 +189,9 @@ }

function transformAttribute(doc, name, value) {
if (name === 'src' || name === 'href') {
if (name === 'src' || (name === 'href' && value)) {
return absoluteToDoc(doc, value);
}
else if (name === 'srcset') {
else if (name === 'srcset' && value) {
return getAbsoluteSrcsetString(doc, value);
}
else if (name === 'style') {
else if (name === 'style' && value) {
return absoluteToStylesheet(value, location.href);

@@ -221,3 +229,3 @@ }

}
var tagName = n.tagName.toLowerCase();
var tagName = getValidTagName(n.tagName);
var attributes_1 = {};

@@ -244,4 +252,3 @@ for (var _i = 0, _a = Array.from(n.attributes); _i < _a.length; _i++) {

'').trim().length) {
var cssText = getCssRulesString(n
.sheet);
var cssText = getCssRulesString(n.sheet);
if (cssText) {

@@ -273,2 +280,7 @@ attributes_1._cssText = absoluteToStylesheet(cssText, location.href);

}
if (tagName === 'audio' || tagName === 'video') {
attributes_1.rr_mediaState = n.paused
? 'paused'
: 'played';
}
if (needBlock_1) {

@@ -512,2 +524,4 @@ var _c = n.getBoundingClientRect(), width = _c.width, height = _c.height;

IncrementalSource[IncrementalSource["TouchMove"] = 6] = "TouchMove";
IncrementalSource[IncrementalSource["MediaInteraction"] = 7] = "MediaInteraction";
IncrementalSource[IncrementalSource["StyleSheetRule"] = 8] = "StyleSheetRule";
})(IncrementalSource || (IncrementalSource = {}));

@@ -527,2 +541,7 @@ var MouseInteractions;

})(MouseInteractions || (MouseInteractions = {}));
var MediaInteractions;
(function (MediaInteractions) {
MediaInteractions[MediaInteractions["Play"] = 0] = "Play";
MediaInteractions[MediaInteractions["Pause"] = 1] = "Pause";
})(MediaInteractions || (MediaInteractions = {}));
var ReplayerEvents;

@@ -541,2 +560,3 @@ (function (ReplayerEvents) {

ReplayerEvents["MouseInteraction"] = "mouse-interaction";
ReplayerEvents["EventCast"] = "event-cast";
})(ReplayerEvents || (ReplayerEvents = {}));

@@ -948,4 +968,42 @@

}
function initStyleSheetObserver(cb) {
var insertRule = CSSStyleSheet.prototype.insertRule;
CSSStyleSheet.prototype.insertRule = function (rule, index) {
cb({
id: mirror.getId(this.ownerNode),
adds: [{ rule: rule, index: index }]
});
return insertRule.apply(this, arguments);
};
var deleteRule = CSSStyleSheet.prototype.deleteRule;
CSSStyleSheet.prototype.deleteRule = function (index) {
cb({
id: mirror.getId(this.ownerNode),
removes: [{ index: index }]
});
return deleteRule.apply(this, arguments);
};
return function () {
CSSStyleSheet.prototype.insertRule = insertRule;
CSSStyleSheet.prototype.deleteRule = deleteRule;
};
}
function initMediaInteractionObserver(mediaInteractionCb, blockClass) {
var handler = function (type) { return function (event) {
var target = event.target;
if (!target || isBlocked(target, blockClass)) {
return;
}
mediaInteractionCb({
type: type === 'play' ? MediaInteractions.Play : MediaInteractions.Pause,
id: mirror.getId(target)
});
}; };
var handlers = [on('play', handler('play')), on('pause', handler('pause'))];
return function () {
handlers.forEach(function (h) { return h(); });
};
}
function mergeHooks(o, hooks) {
var mutationCb = o.mutationCb, mousemoveCb = o.mousemoveCb, mouseInteractionCb = o.mouseInteractionCb, scrollCb = o.scrollCb, viewportResizeCb = o.viewportResizeCb, inputCb = o.inputCb;
var mutationCb = o.mutationCb, mousemoveCb = o.mousemoveCb, mouseInteractionCb = o.mouseInteractionCb, scrollCb = o.scrollCb, viewportResizeCb = o.viewportResizeCb, inputCb = o.inputCb, mediaInteractionCb = o.mediaInteractionCb, styleSheetRuleCb = o.styleSheetRuleCb;
o.mutationCb = function () {

@@ -1011,2 +1069,22 @@ var p = [];

};
o.mediaInteractionCb = function () {
var p = [];
for (var _i = 0; _i < arguments.length; _i++) {
p[_i] = arguments[_i];
}
if (hooks.mediaInteaction) {
hooks.mediaInteaction.apply(hooks, __spread(p));
}
mediaInteractionCb.apply(void 0, __spread(p));
};
o.styleSheetRuleCb = function () {
var p = [];
for (var _i = 0; _i < arguments.length; _i++) {
p[_i] = arguments[_i];
}
if (hooks.styleSheetRule) {
hooks.styleSheetRule.apply(hooks, __spread(p));
}
styleSheetRuleCb.apply(void 0, __spread(p));
};
}

@@ -1022,2 +1100,4 @@ function initObservers(o, hooks) {

var inputHandler = initInputObserver(o.inputCb, o.blockClass, o.ignoreClass, o.maskAllInputs);
var mediaInteractionHandler = initMediaInteractionObserver(o.mediaInteractionCb, o.blockClass);
var styleSheetObserver = initStyleSheetObserver(o.styleSheetRuleCb);
return function () {

@@ -1030,2 +1110,4 @@ mutationObserver.disconnect();

inputHandler();
mediaInteractionHandler();
styleSheetObserver();
};

@@ -1139,2 +1221,14 @@ }

},
mediaInteractionCb: function (p) {
return wrappedEmit(wrapEvent({
type: EventType.IncrementalSnapshot,
data: __assign({ source: IncrementalSource.MediaInteraction }, p)
}));
},
styleSheetRuleCb: function (r) {
return wrappedEmit(wrapEvent({
type: EventType.IncrementalSnapshot,
data: __assign({ source: IncrementalSource.StyleSheetRule }, r)
}));
},
blockClass: blockClass,

@@ -1141,0 +1235,0 @@ ignoreClass: ignoreClass,

@@ -1,2 +0,2 @@

var NodeType,__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function __values(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function __read(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(NodeType||(NodeType={}));var _id=1;function genId(){return _id++}function getCssRulesString(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+getCssRuleString(t)},""):null}catch(e){return null}}function getCssRuleString(e){return isCSSImportRule(e)?getCssRulesString(e.styleSheet)||"":e.cssText}function isCSSImportRule(e){return"styleSheet"in e}function extractOrigin(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}var URL_IN_CSS_REF=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,RELATIVE_PATH=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,DATA_URI=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function absoluteToStylesheet(e,t){return e.replace(URL_IN_CSS_REF,function(e,n,r,o){var i=n||r||o;if(!i)return e;if(!RELATIVE_PATH.test(i))return"url('"+i+"')";if(DATA_URI.test(i))return"url("+i+")";if("/"===i[0])return"url('"+(extractOrigin(t)+i)+"')";var a=t.split("/"),s=i.split("/");a.pop();for(var u=0,c=s;u<c.length;u++){var l=c[u];"."!==l&&(".."===l?a.pop():a.push(l))}return"url('"+a.join("/")+"')"})}function getAbsoluteSrcsetString(e,t){return""===t.trim()?t:t.split(",").map(function(t){var n=t.trimLeft().trimRight().split(" ");return 2===n.length?absoluteToDoc(e,n[0])+" "+n[1]:1===n.length?""+absoluteToDoc(e,n[0]):""}).join(",")}function absoluteToDoc(e,t){if(""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function isSVGElement(e){return"svg"===e.tagName||e instanceof SVGElement}function transformAttribute(e,t,n){return"src"===t||"href"===t?absoluteToDoc(e,n):"srcset"===t?getAbsoluteSrcsetString(e,n):"style"===t?absoluteToStylesheet(n,location.href):n}function serializeNode(e,t,n,r,o){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:NodeType.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:var i=!1;"string"==typeof n?i=e.classList.contains(n):e.classList.forEach(function(e){n.test(e)&&(i=!0)});for(var a=e.tagName.toLowerCase(),s={},u=0,c=Array.from(e.attributes);u<c.length;u++){var l=c[u],d=l.name,p=l.value;s[d]=transformAttribute(t,d,p)}if("link"===a&&r){var m,f=Array.from(t.styleSheets).find(function(t){return t.href===e.href});(m=getCssRulesString(f))&&(delete s.rel,delete s.href,s._cssText=absoluteToStylesheet(m,f.href))}if("style"===a&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(m=getCssRulesString(e.sheet))&&(s._cssText=absoluteToStylesheet(m,location.href));if("input"===a||"textarea"===a||"select"===a){p=e.value;"radio"!==s.type&&"checkbox"!==s.type&&p?s.value=o?"*".repeat(p.length):p:e.checked&&(s.checked=e.checked)}if("option"===a){var v=e.parentElement;s.value===v.value&&(s.selected=e.selected)}if("canvas"===a&&(s.rr_dataURL=e.toDataURL()),i){var h=e.getBoundingClientRect(),y=h.width,g=h.height;s.rr_width=y+"px",s.rr_height=g+"px"}return{type:NodeType.Element,tagName:a,attributes:s,childNodes:[],isSVG:isSVGElement(e)||void 0,needBlock:i};case e.TEXT_NODE:var E=e.parentNode&&e.parentNode.tagName,b=e.textContent,T="STYLE"===E||void 0;return T&&b&&(b=absoluteToStylesheet(b,location.href)),"SCRIPT"===E&&(b="SCRIPT_PLACEHOLDER"),{type:NodeType.Text,textContent:b||"",isStyle:T};case e.CDATA_SECTION_NODE:return{type:NodeType.CDATA,textContent:""};case e.COMMENT_NODE:return{type:NodeType.Comment,textContent:e.textContent||""};default:return!1}}function serializeNodeWithId(e,t,n,r,o,i,a){void 0===o&&(o=!1),void 0===i&&(i=!0),void 0===a&&(a=!1);var s,u=serializeNode(e,t,r,i,a);if(!u)return console.warn(e,"not serialized"),null;s="__sn"in e?e.__sn.id:genId();var c=Object.assign(u,{id:s});e.__sn=c,n[s]=e;var l=!o;if(c.type===NodeType.Element&&(l=l&&!c.needBlock,delete c.needBlock),(c.type===NodeType.Document||c.type===NodeType.Element)&&l)for(var d=0,p=Array.from(e.childNodes);d<p.length;d++){var m=serializeNodeWithId(p[d],t,n,r,o,i,a);m&&c.childNodes.push(m)}return c}function snapshot(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[serializeNodeWithId(e,e,o,t,!1,n,r),o]}function on(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var EventType,IncrementalSource,MouseInteractions,ReplayerEvents,mirror={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return mirror.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete mirror.map[t],e.childNodes&&e.childNodes.forEach(function(e){return mirror.removeNodeFromMap(e)})},has:function(e){return mirror.map.hasOwnProperty(e)}};function throttle(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(i){var a=Date.now();o||!1!==n.leading||(o=a);var s=t-(a-o),u=this,c=arguments;s<=0||s>t?(r&&(window.clearTimeout(r),r=null),o=a,e.apply(u,c)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(u,c)},s))}}function hookSetter(e,t,n,r){var o=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return hookSetter(e,t,o||{},!0)}}function getWindowHeight(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function getWindowWidth(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function isBlocked(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var n=!1;return"string"==typeof t?n=e.classList.contains(t):e.classList.forEach(function(e){t.test(e)&&(n=!0)}),n||isBlocked(e.parentNode,t)}return isBlocked(e.parentNode,t)}function isAncestorRemoved(e){var t=mirror.getId(e);return!mirror.has(t)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||isAncestorRemoved(e.parentNode))}function isTouchEvent(e){return Boolean(e.changedTouches)}function polyfill(){"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)}function deepDelete(e,t){e.delete(t),t.childNodes.forEach(function(t){return deepDelete(e,t)})}function isParentRemoved(e,t){var n=t.parentNode;if(!n)return!1;var r=mirror.getId(n);return!!e.some(function(e){return e.id===r})||isParentRemoved(e,n)}function isAncestorInSet(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||isAncestorInSet(e,n))}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom"}(EventType||(EventType={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove"}(IncrementalSource||(IncrementalSource={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(MouseInteractions||(MouseInteractions={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction"}(ReplayerEvents||(ReplayerEvents={}));var moveKey=function(e,t){return e+"@"+t};function isINode(e){return"__sn"in e}function initMutationObserver(e,t,n,r){var o=new MutationObserver(function(o){var i,a,s,u,c=[],l=[],d=[],p=[],m=new Set,f=new Set,v=new Set,h={},y=function(e,n){if(!isBlocked(e,t)){if(isINode(e)){f.add(e);var r=null;n&&isINode(n)&&(r=n.__sn.id),r&&(h[moveKey(e.__sn.id,r)]=!0)}else m.add(e),v.delete(e);e.childNodes.forEach(function(e){return y(e)})}};o.forEach(function(e){var n=e.type,r=e.target,o=e.oldValue,i=e.addedNodes,a=e.removedNodes,s=e.attributeName;switch(n){case"characterData":var u=r.textContent;isBlocked(r,t)||u===o||c.push({value:u,node:r});break;case"attributes":u=r.getAttribute(s);if(isBlocked(r,t)||u===o)return;var p=l.find(function(e){return e.node===r});p||(p={node:r,attributes:{}},l.push(p)),p.attributes[s]=transformAttribute(document,s,u);break;case"childList":i.forEach(function(e){return y(e,r)}),a.forEach(function(e){var n=mirror.getId(e),o=mirror.getId(r);isBlocked(e,t)||(m.has(e)?(deepDelete(m,e),v.add(e)):m.has(r)&&-1===n||isAncestorRemoved(r)||(f.has(e)&&h[moveKey(n,o)]?deepDelete(f,e):d.push({parentId:o,id:n})),mirror.removeNodeFromMap(e))})}});var g=[],E=function(e){var o=mirror.getId(e.parentNode);if(-1===o)return g.push(e);p.push({parentId:o,previousId:e.previousSibling?mirror.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?mirror.getId(e.nextSibling):e.nextSibling,node:serializeNodeWithId(e,document,mirror.map,t,!0,n,r)})};try{for(var b=__values(f),T=b.next();!T.done;T=b.next()){E(w=T.value)}}catch(e){i={error:e}}finally{try{T&&!T.done&&(a=b.return)&&a.call(b)}finally{if(i)throw i.error}}try{for(var _=__values(m),S=_.next();!S.done;S=_.next()){var w=S.value;isAncestorInSet(v,w)||isParentRemoved(d,w)?isAncestorInSet(f,w)?E(w):v.add(w):E(w)}}catch(e){s={error:e}}finally{try{S&&!S.done&&(u=_.return)&&u.call(_)}finally{if(s)throw s.error}}for(;g.length&&!g.every(function(e){return-1===mirror.getId(e.parentNode)});)E(g.shift());var I={texts:c.map(function(e){return{id:mirror.getId(e.node),value:e.value}}).filter(function(e){return mirror.has(e.id)}),attributes:l.map(function(e){return{id:mirror.getId(e.node),attributes:e.attributes}}).filter(function(e){return mirror.has(e.id)}),removes:d,adds:p};(I.texts.length||I.attributes.length||I.removes.length||I.adds.length)&&e(I)});return o.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function initMoveObserver(e,t){var n,r=[],o=throttle(function(t){var o=Date.now()-n;e(r.map(function(e){return e.timeOffset-=o,e}),t?IncrementalSource.TouchMove:IncrementalSource.MouseMove),r=[],n=null},500),i=throttle(function(e){var t=e.target,i=isTouchEvent(e)?e.changedTouches[0]:e,a=i.clientX,s=i.clientY;n||(n=Date.now()),r.push({x:a,y:s,id:mirror.getId(t),timeOffset:Date.now()-n}),o(isTouchEvent(e))},t,{trailing:!1}),a=[on("mousemove",i),on("touchmove",i)];return function(){a.forEach(function(e){return e()})}}function initMouseInteractionObserver(e,t){var n=[];return Object.keys(MouseInteractions).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(r){var o=r.toLowerCase(),i=function(n){return function(r){if(!isBlocked(r.target,t)){var o=mirror.getId(r.target),i=isTouchEvent(r)?r.changedTouches[0]:r,a=i.clientX,s=i.clientY;e({type:MouseInteractions[n],id:o,x:a,y:s})}}}(r);n.push(on(o,i))}),function(){n.forEach(function(e){return e()})}}function initScrollObserver(e,t){return on("scroll",throttle(function(n){if(n.target&&!isBlocked(n.target,t)){var r=mirror.getId(n.target);if(n.target===document){var o=document.scrollingElement||document.documentElement;e({id:r,x:o.scrollLeft,y:o.scrollTop})}else e({id:r,x:n.target.scrollLeft,y:n.target.scrollTop})}},100))}function initViewportResizeObserver(e){return on("resize",throttle(function(){var t=getWindowHeight(),n=getWindowWidth();e({width:Number(n),height:Number(t)})},200),window)}var wrappedEmit,INPUT_TAGS=["INPUT","TEXTAREA","SELECT"],MASK_TYPES=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],lastInputValueMap=new WeakMap;function initInputObserver(e,t,n,r){function o(e){var o=e.target;if(o&&o.tagName&&!(INPUT_TAGS.indexOf(o.tagName)<0)&&!isBlocked(o,t)){var a=o.type;if("password"!==a&&!o.classList.contains(n)){var s=o.value,u=!1,c=MASK_TYPES.includes(a)||"TEXTAREA"===o.tagName;"radio"===a||"checkbox"===a?u=o.checked:c&&r&&(s="*".repeat(s.length)),i(o,{text:s,isChecked:u});var l=o.name;"radio"===a&&l&&u&&document.querySelectorAll('input[type="radio"][name="'+l+'"]').forEach(function(e){e!==o&&i(e,{text:e.value,isChecked:!u})})}}}function i(t,n){var r=lastInputValueMap.get(t);if(!r||r.text!==n.text||r.isChecked!==n.isChecked){lastInputValueMap.set(t,n);var o=mirror.getId(t);e(__assign({},n,{id:o}))}}var a=["input","change"].map(function(e){return on(e,o)}),s=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),u=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return s&&s.set&&a.push.apply(a,__spread(u.map(function(e){return hookSetter(e[0],e[1],{set:function(){o({target:this})}})}))),function(){a.forEach(function(e){return e()})}}function mergeHooks(e,t){var n=e.mutationCb,r=e.mousemoveCb,o=e.mouseInteractionCb,i=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,__spread(e)),n.apply(void 0,__spread(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,__spread(e)),r.apply(void 0,__spread(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,__spread(e)),o.apply(void 0,__spread(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,__spread(e)),i.apply(void 0,__spread(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,__spread(e)),a.apply(void 0,__spread(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,__spread(e)),s.apply(void 0,__spread(e))}}function initObservers(e,t){void 0===t&&(t={}),mergeHooks(e,t);var n=initMutationObserver(e.mutationCb,e.blockClass,e.inlineStylesheet,e.maskAllInputs),r=initMoveObserver(e.mousemoveCb,e.mousemoveWait),o=initMouseInteractionObserver(e.mouseInteractionCb,e.blockClass),i=initScrollObserver(e.scrollCb,e.blockClass),a=initViewportResizeObserver(e.viewportResizeCb),s=initInputObserver(e.inputCb,e.blockClass,e.ignoreClass,e.maskAllInputs);return function(){n.disconnect(),r(),o(),i(),a(),s()}}function wrapEvent(e){return __assign({},e,{timestamp:Date.now()})}function record(e){void 0===e&&(e={});var t,n=e.emit,r=e.checkoutEveryNms,o=e.checkoutEveryNth,i=e.blockClass,a=void 0===i?"rr-block":i,s=e.ignoreClass,u=void 0===s?"rr-ignore":s,c=e.inlineStylesheet,l=void 0===c||c,d=e.maskAllInputs,p=void 0!==d&&d,m=e.hooks,f=e.mousemoveWait,v=void 0===f?50:f;if(!n)throw new Error("emit function is required");polyfill();var h=0;function y(e){void 0===e&&(e=!1),wrappedEmit(wrapEvent({type:EventType.Meta,data:{href:window.location.href,width:getWindowWidth(),height:getWindowHeight()}}),e);var t=__read(snapshot(document,a,l,p),2),n=t[0],r=t[1];if(!n)return console.warn("Failed to snapshot the document");mirror.map=r,wrappedEmit(wrapEvent({type:EventType.FullSnapshot,data:{node:n,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}wrappedEmit=function(e,i){if(n(e,i),e.type===EventType.FullSnapshot)t=e,h=0;else if(e.type===EventType.IncrementalSnapshot){h++;var a=o&&h>=o,s=r&&e.timestamp-t.timestamp>r;(a||s)&&y(!0)}};try{var g=[];g.push(on("DOMContentLoaded",function(){wrappedEmit(wrapEvent({type:EventType.DomContentLoaded,data:{}}))}));var E=function(){y(),g.push(initObservers({mutationCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Mutation},e)}))},mousemoveCb:function(e,t){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.MouseInteraction},e)}))},scrollCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Scroll},e)}))},viewportResizeCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.ViewportResize},e)}))},inputCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Input},e)}))},blockClass:a,ignoreClass:u,maskAllInputs:p,inlineStylesheet:l,mousemoveWait:v},m))};return"interactive"===document.readyState||"complete"===document.readyState?E():g.push(on("load",function(){wrappedEmit(wrapEvent({type:EventType.Load,data:{}})),E()},window)),function(){g.forEach(function(e){return e()})}}catch(e){console.warn(e)}}record.addCustomEvent=function(e,t){if(!wrappedEmit)throw new Error("please add custom event after start recording");wrappedEmit(wrapEvent({type:EventType.Custom,data:{tag:e,payload:t}}))};export default record;
var NodeType,__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function __values(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function __read(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(NodeType||(NodeType={}));var _id=1,symbolAndNumberRegex=RegExp("[^a-z]");function genId(){return _id++}function getValidTagName(e){var t=e.toLowerCase().trim();return symbolAndNumberRegex.test(t)?"div":t}function getCssRulesString(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+getCssRuleString(t)},""):null}catch(e){return null}}function getCssRuleString(e){return isCSSImportRule(e)?getCssRulesString(e.styleSheet)||"":e.cssText}function isCSSImportRule(e){return"styleSheet"in e}function extractOrigin(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}var URL_IN_CSS_REF=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,RELATIVE_PATH=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,DATA_URI=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function absoluteToStylesheet(e,t){return(e||"").replace(URL_IN_CSS_REF,function(e,n,r,o){var i=n||r||o;if(!i)return e;if(!RELATIVE_PATH.test(i))return"url('"+i+"')";if(DATA_URI.test(i))return"url("+i+")";if("/"===i[0])return"url('"+(extractOrigin(t)+i)+"')";var a=t.split("/"),u=i.split("/");a.pop();for(var s=0,c=u;s<c.length;s++){var l=c[s];"."!==l&&(".."===l?a.pop():a.push(l))}return"url('"+a.join("/")+"')"})}function getAbsoluteSrcsetString(e,t){return""===t.trim()?t:t.split(",").map(function(t){var n=t.trimLeft().trimRight().split(" ");return 2===n.length?absoluteToDoc(e,n[0])+" "+n[1]:1===n.length?""+absoluteToDoc(e,n[0]):""}).join(",")}function absoluteToDoc(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function isSVGElement(e){return"svg"===e.tagName||e instanceof SVGElement}function transformAttribute(e,t,n){return"src"===t||"href"===t&&n?absoluteToDoc(e,n):"srcset"===t&&n?getAbsoluteSrcsetString(e,n):"style"===t&&n?absoluteToStylesheet(n,location.href):n}function serializeNode(e,t,n,r,o){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:NodeType.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:var i=!1;"string"==typeof n?i=e.classList.contains(n):e.classList.forEach(function(e){n.test(e)&&(i=!0)});for(var a=getValidTagName(e.tagName),u={},s=0,c=Array.from(e.attributes);s<c.length;s++){var l=c[s],d=l.name,p=l.value;u[d]=transformAttribute(t,d,p)}if("link"===a&&r){var m,f=Array.from(t.styleSheets).find(function(t){return t.href===e.href});(m=getCssRulesString(f))&&(delete u.rel,delete u.href,u._cssText=absoluteToStylesheet(m,f.href))}if("style"===a&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(m=getCssRulesString(e.sheet))&&(u._cssText=absoluteToStylesheet(m,location.href));if("input"===a||"textarea"===a||"select"===a){p=e.value;"radio"!==u.type&&"checkbox"!==u.type&&p?u.value=o?"*".repeat(p.length):p:e.checked&&(u.checked=e.checked)}if("option"===a){var v=e.parentElement;u.value===v.value&&(u.selected=e.selected)}if("canvas"===a&&(u.rr_dataURL=e.toDataURL()),"audio"!==a&&"video"!==a||(u.rr_mediaState=e.paused?"paused":"played"),i){var h=e.getBoundingClientRect(),y=h.width,g=h.height;u.rr_width=y+"px",u.rr_height=g+"px"}return{type:NodeType.Element,tagName:a,attributes:u,childNodes:[],isSVG:isSVGElement(e)||void 0,needBlock:i};case e.TEXT_NODE:var S=e.parentNode&&e.parentNode.tagName,E=e.textContent,b="STYLE"===S||void 0;return b&&E&&(E=absoluteToStylesheet(E,location.href)),"SCRIPT"===S&&(E="SCRIPT_PLACEHOLDER"),{type:NodeType.Text,textContent:E||"",isStyle:b};case e.CDATA_SECTION_NODE:return{type:NodeType.CDATA,textContent:""};case e.COMMENT_NODE:return{type:NodeType.Comment,textContent:e.textContent||""};default:return!1}}function serializeNodeWithId(e,t,n,r,o,i,a){void 0===o&&(o=!1),void 0===i&&(i=!0),void 0===a&&(a=!1);var u,s=serializeNode(e,t,r,i,a);if(!s)return console.warn(e,"not serialized"),null;u="__sn"in e?e.__sn.id:genId();var c=Object.assign(s,{id:u});e.__sn=c,n[u]=e;var l=!o;if(c.type===NodeType.Element&&(l=l&&!c.needBlock,delete c.needBlock),(c.type===NodeType.Document||c.type===NodeType.Element)&&l)for(var d=0,p=Array.from(e.childNodes);d<p.length;d++){var m=serializeNodeWithId(p[d],t,n,r,o,i,a);m&&c.childNodes.push(m)}return c}function snapshot(e,t,n,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0),void 0===r&&(r=!1);var o={};return[serializeNodeWithId(e,e,o,t,!1,n,r),o]}function on(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var EventType,IncrementalSource,MouseInteractions,MediaInteractions,ReplayerEvents,mirror={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return mirror.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete mirror.map[t],e.childNodes&&e.childNodes.forEach(function(e){return mirror.removeNodeFromMap(e)})},has:function(e){return mirror.map.hasOwnProperty(e)}};function throttle(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(i){var a=Date.now();o||!1!==n.leading||(o=a);var u=t-(a-o),s=this,c=arguments;u<=0||u>t?(r&&(window.clearTimeout(r),r=null),o=a,e.apply(s,c)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(s,c)},u))}}function hookSetter(e,t,n,r){var o=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return hookSetter(e,t,o||{},!0)}}function getWindowHeight(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function getWindowWidth(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function isBlocked(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var n=!1;return"string"==typeof t?n=e.classList.contains(t):e.classList.forEach(function(e){t.test(e)&&(n=!0)}),n||isBlocked(e.parentNode,t)}return isBlocked(e.parentNode,t)}function isAncestorRemoved(e){var t=mirror.getId(e);return!mirror.has(t)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||isAncestorRemoved(e.parentNode))}function isTouchEvent(e){return Boolean(e.changedTouches)}function polyfill(){"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)}function deepDelete(e,t){e.delete(t),t.childNodes.forEach(function(t){return deepDelete(e,t)})}function isParentRemoved(e,t){var n=t.parentNode;if(!n)return!1;var r=mirror.getId(n);return!!e.some(function(e){return e.id===r})||isParentRemoved(e,n)}function isAncestorInSet(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||isAncestorInSet(e,n))}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom"}(EventType||(EventType={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule"}(IncrementalSource||(IncrementalSource={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(MouseInteractions||(MouseInteractions={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(MediaInteractions||(MediaInteractions={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast"}(ReplayerEvents||(ReplayerEvents={}));var moveKey=function(e,t){return e+"@"+t};function isINode(e){return"__sn"in e}function initMutationObserver(e,t,n,r){var o=new MutationObserver(function(o){var i,a,u,s,c=[],l=[],d=[],p=[],m=new Set,f=new Set,v=new Set,h={},y=function(e,n){if(!isBlocked(e,t)){if(isINode(e)){f.add(e);var r=null;n&&isINode(n)&&(r=n.__sn.id),r&&(h[moveKey(e.__sn.id,r)]=!0)}else m.add(e),v.delete(e);e.childNodes.forEach(function(e){return y(e)})}};o.forEach(function(e){var n=e.type,r=e.target,o=e.oldValue,i=e.addedNodes,a=e.removedNodes,u=e.attributeName;switch(n){case"characterData":var s=r.textContent;isBlocked(r,t)||s===o||c.push({value:s,node:r});break;case"attributes":s=r.getAttribute(u);if(isBlocked(r,t)||s===o)return;var p=l.find(function(e){return e.node===r});p||(p={node:r,attributes:{}},l.push(p)),p.attributes[u]=transformAttribute(document,u,s);break;case"childList":i.forEach(function(e){return y(e,r)}),a.forEach(function(e){var n=mirror.getId(e),o=mirror.getId(r);isBlocked(e,t)||(m.has(e)?(deepDelete(m,e),v.add(e)):m.has(r)&&-1===n||isAncestorRemoved(r)||(f.has(e)&&h[moveKey(n,o)]?deepDelete(f,e):d.push({parentId:o,id:n})),mirror.removeNodeFromMap(e))})}});var g=[],S=function(e){var o=mirror.getId(e.parentNode);if(-1===o)return g.push(e);p.push({parentId:o,previousId:e.previousSibling?mirror.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?mirror.getId(e.nextSibling):e.nextSibling,node:serializeNodeWithId(e,document,mirror.map,t,!0,n,r)})};try{for(var E=__values(f),b=E.next();!b.done;b=E.next()){S(T=b.value)}}catch(e){i={error:e}}finally{try{b&&!b.done&&(a=E.return)&&a.call(E)}finally{if(i)throw i.error}}try{for(var _=__values(m),I=_.next();!I.done;I=_.next()){var T=I.value;isAncestorInSet(v,T)||isParentRemoved(d,T)?isAncestorInSet(f,T)?S(T):v.add(T):S(T)}}catch(e){u={error:e}}finally{try{I&&!I.done&&(s=_.return)&&s.call(_)}finally{if(u)throw u.error}}for(;g.length&&!g.every(function(e){return-1===mirror.getId(e.parentNode)});)S(g.shift());var w={texts:c.map(function(e){return{id:mirror.getId(e.node),value:e.value}}).filter(function(e){return mirror.has(e.id)}),attributes:l.map(function(e){return{id:mirror.getId(e.node),attributes:e.attributes}}).filter(function(e){return mirror.has(e.id)}),removes:d,adds:p};(w.texts.length||w.attributes.length||w.removes.length||w.adds.length)&&e(w)});return o.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function initMoveObserver(e,t){var n,r=[],o=throttle(function(t){var o=Date.now()-n;e(r.map(function(e){return e.timeOffset-=o,e}),t?IncrementalSource.TouchMove:IncrementalSource.MouseMove),r=[],n=null},500),i=throttle(function(e){var t=e.target,i=isTouchEvent(e)?e.changedTouches[0]:e,a=i.clientX,u=i.clientY;n||(n=Date.now()),r.push({x:a,y:u,id:mirror.getId(t),timeOffset:Date.now()-n}),o(isTouchEvent(e))},t,{trailing:!1}),a=[on("mousemove",i),on("touchmove",i)];return function(){a.forEach(function(e){return e()})}}function initMouseInteractionObserver(e,t){var n=[];return Object.keys(MouseInteractions).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(r){var o=r.toLowerCase(),i=function(n){return function(r){if(!isBlocked(r.target,t)){var o=mirror.getId(r.target),i=isTouchEvent(r)?r.changedTouches[0]:r,a=i.clientX,u=i.clientY;e({type:MouseInteractions[n],id:o,x:a,y:u})}}}(r);n.push(on(o,i))}),function(){n.forEach(function(e){return e()})}}function initScrollObserver(e,t){return on("scroll",throttle(function(n){if(n.target&&!isBlocked(n.target,t)){var r=mirror.getId(n.target);if(n.target===document){var o=document.scrollingElement||document.documentElement;e({id:r,x:o.scrollLeft,y:o.scrollTop})}else e({id:r,x:n.target.scrollLeft,y:n.target.scrollTop})}},100))}function initViewportResizeObserver(e){return on("resize",throttle(function(){var t=getWindowHeight(),n=getWindowWidth();e({width:Number(n),height:Number(t)})},200),window)}var wrappedEmit,INPUT_TAGS=["INPUT","TEXTAREA","SELECT"],MASK_TYPES=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],lastInputValueMap=new WeakMap;function initInputObserver(e,t,n,r){function o(e){var o=e.target;if(o&&o.tagName&&!(INPUT_TAGS.indexOf(o.tagName)<0)&&!isBlocked(o,t)){var a=o.type;if("password"!==a&&!o.classList.contains(n)){var u=o.value,s=!1,c=MASK_TYPES.includes(a)||"TEXTAREA"===o.tagName;"radio"===a||"checkbox"===a?s=o.checked:c&&r&&(u="*".repeat(u.length)),i(o,{text:u,isChecked:s});var l=o.name;"radio"===a&&l&&s&&document.querySelectorAll('input[type="radio"][name="'+l+'"]').forEach(function(e){e!==o&&i(e,{text:e.value,isChecked:!s})})}}}function i(t,n){var r=lastInputValueMap.get(t);if(!r||r.text!==n.text||r.isChecked!==n.isChecked){lastInputValueMap.set(t,n);var o=mirror.getId(t);e(__assign({},n,{id:o}))}}var a=["input","change"].map(function(e){return on(e,o)}),u=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),s=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return u&&u.set&&a.push.apply(a,__spread(s.map(function(e){return hookSetter(e[0],e[1],{set:function(){o({target:this})}})}))),function(){a.forEach(function(e){return e()})}}function initStyleSheetObserver(e){var t=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(n,r){return e({id:mirror.getId(this.ownerNode),adds:[{rule:n,index:r}]}),t.apply(this,arguments)};var n=CSSStyleSheet.prototype.deleteRule;return CSSStyleSheet.prototype.deleteRule=function(t){return e({id:mirror.getId(this.ownerNode),removes:[{index:t}]}),n.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=t,CSSStyleSheet.prototype.deleteRule=n}}function initMediaInteractionObserver(e,t){var n=function(n){return function(r){var o=r.target;o&&!isBlocked(o,t)&&e({type:"play"===n?MediaInteractions.Play:MediaInteractions.Pause,id:mirror.getId(o)})}},r=[on("play",n("play")),on("pause",n("pause"))];return function(){r.forEach(function(e){return e()})}}function mergeHooks(e,t){var n=e.mutationCb,r=e.mousemoveCb,o=e.mouseInteractionCb,i=e.scrollCb,a=e.viewportResizeCb,u=e.inputCb,s=e.mediaInteractionCb,c=e.styleSheetRuleCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,__spread(e)),n.apply(void 0,__spread(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,__spread(e)),r.apply(void 0,__spread(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,__spread(e)),o.apply(void 0,__spread(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,__spread(e)),i.apply(void 0,__spread(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,__spread(e)),a.apply(void 0,__spread(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,__spread(e)),u.apply(void 0,__spread(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,__spread(e)),s.apply(void 0,__spread(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,__spread(e)),c.apply(void 0,__spread(e))}}function initObservers(e,t){void 0===t&&(t={}),mergeHooks(e,t);var n=initMutationObserver(e.mutationCb,e.blockClass,e.inlineStylesheet,e.maskAllInputs),r=initMoveObserver(e.mousemoveCb,e.mousemoveWait),o=initMouseInteractionObserver(e.mouseInteractionCb,e.blockClass),i=initScrollObserver(e.scrollCb,e.blockClass),a=initViewportResizeObserver(e.viewportResizeCb),u=initInputObserver(e.inputCb,e.blockClass,e.ignoreClass,e.maskAllInputs),s=initMediaInteractionObserver(e.mediaInteractionCb,e.blockClass),c=initStyleSheetObserver(e.styleSheetRuleCb);return function(){n.disconnect(),r(),o(),i(),a(),u(),s(),c()}}function wrapEvent(e){return __assign({},e,{timestamp:Date.now()})}function record(e){void 0===e&&(e={});var t,n=e.emit,r=e.checkoutEveryNms,o=e.checkoutEveryNth,i=e.blockClass,a=void 0===i?"rr-block":i,u=e.ignoreClass,s=void 0===u?"rr-ignore":u,c=e.inlineStylesheet,l=void 0===c||c,d=e.maskAllInputs,p=void 0!==d&&d,m=e.hooks,f=e.mousemoveWait,v=void 0===f?50:f;if(!n)throw new Error("emit function is required");polyfill();var h=0;function y(e){void 0===e&&(e=!1),wrappedEmit(wrapEvent({type:EventType.Meta,data:{href:window.location.href,width:getWindowWidth(),height:getWindowHeight()}}),e);var t=__read(snapshot(document,a,l,p),2),n=t[0],r=t[1];if(!n)return console.warn("Failed to snapshot the document");mirror.map=r,wrappedEmit(wrapEvent({type:EventType.FullSnapshot,data:{node:n,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}wrappedEmit=function(e,i){if(n(e,i),e.type===EventType.FullSnapshot)t=e,h=0;else if(e.type===EventType.IncrementalSnapshot){h++;var a=o&&h>=o,u=r&&e.timestamp-t.timestamp>r;(a||u)&&y(!0)}};try{var g=[];g.push(on("DOMContentLoaded",function(){wrappedEmit(wrapEvent({type:EventType.DomContentLoaded,data:{}}))}));var S=function(){y(),g.push(initObservers({mutationCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Mutation},e)}))},mousemoveCb:function(e,t){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.MouseInteraction},e)}))},scrollCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Scroll},e)}))},viewportResizeCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.ViewportResize},e)}))},inputCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Input},e)}))},mediaInteractionCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.StyleSheetRule},e)}))},blockClass:a,ignoreClass:s,maskAllInputs:p,inlineStylesheet:l,mousemoveWait:v},m))};return"interactive"===document.readyState||"complete"===document.readyState?S():g.push(on("load",function(){wrappedEmit(wrapEvent({type:EventType.Load,data:{}})),S()},window)),function(){g.forEach(function(e){return e()})}}catch(e){console.warn(e)}}record.addCustomEvent=function(e,t){if(!wrappedEmit)throw new Error("please add custom event after start recording");wrappedEmit(wrapEvent({type:EventType.Custom,data:{tag:e,payload:t}}))};export default record;
//# sourceMappingURL=rrweb-record.min.js.map

@@ -1,2 +0,2 @@

var NodeType,__assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function __values(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function __read(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(NodeType||(NodeType={}));var _id=1;function genId(){return _id++}function getCssRulesString(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+getCssRuleString(t)},""):null}catch(e){return null}}function getCssRuleString(e){return isCSSImportRule(e)?getCssRulesString(e.styleSheet)||"":e.cssText}function isCSSImportRule(e){return"styleSheet"in e}function extractOrigin(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}var URL_IN_CSS_REF=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,RELATIVE_PATH=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,DATA_URI=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function absoluteToStylesheet(e,t){return e.replace(URL_IN_CSS_REF,function(e,r,n,o){var i=r||n||o;if(!i)return e;if(!RELATIVE_PATH.test(i))return"url('"+i+"')";if(DATA_URI.test(i))return"url("+i+")";if("/"===i[0])return"url('"+(extractOrigin(t)+i)+"')";var a=t.split("/"),s=i.split("/");a.pop();for(var l=0,c=s;l<c.length;l++){var u=c[l];"."!==u&&(".."===u?a.pop():a.push(u))}return"url('"+a.join("/")+"')"})}function getAbsoluteSrcsetString(e,t){return""===t.trim()?t:t.split(",").map(function(t){var r=t.trimLeft().trimRight().split(" ");return 2===r.length?absoluteToDoc(e,r[0])+" "+r[1]:1===r.length?""+absoluteToDoc(e,r[0]):""}).join(",")}function absoluteToDoc(e,t){if(""===t.trim())return t;var r=e.createElement("a");return r.href=t,r.href}function isSVGElement(e){return"svg"===e.tagName||e instanceof SVGElement}function transformAttribute(e,t,r){return"src"===t||"href"===t?absoluteToDoc(e,r):"srcset"===t?getAbsoluteSrcsetString(e,r):"style"===t?absoluteToStylesheet(r,location.href):r}function serializeNode(e,t,r,n,o){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:NodeType.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:var i=!1;"string"==typeof r?i=e.classList.contains(r):e.classList.forEach(function(e){r.test(e)&&(i=!0)});for(var a=e.tagName.toLowerCase(),s={},l=0,c=Array.from(e.attributes);l<c.length;l++){var u=c[l],d=u.name,p=u.value;s[d]=transformAttribute(t,d,p)}if("link"===a&&n){var f,m=Array.from(t.styleSheets).find(function(t){return t.href===e.href});(f=getCssRulesString(m))&&(delete s.rel,delete s.href,s._cssText=absoluteToStylesheet(f,m.href))}if("style"===a&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(f=getCssRulesString(e.sheet))&&(s._cssText=absoluteToStylesheet(f,location.href));if("input"===a||"textarea"===a||"select"===a){p=e.value;"radio"!==s.type&&"checkbox"!==s.type&&p?s.value=o?"*".repeat(p.length):p:e.checked&&(s.checked=e.checked)}if("option"===a){var h=e.parentElement;s.value===h.value&&(s.selected=e.selected)}if("canvas"===a&&(s.rr_dataURL=e.toDataURL()),i){var v=e.getBoundingClientRect(),y=v.width,g=v.height;s.rr_width=y+"px",s.rr_height=g+"px"}return{type:NodeType.Element,tagName:a,attributes:s,childNodes:[],isSVG:isSVGElement(e)||void 0,needBlock:i};case e.TEXT_NODE:var E=e.parentNode&&e.parentNode.tagName,b=e.textContent,T="STYLE"===E||void 0;return T&&b&&(b=absoluteToStylesheet(b,location.href)),"SCRIPT"===E&&(b="SCRIPT_PLACEHOLDER"),{type:NodeType.Text,textContent:b||"",isStyle:T};case e.CDATA_SECTION_NODE:return{type:NodeType.CDATA,textContent:""};case e.COMMENT_NODE:return{type:NodeType.Comment,textContent:e.textContent||""};default:return!1}}function serializeNodeWithId(e,t,r,n,o,i,a){void 0===o&&(o=!1),void 0===i&&(i=!0),void 0===a&&(a=!1);var s,l=serializeNode(e,t,n,i,a);if(!l)return console.warn(e,"not serialized"),null;s="__sn"in e?e.__sn.id:genId();var c=Object.assign(l,{id:s});e.__sn=c,r[s]=e;var u=!o;if(c.type===NodeType.Element&&(u=u&&!c.needBlock,delete c.needBlock),(c.type===NodeType.Document||c.type===NodeType.Element)&&u)for(var d=0,p=Array.from(e.childNodes);d<p.length;d++){var f=serializeNodeWithId(p[d],t,r,n,o,i,a);f&&c.childNodes.push(f)}return c}function snapshot(e,t,r,n){void 0===t&&(t="rr-block"),void 0===r&&(r=!0),void 0===n&&(n=!1);var o={};return[serializeNodeWithId(e,e,o,t,!1,r,n),o]}var commentre=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g;function parse(e,t){void 0===t&&(t={});var r=1,n=1;function o(e){var t=e.match(/\n/g);t&&(r+=t.length);var o=e.lastIndexOf("\n");n=-1===o?n+e.length:e.length-o}function i(){var e={line:r,column:n};return function(t){return t.position=new a(e),f(),t}}var a=function(){return function(e){this.start=e,this.end={line:r,column:n},this.source=t.source}}();a.prototype.content=e;var s=[];function l(o){var i=new Error(t.source+":"+r+":"+n+": "+o);if(i.reason=o,i.filename=t.source,i.line=r,i.column=n,i.source=e,!t.silent)throw i;s.push(i)}function c(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){var t,r=[];for(f(),m(r);e.length&&"}"!==e.charAt(0)&&(t=N()||_());)!1!==t&&(r.push(t),m(r));return r}function p(t){var r=t.exec(e);if(r){var n=r[0];return o(n),e=e.slice(n.length),r}}function f(){p(/^\s*/)}function m(e){var t;for(void 0===e&&(e=[]);t=h();)!1!==t&&e.push(t),t=h();return e}function h(){var t=i();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var r=2;""!==e.charAt(r)&&("*"!==e.charAt(r)||"/"!==e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return l("End of comment missing");var a=e.slice(2,r-2);return n+=2,o(a),e=e.slice(r),n+=2,t({type:"comment",comment:a})}}function v(){var e=p(/^([^{]+)/);if(e)return trim(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(e){return e.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(e){return e.replace(/\u200C/g,",")})}function y(){var e=i(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=trim(t[0]);if(!p(/^:\s*/))return l("property missing ':'");var n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:r.replace(commentre,""),value:n?trim(n[0]).replace(commentre,""):""});return p(/^[;\s]*/),o}}function g(){var e,t=[];if(!c())return l("missing '{'");for(m(t);e=y();)!1!==e&&(t.push(e),m(t)),e=y();return u()?t:l("missing '}'")}function E(){for(var e,t=[],r=i();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:g()})}var b,T=I("import"),w=I("charset"),S=I("namespace");function I(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=i(),n=p(t);if(n){var o={type:e};return o[e]=n[1].trim(),r(o)}}}function N(){if("@"===e[0])return function(){var e=i(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=p(/^([-\w]+)\s*/)))return l("@keyframes missing name");var n,o=t[1];if(!c())return l("@keyframes missing '{'");for(var a=m();n=E();)a.push(n),a=a.concat(m());return u()?e({type:"keyframes",name:o,vendor:r,keyframes:a}):l("@keyframes missing '}'")}}()||function(){var e=i(),t=p(/^@media *([^{]+)/);if(t){var r=trim(t[1]);if(!c())return l("@media missing '{'");var n=m().concat(d());return u()?e({type:"media",media:r,rules:n}):l("@media missing '}'")}}()||function(){var e=i(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:trim(t[1]),media:trim(t[2])})}()||function(){var e=i(),t=p(/^@supports *([^{]+)/);if(t){var r=trim(t[1]);if(!c())return l("@supports missing '{'");var n=m().concat(d());return u()?e({type:"supports",supports:r,rules:n}):l("@supports missing '}'")}}()||T()||w()||S()||function(){var e=i(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var r=trim(t[1]),n=trim(t[2]);if(!c())return l("@document missing '{'");var o=m().concat(d());return u()?e({type:"document",document:n,vendor:r,rules:o}):l("@document missing '}'")}}()||function(){var e=i();if(p(/^@page */)){var t=v()||[];if(!c())return l("@page missing '{'");for(var r,n=m();r=y();)n.push(r),n=n.concat(m());return u()?e({type:"page",selectors:t,declarations:n}):l("@page missing '}'")}}()||function(){var e=i();if(p(/^@host\s*/)){if(!c())return l("@host missing '{'");var t=m().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=i();if(p(/^@font-face\s*/)){if(!c())return l("@font-face missing '{'");for(var t,r=m();t=y();)r.push(t),r=r.concat(m());return u()?e({type:"font-face",declarations:r}):l("@font-face missing '}'")}}()}function _(){var e=i(),t=v();return t?(m(),e({type:"rule",selectors:t,declarations:g()})):l("selector missing")}return addParent((b=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:b,parsingErrors:s}}))}function trim(e){return e?e.replace(/^\s+|\s+$/g,""):""}function addParent(e,t){for(var r=e&&"string"==typeof e.type,n=r?e:t,o=0,i=Object.keys(e);o<i.length;o++){var a=e[i[o]];Array.isArray(a)?a.forEach(function(e){addParent(e,n)}):a&&"object"==typeof a&&addParent(a,n)}return r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var tagMap={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function getTagName(e){var t=tagMap[e.tagName]?tagMap[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}var HOVER_SELECTOR=/([^\\]):hover/g;function addHoverClass(e){var t=parse(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach(function(t){"selectors"in t&&(t.selectors||[]).forEach(function(t){if(HOVER_SELECTOR.test(t)){var r=t.replace(HOVER_SELECTOR,"$1.\\:hover");e=e.replace(t,t+", "+r)}})}),e):e}function buildNode(e,t,r){switch(e.type){case NodeType.Document:return t.implementation.createDocument(null,"",null);case NodeType.DocumentType:return t.implementation.createDocumentType(e.name,e.publicId,e.systemId);case NodeType.Element:var n,o=getTagName(e);n=e.isSVG?t.createElementNS("http://www.w3.org/2000/svg",o):t.createElement(o);var i=function(i){if(!e.attributes.hasOwnProperty(i))return"continue";var a=e.attributes[i];if(a="boolean"==typeof a?"":a,i.startsWith("rr_")){if("canvas"===o&&"rr_dataURL"===i){var s=document.createElement("img");s.src=a,s.onload=function(){var e=n.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}"rr_width"===i&&(n.style.width=a),"rr_height"===i&&(n.style.height=a)}else{var l="textarea"===o&&"value"===i,c="style"===o&&"_cssText"===i;if(c&&r&&(a=addHoverClass(a)),l||c){for(var u=t.createTextNode(a),d=0,p=Array.from(n.childNodes);d<p.length;d++){var f=p[d];f.nodeType===n.TEXT_NODE&&n.removeChild(f)}return n.appendChild(u),"continue"}if("iframe"===o&&"src"===i)return"continue";try{e.isSVG&&"xlink:href"===i?n.setAttributeNS("http://www.w3.org/1999/xlink",i,a):n.setAttribute(i,a)}catch(e){}}};for(var a in e.attributes)i(a);return n;case NodeType.Text:return t.createTextNode(e.isStyle&&r?addHoverClass(e.textContent):e.textContent);case NodeType.CDATA:return t.createCDATASection(e.textContent);case NodeType.Comment:return t.createComment(e.textContent);default:return null}}function buildNodeWithSN(e,t,r,n,o){void 0===n&&(n=!1),void 0===o&&(o=!0);var i=buildNode(e,t,o);if(!i)return null;if(e.type===NodeType.Document&&(t.close(),t.open(),i=t),i.__sn=e,r[e.id]=i,(e.type===NodeType.Document||e.type===NodeType.Element)&&!n)for(var a=0,s=e.childNodes;a<s.length;a++){var l=s[a],c=buildNodeWithSN(l,t,r,!1,o);c?i.appendChild(c):console.warn("Failed to rebuild",l)}return i}function rebuild(e,t,r){void 0===r&&(r=!0);var n={};return[buildNodeWithSN(e,t,n,!1,r),n]}function on(e,t,r){void 0===r&&(r=document);var n={capture:!0,passive:!0};return r.addEventListener(e,t,n),function(){return r.removeEventListener(e,t,n)}}var EventType,IncrementalSource,MouseInteractions,ReplayerEvents,mirror={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return mirror.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete mirror.map[t],e.childNodes&&e.childNodes.forEach(function(e){return mirror.removeNodeFromMap(e)})},has:function(e){return mirror.map.hasOwnProperty(e)}};function throttle(e,t,r){void 0===r&&(r={});var n=null,o=0;return function(i){var a=Date.now();o||!1!==r.leading||(o=a);var s=t-(a-o),l=this,c=arguments;s<=0||s>t?(n&&(window.clearTimeout(n),n=null),o=a,e.apply(l,c)):n||!1===r.trailing||(n=window.setTimeout(function(){o=!1===r.leading?0:Date.now(),n=null,e.apply(l,c)},s))}}function hookSetter(e,t,r,n){var o=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,n?r:{set:function(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return hookSetter(e,t,o||{},!0)}}function getWindowHeight(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function getWindowWidth(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function isBlocked(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var r=!1;return"string"==typeof t?r=e.classList.contains(t):e.classList.forEach(function(e){t.test(e)&&(r=!0)}),r||isBlocked(e.parentNode,t)}return isBlocked(e.parentNode,t)}function isAncestorRemoved(e){var t=mirror.getId(e);return!mirror.has(t)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||isAncestorRemoved(e.parentNode))}function isTouchEvent(e){return Boolean(e.changedTouches)}function polyfill(){"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)}function deepDelete(e,t){e.delete(t),t.childNodes.forEach(function(t){return deepDelete(e,t)})}function isParentRemoved(e,t){var r=t.parentNode;if(!r)return!1;var n=mirror.getId(r);return!!e.some(function(e){return e.id===n})||isParentRemoved(e,r)}function isAncestorInSet(e,t){var r=t.parentNode;return!!r&&(!!e.has(r)||isAncestorInSet(e,r))}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom"}(EventType||(EventType={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove"}(IncrementalSource||(IncrementalSource={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(MouseInteractions||(MouseInteractions={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction"}(ReplayerEvents||(ReplayerEvents={}));var moveKey=function(e,t){return e+"@"+t};function isINode(e){return"__sn"in e}function initMutationObserver(e,t,r,n){var o=new MutationObserver(function(o){var i,a,s,l,c=[],u=[],d=[],p=[],f=new Set,m=new Set,h=new Set,v={},y=function(e,r){if(!isBlocked(e,t)){if(isINode(e)){m.add(e);var n=null;r&&isINode(r)&&(n=r.__sn.id),n&&(v[moveKey(e.__sn.id,n)]=!0)}else f.add(e),h.delete(e);e.childNodes.forEach(function(e){return y(e)})}};o.forEach(function(e){var r=e.type,n=e.target,o=e.oldValue,i=e.addedNodes,a=e.removedNodes,s=e.attributeName;switch(r){case"characterData":var l=n.textContent;isBlocked(n,t)||l===o||c.push({value:l,node:n});break;case"attributes":l=n.getAttribute(s);if(isBlocked(n,t)||l===o)return;var p=u.find(function(e){return e.node===n});p||(p={node:n,attributes:{}},u.push(p)),p.attributes[s]=transformAttribute(document,s,l);break;case"childList":i.forEach(function(e){return y(e,n)}),a.forEach(function(e){var r=mirror.getId(e),o=mirror.getId(n);isBlocked(e,t)||(f.has(e)?(deepDelete(f,e),h.add(e)):f.has(n)&&-1===r||isAncestorRemoved(n)||(m.has(e)&&v[moveKey(r,o)]?deepDelete(m,e):d.push({parentId:o,id:r})),mirror.removeNodeFromMap(e))})}});var g=[],E=function(e){var o=mirror.getId(e.parentNode);if(-1===o)return g.push(e);p.push({parentId:o,previousId:e.previousSibling?mirror.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?mirror.getId(e.nextSibling):e.nextSibling,node:serializeNodeWithId(e,document,mirror.map,t,!0,r,n)})};try{for(var b=__values(m),T=b.next();!T.done;T=b.next()){E(I=T.value)}}catch(e){i={error:e}}finally{try{T&&!T.done&&(a=b.return)&&a.call(b)}finally{if(i)throw i.error}}try{for(var w=__values(f),S=w.next();!S.done;S=w.next()){var I=S.value;isAncestorInSet(h,I)||isParentRemoved(d,I)?isAncestorInSet(m,I)?E(I):h.add(I):E(I)}}catch(e){s={error:e}}finally{try{S&&!S.done&&(l=w.return)&&l.call(w)}finally{if(s)throw s.error}}for(;g.length&&!g.every(function(e){return-1===mirror.getId(e.parentNode)});)E(g.shift());var N={texts:c.map(function(e){return{id:mirror.getId(e.node),value:e.value}}).filter(function(e){return mirror.has(e.id)}),attributes:u.map(function(e){return{id:mirror.getId(e.node),attributes:e.attributes}}).filter(function(e){return mirror.has(e.id)}),removes:d,adds:p};(N.texts.length||N.attributes.length||N.removes.length||N.adds.length)&&e(N)});return o.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function initMoveObserver(e,t){var r,n=[],o=throttle(function(t){var o=Date.now()-r;e(n.map(function(e){return e.timeOffset-=o,e}),t?IncrementalSource.TouchMove:IncrementalSource.MouseMove),n=[],r=null},500),i=throttle(function(e){var t=e.target,i=isTouchEvent(e)?e.changedTouches[0]:e,a=i.clientX,s=i.clientY;r||(r=Date.now()),n.push({x:a,y:s,id:mirror.getId(t),timeOffset:Date.now()-r}),o(isTouchEvent(e))},t,{trailing:!1}),a=[on("mousemove",i),on("touchmove",i)];return function(){a.forEach(function(e){return e()})}}function initMouseInteractionObserver(e,t){var r=[];return Object.keys(MouseInteractions).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(n){var o=n.toLowerCase(),i=function(r){return function(n){if(!isBlocked(n.target,t)){var o=mirror.getId(n.target),i=isTouchEvent(n)?n.changedTouches[0]:n,a=i.clientX,s=i.clientY;e({type:MouseInteractions[r],id:o,x:a,y:s})}}}(n);r.push(on(o,i))}),function(){r.forEach(function(e){return e()})}}function initScrollObserver(e,t){return on("scroll",throttle(function(r){if(r.target&&!isBlocked(r.target,t)){var n=mirror.getId(r.target);if(r.target===document){var o=document.scrollingElement||document.documentElement;e({id:n,x:o.scrollLeft,y:o.scrollTop})}else e({id:n,x:r.target.scrollLeft,y:r.target.scrollTop})}},100))}function initViewportResizeObserver(e){return on("resize",throttle(function(){var t=getWindowHeight(),r=getWindowWidth();e({width:Number(r),height:Number(t)})},200),window)}var wrappedEmit,INPUT_TAGS=["INPUT","TEXTAREA","SELECT"],MASK_TYPES=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],lastInputValueMap=new WeakMap;function initInputObserver(e,t,r,n){function o(e){var o=e.target;if(o&&o.tagName&&!(INPUT_TAGS.indexOf(o.tagName)<0)&&!isBlocked(o,t)){var a=o.type;if("password"!==a&&!o.classList.contains(r)){var s=o.value,l=!1,c=MASK_TYPES.includes(a)||"TEXTAREA"===o.tagName;"radio"===a||"checkbox"===a?l=o.checked:c&&n&&(s="*".repeat(s.length)),i(o,{text:s,isChecked:l});var u=o.name;"radio"===a&&u&&l&&document.querySelectorAll('input[type="radio"][name="'+u+'"]').forEach(function(e){e!==o&&i(e,{text:e.value,isChecked:!l})})}}}function i(t,r){var n=lastInputValueMap.get(t);if(!n||n.text!==r.text||n.isChecked!==r.isChecked){lastInputValueMap.set(t,r);var o=mirror.getId(t);e(__assign({},r,{id:o}))}}var a=["input","change"].map(function(e){return on(e,o)}),s=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),l=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return s&&s.set&&a.push.apply(a,__spread(l.map(function(e){return hookSetter(e[0],e[1],{set:function(){o({target:this})}})}))),function(){a.forEach(function(e){return e()})}}function mergeHooks(e,t){var r=e.mutationCb,n=e.mousemoveCb,o=e.mouseInteractionCb,i=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb;e.mutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mutation&&t.mutation.apply(t,__spread(e)),r.apply(void 0,__spread(e))},e.mousemoveCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mousemove&&t.mousemove.apply(t,__spread(e)),n.apply(void 0,__spread(e))},e.mouseInteractionCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mouseInteraction&&t.mouseInteraction.apply(t,__spread(e)),o.apply(void 0,__spread(e))},e.scrollCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.scroll&&t.scroll.apply(t,__spread(e)),i.apply(void 0,__spread(e))},e.viewportResizeCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.viewportResize&&t.viewportResize.apply(t,__spread(e)),a.apply(void 0,__spread(e))},e.inputCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.input&&t.input.apply(t,__spread(e)),s.apply(void 0,__spread(e))}}function initObservers(e,t){void 0===t&&(t={}),mergeHooks(e,t);var r=initMutationObserver(e.mutationCb,e.blockClass,e.inlineStylesheet,e.maskAllInputs),n=initMoveObserver(e.mousemoveCb,e.mousemoveWait),o=initMouseInteractionObserver(e.mouseInteractionCb,e.blockClass),i=initScrollObserver(e.scrollCb,e.blockClass),a=initViewportResizeObserver(e.viewportResizeCb),s=initInputObserver(e.inputCb,e.blockClass,e.ignoreClass,e.maskAllInputs);return function(){r.disconnect(),n(),o(),i(),a(),s()}}function wrapEvent(e){return __assign({},e,{timestamp:Date.now()})}function record(e){void 0===e&&(e={});var t,r=e.emit,n=e.checkoutEveryNms,o=e.checkoutEveryNth,i=e.blockClass,a=void 0===i?"rr-block":i,s=e.ignoreClass,l=void 0===s?"rr-ignore":s,c=e.inlineStylesheet,u=void 0===c||c,d=e.maskAllInputs,p=void 0!==d&&d,f=e.hooks,m=e.mousemoveWait,h=void 0===m?50:m;if(!r)throw new Error("emit function is required");polyfill();var v=0;function y(e){void 0===e&&(e=!1),wrappedEmit(wrapEvent({type:EventType.Meta,data:{href:window.location.href,width:getWindowWidth(),height:getWindowHeight()}}),e);var t=__read(snapshot(document,a,u,p),2),r=t[0],n=t[1];if(!r)return console.warn("Failed to snapshot the document");mirror.map=n,wrappedEmit(wrapEvent({type:EventType.FullSnapshot,data:{node:r,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}wrappedEmit=function(e,i){if(r(e,i),e.type===EventType.FullSnapshot)t=e,v=0;else if(e.type===EventType.IncrementalSnapshot){v++;var a=o&&v>=o,s=n&&e.timestamp-t.timestamp>n;(a||s)&&y(!0)}};try{var g=[];g.push(on("DOMContentLoaded",function(){wrappedEmit(wrapEvent({type:EventType.DomContentLoaded,data:{}}))}));var E=function(){y(),g.push(initObservers({mutationCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Mutation},e)}))},mousemoveCb:function(e,t){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.MouseInteraction},e)}))},scrollCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Scroll},e)}))},viewportResizeCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.ViewportResize},e)}))},inputCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Input},e)}))},blockClass:a,ignoreClass:l,maskAllInputs:p,inlineStylesheet:u,mousemoveWait:h},f))};return"interactive"===document.readyState||"complete"===document.readyState?E():g.push(on("load",function(){wrappedEmit(wrapEvent({type:EventType.Load,data:{}})),E()},window)),function(){g.forEach(function(e){return e()})}}catch(e){console.warn(e)}}function mitt(e){return e=e||Object.create(null),{on:function(t,r){(e[t]||(e[t]=[])).push(r)},off:function(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit:function(t,r){(e[t]||[]).slice().map(function(e){e(r)}),(e["*"]||[]).slice().map(function(e){e(t,r)})}}}record.addCustomEvent=function(e,t){if(!wrappedEmit)throw new Error("please add custom event after start recording");wrappedEmit(wrapEvent({type:EventType.Custom,data:{tag:e,payload:t}}))};var mittProxy=Object.freeze({default:mitt});function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var smoothscroll=createCommonjsModule(function(e,t){!function(){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)){var r,n=e.HTMLElement||e.Element,o=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||l,scrollIntoView:n.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(r=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?m.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):i.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(c(arguments[0])?i.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):m.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},n.prototype.scroll=n.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;m.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},n.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},n.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var r=function(e){for(;e!==t.body&&!1===p(e);)e=e.parentNode||e.host;return e}(this),n=r.getBoundingClientRect(),o=this.getBoundingClientRect();r!==t.body?(m.call(this,r,r.scrollLeft+o.left-n.left,r.scrollTop+o.top-n.top),"fixed"!==e.getComputedStyle(r).position&&e.scrollBy({left:n.left,top:n.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function l(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,r){var n=e.getComputedStyle(t,null)["overflow"+r];return"auto"===n||"scroll"===n}function p(e){var t=u(e,"Y")&&d(e,"Y"),r=u(e,"X")&&d(e,"X");return t||r}function f(t){var r,n,i,s,l=(a()-t.startTime)/o;s=l=l>1?1:l,r=.5*(1-Math.cos(Math.PI*s)),n=t.startX+(t.x-t.startX)*r,i=t.startY+(t.y-t.startY)*r,t.method.call(t.scrollable,n,i),n===t.x&&i===t.y||e.requestAnimationFrame(f.bind(e,t))}function m(r,n,o){var s,c,u,d,p=a();r===t.body?(s=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(s=r,c=r.scrollLeft,u=r.scrollTop,d=l),f({scrollable:s,method:d,startTime:p,startX:c,startY:u,x:n,y:o})}}}}()}),smoothscroll_1=smoothscroll.polyfill,Timer=function(){function e(e,t){void 0===t&&(t=[]),this.timeOffset=0,this.actions=t,this.config=e}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){var t;(t=this.actions).push.apply(t,__spread(e))},e.prototype.start=function(){this.actions.sort(function(e,t){return e.delay-t.delay}),this.timeOffset=0;var e=performance.now(),t=this.actions,r=this.config,n=this;this.raf=requestAnimationFrame(function o(i){for(n.timeOffset+=(i-e)*r.speed,e=i;t.length;){var a=t[0];if(!(n.timeOffset>=a.delay))break;t.shift(),a.doAction()}(t.length>0||n.config.liveMode)&&(n.raf=requestAnimationFrame(o))})},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},e.prototype.findActionIndex=function(e){for(var t=0,r=this.actions.length-1;t<=r;){var n=Math.floor((t+r)/2);if(this.actions[n].delay<e.delay)t=n+1;else{if(!(this.actions[n].delay>e.delay))return n;r=n-1}}return t},e}(),rules=function(e){return["iframe, ."+e+" { background: #ccc }","noscript { display: none !important; }"]},SKIP_TIME_THRESHOLD=1e4,SKIP_TIME_INTERVAL=5e3,mitt$1=mitt||mittProxy,REPLAY_CONSOLE_PREFIX="[replayer]",Replayer=function(){function e(e,t){if(this.events=[],this.emitter=mitt$1(),this.baselineTime=0,this.noramlSpeed=-1,this.missingNodeRetryMap={},e.length<2)throw new Error("Replayer need at least 2 events.");this.events=e,this.handleResize=this.handleResize.bind(this);var r={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[]};this.config=Object.assign({},r,t),this.timer=new Timer(this.config),smoothscroll_1(),polyfill(),this.setupDom(),this.emitter.on("resize",this.handleResize)}return e.prototype.on=function(e,t){this.emitter.on(e,t)},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach(function(r){t.config[r]=e[r]}),this.config.skipInactive||(this.noramlSpeed=-1)},e.prototype.getMetaData=function(){var e=this.events[0];return{totalTime:this.events[this.events.length-1].timestamp-e.timestamp}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){return this.baselineTime-this.events[0].timestamp},e.prototype.play=function(e){var t,r;void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;var n=new Array;try{for(var o=__values(this.events),i=o.next();!i.done;i=o.next()){var a=i.value,s=a.timestamp<this.baselineTime,l=this.getCastFn(a,s);s?l():n.push({doAction:l,delay:this.getDelay(a)})}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}this.timer.addActions(n),this.timer.start(),this.emitter.emit(ReplayerEvents.Start)},e.prototype.pause=function(){this.timer.clear(),this.emitter.emit(ReplayerEvents.Pause)},e.prototype.resume=function(e){var t,r;void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;var n=new Array;try{for(var o=__values(this.events),i=o.next();!i.done;i=o.next()){var a=i.value;if(!(a.timestamp<=this.lastPlayedEvent.timestamp||a===this.lastPlayedEvent)){var s=this.getCastFn(a);n.push({doAction:s,delay:this.getDelay(a)})}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}this.timer.addActions(n),this.timer.start(),this.emitter.emit(ReplayerEvents.Resume)},e.prototype.addEvent=function(e){this.getCastFn(e,!0)()},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.iframe.setAttribute("scrolling","no"),this.iframe.setAttribute("style","pointer-events: none"),this.wrapper.appendChild(this.iframe)},e.prototype.handleResize=function(e){this.iframe.width=e.width+"px",this.iframe.height=e.height+"px"},e.prototype.getDelay=function(e){if(e.type===EventType.IncrementalSnapshot&&e.data.source===IncrementalSource.MouseMove){var t=e.data.positions[0].timeOffset,r=e.timestamp+t;return e.delay=r-this.baselineTime,r-this.baselineTime}return e.delay=e.timestamp-this.baselineTime,e.timestamp-this.baselineTime},e.prototype.getCastFn=function(e,t){var r,n=this;switch(void 0===t&&(t=!1),e.type){case EventType.DomContentLoaded:case EventType.Load:break;case EventType.Meta:r=function(){return n.emitter.emit(ReplayerEvents.Resize,{width:e.data.width,height:e.data.height})};break;case EventType.FullSnapshot:r=function(){n.rebuildFullSnapshot(e),n.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case EventType.IncrementalSnapshot:r=function(){var r,o;if(n.applyIncremental(e,t),e===n.nextUserInteractionEvent&&(n.nextUserInteractionEvent=null,n.restoreSpeed()),n.config.skipInactive&&!n.nextUserInteractionEvent){try{for(var i=__values(n.events),a=i.next();!a.done;a=i.next()){var s=a.value;if(!(s.timestamp<=e.timestamp)&&n.isUserInteraction(s)){s.delay-e.delay>SKIP_TIME_THRESHOLD*n.config.speed&&(n.nextUserInteractionEvent=s);break}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}if(n.nextUserInteractionEvent){n.noramlSpeed=n.config.speed;var l=n.nextUserInteractionEvent.delay-e.delay,c={speed:Math.min(Math.round(l/SKIP_TIME_INTERVAL),360)};n.setConfig(c),n.emitter.emit(ReplayerEvents.SkipStart,c)}}}}return function(){r&&r(),n.lastPlayedEvent=e,e===n.events[n.events.length-1]&&(n.restoreSpeed(),n.emitter.emit(ReplayerEvents.Finish))}},e.prototype.rebuildFullSnapshot=function(e){Object.keys(this.missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.missingNodeRetryMap),this.missingNodeRetryMap={},mirror.map=rebuild(e.data.node,this.iframe.contentDocument)[1];var t=document.createElement("style"),r=this.iframe.contentDocument,n=r.documentElement,o=r.head;n.insertBefore(t,o);for(var i=rules(this.config.blockClass).concat(this.config.insertStyleRules),a=0;a<i.length;a++)t.sheet.insertRule(i[a],a);this.emitter.emit(ReplayerEvents.FullsnapshotRebuilded),this.waitForStylesheetLoad()},e.prototype.waitForStylesheetLoad=function(){var e=this,t=this.iframe.contentDocument.head;if(t){var r,n=new Set;t.querySelectorAll('link[rel="stylesheet"]').forEach(function(t){t.sheet||(0===n.size&&(e.pause(),e.emitter.emit(ReplayerEvents.LoadStylesheetStart),r=window.setTimeout(function(){e.resume(e.getCurrentTime()),r=-1},e.config.loadTimeout)),n.add(t),t.addEventListener("load",function(){n.delete(t),0===n.size&&-1!==r&&(e.resume(e.getCurrentTime()),e.emitter.emit(ReplayerEvents.LoadStylesheetEnd),r&&window.clearTimeout(r))}))})}},e.prototype.applyIncremental=function(e,t){var r=this,n=e.data;switch(n.source){case IncrementalSource.Mutation:n.removes.forEach(function(e){var t=mirror.getNode(e.id);if(!t)return r.warnNodeNotFound(n,e.id);var o=mirror.getNode(e.parentId);if(!o)return r.warnNodeNotFound(n,e.parentId);mirror.removeNodeFromMap(t),o&&o.removeChild(t)});var o=__assign({},this.missingNodeRetryMap),i=[],a=function(e){var t=mirror.getNode(e.parentId);if(!t)return i.push(e);var n=buildNodeWithSN(e.node,r.iframe.contentDocument,mirror.map,!0),a=null,s=null;e.previousId&&(a=mirror.getNode(e.previousId)),e.nextId&&(s=mirror.getNode(e.nextId)),-1!==e.previousId&&-1!==e.nextId?(a&&a.nextSibling&&a.nextSibling.parentNode?t.insertBefore(n,a.nextSibling):s&&s.parentNode?t.insertBefore(n,s):t.appendChild(n),(e.previousId||e.nextId)&&r.resolveMissingNode(o,t,n,e)):o[e.node.id]={node:n,mutation:e}};for(n.adds.forEach(function(e){a(e)});i.length;){if(i.every(function(e){return!Boolean(mirror.getNode(e.parentId))}))return i.forEach(function(e){return r.warnNodeNotFound(n,e.node.id)});var s=i.shift();a(s)}Object.keys(o).length&&Object.assign(this.missingNodeRetryMap,o),n.texts.forEach(function(e){var t=mirror.getNode(e.id);if(!t)return r.warnNodeNotFound(n,e.id);t.textContent=e.value}),n.attributes.forEach(function(e){var t=mirror.getNode(e.id);if(!t)return r.warnNodeNotFound(n,e.id);for(var o in e.attributes)if("string"==typeof o){var i=e.attributes[o];null!==i?t.setAttribute(o,i):t.removeAttribute(o)}});break;case IncrementalSource.MouseMove:if(t){var l=n.positions[n.positions.length-1];this.moveAndHover(n,l.x,l.y,l.id)}else n.positions.forEach(function(t){var o={doAction:function(){r.moveAndHover(n,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-r.baselineTime};r.timer.addAction(o)});break;case IncrementalSource.MouseInteraction:if(-1===n.id)break;var c=new Event(MouseInteractions[n.type].toLowerCase());if(!(u=mirror.getNode(n.id)))return this.debugNodeNotFound(n,n.id);switch(this.emitter.emit(ReplayerEvents.MouseInteraction,{type:n.type,target:u}),n.type){case MouseInteractions.Blur:u.blur&&u.blur();break;case MouseInteractions.Focus:u.focus&&u.focus({preventScroll:!0});break;case MouseInteractions.Click:case MouseInteractions.TouchStart:case MouseInteractions.TouchEnd:t||(this.moveAndHover(n,n.x,n.y,n.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:u.dispatchEvent(c)}break;case IncrementalSource.Scroll:if(-1===n.id)break;if(!(u=mirror.getNode(n.id)))return this.debugNodeNotFound(n,n.id);if(u===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:n.y,left:n.x,behavior:t?"auto":"smooth"});else try{u.scrollTop=n.y,u.scrollLeft=n.x}catch(e){}break;case IncrementalSource.ViewportResize:this.emitter.emit(ReplayerEvents.Resize,{width:n.width,height:n.height});break;case IncrementalSource.Input:if(-1===n.id)break;var u;if(!(u=mirror.getNode(n.id)))return this.debugNodeNotFound(n,n.id);try{u.checked=n.isChecked,u.value=n.text}catch(e){}}},e.prototype.resolveMissingNode=function(e,t,r,n){var o=n.previousId,i=n.nextId,a=o&&e[o],s=i&&e[i];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,r),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,c,u)}if(s){var d=s;c=d.node,u=d.mutation;t.insertBefore(c,r.nextSibling),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,c,u)}},e.prototype.moveAndHover=function(e,t,r,n){this.mouse.style.left=t+"px",this.mouse.style.top=r+"px";var o=mirror.getNode(n);if(!o)return this.debugNodeNotFound(e,n);this.hoverElements(o)},e.prototype.hoverElements=function(e){this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach(function(e){e.classList.remove(":hover")});for(var t=e;t;)t.classList.add(":hover"),t=t.parentElement},e.prototype.isUserInteraction=function(e){return e.type===EventType.IncrementalSnapshot&&(e.data.source>IncrementalSource.Mutation&&e.data.source<=IncrementalSource.Input)},e.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var e={speed:this.noramlSpeed};this.setConfig(e),this.emitter.emit(ReplayerEvents.SkipEnd,e),this.noramlSpeed=-1}},e.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn(REPLAY_CONSOLE_PREFIX,"Node with id '"+t+"' not found in",e)},e.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log(REPLAY_CONSOLE_PREFIX,"Node with id '"+t+"' not found in",e)},e}(),addCustomEvent=record.addCustomEvent;export{record,addCustomEvent,Replayer,mirror,EventType,IncrementalSource,MouseInteractions,ReplayerEvents};
var NodeType,__assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function __values(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function __read(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(NodeType||(NodeType={}));var _id=1,symbolAndNumberRegex=RegExp("[^a-z]");function genId(){return _id++}function getValidTagName(e){var t=e.toLowerCase().trim();return symbolAndNumberRegex.test(t)?"div":t}function getCssRulesString(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+getCssRuleString(t)},""):null}catch(e){return null}}function getCssRuleString(e){return isCSSImportRule(e)?getCssRulesString(e.styleSheet)||"":e.cssText}function isCSSImportRule(e){return"styleSheet"in e}function extractOrigin(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}var URL_IN_CSS_REF=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,RELATIVE_PATH=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,DATA_URI=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function absoluteToStylesheet(e,t){return(e||"").replace(URL_IN_CSS_REF,function(e,r,n,o){var i=r||n||o;if(!i)return e;if(!RELATIVE_PATH.test(i))return"url('"+i+"')";if(DATA_URI.test(i))return"url("+i+")";if("/"===i[0])return"url('"+(extractOrigin(t)+i)+"')";var a=t.split("/"),s=i.split("/");a.pop();for(var l=0,c=s;l<c.length;l++){var u=c[l];"."!==u&&(".."===u?a.pop():a.push(u))}return"url('"+a.join("/")+"')"})}function getAbsoluteSrcsetString(e,t){return""===t.trim()?t:t.split(",").map(function(t){var r=t.trimLeft().trimRight().split(" ");return 2===r.length?absoluteToDoc(e,r[0])+" "+r[1]:1===r.length?""+absoluteToDoc(e,r[0]):""}).join(",")}function absoluteToDoc(e,t){if(!t||""===t.trim())return t;var r=e.createElement("a");return r.href=t,r.href}function isSVGElement(e){return"svg"===e.tagName||e instanceof SVGElement}function transformAttribute(e,t,r){return"src"===t||"href"===t&&r?absoluteToDoc(e,r):"srcset"===t&&r?getAbsoluteSrcsetString(e,r):"style"===t&&r?absoluteToStylesheet(r,location.href):r}function serializeNode(e,t,r,n,o){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:NodeType.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:var i=!1;"string"==typeof r?i=e.classList.contains(r):e.classList.forEach(function(e){r.test(e)&&(i=!0)});for(var a=getValidTagName(e.tagName),s={},l=0,c=Array.from(e.attributes);l<c.length;l++){var u=c[l],d=u.name,p=u.value;s[d]=transformAttribute(t,d,p)}if("link"===a&&n){var f,m=Array.from(t.styleSheets).find(function(t){return t.href===e.href});(f=getCssRulesString(m))&&(delete s.rel,delete s.href,s._cssText=absoluteToStylesheet(f,m.href))}if("style"===a&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(f=getCssRulesString(e.sheet))&&(s._cssText=absoluteToStylesheet(f,location.href));if("input"===a||"textarea"===a||"select"===a){p=e.value;"radio"!==s.type&&"checkbox"!==s.type&&p?s.value=o?"*".repeat(p.length):p:e.checked&&(s.checked=e.checked)}if("option"===a){var h=e.parentElement;s.value===h.value&&(s.selected=e.selected)}if("canvas"===a&&(s.rr_dataURL=e.toDataURL()),"audio"!==a&&"video"!==a||(s.rr_mediaState=e.paused?"paused":"played"),i){var v=e.getBoundingClientRect(),y=v.width,g=v.height;s.rr_width=y+"px",s.rr_height=g+"px"}return{type:NodeType.Element,tagName:a,attributes:s,childNodes:[],isSVG:isSVGElement(e)||void 0,needBlock:i};case e.TEXT_NODE:var E=e.parentNode&&e.parentNode.tagName,b=e.textContent,S="STYLE"===E||void 0;return S&&b&&(b=absoluteToStylesheet(b,location.href)),"SCRIPT"===E&&(b="SCRIPT_PLACEHOLDER"),{type:NodeType.Text,textContent:b||"",isStyle:S};case e.CDATA_SECTION_NODE:return{type:NodeType.CDATA,textContent:""};case e.COMMENT_NODE:return{type:NodeType.Comment,textContent:e.textContent||""};default:return!1}}function serializeNodeWithId(e,t,r,n,o,i,a){void 0===o&&(o=!1),void 0===i&&(i=!0),void 0===a&&(a=!1);var s,l=serializeNode(e,t,n,i,a);if(!l)return console.warn(e,"not serialized"),null;s="__sn"in e?e.__sn.id:genId();var c=Object.assign(l,{id:s});e.__sn=c,r[s]=e;var u=!o;if(c.type===NodeType.Element&&(u=u&&!c.needBlock,delete c.needBlock),(c.type===NodeType.Document||c.type===NodeType.Element)&&u)for(var d=0,p=Array.from(e.childNodes);d<p.length;d++){var f=serializeNodeWithId(p[d],t,r,n,o,i,a);f&&c.childNodes.push(f)}return c}function snapshot(e,t,r,n){void 0===t&&(t="rr-block"),void 0===r&&(r=!0),void 0===n&&(n=!1);var o={};return[serializeNodeWithId(e,e,o,t,!1,r,n),o]}var commentre=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g;function parse(e,t){void 0===t&&(t={});var r=1,n=1;function o(e){var t=e.match(/\n/g);t&&(r+=t.length);var o=e.lastIndexOf("\n");n=-1===o?n+e.length:e.length-o}function i(){var e={line:r,column:n};return function(t){return t.position=new a(e),f(),t}}var a=function(){return function(e){this.start=e,this.end={line:r,column:n},this.source=t.source}}();a.prototype.content=e;var s=[];function l(o){var i=new Error(t.source+":"+r+":"+n+": "+o);if(i.reason=o,i.filename=t.source,i.line=r,i.column=n,i.source=e,!t.silent)throw i;s.push(i)}function c(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){var t,r=[];for(f(),m(r);e.length&&"}"!==e.charAt(0)&&(t=N()||_());)!1!==t&&(r.push(t),m(r));return r}function p(t){var r=t.exec(e);if(r){var n=r[0];return o(n),e=e.slice(n.length),r}}function f(){p(/^\s*/)}function m(e){var t;for(void 0===e&&(e=[]);t=h();)!1!==t&&e.push(t),t=h();return e}function h(){var t=i();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var r=2;""!==e.charAt(r)&&("*"!==e.charAt(r)||"/"!==e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return l("End of comment missing");var a=e.slice(2,r-2);return n+=2,o(a),e=e.slice(r),n+=2,t({type:"comment",comment:a})}}function v(){var e=p(/^([^{]+)/);if(e)return trim(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(e){return e.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(e){return e.replace(/\u200C/g,",")})}function y(){var e=i(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=trim(t[0]);if(!p(/^:\s*/))return l("property missing ':'");var n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:r.replace(commentre,""),value:n?trim(n[0]).replace(commentre,""):""});return p(/^[;\s]*/),o}}function g(){var e,t=[];if(!c())return l("missing '{'");for(m(t);e=y();)!1!==e&&(t.push(e),m(t)),e=y();return u()?t:l("missing '}'")}function E(){for(var e,t=[],r=i();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:g()})}var b,S=w("import"),I=w("charset"),T=w("namespace");function w(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=i(),n=p(t);if(n){var o={type:e};return o[e]=n[1].trim(),r(o)}}}function N(){if("@"===e[0])return function(){var e=i(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=p(/^([-\w]+)\s*/)))return l("@keyframes missing name");var n,o=t[1];if(!c())return l("@keyframes missing '{'");for(var a=m();n=E();)a.push(n),a=a.concat(m());return u()?e({type:"keyframes",name:o,vendor:r,keyframes:a}):l("@keyframes missing '}'")}}()||function(){var e=i(),t=p(/^@media *([^{]+)/);if(t){var r=trim(t[1]);if(!c())return l("@media missing '{'");var n=m().concat(d());return u()?e({type:"media",media:r,rules:n}):l("@media missing '}'")}}()||function(){var e=i(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:trim(t[1]),media:trim(t[2])})}()||function(){var e=i(),t=p(/^@supports *([^{]+)/);if(t){var r=trim(t[1]);if(!c())return l("@supports missing '{'");var n=m().concat(d());return u()?e({type:"supports",supports:r,rules:n}):l("@supports missing '}'")}}()||S()||I()||T()||function(){var e=i(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var r=trim(t[1]),n=trim(t[2]);if(!c())return l("@document missing '{'");var o=m().concat(d());return u()?e({type:"document",document:n,vendor:r,rules:o}):l("@document missing '}'")}}()||function(){var e=i();if(p(/^@page */)){var t=v()||[];if(!c())return l("@page missing '{'");for(var r,n=m();r=y();)n.push(r),n=n.concat(m());return u()?e({type:"page",selectors:t,declarations:n}):l("@page missing '}'")}}()||function(){var e=i();if(p(/^@host\s*/)){if(!c())return l("@host missing '{'");var t=m().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=i();if(p(/^@font-face\s*/)){if(!c())return l("@font-face missing '{'");for(var t,r=m();t=y();)r.push(t),r=r.concat(m());return u()?e({type:"font-face",declarations:r}):l("@font-face missing '}'")}}()}function _(){var e=i(),t=v();return t?(m(),e({type:"rule",selectors:t,declarations:g()})):l("selector missing")}return addParent((b=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:b,parsingErrors:s}}))}function trim(e){return e?e.replace(/^\s+|\s+$/g,""):""}function addParent(e,t){for(var r=e&&"string"==typeof e.type,n=r?e:t,o=0,i=Object.keys(e);o<i.length;o++){var a=e[i[o]];Array.isArray(a)?a.forEach(function(e){addParent(e,n)}):a&&"object"==typeof a&&addParent(a,n)}return r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var tagMap={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function getTagName(e){var t=tagMap[e.tagName]?tagMap[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}var HOVER_SELECTOR=/([^\\]):hover/g;function addHoverClass(e){var t=parse(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach(function(t){"selectors"in t&&(t.selectors||[]).forEach(function(t){if(HOVER_SELECTOR.test(t)){var r=t.replace(HOVER_SELECTOR,"$1.\\:hover");e=e.replace(t,t+", "+r)}})}),e):e}function buildNode(e,t,r){switch(e.type){case NodeType.Document:return t.implementation.createDocument(null,"",null);case NodeType.DocumentType:return t.implementation.createDocumentType(e.name,e.publicId,e.systemId);case NodeType.Element:var n,o=getTagName(e);n=e.isSVG?t.createElementNS("http://www.w3.org/2000/svg",o):t.createElement(o);var i=function(i){if(!e.attributes.hasOwnProperty(i))return"continue";var a=e.attributes[i];if(a="boolean"==typeof a?"":a,i.startsWith("rr_")){if("canvas"===o&&"rr_dataURL"===i){var s=document.createElement("img");s.src=a,s.onload=function(){var e=n.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===i&&(n.style.width=a),"rr_height"===i&&(n.style.height=a),"rr_mediaState"===i)switch(a){case"played":n.play();case"paused":n.pause()}}else{var l="textarea"===o&&"value"===i,c="style"===o&&"_cssText"===i;if(c&&r&&(a=addHoverClass(a)),l||c){for(var u=t.createTextNode(a),d=0,p=Array.from(n.childNodes);d<p.length;d++){var f=p[d];f.nodeType===n.TEXT_NODE&&n.removeChild(f)}return n.appendChild(u),"continue"}if("iframe"===o&&"src"===i)return"continue";try{e.isSVG&&"xlink:href"===i?n.setAttributeNS("http://www.w3.org/1999/xlink",i,a):n.setAttribute(i,a)}catch(e){}}};for(var a in e.attributes)i(a);return n;case NodeType.Text:return t.createTextNode(e.isStyle&&r?addHoverClass(e.textContent):e.textContent);case NodeType.CDATA:return t.createCDATASection(e.textContent);case NodeType.Comment:return t.createComment(e.textContent);default:return null}}function buildNodeWithSN(e,t,r,n,o){void 0===n&&(n=!1),void 0===o&&(o=!0);var i=buildNode(e,t,o);if(!i)return null;if(e.type===NodeType.Document&&(t.close(),t.open(),i=t),i.__sn=e,r[e.id]=i,(e.type===NodeType.Document||e.type===NodeType.Element)&&!n)for(var a=0,s=e.childNodes;a<s.length;a++){var l=s[a],c=buildNodeWithSN(l,t,r,!1,o);c?i.appendChild(c):console.warn("Failed to rebuild",l)}return i}function rebuild(e,t,r){void 0===r&&(r=!0);var n={};return[buildNodeWithSN(e,t,n,!1,r),n]}function on(e,t,r){void 0===r&&(r=document);var n={capture:!0,passive:!0};return r.addEventListener(e,t,n),function(){return r.removeEventListener(e,t,n)}}var EventType,IncrementalSource,MouseInteractions,MediaInteractions,ReplayerEvents,mirror={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return mirror.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete mirror.map[t],e.childNodes&&e.childNodes.forEach(function(e){return mirror.removeNodeFromMap(e)})},has:function(e){return mirror.map.hasOwnProperty(e)}};function throttle(e,t,r){void 0===r&&(r={});var n=null,o=0;return function(i){var a=Date.now();o||!1!==r.leading||(o=a);var s=t-(a-o),l=this,c=arguments;s<=0||s>t?(n&&(window.clearTimeout(n),n=null),o=a,e.apply(l,c)):n||!1===r.trailing||(n=window.setTimeout(function(){o=!1===r.leading?0:Date.now(),n=null,e.apply(l,c)},s))}}function hookSetter(e,t,r,n){var o=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,n?r:{set:function(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return hookSetter(e,t,o||{},!0)}}function getWindowHeight(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function getWindowWidth(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function isBlocked(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var r=!1;return"string"==typeof t?r=e.classList.contains(t):e.classList.forEach(function(e){t.test(e)&&(r=!0)}),r||isBlocked(e.parentNode,t)}return isBlocked(e.parentNode,t)}function isAncestorRemoved(e){var t=mirror.getId(e);return!mirror.has(t)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||isAncestorRemoved(e.parentNode))}function isTouchEvent(e){return Boolean(e.changedTouches)}function polyfill(){"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)}function deepDelete(e,t){e.delete(t),t.childNodes.forEach(function(t){return deepDelete(e,t)})}function isParentRemoved(e,t){var r=t.parentNode;if(!r)return!1;var n=mirror.getId(r);return!!e.some(function(e){return e.id===n})||isParentRemoved(e,r)}function isAncestorInSet(e,t){var r=t.parentNode;return!!r&&(!!e.has(r)||isAncestorInSet(e,r))}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom"}(EventType||(EventType={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule"}(IncrementalSource||(IncrementalSource={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(MouseInteractions||(MouseInteractions={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(MediaInteractions||(MediaInteractions={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast"}(ReplayerEvents||(ReplayerEvents={}));var moveKey=function(e,t){return e+"@"+t};function isINode(e){return"__sn"in e}function initMutationObserver(e,t,r,n){var o=new MutationObserver(function(o){var i,a,s,l,c=[],u=[],d=[],p=[],f=new Set,m=new Set,h=new Set,v={},y=function(e,r){if(!isBlocked(e,t)){if(isINode(e)){m.add(e);var n=null;r&&isINode(r)&&(n=r.__sn.id),n&&(v[moveKey(e.__sn.id,n)]=!0)}else f.add(e),h.delete(e);e.childNodes.forEach(function(e){return y(e)})}};o.forEach(function(e){var r=e.type,n=e.target,o=e.oldValue,i=e.addedNodes,a=e.removedNodes,s=e.attributeName;switch(r){case"characterData":var l=n.textContent;isBlocked(n,t)||l===o||c.push({value:l,node:n});break;case"attributes":l=n.getAttribute(s);if(isBlocked(n,t)||l===o)return;var p=u.find(function(e){return e.node===n});p||(p={node:n,attributes:{}},u.push(p)),p.attributes[s]=transformAttribute(document,s,l);break;case"childList":i.forEach(function(e){return y(e,n)}),a.forEach(function(e){var r=mirror.getId(e),o=mirror.getId(n);isBlocked(e,t)||(f.has(e)?(deepDelete(f,e),h.add(e)):f.has(n)&&-1===r||isAncestorRemoved(n)||(m.has(e)&&v[moveKey(r,o)]?deepDelete(m,e):d.push({parentId:o,id:r})),mirror.removeNodeFromMap(e))})}});var g=[],E=function(e){var o=mirror.getId(e.parentNode);if(-1===o)return g.push(e);p.push({parentId:o,previousId:e.previousSibling?mirror.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?mirror.getId(e.nextSibling):e.nextSibling,node:serializeNodeWithId(e,document,mirror.map,t,!0,r,n)})};try{for(var b=__values(m),S=b.next();!S.done;S=b.next()){E(w=S.value)}}catch(e){i={error:e}}finally{try{S&&!S.done&&(a=b.return)&&a.call(b)}finally{if(i)throw i.error}}try{for(var I=__values(f),T=I.next();!T.done;T=I.next()){var w=T.value;isAncestorInSet(h,w)||isParentRemoved(d,w)?isAncestorInSet(m,w)?E(w):h.add(w):E(w)}}catch(e){s={error:e}}finally{try{T&&!T.done&&(l=I.return)&&l.call(I)}finally{if(s)throw s.error}}for(;g.length&&!g.every(function(e){return-1===mirror.getId(e.parentNode)});)E(g.shift());var N={texts:c.map(function(e){return{id:mirror.getId(e.node),value:e.value}}).filter(function(e){return mirror.has(e.id)}),attributes:u.map(function(e){return{id:mirror.getId(e.node),attributes:e.attributes}}).filter(function(e){return mirror.has(e.id)}),removes:d,adds:p};(N.texts.length||N.attributes.length||N.removes.length||N.adds.length)&&e(N)});return o.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function initMoveObserver(e,t){var r,n=[],o=throttle(function(t){var o=Date.now()-r;e(n.map(function(e){return e.timeOffset-=o,e}),t?IncrementalSource.TouchMove:IncrementalSource.MouseMove),n=[],r=null},500),i=throttle(function(e){var t=e.target,i=isTouchEvent(e)?e.changedTouches[0]:e,a=i.clientX,s=i.clientY;r||(r=Date.now()),n.push({x:a,y:s,id:mirror.getId(t),timeOffset:Date.now()-r}),o(isTouchEvent(e))},t,{trailing:!1}),a=[on("mousemove",i),on("touchmove",i)];return function(){a.forEach(function(e){return e()})}}function initMouseInteractionObserver(e,t){var r=[];return Object.keys(MouseInteractions).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")}).forEach(function(n){var o=n.toLowerCase(),i=function(r){return function(n){if(!isBlocked(n.target,t)){var o=mirror.getId(n.target),i=isTouchEvent(n)?n.changedTouches[0]:n,a=i.clientX,s=i.clientY;e({type:MouseInteractions[r],id:o,x:a,y:s})}}}(n);r.push(on(o,i))}),function(){r.forEach(function(e){return e()})}}function initScrollObserver(e,t){return on("scroll",throttle(function(r){if(r.target&&!isBlocked(r.target,t)){var n=mirror.getId(r.target);if(r.target===document){var o=document.scrollingElement||document.documentElement;e({id:n,x:o.scrollLeft,y:o.scrollTop})}else e({id:n,x:r.target.scrollLeft,y:r.target.scrollTop})}},100))}function initViewportResizeObserver(e){return on("resize",throttle(function(){var t=getWindowHeight(),r=getWindowWidth();e({width:Number(r),height:Number(t)})},200),window)}var wrappedEmit,INPUT_TAGS=["INPUT","TEXTAREA","SELECT"],MASK_TYPES=["color","date","datetime-local","email","month","number","range","search","tel","text","time","url","week"],lastInputValueMap=new WeakMap;function initInputObserver(e,t,r,n){function o(e){var o=e.target;if(o&&o.tagName&&!(INPUT_TAGS.indexOf(o.tagName)<0)&&!isBlocked(o,t)){var a=o.type;if("password"!==a&&!o.classList.contains(r)){var s=o.value,l=!1,c=MASK_TYPES.includes(a)||"TEXTAREA"===o.tagName;"radio"===a||"checkbox"===a?l=o.checked:c&&n&&(s="*".repeat(s.length)),i(o,{text:s,isChecked:l});var u=o.name;"radio"===a&&u&&l&&document.querySelectorAll('input[type="radio"][name="'+u+'"]').forEach(function(e){e!==o&&i(e,{text:e.value,isChecked:!l})})}}}function i(t,r){var n=lastInputValueMap.get(t);if(!n||n.text!==r.text||n.isChecked!==r.isChecked){lastInputValueMap.set(t,r);var o=mirror.getId(t);e(__assign({},r,{id:o}))}}var a=["input","change"].map(function(e){return on(e,o)}),s=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),l=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return s&&s.set&&a.push.apply(a,__spread(l.map(function(e){return hookSetter(e[0],e[1],{set:function(){o({target:this})}})}))),function(){a.forEach(function(e){return e()})}}function initStyleSheetObserver(e){var t=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(r,n){return e({id:mirror.getId(this.ownerNode),adds:[{rule:r,index:n}]}),t.apply(this,arguments)};var r=CSSStyleSheet.prototype.deleteRule;return CSSStyleSheet.prototype.deleteRule=function(t){return e({id:mirror.getId(this.ownerNode),removes:[{index:t}]}),r.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=t,CSSStyleSheet.prototype.deleteRule=r}}function initMediaInteractionObserver(e,t){var r=function(r){return function(n){var o=n.target;o&&!isBlocked(o,t)&&e({type:"play"===r?MediaInteractions.Play:MediaInteractions.Pause,id:mirror.getId(o)})}},n=[on("play",r("play")),on("pause",r("pause"))];return function(){n.forEach(function(e){return e()})}}function mergeHooks(e,t){var r=e.mutationCb,n=e.mousemoveCb,o=e.mouseInteractionCb,i=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb;e.mutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mutation&&t.mutation.apply(t,__spread(e)),r.apply(void 0,__spread(e))},e.mousemoveCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mousemove&&t.mousemove.apply(t,__spread(e)),n.apply(void 0,__spread(e))},e.mouseInteractionCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mouseInteraction&&t.mouseInteraction.apply(t,__spread(e)),o.apply(void 0,__spread(e))},e.scrollCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.scroll&&t.scroll.apply(t,__spread(e)),i.apply(void 0,__spread(e))},e.viewportResizeCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.viewportResize&&t.viewportResize.apply(t,__spread(e)),a.apply(void 0,__spread(e))},e.inputCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.input&&t.input.apply(t,__spread(e)),s.apply(void 0,__spread(e))},e.mediaInteractionCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mediaInteaction&&t.mediaInteaction.apply(t,__spread(e)),l.apply(void 0,__spread(e))},e.styleSheetRuleCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.styleSheetRule&&t.styleSheetRule.apply(t,__spread(e)),c.apply(void 0,__spread(e))}}function initObservers(e,t){void 0===t&&(t={}),mergeHooks(e,t);var r=initMutationObserver(e.mutationCb,e.blockClass,e.inlineStylesheet,e.maskAllInputs),n=initMoveObserver(e.mousemoveCb,e.mousemoveWait),o=initMouseInteractionObserver(e.mouseInteractionCb,e.blockClass),i=initScrollObserver(e.scrollCb,e.blockClass),a=initViewportResizeObserver(e.viewportResizeCb),s=initInputObserver(e.inputCb,e.blockClass,e.ignoreClass,e.maskAllInputs),l=initMediaInteractionObserver(e.mediaInteractionCb,e.blockClass),c=initStyleSheetObserver(e.styleSheetRuleCb);return function(){r.disconnect(),n(),o(),i(),a(),s(),l(),c()}}function wrapEvent(e){return __assign({},e,{timestamp:Date.now()})}function record(e){void 0===e&&(e={});var t,r=e.emit,n=e.checkoutEveryNms,o=e.checkoutEveryNth,i=e.blockClass,a=void 0===i?"rr-block":i,s=e.ignoreClass,l=void 0===s?"rr-ignore":s,c=e.inlineStylesheet,u=void 0===c||c,d=e.maskAllInputs,p=void 0!==d&&d,f=e.hooks,m=e.mousemoveWait,h=void 0===m?50:m;if(!r)throw new Error("emit function is required");polyfill();var v=0;function y(e){void 0===e&&(e=!1),wrappedEmit(wrapEvent({type:EventType.Meta,data:{href:window.location.href,width:getWindowWidth(),height:getWindowHeight()}}),e);var t=__read(snapshot(document,a,u,p),2),r=t[0],n=t[1];if(!r)return console.warn("Failed to snapshot the document");mirror.map=n,wrappedEmit(wrapEvent({type:EventType.FullSnapshot,data:{node:r,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}}))}wrappedEmit=function(e,i){if(r(e,i),e.type===EventType.FullSnapshot)t=e,v=0;else if(e.type===EventType.IncrementalSnapshot){v++;var a=o&&v>=o,s=n&&e.timestamp-t.timestamp>n;(a||s)&&y(!0)}};try{var g=[];g.push(on("DOMContentLoaded",function(){wrappedEmit(wrapEvent({type:EventType.DomContentLoaded,data:{}}))}));var E=function(){y(),g.push(initObservers({mutationCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Mutation},e)}))},mousemoveCb:function(e,t){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.MouseInteraction},e)}))},scrollCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Scroll},e)}))},viewportResizeCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.ViewportResize},e)}))},inputCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Input},e)}))},mediaInteractionCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return wrappedEmit(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.StyleSheetRule},e)}))},blockClass:a,ignoreClass:l,maskAllInputs:p,inlineStylesheet:u,mousemoveWait:h},f))};return"interactive"===document.readyState||"complete"===document.readyState?E():g.push(on("load",function(){wrappedEmit(wrapEvent({type:EventType.Load,data:{}})),E()},window)),function(){g.forEach(function(e){return e()})}}catch(e){console.warn(e)}}function mitt(e){return e=e||Object.create(null),{on:function(t,r){(e[t]||(e[t]=[])).push(r)},off:function(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit:function(t,r){(e[t]||[]).slice().map(function(e){e(r)}),(e["*"]||[]).slice().map(function(e){e(t,r)})}}}record.addCustomEvent=function(e,t){if(!wrappedEmit)throw new Error("please add custom event after start recording");wrappedEmit(wrapEvent({type:EventType.Custom,data:{tag:e,payload:t}}))};var mittProxy=Object.freeze({default:mitt});function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var smoothscroll=createCommonjsModule(function(e,t){!function(){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)){var r,n=e.HTMLElement||e.Element,o=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||l,scrollIntoView:n.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(r=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?m.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):i.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(c(arguments[0])?i.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):m.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},n.prototype.scroll=n.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;m.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},n.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},n.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var r=function(e){for(;e!==t.body&&!1===p(e);)e=e.parentNode||e.host;return e}(this),n=r.getBoundingClientRect(),o=this.getBoundingClientRect();r!==t.body?(m.call(this,r,r.scrollLeft+o.left-n.left,r.scrollTop+o.top-n.top),"fixed"!==e.getComputedStyle(r).position&&e.scrollBy({left:n.left,top:n.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function l(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,r){var n=e.getComputedStyle(t,null)["overflow"+r];return"auto"===n||"scroll"===n}function p(e){var t=u(e,"Y")&&d(e,"Y"),r=u(e,"X")&&d(e,"X");return t||r}function f(t){var r,n,i,s,l=(a()-t.startTime)/o;s=l=l>1?1:l,r=.5*(1-Math.cos(Math.PI*s)),n=t.startX+(t.x-t.startX)*r,i=t.startY+(t.y-t.startY)*r,t.method.call(t.scrollable,n,i),n===t.x&&i===t.y||e.requestAnimationFrame(f.bind(e,t))}function m(r,n,o){var s,c,u,d,p=a();r===t.body?(s=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(s=r,c=r.scrollLeft,u=r.scrollTop,d=l),f({scrollable:s,method:d,startTime:p,startX:c,startY:u,x:n,y:o})}}}}()}),smoothscroll_1=smoothscroll.polyfill,Timer=function(){function e(e,t){void 0===t&&(t=[]),this.timeOffset=0,this.actions=t,this.config=e}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){var t;(t=this.actions).push.apply(t,__spread(e))},e.prototype.start=function(){this.actions.sort(function(e,t){return e.delay-t.delay}),this.timeOffset=0;var e=performance.now(),t=this.actions,r=this.config,n=this;this.raf=requestAnimationFrame(function o(i){for(n.timeOffset+=(i-e)*r.speed,e=i;t.length;){var a=t[0];if(!(n.timeOffset>=a.delay))break;t.shift(),a.doAction()}(t.length>0||n.config.liveMode)&&(n.raf=requestAnimationFrame(o))})},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},e.prototype.findActionIndex=function(e){for(var t=0,r=this.actions.length-1;t<=r;){var n=Math.floor((t+r)/2);if(this.actions[n].delay<e.delay)t=n+1;else{if(!(this.actions[n].delay>e.delay))return n;r=n-1}}return t},e}(),rules=function(e){return["iframe, ."+e+" { background: #ccc }","noscript { display: none !important; }"]},SKIP_TIME_THRESHOLD=1e4,SKIP_TIME_INTERVAL=5e3,mitt$1=mitt||mittProxy,REPLAY_CONSOLE_PREFIX="[replayer]",Replayer=function(){function e(e,t){if(this.events=[],this.emitter=mitt$1(),this.baselineTime=0,this.noramlSpeed=-1,this.missingNodeRetryMap={},e.length<2)throw new Error("Replayer need at least 2 events.");this.events=e,this.handleResize=this.handleResize.bind(this);var r={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[]};this.config=Object.assign({},r,t),this.timer=new Timer(this.config),smoothscroll_1(),polyfill(),this.setupDom(),this.emitter.on("resize",this.handleResize)}return e.prototype.on=function(e,t){this.emitter.on(e,t)},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach(function(r){t.config[r]=e[r]}),this.config.skipInactive||(this.noramlSpeed=-1)},e.prototype.getMetaData=function(){var e=this.events[0];return{totalTime:this.events[this.events.length-1].timestamp-e.timestamp}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){return this.baselineTime-this.events[0].timestamp},e.prototype.play=function(e){var t,r,n=this;void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;var o=new Array,i=function(e){var t=e.timestamp<a.baselineTime,r=a.getCastFn(e,t);t?r():o.push({doAction:function(){r(),n.emitter.emit(ReplayerEvents.EventCast,e)},delay:a.getDelay(e)})},a=this;try{for(var s=__values(this.events),l=s.next();!l.done;l=s.next()){i(l.value)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}this.timer.addActions(o),this.timer.start(),this.emitter.emit(ReplayerEvents.Start)},e.prototype.pause=function(){this.timer.clear(),this.emitter.emit(ReplayerEvents.Pause)},e.prototype.resume=function(e){var t,r;void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;var n=new Array;try{for(var o=__values(this.events),i=o.next();!i.done;i=o.next()){var a=i.value;if(!(a.timestamp<=this.lastPlayedEvent.timestamp||a===this.lastPlayedEvent)){var s=this.getCastFn(a);n.push({doAction:s,delay:this.getDelay(a)})}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}this.timer.addActions(n),this.timer.start(),this.emitter.emit(ReplayerEvents.Resume)},e.prototype.addEvent=function(e){this.getCastFn(e,!0)()},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.iframe.setAttribute("scrolling","no"),this.iframe.setAttribute("style","pointer-events: none"),this.wrapper.appendChild(this.iframe)},e.prototype.handleResize=function(e){this.iframe.width=e.width+"px",this.iframe.height=e.height+"px"},e.prototype.getDelay=function(e){if(e.type===EventType.IncrementalSnapshot&&e.data.source===IncrementalSource.MouseMove){var t=e.data.positions[0].timeOffset,r=e.timestamp+t;return e.delay=r-this.baselineTime,r-this.baselineTime}return e.delay=e.timestamp-this.baselineTime,e.timestamp-this.baselineTime},e.prototype.getCastFn=function(e,t){var r,n=this;switch(void 0===t&&(t=!1),e.type){case EventType.DomContentLoaded:case EventType.Load:break;case EventType.Meta:r=function(){return n.emitter.emit(ReplayerEvents.Resize,{width:e.data.width,height:e.data.height})};break;case EventType.FullSnapshot:r=function(){n.rebuildFullSnapshot(e),n.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case EventType.IncrementalSnapshot:r=function(){var r,o;if(n.applyIncremental(e,t),e===n.nextUserInteractionEvent&&(n.nextUserInteractionEvent=null,n.restoreSpeed()),n.config.skipInactive&&!n.nextUserInteractionEvent){try{for(var i=__values(n.events),a=i.next();!a.done;a=i.next()){var s=a.value;if(!(s.timestamp<=e.timestamp)&&n.isUserInteraction(s)){s.delay-e.delay>SKIP_TIME_THRESHOLD*n.config.speed&&(n.nextUserInteractionEvent=s);break}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}if(n.nextUserInteractionEvent){n.noramlSpeed=n.config.speed;var l=n.nextUserInteractionEvent.delay-e.delay,c={speed:Math.min(Math.round(l/SKIP_TIME_INTERVAL),360)};n.setConfig(c),n.emitter.emit(ReplayerEvents.SkipStart,c)}}}}return function(){r&&r(),n.lastPlayedEvent=e,e===n.events[n.events.length-1]&&(n.restoreSpeed(),n.emitter.emit(ReplayerEvents.Finish))}},e.prototype.rebuildFullSnapshot=function(e){Object.keys(this.missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.missingNodeRetryMap),this.missingNodeRetryMap={},mirror.map=rebuild(e.data.node,this.iframe.contentDocument)[1];var t=document.createElement("style"),r=this.iframe.contentDocument,n=r.documentElement,o=r.head;n.insertBefore(t,o);for(var i=rules(this.config.blockClass).concat(this.config.insertStyleRules),a=0;a<i.length;a++)t.sheet.insertRule(i[a],a);this.emitter.emit(ReplayerEvents.FullsnapshotRebuilded),this.waitForStylesheetLoad()},e.prototype.waitForStylesheetLoad=function(){var e=this,t=this.iframe.contentDocument.head;if(t){var r,n=new Set;t.querySelectorAll('link[rel="stylesheet"]').forEach(function(t){t.sheet||(0===n.size&&(e.pause(),e.emitter.emit(ReplayerEvents.LoadStylesheetStart),r=window.setTimeout(function(){e.resume(e.getCurrentTime()),r=-1},e.config.loadTimeout)),n.add(t),t.addEventListener("load",function(){n.delete(t),0===n.size&&-1!==r&&(e.resume(e.getCurrentTime()),e.emitter.emit(ReplayerEvents.LoadStylesheetEnd),r&&window.clearTimeout(r))}))})}},e.prototype.applyIncremental=function(e,t){var r=this,n=e.data;switch(n.source){case IncrementalSource.Mutation:n.removes.forEach(function(e){var t=mirror.getNode(e.id);if(!t)return r.warnNodeNotFound(n,e.id);var o=mirror.getNode(e.parentId);if(!o)return r.warnNodeNotFound(n,e.parentId);mirror.removeNodeFromMap(t),o&&o.removeChild(t)});var o=__assign({},this.missingNodeRetryMap),i=[],a=function(e){var t=mirror.getNode(e.parentId);if(!t)return i.push(e);var n=buildNodeWithSN(e.node,r.iframe.contentDocument,mirror.map,!0),a=null,s=null;e.previousId&&(a=mirror.getNode(e.previousId)),e.nextId&&(s=mirror.getNode(e.nextId)),-1!==e.previousId&&-1!==e.nextId?(a&&a.nextSibling&&a.nextSibling.parentNode?t.insertBefore(n,a.nextSibling):s&&s.parentNode?t.insertBefore(n,s):t.appendChild(n),(e.previousId||e.nextId)&&r.resolveMissingNode(o,t,n,e)):o[e.node.id]={node:n,mutation:e}};for(n.adds.forEach(function(e){a(e)});i.length;){if(i.every(function(e){return!Boolean(mirror.getNode(e.parentId))}))return i.forEach(function(e){return r.warnNodeNotFound(n,e.node.id)});var s=i.shift();a(s)}Object.keys(o).length&&Object.assign(this.missingNodeRetryMap,o),n.texts.forEach(function(e){var t=mirror.getNode(e.id);if(!t)return r.warnNodeNotFound(n,e.id);t.textContent=e.value}),n.attributes.forEach(function(e){var t=mirror.getNode(e.id);if(!t)return r.warnNodeNotFound(n,e.id);for(var o in e.attributes)if("string"==typeof o){var i=e.attributes[o];null!==i?t.setAttribute(o,i):t.removeAttribute(o)}});break;case IncrementalSource.MouseMove:if(t){var l=n.positions[n.positions.length-1];this.moveAndHover(n,l.x,l.y,l.id)}else n.positions.forEach(function(t){var o={doAction:function(){r.moveAndHover(n,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-r.baselineTime};r.timer.addAction(o)});break;case IncrementalSource.MouseInteraction:if(-1===n.id)break;var c=new Event(MouseInteractions[n.type].toLowerCase());if(!(d=mirror.getNode(n.id)))return this.debugNodeNotFound(n,n.id);switch(this.emitter.emit(ReplayerEvents.MouseInteraction,{type:n.type,target:d}),n.type){case MouseInteractions.Blur:d.blur&&d.blur();break;case MouseInteractions.Focus:d.focus&&d.focus({preventScroll:!0});break;case MouseInteractions.Click:case MouseInteractions.TouchStart:case MouseInteractions.TouchEnd:t||(this.moveAndHover(n,n.x,n.y,n.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:d.dispatchEvent(c)}break;case IncrementalSource.Scroll:if(-1===n.id)break;if(!(d=mirror.getNode(n.id)))return this.debugNodeNotFound(n,n.id);if(d===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:n.y,left:n.x,behavior:t?"auto":"smooth"});else try{d.scrollTop=n.y,d.scrollLeft=n.x}catch(e){}break;case IncrementalSource.ViewportResize:this.emitter.emit(ReplayerEvents.Resize,{width:n.width,height:n.height});break;case IncrementalSource.Input:if(-1===n.id)break;if(!(d=mirror.getNode(n.id)))return this.debugNodeNotFound(n,n.id);try{d.checked=n.isChecked,d.value=n.text}catch(e){}break;case IncrementalSource.MediaInteraction:if(!(d=mirror.getNode(n.id)))return this.debugNodeNotFound(n,n.id);var u=d;n.type===MediaInteractions.Pause&&u.pause(),n.type===MediaInteractions.Play&&(u.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?u.play():u.addEventListener("canplay",function(){u.play()}));break;case IncrementalSource.StyleSheetRule:var d;if(!(d=mirror.getNode(n.id)))return this.debugNodeNotFound(n,n.id);var p=d.sheet;n.adds&&n.adds.forEach(function(e){var t=e.rule,r=e.index;p.insertRule(t,r)}),n.removes&&n.removes.forEach(function(e){var t=e.index;p.deleteRule(t)})}},e.prototype.resolveMissingNode=function(e,t,r,n){var o=n.previousId,i=n.nextId,a=o&&e[o],s=i&&e[i];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,r),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,c,u)}if(s){var d=s;c=d.node,u=d.mutation;t.insertBefore(c,r.nextSibling),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,c,u)}},e.prototype.moveAndHover=function(e,t,r,n){this.mouse.style.left=t+"px",this.mouse.style.top=r+"px";var o=mirror.getNode(n);if(!o)return this.debugNodeNotFound(e,n);this.hoverElements(o)},e.prototype.hoverElements=function(e){this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach(function(e){e.classList.remove(":hover")});for(var t=e;t;)t.classList.add(":hover"),t=t.parentElement},e.prototype.isUserInteraction=function(e){return e.type===EventType.IncrementalSnapshot&&(e.data.source>IncrementalSource.Mutation&&e.data.source<=IncrementalSource.Input)},e.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var e={speed:this.noramlSpeed};this.setConfig(e),this.emitter.emit(ReplayerEvents.SkipEnd,e),this.noramlSpeed=-1}},e.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn(REPLAY_CONSOLE_PREFIX,"Node with id '"+t+"' not found in",e)},e.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log(REPLAY_CONSOLE_PREFIX,"Node with id '"+t+"' not found in",e)},e}(),addCustomEvent=record.addCustomEvent;export{record,addCustomEvent,Replayer,mirror,EventType,IncrementalSource,MouseInteractions,ReplayerEvents};
//# sourceMappingURL=rrweb.min.js.map

@@ -74,5 +74,13 @@ 'use strict';

var _id = 1;
var symbolAndNumberRegex = RegExp('[^a-z]');
function genId() {
return _id++;
}
function getValidTagName(tagName) {
var processedTagName = tagName.toLowerCase().trim();
if (symbolAndNumberRegex.test(processedTagName)) {
return 'div';
}
return processedTagName;
}
function getCssRulesString(s) {

@@ -115,3 +123,3 @@ try {

function absoluteToStylesheet(cssText, href) {
return cssText.replace(URL_IN_CSS_REF, function (origin, path1, path2, path3) {
return (cssText || '').replace(URL_IN_CSS_REF, function (origin, path1, path2, path3) {
var filePath = path1 || path2 || path3;

@@ -171,3 +179,3 @@ if (!filePath) {

function absoluteToDoc(doc, attributeValue) {
if (attributeValue.trim() === '') {
if (!attributeValue || attributeValue.trim() === '') {
return attributeValue;

@@ -183,9 +191,9 @@ }

function transformAttribute(doc, name, value) {
if (name === 'src' || name === 'href') {
if (name === 'src' || (name === 'href' && value)) {
return absoluteToDoc(doc, value);
}
else if (name === 'srcset') {
else if (name === 'srcset' && value) {
return getAbsoluteSrcsetString(doc, value);
}
else if (name === 'style') {
else if (name === 'style' && value) {
return absoluteToStylesheet(value, location.href);

@@ -223,3 +231,3 @@ }

}
var tagName = n.tagName.toLowerCase();
var tagName = getValidTagName(n.tagName);
var attributes_1 = {};

@@ -246,4 +254,3 @@ for (var _i = 0, _a = Array.from(n.attributes); _i < _a.length; _i++) {

'').trim().length) {
var cssText = getCssRulesString(n
.sheet);
var cssText = getCssRulesString(n.sheet);
if (cssText) {

@@ -275,2 +282,7 @@ attributes_1._cssText = absoluteToStylesheet(cssText, location.href);

}
if (tagName === 'audio' || tagName === 'video') {
attributes_1.rr_mediaState = n.paused
? 'paused'
: 'played';
}
if (needBlock_1) {

@@ -514,2 +526,4 @@ var _c = n.getBoundingClientRect(), width = _c.width, height = _c.height;

IncrementalSource[IncrementalSource["TouchMove"] = 6] = "TouchMove";
IncrementalSource[IncrementalSource["MediaInteraction"] = 7] = "MediaInteraction";
IncrementalSource[IncrementalSource["StyleSheetRule"] = 8] = "StyleSheetRule";
})(IncrementalSource || (IncrementalSource = {}));

@@ -529,2 +543,7 @@ var MouseInteractions;

})(MouseInteractions || (MouseInteractions = {}));
var MediaInteractions;
(function (MediaInteractions) {
MediaInteractions[MediaInteractions["Play"] = 0] = "Play";
MediaInteractions[MediaInteractions["Pause"] = 1] = "Pause";
})(MediaInteractions || (MediaInteractions = {}));
var ReplayerEvents;

@@ -543,2 +562,3 @@ (function (ReplayerEvents) {

ReplayerEvents["MouseInteraction"] = "mouse-interaction";
ReplayerEvents["EventCast"] = "event-cast";
})(ReplayerEvents || (ReplayerEvents = {}));

@@ -950,4 +970,42 @@

}
function initStyleSheetObserver(cb) {
var insertRule = CSSStyleSheet.prototype.insertRule;
CSSStyleSheet.prototype.insertRule = function (rule, index) {
cb({
id: mirror.getId(this.ownerNode),
adds: [{ rule: rule, index: index }]
});
return insertRule.apply(this, arguments);
};
var deleteRule = CSSStyleSheet.prototype.deleteRule;
CSSStyleSheet.prototype.deleteRule = function (index) {
cb({
id: mirror.getId(this.ownerNode),
removes: [{ index: index }]
});
return deleteRule.apply(this, arguments);
};
return function () {
CSSStyleSheet.prototype.insertRule = insertRule;
CSSStyleSheet.prototype.deleteRule = deleteRule;
};
}
function initMediaInteractionObserver(mediaInteractionCb, blockClass) {
var handler = function (type) { return function (event) {
var target = event.target;
if (!target || isBlocked(target, blockClass)) {
return;
}
mediaInteractionCb({
type: type === 'play' ? MediaInteractions.Play : MediaInteractions.Pause,
id: mirror.getId(target)
});
}; };
var handlers = [on('play', handler('play')), on('pause', handler('pause'))];
return function () {
handlers.forEach(function (h) { return h(); });
};
}
function mergeHooks(o, hooks) {
var mutationCb = o.mutationCb, mousemoveCb = o.mousemoveCb, mouseInteractionCb = o.mouseInteractionCb, scrollCb = o.scrollCb, viewportResizeCb = o.viewportResizeCb, inputCb = o.inputCb;
var mutationCb = o.mutationCb, mousemoveCb = o.mousemoveCb, mouseInteractionCb = o.mouseInteractionCb, scrollCb = o.scrollCb, viewportResizeCb = o.viewportResizeCb, inputCb = o.inputCb, mediaInteractionCb = o.mediaInteractionCb, styleSheetRuleCb = o.styleSheetRuleCb;
o.mutationCb = function () {

@@ -1013,2 +1071,22 @@ var p = [];

};
o.mediaInteractionCb = function () {
var p = [];
for (var _i = 0; _i < arguments.length; _i++) {
p[_i] = arguments[_i];
}
if (hooks.mediaInteaction) {
hooks.mediaInteaction.apply(hooks, __spread(p));
}
mediaInteractionCb.apply(void 0, __spread(p));
};
o.styleSheetRuleCb = function () {
var p = [];
for (var _i = 0; _i < arguments.length; _i++) {
p[_i] = arguments[_i];
}
if (hooks.styleSheetRule) {
hooks.styleSheetRule.apply(hooks, __spread(p));
}
styleSheetRuleCb.apply(void 0, __spread(p));
};
}

@@ -1024,2 +1102,4 @@ function initObservers(o, hooks) {

var inputHandler = initInputObserver(o.inputCb, o.blockClass, o.ignoreClass, o.maskAllInputs);
var mediaInteractionHandler = initMediaInteractionObserver(o.mediaInteractionCb, o.blockClass);
var styleSheetObserver = initStyleSheetObserver(o.styleSheetRuleCb);
return function () {

@@ -1032,2 +1112,4 @@ mutationObserver.disconnect();

inputHandler();
mediaInteractionHandler();
styleSheetObserver();
};

@@ -1141,2 +1223,14 @@ }

},
mediaInteractionCb: function (p) {
return wrappedEmit(wrapEvent({
type: EventType.IncrementalSnapshot,
data: __assign({ source: IncrementalSource.MediaInteraction }, p)
}));
},
styleSheetRuleCb: function (r) {
return wrappedEmit(wrapEvent({
type: EventType.IncrementalSnapshot,
data: __assign({ source: IncrementalSource.StyleSheetRule }, r)
}));
},
blockClass: blockClass,

@@ -1143,0 +1237,0 @@ ignoreClass: ignoreClass,

{
"name": "rrweb",
"version": "0.7.27",
"version": "0.7.28",
"description": "record and replay the web",
"scripts": {
"test": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register test/**/*.test.ts",
"test:watch": "PUPPETEER_HEADLESS=true npm run test -- --watch --watch-extensions js,ts",
"repl": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true ts-node scripts/repl.ts",

@@ -61,5 +62,5 @@ "bundle:browser": "cross-env BROWSER_ONLY=true rollup --config",

"mitt": "^1.1.3",
"rrweb-snapshot": "^0.7.21",
"rrweb-snapshot": "^0.7.25",
"smoothscroll-polyfill": "^0.4.3"
}
}

@@ -47,2 +47,3 @@ import { serializedNodeWithId, idNodeMap, INode } from 'rrweb-snapshot';

};
export declare type styleSheetEvent = {};
export declare enum IncrementalSource {

@@ -55,3 +56,5 @@ Mutation = 0,

Input = 5,
TouchMove = 6
TouchMove = 6,
MediaInteraction = 7,
StyleSheetRule = 8
}

@@ -78,3 +81,9 @@ export declare type mutationData = {

} & inputValue;
export declare type incrementalData = mutationData | mousemoveData | mouseInteractionData | scrollData | viewportResizeData | inputData;
export declare type mediaInteractionData = {
source: IncrementalSource.MediaInteraction;
} & mediaInteractionParam;
export declare type styleSheetRuleData = {
source: IncrementalSource.StyleSheetRule;
} & styleSheetRuleParam;
export declare type incrementalData = mutationData | mousemoveData | mouseInteractionData | scrollData | viewportResizeData | inputData | mediaInteractionData | styleSheetRuleData;
export declare type event = domContentLoadedEvent | loadedEvent | fullSnapshotEvent | incrementalSnapshotEvent | metaEvent | customEvent;

@@ -104,2 +113,3 @@ export declare type eventWithTime = event & {

inputCb: inputCallback;
mediaInteractionCb: mediaInteractionCallback;
blockClass: blockClass;

@@ -109,2 +119,3 @@ ignoreClass: string;

inlineStylesheet: boolean;
styleSheetRuleCb: styleSheetRuleCallback;
mousemoveWait: number;

@@ -119,2 +130,4 @@ };

input?: inputCallback;
mediaInteaction?: mediaInteractionCallback;
styleSheetRule?: styleSheetRuleCallback;
};

@@ -190,2 +203,15 @@ export declare type textCursor = {

export declare type scrollCallback = (p: scrollPosition) => void;
export declare type styleSheetAddRule = {
rule: string;
index?: number;
};
export declare type styleSheetDeleteRule = {
index: number;
};
export declare type styleSheetRuleParam = {
id: number;
removes?: styleSheetDeleteRule[];
adds?: styleSheetAddRule[];
};
export declare type styleSheetRuleCallback = (s: styleSheetRuleParam) => void;
export declare type viewportResizeDimention = {

@@ -203,2 +229,11 @@ width: number;

}) => void;
export declare const enum MediaInteractions {
Play = 0,
Pause = 1
}
export declare type mediaInteractionParam = {
type: MediaInteractions;
id: number;
};
export declare type mediaInteractionCallback = (p: mediaInteractionParam) => void;
export declare type Mirror = {

@@ -259,4 +294,5 @@ map: idNodeMap;

SkipEnd = "skip-end",
MouseInteraction = "mouse-interaction"
MouseInteraction = "mouse-interaction",
EventCast = "event-cast"
}
export {};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc