@highlight-run/rrweb 1.0.8 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.highlightLib=t():e.highlightLib=t()}(self,(function(){return(()=>{"use strict";var e={537:(e,t,n)=>{function r(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}var o;n.r(t),n.d(t,{InterpreterStatus:()=>o,assign:()=>s,createMachine:()=>f,interpret:()=>m}),function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(o||(o={}));var i={type:"xstate.init"};function a(e){return void 0===e?[]:[].concat(e)}function s(e){return{type:"xstate.assign",assignment:e}}function l(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 c(e){return function(t){return e===t}}function u(e){return"string"==typeof e?{type:e}:e}function d(e,t){return{value:e,context:t,actions:[],changed:!1,matches:c(e)}}function p(e,t,n){var r=t,o=!1;return[e.filter((function(e){if("xstate.assign"===e.type){o=!0;var t=Object.assign({},r);return"function"==typeof e.assignment?t=e.assignment(r,n):Object.keys(e.assignment).forEach((function(o){t[o]="function"==typeof e.assignment[o]?e.assignment[o](r,n):e.assignment[o]})),r=t,!1}return!0})),r,o]}function f(e,t){void 0===t&&(t={});var n=r(p(a(e.states[e.initial].entry).map((function(e){return l(e,t.actions)})),e.context,i),2),o=n[0],s=n[1],f={config:e,_options:t,initialState:{value:e.initial,actions:o,context:s,matches:c(e.initial)},transition:function(t,n){var o,i,s="string"==typeof t?{value:t,context:e.context}:t,h=s.value,m=s.context,v=u(n),y=e.states[h];if(y.on){var g=a(y.on[v.type]);try{for(var S=function(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.")}(g),b=S.next();!b.done;b=S.next()){var T=b.value;if(void 0===T)return d(h,m);var I="string"==typeof T?{target:T}:T,x=I.target,E=I.actions,w=void 0===E?[]:E,C=I.cond,k=void 0===x;if((void 0===C?function(){return!0}:C)(m,v)){var N=e.states[null!=x?x:h],M=r(p((k?a(w):[].concat(y.exit,w,N.entry).filter((function(e){return e}))).map((function(e){return l(e,f._options.actions)})),m,v),3),R=M[0],O=M[1],_=M[2],D=null!=x?x:h;return{value:D,context:O,actions:R,changed:x!==h||R.length>0||_,matches:c(D)}}}}catch(e){o={error:e}}finally{try{b&&!b.done&&(i=S.return)&&i.call(S)}finally{if(o)throw o.error}}}return d(h,m)}};return f}var h=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function m(e){var t=e.initialState,n=o.NotStarted,r=new Set,a={_machine:e,send:function(i){n===o.Running&&(t=e.transition(t,i),h(t,u(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 s="object"==typeof r?r:{context:e.config.context,value:r};t={value:s.value,actions:[],context:s.context,matches:c(s.value)}}return n=o.Running,h(t,i),a},stop:function(){return n=o.Stopped,r.clear(),a},get state(){return t},get status(){return n}};return a}},380:(e,t,n)=>{n.r(t)},652:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r=function(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)}))}}}},463:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IframeManager=void 0;var n=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}();t.IframeManager=n},476:function(e,t,n){var r=this&&this.__assign||function(){return(r=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)},o=this&&this.__read||function(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};Object.defineProperty(t,"__esModule",{value:!0});var i,a,s=n(348),l=n(584),c=n(593),u=n(699),d=n(463),p=n(783);function f(e){return r(r({},e),{timestamp:Date.now()})}var h=c.createMirror();function m(e){void 0===e&&(e={});var t=e.emit,n=e.checkoutEveryNms,m=e.checkoutEveryNth,v=e.blockClass,y=void 0===v?"highlight-block":v,g=e.blockSelector,S=void 0===g?null:g,b=e.ignoreClass,T=void 0===b?"highlight-ignore":b,I=e.maskTextClass,x=void 0===I?"highlight-mask":I,E=e.maskTextSelector,w=void 0===E?null:E,C=e.inlineStylesheet,k=void 0===C||C,N=e.maskAllInputs,M=e.maskInputOptions,R=e.slimDOMOptions,O=e.maskInputFn,_=e.maskTextFn,D=e.hooks,P=e.packFn,A=e.sampling,F=void 0===A?{}:A,L=e.mousemoveWait,j=e.recordCanvas,B=void 0!==j&&j,W=e.userTriggeredOnInput,z=void 0!==W&&W,V=e.collectFonts,H=void 0!==V&&V,U=e.plugins,G=e.keepIframeSrcFn,Y=void 0===G?function(){return!1}:G,X=e.enableStrictPrivacy,q=void 0!==X&&X;if(!t)throw new Error("emit function is required");void 0!==L&&void 0===F.mousemove&&(F.mousemove=L);var Q,$=!0===N?{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!==M?M:{password:!0},K=!0===R||"all"===R?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===R,headMetaDescKeywords:"all"===R}:R||{};c.polyfill();var J=0;i=function(e,r){var o;if(!(null===(o=l.mutationBuffers[0])||void 0===o?void 0:o.isFrozen())||e.type===u.EventType.FullSnapshot||e.type===u.EventType.IncrementalSnapshot&&e.data.source===u.IncrementalSource.Mutation||l.mutationBuffers.forEach((function(e){return e.unfreeze()})),t(P?P(e):e,r),e.type===u.EventType.FullSnapshot)Q=e,J=0;else if(e.type===u.EventType.IncrementalSnapshot){if(e.data.source===u.IncrementalSource.Mutation&&e.data.isAttachIframe)return;J++;var i=m&&J>=m,s=n&&e.timestamp-Q.timestamp>n;(i||s)&&a(!0)}};var Z=function(e){i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.Mutation},e)}))},ee=function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.Scroll},e)}))},te=new d.IframeManager({mutationCb:Z}),ne=new p.ShadowDomManager({mutationCb:Z,scrollCb:ee,bypassOptions:{blockClass:y,blockSelector:S,maskTextClass:x,maskTextSelector:w,inlineStylesheet:k,maskInputOptions:$,maskTextFn:_,maskInputFn:O,recordCanvas:B,sampling:F,slimDOMOptions:K,iframeManager:te,enableStrictPrivacy:q},mirror:h});a=function(e){var t,n,r,a;void 0===e&&(e=!1),i(f({type:u.EventType.Meta,data:{href:window.location.href,width:c.getWindowWidth(),height:c.getWindowHeight()}}),e),l.mutationBuffers.forEach((function(e){return e.lock()}));var d=o(s.snapshot(document,{blockClass:y,blockSelector:S,maskTextClass:x,maskTextSelector:w,inlineStylesheet:k,maskAllInputs:$,maskTextFn:_,slimDOM:K,recordCanvas:B,enableStrictPrivacy:q,onSerialize:function(e){c.isIframeINode(e)&&te.addIframe(e),c.hasShadowRoot(e)&&ne.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){te.attachIframe(e,t)},keepIframeSrcFn:Y}),2),p=d[0],m=d[1];if(!p)return console.warn("Failed to snapshot the document");h.map=m,i(f({type:u.EventType.FullSnapshot,data:{node:p,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}}})),l.mutationBuffers.forEach((function(e){return e.unlock()}))};try{var re=[];re.push(c.on("DOMContentLoaded",(function(){i(f({type:u.EventType.DomContentLoaded,data:{}}))})));var oe=function(e){return l.initObservers({mutationCb:Z,mousemoveCb:function(e,t){return i(f({type:u.EventType.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.MouseInteraction},e)}))},scrollCb:ee,viewportResizeCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.ViewportResize},e)}))},inputCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.Input},e)}))},mediaInteractionCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.StyleDeclaration},e)}))},canvasMutationCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.CanvasMutation},e)}))},fontCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.Font},e)}))},blockClass:y,ignoreClass:T,maskTextClass:x,maskTextSelector:w,maskInputOptions:$,inlineStylesheet:k,sampling:F,recordCanvas:B,userTriggeredOnInput:z,collectFonts:H,doc:e,maskInputFn:O,maskTextFn:_,blockSelector:S,slimDOMOptions:K,mirror:h,iframeManager:te,shadowDomManager:ne,plugins:(null==U?void 0:U.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return i(f({type:u.EventType.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[],enableStrictPrivacy:q},D)};te.addLoadListener((function(e){re.push(oe(e.contentDocument))}));var ie=function(){a(),re.push(oe(document))};return"interactive"===document.readyState||"complete"===document.readyState?ie():re.push(c.on("load",(function(){i(f({type:u.EventType.Load,data:{}})),ie()}),window)),function(){re.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}m.addCustomEvent=function(e,t){if(!i)throw new Error("please add custom event after start recording");i(f({type:u.EventType.Custom,data:{tag:e,payload:t}}))},m.freezePage=function(){l.mutationBuffers.forEach((function(e){return e.freeze()}))},m.takeFullSnapshot=function(e){if(!a)throw new Error("please take full snapshot after start recording");a(e)},m.mirror=h,t.default=m},899:function(e,t,n){var r=this&&this.__values||function(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.")};Object.defineProperty(t,"__esModule",{value:!0});var o=n(348),i=n(593);function a(e){return"__ln"in e}var s=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&&a(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 e.nextSibling&&a(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)):(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}(),l=function(e,t){return e+"@"+t};function c(e){return"__sn"in e}var u=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,n,a,l;if(!e.frozen&&!e.locked){for(var c=[],u=new s,d=function(t){for(var n=t,r=o.IGNORED_NODE;r===o.IGNORED_NODE;)r=(n=n&&n.nextSibling)&&e.mirror.getId(n);return r},h=function(t){var n,r=t.getRootNode?null===(n=t.getRootNode())||void 0===n?void 0:n.host:null,a=!(e.doc.contains(t)||r instanceof Node&&e.doc.contains(r));if(t.parentNode&&!a){var s=o.isShadowRoot(t.parentNode)?e.mirror.getId(r):e.mirror.getId(t.parentNode),l=d(t);if(-1===s||-1===l)return u.addNode(t);var p=o.serializeNodeWithId(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,enableStrictPrivacy:e.enableStrictPrivacy,onSerialize:function(n){i.isIframeINode(n)&&e.iframeManager.addIframe(n),i.hasShadowRoot(t)&&e.shadowDomManager.addShadowRoot(t.shadowRoot,document)},onIframeLoad:function(t,n){e.iframeManager.attachIframe(t,n)}});p&&c.push({parentId:s,nextId:l,node:p})}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());try{for(var m=r(e.movedSet),v=m.next();!v.done;v=m.next()){var y=v.value;p(e.removes,y,e.mirror)&&!e.movedSet.has(y.parentNode)||h(y)}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}try{for(var g=r(e.addedSet),S=g.next();!S.done;S=g.next())y=S.value,f(e.droppedSet,y)||p(e.removes,y,e.mirror)?f(e.movedSet,y)?h(y):e.droppedSet.add(y):h(y)}catch(e){a={error:e}}finally{try{S&&!S.done&&(l=g.return)&&l.call(g)}finally{if(a)throw a.error}}for(var b=null;u.length;){var T=null;if(b){var I=e.mirror.getId(b.value.parentNode),x=d(b.value);-1!==I&&-1!==x&&(T=b)}if(!T)for(var E=u.length-1;E>=0;E--){var w=u.get(E);if(w&&(I=e.mirror.getId(w.value.parentNode),x=d(w.value),-1!==I&&-1!==x)){T=w;break}}if(!T){for(;u.head;)u.removeNode(u.head.value);break}b=T.previous,u.removeNode(T.value),h(T.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:c};(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(!i.isIgnored(t.target))switch(t.type){case"characterData":var n=t.target.textContent;i.isBlocked(t.target,e.blockClass)||n===t.oldValue||e.texts.push({value:o.needMaskingText(t.target,e.maskTextClass,e.maskTextSelector)&&n?e.maskTextFn?e.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break;case"attributes":if(t.target,n=t.target.getAttribute(t.attributeName),"value"===t.attributeName&&(n=o.maskInputValue({maskInputOptions:e.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:n,maskInputFn:e.maskInputFn})),i.isBlocked(t.target,e.blockClass)||n===t.oldValue)return;var r=e.attributes.find((function(e){return e.node===t.target}));if(r||(r={node:t.target,attributes:{}},e.attributes.push(r)),"INPUT"===t.target.tagName){var a=t.target;if("password"===a.type){r.attributes.value="*".repeat(a.value.length);break}}r.attributes[t.attributeName]=o.transformAttribute(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),a=o.isShadowRoot(t.target)?e.mirror.getId(t.target.host):e.mirror.getId(t.target);i.isBlocked(t.target,e.blockClass)||i.isIgnored(n)||(e.addedSet.has(n)?(d(e.addedSet,n),e.droppedSet.add(n)):e.addedSet.has(t.target)&&-1===r||i.isAncestorRemoved(t.target,e.mirror)||(e.movedSet.has(n)&&e.movedMap[l(r,a)]?d(e.movedSet,n):e.removes.push({parentId:a,id:r,isShadow:!!o.isShadowRoot(t.target)||void 0})),e.mapRemoves.push(n))}))}},this.genAdds=function(t,n){if(!n||!i.isBlocked(n,e.blockClass)){if(c(t)){if(i.isIgnored(t))return;e.movedSet.add(t);var r=null;n&&c(n)&&(r=n.__sn.id),r&&(e.movedMap[l(t.__sn.id,r)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);i.isBlocked(t,e.blockClass)||t.childNodes.forEach((function(t){return e.genAdds(t)}))}}}return e.prototype.init=function(e,t,n,r,o,i,a,s,l,c,u,d,p,f,h,m){this.blockClass=t,this.blockSelector=n,this.maskTextClass=r,this.maskTextSelector=o,this.inlineStylesheet=i,this.maskInputOptions=a,this.maskTextFn=s,this.maskInputFn=l,this.recordCanvas=c,this.slimDOMOptions=u,this.enableStrictPrivacy=m,this.emissionCallback=e,this.doc=d,this.mirror=p,this.iframeManager=f,this.shadowDomManager=h},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 d(e,t){e.delete(t),t.childNodes.forEach((function(t){return d(e,t)}))}function p(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}))||p(e,r,n)}function f(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||f(e,n))}t.default=u},584:function(e,t,n){var r=this&&this.__assign||function(){return(r=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)},o=this&&this.__read||function(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},i=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e},a=this&&this.__values||function(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.")};Object.defineProperty(t,"__esModule",{value:!0}),t.initObservers=t.INPUT_TAGS=t.initScrollObserver=t.initMutationObserver=t.mutationBuffers=void 0;var s=n(348),l=n(593),c=n(699),u=n(899);t.mutationBuffers=[];var d="undefined"!=typeof CSSGroupingRule,p="undefined"!=typeof CSSMediaRule,f="undefined"!=typeof CSSSupportsRule,h="undefined"!=typeof CSSConditionRule;function m(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 v(e,n,r,o,i,a,s,l,c,d,p,f,h,m,v,y,g){var S,b,T,I=new u.default;t.mutationBuffers.push(I),I.init(e,r,o,i,a,s,l,c,d,p,f,n,h,m,v,g);var x=window.MutationObserver||window.__rrMutationObserver,E=null===(T=null===(b=null===(S=window)||void 0===S?void 0:S.Zone)||void 0===b?void 0:b.__symbol__)||void 0===T?void 0:T.call(b,"MutationObserver");E&&window[E]&&(x=window[E]);var w=new x(I.processMutations.bind(I));return w.observe(y,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),w}function y(e,t,n,r,o){var i=l.throttle((function(o){var i=m(o);if(i&&!l.isBlocked(i,r)){var a=n.getId(i);if(i===t){var s=t.scrollingElement||t.documentElement;e({id:a,x:s.scrollLeft,y:s.scrollTop})}else e({id:a,x:i.scrollLeft,y:i.scrollTop})}}),o.scroll||100);return l.on("scroll",i,t)}function g(e,t){var n=r({},e);return t||delete n.userTriggered,n}t.initMutationObserver=v,t.initScrollObserver=y,t.INPUT_TAGS=["INPUT","TEXTAREA","SELECT"];var S=new WeakMap;function b(e){return function(e,t){if(d&&e.parentRule instanceof CSSGroupingRule||p&&e.parentRule instanceof CSSMediaRule||f&&e.parentRule instanceof CSSSupportsRule||h&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else n=Array.from(e.parentStyleSheet.cssRules).indexOf(e),t.unshift(n);return t}(e,[])}t.initObservers=function(e,n){var u,T;void 0===n&&(n={});var I=e.doc.defaultView;if(!I)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,o=e.mouseInteractionCb,a=e.scrollCb,s=e.viewportResizeCb,l=e.inputCb,c=e.mediaInteractionCb,u=e.styleSheetRuleCb,d=e.styleDeclarationCb,p=e.canvasMutationCb,f=e.fontCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,i(e)),n.apply(void 0,i(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,i(e)),r.apply(void 0,i(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,i(e)),o.apply(void 0,i(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,i(e)),a.apply(void 0,i(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,i(e)),s.apply(void 0,i(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,i(e)),l.apply(void 0,i(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,i(e)),c.apply(void 0,i(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,i(e)),u.apply(void 0,i(e))},e.styleDeclarationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleDeclaration&&t.styleDeclaration.apply(t,i(e)),d.apply(void 0,i(e))},e.canvasMutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.canvasMutation&&t.canvasMutation.apply(t,i(e)),p.apply(void 0,i(e))},e.fontCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.font&&t.font.apply(t,i(e)),f.apply(void 0,i(e))}}(e,n);var x,E,w,C,k,N,M,R,O,_=v(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,e.enableStrictPrivacy),D=function(e,t,n,r){if(!1===t.mousemove)return function(){};var o,i="number"==typeof t.mousemove?t.mousemove:50,a="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,s=[],u=l.throttle((function(t){var n=Date.now()-o;e(s.map((function(e){return e.timeOffset-=n,e})),t),s=[],o=null}),a),d=l.throttle((function(e){var t=m(e),n=l.isTouchEvent(e)?e.changedTouches[0]:e,i=n.clientX,a=n.clientY;o||(o=Date.now()),s.push({x:i,y:a,id:r.getId(t),timeOffset:Date.now()-o}),u("undefined"!=typeof DragEvent&&e instanceof DragEvent?c.IncrementalSource.Drag:e instanceof MouseEvent?c.IncrementalSource.MouseMove:c.IncrementalSource.TouchMove)}),i,{trailing:!1}),p=[l.on("mousemove",d,n),l.on("touchmove",d,n),l.on("drag",d,n)];return function(){p.forEach((function(e){return e()}))}}(e.mousemoveCb,e.sampling,e.doc,e.mirror),P=function(e,t,n,r,o){if(!1===o.mouseInteraction)return function(){};var i=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[];return Object.keys(c.MouseInteractions).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==i[e]})).forEach((function(o){var i=o.toLowerCase(),s=function(t){return function(o){var i=m(o);if(!l.isBlocked(i,r)){var a=l.isTouchEvent(o)?o.changedTouches[0]:o;if(a){var s=n.getId(i),u=a.clientX,d=a.clientY;e({type:c.MouseInteractions[t],id:s,x:u,y:d})}}}}(o);a.push(l.on(i,s,t))})),function(){a.forEach((function(e){return e()}))}}(e.mouseInteractionCb,e.doc,e.mirror,e.blockClass,e.sampling),A=y(e.scrollCb,e.doc,e.mirror,e.blockClass,e.sampling),F=(x=e.viewportResizeCb,E=-1,w=-1,C=l.throttle((function(){var e=l.getWindowHeight(),t=l.getWindowWidth();E===e&&w===t||(x({width:Number(t),height:Number(e)}),E=e,w=t)}),200),l.on("resize",C,window)),L=function(e,n,o,a,c,u,d,p,f){function h(e){var r=m(e),o=e.isTrusted;if(r&&r.tagName&&!(t.INPUT_TAGS.indexOf(r.tagName)<0)&&!l.isBlocked(r,a)){var i=r.type;if(!r.classList.contains(c)){var p=r.value,h=!1;"radio"===i||"checkbox"===i?h=r.checked:(u[r.tagName.toLowerCase()]||u[i])&&(p=s.maskInputValue({maskInputOptions:u,tagName:r.tagName,type:i,value:p,maskInputFn:d})),v(r,g({text:p,isChecked:h,userTriggered:o},f));var y=r.name;"radio"===i&&y&&h&&n.querySelectorAll('input[type="radio"][name="'+y+'"]').forEach((function(e){e!==r&&v(e,g({text:e.value,isChecked:!h,userTriggered:!1},f))}))}}}function v(t,n){var i=S.get(t);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){S.set(t,n);var a=o.getId(t);e(r(r({},n),{id:a}))}}var y=("last"===p.input?["change"]:["input","change"]).map((function(e){return l.on(e,h,n)})),b=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),T=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"]];return b&&b.set&&y.push.apply(y,i(T.map((function(e){return l.hookSetter(e[0],e[1],{set:function(){h({target:this})}})})))),function(){y.forEach((function(e){return e()}))}}(e.inputCb,e.doc,e.mirror,e.blockClass,e.ignoreClass,e.maskInputOptions,e.maskInputFn,e.sampling,e.userTriggeredOnInput),j=(k=e.mediaInteractionCb,N=e.blockClass,M=e.mirror,R=function(e){return function(t){var n=m(t);n&&!l.isBlocked(n,N)&&k({type:e,id:M.getId(n),currentTime:n.currentTime})}},O=[l.on("play",R(0)),l.on("pause",R(1)),l.on("seeked",R(2))],function(){O.forEach((function(e){return e()}))}),B=function(e,t,n){var r=t.CSSStyleSheet.prototype.insertRule;t.CSSStyleSheet.prototype.insertRule=function(t,o){var i=n.getId(this.ownerNode);return-1!==i&&e({id:i,adds:[{rule:t,index:o}]}),r.apply(this,arguments)};var a=t.CSSStyleSheet.prototype.deleteRule;t.CSSStyleSheet.prototype.deleteRule=function(t){var r=n.getId(this.ownerNode);return-1!==r&&e({id:r,removes:[{index:t}]}),a.apply(this,arguments)};var s={};d?s.CSSGroupingRule=t.CSSGroupingRule:(p&&(s.CSSMediaRule=t.CSSMediaRule),h&&(s.CSSConditionRule=t.CSSConditionRule),f&&(s.CSSSupportsRule=t.CSSSupportsRule));var l={};return Object.entries(s).forEach((function(t){var r=o(t,2),a=r[0],s=r[1];l[a]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=function(t,r){var o=n.getId(this.parentStyleSheet.ownerNode);return-1!==o&&e({id:o,adds:[{rule:t,index:i(b(this),[r||0])}]}),l[a].insertRule.apply(this,arguments)},s.prototype.deleteRule=function(t){var r=n.getId(this.parentStyleSheet.ownerNode);return-1!==r&&e({id:r,removes:[{index:i(b(this),[t])}]}),l[a].deleteRule.apply(this,arguments)}})),function(){t.CSSStyleSheet.prototype.insertRule=r,t.CSSStyleSheet.prototype.deleteRule=a,Object.entries(s).forEach((function(e){var t=o(e,2),n=t[0],r=t[1];r.prototype.insertRule=l[n].insertRule,r.prototype.deleteRule=l[n].deleteRule}))}}(e.styleSheetRuleCb,I,e.mirror),W=function(e,t,n){var r=t.CSSStyleDeclaration.prototype.setProperty;t.CSSStyleDeclaration.prototype.setProperty=function(t,o,i){var a,s,l=n.getId(null===(s=null===(a=this.parentRule)||void 0===a?void 0:a.parentStyleSheet)||void 0===s?void 0:s.ownerNode);return-1!==l&&e({id:l,set:{property:t,value:o,priority:i},index:b(this.parentRule)}),r.apply(this,arguments)};var o=t.CSSStyleDeclaration.prototype.removeProperty;return t.CSSStyleDeclaration.prototype.removeProperty=function(t){var r,i,a=n.getId(null===(i=null===(r=this.parentRule)||void 0===r?void 0:r.parentStyleSheet)||void 0===i?void 0:i.ownerNode);return-1!==a&&e({id:a,remove:{property:t},index:b(this.parentRule)}),o.apply(this,arguments)},function(){t.CSSStyleDeclaration.prototype.setProperty=r,t.CSSStyleDeclaration.prototype.removeProperty=o}}(e.styleDeclarationCb,I,e.mirror),z=e.recordCanvas?function(e,t,n,r){var o,s,c=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),u=[],d=function(o){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])return"continue";var a=l.patch(t.CanvasRenderingContext2D.prototype,o,(function(t){return function(){for(var a=this,s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];return l.isBlocked(this.canvas,n)||setTimeout((function(){var t=i(s);if("drawImage"===o&&t[0]&&t[0]instanceof HTMLCanvasElement){var n=t[0],l=n.getContext("2d"),c=null==l?void 0:l.getImageData(0,0,n.width,n.height),u=null==c?void 0:c.data;t[0]=JSON.stringify(u)}e({id:r.getId(a.canvas),property:o,args:t})}),0),t.apply(this,s)}}));u.push(a)}catch(n){var s=l.hookSetter(t.CanvasRenderingContext2D.prototype,o,{set:function(t){e({id:r.getId(this.canvas),property:o,args:[t],setter:!0})}});u.push(s)}};try{for(var p=a(c),f=p.next();!f.done;f=p.next())d(f.value)}catch(e){o={error:e}}finally{try{f&&!f.done&&(s=p.return)&&s.call(p)}finally{if(o)throw o.error}}return function(){u.forEach((function(e){return e()}))}}(e.canvasMutationCb,I,e.blockClass,e.mirror):function(){},V=e.collectFonts?function(e,t){var n=t.defaultView;if(!n)return function(){};var r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(e,t,n){var r=new i(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var a=l.patch(t.fonts,"add",(function(t){return function(n){return setTimeout((function(){var t=o.get(n);t&&(e(t),o.delete(n))}),0),t.apply(this,[n])}}));return r.push((function(){n.FontFace=i})),r.push(a),function(){r.forEach((function(e){return e()}))}}(e.fontCb,e.doc):function(){},H=[];try{for(var U=a(e.plugins),G=U.next();!G.done;G=U.next()){var Y=G.value;H.push(Y.observer(Y.callback,I,Y.options))}}catch(e){u={error:e}}finally{try{G&&!G.done&&(T=U.return)&&T.call(U)}finally{if(u)throw u.error}}return function(){_.disconnect(),D(),P(),A(),F(),L(),j(),B(),W(),z(),V(),H.forEach((function(e){return e()}))}}},783:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowDomManager=void 0;var r=n(584),o=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){r.initMutationObserver(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,this.bypassOptions.enableStrictPrivacy),r.initScrollObserver(this.scrollCb,e,this.mirror,this.bypassOptions.blockClass,this.bypassOptions.sampling)},e}();t.ShadowDomManager=o},943:function(e,t,n){var r=this&&this.__assign||function(){return(r=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)},o=this&&this.__values||function(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.")},i=this&&this.__read||function(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},a=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0}),t.Replayer=void 0;var s=n(348),l=n(652),c=n(669),u=n(104),d=n(129),p=n(699),f=n(593),h=n(277);n(380);var m=n(401),v=36e5,y=l.default||l,g="[replayer]",S={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function b(e){return e.type==p.EventType.IncrementalSnapshot&&(e.data.source==p.IncrementalSource.TouchMove||e.data.source==p.IncrementalSource.MouseInteraction&&e.data.type==p.MouseInteractions.TouchStart)}var T=function(){function e(e,t){var n=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=y(),this.activityIntervals=[],this.legacy_missingNodeRetryMap={},this.cache=s.createCache(),this.imageMap=new Map,this.mirror=f.createMirror(),this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,!(null==t?void 0:t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");var r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"highlight-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:S,inactiveThreshold:.02,inactiveSkipTime:2e3};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(p.ReplayerEvents.Resize,this.handleResize),this.setupDom(),this.treeIndex=new f.TreeIndex,this.fragmentParentMap=new Map,this.elementStateMap=new Map,this.virtualStyleRulesMap=new Map,this.emitter.on(p.ReplayerEvents.Flush,(function(){var e,t,r,i,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=o(n.virtualStyleRulesMap.keys()),p=d.next();!p.done;p=d.next()){var f=p.value;n.restoreNodeSheet(f)}}catch(t){e={error:t}}finally{try{p&&!p.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=o(c.values()),m=h.next();!m.done;m=h.next()){var v=m.value;n.applyScroll(v)}}catch(e){r={error:e}}finally{try{m&&!m.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}try{for(var y=o(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(p.ReplayerEvents.PlayBack,(function(){n.firstFullSnapshot=null,n.mirror.reset()}));var i=new u.Timer([],(null==t?void 0:t.speed)||r.speed);this.service=d.createPlayerService({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,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){n.emitter.emit(p.ReplayerEvents.StateChange,{player:e})})),this.speedService=d.createSpeedService({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe((function(e){n.emitter.emit(p.ReplayerEvents.StateChange,{speed:e})}));var a=this.service.state.context.events.find((function(e){return e.type===p.EventType.Meta})),l=this.service.state.context.events.find((function(e){return e.type===p.EventType.FullSnapshot}));if(a){var c=a.data,h=c.width,m=c.height;setTimeout((function(){n.emitter.emit(p.ReplayerEvents.Resize,{width:h,height:m})}),0)}l&&setTimeout((function(){n.firstFullSnapshot||(n.firstFullSnapshot=l,n.rebuildFullSnapshot(l),n.iframe.contentWindow.scrollTo(l.data.initialOffset))}),1),this.service.state.context.events.find(b)&&this.mouse.classList.add("touch-device")}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.getActivityIntervals=function(){var e=this;if(0==this.activityIntervals.length){for(var t=[],n=this.getMetaData(),r=a([{timestamp:n.startTime}],this.service.state.context.events.filter((function(t){return e.isUserInteraction(t)})),[{timestamp:n.endTime}]),o=1;o<r.length;o++){var i=r[o-1],s=r[o];s.timestamp-i.timestamp>1e4?t.push({startTime:i.timestamp,endTime:s.timestamp,duration:s.timestamp-i.timestamp,active:!1}):t.push({startTime:i.timestamp,endTime:s.timestamp,duration:s.timestamp-i.timestamp,active:!0})}var l=[],c=t[0];for(o=1;o<t.length;o++)t[o].active!=t[o-1].active&&(l.push({startTime:c.startTime,endTime:t[o-1].endTime,duration:t[o-1].endTime-c.startTime,active:t[o-1].active}),c=t[o]);for(c&&t.length>0&&l.push({startTime:c.startTime,endTime:t[t.length-1].endTime,duration:t[t.length-1].endTime-c.startTime,active:t[t.length-1].active}),c=l[0],o=1;o<l.length;o++)(!l[o].active&&l[o].duration>this.config.inactiveThreshold*n.totalTime||!l[o-1].active&&l[o-1].duration>this.config.inactiveThreshold*n.totalTime)&&(this.activityIntervals.push({startTime:c.startTime,endTime:l[o-1].endTime,duration:l[o-1].endTime-c.startTime,active:l[o-1].active}),c=l[o]);c&&l.length>0&&this.activityIntervals.push({startTime:c.startTime,endTime:l[l.length-1].endTime,duration:l[l.length-1].endTime-c.startTime,active:l[l.length-1].active})}return this.activityIntervals},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(p.ReplayerEvents.Start),this.handleInactivity(this.getMetaData().startTime+e,!0)},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(p.ReplayerEvents.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(p.ReplayerEvents.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;b(n)&&this.mouse.classList.add("touch-device"),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.resetCache=function(){this.cache=s.createCache()},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=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(c.polyfill(this.iframe.contentWindow,this.iframe.contentDocument),f.polyfill(this.iframe.contentWindow))},e.prototype.handleResize=function(e){var t,n;this.iframe.style.display="inherit";try{for(var r=o([this.mouseTail,this.iframe]),i=r.next();!i.done;i=r.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=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.applyEventsSynchronously=function(e){var t,n;try{for(var r=o(e),i=r.next();!i.done;i=r.next()){var a=i.value;switch(a.type){case p.EventType.DomContentLoaded:case p.EventType.Load:case p.EventType.Custom:continue;case p.EventType.FullSnapshot:case p.EventType.Meta:case p.EventType.Plugin:break;case p.EventType.IncrementalSnapshot:switch(a.data.source){case p.IncrementalSource.MediaInteraction:continue}}this.getCastFn(a,!0)()}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}this.mousePos&&this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null,!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null},e.prototype.getCastFn=function(e,t){var n,r=this;switch(void 0===t&&(t=!1),e.type){case p.EventType.DomContentLoaded:case p.EventType.Load:break;case p.EventType.Custom:n=function(){r.emitter.emit(p.ReplayerEvents.CustomEvent,e)};break;case p.EventType.Meta:n=function(){r.emitter.emit(p.ReplayerEvents.Resize,{width:e.data.width,height:e.data.height})};break;case p.EventType.FullSnapshot:n=function(){if(r.firstFullSnapshot){if(r.firstFullSnapshot===e)return void(r.firstFullSnapshot=!0)}else r.firstFullSnapshot=!0;r.rebuildFullSnapshot(e,t),r.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case p.EventType.IncrementalSnapshot:n=function(){var n,i;if(r.applyIncremental(e,t),!t&&(r.handleInactivity(e.timestamp),e===r.nextUserInteractionEvent&&(r.nextUserInteractionEvent=null,r.backToNormal()),r.config.skipInactive&&!r.nextUserInteractionEvent)){try{for(var a=o(r.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(!(l.timestamp<=e.timestamp)&&r.isUserInteraction(l)){l.delay-e.delay>1e4*r.speedService.state.context.timer.speed&&(r.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(r.nextUserInteractionEvent){var c=r.nextUserInteractionEvent.delay-e.delay,u={speed:Math.min(Math.round(c/2e3),r.config.maxSpeed)};r.speedService.send({type:"FAST_FORWARD",payload:u}),r.emitter.emit(p.ReplayerEvents.SkipStart,u)}}}}return function(){var i,a;n&&n();try{for(var s=o(r.config.plugins||[]),l=s.next();!l.done;l=s.next())l.value.handler(e,t,{replayer:r})}catch(e){i={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}r.service.send({type:"CAST_EVENT",payload:{event:e}});var c=r.service.state.context.events.length-1;if(e===r.service.state.context.events[c]){var u=function(){c<r.service.state.context.events.length-1||(r.backToNormal(),r.service.send("END"),r.emitter.emit(p.ReplayerEvents.Finish))};e.type===p.EventType.IncrementalSnapshot&&e.data.source===p.IncrementalSource.MouseMove&&e.data.positions.length?setTimeout((function(){u()}),Math.max(0,50-e.data.positions[0].timeOffset)):u()}}},e.prototype.handleInactivity=function(e,t){var n,r;if((e===this.inactiveEndTimestamp||t)&&(this.inactiveEndTimestamp=null,this.backToNormal()),this.config.skipInactive&&!this.inactiveEndTimestamp){try{for(var i=o(this.getActivityIntervals()),a=i.next();!a.done;a=i.next()){var s=a.value;if(e>=s.startTime&&e<s.endTime&&!s.active){this.inactiveEndTimestamp=s.endTime;break}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}if(this.inactiveEndTimestamp){var l=this.inactiveEndTimestamp-e,c={speed:l/v*this.config.inactiveSkipTime<1e3?l/1e3:Math.round(Math.max(l,v)/this.config.inactiveSkipTime)};this.speedService.send({type:"FAST_FORWARD",payload:c}),this.emitter.emit(p.ReplayerEvents.SkipStart,c)}}},e.prototype.rebuildFullSnapshot=function(e,t){var n,r,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=s.rebuild(e.data.node,{doc:this.iframe.contentDocument,afterAppend:function(e){i.collectIframeAndAttachDocument(a,e)},cache:this.cache})[1];var l=function(e,t){if(c.attachDocumentToIframe(e,t),c.newDocumentQueue=c.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var n=t.contentDocument,r=n.documentElement,o=n.head;c.insertStyleRules(r,o)}},c=this;try{for(var u=o(a),d=u.next();!d.done;d=u.next()){var f=d.value;l(f.mutationInQueue,f.builtNode)}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}var h=this.iframe.contentDocument,m=h.documentElement,v=h.head;this.insertStyleRules(m,v),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(p.ReplayerEvents.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=h.default(this.config.blockClass).concat(this.config.insertStyleRules);this.config.pauseAnimation&&r.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }");for(var o=0;o<r.length;o++)n.sheet.insertRule(r[o],o)},e.prototype.attachDocumentToIframe=function(e,t){var n,r,i=this,a=[];if(!t.contentDocument)for(var l=t.parentNode;l;){if(this.fragmentParentMap.has(l)){var c=l,u=this.fragmentParentMap.get(c);this.restoreRealParent(c,u);break}l=l.parentNode}s.buildNodeWithSN(e.node,{doc:t.contentDocument,map:this.mirror.map,hackCss:!0,skipChild:!1,afterAppend:function(e){i.collectIframeAndAttachDocument(a,e)},cache:this.cache});var d=function(e,t){if(p.attachDocumentToIframe(e,t),p.newDocumentQueue=p.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var n=t.contentDocument,r=n.documentElement,o=n.head;p.insertStyleRules(r,o)}},p=this;try{for(var f=o(a),h=f.next();!h.done;h=f.next()){var m=h.value;d(m.mutationInQueue,m.builtNode)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}},e.prototype.collectIframeAndAttachDocument=function(e,t){if(f.isIframeINode(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(p.ReplayerEvents.Start,a),this.emitter.on(p.ReplayerEvents.Pause,a);var s=function(){t.emitter.off(p.ReplayerEvents.Start,a),t.emitter.off(p.ReplayerEvents.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(p.ReplayerEvents.LoadStylesheetEnd),r&&clearTimeout(r),s())})))})),o.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(p.ReplayerEvents.LoadStylesheetStart),r=setTimeout((function(){i.matches("playing")&&t.play(t.getCurrentTime()),r=-1,s()}),this.config.loadTimeout))}},e.prototype.preloadAllImages=function(){var e,t,n=this,r=(this.service.state,function(){n.service.state});this.emitter.on(p.ReplayerEvents.Start,r),this.emitter.on(p.ReplayerEvents.Pause,r);var i=0;try{for(var a=o(this.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(l.type===p.EventType.IncrementalSnapshot&&l.data.source===p.IncrementalSource.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,o,i=this,a=e.data;switch(a.source){case p.IncrementalSource.Mutation:t&&(a.adds.forEach((function(e){return i.treeIndex.add(e)})),a.texts.forEach((function(e){return i.treeIndex.text(e)})),a.attributes.forEach((function(e){return i.treeIndex.attribute(e)})),a.removes.forEach((function(e){return i.treeIndex.remove(e,i.mirror)})));try{this.applyMutation(a,t)}catch(e){this.warn("Exception in mutation "+(e.message||e),a)}break;case p.IncrementalSource.Drag:case p.IncrementalSource.TouchMove:case p.IncrementalSource.MouseMove:if(t){var s=a.positions[a.positions.length-1];this.mousePos={x:s.x,y:s.y,id:s.id,debugData:a}}else a.positions.forEach((function(n){var r={doAction:function(){i.moveAndHover(n.x,n.y,n.id,t,a)},delay:n.timeOffset+e.timestamp-i.service.state.context.baselineTime};i.timer.addAction(r)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(n=a.positions[0])||void 0===n?void 0:n.timeOffset)});break;case p.IncrementalSource.MouseInteraction:if(-1===a.id)break;var l=new Event(p.MouseInteractions[a.type].toLowerCase());if(!(T=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);this.emitter.emit(p.ReplayerEvents.MouseInteraction,{type:a.type,target:T});var c=this.config.triggerFocus;switch(a.type){case p.MouseInteractions.Blur:"blur"in T&&T.blur();break;case p.MouseInteractions.Focus:c&&T.focus&&T.focus({preventScroll:!0});break;case p.MouseInteractions.Click:case p.MouseInteractions.TouchStart:case p.MouseInteractions.TouchEnd:t?(a.type===p.MouseInteractions.TouchStart?this.touchActive=!0:a.type===p.MouseInteractions.TouchEnd&&(this.touchActive=!1),this.mousePos={x:a.x,y:a.y,id:a.id,debugData:a}):(a.type===p.MouseInteractions.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x,a.y,a.id,t,a),a.type===p.MouseInteractions.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===p.MouseInteractions.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===p.MouseInteractions.TouchEnd&&this.mouse.classList.remove("touch-active"));break;case p.MouseInteractions.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:T.dispatchEvent(l)}break;case p.IncrementalSource.Scroll:if(-1===a.id)break;if(t){this.treeIndex.scroll(a);break}this.applyScroll(a);break;case p.IncrementalSource.ViewportResize:this.emitter.emit(p.ReplayerEvents.Resize,{width:a.width,height:a.height});break;case p.IncrementalSource.Input:if(-1===a.id)break;if(t){this.treeIndex.input(a);break}this.applyInput(a);break;case p.IncrementalSource.MediaInteraction:if(!(T=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);var u=T;try{a.currentTime&&(u.currentTime=a.currentTime),1===a.type&&u.pause(),0===a.type&&u.play()}catch(e){this.config.showWarning&&console.warn("Failed to replay media interactions: "+(e.message||e))}break;case p.IncrementalSource.StyleSheetRule:if(!(T=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);var d,f=T,h=T.parentNode,v=this.fragmentParentMap.has(h),y=v?null:f.sheet;y||(this.virtualStyleRulesMap.has(T)?d=this.virtualStyleRulesMap.get(T):(d=[],this.virtualStyleRulesMap.set(T,d))),a.adds&&a.adds.forEach((function(e){var t=e.rule,n=e.index;if(y)try{if(Array.isArray(n)){var r=m.getPositionsAndIndex(n),o=r.positions,i=r.index;m.getNestedRule(y.cssRules,o).insertRule(t,i)}else i=void 0===n?void 0:Math.min(n,y.cssRules.length),y.insertRule(t,i)}catch(e){}else null==d||d.push({cssText:t,index:n,type:m.StyleRuleType.Insert})})),a.removes&&a.removes.forEach((function(e){var t=e.index;if(v)null==d||d.push({index:t,type:m.StyleRuleType.Remove});else try{if(Array.isArray(t)){var n=m.getPositionsAndIndex(t),r=n.positions,o=n.index;m.getNestedRule(y.cssRules,r).deleteRule(o||0)}else null==y||y.deleteRule(t)}catch(e){}}));break;case p.IncrementalSource.StyleDeclaration:if(!(T=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);f=T;var g=T.parentNode,S=this.fragmentParentMap.has(g)?null:f.sheet,b=[];S||(this.virtualStyleRulesMap.has(T)?b=this.virtualStyleRulesMap.get(T):(b=[],this.virtualStyleRulesMap.set(T,b))),a.set&&(S?m.getNestedRule(S.rules,a.index).style.setProperty(a.set.property,a.set.value,a.set.priority):b.push(r({type:m.StyleRuleType.SetProperty,index:a.index},a.set))),a.remove&&(S?m.getNestedRule(S.rules,a.index).style.removeProperty(a.remove.property):b.push(r({type:m.StyleRuleType.RemoveProperty,index:a.index},a.remove)));break;case p.IncrementalSource.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var T;if(!(T=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);try{var I=T.getContext("2d");if(a.setter)return void(I[a.property]=a.args[0]);var x=I[a.property];if("drawImage"===a.property&&"string"==typeof a.args[0]){var E=this.imageMap.get(e);a.args[0]=E,x.apply(I,a.args)}else x.apply(I,a.args)}catch(e){this.warnCanvasMutationFailed(a,a.id,e)}break;case p.IncrementalSource.Font:try{var w=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);null===(o=this.iframe.contentDocument)||void 0===o||o.fonts.add(w)}catch(e){this.config.showWarning&&console.warn(e)}}},e.prototype.applyMutation=function(e,t){var n,i,a=this;e.removes.forEach((function(t){var n=a.mirror.getNode(t.id);if(!n){if(e.removes.find((function(e){return e.id===t.parentId})))return;return a.warnNodeNotFound(e,t.id)}a.virtualStyleRulesMap.has(n)&&a.virtualStyleRulesMap.delete(n);var r=a.mirror.getNode(t.parentId);if(!r)return a.warnNodeNotFound(e,t.parentId);if(t.isShadow&&f.hasShadowRoot(r)&&(r=r.shadowRoot),a.mirror.removeNodeFromMap(n),r){var o=null,i="__sn"in r?a.fragmentParentMap.get(r):void 0;i&&i.contains(n)?r=i:a.fragmentParentMap.has(n)&&(o=a.fragmentParentMap.get(n),a.fragmentParentMap.delete(n),n=o);try{r.removeChild(n)}catch(t){if(!(t instanceof DOMException))throw t;a.warn("parent could not remove child in mutation",r,i,n,o,e)}}}));var l=r({},this.legacy_missingNodeRetryMap),c=[],u=function(e){var n,r;if(!a.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var o=a.mirror.getNode(e.parentId);if(!o)return e.node.type===s.NodeType.Document?a.newDocumentQueue.push(e):c.push(e);var i=null;a.iframe.contentDocument.contains?i=a.iframe.contentDocument.contains(o):a.iframe.contentDocument.body.contains&&(i=a.iframe.contentDocument.body.contains(o));var u=(null===(r=(n=o).getElementsByTagName)||void 0===r?void 0:r.call(n,"iframe").length)>0;if(t&&i&&!f.isIframeINode(o)&&!u){var d=document.createDocumentFragment();for(a.mirror.map[e.parentId]=d,a.fragmentParentMap.set(d,o),a.storeState(o);o.firstChild;)d.appendChild(o.firstChild);o=d}e.node.isShadow&&f.hasShadowRoot(o)&&(o=o.shadowRoot);var p=null,h=null;if(e.previousId&&(p=a.mirror.getNode(e.previousId)),e.nextId&&(h=a.mirror.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=a.mirror.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return c.push(e);if(!e.node.rootId||a.mirror.getNode(e.node.rootId)){var m=e.node.rootId?a.mirror.getNode(e.node.rootId):a.iframe.contentDocument;if(f.isIframeINode(o))a.attachDocumentToIframe(e,o);else{var v=s.buildNodeWithSN(e.node,{doc:m,map:a.mirror.map,skipChild:!0,hackCss:!0,cache:a.cache});if(-1!==e.previousId&&-1!==e.nextId){if(p&&p.nextSibling&&p.nextSibling.parentNode)o.insertBefore(v,p.nextSibling);else if(h&&h.parentNode)o.contains(h)?o.insertBefore(v,h):o.insertBefore(v,null);else{if(o===m)for(;m.firstChild;)m.removeChild(m.firstChild);o.appendChild(v)}if(f.isIframeINode(v)){var y=a.newDocumentQueue.find((function(e){return e.parentId===v.__sn.id}));if(y&&(a.attachDocumentToIframe(y,v),a.newDocumentQueue=a.newDocumentQueue.filter((function(e){return e!==y}))),v.contentDocument){var g=v.contentDocument,S=g.documentElement,b=g.head;a.insertStyleRules(S,b)}}(e.previousId||e.nextId)&&a.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 p=f.queueToResolveTrees(c);if(c.length=0,Date.now()-d>500){this.warn("Timeout in the loop, please check the resolve tree data:",p);break}try{for(var h=(n=void 0,o(p)),m=h.next();!m.done;m=h.next()){var v=m.value;this.mirror.getNode(v.value.parentId)?f.iterateResolveTree(v,(function(e){u(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",v)}}catch(e){n={error:e}}finally{try{m&&!m.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}}Object.keys(l).length&&Object.assign(this.legacy_missingNodeRetryMap,l),e.texts.forEach((function(t){var n=a.mirror.getNode(t.id);if(!n){if(e.removes.find((function(e){return e.id===t.id})))return;return a.warnNodeNotFound(e,t.id)}a.fragmentParentMap.has(n)&&(n=a.fragmentParentMap.get(n)),n.textContent=t.value})),e.attributes.forEach((function(t){var n=a.mirror.getNode(t.id);if(!n){if(e.removes.find((function(e){return e.id===t.id})))return;return a.warnNodeNotFound(e,t.id)}for(var r in a.fragmentParentMap.has(n)&&(n=a.fragmentParentMap.get(n)),t.attributes)if("string"==typeof r){var o=t.attributes[r];if(null===o)n.removeAttribute(r);else if("string"==typeof o)try{n.setAttribute(r,o)}catch(e){a.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",e)}else if("style"===r){var i=o,s=n;for(var l in i)if(!1===i[l])s.style.removeProperty(l);else if(i[l]instanceof Array){var c=i[l];s.style.setProperty(l,c[0],c[1])}else{var u=i[l];s.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 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,o){var i=this.mirror.getNode(n);if(!i)return this.debugNodeNotFound(o,n);var a=f.getBaseDimension(i,this.iframe),s=e*a.absoluteScale+a.x,l=t*a.absoluteScale+a.y;this.mouse.style.left=s+"px",this.mouse.style.top=l+"px",r||this.drawMouseTail({x:s,y:l}),this.hoverElements(i)},e.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?S:Object.assign({},S,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===p.EventType.IncrementalSnapshot&&e.data.source>p.IncrementalSource.Mutation&&e.data.source<=p.IncrementalSource.Input},e.prototype.backToNormal=function(){this.inactiveEndTimestamp=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(p.ReplayerEvents.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},e.prototype.restoreRealParent=function(e,t){this.mirror.map[t.__sn.id]=t,t.__sn.type===s.NodeType.Element&&"textarea"===t.__sn.tagName&&e.textContent&&(t.value=e.textContent),t.appendChild(e),this.restoreState(t)},e.prototype.storeState=function(e){var t,n;if(e&&e.nodeType===e.ELEMENT_NODE){var r=e;(r.scrollLeft||r.scrollTop)&&this.elementStateMap.set(e,{scroll:[r.scrollLeft,r.scrollTop]}),"STYLE"===r.tagName&&m.storeCSSRules(r,this.virtualStyleRulesMap);var i=r.children;try{for(var a=o(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 r=e;if(this.elementStateMap.has(e)){var i=this.elementStateMap.get(e);i.scroll&&(r.scrollLeft=i.scroll[0],r.scrollTop=i.scroll[1]),this.elementStateMap.delete(e)}var a=r.children;try{for(var s=o(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);if("STYLE"===e.nodeName&&t){var n=e;m.applyVirtualStyleRulesToNode(t,n)}},e.prototype.warnNodeNotFound=function(e,t){this.treeIndex.idRemoved(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.idRemoved(t)?this.debug(g,"Node with id '"+t+"' was previously removed. ",e):this.debug(g,"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,a([g],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,a([g],e))},e}();t.Replayer=T},129:function(e,t,n){var r=this&&this.__assign||function(){return(r=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)},o=this&&this.__values||function(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.")};Object.defineProperty(t,"__esModule",{value:!0}),t.createSpeedService=t.createPlayerService=t.discardPriorSnapshots=void 0;var i=n(537),a=n(699),s=n(104);function l(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===a.EventType.Meta&&r.timestamp<=t)return e.slice(n)}return e}t.discardPriorSnapshots=l,t.createPlayerService=function(e,t){var n=t.getCastFn,c=t.applyEventsSynchronously,u=t.emitter,d=i.createMachine({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:i.assign({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:i.assign((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,i,d,p,f=e.timer,h=e.events,m=e.baselineTime,v=e.lastPlayedEvent;f.clear();try{for(var y=o(h),g=y.next();!g.done;g=y.next()){var S=g.value;s.addDelay(S,m)}}catch(e){t={error:e}}finally{try{g&&!g.done&&(r=y.return)&&r.call(y)}finally{if(t)throw t.error}}var b=l(h,m),T=null==v?void 0:v.timestamp;(null==v?void 0:v.type)===a.EventType.IncrementalSnapshot&&v.data.source===a.IncrementalSource.MouseMove&&(T=v.timestamp+(null===(p=v.data.positions[0])||void 0===p?void 0:p.timeOffset)),m<(T||0)&&u.emit(a.ReplayerEvents.PlayBack);var I=new Array,x=new Array,E=function(e){if(T&&T<m&&(e.timestamp<=T||e===v))return"continue";if(e.timestamp<m)I.push(e);else{var t=n(e,!1);x.push({doAction:function(){t(),u.emit(a.ReplayerEvents.EventCast,e)},delay:e.delay})}};try{for(var w=o(b),C=w.next();!C.done;C=w.next())E(C.value)}catch(e){i={error:e}}finally{try{C&&!C.done&&(d=w.return)&&d.call(w)}finally{if(i)throw i.error}}c(I),u.emit(a.ReplayerEvents.Flush),f.addActions(x),f.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:i.assign((function(e){return r(r({},e),{lastPlayedEvent:null})})),startLive:i.assign({baselineTime:function(e,t){return e.timer.toggleLiveMode(!0),e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:i.assign((function(e,t){var o=e.baselineTime,i=e.timer,l=e.events;if("ADD_EVENT"===t.type){var c=t.payload.event;s.addDelay(c,o);var d=l.length-1;if(!l[d]||l[d].timestamp<=c.timestamp)l.push(c);else{for(var p=-1,f=0;f<=d;){var h=Math.floor((f+d)/2);l[h].timestamp<=c.timestamp?f=h+1:d=h-1}-1===p&&(p=f),l.splice(p,0,c)}var m=c.timestamp<o,v=n(c,m);m?v():i.isActive()&&i.addAction({doAction:function(){v(),u.emit(a.ReplayerEvents.EventCast,c)},delay:c.delay})}return r(r({},e),{events:l})}))}});return i.interpret(d)},t.createSpeedService=function(e){var t=i.createMachine({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:i.assign({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}});return i.interpret(t)}},669:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.polyfill=void 0,t.polyfill=function(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=p(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 p(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}function f(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(f.bind(e,t))}function h(n,r,a){var l,c,u,d,p=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),f({scrollable:l,method:d,startTime:p,startX:c,startY:u,x:r,y:a})}}},277:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return["noscript { display: none !important; }","."+e+" { background: currentColor; border-radius: 5px; }","."+e+":hover::after {content: 'Redacted'; color: white; background: black; text-align: center; width: 100%; display: block;}"]}},104:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addDelay=t.Timer=void 0;var r=n(699),o=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+1;n=r-1}}return t},e}();t.Timer=o,t.addDelay=function(e,t){if(e.type===r.EventType.IncrementalSnapshot&&e.data.source===r.IncrementalSource.MouseMove){var n=e.data.positions[0].timeOffset,o=e.timestamp+n;return e.delay=o-t,o-t}return e.delay=e.timestamp-t,e.delay}},401:function(e,t){var n,r=this&&this.__read||function(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},o=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e};function i(e,t){var n=e[t[0]];return 1===t.length?n:i(n.cssRules[t[1]].cssRules,t.slice(2))}function a(e){var t=o(e),n=t.pop();return{positions:t,index:n}}Object.defineProperty(t,"__esModule",{value:!0}),t.storeCSSRules=t.applyVirtualStyleRulesToNode=t.getPositionsAndIndex=t.getNestedRule=t.StyleRuleType=void 0,function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot",e[e.SetProperty=3]="SetProperty",e[e.RemoveProperty=4]="RemoveProperty"}(n=t.StyleRuleType||(t.StyleRuleType={})),t.getNestedRule=i,t.getPositionsAndIndex=a,t.applyVirtualStyleRulesToNode=function(e,t){var o=t.sheet;o&&e.forEach((function(e){if(e.type===n.Insert)try{if(Array.isArray(e.index)){var s=a(e.index),l=s.positions,c=s.index;i(o.cssRules,l).insertRule(e.cssText,c)}else o.insertRule(e.cssText,e.index)}catch(e){}else if(e.type===n.Remove)try{if(Array.isArray(e.index)){var u=a(e.index);l=u.positions,c=u.index,i(o.cssRules,l).deleteRule(c||0)}else o.deleteRule(e.index)}catch(e){}else e.type===n.Snapshot?function(e,t){var n;try{var o=Array.from((null===(n=t.sheet)||void 0===n?void 0:n.cssRules)||[]).map((function(e){return e.cssText})),i=Object.entries(o).reverse(),a=o.length;i.forEach((function(n){var o,i=r(n,2),s=i[0],l=i[1],c=e.indexOf(l);if(-1===c||c>a)try{null===(o=t.sheet)||void 0===o||o.deleteRule(Number(s))}catch(e){}a=c})),e.forEach((function(e,n){var r,o,i;try{(null===(o=null===(r=t.sheet)||void 0===r?void 0:r.cssRules[n])||void 0===o?void 0:o.cssText)!==e&&(null===(i=t.sheet)||void 0===i||i.insertRule(e,n))}catch(e){}}))}catch(e){}}(e.cssTexts,t):e.type===n.SetProperty?i(o.cssRules,e.index).style.setProperty(e.property,e.value,e.priority):e.type===n.RemoveProperty&&i(o.cssRules,e.index).style.removeProperty(e.property)}))},t.storeCSSRules=function(e,t){var r;try{var o=Array.from((null===(r=e.sheet)||void 0===r?void 0:r.cssRules)||[]).map((function(e){return e.cssText}));t.set(e,[{type:n.Snapshot,cssTexts:o}])}catch(e){}}},490:function(e,t){var n=this&&this.__values||function(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.")};Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function o(e){return e?e.replace(/^\s+|\s+$/g,""):""}function i(e,t){var r,o,a=e&&"string"==typeof e.type,s=a?e:t;try{for(var l=n(Object.keys(e)),c=l.next();!c.done;c=l.next()){var u=e[c.value];Array.isArray(u)?u.forEach((function(e){i(e,s)})):u&&"object"==typeof u&&i(u,s)}}catch(e){r={error:e}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}return a&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}t.parse=function(e,t){void 0===t&&(t={});var n=1,a=1;function s(e){var t=e.match(/\n/g);t&&(n+=t.length);var r=e.lastIndexOf("\n");a=-1===r?a+e.length:e.length-r}function l(){var e={line:n,column:a};return function(t){return t.position=new c(e),v(),t}}var c=function(e){this.start=e,this.end={line:n,column:a},this.source=t.source};c.prototype.content=e;var u=[];function d(r){var o=new Error(t.source+":"+n+":"+a+": "+r);if(o.reason=r,o.filename=t.source,o.line=n,o.column=a,o.source=e,!t.silent)throw o;u.push(o)}function p(){return m(/^{\s*/)}function f(){return m(/^}/)}function h(){var t,n,r,o=[];for(v(),y(o);e.length&&"}"!==e.charAt(0)&&(t=N()||(n=void 0,r=void 0,n=l(),(r=S())?(y(),n({type:"rule",selectors:r,declarations:T()})):d("selector missing")));)!1!==t&&(o.push(t),y(o));return o}function m(t){var n=t.exec(e);if(n){var r=n[0];return s(r),e=e.slice(r.length),n}}function v(){m(/^\s*/)}function y(e){var t;for(void 0===e&&(e=[]);t=g();)!1!==t&&e.push(t),t=g();return e}function g(){var t=l();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 d("End of comment missing");var r=e.slice(2,n-2);return a+=2,s(r),e=e.slice(n),a+=2,t({type:"comment",comment:r})}}function S(){var e=m(/^([^{]+)/);if(e)return o(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=l(),t=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=o(t[0]);if(!m(/^:\s*/))return d("property missing ':'");var i=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),a=e({type:"declaration",property:n.replace(r,""),value:i?o(i[0]).replace(r,""):""});return m(/^[;\s]*/),a}}function T(){var e,t=[];if(!p())return d("missing '{'");for(y(t);e=b();)!1!==e&&(t.push(e),y(t)),e=b();return f()?t:d("missing '}'")}function I(){for(var e,t=[],n=l();e=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),m(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:T()})}var x,E=k("import"),w=k("charset"),C=k("namespace");function k(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=l(),r=m(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function N(){if("@"===e[0])return function(){var e=l(),t=m(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=m(/^([-\w]+)\s*/)))return d("@keyframes missing name");var r,o=t[1];if(!p())return d("@keyframes missing '{'");for(var i=y();r=I();)i.push(r),i=i.concat(y());return f()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):d("@keyframes missing '}'")}}()||function(){var e=l(),t=m(/^@media *([^{]+)/);if(t){var n=o(t[1]);if(!p())return d("@media missing '{'");var r=y().concat(h());return f()?e({type:"media",media:n,rules:r}):d("@media missing '}'")}}()||function(){var e=l(),t=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:o(t[1]),media:o(t[2])})}()||function(){var e=l(),t=m(/^@supports *([^{]+)/);if(t){var n=o(t[1]);if(!p())return d("@supports missing '{'");var r=y().concat(h());return f()?e({type:"supports",supports:n,rules:r}):d("@supports missing '}'")}}()||E()||w()||C()||function(){var e=l(),t=m(/^@([-\w]+)?document *([^{]+)/);if(t){var n=o(t[1]),r=o(t[2]);if(!p())return d("@document missing '{'");var i=y().concat(h());return f()?e({type:"document",document:r,vendor:n,rules:i}):d("@document missing '}'")}}()||function(){var e=l();if(m(/^@page */)){var t=S()||[];if(!p())return d("@page missing '{'");for(var n,r=y();n=b();)r.push(n),r=r.concat(y());return f()?e({type:"page",selectors:t,declarations:r}):d("@page missing '}'")}}()||function(){var e=l();if(m(/^@host\s*/)){if(!p())return d("@host missing '{'");var t=y().concat(h());return f()?e({type:"host",rules:t}):d("@host missing '}'")}}()||function(){var e=l();if(m(/^@font-face\s*/)){if(!p())return d("@font-face missing '{'");for(var t,n=y();t=b();)n.push(t),n=n.concat(y());return f()?e({type:"font-face",declarations:n}):d("@font-face missing '}'")}}()}return i((x=h(),{type:"stylesheet",stylesheet:{source:t.source,rules:x,parsingErrors:u}}))}},348:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.IGNORED_NODE=t.needMaskingText=t.cleanupSnapshot=t.visitSnapshot=t.transformAttribute=t.createCache=t.addHoverClass=t.buildNodeWithSN=t.rebuild=t.serializeNodeWithId=t.snapshot=void 0;var i=n(858);t.snapshot=i.default,Object.defineProperty(t,"serializeNodeWithId",{enumerable:!0,get:function(){return i.serializeNodeWithId}}),Object.defineProperty(t,"transformAttribute",{enumerable:!0,get:function(){return i.transformAttribute}}),Object.defineProperty(t,"visitSnapshot",{enumerable:!0,get:function(){return i.visitSnapshot}}),Object.defineProperty(t,"cleanupSnapshot",{enumerable:!0,get:function(){return i.cleanupSnapshot}}),Object.defineProperty(t,"needMaskingText",{enumerable:!0,get:function(){return i.needMaskingText}}),Object.defineProperty(t,"IGNORED_NODE",{enumerable:!0,get:function(){return i.IGNORED_NODE}});var a=n(189);t.rebuild=a.default,Object.defineProperty(t,"buildNodeWithSN",{enumerable:!0,get:function(){return a.buildNodeWithSN}}),Object.defineProperty(t,"addHoverClass",{enumerable:!0,get:function(){return a.addHoverClass}}),Object.defineProperty(t,"createCache",{enumerable:!0,get:function(){return a.createCache}}),o(n(397),t),o(n(606),t)},189:function(e,t,n){var r=this&&this.__values||function(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.")};Object.defineProperty(t,"__esModule",{value:!0}),t.buildNodeWithSN=t.createCache=t.addHoverClass=void 0;var o=n(490),i=n(397),a=n(606),s={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"},l=/([^\\]):hover/,c=new RegExp(l.source,"g");function u(e,t){var n;if(!(null===(n=window.HIG_CONFIGURATION)||void 0===n?void 0:n.enableOnHoverClass))return e;var r=null==t?void 0:t.stylesWithHoverClass.get(e);if(r)return r;var i=o.parse(e,{silent:!0});if(!i.stylesheet)return e;var a=[];if(i.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){l.test(e)&&a.push(e)}))})),0===a.length)return e;var s=new RegExp(a.filter((function(e,t){return a.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),u=e.replace(s,(function(e){var t=e.replace(c,"$1.\\:hover");return e+", "+t}));return null==t||t.stylesWithHoverClass.set(e,u),u}function d(e,t){var n,o,l=t.doc,c=t.map,p=t.skipChild,f=void 0!==p&&p,h=t.hackCss,m=void 0===h||h,v=t.afterAppend,y=t.cache,g=function(e,t){var n=t.doc,o=t.hackCss,a=t.cache;switch(e.type){case i.NodeType.Document:return n.implementation.createDocument(null,"",null);case i.NodeType.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case i.NodeType.Element:var l,c=function(e){var t=s[e.tagName]?s[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);l=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",c):n.createElement(c);var d=function(t){var i,s;if(!e.attributes.hasOwnProperty(t))return"continue";var d=e.attributes[t];if("option"===c&&"selected"===t&&!1===d)return"continue";if(d="boolean"==typeof d||"number"==typeof d?"":d,t.startsWith("rr_")){if("canvas"===c&&"rr_dataURL"===t){var p=document.createElement("img");p.src=d,p.onload=function(){var e=l.getContext("2d");e&&e.drawImage(p,0,0,p.width,p.height)}}if("rr_width"===t&&(l.style.width=d),"rr_height"===t&&(l.style.height=d),"rr_mediaCurrentTime"===t&&(l.currentTime=e.attributes.rr_mediaCurrentTime),"rr_mediaState"===t)switch(d){case"played":l.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":l.pause()}}else{var f="textarea"===c&&"value"===t,h="style"===c&&"_cssText"===t;if(h&&o&&(d=u(d,a)),f||h){var m=n.createTextNode(d);try{for(var v=(i=void 0,r(Array.from(l.childNodes))),y=v.next();!y.done;y=v.next()){var g=y.value;g.nodeType===l.TEXT_NODE&&l.removeChild(g)}}catch(e){i={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(i)throw i.error}}return l.appendChild(m),"continue"}try{if(e.isSVG&&"xlink:href"===t)l.setAttributeNS("http://www.w3.org/1999/xlink",t,d);else if("onload"===t||"onclick"===t||"onmouse"===t.substring(0,7))l.setAttribute("_"+t,d);else{if("meta"===c&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"==t)return l.setAttribute("csp-content",d),"continue";l.setAttribute(t,d)}}catch(e){}}};for(var p in e.attributes)d(p);if(e.isShadowHost)if(l.shadowRoot)for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);else l.attachShadow({mode:"open"});return l;case i.NodeType.Text:return n.createTextNode(e.isStyle&&o?u(e.textContent,a):e.textContent);case i.NodeType.CDATA:return n.createCDATASection(e.textContent);case i.NodeType.Comment:return n.createComment(e.textContent);default:return null}}(e,{doc:l,hackCss:m,cache:y});if(!g)return null;if(e.rootId&&console.assert(c[e.rootId]===l,"Target document should has the same root id."),e.type===i.NodeType.Document&&(l.close(),l.open(),"BackCompat"===e.compatMode&&e.childNodes&&e.childNodes[0].type!==i.NodeType.DocumentType&&(e.childNodes[0].type===i.NodeType.Element&&"xmlns"in e.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===e.childNodes[0].attributes.xmlns?l.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):l.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),g=l),g.__sn=e,c[e.id]=g,(e.type===i.NodeType.Document||e.type===i.NodeType.Element)&&!f)try{for(var S=r(e.childNodes),b=S.next();!b.done;b=S.next()){var T=b.value,I=d(T,{doc:l,map:c,skipChild:!1,hackCss:m,afterAppend:v,cache:y});I?(T.isShadow&&a.isElement(g)&&g.shadowRoot?g.shadowRoot.appendChild(I):g.appendChild(I),v&&v(I)):console.warn("Failed to rebuild",T)}}catch(e){n={error:e}}finally{try{b&&!b.done&&(o=S.return)&&o.call(S)}finally{if(n)throw n.error}}return g}t.addHoverClass=u,t.createCache=function(){return{stylesWithHoverClass:new Map}},t.buildNodeWithSN=d,t.default=function(e,t){var n=t.doc,r=t.onVisit,o=t.hackCss,a={},s=d(e,{doc:n,map:a,skipChild:!1,hackCss:void 0===o||o,afterAppend:t.afterAppend,cache:t.cache});return function(e,t){for(var n in e)e[n]&&t(e[n])}(a,(function(e){r&&r(e),function(e){var t=e.__sn;if(t.type===i.NodeType.Element){var n=e;for(var r in t.attributes)if(t.attributes.hasOwnProperty(r)&&r.startsWith("rr_")){var o=t.attributes[r];"rr_scrollLeft"===r&&(n.scrollLeft=o),"rr_scrollTop"===r&&(n.scrollTop=o)}}}(e)})),[s,a]}},858:function(e,t,n){var r=this&&this.__values||function(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.")};Object.defineProperty(t,"__esModule",{value:!0}),t.cleanupSnapshot=t.visitSnapshot=t.serializeNodeWithId=t.needMaskingText=t._isBlockedElement=t.transformAttribute=t.absoluteToDoc=t.absoluteToStylesheet=t.IGNORED_NODE=void 0;var o=n(397),i=n(606),a=1,s=new 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){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=l(e.styleSheet)||t}catch(e){}return t}t.IGNORED_NODE=-2;var u=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,d=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,p=/^(data:)([^,]*),(.*)/i;function f(e,t){return(e||"").replace(u,(function(e,n,o,i,a,s){var l,c,u,f=o||a||s,h=n||i||"";if(!f)return e;if(!d.test(f))return"url("+h+f+h+")";if(p.test(f))return"url("+h+f+h+")";if("/"===f[0])return"url("+h+(((u=t).indexOf("//")>-1?u.split("/").slice(0,3).join("/"):u.split("/")[0]).split("?")[0]+f)+h+")";var m=t.split("/"),v=f.split("/");m.pop();try{for(var y=r(v),g=y.next();!g.done;g=y.next()){var S=g.value;"."!==S&&(".."===S?m.pop():m.push(S))}}catch(e){l={error:e}}finally{try{g&&!g.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}return"url("+h+m.join("/")+h+")"}))}t.absoluteToStylesheet=f;var h=/^[^ \t\n\r\u000c]+/,m=/^[, \t\n\r\u000c]+/;function v(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function y(){var e=document.createElement("a");return e.href="",e.href}function g(e,t,n,r){return"src"===n||("href"===n||"xlink:href"===n)&&r?v(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(m),!(n>=t.length);){var i=r(h);if(","===i.slice(-1))i=v(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=v(e,i);for(var s=!1;;){var l=t.charAt(n);if(""===l){o.push((i+a).trim());break}if(s)")"===l&&(s=!1);else{if(","===l){n+=1,o.push((i+a).trim());break}"("===l&&(s=!0)}a+=l,n+=1}}}return o.join(", ")}(e,r):"style"===n&&r?f(r,y()):r:v(e,r)}function S(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)}function b(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))||b(e.parentNode,t,n)}return e.nodeType,e.TEXT_NODE,b(e.parentNode,t,n)}function T(e){return void 0===e?"":e.toLowerCase()}function I(e,n){var c,u,d,p,h,m=n.doc,v=n.map,x=n.blockClass,E=n.blockSelector,w=n.maskTextClass,C=n.maskTextSelector,k=n.skipChild,N=void 0!==k&&k,M=n.inlineStylesheet,R=void 0===M||M,O=n.maskInputOptions,_=void 0===O?{}:O,D=n.maskTextFn,P=n.maskInputFn,A=n.slimDOMOptions,F=n.recordCanvas,L=void 0!==F&&F,j=n.onSerialize,B=n.onIframeLoad,W=n.iframeLoadTimeout,z=void 0===W?5e3:W,V=n.keepIframeSrcFn,H=void 0===V?function(){return!1}:V,U=n.enableStrictPrivacy,G=n.preserveWhiteSpace,Y=void 0===G||G,X=function(e,t){var n,a,c,u,d=t.doc,p=t.blockClass,h=t.blockSelector,m=t.maskTextClass,v=t.maskTextSelector,T=t.inlineStylesheet,I=t.maskInputOptions,x=void 0===I?{}:I,E=t.maskTextFn,w=t.maskInputFn,C=t.recordCanvas,k=t.keepIframeSrcFn,N=t.enableStrictPrivacy;if(d.__sn){var M=d.__sn.id;c=1===M?void 0:M}switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:o.NodeType.Document,childNodes:[],compatMode:e.compatMode,rootId:c}:{type:o.NodeType.Document,childNodes:[],rootId:c};case e.DOCUMENT_TYPE_NODE:return{type:o.NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:c};case e.ELEMENT_NODE:var R=S(e,p,h),O=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return s.test(t)?"div":t}(e),_={};try{for(var D=r(Array.from(e.attributes)),P=D.next();!P.done;P=D.next()){var A=P.value,F=A.name,L=A.value;_[F]=g(d,O,F,L)}}catch(e){n={error:e}}finally{try{P&&!P.done&&(a=D.return)&&a.call(D)}finally{if(n)throw n.error}}if("link"===O&&T){var j,B=Array.from(d.styleSheets).find((function(t){return t.href===e.href}));(j=l(B))&&(delete _.rel,delete _.href,_._cssText=f(j,B.href))}if("style"===O&&e.sheet&&!(e.innerText||e.textContent||"").trim().length&&(j=l(e.sheet))&&(_._cssText=f(j,y())),"input"!==O&&"textarea"!==O&&"select"!==O||(L=e.value,"radio"!==_.type&&"checkbox"!==_.type&&"submit"!==_.type&&"button"!==_.type&&L?"password"===_.type?_.value="*".repeat(L.length):_.value=i.maskInputValue({type:_.type,tagName:O,value:L,maskInputOptions:x,maskInputFn:w}):e.checked&&(_.checked=e.checked)),"option"===O&&(e.selected?_.selected=!0:delete _.selected),"canvas"===O&&C&&(_.rr_dataURL=e.toDataURL()),"audio"!==O&&"video"!==O||(_.rr_mediaState=e.paused?"paused":"played",_.rr_mediaCurrentTime=e.currentTime),e.scrollLeft&&(_.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(_.rr_scrollTop=e.scrollTop),R||"img"===O&&N){var W=e.getBoundingClientRect(),z=W.width,V=W.height;_={class:_.class,rr_width:z+"px",rr_height:V+"px"},R=!0}return"iframe"!==O||k(_.src)||(e.contentDocument||(_.rr_src=_.src),delete _.src),{type:o.NodeType.Element,tagName:O,attributes:_,childNodes:[],isSVG:(u=e,"svg"===u.tagName||u instanceof SVGElement||void 0),needBlock:R,rootId:c};case e.TEXT_NODE:var H=e.parentNode&&e.parentNode.tagName,U=e.textContent,G="STYLE"===H||void 0,Y="SCRIPT"===H||void 0,X=!1;return G&&U&&(U=f(U,y()),X=!0),Y?(U="SCRIPT_PLACEHOLDER",X=!0):"NOSCRIPT"===H&&(U="",X=!0),!G&&!Y&&b(e,m,v)&&U&&(U=E?E(U):U.replace(/[\S]/g,"*")),N&&!X&&H&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(H)&&U&&(U=(null==(U=U.replace(/[^ -~]+/g,""))?void 0:U.split(" ").map((function(e){return Math.random().toString(20).substr(2,e.length)})).join(" "))||""),{type:o.NodeType.Text,textContent:U||"",isStyle:G,rootId:c};case e.CDATA_SECTION_NODE:return{type:o.NodeType.CDATA,textContent:"",rootId:c};case e.COMMENT_NODE:return{type:o.NodeType.Comment,textContent:e.textContent||"",rootId:c};default:return!1}}(e,{doc:m,blockClass:x,blockSelector:E,maskTextClass:w,maskTextSelector:C,inlineStylesheet:R,maskInputOptions:_,maskTextFn:D,maskInputFn:P,recordCanvas:L,keepIframeSrcFn:H,enableStrictPrivacy:U});if(!X)return console.warn(e,"not serialized"),null;h="__sn"in e?e.__sn.id:!function(e,t){if(t.comment&&e.type===o.NodeType.Comment)return!0;if(e.type===o.NodeType.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&"preload"===e.attributes.rel&&"script"===e.attributes.as))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(T(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===T(e.attributes.name)||"icon"===T(e.attributes.rel)||"apple-touch-icon"===T(e.attributes.rel)||"shortcut icon"===T(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&T(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(T(e.attributes.property).match(/^(og|twitter|fb):/)||T(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===T(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===T(e.attributes.name)||"googlebot"===T(e.attributes.name)||"bingbot"===T(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===T(e.attributes.name)||"generator"===T(e.attributes.name)||"framework"===T(e.attributes.name)||"publisher"===T(e.attributes.name)||"progid"===T(e.attributes.name)||T(e.attributes.property).match(/^article:/)||T(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===T(e.attributes.name)||"yandex-verification"===T(e.attributes.name)||"csrf-token"===T(e.attributes.name)||"p:domain_verify"===T(e.attributes.name)||"verify-v1"===T(e.attributes.name)||"verification"===T(e.attributes.name)||"shopify-checkout-api-token"===T(e.attributes.name)))return!0}}return!1}(X,A)&&(Y||X.type!==o.NodeType.Text||X.isStyle||X.textContent.replace(/^\s+|\s+$/gm,"").length)?a++:t.IGNORED_NODE;var q=Object.assign(X,{id:h});if(e.__sn=q,h===t.IGNORED_NODE)return null;v[h]=e,j&&j(e);var Q=!N;if(q.type===o.NodeType.Element){if(Q=Q&&!q.needBlock,q.needBlock&&"img"===q.tagName){var $=e.cloneNode();$.src="",v[h]=$}delete q.needBlock}if((q.type===o.NodeType.Document||q.type===o.NodeType.Element)&&Q){A.headWhitespace&&X.type===o.NodeType.Element&&"head"===X.tagName&&(Y=!1);var K={doc:m,map:v,blockClass:x,blockSelector:E,maskTextClass:w,maskTextSelector:C,skipChild:N,inlineStylesheet:R,maskInputOptions:_,maskTextFn:D,maskInputFn:P,slimDOMOptions:A,recordCanvas:L,preserveWhiteSpace:Y,onSerialize:j,onIframeLoad:B,iframeLoadTimeout:z,keepIframeSrcFn:H,enableStrictPrivacy:U};try{for(var J=r(Array.from(e.childNodes)),Z=J.next();!Z.done;Z=J.next())(ne=I(Z.value,K))&&q.childNodes.push(ne)}catch(e){c={error:e}}finally{try{Z&&!Z.done&&(u=J.return)&&u.call(J)}finally{if(c)throw c.error}}if(i.isElement(e)&&e.shadowRoot){q.isShadowHost=!0;try{for(var ee=r(Array.from(e.shadowRoot.childNodes)),te=ee.next();!te.done;te=ee.next()){var ne;(ne=I(te.value,K))&&(ne.isShadow=!0,q.childNodes.push(ne))}}catch(e){d={error:e}}finally{try{te&&!te.done&&(p=ee.return)&&p.call(ee)}finally{if(d)throw d.error}}}}return e.parentNode&&i.isShadowRoot(e.parentNode)&&(q.isShadow=!0),q.type===o.NodeType.Element&&"iframe"===q.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var o,i=!1;try{o=r.document.readyState}catch(e){return}if("complete"===o){var a="about:blank";r.location.href===a&&e.src!==a&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}else{var s=setTimeout((function(){i||(t(),i=!0)}),n);e.addEventListener("load",(function(){clearTimeout(s),i=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&B){var n=I(t,{doc:t,map:v,blockClass:x,blockSelector:E,maskTextClass:w,maskTextSelector:C,skipChild:!1,inlineStylesheet:R,maskInputOptions:_,maskTextFn:D,maskInputFn:P,slimDOMOptions:A,recordCanvas:L,preserveWhiteSpace:Y,onSerialize:j,onIframeLoad:B,iframeLoadTimeout:z,keepIframeSrcFn:H,enableStrictPrivacy:U});n&&B(e,n)}}),z),q}t.absoluteToDoc=v,t.transformAttribute=g,t._isBlockedElement=S,t.needMaskingText=b,t.serializeNodeWithId=I,t.visitSnapshot=function(e,t){!function e(n){t(n),n.type!==o.NodeType.Document&&n.type!==o.NodeType.Element||n.childNodes.forEach(e)}(e)},t.cleanupSnapshot=function(){a=1},t.default=function(e,t){var n=t||{},r=n.blockClass,o=void 0===r?"highlight-block":r,i=n.blockSelector,a=void 0===i?null:i,s=n.maskTextClass,l=void 0===s?"highlight-mask":s,c=n.maskTextSelector,u=void 0===c?null:c,d=n.inlineStylesheet,p=void 0===d||d,f=n.recordCanvas,h=void 0!==f&&f,m=n.maskAllInputs,v=void 0!==m&&m,y=n.maskTextFn,g=n.maskInputFn,S=n.slimDOM,b=void 0!==S&&S,T=n.preserveWhiteSpace,x=n.onSerialize,E=n.onIframeLoad,w=n.iframeLoadTimeout,C=n.keepIframeSrcFn,k=void 0===C?function(){return!1}:C,N=n.enableStrictPrivacy,M={};return[I(e,{doc:e,map:M,blockClass:o,blockSelector:a,maskTextClass:l,maskTextSelector:u,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:g,slimDOMOptions:!0===b||"all"===b?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===b,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===b?{}:b,recordCanvas:h,preserveWhiteSpace:T,onSerialize:x,onIframeLoad:E,iframeLoadTimeout:w,keepIframeSrcFn:k,enableStrictPrivacy:void 0!==N&&N}),M]}},397:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.NodeType=void 0,(n=t.NodeType||(t.NodeType={}))[n.Document=0]="Document",n[n.DocumentType=1]="DocumentType",n[n.Element=2]="Element",n[n.Text=3]="Text",n[n.CDATA=4]="CDATA",n[n.Comment=5]="Comment"},606:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.maskInputValue=t.isShadowRoot=t.isElement=void 0,t.isElement=function(e){return e.nodeType===e.ELEMENT_NODE},t.isShadowRoot=function(e){var t,n=null===(t=e)||void 0===t?void 0:t.host;return Boolean(n&&n.shadowRoot&&n.shadowRoot===e)},t.maskInputValue=function(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,i=e.maskInputFn,a=o||"";return(t[n.toLowerCase()]||t[r])&&(a=i?i(a):"*".repeat(a.length)),a}},699:(e,t)=>{var n,r,o,i,a;Object.defineProperty(t,"__esModule",{value:!0}),t.ReplayerEvents=t.MediaInteractions=t.MouseInteractions=t.IncrementalSource=t.EventType=void 0,(a=t.EventType||(t.EventType={}))[a.DomContentLoaded=0]="DomContentLoaded",a[a.Load=1]="Load",a[a.FullSnapshot=2]="FullSnapshot",a[a.IncrementalSnapshot=3]="IncrementalSnapshot",a[a.Meta=4]="Meta",a[a.Custom=5]="Custom",a[a.Plugin=6]="Plugin",(i=t.IncrementalSource||(t.IncrementalSource={}))[i.Mutation=0]="Mutation",i[i.MouseMove=1]="MouseMove",i[i.MouseInteraction=2]="MouseInteraction",i[i.Scroll=3]="Scroll",i[i.ViewportResize=4]="ViewportResize",i[i.Input=5]="Input",i[i.TouchMove=6]="TouchMove",i[i.MediaInteraction=7]="MediaInteraction",i[i.StyleSheetRule=8]="StyleSheetRule",i[i.CanvasMutation=9]="CanvasMutation",i[i.Font=10]="Font",i[i.Log=11]="Log",i[i.Drag=12]="Drag",i[i.StyleDeclaration=13]="StyleDeclaration",(o=t.MouseInteractions||(t.MouseInteractions={}))[o.MouseUp=0]="MouseUp",o[o.MouseDown=1]="MouseDown",o[o.Click=2]="Click",o[o.ContextMenu=3]="ContextMenu",o[o.DblClick=4]="DblClick",o[o.Focus=5]="Focus",o[o.Blur=6]="Blur",o[o.TouchStart=7]="TouchStart",o[o.TouchMove_Departed=8]="TouchMove_Departed",o[o.TouchEnd=9]="TouchEnd",o[o.TouchCancel=10]="TouchCancel",(r=t.MediaInteractions||(t.MediaInteractions={}))[r.Play=0]="Play",r[r.Pause=1]="Pause",r[r.Seeked=2]="Seeked",(n=t.ReplayerEvents||(t.ReplayerEvents={})).Start="start",n.Pause="pause",n.Resume="resume",n.Resize="resize",n.Finish="finish",n.FullsnapshotRebuilded="fullsnapshot-rebuilded",n.LoadStylesheetStart="load-stylesheet-start",n.LoadStylesheetEnd="load-stylesheet-end",n.SkipStart="skip-start",n.SkipEnd="skip-end",n.MouseInteraction="mouse-interaction",n.EventCast="event-cast",n.CustomEvent="custom-event",n.Flush="flush",n.StateChange="state-change",n.PlayBack="play-back"},593:function(e,t,n){var r=this&&this.__values||function(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.")};Object.defineProperty(t,"__esModule",{value:!0}),t.hasShadowRoot=t.getBaseDimension=t.isIframeINode=t.iterateResolveTree=t.queueToResolveTrees=t.TreeIndex=t.polyfill=t.isTouchEvent=t.isAncestorRemoved=t.isIgnored=t.isBlocked=t.getWindowWidth=t.getWindowHeight=t.patch=t.hookSetter=t.throttle=t._mirror=t.createMirror=t.on=void 0;var o=n(699),i=n(348);t.on=function(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)}},t.createMirror=function(){return{map:{},getId:function(e){return e&&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={}}}};var a="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.";t._mirror={map:{},getId:function(){return console.error(a),-1},getNode:function(){return console.error(a),null},removeNodeFromMap:function(){console.error(a)},has:function(){return console.error(a),!1},reset:function(){console.error(a)}},"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(t._mirror=new Proxy(t._mirror,{get:function(e,t,n){return"map"===t&&console.error(a),Reflect.get(e,t,n)}})),t.throttle=function(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(i){var a=Date.now();o||!1!==n.leading||(o=a);var s=t-(a-o),l=this,c=arguments;s<=0||s>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(l,c)):r||!1===n.trailing||(r=setTimeout((function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(l,c)}),s))}},t.hookSetter=function e(t,n,r,o,i){void 0===i&&(i=window);var a=i.Object.getOwnPropertyDescriptor(t,n);return i.Object.defineProperty(t,n,o?r:{set:function(e){var t=this;setTimeout((function(){r.set.call(t,e)}),0),a&&a.set&&a.set.call(this,e)}}),function(){return e(t,n,a||{},!0)}},t.patch=function(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(){}}},t.getWindowHeight=function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},t.getWindowWidth=function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},t.isBlocked=function e(t,n){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE){var r=!1;return"string"==typeof n?r=t.classList.contains(n):t.classList.forEach((function(e){n.test(e)&&(r=!0)})),r||e(t.parentNode,n)}return t.nodeType,t.TEXT_NODE,e(t.parentNode,n)},t.isIgnored=function(e){return"__sn"in e&&e.__sn.id===i.IGNORED_NODE},t.isAncestorRemoved=function e(t,n){if(i.isShadowRoot(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.isTouchEvent=function(e){return Boolean(e.changedTouches)},t.polyfill=function(e){void 0===e&&(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})};var s=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,i,a=this,s=this,l=s.tree,c=s.removeNodeMutations,u=s.textMutations,d=s.attributeMutations,p={source:o.IncrementalSource.Mutation,removes:c,texts:u,attributes:d,adds:[]},f=function(e,t){t&&a.removeIdSet.add(e.id),p.texts=p.texts.concat(t?[]:e.texts).filter((function(e){return!a.removeIdSet.has(e.id)})),p.attributes=p.attributes.concat(t?[]:e.attributes).filter((function(e){return!a.removeIdSet.has(e.id)})),a.removeIdSet.has(e.id)||a.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return f(e,!0)})):(p.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return f(e,!1)})))};Object.values(l).forEach((function(e){return f(e,!1)}));try{for(var h=r(this.scrollMap.keys()),m=h.next();!m.done;m=h.next()){var v=m.value;this.removeIdSet.has(v)&&this.scrollMap.delete(v)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}try{for(var y=r(this.inputMap.keys()),g=y.next();!g.done;g=y.next())v=g.value,this.removeIdSet.has(v)&&this.inputMap.delete(v)}catch(e){n={error:e}}finally{try{g&&!g.done&&(i=y.return)&&i.call(y)}finally{if(n)throw n.error}}var S=new Map(this.scrollMap),b=new Map(this.inputMap);return this.reset(),{mutationData:p,scrollMap:S,inputMap:b}},e.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},e.prototype.idRemoved=function(e){return this.removeIdSet.has(e)},e}();t.TreeIndex=s,t.queueToResolveTrees=function(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 p=o[u];if(p.parent){var f=p.parent.children.indexOf(p);p.parent.children.splice(f,0,i(c,p.parent))}else f=a.indexOf(p),a.splice(f,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},t.iterateResolveTree=function e(t,n){n(t.value);for(var r=t.children.length-1;r>=0;r--)e(t.children[r],n)},t.isIframeINode=function(e){return"__sn"in e&&e.__sn.type===i.NodeType.Element&&"iframe"===e.__sn.tagName},t.getBaseDimension=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}},t.hasShadowRoot=function(e){var t;return Boolean(null===(t=e)||void 0===t?void 0:t.shadowRoot)}}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.mirror=e.Replayer=e.freezePage=e.addCustomEvent=e.record=void 0;var t=n(476);e.record=t.default;var o=n(943);Object.defineProperty(e,"Replayer",{enumerable:!0,get:function(){return o.Replayer}});var i=n(593);Object.defineProperty(e,"mirror",{enumerable:!0,get:function(){return i._mirror}});var a=n(593);e.utils=a;var s=n(699);Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return s.EventType}}),Object.defineProperty(e,"IncrementalSource",{enumerable:!0,get:function(){return s.IncrementalSource}}),Object.defineProperty(e,"MouseInteractions",{enumerable:!0,get:function(){return s.MouseInteractions}}),Object.defineProperty(e,"ReplayerEvents",{enumerable:!0,get:function(){return s.ReplayerEvents}});var l=t.default.addCustomEvent;e.addCustomEvent=l;var c=t.default.freezePage;e.freezePage=c})(),r})()}));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.highlightLib=t():e.highlightLib=t()}(self,(function(){return(()=>{"use strict";var e={537:(e,t,r)=>{function n(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}var o;r.r(t),r.d(t,{InterpreterStatus:()=>o,assign:()=>s,createMachine:()=>f,interpret:()=>m}),function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(o||(o={}));var i={type:"xstate.init"};function a(e){return void 0===e?[]:[].concat(e)}function s(e){return{type:"xstate.assign",assignment:e}}function l(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 c(e){return function(t){return e===t}}function u(e){return"string"==typeof e?{type:e}:e}function d(e,t){return{value:e,context:t,actions:[],changed:!1,matches:c(e)}}function p(e,t,r){var n=t,o=!1;return[e.filter((function(e){if("xstate.assign"===e.type){o=!0;var t=Object.assign({},n);return"function"==typeof e.assignment?t=e.assignment(n,r):Object.keys(e.assignment).forEach((function(o){t[o]="function"==typeof e.assignment[o]?e.assignment[o](n,r):e.assignment[o]})),n=t,!1}return!0})),n,o]}function f(e,t){void 0===t&&(t={});var r=n(p(a(e.states[e.initial].entry).map((function(e){return l(e,t.actions)})),e.context,i),2),o=r[0],s=r[1],f={config:e,_options:t,initialState:{value:e.initial,actions:o,context:s,matches:c(e.initial)},transition:function(t,r){var o,i,s="string"==typeof t?{value:t,context:e.context}:t,h=s.value,m=s.context,v=u(r),y=e.states[h];if(y.on){var g=a(y.on[v.type]);try{for(var b=function(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.")}(g),S=b.next();!S.done;S=b.next()){var T=S.value;if(void 0===T)return d(h,m);var x="string"==typeof T?{target:T}:T,I=x.target,w=x.actions,E=void 0===w?[]:w,C=x.cond,k=void 0===I;if((void 0===C?function(){return!0}:C)(m,v)){var M=e.states[null!=I?I:h],N=n(p((k?a(E):[].concat(y.exit,E,M.entry).filter((function(e){return e}))).map((function(e){return l(e,f._options.actions)})),m,v),3),_=N[0],O=N[1],R=N[2],D=null!=I?I:h;return{value:D,context:O,actions:_,changed:I!==h||_.length>0||R,matches:c(D)}}}}catch(e){o={error:e}}finally{try{S&&!S.done&&(i=b.return)&&i.call(b)}finally{if(o)throw o.error}}}return d(h,m)}};return f}var h=function(e,t){return e.actions.forEach((function(r){var n=r.exec;return n&&n(e.context,t)}))};function m(e){var t=e.initialState,r=o.NotStarted,n=new Set,a={_machine:e,send:function(i){r===o.Running&&(t=e.transition(t,i),h(t,u(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 s="object"==typeof n?n:{context:e.config.context,value:n};t={value:s.value,actions:[],context:s.context,matches:c(s.value)}}return r=o.Running,h(t,i),a},stop:function(){return r=o.Stopped,n.clear(),a},get state(){return t},get status(){return r}};return a}},247:(e,t,r)=>{r.r(t),r.d(t,{decode:()=>s,encode:()=>a});for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o="undefined"==typeof Uint8Array?[]:new Uint8Array(256),i=0;i<n.length;i++)o[n.charCodeAt(i)]=i;var a=function(e){var t,r=new Uint8Array(e),o=r.length,i="";for(t=0;t<o;t+=3)i+=n[r[t]>>2],i+=n[(3&r[t])<<4|r[t+1]>>4],i+=n[(15&r[t+1])<<2|r[t+2]>>6],i+=n[63&r[t+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i},s=function(e){var t,r,n,i,a,s=.75*e.length,l=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var u=new ArrayBuffer(s),d=new Uint8Array(u);for(t=0;t<l;t+=4)r=o[e.charCodeAt(t)],n=o[e.charCodeAt(t+1)],i=o[e.charCodeAt(t+2)],a=o[e.charCodeAt(t+3)],d[c++]=r<<2|n>>4,d[c++]=(15&n)<<4|i>>2,d[c++]=(3&i)<<6|63&a;return u}},380:(e,t,r)=>{r.r(t)},652:(e,t,r)=>{r.r(t),r.d(t,{default:()=>n});const n=function(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)}))}}}},463:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IframeManager=void 0;var r=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 r;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(r=this.loadListener)||void 0===r||r.call(this,e)},e}();t.IframeManager=r},476:function(e,t,r){var n=this&&this.__assign||function(){return(n=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)},o=this&&this.__read||function(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};Object.defineProperty(t,"__esModule",{value:!0});var i,a,s=r(348),l=r(584),c=r(593),u=r(699),d=r(463),p=r(783);function f(e){return n(n({},e),{timestamp:Date.now()})}var h=c.createMirror();function m(e){void 0===e&&(e={});var t=e.emit,r=e.checkoutEveryNms,m=e.checkoutEveryNth,v=e.blockClass,y=void 0===v?"highlight-block":v,g=e.blockSelector,b=void 0===g?null:g,S=e.ignoreClass,T=void 0===S?"highlight-ignore":S,x=e.maskTextClass,I=void 0===x?"highlight-mask":x,w=e.maskTextSelector,E=void 0===w?null:w,C=e.inlineStylesheet,k=void 0===C||C,M=e.maskAllInputs,N=e.maskInputOptions,_=e.slimDOMOptions,O=e.maskInputFn,R=e.maskTextFn,D=e.hooks,A=e.packFn,P=e.sampling,L=void 0===P?{}:P,F=e.mousemoveWait,j=e.recordCanvas,W=void 0!==j&&j,B=e.userTriggeredOnInput,G=void 0!==B&&B,z=e.collectFonts,H=void 0!==z&&z,V=e.plugins,U=e.keepIframeSrcFn,Y=void 0===U?function(){return!1}:U,X=e.enableStrictPrivacy,q=void 0!==X&&X;if(!t)throw new Error("emit function is required");void 0!==F&&void 0===L.mousemove&&(L.mousemove=F);var Q,$=!0===M?{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!==N?N:{password:!0},K=!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===_,headMetaDescKeywords:"all"===_}:_||{};c.polyfill();var J=0;i=function(e,n){var o;if(!(null===(o=l.mutationBuffers[0])||void 0===o?void 0:o.isFrozen())||e.type===u.EventType.FullSnapshot||e.type===u.EventType.IncrementalSnapshot&&e.data.source===u.IncrementalSource.Mutation||l.mutationBuffers.forEach((function(e){return e.unfreeze()})),t(A?A(e):e,n),e.type===u.EventType.FullSnapshot)Q=e,J=0;else if(e.type===u.EventType.IncrementalSnapshot){if(e.data.source===u.IncrementalSource.Mutation&&e.data.isAttachIframe)return;J++;var i=m&&J>=m,s=r&&e.timestamp-Q.timestamp>r;(i||s)&&a(!0)}};var Z=function(e){i(f({type:u.EventType.IncrementalSnapshot,data:n({source:u.IncrementalSource.Mutation},e)}))},ee=function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:n({source:u.IncrementalSource.Scroll},e)}))},te=new d.IframeManager({mutationCb:Z}),re=new p.ShadowDomManager({mutationCb:Z,scrollCb:ee,bypassOptions:{blockClass:y,blockSelector:b,maskTextClass:I,maskTextSelector:E,inlineStylesheet:k,maskInputOptions:$,maskTextFn:R,maskInputFn:O,recordCanvas:W,sampling:L,slimDOMOptions:K,iframeManager:te,enableStrictPrivacy:q},mirror:h});a=function(e){var t,r,n,a;void 0===e&&(e=!1),i(f({type:u.EventType.Meta,data:{href:window.location.href,width:c.getWindowWidth(),height:c.getWindowHeight()}}),e),l.mutationBuffers.forEach((function(e){return e.lock()}));var d=o(s.snapshot(document,{blockClass:y,blockSelector:b,maskTextClass:I,maskTextSelector:E,inlineStylesheet:k,maskAllInputs:$,maskTextFn:R,slimDOM:K,recordCanvas:W,enableStrictPrivacy:q,onSerialize:function(e){c.isIframeINode(e)&&te.addIframe(e),c.hasShadowRoot(e)&&re.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){te.attachIframe(e,t)},keepIframeSrcFn:Y}),2),p=d[0],m=d[1];if(!p)return console.warn("Failed to snapshot the document");h.map=m,i(f({type:u.EventType.FullSnapshot,data:{node:p,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(r=null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.parentElement)||void 0===r?void 0:r.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===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.parentElement)||void 0===a?void 0:a.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),l.mutationBuffers.forEach((function(e){return e.unlock()}))};try{var ne=[];ne.push(c.on("DOMContentLoaded",(function(){i(f({type:u.EventType.DomContentLoaded,data:{}}))})));var oe=function(e){return l.initObservers({mutationCb:Z,mousemoveCb:function(e,t){return i(f({type:u.EventType.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:n({source:u.IncrementalSource.MouseInteraction},e)}))},scrollCb:ee,viewportResizeCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:n({source:u.IncrementalSource.ViewportResize},e)}))},inputCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:n({source:u.IncrementalSource.Input},e)}))},mediaInteractionCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:n({source:u.IncrementalSource.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:n({source:u.IncrementalSource.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:n({source:u.IncrementalSource.StyleDeclaration},e)}))},canvasMutationCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:n({source:u.IncrementalSource.CanvasMutation},e)}))},fontCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:n({source:u.IncrementalSource.Font},e)}))},blockClass:y,ignoreClass:T,maskTextClass:I,maskTextSelector:E,maskInputOptions:$,inlineStylesheet:k,sampling:L,recordCanvas:W,userTriggeredOnInput:G,collectFonts:H,doc:e,maskInputFn:O,maskTextFn:R,blockSelector:b,slimDOMOptions:K,mirror:h,iframeManager:te,shadowDomManager:re,plugins:(null==V?void 0:V.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return i(f({type:u.EventType.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[],enableStrictPrivacy:q},D)};te.addLoadListener((function(e){ne.push(oe(e.contentDocument))}));var ie=function(){a(),ne.push(oe(document))};return"interactive"===document.readyState||"complete"===document.readyState?ie():ne.push(c.on("load",(function(){i(f({type:u.EventType.Load,data:{}})),ie()}),window)),function(){ne.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}m.addCustomEvent=function(e,t){if(!i)throw new Error("please add custom event after start recording");i(f({type:u.EventType.Custom,data:{tag:e,payload:t}}))},m.freezePage=function(){l.mutationBuffers.forEach((function(e){return e.freeze()}))},m.takeFullSnapshot=function(e){if(!a)throw new Error("please take full snapshot after start recording");a(e)},m.mirror=h,t.default=m},899:function(e,t,r){var n=this&&this.__values||function(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.")};Object.defineProperty(t,"__esModule",{value:!0});var o=r(348),i=r(593);function a(e){return"__ln"in e}var s=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,r=0;r<e;r++)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&&a(e.previousSibling)){var r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else e.nextSibling&&a(e.nextSibling)&&e.nextSibling.__ln.previous?(r=e.nextSibling.__ln.previous,t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)):(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}(),l=function(e,t){return e+"@"+t};function c(e){return"__sn"in e}var u=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,a,l;if(!e.frozen&&!e.locked){for(var c=[],u=new s,d=function(t){for(var r=t,n=o.IGNORED_NODE;n===o.IGNORED_NODE;)n=(r=r&&r.nextSibling)&&e.mirror.getId(r);return n},h=function(t){var r,n=t.getRootNode?null===(r=t.getRootNode())||void 0===r?void 0:r.host:null,a=!(e.doc.contains(t)||n instanceof Node&&e.doc.contains(n));if(t.parentNode&&!a){var s=o.isShadowRoot(t.parentNode)?e.mirror.getId(n):e.mirror.getId(t.parentNode),l=d(t);if(-1===s||-1===l)return u.addNode(t);var p=o.serializeNodeWithId(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,enableStrictPrivacy:e.enableStrictPrivacy,onSerialize:function(r){i.isIframeINode(r)&&e.iframeManager.addIframe(r),i.hasShadowRoot(t)&&e.shadowDomManager.addShadowRoot(t.shadowRoot,document)},onIframeLoad:function(t,r){e.iframeManager.attachIframe(t,r)}});p&&c.push({parentId:s,nextId:l,node:p})}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());try{for(var m=n(e.movedSet),v=m.next();!v.done;v=m.next()){var y=v.value;p(e.removes,y,e.mirror)&&!e.movedSet.has(y.parentNode)||h(y)}}catch(e){t={error:e}}finally{try{v&&!v.done&&(r=m.return)&&r.call(m)}finally{if(t)throw t.error}}try{for(var g=n(e.addedSet),b=g.next();!b.done;b=g.next())y=b.value,f(e.droppedSet,y)||p(e.removes,y,e.mirror)?f(e.movedSet,y)?h(y):e.droppedSet.add(y):h(y)}catch(e){a={error:e}}finally{try{b&&!b.done&&(l=g.return)&&l.call(g)}finally{if(a)throw a.error}}for(var S=null;u.length;){var T=null;if(S){var x=e.mirror.getId(S.value.parentNode),I=d(S.value);-1!==x&&-1!==I&&(T=S)}if(!T)for(var w=u.length-1;w>=0;w--){var E=u.get(w);if(E&&(x=e.mirror.getId(E.value.parentNode),I=d(E.value),-1!==x&&-1!==I)){T=E;break}}if(!T){for(;u.head;)u.removeNode(u.head.value);break}S=T.previous,u.removeNode(T.value),h(T.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:c};(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(!i.isIgnored(t.target))switch(t.type){case"characterData":var r=t.target.textContent;i.isBlocked(t.target,e.blockClass)||r===t.oldValue||e.texts.push({value:o.needMaskingText(t.target,e.maskTextClass,e.maskTextSelector)&&r?e.maskTextFn?e.maskTextFn(r):r.replace(/[\S]/g,"*"):r,node:t.target});break;case"attributes":if(t.target,r=t.target.getAttribute(t.attributeName),"value"===t.attributeName&&(r=o.maskInputValue({maskInputOptions:e.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:r,maskInputFn:e.maskInputFn})),i.isBlocked(t.target,e.blockClass)||r===t.oldValue)return;var n=e.attributes.find((function(e){return e.node===t.target}));if(n||(n={node:t.target,attributes:{}},e.attributes.push(n)),"INPUT"===t.target.tagName){var a=t.target;if("password"===a.type){n.attributes.value="*".repeat(a.value.length);break}}n.attributes[t.attributeName]=o.transformAttribute(e.doc,t.target.tagName,t.attributeName,r);break;case"childList":t.addedNodes.forEach((function(r){return e.genAdds(r,t.target)})),t.removedNodes.forEach((function(r){var n=e.mirror.getId(r),a=o.isShadowRoot(t.target)?e.mirror.getId(t.target.host):e.mirror.getId(t.target);i.isBlocked(t.target,e.blockClass)||i.isIgnored(r)||(e.addedSet.has(r)?(d(e.addedSet,r),e.droppedSet.add(r)):e.addedSet.has(t.target)&&-1===n||i.isAncestorRemoved(t.target,e.mirror)||(e.movedSet.has(r)&&e.movedMap[l(n,a)]?d(e.movedSet,r):e.removes.push({parentId:a,id:n,isShadow:!!o.isShadowRoot(t.target)||void 0})),e.mapRemoves.push(r))}))}},this.genAdds=function(t,r){if(!r||!i.isBlocked(r,e.blockClass)){if(c(t)){if(i.isIgnored(t))return;e.movedSet.add(t);var n=null;r&&c(r)&&(n=r.__sn.id),n&&(e.movedMap[l(t.__sn.id,n)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);i.isBlocked(t,e.blockClass)||t.childNodes.forEach((function(t){return e.genAdds(t)}))}}}return e.prototype.init=function(e,t,r,n,o,i,a,s,l,c,u,d,p,f,h,m){this.blockClass=t,this.blockSelector=r,this.maskTextClass=n,this.maskTextSelector=o,this.inlineStylesheet=i,this.maskInputOptions=a,this.maskTextFn=s,this.maskInputFn=l,this.recordCanvas=c,this.slimDOMOptions=u,this.enableStrictPrivacy=m,this.emissionCallback=e,this.doc=d,this.mirror=p,this.iframeManager=f,this.shadowDomManager=h},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 d(e,t){e.delete(t),t.childNodes.forEach((function(t){return d(e,t)}))}function p(e,t,r){var n=t.parentNode;if(!n)return!1;var o=r.getId(n);return!!e.some((function(e){return e.id===o}))||p(e,n,r)}function f(e,t){var r=t.parentNode;return!!r&&(!!e.has(r)||f(e,r))}t.default=u},584:function(e,t,r){var n=this&&this.__assign||function(){return(n=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)},o=this&&this.__read||function(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},i=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e},a=this&&this.__values||function(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.")};Object.defineProperty(t,"__esModule",{value:!0}),t.initObservers=t.INPUT_TAGS=t.initScrollObserver=t.initMutationObserver=t.mutationBuffers=void 0;var s=r(348),l=r(593),c=r(699),u=r(899),d=r(705),p=r(882),f=r(196);t.mutationBuffers=[];var h="undefined"!=typeof CSSGroupingRule,m="undefined"!=typeof CSSMediaRule,v="undefined"!=typeof CSSSupportsRule,y="undefined"!=typeof CSSConditionRule;function g(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 b(e,r,n,o,i,a,s,l,c,d,p,f,h,m,v,y,g){var b,S,T,x=new u.default;t.mutationBuffers.push(x),x.init(e,n,o,i,a,s,l,c,d,p,f,r,h,m,v,g);var I=window.MutationObserver||window.__rrMutationObserver,w=null===(T=null===(S=null===(b=window)||void 0===b?void 0:b.Zone)||void 0===S?void 0:S.__symbol__)||void 0===T?void 0:T.call(S,"MutationObserver");w&&window[w]&&(I=window[w]);var E=new I(x.processMutations.bind(x));return E.observe(y,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),E}function S(e,t,r,n,o){var i=l.throttle((function(o){var i=g(o);if(i&&!l.isBlocked(i,n)){var a=r.getId(i);if(i===t){var s=t.scrollingElement||t.documentElement;e({id:a,x:s.scrollLeft,y:s.scrollTop})}else e({id:a,x:i.scrollLeft,y:i.scrollTop})}}),o.scroll||100);return l.on("scroll",i,t)}function T(e,t){var r=n({},e);return t||delete r.userTriggered,r}t.initMutationObserver=b,t.initScrollObserver=S,t.INPUT_TAGS=["INPUT","TEXTAREA","SELECT"];var x=new WeakMap;function I(e){return function(e,t){if(h&&e.parentRule instanceof CSSGroupingRule||m&&e.parentRule instanceof CSSMediaRule||v&&e.parentRule instanceof CSSSupportsRule||y&&e.parentRule instanceof CSSConditionRule){var r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else r=Array.from(e.parentStyleSheet.cssRules).indexOf(e),t.unshift(r);return t}(e,[])}t.initObservers=function(e,r){var u,w;void 0===r&&(r={});var E=e.doc.defaultView;if(!E)return function(){};!function(e,t){var r=e.mutationCb,n=e.mousemoveCb,o=e.mouseInteractionCb,a=e.scrollCb,s=e.viewportResizeCb,l=e.inputCb,c=e.mediaInteractionCb,u=e.styleSheetRuleCb,d=e.styleDeclarationCb,p=e.canvasMutationCb,f=e.fontCb;e.mutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mutation&&t.mutation.apply(t,i(e)),r.apply(void 0,i(e))},e.mousemoveCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mousemove&&t.mousemove.apply(t,i(e)),n.apply(void 0,i(e))},e.mouseInteractionCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mouseInteraction&&t.mouseInteraction.apply(t,i(e)),o.apply(void 0,i(e))},e.scrollCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.scroll&&t.scroll.apply(t,i(e)),a.apply(void 0,i(e))},e.viewportResizeCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.viewportResize&&t.viewportResize.apply(t,i(e)),s.apply(void 0,i(e))},e.inputCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.input&&t.input.apply(t,i(e)),l.apply(void 0,i(e))},e.mediaInteractionCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mediaInteaction&&t.mediaInteaction.apply(t,i(e)),c.apply(void 0,i(e))},e.styleSheetRuleCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.styleSheetRule&&t.styleSheetRule.apply(t,i(e)),u.apply(void 0,i(e))},e.styleDeclarationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.styleDeclaration&&t.styleDeclaration.apply(t,i(e)),d.apply(void 0,i(e))},e.canvasMutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.canvasMutation&&t.canvasMutation.apply(t,i(e)),p.apply(void 0,i(e))},e.fontCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.font&&t.font.apply(t,i(e)),f.apply(void 0,i(e))}}(e,r);var C,k,M,N,_,O,R,D,A,P=b(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,e.enableStrictPrivacy),L=function(e,t,r,n){if(!1===t.mousemove)return function(){};var o,i="number"==typeof t.mousemove?t.mousemove:50,a="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,s=[],u=l.throttle((function(t){var r=Date.now()-o;e(s.map((function(e){return e.timeOffset-=r,e})),t),s=[],o=null}),a),d=l.throttle((function(e){var t=g(e),r=l.isTouchEvent(e)?e.changedTouches[0]:e,i=r.clientX,a=r.clientY;o||(o=Date.now()),s.push({x:i,y:a,id:n.getId(t),timeOffset:Date.now()-o}),u("undefined"!=typeof DragEvent&&e instanceof DragEvent?c.IncrementalSource.Drag:e instanceof MouseEvent?c.IncrementalSource.MouseMove:c.IncrementalSource.TouchMove)}),i,{trailing:!1}),p=[l.on("mousemove",d,r),l.on("touchmove",d,r),l.on("drag",d,r)];return function(){p.forEach((function(e){return e()}))}}(e.mousemoveCb,e.sampling,e.doc,e.mirror),F=function(e,t,r,n,o){if(!1===o.mouseInteraction)return function(){};var i=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[];return Object.keys(c.MouseInteractions).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==i[e]})).forEach((function(o){var i=o.toLowerCase(),s=function(t){return function(o){var i=g(o);if(!l.isBlocked(i,n)){var a=l.isTouchEvent(o)?o.changedTouches[0]:o;if(a){var s=r.getId(i),u=a.clientX,d=a.clientY;e({type:c.MouseInteractions[t],id:s,x:u,y:d})}}}}(o);a.push(l.on(i,s,t))})),function(){a.forEach((function(e){return e()}))}}(e.mouseInteractionCb,e.doc,e.mirror,e.blockClass,e.sampling),j=S(e.scrollCb,e.doc,e.mirror,e.blockClass,e.sampling),W=(C=e.viewportResizeCb,k=-1,M=-1,N=l.throttle((function(){var e=l.getWindowHeight(),t=l.getWindowWidth();k===e&&M===t||(C({width:Number(t),height:Number(e)}),k=e,M=t)}),200),l.on("resize",N,window)),B=function(e,r,o,a,c,u,d,p,f){function h(e){var n=g(e),o=e.isTrusted;if(n&&n.tagName&&!(t.INPUT_TAGS.indexOf(n.tagName)<0)&&!l.isBlocked(n,a)){var i=n.type;if(!n.classList.contains(c)){var p=n.value,h=!1;"radio"===i||"checkbox"===i?h=n.checked:(u[n.tagName.toLowerCase()]||u[i])&&(p=s.maskInputValue({maskInputOptions:u,tagName:n.tagName,type:i,value:p,maskInputFn:d})),m(n,T({text:p,isChecked:h,userTriggered:o},f));var v=n.name;"radio"===i&&v&&h&&r.querySelectorAll('input[type="radio"][name="'+v+'"]').forEach((function(e){e!==n&&m(e,T({text:e.value,isChecked:!h,userTriggered:!1},f))}))}}}function m(t,r){var i=x.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){x.set(t,r);var a=o.getId(t);e(n(n({},r),{id:a}))}}var v=("last"===p.input?["change"]:["input","change"]).map((function(e){return l.on(e,h,r)})),y=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),b=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"]];return y&&y.set&&v.push.apply(v,i(b.map((function(e){return l.hookSetter(e[0],e[1],{set:function(){h({target:this})}})})))),function(){v.forEach((function(e){return e()}))}}(e.inputCb,e.doc,e.mirror,e.blockClass,e.ignoreClass,e.maskInputOptions,e.maskInputFn,e.sampling,e.userTriggeredOnInput),G=(_=e.mediaInteractionCb,O=e.blockClass,R=e.mirror,D=function(e){return function(t){var r=g(t);r&&!l.isBlocked(r,O)&&_({type:e,id:R.getId(r),currentTime:r.currentTime})}},A=[l.on("play",D(0)),l.on("pause",D(1)),l.on("seeked",D(2))],function(){A.forEach((function(e){return e()}))}),z=function(e,t,r){var n=t.CSSStyleSheet.prototype.insertRule;t.CSSStyleSheet.prototype.insertRule=function(t,o){var i=r.getId(this.ownerNode);return-1!==i&&e({id:i,adds:[{rule:t,index:o}]}),n.apply(this,arguments)};var a=t.CSSStyleSheet.prototype.deleteRule;t.CSSStyleSheet.prototype.deleteRule=function(t){var n=r.getId(this.ownerNode);return-1!==n&&e({id:n,removes:[{index:t}]}),a.apply(this,arguments)};var s={};h?s.CSSGroupingRule=t.CSSGroupingRule:(m&&(s.CSSMediaRule=t.CSSMediaRule),y&&(s.CSSConditionRule=t.CSSConditionRule),v&&(s.CSSSupportsRule=t.CSSSupportsRule));var l={};return Object.entries(s).forEach((function(t){var n=o(t,2),a=n[0],s=n[1];l[a]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=function(t,n){var o=r.getId(this.parentStyleSheet.ownerNode);return-1!==o&&e({id:o,adds:[{rule:t,index:i(I(this),[n||0])}]}),l[a].insertRule.apply(this,arguments)},s.prototype.deleteRule=function(t){var n=r.getId(this.parentStyleSheet.ownerNode);return-1!==n&&e({id:n,removes:[{index:i(I(this),[t])}]}),l[a].deleteRule.apply(this,arguments)}})),function(){t.CSSStyleSheet.prototype.insertRule=n,t.CSSStyleSheet.prototype.deleteRule=a,Object.entries(s).forEach((function(e){var t=o(e,2),r=t[0],n=t[1];n.prototype.insertRule=l[r].insertRule,n.prototype.deleteRule=l[r].deleteRule}))}}(e.styleSheetRuleCb,E,e.mirror),H=function(e,t,r){var n=t.CSSStyleDeclaration.prototype.setProperty;t.CSSStyleDeclaration.prototype.setProperty=function(t,o,i){var a,s,l=r.getId(null===(s=null===(a=this.parentRule)||void 0===a?void 0:a.parentStyleSheet)||void 0===s?void 0:s.ownerNode);return-1!==l&&e({id:l,set:{property:t,value:o,priority:i},index:I(this.parentRule)}),n.apply(this,arguments)};var o=t.CSSStyleDeclaration.prototype.removeProperty;return t.CSSStyleDeclaration.prototype.removeProperty=function(t){var n,i,a=r.getId(null===(i=null===(n=this.parentRule)||void 0===n?void 0:n.parentStyleSheet)||void 0===i?void 0:i.ownerNode);return-1!==a&&e({id:a,remove:{property:t},index:I(this.parentRule)}),o.apply(this,arguments)},function(){t.CSSStyleDeclaration.prototype.setProperty=n,t.CSSStyleDeclaration.prototype.removeProperty=o}}(e.styleDeclarationCb,E,e.mirror),V=e.recordCanvas?function(e,t,r,n){var o=d.default(t,r),i=p.default(e,t,r,n),a=f.default(e,t,r,n);return function(){o(),i(),a()}}(e.canvasMutationCb,E,e.blockClass,e.mirror):function(){},U=e.collectFonts?function(e,t){var r=t.defaultView;if(!r)return function(){};var n=[],o=new WeakMap,i=r.FontFace;r.FontFace=function(e,t,r){var n=new i(e,t,r);return o.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};var a=l.patch(t.fonts,"add",(function(t){return function(r){return setTimeout((function(){var t=o.get(r);t&&(e(t),o.delete(r))}),0),t.apply(this,[r])}}));return n.push((function(){r.FontFace=i})),n.push(a),function(){n.forEach((function(e){return e()}))}}(e.fontCb,e.doc):function(){},Y=[];try{for(var X=a(e.plugins),q=X.next();!q.done;q=X.next()){var Q=q.value;Y.push(Q.observer(Q.callback,E,Q.options))}}catch(e){u={error:e}}finally{try{q&&!q.done&&(w=X.return)&&w.call(X)}finally{if(u)throw u.error}}return function(){P.disconnect(),L(),F(),j(),W(),B(),G(),z(),H(),V(),U(),Y.forEach((function(e){return e()}))}}},882:function(e,t,r){var n=this&&this.__read||function(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},o=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e},i=this&&this.__values||function(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.")};Object.defineProperty(t,"__esModule",{value:!0});var a=r(699),s=r(593);t.default=function(e,t,r,n){var l,c,u=[],d=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),p=function(i){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[i])return"continue";var l=s.patch(t.CanvasRenderingContext2D.prototype,i,(function(t){return function(){for(var l=this,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return s.isBlocked(this.canvas,r)||setTimeout((function(){var t=o(c);if("drawImage"===i&&t[0]&&t[0]instanceof HTMLCanvasElement){var r=t[0],s=r.getContext("2d"),u=null==s?void 0:s.getImageData(0,0,r.width,r.height),d=null==u?void 0:u.data;t[0]=JSON.stringify(d)}e({id:n.getId(l.canvas),type:a.CanvasContext["2D"],property:i,args:t})}),0),t.apply(this,c)}}));u.push(l)}catch(r){var c=s.hookSetter(t.CanvasRenderingContext2D.prototype,i,{set:function(t){e({id:n.getId(this.canvas),type:a.CanvasContext["2D"],property:i,args:[t],setter:!0})}});u.push(c)}};try{for(var f=i(d),h=f.next();!h.done;h=f.next())p(h.value)}catch(e){l={error:e}}finally{try{h&&!h.done&&(c=f.return)&&c.call(f)}finally{if(l)throw l.error}}return function(){u.forEach((function(e){return e()}))}}},705:function(e,t,r){var n=this&&this.__read||function(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},o=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0});var i=r(593);t.default=function(e,t){var r=[];try{var n=i.patch(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(r){for(var n=[],a=1;a<arguments.length;a++)n[a-1]=arguments[a];return i.isBlocked(this,t)||"__context"in this||(this.__context=r),e.apply(this,o([r],n))}}));r.push(n)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){r.forEach((function(e){return e()}))}}},986:function(e,t,r){var n=this&&this.__read||function(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},o=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0}),t.saveWebGLVar=t.serializeArgs=t.serializeArg=void 0;var i=r(247),a={};function s(e){if(e instanceof Array)return e.map(s);if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:i.encode(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[s(e.buffer),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement)return{rr_type:e.constructor.name,src:e.src};if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[s(e.data),e.width,e.height]};if(e instanceof WebGLActiveInfo||e instanceof WebGLBuffer||e instanceof WebGLFramebuffer||e instanceof WebGLProgram||e instanceof WebGLRenderbuffer||e instanceof WebGLShader||e instanceof WebGLShaderPrecisionFormat||e instanceof WebGLTexture||e instanceof WebGLUniformLocation||e instanceof WebGLVertexArrayObject||e&&"WebGLVertexArrayObjectOES"==e.constructor.name||"object"==typeof e){var t=e.constructor.name,r=a[t]||(a[t]=[]),n=r.indexOf(e);return-1===n&&(n=r.length,r.push(e)),{rr_type:t,index:n}}return e}t.serializeArg=s,t.serializeArgs=function(e){return o(e).map(s)},t.saveWebGLVar=function(e){if(e instanceof WebGLActiveInfo||e instanceof WebGLBuffer||e instanceof WebGLFramebuffer||e instanceof WebGLProgram||e instanceof WebGLRenderbuffer||e instanceof WebGLShader||e instanceof WebGLShaderPrecisionFormat||e instanceof WebGLTexture||e instanceof WebGLUniformLocation||e instanceof WebGLVertexArrayObject||e&&"WebGLVertexArrayObjectOES"==e.constructor.name||"object"==typeof e){var t=e.constructor.name,r=a[t]||(a[t]=[]),n=r.indexOf(e);return-1===n&&(n=r.length,r.push(e)),n}}},196:function(e,t,r){var n=this&&this.__assign||function(){return(n=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)},o=this&&this.__read||function(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},i=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e},a=this&&this.__values||function(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.")};Object.defineProperty(t,"__esModule",{value:!0});var s=r(699),l=r(593),c=r(986);function u(e,t,r){e.forEach((function(n,o){var i=r.getId(o);d(o,e,i,t)})),requestAnimationFrame((function(){return u(e,t,r)}))}function d(e,t,r,o){var i=t.get(e);i&&-1!==r&&(i.forEach((function(e){return o(n(n({},e),{id:r}))})),t.delete(e))}function p(e,t,r,n,o,s,u){var p,f,h=[],m=Object.getOwnPropertyNames(e),v=function(a){try{if("function"!=typeof e[a])return"continue";var p=l.patch(e,a,(function(e){return function(){for(var p=[],f=0;f<arguments.length;f++)p[f]=arguments[f];var h=u.invokeId&&u.latestId!==u.invokeId;!h&&u.invokeId||(u.invokeId=u.latestId);var m=e.apply(this,p);if(c.saveWebGLVar(m),!l.isBlocked(this.canvas,n)){var v=o.getId(this.canvas),y=c.serializeArgs(i(p)),g={id:v,type:t,property:a,args:y};h&&(g.newFrame=!0),-1===v?(s.has(this.canvas)||s.set(this.canvas,[]),s.get(this.canvas).push(g)):(d(this.canvas,s,v,r),r(g))}return m}}));h.push(p)}catch(n){var f=l.hookSetter(e,a,{set:function(e){r({id:o.getId(this.canvas),type:t,property:a,args:[e],setter:!0})}});h.push(f)}};try{for(var y=a(m),g=y.next();!g.done;g=y.next())v(g.value)}catch(e){p={error:e}}finally{try{g&&!g.done&&(f=y.return)&&f.call(y)}finally{if(p)throw p.error}}return h}t.default=function(e,t,r,n){var o=[],a=new Map,l={latestId:0,invokeId:null},c=function(e){l.latestId=e,requestAnimationFrame(c)};return requestAnimationFrame(c),requestAnimationFrame((function(){return u(a,e,n)})),o.push.apply(o,i(p(t.WebGLRenderingContext.prototype,s.CanvasContext.WebGL,e,r,n,a,l))),void 0!==t.WebGL2RenderingContext&&o.push.apply(o,i(p(t.WebGL2RenderingContext.prototype,s.CanvasContext.WebGL2,e,r,n,a,l))),function(){a.clear(),o.forEach((function(e){return e()}))}}},783:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowDomManager=void 0;var n=r(584),o=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){n.initMutationObserver(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,this.bypassOptions.enableStrictPrivacy),n.initScrollObserver(this.scrollCb,e,this.mirror,this.bypassOptions.blockClass,this.bypassOptions.sampling)},e}();t.ShadowDomManager=o},165:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.event,r=e.mutation,n=e.target,o=e.imageMap,i=e.errorHandler;try{var a=n.getContext("2d");if(r.setter)return void(a[r.property]=r.args[0]);var s=a[r.property];if("drawImage"===r.property&&"string"==typeof r.args[0]){var l=o.get(t);r.args[0]=l,s.apply(a,r.args)}else s.apply(a,r.args)}catch(e){i(r,e)}}},267:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=r(699),o=r(814),i=r(165);t.default=function(e){var t=e.event,r=e.mutation,a=e.target,s=e.imageMap,l=e.errorHandler;try{return[n.CanvasContext.WebGL,n.CanvasContext.WebGL2].includes(r.type)?o.default({mutation:r,target:a,imageMap:s,errorHandler:l}):i.default({event:t,mutation:r,target:a,imageMap:s,errorHandler:l})}catch(e){l(r,e)}}},814:function(e,t,r){var n=this&&this.__read||function(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},o=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0}),t.deserializeArg=t.variableListFor=void 0;var i=r(247),a=r(699),s=new Map;function l(e){return s.has(e)||s.set(e,[]),s.get(e)}t.variableListFor=l;var c=[WebGLActiveInfo,WebGLBuffer,WebGLFramebuffer,WebGLProgram,WebGLRenderbuffer,WebGLShader,WebGLShaderPrecisionFormat,WebGLTexture,WebGLUniformLocation,WebGLVertexArrayObject].map((function(e){return e.name}));function u(e){return function(t){if(t&&"object"==typeof t&&"rr_type"in t){if("index"in t){var r=t.rr_type,n=t.index;return l(r)[n]}if("args"in t){var a=t.rr_type,s=t.args,c=window[a];return new(c.bind.apply(c,o([void 0],s.map(u(e)))))}if("base64"in t)return i.decode(t.base64);if("src"in t){var d=e.get(t.src);if(d)return d;var p=new Image;return p.src=t.src,e.set(t.src,p),p}}else if(Array.isArray(t))return t.map(u(e));return t}}t.deserializeArg=u,t.default=function(e){var t=e.mutation,r=e.target,n=e.imageMap,o=e.errorHandler;try{var i=function(e,t){try{return t===a.CanvasContext.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(e){return null}}(r,t.type);if(!i)return;if(t.setter)return void(i[t.property]=t.args[0]);var s=i[t.property],d=t.args.map(u(n));!function(e){if(null==e?void 0:e.constructor){var t=e.constructor.name;if(c.includes(t)){var r=l(t);r.includes(e)||r.push(e)}}}(s.apply(i,d))}catch(e){o(t,e)}}},943:function(e,t,r){var n=this&&this.__assign||function(){return(n=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)},o=this&&this.__values||function(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.")},i=this&&this.__read||function(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},a=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0}),t.Replayer=void 0;var s=r(348),l=r(652),c=r(669),u=r(104),d=r(129),p=r(699),f=r(593),h=r(277);r(380);var m=r(401),v=r(267),y=36e5,g=l.default||l,b="[replayer]",S={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function T(e){return e.type==p.EventType.IncrementalSnapshot&&(e.data.source==p.IncrementalSource.TouchMove||e.data.source==p.IncrementalSource.MouseInteraction&&e.data.type==p.MouseInteractions.TouchStart)}var x=function(){function e(e,t){var r=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=g(),this.activityIntervals=[],this.legacy_missingNodeRetryMap={},this.cache=s.createCache(),this.imageMap=new Map,this.mirror=f.createMirror(),this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,!(null==t?void 0:t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");var n={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"highlight-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:S,inactiveThreshold:.02,inactiveSkipTime:2e3};this.config=Object.assign({},n,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(p.ReplayerEvents.Resize,this.handleResize),this.setupDom(),this.treeIndex=new f.TreeIndex,this.fragmentParentMap=new Map,this.elementStateMap=new Map,this.virtualStyleRulesMap=new Map,this.emitter.on(p.ReplayerEvents.Flush,(function(){var e,t,n,i,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 d=o(r.virtualStyleRulesMap.keys()),p=d.next();!p.done;p=d.next()){var f=p.value;r.restoreNodeSheet(f)}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}r.fragmentParentMap.clear(),r.elementStateMap.clear(),r.virtualStyleRulesMap.clear();try{for(var h=o(c.values()),m=h.next();!m.done;m=h.next()){var v=m.value;r.applyScroll(v)}}catch(e){n={error:e}}finally{try{m&&!m.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}try{for(var y=o(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(p.ReplayerEvents.PlayBack,(function(){r.firstFullSnapshot=null,r.mirror.reset()}));var i=new u.Timer([],(null==t?void 0:t.speed)||n.speed);this.service=d.createPlayerService({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,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){r.emitter.emit(p.ReplayerEvents.StateChange,{player:e})})),this.speedService=d.createSpeedService({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe((function(e){r.emitter.emit(p.ReplayerEvents.StateChange,{speed:e})}));var a=this.service.state.context.events.find((function(e){return e.type===p.EventType.Meta})),l=this.service.state.context.events.find((function(e){return e.type===p.EventType.FullSnapshot}));if(a){var c=a.data,h=c.width,m=c.height;setTimeout((function(){r.emitter.emit(p.ReplayerEvents.Resize,{width:h,height:m})}),0)}l&&setTimeout((function(){r.firstFullSnapshot||(r.firstFullSnapshot=l,r.rebuildFullSnapshot(l),r.iframe.contentWindow.scrollTo(l.data.initialOffset))}),1),this.service.state.context.events.find(T)&&this.mouse.classList.add("touch-device")}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.getActivityIntervals=function(){var e=this;if(0==this.activityIntervals.length){for(var t=[],r=this.getMetaData(),n=a([{timestamp:r.startTime}],this.service.state.context.events.filter((function(t){return e.isUserInteraction(t)})),[{timestamp:r.endTime}]),o=1;o<n.length;o++){var i=n[o-1],s=n[o];s.timestamp-i.timestamp>1e4?t.push({startTime:i.timestamp,endTime:s.timestamp,duration:s.timestamp-i.timestamp,active:!1}):t.push({startTime:i.timestamp,endTime:s.timestamp,duration:s.timestamp-i.timestamp,active:!0})}var l=[],c=t[0];for(o=1;o<t.length;o++)t[o].active!=t[o-1].active&&(l.push({startTime:c.startTime,endTime:t[o-1].endTime,duration:t[o-1].endTime-c.startTime,active:t[o-1].active}),c=t[o]);for(c&&t.length>0&&l.push({startTime:c.startTime,endTime:t[t.length-1].endTime,duration:t[t.length-1].endTime-c.startTime,active:t[t.length-1].active}),c=l[0],o=1;o<l.length;o++)(!l[o].active&&l[o].duration>this.config.inactiveThreshold*r.totalTime||!l[o-1].active&&l[o-1].duration>this.config.inactiveThreshold*r.totalTime)&&(this.activityIntervals.push({startTime:c.startTime,endTime:l[o-1].endTime,duration:l[o-1].endTime-c.startTime,active:l[o-1].active}),c=l[o]);c&&l.length>0&&this.activityIntervals.push({startTime:c.startTime,endTime:l[l.length-1].endTime,duration:l[l.length-1].endTime-c.startTime,active:l[l.length-1].active})}return this.activityIntervals},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(p.ReplayerEvents.Start),this.handleInactivity(this.getMetaData().startTime+e,!0)},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(p.ReplayerEvents.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(p.ReplayerEvents.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;T(r)&&this.mouse.classList.add("touch-device"),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.resetCache=function(){this.cache=s.createCache()},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=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(c.polyfill(this.iframe.contentWindow,this.iframe.contentDocument),f.polyfill(this.iframe.contentWindow))},e.prototype.handleResize=function(e){var t,r;this.iframe.style.display="inherit";try{for(var n=o([this.mouseTail,this.iframe]),i=n.next();!i.done;i=n.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=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.applyEventsSynchronously=function(e){var t,r;try{for(var n=o(e),i=n.next();!i.done;i=n.next()){var a=i.value;switch(a.type){case p.EventType.DomContentLoaded:case p.EventType.Load:case p.EventType.Custom:continue;case p.EventType.FullSnapshot:case p.EventType.Meta:case p.EventType.Plugin:break;case p.EventType.IncrementalSnapshot:switch(a.data.source){case p.IncrementalSource.MediaInteraction:continue}}this.getCastFn(a,!0)()}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}this.mousePos&&this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null,!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null},e.prototype.getCastFn=function(e,t){var r,n=this;switch(void 0===t&&(t=!1),e.type){case p.EventType.DomContentLoaded:case p.EventType.Load:break;case p.EventType.Custom:r=function(){n.emitter.emit(p.ReplayerEvents.CustomEvent,e)};break;case p.EventType.Meta:r=function(){n.emitter.emit(p.ReplayerEvents.Resize,{width:e.data.width,height:e.data.height})};break;case p.EventType.FullSnapshot:r=function(){if(n.firstFullSnapshot){if(n.firstFullSnapshot===e)return void(n.firstFullSnapshot=!0)}else n.firstFullSnapshot=!0;n.rebuildFullSnapshot(e,t),n.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case p.EventType.IncrementalSnapshot:r=function(){var r,i;if(n.applyIncremental(e,t),!t&&(n.handleInactivity(e.timestamp),e===n.nextUserInteractionEvent&&(n.nextUserInteractionEvent=null,n.backToNormal()),n.config.skipInactive&&!n.nextUserInteractionEvent)){try{for(var a=o(n.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(!(l.timestamp<=e.timestamp)&&n.isUserInteraction(l)){l.delay-e.delay>1e4*n.speedService.state.context.timer.speed&&(n.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(n.nextUserInteractionEvent){var c=n.nextUserInteractionEvent.delay-e.delay,u={speed:Math.min(Math.round(c/2e3),n.config.maxSpeed)};n.speedService.send({type:"FAST_FORWARD",payload:u}),n.emitter.emit(p.ReplayerEvents.SkipStart,u)}}}}return function(){var i,a;r&&r();try{for(var s=o(n.config.plugins||[]),l=s.next();!l.done;l=s.next())l.value.handler(e,t,{replayer:n})}catch(e){i={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}n.service.send({type:"CAST_EVENT",payload:{event:e}});var c=n.service.state.context.events.length-1;if(e===n.service.state.context.events[c]){var u=function(){c<n.service.state.context.events.length-1||(n.backToNormal(),n.service.send("END"),n.emitter.emit(p.ReplayerEvents.Finish))};e.type===p.EventType.IncrementalSnapshot&&e.data.source===p.IncrementalSource.MouseMove&&e.data.positions.length?setTimeout((function(){u()}),Math.max(0,50-e.data.positions[0].timeOffset)):u()}}},e.prototype.handleInactivity=function(e,t){var r,n;if((e===this.inactiveEndTimestamp||t)&&(this.inactiveEndTimestamp=null,this.backToNormal()),this.config.skipInactive&&!this.inactiveEndTimestamp){try{for(var i=o(this.getActivityIntervals()),a=i.next();!a.done;a=i.next()){var s=a.value;if(e>=s.startTime&&e<s.endTime&&!s.active){this.inactiveEndTimestamp=s.endTime;break}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}if(this.inactiveEndTimestamp){var l=this.inactiveEndTimestamp-e,c={speed:l/y*this.config.inactiveSkipTime<1e3?l/1e3:Math.round(Math.max(l,y)/this.config.inactiveSkipTime)};this.speedService.send({type:"FAST_FORWARD",payload:c}),this.emitter.emit(p.ReplayerEvents.SkipStart,c)}}},e.prototype.rebuildFullSnapshot=function(e,t){var r,n,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=s.rebuild(e.data.node,{doc:this.iframe.contentDocument,afterAppend:function(e){i.collectIframeAndAttachDocument(a,e)},cache:this.cache})[1];var l=function(e,t){if(c.attachDocumentToIframe(e,t),c.newDocumentQueue=c.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var r=t.contentDocument,n=r.documentElement,o=r.head;c.insertStyleRules(n,o)}},c=this;try{for(var u=o(a),d=u.next();!d.done;d=u.next()){var f=d.value;l(f.mutationInQueue,f.builtNode)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}var h=this.iframe.contentDocument,m=h.documentElement,v=h.head;this.insertStyleRules(m,v),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(p.ReplayerEvents.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=h.default(this.config.blockClass).concat(this.config.insertStyleRules);this.config.pauseAnimation&&n.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }");for(var o=0;o<n.length;o++)r.sheet.insertRule(n[o],o)},e.prototype.attachDocumentToIframe=function(e,t){var r,n,i=this,a=[];if(!t.contentDocument)for(var l=t.parentNode;l;){if(this.fragmentParentMap.has(l)){var c=l,u=this.fragmentParentMap.get(c);this.restoreRealParent(c,u);break}l=l.parentNode}s.buildNodeWithSN(e.node,{doc:t.contentDocument,map:this.mirror.map,hackCss:!0,skipChild:!1,afterAppend:function(e){i.collectIframeAndAttachDocument(a,e)},cache:this.cache});var d=function(e,t){if(p.attachDocumentToIframe(e,t),p.newDocumentQueue=p.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var r=t.contentDocument,n=r.documentElement,o=r.head;p.insertStyleRules(n,o)}},p=this;try{for(var f=o(a),h=f.next();!h.done;h=f.next()){var m=h.value;d(m.mutationInQueue,m.builtNode)}}catch(e){r={error:e}}finally{try{h&&!h.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}},e.prototype.collectIframeAndAttachDocument=function(e,t){if(f.isIframeINode(t)){var r=this.newDocumentQueue.find((function(e){return e.parentId===t.__sn.id}));r&&e.push({mutationInQueue:r,builtNode:t})}},e.prototype.hasImageArg=function(e){var t,r;try{for(var n=o(e),i=n.next();!i.done;i=n.next()){var a=i.value;if(a&&"object"==typeof a)if("rr_type"in a&&"args"in a){if(this.hasImageArg(a.args))return!0}else{if("rr_type"in a&&"HTMLImageElement"===a.rr_type)return!0;if(a instanceof Array&&this.hasImageArg(a))return!0}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},e.prototype.getImageArgs=function(e){var t,r,n=[];try{for(var i=o(e),s=i.next();!s.done;s=i.next()){var l=s.value;l&&"object"==typeof l&&("rr_type"in l&&"args"in l?n.push.apply(n,a(this.getImageArgs(l.args))):"rr_type"in l&&"HTMLImageElement"===l.rr_type?n.push(l.src):l instanceof Array&&n.push.apply(n,a(this.getImageArgs(l))))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n},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(p.ReplayerEvents.Start,a),this.emitter.on(p.ReplayerEvents.Pause,a);var s=function(){t.emitter.off(p.ReplayerEvents.Start,a),t.emitter.off(p.ReplayerEvents.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(p.ReplayerEvents.LoadStylesheetEnd),n&&clearTimeout(n),s())})))})),o.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(p.ReplayerEvents.LoadStylesheetStart),n=setTimeout((function(){i.matches("playing")&&t.play(t.getCurrentTime()),n=-1,s()}),this.config.loadTimeout))}},e.prototype.preloadAllImages=function(){var e,t,r=this,n=(this.service.state,function(){r.service.state});this.emitter.on(p.ReplayerEvents.Start,n),this.emitter.on(p.ReplayerEvents.Pause,n);var i=0;try{for(var a=o(this.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(l.type!==p.EventType.IncrementalSnapshot||l.data.source!==p.IncrementalSource.CanvasMutation||"drawImage"!==l.data.property||"string"!=typeof l.data.args[0]||this.imageMap.has(l))l.type===p.EventType.IncrementalSnapshot&&l.data.source===p.IncrementalSource.CanvasMutation&&this.hasImageArg(l.data.args)&&this.getImageArgs(l.data.args).forEach((function(e){var t=new Image;t.src=e,r.imageMap.set(e,t)}));else{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 r,o,i=this,a=e.data;switch(a.source){case p.IncrementalSource.Mutation:t&&(a.adds.forEach((function(e){return i.treeIndex.add(e)})),a.texts.forEach((function(e){return i.treeIndex.text(e)})),a.attributes.forEach((function(e){return i.treeIndex.attribute(e)})),a.removes.forEach((function(e){return i.treeIndex.remove(e,i.mirror)})));try{this.applyMutation(a,t)}catch(e){this.warn("Exception in mutation "+(e.message||e),a)}break;case p.IncrementalSource.Drag:case p.IncrementalSource.TouchMove:case p.IncrementalSource.MouseMove:if(t){var s=a.positions[a.positions.length-1];this.mousePos={x:s.x,y:s.y,id:s.id,debugData:a}}else a.positions.forEach((function(r){var n={doAction:function(){i.moveAndHover(r.x,r.y,r.id,t,a)},delay:r.timeOffset+e.timestamp-i.service.state.context.baselineTime,newFrame:!1};i.timer.addAction(n)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(r=a.positions[0])||void 0===r?void 0:r.timeOffset),newFrame:!1});break;case p.IncrementalSource.MouseInteraction:if(-1===a.id)break;var l=new Event(p.MouseInteractions[a.type].toLowerCase());if(!(x=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);this.emitter.emit(p.ReplayerEvents.MouseInteraction,{type:a.type,target:x});var c=this.config.triggerFocus;switch(a.type){case p.MouseInteractions.Blur:"blur"in x&&x.blur();break;case p.MouseInteractions.Focus:c&&x.focus&&x.focus({preventScroll:!0});break;case p.MouseInteractions.Click:case p.MouseInteractions.TouchStart:case p.MouseInteractions.TouchEnd:t?(a.type===p.MouseInteractions.TouchStart?this.touchActive=!0:a.type===p.MouseInteractions.TouchEnd&&(this.touchActive=!1),this.mousePos={x:a.x,y:a.y,id:a.id,debugData:a}):(a.type===p.MouseInteractions.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x,a.y,a.id,t,a),a.type===p.MouseInteractions.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===p.MouseInteractions.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===p.MouseInteractions.TouchEnd&&this.mouse.classList.remove("touch-active"));break;case p.MouseInteractions.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:x.dispatchEvent(l)}break;case p.IncrementalSource.Scroll:if(-1===a.id)break;if(t){this.treeIndex.scroll(a);break}this.applyScroll(a);break;case p.IncrementalSource.ViewportResize:this.emitter.emit(p.ReplayerEvents.Resize,{width:a.width,height:a.height});break;case p.IncrementalSource.Input:if(-1===a.id)break;if(t){this.treeIndex.input(a);break}this.applyInput(a);break;case p.IncrementalSource.MediaInteraction:if(!(x=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);var u=x;try{a.currentTime&&(u.currentTime=a.currentTime),1===a.type&&u.pause(),0===a.type&&u.play()}catch(e){this.config.showWarning&&console.warn("Failed to replay media interactions: "+(e.message||e))}break;case p.IncrementalSource.StyleSheetRule:if(!(x=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);var d,f=x,h=x.parentNode,y=this.fragmentParentMap.has(h),g=y?null:f.sheet;g||(this.virtualStyleRulesMap.has(x)?d=this.virtualStyleRulesMap.get(x):(d=[],this.virtualStyleRulesMap.set(x,d))),a.adds&&a.adds.forEach((function(e){var t=e.rule,r=e.index;if(g)try{if(Array.isArray(r)){var n=m.getPositionsAndIndex(r),o=n.positions,i=n.index;m.getNestedRule(g.cssRules,o).insertRule(t,i)}else i=void 0===r?void 0:Math.min(r,g.cssRules.length),g.insertRule(t,i)}catch(e){}else null==d||d.push({cssText:t,index:r,type:m.StyleRuleType.Insert})})),a.removes&&a.removes.forEach((function(e){var t=e.index;if(y)null==d||d.push({index:t,type:m.StyleRuleType.Remove});else try{if(Array.isArray(t)){var r=m.getPositionsAndIndex(t),n=r.positions,o=r.index;m.getNestedRule(g.cssRules,n).deleteRule(o||0)}else null==g||g.deleteRule(t)}catch(e){}}));break;case p.IncrementalSource.StyleDeclaration:if(!(x=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);f=x;var b=x.parentNode,S=this.fragmentParentMap.has(b)?null:f.sheet,T=[];S||(this.virtualStyleRulesMap.has(x)?T=this.virtualStyleRulesMap.get(x):(T=[],this.virtualStyleRulesMap.set(x,T))),a.set&&(S?m.getNestedRule(S.rules,a.index).style.setProperty(a.set.property,a.set.value,a.set.priority):T.push(n({type:m.StyleRuleType.SetProperty,index:a.index},a.set))),a.remove&&(S?m.getNestedRule(S.rules,a.index).style.removeProperty(a.remove.property):T.push(n({type:m.StyleRuleType.RemoveProperty,index:a.index},a.remove)));break;case p.IncrementalSource.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var x;if(!(x=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);v.default({event:e,mutation:a,target:x,imageMap:this.imageMap,errorHandler:this.warnCanvasMutationFailed.bind(this)});break;case p.IncrementalSource.Font:try{var I=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);null===(o=this.iframe.contentDocument)||void 0===o||o.fonts.add(I)}catch(e){this.config.showWarning&&console.warn(e)}}},e.prototype.applyMutation=function(e,t){var r,i,a=this;e.removes.forEach((function(t){var r=a.mirror.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.parentId})))return;return a.warnNodeNotFound(e,t.id)}a.virtualStyleRulesMap.has(r)&&a.virtualStyleRulesMap.delete(r);var n=a.mirror.getNode(t.parentId);if(!n)return a.warnNodeNotFound(e,t.parentId);if(t.isShadow&&f.hasShadowRoot(n)&&(n=n.shadowRoot),a.mirror.removeNodeFromMap(r),n){var o=null,i="__sn"in n?a.fragmentParentMap.get(n):void 0;i&&i.contains(r)?n=i:a.fragmentParentMap.has(r)&&(o=a.fragmentParentMap.get(r),a.fragmentParentMap.delete(r),r=o);try{n.removeChild(r)}catch(t){if(!(t instanceof DOMException))throw t;a.warn("parent could not remove child in mutation",n,i,r,o,e)}}}));var l=n({},this.legacy_missingNodeRetryMap),c=[],u=function(e){var r,n;if(!a.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var o=a.mirror.getNode(e.parentId);if(!o)return e.node.type===s.NodeType.Document?a.newDocumentQueue.push(e):c.push(e);var i=null;a.iframe.contentDocument.contains?i=a.iframe.contentDocument.contains(o):a.iframe.contentDocument.body.contains&&(i=a.iframe.contentDocument.body.contains(o));var u=(null===(n=(r=o).getElementsByTagName)||void 0===n?void 0:n.call(r,"iframe").length)>0;if(t&&i&&!f.isIframeINode(o)&&!u){var d=document.createDocumentFragment();for(a.mirror.map[e.parentId]=d,a.fragmentParentMap.set(d,o),a.storeState(o);o.firstChild;)d.appendChild(o.firstChild);o=d}e.node.isShadow&&f.hasShadowRoot(o)&&(o=o.shadowRoot);var p=null,h=null;if(e.previousId&&(p=a.mirror.getNode(e.previousId)),e.nextId&&(h=a.mirror.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=a.mirror.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return c.push(e);if(!e.node.rootId||a.mirror.getNode(e.node.rootId)){var m=e.node.rootId?a.mirror.getNode(e.node.rootId):a.iframe.contentDocument;if(f.isIframeINode(o))a.attachDocumentToIframe(e,o);else{var v=s.buildNodeWithSN(e.node,{doc:m,map:a.mirror.map,skipChild:!0,hackCss:!0,cache:a.cache});if(-1!==e.previousId&&-1!==e.nextId){if(p&&p.nextSibling&&p.nextSibling.parentNode)o.insertBefore(v,p.nextSibling);else if(h&&h.parentNode)o.contains(h)?o.insertBefore(v,h):o.insertBefore(v,null);else{if(o===m)for(;m.firstChild;)m.removeChild(m.firstChild);o.appendChild(v)}if(f.isIframeINode(v)){var y=a.newDocumentQueue.find((function(e){return e.parentId===v.__sn.id}));if(y&&(a.attachDocumentToIframe(y,v),a.newDocumentQueue=a.newDocumentQueue.filter((function(e){return e!==y}))),v.contentDocument){var g=v.contentDocument,b=g.documentElement,S=g.head;a.insertStyleRules(b,S)}}(e.previousId||e.nextId)&&a.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 p=f.queueToResolveTrees(c);if(c.length=0,Date.now()-d>500){this.warn("Timeout in the loop, please check the resolve tree data:",p);break}try{for(var h=(r=void 0,o(p)),m=h.next();!m.done;m=h.next()){var v=m.value;this.mirror.getNode(v.value.parentId)?f.iterateResolveTree(v,(function(e){u(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",v)}}catch(e){r={error:e}}finally{try{m&&!m.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}Object.keys(l).length&&Object.assign(this.legacy_missingNodeRetryMap,l),e.texts.forEach((function(t){var r=a.mirror.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.id})))return;return a.warnNodeNotFound(e,t.id)}a.fragmentParentMap.has(r)&&(r=a.fragmentParentMap.get(r)),r.textContent=t.value})),e.attributes.forEach((function(t){var r=a.mirror.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.id})))return;return a.warnNodeNotFound(e,t.id)}for(var n in a.fragmentParentMap.has(r)&&(r=a.fragmentParentMap.get(r)),t.attributes)if("string"==typeof n){var o=t.attributes[n];if(null===o)r.removeAttribute(n);else if("string"==typeof o)try{r.setAttribute(n,o)}catch(e){a.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",e)}else if("style"===n){var i=o,s=r;for(var l in i)if(!1===i[l])s.style.removeProperty(l);else if(i[l]instanceof Array){var c=i[l];s.style.setProperty(l,c[0],c[1])}else{var u=i[l];s.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 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 d=s;c=d.node,u=d.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,o){var i=this.mirror.getNode(r);if(!i)return this.debugNodeNotFound(o,r);var a=f.getBaseDimension(i,this.iframe),s=e*a.absoluteScale+a.x,l=t*a.absoluteScale+a.y;this.mouse.style.left=s+"px",this.mouse.style.top=l+"px",n||this.drawMouseTail({x:s,y:l}),this.hoverElements(i)},e.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var r=!0===this.config.mouseTail?S:Object.assign({},S,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===p.EventType.IncrementalSnapshot&&e.data.source>p.IncrementalSource.Mutation&&e.data.source<=p.IncrementalSource.Input},e.prototype.backToNormal=function(){this.inactiveEndTimestamp=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(p.ReplayerEvents.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},e.prototype.restoreRealParent=function(e,t){this.mirror.map[t.__sn.id]=t,t.__sn.type===s.NodeType.Element&&"textarea"===t.__sn.tagName&&e.textContent&&(t.value=e.textContent),t.appendChild(e),this.restoreState(t)},e.prototype.storeState=function(e){var t,r;if(e&&e.nodeType===e.ELEMENT_NODE){var n=e;(n.scrollLeft||n.scrollTop)&&this.elementStateMap.set(e,{scroll:[n.scrollLeft,n.scrollTop]}),"STYLE"===n.tagName&&m.storeCSSRules(n,this.virtualStyleRulesMap);var i=n.children;try{for(var a=o(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 n=e;if(this.elementStateMap.has(e)){var i=this.elementStateMap.get(e);i.scroll&&(n.scrollLeft=i.scroll[0],n.scrollTop=i.scroll[1]),this.elementStateMap.delete(e)}var a=n.children;try{for(var s=o(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);if("STYLE"===e.nodeName&&t){var r=e;m.applyVirtualStyleRulesToNode(t,r)}},e.prototype.warnNodeNotFound=function(e,t){this.treeIndex.idRemoved(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){this.warn("Has error on canvas update",t,"canvas mutation:",e)},e.prototype.debugNodeNotFound=function(e,t){this.treeIndex.idRemoved(t)?this.debug(b,"Node with id '"+t+"' was previously removed. ",e):this.debug(b,"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,a([b],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,a([b],e))},e}();t.Replayer=x},129:function(e,t,r){var n=this&&this.__assign||function(){return(n=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)},o=this&&this.__values||function(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.")};Object.defineProperty(t,"__esModule",{value:!0}),t.createSpeedService=t.createPlayerService=t.discardPriorSnapshots=void 0;var i=r(537),a=r(699),s=r(104);function l(e,t){for(var r=e.length-1;r>=0;r--){var n=e[r];if(n.type===a.EventType.Meta&&n.timestamp<=t)return e.slice(r)}return e}t.discardPriorSnapshots=l,t.createPlayerService=function(e,t){var r=t.getCastFn,c=t.applyEventsSynchronously,u=t.emitter,d=i.createMachine({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:i.assign({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:i.assign((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,i,d,p,f=e.timer,h=e.events,m=e.baselineTime,v=e.lastPlayedEvent;f.clear();var y={at:null};try{for(var g=o(h),b=g.next();!b.done;b=g.next()){var S=b.value;s.addDelay(S,m,y)}}catch(e){t={error:e}}finally{try{b&&!b.done&&(n=g.return)&&n.call(g)}finally{if(t)throw t.error}}var T=l(h,m),x=null==v?void 0:v.timestamp;(null==v?void 0:v.type)===a.EventType.IncrementalSnapshot&&v.data.source===a.IncrementalSource.MouseMove&&(x=v.timestamp+(null===(p=v.data.positions[0])||void 0===p?void 0:p.timeOffset)),m<(x||0)&&u.emit(a.ReplayerEvents.PlayBack);var I=new Array,w=new Array,E=function(e){if(x&&x<m&&(e.timestamp<=x||e===v))return"continue";if(e.timestamp<m)I.push(e);else{var t=r(e,!1);w.push({doAction:function(){t(),u.emit(a.ReplayerEvents.EventCast,e)},delay:e.delay,newFrame:"newFrame"in e.data&&e.data.newFrame||!1})}};try{for(var C=o(T),k=C.next();!k.done;k=C.next())E(k.value)}catch(e){i={error:e}}finally{try{k&&!k.done&&(d=C.return)&&d.call(C)}finally{if(i)throw i.error}}c(I),u.emit(a.ReplayerEvents.Flush),f.addActions(w),f.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:i.assign((function(e){return n(n({},e),{lastPlayedEvent:null})})),startLive:i.assign({baselineTime:function(e,t){return e.timer.toggleLiveMode(!0),e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:i.assign((function(e,t){var o=e.baselineTime,i=e.timer,l=e.events;if("ADD_EVENT"===t.type){var c=t.payload.event;s.addDelay(c,o);var d=l.length-1;if(!l[d]||l[d].timestamp<=c.timestamp)l.push(c);else{for(var p=-1,f=0;f<=d;){var h=Math.floor((f+d)/2);l[h].timestamp<=c.timestamp?f=h+1:d=h-1}-1===p&&(p=f),l.splice(p,0,c)}var m=c.timestamp<o,v=r(c,m);m?v():i.isActive()&&i.addAction({doAction:function(){v(),u.emit(a.ReplayerEvents.EventCast,c)},delay:c.delay,newFrame:"newFrame"in c.data&&c.data.newFrame||!1})}return n(n({},e),{events:l})}))}});return i.interpret(d)},t.createSpeedService=function(e){var t=i.createMachine({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:i.assign({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}});return i.interpret(t)}},669:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.polyfill=void 0,t.polyfill=function(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=p(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 d(e){var t=c(e,"Y")&&u(e,"Y"),r=c(e,"X")&&u(e,"X");return t||r}function p(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}function f(t){var r,n,o,a,s=(i()-t.startTime)/468;a=s=s>1?1:s,r=.5*(1-Math.cos(Math.PI*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(f.bind(e,t))}function h(r,n,a){var l,c,u,d,p=i();r===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=o.scroll):(l=r,c=r.scrollLeft,u=r.scrollTop,d=s),f({scrollable:l,method:d,startTime:p,startX:c,startY:u,x:n,y:a})}}},277:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return["noscript { display: none !important; }","."+e+" { background: currentColor; border-radius: 5px; }","."+e+":hover::after {content: 'Redacted'; color: white; background: black; text-align: center; width: 100%; display: block;}"]}},104:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addDelay=t.Timer=void 0;var n=r(699),o=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(i.newFrame){i.newFrame=!1;break}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+1;r=n-1}}return t},e}();t.Timer=o,t.addDelay=function(e,t,r){if(e.type===n.EventType.IncrementalSnapshot&&e.data.source===n.IncrementalSource.MouseMove){var o=e.data.positions[0].timeOffset,i=e.timestamp+o;return e.delay=i-t,i-t}return e.delay=e.timestamp-t,r&&(e.type===n.EventType.IncrementalSnapshot&&e.data.source===n.IncrementalSource.CanvasMutation&&!e.data.newFrame&&r.at?e.delay=r.at:r.at=e.delay),e.delay}},401:function(e,t){var r,n=this&&this.__read||function(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},o=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(n(arguments[t]));return e};function i(e,t){var r=e[t[0]];return 1===t.length?r:i(r.cssRules[t[1]].cssRules,t.slice(2))}function a(e){var t=o(e),r=t.pop();return{positions:t,index:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.storeCSSRules=t.applyVirtualStyleRulesToNode=t.getPositionsAndIndex=t.getNestedRule=t.StyleRuleType=void 0,function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot",e[e.SetProperty=3]="SetProperty",e[e.RemoveProperty=4]="RemoveProperty"}(r=t.StyleRuleType||(t.StyleRuleType={})),t.getNestedRule=i,t.getPositionsAndIndex=a,t.applyVirtualStyleRulesToNode=function(e,t){var o=t.sheet;o&&e.forEach((function(e){if(e.type===r.Insert)try{if(Array.isArray(e.index)){var s=a(e.index),l=s.positions,c=s.index;i(o.cssRules,l).insertRule(e.cssText,c)}else o.insertRule(e.cssText,e.index)}catch(e){}else if(e.type===r.Remove)try{if(Array.isArray(e.index)){var u=a(e.index);l=u.positions,c=u.index,i(o.cssRules,l).deleteRule(c||0)}else o.deleteRule(e.index)}catch(e){}else e.type===r.Snapshot?function(e,t){var r;try{var o=Array.from((null===(r=t.sheet)||void 0===r?void 0:r.cssRules)||[]).map((function(e){return e.cssText})),i=Object.entries(o).reverse(),a=o.length;i.forEach((function(r){var o,i=n(r,2),s=i[0],l=i[1],c=e.indexOf(l);if(-1===c||c>a)try{null===(o=t.sheet)||void 0===o||o.deleteRule(Number(s))}catch(e){}a=c})),e.forEach((function(e,r){var n,o,i;try{(null===(o=null===(n=t.sheet)||void 0===n?void 0:n.cssRules[r])||void 0===o?void 0:o.cssText)!==e&&(null===(i=t.sheet)||void 0===i||i.insertRule(e,r))}catch(e){}}))}catch(e){}}(e.cssTexts,t):e.type===r.SetProperty?i(o.cssRules,e.index).style.setProperty(e.property,e.value,e.priority):e.type===r.RemoveProperty&&i(o.cssRules,e.index).style.removeProperty(e.property)}))},t.storeCSSRules=function(e,t){var n;try{var o=Array.from((null===(n=e.sheet)||void 0===n?void 0:n.cssRules)||[]).map((function(e){return e.cssText}));t.set(e,[{type:r.Snapshot,cssTexts:o}])}catch(e){}}},490:function(e,t){var r=this&&this.__values||function(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.")};Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function o(e){return e?e.replace(/^\s+|\s+$/g,""):""}function i(e,t){var n,o,a=e&&"string"==typeof e.type,s=a?e:t;try{for(var l=r(Object.keys(e)),c=l.next();!c.done;c=l.next()){var u=e[c.value];Array.isArray(u)?u.forEach((function(e){i(e,s)})):u&&"object"==typeof u&&i(u,s)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}return a&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}t.parse=function(e,t){void 0===t&&(t={});var r=1,a=1;function s(e){var t=e.match(/\n/g);t&&(r+=t.length);var n=e.lastIndexOf("\n");a=-1===n?a+e.length:e.length-n}function l(){var e={line:r,column:a};return function(t){return t.position=new c(e),v(),t}}var c=function(e){this.start=e,this.end={line:r,column:a},this.source=t.source};c.prototype.content=e;var u=[];function d(n){var o=new Error(t.source+":"+r+":"+a+": "+n);if(o.reason=n,o.filename=t.source,o.line=r,o.column=a,o.source=e,!t.silent)throw o;u.push(o)}function p(){return m(/^{\s*/)}function f(){return m(/^}/)}function h(){var t,r,n,o=[];for(v(),y(o);e.length&&"}"!==e.charAt(0)&&(t=M()||(r=void 0,n=void 0,r=l(),(n=b())?(y(),r({type:"rule",selectors:n,declarations:T()})):d("selector missing")));)!1!==t&&(o.push(t),y(o));return o}function m(t){var r=t.exec(e);if(r){var n=r[0];return s(n),e=e.slice(n.length),r}}function v(){m(/^\s*/)}function y(e){var t;for(void 0===e&&(e=[]);t=g();)!1!==t&&e.push(t),t=g();return e}function g(){var t=l();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 d("End of comment missing");var n=e.slice(2,r-2);return a+=2,s(n),e=e.slice(r),a+=2,t({type:"comment",comment:n})}}function b(){var e=m(/^([^{]+)/);if(e)return o(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=l(),t=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=o(t[0]);if(!m(/^:\s*/))return d("property missing ':'");var i=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),a=e({type:"declaration",property:r.replace(n,""),value:i?o(i[0]).replace(n,""):""});return m(/^[;\s]*/),a}}function T(){var e,t=[];if(!p())return d("missing '{'");for(y(t);e=S();)!1!==e&&(t.push(e),y(t)),e=S();return f()?t:d("missing '}'")}function x(){for(var e,t=[],r=l();e=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),m(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:T()})}var I,w=k("import"),E=k("charset"),C=k("namespace");function k(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=l(),n=m(t);if(n){var o={type:e};return o[e]=n[1].trim(),r(o)}}}function M(){if("@"===e[0])return function(){var e=l(),t=m(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=m(/^([-\w]+)\s*/)))return d("@keyframes missing name");var n,o=t[1];if(!p())return d("@keyframes missing '{'");for(var i=y();n=x();)i.push(n),i=i.concat(y());return f()?e({type:"keyframes",name:o,vendor:r,keyframes:i}):d("@keyframes missing '}'")}}()||function(){var e=l(),t=m(/^@media *([^{]+)/);if(t){var r=o(t[1]);if(!p())return d("@media missing '{'");var n=y().concat(h());return f()?e({type:"media",media:r,rules:n}):d("@media missing '}'")}}()||function(){var e=l(),t=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:o(t[1]),media:o(t[2])})}()||function(){var e=l(),t=m(/^@supports *([^{]+)/);if(t){var r=o(t[1]);if(!p())return d("@supports missing '{'");var n=y().concat(h());return f()?e({type:"supports",supports:r,rules:n}):d("@supports missing '}'")}}()||w()||E()||C()||function(){var e=l(),t=m(/^@([-\w]+)?document *([^{]+)/);if(t){var r=o(t[1]),n=o(t[2]);if(!p())return d("@document missing '{'");var i=y().concat(h());return f()?e({type:"document",document:n,vendor:r,rules:i}):d("@document missing '}'")}}()||function(){var e=l();if(m(/^@page */)){var t=b()||[];if(!p())return d("@page missing '{'");for(var r,n=y();r=S();)n.push(r),n=n.concat(y());return f()?e({type:"page",selectors:t,declarations:n}):d("@page missing '}'")}}()||function(){var e=l();if(m(/^@host\s*/)){if(!p())return d("@host missing '{'");var t=y().concat(h());return f()?e({type:"host",rules:t}):d("@host missing '}'")}}()||function(){var e=l();if(m(/^@font-face\s*/)){if(!p())return d("@font-face missing '{'");for(var t,r=y();t=S();)r.push(t),r=r.concat(y());return f()?e({type:"font-face",declarations:r}):d("@font-face missing '}'")}}()}return i((I=h(),{type:"stylesheet",stylesheet:{source:t.source,rules:I,parsingErrors:u}}))}},348:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.IGNORED_NODE=t.needMaskingText=t.cleanupSnapshot=t.visitSnapshot=t.transformAttribute=t.createCache=t.addHoverClass=t.buildNodeWithSN=t.rebuild=t.serializeNodeWithId=t.snapshot=void 0;var i=r(858);t.snapshot=i.default,Object.defineProperty(t,"serializeNodeWithId",{enumerable:!0,get:function(){return i.serializeNodeWithId}}),Object.defineProperty(t,"transformAttribute",{enumerable:!0,get:function(){return i.transformAttribute}}),Object.defineProperty(t,"visitSnapshot",{enumerable:!0,get:function(){return i.visitSnapshot}}),Object.defineProperty(t,"cleanupSnapshot",{enumerable:!0,get:function(){return i.cleanupSnapshot}}),Object.defineProperty(t,"needMaskingText",{enumerable:!0,get:function(){return i.needMaskingText}}),Object.defineProperty(t,"IGNORED_NODE",{enumerable:!0,get:function(){return i.IGNORED_NODE}});var a=r(189);t.rebuild=a.default,Object.defineProperty(t,"buildNodeWithSN",{enumerable:!0,get:function(){return a.buildNodeWithSN}}),Object.defineProperty(t,"addHoverClass",{enumerable:!0,get:function(){return a.addHoverClass}}),Object.defineProperty(t,"createCache",{enumerable:!0,get:function(){return a.createCache}}),o(r(397),t),o(r(606),t)},189:function(e,t,r){var n=this&&this.__values||function(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.")};Object.defineProperty(t,"__esModule",{value:!0}),t.buildNodeWithSN=t.createCache=t.addHoverClass=void 0;var o=r(490),i=r(397),a=r(606),s={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"},l=/([^\\]):hover/,c=new RegExp(l.source,"g");function u(e,t){var r;if(!(null===(r=window.HIG_CONFIGURATION)||void 0===r?void 0:r.enableOnHoverClass))return e;var n=null==t?void 0:t.stylesWithHoverClass.get(e);if(n)return n;var i=o.parse(e,{silent:!0});if(!i.stylesheet)return e;var a=[];if(i.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){l.test(e)&&a.push(e)}))})),0===a.length)return e;var s=new RegExp(a.filter((function(e,t){return a.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),u=e.replace(s,(function(e){var t=e.replace(c,"$1.\\:hover");return e+", "+t}));return null==t||t.stylesWithHoverClass.set(e,u),u}function d(e,t){var r,o,l=t.doc,c=t.map,p=t.skipChild,f=void 0!==p&&p,h=t.hackCss,m=void 0===h||h,v=t.afterAppend,y=t.cache,g=function(e,t){var r=t.doc,o=t.hackCss,a=t.cache;switch(e.type){case i.NodeType.Document:return r.implementation.createDocument(null,"",null);case i.NodeType.DocumentType:return r.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case i.NodeType.Element:var l,c=function(e){var t=s[e.tagName]?s[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);l=e.isSVG?r.createElementNS("http://www.w3.org/2000/svg",c):r.createElement(c);var d=function(t){var i,s;if(!e.attributes.hasOwnProperty(t))return"continue";var d=e.attributes[t];if("option"===c&&"selected"===t&&!1===d)return"continue";if(d="boolean"==typeof d||"number"==typeof d?"":d,t.startsWith("rr_")){if("canvas"===c&&"rr_dataURL"===t){var p=document.createElement("img");p.src=d,p.onload=function(){var e=l.getContext("2d");e&&e.drawImage(p,0,0,p.width,p.height)}}if("rr_width"===t&&(l.style.width=d),"rr_height"===t&&(l.style.height=d),"rr_mediaCurrentTime"===t&&(l.currentTime=e.attributes.rr_mediaCurrentTime),"rr_mediaState"===t)switch(d){case"played":l.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":l.pause()}}else{var f="textarea"===c&&"value"===t,h="style"===c&&"_cssText"===t;if(h&&o&&(d=u(d,a)),f||h){var m=r.createTextNode(d);try{for(var v=(i=void 0,n(Array.from(l.childNodes))),y=v.next();!y.done;y=v.next()){var g=y.value;g.nodeType===l.TEXT_NODE&&l.removeChild(g)}}catch(e){i={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(i)throw i.error}}return l.appendChild(m),"continue"}try{if(e.isSVG&&"xlink:href"===t)l.setAttributeNS("http://www.w3.org/1999/xlink",t,d);else if("onload"===t||"onclick"===t||"onmouse"===t.substring(0,7))l.setAttribute("_"+t,d);else{if("meta"===c&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"==t)return l.setAttribute("csp-content",d),"continue";l.setAttribute(t,d)}}catch(e){}}};for(var p in e.attributes)d(p);if(e.isShadowHost)if(l.shadowRoot)for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);else l.attachShadow({mode:"open"});return l;case i.NodeType.Text:return r.createTextNode(e.isStyle&&o?u(e.textContent,a):e.textContent);case i.NodeType.CDATA:return r.createCDATASection(e.textContent);case i.NodeType.Comment:return r.createComment(e.textContent);default:return null}}(e,{doc:l,hackCss:m,cache:y});if(!g)return null;if(e.rootId&&console.assert(c[e.rootId]===l,"Target document should has the same root id."),e.type===i.NodeType.Document&&(l.close(),l.open(),"BackCompat"===e.compatMode&&e.childNodes&&e.childNodes[0].type!==i.NodeType.DocumentType&&(e.childNodes[0].type===i.NodeType.Element&&"xmlns"in e.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===e.childNodes[0].attributes.xmlns?l.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):l.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),g=l),g.__sn=e,c[e.id]=g,(e.type===i.NodeType.Document||e.type===i.NodeType.Element)&&!f)try{for(var b=n(e.childNodes),S=b.next();!S.done;S=b.next()){var T=S.value,x=d(T,{doc:l,map:c,skipChild:!1,hackCss:m,afterAppend:v,cache:y});x?(T.isShadow&&a.isElement(g)&&g.shadowRoot?g.shadowRoot.appendChild(x):g.appendChild(x),v&&v(x)):console.warn("Failed to rebuild",T)}}catch(e){r={error:e}}finally{try{S&&!S.done&&(o=b.return)&&o.call(b)}finally{if(r)throw r.error}}return g}t.addHoverClass=u,t.createCache=function(){return{stylesWithHoverClass:new Map}},t.buildNodeWithSN=d,t.default=function(e,t){var r=t.doc,n=t.onVisit,o=t.hackCss,a={},s=d(e,{doc:r,map:a,skipChild:!1,hackCss:void 0===o||o,afterAppend:t.afterAppend,cache:t.cache});return function(e,t){for(var r in e)e[r]&&t(e[r])}(a,(function(e){n&&n(e),function(e){var t=e.__sn;if(t.type===i.NodeType.Element){var r=e;for(var n in t.attributes)if(t.attributes.hasOwnProperty(n)&&n.startsWith("rr_")){var o=t.attributes[n];"rr_scrollLeft"===n&&(r.scrollLeft=o),"rr_scrollTop"===n&&(r.scrollTop=o)}}}(e)})),[s,a]}},858:function(e,t,r){var n=this&&this.__values||function(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.")};Object.defineProperty(t,"__esModule",{value:!0}),t.cleanupSnapshot=t.visitSnapshot=t.serializeNodeWithId=t.needMaskingText=t._isBlockedElement=t.transformAttribute=t.absoluteToDoc=t.absoluteToStylesheet=t.IGNORED_NODE=void 0;var o=r(397),i=r(606),a=1,s=new 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){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=l(e.styleSheet)||t}catch(e){}return t}t.IGNORED_NODE=-2;var u=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,d=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,p=/^(data:)([^,]*),(.*)/i;function f(e,t){return(e||"").replace(u,(function(e,r,o,i,a,s){var l,c,u,f=o||a||s,h=r||i||"";if(!f)return e;if(!d.test(f))return"url("+h+f+h+")";if(p.test(f))return"url("+h+f+h+")";if("/"===f[0])return"url("+h+(((u=t).indexOf("//")>-1?u.split("/").slice(0,3).join("/"):u.split("/")[0]).split("?")[0]+f)+h+")";var m=t.split("/"),v=f.split("/");m.pop();try{for(var y=n(v),g=y.next();!g.done;g=y.next()){var b=g.value;"."!==b&&(".."===b?m.pop():m.push(b))}}catch(e){l={error:e}}finally{try{g&&!g.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}return"url("+h+m.join("/")+h+")"}))}t.absoluteToStylesheet=f;var h=/^[^ \t\n\r\u000c]+/,m=/^[, \t\n\r\u000c]+/;function v(e,t){if(!t||""===t.trim())return t;var r=e.createElement("a");return r.href=t,r.href}function y(){var e=document.createElement("a");return e.href="",e.href}function g(e,t,r,n){return"src"===r||("href"===r||"xlink:href"===r)&&n?v(e,n):"background"!==r||!n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r&&n?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,o=e.exec(t.substring(r));return o?(n=o[0],r+=n.length,n):""}for(var o=[];n(m),!(r>=t.length);){var i=n(h);if(","===i.slice(-1))i=v(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=v(e,i);for(var s=!1;;){var l=t.charAt(r);if(""===l){o.push((i+a).trim());break}if(s)")"===l&&(s=!1);else{if(","===l){r+=1,o.push((i+a).trim());break}"("===l&&(s=!0)}a+=l,r+=1}}}return o.join(", ")}(e,n):"style"===r&&n?f(n,y()):n:v(e,n)}function b(e,t,r){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=0;n<e.classList.length;n++){var o=e.classList[n];if(t.test(o))return!0}return!!r&&e.matches(r)}function S(e,t,r){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!(!r||!e.matches(r))||S(e.parentNode,t,r)}return e.nodeType,e.TEXT_NODE,S(e.parentNode,t,r)}function T(e){return void 0===e?"":e.toLowerCase()}function x(e,r){var c,u,d,p,h,m=r.doc,v=r.map,I=r.blockClass,w=r.blockSelector,E=r.maskTextClass,C=r.maskTextSelector,k=r.skipChild,M=void 0!==k&&k,N=r.inlineStylesheet,_=void 0===N||N,O=r.maskInputOptions,R=void 0===O?{}:O,D=r.maskTextFn,A=r.maskInputFn,P=r.slimDOMOptions,L=r.recordCanvas,F=void 0!==L&&L,j=r.onSerialize,W=r.onIframeLoad,B=r.iframeLoadTimeout,G=void 0===B?5e3:B,z=r.keepIframeSrcFn,H=void 0===z?function(){return!1}:z,V=r.enableStrictPrivacy,U=r.preserveWhiteSpace,Y=void 0===U||U,X=function(e,t){var r,a,c,u,d=t.doc,p=t.blockClass,h=t.blockSelector,m=t.maskTextClass,v=t.maskTextSelector,T=t.inlineStylesheet,x=t.maskInputOptions,I=void 0===x?{}:x,w=t.maskTextFn,E=t.maskInputFn,C=t.recordCanvas,k=t.keepIframeSrcFn,M=t.enableStrictPrivacy;if(d.__sn){var N=d.__sn.id;c=1===N?void 0:N}switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:o.NodeType.Document,childNodes:[],compatMode:e.compatMode,rootId:c}:{type:o.NodeType.Document,childNodes:[],rootId:c};case e.DOCUMENT_TYPE_NODE:return{type:o.NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:c};case e.ELEMENT_NODE:var _=b(e,p,h),O=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return s.test(t)?"div":t}(e),R={};try{for(var D=n(Array.from(e.attributes)),A=D.next();!A.done;A=D.next()){var P=A.value,L=P.name,F=P.value;R[L]=g(d,O,L,F)}}catch(e){r={error:e}}finally{try{A&&!A.done&&(a=D.return)&&a.call(D)}finally{if(r)throw r.error}}if("link"===O&&T){var j,W=Array.from(d.styleSheets).find((function(t){return t.href===e.href}));(j=l(W))&&(delete R.rel,delete R.href,R._cssText=f(j,W.href))}if("style"===O&&e.sheet&&!(e.innerText||e.textContent||"").trim().length&&(j=l(e.sheet))&&(R._cssText=f(j,y())),"input"!==O&&"textarea"!==O&&"select"!==O||(F=e.value,"radio"!==R.type&&"checkbox"!==R.type&&"submit"!==R.type&&"button"!==R.type&&F?"password"===R.type?R.value="*".repeat(F.length):R.value=i.maskInputValue({type:R.type,tagName:O,value:F,maskInputOptions:I,maskInputFn:E}):e.checked&&(R.checked=e.checked)),"option"===O&&(e.selected?R.selected=!0:delete R.selected),"canvas"===O&&C&&(!("__context"in e)||"2d"===e.__context)){var B=e.toDataURL(),G=document.createElement("canvas");G.width=e.width,G.height=e.height,B!==G.toDataURL()&&(R.rr_dataURL=e.toDataURL())}if("audio"!==O&&"video"!==O||(R.rr_mediaState=e.paused?"paused":"played",R.rr_mediaCurrentTime=e.currentTime),e.scrollLeft&&(R.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(R.rr_scrollTop=e.scrollTop),_||"img"===O&&M){var z=e.getBoundingClientRect(),H=z.width,V=z.height;R={class:R.class,rr_width:H+"px",rr_height:V+"px"},_=!0}return"iframe"!==O||k(R.src)||(e.contentDocument||(R.rr_src=R.src),delete R.src),{type:o.NodeType.Element,tagName:O,attributes:R,childNodes:[],isSVG:(u=e,"svg"===u.tagName||u instanceof SVGElement||void 0),needBlock:_,rootId:c};case e.TEXT_NODE:var U=e.parentNode&&e.parentNode.tagName,Y=e.textContent,X="STYLE"===U||void 0,q="SCRIPT"===U||void 0,Q=!1;return X&&Y&&(Y=f(Y,y()),Q=!0),q?(Y="SCRIPT_PLACEHOLDER",Q=!0):"NOSCRIPT"===U&&(Y="",Q=!0),!X&&!q&&S(e,m,v)&&Y&&(Y=w?w(Y):Y.replace(/[\S]/g,"*")),M&&!Q&&U&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(U)&&Y&&(Y=(null==(Y=Y.replace(/[^ -~]+/g,""))?void 0:Y.split(" ").map((function(e){return Math.random().toString(20).substr(2,e.length)})).join(" "))||""),{type:o.NodeType.Text,textContent:Y||"",isStyle:X,rootId:c};case e.CDATA_SECTION_NODE:return{type:o.NodeType.CDATA,textContent:"",rootId:c};case e.COMMENT_NODE:return{type:o.NodeType.Comment,textContent:e.textContent||"",rootId:c};default:return!1}}(e,{doc:m,blockClass:I,blockSelector:w,maskTextClass:E,maskTextSelector:C,inlineStylesheet:_,maskInputOptions:R,maskTextFn:D,maskInputFn:A,recordCanvas:F,keepIframeSrcFn:H,enableStrictPrivacy:V});if(!X)return console.warn(e,"not serialized"),null;h="__sn"in e?e.__sn.id:!function(e,t){if(t.comment&&e.type===o.NodeType.Comment)return!0;if(e.type===o.NodeType.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&"preload"===e.attributes.rel&&"script"===e.attributes.as))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(T(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===T(e.attributes.name)||"icon"===T(e.attributes.rel)||"apple-touch-icon"===T(e.attributes.rel)||"shortcut icon"===T(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&T(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(T(e.attributes.property).match(/^(og|twitter|fb):/)||T(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===T(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===T(e.attributes.name)||"googlebot"===T(e.attributes.name)||"bingbot"===T(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===T(e.attributes.name)||"generator"===T(e.attributes.name)||"framework"===T(e.attributes.name)||"publisher"===T(e.attributes.name)||"progid"===T(e.attributes.name)||T(e.attributes.property).match(/^article:/)||T(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===T(e.attributes.name)||"yandex-verification"===T(e.attributes.name)||"csrf-token"===T(e.attributes.name)||"p:domain_verify"===T(e.attributes.name)||"verify-v1"===T(e.attributes.name)||"verification"===T(e.attributes.name)||"shopify-checkout-api-token"===T(e.attributes.name)))return!0}}return!1}(X,P)&&(Y||X.type!==o.NodeType.Text||X.isStyle||X.textContent.replace(/^\s+|\s+$/gm,"").length)?a++:t.IGNORED_NODE;var q=Object.assign(X,{id:h});if(e.__sn=q,h===t.IGNORED_NODE)return null;v[h]=e,j&&j(e);var Q=!M;if(q.type===o.NodeType.Element){if(Q=Q&&!q.needBlock,q.needBlock&&"img"===q.tagName){var $=e.cloneNode();$.src="",v[h]=$}delete q.needBlock}if((q.type===o.NodeType.Document||q.type===o.NodeType.Element)&&Q){P.headWhitespace&&X.type===o.NodeType.Element&&"head"===X.tagName&&(Y=!1);var K={doc:m,map:v,blockClass:I,blockSelector:w,maskTextClass:E,maskTextSelector:C,skipChild:M,inlineStylesheet:_,maskInputOptions:R,maskTextFn:D,maskInputFn:A,slimDOMOptions:P,recordCanvas:F,preserveWhiteSpace:Y,onSerialize:j,onIframeLoad:W,iframeLoadTimeout:G,keepIframeSrcFn:H,enableStrictPrivacy:V};try{for(var J=n(Array.from(e.childNodes)),Z=J.next();!Z.done;Z=J.next())(re=x(Z.value,K))&&q.childNodes.push(re)}catch(e){c={error:e}}finally{try{Z&&!Z.done&&(u=J.return)&&u.call(J)}finally{if(c)throw c.error}}if(i.isElement(e)&&e.shadowRoot){q.isShadowHost=!0;try{for(var ee=n(Array.from(e.shadowRoot.childNodes)),te=ee.next();!te.done;te=ee.next()){var re;(re=x(te.value,K))&&(re.isShadow=!0,q.childNodes.push(re))}}catch(e){d={error:e}}finally{try{te&&!te.done&&(p=ee.return)&&p.call(ee)}finally{if(d)throw d.error}}}}return e.parentNode&&i.isShadowRoot(e.parentNode)&&(q.isShadow=!0),q.type===o.NodeType.Element&&"iframe"===q.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var o,i=!1;try{o=n.document.readyState}catch(e){return}if("complete"===o){var a="about:blank";n.location.href===a&&e.src!==a&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}else{var s=setTimeout((function(){i||(t(),i=!0)}),r);e.addEventListener("load",(function(){clearTimeout(s),i=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&W){var r=x(t,{doc:t,map:v,blockClass:I,blockSelector:w,maskTextClass:E,maskTextSelector:C,skipChild:!1,inlineStylesheet:_,maskInputOptions:R,maskTextFn:D,maskInputFn:A,slimDOMOptions:P,recordCanvas:F,preserveWhiteSpace:Y,onSerialize:j,onIframeLoad:W,iframeLoadTimeout:G,keepIframeSrcFn:H,enableStrictPrivacy:V});r&&W(e,r)}}),G),q}t.absoluteToDoc=v,t.transformAttribute=g,t._isBlockedElement=b,t.needMaskingText=S,t.serializeNodeWithId=x,t.visitSnapshot=function(e,t){!function e(r){t(r),r.type!==o.NodeType.Document&&r.type!==o.NodeType.Element||r.childNodes.forEach(e)}(e)},t.cleanupSnapshot=function(){a=1},t.default=function(e,t){var r=t||{},n=r.blockClass,o=void 0===n?"highlight-block":n,i=r.blockSelector,a=void 0===i?null:i,s=r.maskTextClass,l=void 0===s?"highlight-mask":s,c=r.maskTextSelector,u=void 0===c?null:c,d=r.inlineStylesheet,p=void 0===d||d,f=r.recordCanvas,h=void 0!==f&&f,m=r.maskAllInputs,v=void 0!==m&&m,y=r.maskTextFn,g=r.maskInputFn,b=r.slimDOM,S=void 0!==b&&b,T=r.preserveWhiteSpace,I=r.onSerialize,w=r.onIframeLoad,E=r.iframeLoadTimeout,C=r.keepIframeSrcFn,k=void 0===C?function(){return!1}:C,M=r.enableStrictPrivacy,N={};return[x(e,{doc:e,map:N,blockClass:o,blockSelector:a,maskTextClass:l,maskTextSelector:u,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:g,slimDOMOptions:!0===S||"all"===S?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===S,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===S?{}:S,recordCanvas:h,preserveWhiteSpace:T,onSerialize:I,onIframeLoad:w,iframeLoadTimeout:E,keepIframeSrcFn:k,enableStrictPrivacy:void 0!==M&&M}),N]}},397:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.NodeType=void 0,(r=t.NodeType||(t.NodeType={}))[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment"},606:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.maskInputValue=t.isShadowRoot=t.isElement=void 0,t.isElement=function(e){return e.nodeType===e.ELEMENT_NODE},t.isShadowRoot=function(e){var t,r=null===(t=e)||void 0===t?void 0:t.host;return Boolean(r&&r.shadowRoot&&r.shadowRoot===e)},t.maskInputValue=function(e){var t=e.maskInputOptions,r=e.tagName,n=e.type,o=e.value,i=e.maskInputFn,a=o||"";return(t[r.toLowerCase()]||t[n])&&(a=i?i(a):"*".repeat(a.length)),a}},699:(e,t)=>{var r,n,o,i,a,s;Object.defineProperty(t,"__esModule",{value:!0}),t.ReplayerEvents=t.MediaInteractions=t.CanvasContext=t.MouseInteractions=t.IncrementalSource=t.EventType=void 0,(s=t.EventType||(t.EventType={}))[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",(a=t.IncrementalSource||(t.IncrementalSource={}))[a.Mutation=0]="Mutation",a[a.MouseMove=1]="MouseMove",a[a.MouseInteraction=2]="MouseInteraction",a[a.Scroll=3]="Scroll",a[a.ViewportResize=4]="ViewportResize",a[a.Input=5]="Input",a[a.TouchMove=6]="TouchMove",a[a.MediaInteraction=7]="MediaInteraction",a[a.StyleSheetRule=8]="StyleSheetRule",a[a.CanvasMutation=9]="CanvasMutation",a[a.Font=10]="Font",a[a.Log=11]="Log",a[a.Drag=12]="Drag",a[a.StyleDeclaration=13]="StyleDeclaration",(i=t.MouseInteractions||(t.MouseInteractions={}))[i.MouseUp=0]="MouseUp",i[i.MouseDown=1]="MouseDown",i[i.Click=2]="Click",i[i.ContextMenu=3]="ContextMenu",i[i.DblClick=4]="DblClick",i[i.Focus=5]="Focus",i[i.Blur=6]="Blur",i[i.TouchStart=7]="TouchStart",i[i.TouchMove_Departed=8]="TouchMove_Departed",i[i.TouchEnd=9]="TouchEnd",i[i.TouchCancel=10]="TouchCancel",(o=t.CanvasContext||(t.CanvasContext={}))[o["2D"]=0]="2D",o[o.WebGL=1]="WebGL",o[o.WebGL2=2]="WebGL2",(n=t.MediaInteractions||(t.MediaInteractions={}))[n.Play=0]="Play",n[n.Pause=1]="Pause",n[n.Seeked=2]="Seeked",(r=t.ReplayerEvents||(t.ReplayerEvents={})).Start="start",r.Pause="pause",r.Resume="resume",r.Resize="resize",r.Finish="finish",r.FullsnapshotRebuilded="fullsnapshot-rebuilded",r.LoadStylesheetStart="load-stylesheet-start",r.LoadStylesheetEnd="load-stylesheet-end",r.SkipStart="skip-start",r.SkipEnd="skip-end",r.MouseInteraction="mouse-interaction",r.EventCast="event-cast",r.CustomEvent="custom-event",r.Flush="flush",r.StateChange="state-change",r.PlayBack="play-back"},593:function(e,t,r){var n=this&&this.__values||function(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.")};Object.defineProperty(t,"__esModule",{value:!0}),t.hasShadowRoot=t.getBaseDimension=t.isIframeINode=t.iterateResolveTree=t.queueToResolveTrees=t.TreeIndex=t.polyfill=t.isTouchEvent=t.isAncestorRemoved=t.isIgnored=t.isBlocked=t.getWindowWidth=t.getWindowHeight=t.patch=t.hookSetter=t.throttle=t._mirror=t.createMirror=t.on=void 0;var o=r(699),i=r(348);t.on=function(e,t,r){void 0===r&&(r=document);var n={capture:!0,passive:!0};return r.addEventListener(e,t,n),function(){return r.removeEventListener(e,t,n)}},t.createMirror=function(){return{map:{},getId:function(e){return e&&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={}}}};var a="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.";t._mirror={map:{},getId:function(){return console.error(a),-1},getNode:function(){return console.error(a),null},removeNodeFromMap:function(){console.error(a)},has:function(){return console.error(a),!1},reset:function(){console.error(a)}},"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(t._mirror=new Proxy(t._mirror,{get:function(e,t,r){return"map"===t&&console.error(a),Reflect.get(e,t,r)}})),t.throttle=function(e,t,r){void 0===r&&(r={});var n=null,o=0;return function(i){var a=Date.now();o||!1!==r.leading||(o=a);var s=t-(a-o),l=this,c=arguments;s<=0||s>t?(n&&(clearTimeout(n),n=null),o=a,e.apply(l,c)):n||!1===r.trailing||(n=setTimeout((function(){o=!1===r.leading?0:Date.now(),n=null,e.apply(l,c)}),s))}},t.hookSetter=function e(t,r,n,o,i){void 0===i&&(i=window);var a=i.Object.getOwnPropertyDescriptor(t,r);return i.Object.defineProperty(t,r,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 e(t,r,a||{},!0)}},t.patch=function(e,t,r){try{if(!(t in e))return function(){};var n=e[t],o=r(n);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,function(){e[t]=n}}catch(e){return function(){}}},t.getWindowHeight=function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},t.getWindowWidth=function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},t.isBlocked=function e(t,r){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE){var n=!1;return"string"==typeof r?n=t.classList.contains(r):t.classList.forEach((function(e){r.test(e)&&(n=!0)})),n||e(t.parentNode,r)}return t.nodeType,t.TEXT_NODE,e(t.parentNode,r)},t.isIgnored=function(e){return"__sn"in e&&e.__sn.id===i.IGNORED_NODE},t.isAncestorRemoved=function e(t,r){if(i.isShadowRoot(t))return!1;var n=r.getId(t);return!r.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode,r))},t.isTouchEvent=function(e){return Boolean(e.changedTouches)},t.polyfill=function(e){void 0===e&&(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})};var s=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,i,a=this,s=this,l=s.tree,c=s.removeNodeMutations,u=s.textMutations,d=s.attributeMutations,p={source:o.IncrementalSource.Mutation,removes:c,texts:u,attributes:d,adds:[]},f=function(e,t){t&&a.removeIdSet.add(e.id),p.texts=p.texts.concat(t?[]:e.texts).filter((function(e){return!a.removeIdSet.has(e.id)})),p.attributes=p.attributes.concat(t?[]:e.attributes).filter((function(e){return!a.removeIdSet.has(e.id)})),a.removeIdSet.has(e.id)||a.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return f(e,!0)})):(p.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return f(e,!1)})))};Object.values(l).forEach((function(e){return f(e,!1)}));try{for(var h=n(this.scrollMap.keys()),m=h.next();!m.done;m=h.next()){var v=m.value;this.removeIdSet.has(v)&&this.scrollMap.delete(v)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}try{for(var y=n(this.inputMap.keys()),g=y.next();!g.done;g=y.next())v=g.value,this.removeIdSet.has(v)&&this.inputMap.delete(v)}catch(e){r={error:e}}finally{try{g&&!g.done&&(i=y.return)&&i.call(y)}finally{if(r)throw r.error}}var b=new Map(this.scrollMap),S=new Map(this.inputMap);return this.reset(),{mutationData:p,scrollMap:b,inputMap:S}},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.prototype.idRemoved=function(e){return this.removeIdSet.has(e)},e}();t.TreeIndex=s,t.queueToResolveTrees=function(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,d=c.parentId;if(u&&u in o){var p=o[u];if(p.parent){var f=p.parent.children.indexOf(p);p.parent.children.splice(f,0,i(c,p.parent))}else f=a.indexOf(p),a.splice(f,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&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return a},t.iterateResolveTree=function e(t,r){r(t.value);for(var n=t.children.length-1;n>=0;n--)e(t.children[n],r)},t.isIframeINode=function(e){return"__sn"in e&&e.__sn.type===i.NodeType.Element&&"iframe"===e.__sn.tagName},t.getBaseDimension=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}},t.hasShadowRoot=function(e){var t;return Boolean(null===(t=e)||void 0===t?void 0:t.shadowRoot)}}},t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.mirror=e.Replayer=e.freezePage=e.addCustomEvent=e.record=void 0;var t=r(476);e.record=t.default;var o=r(943);Object.defineProperty(e,"Replayer",{enumerable:!0,get:function(){return o.Replayer}});var i=r(593);Object.defineProperty(e,"mirror",{enumerable:!0,get:function(){return i._mirror}});var a=r(593);e.utils=a;var s=r(699);Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return s.EventType}}),Object.defineProperty(e,"IncrementalSource",{enumerable:!0,get:function(){return s.IncrementalSource}}),Object.defineProperty(e,"MouseInteractions",{enumerable:!0,get:function(){return s.MouseInteractions}}),Object.defineProperty(e,"ReplayerEvents",{enumerable:!0,get:function(){return s.ReplayerEvents}});var l=t.default.addCustomEvent;e.addCustomEvent=l;var c=t.default.freezePage;e.freezePage=c})(),n})()}));
3
3
  //# sourceMappingURL=index.js.map