Socket
Socket
Sign inDemoInstall

rrweb

Package Overview
Dependencies
4
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.9.2 to 0.9.3

2

dist/record/rrweb-record.min.js

@@ -15,3 +15,3 @@ var rrwebRecord=function(){"use strict";

and limitations under the License.
***************************************************************************** */var e,t=function(){return(t=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);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 o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i}function r(){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"}(e||(e={}));var a=1,i=RegExp("[^a-z1-6-_]");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 s,l,c,d,p,f=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,v=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,h=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function m(e,t){return(e||"").replace(f,(function(e,n,o,r){var a,i=n||o||r;if(!i)return e;if(!v.test(i))return"url('"+i+"')";if(h.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("/"),s=i.split("/");u.pop();for(var l=0,c=s;l<c.length;l++){var d=c[l];"."!==d&&(".."===d?u.pop():u.push(d))}return"url('"+u.join("/")+"')"}))}function y(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function g(e,t,n){return"src"===t||"href"===t&&n?y(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?y(e,n[0])+" "+n[1]:1===n.length?""+y(e,n[0]):""})).join(", ")}(e,n):"style"===t&&n?m(n,location.href):n}function b(t,n,o,r,a,s){switch(void 0===a&&(a={}),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 l=!1;"string"==typeof o?l=t.classList.contains(o):t.classList.forEach((function(e){o.test(e)&&(l=!0)}));for(var c=function(e){var t=e.toLowerCase().trim();return i.test(t)?"div":t}(t.tagName),d={},p=0,f=Array.from(t.attributes);p<f.length;p++){var v=f[p],h=v.name,y=v.value;d[h]=g(n,h,y)}if("link"===c&&r){var b,C=Array.from(n.styleSheets).find((function(e){return e.href===t.href}));(b=u(C))&&(delete d.rel,delete d.href,d._cssText=m(b,C.href))}if("style"===c&&t.sheet&&!(t.innerText||t.textContent||"").trim().length)(b=u(t.sheet))&&(d._cssText=m(b,location.href));if("input"===c||"textarea"===c||"select"===c){y=t.value;"radio"!==d.type&&"checkbox"!==d.type&&"submit"!==d.type&&"button"!==d.type&&y?d.value=a[d.type]||a[c]?"*".repeat(y.length):y:t.checked&&(d.checked=t.checked)}if("option"===c){var S=t.parentElement;d.value===S.value&&(d.selected=t.selected)}if("canvas"===c&&s&&(d.rr_dataURL=t.toDataURL()),"audio"!==c&&"video"!==c||(d.rr_mediaState=t.paused?"paused":"played"),t.scrollLeft&&(d.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(d.rr_scrollTop=t.scrollTop),l){var w=t.getBoundingClientRect(),E=w.width,I=w.height;d.rr_width=E+"px",d.rr_height=I+"px"}return{type:e.Element,tagName:c,attributes:d,childNodes:[],isSVG:(_=t,"svg"===_.tagName||_ instanceof SVGElement||void 0),needBlock:l};case t.TEXT_NODE:var x=t.parentNode&&t.parentNode.tagName,N=t.textContent,T="STYLE"===x||void 0;return T&&N&&(N=m(N,location.href)),"SCRIPT"===x&&(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 _}function C(t,n,o,r,i,u,s,l){void 0===i&&(i=!1),void 0===u&&(u=!0);var c,d=b(t,n,r,u,s,l||!1);if(!d)return console.warn(t,"not serialized"),null;c="__sn"in t?t.__sn.id:a++;var p=Object.assign(d,{id:c});t.__sn=p,o[c]=t;var f=!i;if(p.type===e.Element&&(f=f&&!p.needBlock,delete p.needBlock),(p.type===e.Document||p.type===e.Element)&&f)for(var v=0,h=Array.from(t.childNodes);v<h.length;v++){var m=C(h[v],n,o,r,i,u,s,l);m&&p.childNodes.push(m)}return p}function S(e,t,n){void 0===n&&(n=document);var o={capture:!0,passive:!0};return n.addEventListener(e,t,o),function(){return n.removeEventListener(e,t,o)}}!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"}(s||(s={})),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",e[e.CanvasMutation=9]="CanvasMutation"}(l||(l={})),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"}(c||(c={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(d||(d={})),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",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change"}(p||(p={}));var w={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return w.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete w.map[t],e.childNodes&&e.childNodes.forEach((function(e){return w.removeNodeFromMap(e)}))},has:function(e){return w.map.hasOwnProperty(e)}};function E(e,t,n){void 0===n&&(n={});var o=null,r=0;return function(a){var i=Date.now();r||!1!==n.leading||(r=i);var u=t-(i-r),s=this,l=arguments;u<=0||u>t?(o&&(window.clearTimeout(o),o=null),r=i,e.apply(s,l)):o||!1===n.trailing||(o=window.setTimeout((function(){r=!1===n.leading?0:Date.now(),o=null,e.apply(s,l)}),u))}}function I(e,t,n,o,r){void 0===r&&(r=window);var a=r.Object.getOwnPropertyDescriptor(e,t);return r.Object.defineProperty(e,t,o?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),a&&a.set&&a.set.call(this,e)}}),function(){return I(e,t,a||{},!0)}}function x(){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 e.nodeType,e.TEXT_NODE,T(e.parentNode,t)}function _(e){return Boolean(e.changedTouches)}function M(e){return"__ln"in e}var k=function(){function e(){this.length=0,this.head=null}return e.prototype.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t},e.prototype.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&M(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&M(e.nextSibling)){n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++},e.prototype.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),this.length--)},e}(),D=function(e,t){return e+"@"+t};function L(e){return"__sn"in e}var O=function(e,t,o,r,a){var i=this;this.texts=[],this.attributes=[],this.removes=[],this.adds=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(e){var t,o,r,a;e.forEach(i.processMutation);var u=new k,s=function(e){var t=e.nextSibling&&w.getId(e.nextSibling);return-1===t&&T(e.nextSibling,i.blockClass)&&(t=null),t},l=function(e){if(e.parentNode){var t=w.getId(e.parentNode),n=s(e);if(-1===t||-1===n)return u.addNode(e);i.adds.push({parentId:t,nextId:n,node:C(e,document,w.map,i.blockClass,!0,i.inlineStylesheet,i.maskInputOptions,i.recordCanvas)})}};try{for(var c=n(i.movedSet),d=c.next();!d.done;d=c.next())l(v=d.value)}catch(e){t={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(t)throw t.error}}try{for(var p=n(i.addedSet),f=p.next();!f.done;f=p.next()){var v=f.value;P(i.droppedSet,v)||A(i.removes,v)?P(i.movedSet,v)?l(v):i.droppedSet.add(v):l(v)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=p.return)&&a.call(p)}finally{if(r)throw r.error}}for(var h=null;u.length;){var m=null;if(h){var y=w.getId(h.value.parentNode),g=s(h.value);-1!==y&&-1!==g&&(m=h)}if(!m)for(var b=u.length-1;b>=0;b--){var S=u.get(b);if(y=w.getId(S.value.parentNode),g=s(S.value),-1!==y&&-1!==g){m=S;break}}if(!m)break;h=m.previous,u.removeNode(m.value),l(m.value)}i.emit()},this.emit=function(){var e={texts:i.texts.map((function(e){return{id:w.getId(e.node),value:e.value}})).filter((function(e){return w.has(e.id)})),attributes:i.attributes.map((function(e){return{id:w.getId(e.node),attributes:e.attributes}})).filter((function(e){return w.has(e.id)})),removes:i.removes,adds:i.adds};(e.texts.length||e.attributes.length||e.removes.length||e.adds.length)&&(i.emissionCallback(e),i.texts=[],i.attributes=[],i.removes=[],i.adds=[],i.addedSet=new Set,i.movedSet=new Set,i.droppedSet=new Set,i.movedMap={})},this.processMutation=function(e){switch(e.type){case"characterData":var t=e.target.textContent;T(e.target,i.blockClass)||t===e.oldValue||i.texts.push({value:t,node:e.target});break;case"attributes":if(t=e.target.getAttribute(e.attributeName),T(e.target,i.blockClass)||t===e.oldValue)return;var n=i.attributes.find((function(t){return t.node===e.target}));n||(n={node:e.target,attributes:{}},i.attributes.push(n)),n.attributes[e.attributeName]=g(document,e.attributeName,t);break;case"childList":e.addedNodes.forEach((function(t){return i.genAdds(t,e.target)})),e.removedNodes.forEach((function(t){var n=w.getId(t),o=w.getId(e.target);T(t,i.blockClass)||T(e.target,i.blockClass)||(i.addedSet.has(t)?(R(i.addedSet,t),i.droppedSet.add(t)):i.addedSet.has(e.target)&&-1===n||function e(t){var n=w.getId(t);return!w.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode))}(e.target)||(i.movedSet.has(t)&&i.movedMap[D(n,o)]?R(i.movedSet,t):i.removes.push({parentId:o,id:n})),w.removeNodeFromMap(t))}))}},this.genAdds=function(e,t){if(!T(e,i.blockClass)){if(L(e)){i.movedSet.add(e);var n=null;t&&L(t)&&(n=t.__sn.id),n&&(i.movedMap[D(e.__sn.id,n)]=!0)}else i.addedSet.add(e),i.droppedSet.delete(e);e.childNodes.forEach((function(e){return i.genAdds(e)}))}},this.blockClass=t,this.inlineStylesheet=o,this.maskInputOptions=r,this.recordCanvas=a,this.emissionCallback=e};function R(e,t){e.delete(t),t.childNodes.forEach((function(t){return R(e,t)}))}function A(e,t){var n=t.parentNode;if(!n)return!1;var o=w.getId(n);return!!e.some((function(e){return e.id===o}))||A(e,n)}function P(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||P(e,n))}function z(e,t,n){if(!1===n.mouseInteraction)return function(){};var o=!0===n.mouseInteraction||void 0===n.mouseInteraction?{}:n.mouseInteraction,r=[];return Object.keys(c).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]})).forEach((function(n){var o=n.toLowerCase(),a=function(n){return function(o){if(!T(o.target,t)){var r=w.getId(o.target),a=_(o)?o.changedTouches[0]:o,i=a.clientX,u=a.clientY;e({type:c[n],id:r,x:i,y:u})}}}(n);r.push(S(o,a))})),function(){r.forEach((function(e){return e()}))}}var F,j=["INPUT","TEXTAREA","SELECT"],H=new WeakMap;function U(e,t){var o,a,i=Object.getOwnPropertyNames(CanvasRenderingContext2D.prototype),u=[],s=function(n){try{if("function"!=typeof CanvasRenderingContext2D.prototype[n])return"continue";var o=function(e,t,n){try{if(!(t in e))return function(){};var o=e[t],r=n(o);return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=r,function(){e[t]=o}}catch(e){return function(){}}}(CanvasRenderingContext2D.prototype,n,(function(o){return function(){for(var a=this,i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];return T(this.canvas,t)||setTimeout((function(){var t=r(i);"drawImage"===n&&t[0]&&t[0]instanceof HTMLCanvasElement&&(t[0]=t[0].toDataURL()),e({id:w.getId(a.canvas),property:n,args:t})}),0),o.apply(this,i)}}));u.push(o)}catch(t){var a=I(CanvasRenderingContext2D.prototype,n,{set:function(t){e({id:w.getId(this.canvas),property:n,args:[t],setter:!0})}});u.push(a)}};try{for(var l=n(i),c=l.next();!c.done;c=l.next()){s(c.value)}}catch(e){o={error:e}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(o)throw o.error}}return function(){u.forEach((function(e){return e()}))}}function V(e,n){void 0===n&&(n={}),function(e,t){var n=e.mutationCb,o=e.mousemoveCb,a=e.mouseInteractionCb,i=e.scrollCb,u=e.viewportResizeCb,s=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb,d=e.canvasMutationCb;e.mutationCb=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];t.mutation&&t.mutation.apply(t,r(e)),n.apply(void 0,r(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,r(e)),o.apply(void 0,r(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,r(e)),a.apply(void 0,r(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,r(e)),i.apply(void 0,r(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,r(e)),u.apply(void 0,r(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,r(e)),s.apply(void 0,r(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,r(e)),l.apply(void 0,r(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,r(e)),c.apply(void 0,r(e))},e.canvasMutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.canvasMutation&&t.canvasMutation.apply(t,r(e)),d.apply(void 0,r(e))}}(e,n);var o,a,i,u,s,c,p,f=(o=e.mutationCb,a=e.blockClass,i=e.inlineStylesheet,u=e.maskInputOptions,s=e.recordCanvas,c=new O(o,a,i,u,s),(p=new MutationObserver(c.processMutations)).observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),p),v=function(e,t){if(!1===t.mousemove)return function(){};var n,o="number"==typeof t.mousemove?t.mousemove:50,r=[],a=E((function(t){var o=Date.now()-n;e(r.map((function(e){return e.timeOffset-=o,e})),t?l.TouchMove:l.MouseMove),r=[],n=null}),500),i=E((function(e){var t=e.target,o=_(e)?e.changedTouches[0]:e,i=o.clientX,u=o.clientY;n||(n=Date.now()),r.push({x:i,y:u,id:w.getId(t),timeOffset:Date.now()-n}),a(_(e))}),o,{trailing:!1}),u=[S("mousemove",i),S("touchmove",i)];return function(){u.forEach((function(e){return e()}))}}(e.mousemoveCb,e.sampling),h=z(e.mouseInteractionCb,e.blockClass,e.sampling),m=function(e,t,n){return S("scroll",E((function(n){if(n.target&&!T(n.target,t)){var o=w.getId(n.target);if(n.target===document){var r=document.scrollingElement||document.documentElement;e({id:o,x:r.scrollLeft,y:r.scrollTop})}else e({id:o,x:n.target.scrollLeft,y:n.target.scrollTop})}}),n.scroll||100))}(e.scrollCb,e.blockClass,e.sampling),y=function(e){return S("resize",E((function(){var t=x(),n=N();e({width:Number(n),height:Number(t)})}),200),window)}(e.viewportResizeCb),g=function(e,n,o,a,i){function u(e){var t=e.target;if(t&&t.tagName&&!(j.indexOf(t.tagName)<0)&&!T(t,n)){var r=t.type;if("password"!==r&&!t.classList.contains(o)){var i=t.value,u=!1;"radio"===r||"checkbox"===r?u=t.checked:(a[t.tagName.toLowerCase()]||a[r])&&(i="*".repeat(i.length)),s(t,{text:i,isChecked:u});var l=t.name;"radio"===r&&l&&u&&document.querySelectorAll('input[type="radio"][name="'+l+'"]').forEach((function(e){e!==t&&s(e,{text:e.value,isChecked:!u})}))}}}function s(n,o){var r=H.get(n);if(!r||r.text!==o.text||r.isChecked!==o.isChecked){H.set(n,o);var a=w.getId(n);e(t(t({},o),{id:a}))}}var l=("last"===i.input?["change"]:["input","change"]).map((function(e){return S(e,u)})),c=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),d=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]];return c&&c.set&&l.push.apply(l,r(d.map((function(e){return I(e[0],e[1],{set:function(){u({target:this})}})})))),function(){l.forEach((function(e){return e()}))}}(e.inputCb,e.blockClass,e.ignoreClass,e.maskInputOptions,e.sampling),b=function(e,t){var n=function(n){return function(o){var r=o.target;r&&!T(r,t)&&e({type:"play"===n?d.Play:d.Pause,id:w.getId(r)})}},o=[S("play",n("play")),S("pause",n("pause"))];return function(){o.forEach((function(e){return e()}))}}(e.mediaInteractionCb,e.blockClass),C=function(e){var t=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(n,o){var r=w.getId(this.ownerNode);return-1!==r&&e({id:r,adds:[{rule:n,index:o}]}),t.apply(this,arguments)};var n=CSSStyleSheet.prototype.deleteRule;return CSSStyleSheet.prototype.deleteRule=function(t){var o=w.getId(this.ownerNode);return-1!==o&&e({id:o,removes:[{index:t}]}),n.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=t,CSSStyleSheet.prototype.deleteRule=n}}(e.styleSheetRuleCb),M=e.recordCanvas?U(e.canvasMutationCb,e.blockClass):function(){};return function(){f.disconnect(),v(),h(),m(),y(),g(),b(),C(),M()}}function B(e){return t(t({},e),{timestamp:Date.now()})}function X(e){void 0===e&&(e={});var n=e.emit,r=e.checkoutEveryNms,a=e.checkoutEveryNth,i=e.blockClass,u=void 0===i?"rr-block":i,c=e.ignoreClass,d=void 0===c?"rr-ignore":c,p=e.inlineStylesheet,f=void 0===p||p,v=e.maskAllInputs,h=e.maskInputOptions,m=e.hooks,y=e.packFn,g=e.sampling,b=void 0===g?{}:g,E=e.mousemoveWait,I=e.recordCanvas,T=void 0!==I&&I;if(!n)throw new Error("emit function is required");void 0!==E&&void 0===b.mousemove&&(b.mousemove=E);var _,M=!0===v?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:void 0!==h?h:{};"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach);var k=0;function D(e){var t,n,r,a;void 0===e&&(e=!1),F(B({type:s.Meta,data:{href:window.location.href,width:N(),height:x()}}),e);var i=o(function(e,t,n,o,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0);var a={};return[C(e,e,a,t,!1,n,!0===o?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===o?{}:o,r),a]}(document,u,f,M,T),2),l=i[0],c=i[1];if(!l)return console.warn("Failed to snapshot the document");w.map=c,F(B({type:s.FullSnapshot,data:{node:l,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(a=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.parentElement)||void 0===a?void 0:a.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}}))}F=function(e,t){if(n(y?y(e):e,t),e.type===s.FullSnapshot)_=e,k=0;else if(e.type===s.IncrementalSnapshot){k++;var o=a&&k>=a,i=r&&e.timestamp-_.timestamp>r;(o||i)&&D(!0)}};try{var L=[];L.push(S("DOMContentLoaded",(function(){F(B({type:s.DomContentLoaded,data:{}}))})));var O=function(){D(),L.push(V({mutationCb:function(e){return F(B({type:s.IncrementalSnapshot,data:t({source:l.Mutation},e)}))},mousemoveCb:function(e,t){return F(B({type:s.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return F(B({type:s.IncrementalSnapshot,data:t({source:l.MouseInteraction},e)}))},scrollCb:function(e){return F(B({type:s.IncrementalSnapshot,data:t({source:l.Scroll},e)}))},viewportResizeCb:function(e){return F(B({type:s.IncrementalSnapshot,data:t({source:l.ViewportResize},e)}))},inputCb:function(e){return F(B({type:s.IncrementalSnapshot,data:t({source:l.Input},e)}))},mediaInteractionCb:function(e){return F(B({type:s.IncrementalSnapshot,data:t({source:l.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return F(B({type:s.IncrementalSnapshot,data:t({source:l.StyleSheetRule},e)}))},canvasMutationCb:function(e){return F(B({type:s.IncrementalSnapshot,data:t({source:l.CanvasMutation},e)}))},blockClass:u,ignoreClass:d,maskInputOptions:M,inlineStylesheet:f,sampling:b,recordCanvas:T},m))};return"interactive"===document.readyState||"complete"===document.readyState?O():L.push(S("load",(function(){F(B({type:s.Load,data:{}})),O()}),window)),function(){L.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}return X.addCustomEvent=function(e,t){if(!F)throw new Error("please add custom event after start recording");F(B({type:s.Custom,data:{tag:e,payload:t}}))},X}();
***************************************************************************** */var e,t=function(){return(t=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);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 o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i}function r(){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"}(e||(e={}));var a=1,i=RegExp("[^a-z1-6-_]");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 s,l,c,d,p,f=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,v=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,h=/^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;function m(e,t){return(e||"").replace(f,(function(e,n,o,r){var a,i=n||o||r;if(!i)return e;if(!v.test(i))return"url('"+i+"')";if(h.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("/"),s=i.split("/");u.pop();for(var l=0,c=s;l<c.length;l++){var d=c[l];"."!==d&&(".."===d?u.pop():u.push(d))}return"url('"+u.join("/")+"')"}))}function y(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function g(e,t,n){return"src"===t||"href"===t&&n?y(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?y(e,n[0])+" "+n[1]:1===n.length?""+y(e,n[0]):""})).join(", ")}(e,n):"style"===t&&n?m(n,location.href):n}function b(t,n,o,r,a,s){switch(void 0===a&&(a={}),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 l=!1;"string"==typeof o?l=t.classList.contains(o):t.classList.forEach((function(e){o.test(e)&&(l=!0)}));for(var c=function(e){var t=e.toLowerCase().trim();return i.test(t)?"div":t}(t.tagName),d={},p=0,f=Array.from(t.attributes);p<f.length;p++){var v=f[p],h=v.name,y=v.value;d[h]=g(n,h,y)}if("link"===c&&r){var b,S=Array.from(n.styleSheets).find((function(e){return e.href===t.href}));(b=u(S))&&(delete d.rel,delete d.href,d._cssText=m(b,S.href))}if("style"===c&&t.sheet&&!(t.innerText||t.textContent||"").trim().length)(b=u(t.sheet))&&(d._cssText=m(b,location.href));if("input"===c||"textarea"===c||"select"===c){y=t.value;"radio"!==d.type&&"checkbox"!==d.type&&"submit"!==d.type&&"button"!==d.type&&y?d.value=a[d.type]||a[c]?"*".repeat(y.length):y:t.checked&&(d.checked=t.checked)}if("option"===c){var C=t.parentElement;d.value===C.value&&(d.selected=t.selected)}if("canvas"===c&&s&&(d.rr_dataURL=t.toDataURL()),"audio"!==c&&"video"!==c||(d.rr_mediaState=t.paused?"paused":"played"),t.scrollLeft&&(d.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(d.rr_scrollTop=t.scrollTop),l){var w=t.getBoundingClientRect(),E=w.width,I=w.height;d.rr_width=E+"px",d.rr_height=I+"px"}return{type:e.Element,tagName:c,attributes:d,childNodes:[],isSVG:(M=t,"svg"===M.tagName||M instanceof SVGElement||void 0),needBlock:l};case t.TEXT_NODE:var x=t.parentNode&&t.parentNode.tagName,N=t.textContent,T="STYLE"===x||void 0;return T&&N&&(N=m(N,location.href)),"SCRIPT"===x&&(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 M}function S(t,n,o,r,i,u,s,l){void 0===i&&(i=!1),void 0===u&&(u=!0);var c,d=b(t,n,r,u,s,l||!1);if(!d)return console.warn(t,"not serialized"),null;c="__sn"in t?t.__sn.id:a++;var p=Object.assign(d,{id:c});t.__sn=p,o[c]=t;var f=!i;if(p.type===e.Element&&(f=f&&!p.needBlock,delete p.needBlock),(p.type===e.Document||p.type===e.Element)&&f)for(var v=0,h=Array.from(t.childNodes);v<h.length;v++){var m=S(h[v],n,o,r,i,u,s,l);m&&p.childNodes.push(m)}return p}function C(e,t,n){void 0===n&&(n=document);var o={capture:!0,passive:!0};return n.addEventListener(e,t,o),function(){return n.removeEventListener(e,t,o)}}!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"}(s||(s={})),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",e[e.CanvasMutation=9]="CanvasMutation"}(l||(l={})),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"}(c||(c={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(d||(d={})),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",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change"}(p||(p={}));var w={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return w.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete w.map[t],e.childNodes&&e.childNodes.forEach((function(e){return w.removeNodeFromMap(e)}))},has:function(e){return w.map.hasOwnProperty(e)}};function E(e,t,n){void 0===n&&(n={});var o=null,r=0;return function(a){var i=Date.now();r||!1!==n.leading||(r=i);var u=t-(i-r),s=this,l=arguments;u<=0||u>t?(o&&(window.clearTimeout(o),o=null),r=i,e.apply(s,l)):o||!1===n.trailing||(o=window.setTimeout((function(){r=!1===n.leading?0:Date.now(),o=null,e.apply(s,l)}),u))}}function I(e,t,n,o,r){void 0===r&&(r=window);var a=r.Object.getOwnPropertyDescriptor(e,t);return r.Object.defineProperty(e,t,o?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),a&&a.set&&a.set.call(this,e)}}),function(){return I(e,t,a||{},!0)}}function x(){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 e.nodeType,e.TEXT_NODE,T(e.parentNode,t)}function M(e){return Boolean(e.changedTouches)}function _(e){return"__ln"in e}var k=function(){function e(){this.length=0,this.head=null}return e.prototype.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t},e.prototype.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&_(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&_(e.nextSibling)){n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++},e.prototype.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),this.length--)},e}(),D=function(e,t){return e+"@"+t};function L(e){return"__sn"in e}var O=function(e,t,o,r,a){var i=this;this.texts=[],this.attributes=[],this.removes=[],this.adds=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(e){var t,o,r,a;e.forEach(i.processMutation);var u=new k,s=function(e){var t=e.nextSibling&&w.getId(e.nextSibling);return-1===t&&T(e.nextSibling,i.blockClass)&&(t=null),t},l=function(e){if(e.parentNode){var t=w.getId(e.parentNode),n=s(e);if(-1===t||-1===n)return u.addNode(e);i.adds.push({parentId:t,nextId:n,node:S(e,document,w.map,i.blockClass,!0,i.inlineStylesheet,i.maskInputOptions,i.recordCanvas)})}};try{for(var c=n(i.movedSet),d=c.next();!d.done;d=c.next())l(v=d.value)}catch(e){t={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(t)throw t.error}}try{for(var p=n(i.addedSet),f=p.next();!f.done;f=p.next()){var v=f.value;P(i.droppedSet,v)||A(i.removes,v)?P(i.movedSet,v)?l(v):i.droppedSet.add(v):l(v)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(a=p.return)&&a.call(p)}finally{if(r)throw r.error}}for(var h=null;u.length;){var m=null;if(h){var y=w.getId(h.value.parentNode),g=s(h.value);-1!==y&&-1!==g&&(m=h)}if(!m)for(var b=u.length-1;b>=0;b--){var C=u.get(b);if(y=w.getId(C.value.parentNode),g=s(C.value),-1!==y&&-1!==g){m=C;break}}if(!m)break;h=m.previous,u.removeNode(m.value),l(m.value)}i.emit()},this.emit=function(){var e={texts:i.texts.map((function(e){return{id:w.getId(e.node),value:e.value}})).filter((function(e){return w.has(e.id)})),attributes:i.attributes.map((function(e){return{id:w.getId(e.node),attributes:e.attributes}})).filter((function(e){return w.has(e.id)})),removes:i.removes,adds:i.adds};(e.texts.length||e.attributes.length||e.removes.length||e.adds.length)&&(i.emissionCallback(e),i.texts=[],i.attributes=[],i.removes=[],i.adds=[],i.addedSet=new Set,i.movedSet=new Set,i.droppedSet=new Set,i.movedMap={})},this.processMutation=function(e){switch(e.type){case"characterData":var t=e.target.textContent;T(e.target,i.blockClass)||t===e.oldValue||i.texts.push({value:t,node:e.target});break;case"attributes":if(t=e.target.getAttribute(e.attributeName),T(e.target,i.blockClass)||t===e.oldValue)return;var n=i.attributes.find((function(t){return t.node===e.target}));n||(n={node:e.target,attributes:{}},i.attributes.push(n)),n.attributes[e.attributeName]=g(document,e.attributeName,t);break;case"childList":e.addedNodes.forEach((function(t){return i.genAdds(t,e.target)})),e.removedNodes.forEach((function(t){var n=w.getId(t),o=w.getId(e.target);T(t,i.blockClass)||T(e.target,i.blockClass)||(i.addedSet.has(t)?(R(i.addedSet,t),i.droppedSet.add(t)):i.addedSet.has(e.target)&&-1===n||function e(t){var n=w.getId(t);return!w.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode))}(e.target)||(i.movedSet.has(t)&&i.movedMap[D(n,o)]?R(i.movedSet,t):i.removes.push({parentId:o,id:n})),w.removeNodeFromMap(t))}))}},this.genAdds=function(e,t){if(!T(e,i.blockClass)){if(L(e)){i.movedSet.add(e);var n=null;t&&L(t)&&(n=t.__sn.id),n&&(i.movedMap[D(e.__sn.id,n)]=!0)}else i.addedSet.add(e),i.droppedSet.delete(e);e.childNodes.forEach((function(e){return i.genAdds(e)}))}},this.blockClass=t,this.inlineStylesheet=o,this.maskInputOptions=r,this.recordCanvas=a,this.emissionCallback=e};function R(e,t){e.delete(t),t.childNodes.forEach((function(t){return R(e,t)}))}function A(e,t){var n=t.parentNode;if(!n)return!1;var o=w.getId(n);return!!e.some((function(e){return e.id===o}))||A(e,n)}function P(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||P(e,n))}function z(e,t,n){if(!1===n.mouseInteraction)return function(){};var o=!0===n.mouseInteraction||void 0===n.mouseInteraction?{}:n.mouseInteraction,r=[];return Object.keys(c).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]})).forEach((function(n){var o=n.toLowerCase(),a=function(n){return function(o){if(!T(o.target,t)){var r=w.getId(o.target),a=M(o)?o.changedTouches[0]:o,i=a.clientX,u=a.clientY;e({type:c[n],id:r,x:i,y:u})}}}(n);r.push(C(o,a))})),function(){r.forEach((function(e){return e()}))}}var F,j=["INPUT","TEXTAREA","SELECT"],H=new WeakMap;function U(e,t){var o,a,i=Object.getOwnPropertyNames(CanvasRenderingContext2D.prototype),u=[],s=function(n){try{if("function"!=typeof CanvasRenderingContext2D.prototype[n])return"continue";var o=function(e,t,n){try{if(!(t in e))return function(){};var o=e[t],r=n(o);return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=r,function(){e[t]=o}}catch(e){return function(){}}}(CanvasRenderingContext2D.prototype,n,(function(o){return function(){for(var a=this,i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];return T(this.canvas,t)||setTimeout((function(){var t=r(i);"drawImage"===n&&t[0]&&t[0]instanceof HTMLCanvasElement&&(t[0]=t[0].toDataURL()),e({id:w.getId(a.canvas),property:n,args:t})}),0),o.apply(this,i)}}));u.push(o)}catch(t){var a=I(CanvasRenderingContext2D.prototype,n,{set:function(t){e({id:w.getId(this.canvas),property:n,args:[t],setter:!0})}});u.push(a)}};try{for(var l=n(i),c=l.next();!c.done;c=l.next()){s(c.value)}}catch(e){o={error:e}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(o)throw o.error}}return function(){u.forEach((function(e){return e()}))}}function V(e,n){void 0===n&&(n={}),function(e,t){var n=e.mutationCb,o=e.mousemoveCb,a=e.mouseInteractionCb,i=e.scrollCb,u=e.viewportResizeCb,s=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb,d=e.canvasMutationCb;e.mutationCb=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];t.mutation&&t.mutation.apply(t,r(e)),n.apply(void 0,r(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,r(e)),o.apply(void 0,r(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,r(e)),a.apply(void 0,r(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,r(e)),i.apply(void 0,r(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,r(e)),u.apply(void 0,r(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,r(e)),s.apply(void 0,r(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,r(e)),l.apply(void 0,r(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,r(e)),c.apply(void 0,r(e))},e.canvasMutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.canvasMutation&&t.canvasMutation.apply(t,r(e)),d.apply(void 0,r(e))}}(e,n);var o,a,i,u,s,c,p,f=(o=e.mutationCb,a=e.blockClass,i=e.inlineStylesheet,u=e.maskInputOptions,s=e.recordCanvas,c=new O(o,a,i,u,s),(p=new MutationObserver(c.processMutations)).observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),p),v=function(e,t){if(!1===t.mousemove)return function(){};var n,o="number"==typeof t.mousemove?t.mousemove:50,r=[],a=E((function(t){var o=Date.now()-n;e(r.map((function(e){return e.timeOffset-=o,e})),t?l.TouchMove:l.MouseMove),r=[],n=null}),500),i=E((function(e){var t=e.target,o=M(e)?e.changedTouches[0]:e,i=o.clientX,u=o.clientY;n||(n=Date.now()),r.push({x:i,y:u,id:w.getId(t),timeOffset:Date.now()-n}),a(M(e))}),o,{trailing:!1}),u=[C("mousemove",i),C("touchmove",i)];return function(){u.forEach((function(e){return e()}))}}(e.mousemoveCb,e.sampling),h=z(e.mouseInteractionCb,e.blockClass,e.sampling),m=function(e,t,n){return C("scroll",E((function(n){if(n.target&&!T(n.target,t)){var o=w.getId(n.target);if(n.target===document){var r=document.scrollingElement||document.documentElement;e({id:o,x:r.scrollLeft,y:r.scrollTop})}else e({id:o,x:n.target.scrollLeft,y:n.target.scrollTop})}}),n.scroll||100))}(e.scrollCb,e.blockClass,e.sampling),y=function(e){return C("resize",E((function(){var t=x(),n=N();e({width:Number(n),height:Number(t)})}),200),window)}(e.viewportResizeCb),g=function(e,n,o,a,i){function u(e){var t=e.target;if(t&&t.tagName&&!(j.indexOf(t.tagName)<0)&&!T(t,n)){var r=t.type;if("password"!==r&&!t.classList.contains(o)){var i=t.value,u=!1;"radio"===r||"checkbox"===r?u=t.checked:(a[t.tagName.toLowerCase()]||a[r])&&(i="*".repeat(i.length)),s(t,{text:i,isChecked:u});var l=t.name;"radio"===r&&l&&u&&document.querySelectorAll('input[type="radio"][name="'+l+'"]').forEach((function(e){e!==t&&s(e,{text:e.value,isChecked:!u})}))}}}function s(n,o){var r=H.get(n);if(!r||r.text!==o.text||r.isChecked!==o.isChecked){H.set(n,o);var a=w.getId(n);e(t(t({},o),{id:a}))}}var l=("last"===i.input?["change"]:["input","change"]).map((function(e){return C(e,u)})),c=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),d=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"]];return c&&c.set&&l.push.apply(l,r(d.map((function(e){return I(e[0],e[1],{set:function(){u({target:this})}})})))),function(){l.forEach((function(e){return e()}))}}(e.inputCb,e.blockClass,e.ignoreClass,e.maskInputOptions,e.sampling),b=function(e,t){var n=function(n){return function(o){var r=o.target;r&&!T(r,t)&&e({type:"play"===n?d.Play:d.Pause,id:w.getId(r)})}},o=[C("play",n("play")),C("pause",n("pause"))];return function(){o.forEach((function(e){return e()}))}}(e.mediaInteractionCb,e.blockClass),S=function(e){var t=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(n,o){var r=w.getId(this.ownerNode);return-1!==r&&e({id:r,adds:[{rule:n,index:o}]}),t.apply(this,arguments)};var n=CSSStyleSheet.prototype.deleteRule;return CSSStyleSheet.prototype.deleteRule=function(t){var o=w.getId(this.ownerNode);return-1!==o&&e({id:o,removes:[{index:t}]}),n.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=t,CSSStyleSheet.prototype.deleteRule=n}}(e.styleSheetRuleCb),_=e.recordCanvas?U(e.canvasMutationCb,e.blockClass):function(){};return function(){f.disconnect(),v(),h(),m(),y(),g(),b(),S(),_()}}function B(e){return t(t({},e),{timestamp:Date.now()})}function X(e){void 0===e&&(e={});var n=e.emit,r=e.checkoutEveryNms,a=e.checkoutEveryNth,i=e.blockClass,u=void 0===i?"rr-block":i,c=e.ignoreClass,d=void 0===c?"rr-ignore":c,p=e.inlineStylesheet,f=void 0===p||p,v=e.maskAllInputs,h=e.maskInputOptions,m=e.hooks,y=e.packFn,g=e.sampling,b=void 0===g?{}:g,E=e.mousemoveWait,I=e.recordCanvas,T=void 0!==I&&I;if(!n)throw new Error("emit function is required");void 0!==E&&void 0===b.mousemove&&(b.mousemove=E);var M,_=!0===v?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:void 0!==h?h:{};"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach);var k=0;function D(e){var t,n,r,a;void 0===e&&(e=!1),F(B({type:s.Meta,data:{href:window.location.href,width:N(),height:x()}}),e);var i=o(function(e,t,n,o,r){void 0===t&&(t="rr-block"),void 0===n&&(n=!0);var a={};return[S(e,e,a,t,!1,n,!0===o?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===o?{}:o,r),a]}(document,u,f,_,T),2),l=i[0],c=i[1];if(!l)return console.warn("Failed to snapshot the document");w.map=c,F(B({type:s.FullSnapshot,data:{node:l,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(a=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.parentElement)||void 0===a?void 0:a.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}}))}F=function(e,t){if(n(y?y(e):e,t),e.type===s.FullSnapshot)M=e,k=0;else if(e.type===s.IncrementalSnapshot){k++;var o=a&&k>=a,i=r&&e.timestamp-M.timestamp>r;(o||i)&&D(!0)}};try{var L=[];L.push(C("DOMContentLoaded",(function(){F(B({type:s.DomContentLoaded,data:{}}))})));var O=function(){D(),L.push(V({mutationCb:function(e){return F(B({type:s.IncrementalSnapshot,data:t({source:l.Mutation},e)}))},mousemoveCb:function(e,t){return F(B({type:s.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return F(B({type:s.IncrementalSnapshot,data:t({source:l.MouseInteraction},e)}))},scrollCb:function(e){return F(B({type:s.IncrementalSnapshot,data:t({source:l.Scroll},e)}))},viewportResizeCb:function(e){return F(B({type:s.IncrementalSnapshot,data:t({source:l.ViewportResize},e)}))},inputCb:function(e){return F(B({type:s.IncrementalSnapshot,data:t({source:l.Input},e)}))},mediaInteractionCb:function(e){return F(B({type:s.IncrementalSnapshot,data:t({source:l.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return F(B({type:s.IncrementalSnapshot,data:t({source:l.StyleSheetRule},e)}))},canvasMutationCb:function(e){return F(B({type:s.IncrementalSnapshot,data:t({source:l.CanvasMutation},e)}))},blockClass:u,ignoreClass:d,maskInputOptions:_,inlineStylesheet:f,sampling:b,recordCanvas:T},m))};return"interactive"===document.readyState||"complete"===document.readyState?O():L.push(C("load",(function(){F(B({type:s.Load,data:{}})),O()}),window)),function(){L.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}return X.addCustomEvent=function(e,t){if(!F)throw new Error("please add custom event after start recording");F(B({type:s.Custom,data:{tag:e,payload:t}}))},X}();
//# sourceMappingURL=rrweb-record.min.js.map

@@ -29,3 +29,3 @@ var rrwebReplay=function(e){"use strict";

and limitations under the License.
***************************************************************************** */!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(E||(E={}));var T={type:"xstate.init"};function N(e){return void 0===e?[]:[].concat(e)}function I(e){return{type:"xstate.assign",assignment:e}}function C(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function A(e){return function(t){return e===t}}function _(e){return"string"==typeof e?{type:e}:e}function k(e,t){return{value:e,context:t,actions:[],changed:!1,matches:A(e)}}function F(e,t){void 0===t&&(t={});var n={config:e,_options:t,initialState:{value:e.initial,actions:N(e.states[e.initial].entry).map((function(e){return C(e,t.actions)})),context:e.context,matches:A(e.initial)},transition:function(t,r){var i,o,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,c=a.context,l=_(r),u=e.states[s];if(u.on){var d=N(u.on[l.type]),f=function(t){if(void 0===t)return{value:k(s,c)};var r="string"==typeof t?{target:t}:t,i=r.target,o=void 0===i?s:i,a=r.actions,d=void 0===a?[]:a,f=r.cond,p=c;if((void 0===f?function(){return!0}:f)(c,l)){var h=e.states[o],m=!1,v=[].concat(u.exit,d,h.entry).filter((function(e){return e})).map((function(e){return C(e,n._options.actions)})).filter((function(e){if("xstate.assign"===e.type){m=!0;var t=Object.assign({},p);return"function"==typeof e.assignment?t=e.assignment(p,l):Object.keys(e.assignment).forEach((function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](p,l):e.assignment[n]})),p=t,!1}return!0}));return{value:{value:o,context:p,actions:v,changed:o!==s||v.length>0||m,matches:A(o)}}}};try{for(var p=function(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}}}}(d),h=p.next();!h.done;h=p.next()){var m=f(h.value);if("object"==typeof m)return m.value}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}}return k(s,c)}};return n}var D=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function O(e){var t=e.initialState,n=E.NotStarted,r=new Set,i={_machine:e,send:function(i){n===E.Running&&(t=e.transition(t,i),D(t,_(i)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(){return n=E.Running,D(t,T),i},stop:function(){return n=E.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}var L={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return L.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete L.map[t],e.childNodes&&e.childNodes.forEach((function(e){return L.removeNodeFromMap(e)}))},has:function(e){return L.map.hasOwnProperty(e)}};var P=function(){function e(){this.reset()}return e.prototype.add=function(e){var t=this.indexes.get(e.parentId),n={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(n.parent=t,t.children[n.id]=n):this.tree[n.id]=n,this.indexes.set(n.id,n)},e.prototype.remove=function(e){var t=this,n=this.indexes.get(e.parentId),r=this.indexes.get(e.id),i=function(e){t.removeIdSet.add(e);var n=L.getNode(e);null==n||n.childNodes.forEach((function(e){return i(e.__sn.id)}))},o=function(n){t.removeIdSet.add(n.id),Object.values(n.children).forEach((function(e){return o(e)}));var r=t.indexes.get(n.id);if(r){var i=r.parent;i&&(delete r.parent,delete i.children[r.id],t.indexes.delete(e.id))}};r?n?(delete r.parent,delete n.children[r.id],this.indexes.delete(e.id),o(r)):(delete this.tree[r.id],this.indexes.delete(r.id),o(r)):(this.removeNodeMutations.push(e),i(e.id))},e.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},e.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},e.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},e.prototype.input=function(e){this.inputMap.set(e.id,e)},e.prototype.flush=function(){var e,t,n,i,o=this,a=this.tree,s=this.removeNodeMutations,c=this.textMutations,l=this.attributeMutations,u={source:v.Mutation,removes:s,texts:c,attributes:l,adds:[]},d=function(e,t){t&&o.removeIdSet.add(e.id),u.texts=u.texts.concat(t?[]:e.texts).filter((function(e){return!o.removeIdSet.has(e.id)})),u.attributes=u.attributes.concat(t?[]:e.attributes).filter((function(e){return!o.removeIdSet.has(e.id)})),o.removeIdSet.has(e.id)||o.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return d(e,!0)})):(u.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return d(e,!1)})))};Object.values(a).forEach((function(e){return d(e,!1)}));try{for(var f=r(this.scrollMap.keys()),p=f.next();!p.done;p=f.next()){var h=p.value;this.removeIdSet.has(h)&&this.scrollMap.delete(h)}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}try{for(var m=r(this.inputMap.keys()),y=m.next();!y.done;y=m.next()){h=y.value;this.removeIdSet.has(h)&&this.inputMap.delete(h)}}catch(e){n={error:e}}finally{try{y&&!y.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}var g=new Map(this.scrollMap),b=new Map(this.inputMap);return this.reset(),{mutationData:u,scrollMap:g,inputMap:b}},e.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},e}();function R(e,t){var i=t.getCastFn,o=t.emitter;return O(F({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:I({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:I((function(e,t){var r=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(r=t.payload.timeOffset),n(n({},e),{timeOffset:r,baselineTime:e.events[0].timestamp+r})})),play:function(e){var t,n,a,s,c=e.timer,l=e.events,u=e.baselineTime,d=e.lastPlayedEvent;c.clear();try{for(var f=r(l),p=f.next();!p.done;p=f.next()){M(p.value,u)}}catch(e){t={error:e}}finally{try{p&&!p.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}var h=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===m.Meta&&r.timestamp<=t)return e.slice(n)}return e}(l,u),y=new Array,g=function(e){if(d&&d.timestamp<u&&(e.timestamp<=d.timestamp||e===d))return"continue";var t=e.timestamp<u;if(t&&!function(e){switch(e.type){case m.DomContentLoaded:case m.Load:case m.Custom:return!1;case m.FullSnapshot:case m.Meta:return!0}switch(e.data.source){case v.MouseMove:case v.MouseInteraction:case v.TouchMove:case v.MediaInteraction:return!1;case v.ViewportResize:case v.StyleSheetRule:case v.Scroll:case v.Input:return!0}return!0}(e))return"continue";var n=i(e,t);t?n():y.push({doAction:function(){n(),o.emit(b.EventCast,e)},delay:e.delay})};try{for(var S=r(h),x=S.next();!x.done;x=S.next()){g(x.value)}}catch(e){a={error:e}}finally{try{x&&!x.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}o.emit(b.Flush),c.addActions(y),c.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:I((function(e){return n(n({},e),{lastPlayedEvent:null})})),startLive:I({baselineTime:function(e,t){return e.timer.toggleLiveMode(!0),e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:I((function(e,t){var r=e.baselineTime,a=e.timer,s=e.events;if("ADD_EVENT"===t.type){var c=t.payload.event;M(c,r),s.push(c);var l=c.timestamp<r,u=i(c,l);l?u():(a.addAction({doAction:function(){u(),o.emit(b.EventCast,c)},delay:c.delay}),a.isActive()||a.start())}return n(n({},e),{events:s})}))}}))}var j=h||S,B={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"},V={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,mouseTail:B},U=function(){function e(e,n){var o=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=j(),this.legacy_missingNodeRetryMap={},this.imageMap=new Map,!(null==n?void 0:n.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");this.config=Object.assign({},V,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on(b.Resize,this.handleResize),"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),this.setupDom(),this.treeIndex=new P,this.fragmentParentMap=new Map,this.emitter.on(b.Flush,(function(){var e,n,a,s,c,l,u=o.treeIndex.flush(),d=u.scrollMap,f=u.inputMap;try{for(var p=r(d.values()),h=p.next();!h.done;h=p.next()){var m=h.value;o.applyScroll(m)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(e)throw e.error}}try{for(var v=r(f.values()),y=v.next();!y.done;y=v.next()){m=y.value;o.applyInput(m)}}catch(e){a={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}try{for(var g=r(o.fragmentParentMap.entries()),b=g.next();!b.done;b=g.next()){var S=i(b.value,2),x=S[0],E=S[1];L.map[E.__sn.id]=E,E.__sn.type===t.Element&&"textarea"===E.__sn.tagName&&x.textContent&&(E.value=x.textContent),E.appendChild(x)}}catch(e){c={error:e}}finally{try{b&&!b.done&&(l=g.return)&&l.call(g)}finally{if(c)throw c.error}}o.fragmentParentMap.clear()}));var a=new w([],(null==n?void 0:n.speed)||V.speed);this.service=R({events:e.map((function(e){return n&&n.unpackFn?n.unpackFn(e):e})),timer:a,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){o.emitter.emit(b.StateChange,{player:e})})),this.speedService=O(F({id:"speed",context:{normalSpeed:-1,timer:a},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:I({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(e){o.emitter.emit(b.StateChange,{speed:e})}));var s=this.service.state.context.events.find((function(e){return e.type===m.Meta})),c=this.service.state.context.events.find((function(e){return e.type===m.FullSnapshot}));if(s){var l=s.data,u=l.width,d=l.height;setTimeout((function(){o.emitter.emit(b.Resize,{width:u,height:d})}),0)}c&&this.rebuildFullSnapshot(c)}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){this.emitter.on(e,t)},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(n){t.config[n]=e[n]})),this.config.skipInactive||this.backToNormal()},e.prototype.getMetaData=function(){var e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},e.prototype.play=function(e){void 0===e&&(e=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}}),this.emitter.emit(b.Start)},e.prototype.pause=function(e){void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),this.emitter.emit(b.Pause)},e.prototype.resume=function(e){void 0===e&&(e=0),console.warn("The 'resume' will be departed in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(b.Resume)},e.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},e.prototype.addEvent=function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))},e.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},e.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},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),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="none",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&x(this.iframe.contentWindow,this.iframe.contentDocument)},e.prototype.handleResize=function(e){var t,n;try{for(var i=r([this.mouseTail,this.iframe]),o=i.next();!o.done;o=i.next()){var a=o.value;a&&(a.style.display="inherit",a.setAttribute("width",String(e.width)),a.setAttribute("height",String(e.height)))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.getCastFn=function(e,t){var n,i=this;switch(void 0===t&&(t=!1),e.type){case m.DomContentLoaded:case m.Load:break;case m.Custom:n=function(){i.emitter.emit(b.CustomEvent,e)};break;case m.Meta:n=function(){return i.emitter.emit(b.Resize,{width:e.data.width,height:e.data.height})};break;case m.FullSnapshot:n=function(){i.rebuildFullSnapshot(e,t),i.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case m.IncrementalSnapshot:n=function(){var n,o;if(i.applyIncremental(e,t),!t&&(e===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.backToNormal()),i.config.skipInactive&&!i.nextUserInteractionEvent)){try{for(var a=r(i.service.state.context.events),s=a.next();!s.done;s=a.next()){var c=s.value;if(!(c.timestamp<=e.timestamp)&&i.isUserInteraction(c)){c.delay-e.delay>1e4*i.speedService.state.context.timer.speed&&(i.nextUserInteractionEvent=c);break}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}if(i.nextUserInteractionEvent){var l=i.nextUserInteractionEvent.delay-e.delay,u={speed:Math.min(Math.round(l/5e3),360)};i.speedService.send({type:"FAST_FORWARD",payload:u}),i.emitter.emit(b.SkipStart,u)}}}}return function(){if(n&&n(),i.service.send({type:"CAST_EVENT",payload:{event:e}}),e===i.service.state.context.events[i.service.state.context.events.length-1]){var t=function(){i.backToNormal(),i.service.send("END"),i.emitter.emit(b.Finish)};e.type===m.IncrementalSnapshot&&e.data.source===v.MouseMove&&e.data.positions.length?setTimeout((function(){t()}),Math.max(0,-e.data.positions[0].timeOffset)):t()}}},e.prototype.rebuildFullSnapshot=function(e,t){if(void 0===t&&(t=!1),!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={},L.map=p(e.data.node,this.iframe.contentDocument)[1];var n=document.createElement("style"),r=this.iframe.contentDocument,i=r.documentElement,o=r.head;i.insertBefore(n,o);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(b.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()},e.prototype.waitForStylesheetLoad=function(){var e,t=this,n=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(n){var r,i=new Set,o=this.service.state,a=function(){o=t.service.state};this.emitter.on(b.Start,a),this.emitter.on(b.Pause,a);var s=function(){t.emitter.off(b.Start,a),t.emitter.off(b.Pause,a)};n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(i.add(e),e.addEventListener("load",(function(){i.delete(e),0===i.size&&-1!==r&&(o.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(b.LoadStylesheetEnd),r&&window.clearTimeout(r),s())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(b.LoadStylesheetStart),r=window.setTimeout((function(){o.matches("playing")&&t.play(t.getCurrentTime()),r=-1,s()}),this.config.loadTimeout))}},e.prototype.preloadAllImages=function(){var e,t,n=this,i=this.service.state,o=function(){i=n.service.state};this.emitter.on(b.Start,o),this.emitter.on(b.Pause,o);var a=0,s=0;try{for(var c=r(this.service.state.context.events),l=c.next();!l.done;l=c.next()){var u=l.value;if(u.type===m.IncrementalSnapshot&&u.data.source===v.CanvasMutation&&"drawImage"===u.data.property&&"string"==typeof u.data.args[0]&&!this.imageMap.has(u)){a++;var d=document.createElement("img");d.src=u.data.args[0],this.imageMap.set(u,d),d.onload=function(){++s===a&&(i.matches("playing")&&n.play(n.getCurrentTime()),n.emitter.off(b.Start,o),n.emitter.off(b.Pause,o))}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}a!==s&&this.service.send({type:"PAUSE"})},e.prototype.applyIncremental=function(e,t){var n,r=this,i=e.data;switch(i.source){case v.Mutation:t&&(i.adds.forEach((function(e){return r.treeIndex.add(e)})),i.texts.forEach((function(e){return r.treeIndex.text(e)})),i.attributes.forEach((function(e){return r.treeIndex.attribute(e)})),i.removes.forEach((function(e){return r.treeIndex.remove(e)}))),this.applyMutation(i,t);break;case v.MouseMove:if(t){var o=i.positions[i.positions.length-1];this.moveAndHover(i,o.x,o.y,o.id)}else i.positions.forEach((function(t){var n={doAction:function(){r.moveAndHover(i,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-r.service.state.context.baselineTime};r.timer.addAction(n)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(n=i.positions[0])||void 0===n?void 0:n.timeOffset)});break;case v.MouseInteraction:if(-1===i.id)break;var a=new Event(y[i.type].toLowerCase());if(!(u=L.getNode(i.id)))return this.debugNodeNotFound(i,i.id);this.emitter.emit(b.MouseInteraction,{type:i.type,target:u});var s=this.config.triggerFocus;switch(i.type){case y.Blur:"blur"in u&&u.blur();break;case y.Focus:s&&u.focus&&u.focus({preventScroll:!0});break;case y.Click:case y.TouchStart:case y.TouchEnd:t||(this.moveAndHover(i,i.x,i.y,i.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:u.dispatchEvent(a)}break;case v.Scroll:if(-1===i.id)break;if(t){this.treeIndex.scroll(i);break}this.applyScroll(i);break;case v.ViewportResize:this.emitter.emit(b.Resize,{width:i.width,height:i.height});break;case v.Input:if(-1===i.id)break;if(t){this.treeIndex.input(i);break}this.applyInput(i);break;case v.MediaInteraction:if(!(u=L.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var c=u;try{i.type===g.Pause&&c.pause(),i.type===g.Play&&(c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?c.play():c.addEventListener("canplay",(function(){c.play()})))}catch(e){this.config.showWarning&&console.warn("Failed to replay media interactions: "+(e.message||e))}break;case v.StyleSheetRule:if(!(u=L.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var l=u.sheet;i.adds&&i.adds.forEach((function(e){var t=e.rule,n=e.index,r=void 0===n?void 0:Math.min(n,l.rules.length);try{l.insertRule(t,r)}catch(e){}})),i.removes&&i.removes.forEach((function(e){var t=e.index;try{l.deleteRule(t)}catch(e){}}));break;case v.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var u;if(!(u=L.getNode(i.id)))return this.debugNodeNotFound(i,i.id);try{var d=u.getContext("2d");if(i.setter)return void(d[i.property]=i.args[0]);var f=d[i.property];if("drawImage"===i.property&&"string"==typeof i.args[0]){var p=this.imageMap.get(e);i.args[0]=p,f.apply(d,i.args)}else f.apply(d,i.args)}catch(e){this.warnCanvasMutationFailed(i,i.id,e)}}},e.prototype.applyMutation=function(e,t){var r=this;e.removes.forEach((function(t){var n=L.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);var i=L.getNode(t.parentId);if(!i)return r.warnNodeNotFound(e,t.parentId);if(L.removeNodeFromMap(n),i){var o=r.fragmentParentMap.get(i);o&&o.contains(n)?o.removeChild(n):i.removeChild(n)}}));var i=n({},this.legacy_missingNodeRetryMap),o=[],a=function(e){if(!r.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var n=L.getNode(e.parentId);if(!n)return o.push(e);var a=r.iframe.contentDocument.contains(n);if(t&&a){var s=document.createDocumentFragment();for(L.map[e.parentId]=s,r.fragmentParentMap.set(s,n);n.firstChild;)s.appendChild(n.firstChild);n=s}var c=null,l=null;if(e.previousId&&(c=L.getNode(e.previousId)),e.nextId&&(l=L.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!l)return o.push(e);var u=f(e.node,r.iframe.contentDocument,L.map,!0);-1!==e.previousId&&-1!==e.nextId?(c&&c.nextSibling&&c.nextSibling.parentNode?n.insertBefore(u,c.nextSibling):l&&l.parentNode?n.contains(l)?n.insertBefore(u,l):n.insertBefore(u,null):n.appendChild(u),(e.previousId||e.nextId)&&r.legacy_resolveMissingNode(i,n,u,e)):i[e.node.id]={node:u,mutation:e}};for(e.adds.forEach((function(e){a(e)}));o.length;){if(o.every((function(e){return!Boolean(L.getNode(e.parentId))})))return o.forEach((function(t){return r.warnNodeNotFound(e,t.node.id)}));var s=o.shift();a(s)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),e.texts.forEach((function(t){var n=L.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);r.fragmentParentMap.has(n)&&(n=r.fragmentParentMap.get(n)),n.textContent=t.value})),e.attributes.forEach((function(t){var n=L.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);for(var i in r.fragmentParentMap.has(n)&&(n=r.fragmentParentMap.get(n)),t.attributes)if("string"==typeof i){var o=t.attributes[i];null!==o?n.setAttribute(i,o):n.removeAttribute(i)}}))},e.prototype.applyScroll=function(e){var t=L.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);if(t===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:e.y,left:e.x,behavior:"smooth"});else try{t.scrollTop=e.y,t.scrollLeft=e.x}catch(e){}},e.prototype.applyInput=function(e){var t=L.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}},e.prototype.legacy_resolveMissingNode=function(e,t,n,r){var i=r.previousId,o=r.nextId,a=i&&e[i],s=o&&e[o];if(a){var c=a,l=c.node,u=c.mutation;t.insertBefore(l,n),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_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.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,l,u)}},e.prototype.moveAndHover=function(e,t,n,r){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px",this.drawMouseTail({x:t,y:n});var i=L.getNode(r);if(!i)return this.debugNodeNotFound(e,r);this.hoverElements(i)},e.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?B:Object.assign({},B,this.config.mouseTail),r=n.lineCap,i=n.lineWidth,o=n.strokeStyle,a=n.duration,s=function(){if(t.mouseTail){var e=t.mouseTail.getContext("2d");e&&t.tailPositions.length&&(e.clearRect(0,0,t.mouseTail.width,t.mouseTail.height),e.beginPath(),e.lineWidth=i,e.lineCap=r,e.strokeStyle=o,e.moveTo(t.tailPositions[0].x,t.tailPositions[0].y),t.tailPositions.forEach((function(t){return e.lineTo(t.x,t.y)})),e.stroke())}};this.tailPositions.push(e),s(),setTimeout((function(){t.tailPositions=t.tailPositions.filter((function(t){return t!==e})),s()}),a)}},e.prototype.hoverElements=function(e){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")}));for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement},e.prototype.isUserInteraction=function(e){return e.type===m.IncrementalSnapshot&&(e.data.source>v.Mutation&&e.data.source<=v.Input)},e.prototype.backToNormal=function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(b.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},e.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn("[replayer]","Node with id '"+t+"' not found in",e)},e.prototype.warnCanvasMutationFailed=function(e,t,n){console.warn("[replayer]","Has error on update canvas '"+t+"'",e,n)},e.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log("[replayer]","Node with id '"+t+"' not found in",e)},e}();return e.Replayer=U,e}({});
***************************************************************************** */!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(E||(E={}));var T={type:"xstate.init"};function N(e){return void 0===e?[]:[].concat(e)}function I(e){return{type:"xstate.assign",assignment:e}}function C(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function A(e){return function(t){return e===t}}function _(e){return"string"==typeof e?{type:e}:e}function k(e,t){return{value:e,context:t,actions:[],changed:!1,matches:A(e)}}function F(e,t){void 0===t&&(t={});var n={config:e,_options:t,initialState:{value:e.initial,actions:N(e.states[e.initial].entry).map((function(e){return C(e,t.actions)})),context:e.context,matches:A(e.initial)},transition:function(t,r){var i,o,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,c=a.context,l=_(r),u=e.states[s];if(u.on){var d=N(u.on[l.type]),f=function(t){if(void 0===t)return{value:k(s,c)};var r="string"==typeof t?{target:t}:t,i=r.target,o=void 0===i?s:i,a=r.actions,d=void 0===a?[]:a,f=r.cond,p=c;if((void 0===f?function(){return!0}:f)(c,l)){var h=e.states[o],m=!1,v=[].concat(u.exit,d,h.entry).filter((function(e){return e})).map((function(e){return C(e,n._options.actions)})).filter((function(e){if("xstate.assign"===e.type){m=!0;var t=Object.assign({},p);return"function"==typeof e.assignment?t=e.assignment(p,l):Object.keys(e.assignment).forEach((function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](p,l):e.assignment[n]})),p=t,!1}return!0}));return{value:{value:o,context:p,actions:v,changed:o!==s||v.length>0||m,matches:A(o)}}}};try{for(var p=function(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}}}}(d),h=p.next();!h.done;h=p.next()){var m=f(h.value);if("object"==typeof m)return m.value}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}}return k(s,c)}};return n}var D=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function O(e){var t=e.initialState,n=E.NotStarted,r=new Set,i={_machine:e,send:function(i){n===E.Running&&(t=e.transition(t,i),D(t,_(i)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(){return n=E.Running,D(t,T),i},stop:function(){return n=E.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}var L={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return L.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete L.map[t],e.childNodes&&e.childNodes.forEach((function(e){return L.removeNodeFromMap(e)}))},has:function(e){return L.map.hasOwnProperty(e)}};var P=function(){function e(){this.reset()}return e.prototype.add=function(e){var t=this.indexes.get(e.parentId),n={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(n.parent=t,t.children[n.id]=n):this.tree[n.id]=n,this.indexes.set(n.id,n)},e.prototype.remove=function(e){var t=this,n=this.indexes.get(e.parentId),r=this.indexes.get(e.id),i=function(e){t.removeIdSet.add(e);var n=L.getNode(e);null==n||n.childNodes.forEach((function(e){return i(e.__sn.id)}))},o=function(n){t.removeIdSet.add(n.id),Object.values(n.children).forEach((function(e){return o(e)}));var r=t.indexes.get(n.id);if(r){var i=r.parent;i&&(delete r.parent,delete i.children[r.id],t.indexes.delete(e.id))}};r?n?(delete r.parent,delete n.children[r.id],this.indexes.delete(e.id),o(r)):(delete this.tree[r.id],this.indexes.delete(r.id),o(r)):(this.removeNodeMutations.push(e),i(e.id))},e.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},e.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},e.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},e.prototype.input=function(e){this.inputMap.set(e.id,e)},e.prototype.flush=function(){var e,t,n,i,o=this,a=this.tree,s=this.removeNodeMutations,c=this.textMutations,l=this.attributeMutations,u={source:v.Mutation,removes:s,texts:c,attributes:l,adds:[]},d=function(e,t){t&&o.removeIdSet.add(e.id),u.texts=u.texts.concat(t?[]:e.texts).filter((function(e){return!o.removeIdSet.has(e.id)})),u.attributes=u.attributes.concat(t?[]:e.attributes).filter((function(e){return!o.removeIdSet.has(e.id)})),o.removeIdSet.has(e.id)||o.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return d(e,!0)})):(u.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return d(e,!1)})))};Object.values(a).forEach((function(e){return d(e,!1)}));try{for(var f=r(this.scrollMap.keys()),p=f.next();!p.done;p=f.next()){var h=p.value;this.removeIdSet.has(h)&&this.scrollMap.delete(h)}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}try{for(var m=r(this.inputMap.keys()),y=m.next();!y.done;y=m.next()){h=y.value;this.removeIdSet.has(h)&&this.inputMap.delete(h)}}catch(e){n={error:e}}finally{try{y&&!y.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}var g=new Map(this.scrollMap),b=new Map(this.inputMap);return this.reset(),{mutationData:u,scrollMap:g,inputMap:b}},e.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},e}();function R(e,t){var i=t.getCastFn,o=t.emitter;return O(F({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:I({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:I((function(e,t){var r=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(r=t.payload.timeOffset),n(n({},e),{timeOffset:r,baselineTime:e.events[0].timestamp+r})})),play:function(e){var t,n,a,s,c=e.timer,l=e.events,u=e.baselineTime,d=e.lastPlayedEvent;c.clear();try{for(var f=r(l),p=f.next();!p.done;p=f.next()){M(p.value,u)}}catch(e){t={error:e}}finally{try{p&&!p.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}var h=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===m.Meta&&r.timestamp<=t)return e.slice(n)}return e}(l,u),y=new Array,g=function(e){if(d&&d.timestamp<u&&(e.timestamp<=d.timestamp||e===d))return"continue";var t=e.timestamp<u;if(t&&!function(e){switch(e.type){case m.DomContentLoaded:case m.Load:case m.Custom:return!1;case m.FullSnapshot:case m.Meta:return!0}switch(e.data.source){case v.MouseMove:case v.MouseInteraction:case v.TouchMove:case v.MediaInteraction:return!1;case v.ViewportResize:case v.StyleSheetRule:case v.Scroll:case v.Input:return!0}return!0}(e))return"continue";var n=i(e,t);t?n():y.push({doAction:function(){n(),o.emit(b.EventCast,e)},delay:e.delay})};try{for(var S=r(h),x=S.next();!x.done;x=S.next()){g(x.value)}}catch(e){a={error:e}}finally{try{x&&!x.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}o.emit(b.Flush),c.addActions(y),c.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:I((function(e){return n(n({},e),{lastPlayedEvent:null})})),startLive:I({baselineTime:function(e,t){return e.timer.toggleLiveMode(!0),e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:I((function(e,t){var r=e.baselineTime,a=e.timer,s=e.events;if("ADD_EVENT"===t.type){var c=t.payload.event;M(c,r),s.push(c);var l=c.timestamp<r,u=i(c,l);l?u():(a.addAction({doAction:function(){u(),o.emit(b.EventCast,c)},delay:c.delay}),a.isActive()||a.start())}return n(n({},e),{events:s})}))}}))}var j=h||S,B={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"},V={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,mouseTail:B},U=function(){function e(e,n){var o=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=j(),this.legacy_missingNodeRetryMap={},this.imageMap=new Map,!(null==n?void 0:n.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");this.config=Object.assign({},V,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on(b.Resize,this.handleResize),"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),this.setupDom(),this.treeIndex=new P,this.fragmentParentMap=new Map,this.emitter.on(b.Flush,(function(){var e,n,a,s,c,l,u=o.treeIndex.flush(),d=u.scrollMap,f=u.inputMap;try{for(var p=r(d.values()),h=p.next();!h.done;h=p.next()){var m=h.value;o.applyScroll(m)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(e)throw e.error}}try{for(var v=r(f.values()),y=v.next();!y.done;y=v.next()){m=y.value;o.applyInput(m)}}catch(e){a={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}try{for(var g=r(o.fragmentParentMap.entries()),b=g.next();!b.done;b=g.next()){var S=i(b.value,2),x=S[0],E=S[1];L.map[E.__sn.id]=E,E.__sn.type===t.Element&&"textarea"===E.__sn.tagName&&x.textContent&&(E.value=x.textContent),E.appendChild(x)}}catch(e){c={error:e}}finally{try{b&&!b.done&&(l=g.return)&&l.call(g)}finally{if(c)throw c.error}}o.fragmentParentMap.clear()}));var a=new w([],(null==n?void 0:n.speed)||V.speed);this.service=R({events:e.map((function(e){return n&&n.unpackFn?n.unpackFn(e):e})),timer:a,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){o.emitter.emit(b.StateChange,{player:e})})),this.speedService=O(F({id:"speed",context:{normalSpeed:-1,timer:a},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:I({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(e){o.emitter.emit(b.StateChange,{speed:e})}));var s=this.service.state.context.events.find((function(e){return e.type===m.Meta})),c=this.service.state.context.events.find((function(e){return e.type===m.FullSnapshot}));if(s){var l=s.data,u=l.width,d=l.height;setTimeout((function(){o.emitter.emit(b.Resize,{width:u,height:d})}),0)}c&&this.rebuildFullSnapshot(c)}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){this.emitter.on(e,t)},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(n){t.config[n]=e[n]})),this.config.skipInactive||this.backToNormal(),void 0!==e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}})},e.prototype.getMetaData=function(){var e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},e.prototype.play=function(e){void 0===e&&(e=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}}),this.emitter.emit(b.Start)},e.prototype.pause=function(e){void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),this.emitter.emit(b.Pause)},e.prototype.resume=function(e){void 0===e&&(e=0),console.warn("The 'resume' will be departed in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(b.Resume)},e.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},e.prototype.addEvent=function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))},e.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},e.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},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),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="none",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&x(this.iframe.contentWindow,this.iframe.contentDocument)},e.prototype.handleResize=function(e){var t,n;try{for(var i=r([this.mouseTail,this.iframe]),o=i.next();!o.done;o=i.next()){var a=o.value;a&&(a.style.display="inherit",a.setAttribute("width",String(e.width)),a.setAttribute("height",String(e.height)))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.getCastFn=function(e,t){var n,i=this;switch(void 0===t&&(t=!1),e.type){case m.DomContentLoaded:case m.Load:break;case m.Custom:n=function(){i.emitter.emit(b.CustomEvent,e)};break;case m.Meta:n=function(){return i.emitter.emit(b.Resize,{width:e.data.width,height:e.data.height})};break;case m.FullSnapshot:n=function(){i.rebuildFullSnapshot(e,t),i.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case m.IncrementalSnapshot:n=function(){var n,o;if(i.applyIncremental(e,t),!t&&(e===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.backToNormal()),i.config.skipInactive&&!i.nextUserInteractionEvent)){try{for(var a=r(i.service.state.context.events),s=a.next();!s.done;s=a.next()){var c=s.value;if(!(c.timestamp<=e.timestamp)&&i.isUserInteraction(c)){c.delay-e.delay>1e4*i.speedService.state.context.timer.speed&&(i.nextUserInteractionEvent=c);break}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}if(i.nextUserInteractionEvent){var l=i.nextUserInteractionEvent.delay-e.delay,u={speed:Math.min(Math.round(l/5e3),360)};i.speedService.send({type:"FAST_FORWARD",payload:u}),i.emitter.emit(b.SkipStart,u)}}}}return function(){if(n&&n(),i.service.send({type:"CAST_EVENT",payload:{event:e}}),e===i.service.state.context.events[i.service.state.context.events.length-1]){var t=function(){i.backToNormal(),i.service.send("END"),i.emitter.emit(b.Finish)};e.type===m.IncrementalSnapshot&&e.data.source===v.MouseMove&&e.data.positions.length?setTimeout((function(){t()}),Math.max(0,-e.data.positions[0].timeOffset)):t()}}},e.prototype.rebuildFullSnapshot=function(e,t){if(void 0===t&&(t=!1),!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={},L.map=p(e.data.node,this.iframe.contentDocument)[1];var n=document.createElement("style"),r=this.iframe.contentDocument,i=r.documentElement,o=r.head;i.insertBefore(n,o);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(b.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()},e.prototype.waitForStylesheetLoad=function(){var e,t=this,n=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(n){var r,i=new Set,o=this.service.state,a=function(){o=t.service.state};this.emitter.on(b.Start,a),this.emitter.on(b.Pause,a);var s=function(){t.emitter.off(b.Start,a),t.emitter.off(b.Pause,a)};n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(i.add(e),e.addEventListener("load",(function(){i.delete(e),0===i.size&&-1!==r&&(o.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(b.LoadStylesheetEnd),r&&window.clearTimeout(r),s())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(b.LoadStylesheetStart),r=window.setTimeout((function(){o.matches("playing")&&t.play(t.getCurrentTime()),r=-1,s()}),this.config.loadTimeout))}},e.prototype.preloadAllImages=function(){var e,t,n=this,i=this.service.state,o=function(){i=n.service.state};this.emitter.on(b.Start,o),this.emitter.on(b.Pause,o);var a=0,s=0;try{for(var c=r(this.service.state.context.events),l=c.next();!l.done;l=c.next()){var u=l.value;if(u.type===m.IncrementalSnapshot&&u.data.source===v.CanvasMutation&&"drawImage"===u.data.property&&"string"==typeof u.data.args[0]&&!this.imageMap.has(u)){a++;var d=document.createElement("img");d.src=u.data.args[0],this.imageMap.set(u,d),d.onload=function(){++s===a&&(i.matches("playing")&&n.play(n.getCurrentTime()),n.emitter.off(b.Start,o),n.emitter.off(b.Pause,o))}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}a!==s&&this.service.send({type:"PAUSE"})},e.prototype.applyIncremental=function(e,t){var n,r=this,i=e.data;switch(i.source){case v.Mutation:t&&(i.adds.forEach((function(e){return r.treeIndex.add(e)})),i.texts.forEach((function(e){return r.treeIndex.text(e)})),i.attributes.forEach((function(e){return r.treeIndex.attribute(e)})),i.removes.forEach((function(e){return r.treeIndex.remove(e)}))),this.applyMutation(i,t);break;case v.MouseMove:if(t){var o=i.positions[i.positions.length-1];this.moveAndHover(i,o.x,o.y,o.id)}else i.positions.forEach((function(t){var n={doAction:function(){r.moveAndHover(i,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-r.service.state.context.baselineTime};r.timer.addAction(n)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(n=i.positions[0])||void 0===n?void 0:n.timeOffset)});break;case v.MouseInteraction:if(-1===i.id)break;var a=new Event(y[i.type].toLowerCase());if(!(u=L.getNode(i.id)))return this.debugNodeNotFound(i,i.id);this.emitter.emit(b.MouseInteraction,{type:i.type,target:u});var s=this.config.triggerFocus;switch(i.type){case y.Blur:"blur"in u&&u.blur();break;case y.Focus:s&&u.focus&&u.focus({preventScroll:!0});break;case y.Click:case y.TouchStart:case y.TouchEnd:t||(this.moveAndHover(i,i.x,i.y,i.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:u.dispatchEvent(a)}break;case v.Scroll:if(-1===i.id)break;if(t){this.treeIndex.scroll(i);break}this.applyScroll(i);break;case v.ViewportResize:this.emitter.emit(b.Resize,{width:i.width,height:i.height});break;case v.Input:if(-1===i.id)break;if(t){this.treeIndex.input(i);break}this.applyInput(i);break;case v.MediaInteraction:if(!(u=L.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var c=u;try{i.type===g.Pause&&c.pause(),i.type===g.Play&&(c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?c.play():c.addEventListener("canplay",(function(){c.play()})))}catch(e){this.config.showWarning&&console.warn("Failed to replay media interactions: "+(e.message||e))}break;case v.StyleSheetRule:if(!(u=L.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var l=u.sheet;i.adds&&i.adds.forEach((function(e){var t=e.rule,n=e.index,r=void 0===n?void 0:Math.min(n,l.rules.length);try{l.insertRule(t,r)}catch(e){}})),i.removes&&i.removes.forEach((function(e){var t=e.index;try{l.deleteRule(t)}catch(e){}}));break;case v.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var u;if(!(u=L.getNode(i.id)))return this.debugNodeNotFound(i,i.id);try{var d=u.getContext("2d");if(i.setter)return void(d[i.property]=i.args[0]);var f=d[i.property];if("drawImage"===i.property&&"string"==typeof i.args[0]){var p=this.imageMap.get(e);i.args[0]=p,f.apply(d,i.args)}else f.apply(d,i.args)}catch(e){this.warnCanvasMutationFailed(i,i.id,e)}}},e.prototype.applyMutation=function(e,t){var r=this;e.removes.forEach((function(t){var n=L.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);var i=L.getNode(t.parentId);if(!i)return r.warnNodeNotFound(e,t.parentId);if(L.removeNodeFromMap(n),i){var o=r.fragmentParentMap.get(i);o&&o.contains(n)?o.removeChild(n):i.removeChild(n)}}));var i=n({},this.legacy_missingNodeRetryMap),o=[],a=function(e){if(!r.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var n=L.getNode(e.parentId);if(!n)return o.push(e);var a=r.iframe.contentDocument.contains(n);if(t&&a){var s=document.createDocumentFragment();for(L.map[e.parentId]=s,r.fragmentParentMap.set(s,n);n.firstChild;)s.appendChild(n.firstChild);n=s}var c=null,l=null;if(e.previousId&&(c=L.getNode(e.previousId)),e.nextId&&(l=L.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!l)return o.push(e);var u=f(e.node,r.iframe.contentDocument,L.map,!0);-1!==e.previousId&&-1!==e.nextId?(c&&c.nextSibling&&c.nextSibling.parentNode?n.insertBefore(u,c.nextSibling):l&&l.parentNode?n.contains(l)?n.insertBefore(u,l):n.insertBefore(u,null):n.appendChild(u),(e.previousId||e.nextId)&&r.legacy_resolveMissingNode(i,n,u,e)):i[e.node.id]={node:u,mutation:e}};for(e.adds.forEach((function(e){a(e)}));o.length;){if(o.every((function(e){return!Boolean(L.getNode(e.parentId))})))return o.forEach((function(t){return r.warnNodeNotFound(e,t.node.id)}));var s=o.shift();a(s)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),e.texts.forEach((function(t){var n=L.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);r.fragmentParentMap.has(n)&&(n=r.fragmentParentMap.get(n)),n.textContent=t.value})),e.attributes.forEach((function(t){var n=L.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);for(var i in r.fragmentParentMap.has(n)&&(n=r.fragmentParentMap.get(n)),t.attributes)if("string"==typeof i){var o=t.attributes[i];null!==o?n.setAttribute(i,o):n.removeAttribute(i)}}))},e.prototype.applyScroll=function(e){var t=L.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);if(t===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:e.y,left:e.x,behavior:"smooth"});else try{t.scrollTop=e.y,t.scrollLeft=e.x}catch(e){}},e.prototype.applyInput=function(e){var t=L.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}},e.prototype.legacy_resolveMissingNode=function(e,t,n,r){var i=r.previousId,o=r.nextId,a=i&&e[i],s=o&&e[o];if(a){var c=a,l=c.node,u=c.mutation;t.insertBefore(l,n),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_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.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,l,u)}},e.prototype.moveAndHover=function(e,t,n,r){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px",this.drawMouseTail({x:t,y:n});var i=L.getNode(r);if(!i)return this.debugNodeNotFound(e,r);this.hoverElements(i)},e.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?B:Object.assign({},B,this.config.mouseTail),r=n.lineCap,i=n.lineWidth,o=n.strokeStyle,a=n.duration,s=function(){if(t.mouseTail){var e=t.mouseTail.getContext("2d");e&&t.tailPositions.length&&(e.clearRect(0,0,t.mouseTail.width,t.mouseTail.height),e.beginPath(),e.lineWidth=i,e.lineCap=r,e.strokeStyle=o,e.moveTo(t.tailPositions[0].x,t.tailPositions[0].y),t.tailPositions.forEach((function(t){return e.lineTo(t.x,t.y)})),e.stroke())}};this.tailPositions.push(e),s(),setTimeout((function(){t.tailPositions=t.tailPositions.filter((function(t){return t!==e})),s()}),a)}},e.prototype.hoverElements=function(e){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")}));for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement},e.prototype.isUserInteraction=function(e){return e.type===m.IncrementalSnapshot&&(e.data.source>v.Mutation&&e.data.source<=v.Input)},e.prototype.backToNormal=function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(b.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},e.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn("[replayer]","Node with id '"+t+"' not found in",e)},e.prototype.warnCanvasMutationFailed=function(e,t,n){console.warn("[replayer]","Has error on update canvas '"+t+"'",e,n)},e.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log("[replayer]","Node with id '"+t+"' not found in",e)},e}();return e.Replayer=U,e}({});
//# sourceMappingURL=rrweb-replay.min.js.map

@@ -195,2 +195,3 @@ import { __spread, __values, __assign } from '../../node_modules/tslib/tslib.es6.js';

[HTMLTextAreaElement.prototype, 'value'],
[HTMLSelectElement.prototype, 'selectedIndex'],
];

@@ -197,0 +198,0 @@ if (propertyDescriptor && propertyDescriptor.set) {

@@ -170,2 +170,10 @@ import { __values, __assign, __read } from '../../node_modules/tslib/tslib.es6.js';

}
if (typeof config.speed !== 'undefined') {
this.speedService.send({
type: 'SET_SPEED',
payload: {
speed: config.speed,
},
});
}
};

@@ -172,0 +180,0 @@ Replayer.prototype.getMetaData = function () {

@@ -1132,2 +1132,3 @@ 'use strict';

[HTMLTextAreaElement.prototype, 'value'],
[HTMLSelectElement.prototype, 'selectedIndex'],
];

@@ -1134,0 +1135,0 @@ if (propertyDescriptor && propertyDescriptor.set) {

{
"name": "rrweb",
"version": "0.9.2",
"version": "0.9.3",
"description": "record and replay the web",

@@ -5,0 +5,0 @@ "scripts": {

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

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

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 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

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

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

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

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc