Socket
Socket
Sign inDemoInstall

rrweb

Package Overview
Dependencies
5
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

es/rrweb/src/replay/virtual-styles.js

2

dist/record/rrweb-record.min.js

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

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */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&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}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 a(e){var t,n=null===(t=e)||void 0===t?void 0:t.host;return Boolean(n&&n.shadowRoot&&n.shadowRoot===e)}function i(e){var t=e.maskInputOptions,n=e.tagName,o=e.type,r=e.value,a=e.maskInputFn,i=r||"";return(t[n.toLowerCase()]||t[o])&&(i=a?a(i):"*".repeat(i.length)),i}!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 s=1,u=RegExp("[^a-z0-9-_:]");function l(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(c).join(""):null}catch(e){return null}}function c(e){return function(e){return"styleSheet"in e}(e)?l(e.styleSheet)||"":e.cssText}var d=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,p=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,m=/^(data:)([^,]*),(.*)/i;function f(e,t){return(e||"").replace(d,(function(e,n,o,r,a,i){var s,u=o||a||i,l=n||r||"";if(!u)return e;if(!p.test(u))return"url("+l+u+l+")";if(m.test(u))return"url("+l+u+l+")";if("/"===u[0])return"url("+l+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+u)+l+")";var c=t.split("/"),d=u.split("/");c.pop();for(var f=0,h=d;f<h.length;f++){var v=h[f];"."!==v&&(".."===v?c.pop():c.push(v))}return"url("+l+c.join("/")+l+")"}))}var h,v,y,b,g,k=/^[^ \t\n\r\u000c]+/,S=/^[, \t\n\r\u000c]+/;function C(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function w(){var e=document.createElement("a");return e.href="",e.href}function I(e,t,n,o){return"src"===n||("href"===n||"xlink:href"===n)&&o?C(e,o):"background"!==n||!o||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n&&o?function(e,t){if(""===t.trim())return t;var n=0;function o(e){var o,r=e.exec(t.substring(n));return r?(o=r[0],n+=o.length,o):""}for(var r=[];o(S),!(n>=t.length);){var a=o(k);if(","===a.slice(-1))a=C(e,a.substring(0,a.length-1)),r.push(a);else{var i="";a=C(e,a);for(var s=!1;;){var u=t.charAt(n);if(""===u){r.push((a+i).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,r.push((a+i).trim());break}"("===u&&(s=!0)}i+=u,n+=1}}}return r.join(", ")}(e,o):"style"===n&&o?f(o,w()):o:C(e,o)}function T(e,t,n){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){if("string"==typeof t){if(e.classList.contains(t))return!0}else e.classList.forEach((function(e){if(t.test(e))return!0}));return!(!n||!e.matches(n))||T(e.parentNode,t,n)}return e.nodeType,e.TEXT_NODE,T(e.parentNode,t,n)}function x(t,n){var o,r,a=n.doc,s=n.blockClass,c=n.blockSelector,d=n.maskTextClass,p=n.maskTextSelector,m=n.inlineStylesheet,h=n.maskInputOptions,v=void 0===h?{}:h,y=n.maskTextFn,b=n.maskInputFn,g=n.recordCanvas,k=n.keepIframeSrcFn;if(a.__sn){var S=a.__sn.id;o=1===S?void 0:S}switch(t.nodeType){case t.DOCUMENT_NODE:return{type:e.Document,childNodes:[],rootId:o};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:o};case t.ELEMENT_NODE:for(var C=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var o=0;o<e.classList.length;o++){var r=e.classList[o];if(t.test(r))return!0}return!!n&&e.matches(n)}(t,s,c),x=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return u.test(t)?"div":t}(t),M={},E=0,O=Array.from(t.attributes);E<O.length;E++){var N=O[E],_=N.name,D=N.value;M[_]=I(a,x,_,D)}if("link"===x&&m){var F,L=Array.from(a.styleSheets).find((function(e){return e.href===t.href}));(F=l(L))&&(delete M.rel,delete M.href,M._cssText=f(F,L.href))}if("style"===x&&t.sheet&&!(t.innerText||t.textContent||"").trim().length)(F=l(t.sheet))&&(M._cssText=f(F,w()));if("input"===x||"textarea"===x||"select"===x){D=t.value;"radio"!==M.type&&"checkbox"!==M.type&&"submit"!==M.type&&"button"!==M.type&&D?M.value=i({type:M.type,tagName:x,value:D,maskInputOptions:v,maskInputFn:b}):t.checked&&(M.checked=t.checked)}if("option"===x){var R=t.parentElement;M.value===R.value&&(M.selected=t.selected)}if("canvas"===x&&g&&(M.rr_dataURL=t.toDataURL()),"audio"!==x&&"video"!==x||(M.rr_mediaState=t.paused?"paused":"played",M.rr_mediaCurrentTime=t.currentTime),t.scrollLeft&&(M.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(M.rr_scrollTop=t.scrollTop),C){var A=t.getBoundingClientRect(),z=A.width,P=A.height;M={class:M.class,rr_width:z+"px",rr_height:P+"px"}}return"iframe"!==x||k(M.src)||delete M.src,{type:e.Element,tagName:x,attributes:M,childNodes:[],isSVG:(r=t,"svg"===r.tagName||r instanceof SVGElement||void 0),needBlock:C,rootId:o};case t.TEXT_NODE:var W=t.parentNode&&t.parentNode.tagName,H=t.textContent,j="STYLE"===W||void 0,V="SCRIPT"===W||void 0;return j&&H&&(H=f(H,w())),V&&(H="SCRIPT_PLACEHOLDER"),!j&&!V&&T(t,d,p)&&H&&(H=y?y(H):H.replace(/[\S]/g,"*")),{type:e.Text,textContent:H||"",isStyle:j,rootId:o};case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:"",rootId:o};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||"",rootId:o};default:return!1}}function M(e){return void 0===e?"":e.toLowerCase()}function E(t,n){var o,r=n.doc,i=n.map,u=n.blockClass,l=n.blockSelector,c=n.maskTextClass,d=n.maskTextSelector,p=n.skipChild,m=void 0!==p&&p,f=n.inlineStylesheet,h=void 0===f||f,v=n.maskInputOptions,y=void 0===v?{}:v,b=n.maskTextFn,g=n.maskInputFn,k=n.slimDOMOptions,S=n.recordCanvas,C=void 0!==S&&S,w=n.onSerialize,I=n.onIframeLoad,T=n.iframeLoadTimeout,O=void 0===T?5e3:T,N=n.keepIframeSrcFn,_=void 0===N?function(){return!1}:N,D=n.preserveWhiteSpace,F=void 0===D||D,L=x(t,{doc:r,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,inlineStylesheet:h,maskInputOptions:y,maskTextFn:b,maskInputFn:g,recordCanvas:C,keepIframeSrcFn:_});if(!L)return console.warn(t,"not serialized"),null;o="__sn"in t?t.__sn.id:!function(t,n){if(n.comment&&t.type===e.Comment)return!0;if(t.type===e.Element){if(n.script&&("script"===t.tagName||"link"===t.tagName&&"preload"===t.attributes.rel&&"script"===t.attributes.as))return!0;if(n.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(M(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===M(t.attributes.name)||"icon"===M(t.attributes.rel)||"apple-touch-icon"===M(t.attributes.rel)||"shortcut icon"===M(t.attributes.rel))))return!0;if("meta"===t.tagName){if(n.headMetaDescKeywords&&M(t.attributes.name).match(/^description|keywords$/))return!0;if(n.headMetaSocial&&(M(t.attributes.property).match(/^(og|twitter|fb):/)||M(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===M(t.attributes.name)))return!0;if(n.headMetaRobots&&("robots"===M(t.attributes.name)||"googlebot"===M(t.attributes.name)||"bingbot"===M(t.attributes.name)))return!0;if(n.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(n.headMetaAuthorship&&("author"===M(t.attributes.name)||"generator"===M(t.attributes.name)||"framework"===M(t.attributes.name)||"publisher"===M(t.attributes.name)||"progid"===M(t.attributes.name)||M(t.attributes.property).match(/^article:/)||M(t.attributes.property).match(/^product:/)))return!0;if(n.headMetaVerification&&("google-site-verification"===M(t.attributes.name)||"yandex-verification"===M(t.attributes.name)||"csrf-token"===M(t.attributes.name)||"p:domain_verify"===M(t.attributes.name)||"verify-v1"===M(t.attributes.name)||"verification"===M(t.attributes.name)||"shopify-checkout-api-token"===M(t.attributes.name)))return!0}}return!1}(L,k)&&(F||L.type!==e.Text||L.isStyle||L.textContent.replace(/^\s+|\s+$/gm,"").length)?s++:-2;var R=Object.assign(L,{id:o});if(t.__sn=R,-2===o)return null;i[o]=t,w&&w(t);var A=!m;if(R.type===e.Element&&(A=A&&!R.needBlock,delete R.needBlock),(R.type===e.Document||R.type===e.Element)&&A){k.headWhitespace&&L.type===e.Element&&"head"===L.tagName&&(F=!1);for(var z={doc:r,map:i,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,skipChild:m,inlineStylesheet:h,maskInputOptions:y,maskTextFn:b,maskInputFn:g,slimDOMOptions:k,recordCanvas:C,preserveWhiteSpace:F,onSerialize:w,onIframeLoad:I,iframeLoadTimeout:O,keepIframeSrcFn:_},P=0,W=Array.from(t.childNodes);P<W.length;P++){(V=E(W[P],z))&&R.childNodes.push(V)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(t)&&t.shadowRoot){R.isShadowHost=!0;for(var H=0,j=Array.from(t.shadowRoot.childNodes);H<j.length;H++){var V;(V=E(j[H],z))&&(V.isShadow=!0,R.childNodes.push(V))}}}return t.parentNode&&a(t.parentNode)&&(R.isShadow=!0),R.type===e.Element&&"iframe"===R.tagName&&function(e,t,n){var o=e.contentWindow;if(o){var r,a=!1;try{r=o.document.readyState}catch(e){return}if("complete"===r){"about:blank"===o.location.href&&"about:blank"!==e.src&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}else{var i=setTimeout((function(){a||(t(),a=!0)}),n);e.addEventListener("load",(function(){clearTimeout(i),a=!0,t()}))}}}(t,(function(){var e=t.contentDocument;if(e&&I){var n=E(e,{doc:e,map:i,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:y,maskTextFn:b,maskInputFn:g,slimDOMOptions:k,recordCanvas:C,preserveWhiteSpace:F,onSerialize:w,onIframeLoad:I,iframeLoadTimeout:O,keepIframeSrcFn:_});n&&I(t,n)}}),O),R}function O(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",e[e.Plugin=6]="Plugin"}(h||(h={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag"}(v||(v={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(y||(y={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked"}(b||(b={})),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",e.PlayBack="play-back"}(g||(g={}));var N="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",_={map:{},getId:function(){return console.error(N),-1},getNode:function(){return console.error(N),null},removeNodeFromMap:function(){console.error(N)},has:function(){return console.error(N),!1},reset:function(){console.error(N)}};function D(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 s=t-(i-r),u=this,l=arguments;s<=0||s>t?(o&&(window.clearTimeout(o),o=null),r=i,e.apply(u,l)):o||!1===n.trailing||(o=window.setTimeout((function(){r=!1===n.leading?0:Date.now(),o=null,e.apply(u,l)}),s))}}function F(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 F(e,t,a||{},!0)}}function L(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(){}}}function R(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function A(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function z(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||z(e.parentNode,t)}return e.nodeType,e.TEXT_NODE,z(e.parentNode,t)}function P(e){return"__sn"in e&&-2===e.__sn.id}function W(e){return Boolean(e.changedTouches)}function H(t){return"__sn"in t&&(t.__sn.type===e.Element&&"iframe"===t.__sn.tagName)}function j(e){var t;return Boolean(null===(t=e)||void 0===t?void 0:t.shadowRoot)}function V(e){return"__ln"in e}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(_=new Proxy(_,{get:function(e,t,n){return"map"===t&&console.error(N),Reflect.get(e,t,n)}}));var B=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&&V(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&&V(e.nextSibling)&&e.nextSibling.__ln.previous){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)),e.__ln&&delete e.__ln,this.length--)},e}(),U=function(e,t){return e+"@"+t};function X(e){return"__sn"in e}var q=function(){function e(){var e=this;this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(t){t.forEach(e.processMutation),e.emit()},this.emit=function(){var t,o,r,i;if(!e.frozen&&!e.locked){for(var s=[],u=new B,l=function(t){for(var n=t,o=-2;-2===o;)o=(n=n&&n.nextSibling)&&e.mirror.getId(n);return-1===o&&z(t.nextSibling,e.blockClass)&&(o=null),o},c=function(t){var n,o=t.getRootNode?null===(n=t.getRootNode())||void 0===n?void 0:n.host:null,r=!e.doc.contains(t)&&!e.doc.contains(o);if(t.parentNode&&!r){var i=a(t.parentNode)?e.mirror.getId(o):e.mirror.getId(t.parentNode),c=l(t);if(-1===i||-1===c)return u.addNode(t);var d=E(t,{doc:e.doc,map:e.mirror.map,blockClass:e.blockClass,blockSelector:e.blockSelector,maskTextClass:e.maskTextClass,maskTextSelector:e.maskTextSelector,skipChild:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:e.slimDOMOptions,recordCanvas:e.recordCanvas,onSerialize:function(n){H(n)&&e.iframeManager.addIframe(n),j(t)&&e.shadowDomManager.addShadowRoot(t.shadowRoot,document)},onIframeLoad:function(t,n){e.iframeManager.attachIframe(t,n)}});d&&s.push({parentId:i,nextId:c,node:d})}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());try{for(var d=n(e.movedSet),p=d.next();!p.done;p=d.next()){var m=p.value;K(e.removes,m,e.mirror)&&!e.movedSet.has(m.parentNode)||c(m)}}catch(e){t={error:e}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(t)throw t.error}}try{for(var f=n(e.addedSet),h=f.next();!h.done;h=f.next()){m=h.value;$(e.droppedSet,m)||K(e.removes,m,e.mirror)?$(e.movedSet,m)?c(m):e.droppedSet.add(m):c(m)}}catch(e){r={error:e}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}for(var v=null;u.length;){var y=null;if(v){var b=e.mirror.getId(v.value.parentNode),g=l(v.value);-1!==b&&-1!==g&&(y=v)}if(!y)for(var k=u.length-1;k>=0;k--){var S=u.get(k);b=e.mirror.getId(S.value.parentNode),g=l(S.value);if(-1!==b&&-1!==g){y=S;break}}if(!y){for(;u.head;)u.removeNode(u.head.value);break}v=y.previous,u.removeNode(y.value),c(y.value)}var C={texts:e.texts.map((function(t){return{id:e.mirror.getId(t.node),value:t.value}})).filter((function(t){return e.mirror.has(t.id)})),attributes:e.attributes.map((function(t){return{id:e.mirror.getId(t.node),attributes:t.attributes}})).filter((function(t){return e.mirror.has(t.id)})),removes:e.removes,adds:s};(C.texts.length||C.attributes.length||C.removes.length||C.adds.length)&&(e.texts=[],e.attributes=[],e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.movedMap={},e.emissionCallback(C))}},this.processMutation=function(t){if(!P(t.target))switch(t.type){case"characterData":var n=t.target.textContent;z(t.target,e.blockClass)||n===t.oldValue||e.texts.push({value:T(t.target,e.maskTextClass,e.maskTextSelector)&&n?e.maskTextFn?e.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break;case"attributes":n=t.target.getAttribute(t.attributeName);if("value"===t.attributeName&&(n=i({maskInputOptions:e.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:n,maskInputFn:e.maskInputFn})),z(t.target,e.blockClass)||n===t.oldValue)return;var o=e.attributes.find((function(e){return e.node===t.target}));o||(o={node:t.target,attributes:{}},e.attributes.push(o)),o.attributes[t.attributeName]=I(e.doc,t.target.tagName,t.attributeName,n);break;case"childList":t.addedNodes.forEach((function(n){return e.genAdds(n,t.target)})),t.removedNodes.forEach((function(n){var o=e.mirror.getId(n),r=a(t.target)?e.mirror.getId(t.target.host):e.mirror.getId(t.target);z(n,e.blockClass)||z(t.target,e.blockClass)||P(n)||(e.addedSet.has(n)?(Y(e.addedSet,n),e.droppedSet.add(n)):e.addedSet.has(t.target)&&-1===o||function e(t,n){if(a(t))return!1;var o=n.getId(t);return!n.has(o)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode,n))}(t.target,e.mirror)||(e.movedSet.has(n)&&e.movedMap[U(o,r)]?Y(e.movedSet,n):e.removes.push({parentId:r,id:o,isShadow:!!a(t.target)||void 0})),e.mapRemoves.push(n))}))}},this.genAdds=function(t,n){if(!(z(t,e.blockClass)||n&&z(n,e.blockClass))){if(X(t)){if(P(t))return;e.movedSet.add(t);var o=null;n&&X(n)&&(o=n.__sn.id),o&&(e.movedMap[U(t.__sn.id,o)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);t.childNodes.forEach((function(t){return e.genAdds(t)}))}}}return e.prototype.init=function(e,t,n,o,r,a,i,s,u,l,c,d,p,m,f){this.blockClass=t,this.blockSelector=n,this.maskTextClass=o,this.maskTextSelector=r,this.inlineStylesheet=a,this.maskInputOptions=i,this.maskTextFn=s,this.maskInputFn=u,this.recordCanvas=l,this.slimDOMOptions=c,this.emissionCallback=e,this.doc=d,this.mirror=p,this.iframeManager=m,this.shadowDomManager=f},e.prototype.freeze=function(){this.frozen=!0},e.prototype.unfreeze=function(){this.frozen=!1,this.emit()},e.prototype.isFrozen=function(){return this.frozen},e.prototype.lock=function(){this.locked=!0},e.prototype.unlock=function(){this.locked=!1,this.emit()},e}();function Y(e,t){e.delete(t),t.childNodes.forEach((function(t){return Y(e,t)}))}function K(e,t,n){var o=t.parentNode;if(!o)return!1;var r=n.getId(o);return!!e.some((function(e){return e.id===r}))||K(e,o,n)}function $(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||$(e,n))}var G=[];function J(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(t){return e.target}}function Z(e,t,n,o,r,a,i,s,u,l,c,d,p,m,f,h){var v,y,b,g=new q;G.push(g),g.init(e,n,o,r,a,i,s,u,l,c,d,t,p,m,f);var k=window.MutationObserver||window.__rrMutationObserver,S=null===(b=null===(y=null===(v=window)||void 0===v?void 0:v.Zone)||void 0===y?void 0:y.__symbol__)||void 0===b?void 0:b.call(y,"MutationObserver");S&&window[S]&&(k=window[S]);var C=new k(g.processMutations.bind(g));return C.observe(h,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),C}function Q(e,t,n,o,r){if(!1===r.mouseInteraction)return function(){};var a=!0===r.mouseInteraction||void 0===r.mouseInteraction?{}:r.mouseInteraction,i=[];return Object.keys(y).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]})).forEach((function(r){var a=r.toLowerCase(),s=function(t){return function(r){var a=J(r);if(!z(a,o)){var i=W(r)?r.changedTouches[0]:r;if(i){var s=n.getId(a),u=i.clientX,l=i.clientY;e({type:y[t],id:s,x:u,y:l})}}}}(r);i.push(O(a,s,t))})),function(){i.forEach((function(e){return e()}))}}function ee(e,t,n,o,r){return O("scroll",D((function(r){var a=J(r);if(a&&!z(a,o)){var i=n.getId(a);if(a===t){var s=t.scrollingElement||t.documentElement;e({id:i,x:s.scrollLeft,y:s.scrollTop})}else e({id:i,x:a.scrollLeft,y:a.scrollTop})}}),r.scroll||100),t)}var te=["INPUT","TEXTAREA","SELECT"],ne=new WeakMap;function oe(e,o){var a,s;void 0===o&&(o={}),function(e,t){var n=e.mutationCb,o=e.mousemoveCb,a=e.mouseInteractionCb,i=e.scrollCb,s=e.viewportResizeCb,u=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb,d=e.canvasMutationCb,p=e.fontCb;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)),s.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)),u.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.fontCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.font&&t.font.apply(t,r(e)),p.apply(void 0,r(e))}}(e,o);var u,l,c,d=Z(e.mutationCb,e.doc,e.blockClass,e.blockSelector,e.maskTextClass,e.maskTextSelector,e.inlineStylesheet,e.maskInputOptions,e.maskTextFn,e.maskInputFn,e.recordCanvas,e.slimDOMOptions,e.mirror,e.iframeManager,e.shadowDomManager,e.doc),p=function(e,t,n,o){if(!1===t.mousemove)return function(){};var r,a="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,s=[],u=D((function(t){var n=Date.now()-r;e(s.map((function(e){return e.timeOffset-=n,e})),t),s=[],r=null}),i),l=D((function(e){var t=J(e),n=W(e)?e.changedTouches[0]:e,a=n.clientX,i=n.clientY;r||(r=Date.now()),s.push({x:a,y:i,id:o.getId(t),timeOffset:Date.now()-r}),u(e instanceof DragEvent?v.Drag:e instanceof MouseEvent?v.MouseMove:v.TouchMove)}),a,{trailing:!1}),c=[O("mousemove",l,n),O("touchmove",l,n),O("drag",l,n)];return function(){c.forEach((function(e){return e()}))}}(e.mousemoveCb,e.sampling,e.doc,e.mirror),m=Q(e.mouseInteractionCb,e.doc,e.mirror,e.blockClass,e.sampling),f=ee(e.scrollCb,e.doc,e.mirror,e.blockClass,e.sampling),h=(u=e.viewportResizeCb,l=-1,c=-1,O("resize",D((function(){var e=R(),t=A();l===e&&c===t||(u({width:Number(t),height:Number(e)}),l=e,c=t)}),200),window)),y=function(e,n,o,a,s,u,l,c){function d(e){var t=J(e);if(t&&t.tagName&&!(te.indexOf(t.tagName)<0)&&!z(t,a)){var o=t.type;if(!t.classList.contains(s)){var r=t.value,c=!1;"radio"===o||"checkbox"===o?c=t.checked:(u[t.tagName.toLowerCase()]||u[o])&&(r=i({maskInputOptions:u,tagName:t.tagName,type:o,value:r,maskInputFn:l})),p(t,{text:r,isChecked:c});var d=t.name;"radio"===o&&d&&c&&n.querySelectorAll('input[type="radio"][name="'+d+'"]').forEach((function(e){e!==t&&p(e,{text:e.value,isChecked:!c})}))}}}function p(n,r){var a=ne.get(n);if(!a||a.text!==r.text||a.isChecked!==r.isChecked){ne.set(n,r);var i=o.getId(n);e(t(t({},r),{id:i}))}}var m=("last"===c.input?["change"]:["input","change"]).map((function(e){return O(e,d,n)})),f=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),h=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"]];return f&&f.set&&m.push.apply(m,r(h.map((function(e){return F(e[0],e[1],{set:function(){d({target:this})}})})))),function(){m.forEach((function(e){return e()}))}}(e.inputCb,e.doc,e.mirror,e.blockClass,e.ignoreClass,e.maskInputOptions,e.maskInputFn,e.sampling),g=function(e,t,n){var o=function(o){return function(r){var a=J(r);a&&!z(a,t)&&e({type:o,id:n.getId(a),currentTime:a.currentTime})}},r=[O("play",o(b.Play)),O("pause",o(b.Pause)),O("seeked",o(b.Seeked))];return function(){r.forEach((function(e){return e()}))}}(e.mediaInteractionCb,e.blockClass,e.mirror),k=function(e,t){var n=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(o,r){var a=t.getId(this.ownerNode);return-1!==a&&e({id:a,adds:[{rule:o,index:r}]}),n.apply(this,arguments)};var o=CSSStyleSheet.prototype.deleteRule;return CSSStyleSheet.prototype.deleteRule=function(n){var r=t.getId(this.ownerNode);return-1!==r&&e({id:r,removes:[{index:n}]}),o.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=n,CSSStyleSheet.prototype.deleteRule=o}}(e.styleSheetRuleCb,e.mirror),S=e.recordCanvas?function(e,t,o){var a,i,s=Object.getOwnPropertyNames(CanvasRenderingContext2D.prototype),u=[],l=function(n){try{if("function"!=typeof CanvasRenderingContext2D.prototype[n])return"continue";var a=L(CanvasRenderingContext2D.prototype,n,(function(a){return function(){for(var i=this,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];return z(this.canvas,t)||setTimeout((function(){var t=r(s);if("drawImage"===n&&t[0]&&t[0]instanceof HTMLCanvasElement){var a=t[0],u=a.getContext("2d"),l=null==u?void 0:u.getImageData(0,0,a.width,a.height),c=null==l?void 0:l.data;t[0]=JSON.stringify(c)}e({id:o.getId(i.canvas),property:n,args:t})}),0),a.apply(this,s)}}));u.push(a)}catch(t){var i=F(CanvasRenderingContext2D.prototype,n,{set:function(t){e({id:o.getId(this.canvas),property:n,args:[t],setter:!0})}});u.push(i)}};try{for(var c=n(s),d=c.next();!d.done;d=c.next()){l(d.value)}}catch(e){a={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(a)throw a.error}}return function(){u.forEach((function(e){return e()}))}}(e.canvasMutationCb,e.blockClass,e.mirror):function(){},C=e.collectFonts?function(e){var t=[],n=new WeakMap,o=FontFace;window.FontFace=function(e,t,r){var a=new o(e,t,r);return n.set(a,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),a};var r=L(document.fonts,"add",(function(t){return function(o){return setTimeout((function(){var t=n.get(o);t&&(e(t),n.delete(o))}),0),t.apply(this,[o])}}));return t.push((function(){window.FonFace=o})),t.push(r),function(){t.forEach((function(e){return e()}))}}(e.fontCb):function(){},w=[];try{for(var I=n(e.plugins),T=I.next();!T.done;T=I.next()){var x=T.value;w.push(x.observer(x.callback,x.options))}}catch(e){a={error:e}}finally{try{T&&!T.done&&(s=I.return)&&s.call(I)}finally{if(a)throw a.error}}return function(){d.disconnect(),p(),m(),f(),h(),y(),g(),k(),S(),C(),w.forEach((function(e){return e()}))}}var re,ae,ie=function(){function e(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}return e.prototype.addIframe=function(e){this.iframes.set(e,!0)},e.prototype.addLoadListener=function(e){this.loadListener=e},e.prototype.attachIframe=function(e,t){var n;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e)},e}(),se=function(){function e(e){this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror}return e.prototype.addShadowRoot=function(e,t){Z(this.mutationCb,t,this.bypassOptions.blockClass,this.bypassOptions.blockSelector,this.bypassOptions.maskTextClass,this.bypassOptions.maskTextSelector,this.bypassOptions.inlineStylesheet,this.bypassOptions.maskInputOptions,this.bypassOptions.maskTextFn,this.bypassOptions.maskInputFn,this.bypassOptions.recordCanvas,this.bypassOptions.slimDOMOptions,this.mirror,this.bypassOptions.iframeManager,this,e),ee(this.scrollCb,e,this.mirror,this.bypassOptions.blockClass,this.bypassOptions.sampling)},e}();function ue(e){return t(t({},e),{timestamp:Date.now()})}var le={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,n=e.__sn&&e.__sn.id;delete this.map[n],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}};function ce(e){void 0===e&&(e={});var n=e.emit,r=e.checkoutEveryNms,a=e.checkoutEveryNth,i=e.blockClass,s=void 0===i?"rr-block":i,u=e.blockSelector,l=void 0===u?null:u,c=e.ignoreClass,d=void 0===c?"rr-ignore":c,p=e.maskTextClass,m=void 0===p?"rr-mask":p,f=e.maskTextSelector,y=void 0===f?null:f,b=e.inlineStylesheet,g=void 0===b||b,k=e.maskAllInputs,S=e.maskInputOptions,C=e.slimDOMOptions,w=e.maskInputFn,I=e.maskTextFn,T=e.hooks,x=e.packFn,M=e.sampling,N=void 0===M?{}:M,_=e.mousemoveWait,D=e.recordCanvas,F=void 0!==D&&D,L=e.collectFonts,z=void 0!==L&&L,P=e.plugins,W=e.keepIframeSrcFn,V=void 0===W?function(){return!1}:W;if(!n)throw new Error("emit function is required");void 0!==_&&void 0===N.mousemove&&(N.mousemove=_);var B,U,X=!0===k?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==S?S:{password:!0},q=!0===C||"all"===C?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===C,headMetaDescKeywords:"all"===C}:C||{};void 0===B&&(B=window),"NodeList"in B&&!B.NodeList.prototype.forEach&&(B.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in B&&!B.DOMTokenList.prototype.forEach&&(B.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1});var Y=0;re=function(e,t){var o;if(!(null===(o=G[0])||void 0===o?void 0:o.isFrozen())||e.type===h.FullSnapshot||e.type===h.IncrementalSnapshot&&e.data.source===v.Mutation||G.forEach((function(e){return e.unfreeze()})),n(x?x(e):e,t),e.type===h.FullSnapshot)U=e,Y=0;else if(e.type===h.IncrementalSnapshot){if(e.data.source===v.Mutation&&e.data.isAttachIframe)return;Y++;var i=a&&Y>=a,s=r&&e.timestamp-U.timestamp>r;(i||s)&&ae(!0)}};var K=function(e){re(ue({type:h.IncrementalSnapshot,data:t({source:v.Mutation},e)}))},$=function(e){return re(ue({type:h.IncrementalSnapshot,data:t({source:v.Scroll},e)}))},J=new ie({mutationCb:K}),Z=new se({mutationCb:K,scrollCb:$,bypassOptions:{blockClass:s,blockSelector:l,maskTextClass:m,maskTextSelector:y,inlineStylesheet:g,maskInputOptions:X,maskTextFn:I,maskInputFn:w,recordCanvas:F,sampling:N,slimDOMOptions:q,iframeManager:J},mirror:le});ae=function(e){var t,n,r,a;void 0===e&&(e=!1),re(ue({type:h.Meta,data:{href:window.location.href,width:A(),height:R()}}),e),G.forEach((function(e){return e.lock()}));var i=o(function(e,t){var n=t||{},o=n.blockClass,r=void 0===o?"rr-block":o,a=n.blockSelector,i=void 0===a?null:a,s=n.maskTextClass,u=void 0===s?"rr-mask":s,l=n.maskTextSelector,c=void 0===l?null:l,d=n.inlineStylesheet,p=void 0===d||d,m=n.recordCanvas,f=void 0!==m&&m,h=n.maskAllInputs,v=void 0!==h&&h,y=n.maskTextFn,b=n.maskInputFn,g=n.slimDOM,k=void 0!==g&&g,S=n.preserveWhiteSpace,C=n.onSerialize,w=n.onIframeLoad,I=n.iframeLoadTimeout,T=n.keepIframeSrcFn,x={};return[E(e,{doc:e,map:x,blockClass:r,blockSelector:i,maskTextClass:u,maskTextSelector:c,skipChild:!1,inlineStylesheet:p,maskInputOptions:!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,password:!0}:!1===v?{password:!0}:v,maskTextFn:y,maskInputFn:b,slimDOMOptions:!0===k||"all"===k?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===k,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===k?{}:k,recordCanvas:f,preserveWhiteSpace:S,onSerialize:C,onIframeLoad:w,iframeLoadTimeout:I,keepIframeSrcFn:void 0===T?function(){return!1}:T}),x]}(document,{blockClass:s,blockSelector:l,maskTextClass:m,maskTextSelector:y,inlineStylesheet:g,maskAllInputs:X,maskTextFn:I,slimDOM:q,recordCanvas:F,onSerialize:function(e){H(e)&&J.addIframe(e),j(e)&&Z.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){J.attachIframe(e,t)},keepIframeSrcFn:V}),2),u=i[0],c=i[1];if(!u)return console.warn("Failed to snapshot the document");le.map=c,re(ue({type:h.FullSnapshot,data:{node:u,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}}})),G.forEach((function(e){return e.unlock()}))};try{var Q=[];Q.push(O("DOMContentLoaded",(function(){re(ue({type:h.DomContentLoaded,data:{}}))})));var ee=function(e){return oe({mutationCb:K,mousemoveCb:function(e,t){return re(ue({type:h.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return re(ue({type:h.IncrementalSnapshot,data:t({source:v.MouseInteraction},e)}))},scrollCb:$,viewportResizeCb:function(e){return re(ue({type:h.IncrementalSnapshot,data:t({source:v.ViewportResize},e)}))},inputCb:function(e){return re(ue({type:h.IncrementalSnapshot,data:t({source:v.Input},e)}))},mediaInteractionCb:function(e){return re(ue({type:h.IncrementalSnapshot,data:t({source:v.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return re(ue({type:h.IncrementalSnapshot,data:t({source:v.StyleSheetRule},e)}))},canvasMutationCb:function(e){return re(ue({type:h.IncrementalSnapshot,data:t({source:v.CanvasMutation},e)}))},fontCb:function(e){return re(ue({type:h.IncrementalSnapshot,data:t({source:v.Font},e)}))},blockClass:s,ignoreClass:d,maskTextClass:m,maskTextSelector:y,maskInputOptions:X,inlineStylesheet:g,sampling:N,recordCanvas:F,collectFonts:z,doc:e,maskInputFn:w,maskTextFn:I,blockSelector:l,slimDOMOptions:q,mirror:le,iframeManager:J,shadowDomManager:Z,plugins:(null==P?void 0:P.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return re(ue({type:h.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},T)};J.addLoadListener((function(e){Q.push(ee(e.contentDocument))}));var te=function(){ae(),Q.push(ee(document))};return"interactive"===document.readyState||"complete"===document.readyState?te():Q.push(O("load",(function(){re(ue({type:h.Load,data:{}})),te()}),window)),function(){Q.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}return ce.addCustomEvent=function(e,t){if(!re)throw new Error("please add custom event after start recording");re(ue({type:h.Custom,data:{tag:e,payload:t}}))},ce.freezePage=function(){G.forEach((function(e){return e.freeze()}))},ce.takeFullSnapshot=function(e){if(!ae)throw new Error("please take full snapshot after start recording");ae(e)},ce.mirror=le,ce}();
***************************************************************************** */var e,t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function n(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function o(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e}function a(e){var t,n=null===(t=e)||void 0===t?void 0:t.host;return Boolean(n&&n.shadowRoot&&n.shadowRoot===e)}function i(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,a=e.maskInputFn,i=o||"";return(t[n.toLowerCase()]||t[r])&&(i=a?a(i):"*".repeat(i.length)),i}!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 s=1,u=RegExp("[^a-z0-9-_:]");function l(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(c).join(""):null}catch(e){return null}}function c(e){return function(e){return"styleSheet"in e}(e)?l(e.styleSheet)||"":e.cssText}var d=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,p=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,m=/^(data:)([^,]*),(.*)/i;function f(e,t){return(e||"").replace(d,(function(e,n,r,o,a,i){var s,u=r||a||i,l=n||o||"";if(!u)return e;if(!p.test(u))return"url("+l+u+l+")";if(m.test(u))return"url("+l+u+l+")";if("/"===u[0])return"url("+l+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+u)+l+")";var c=t.split("/"),d=u.split("/");c.pop();for(var f=0,h=d;f<h.length;f++){var v=h[f];"."!==v&&(".."===v?c.pop():c.push(v))}return"url("+l+c.join("/")+l+")"}))}var h,v,y,b,g,k=/^[^ \t\n\r\u000c]+/,S=/^[, \t\n\r\u000c]+/;function C(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function I(){var e=document.createElement("a");return e.href="",e.href}function w(e,t,n,r){return"src"===n||("href"===n||"xlink:href"===n)&&r?C(e,r):"background"!==n||!r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n&&r?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}for(var o=[];r(S),!(n>=t.length);){var a=r(k);if(","===a.slice(-1))a=C(e,a.substring(0,a.length-1)),o.push(a);else{var i="";a=C(e,a);for(var s=!1;;){var u=t.charAt(n);if(""===u){o.push((a+i).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,o.push((a+i).trim());break}"("===u&&(s=!0)}i+=u,n+=1}}}return o.join(", ")}(e,r):"style"===n&&r?f(r,I()):r:C(e,r)}function T(e,t,n){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){if("string"==typeof t){if(e.classList.contains(t))return!0}else e.classList.forEach((function(e){if(t.test(e))return!0}));return!(!n||!e.matches(n))||T(e.parentNode,t,n)}return e.nodeType,e.TEXT_NODE,T(e.parentNode,t,n)}function x(t,n){var r,o,a=n.doc,s=n.blockClass,c=n.blockSelector,d=n.maskTextClass,p=n.maskTextSelector,m=n.inlineStylesheet,h=n.maskInputOptions,v=void 0===h?{}:h,y=n.maskTextFn,b=n.maskInputFn,g=n.recordCanvas,k=n.keepIframeSrcFn;if(a.__sn){var S=a.__sn.id;r=1===S?void 0:S}switch(t.nodeType){case t.DOCUMENT_NODE:return{type:e.Document,childNodes:[],rootId:r};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:r};case t.ELEMENT_NODE:for(var C=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=0;r<e.classList.length;r++){var o=e.classList[r];if(t.test(o))return!0}return!!n&&e.matches(n)}(t,s,c),x=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return u.test(t)?"div":t}(t),E={},M=0,O=Array.from(t.attributes);M<O.length;M++){var N=O[M],_=N.name,D=N.value;E[_]=w(a,x,_,D)}if("link"===x&&m){var F,L=Array.from(a.styleSheets).find((function(e){return e.href===t.href}));(F=l(L))&&(delete E.rel,delete E.href,E._cssText=f(F,L.href))}if("style"===x&&t.sheet&&!(t.innerText||t.textContent||"").trim().length)(F=l(t.sheet))&&(E._cssText=f(F,I()));if("input"===x||"textarea"===x||"select"===x){D=t.value;"radio"!==E.type&&"checkbox"!==E.type&&"submit"!==E.type&&"button"!==E.type&&D?E.value=i({type:E.type,tagName:x,value:D,maskInputOptions:v,maskInputFn:b}):t.checked&&(E.checked=t.checked)}if("option"===x){var R=t.parentElement;E.value===R.value&&(E.selected=t.selected)}if("canvas"===x&&g&&(E.rr_dataURL=t.toDataURL()),"audio"!==x&&"video"!==x||(E.rr_mediaState=t.paused?"paused":"played",E.rr_mediaCurrentTime=t.currentTime),t.scrollLeft&&(E.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(E.rr_scrollTop=t.scrollTop),C){var A=t.getBoundingClientRect(),P=A.width,z=A.height;E={class:E.class,rr_width:P+"px",rr_height:z+"px"}}return"iframe"!==x||k(E.src)||delete E.src,{type:e.Element,tagName:x,attributes:E,childNodes:[],isSVG:(o=t,"svg"===o.tagName||o instanceof SVGElement||void 0),needBlock:C,rootId:r};case t.TEXT_NODE:var V=t.parentNode&&t.parentNode.tagName,W=t.textContent,H="STYLE"===V||void 0,j="SCRIPT"===V||void 0;return H&&W&&(W=f(W,I())),j&&(W="SCRIPT_PLACEHOLDER"),!H&&!j&&T(t,d,p)&&W&&(W=y?y(W):W.replace(/[\S]/g,"*")),{type:e.Text,textContent:W||"",isStyle:H,rootId:r};case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:"",rootId:r};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||"",rootId:r};default:return!1}}function E(e){return void 0===e?"":e.toLowerCase()}function M(t,n){var r,o=n.doc,i=n.map,u=n.blockClass,l=n.blockSelector,c=n.maskTextClass,d=n.maskTextSelector,p=n.skipChild,m=void 0!==p&&p,f=n.inlineStylesheet,h=void 0===f||f,v=n.maskInputOptions,y=void 0===v?{}:v,b=n.maskTextFn,g=n.maskInputFn,k=n.slimDOMOptions,S=n.recordCanvas,C=void 0!==S&&S,I=n.onSerialize,w=n.onIframeLoad,T=n.iframeLoadTimeout,O=void 0===T?5e3:T,N=n.keepIframeSrcFn,_=void 0===N?function(){return!1}:N,D=n.preserveWhiteSpace,F=void 0===D||D,L=x(t,{doc:o,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,inlineStylesheet:h,maskInputOptions:y,maskTextFn:b,maskInputFn:g,recordCanvas:C,keepIframeSrcFn:_});if(!L)return console.warn(t,"not serialized"),null;r="__sn"in t?t.__sn.id:!function(t,n){if(n.comment&&t.type===e.Comment)return!0;if(t.type===e.Element){if(n.script&&("script"===t.tagName||"link"===t.tagName&&"preload"===t.attributes.rel&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")))return!0;if(n.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(E(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===E(t.attributes.name)||"icon"===E(t.attributes.rel)||"apple-touch-icon"===E(t.attributes.rel)||"shortcut icon"===E(t.attributes.rel))))return!0;if("meta"===t.tagName){if(n.headMetaDescKeywords&&E(t.attributes.name).match(/^description|keywords$/))return!0;if(n.headMetaSocial&&(E(t.attributes.property).match(/^(og|twitter|fb):/)||E(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===E(t.attributes.name)))return!0;if(n.headMetaRobots&&("robots"===E(t.attributes.name)||"googlebot"===E(t.attributes.name)||"bingbot"===E(t.attributes.name)))return!0;if(n.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(n.headMetaAuthorship&&("author"===E(t.attributes.name)||"generator"===E(t.attributes.name)||"framework"===E(t.attributes.name)||"publisher"===E(t.attributes.name)||"progid"===E(t.attributes.name)||E(t.attributes.property).match(/^article:/)||E(t.attributes.property).match(/^product:/)))return!0;if(n.headMetaVerification&&("google-site-verification"===E(t.attributes.name)||"yandex-verification"===E(t.attributes.name)||"csrf-token"===E(t.attributes.name)||"p:domain_verify"===E(t.attributes.name)||"verify-v1"===E(t.attributes.name)||"verification"===E(t.attributes.name)||"shopify-checkout-api-token"===E(t.attributes.name)))return!0}}return!1}(L,k)&&(F||L.type!==e.Text||L.isStyle||L.textContent.replace(/^\s+|\s+$/gm,"").length)?s++:-2;var R=Object.assign(L,{id:r});if(t.__sn=R,-2===r)return null;i[r]=t,I&&I(t);var A=!m;if(R.type===e.Element&&(A=A&&!R.needBlock,delete R.needBlock),(R.type===e.Document||R.type===e.Element)&&A){k.headWhitespace&&L.type===e.Element&&"head"===L.tagName&&(F=!1);for(var P={doc:o,map:i,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,skipChild:m,inlineStylesheet:h,maskInputOptions:y,maskTextFn:b,maskInputFn:g,slimDOMOptions:k,recordCanvas:C,preserveWhiteSpace:F,onSerialize:I,onIframeLoad:w,iframeLoadTimeout:O,keepIframeSrcFn:_},z=0,V=Array.from(t.childNodes);z<V.length;z++){(j=M(V[z],P))&&R.childNodes.push(j)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(t)&&t.shadowRoot){R.isShadowHost=!0;for(var W=0,H=Array.from(t.shadowRoot.childNodes);W<H.length;W++){var j;(j=M(H[W],P))&&(j.isShadow=!0,R.childNodes.push(j))}}}return t.parentNode&&a(t.parentNode)&&(R.isShadow=!0),R.type===e.Element&&"iframe"===R.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var o,a=!1;try{o=r.document.readyState}catch(e){return}if("complete"===o){"about:blank"===r.location.href&&"about:blank"!==e.src&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}else{var i=setTimeout((function(){a||(t(),a=!0)}),n);e.addEventListener("load",(function(){clearTimeout(i),a=!0,t()}))}}}(t,(function(){var e=t.contentDocument;if(e&&w){var n=M(e,{doc:e,map:i,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:y,maskTextFn:b,maskInputFn:g,slimDOMOptions:k,recordCanvas:C,preserveWhiteSpace:F,onSerialize:I,onIframeLoad:w,iframeLoadTimeout:O,keepIframeSrcFn:_});n&&w(t,n)}}),O),R}function O(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}!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",e[e.Plugin=6]="Plugin"}(h||(h={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag"}(v||(v={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(y||(y={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked"}(b||(b={})),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",e.PlayBack="play-back"}(g||(g={}));var N="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",_={map:{},getId:function(){return console.error(N),-1},getNode:function(){return console.error(N),null},removeNodeFromMap:function(){console.error(N)},has:function(){return console.error(N),!1},reset:function(){console.error(N)}};function D(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(a){var i=Date.now();o||!1!==n.leading||(o=i);var s=t-(i-o),u=this,l=arguments;s<=0||s>t?(r&&(window.clearTimeout(r),r=null),o=i,e.apply(u,l)):r||!1===n.trailing||(r=window.setTimeout((function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(u,l)}),s))}}function F(e,t,n,r,o){void 0===o&&(o=window);var a=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?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 F(e,t,a||{},!0)}}function L(e,t,n){try{if(!(t in e))return function(){};var r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,function(){e[t]=r}}catch(e){return function(){}}}function R(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function A(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function P(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||P(e.parentNode,t)}return e.nodeType,e.TEXT_NODE,P(e.parentNode,t)}function z(e){return"__sn"in e&&-2===e.__sn.id}function V(e){return Boolean(e.changedTouches)}function W(t){return"__sn"in t&&(t.__sn.type===e.Element&&"iframe"===t.__sn.tagName)}function H(e){var t;return Boolean(null===(t=e)||void 0===t?void 0:t.shadowRoot)}function j(e){return"__ln"in e}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(_=new Proxy(_,{get:function(e,t,n){return"map"===t&&console.error(N),Reflect.get(e,t,n)}}));var B=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&&j(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&&j(e.nextSibling)&&e.nextSibling.__ln.previous){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)),e.__ln&&delete e.__ln,this.length--)},e}(),U=function(e,t){return e+"@"+t};function X(e){return"__sn"in e}var q=function(){function e(){var e=this;this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(t){t.forEach(e.processMutation),e.emit()},this.emit=function(){var t,r,o,i;if(!e.frozen&&!e.locked){for(var s=[],u=new B,l=function(t){for(var n=t,r=-2;-2===r;)r=(n=n&&n.nextSibling)&&e.mirror.getId(n);return-1===r&&P(t.nextSibling,e.blockClass)&&(r=null),r},c=function(t){var n,r=t.getRootNode?null===(n=t.getRootNode())||void 0===n?void 0:n.host:null,o=!e.doc.contains(t)&&!e.doc.contains(r);if(t.parentNode&&!o){var i=a(t.parentNode)?e.mirror.getId(r):e.mirror.getId(t.parentNode),c=l(t);if(-1===i||-1===c)return u.addNode(t);var d=M(t,{doc:e.doc,map:e.mirror.map,blockClass:e.blockClass,blockSelector:e.blockSelector,maskTextClass:e.maskTextClass,maskTextSelector:e.maskTextSelector,skipChild:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:e.slimDOMOptions,recordCanvas:e.recordCanvas,onSerialize:function(n){W(n)&&e.iframeManager.addIframe(n),H(t)&&e.shadowDomManager.addShadowRoot(t.shadowRoot,document)},onIframeLoad:function(t,n){e.iframeManager.attachIframe(t,n)}});d&&s.push({parentId:i,nextId:c,node:d})}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());try{for(var d=n(e.movedSet),p=d.next();!p.done;p=d.next()){var m=p.value;K(e.removes,m,e.mirror)&&!e.movedSet.has(m.parentNode)||c(m)}}catch(e){t={error:e}}finally{try{p&&!p.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}try{for(var f=n(e.addedSet),h=f.next();!h.done;h=f.next()){m=h.value;$(e.droppedSet,m)||K(e.removes,m,e.mirror)?$(e.movedSet,m)?c(m):e.droppedSet.add(m):c(m)}}catch(e){o={error:e}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}for(var v=null;u.length;){var y=null;if(v){var b=e.mirror.getId(v.value.parentNode),g=l(v.value);-1!==b&&-1!==g&&(y=v)}if(!y)for(var k=u.length-1;k>=0;k--){var S=u.get(k);b=e.mirror.getId(S.value.parentNode),g=l(S.value);if(-1!==b&&-1!==g){y=S;break}}if(!y){for(;u.head;)u.removeNode(u.head.value);break}v=y.previous,u.removeNode(y.value),c(y.value)}var C={texts:e.texts.map((function(t){return{id:e.mirror.getId(t.node),value:t.value}})).filter((function(t){return e.mirror.has(t.id)})),attributes:e.attributes.map((function(t){return{id:e.mirror.getId(t.node),attributes:t.attributes}})).filter((function(t){return e.mirror.has(t.id)})),removes:e.removes,adds:s};(C.texts.length||C.attributes.length||C.removes.length||C.adds.length)&&(e.texts=[],e.attributes=[],e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.movedMap={},e.emissionCallback(C))}},this.processMutation=function(t){if(!z(t.target))switch(t.type){case"characterData":var n=t.target.textContent;P(t.target,e.blockClass)||n===t.oldValue||e.texts.push({value:T(t.target,e.maskTextClass,e.maskTextSelector)&&n?e.maskTextFn?e.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break;case"attributes":var r=t.target;n=t.target.getAttribute(t.attributeName);if("value"===t.attributeName&&(n=i({maskInputOptions:e.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:n,maskInputFn:e.maskInputFn})),P(t.target,e.blockClass)||n===t.oldValue)return;var o=e.attributes.find((function(e){return e.node===t.target}));if(o||(o={node:t.target,attributes:{}},e.attributes.push(o)),"style"===t.attributeName){var s=e.doc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue),void 0!==o.attributes.style&&null!==o.attributes.style||(o.attributes.style={});for(var u=o.attributes.style,l=0;l<r.style.length;l++){var c=r.style[l],d=r.style.getPropertyValue(c),p=r.style.getPropertyPriority(c);d==s.style.getPropertyValue(c)&&p==s.style.getPropertyPriority(c)||(u[c]=""==p?d:[d,p])}for(l=0;l<s.style.length;l++){c=s.style[l];""!==r.style.getPropertyValue(c)&&r.style.getPropertyValue(c)||(u[c]=!1)}}else o.attributes[t.attributeName]=w(e.doc,t.target.tagName,t.attributeName,n);break;case"childList":t.addedNodes.forEach((function(n){return e.genAdds(n,t.target)})),t.removedNodes.forEach((function(n){var r=e.mirror.getId(n),o=a(t.target)?e.mirror.getId(t.target.host):e.mirror.getId(t.target);P(n,e.blockClass)||P(t.target,e.blockClass)||z(n)||(e.addedSet.has(n)?(Y(e.addedSet,n),e.droppedSet.add(n)):e.addedSet.has(t.target)&&-1===r||function e(t,n){if(a(t))return!1;var r=n.getId(t);return!n.has(r)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode,n))}(t.target,e.mirror)||(e.movedSet.has(n)&&e.movedMap[U(r,o)]?Y(e.movedSet,n):e.removes.push({parentId:o,id:r,isShadow:!!a(t.target)||void 0})),e.mapRemoves.push(n))}))}},this.genAdds=function(t,n){if(!(P(t,e.blockClass)||n&&P(n,e.blockClass))){if(X(t)){if(z(t))return;e.movedSet.add(t);var r=null;n&&X(n)&&(r=n.__sn.id),r&&(e.movedMap[U(t.__sn.id,r)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);t.childNodes.forEach((function(t){return e.genAdds(t)}))}}}return e.prototype.init=function(e,t,n,r,o,a,i,s,u,l,c,d,p,m,f){this.blockClass=t,this.blockSelector=n,this.maskTextClass=r,this.maskTextSelector=o,this.inlineStylesheet=a,this.maskInputOptions=i,this.maskTextFn=s,this.maskInputFn=u,this.recordCanvas=l,this.slimDOMOptions=c,this.emissionCallback=e,this.doc=d,this.mirror=p,this.iframeManager=m,this.shadowDomManager=f},e.prototype.freeze=function(){this.frozen=!0},e.prototype.unfreeze=function(){this.frozen=!1,this.emit()},e.prototype.isFrozen=function(){return this.frozen},e.prototype.lock=function(){this.locked=!0},e.prototype.unlock=function(){this.locked=!1,this.emit()},e}();function Y(e,t){e.delete(t),t.childNodes.forEach((function(t){return Y(e,t)}))}function K(e,t,n){var r=t.parentNode;if(!r)return!1;var o=n.getId(r);return!!e.some((function(e){return e.id===o}))||K(e,r,n)}function $(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||$(e,n))}var G=[];function J(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(t){return e.target}}function Z(e,t,n,r,o,a,i,s,u,l,c,d,p,m,f,h){var v,y,b,g=new q;G.push(g),g.init(e,n,r,o,a,i,s,u,l,c,d,t,p,m,f);var k=window.MutationObserver||window.__rrMutationObserver,S=null===(b=null===(y=null===(v=window)||void 0===v?void 0:v.Zone)||void 0===y?void 0:y.__symbol__)||void 0===b?void 0:b.call(y,"MutationObserver");S&&window[S]&&(k=window[S]);var C=new k(g.processMutations.bind(g));return C.observe(h,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),C}function Q(e,t,n,r,o){if(!1===o.mouseInteraction)return function(){};var a=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,i=[];return Object.keys(y).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]})).forEach((function(o){var a=o.toLowerCase(),s=function(t){return function(o){var a=J(o);if(!P(a,r)){var i=V(o)?o.changedTouches[0]:o;if(i){var s=n.getId(a),u=i.clientX,l=i.clientY;e({type:y[t],id:s,x:u,y:l})}}}}(o);i.push(O(a,s,t))})),function(){i.forEach((function(e){return e()}))}}function ee(e,t,n,r,o){return O("scroll",D((function(o){var a=J(o);if(a&&!P(a,r)){var i=n.getId(a);if(a===t){var s=t.scrollingElement||t.documentElement;e({id:i,x:s.scrollLeft,y:s.scrollTop})}else e({id:i,x:a.scrollLeft,y:a.scrollTop})}}),o.scroll||100),t)}function te(e,n){var r=t({},e);return n||delete r.userTriggered,r}var ne=["INPUT","TEXTAREA","SELECT"],re=new WeakMap;function oe(e,r){var a,s;void 0===r&&(r={}),function(e,t){var n=e.mutationCb,r=e.mousemoveCb,a=e.mouseInteractionCb,i=e.scrollCb,s=e.viewportResizeCb,u=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb,d=e.canvasMutationCb,p=e.fontCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,o(e)),n.apply(void 0,o(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,o(e)),r.apply(void 0,o(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,o(e)),a.apply(void 0,o(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,o(e)),i.apply(void 0,o(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,o(e)),s.apply(void 0,o(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,o(e)),u.apply(void 0,o(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,o(e)),l.apply(void 0,o(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,o(e)),c.apply(void 0,o(e))},e.canvasMutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.canvasMutation&&t.canvasMutation.apply(t,o(e)),d.apply(void 0,o(e))},e.fontCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.font&&t.font.apply(t,o(e)),p.apply(void 0,o(e))}}(e,r);var u,l,c,d=Z(e.mutationCb,e.doc,e.blockClass,e.blockSelector,e.maskTextClass,e.maskTextSelector,e.inlineStylesheet,e.maskInputOptions,e.maskTextFn,e.maskInputFn,e.recordCanvas,e.slimDOMOptions,e.mirror,e.iframeManager,e.shadowDomManager,e.doc),p=function(e,t,n,r){if(!1===t.mousemove)return function(){};var o,a="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,s=[],u=D((function(t){var n=Date.now()-o;e(s.map((function(e){return e.timeOffset-=n,e})),t),s=[],o=null}),i),l=D((function(e){var t=J(e),n=V(e)?e.changedTouches[0]:e,a=n.clientX,i=n.clientY;o||(o=Date.now()),s.push({x:a,y:i,id:r.getId(t),timeOffset:Date.now()-o}),u(e instanceof DragEvent?v.Drag:e instanceof MouseEvent?v.MouseMove:v.TouchMove)}),a,{trailing:!1}),c=[O("mousemove",l,n),O("touchmove",l,n),O("drag",l,n)];return function(){c.forEach((function(e){return e()}))}}(e.mousemoveCb,e.sampling,e.doc,e.mirror),m=Q(e.mouseInteractionCb,e.doc,e.mirror,e.blockClass,e.sampling),f=ee(e.scrollCb,e.doc,e.mirror,e.blockClass,e.sampling),h=(u=e.viewportResizeCb,l=-1,c=-1,O("resize",D((function(){var e=R(),t=A();l===e&&c===t||(u({width:Number(t),height:Number(e)}),l=e,c=t)}),200),window)),y=function(e,n,r,a,s,u,l,c,d){function p(e){var t=J(e),r=e.isTrusted;if(t&&t.tagName&&!(ne.indexOf(t.tagName)<0)&&!P(t,a)){var o=t.type;if(!t.classList.contains(s)){var c=t.value,p=!1;"radio"===o||"checkbox"===o?p=t.checked:(u[t.tagName.toLowerCase()]||u[o])&&(c=i({maskInputOptions:u,tagName:t.tagName,type:o,value:c,maskInputFn:l})),m(t,te({text:c,isChecked:p,userTriggered:r},d));var f=t.name;"radio"===o&&f&&p&&n.querySelectorAll('input[type="radio"][name="'+f+'"]').forEach((function(e){e!==t&&m(e,te({text:e.value,isChecked:!p,userTriggered:!1},d))}))}}}function m(n,o){var a=re.get(n);if(!a||a.text!==o.text||a.isChecked!==o.isChecked){re.set(n,o);var i=r.getId(n);e(t(t({},o),{id:i}))}}var f=("last"===c.input?["change"]:["input","change"]).map((function(e){return O(e,p,n)})),h=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),v=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"]];return h&&h.set&&f.push.apply(f,o(v.map((function(e){return F(e[0],e[1],{set:function(){p({target:this})}})})))),function(){f.forEach((function(e){return e()}))}}(e.inputCb,e.doc,e.mirror,e.blockClass,e.ignoreClass,e.maskInputOptions,e.maskInputFn,e.sampling,e.userTriggeredOnInput),g=function(e,t,n){var r=function(r){return function(o){var a=J(o);a&&!P(a,t)&&e({type:r,id:n.getId(a),currentTime:a.currentTime})}},o=[O("play",r(b.Play)),O("pause",r(b.Pause)),O("seeked",r(b.Seeked))];return function(){o.forEach((function(e){return e()}))}}(e.mediaInteractionCb,e.blockClass,e.mirror),k=function(e,t){var n=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(r,o){var a=t.getId(this.ownerNode);return-1!==a&&e({id:a,adds:[{rule:r,index:o}]}),n.apply(this,arguments)};var r=CSSStyleSheet.prototype.deleteRule;return CSSStyleSheet.prototype.deleteRule=function(n){var o=t.getId(this.ownerNode);return-1!==o&&e({id:o,removes:[{index:n}]}),r.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=n,CSSStyleSheet.prototype.deleteRule=r}}(e.styleSheetRuleCb,e.mirror),S=e.recordCanvas?function(e,t,r){var a,i,s=Object.getOwnPropertyNames(CanvasRenderingContext2D.prototype),u=[],l=function(n){try{if("function"!=typeof CanvasRenderingContext2D.prototype[n])return"continue";var a=L(CanvasRenderingContext2D.prototype,n,(function(a){return function(){for(var i=this,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];return P(this.canvas,t)||setTimeout((function(){var t=o(s);if("drawImage"===n&&t[0]&&t[0]instanceof HTMLCanvasElement){var a=t[0],u=a.getContext("2d"),l=null==u?void 0:u.getImageData(0,0,a.width,a.height),c=null==l?void 0:l.data;t[0]=JSON.stringify(c)}e({id:r.getId(i.canvas),property:n,args:t})}),0),a.apply(this,s)}}));u.push(a)}catch(t){var i=F(CanvasRenderingContext2D.prototype,n,{set:function(t){e({id:r.getId(this.canvas),property:n,args:[t],setter:!0})}});u.push(i)}};try{for(var c=n(s),d=c.next();!d.done;d=c.next()){l(d.value)}}catch(e){a={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(a)throw a.error}}return function(){u.forEach((function(e){return e()}))}}(e.canvasMutationCb,e.blockClass,e.mirror):function(){},C=e.collectFonts?function(e){var t=[],n=new WeakMap,r=FontFace;window.FontFace=function(e,t,o){var a=new r(e,t,o);return n.set(a,{family:e,buffer:"string"!=typeof t,descriptors:o,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),a};var o=L(document.fonts,"add",(function(t){return function(r){return setTimeout((function(){var t=n.get(r);t&&(e(t),n.delete(r))}),0),t.apply(this,[r])}}));return t.push((function(){window.FonFace=r})),t.push(o),function(){t.forEach((function(e){return e()}))}}(e.fontCb):function(){},I=[];try{for(var w=n(e.plugins),T=w.next();!T.done;T=w.next()){var x=T.value;I.push(x.observer(x.callback,x.options))}}catch(e){a={error:e}}finally{try{T&&!T.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}return function(){d.disconnect(),p(),m(),f(),h(),y(),g(),k(),S(),C(),I.forEach((function(e){return e()}))}}var ae,ie,se=function(){function e(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}return e.prototype.addIframe=function(e){this.iframes.set(e,!0)},e.prototype.addLoadListener=function(e){this.loadListener=e},e.prototype.attachIframe=function(e,t){var n;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e)},e}(),ue=function(){function e(e){this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror}return e.prototype.addShadowRoot=function(e,t){Z(this.mutationCb,t,this.bypassOptions.blockClass,this.bypassOptions.blockSelector,this.bypassOptions.maskTextClass,this.bypassOptions.maskTextSelector,this.bypassOptions.inlineStylesheet,this.bypassOptions.maskInputOptions,this.bypassOptions.maskTextFn,this.bypassOptions.maskInputFn,this.bypassOptions.recordCanvas,this.bypassOptions.slimDOMOptions,this.mirror,this.bypassOptions.iframeManager,this,e),ee(this.scrollCb,e,this.mirror,this.bypassOptions.blockClass,this.bypassOptions.sampling)},e}();function le(e){return t(t({},e),{timestamp:Date.now()})}var ce={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,n=e.__sn&&e.__sn.id;delete this.map[n],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}};function de(e){void 0===e&&(e={});var n=e.emit,o=e.checkoutEveryNms,a=e.checkoutEveryNth,i=e.blockClass,s=void 0===i?"rr-block":i,u=e.blockSelector,l=void 0===u?null:u,c=e.ignoreClass,d=void 0===c?"rr-ignore":c,p=e.maskTextClass,m=void 0===p?"rr-mask":p,f=e.maskTextSelector,y=void 0===f?null:f,b=e.inlineStylesheet,g=void 0===b||b,k=e.maskAllInputs,S=e.maskInputOptions,C=e.slimDOMOptions,I=e.maskInputFn,w=e.maskTextFn,T=e.hooks,x=e.packFn,E=e.sampling,N=void 0===E?{}:E,_=e.mousemoveWait,D=e.recordCanvas,F=void 0!==D&&D,L=e.userTriggeredOnInput,P=void 0!==L&&L,z=e.collectFonts,V=void 0!==z&&z,j=e.plugins,B=e.keepIframeSrcFn,U=void 0===B?function(){return!1}:B;if(!n)throw new Error("emit function is required");void 0!==_&&void 0===N.mousemove&&(N.mousemove=_);var X,q,Y=!0===k?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==S?S:{password:!0},K=!0===C||"all"===C?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===C,headMetaDescKeywords:"all"===C}:C||{};void 0===X&&(X=window),"NodeList"in X&&!X.NodeList.prototype.forEach&&(X.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in X&&!X.DOMTokenList.prototype.forEach&&(X.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1});var $=0;ae=function(e,t){var r;if(!(null===(r=G[0])||void 0===r?void 0:r.isFrozen())||e.type===h.FullSnapshot||e.type===h.IncrementalSnapshot&&e.data.source===v.Mutation||G.forEach((function(e){return e.unfreeze()})),n(x?x(e):e,t),e.type===h.FullSnapshot)q=e,$=0;else if(e.type===h.IncrementalSnapshot){if(e.data.source===v.Mutation&&e.data.isAttachIframe)return;$++;var i=a&&$>=a,s=o&&e.timestamp-q.timestamp>o;(i||s)&&ie(!0)}};var J=function(e){ae(le({type:h.IncrementalSnapshot,data:t({source:v.Mutation},e)}))},Z=function(e){return ae(le({type:h.IncrementalSnapshot,data:t({source:v.Scroll},e)}))},Q=new se({mutationCb:J}),ee=new ue({mutationCb:J,scrollCb:Z,bypassOptions:{blockClass:s,blockSelector:l,maskTextClass:m,maskTextSelector:y,inlineStylesheet:g,maskInputOptions:Y,maskTextFn:w,maskInputFn:I,recordCanvas:F,sampling:N,slimDOMOptions:K,iframeManager:Q},mirror:ce});ie=function(e){var t,n,o,a;void 0===e&&(e=!1),ae(le({type:h.Meta,data:{href:window.location.href,width:A(),height:R()}}),e),G.forEach((function(e){return e.lock()}));var i=r(function(e,t){var n=t||{},r=n.blockClass,o=void 0===r?"rr-block":r,a=n.blockSelector,i=void 0===a?null:a,s=n.maskTextClass,u=void 0===s?"rr-mask":s,l=n.maskTextSelector,c=void 0===l?null:l,d=n.inlineStylesheet,p=void 0===d||d,m=n.recordCanvas,f=void 0!==m&&m,h=n.maskAllInputs,v=void 0!==h&&h,y=n.maskTextFn,b=n.maskInputFn,g=n.slimDOM,k=void 0!==g&&g,S=n.preserveWhiteSpace,C=n.onSerialize,I=n.onIframeLoad,w=n.iframeLoadTimeout,T=n.keepIframeSrcFn,x={};return[M(e,{doc:e,map:x,blockClass:o,blockSelector:i,maskTextClass:u,maskTextSelector:c,skipChild:!1,inlineStylesheet:p,maskInputOptions:!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,password:!0}:!1===v?{password:!0}:v,maskTextFn:y,maskInputFn:b,slimDOMOptions:!0===k||"all"===k?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===k,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===k?{}:k,recordCanvas:f,preserveWhiteSpace:S,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:w,keepIframeSrcFn:void 0===T?function(){return!1}:T}),x]}(document,{blockClass:s,blockSelector:l,maskTextClass:m,maskTextSelector:y,inlineStylesheet:g,maskAllInputs:Y,maskTextFn:w,slimDOM:K,recordCanvas:F,onSerialize:function(e){W(e)&&Q.addIframe(e),H(e)&&ee.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){Q.attachIframe(e,t)},keepIframeSrcFn:U}),2),u=i[0],c=i[1];if(!u)return console.warn("Failed to snapshot the document");ce.map=c,ae(le({type:h.FullSnapshot,data:{node:u,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===(o=null===document||void 0===document?void 0:document.body)||void 0===o?void 0:o.parentElement)||void 0===a?void 0:a.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),G.forEach((function(e){return e.unlock()}))};try{var te=[];te.push(O("DOMContentLoaded",(function(){ae(le({type:h.DomContentLoaded,data:{}}))})));var ne=function(e){return oe({mutationCb:J,mousemoveCb:function(e,t){return ae(le({type:h.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return ae(le({type:h.IncrementalSnapshot,data:t({source:v.MouseInteraction},e)}))},scrollCb:Z,viewportResizeCb:function(e){return ae(le({type:h.IncrementalSnapshot,data:t({source:v.ViewportResize},e)}))},inputCb:function(e){return ae(le({type:h.IncrementalSnapshot,data:t({source:v.Input},e)}))},mediaInteractionCb:function(e){return ae(le({type:h.IncrementalSnapshot,data:t({source:v.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return ae(le({type:h.IncrementalSnapshot,data:t({source:v.StyleSheetRule},e)}))},canvasMutationCb:function(e){return ae(le({type:h.IncrementalSnapshot,data:t({source:v.CanvasMutation},e)}))},fontCb:function(e){return ae(le({type:h.IncrementalSnapshot,data:t({source:v.Font},e)}))},blockClass:s,ignoreClass:d,maskTextClass:m,maskTextSelector:y,maskInputOptions:Y,inlineStylesheet:g,sampling:N,recordCanvas:F,userTriggeredOnInput:P,collectFonts:V,doc:e,maskInputFn:I,maskTextFn:w,blockSelector:l,slimDOMOptions:K,mirror:ce,iframeManager:Q,shadowDomManager:ee,plugins:(null==j?void 0:j.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return ae(le({type:h.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},T)};Q.addLoadListener((function(e){te.push(ne(e.contentDocument))}));var re=function(){ie(),te.push(ne(document))};return"interactive"===document.readyState||"complete"===document.readyState?re():te.push(O("load",(function(){ae(le({type:h.Load,data:{}})),re()}),window)),function(){te.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}return de.addCustomEvent=function(e,t){if(!ae)throw new Error("please add custom event after start recording");ae(le({type:h.Custom,data:{tag:e,payload:t}}))},de.freezePage=function(){G.forEach((function(e){return e.freeze()}))},de.takeFullSnapshot=function(e){if(!ie)throw new Error("please take full snapshot after start recording");ie(e)},de.mirror=ce,de}();
//# sourceMappingURL=rrweb-record.min.js.map

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

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var t,r=function(){return(r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function n(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function i(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}function a(e){return e.nodeType===e.ELEMENT_NODE}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(t||(t={}));var s=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function l(e,t){void 0===t&&(t={});var r=1,n=1;function o(e){var t=e.match(/\n/g);t&&(r+=t.length);var o=e.lastIndexOf("\n");n=-1===o?n+e.length:e.length-o}function i(){var e={line:r,column:n};return function(t){return t.position=new a(e),m(),t}}var a=function(e){this.start=e,this.end={line:r,column:n},this.source=t.source};a.prototype.content=e;var l=[];function u(o){var i=new Error(t.source+":"+r+":"+n+": "+o);if(i.reason=o,i.filename=t.source,i.line=r,i.column=n,i.source=e,!t.silent)throw i;l.push(i)}function f(){return h(/^{\s*/)}function d(){return h(/^}/)}function p(){var t,r=[];for(m(),v(r);e.length&&"}"!==e.charAt(0)&&(t=C()||I());)!1!==t&&(r.push(t),v(r));return r}function h(t){var r=t.exec(e);if(r){var n=r[0];return o(n),e=e.slice(n.length),r}}function m(){h(/^\s*/)}function v(e){var t;for(void 0===e&&(e=[]);t=y();)!1!==t&&e.push(t),t=y();return e}function y(){var t=i();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var r=2;""!==e.charAt(r)&&("*"!==e.charAt(r)||"/"!==e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return u("End of comment missing");var a=e.slice(2,r-2);return n+=2,o(a),e=e.slice(r),n+=2,t({type:"comment",comment:a})}}function g(){var e=h(/^([^{]+)/);if(e)return c(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function w(){var e=i(),t=h(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=c(t[0]);if(!h(/^:\s*/))return u("property missing ':'");var n=h(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:r.replace(s,""),value:n?c(n[0]).replace(s,""):""});return h(/^[;\s]*/),o}}function b(){var e,t=[];if(!f())return u("missing '{'");for(v(t);e=w();)!1!==e&&(t.push(e),v(t)),e=w();return d()?t:u("missing '}'")}function S(){for(var e,t=[],r=i();e=h(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),h(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:b()})}var x,E=N("import"),T=N("charset"),M=N("namespace");function N(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=i(),n=h(t);if(n){var o={type:e};return o[e]=n[1].trim(),r(o)}}}function C(){if("@"===e[0])return function(){var e=i(),t=h(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=h(/^([-\w]+)\s*/)))return u("@keyframes missing name");var n,o=t[1];if(!f())return u("@keyframes missing '{'");for(var a=v();n=S();)a.push(n),a=a.concat(v());return d()?e({type:"keyframes",name:o,vendor:r,keyframes:a}):u("@keyframes missing '}'")}}()||function(){var e=i(),t=h(/^@media *([^{]+)/);if(t){var r=c(t[1]);if(!f())return u("@media missing '{'");var n=v().concat(p());return d()?e({type:"media",media:r,rules:n}):u("@media missing '}'")}}()||function(){var e=i(),t=h(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:c(t[1]),media:c(t[2])})}()||function(){var e=i(),t=h(/^@supports *([^{]+)/);if(t){var r=c(t[1]);if(!f())return u("@supports missing '{'");var n=v().concat(p());return d()?e({type:"supports",supports:r,rules:n}):u("@supports missing '}'")}}()||E()||T()||M()||function(){var e=i(),t=h(/^@([-\w]+)?document *([^{]+)/);if(t){var r=c(t[1]),n=c(t[2]);if(!f())return u("@document missing '{'");var o=v().concat(p());return d()?e({type:"document",document:n,vendor:r,rules:o}):u("@document missing '}'")}}()||function(){var e=i();if(h(/^@page */)){var t=g()||[];if(!f())return u("@page missing '{'");for(var r,n=v();r=w();)n.push(r),n=n.concat(v());return d()?e({type:"page",selectors:t,declarations:n}):u("@page missing '}'")}}()||function(){var e=i();if(h(/^@host\s*/)){if(!f())return u("@host missing '{'");var t=v().concat(p());return d()?e({type:"host",rules:t}):u("@host missing '}'")}}()||function(){var e=i();if(h(/^@font-face\s*/)){if(!f())return u("@font-face missing '{'");for(var t,r=v();t=w();)r.push(t),r=r.concat(v());return d()?e({type:"font-face",declarations:r}):u("@font-face missing '}'")}}()}function I(){var e=i(),t=g();return t?(v(),e({type:"rule",selectors:t,declarations:b()})):u("selector missing")}return function e(t,r){for(var n=t&&"string"==typeof t.type,o=n?t:r,i=0,a=Object.keys(t);i<a.length;i++){var s=a[i],l=t[s];Array.isArray(l)?l.forEach((function(t){e(t,o)})):l&&"object"==typeof l&&e(l,o)}n&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:r||null});return t}((x=p(),{type:"stylesheet",stylesheet:{source:t.source,rules:x,parsingErrors:l}}))}function c(e){return e?e.replace(/^\s+|\s+$/g,""):""}var u={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var f=/([^\\]):hover/,d=new RegExp(f,"g");function p(e){var t=l(e,{silent:!0});if(!t.stylesheet)return e;var r=[];if(t.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){f.test(e)&&r.push(e)}))})),0===r.length)return e;var n=new RegExp(r.filter((function(e,t){return r.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g");return e.replace(n,(function(e){var t=e.replace(d,"$1.\\:hover");return e+", "+t}))}function h(e,r){var n=r.doc,o=r.hackCss;switch(e.type){case t.Document:return n.implementation.createDocument(null,"",null);case t.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case t.Element:var i,a=function(e){var t=u[e.tagName]?u[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);i=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",a):n.createElement(a);var s=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var r=e.attributes[t];if(r="boolean"==typeof r||"number"==typeof r?"":r,t.startsWith("rr_")){if("canvas"===a&&"rr_dataURL"===t){var s=document.createElement("img");s.src=r,s.onload=function(){var e=i.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(i.style.width=r),"rr_height"===t&&(i.style.height=r),"rr_mediaCurrentTime"===t&&(i.currentTime=e.attributes.rr_mediaCurrentTime),"rr_mediaState"===t)switch(r){case"played":i.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":i.pause()}}else{var l="textarea"===a&&"value"===t,c="style"===a&&"_cssText"===t;if(c&&o&&(r=p(r)),l||c){for(var u=n.createTextNode(r),f=0,d=Array.from(i.childNodes);f<d.length;f++){var h=d[f];h.nodeType===i.TEXT_NODE&&i.removeChild(h)}return i.appendChild(u),"continue"}try{if(e.isSVG&&"xlink:href"===t)i.setAttributeNS("http://www.w3.org/1999/xlink",t,r);else if("onload"===t||"onclick"===t||"onmouse"===t.substring(0,7))i.setAttribute("_"+t,r);else{if("meta"===a&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"==t)return i.setAttribute("csp-content",r),"continue";i.setAttribute(t,r)}}catch(e){}}};for(var l in e.attributes)s(l);if(e.isShadowHost)if(i.shadowRoot)for(;i.shadowRoot.firstChild;)i.shadowRoot.removeChild(i.shadowRoot.firstChild);else i.attachShadow({mode:"open"});return i;case t.Text:return n.createTextNode(e.isStyle&&o?p(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function m(e,r){var n=r.doc,o=r.map,i=r.skipChild,s=void 0!==i&&i,l=r.hackCss,c=void 0===l||l,u=r.afterAppend,f=h(e,{doc:n,hackCss:c});if(!f)return null;if(e.rootId&&console.assert(o[e.rootId]===n,"Target document should has the same root id."),e.type===t.Document&&(n.close(),n.open(),f=n),f.__sn=e,o[e.id]=f,(e.type===t.Document||e.type===t.Element)&&!s)for(var d=0,p=e.childNodes;d<p.length;d++){var v=p[d],y=m(v,{doc:n,map:o,skipChild:!1,hackCss:c,afterAppend:u});y?(v.isShadow&&a(f)&&f.shadowRoot?f.shadowRoot.appendChild(y):f.appendChild(y),u&&u(y)):console.warn("Failed to rebuild",v)}return f}function v(e,r){var n=r.doc,o=r.onVisit,i=r.hackCss,a={},s=m(e,{doc:n,map:a,skipChild:!1,hackCss:void 0===i||i,afterAppend:r.afterAppend});return function(e,t){for(var r in e)e[r]&&(n=e[r],t(n));var n}(a,(function(e){o&&o(e),function(e){var r=e.__sn;if(r.type===t.Element){var n=e;for(var o in r.attributes)if(r.attributes.hasOwnProperty(o)&&o.startsWith("rr_")){var i=r.attributes[o];"rr_scrollLeft"===o&&(n.scrollLeft=i),"rr_scrollTop"===o&&(n.scrollTop=i)}}}(e)})),[s,a]}function y(e){return e=e||Object.create(null),{on:function(t,r){(e[t]||(e[t]=[])).push(r)},off:function(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit:function(t,r){(e[t]||[]).slice().map((function(e){e(r)})),(e["*"]||[]).slice().map((function(e){e(t,r)}))}}}var g,w,b,S,x,E=Object.freeze({__proto__:null,default:y});function T(e,t){if(void 0===e&&(e=window),void 0===t&&(t=document),!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var r,n=e.HTMLElement||e.Element,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||s,scrollIntoView:n.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(r=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},n.prototype.scroll=n.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},n.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},n.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var r=d(this),n=r.getBoundingClientRect(),i=this.getBoundingClientRect();r!==t.body?(h.call(this,r,r.scrollLeft+i.left-n.left,r.scrollTop+i.top-n.top),"fixed"!==e.getComputedStyle(r).position&&e.scrollBy({left:n.left,top:n.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function u(t,r){var n=e.getComputedStyle(t,null)["overflow"+r];return"auto"===n||"scroll"===n}function f(e){var t=c(e,"Y")&&u(e,"Y"),r=c(e,"X")&&u(e,"X");return t||r}function d(e){for(;e!==t.body&&!1===f(e);)e=e.parentNode||e.host;return e}function p(t){var r,n,o,a=(i()-t.startTime)/468;r=function(e){return.5*(1-Math.cos(Math.PI*e))}(a=a>1?1:a),n=t.startX+(t.x-t.startX)*r,o=t.startY+(t.y-t.startY)*r,t.method.call(t.scrollable,n,o),n===t.x&&o===t.y||e.requestAnimationFrame(p.bind(e,t))}function h(r,n,a){var l,c,u,f,d=i();r===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,f=o.scroll):(l=r,c=r.scrollLeft,u=r.scrollTop,f=s),p({scrollable:l,method:f,startTime:d,startX:c,startY:u,x:n,y:a})}}!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",e[e.Plugin=6]="Plugin"}(g||(g={})),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",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag"}(w||(w={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(b||(b={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked"}(S||(S={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back"}(x||(x={}));var M,N=function(){function e(e,t){void 0===e&&(e=[]),this.timeOffset=0,this.raf=null,this.actions=e,this.speed=t}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){this.actions=this.actions.concat(e)},e.prototype.start=function(){this.timeOffset=0;var e=performance.now(),t=this.actions,r=this;this.raf=requestAnimationFrame((function n(){var o=performance.now();for(r.timeOffset+=(o-e)*r.speed,e=o;t.length;){var i=t[0];if(!(r.timeOffset>=i.delay))break;t.shift(),i.doAction()}(t.length>0||r.liveMode)&&(r.raf=requestAnimationFrame(n))}))},e.prototype.clear=function(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0},e.prototype.setSpeed=function(e){this.speed=e},e.prototype.toggleLiveMode=function(e){this.liveMode=e},e.prototype.isActive=function(){return null!==this.raf},e.prototype.findActionIndex=function(e){for(var t=0,r=this.actions.length-1;t<=r;){var n=Math.floor((t+r)/2);if(this.actions[n].delay<e.delay)t=n+1;else{if(!(this.actions[n].delay>e.delay))return n;r=n-1}}return t},e}();function C(e,t){if(e.type===g.IncrementalSnapshot&&e.data.source===w.MouseMove){var r=e.data.positions[0].timeOffset,n=e.timestamp+r;return e.delay=n-t,n-t}return e.delay=e.timestamp-t,e.delay}
***************************************************************************** */var t,r=function(){return(r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function n(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function i(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function o(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}function a(e){return e.nodeType===e.ELEMENT_NODE}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(t||(t={}));var s=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function l(e,t){void 0===t&&(t={});var r=1,n=1;function i(e){var t=e.match(/\n/g);t&&(r+=t.length);var i=e.lastIndexOf("\n");n=-1===i?n+e.length:e.length-i}function o(){var e={line:r,column:n};return function(t){return t.position=new a(e),m(),t}}var a=function(e){this.start=e,this.end={line:r,column:n},this.source=t.source};a.prototype.content=e;var l=[];function u(i){var o=new Error(t.source+":"+r+":"+n+": "+i);if(o.reason=i,o.filename=t.source,o.line=r,o.column=n,o.source=e,!t.silent)throw o;l.push(o)}function f(){return h(/^{\s*/)}function d(){return h(/^}/)}function p(){var t,r=[];for(m(),v(r);e.length&&"}"!==e.charAt(0)&&(t=I()||C());)!1!==t&&(r.push(t),v(r));return r}function h(t){var r=t.exec(e);if(r){var n=r[0];return i(n),e=e.slice(n.length),r}}function m(){h(/^\s*/)}function v(e){var t;for(void 0===e&&(e=[]);t=y();)!1!==t&&e.push(t),t=y();return e}function y(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var r=2;""!==e.charAt(r)&&("*"!==e.charAt(r)||"/"!==e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return u("End of comment missing");var a=e.slice(2,r-2);return n+=2,i(a),e=e.slice(r),n+=2,t({type:"comment",comment:a})}}function g(){var e=h(/^([^{]+)/);if(e)return c(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function w(){var e=o(),t=h(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=c(t[0]);if(!h(/^:\s*/))return u("property missing ':'");var n=h(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:r.replace(s,""),value:n?c(n[0]).replace(s,""):""});return h(/^[;\s]*/),i}}function b(){var e,t=[];if(!f())return u("missing '{'");for(v(t);e=w();)!1!==e&&(t.push(e),v(t)),e=w();return d()?t:u("missing '}'")}function S(){for(var e,t=[],r=o();e=h(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),h(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:b()})}var x,E=N("import"),T=N("charset"),M=N("namespace");function N(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=o(),n=h(t);if(n){var i={type:e};return i[e]=n[1].trim(),r(i)}}}function I(){if("@"===e[0])return function(){var e=o(),t=h(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=h(/^([-\w]+)\s*/)))return u("@keyframes missing name");var n,i=t[1];if(!f())return u("@keyframes missing '{'");for(var a=v();n=S();)a.push(n),a=a.concat(v());return d()?e({type:"keyframes",name:i,vendor:r,keyframes:a}):u("@keyframes missing '}'")}}()||function(){var e=o(),t=h(/^@media *([^{]+)/);if(t){var r=c(t[1]);if(!f())return u("@media missing '{'");var n=v().concat(p());return d()?e({type:"media",media:r,rules:n}):u("@media missing '}'")}}()||function(){var e=o(),t=h(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:c(t[1]),media:c(t[2])})}()||function(){var e=o(),t=h(/^@supports *([^{]+)/);if(t){var r=c(t[1]);if(!f())return u("@supports missing '{'");var n=v().concat(p());return d()?e({type:"supports",supports:r,rules:n}):u("@supports missing '}'")}}()||E()||T()||M()||function(){var e=o(),t=h(/^@([-\w]+)?document *([^{]+)/);if(t){var r=c(t[1]),n=c(t[2]);if(!f())return u("@document missing '{'");var i=v().concat(p());return d()?e({type:"document",document:n,vendor:r,rules:i}):u("@document missing '}'")}}()||function(){var e=o();if(h(/^@page */)){var t=g()||[];if(!f())return u("@page missing '{'");for(var r,n=v();r=w();)n.push(r),n=n.concat(v());return d()?e({type:"page",selectors:t,declarations:n}):u("@page missing '}'")}}()||function(){var e=o();if(h(/^@host\s*/)){if(!f())return u("@host missing '{'");var t=v().concat(p());return d()?e({type:"host",rules:t}):u("@host missing '}'")}}()||function(){var e=o();if(h(/^@font-face\s*/)){if(!f())return u("@font-face missing '{'");for(var t,r=v();t=w();)r.push(t),r=r.concat(v());return d()?e({type:"font-face",declarations:r}):u("@font-face missing '}'")}}()}function C(){var e=o(),t=g();return t?(v(),e({type:"rule",selectors:t,declarations:b()})):u("selector missing")}return function e(t,r){for(var n=t&&"string"==typeof t.type,i=n?t:r,o=0,a=Object.keys(t);o<a.length;o++){var s=a[o],l=t[s];Array.isArray(l)?l.forEach((function(t){e(t,i)})):l&&"object"==typeof l&&e(l,i)}n&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:r||null});return t}((x=p(),{type:"stylesheet",stylesheet:{source:t.source,rules:x,parsingErrors:l}}))}function c(e){return e?e.replace(/^\s+|\s+$/g,""):""}var u={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var f=/([^\\]):hover/,d=new RegExp(f,"g");function p(e){var t=l(e,{silent:!0});if(!t.stylesheet)return e;var r=[];if(t.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){f.test(e)&&r.push(e)}))})),0===r.length)return e;var n=new RegExp(r.filter((function(e,t){return r.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g");return e.replace(n,(function(e){var t=e.replace(d,"$1.\\:hover");return e+", "+t}))}function h(e,r){var n=r.doc,i=r.hackCss;switch(e.type){case t.Document:return n.implementation.createDocument(null,"",null);case t.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case t.Element:var o,a=function(e){var t=u[e.tagName]?u[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);o=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",a):n.createElement(a);var s=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var r=e.attributes[t];if(r="boolean"==typeof r||"number"==typeof r?"":r,t.startsWith("rr_")){if("canvas"===a&&"rr_dataURL"===t){var s=document.createElement("img");s.src=r,s.onload=function(){var e=o.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(o.style.width=r),"rr_height"===t&&(o.style.height=r),"rr_mediaCurrentTime"===t&&(o.currentTime=e.attributes.rr_mediaCurrentTime),"rr_mediaState"===t)switch(r){case"played":o.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":o.pause()}}else{var l="textarea"===a&&"value"===t,c="style"===a&&"_cssText"===t;if(c&&i&&(r=p(r)),l||c){for(var u=n.createTextNode(r),f=0,d=Array.from(o.childNodes);f<d.length;f++){var h=d[f];h.nodeType===o.TEXT_NODE&&o.removeChild(h)}return o.appendChild(u),"continue"}try{if(e.isSVG&&"xlink:href"===t)o.setAttributeNS("http://www.w3.org/1999/xlink",t,r);else if("onload"===t||"onclick"===t||"onmouse"===t.substring(0,7))o.setAttribute("_"+t,r);else{if("meta"===a&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===t)return o.setAttribute("csp-content",r),"continue";"link"===a&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===a&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")||o.setAttribute(t,r)}}catch(e){}}};for(var l in e.attributes)s(l);if(e.isShadowHost)if(o.shadowRoot)for(;o.shadowRoot.firstChild;)o.shadowRoot.removeChild(o.shadowRoot.firstChild);else o.attachShadow({mode:"open"});return o;case t.Text:return n.createTextNode(e.isStyle&&i?p(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function m(e,r){var n=r.doc,i=r.map,o=r.skipChild,s=void 0!==o&&o,l=r.hackCss,c=void 0===l||l,u=r.afterAppend,f=h(e,{doc:n,hackCss:c});if(!f)return null;if(e.rootId&&console.assert(i[e.rootId]===n,"Target document should has the same root id."),e.type===t.Document&&(n.close(),n.open(),f=n),f.__sn=e,i[e.id]=f,(e.type===t.Document||e.type===t.Element)&&!s)for(var d=0,p=e.childNodes;d<p.length;d++){var v=p[d],y=m(v,{doc:n,map:i,skipChild:!1,hackCss:c,afterAppend:u});y?(v.isShadow&&a(f)&&f.shadowRoot?f.shadowRoot.appendChild(y):f.appendChild(y),u&&u(y)):console.warn("Failed to rebuild",v)}return f}function v(e,r){var n=r.doc,i=r.onVisit,o=r.hackCss,a={},s=m(e,{doc:n,map:a,skipChild:!1,hackCss:void 0===o||o,afterAppend:r.afterAppend});return function(e,t){for(var r in e)e[r]&&(n=e[r],t(n));var n}(a,(function(e){i&&i(e),function(e){var r=e.__sn;if(r.type===t.Element){var n=e;for(var i in r.attributes)if(r.attributes.hasOwnProperty(i)&&i.startsWith("rr_")){var o=r.attributes[i];"rr_scrollLeft"===i&&(n.scrollLeft=o),"rr_scrollTop"===i&&(n.scrollTop=o)}}}(e)})),[s,a]}function y(e){return e=e||Object.create(null),{on:function(t,r){(e[t]||(e[t]=[])).push(r)},off:function(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit:function(t,r){(e[t]||[]).slice().map((function(e){e(r)})),(e["*"]||[]).slice().map((function(e){e(t,r)}))}}}var g,w,b,S,x,E=Object.freeze({__proto__:null,default:y});function T(e,t){if(void 0===e&&(e=window),void 0===t&&(t=document),!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var r,n=e.HTMLElement||e.Element,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||s,scrollIntoView:n.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(r=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):i.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?i.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},n.prototype.scroll=n.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},n.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},n.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var r=d(this),n=r.getBoundingClientRect(),o=this.getBoundingClientRect();r!==t.body?(h.call(this,r,r.scrollLeft+o.left-n.left,r.scrollTop+o.top-n.top),"fixed"!==e.getComputedStyle(r).position&&e.scrollBy({left:n.left,top:n.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function u(t,r){var n=e.getComputedStyle(t,null)["overflow"+r];return"auto"===n||"scroll"===n}function f(e){var t=c(e,"Y")&&u(e,"Y"),r=c(e,"X")&&u(e,"X");return t||r}function d(e){for(;e!==t.body&&!1===f(e);)e=e.parentNode||e.host;return e}function p(t){var r,n,i,a=(o()-t.startTime)/468;r=function(e){return.5*(1-Math.cos(Math.PI*e))}(a=a>1?1:a),n=t.startX+(t.x-t.startX)*r,i=t.startY+(t.y-t.startY)*r,t.method.call(t.scrollable,n,i),n===t.x&&i===t.y||e.requestAnimationFrame(p.bind(e,t))}function h(r,n,a){var l,c,u,f,d=o();r===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,f=i.scroll):(l=r,c=r.scrollLeft,u=r.scrollTop,f=s),p({scrollable:l,method:f,startTime:d,startX:c,startY:u,x:n,y:a})}}!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",e[e.Plugin=6]="Plugin"}(g||(g={})),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",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag"}(w||(w={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(b||(b={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked"}(S||(S={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back"}(x||(x={}));var M,N=function(){function e(e,t){void 0===e&&(e=[]),this.timeOffset=0,this.raf=null,this.actions=e,this.speed=t}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){this.actions=this.actions.concat(e)},e.prototype.start=function(){this.timeOffset=0;var e=performance.now(),t=this.actions,r=this;this.raf=requestAnimationFrame((function n(){var i=performance.now();for(r.timeOffset+=(i-e)*r.speed,e=i;t.length;){var o=t[0];if(!(r.timeOffset>=o.delay))break;t.shift(),o.doAction()}(t.length>0||r.liveMode)&&(r.raf=requestAnimationFrame(n))}))},e.prototype.clear=function(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0},e.prototype.setSpeed=function(e){this.speed=e},e.prototype.toggleLiveMode=function(e){this.liveMode=e},e.prototype.isActive=function(){return null!==this.raf},e.prototype.findActionIndex=function(e){for(var t=0,r=this.actions.length-1;t<=r;){var n=Math.floor((t+r)/2);if(this.actions[n].delay<e.delay)t=n+1;else{if(!(this.actions[n].delay>e.delay))return n;r=n-1}}return t},e}();function I(e,t){if(e.type===g.IncrementalSnapshot&&e.data.source===w.MouseMove){var r=e.data.positions[0].timeOffset,n=e.timestamp+r;return e.delay=n-t,n-t}return e.delay=e.timestamp-t,e.delay}
/*! *****************************************************************************

@@ -30,3 +30,3 @@ Copyright (c) Microsoft Corporation. All rights reserved.

and limitations under the License.
***************************************************************************** */!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(M||(M={}));var I={type:"xstate.init"};function D(e){return void 0===e?[]:[].concat(e)}function k(e){return{type:"xstate.assign",assignment:e}}function A(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 _(e){return function(t){return e===t}}function F(e){return"string"==typeof e?{type:e}:e}function O(e,t){return{value:e,context:t,actions:[],changed:!1,matches:_(e)}}function P(e,t){void 0===t&&(t={});var r={config:e,_options:t,initialState:{value:e.initial,actions:D(e.states[e.initial].entry).map((function(e){return A(e,t.actions)})),context:e.context,matches:_(e.initial)},transition:function(t,n){var o,i,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,l=a.context,c=F(n),u=e.states[s];if(u.on){var f=D(u.on[c.type]),d=function(t){if(void 0===t)return{value:O(s,l)};var n="string"==typeof t?{target:t}:t,o=n.target,i=void 0===o?s:o,a=n.actions,f=void 0===a?[]:a,d=n.cond,p=l;if((void 0===d?function(){return!0}:d)(l,c)){var h=e.states[i],m=!1,v=[].concat(u.exit,f,h.entry).filter((function(e){return e})).map((function(e){return A(e,r._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,c):Object.keys(e.assignment).forEach((function(r){t[r]="function"==typeof e.assignment[r]?e.assignment[r](p,c):e.assignment[r]})),p=t,!1}return!0}));return{value:{value:i,context:p,actions:v,changed:i!==s||v.length>0||m,matches:_(i)}}}};try{for(var p=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}(f),h=p.next();!h.done;h=p.next()){var m=d(h.value);if("object"==typeof m)return m.value}}catch(e){o={error:e}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}}return O(s,l)}};return r}var R=function(e,t){return e.actions.forEach((function(r){var n=r.exec;return n&&n(e.context,t)}))};function L(e){var t=e.initialState,r=M.NotStarted,n=new Set,o={_machine:e,send:function(o){r===M.Running&&(t=e.transition(t,o),R(t,F(o)),n.forEach((function(e){return e(t)})))},subscribe:function(e){return n.add(e),e(t),{unsubscribe:function(){return n.delete(e)}}},start:function(n){if(n){var i="object"==typeof n?n:{context:e.config.context,value:n};t={value:i.value,actions:[],context:i.context,matches:_(i.value)}}return r=M.Running,R(t,I),o},stop:function(){return r=M.Stopped,n.clear(),o},get state(){return t},get status(){return r}};return o}var B="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",j={map:{},getId:function(){return console.error(B),-1},getNode:function(){return console.error(B),null},removeNodeFromMap:function(){console.error(B)},has:function(){return console.error(B),!1},reset:function(){console.error(B)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(j=new Proxy(j,{get:function(e,t,r){return"map"===t&&console.error(B),Reflect.get(e,t,r)}}));var U=function(){function e(){this.reset()}return e.prototype.add=function(e){var t=this.indexes.get(e.parentId),r={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(r.parent=t,t.children[r.id]=r):this.tree[r.id]=r,this.indexes.set(r.id,r)},e.prototype.remove=function(e,t){var r=this,n=this.indexes.get(e.parentId),o=this.indexes.get(e.id),i=function(e){r.removeIdSet.add(e);var n=t.getNode(e);null==n||n.childNodes.forEach((function(e){"__sn"in e&&i(e.__sn.id)}))},a=function(t){r.removeIdSet.add(t.id),Object.values(t.children).forEach((function(e){return a(e)}));var n=r.indexes.get(t.id);if(n){var o=n.parent;o&&(delete n.parent,delete o.children[n.id],r.indexes.delete(e.id))}};o?n?(delete o.parent,delete n.children[o.id],this.indexes.delete(e.id),a(o)):(delete this.tree[o.id],this.indexes.delete(o.id),a(o)):(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,r,o,i=this,a=this.tree,s=this.removeNodeMutations,l=this.textMutations,c=this.attributeMutations,u={source:w.Mutation,removes:s,texts:l,attributes:c,adds:[]},f=function(e,t){t&&i.removeIdSet.add(e.id),u.texts=u.texts.concat(t?[]:e.texts).filter((function(e){return!i.removeIdSet.has(e.id)})),u.attributes=u.attributes.concat(t?[]:e.attributes).filter((function(e){return!i.removeIdSet.has(e.id)})),i.removeIdSet.has(e.id)||i.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return f(e,!0)})):(u.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return f(e,!1)})))};Object.values(a).forEach((function(e){return f(e,!1)}));try{for(var d=n(this.scrollMap.keys()),p=d.next();!p.done;p=d.next()){var h=p.value;this.removeIdSet.has(h)&&this.scrollMap.delete(h)}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var m=n(this.inputMap.keys()),v=m.next();!v.done;v=m.next()){h=v.value;this.removeIdSet.has(h)&&this.inputMap.delete(h)}}catch(e){r={error:e}}finally{try{v&&!v.done&&(o=m.return)&&o.call(m)}finally{if(r)throw r.error}}var y=new Map(this.scrollMap),g=new Map(this.inputMap);return this.reset(),{mutationData:u,scrollMap:y,inputMap:g}},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 V(e){var t,r,o={},i=function(e,t){var r={value:e,parent:t,children:[]};return o[e.node.id]=r,r},a=[];try{for(var s=n(e),l=s.next();!l.done;l=s.next()){var c=l.value,u=c.nextId,f=c.parentId;if(u&&u in o){var d=o[u];if(d.parent){var p=d.parent.children.indexOf(d);d.parent.children.splice(p,0,i(c,d.parent))}else{p=a.indexOf(d);a.splice(p,0,i(c,null))}}else if(f in o){var h=o[f];h.children.push(i(c,h))}else a.push(i(c,null))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return a}function z(e,t){t(e.value);for(var r=e.children.length-1;r>=0;r--)z(e.children[r],t)}function W(e){return"__sn"in e&&(e.__sn.type===t.Element&&"iframe"===e.__sn.tagName)}function Y(e){var t;return Boolean(null===(t=e)||void 0===t?void 0:t.shadowRoot)}function X(e,t){var o=t.getCastFn,i=t.emitter;return L(P({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:k({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:k((function(e,t){var n=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(n=t.payload.timeOffset),r(r({},e),{timeOffset:n,baselineTime:e.events[0].timestamp+n})})),play:function(e){var t,r,a,s,l,c=e.timer,u=e.events,f=e.baselineTime,d=e.lastPlayedEvent;c.clear();try{for(var p=n(u),h=p.next();!h.done;h=p.next()){C(h.value,f)}}catch(e){t={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(t)throw t.error}}var m=function(e,t){for(var r=e.length-1;r>=0;r--){var n=e[r];if(n.type===g.Meta&&n.timestamp<=t)return e.slice(r)}return e}(u,f),v=null==d?void 0:d.timestamp;(null==d?void 0:d.type)===g.IncrementalSnapshot&&d.data.source===w.MouseMove&&(v=d.timestamp+(null===(l=d.data.positions[0])||void 0===l?void 0:l.timeOffset)),f<(v||0)&&i.emit(x.PlayBack);var y=new Array,b=function(e){if(v&&v<f&&(e.timestamp<=v||e===d))return"continue";var t=e.timestamp<f;if(t&&!function(e){switch(e.type){case g.DomContentLoaded:case g.Load:case g.Custom:return!1;case g.FullSnapshot:case g.Meta:case g.Plugin:return!0}switch(e.data.source){case w.MouseMove:case w.MouseInteraction:case w.TouchMove:case w.MediaInteraction:return!1;case w.ViewportResize:case w.StyleSheetRule:case w.Scroll:case w.Input:return!0}return!0}(e))return"continue";var r=o(e,t);t?r():y.push({doAction:function(){r(),i.emit(x.EventCast,e)},delay:e.delay})};try{for(var S=n(m),E=S.next();!E.done;E=S.next()){b(E.value)}}catch(e){a={error:e}}finally{try{E&&!E.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}i.emit(x.Flush),c.addActions(y),c.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:k((function(e){return r(r({},e),{lastPlayedEvent:null})})),startLive:k({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:k((function(e,t){var n=e.baselineTime,a=e.timer,s=e.events;if("ADD_EVENT"===t.type){var l=t.payload.event;C(l,n);var c=s.length-1;if(!s[c]||s[c].timestamp<=l.timestamp)s.push(l);else{for(var u=-1,f=0;f<=c;){var d=Math.floor((f+c)/2);s[d].timestamp<=l.timestamp?f=d+1:c=d-1}-1===u&&(u=f),s.splice(u,0,l)}var p=l.timestamp<n,h=o(l,p);p?h():a.isActive()&&a.addAction({doAction:function(){h(),i.emit(x.EventCast,l)},delay:l.delay})}return r(r({},e),{events:s})}))}}))}var Q=y||E,H={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"},G=function(){function e(e,t){var r=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=Q(),this.legacy_missingNodeRetryMap={},this.imageMap=new Map,this.mirror={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,r=e.__sn&&e.__sn.id;delete this.map[r],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}},this.firstFullSnapshot=null,this.newDocumentQueue=[],!(null==t?void 0:t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");var o={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:H};this.config=Object.assign({},o,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on(x.Resize,this.handleResize),this.setupDom(),this.treeIndex=new U,this.fragmentParentMap=new Map,this.elementStateMap=new Map,this.emitter.on(x.Flush,(function(){var e,t,o,i,a=r.treeIndex.flush(),s=a.scrollMap,l=a.inputMap;r.fragmentParentMap.forEach((function(e,t){return r.restoreRealParent(t,e)})),r.fragmentParentMap.clear(),r.elementStateMap.clear();try{for(var c=n(s.values()),u=c.next();!u.done;u=c.next()){var f=u.value;r.applyScroll(f)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}try{for(var d=n(l.values()),p=d.next();!p.done;p=d.next()){f=p.value;r.applyInput(f)}}catch(e){o={error:e}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}})),this.emitter.on(x.PlayBack,(function(){r.firstFullSnapshot=null,r.mirror.reset()}));var i=new N([],(null==t?void 0:t.speed)||o.speed);this.service=X({events:e.map((function(e){return t&&t.unpackFn?t.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){r.emitter.emit(x.StateChange,{player:e})})),this.speedService=L(P({id:"speed",context:{normalSpeed:-1,timer:i},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:k({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(e){r.emitter.emit(x.StateChange,{speed:e})}));var a=this.service.state.context.events.find((function(e){return e.type===g.Meta})),s=this.service.state.context.events.find((function(e){return e.type===g.FullSnapshot}));if(a){var l=a.data,c=l.width,u=l.height;setTimeout((function(){r.emitter.emit(x.Resize,{width:c,height:u})}),0)}s&&setTimeout((function(){r.firstFullSnapshot||(r.firstFullSnapshot=s,r.rebuildFullSnapshot(s),r.iframe.contentWindow.scrollTo(s.data.initialOffset))}),1)}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){return this.emitter.on(e,t),this},e.prototype.off=function(e,t){return this.emitter.off(e,t),this},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(r){t.config[r]=e[r]})),this.config.skipInactive||this.backToNormal(),void 0!==e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),void 0!==e.mouseTail&&(!1===e.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))},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.getMirror=function(){return this.mirror},e.prototype.play=function(e){var t;void 0===e&&(e=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}}),null===(t=this.iframe.contentDocument)||void 0===t||t.getElementsByTagName("html")[0].classList.remove("rrweb-paused"),this.emitter.emit(x.Start)},e.prototype.pause=function(e){var t;void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),null===(t=this.iframe.contentDocument)||void 0===t||t.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(x.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(x.Resume)},e.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},e.prototype.addEvent=function(e){var t=this,r=this.config.unpackFn?this.config.unpackFn(e):e;Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:r}})}))},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="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var e,t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(T(this.iframe.contentWindow,this.iframe.contentDocument),void 0===(e=this.iframe.contentWindow)&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1}))},e.prototype.handleResize=function(e){var t,r;this.iframe.style.display="inherit";try{for(var o=n([this.mouseTail,this.iframe]),i=o.next();!i.done;i=o.next()){var a=i.value;a&&(a.setAttribute("width",String(e.width)),a.setAttribute("height",String(e.height)))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},e.prototype.getCastFn=function(e,t){var r,o=this;switch(void 0===t&&(t=!1),e.type){case g.DomContentLoaded:case g.Load:break;case g.Custom:r=function(){o.emitter.emit(x.CustomEvent,e)};break;case g.Meta:r=function(){return o.emitter.emit(x.Resize,{width:e.data.width,height:e.data.height})};break;case g.FullSnapshot:r=function(){if(o.firstFullSnapshot){if(o.firstFullSnapshot===e)return void(o.firstFullSnapshot=!0)}else o.firstFullSnapshot=!0;o.rebuildFullSnapshot(e,t),o.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case g.IncrementalSnapshot:r=function(){var r,i;if(o.applyIncremental(e,t),!t&&(e===o.nextUserInteractionEvent&&(o.nextUserInteractionEvent=null,o.backToNormal()),o.config.skipInactive&&!o.nextUserInteractionEvent)){try{for(var a=n(o.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(!(l.timestamp<=e.timestamp)&&o.isUserInteraction(l)){l.delay-e.delay>1e4*o.speedService.state.context.timer.speed&&(o.nextUserInteractionEvent=l);break}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}if(o.nextUserInteractionEvent){var c=o.nextUserInteractionEvent.delay-e.delay,u={speed:Math.min(Math.round(c/5e3),o.config.maxSpeed)};o.speedService.send({type:"FAST_FORWARD",payload:u}),o.emitter.emit(x.SkipStart,u)}}}}return function(){var i,a;r&&r();try{for(var s=n(o.config.plugins||[]),l=s.next();!l.done;l=s.next()){l.value.handler(e,t,{replayer:o})}}catch(e){i={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}o.service.send({type:"CAST_EVENT",payload:{event:e}});var c=o.service.state.context.events.length-1;if(e===o.service.state.context.events[c]){var u=function(){c<o.service.state.context.events.length-1||(o.backToNormal(),o.service.send("END"),o.emitter.emit(x.Finish))};e.type===g.IncrementalSnapshot&&e.data.source===w.MouseMove&&e.data.positions.length?setTimeout((function(){u()}),Math.max(0,50-e.data.positions[0].timeOffset)):u()}}},e.prototype.rebuildFullSnapshot=function(e,t){var r,o,i=this;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={};var a=[];this.mirror.map=v(e.data.node,{doc:this.iframe.contentDocument,afterAppend:function(e){i.collectIframeAndAttachDocument(a,e)}})[1];var s=function(e,t){if(l.attachDocumentToIframe(e,t),l.newDocumentQueue=l.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var r=t.contentDocument,n=r.documentElement,o=r.head;l.insertStyleRules(n,o)}},l=this;try{for(var c=n(a),u=c.next();!u.done;u=c.next()){var f=u.value;s(f.mutationInQueue,f.builtNode)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}var d=this.iframe.contentDocument,p=d.documentElement,h=d.head;this.insertStyleRules(p,h),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(x.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()},e.prototype.insertStyleRules=function(e,t){var r=document.createElement("style");e.insertBefore(r,t);var n,o=(n=this.config.blockClass,["."+n+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules);this.config.pauseAnimation&&o.push("html.rrweb-paused * { animation-play-state: paused !important; }");for(var i=0;i<o.length;i++)r.sheet.insertRule(o[i],i)},e.prototype.attachDocumentToIframe=function(e,t){var r,o,i=this,a=[];if(!t.contentDocument)for(var s=t.parentNode;s;){if(this.fragmentParentMap.has(s)){var l=s,c=this.fragmentParentMap.get(l);this.restoreRealParent(l,c);break}s=s.parentNode}m(e.node,{doc:t.contentDocument,map:this.mirror.map,hackCss:!0,skipChild:!1,afterAppend:function(e){i.collectIframeAndAttachDocument(a,e)}});var u=function(e,t){if(f.attachDocumentToIframe(e,t),f.newDocumentQueue=f.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var r=t.contentDocument,n=r.documentElement,o=r.head;f.insertStyleRules(n,o)}},f=this;try{for(var d=n(a),p=d.next();!p.done;p=d.next()){var h=p.value;u(h.mutationInQueue,h.builtNode)}}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}},e.prototype.collectIframeAndAttachDocument=function(e,t){if(W(t)){var r=this.newDocumentQueue.find((function(e){return e.parentId===t.__sn.id}));r&&e.push({mutationInQueue:r,builtNode:t})}},e.prototype.waitForStylesheetLoad=function(){var e,t=this,r=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(r){var n,o=new Set,i=this.service.state,a=function(){i=t.service.state};this.emitter.on(x.Start,a),this.emitter.on(x.Pause,a);var s=function(){t.emitter.off(x.Start,a),t.emitter.off(x.Pause,a)};r.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(o.add(e),e.addEventListener("load",(function(){o.delete(e),0===o.size&&-1!==n&&(i.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(x.LoadStylesheetEnd),n&&window.clearTimeout(n),s())})))})),o.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(x.LoadStylesheetStart),n=window.setTimeout((function(){i.matches("playing")&&t.play(t.getCurrentTime()),n=-1,s()}),this.config.loadTimeout))}},e.prototype.preloadAllImages=function(){var e,t,r=this,o=(this.service.state,function(){r.service.state});this.emitter.on(x.Start,o),this.emitter.on(x.Pause,o);var i=0;try{for(var a=n(this.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(l.type===g.IncrementalSnapshot&&l.data.source===w.CanvasMutation&&"drawImage"===l.data.property&&"string"==typeof l.data.args[0]&&!this.imageMap.has(l)){i++;var c=document.createElement("canvas"),u=c.getContext("2d"),f=null==u?void 0:u.createImageData(c.width,c.height);null==f||f.data;JSON.parse(l.data.args[0]),null==u||u.putImageData(f,0,0)}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}0!==i&&this.service.send({type:"PAUSE"})},e.prototype.applyIncremental=function(e,t){var r,n,o=this,i=e.data;switch(i.source){case w.Mutation:t&&(i.adds.forEach((function(e){return o.treeIndex.add(e)})),i.texts.forEach((function(e){return o.treeIndex.text(e)})),i.attributes.forEach((function(e){return o.treeIndex.attribute(e)})),i.removes.forEach((function(e){return o.treeIndex.remove(e,o.mirror)}))),this.applyMutation(i,t);break;case w.Drag:case w.TouchMove:case w.MouseMove:if(t){var a=i.positions[i.positions.length-1];this.moveAndHover(i,a.x,a.y,a.id)}else i.positions.forEach((function(t){var r={doAction:function(){o.moveAndHover(i,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-o.service.state.context.baselineTime};o.timer.addAction(r)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(r=i.positions[0])||void 0===r?void 0:r.timeOffset)});break;case w.MouseInteraction:if(-1===i.id)break;var s=new Event(b[i.type].toLowerCase());if(!(v=this.mirror.getNode(i.id)))return this.debugNodeNotFound(i,i.id);this.emitter.emit(x.MouseInteraction,{type:i.type,target:v});var l=this.config.triggerFocus;switch(i.type){case b.Blur:"blur"in v&&v.blur();break;case b.Focus:l&&v.focus&&v.focus({preventScroll:!0});break;case b.Click:case b.TouchStart:case b.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:v.dispatchEvent(s)}break;case w.Scroll:if(-1===i.id)break;if(t){this.treeIndex.scroll(i);break}this.applyScroll(i);break;case w.ViewportResize:this.emitter.emit(x.Resize,{width:i.width,height:i.height});break;case w.Input:if(-1===i.id)break;if(t){this.treeIndex.input(i);break}this.applyInput(i);break;case w.MediaInteraction:if(!(v=this.mirror.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var c=v;try{i.currentTime&&(c.currentTime=i.currentTime),i.type===S.Pause&&c.pause(),i.type===S.Play&&c.play()}catch(e){this.config.showWarning&&console.warn("Failed to replay media interactions: "+(e.message||e))}break;case w.StyleSheetRule:if(!(v=this.mirror.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var u=v,f=v.parentNode,d=this.fragmentParentMap.has(f),p=void 0;if(d){var h=this.fragmentParentMap.get(v.parentNode);p=document.createTextNode(""),f.replaceChild(p,v),h.appendChild(v)}var m=u.sheet;i.adds&&i.adds.forEach((function(e){var t=e.rule,r=e.index;try{var n=void 0===r?void 0:Math.min(r,m.rules.length);try{m.insertRule(t,n)}catch(e){}}catch(e){}})),i.removes&&i.removes.forEach((function(e){var t=e.index;try{m.deleteRule(t)}catch(e){}})),d&&p&&f.replaceChild(v,p);break;case w.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var v;if(!(v=this.mirror.getNode(i.id)))return this.debugNodeNotFound(i,i.id);try{var y=v.getContext("2d");if(i.setter)return void(y[i.property]=i.args[0]);var g=y[i.property];if("drawImage"===i.property&&"string"==typeof i.args[0]){var E=this.imageMap.get(e);i.args[0]=E,g.apply(y,i.args)}else g.apply(y,i.args)}catch(e){this.warnCanvasMutationFailed(i,i.id,e)}break;case w.Font:try{var T=new FontFace(i.family,i.buffer?new Uint8Array(JSON.parse(i.fontSource)):i.fontSource,i.descriptors);null===(n=this.iframe.contentDocument)||void 0===n||n.fonts.add(T)}catch(e){this.config.showWarning&&console.warn(e)}}},e.prototype.applyMutation=function(e,o){var i,a,s=this;e.removes.forEach((function(t){var r=s.mirror.getNode(t.id);if(!r)return s.warnNodeNotFound(e,t.id);var n=s.mirror.getNode(t.parentId);if(!n)return s.warnNodeNotFound(e,t.parentId);if(t.isShadow&&Y(n)&&(n=n.shadowRoot),s.mirror.removeNodeFromMap(r),n){var o="__sn"in n?s.fragmentParentMap.get(n):void 0;if(o&&o.contains(r))o.removeChild(r);else if(s.fragmentParentMap.has(r)){var i=s.fragmentParentMap.get(r);n.removeChild(i),s.fragmentParentMap.delete(r)}else n.removeChild(r)}}));var l=r({},this.legacy_missingNodeRetryMap),c=[],u=function(e){var r,n;if(!s.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var i=s.mirror.getNode(e.parentId);if(!i)return e.node.type===t.Document?s.newDocumentQueue.push(e):c.push(e);var a=null;s.iframe.contentDocument.contains?a=s.iframe.contentDocument.contains(i):s.iframe.contentDocument.body.contains&&(a=s.iframe.contentDocument.body.contains(i));var u=(null===(n=(r=i).getElementsByTagName)||void 0===n?void 0:n.call(r,"iframe").length)>0;if(o&&a&&!W(i)&&!u){var f=document.createDocumentFragment();for(s.mirror.map[e.parentId]=f,s.fragmentParentMap.set(f,i),s.storeState(i);i.firstChild;)f.appendChild(i.firstChild);i=f}e.node.isShadow&&Y(i)&&(i=i.shadowRoot);var d=null,p=null;if(e.previousId&&(d=s.mirror.getNode(e.previousId)),e.nextId&&(p=s.mirror.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=s.mirror.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return c.push(e);if(!e.node.rootId||s.mirror.getNode(e.node.rootId)){var h=e.node.rootId?s.mirror.getNode(e.node.rootId):s.iframe.contentDocument;if(W(i))s.attachDocumentToIframe(e,i);else{var v=m(e.node,{doc:h,map:s.mirror.map,skipChild:!0,hackCss:!0});if(-1!==e.previousId&&-1!==e.nextId){if(d&&d.nextSibling&&d.nextSibling.parentNode)i.insertBefore(v,d.nextSibling);else if(p&&p.parentNode)i.contains(p)?i.insertBefore(v,p):i.insertBefore(v,null);else{if(i===h)for(;h.firstChild;)h.removeChild(h.firstChild);i.appendChild(v)}if(W(v)){var y=s.newDocumentQueue.find((function(e){return e.parentId===v.__sn.id}));if(y&&(s.attachDocumentToIframe(y,v),s.newDocumentQueue=s.newDocumentQueue.filter((function(e){return e!==y}))),v.contentDocument){var g=v.contentDocument,w=g.documentElement,b=g.head;s.insertStyleRules(w,b)}}(e.previousId||e.nextId)&&s.legacy_resolveMissingNode(l,i,v,e)}else l[e.node.id]={node:v,mutation:e}}}};e.adds.forEach((function(e){u(e)}));for(var f=Date.now();c.length;){var d=V(c);if(c.length=0,Date.now()-f>500){this.warn("Timeout in the loop, please check the resolve tree data:",d);break}try{for(var p=(i=void 0,n(d)),h=p.next();!h.done;h=p.next()){var v=h.value;this.mirror.getNode(v.value.parentId)?z(v,(function(e){u(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",v)}}catch(e){i={error:e}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}}Object.keys(l).length&&Object.assign(this.legacy_missingNodeRetryMap,l),e.texts.forEach((function(t){var r=s.mirror.getNode(t.id);if(!r)return s.warnNodeNotFound(e,t.id);s.fragmentParentMap.has(r)&&(r=s.fragmentParentMap.get(r)),r.textContent=t.value})),e.attributes.forEach((function(t){var r=s.mirror.getNode(t.id);if(!r)return s.warnNodeNotFound(e,t.id);for(var n in s.fragmentParentMap.has(r)&&(r=s.fragmentParentMap.get(r)),t.attributes)if("string"==typeof n){var o=t.attributes[n];try{null!==o?r.setAttribute(n,o):r.removeAttribute(n)}catch(e){s.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",e)}}}))},e.prototype.applyScroll=function(e){var t=this.mirror.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=this.mirror.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,r,n){var o=n.previousId,i=n.nextId,a=o&&e[o],s=i&&e[i];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,r),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}if(s){var f=s;c=f.node,u=f.mutation;t.insertBefore(c,r.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}},e.prototype.moveAndHover=function(e,t,r,n){var o=this.mirror.getNode(n);if(!o)return this.debugNodeNotFound(e,n);var i=function e(t,r){var n,o,i=null===(o=null===(n=t.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===o?void 0:o.frameElement;if(!i||i===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};var a=i.getBoundingClientRect(),s=e(i,r),l=a.height/i.clientHeight;return{x:a.x*s.relativeScale+s.x,y:a.y*s.relativeScale+s.y,relativeScale:l,absoluteScale:s.absoluteScale*l}}(o,this.iframe),a=t*i.absoluteScale+i.x,s=r*i.absoluteScale+i.y;this.mouse.style.left=a+"px",this.mouse.style.top=s+"px",this.drawMouseTail({x:a,y:s}),this.hoverElements(o)},e.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var r=!0===this.config.mouseTail?H:Object.assign({},H,this.config.mouseTail),n=r.lineCap,o=r.lineWidth,i=r.strokeStyle,a=r.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=o,e.lineCap=n,e.strokeStyle=i,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/this.speedService.state.context.timer.speed)}},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 r=e;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement},e.prototype.isUserInteraction=function(e){return e.type===g.IncrementalSnapshot&&(e.data.source>w.Mutation&&e.data.source<=w.Input)},e.prototype.backToNormal=function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(x.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},e.prototype.restoreRealParent=function(e,r){this.mirror.map[r.__sn.id]=r,r.__sn.type===t.Element&&"textarea"===r.__sn.tagName&&e.textContent&&(r.value=e.textContent),r.appendChild(e),this.restoreState(r)},e.prototype.storeState=function(e){var t,r;if(e&&e.nodeType===e.ELEMENT_NODE){var o=e;(o.scrollLeft||o.scrollTop)&&this.elementStateMap.set(e,{scroll:[o.scrollLeft,o.scrollTop]});var i=o.children;try{for(var a=n(Array.from(i)),s=a.next();!s.done;s=a.next()){var l=s.value;this.storeState(l)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}}},e.prototype.restoreState=function(e){var t,r;if(e.nodeType===e.ELEMENT_NODE){var o=e;if(this.elementStateMap.has(e)){var i=this.elementStateMap.get(e);i.scroll&&(o.scrollLeft=i.scroll[0],o.scrollTop=i.scroll[1]),this.elementStateMap.delete(e)}var a=o.children;try{for(var s=n(Array.from(a)),l=s.next();!l.done;l=s.next()){var c=l.value;this.restoreState(c)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}}},e.prototype.warnNodeNotFound=function(e,t){this.warn("Node with id '"+t+"' not found in",e)},e.prototype.warnCanvasMutationFailed=function(e,t,r){this.warn("Has error on update canvas '"+t+"'",e,r)},e.prototype.debugNodeNotFound=function(e,t){this.debug("[replayer]","Node with id '"+t+"' not found in",e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showWarning&&console.warn.apply(console,i(["[replayer]"],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showDebug&&console.log.apply(console,i(["[replayer]"],e))},e}(),q=Uint8Array,J=Uint16Array,$=Uint32Array,K=new q([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Z=new q([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ee=new q([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),te=function(e,t){for(var r=new J(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];var o=new $(r[30]);for(n=1;n<30;++n)for(var i=r[n];i<r[n+1];++i)o[i]=i-r[n]<<5|n;return[r,o]},re=te(K,2),ne=re[0],oe=re[1];ne[28]=258,oe[258]=28;for(var ie=te(Z,0)[0],ae=new J(32768),se=0;se<32768;++se){var le=(43690&se)>>>1|(21845&se)<<1;le=(61680&(le=(52428&le)>>>2|(13107&le)<<2))>>>4|(3855&le)<<4,ae[se]=((65280&le)>>>8|(255&le)<<8)>>>1}var ce=function(e,t,r){for(var n=e.length,o=0,i=new J(t);o<n;++o)++i[e[o]-1];var a,s=new J(t);for(o=0;o<t;++o)s[o]=s[o-1]+i[o-1]<<1;if(r){a=new J(1<<t);var l=15-t;for(o=0;o<n;++o)if(e[o])for(var c=o<<4|e[o],u=t-e[o],f=s[e[o]-1]++<<u,d=f|(1<<u)-1;f<=d;++f)a[ae[f]>>>l]=c}else for(a=new J(n),o=0;o<n;++o)a[o]=ae[s[e[o]-1]++]>>>15-e[o];return a},ue=new q(288);for(se=0;se<144;++se)ue[se]=8;for(se=144;se<256;++se)ue[se]=9;for(se=256;se<280;++se)ue[se]=7;for(se=280;se<288;++se)ue[se]=8;var fe=new q(32);for(se=0;se<32;++se)fe[se]=5;ce(ue,9,0);var de=ce(ue,9,1),pe=(ce(fe,5,0),ce(fe,5,1)),he=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},me=function(e,t,r){var n=t/8>>0;return(e[n]|e[n+1]<<8)>>>(7&t)&r},ve=function(e,t){var r=t/8>>0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>>(7&t)},ye=function(e,t,r){(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length);var n=new(e instanceof J?J:e instanceof $?$:q)(r-t);return n.set(e.subarray(t,r)),n},ge=new $(256);for(se=0;se<256;++se){for(var we=se,be=9;--be;)we=(1&we&&3988292384)^we>>>1;ge[se]=we}function Se(e,t){return function(e,t,r){var n=e.length,o=!t||r,i=!r||r.i;r||(r={}),t||(t=new q(3*n));var a=function(e){var r=t.length;if(e>r){var n=new q(Math.max(2*r,e));n.set(t),t=n}},s=r.f||0,l=r.p||0,c=r.b||0,u=r.l,f=r.d,d=r.m,p=r.n;if(s&&!u)return t;var h,m=8*n;do{if(!u){r.f=s=me(e,l,1);var v=me(e,l+1,3);if(l+=3,!v){var y=e[(I=((h=l)/8>>0)+(7&h&&1)+4)-4]|e[I-3]<<8,g=I+y;if(g>n){if(i)throw"unexpected EOF";break}o&&a(c+y),t.set(e.subarray(I,g),c),r.b=c+=y,r.p=l=8*g;continue}if(1==v)u=de,f=pe,d=9,p=5;else{if(2!=v)throw"invalid block type";var w=me(e,l,31)+257,b=me(e,l+10,15)+4,S=w+me(e,l+5,31)+1;l+=14;for(var x=new q(S),E=new q(19),T=0;T<b;++T)E[ee[T]]=me(e,l+3*T,7);l+=3*b;var M=he(E),N=(1<<M)-1;if(!i&&l+S*(M+7)>m)break;var C=ce(E,M,1);for(T=0;T<S;){var I,D=C[me(e,l,N)];if(l+=15&D,(I=D>>>4)<16)x[T++]=I;else{var k=0,A=0;for(16==I?(A=3+me(e,l,3),l+=2,k=x[T-1]):17==I?(A=3+me(e,l,7),l+=3):18==I&&(A=11+me(e,l,127),l+=7);A--;)x[T++]=k}}var _=x.subarray(0,w),F=x.subarray(w);d=he(_),p=he(F),u=ce(_,d,1),f=ce(F,p,1)}if(l>m)throw"unexpected EOF"}o&&a(c+131072);for(var O=(1<<d)-1,P=(1<<p)-1,R=d+p+18;i||l+R<m;){var L=(k=u[ve(e,l)&O])>>>4;if((l+=15&k)>m)throw"unexpected EOF";if(!k)throw"invalid length/literal";if(L<256)t[c++]=L;else{if(256==L){u=null;break}var B=L-254;if(L>264){var j=K[T=L-257];B=me(e,l,(1<<j)-1)+ne[T],l+=j}var U=f[ve(e,l)&P],V=U>>>4;if(!U)throw"invalid distance";l+=15&U;F=ie[V];if(V>3){j=Z[V];F+=ve(e,l)&(1<<j)-1,l+=j}if(l>m)throw"unexpected EOF";o&&a(c+131072);for(var z=c+B;c<z;c+=4)t[c]=t[c-F],t[c+1]=t[c+1-F],t[c+2]=t[c+2-F],t[c+3]=t[c+3-F];c=z}}r.l=u,r.p=l,r.b=c,u&&(s=1,r.m=d,r.d=f,r.n=p)}while(!s);return c==t.length?t:ye(t,0,c)}((function(e){if(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"}(e),e.subarray(2,-4)),t)}return e.Replayer=G,e.unpack=function(e){if("string"!=typeof e)return e;try{if((t=JSON.parse(e)).timestamp)return t}catch(e){}try{var t;if("v1"===(t=JSON.parse(function(e,t){var r="";if(!t&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var n=0;n<e.length;){var o=e[n++];o<128||t?r+=String.fromCharCode(o):o<224?r+=String.fromCharCode((31&o)<<6|63&e[n++]):o<240?r+=String.fromCharCode((15&o)<<12|(63&e[n++])<<6|63&e[n++]):(o=((15&o)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,r+=String.fromCharCode(55296|o>>10,56320|1023&o))}return r}(Se(function(e,t){var r=e.length;if(!t&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var n=new q(e.length+(e.length>>>1)),o=0,i=function(e){n[o++]=e},a=0;a<r;++a){if(o+5>n.length){var s=new q(o+8+(r-a<<1));s.set(n),n=s}var l=e.charCodeAt(a);l<128||t?i(l):l<2048?(i(192|l>>>6),i(128|63&l)):l>55295&&l<57344?(i(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++a))>>>18),i(128|l>>>12&63),i(128|l>>>6&63),i(128|63&l)):(i(224|l>>>12),i(128|l>>>6&63),i(128|63&l))}return ye(n,0,o)}(e,!0))))).v)return t;throw new Error("These events were packed with packer "+t.v+" which is incompatible with current packer v1.")}catch(e){throw console.error(e),new Error("Unknown data format.")}},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
***************************************************************************** */!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(M||(M={}));var C={type:"xstate.init"};function k(e){return void 0===e?[]:[].concat(e)}function D(e){return{type:"xstate.assign",assignment:e}}function A(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 _(e){return function(t){return e===t}}function R(e){return"string"==typeof e?{type:e}:e}function F(e,t){return{value:e,context:t,actions:[],changed:!1,matches:_(e)}}function O(e,t){void 0===t&&(t={});var r={config:e,_options:t,initialState:{value:e.initial,actions:k(e.states[e.initial].entry).map((function(e){return A(e,t.actions)})),context:e.context,matches:_(e.initial)},transition:function(t,n){var i,o,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,l=a.context,c=R(n),u=e.states[s];if(u.on){var f=k(u.on[c.type]),d=function(t){if(void 0===t)return{value:F(s,l)};var n="string"==typeof t?{target:t}:t,i=n.target,o=void 0===i?s:i,a=n.actions,f=void 0===a?[]:a,d=n.cond,p=l;if((void 0===d?function(){return!0}:d)(l,c)){var h=e.states[o],m=!1,v=[].concat(u.exit,f,h.entry).filter((function(e){return e})).map((function(e){return A(e,r._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,c):Object.keys(e.assignment).forEach((function(r){t[r]="function"==typeof e.assignment[r]?e.assignment[r](p,c):e.assignment[r]})),p=t,!1}return!0}));return{value:{value:o,context:p,actions:v,changed:o!==s||v.length>0||m,matches:_(o)}}}};try{for(var p=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}(f),h=p.next();!h.done;h=p.next()){var m=d(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 F(s,l)}};return r}var P=function(e,t){return e.actions.forEach((function(r){var n=r.exec;return n&&n(e.context,t)}))};function L(e){var t=e.initialState,r=M.NotStarted,n=new Set,i={_machine:e,send:function(i){r===M.Running&&(t=e.transition(t,i),P(t,R(i)),n.forEach((function(e){return e(t)})))},subscribe:function(e){return n.add(e),e(t),{unsubscribe:function(){return n.delete(e)}}},start:function(n){if(n){var o="object"==typeof n?n:{context:e.config.context,value:n};t={value:o.value,actions:[],context:o.context,matches:_(o.value)}}return r=M.Running,P(t,C),i},stop:function(){return r=M.Stopped,n.clear(),i},get state(){return t},get status(){return r}};return i}var j="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",B={map:{},getId:function(){return console.error(j),-1},getNode:function(){return console.error(j),null},removeNodeFromMap:function(){console.error(j)},has:function(){return console.error(j),!1},reset:function(){console.error(j)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(B=new Proxy(B,{get:function(e,t,r){return"map"===t&&console.error(j),Reflect.get(e,t,r)}}));var U=function(){function e(){this.reset()}return e.prototype.add=function(e){var t=this.indexes.get(e.parentId),r={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(r.parent=t,t.children[r.id]=r):this.tree[r.id]=r,this.indexes.set(r.id,r)},e.prototype.remove=function(e,t){var r=this,n=this.indexes.get(e.parentId),i=this.indexes.get(e.id),o=function(e){r.removeIdSet.add(e);var n=t.getNode(e);null==n||n.childNodes.forEach((function(e){"__sn"in e&&o(e.__sn.id)}))},a=function(t){r.removeIdSet.add(t.id),Object.values(t.children).forEach((function(e){return a(e)}));var n=r.indexes.get(t.id);if(n){var i=n.parent;i&&(delete n.parent,delete i.children[n.id],r.indexes.delete(e.id))}};i?n?(delete i.parent,delete n.children[i.id],this.indexes.delete(e.id),a(i)):(delete this.tree[i.id],this.indexes.delete(i.id),a(i)):(this.removeNodeMutations.push(e),o(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,r,i,o=this,a=this.tree,s=this.removeNodeMutations,l=this.textMutations,c=this.attributeMutations,u={source:w.Mutation,removes:s,texts:l,attributes:c,adds:[]},f=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 f(e,!0)})):(u.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return f(e,!1)})))};Object.values(a).forEach((function(e){return f(e,!1)}));try{for(var d=n(this.scrollMap.keys()),p=d.next();!p.done;p=d.next()){var h=p.value;this.removeIdSet.has(h)&&this.scrollMap.delete(h)}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var m=n(this.inputMap.keys()),v=m.next();!v.done;v=m.next()){h=v.value;this.removeIdSet.has(h)&&this.inputMap.delete(h)}}catch(e){r={error:e}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}var y=new Map(this.scrollMap),g=new Map(this.inputMap);return this.reset(),{mutationData:u,scrollMap:y,inputMap:g}},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 V(e){var t,r,i={},o=function(e,t){var r={value:e,parent:t,children:[]};return i[e.node.id]=r,r},a=[];try{for(var s=n(e),l=s.next();!l.done;l=s.next()){var c=l.value,u=c.nextId,f=c.parentId;if(u&&u in i){var d=i[u];if(d.parent){var p=d.parent.children.indexOf(d);d.parent.children.splice(p,0,o(c,d.parent))}else{p=a.indexOf(d);a.splice(p,0,o(c,null))}}else if(f in i){var h=i[f];h.children.push(o(c,h))}else a.push(o(c,null))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return a}function W(e,t){t(e.value);for(var r=e.children.length-1;r>=0;r--)W(e.children[r],t)}function z(e){return"__sn"in e&&(e.__sn.type===t.Element&&"iframe"===e.__sn.tagName)}function Y(e){var t;return Boolean(null===(t=e)||void 0===t?void 0:t.shadowRoot)}function X(e,t){var i=t.getCastFn,o=t.emitter;return L(O({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:D({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:D((function(e,t){var n=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(n=t.payload.timeOffset),r(r({},e),{timeOffset:n,baselineTime:e.events[0].timestamp+n})})),play:function(e){var t,r,a,s,l,c=e.timer,u=e.events,f=e.baselineTime,d=e.lastPlayedEvent;c.clear();try{for(var p=n(u),h=p.next();!h.done;h=p.next()){I(h.value,f)}}catch(e){t={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(t)throw t.error}}var m=function(e,t){for(var r=e.length-1;r>=0;r--){var n=e[r];if(n.type===g.Meta&&n.timestamp<=t)return e.slice(r)}return e}(u,f),v=null==d?void 0:d.timestamp;(null==d?void 0:d.type)===g.IncrementalSnapshot&&d.data.source===w.MouseMove&&(v=d.timestamp+(null===(l=d.data.positions[0])||void 0===l?void 0:l.timeOffset)),f<(v||0)&&o.emit(x.PlayBack);var y=new Array,b=function(e){if(v&&v<f&&(e.timestamp<=v||e===d))return"continue";var t=e.timestamp<f;if(t&&!function(e){switch(e.type){case g.DomContentLoaded:case g.Load:case g.Custom:return!1;case g.FullSnapshot:case g.Meta:case g.Plugin:return!0}switch(e.data.source){case w.MouseMove:case w.MouseInteraction:case w.TouchMove:case w.MediaInteraction:return!1;case w.ViewportResize:case w.StyleSheetRule:case w.Scroll:case w.Input:return!0}return!0}(e))return"continue";var r=i(e,t);t?r():y.push({doAction:function(){r(),o.emit(x.EventCast,e)},delay:e.delay})};try{for(var S=n(m),E=S.next();!E.done;E=S.next()){b(E.value)}}catch(e){a={error:e}}finally{try{E&&!E.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}o.emit(x.Flush),c.addActions(y),c.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:D((function(e){return r(r({},e),{lastPlayedEvent:null})})),startLive:D({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:D((function(e,t){var n=e.baselineTime,a=e.timer,s=e.events;if("ADD_EVENT"===t.type){var l=t.payload.event;I(l,n);var c=s.length-1;if(!s[c]||s[c].timestamp<=l.timestamp)s.push(l);else{for(var u=-1,f=0;f<=c;){var d=Math.floor((f+c)/2);s[d].timestamp<=l.timestamp?f=d+1:c=d-1}-1===u&&(u=f),s.splice(u,0,l)}var p=l.timestamp<n,h=i(l,p);p?h():a.isActive()&&a.addAction({doAction:function(){h(),o.emit(x.EventCast,l)},delay:l.delay})}return r(r({},e),{events:s})}))}}))}var Q;function H(e,t){e.forEach((function(e){var r,n;if(e.type===Q.Insert)try{null===(r=t.sheet)||void 0===r||r.insertRule(e.cssText,e.index)}catch(e){}else if(e.type===Q.Remove)try{null===(n=t.sheet)||void 0===n||n.deleteRule(e.index)}catch(e){}else e.type===Q.Snapshot&&function(e,t){var r;try{var n=Array.from((null===(r=t.sheet)||void 0===r?void 0:r.cssRules)||[]).map((function(e){return e.cssText})),o=Object.entries(n).reverse(),a=n.length;o.forEach((function(r){var n,o=i(r,2),s=o[0],l=o[1],c=e.indexOf(l);if(-1===c||c>a)try{null===(n=t.sheet)||void 0===n||n.deleteRule(Number(s))}catch(e){}a=c})),e.forEach((function(e,r){var n,i,o;try{(null===(i=null===(n=t.sheet)||void 0===n?void 0:n.cssRules[r])||void 0===i?void 0:i.cssText)!==e&&(null===(o=t.sheet)||void 0===o||o.insertRule(e,r))}catch(e){}}))}catch(e){}}(e.cssTexts,t)}))}!function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot"}(Q||(Q={}));var G=y||E,q={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"},J=function(){function e(e,t){var r=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=G(),this.legacy_missingNodeRetryMap={},this.imageMap=new Map,this.mirror={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,r=e.__sn&&e.__sn.id;delete this.map[r],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}},this.firstFullSnapshot=null,this.newDocumentQueue=[],!(null==t?void 0:t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");var i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:q};this.config=Object.assign({},i,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on(x.Resize,this.handleResize),this.setupDom(),this.treeIndex=new U,this.fragmentParentMap=new Map,this.elementStateMap=new Map,this.virtualStyleRulesMap=new Map,this.emitter.on(x.Flush,(function(){var e,t,i,o,a,s,l=r.treeIndex.flush(),c=l.scrollMap,u=l.inputMap;r.fragmentParentMap.forEach((function(e,t){return r.restoreRealParent(t,e)}));try{for(var f=n(r.virtualStyleRulesMap.keys()),d=f.next();!d.done;d=f.next()){var p=d.value;r.restoreNodeSheet(p)}}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}r.fragmentParentMap.clear(),r.elementStateMap.clear(),r.virtualStyleRulesMap.clear();try{for(var h=n(c.values()),m=h.next();!m.done;m=h.next()){var v=m.value;r.applyScroll(v)}}catch(e){i={error:e}}finally{try{m&&!m.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}try{for(var y=n(u.values()),g=y.next();!g.done;g=y.next()){v=g.value;r.applyInput(v)}}catch(e){a={error:e}}finally{try{g&&!g.done&&(s=y.return)&&s.call(y)}finally{if(a)throw a.error}}})),this.emitter.on(x.PlayBack,(function(){r.firstFullSnapshot=null,r.mirror.reset()}));var o=new N([],(null==t?void 0:t.speed)||i.speed);this.service=X({events:e.map((function(e){return t&&t.unpackFn?t.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:o,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){r.emitter.emit(x.StateChange,{player:e})})),this.speedService=L(O({id:"speed",context:{normalSpeed:-1,timer:o},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:D({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(e){r.emitter.emit(x.StateChange,{speed:e})}));var a=this.service.state.context.events.find((function(e){return e.type===g.Meta})),s=this.service.state.context.events.find((function(e){return e.type===g.FullSnapshot}));if(a){var l=a.data,c=l.width,u=l.height;setTimeout((function(){r.emitter.emit(x.Resize,{width:c,height:u})}),0)}s&&setTimeout((function(){r.firstFullSnapshot||(r.firstFullSnapshot=s,r.rebuildFullSnapshot(s),r.iframe.contentWindow.scrollTo(s.data.initialOffset))}),1)}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){return this.emitter.on(e,t),this},e.prototype.off=function(e,t){return this.emitter.off(e,t),this},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(r){t.config[r]=e[r]})),this.config.skipInactive||this.backToNormal(),void 0!==e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),void 0!==e.mouseTail&&(!1===e.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))},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.getMirror=function(){return this.mirror},e.prototype.play=function(e){var t;void 0===e&&(e=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}}),null===(t=this.iframe.contentDocument)||void 0===t||t.getElementsByTagName("html")[0].classList.remove("rrweb-paused"),this.emitter.emit(x.Start)},e.prototype.pause=function(e){var t;void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),null===(t=this.iframe.contentDocument)||void 0===t||t.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(x.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(x.Resume)},e.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},e.prototype.addEvent=function(e){var t=this,r=this.config.unpackFn?this.config.unpackFn(e):e;Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:r}})}))},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="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var e,t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(T(this.iframe.contentWindow,this.iframe.contentDocument),void 0===(e=this.iframe.contentWindow)&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1}))},e.prototype.handleResize=function(e){var t,r;this.iframe.style.display="inherit";try{for(var i=n([this.mouseTail,this.iframe]),o=i.next();!o.done;o=i.next()){var a=o.value;a&&(a.setAttribute("width",String(e.width)),a.setAttribute("height",String(e.height)))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}},e.prototype.getCastFn=function(e,t){var r,i=this;switch(void 0===t&&(t=!1),e.type){case g.DomContentLoaded:case g.Load:break;case g.Custom:r=function(){i.emitter.emit(x.CustomEvent,e)};break;case g.Meta:r=function(){return i.emitter.emit(x.Resize,{width:e.data.width,height:e.data.height})};break;case g.FullSnapshot:r=function(){if(i.firstFullSnapshot){if(i.firstFullSnapshot===e)return void(i.firstFullSnapshot=!0)}else i.firstFullSnapshot=!0;i.rebuildFullSnapshot(e,t),i.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case g.IncrementalSnapshot:r=function(){var r,o;if(i.applyIncremental(e,t),!t&&(e===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.backToNormal()),i.config.skipInactive&&!i.nextUserInteractionEvent)){try{for(var a=n(i.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(!(l.timestamp<=e.timestamp)&&i.isUserInteraction(l)){l.delay-e.delay>1e4*i.speedService.state.context.timer.speed&&(i.nextUserInteractionEvent=l);break}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}if(i.nextUserInteractionEvent){var c=i.nextUserInteractionEvent.delay-e.delay,u={speed:Math.min(Math.round(c/5e3),i.config.maxSpeed)};i.speedService.send({type:"FAST_FORWARD",payload:u}),i.emitter.emit(x.SkipStart,u)}}}}return function(){var o,a;r&&r();try{for(var s=n(i.config.plugins||[]),l=s.next();!l.done;l=s.next()){l.value.handler(e,t,{replayer:i})}}catch(e){o={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}i.service.send({type:"CAST_EVENT",payload:{event:e}});var c=i.service.state.context.events.length-1;if(e===i.service.state.context.events[c]){var u=function(){c<i.service.state.context.events.length-1||(i.backToNormal(),i.service.send("END"),i.emitter.emit(x.Finish))};e.type===g.IncrementalSnapshot&&e.data.source===w.MouseMove&&e.data.positions.length?setTimeout((function(){u()}),Math.max(0,50-e.data.positions[0].timeOffset)):u()}}},e.prototype.rebuildFullSnapshot=function(e,t){var r,i,o=this;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={};var a=[];this.mirror.map=v(e.data.node,{doc:this.iframe.contentDocument,afterAppend:function(e){o.collectIframeAndAttachDocument(a,e)}})[1];var s=function(e,t){if(l.attachDocumentToIframe(e,t),l.newDocumentQueue=l.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var r=t.contentDocument,n=r.documentElement,i=r.head;l.insertStyleRules(n,i)}},l=this;try{for(var c=n(a),u=c.next();!u.done;u=c.next()){var f=u.value;s(f.mutationInQueue,f.builtNode)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}var d=this.iframe.contentDocument,p=d.documentElement,h=d.head;this.insertStyleRules(p,h),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(x.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()},e.prototype.insertStyleRules=function(e,t){var r=document.createElement("style");e.insertBefore(r,t);var n,i=(n=this.config.blockClass,["."+n+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules);this.config.pauseAnimation&&i.push("html.rrweb-paused * { animation-play-state: paused !important; }");for(var o=0;o<i.length;o++)r.sheet.insertRule(i[o],o)},e.prototype.attachDocumentToIframe=function(e,t){var r,i,o=this,a=[];if(!t.contentDocument)for(var s=t.parentNode;s;){if(this.fragmentParentMap.has(s)){var l=s,c=this.fragmentParentMap.get(l);this.restoreRealParent(l,c);break}s=s.parentNode}m(e.node,{doc:t.contentDocument,map:this.mirror.map,hackCss:!0,skipChild:!1,afterAppend:function(e){o.collectIframeAndAttachDocument(a,e)}});var u=function(e,t){if(f.attachDocumentToIframe(e,t),f.newDocumentQueue=f.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var r=t.contentDocument,n=r.documentElement,i=r.head;f.insertStyleRules(n,i)}},f=this;try{for(var d=n(a),p=d.next();!p.done;p=d.next()){var h=p.value;u(h.mutationInQueue,h.builtNode)}}catch(e){r={error:e}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}},e.prototype.collectIframeAndAttachDocument=function(e,t){if(z(t)){var r=this.newDocumentQueue.find((function(e){return e.parentId===t.__sn.id}));r&&e.push({mutationInQueue:r,builtNode:t})}},e.prototype.waitForStylesheetLoad=function(){var e,t=this,r=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(r){var n,i=new Set,o=this.service.state,a=function(){o=t.service.state};this.emitter.on(x.Start,a),this.emitter.on(x.Pause,a);var s=function(){t.emitter.off(x.Start,a),t.emitter.off(x.Pause,a)};r.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(i.add(e),e.addEventListener("load",(function(){i.delete(e),0===i.size&&-1!==n&&(o.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(x.LoadStylesheetEnd),n&&window.clearTimeout(n),s())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(x.LoadStylesheetStart),n=window.setTimeout((function(){o.matches("playing")&&t.play(t.getCurrentTime()),n=-1,s()}),this.config.loadTimeout))}},e.prototype.preloadAllImages=function(){var e,t,r=this,i=(this.service.state,function(){r.service.state});this.emitter.on(x.Start,i),this.emitter.on(x.Pause,i);var o=0;try{for(var a=n(this.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(l.type===g.IncrementalSnapshot&&l.data.source===w.CanvasMutation&&"drawImage"===l.data.property&&"string"==typeof l.data.args[0]&&!this.imageMap.has(l)){o++;var c=document.createElement("canvas"),u=c.getContext("2d"),f=null==u?void 0:u.createImageData(c.width,c.height);null==f||f.data;JSON.parse(l.data.args[0]),null==u||u.putImageData(f,0,0)}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}0!==o&&this.service.send({type:"PAUSE"})},e.prototype.applyIncremental=function(e,t){var r,n,i=this,o=e.data;switch(o.source){case w.Mutation:t&&(o.adds.forEach((function(e){return i.treeIndex.add(e)})),o.texts.forEach((function(e){return i.treeIndex.text(e)})),o.attributes.forEach((function(e){return i.treeIndex.attribute(e)})),o.removes.forEach((function(e){return i.treeIndex.remove(e,i.mirror)})));try{this.applyMutation(o,t)}catch(e){this.warn("Exception in mutation "+(e.message||e),o)}break;case w.Drag:case w.TouchMove:case w.MouseMove:if(t){var a=o.positions[o.positions.length-1];this.moveAndHover(o,a.x,a.y,a.id)}else o.positions.forEach((function(t){var r={doAction:function(){i.moveAndHover(o,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-i.service.state.context.baselineTime};i.timer.addAction(r)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(r=o.positions[0])||void 0===r?void 0:r.timeOffset)});break;case w.MouseInteraction:if(-1===o.id)break;var s=new Event(b[o.type].toLowerCase());if(!(m=this.mirror.getNode(o.id)))return this.debugNodeNotFound(o,o.id);this.emitter.emit(x.MouseInteraction,{type:o.type,target:m});var l=this.config.triggerFocus;switch(o.type){case b.Blur:"blur"in m&&m.blur();break;case b.Focus:l&&m.focus&&m.focus({preventScroll:!0});break;case b.Click:case b.TouchStart:case b.TouchEnd:t||(this.moveAndHover(o,o.x,o.y,o.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:m.dispatchEvent(s)}break;case w.Scroll:if(-1===o.id)break;if(t){this.treeIndex.scroll(o);break}this.applyScroll(o);break;case w.ViewportResize:this.emitter.emit(x.Resize,{width:o.width,height:o.height});break;case w.Input:if(-1===o.id)break;if(t){this.treeIndex.input(o);break}this.applyInput(o);break;case w.MediaInteraction:if(!(m=this.mirror.getNode(o.id)))return this.debugNodeNotFound(o,o.id);var c=m;try{o.currentTime&&(c.currentTime=o.currentTime),o.type===S.Pause&&c.pause(),o.type===S.Play&&c.play()}catch(e){this.config.showWarning&&console.warn("Failed to replay media interactions: "+(e.message||e))}break;case w.StyleSheetRule:if(!(m=this.mirror.getNode(o.id)))return this.debugNodeNotFound(o,o.id);var u,f=m,d=m.parentNode,p=this.fragmentParentMap.has(d),h=p?null:f.sheet;h||(this.virtualStyleRulesMap.has(m)?u=this.virtualStyleRulesMap.get(m):(u=[],this.virtualStyleRulesMap.set(m,u))),o.adds&&o.adds.forEach((function(e){var t=e.rule,r=e.index;if(h)try{var n=void 0===r?void 0:Math.min(r,h.cssRules.length);try{h.insertRule(t,n)}catch(e){}}catch(e){}else null==u||u.push({cssText:t,index:r,type:Q.Insert})})),o.removes&&o.removes.forEach((function(e){var t=e.index;if(p)null==u||u.push({index:t,type:Q.Remove});else try{null==h||h.deleteRule(t)}catch(e){}}));break;case w.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var m;if(!(m=this.mirror.getNode(o.id)))return this.debugNodeNotFound(o,o.id);try{var v=m.getContext("2d");if(o.setter)return void(v[o.property]=o.args[0]);var y=v[o.property];if("drawImage"===o.property&&"string"==typeof o.args[0]){var g=this.imageMap.get(e);o.args[0]=g,y.apply(v,o.args)}else y.apply(v,o.args)}catch(e){this.warnCanvasMutationFailed(o,o.id,e)}break;case w.Font:try{var E=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);null===(n=this.iframe.contentDocument)||void 0===n||n.fonts.add(E)}catch(e){this.config.showWarning&&console.warn(e)}}},e.prototype.applyMutation=function(e,i){var o,a,s=this;e.removes.forEach((function(t){var r=s.mirror.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.parentId})))return;return s.warnNodeNotFound(e,t.id)}var n=s.mirror.getNode(t.parentId);if(!n)return s.warnNodeNotFound(e,t.parentId);if(t.isShadow&&Y(n)&&(n=n.shadowRoot),s.mirror.removeNodeFromMap(r),n){var i=null,o="__sn"in n?s.fragmentParentMap.get(n):void 0;o&&o.contains(r)?n=o:s.fragmentParentMap.has(r)&&(i=s.fragmentParentMap.get(r),s.fragmentParentMap.delete(r),r=i);try{n.removeChild(r)}catch(t){if(!(t instanceof DOMException))throw t;s.warn("parent could not remove child in mutation",n,o,r,i,e)}}}));var l=r({},this.legacy_missingNodeRetryMap),c=[],u=function(e){var r,n;if(!s.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var o=s.mirror.getNode(e.parentId);if(!o)return e.node.type===t.Document?s.newDocumentQueue.push(e):c.push(e);var a=null;s.iframe.contentDocument.contains?a=s.iframe.contentDocument.contains(o):s.iframe.contentDocument.body.contains&&(a=s.iframe.contentDocument.body.contains(o));var u=(null===(n=(r=o).getElementsByTagName)||void 0===n?void 0:n.call(r,"iframe").length)>0;if(i&&a&&!z(o)&&!u){var f=document.createDocumentFragment();for(s.mirror.map[e.parentId]=f,s.fragmentParentMap.set(f,o),s.storeState(o);o.firstChild;)f.appendChild(o.firstChild);o=f}e.node.isShadow&&Y(o)&&(o=o.shadowRoot);var d=null,p=null;if(e.previousId&&(d=s.mirror.getNode(e.previousId)),e.nextId&&(p=s.mirror.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=s.mirror.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return c.push(e);if(!e.node.rootId||s.mirror.getNode(e.node.rootId)){var h=e.node.rootId?s.mirror.getNode(e.node.rootId):s.iframe.contentDocument;if(z(o))s.attachDocumentToIframe(e,o);else{var v=m(e.node,{doc:h,map:s.mirror.map,skipChild:!0,hackCss:!0});if(-1!==e.previousId&&-1!==e.nextId){if(d&&d.nextSibling&&d.nextSibling.parentNode)o.insertBefore(v,d.nextSibling);else if(p&&p.parentNode)o.contains(p)?o.insertBefore(v,p):o.insertBefore(v,null);else{if(o===h)for(;h.firstChild;)h.removeChild(h.firstChild);o.appendChild(v)}if(z(v)){var y=s.newDocumentQueue.find((function(e){return e.parentId===v.__sn.id}));if(y&&(s.attachDocumentToIframe(y,v),s.newDocumentQueue=s.newDocumentQueue.filter((function(e){return e!==y}))),v.contentDocument){var g=v.contentDocument,w=g.documentElement,b=g.head;s.insertStyleRules(w,b)}}(e.previousId||e.nextId)&&s.legacy_resolveMissingNode(l,o,v,e)}else l[e.node.id]={node:v,mutation:e}}}};e.adds.forEach((function(e){u(e)}));for(var f=Date.now();c.length;){var d=V(c);if(c.length=0,Date.now()-f>500){this.warn("Timeout in the loop, please check the resolve tree data:",d);break}try{for(var p=(o=void 0,n(d)),h=p.next();!h.done;h=p.next()){var v=h.value;this.mirror.getNode(v.value.parentId)?W(v,(function(e){u(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",v)}}catch(e){o={error:e}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(o)throw o.error}}}Object.keys(l).length&&Object.assign(this.legacy_missingNodeRetryMap,l),e.texts.forEach((function(t){var r=s.mirror.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.id})))return;return s.warnNodeNotFound(e,t.id)}s.fragmentParentMap.has(r)&&(r=s.fragmentParentMap.get(r)),r.textContent=t.value})),e.attributes.forEach((function(t){var r=s.mirror.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.id})))return;return s.warnNodeNotFound(e,t.id)}for(var n in s.fragmentParentMap.has(r)&&(r=s.fragmentParentMap.get(r)),t.attributes)if("string"==typeof n){var i=t.attributes[n];if(null===i)r.removeAttribute(n);else if("string"==typeof i)try{r.setAttribute(n,i)}catch(e){s.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",e)}else if("style"===n){var o=i,a=r;for(var l in o)if(!1===o[l])a.style.removeProperty(l);else if(o[l]instanceof Array){var c=o[l];a.style.setProperty(l,c[0],c[1])}else{var u=o[l];a.style.setProperty(l,u)}}}}))},e.prototype.applyScroll=function(e){var t=this.mirror.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=this.mirror.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,r,n){var i=n.previousId,o=n.nextId,a=i&&e[i],s=o&&e[o];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,r),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}if(s){var f=s;c=f.node,u=f.mutation;t.insertBefore(c,r.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}},e.prototype.moveAndHover=function(e,t,r,n){var i=this.mirror.getNode(n);if(!i)return this.debugNodeNotFound(e,n);var o=function e(t,r){var n,i,o=null===(i=null===(n=t.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===i?void 0:i.frameElement;if(!o||o===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};var a=o.getBoundingClientRect(),s=e(o,r),l=a.height/o.clientHeight;return{x:a.x*s.relativeScale+s.x,y:a.y*s.relativeScale+s.y,relativeScale:l,absoluteScale:s.absoluteScale*l}}(i,this.iframe),a=t*o.absoluteScale+o.x,s=r*o.absoluteScale+o.y;this.mouse.style.left=a+"px",this.mouse.style.top=s+"px",this.drawMouseTail({x:a,y:s}),this.hoverElements(i)},e.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var r=!0===this.config.mouseTail?q:Object.assign({},q,this.config.mouseTail),n=r.lineCap,i=r.lineWidth,o=r.strokeStyle,a=r.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=n,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/this.speedService.state.context.timer.speed)}},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 r=e;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement},e.prototype.isUserInteraction=function(e){return e.type===g.IncrementalSnapshot&&(e.data.source>w.Mutation&&e.data.source<=w.Input)},e.prototype.backToNormal=function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(x.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},e.prototype.restoreRealParent=function(e,r){this.mirror.map[r.__sn.id]=r,r.__sn.type===t.Element&&"textarea"===r.__sn.tagName&&e.textContent&&(r.value=e.textContent),r.appendChild(e),this.restoreState(r)},e.prototype.storeState=function(e){var t,r;if(e&&e.nodeType===e.ELEMENT_NODE){var i=e;(i.scrollLeft||i.scrollTop)&&this.elementStateMap.set(e,{scroll:[i.scrollLeft,i.scrollTop]}),"STYLE"===i.tagName&&function(e,t){var r;try{var n=Array.from((null===(r=e.sheet)||void 0===r?void 0:r.cssRules)||[]).map((function(e){return e.cssText}));t.set(e,[{type:Q.Snapshot,cssTexts:n}])}catch(e){}}(i,this.virtualStyleRulesMap);var o=i.children;try{for(var a=n(Array.from(o)),s=a.next();!s.done;s=a.next()){var l=s.value;this.storeState(l)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}}},e.prototype.restoreState=function(e){var t,r;if(e.nodeType===e.ELEMENT_NODE){var i=e;if(this.elementStateMap.has(e)){var o=this.elementStateMap.get(e);o.scroll&&(i.scrollLeft=o.scroll[0],i.scrollTop=o.scroll[1]),this.elementStateMap.delete(e)}var a=i.children;try{for(var s=n(Array.from(a)),l=s.next();!l.done;l=s.next()){var c=l.value;this.restoreState(c)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}}},e.prototype.restoreNodeSheet=function(e){var t=this.virtualStyleRulesMap.get(e);"STYLE"===e.nodeName&&(t&&H(t,e))},e.prototype.warnNodeNotFound=function(e,t){this.treeIndex.removeIdSet.has(t)?this.warn("Node with id '"+t+"' was previously removed. ",e):this.warn("Node with id '"+t+"' not found. ",e)},e.prototype.warnCanvasMutationFailed=function(e,t,r){this.warn("Has error on update canvas '"+t+"'",e,r)},e.prototype.debugNodeNotFound=function(e,t){this.treeIndex.removeIdSet.has(t)?this.debug("[replayer]","Node with id '"+t+"' was previously removed. ",e):this.debug("[replayer]","Node with id '"+t+"' not found. ",e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showWarning&&console.warn.apply(console,o(["[replayer]"],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showDebug&&console.log.apply(console,o(["[replayer]"],e))},e}(),$=Uint8Array,K=Uint16Array,Z=Uint32Array,ee=new $([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),te=new $([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),re=new $([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ne=function(e,t){for(var r=new K(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];var i=new Z(r[30]);for(n=1;n<30;++n)for(var o=r[n];o<r[n+1];++o)i[o]=o-r[n]<<5|n;return[r,i]},ie=ne(ee,2),oe=ie[0],ae=ie[1];oe[28]=258,ae[258]=28;for(var se=ne(te,0)[0],le=new K(32768),ce=0;ce<32768;++ce){var ue=(43690&ce)>>>1|(21845&ce)<<1;ue=(61680&(ue=(52428&ue)>>>2|(13107&ue)<<2))>>>4|(3855&ue)<<4,le[ce]=((65280&ue)>>>8|(255&ue)<<8)>>>1}var fe=function(e,t,r){for(var n=e.length,i=0,o=new K(t);i<n;++i)++o[e[i]-1];var a,s=new K(t);for(i=0;i<t;++i)s[i]=s[i-1]+o[i-1]<<1;if(r){a=new K(1<<t);var l=15-t;for(i=0;i<n;++i)if(e[i])for(var c=i<<4|e[i],u=t-e[i],f=s[e[i]-1]++<<u,d=f|(1<<u)-1;f<=d;++f)a[le[f]>>>l]=c}else for(a=new K(n),i=0;i<n;++i)a[i]=le[s[e[i]-1]++]>>>15-e[i];return a},de=new $(288);for(ce=0;ce<144;++ce)de[ce]=8;for(ce=144;ce<256;++ce)de[ce]=9;for(ce=256;ce<280;++ce)de[ce]=7;for(ce=280;ce<288;++ce)de[ce]=8;var pe=new $(32);for(ce=0;ce<32;++ce)pe[ce]=5;fe(de,9,0);var he=fe(de,9,1),me=(fe(pe,5,0),fe(pe,5,1)),ve=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},ye=function(e,t,r){var n=t/8>>0;return(e[n]|e[n+1]<<8)>>>(7&t)&r},ge=function(e,t){var r=t/8>>0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>>(7&t)},we=function(e,t,r){(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length);var n=new(e instanceof K?K:e instanceof Z?Z:$)(r-t);return n.set(e.subarray(t,r)),n},be=new Z(256);for(ce=0;ce<256;++ce){for(var Se=ce,xe=9;--xe;)Se=(1&Se&&3988292384)^Se>>>1;be[ce]=Se}function Ee(e,t){return function(e,t,r){var n=e.length,i=!t||r,o=!r||r.i;r||(r={}),t||(t=new $(3*n));var a=function(e){var r=t.length;if(e>r){var n=new $(Math.max(2*r,e));n.set(t),t=n}},s=r.f||0,l=r.p||0,c=r.b||0,u=r.l,f=r.d,d=r.m,p=r.n;if(s&&!u)return t;var h,m=8*n;do{if(!u){r.f=s=ye(e,l,1);var v=ye(e,l+1,3);if(l+=3,!v){var y=e[(C=((h=l)/8>>0)+(7&h&&1)+4)-4]|e[C-3]<<8,g=C+y;if(g>n){if(o)throw"unexpected EOF";break}i&&a(c+y),t.set(e.subarray(C,g),c),r.b=c+=y,r.p=l=8*g;continue}if(1==v)u=he,f=me,d=9,p=5;else{if(2!=v)throw"invalid block type";var w=ye(e,l,31)+257,b=ye(e,l+10,15)+4,S=w+ye(e,l+5,31)+1;l+=14;for(var x=new $(S),E=new $(19),T=0;T<b;++T)E[re[T]]=ye(e,l+3*T,7);l+=3*b;var M=ve(E),N=(1<<M)-1;if(!o&&l+S*(M+7)>m)break;var I=fe(E,M,1);for(T=0;T<S;){var C,k=I[ye(e,l,N)];if(l+=15&k,(C=k>>>4)<16)x[T++]=C;else{var D=0,A=0;for(16==C?(A=3+ye(e,l,3),l+=2,D=x[T-1]):17==C?(A=3+ye(e,l,7),l+=3):18==C&&(A=11+ye(e,l,127),l+=7);A--;)x[T++]=D}}var _=x.subarray(0,w),R=x.subarray(w);d=ve(_),p=ve(R),u=fe(_,d,1),f=fe(R,p,1)}if(l>m)throw"unexpected EOF"}i&&a(c+131072);for(var F=(1<<d)-1,O=(1<<p)-1,P=d+p+18;o||l+P<m;){var L=(D=u[ge(e,l)&F])>>>4;if((l+=15&D)>m)throw"unexpected EOF";if(!D)throw"invalid length/literal";if(L<256)t[c++]=L;else{if(256==L){u=null;break}var j=L-254;if(L>264){var B=ee[T=L-257];j=ye(e,l,(1<<B)-1)+oe[T],l+=B}var U=f[ge(e,l)&O],V=U>>>4;if(!U)throw"invalid distance";l+=15&U;R=se[V];if(V>3){B=te[V];R+=ge(e,l)&(1<<B)-1,l+=B}if(l>m)throw"unexpected EOF";i&&a(c+131072);for(var W=c+j;c<W;c+=4)t[c]=t[c-R],t[c+1]=t[c+1-R],t[c+2]=t[c+2-R],t[c+3]=t[c+3-R];c=W}}r.l=u,r.p=l,r.b=c,u&&(s=1,r.m=d,r.d=f,r.n=p)}while(!s);return c==t.length?t:we(t,0,c)}((function(e){if(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"}(e),e.subarray(2,-4)),t)}return e.Replayer=J,e.unpack=function(e){if("string"!=typeof e)return e;try{if((t=JSON.parse(e)).timestamp)return t}catch(e){}try{var t;if("v1"===(t=JSON.parse(function(e,t){var r="";if(!t&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var n=0;n<e.length;){var i=e[n++];i<128||t?r+=String.fromCharCode(i):i<224?r+=String.fromCharCode((31&i)<<6|63&e[n++]):i<240?r+=String.fromCharCode((15&i)<<12|(63&e[n++])<<6|63&e[n++]):(i=((15&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i))}return r}(Ee(function(e,t){var r=e.length;if(!t&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var n=new $(e.length+(e.length>>>1)),i=0,o=function(e){n[i++]=e},a=0;a<r;++a){if(i+5>n.length){var s=new $(i+8+(r-a<<1));s.set(n),n=s}var l=e.charCodeAt(a);l<128||t?o(l):l<2048?(o(192|l>>>6),o(128|63&l)):l>55295&&l<57344?(o(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++a))>>>18),o(128|l>>>12&63),o(128|l>>>6&63),o(128|63&l)):(o(224|l>>>12),o(128|l>>>6&63),o(128|63&l))}return we(n,0,i)}(e,!0))))).v)return t;throw new Error("These events were packed with packer "+t.v+" which is incompatible with current packer v1.")}catch(e){throw console.error(e),new Error("Unknown data format.")}},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
//# sourceMappingURL=rrweb-replay-unpack.min.js.map

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

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var t,n=function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function r(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function i(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}function a(e){return e.nodeType===e.ELEMENT_NODE}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(t||(t={}));var s=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function l(e,t){void 0===t&&(t={});var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=-1===o?r+e.length:e.length-o}function i(){var e={line:n,column:r};return function(t){return t.position=new a(e),m(),t}}var a=function(e){this.start=e,this.end={line:n,column:r},this.source=t.source};a.prototype.content=e;var l=[];function u(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;l.push(i)}function d(){return h(/^{\s*/)}function f(){return h(/^}/)}function p(){var t,n=[];for(m(),v(n);e.length&&"}"!==e.charAt(0)&&(t=I()||C());)!1!==t&&(n.push(t),v(n));return n}function h(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function m(){h(/^\s*/)}function v(e){var t;for(void 0===e&&(e=[]);t=y();)!1!==t&&e.push(t),t=y();return e}function y(){var t=i();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return u("End of comment missing");var a=e.slice(2,n-2);return r+=2,o(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function g(){var e=h(/^([^{]+)/);if(e)return c(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function b(){var e=i(),t=h(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=c(t[0]);if(!h(/^:\s*/))return u("property missing ':'");var r=h(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:n.replace(s,""),value:r?c(r[0]).replace(s,""):""});return h(/^[;\s]*/),o}}function w(){var e,t=[];if(!d())return u("missing '{'");for(v(t);e=b();)!1!==e&&(t.push(e),v(t)),e=b();return f()?t:u("missing '}'")}function S(){for(var e,t=[],n=i();e=h(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),h(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:w()})}var x,E=N("import"),T=N("charset"),M=N("namespace");function N(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=i(),r=h(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function I(){if("@"===e[0])return function(){var e=i(),t=h(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=h(/^([-\w]+)\s*/)))return u("@keyframes missing name");var r,o=t[1];if(!d())return u("@keyframes missing '{'");for(var a=v();r=S();)a.push(r),a=a.concat(v());return f()?e({type:"keyframes",name:o,vendor:n,keyframes:a}):u("@keyframes missing '}'")}}()||function(){var e=i(),t=h(/^@media *([^{]+)/);if(t){var n=c(t[1]);if(!d())return u("@media missing '{'");var r=v().concat(p());return f()?e({type:"media",media:n,rules:r}):u("@media missing '}'")}}()||function(){var e=i(),t=h(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:c(t[1]),media:c(t[2])})}()||function(){var e=i(),t=h(/^@supports *([^{]+)/);if(t){var n=c(t[1]);if(!d())return u("@supports missing '{'");var r=v().concat(p());return f()?e({type:"supports",supports:n,rules:r}):u("@supports missing '}'")}}()||E()||T()||M()||function(){var e=i(),t=h(/^@([-\w]+)?document *([^{]+)/);if(t){var n=c(t[1]),r=c(t[2]);if(!d())return u("@document missing '{'");var o=v().concat(p());return f()?e({type:"document",document:r,vendor:n,rules:o}):u("@document missing '}'")}}()||function(){var e=i();if(h(/^@page */)){var t=g()||[];if(!d())return u("@page missing '{'");for(var n,r=v();n=b();)r.push(n),r=r.concat(v());return f()?e({type:"page",selectors:t,declarations:r}):u("@page missing '}'")}}()||function(){var e=i();if(h(/^@host\s*/)){if(!d())return u("@host missing '{'");var t=v().concat(p());return f()?e({type:"host",rules:t}):u("@host missing '}'")}}()||function(){var e=i();if(h(/^@font-face\s*/)){if(!d())return u("@font-face missing '{'");for(var t,n=v();t=b();)n.push(t),n=n.concat(v());return f()?e({type:"font-face",declarations:n}):u("@font-face missing '}'")}}()}function C(){var e=i(),t=g();return t?(v(),e({type:"rule",selectors:t,declarations:w()})):u("selector missing")}return function e(t,n){for(var r=t&&"string"==typeof t.type,o=r?t:n,i=0,a=Object.keys(t);i<a.length;i++){var s=a[i],l=t[s];Array.isArray(l)?l.forEach((function(t){e(t,o)})):l&&"object"==typeof l&&e(l,o)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((x=p(),{type:"stylesheet",stylesheet:{source:t.source,rules:x,parsingErrors:l}}))}function c(e){return e?e.replace(/^\s+|\s+$/g,""):""}var u={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var d=/([^\\]):hover/,f=new RegExp(d,"g");function p(e){var t=l(e,{silent:!0});if(!t.stylesheet)return e;var n=[];if(t.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){d.test(e)&&n.push(e)}))})),0===n.length)return e;var r=new RegExp(n.filter((function(e,t){return n.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g");return e.replace(r,(function(e){var t=e.replace(f,"$1.\\:hover");return e+", "+t}))}function h(e,n){var r=n.doc,o=n.hackCss;switch(e.type){case t.Document:return r.implementation.createDocument(null,"",null);case t.DocumentType:return r.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case t.Element:var i,a=function(e){var t=u[e.tagName]?u[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);i=e.isSVG?r.createElementNS("http://www.w3.org/2000/svg",a):r.createElement(a);var s=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var n=e.attributes[t];if(n="boolean"==typeof n||"number"==typeof n?"":n,t.startsWith("rr_")){if("canvas"===a&&"rr_dataURL"===t){var s=document.createElement("img");s.src=n,s.onload=function(){var e=i.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(i.style.width=n),"rr_height"===t&&(i.style.height=n),"rr_mediaCurrentTime"===t&&(i.currentTime=e.attributes.rr_mediaCurrentTime),"rr_mediaState"===t)switch(n){case"played":i.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":i.pause()}}else{var l="textarea"===a&&"value"===t,c="style"===a&&"_cssText"===t;if(c&&o&&(n=p(n)),l||c){for(var u=r.createTextNode(n),d=0,f=Array.from(i.childNodes);d<f.length;d++){var h=f[d];h.nodeType===i.TEXT_NODE&&i.removeChild(h)}return i.appendChild(u),"continue"}try{if(e.isSVG&&"xlink:href"===t)i.setAttributeNS("http://www.w3.org/1999/xlink",t,n);else if("onload"===t||"onclick"===t||"onmouse"===t.substring(0,7))i.setAttribute("_"+t,n);else{if("meta"===a&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"==t)return i.setAttribute("csp-content",n),"continue";i.setAttribute(t,n)}}catch(e){}}};for(var l in e.attributes)s(l);if(e.isShadowHost)if(i.shadowRoot)for(;i.shadowRoot.firstChild;)i.shadowRoot.removeChild(i.shadowRoot.firstChild);else i.attachShadow({mode:"open"});return i;case t.Text:return r.createTextNode(e.isStyle&&o?p(e.textContent):e.textContent);case t.CDATA:return r.createCDATASection(e.textContent);case t.Comment:return r.createComment(e.textContent);default:return null}}function m(e,n){var r=n.doc,o=n.map,i=n.skipChild,s=void 0!==i&&i,l=n.hackCss,c=void 0===l||l,u=n.afterAppend,d=h(e,{doc:r,hackCss:c});if(!d)return null;if(e.rootId&&console.assert(o[e.rootId]===r,"Target document should has the same root id."),e.type===t.Document&&(r.close(),r.open(),d=r),d.__sn=e,o[e.id]=d,(e.type===t.Document||e.type===t.Element)&&!s)for(var f=0,p=e.childNodes;f<p.length;f++){var v=p[f],y=m(v,{doc:r,map:o,skipChild:!1,hackCss:c,afterAppend:u});y?(v.isShadow&&a(d)&&d.shadowRoot?d.shadowRoot.appendChild(y):d.appendChild(y),u&&u(y)):console.warn("Failed to rebuild",v)}return d}function v(e,n){var r=n.doc,o=n.onVisit,i=n.hackCss,a={},s=m(e,{doc:r,map:a,skipChild:!1,hackCss:void 0===i||i,afterAppend:n.afterAppend});return function(e,t){for(var n in e)e[n]&&(r=e[n],t(r));var r}(a,(function(e){o&&o(e),function(e){var n=e.__sn;if(n.type===t.Element){var r=e;for(var o in n.attributes)if(n.attributes.hasOwnProperty(o)&&o.startsWith("rr_")){var i=n.attributes[o];"rr_scrollLeft"===o&&(r.scrollLeft=i),"rr_scrollTop"===o&&(r.scrollTop=i)}}}(e)})),[s,a]}function y(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map((function(e){e(n)})),(e["*"]||[]).slice().map((function(e){e(t,n)}))}}}var g,b,w,S,x,E=Object.freeze({__proto__:null,default:y});function T(e,t){if(void 0===e&&(e=window),void 0===t&&(t=document),!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||s,scrollIntoView:r.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=f(this),r=n.getBoundingClientRect(),i=this.getBoundingClientRect();n!==t.body?(h.call(this,n,n.scrollLeft+i.left-r.left,n.scrollTop+i.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function u(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function d(e){var t=c(e,"Y")&&u(e,"Y"),n=c(e,"X")&&u(e,"X");return t||n}function f(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}function p(t){var n,r,o,a,s=(i()-t.startTime)/468;a=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*a)),r=t.startX+(t.x-t.startX)*n,o=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,o),r===t.x&&o===t.y||e.requestAnimationFrame(p.bind(e,t))}function h(n,r,a){var l,c,u,d,f=i();n===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=o.scroll):(l=n,c=n.scrollLeft,u=n.scrollTop,d=s),p({scrollable:l,method:d,startTime:f,startX:c,startY:u,x:r,y:a})}}!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",e[e.Plugin=6]="Plugin"}(g||(g={})),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",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag"}(b||(b={})),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"}(w||(w={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked"}(S||(S={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back"}(x||(x={}));var M,N=function(){function e(e,t){void 0===e&&(e=[]),this.timeOffset=0,this.raf=null,this.actions=e,this.speed=t}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){this.actions=this.actions.concat(e)},e.prototype.start=function(){this.timeOffset=0;var e=performance.now(),t=this.actions,n=this;this.raf=requestAnimationFrame((function r(){var o=performance.now();for(n.timeOffset+=(o-e)*n.speed,e=o;t.length;){var i=t[0];if(!(n.timeOffset>=i.delay))break;t.shift(),i.doAction()}(t.length>0||n.liveMode)&&(n.raf=requestAnimationFrame(r))}))},e.prototype.clear=function(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0},e.prototype.setSpeed=function(e){this.speed=e},e.prototype.toggleLiveMode=function(e){this.liveMode=e},e.prototype.isActive=function(){return null!==this.raf},e.prototype.findActionIndex=function(e){for(var t=0,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r;n=r-1}}return t},e}();function I(e,t){if(e.type===g.IncrementalSnapshot&&e.data.source===b.MouseMove){var n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}
***************************************************************************** */var t,n=function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function r(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function i(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function o(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}function a(e){return e.nodeType===e.ELEMENT_NODE}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(t||(t={}));var s=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function l(e,t){void 0===t&&(t={});var n=1,r=1;function i(e){var t=e.match(/\n/g);t&&(n+=t.length);var i=e.lastIndexOf("\n");r=-1===i?r+e.length:e.length-i}function o(){var e={line:n,column:r};return function(t){return t.position=new a(e),m(),t}}var a=function(e){this.start=e,this.end={line:n,column:r},this.source=t.source};a.prototype.content=e;var l=[];function u(i){var o=new Error(t.source+":"+n+":"+r+": "+i);if(o.reason=i,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o;l.push(o)}function d(){return h(/^{\s*/)}function f(){return h(/^}/)}function p(){var t,n=[];for(m(),v(n);e.length&&"}"!==e.charAt(0)&&(t=I()||C());)!1!==t&&(n.push(t),v(n));return n}function h(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function m(){h(/^\s*/)}function v(e){var t;for(void 0===e&&(e=[]);t=y();)!1!==t&&e.push(t),t=y();return e}function y(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return u("End of comment missing");var a=e.slice(2,n-2);return r+=2,i(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function g(){var e=h(/^([^{]+)/);if(e)return c(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function S(){var e=o(),t=h(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=c(t[0]);if(!h(/^:\s*/))return u("property missing ':'");var r=h(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:n.replace(s,""),value:r?c(r[0]).replace(s,""):""});return h(/^[;\s]*/),i}}function b(){var e,t=[];if(!d())return u("missing '{'");for(v(t);e=S();)!1!==e&&(t.push(e),v(t)),e=S();return f()?t:u("missing '}'")}function w(){for(var e,t=[],n=o();e=h(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),h(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:b()})}var x,E=N("import"),T=N("charset"),M=N("namespace");function N(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=o(),r=h(t);if(r){var i={type:e};return i[e]=r[1].trim(),n(i)}}}function I(){if("@"===e[0])return function(){var e=o(),t=h(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=h(/^([-\w]+)\s*/)))return u("@keyframes missing name");var r,i=t[1];if(!d())return u("@keyframes missing '{'");for(var a=v();r=w();)a.push(r),a=a.concat(v());return f()?e({type:"keyframes",name:i,vendor:n,keyframes:a}):u("@keyframes missing '}'")}}()||function(){var e=o(),t=h(/^@media *([^{]+)/);if(t){var n=c(t[1]);if(!d())return u("@media missing '{'");var r=v().concat(p());return f()?e({type:"media",media:n,rules:r}):u("@media missing '}'")}}()||function(){var e=o(),t=h(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:c(t[1]),media:c(t[2])})}()||function(){var e=o(),t=h(/^@supports *([^{]+)/);if(t){var n=c(t[1]);if(!d())return u("@supports missing '{'");var r=v().concat(p());return f()?e({type:"supports",supports:n,rules:r}):u("@supports missing '}'")}}()||E()||T()||M()||function(){var e=o(),t=h(/^@([-\w]+)?document *([^{]+)/);if(t){var n=c(t[1]),r=c(t[2]);if(!d())return u("@document missing '{'");var i=v().concat(p());return f()?e({type:"document",document:r,vendor:n,rules:i}):u("@document missing '}'")}}()||function(){var e=o();if(h(/^@page */)){var t=g()||[];if(!d())return u("@page missing '{'");for(var n,r=v();n=S();)r.push(n),r=r.concat(v());return f()?e({type:"page",selectors:t,declarations:r}):u("@page missing '}'")}}()||function(){var e=o();if(h(/^@host\s*/)){if(!d())return u("@host missing '{'");var t=v().concat(p());return f()?e({type:"host",rules:t}):u("@host missing '}'")}}()||function(){var e=o();if(h(/^@font-face\s*/)){if(!d())return u("@font-face missing '{'");for(var t,n=v();t=S();)n.push(t),n=n.concat(v());return f()?e({type:"font-face",declarations:n}):u("@font-face missing '}'")}}()}function C(){var e=o(),t=g();return t?(v(),e({type:"rule",selectors:t,declarations:b()})):u("selector missing")}return function e(t,n){for(var r=t&&"string"==typeof t.type,i=r?t:n,o=0,a=Object.keys(t);o<a.length;o++){var s=a[o],l=t[s];Array.isArray(l)?l.forEach((function(t){e(t,i)})):l&&"object"==typeof l&&e(l,i)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((x=p(),{type:"stylesheet",stylesheet:{source:t.source,rules:x,parsingErrors:l}}))}function c(e){return e?e.replace(/^\s+|\s+$/g,""):""}var u={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var d=/([^\\]):hover/,f=new RegExp(d,"g");function p(e){var t=l(e,{silent:!0});if(!t.stylesheet)return e;var n=[];if(t.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){d.test(e)&&n.push(e)}))})),0===n.length)return e;var r=new RegExp(n.filter((function(e,t){return n.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g");return e.replace(r,(function(e){var t=e.replace(f,"$1.\\:hover");return e+", "+t}))}function h(e,n){var r=n.doc,i=n.hackCss;switch(e.type){case t.Document:return r.implementation.createDocument(null,"",null);case t.DocumentType:return r.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case t.Element:var o,a=function(e){var t=u[e.tagName]?u[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);o=e.isSVG?r.createElementNS("http://www.w3.org/2000/svg",a):r.createElement(a);var s=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var n=e.attributes[t];if(n="boolean"==typeof n||"number"==typeof n?"":n,t.startsWith("rr_")){if("canvas"===a&&"rr_dataURL"===t){var s=document.createElement("img");s.src=n,s.onload=function(){var e=o.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(o.style.width=n),"rr_height"===t&&(o.style.height=n),"rr_mediaCurrentTime"===t&&(o.currentTime=e.attributes.rr_mediaCurrentTime),"rr_mediaState"===t)switch(n){case"played":o.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":o.pause()}}else{var l="textarea"===a&&"value"===t,c="style"===a&&"_cssText"===t;if(c&&i&&(n=p(n)),l||c){for(var u=r.createTextNode(n),d=0,f=Array.from(o.childNodes);d<f.length;d++){var h=f[d];h.nodeType===o.TEXT_NODE&&o.removeChild(h)}return o.appendChild(u),"continue"}try{if(e.isSVG&&"xlink:href"===t)o.setAttributeNS("http://www.w3.org/1999/xlink",t,n);else if("onload"===t||"onclick"===t||"onmouse"===t.substring(0,7))o.setAttribute("_"+t,n);else{if("meta"===a&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===t)return o.setAttribute("csp-content",n),"continue";"link"===a&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===a&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")||o.setAttribute(t,n)}}catch(e){}}};for(var l in e.attributes)s(l);if(e.isShadowHost)if(o.shadowRoot)for(;o.shadowRoot.firstChild;)o.shadowRoot.removeChild(o.shadowRoot.firstChild);else o.attachShadow({mode:"open"});return o;case t.Text:return r.createTextNode(e.isStyle&&i?p(e.textContent):e.textContent);case t.CDATA:return r.createCDATASection(e.textContent);case t.Comment:return r.createComment(e.textContent);default:return null}}function m(e,n){var r=n.doc,i=n.map,o=n.skipChild,s=void 0!==o&&o,l=n.hackCss,c=void 0===l||l,u=n.afterAppend,d=h(e,{doc:r,hackCss:c});if(!d)return null;if(e.rootId&&console.assert(i[e.rootId]===r,"Target document should has the same root id."),e.type===t.Document&&(r.close(),r.open(),d=r),d.__sn=e,i[e.id]=d,(e.type===t.Document||e.type===t.Element)&&!s)for(var f=0,p=e.childNodes;f<p.length;f++){var v=p[f],y=m(v,{doc:r,map:i,skipChild:!1,hackCss:c,afterAppend:u});y?(v.isShadow&&a(d)&&d.shadowRoot?d.shadowRoot.appendChild(y):d.appendChild(y),u&&u(y)):console.warn("Failed to rebuild",v)}return d}function v(e,n){var r=n.doc,i=n.onVisit,o=n.hackCss,a={},s=m(e,{doc:r,map:a,skipChild:!1,hackCss:void 0===o||o,afterAppend:n.afterAppend});return function(e,t){for(var n in e)e[n]&&(r=e[n],t(r));var r}(a,(function(e){i&&i(e),function(e){var n=e.__sn;if(n.type===t.Element){var r=e;for(var i in n.attributes)if(n.attributes.hasOwnProperty(i)&&i.startsWith("rr_")){var o=n.attributes[i];"rr_scrollLeft"===i&&(r.scrollLeft=o),"rr_scrollTop"===i&&(r.scrollTop=o)}}}(e)})),[s,a]}function y(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map((function(e){e(n)})),(e["*"]||[]).slice().map((function(e){e(t,n)}))}}}var g,S,b,w,x,E=Object.freeze({__proto__:null,default:y});function T(e,t){if(void 0===e&&(e=window),void 0===t&&(t=document),!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||s,scrollIntoView:r.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):i.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?i.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=f(this),r=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(h.call(this,n,n.scrollLeft+o.left-r.left,n.scrollTop+o.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function u(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function d(e){var t=c(e,"Y")&&u(e,"Y"),n=c(e,"X")&&u(e,"X");return t||n}function f(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}function p(t){var n,r,i,a,s=(o()-t.startTime)/468;a=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*a)),r=t.startX+(t.x-t.startX)*n,i=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,i),r===t.x&&i===t.y||e.requestAnimationFrame(p.bind(e,t))}function h(n,r,a){var l,c,u,d,f=o();n===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(l=n,c=n.scrollLeft,u=n.scrollTop,d=s),p({scrollable:l,method:d,startTime:f,startX:c,startY:u,x:r,y:a})}}!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",e[e.Plugin=6]="Plugin"}(g||(g={})),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",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag"}(S||(S={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(b||(b={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked"}(w||(w={})),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",e.PlayBack="play-back"}(x||(x={}));var M,N=function(){function e(e,t){void 0===e&&(e=[]),this.timeOffset=0,this.raf=null,this.actions=e,this.speed=t}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){this.actions=this.actions.concat(e)},e.prototype.start=function(){this.timeOffset=0;var e=performance.now(),t=this.actions,n=this;this.raf=requestAnimationFrame((function r(){var i=performance.now();for(n.timeOffset+=(i-e)*n.speed,e=i;t.length;){var o=t[0];if(!(n.timeOffset>=o.delay))break;t.shift(),o.doAction()}(t.length>0||n.liveMode)&&(n.raf=requestAnimationFrame(r))}))},e.prototype.clear=function(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0},e.prototype.setSpeed=function(e){this.speed=e},e.prototype.toggleLiveMode=function(e){this.liveMode=e},e.prototype.isActive=function(){return null!==this.raf},e.prototype.findActionIndex=function(e){for(var t=0,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r;n=r-1}}return t},e}();function I(e,t){if(e.type===g.IncrementalSnapshot&&e.data.source===S.MouseMove){var n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}
/*! *****************************************************************************

@@ -30,3 +30,3 @@ Copyright (c) Microsoft Corporation. All rights reserved.

and limitations under the License.
***************************************************************************** */!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(M||(M={}));var C={type:"xstate.init"};function D(e){return void 0===e?[]:[].concat(e)}function A(e){return{type:"xstate.assign",assignment:e}}function k(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 _(e){return function(t){return e===t}}function F(e){return"string"==typeof e?{type:e}:e}function O(e,t){return{value:e,context:t,actions:[],changed:!1,matches:_(e)}}function P(e,t){void 0===t&&(t={});var n={config:e,_options:t,initialState:{value:e.initial,actions:D(e.states[e.initial].entry).map((function(e){return k(e,t.actions)})),context:e.context,matches:_(e.initial)},transition:function(t,r){var o,i,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,l=a.context,c=F(r),u=e.states[s];if(u.on){var d=D(u.on[c.type]),f=function(t){if(void 0===t)return{value:O(s,l)};var r="string"==typeof t?{target:t}:t,o=r.target,i=void 0===o?s:o,a=r.actions,d=void 0===a?[]:a,f=r.cond,p=l;if((void 0===f?function(){return!0}:f)(l,c)){var h=e.states[i],m=!1,v=[].concat(u.exit,d,h.entry).filter((function(e){return e})).map((function(e){return k(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,c):Object.keys(e.assignment).forEach((function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](p,c):e.assignment[n]})),p=t,!1}return!0}));return{value:{value:i,context:p,actions:v,changed:i!==s||v.length>0||m,matches:_(i)}}}};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){o={error:e}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}}return O(s,l)}};return n}var R=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function L(e){var t=e.initialState,n=M.NotStarted,r=new Set,o={_machine:e,send:function(o){n===M.Running&&(t=e.transition(t,o),R(t,F(o)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(r){if(r){var i="object"==typeof r?r:{context:e.config.context,value:r};t={value:i.value,actions:[],context:i.context,matches:_(i.value)}}return n=M.Running,R(t,C),o},stop:function(){return n=M.Stopped,r.clear(),o},get state(){return t},get status(){return n}};return o}var B="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",j={map:{},getId:function(){return console.error(B),-1},getNode:function(){return console.error(B),null},removeNodeFromMap:function(){console.error(B)},has:function(){return console.error(B),!1},reset:function(){console.error(B)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(j=new Proxy(j,{get:function(e,t,n){return"map"===t&&console.error(B),Reflect.get(e,t,n)}}));var V=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,t){var n=this,r=this.indexes.get(e.parentId),o=this.indexes.get(e.id),i=function(e){n.removeIdSet.add(e);var r=t.getNode(e);null==r||r.childNodes.forEach((function(e){"__sn"in e&&i(e.__sn.id)}))},a=function(t){n.removeIdSet.add(t.id),Object.values(t.children).forEach((function(e){return a(e)}));var r=n.indexes.get(t.id);if(r){var o=r.parent;o&&(delete r.parent,delete o.children[r.id],n.indexes.delete(e.id))}};o?r?(delete o.parent,delete r.children[o.id],this.indexes.delete(e.id),a(o)):(delete this.tree[o.id],this.indexes.delete(o.id),a(o)):(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,o,i=this,a=this.tree,s=this.removeNodeMutations,l=this.textMutations,c=this.attributeMutations,u={source:b.Mutation,removes:s,texts:l,attributes:c,adds:[]},d=function(e,t){t&&i.removeIdSet.add(e.id),u.texts=u.texts.concat(t?[]:e.texts).filter((function(e){return!i.removeIdSet.has(e.id)})),u.attributes=u.attributes.concat(t?[]:e.attributes).filter((function(e){return!i.removeIdSet.has(e.id)})),i.removeIdSet.has(e.id)||i.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()),v=m.next();!v.done;v=m.next()){h=v.value;this.removeIdSet.has(h)&&this.inputMap.delete(h)}}catch(e){n={error:e}}finally{try{v&&!v.done&&(o=m.return)&&o.call(m)}finally{if(n)throw n.error}}var y=new Map(this.scrollMap),g=new Map(this.inputMap);return this.reset(),{mutationData:u,scrollMap:y,inputMap:g}},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 U(e){var t,n,o={},i=function(e,t){var n={value:e,parent:t,children:[]};return o[e.node.id]=n,n},a=[];try{for(var s=r(e),l=s.next();!l.done;l=s.next()){var c=l.value,u=c.nextId,d=c.parentId;if(u&&u in o){var f=o[u];if(f.parent){var p=f.parent.children.indexOf(f);f.parent.children.splice(p,0,i(c,f.parent))}else{p=a.indexOf(f);a.splice(p,0,i(c,null))}}else if(d in o){var h=o[d];h.children.push(i(c,h))}else a.push(i(c,null))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a}function W(e,t){t(e.value);for(var n=e.children.length-1;n>=0;n--)W(e.children[n],t)}function z(e){return"__sn"in e&&(e.__sn.type===t.Element&&"iframe"===e.__sn.tagName)}function Y(e){var t;return Boolean(null===(t=e)||void 0===t?void 0:t.shadowRoot)}function X(e,t){var o=t.getCastFn,i=t.emitter;return L(P({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:A({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:A((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,l,c=e.timer,u=e.events,d=e.baselineTime,f=e.lastPlayedEvent;c.clear();try{for(var p=r(u),h=p.next();!h.done;h=p.next()){I(h.value,d)}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}var m=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===g.Meta&&r.timestamp<=t)return e.slice(n)}return e}(u,d),v=null==f?void 0:f.timestamp;(null==f?void 0:f.type)===g.IncrementalSnapshot&&f.data.source===b.MouseMove&&(v=f.timestamp+(null===(l=f.data.positions[0])||void 0===l?void 0:l.timeOffset)),d<(v||0)&&i.emit(x.PlayBack);var y=new Array,w=function(e){if(v&&v<d&&(e.timestamp<=v||e===f))return"continue";var t=e.timestamp<d;if(t&&!function(e){switch(e.type){case g.DomContentLoaded:case g.Load:case g.Custom:return!1;case g.FullSnapshot:case g.Meta:case g.Plugin:return!0}switch(e.data.source){case b.MouseMove:case b.MouseInteraction:case b.TouchMove:case b.MediaInteraction:return!1;case b.ViewportResize:case b.StyleSheetRule:case b.Scroll:case b.Input:return!0}return!0}(e))return"continue";var n=o(e,t);t?n():y.push({doAction:function(){n(),i.emit(x.EventCast,e)},delay:e.delay})};try{for(var S=r(m),E=S.next();!E.done;E=S.next()){w(E.value)}}catch(e){a={error:e}}finally{try{E&&!E.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}i.emit(x.Flush),c.addActions(y),c.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:A((function(e){return n(n({},e),{lastPlayedEvent:null})})),startLive:A({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:A((function(e,t){var r=e.baselineTime,a=e.timer,s=e.events;if("ADD_EVENT"===t.type){var l=t.payload.event;I(l,r);var c=s.length-1;if(!s[c]||s[c].timestamp<=l.timestamp)s.push(l);else{for(var u=-1,d=0;d<=c;){var f=Math.floor((d+c)/2);s[f].timestamp<=l.timestamp?d=f+1:c=f-1}-1===u&&(u=d),s.splice(u,0,l)}var p=l.timestamp<r,h=o(l,p);p?h():a.isActive()&&a.addAction({doAction:function(){h(),i.emit(x.EventCast,l)},delay:l.delay})}return n(n({},e),{events:s})}))}}))}var Q=y||E,H={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"},G=function(){function e(e,t){var n=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=Q(),this.legacy_missingNodeRetryMap={},this.imageMap=new Map,this.mirror={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,n=e.__sn&&e.__sn.id;delete this.map[n],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}},this.firstFullSnapshot=null,this.newDocumentQueue=[],!(null==t?void 0:t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");var o={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:H};this.config=Object.assign({},o,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on(x.Resize,this.handleResize),this.setupDom(),this.treeIndex=new V,this.fragmentParentMap=new Map,this.elementStateMap=new Map,this.emitter.on(x.Flush,(function(){var e,t,o,i,a=n.treeIndex.flush(),s=a.scrollMap,l=a.inputMap;n.fragmentParentMap.forEach((function(e,t){return n.restoreRealParent(t,e)})),n.fragmentParentMap.clear(),n.elementStateMap.clear();try{for(var c=r(s.values()),u=c.next();!u.done;u=c.next()){var d=u.value;n.applyScroll(d)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}try{for(var f=r(l.values()),p=f.next();!p.done;p=f.next()){d=p.value;n.applyInput(d)}}catch(e){o={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}})),this.emitter.on(x.PlayBack,(function(){n.firstFullSnapshot=null,n.mirror.reset()}));var i=new N([],(null==t?void 0:t.speed)||o.speed);this.service=X({events:e.map((function(e){return t&&t.unpackFn?t.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){n.emitter.emit(x.StateChange,{player:e})})),this.speedService=L(P({id:"speed",context:{normalSpeed:-1,timer:i},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:A({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(e){n.emitter.emit(x.StateChange,{speed:e})}));var a=this.service.state.context.events.find((function(e){return e.type===g.Meta})),s=this.service.state.context.events.find((function(e){return e.type===g.FullSnapshot}));if(a){var l=a.data,c=l.width,u=l.height;setTimeout((function(){n.emitter.emit(x.Resize,{width:c,height:u})}),0)}s&&setTimeout((function(){n.firstFullSnapshot||(n.firstFullSnapshot=s,n.rebuildFullSnapshot(s),n.iframe.contentWindow.scrollTo(s.data.initialOffset))}),1)}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){return this.emitter.on(e,t),this},e.prototype.off=function(e,t){return this.emitter.off(e,t),this},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}}),void 0!==e.mouseTail&&(!1===e.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))},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.getMirror=function(){return this.mirror},e.prototype.play=function(e){var t;void 0===e&&(e=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}}),null===(t=this.iframe.contentDocument)||void 0===t||t.getElementsByTagName("html")[0].classList.remove("rrweb-paused"),this.emitter.emit(x.Start)},e.prototype.pause=function(e){var t;void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),null===(t=this.iframe.contentDocument)||void 0===t||t.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(x.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(x.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="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var e,t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(T(this.iframe.contentWindow,this.iframe.contentDocument),void 0===(e=this.iframe.contentWindow)&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1}))},e.prototype.handleResize=function(e){var t,n;this.iframe.style.display="inherit";try{for(var o=r([this.mouseTail,this.iframe]),i=o.next();!i.done;i=o.next()){var a=i.value;a&&(a.setAttribute("width",String(e.width)),a.setAttribute("height",String(e.height)))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},e.prototype.getCastFn=function(e,t){var n,o=this;switch(void 0===t&&(t=!1),e.type){case g.DomContentLoaded:case g.Load:break;case g.Custom:n=function(){o.emitter.emit(x.CustomEvent,e)};break;case g.Meta:n=function(){return o.emitter.emit(x.Resize,{width:e.data.width,height:e.data.height})};break;case g.FullSnapshot:n=function(){if(o.firstFullSnapshot){if(o.firstFullSnapshot===e)return void(o.firstFullSnapshot=!0)}else o.firstFullSnapshot=!0;o.rebuildFullSnapshot(e,t),o.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case g.IncrementalSnapshot:n=function(){var n,i;if(o.applyIncremental(e,t),!t&&(e===o.nextUserInteractionEvent&&(o.nextUserInteractionEvent=null,o.backToNormal()),o.config.skipInactive&&!o.nextUserInteractionEvent)){try{for(var a=r(o.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(!(l.timestamp<=e.timestamp)&&o.isUserInteraction(l)){l.delay-e.delay>1e4*o.speedService.state.context.timer.speed&&(o.nextUserInteractionEvent=l);break}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}if(o.nextUserInteractionEvent){var c=o.nextUserInteractionEvent.delay-e.delay,u={speed:Math.min(Math.round(c/5e3),o.config.maxSpeed)};o.speedService.send({type:"FAST_FORWARD",payload:u}),o.emitter.emit(x.SkipStart,u)}}}}return function(){var i,a;n&&n();try{for(var s=r(o.config.plugins||[]),l=s.next();!l.done;l=s.next()){l.value.handler(e,t,{replayer:o})}}catch(e){i={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}o.service.send({type:"CAST_EVENT",payload:{event:e}});var c=o.service.state.context.events.length-1;if(e===o.service.state.context.events[c]){var u=function(){c<o.service.state.context.events.length-1||(o.backToNormal(),o.service.send("END"),o.emitter.emit(x.Finish))};e.type===g.IncrementalSnapshot&&e.data.source===b.MouseMove&&e.data.positions.length?setTimeout((function(){u()}),Math.max(0,50-e.data.positions[0].timeOffset)):u()}}},e.prototype.rebuildFullSnapshot=function(e,t){var n,o,i=this;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={};var a=[];this.mirror.map=v(e.data.node,{doc:this.iframe.contentDocument,afterAppend:function(e){i.collectIframeAndAttachDocument(a,e)}})[1];var s=function(e,t){if(l.attachDocumentToIframe(e,t),l.newDocumentQueue=l.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var n=t.contentDocument,r=n.documentElement,o=n.head;l.insertStyleRules(r,o)}},l=this;try{for(var c=r(a),u=c.next();!u.done;u=c.next()){var d=u.value;s(d.mutationInQueue,d.builtNode)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(n)throw n.error}}var f=this.iframe.contentDocument,p=f.documentElement,h=f.head;this.insertStyleRules(p,h),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(x.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()},e.prototype.insertStyleRules=function(e,t){var n=document.createElement("style");e.insertBefore(n,t);var r,o=(r=this.config.blockClass,["."+r+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules);this.config.pauseAnimation&&o.push("html.rrweb-paused * { animation-play-state: paused !important; }");for(var i=0;i<o.length;i++)n.sheet.insertRule(o[i],i)},e.prototype.attachDocumentToIframe=function(e,t){var n,o,i=this,a=[];if(!t.contentDocument)for(var s=t.parentNode;s;){if(this.fragmentParentMap.has(s)){var l=s,c=this.fragmentParentMap.get(l);this.restoreRealParent(l,c);break}s=s.parentNode}m(e.node,{doc:t.contentDocument,map:this.mirror.map,hackCss:!0,skipChild:!1,afterAppend:function(e){i.collectIframeAndAttachDocument(a,e)}});var u=function(e,t){if(d.attachDocumentToIframe(e,t),d.newDocumentQueue=d.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var n=t.contentDocument,r=n.documentElement,o=n.head;d.insertStyleRules(r,o)}},d=this;try{for(var f=r(a),p=f.next();!p.done;p=f.next()){var h=p.value;u(h.mutationInQueue,h.builtNode)}}catch(e){n={error:e}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}},e.prototype.collectIframeAndAttachDocument=function(e,t){if(z(t)){var n=this.newDocumentQueue.find((function(e){return e.parentId===t.__sn.id}));n&&e.push({mutationInQueue:n,builtNode:t})}},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,o=new Set,i=this.service.state,a=function(){i=t.service.state};this.emitter.on(x.Start,a),this.emitter.on(x.Pause,a);var s=function(){t.emitter.off(x.Start,a),t.emitter.off(x.Pause,a)};n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(o.add(e),e.addEventListener("load",(function(){o.delete(e),0===o.size&&-1!==r&&(i.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(x.LoadStylesheetEnd),r&&window.clearTimeout(r),s())})))})),o.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(x.LoadStylesheetStart),r=window.setTimeout((function(){i.matches("playing")&&t.play(t.getCurrentTime()),r=-1,s()}),this.config.loadTimeout))}},e.prototype.preloadAllImages=function(){var e,t,n=this,o=(this.service.state,function(){n.service.state});this.emitter.on(x.Start,o),this.emitter.on(x.Pause,o);var i=0;try{for(var a=r(this.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(l.type===g.IncrementalSnapshot&&l.data.source===b.CanvasMutation&&"drawImage"===l.data.property&&"string"==typeof l.data.args[0]&&!this.imageMap.has(l)){i++;var c=document.createElement("canvas"),u=c.getContext("2d"),d=null==u?void 0:u.createImageData(c.width,c.height);null==d||d.data;JSON.parse(l.data.args[0]),null==u||u.putImageData(d,0,0)}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}0!==i&&this.service.send({type:"PAUSE"})},e.prototype.applyIncremental=function(e,t){var n,r,o=this,i=e.data;switch(i.source){case b.Mutation:t&&(i.adds.forEach((function(e){return o.treeIndex.add(e)})),i.texts.forEach((function(e){return o.treeIndex.text(e)})),i.attributes.forEach((function(e){return o.treeIndex.attribute(e)})),i.removes.forEach((function(e){return o.treeIndex.remove(e,o.mirror)}))),this.applyMutation(i,t);break;case b.Drag:case b.TouchMove:case b.MouseMove:if(t){var a=i.positions[i.positions.length-1];this.moveAndHover(i,a.x,a.y,a.id)}else i.positions.forEach((function(t){var n={doAction:function(){o.moveAndHover(i,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-o.service.state.context.baselineTime};o.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 b.MouseInteraction:if(-1===i.id)break;var s=new Event(w[i.type].toLowerCase());if(!(v=this.mirror.getNode(i.id)))return this.debugNodeNotFound(i,i.id);this.emitter.emit(x.MouseInteraction,{type:i.type,target:v});var l=this.config.triggerFocus;switch(i.type){case w.Blur:"blur"in v&&v.blur();break;case w.Focus:l&&v.focus&&v.focus({preventScroll:!0});break;case w.Click:case w.TouchStart:case w.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:v.dispatchEvent(s)}break;case b.Scroll:if(-1===i.id)break;if(t){this.treeIndex.scroll(i);break}this.applyScroll(i);break;case b.ViewportResize:this.emitter.emit(x.Resize,{width:i.width,height:i.height});break;case b.Input:if(-1===i.id)break;if(t){this.treeIndex.input(i);break}this.applyInput(i);break;case b.MediaInteraction:if(!(v=this.mirror.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var c=v;try{i.currentTime&&(c.currentTime=i.currentTime),i.type===S.Pause&&c.pause(),i.type===S.Play&&c.play()}catch(e){this.config.showWarning&&console.warn("Failed to replay media interactions: "+(e.message||e))}break;case b.StyleSheetRule:if(!(v=this.mirror.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var u=v,d=v.parentNode,f=this.fragmentParentMap.has(d),p=void 0;if(f){var h=this.fragmentParentMap.get(v.parentNode);p=document.createTextNode(""),d.replaceChild(p,v),h.appendChild(v)}var m=u.sheet;i.adds&&i.adds.forEach((function(e){var t=e.rule,n=e.index;try{var r=void 0===n?void 0:Math.min(n,m.rules.length);try{m.insertRule(t,r)}catch(e){}}catch(e){}})),i.removes&&i.removes.forEach((function(e){var t=e.index;try{m.deleteRule(t)}catch(e){}})),f&&p&&d.replaceChild(v,p);break;case b.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var v;if(!(v=this.mirror.getNode(i.id)))return this.debugNodeNotFound(i,i.id);try{var y=v.getContext("2d");if(i.setter)return void(y[i.property]=i.args[0]);var g=y[i.property];if("drawImage"===i.property&&"string"==typeof i.args[0]){var E=this.imageMap.get(e);i.args[0]=E,g.apply(y,i.args)}else g.apply(y,i.args)}catch(e){this.warnCanvasMutationFailed(i,i.id,e)}break;case b.Font:try{var T=new FontFace(i.family,i.buffer?new Uint8Array(JSON.parse(i.fontSource)):i.fontSource,i.descriptors);null===(r=this.iframe.contentDocument)||void 0===r||r.fonts.add(T)}catch(e){this.config.showWarning&&console.warn(e)}}},e.prototype.applyMutation=function(e,o){var i,a,s=this;e.removes.forEach((function(t){var n=s.mirror.getNode(t.id);if(!n)return s.warnNodeNotFound(e,t.id);var r=s.mirror.getNode(t.parentId);if(!r)return s.warnNodeNotFound(e,t.parentId);if(t.isShadow&&Y(r)&&(r=r.shadowRoot),s.mirror.removeNodeFromMap(n),r){var o="__sn"in r?s.fragmentParentMap.get(r):void 0;if(o&&o.contains(n))o.removeChild(n);else if(s.fragmentParentMap.has(n)){var i=s.fragmentParentMap.get(n);r.removeChild(i),s.fragmentParentMap.delete(n)}else r.removeChild(n)}}));var l=n({},this.legacy_missingNodeRetryMap),c=[],u=function(e){var n,r;if(!s.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var i=s.mirror.getNode(e.parentId);if(!i)return e.node.type===t.Document?s.newDocumentQueue.push(e):c.push(e);var a=null;s.iframe.contentDocument.contains?a=s.iframe.contentDocument.contains(i):s.iframe.contentDocument.body.contains&&(a=s.iframe.contentDocument.body.contains(i));var u=(null===(r=(n=i).getElementsByTagName)||void 0===r?void 0:r.call(n,"iframe").length)>0;if(o&&a&&!z(i)&&!u){var d=document.createDocumentFragment();for(s.mirror.map[e.parentId]=d,s.fragmentParentMap.set(d,i),s.storeState(i);i.firstChild;)d.appendChild(i.firstChild);i=d}e.node.isShadow&&Y(i)&&(i=i.shadowRoot);var f=null,p=null;if(e.previousId&&(f=s.mirror.getNode(e.previousId)),e.nextId&&(p=s.mirror.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=s.mirror.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return c.push(e);if(!e.node.rootId||s.mirror.getNode(e.node.rootId)){var h=e.node.rootId?s.mirror.getNode(e.node.rootId):s.iframe.contentDocument;if(z(i))s.attachDocumentToIframe(e,i);else{var v=m(e.node,{doc:h,map:s.mirror.map,skipChild:!0,hackCss:!0});if(-1!==e.previousId&&-1!==e.nextId){if(f&&f.nextSibling&&f.nextSibling.parentNode)i.insertBefore(v,f.nextSibling);else if(p&&p.parentNode)i.contains(p)?i.insertBefore(v,p):i.insertBefore(v,null);else{if(i===h)for(;h.firstChild;)h.removeChild(h.firstChild);i.appendChild(v)}if(z(v)){var y=s.newDocumentQueue.find((function(e){return e.parentId===v.__sn.id}));if(y&&(s.attachDocumentToIframe(y,v),s.newDocumentQueue=s.newDocumentQueue.filter((function(e){return e!==y}))),v.contentDocument){var g=v.contentDocument,b=g.documentElement,w=g.head;s.insertStyleRules(b,w)}}(e.previousId||e.nextId)&&s.legacy_resolveMissingNode(l,i,v,e)}else l[e.node.id]={node:v,mutation:e}}}};e.adds.forEach((function(e){u(e)}));for(var d=Date.now();c.length;){var f=U(c);if(c.length=0,Date.now()-d>500){this.warn("Timeout in the loop, please check the resolve tree data:",f);break}try{for(var p=(i=void 0,r(f)),h=p.next();!h.done;h=p.next()){var v=h.value;this.mirror.getNode(v.value.parentId)?W(v,(function(e){u(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",v)}}catch(e){i={error:e}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}}Object.keys(l).length&&Object.assign(this.legacy_missingNodeRetryMap,l),e.texts.forEach((function(t){var n=s.mirror.getNode(t.id);if(!n)return s.warnNodeNotFound(e,t.id);s.fragmentParentMap.has(n)&&(n=s.fragmentParentMap.get(n)),n.textContent=t.value})),e.attributes.forEach((function(t){var n=s.mirror.getNode(t.id);if(!n)return s.warnNodeNotFound(e,t.id);for(var r in s.fragmentParentMap.has(n)&&(n=s.fragmentParentMap.get(n)),t.attributes)if("string"==typeof r){var o=t.attributes[r];try{null!==o?n.setAttribute(r,o):n.removeAttribute(r)}catch(e){s.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",e)}}}))},e.prototype.applyScroll=function(e){var t=this.mirror.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=this.mirror.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 o=r.previousId,i=r.nextId,a=o&&e[o],s=i&&e[i];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,n),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}if(s){var d=s;c=d.node,u=d.mutation;t.insertBefore(c,n.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}},e.prototype.moveAndHover=function(e,t,n,r){var o=this.mirror.getNode(r);if(!o)return this.debugNodeNotFound(e,r);var i=function e(t,n){var r,o,i=null===(o=null===(r=t.ownerDocument)||void 0===r?void 0:r.defaultView)||void 0===o?void 0:o.frameElement;if(!i||i===n)return{x:0,y:0,relativeScale:1,absoluteScale:1};var a=i.getBoundingClientRect(),s=e(i,n),l=a.height/i.clientHeight;return{x:a.x*s.relativeScale+s.x,y:a.y*s.relativeScale+s.y,relativeScale:l,absoluteScale:s.absoluteScale*l}}(o,this.iframe),a=t*i.absoluteScale+i.x,s=n*i.absoluteScale+i.y;this.mouse.style.left=a+"px",this.mouse.style.top=s+"px",this.drawMouseTail({x:a,y:s}),this.hoverElements(o)},e.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?H:Object.assign({},H,this.config.mouseTail),r=n.lineCap,o=n.lineWidth,i=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=o,e.lineCap=r,e.strokeStyle=i,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/this.speedService.state.context.timer.speed)}},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===g.IncrementalSnapshot&&(e.data.source>b.Mutation&&e.data.source<=b.Input)},e.prototype.backToNormal=function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(x.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},e.prototype.restoreRealParent=function(e,n){this.mirror.map[n.__sn.id]=n,n.__sn.type===t.Element&&"textarea"===n.__sn.tagName&&e.textContent&&(n.value=e.textContent),n.appendChild(e),this.restoreState(n)},e.prototype.storeState=function(e){var t,n;if(e&&e.nodeType===e.ELEMENT_NODE){var o=e;(o.scrollLeft||o.scrollTop)&&this.elementStateMap.set(e,{scroll:[o.scrollLeft,o.scrollTop]});var i=o.children;try{for(var a=r(Array.from(i)),s=a.next();!s.done;s=a.next()){var l=s.value;this.storeState(l)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}},e.prototype.restoreState=function(e){var t,n;if(e.nodeType===e.ELEMENT_NODE){var o=e;if(this.elementStateMap.has(e)){var i=this.elementStateMap.get(e);i.scroll&&(o.scrollLeft=i.scroll[0],o.scrollTop=i.scroll[1]),this.elementStateMap.delete(e)}var a=o.children;try{for(var s=r(Array.from(a)),l=s.next();!l.done;l=s.next()){var c=l.value;this.restoreState(c)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}}},e.prototype.warnNodeNotFound=function(e,t){this.warn("Node with id '"+t+"' not found in",e)},e.prototype.warnCanvasMutationFailed=function(e,t,n){this.warn("Has error on update canvas '"+t+"'",e,n)},e.prototype.debugNodeNotFound=function(e,t){this.debug("[replayer]","Node with id '"+t+"' not found in",e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showWarning&&console.warn.apply(console,i(["[replayer]"],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showDebug&&console.log.apply(console,i(["[replayer]"],e))},e}();return e.Replayer=G,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
***************************************************************************** */!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(M||(M={}));var C={type:"xstate.init"};function D(e){return void 0===e?[]:[].concat(e)}function A(e){return{type:"xstate.assign",assignment:e}}function k(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 _(e){return function(t){return e===t}}function R(e){return"string"==typeof e?{type:e}:e}function F(e,t){return{value:e,context:t,actions:[],changed:!1,matches:_(e)}}function O(e,t){void 0===t&&(t={});var n={config:e,_options:t,initialState:{value:e.initial,actions:D(e.states[e.initial].entry).map((function(e){return k(e,t.actions)})),context:e.context,matches:_(e.initial)},transition:function(t,r){var i,o,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,l=a.context,c=R(r),u=e.states[s];if(u.on){var d=D(u.on[c.type]),f=function(t){if(void 0===t)return{value:F(s,l)};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=l;if((void 0===f?function(){return!0}:f)(l,c)){var h=e.states[o],m=!1,v=[].concat(u.exit,d,h.entry).filter((function(e){return e})).map((function(e){return k(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,c):Object.keys(e.assignment).forEach((function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](p,c):e.assignment[n]})),p=t,!1}return!0}));return{value:{value:o,context:p,actions:v,changed:o!==s||v.length>0||m,matches:_(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 F(s,l)}};return n}var P=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function L(e){var t=e.initialState,n=M.NotStarted,r=new Set,i={_machine:e,send:function(i){n===M.Running&&(t=e.transition(t,i),P(t,R(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(r){if(r){var o="object"==typeof r?r:{context:e.config.context,value:r};t={value:o.value,actions:[],context:o.context,matches:_(o.value)}}return n=M.Running,P(t,C),i},stop:function(){return n=M.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}var j="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",B={map:{},getId:function(){return console.error(j),-1},getNode:function(){return console.error(j),null},removeNodeFromMap:function(){console.error(j)},has:function(){return console.error(j),!1},reset:function(){console.error(j)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(B=new Proxy(B,{get:function(e,t,n){return"map"===t&&console.error(j),Reflect.get(e,t,n)}}));var V=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,t){var n=this,r=this.indexes.get(e.parentId),i=this.indexes.get(e.id),o=function(e){n.removeIdSet.add(e);var r=t.getNode(e);null==r||r.childNodes.forEach((function(e){"__sn"in e&&o(e.__sn.id)}))},a=function(t){n.removeIdSet.add(t.id),Object.values(t.children).forEach((function(e){return a(e)}));var r=n.indexes.get(t.id);if(r){var i=r.parent;i&&(delete r.parent,delete i.children[r.id],n.indexes.delete(e.id))}};i?r?(delete i.parent,delete r.children[i.id],this.indexes.delete(e.id),a(i)):(delete this.tree[i.id],this.indexes.delete(i.id),a(i)):(this.removeNodeMutations.push(e),o(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,l=this.textMutations,c=this.attributeMutations,u={source:S.Mutation,removes:s,texts:l,attributes:c,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()),v=m.next();!v.done;v=m.next()){h=v.value;this.removeIdSet.has(h)&&this.inputMap.delete(h)}}catch(e){n={error:e}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}var y=new Map(this.scrollMap),g=new Map(this.inputMap);return this.reset(),{mutationData:u,scrollMap:y,inputMap:g}},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 U(e){var t,n,i={},o=function(e,t){var n={value:e,parent:t,children:[]};return i[e.node.id]=n,n},a=[];try{for(var s=r(e),l=s.next();!l.done;l=s.next()){var c=l.value,u=c.nextId,d=c.parentId;if(u&&u in i){var f=i[u];if(f.parent){var p=f.parent.children.indexOf(f);f.parent.children.splice(p,0,o(c,f.parent))}else{p=a.indexOf(f);a.splice(p,0,o(c,null))}}else if(d in i){var h=i[d];h.children.push(o(c,h))}else a.push(o(c,null))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a}function W(e,t){t(e.value);for(var n=e.children.length-1;n>=0;n--)W(e.children[n],t)}function z(e){return"__sn"in e&&(e.__sn.type===t.Element&&"iframe"===e.__sn.tagName)}function Y(e){var t;return Boolean(null===(t=e)||void 0===t?void 0:t.shadowRoot)}function X(e,t){var i=t.getCastFn,o=t.emitter;return L(O({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:A({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:A((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,l,c=e.timer,u=e.events,d=e.baselineTime,f=e.lastPlayedEvent;c.clear();try{for(var p=r(u),h=p.next();!h.done;h=p.next()){I(h.value,d)}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}var m=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===g.Meta&&r.timestamp<=t)return e.slice(n)}return e}(u,d),v=null==f?void 0:f.timestamp;(null==f?void 0:f.type)===g.IncrementalSnapshot&&f.data.source===S.MouseMove&&(v=f.timestamp+(null===(l=f.data.positions[0])||void 0===l?void 0:l.timeOffset)),d<(v||0)&&o.emit(x.PlayBack);var y=new Array,b=function(e){if(v&&v<d&&(e.timestamp<=v||e===f))return"continue";var t=e.timestamp<d;if(t&&!function(e){switch(e.type){case g.DomContentLoaded:case g.Load:case g.Custom:return!1;case g.FullSnapshot:case g.Meta:case g.Plugin:return!0}switch(e.data.source){case S.MouseMove:case S.MouseInteraction:case S.TouchMove:case S.MediaInteraction:return!1;case S.ViewportResize:case S.StyleSheetRule:case S.Scroll:case S.Input:return!0}return!0}(e))return"continue";var n=i(e,t);t?n():y.push({doAction:function(){n(),o.emit(x.EventCast,e)},delay:e.delay})};try{for(var w=r(m),E=w.next();!E.done;E=w.next()){b(E.value)}}catch(e){a={error:e}}finally{try{E&&!E.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}o.emit(x.Flush),c.addActions(y),c.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:A((function(e){return n(n({},e),{lastPlayedEvent:null})})),startLive:A({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:A((function(e,t){var r=e.baselineTime,a=e.timer,s=e.events;if("ADD_EVENT"===t.type){var l=t.payload.event;I(l,r);var c=s.length-1;if(!s[c]||s[c].timestamp<=l.timestamp)s.push(l);else{for(var u=-1,d=0;d<=c;){var f=Math.floor((d+c)/2);s[f].timestamp<=l.timestamp?d=f+1:c=f-1}-1===u&&(u=d),s.splice(u,0,l)}var p=l.timestamp<r,h=i(l,p);p?h():a.isActive()&&a.addAction({doAction:function(){h(),o.emit(x.EventCast,l)},delay:l.delay})}return n(n({},e),{events:s})}))}}))}var Q;function H(e,t){e.forEach((function(e){var n,r;if(e.type===Q.Insert)try{null===(n=t.sheet)||void 0===n||n.insertRule(e.cssText,e.index)}catch(e){}else if(e.type===Q.Remove)try{null===(r=t.sheet)||void 0===r||r.deleteRule(e.index)}catch(e){}else e.type===Q.Snapshot&&function(e,t){var n;try{var r=Array.from((null===(n=t.sheet)||void 0===n?void 0:n.cssRules)||[]).map((function(e){return e.cssText})),o=Object.entries(r).reverse(),a=r.length;o.forEach((function(n){var r,o=i(n,2),s=o[0],l=o[1],c=e.indexOf(l);if(-1===c||c>a)try{null===(r=t.sheet)||void 0===r||r.deleteRule(Number(s))}catch(e){}a=c})),e.forEach((function(e,n){var r,i,o;try{(null===(i=null===(r=t.sheet)||void 0===r?void 0:r.cssRules[n])||void 0===i?void 0:i.cssText)!==e&&(null===(o=t.sheet)||void 0===o||o.insertRule(e,n))}catch(e){}}))}catch(e){}}(e.cssTexts,t)}))}!function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot"}(Q||(Q={}));var G=y||E,q={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"},$=function(){function e(e,t){var n=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=G(),this.legacy_missingNodeRetryMap={},this.imageMap=new Map,this.mirror={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,n=e.__sn&&e.__sn.id;delete this.map[n],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}},this.firstFullSnapshot=null,this.newDocumentQueue=[],!(null==t?void 0:t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");var i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:q};this.config=Object.assign({},i,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on(x.Resize,this.handleResize),this.setupDom(),this.treeIndex=new V,this.fragmentParentMap=new Map,this.elementStateMap=new Map,this.virtualStyleRulesMap=new Map,this.emitter.on(x.Flush,(function(){var e,t,i,o,a,s,l=n.treeIndex.flush(),c=l.scrollMap,u=l.inputMap;n.fragmentParentMap.forEach((function(e,t){return n.restoreRealParent(t,e)}));try{for(var d=r(n.virtualStyleRulesMap.keys()),f=d.next();!f.done;f=d.next()){var p=f.value;n.restoreNodeSheet(p)}}catch(t){e={error:t}}finally{try{f&&!f.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}n.fragmentParentMap.clear(),n.elementStateMap.clear(),n.virtualStyleRulesMap.clear();try{for(var h=r(c.values()),m=h.next();!m.done;m=h.next()){var v=m.value;n.applyScroll(v)}}catch(e){i={error:e}}finally{try{m&&!m.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}try{for(var y=r(u.values()),g=y.next();!g.done;g=y.next()){v=g.value;n.applyInput(v)}}catch(e){a={error:e}}finally{try{g&&!g.done&&(s=y.return)&&s.call(y)}finally{if(a)throw a.error}}})),this.emitter.on(x.PlayBack,(function(){n.firstFullSnapshot=null,n.mirror.reset()}));var o=new N([],(null==t?void 0:t.speed)||i.speed);this.service=X({events:e.map((function(e){return t&&t.unpackFn?t.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:o,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){n.emitter.emit(x.StateChange,{player:e})})),this.speedService=L(O({id:"speed",context:{normalSpeed:-1,timer:o},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:A({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(e){n.emitter.emit(x.StateChange,{speed:e})}));var a=this.service.state.context.events.find((function(e){return e.type===g.Meta})),s=this.service.state.context.events.find((function(e){return e.type===g.FullSnapshot}));if(a){var l=a.data,c=l.width,u=l.height;setTimeout((function(){n.emitter.emit(x.Resize,{width:c,height:u})}),0)}s&&setTimeout((function(){n.firstFullSnapshot||(n.firstFullSnapshot=s,n.rebuildFullSnapshot(s),n.iframe.contentWindow.scrollTo(s.data.initialOffset))}),1)}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){return this.emitter.on(e,t),this},e.prototype.off=function(e,t){return this.emitter.off(e,t),this},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}}),void 0!==e.mouseTail&&(!1===e.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))},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.getMirror=function(){return this.mirror},e.prototype.play=function(e){var t;void 0===e&&(e=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}}),null===(t=this.iframe.contentDocument)||void 0===t||t.getElementsByTagName("html")[0].classList.remove("rrweb-paused"),this.emitter.emit(x.Start)},e.prototype.pause=function(e){var t;void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),null===(t=this.iframe.contentDocument)||void 0===t||t.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(x.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(x.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="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var e,t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(T(this.iframe.contentWindow,this.iframe.contentDocument),void 0===(e=this.iframe.contentWindow)&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1}))},e.prototype.handleResize=function(e){var t,n;this.iframe.style.display="inherit";try{for(var i=r([this.mouseTail,this.iframe]),o=i.next();!o.done;o=i.next()){var a=o.value;a&&(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 g.DomContentLoaded:case g.Load:break;case g.Custom:n=function(){i.emitter.emit(x.CustomEvent,e)};break;case g.Meta:n=function(){return i.emitter.emit(x.Resize,{width:e.data.width,height:e.data.height})};break;case g.FullSnapshot:n=function(){if(i.firstFullSnapshot){if(i.firstFullSnapshot===e)return void(i.firstFullSnapshot=!0)}else i.firstFullSnapshot=!0;i.rebuildFullSnapshot(e,t),i.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case g.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 l=s.value;if(!(l.timestamp<=e.timestamp)&&i.isUserInteraction(l)){l.delay-e.delay>1e4*i.speedService.state.context.timer.speed&&(i.nextUserInteractionEvent=l);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 c=i.nextUserInteractionEvent.delay-e.delay,u={speed:Math.min(Math.round(c/5e3),i.config.maxSpeed)};i.speedService.send({type:"FAST_FORWARD",payload:u}),i.emitter.emit(x.SkipStart,u)}}}}return function(){var o,a;n&&n();try{for(var s=r(i.config.plugins||[]),l=s.next();!l.done;l=s.next()){l.value.handler(e,t,{replayer:i})}}catch(e){o={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}i.service.send({type:"CAST_EVENT",payload:{event:e}});var c=i.service.state.context.events.length-1;if(e===i.service.state.context.events[c]){var u=function(){c<i.service.state.context.events.length-1||(i.backToNormal(),i.service.send("END"),i.emitter.emit(x.Finish))};e.type===g.IncrementalSnapshot&&e.data.source===S.MouseMove&&e.data.positions.length?setTimeout((function(){u()}),Math.max(0,50-e.data.positions[0].timeOffset)):u()}}},e.prototype.rebuildFullSnapshot=function(e,t){var n,i,o=this;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={};var a=[];this.mirror.map=v(e.data.node,{doc:this.iframe.contentDocument,afterAppend:function(e){o.collectIframeAndAttachDocument(a,e)}})[1];var s=function(e,t){if(l.attachDocumentToIframe(e,t),l.newDocumentQueue=l.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var n=t.contentDocument,r=n.documentElement,i=n.head;l.insertStyleRules(r,i)}},l=this;try{for(var c=r(a),u=c.next();!u.done;u=c.next()){var d=u.value;s(d.mutationInQueue,d.builtNode)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}var f=this.iframe.contentDocument,p=f.documentElement,h=f.head;this.insertStyleRules(p,h),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(x.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()},e.prototype.insertStyleRules=function(e,t){var n=document.createElement("style");e.insertBefore(n,t);var r,i=(r=this.config.blockClass,["."+r+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules);this.config.pauseAnimation&&i.push("html.rrweb-paused * { animation-play-state: paused !important; }");for(var o=0;o<i.length;o++)n.sheet.insertRule(i[o],o)},e.prototype.attachDocumentToIframe=function(e,t){var n,i,o=this,a=[];if(!t.contentDocument)for(var s=t.parentNode;s;){if(this.fragmentParentMap.has(s)){var l=s,c=this.fragmentParentMap.get(l);this.restoreRealParent(l,c);break}s=s.parentNode}m(e.node,{doc:t.contentDocument,map:this.mirror.map,hackCss:!0,skipChild:!1,afterAppend:function(e){o.collectIframeAndAttachDocument(a,e)}});var u=function(e,t){if(d.attachDocumentToIframe(e,t),d.newDocumentQueue=d.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var n=t.contentDocument,r=n.documentElement,i=n.head;d.insertStyleRules(r,i)}},d=this;try{for(var f=r(a),p=f.next();!p.done;p=f.next()){var h=p.value;u(h.mutationInQueue,h.builtNode)}}catch(e){n={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}},e.prototype.collectIframeAndAttachDocument=function(e,t){if(z(t)){var n=this.newDocumentQueue.find((function(e){return e.parentId===t.__sn.id}));n&&e.push({mutationInQueue:n,builtNode:t})}},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(x.Start,a),this.emitter.on(x.Pause,a);var s=function(){t.emitter.off(x.Start,a),t.emitter.off(x.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(x.LoadStylesheetEnd),r&&window.clearTimeout(r),s())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(x.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,function(){n.service.state});this.emitter.on(x.Start,i),this.emitter.on(x.Pause,i);var o=0;try{for(var a=r(this.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(l.type===g.IncrementalSnapshot&&l.data.source===S.CanvasMutation&&"drawImage"===l.data.property&&"string"==typeof l.data.args[0]&&!this.imageMap.has(l)){o++;var c=document.createElement("canvas"),u=c.getContext("2d"),d=null==u?void 0:u.createImageData(c.width,c.height);null==d||d.data;JSON.parse(l.data.args[0]),null==u||u.putImageData(d,0,0)}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}0!==o&&this.service.send({type:"PAUSE"})},e.prototype.applyIncremental=function(e,t){var n,r,i=this,o=e.data;switch(o.source){case S.Mutation:t&&(o.adds.forEach((function(e){return i.treeIndex.add(e)})),o.texts.forEach((function(e){return i.treeIndex.text(e)})),o.attributes.forEach((function(e){return i.treeIndex.attribute(e)})),o.removes.forEach((function(e){return i.treeIndex.remove(e,i.mirror)})));try{this.applyMutation(o,t)}catch(e){this.warn("Exception in mutation "+(e.message||e),o)}break;case S.Drag:case S.TouchMove:case S.MouseMove:if(t){var a=o.positions[o.positions.length-1];this.moveAndHover(o,a.x,a.y,a.id)}else o.positions.forEach((function(t){var n={doAction:function(){i.moveAndHover(o,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-i.service.state.context.baselineTime};i.timer.addAction(n)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(n=o.positions[0])||void 0===n?void 0:n.timeOffset)});break;case S.MouseInteraction:if(-1===o.id)break;var s=new Event(b[o.type].toLowerCase());if(!(m=this.mirror.getNode(o.id)))return this.debugNodeNotFound(o,o.id);this.emitter.emit(x.MouseInteraction,{type:o.type,target:m});var l=this.config.triggerFocus;switch(o.type){case b.Blur:"blur"in m&&m.blur();break;case b.Focus:l&&m.focus&&m.focus({preventScroll:!0});break;case b.Click:case b.TouchStart:case b.TouchEnd:t||(this.moveAndHover(o,o.x,o.y,o.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:m.dispatchEvent(s)}break;case S.Scroll:if(-1===o.id)break;if(t){this.treeIndex.scroll(o);break}this.applyScroll(o);break;case S.ViewportResize:this.emitter.emit(x.Resize,{width:o.width,height:o.height});break;case S.Input:if(-1===o.id)break;if(t){this.treeIndex.input(o);break}this.applyInput(o);break;case S.MediaInteraction:if(!(m=this.mirror.getNode(o.id)))return this.debugNodeNotFound(o,o.id);var c=m;try{o.currentTime&&(c.currentTime=o.currentTime),o.type===w.Pause&&c.pause(),o.type===w.Play&&c.play()}catch(e){this.config.showWarning&&console.warn("Failed to replay media interactions: "+(e.message||e))}break;case S.StyleSheetRule:if(!(m=this.mirror.getNode(o.id)))return this.debugNodeNotFound(o,o.id);var u,d=m,f=m.parentNode,p=this.fragmentParentMap.has(f),h=p?null:d.sheet;h||(this.virtualStyleRulesMap.has(m)?u=this.virtualStyleRulesMap.get(m):(u=[],this.virtualStyleRulesMap.set(m,u))),o.adds&&o.adds.forEach((function(e){var t=e.rule,n=e.index;if(h)try{var r=void 0===n?void 0:Math.min(n,h.cssRules.length);try{h.insertRule(t,r)}catch(e){}}catch(e){}else null==u||u.push({cssText:t,index:n,type:Q.Insert})})),o.removes&&o.removes.forEach((function(e){var t=e.index;if(p)null==u||u.push({index:t,type:Q.Remove});else try{null==h||h.deleteRule(t)}catch(e){}}));break;case S.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var m;if(!(m=this.mirror.getNode(o.id)))return this.debugNodeNotFound(o,o.id);try{var v=m.getContext("2d");if(o.setter)return void(v[o.property]=o.args[0]);var y=v[o.property];if("drawImage"===o.property&&"string"==typeof o.args[0]){var g=this.imageMap.get(e);o.args[0]=g,y.apply(v,o.args)}else y.apply(v,o.args)}catch(e){this.warnCanvasMutationFailed(o,o.id,e)}break;case S.Font:try{var E=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);null===(r=this.iframe.contentDocument)||void 0===r||r.fonts.add(E)}catch(e){this.config.showWarning&&console.warn(e)}}},e.prototype.applyMutation=function(e,i){var o,a,s=this;e.removes.forEach((function(t){var n=s.mirror.getNode(t.id);if(!n){if(e.removes.find((function(e){return e.id===t.parentId})))return;return s.warnNodeNotFound(e,t.id)}var r=s.mirror.getNode(t.parentId);if(!r)return s.warnNodeNotFound(e,t.parentId);if(t.isShadow&&Y(r)&&(r=r.shadowRoot),s.mirror.removeNodeFromMap(n),r){var i=null,o="__sn"in r?s.fragmentParentMap.get(r):void 0;o&&o.contains(n)?r=o:s.fragmentParentMap.has(n)&&(i=s.fragmentParentMap.get(n),s.fragmentParentMap.delete(n),n=i);try{r.removeChild(n)}catch(t){if(!(t instanceof DOMException))throw t;s.warn("parent could not remove child in mutation",r,o,n,i,e)}}}));var l=n({},this.legacy_missingNodeRetryMap),c=[],u=function(e){var n,r;if(!s.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var o=s.mirror.getNode(e.parentId);if(!o)return e.node.type===t.Document?s.newDocumentQueue.push(e):c.push(e);var a=null;s.iframe.contentDocument.contains?a=s.iframe.contentDocument.contains(o):s.iframe.contentDocument.body.contains&&(a=s.iframe.contentDocument.body.contains(o));var u=(null===(r=(n=o).getElementsByTagName)||void 0===r?void 0:r.call(n,"iframe").length)>0;if(i&&a&&!z(o)&&!u){var d=document.createDocumentFragment();for(s.mirror.map[e.parentId]=d,s.fragmentParentMap.set(d,o),s.storeState(o);o.firstChild;)d.appendChild(o.firstChild);o=d}e.node.isShadow&&Y(o)&&(o=o.shadowRoot);var f=null,p=null;if(e.previousId&&(f=s.mirror.getNode(e.previousId)),e.nextId&&(p=s.mirror.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=s.mirror.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return c.push(e);if(!e.node.rootId||s.mirror.getNode(e.node.rootId)){var h=e.node.rootId?s.mirror.getNode(e.node.rootId):s.iframe.contentDocument;if(z(o))s.attachDocumentToIframe(e,o);else{var v=m(e.node,{doc:h,map:s.mirror.map,skipChild:!0,hackCss:!0});if(-1!==e.previousId&&-1!==e.nextId){if(f&&f.nextSibling&&f.nextSibling.parentNode)o.insertBefore(v,f.nextSibling);else if(p&&p.parentNode)o.contains(p)?o.insertBefore(v,p):o.insertBefore(v,null);else{if(o===h)for(;h.firstChild;)h.removeChild(h.firstChild);o.appendChild(v)}if(z(v)){var y=s.newDocumentQueue.find((function(e){return e.parentId===v.__sn.id}));if(y&&(s.attachDocumentToIframe(y,v),s.newDocumentQueue=s.newDocumentQueue.filter((function(e){return e!==y}))),v.contentDocument){var g=v.contentDocument,S=g.documentElement,b=g.head;s.insertStyleRules(S,b)}}(e.previousId||e.nextId)&&s.legacy_resolveMissingNode(l,o,v,e)}else l[e.node.id]={node:v,mutation:e}}}};e.adds.forEach((function(e){u(e)}));for(var d=Date.now();c.length;){var f=U(c);if(c.length=0,Date.now()-d>500){this.warn("Timeout in the loop, please check the resolve tree data:",f);break}try{for(var p=(o=void 0,r(f)),h=p.next();!h.done;h=p.next()){var v=h.value;this.mirror.getNode(v.value.parentId)?W(v,(function(e){u(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",v)}}catch(e){o={error:e}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(o)throw o.error}}}Object.keys(l).length&&Object.assign(this.legacy_missingNodeRetryMap,l),e.texts.forEach((function(t){var n=s.mirror.getNode(t.id);if(!n){if(e.removes.find((function(e){return e.id===t.id})))return;return s.warnNodeNotFound(e,t.id)}s.fragmentParentMap.has(n)&&(n=s.fragmentParentMap.get(n)),n.textContent=t.value})),e.attributes.forEach((function(t){var n=s.mirror.getNode(t.id);if(!n){if(e.removes.find((function(e){return e.id===t.id})))return;return s.warnNodeNotFound(e,t.id)}for(var r in s.fragmentParentMap.has(n)&&(n=s.fragmentParentMap.get(n)),t.attributes)if("string"==typeof r){var i=t.attributes[r];if(null===i)n.removeAttribute(r);else if("string"==typeof i)try{n.setAttribute(r,i)}catch(e){s.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",e)}else if("style"===r){var o=i,a=n;for(var l in o)if(!1===o[l])a.style.removeProperty(l);else if(o[l]instanceof Array){var c=o[l];a.style.setProperty(l,c[0],c[1])}else{var u=o[l];a.style.setProperty(l,u)}}}}))},e.prototype.applyScroll=function(e){var t=this.mirror.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=this.mirror.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 l=a,c=l.node,u=l.mutation;t.insertBefore(c,n),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}if(s){var d=s;c=d.node,u=d.mutation;t.insertBefore(c,n.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}},e.prototype.moveAndHover=function(e,t,n,r){var i=this.mirror.getNode(r);if(!i)return this.debugNodeNotFound(e,r);var o=function e(t,n){var r,i,o=null===(i=null===(r=t.ownerDocument)||void 0===r?void 0:r.defaultView)||void 0===i?void 0:i.frameElement;if(!o||o===n)return{x:0,y:0,relativeScale:1,absoluteScale:1};var a=o.getBoundingClientRect(),s=e(o,n),l=a.height/o.clientHeight;return{x:a.x*s.relativeScale+s.x,y:a.y*s.relativeScale+s.y,relativeScale:l,absoluteScale:s.absoluteScale*l}}(i,this.iframe),a=t*o.absoluteScale+o.x,s=n*o.absoluteScale+o.y;this.mouse.style.left=a+"px",this.mouse.style.top=s+"px",this.drawMouseTail({x:a,y:s}),this.hoverElements(i)},e.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?q:Object.assign({},q,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/this.speedService.state.context.timer.speed)}},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===g.IncrementalSnapshot&&(e.data.source>S.Mutation&&e.data.source<=S.Input)},e.prototype.backToNormal=function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(x.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},e.prototype.restoreRealParent=function(e,n){this.mirror.map[n.__sn.id]=n,n.__sn.type===t.Element&&"textarea"===n.__sn.tagName&&e.textContent&&(n.value=e.textContent),n.appendChild(e),this.restoreState(n)},e.prototype.storeState=function(e){var t,n;if(e&&e.nodeType===e.ELEMENT_NODE){var i=e;(i.scrollLeft||i.scrollTop)&&this.elementStateMap.set(e,{scroll:[i.scrollLeft,i.scrollTop]}),"STYLE"===i.tagName&&function(e,t){var n;try{var r=Array.from((null===(n=e.sheet)||void 0===n?void 0:n.cssRules)||[]).map((function(e){return e.cssText}));t.set(e,[{type:Q.Snapshot,cssTexts:r}])}catch(e){}}(i,this.virtualStyleRulesMap);var o=i.children;try{for(var a=r(Array.from(o)),s=a.next();!s.done;s=a.next()){var l=s.value;this.storeState(l)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}},e.prototype.restoreState=function(e){var t,n;if(e.nodeType===e.ELEMENT_NODE){var i=e;if(this.elementStateMap.has(e)){var o=this.elementStateMap.get(e);o.scroll&&(i.scrollLeft=o.scroll[0],i.scrollTop=o.scroll[1]),this.elementStateMap.delete(e)}var a=i.children;try{for(var s=r(Array.from(a)),l=s.next();!l.done;l=s.next()){var c=l.value;this.restoreState(c)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}}},e.prototype.restoreNodeSheet=function(e){var t=this.virtualStyleRulesMap.get(e);"STYLE"===e.nodeName&&(t&&H(t,e))},e.prototype.warnNodeNotFound=function(e,t){this.treeIndex.removeIdSet.has(t)?this.warn("Node with id '"+t+"' was previously removed. ",e):this.warn("Node with id '"+t+"' not found. ",e)},e.prototype.warnCanvasMutationFailed=function(e,t,n){this.warn("Has error on update canvas '"+t+"'",e,n)},e.prototype.debugNodeNotFound=function(e,t){this.treeIndex.removeIdSet.has(t)?this.debug("[replayer]","Node with id '"+t+"' was previously removed. ",e):this.debug("[replayer]","Node with id '"+t+"' not found. ",e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showWarning&&console.warn.apply(console,o(["[replayer]"],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showDebug&&console.log.apply(console,o(["[replayer]"],e))},e}();return e.Replayer=$,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
//# sourceMappingURL=rrweb-replay.min.js.map

@@ -78,3 +78,3 @@ var NodeType;

}
var URL_IN_CSS_REF = /url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm;
var URL_IN_CSS_REF = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm;
var RELATIVE_PATH = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/;

@@ -465,3 +465,7 @@ var DATA_URI = /^(data:)([^,]*),(.*)/i;

sn.attributes.rel === 'preload' &&
sn.attributes.as === 'script'))) {
sn.attributes.as === 'script') ||
(sn.tagName === 'link' &&
sn.attributes.rel === 'prefetch' &&
typeof sn.attributes.href === 'string' &&
sn.attributes.href.endsWith('.js')))) {
return true;

@@ -1210,4 +1214,4 @@ }

}
function escapeRegExp(string) {
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
function escapeRegExp(str) {
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}

@@ -1233,4 +1237,5 @@ var HOVER_SELECTOR = /([^\\]):hover/;

});
if (selectors.length === 0)
if (selectors.length === 0) {
return cssText;
}
var selectorMatcher = new RegExp(selectors

@@ -1299,6 +1304,13 @@ .filter(function (selector, index) { return selectors.indexOf(selector) === index; })

n.attributes['http-equiv'] === 'Content-Security-Policy' &&
name == 'content') {
name === 'content') {
node_1.setAttribute('csp-content', value);
return "continue";
}
else if (tagName === 'link' &&
n.attributes.rel === 'preload' &&
n.attributes.as === 'script') ;
else if (tagName === 'link' &&
n.attributes.rel === 'prefetch' &&
typeof n.attributes.href === 'string' &&
n.attributes.href.endsWith('.js')) ;
else {

@@ -1305,0 +1317,0 @@ node_1.setAttribute(name, value);

@@ -17,3 +17,3 @@ import { __assign, __read } from '../../ext/tslib/tslib.es6.js';

if (options === void 0) { options = {}; }
var emit = options.emit, checkoutEveryNms = options.checkoutEveryNms, checkoutEveryNth = options.checkoutEveryNth, _a = options.blockClass, blockClass = _a === void 0 ? 'rr-block' : _a, _b = options.blockSelector, blockSelector = _b === void 0 ? null : _b, _c = options.ignoreClass, ignoreClass = _c === void 0 ? 'rr-ignore' : _c, _d = options.maskTextClass, maskTextClass = _d === void 0 ? 'rr-mask' : _d, _e = options.maskTextSelector, maskTextSelector = _e === void 0 ? null : _e, _f = options.inlineStylesheet, inlineStylesheet = _f === void 0 ? true : _f, maskAllInputs = options.maskAllInputs, _maskInputOptions = options.maskInputOptions, _slimDOMOptions = options.slimDOMOptions, maskInputFn = options.maskInputFn, maskTextFn = options.maskTextFn, hooks = options.hooks, packFn = options.packFn, _g = options.sampling, sampling = _g === void 0 ? {} : _g, mousemoveWait = options.mousemoveWait, _h = options.recordCanvas, recordCanvas = _h === void 0 ? false : _h, _j = options.collectFonts, collectFonts = _j === void 0 ? false : _j, plugins = options.plugins, _k = options.keepIframeSrcFn, keepIframeSrcFn = _k === void 0 ? function () { return false; } : _k;
var emit = options.emit, checkoutEveryNms = options.checkoutEveryNms, checkoutEveryNth = options.checkoutEveryNth, _a = options.blockClass, blockClass = _a === void 0 ? 'rr-block' : _a, _b = options.blockSelector, blockSelector = _b === void 0 ? null : _b, _c = options.ignoreClass, ignoreClass = _c === void 0 ? 'rr-ignore' : _c, _d = options.maskTextClass, maskTextClass = _d === void 0 ? 'rr-mask' : _d, _e = options.maskTextSelector, maskTextSelector = _e === void 0 ? null : _e, _f = options.inlineStylesheet, inlineStylesheet = _f === void 0 ? true : _f, maskAllInputs = options.maskAllInputs, _maskInputOptions = options.maskInputOptions, _slimDOMOptions = options.slimDOMOptions, maskInputFn = options.maskInputFn, maskTextFn = options.maskTextFn, hooks = options.hooks, packFn = options.packFn, _g = options.sampling, sampling = _g === void 0 ? {} : _g, mousemoveWait = options.mousemoveWait, _h = options.recordCanvas, recordCanvas = _h === void 0 ? false : _h, _j = options.userTriggeredOnInput, userTriggeredOnInput = _j === void 0 ? false : _j, _k = options.collectFonts, collectFonts = _k === void 0 ? false : _k, plugins = options.plugins, _l = options.keepIframeSrcFn, keepIframeSrcFn = _l === void 0 ? function () { return false; } : _l;
if (!emit) {

@@ -255,2 +255,3 @@ throw new Error('emit function is required');

recordCanvas: recordCanvas,
userTriggeredOnInput: userTriggeredOnInput,
collectFonts: collectFonts,

@@ -257,0 +258,0 @@ doc: doc,

@@ -296,2 +296,3 @@ import { __values } from '../../ext/tslib/tslib.es6.js';

case 'attributes': {
var target = m.target;
var value = m.target.getAttribute(m.attributeName);

@@ -318,3 +319,37 @@ if (m.attributeName === 'value') {

}
item.attributes[m.attributeName] = transformAttribute(_this.doc, m.target.tagName, m.attributeName, value);
if (m.attributeName === 'style') {
var old = _this.doc.createElement('span');
if (m.oldValue) {
old.setAttribute('style', m.oldValue);
}
if (item.attributes['style'] === undefined ||
item.attributes['style'] === null) {
item.attributes['style'] = {};
}
var styleObj = item.attributes['style'];
for (var i = 0; i < target.style.length; i++) {
var pname = target.style[i];
var newValue = target.style.getPropertyValue(pname);
var newPriority = target.style.getPropertyPriority(pname);
if (newValue != old.style.getPropertyValue(pname) ||
newPriority != old.style.getPropertyPriority(pname)) {
if (newPriority == '') {
styleObj[pname] = newValue;
}
else {
styleObj[pname] = [newValue, newPriority];
}
}
}
for (var i = 0; i < old.style.length; i++) {
var pname = old.style[i];
if (target.style.getPropertyValue(pname) === '' ||
!target.style.getPropertyValue(pname)) {
styleObj[pname] = false;
}
}
}
else {
item.attributes[m.attributeName] = transformAttribute(_this.doc, m.target.tagName, m.attributeName, value);
}
break;

@@ -321,0 +356,0 @@ }

@@ -185,7 +185,14 @@ import { __values, __spread, __assign } from '../../ext/tslib/tslib.es6.js';

}
function wrapEventWithUserTriggeredFlag(v, enable) {
var value = __assign({}, v);
if (!enable)
delete value.userTriggered;
return value;
}
var INPUT_TAGS = ['INPUT', 'TEXTAREA', 'SELECT'];
var lastInputValueMap = new WeakMap();
function initInputObserver(cb, doc, mirror, blockClass, ignoreClass, maskInputOptions, maskInputFn, sampling) {
function initInputObserver(cb, doc, mirror, blockClass, ignoreClass, maskInputOptions, maskInputFn, sampling, userTriggeredOnInput) {
function eventHandler(event) {
var target = getEventTarget(event);
var userTriggered = event.isTrusted;
if (!target ||

@@ -216,3 +223,3 @@ !target.tagName ||

}
cbWithDedup(target, { text: text, isChecked: isChecked });
cbWithDedup(target, wrapEventWithUserTriggeredFlag({ text: text, isChecked: isChecked, userTriggered: userTriggered }, userTriggeredOnInput));
var name = target.name;

@@ -224,6 +231,7 @@ if (type === 'radio' && name && isChecked) {

if (el !== target) {
cbWithDedup(el, {
cbWithDedup(el, wrapEventWithUserTriggeredFlag({
text: el.value,
isChecked: !isChecked,
});
userTriggered: false,
}, userTriggeredOnInput));
}

@@ -536,3 +544,3 @@ });

var viewportResizeHandler = initViewportResizeObserver(o.viewportResizeCb);
var inputHandler = initInputObserver(o.inputCb, o.doc, o.mirror, o.blockClass, o.ignoreClass, o.maskInputOptions, o.maskInputFn, o.sampling);
var inputHandler = initInputObserver(o.inputCb, o.doc, o.mirror, o.blockClass, o.ignoreClass, o.maskInputOptions, o.maskInputFn, o.sampling, o.userTriggeredOnInput);
var mediaInteractionHandler = initMediaInteractionObserver(o.mediaInteractionCb, o.blockClass, o.mirror);

@@ -539,0 +547,0 @@ var styleSheetObserver = initStyleSheetObserver(o.styleSheetRuleCb, o.mirror);

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

import rules from './styles/inject-style.js';
import { StyleRuleType, storeCSSRules, applyVirtualStyleRulesToNode } from './virtual-styles.js';

@@ -61,14 +62,13 @@ var SKIP_TIME_THRESHOLD = 10 * 1000;

this.elementStateMap = new Map();
this.virtualStyleRulesMap = new Map();
this.emitter.on(ReplayerEvents.Flush, function () {
var e_1, _a, e_2, _b;
var _c = _this.treeIndex.flush(), scrollMap = _c.scrollMap, inputMap = _c.inputMap;
var e_1, _a, e_2, _b, e_3, _c;
var _d = _this.treeIndex.flush(), scrollMap = _d.scrollMap, inputMap = _d.inputMap;
_this.fragmentParentMap.forEach(function (parent, frag) {
return _this.restoreRealParent(frag, parent);
});
_this.fragmentParentMap.clear();
_this.elementStateMap.clear();
try {
for (var _d = __values(scrollMap.values()), _e = _d.next(); !_e.done; _e = _d.next()) {
var d = _e.value;
_this.applyScroll(d);
for (var _e = __values(_this.virtualStyleRulesMap.keys()), _f = _e.next(); !_f.done; _f = _e.next()) {
var node = _f.value;
_this.restoreNodeSheet(node);
}

@@ -79,10 +79,13 @@ }

try {
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
if (_f && !_f.done && (_a = _e.return)) _a.call(_e);
}
finally { if (e_1) throw e_1.error; }
}
_this.fragmentParentMap.clear();
_this.elementStateMap.clear();
_this.virtualStyleRulesMap.clear();
try {
for (var _f = __values(inputMap.values()), _g = _f.next(); !_g.done; _g = _f.next()) {
var d = _g.value;
_this.applyInput(d);
for (var _g = __values(scrollMap.values()), _h = _g.next(); !_h.done; _h = _g.next()) {
var d = _h.value;
_this.applyScroll(d);
}

@@ -93,6 +96,19 @@ }

try {
if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
}
finally { if (e_2) throw e_2.error; }
}
try {
for (var _j = __values(inputMap.values()), _k = _j.next(); !_k.done; _k = _j.next()) {
var d = _k.value;
_this.applyInput(d);
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (_k && !_k.done && (_c = _j.return)) _c.call(_j);
}
finally { if (e_3) throw e_3.error; }
}
});

@@ -306,3 +322,3 @@ this.emitter.on(ReplayerEvents.PlayBack, function () {

Replayer.prototype.handleResize = function (dimension) {
var e_3, _a;
var e_4, _a;
this.iframe.style.display = 'inherit';

@@ -319,3 +335,3 @@ try {

}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
catch (e_4_1) { e_4 = { error: e_4_1 }; }
finally {

@@ -325,3 +341,3 @@ try {

}
finally { if (e_3) throw e_3.error; }
finally { if (e_4) throw e_4.error; }
}

@@ -367,3 +383,3 @@ };

castFn = function () {
var e_4, _a;
var e_5, _a;
_this.applyIncremental(event, isSync);

@@ -394,3 +410,3 @@ if (isSync) {

}
catch (e_4_1) { e_4 = { error: e_4_1 }; }
catch (e_5_1) { e_5 = { error: e_5_1 }; }
finally {

@@ -400,3 +416,3 @@ try {

}
finally { if (e_4) throw e_4.error; }
finally { if (e_5) throw e_5.error; }
}

@@ -416,3 +432,3 @@ if (_this.nextUserInteractionEvent) {

var wrappedCastFn = function () {
var e_5, _a;
var e_6, _a;
if (castFn) {

@@ -427,3 +443,3 @@ castFn();

}
catch (e_5_1) { e_5 = { error: e_5_1 }; }
catch (e_6_1) { e_6 = { error: e_6_1 }; }
finally {

@@ -433,8 +449,7 @@ try {

}
finally { if (e_5) throw e_5.error; }
finally { if (e_6) throw e_6.error; }
}
_this.service.send({ type: 'CAST_EVENT', payload: { event: event } });
var last_index = _this.service.state.context.events.length - 1;
if (event ===
_this.service.state.context.events[last_index]) {
if (event === _this.service.state.context.events[last_index]) {
var finish_1 = function () {

@@ -463,3 +478,3 @@ if (last_index < _this.service.state.context.events.length - 1) {

Replayer.prototype.rebuildFullSnapshot = function (event, isSync) {
var e_6, _a;
var e_7, _a;
var _this = this;

@@ -496,3 +511,3 @@ if (isSync === void 0) { isSync = false; }

}
catch (e_6_1) { e_6 = { error: e_6_1 }; }
catch (e_7_1) { e_7 = { error: e_7_1 }; }
finally {

@@ -502,3 +517,3 @@ try {

}
finally { if (e_6) throw e_6.error; }
finally { if (e_7) throw e_7.error; }
}

@@ -532,3 +547,3 @@ var _c = this.iframe.contentDocument, documentElement = _c.documentElement, head = _c.head;

Replayer.prototype.attachDocumentToIframe = function (mutation, iframeEl) {
var e_7, _a;
var e_8, _a;
var _this = this;

@@ -572,3 +587,3 @@ var collected = [];

}
catch (e_7_1) { e_7 = { error: e_7_1 }; }
catch (e_8_1) { e_8 = { error: e_8_1 }; }
finally {

@@ -578,3 +593,3 @@ try {

}
finally { if (e_7) throw e_7.error; }
finally { if (e_8) throw e_8.error; }
}

@@ -641,3 +656,3 @@ };

Replayer.prototype.preloadAllImages = function () {
var e_8, _a;
var e_9, _a;
var _this = this;

@@ -670,3 +685,3 @@ var beforeLoadState = this.service.state;

}
catch (e_8_1) { e_8 = { error: e_8_1 }; }
catch (e_9_1) { e_9 = { error: e_9_1 }; }
finally {

@@ -676,3 +691,3 @@ try {

}
finally { if (e_8) throw e_8.error; }
finally { if (e_9) throw e_9.error; }
}

@@ -695,3 +710,8 @@ if (count !== resolved) {

}
this.applyMutation(d, isSync);
try {
this.applyMutation(d, isSync);
}
catch (error) {
this.warn("Exception in mutation " + (error.message || error), d);
}
break;

@@ -825,20 +845,27 @@ }

var parent = target.parentNode;
var usingVirtualParent = this.fragmentParentMap.has(parent);
var placeholderNode = void 0;
if (usingVirtualParent) {
var domParent = this.fragmentParentMap.get(target.parentNode);
placeholderNode = document.createTextNode('');
parent.replaceChild(placeholderNode, target);
domParent.appendChild(target);
var usingVirtualParent_1 = this.fragmentParentMap.has(parent);
var styleSheet_1 = usingVirtualParent_1 ? null : styleEl.sheet;
var rules_1;
if (!styleSheet_1) {
if (this.virtualStyleRulesMap.has(target)) {
rules_1 = this.virtualStyleRulesMap.get(target);
}
else {
rules_1 = [];
this.virtualStyleRulesMap.set(target, rules_1);
}
}
var styleSheet_1 = styleEl.sheet;
if (d.adds) {
d.adds.forEach(function (_a) {
var rule = _a.rule, index = _a.index;
try {
var _index = index === undefined
? undefined
: Math.min(index, styleSheet_1.rules.length);
if (styleSheet_1) {
try {
styleSheet_1.insertRule(rule, _index);
var _index = index === undefined
? undefined
: Math.min(index, styleSheet_1.cssRules.length);
try {
styleSheet_1.insertRule(rule, _index);
}
catch (e) {
}
}

@@ -848,3 +875,4 @@ catch (e) {

}
catch (e) {
else {
rules_1 === null || rules_1 === void 0 ? void 0 : rules_1.push({ cssText: rule, index: index, type: StyleRuleType.Insert });
}

@@ -856,12 +884,14 @@ });

var index = _a.index;
try {
styleSheet_1.deleteRule(index);
if (usingVirtualParent_1) {
rules_1 === null || rules_1 === void 0 ? void 0 : rules_1.push({ index: index, type: StyleRuleType.Remove });
}
catch (e) {
else {
try {
styleSheet_1 === null || styleSheet_1 === void 0 ? void 0 : styleSheet_1.deleteRule(index);
}
catch (e) {
}
}
});
}
if (usingVirtualParent && placeholderNode) {
parent.replaceChild(target, placeholderNode);
}
break;

@@ -913,3 +943,3 @@ }

Replayer.prototype.applyMutation = function (d, useVirtualParent) {
var e_9, _a;
var e_10, _a;
var _this = this;

@@ -919,2 +949,5 @@ d.removes.forEach(function (mutation) {

if (!target) {
if (d.removes.find(function (r) { return r.id === mutation.parentId; })) {
return;
}
return _this.warnNodeNotFound(d, mutation.id);

@@ -931,14 +964,23 @@ }

if (parent) {
var realTarget = null;
var realParent = '__sn' in parent ? _this.fragmentParentMap.get(parent) : undefined;
if (realParent && realParent.contains(target)) {
realParent.removeChild(target);
parent = realParent;
}
else if (_this.fragmentParentMap.has(target)) {
var realTarget = _this.fragmentParentMap.get(target);
parent.removeChild(realTarget);
realTarget = _this.fragmentParentMap.get(target);
_this.fragmentParentMap.delete(target);
target = realTarget;
}
else {
try {
parent.removeChild(target);
}
catch (error) {
if (error instanceof DOMException) {
_this.warn('parent could not remove child in mutation', parent, realParent, target, realTarget, d);
}
else {
throw error;
}
}
}

@@ -1074,3 +1116,3 @@ });

try {
for (var resolveTrees_1 = (e_9 = void 0, __values(resolveTrees)), resolveTrees_1_1 = resolveTrees_1.next(); !resolveTrees_1_1.done; resolveTrees_1_1 = resolveTrees_1.next()) {
for (var resolveTrees_1 = (e_10 = void 0, __values(resolveTrees)), resolveTrees_1_1 = resolveTrees_1.next(); !resolveTrees_1_1.done; resolveTrees_1_1 = resolveTrees_1.next()) {
var tree = resolveTrees_1_1.value;

@@ -1088,3 +1130,3 @@ var parent = this.mirror.getNode(tree.value.parentId);

}
catch (e_9_1) { e_9 = { error: e_9_1 }; }
catch (e_10_1) { e_10 = { error: e_10_1 }; }
finally {

@@ -1094,3 +1136,3 @@ try {

}
finally { if (e_9) throw e_9.error; }
finally { if (e_10) throw e_10.error; }
}

@@ -1104,2 +1146,5 @@ }

if (!target) {
if (d.removes.find(function (r) { return r.id === mutation.id; })) {
return;
}
return _this.warnNodeNotFound(d, mutation.id);

@@ -1115,2 +1160,5 @@ }

if (!target) {
if (d.removes.find(function (r) { return r.id === mutation.id; })) {
return;
}
return _this.warnNodeNotFound(d, mutation.id);

@@ -1124,13 +1172,30 @@ }

var value = mutation.attributes[attributeName];
try {
if (value !== null) {
if (value === null) {
target.removeAttribute(attributeName);
}
else if (typeof value === 'string') {
try {
target.setAttribute(attributeName, value);
}
else {
target.removeAttribute(attributeName);
catch (error) {
if (_this.config.showWarning) {
console.warn('An error occurred may due to the checkout feature.', error);
}
}
}
catch (error) {
if (_this.config.showWarning) {
console.warn('An error occurred may due to the checkout feature.', error);
else if (attributeName === 'style') {
var styleValues = value;
var targetEl = target;
for (var s in styleValues) {
if (styleValues[s] === false) {
targetEl.style.removeProperty(s);
}
else if (styleValues[s] instanceof Array) {
var svp = styleValues[s];
targetEl.style.setProperty(s, svp[0], svp[1]);
}
else {
var svs = styleValues[s];
targetEl.style.setProperty(s, svs);
}
}

@@ -1284,3 +1349,3 @@ }

Replayer.prototype.storeState = function (parent) {
var e_10, _a;
var e_11, _a;
if (parent) {

@@ -1294,2 +1359,4 @@ if (parent.nodeType === parent.ELEMENT_NODE) {

}
if (parentElement.tagName === 'STYLE')
storeCSSRules(parentElement, this.virtualStyleRulesMap);
var children = parentElement.children;

@@ -1302,3 +1369,3 @@ try {

}
catch (e_10_1) { e_10 = { error: e_10_1 }; }
catch (e_11_1) { e_11 = { error: e_11_1 }; }
finally {

@@ -1308,3 +1375,3 @@ try {

}
finally { if (e_10) throw e_10.error; }
finally { if (e_11) throw e_11.error; }
}

@@ -1315,3 +1382,3 @@ }

Replayer.prototype.restoreState = function (parent) {
var e_11, _a;
var e_12, _a;
if (parent.nodeType === parent.ELEMENT_NODE) {

@@ -1334,3 +1401,3 @@ var parentElement = parent;

}
catch (e_11_1) { e_11 = { error: e_11_1 }; }
catch (e_12_1) { e_12 = { error: e_12_1 }; }
finally {

@@ -1340,8 +1407,24 @@ try {

}
finally { if (e_11) throw e_11.error; }
finally { if (e_12) throw e_12.error; }
}
}
};
Replayer.prototype.restoreNodeSheet = function (node) {
var storedRules = this.virtualStyleRulesMap.get(node);
if (node.nodeName !== 'STYLE') {
return;
}
if (!storedRules) {
return;
}
var styleNode = node;
applyVirtualStyleRulesToNode(storedRules, styleNode);
};
Replayer.prototype.warnNodeNotFound = function (d, id) {
this.warn("Node with id '" + id + "' not found in", d);
if (this.treeIndex['removeIdSet'].has(id)) {
this.warn("Node with id '" + id + "' was previously removed. ", d);
}
else {
this.warn("Node with id '" + id + "' not found. ", d);
}
};

@@ -1352,3 +1435,8 @@ Replayer.prototype.warnCanvasMutationFailed = function (d, id, error) {

Replayer.prototype.debugNodeNotFound = function (d, id) {
this.debug(REPLAY_CONSOLE_PREFIX, "Node with id '" + id + "' not found in", d);
if (this.treeIndex['removeIdSet'].has(id)) {
this.debug(REPLAY_CONSOLE_PREFIX, "Node with id '" + id + "' was previously removed. ", d);
}
else {
this.debug(REPLAY_CONSOLE_PREFIX, "Node with id '" + id + "' not found. ", d);
}
};

@@ -1355,0 +1443,0 @@ Replayer.prototype.warn = function () {

{
"name": "rrweb",
"version": "1.0.1",
"version": "1.0.2",
"description": "record and replay the web",

@@ -8,3 +8,4 @@ "scripts": {

"prepack": "npm run bundle",
"test": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register test/**/*.test.ts",
"test": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register -r ignore-styles -r jsdom-global/register test/**.test.ts",
"test:headless": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true PUPPETEER_HEADLESS=true mocha -r ts-node/register -r ignore-styles -r jsdom-global/register test/**.test.ts",
"test:watch": "PUPPETEER_HEADLESS=true npm run test -- --watch --watch-extensions js,ts",

@@ -14,3 +15,4 @@ "repl": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true ts-node scripts/repl.ts",

"bundle": "rollup --config",
"typings": "tsc -d --declarationDir typings"
"typings": "tsc -d --declarationDir typings",
"check-types": "tsc -noEmit"
},

@@ -44,9 +46,15 @@ "repository": {

"@types/inquirer": "0.0.43",
"@types/jsdom": "^16.2.12",
"@types/mocha": "^5.2.5",
"@types/node": "^10.11.7",
"@types/node": "^12.20.16",
"@types/prettier": "^2.3.2",
"@types/puppeteer": "^5.4.3",
"chai": "^4.2.0",
"cross-env": "^5.2.0",
"fast-mhtml": "^1.1.9",
"ignore-styles": "^5.0.1",
"inquirer": "^6.2.1",
"jest-snapshot": "^23.6.0",
"jsdom": "^16.6.0",
"jsdom-global": "^3.0.2",
"mocha": "^5.2.0",

@@ -72,4 +80,4 @@ "prettier": "2.2.1",

"mitt": "^1.1.3",
"rrweb-snapshot": "^1.1.6"
"rrweb-snapshot": "^1.1.7"
}
}

@@ -21,2 +21,3 @@ import { Timer } from './timer';

private elementStateMap;
private virtualStyleRulesMap;
private imageMap;

@@ -63,2 +64,3 @@ private mirror;

private restoreState;
private restoreNodeSheet;
private warnNodeNotFound;

@@ -65,0 +67,0 @@ private warnCanvasMutationFailed;

@@ -147,2 +147,3 @@ import { serializedNodeWithId, idNodeMap, INode, MaskInputOptions, SlimDOMOptions, MaskInputFn, MaskTextFn } from 'rrweb-snapshot';

recordCanvas?: boolean;
userTriggeredOnInput?: boolean;
collectFonts?: boolean;

@@ -175,2 +176,3 @@ plugins?: RecordPlugin[];

recordCanvas: boolean;
userTriggeredOnInput: boolean;
collectFonts: boolean;

@@ -216,6 +218,10 @@ slimDOMOptions: SlimDOMOptions;

};
export declare type styleAttributeValue = {
[key: string]: styleValueWithPriority | string | false;
};
export declare type styleValueWithPriority = [string, string];
export declare type attributeCursor = {
node: Node;
attributes: {
[key: string]: string | null;
[key: string]: string | styleAttributeValue | null;
};

@@ -226,3 +232,3 @@ };

attributes: {
[key: string]: string | null;
[key: string]: string | styleAttributeValue | null;
};

@@ -316,2 +322,3 @@ };

isChecked: boolean;
userTriggered?: boolean;
};

@@ -318,0 +325,0 @@ export declare type inputCallback = (v: inputValue & {

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 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 too big to display

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

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