Socket
Socket
Sign inDemoInstall

rrweb

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rrweb - npm Package Compare versions

Comparing version 0.9.11 to 0.9.12

es/rrweb/node_modules/fflate/esm/browser.js

4

dist/record/rrweb-record-pack.min.js

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

var rrwebRecord=function(t){"use strict";
var rrwebRecord=function(e){"use strict";
/*! *****************************************************************************

@@ -15,3 +15,3 @@ Copyright (c) Microsoft Corporation.

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var e,a,n,r,i,s,o=function(){return(o=Object.assign||function(t){for(var e,a=1,n=arguments.length;a<n;a++)for(var r in e=arguments[a])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function h(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(e||(e={})),function(t){t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom"}(a||(a={})),function(t){t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font"}(n||(n={})),function(t){t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd"}(r||(r={})),function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause"}(i||(i={})),function(t){t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change"}(s||(s={}));var l=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t,e){t.exports=function t(e,a,n){function r(s,o){if(!a[s]){if(!e[s]){if(!o&&h)return h();if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var _=a[s]={exports:{}};e[s][0].call(_.exports,(function(t){return r(e[s][1][t]||t)}),_,_.exports,t,e,a,n)}return a[s].exports}for(var i=h,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(t,e,a){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}a.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(var n in a)r(a,n)&&(t[n]=a[n])}}return t},a.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,a,n,r){if(e.subarray&&t.subarray)t.set(e.subarray(a,a+n),r);else for(var i=0;i<n;i++)t[r+i]=e[a+i]},flattenChunks:function(t){var e,a,n,r,i,s;for(n=0,e=0,a=t.length;e<a;e++)n+=t[e].length;for(s=new Uint8Array(n),r=0,e=0,a=t.length;e<a;e++)i=t[e],s.set(i,r),r+=i.length;return s}},s={arraySet:function(t,e,a,n,r){for(var i=0;i<n;i++)t[r+i]=e[a+i]},flattenChunks:function(t){return[].concat.apply([],t)}};a.setTyped=function(t){t?(a.Buf8=Uint8Array,a.Buf16=Uint16Array,a.Buf32=Int32Array,a.assign(a,i)):(a.Buf8=Array,a.Buf16=Array,a.Buf32=Array,a.assign(a,s))},a.setTyped(n)},{}],2:[function(t,e,a){var n=t("./common"),r=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch(t){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){i=!1}for(var s=new n.Buf8(256),o=0;o<256;o++)s[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function h(t,e){if(e<65534&&(t.subarray&&i||!t.subarray&&r))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var a="",s=0;s<e;s++)a+=String.fromCharCode(t[s]);return a}s[254]=s[254]=1,a.string2buf=function(t){var e,a,r,i,s,o=t.length,h=0;for(i=0;i<o;i++)55296==(64512&(a=t.charCodeAt(i)))&&i+1<o&&56320==(64512&(r=t.charCodeAt(i+1)))&&(a=65536+(a-55296<<10)+(r-56320),i++),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new n.Buf8(h),s=0,i=0;s<h;i++)55296==(64512&(a=t.charCodeAt(i)))&&i+1<o&&56320==(64512&(r=t.charCodeAt(i+1)))&&(a=65536+(a-55296<<10)+(r-56320),i++),a<128?e[s++]=a:a<2048?(e[s++]=192|a>>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},a.buf2binstring=function(t){return h(t,t.length)},a.binstring2buf=function(t){for(var e=new n.Buf8(t.length),a=0,r=e.length;a<r;a++)e[a]=t.charCodeAt(a);return e},a.buf2string=function(t,e){var a,n,r,i,o=e||t.length,l=new Array(2*o);for(n=0,a=0;a<o;)if((r=t[a++])<128)l[n++]=r;else if((i=s[r])>4)l[n++]=65533,a+=i-1;else{for(r&=2===i?31:3===i?15:7;i>1&&a<o;)r=r<<6|63&t[a++],i--;i>1?l[n++]=65533:r<65536?l[n++]=r:(r-=65536,l[n++]=55296|r>>10&1023,l[n++]=56320|1023&r)}return h(l,n)},a.utf8border=function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+s[t[a]]>e?a:e}},{"./common":1}],3:[function(t,e,a){e.exports=function(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16|0}},{}],4:[function(t,e,a){var n=function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}();e.exports=function(t,e,a,r){var i=n,s=r+a;t^=-1;for(var o=r;o<s;o++)t=t>>>8^i[255&(t^e[o])];return-1^t}},{}],5:[function(t,e,a){var n,r=t("../utils/common"),i=t("./trees"),s=t("./adler32"),o=t("./crc32"),h=t("./messages");function l(t,e){return t.msg=h[e],e}function _(t){return(t<<1)-(t>4?9:0)}function d(t){for(var e=t.length;--e>=0;)t[e]=0}function u(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(r.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function f(t,e){i._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,u(t.strm)}function c(t,e){t.pending_buf[t.pending++]=e}function p(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function g(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,o=t.nice_match,h=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,l=t.window,_=t.w_mask,d=t.prev,u=t.strstart+258,f=l[i+s-1],c=l[i+s];t.prev_length>=t.good_match&&(r>>=2),o>t.lookahead&&(o=t.lookahead);do{if(l[(a=e)+s]===c&&l[a+s-1]===f&&l[a]===l[i]&&l[++a]===l[i+1]){i+=2,a++;do{}while(l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&i<u);if(n=258-(u-i),i=u-258,n>s){if(t.match_start=e,s=n,n>=o)break;f=l[i+s-1],c=l[i+s]}}}while((e=d[e&_])>h&&0!=--r);return s<=t.lookahead?s:t.lookahead}function m(t){var e,a,n,i,h,l,_,d,u,f,c=t.w_size;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=c+(c-262)){r.arraySet(t.window,t.window,c,c,0),t.match_start-=c,t.strstart-=c,t.block_start-=c,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=c?n-c:0}while(--a);e=a=c;do{n=t.prev[--e],t.prev[e]=n>=c?n-c:0}while(--a);i+=c}if(0===t.strm.avail_in)break;if(l=t.strm,_=t.window,d=t.strstart+t.lookahead,u=i,f=void 0,(f=l.avail_in)>u&&(f=u),a=0===f?0:(l.avail_in-=f,r.arraySet(_,l.input,l.next_in,f,d),1===l.state.wrap?l.adler=s(l.adler,_,f,d):2===l.state.wrap&&(l.adler=o(l.adler,_,f,d)),l.next_in+=f,l.total_in+=f,f),t.lookahead+=a,t.lookahead+t.insert>=3)for(h=t.strstart-t.insert,t.ins_h=t.window[h],t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[h+3-1])&t.hash_mask,t.prev[h&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=h,h++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)}function v(t,e){for(var a,n;;){if(t.lookahead<262){if(m(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=g(t,a)),t.match_length>=3)if(n=i._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=i._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(f(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(f(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(f(t,!1),0===t.strm.avail_out)?1:2}function b(t,e){for(var a,n,r;;){if(t.lookahead<262){if(m(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-262&&(t.match_length=g(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=i._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(f(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=i._tr_tally(t,0,t.window[t.strstart-1]))&&f(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=i._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(f(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(f(t,!1),0===t.strm.avail_out)?1:2}function w(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}function y(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new r.Buf16(1146),this.dyn_dtree=new r.Buf16(122),this.bl_tree=new r.Buf16(78),d(this.dyn_ltree),d(this.dyn_dtree),d(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(16),this.heap=new r.Buf16(573),d(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(573),d(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function k(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=0,i._tr_init(e),0):l(t,-2)}function z(t){var e,a=k(t);return 0===a&&((e=t.state).window_size=2*e.w_size,d(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a}function x(t,e,a,n,i,s){if(!t)return-2;var o=1;if(-1===e&&(e=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),i<1||i>9||8!==a||n<8||n>15||e<0||e>9||s<0||s>4)return l(t,-2);8===n&&(n=9);var h=new y;return t.state=h,h.strm=t,h.wrap=o,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=i+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new r.Buf8(2*h.w_size),h.head=new r.Buf16(h.hash_size),h.prev=new r.Buf16(h.w_size),h.lit_bufsize=1<<i+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new r.Buf8(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=s,h.method=a,z(t)}n=[new w(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(m(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,f(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(f(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(f(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(f(t,!1),t.strm.avail_out),1)})),new w(4,4,8,4,v),new w(4,5,16,8,v),new w(4,6,32,32,v),new w(4,4,16,16,b),new w(8,16,32,32,b),new w(8,16,128,128,b),new w(8,32,128,256,b),new w(32,128,258,1024,b),new w(32,258,258,4096,b)],a.deflateInit=function(t,e){return x(t,e,8,15,8,0)},a.deflateInit2=x,a.deflateReset=z,a.deflateResetKeep=k,a.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?-2:(t.state.gzhead=e,0):-2},a.deflate=function(t,e){var a,r,s,h;if(!t||!t.state||e>5||e<0)return t?l(t,-2):-2;if(r=t.state,!t.output||!t.input&&0!==t.avail_in||666===r.status&&4!==e)return l(t,0===t.avail_out?-5:-2);if(r.strm=t,a=r.last_flush,r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,c(r,31),c(r,139),c(r,8),r.gzhead?(c(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),c(r,255&r.gzhead.time),c(r,r.gzhead.time>>8&255),c(r,r.gzhead.time>>16&255),c(r,r.gzhead.time>>24&255),c(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),c(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(c(r,255&r.gzhead.extra.length),c(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=o(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(c(r,0),c(r,0),c(r,0),c(r,0),c(r,0),c(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),c(r,3),r.status=113);else{var g=8+(r.w_bits-8<<4)<<8;g|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(g|=32),g+=31-g%31,r.status=113,p(r,g),0!==r.strstart&&(p(r,t.adler>>>16),p(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(s=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>s&&(t.adler=o(t.adler,r.pending_buf,r.pending-s,s)),u(t),s=r.pending,r.pending!==r.pending_buf_size));)c(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>s&&(t.adler=o(t.adler,r.pending_buf,r.pending-s,s)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(t.adler=o(t.adler,r.pending_buf,r.pending-s,s)),u(t),s=r.pending,r.pending===r.pending_buf_size)){h=1;break}h=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,c(r,h)}while(0!==h);r.gzhead.hcrc&&r.pending>s&&(t.adler=o(t.adler,r.pending_buf,r.pending-s,s)),0===h&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){s=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>s&&(t.adler=o(t.adler,r.pending_buf,r.pending-s,s)),u(t),s=r.pending,r.pending===r.pending_buf_size)){h=1;break}h=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,c(r,h)}while(0!==h);r.gzhead.hcrc&&r.pending>s&&(t.adler=o(t.adler,r.pending_buf,r.pending-s,s)),0===h&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&u(t),r.pending+2<=r.pending_buf_size&&(c(r,255&t.adler),c(r,t.adler>>8&255),t.adler=0,r.status=113)):r.status=113),0!==r.pending){if(u(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&_(e)<=_(a)&&4!==e)return l(t,-5);if(666===r.status&&0!==t.avail_in)return l(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&666!==r.status){var v=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(m(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=i._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(f(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(f(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(f(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,s,o=t.window;;){if(t.lookahead<=258){if(m(t),t.lookahead<=258&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=o[r=t.strstart-1])===o[++r]&&n===o[++r]&&n===o[++r]){s=t.strstart+258;do{}while(n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&r<s);t.match_length=258-(s-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=i._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=i._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(f(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(f(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(f(t,!1),0===t.strm.avail_out)?1:2}(r,e):n[r.level].func(r,e);if(3!==v&&4!==v||(r.status=666),1===v||3===v)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===v&&(1===e?i._tr_align(r):5!==e&&(i._tr_stored_block(r,0,0,!1),3===e&&(d(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),u(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(c(r,255&t.adler),c(r,t.adler>>8&255),c(r,t.adler>>16&255),c(r,t.adler>>24&255),c(r,255&t.total_in),c(r,t.total_in>>8&255),c(r,t.total_in>>16&255),c(r,t.total_in>>24&255)):(p(r,t.adler>>>16),p(r,65535&t.adler)),u(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},a.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?l(t,-2):(t.state=null,113===e?l(t,-3):0):-2},a.deflateSetDictionary=function(t,e){var a,n,i,o,h,l,_,u,f=e.length;if(!t||!t.state)return-2;if(2===(o=(a=t.state).wrap)||1===o&&42!==a.status||a.lookahead)return-2;for(1===o&&(t.adler=s(t.adler,e,f,0)),a.wrap=0,f>=a.w_size&&(0===o&&(d(a.head),a.strstart=0,a.block_start=0,a.insert=0),u=new r.Buf8(a.w_size),r.arraySet(u,e,f-a.w_size,a.w_size,0),e=u,f=a.w_size),h=t.avail_in,l=t.next_in,_=t.input,t.avail_in=f,t.next_in=0,t.input=e,m(a);a.lookahead>=3;){n=a.strstart,i=a.lookahead-2;do{a.ins_h=(a.ins_h<<a.hash_shift^a.window[n+3-1])&a.hash_mask,a.prev[n&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=n,n++}while(--i);a.strstart=n,a.lookahead=2,m(a)}return a.strstart+=a.lookahead,a.block_start=a.strstart,a.insert=a.lookahead,a.lookahead=0,a.match_length=a.prev_length=2,a.match_available=0,t.next_in=l,t.input=_,t.avail_in=h,a.wrap=o,0},a.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":4,"./messages":6,"./trees":7}],6:[function(t,e,a){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],7:[function(t,e,a){var n=t("../utils/common");function r(t){for(var e=t.length;--e>=0;)t[e]=0}var i=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],s=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],h=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l=new Array(576);r(l);var _=new Array(60);r(_);var d=new Array(512);r(d);var u=new Array(256);r(u);var f=new Array(29);r(f);var c,p,g,m=new Array(30);function v(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function b(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function w(t){return t<256?d[t]:d[256+(t>>>7)]}function y(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function k(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,y(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)}function z(t,e,a){k(t,a[2*e],a[2*e+1])}function x(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1}function S(t,e,a){var n,r,i=new Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var o=t[2*r+1];0!==o&&(t[2*r]=x(i[o]++,o))}}function C(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function A(t){t.bi_valid>8?y(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function B(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]}function M(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&B(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!B(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n}function D(t,e,a){var n,r,o,h,l=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*l]<<8|t.pending_buf[t.d_buf+2*l+1],r=t.pending_buf[t.l_buf+l],l++,0===n?z(t,r,e):(z(t,(o=u[r])+256+1,e),0!==(h=i[o])&&k(t,r-=f[o],h),z(t,o=w(--n),a),0!==(h=s[o])&&k(t,n-=m[o],h))}while(l<t.last_lit);z(t,256,e)}function E(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,o=e.stat_desc.has_stree,h=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<h;a++)0!==i[2*a]?(t.heap[++t.heap_len]=l=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[r]=0,t.opt_len--,o&&(t.static_len-=s[2*r+1]);for(e.max_code=l,a=t.heap_len>>1;a>=1;a--)M(t,i,a);r=h;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],M(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,M(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,o,h=e.dyn_tree,l=e.max_code,_=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(h[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=h[2*h[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),h[2*n+1]=i,n>l||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),o=h[2*n],t.opt_len+=o*(i+s),d&&(t.static_len+=o*(_[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>l||(h[2*r+1]!==i&&(t.opt_len+=(i-h[2*r+1])*h[2*r],h[2*r+1]=i),n--)}}(t,e),S(i,l,t.bl_count)}function T(t,e,a){var n,r,i=-1,s=e[1],o=0,h=7,l=4;for(0===s&&(h=138,l=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++o<h&&r===s||(o<l?t.bl_tree[2*r]+=o:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4))}function I(t,e,a){var n,r,i=-1,s=e[1],o=0,h=7,l=4;for(0===s&&(h=138,l=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++o<h&&r===s)){if(o<l)do{z(t,r,t.bl_tree)}while(0!=--o);else 0!==r?(r!==i&&(z(t,r,t.bl_tree),o--),z(t,16,t.bl_tree),k(t,o-3,2)):o<=10?(z(t,17,t.bl_tree),k(t,o-3,3)):(z(t,18,t.bl_tree),k(t,o-11,7));o=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4)}}r(m);var j=!1;function U(t,e,a,r){k(t,0+(r?1:0),3),function(t,e,a,r){A(t),r&&(y(t,a),y(t,~a)),n.arraySet(t.pending_buf,t.window,e,a,t.pending),t.pending+=a}(t,e,a,!0)}a._tr_init=function(t){j||(function(){var t,e,a,n,r,h=new Array(16);for(a=0,n=0;n<28;n++)for(f[n]=a,t=0;t<1<<i[n];t++)u[a++]=n;for(u[a-1]=n,r=0,n=0;n<16;n++)for(m[n]=r,t=0;t<1<<s[n];t++)d[r++]=n;for(r>>=7;n<30;n++)for(m[n]=r<<7,t=0;t<1<<s[n]-7;t++)d[256+r++]=n;for(e=0;e<=15;e++)h[e]=0;for(t=0;t<=143;)l[2*t+1]=8,t++,h[8]++;for(;t<=255;)l[2*t+1]=9,t++,h[9]++;for(;t<=279;)l[2*t+1]=7,t++,h[7]++;for(;t<=287;)l[2*t+1]=8,t++,h[8]++;for(S(l,287,h),t=0;t<30;t++)_[2*t+1]=5,_[2*t]=x(t,5);c=new v(l,i,257,286,15),p=new v(_,s,0,30,15),g=new v(new Array(0),o,0,19,7)}(),j=!0),t.l_desc=new b(t.dyn_ltree,c),t.d_desc=new b(t.dyn_dtree,p),t.bl_desc=new b(t.bl_tree,g),t.bi_buf=0,t.bi_valid=0,C(t)},a._tr_stored_block=U,a._tr_flush_block=function(t,e,a,n){var r,i,s=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),E(t,t.l_desc),E(t,t.d_desc),s=function(t){var e;for(T(t,t.dyn_ltree,t.l_desc.max_code),T(t,t.dyn_dtree,t.d_desc.max_code),E(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(i=t.static_len+3+7>>>3)<=r&&(r=i)):r=i=a+5,a+4<=r&&-1!==e?U(t,e,a,n):4===t.strategy||i===r?(k(t,2+(n?1:0),3),D(t,l,_)):(k(t,4+(n?1:0),3),function(t,e,a,n){var r;for(k(t,e-257,5),k(t,a-1,5),k(t,n-4,4),r=0;r<n;r++)k(t,t.bl_tree[2*h[r]+1],3);I(t,t.dyn_ltree,e-1),I(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),D(t,t.dyn_ltree,t.dyn_dtree)),C(t),n&&A(t)},a._tr_tally=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(u[a]+256+1)]++,t.dyn_dtree[2*w(e)]++),t.last_lit===t.lit_bufsize-1},a._tr_align=function(t){k(t,2,3),z(t,256,l),function(t){16===t.bi_valid?(y(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":1}],8:[function(t,e,a){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/deflate.js":[function(t,e,a){var n=t("./zlib/deflate"),r=t("./utils/common"),i=t("./utils/strings"),s=t("./zlib/messages"),o=t("./zlib/zstream"),h=Object.prototype.toString;function l(t){if(!(this instanceof l))return new l(t);this.options=r.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var a=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==a)throw new Error(s[a]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var _;if(_="string"==typeof e.dictionary?i.string2buf(e.dictionary):"[object ArrayBuffer]"===h.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(a=n.deflateSetDictionary(this.strm,_)))throw new Error(s[a]);this._dict_set=!0}}function _(t,e){var a=new l(e);if(a.push(t,!0),a.err)throw a.msg||s[a.err];return a.result}l.prototype.push=function(t,e){var a,s,o=this.strm,l=this.options.chunkSize;if(this.ended)return!1;s=e===~~e?e:!0===e?4:0,"string"==typeof t?o.input=i.string2buf(t):"[object ArrayBuffer]"===h.call(t)?o.input=new Uint8Array(t):o.input=t,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new r.Buf8(l),o.next_out=0,o.avail_out=l),1!==(a=n.deflate(o,s))&&0!==a)return this.onEnd(a),this.ended=!0,!1;0!==o.avail_out&&(0!==o.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(i.buf2binstring(r.shrinkBuf(o.output,o.next_out))):this.onData(r.shrinkBuf(o.output,o.next_out)))}while((o.avail_in>0||0===o.avail_out)&&1!==a);return 4===s?(a=n.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,0===a):2!==s||(this.onEnd(0),o.avail_out=0,!0)},l.prototype.onData=function(t){this.chunks.push(t)},l.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Deflate=l,a.deflate=_,a.deflateRaw=function(t,e){return(e=e||{}).raw=!0,_(t,e)},a.gzip=function(t,e){return(e=e||{}).gzip=!0,_(t,e)}},{"./utils/common":1,"./utils/strings":2,"./zlib/deflate":5,"./zlib/messages":6,"./zlib/zstream":8}]},{},[])("/lib/deflate.js")})).deflate;return t.pack=function(t){var e=o(o({},t),{v:"v1"});return l(JSON.stringify(e),{to:"string"})},Object.defineProperty(t,"__esModule",{value:!0}),t}({});
***************************************************************************** */var r,n,t,o,a,f,u=function(){return(u=Object.assign||function(e){for(var r,n=1,t=arguments.length;n<t;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)};!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(r||(r={})),function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom"}(n||(n={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log"}(t||(t={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(o||(o={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(a||(a={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change"}(f||(f={}));var i=Uint8Array,s=Uint16Array,l=Uint32Array,v=new i([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),c=new i([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),h=new i([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=function(e,r){for(var n=new s(31),t=0;t<31;++t)n[t]=r+=1<<e[t-1];var o=new l(n[30]);for(t=1;t<30;++t)for(var a=n[t];a<n[t+1];++a)o[a]=a-n[t]<<5|t;return[n,o]},w=d(v,2),M=w[0],m=w[1];M[28]=258,m[258]=28;for(var p=d(c,0)[1],g=new s(32768),C=0;C<32768;++C){var y=(43690&C)>>>1|(21845&C)<<1;y=(61680&(y=(52428&y)>>>2|(13107&y)<<2))>>>4|(3855&y)<<4,g[C]=((65280&y)>>>8|(255&y)<<8)>>>1}var S=function(e,r,n){for(var t=e.length,o=0,a=new s(r);o<t;++o)++a[e[o]-1];var f,u=new s(r);for(o=0;o<r;++o)u[o]=u[o-1]+a[o-1]<<1;if(n){f=new s(1<<r);var i=15-r;for(o=0;o<t;++o)if(e[o])for(var l=o<<4|e[o],v=r-e[o],c=u[e[o]-1]++<<v,h=c|(1<<v)-1;c<=h;++c)f[g[c]>>>i]=l}else for(f=new s(t),o=0;o<t;++o)f[o]=g[u[e[o]-1]++]>>>15-e[o];return f},T=new i(288);for(C=0;C<144;++C)T[C]=8;for(C=144;C<256;++C)T[C]=9;for(C=256;C<280;++C)T[C]=7;for(C=280;C<288;++C)T[C]=8;var b=new i(32);for(C=0;C<32;++C)b[C]=5;var D=S(T,9,0),k=(S(T,9,1),S(b,5,0)),x=(S(b,5,1),function(e){return(e/8>>0)+(7&e&&1)}),E=function(e,r,n){(null==r||r<0)&&(r=0),(null==n||n>e.length)&&(n=e.length);var t=new(e instanceof s?s:e instanceof l?l:i)(n-r);return t.set(e.subarray(r,n)),t},A=function(e,r,n){n<<=7&r;var t=r/8>>0;e[t]|=n,e[t+1]|=n>>>8},F=function(e,r,n){n<<=7&r;var t=r/8>>0;e[t]|=n,e[t+1]|=n>>>8,e[t+2]|=n>>>16},I=function(e,r){for(var n=[],t=0;t<e.length;++t)e[t]&&n.push({s:t,f:e[t]});var o=n.length,a=n.slice();if(!o)return[new i(0),0];if(1==o){var f=new i(n[0].s+1);return f[n[0].s]=1,[f,1]}n.sort((function(e,r){return e.f-r.f})),n.push({s:-1,f:25001});var u=n[0],l=n[1],v=0,c=1,h=2;for(n[0]={s:-1,f:u.f+l.f,l:u,r:l};c!=o-1;)u=n[n[v].f<n[h].f?v++:h++],l=n[v!=c&&n[v].f<n[h].f?v++:h++],n[c++]={s:-1,f:u.f+l.f,l:u,r:l};var d=a[0].s;for(t=1;t<o;++t)a[t].s>d&&(d=a[t].s);var w=new s(d+1),M=L(n[c-1],w,0);if(M>r){t=0;var m=0,p=M-r,g=1<<p;for(a.sort((function(e,r){return w[r.s]-w[e.s]||e.f-r.f}));t<o;++t){var C=a[t].s;if(!(w[C]>r))break;m+=g-(1<<M-w[C]),w[C]=r}for(m>>>=p;m>0;){var y=a[t].s;w[y]<r?m-=1<<r-w[y]++-1:++t}for(;t>=0&&m;--t){var S=a[t].s;w[S]==r&&(--w[S],++m)}M=r}return[new i(w),M]},L=function(e,r,n){return-1==e.s?Math.max(L(e.l,r,n+1),L(e.r,r,n+1)):r[e.s]=n},R=function(e){for(var r=e.length;r&&!e[--r];);for(var n=new s(++r),t=0,o=e[0],a=1,f=function(e){n[t++]=e},u=1;u<=r;++u)if(e[u]==o&&u!=r)++a;else{if(!o&&a>2){for(;a>138;a-=138)f(32754);a>2&&(f(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(f(o),--a;a>6;a-=6)f(8304);a>2&&(f(a-3<<5|8208),a=0)}for(;a--;)f(o);a=1,o=e[u]}return[n.subarray(0,t),r]},P=function(e,r){for(var n=0,t=0;t<r.length;++t)n+=e[t]*r[t];return n},O=function(e,r,n){var t=n.length,o=x(r+2);e[o]=255&t,e[o+1]=t>>>8,e[o+2]=255^e[o],e[o+3]=255^e[o+1];for(var a=0;a<t;++a)e[o+a+4]=n[a];return 8*(o+4+t)},U=function(e,r,n,t,o,a,f,u,i,l,d){A(r,d++,n),++o[256];for(var w=I(o,15),M=w[0],m=w[1],p=I(a,15),g=p[0],C=p[1],y=R(M),x=y[0],E=y[1],L=R(g),U=L[0],z=L[1],_=new s(19),j=0;j<x.length;++j)_[31&x[j]]++;for(j=0;j<U.length;++j)_[31&U[j]]++;for(var B=I(_,7),V=B[0],J=B[1],N=19;N>4&&!V[h[N-1]];--N);var q,G,H,K,Q=l+5<<3,W=P(o,T)+P(a,b)+f,X=P(o,M)+P(a,g)+f+14+3*N+P(_,V)+(2*_[16]+3*_[17]+7*_[18]);if(Q<=W&&Q<=X)return O(r,d,e.subarray(i,i+l));if(A(r,d,1+(X<W)),d+=2,X<W){q=S(M,m,0),G=M,H=S(g,C,0),K=g;var Y=S(V,J,0);A(r,d,E-257),A(r,d+5,z-1),A(r,d+10,N-4),d+=14;for(j=0;j<N;++j)A(r,d+3*j,V[h[j]]);d+=3*N;for(var Z=[x,U],$=0;$<2;++$){var ee=Z[$];for(j=0;j<ee.length;++j){var re=31&ee[j];A(r,d,Y[re]),d+=V[re],re>15&&(A(r,d,ee[j]>>>5&127),d+=ee[j]>>>12)}}}else q=D,G=T,H=k,K=b;for(j=0;j<u;++j)if(t[j]>255){re=t[j]>>>18&31;F(r,d,q[re+257]),d+=G[re+257],re>7&&(A(r,d,t[j]>>>23&31),d+=v[re]);var ne=31&t[j];F(r,d,H[ne]),d+=K[ne],ne>3&&(F(r,d,t[j]>>>5&8191),d+=c[ne])}else F(r,d,q[t[j]]),d+=G[t[j]];return F(r,d,q[256]),d+G[256]},z=new l([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),_=new i(0),j=new l(256);for(C=0;C<256;++C){for(var B=C,V=9;--V;)B=(1&B&&3988292384)^B>>>1;j[C]=B}var J=function(e,r,n,t,o){return function(e,r,n,t,o,a){var f=e.length,u=new i(t+f+5*(1+Math.floor(f/7e3))+o),h=u.subarray(t,u.length-o),d=0;if(!r||f<8)for(var w=0;w<=f;w+=65535){var M=w+65535;M<f?d=O(h,d,e.subarray(w,M)):(h[w]=a,d=O(h,d,e.subarray(w,f)))}else{for(var g=z[r-1],C=g>>>13,y=8191&g,S=(1<<n)-1,T=new s(32768),b=new s(S+1),D=Math.ceil(n/3),k=2*D,A=function(r){return(e[r]^e[r+1]<<D^e[r+2]<<k)&S},F=new l(25e3),I=new s(288),L=new s(32),R=0,P=0,j=(w=0,0),B=0,V=0;w<f;++w){var J=A(w),N=32767&w,q=b[J];if(T[N]=q,b[J]=N,B<=w){var G=f-w;if((R>7e3||j>24576)&&G>423){d=U(e,h,0,F,I,L,P,j,V,w-V,d),j=R=P=0,V=w;for(var H=0;H<286;++H)I[H]=0;for(H=0;H<30;++H)L[H]=0}var K=2,Q=0,W=y,X=N-q&32767;if(G>2&&J==A(w-X))for(var Y=Math.min(C,G)-1,Z=Math.min(32767,w),$=Math.min(258,G);X<=Z&&--W&&N!=q;){if(e[w+K]==e[w+K-X]){for(var ee=0;ee<$&&e[w+ee]==e[w+ee-X];++ee);if(ee>K){if(K=ee,Q=X,ee>Y)break;var re=Math.min(X,ee-2),ne=0;for(H=0;H<re;++H){var te=w-X+H+32768&32767,oe=te-T[te]+32768&32767;oe>ne&&(ne=oe,q=te)}}}X+=(N=q)-(q=T[N])+32768&32767}if(Q){F[j++]=268435456|m[K]<<18|p[Q];var ae=31&m[K],fe=31&p[Q];P+=v[ae]+c[fe],++I[257+ae],++L[fe],B=w+K,++R}else F[j++]=e[w],++I[e[w]]}}d=U(e,h,a,F,I,L,P,j,V,w-V,d),a||(d=O(h,d,_))}return E(u,0,t+x(d)+o)}(e,null==r.level?6:r.level,null==r.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+r.mem,n,t,!o)};function N(e,r){void 0===r&&(r={});var n=function(){var e=1,r=0;return{p:function(n){for(var t=e,o=r,a=n.length,f=0;f!=a;){for(var u=Math.min(f+5552,a);f<u;++f)o+=t+=n[f];t%=65521,o%=65521}e=t,r=o},d:function(){return(e>>>8<<16|(255&r)<<8|r>>>8)+2*((255&e)<<23)}}}();n.p(e);var t=J(e,r,2,4);return function(e,r){var n=r.level,t=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=t<<6|(t?32-2*t:1)}(t,r),function(e,r,n){for(;n;++r)e[r]=n,n>>>=8}(t,t.length-4,n.d()),t}return e.pack=function(e){var r=u(u({},e),{v:"v1"});return function(e,r){var n="";if(!r&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var t=0;t<e.length;){var o=e[t++];o<128||r?n+=String.fromCharCode(o):o<224?n+=String.fromCharCode((31&o)<<6|63&e[t++]):o<240?n+=String.fromCharCode((15&o)<<12|(63&e[t++])<<6|63&e[t++]):(o=((15&o)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,n+=String.fromCharCode(55296|o>>10,56320|1023&o))}return n}(N(function(e,r){var n=e.length;if(!r&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var t=new i(e.length+(e.length>>>1)),o=0,a=function(e){t[o++]=e},f=0;f<n;++f){if(o+5>t.length){var u=new i(o+8+(n-f<<1));u.set(t),t=u}var s=e.charCodeAt(f);s<128||r?a(s):s<2048?(a(192|s>>>6),a(128|63&s)):s>55295&&s<57344?(a(240|(s=65536+(1047552&s)|1023&e.charCodeAt(++f))>>>18),a(128|s>>>12&63),a(128|s>>>6&63),a(128|63&s)):(a(224|s>>>12),a(128|s>>>6&63),a(128|63&s))}return E(t,0,o)}(JSON.stringify(r))),!0)},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
//# sourceMappingURL=rrweb-record-pack.min.js.map

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

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var e,t=function(){return(t=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function n(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i}function r(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(e||(e={}));var a=1,i=RegExp("[^a-z1-6-_]");function u(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(s).join(""):null}catch(e){return null}}function s(e){return function(e){return"styleSheet"in e}(e)?u(e.styleSheet)||"":e.cssText}var l,c,d,p,f,m=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,h=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,v=/^(data:)([^,]*),(.*)/i;function y(e,t){return(e||"").replace(m,(function(e,n,o,r,a,i){var u,s=o||a||i,l=n||r||"";if(!s)return e;if(!h.test(s))return"url("+l+s+l+")";if(v.test(s))return"url("+l+s+l+")";if("/"===s[0])return"url("+l+(((u=t).indexOf("//")>-1?u.split("/").slice(0,3).join("/"):u.split("/")[0]).split("?")[0]+s)+l+")";var c=t.split("/"),d=s.split("/");c.pop();for(var p=0,f=d;p<f.length;p++){var m=f[p];"."!==m&&(".."===m?c.pop():c.push(m))}return"url("+l+c.join("/")+l+")"}))}function b(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function g(e,t,n){return"src"===t||"href"===t&&n?b(e,n):"srcset"===t&&n?function(e,t){return""===t.trim()?t:t.split(",").map((function(t){var n=t.trimLeft().trimRight().split(" ");return 2===n.length?b(e,n[0])+" "+n[1]:1===n.length?""+b(e,n[0]):""})).join(", ")}(e,n):"style"===t&&n?y(n,location.href):n}function S(t,n){var o,r=n.doc,a=n.blockClass,s=n.blockSelector,l=n.inlineStylesheet,c=n.maskInputOptions,d=void 0===c?{}:c,p=n.recordCanvas;switch(t.nodeType){case t.DOCUMENT_NODE:return{type:e.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId};case t.ELEMENT_NODE:for(var f=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else e.classList.forEach((function(e){if(t.test(e))return!0}));return!!n&&e.matches(n)}(t,a,s),m=function(e){var t=e.toLowerCase().trim();return i.test(t)?"div":t}(t.tagName),h={},v=0,b=Array.from(t.attributes);v<b.length;v++){var S=b[v],C=S.name,k=S.value;h[C]=g(r,C,k)}if("link"===m&&l){var w,M=Array.from(r.styleSheets).find((function(e){return e.href===t.href}));(w=u(M))&&(delete h.rel,delete h.href,h._cssText=y(w,M.href))}if("style"===m&&t.sheet&&!(t.innerText||t.textContent||"").trim().length)(w=u(t.sheet))&&(h._cssText=y(w,location.href));if("input"===m||"textarea"===m||"select"===m){k=t.value;"radio"!==h.type&&"checkbox"!==h.type&&"submit"!==h.type&&"button"!==h.type&&k?h.value=d[h.type]||d[m]?"*".repeat(k.length):k:t.checked&&(h.checked=t.checked)}if("option"===m){var E=t.parentElement;h.value===E.value&&(h.selected=t.selected)}if("canvas"===m&&p&&(h.rr_dataURL=t.toDataURL()),"audio"!==m&&"video"!==m||(h.rr_mediaState=t.paused?"paused":"played"),t.scrollLeft&&(h.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(h.rr_scrollTop=t.scrollTop),f){var I=t.getBoundingClientRect(),x=I.width,N=I.height;h={class:h.class,rr_width:x+"px",rr_height:N+"px"}}return{type:e.Element,tagName:m,attributes:h,childNodes:[],isSVG:(o=t,"svg"===o.tagName||o instanceof SVGElement||void 0),needBlock:f};case t.TEXT_NODE:var O=t.parentNode&&t.parentNode.tagName,_=t.textContent,T="STYLE"===O||void 0;return T&&_&&(_=y(_,location.href)),"SCRIPT"===O&&(_="SCRIPT_PLACEHOLDER"),{type:e.Text,textContent:_||"",isStyle:T};case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:""};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||""};default:return!1}}function C(e){return void 0===e?"":e.toLowerCase()}function k(t,n){var o,r=n.doc,i=n.map,u=n.blockClass,s=n.blockSelector,l=n.skipChild,c=void 0!==l&&l,d=n.inlineStylesheet,p=void 0===d||d,f=n.maskInputOptions,m=void 0===f?{}:f,h=n.slimDOMOptions,v=n.recordCanvas,y=void 0!==v&&v,b=n.preserveWhiteSpace,g=void 0===b||b,w=S(t,{doc:r,blockClass:u,blockSelector:s,inlineStylesheet:p,maskInputOptions:m,recordCanvas:y});if(!w)return console.warn(t,"not serialized"),null;o="__sn"in t?t.__sn.id:!function(t,n){if(n.comment&&t.type===e.Comment)return!0;if(t.type===e.Element){if(n.script&&("script"===t.tagName||"link"===t.tagName&&"preload"===t.attributes.rel&&"script"===t.attributes.as))return!0;if(n.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(C(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===C(t.attributes.name)||"icon"===C(t.attributes.rel)||"apple-touch-icon"===C(t.attributes.rel)||"shortcut icon"===C(t.attributes.rel))))return!0;if("meta"===t.tagName){if(n.headMetaDescKeywords&&C(t.attributes.name).match(/^description|keywords$/))return!0;if(n.headMetaSocial&&(C(t.attributes.property).match(/^(og|twitter|fb):/)||C(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===C(t.attributes.name)))return!0;if(n.headMetaRobots&&("robots"===C(t.attributes.name)||"googlebot"===C(t.attributes.name)||"bingbot"===C(t.attributes.name)))return!0;if(n.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(n.headMetaAuthorship&&("author"===C(t.attributes.name)||"generator"===C(t.attributes.name)||"framework"===C(t.attributes.name)||"publisher"===C(t.attributes.name)||"progid"===C(t.attributes.name)||C(t.attributes.property).match(/^article:/)||C(t.attributes.property).match(/^product:/)))return!0;if(n.headMetaVerification&&("google-site-verification"===C(t.attributes.name)||"yandex-verification"===C(t.attributes.name)||"csrf-token"===C(t.attributes.name)||"p:domain_verify"===C(t.attributes.name)||"verify-v1"===C(t.attributes.name)||"verification"===C(t.attributes.name)||"shopify-checkout-api-token"===C(t.attributes.name)))return!0}}return!1}(w,h)&&(g||w.type!==e.Text||w.isStyle||w.textContent.replace(/^\s+|\s+$/gm,"").length)?a++:-2;var M=Object.assign(w,{id:o});if(t.__sn=M,-2===o)return null;i[o]=t;var E=!c;if(M.type===e.Element&&(E=E&&!M.needBlock,delete M.needBlock),(M.type===e.Document||M.type===e.Element)&&E){h.headWhitespace&&w.type===e.Element&&"head"===w.tagName&&(g=!1);for(var I=0,x=Array.from(t.childNodes);I<x.length;I++){var N=k(x[I],{doc:r,map:i,blockClass:u,blockSelector:s,skipChild:c,inlineStylesheet:p,maskInputOptions:m,slimDOMOptions:h,recordCanvas:y,preserveWhiteSpace:g});N&&M.childNodes.push(N)}}return M}function w(e,t,n){void 0===n&&(n=document);var o={capture:!0,passive:!0};return n.addEventListener(e,t,o),function(){return n.removeEventListener(e,t,o)}}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom"}(l||(l={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font"}(c||(c={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(d||(d={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(p||(p={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change"}(f||(f={}));var M={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return M.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete M.map[t],e.childNodes&&e.childNodes.forEach((function(e){return M.removeNodeFromMap(e)}))},has:function(e){return M.map.hasOwnProperty(e)}};function E(e,t,n){void 0===n&&(n={});var o=null,r=0;return function(a){var i=Date.now();r||!1!==n.leading||(r=i);var u=t-(i-r),s=this,l=arguments;u<=0||u>t?(o&&(window.clearTimeout(o),o=null),r=i,e.apply(s,l)):o||!1===n.trailing||(o=window.setTimeout((function(){r=!1===n.leading?0:Date.now(),o=null,e.apply(s,l)}),u))}}function I(e,t,n,o,r){void 0===r&&(r=window);var a=r.Object.getOwnPropertyDescriptor(e,t);return r.Object.defineProperty(e,t,o?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),a&&a.set&&a.set.call(this,e)}}),function(){return I(e,t,a||{},!0)}}function x(e,t,n){try{if(!(t in e))return function(){};var o=e[t],r=n(o);return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=r,function(){e[t]=o}}catch(e){return function(){}}}function N(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function O(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function _(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var n=!1;return"string"==typeof t?n=e.classList.contains(t):e.classList.forEach((function(e){t.test(e)&&(n=!0)})),n||_(e.parentNode,t)}return e.nodeType,e.TEXT_NODE,_(e.parentNode,t)}function T(e){return"__sn"in e&&-2===e.__sn.id}function D(e){return Boolean(e.changedTouches)}function L(e){return"__ln"in e}var R=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&&L(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&L(e.nextSibling)){n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++},e.prototype.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)},e}(),F=function(e,t){return e+"@"+t};function A(e){return"__sn"in e}function z(e,t){e.delete(t),t.childNodes.forEach((function(t){return z(e,t)}))}function P(e,t){var n=t.parentNode;if(!n)return!1;var o=M.getId(n);return!!e.some((function(e){return e.id===o}))||P(e,n)}function j(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||j(e,n))}var H=new(function(){function e(){var e=this;this.frozen=!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.frozen||e.emit()},this.emit=function(){for(var t,o,r,a,i=[],u=new R,s=function(t){for(var n=t,o=-2;-2===o;)o=(n=n&&n.nextSibling)&&M.getId(n);return-1===o&&_(t.nextSibling,e.blockClass)&&(o=null),o},l=function(t){if(t.parentNode){var n=M.getId(t.parentNode),o=s(t);if(-1===n||-1===o)return u.addNode(t);var r=k(t,{doc:document,map:M.map,blockClass:e.blockClass,blockSelector:e.blockSelector,skipChild:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,slimDOMOptions:e.slimDOMOptions,recordCanvas:e.recordCanvas});r&&i.push({parentId:n,nextId:o,node:r})}};e.mapRemoves.length;)M.removeNodeFromMap(e.mapRemoves.shift());try{for(var c=n(e.movedSet),d=c.next();!d.done;d=c.next()){var p=d.value;P(e.removes,p)&&!e.movedSet.has(p.parentNode)||l(p)}}catch(e){t={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(t)throw t.error}}try{for(var f=n(e.addedSet),m=f.next();!m.done;m=f.next()){p=m.value;j(e.droppedSet,p)||P(e.removes,p)?j(e.movedSet,p)?l(p):e.droppedSet.add(p):l(p)}}catch(e){r={error:e}}finally{try{m&&!m.done&&(a=f.return)&&a.call(f)}finally{if(r)throw r.error}}for(var h=null;u.length;){var v=null;if(h){var y=M.getId(h.value.parentNode),b=s(h.value);-1!==y&&-1!==b&&(v=h)}if(!v)for(var g=u.length-1;g>=0;g--){var S=u.get(g);y=M.getId(S.value.parentNode),b=s(S.value);if(-1!==y&&-1!==b){v=S;break}}if(!v)break;h=v.previous,u.removeNode(v.value),l(v.value)}var C={texts:e.texts.map((function(e){return{id:M.getId(e.node),value:e.value}})).filter((function(e){return M.has(e.id)})),attributes:e.attributes.map((function(e){return{id:M.getId(e.node),attributes:e.attributes}})).filter((function(e){return M.has(e.id)})),removes:e.removes,adds:i};(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(!T(t.target))switch(t.type){case"characterData":var n=t.target.textContent;_(t.target,e.blockClass)||n===t.oldValue||e.texts.push({value:n,node:t.target});break;case"attributes":n=t.target.getAttribute(t.attributeName);if(_(t.target,e.blockClass)||n===t.oldValue)return;var o=e.attributes.find((function(e){return e.node===t.target}));o||(o={node:t.target,attributes:{}},e.attributes.push(o)),o.attributes[t.attributeName]=g(document,t.attributeName,n);break;case"childList":t.addedNodes.forEach((function(n){return e.genAdds(n,t.target)})),t.removedNodes.forEach((function(n){var o=M.getId(n),r=M.getId(t.target);_(n,e.blockClass)||_(t.target,e.blockClass)||T(n)||(e.addedSet.has(n)?(z(e.addedSet,n),e.droppedSet.add(n)):e.addedSet.has(t.target)&&-1===o||function e(t){var n=M.getId(t);return!M.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode))}(t.target)||(e.movedSet.has(n)&&e.movedMap[F(o,r)]?z(e.movedSet,n):e.removes.push({parentId:r,id:o})),e.mapRemoves.push(n))}))}},this.genAdds=function(t,n){if(!_(t,e.blockClass)){if(A(t)){if(T(t))return;e.movedSet.add(t);var o=null;n&&A(n)&&(o=n.__sn.id),o&&(e.movedMap[F(t.__sn.id,o)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);t.childNodes.forEach((function(t){return e.genAdds(t)}))}}}return e.prototype.init=function(e,t,n,o,r,a,i){this.blockClass=t,this.blockSelector=n,this.inlineStylesheet=o,this.maskInputOptions=r,this.recordCanvas=a,this.slimDOMOptions=i,this.emissionCallback=e},e.prototype.freeze=function(){this.frozen=!0},e.prototype.unfreeze=function(){this.frozen=!1},e.prototype.isFrozen=function(){return this.frozen},e}());function V(e,t,n){if(!1===n.mouseInteraction)return function(){};var o=!0===n.mouseInteraction||void 0===n.mouseInteraction?{}:n.mouseInteraction,r=[];return Object.keys(d).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]})).forEach((function(n){var o=n.toLowerCase(),a=function(n){return function(o){if(!_(o.target,t)){var r=M.getId(o.target),a=D(o)?o.changedTouches[0]:o,i=a.clientX,u=a.clientY;e({type:d[n],id:r,x:i,y:u})}}}(n);r.push(w(o,a))})),function(){r.forEach((function(e){return e()}))}}var W,U=["INPUT","TEXTAREA","SELECT"],B=new WeakMap;function X(e,o){void 0===o&&(o={}),function(e,t){var n=e.mutationCb,o=e.mousemoveCb,a=e.mouseInteractionCb,i=e.scrollCb,u=e.viewportResizeCb,s=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb,d=e.canvasMutationCb,p=e.fontCb;e.mutationCb=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];t.mutation&&t.mutation.apply(t,r(e)),n.apply(void 0,r(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,r(e)),o.apply(void 0,r(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,r(e)),a.apply(void 0,r(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,r(e)),i.apply(void 0,r(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,r(e)),u.apply(void 0,r(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,r(e)),s.apply(void 0,r(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,r(e)),l.apply(void 0,r(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,r(e)),c.apply(void 0,r(e))},e.canvasMutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.canvasMutation&&t.canvasMutation.apply(t,r(e)),d.apply(void 0,r(e))},e.fontCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.font&&t.font.apply(t,r(e)),p.apply(void 0,r(e))}}(e,o);var a,i,u=function(e,t,n,o,r,a,i){H.init(e,t,n,o,r,a,i);var u=new MutationObserver(H.processMutations.bind(H));return u.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),u}(e.mutationCb,e.blockClass,e.blockSelector,e.inlineStylesheet,e.maskInputOptions,e.recordCanvas,e.slimDOMOptions),s=function(e,t){if(!1===t.mousemove)return function(){};var n,o="number"==typeof t.mousemove?t.mousemove:50,r=[],a=E((function(t){var o=Date.now()-n;e(r.map((function(e){return e.timeOffset-=o,e})),t?c.TouchMove:c.MouseMove),r=[],n=null}),500),i=E((function(e){var t=e.target,o=D(e)?e.changedTouches[0]:e,i=o.clientX,u=o.clientY;n||(n=Date.now()),r.push({x:i,y:u,id:M.getId(t),timeOffset:Date.now()-n}),a(D(e))}),o,{trailing:!1}),u=[w("mousemove",i),w("touchmove",i)];return function(){u.forEach((function(e){return e()}))}}(e.mousemoveCb,e.sampling),l=V(e.mouseInteractionCb,e.blockClass,e.sampling),d=(a=e.scrollCb,i=e.blockClass,w("scroll",E((function(e){if(e.target&&!_(e.target,i)){var t=M.getId(e.target);if(e.target===document){var n=document.scrollingElement||document.documentElement;a({id:t,x:n.scrollLeft,y:n.scrollTop})}else a({id:t,x:e.target.scrollLeft,y:e.target.scrollTop})}}),e.sampling.scroll||100))),f=function(e){return w("resize",E((function(){var t=N(),n=O();e({width:Number(n),height:Number(t)})}),200),window)}(e.viewportResizeCb),m=function(e,n,o,a,i,u){function s(e){var t=e.target;if(t&&t.tagName&&!(U.indexOf(t.tagName)<0)&&!_(t,n)){var r=t.type;if("password"!==r&&!t.classList.contains(o)){var u=t.value,s=!1;"radio"===r||"checkbox"===r?s=t.checked:(a[t.tagName.toLowerCase()]||a[r])&&(u=i?i(u):"*".repeat(u.length)),l(t,{text:u,isChecked:s});var c=t.name;"radio"===r&&c&&s&&document.querySelectorAll('input[type="radio"][name="'+c+'"]').forEach((function(e){e!==t&&l(e,{text:e.value,isChecked:!s})}))}}}function l(n,o){var r=B.get(n);if(!r||r.text!==o.text||r.isChecked!==o.isChecked){B.set(n,o);var a=M.getId(n);e(t(t({},o),{id:a}))}}var c=("last"===u.input?["change"]:["input","change"]).map((function(e){return w(e,s)})),d=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),p=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"]];return d&&d.set&&c.push.apply(c,r(p.map((function(e){return I(e[0],e[1],{set:function(){s({target:this})}})})))),function(){c.forEach((function(e){return e()}))}}(e.inputCb,e.blockClass,e.ignoreClass,e.maskInputOptions,e.maskInputFn,e.sampling),h=function(e,t){var n=function(n){return function(o){var r=o.target;r&&!_(r,t)&&e({type:"play"===n?p.Play:p.Pause,id:M.getId(r)})}},o=[w("play",n("play")),w("pause",n("pause"))];return function(){o.forEach((function(e){return e()}))}}(e.mediaInteractionCb,e.blockClass),v=function(e){var t=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(n,o){var r=M.getId(this.ownerNode);return-1!==r&&e({id:r,adds:[{rule:n,index:o}]}),t.apply(this,arguments)};var n=CSSStyleSheet.prototype.deleteRule;return CSSStyleSheet.prototype.deleteRule=function(t){var o=M.getId(this.ownerNode);return-1!==o&&e({id:o,removes:[{index:t}]}),n.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=t,CSSStyleSheet.prototype.deleteRule=n}}(e.styleSheetRuleCb),y=e.recordCanvas?function(e,t){var o,a,i=Object.getOwnPropertyNames(CanvasRenderingContext2D.prototype),u=[],s=function(n){try{if("function"!=typeof CanvasRenderingContext2D.prototype[n])return"continue";var o=x(CanvasRenderingContext2D.prototype,n,(function(o){return function(){for(var a=this,i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];return _(this.canvas,t)||setTimeout((function(){var t=r(i);"drawImage"===n&&t[0]&&t[0]instanceof HTMLCanvasElement&&(t[0]=t[0].toDataURL()),e({id:M.getId(a.canvas),property:n,args:t})}),0),o.apply(this,i)}}));u.push(o)}catch(t){var a=I(CanvasRenderingContext2D.prototype,n,{set:function(t){e({id:M.getId(this.canvas),property:n,args:[t],setter:!0})}});u.push(a)}};try{for(var l=n(i),c=l.next();!c.done;c=l.next()){s(c.value)}}catch(e){o={error:e}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(o)throw o.error}}return function(){u.forEach((function(e){return e()}))}}(e.canvasMutationCb,e.blockClass):function(){},b=e.collectFonts?function(e){var t=[],n=new WeakMap,o=FontFace;window.FontFace=function(e,t,r){var a=new o(e,t,r);return n.set(a,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),a};var r=x(document.fonts,"add",(function(t){return function(o){return setTimeout((function(){var t=n.get(o);t&&(e(t),n.delete(o))}),0),t.apply(this,[o])}}));return t.push((function(){window.FonFace=o})),t.push(r),function(){t.forEach((function(e){return e()}))}}(e.fontCb):function(){};return function(){u.disconnect(),s(),l(),d(),f(),m(),h(),v(),y(),b()}}function q(e){return t(t({},e),{timestamp:Date.now()})}function Y(e){void 0===e&&(e={});var n=e.emit,r=e.checkoutEveryNms,a=e.checkoutEveryNth,i=e.blockClass,u=void 0===i?"rr-block":i,s=e.blockSelector,d=void 0===s?null:s,p=e.ignoreClass,f=void 0===p?"rr-ignore":p,m=e.inlineStylesheet,h=void 0===m||m,v=e.maskAllInputs,y=e.maskInputOptions,b=e.slimDOMOptions,g=e.maskInputFn,S=e.hooks,C=e.packFn,E=e.sampling,I=void 0===E?{}:E,x=e.mousemoveWait,_=e.recordCanvas,T=void 0!==_&&_,D=e.collectFonts,L=void 0!==D&&D;if(!n)throw new Error("emit function is required");void 0!==x&&void 0===I.mousemove&&(I.mousemove=x);var R,F,A=!0===v?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:void 0!==y?y:{},z=!0===b||"all"===b?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===b,headMetaDescKeywords:"all"===b}:b||{};void 0===R&&(R=window),"NodeList"in R&&!R.NodeList.prototype.forEach&&(R.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in R&&!R.DOMTokenList.prototype.forEach&&(R.DOMTokenList.prototype.forEach=Array.prototype.forEach);var P=0;function j(e){var t,n,r,a;void 0===e&&(e=!1),W(q({type:l.Meta,data:{href:window.location.href,width:O(),height:N()}}),e);var i=H.isFrozen();H.freeze();var s=o(function(e,t){var n=t||{},o=n.blockClass,r=void 0===o?"rr-block":o,a=n.inlineStylesheet,i=void 0===a||a,u=n.recordCanvas,s=void 0!==u&&u,l=n.blockSelector,c=void 0===l?null:l,d=n.maskAllInputs,p=void 0!==d&&d,f=n.slimDOM,m=void 0!==f&&f,h={};return[k(e,{doc:e,map:h,blockClass:r,blockSelector:c,skipChild:!1,inlineStylesheet:i,maskInputOptions:!0===p?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===p?{}:p,slimDOMOptions:!0===m||"all"===m?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===m,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===m?{}:m,recordCanvas:s}),h]}(document,{blockClass:u,blockSelector:d,inlineStylesheet:h,maskAllInputs:A,slimDOM:z,recordCanvas:T}),2),c=s[0],p=s[1];if(!c)return console.warn("Failed to snapshot the document");M.map=p,W(q({type:l.FullSnapshot,data:{node:c,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}}})),i||(H.emit(),H.unfreeze())}W=function(e,t){if(!H.isFrozen()||e.type===l.FullSnapshot||e.type===l.IncrementalSnapshot&&e.data.source===c.Mutation||(H.emit(),H.unfreeze()),n(C?C(e):e,t),e.type===l.FullSnapshot)F=e,P=0;else if(e.type===l.IncrementalSnapshot){P++;var o=a&&P>=a,i=r&&e.timestamp-F.timestamp>r;(o||i)&&j(!0)}};try{var V=[];V.push(w("DOMContentLoaded",(function(){W(q({type:l.DomContentLoaded,data:{}}))})));var U=function(){j(),V.push(X({mutationCb:function(e){return W(q({type:l.IncrementalSnapshot,data:t({source:c.Mutation},e)}))},mousemoveCb:function(e,t){return W(q({type:l.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return W(q({type:l.IncrementalSnapshot,data:t({source:c.MouseInteraction},e)}))},scrollCb:function(e){return W(q({type:l.IncrementalSnapshot,data:t({source:c.Scroll},e)}))},viewportResizeCb:function(e){return W(q({type:l.IncrementalSnapshot,data:t({source:c.ViewportResize},e)}))},inputCb:function(e){return W(q({type:l.IncrementalSnapshot,data:t({source:c.Input},e)}))},mediaInteractionCb:function(e){return W(q({type:l.IncrementalSnapshot,data:t({source:c.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return W(q({type:l.IncrementalSnapshot,data:t({source:c.StyleSheetRule},e)}))},canvasMutationCb:function(e){return W(q({type:l.IncrementalSnapshot,data:t({source:c.CanvasMutation},e)}))},fontCb:function(e){return W(q({type:l.IncrementalSnapshot,data:t({source:c.Font},e)}))},blockClass:u,blockSelector:d,ignoreClass:f,maskInputOptions:A,maskInputFn:g,inlineStylesheet:h,sampling:I,recordCanvas:T,collectFonts:L,slimDOMOptions:z},S))};return"interactive"===document.readyState||"complete"===document.readyState?U():V.push(w("load",(function(){W(q({type:l.Load,data:{}})),U()}),window)),function(){V.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}return Y.addCustomEvent=function(e,t){if(!W)throw new Error("please add custom event after start recording");W(q({type:l.Custom,data:{tag:e,payload:t}}))},Y.freezePage=function(){H.freeze()},Y}();
***************************************************************************** */var e,t=function(){return(t=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function n(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=a.next()).done;)i.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i}function r(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(e||(e={}));var a=1,i=RegExp("[^a-z1-6-_]");function u(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(s).join(""):null}catch(e){return null}}function s(e){return function(e){return"styleSheet"in e}(e)?u(e.styleSheet)||"":e.cssText}var l,c,d,p,f,h=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,m=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,v=/^(data:)([^,]*),(.*)/i;function y(e,t){return(e||"").replace(h,(function(e,n,o,r,a,i){var u,s=o||a||i,l=n||r||"";if(!s)return e;if(!m.test(s))return"url("+l+s+l+")";if(v.test(s))return"url("+l+s+l+")";if("/"===s[0])return"url("+l+(((u=t).indexOf("//")>-1?u.split("/").slice(0,3).join("/"):u.split("/")[0]).split("?")[0]+s)+l+")";var c=t.split("/"),d=s.split("/");c.pop();for(var p=0,f=d;p<f.length;p++){var h=f[p];"."!==h&&(".."===h?c.pop():c.push(h))}return"url("+l+c.join("/")+l+")"}))}function g(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function b(e,t,n){return"src"===t||"href"===t&&n?g(e,n):"srcset"===t&&n?function(e,t){return""===t.trim()?t:t.split(",").map((function(t){var n=t.trimLeft().trimRight().split(" ");return 2===n.length?g(e,n[0])+" "+n[1]:1===n.length?""+g(e,n[0]):""})).join(", ")}(e,n):"style"===t&&n?y(n,location.href):n}function C(t,n){var o,r=n.doc,a=n.blockClass,s=n.blockSelector,l=n.inlineStylesheet,c=n.maskInputOptions,d=void 0===c?{}:c,p=n.recordCanvas;switch(t.nodeType){case t.DOCUMENT_NODE:return{type:e.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId};case t.ELEMENT_NODE:for(var f=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else e.classList.forEach((function(e){if(t.test(e))return!0}));return!!n&&e.matches(n)}(t,a,s),h=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return i.test(t)?"div":t}(t),m={},v=0,g=Array.from(t.attributes);v<g.length;v++){var C=g[v],S=C.name,w=C.value;m[S]=b(r,S,w)}if("link"===h&&l){var k,E=Array.from(r.styleSheets).find((function(e){return e.href===t.href}));(k=u(E))&&(delete m.rel,delete m.href,m._cssText=y(k,E.href))}if("style"===h&&t.sheet&&!(t.innerText||t.textContent||"").trim().length)(k=u(t.sheet))&&(m._cssText=y(k,location.href));if("input"===h||"textarea"===h||"select"===h){w=t.value;"radio"!==m.type&&"checkbox"!==m.type&&"submit"!==m.type&&"button"!==m.type&&w?m.value=d[m.type]||d[h]?"*".repeat(w.length):w:t.checked&&(m.checked=t.checked)}if("option"===h){var M=t.parentElement;m.value===M.value&&(m.selected=t.selected)}if("canvas"===h&&p&&(m.rr_dataURL=t.toDataURL()),"audio"!==h&&"video"!==h||(m.rr_mediaState=t.paused?"paused":"played"),t.scrollLeft&&(m.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(m.rr_scrollTop=t.scrollTop),f){var I=t.getBoundingClientRect(),O=I.width,x=I.height;m={class:m.class,rr_width:O+"px",rr_height:x+"px"}}return{type:e.Element,tagName:h,attributes:m,childNodes:[],isSVG:(o=t,"svg"===o.tagName||o instanceof SVGElement||void 0),needBlock:f};case t.TEXT_NODE:var N=t.parentNode&&t.parentNode.tagName,T=t.textContent,_="STYLE"===N||void 0;return _&&T&&(T=y(T,location.href)),"SCRIPT"===N&&(T="SCRIPT_PLACEHOLDER"),{type:e.Text,textContent:T||"",isStyle:_};case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:""};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||""};default:return!1}}function S(e){return void 0===e?"":e.toLowerCase()}function w(t,n){var o,r=n.doc,i=n.map,u=n.blockClass,s=n.blockSelector,l=n.skipChild,c=void 0!==l&&l,d=n.inlineStylesheet,p=void 0===d||d,f=n.maskInputOptions,h=void 0===f?{}:f,m=n.slimDOMOptions,v=n.recordCanvas,y=void 0!==v&&v,g=n.preserveWhiteSpace,b=void 0===g||g,k=C(t,{doc:r,blockClass:u,blockSelector:s,inlineStylesheet:p,maskInputOptions:h,recordCanvas:y});if(!k)return console.warn(t,"not serialized"),null;o="__sn"in t?t.__sn.id:!function(t,n){if(n.comment&&t.type===e.Comment)return!0;if(t.type===e.Element){if(n.script&&("script"===t.tagName||"link"===t.tagName&&"preload"===t.attributes.rel&&"script"===t.attributes.as))return!0;if(n.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(S(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===S(t.attributes.name)||"icon"===S(t.attributes.rel)||"apple-touch-icon"===S(t.attributes.rel)||"shortcut icon"===S(t.attributes.rel))))return!0;if("meta"===t.tagName){if(n.headMetaDescKeywords&&S(t.attributes.name).match(/^description|keywords$/))return!0;if(n.headMetaSocial&&(S(t.attributes.property).match(/^(og|twitter|fb):/)||S(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===S(t.attributes.name)))return!0;if(n.headMetaRobots&&("robots"===S(t.attributes.name)||"googlebot"===S(t.attributes.name)||"bingbot"===S(t.attributes.name)))return!0;if(n.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(n.headMetaAuthorship&&("author"===S(t.attributes.name)||"generator"===S(t.attributes.name)||"framework"===S(t.attributes.name)||"publisher"===S(t.attributes.name)||"progid"===S(t.attributes.name)||S(t.attributes.property).match(/^article:/)||S(t.attributes.property).match(/^product:/)))return!0;if(n.headMetaVerification&&("google-site-verification"===S(t.attributes.name)||"yandex-verification"===S(t.attributes.name)||"csrf-token"===S(t.attributes.name)||"p:domain_verify"===S(t.attributes.name)||"verify-v1"===S(t.attributes.name)||"verification"===S(t.attributes.name)||"shopify-checkout-api-token"===S(t.attributes.name)))return!0}}return!1}(k,m)&&(b||k.type!==e.Text||k.isStyle||k.textContent.replace(/^\s+|\s+$/gm,"").length)?a++:-2;var E=Object.assign(k,{id:o});if(t.__sn=E,-2===o)return null;i[o]=t;var M=!c;if(E.type===e.Element&&(M=M&&!E.needBlock,delete E.needBlock),(E.type===e.Document||E.type===e.Element)&&M){m.headWhitespace&&k.type===e.Element&&"head"===k.tagName&&(b=!1);for(var I=0,O=Array.from(t.childNodes);I<O.length;I++){var x=w(O[I],{doc:r,map:i,blockClass:u,blockSelector:s,skipChild:c,inlineStylesheet:p,maskInputOptions:h,slimDOMOptions:m,recordCanvas:y,preserveWhiteSpace:b});x&&E.childNodes.push(x)}}return E}function k(e,t,n){void 0===n&&(n=document);var o={capture:!0,passive:!0};return n.addEventListener(e,t,o),function(){return n.removeEventListener(e,t,o)}}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom"}(l||(l={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log"}(c||(c={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(d||(d={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(p||(p={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change"}(f||(f={}));var E={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return E.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete E.map[t],e.childNodes&&e.childNodes.forEach((function(e){return E.removeNodeFromMap(e)}))},has:function(e){return E.map.hasOwnProperty(e)}};function M(e,t,n){void 0===n&&(n={});var o=null,r=0;return function(a){var i=Date.now();r||!1!==n.leading||(r=i);var u=t-(i-r),s=this,l=arguments;u<=0||u>t?(o&&(window.clearTimeout(o),o=null),r=i,e.apply(s,l)):o||!1===n.trailing||(o=window.setTimeout((function(){r=!1===n.leading?0:Date.now(),o=null,e.apply(s,l)}),u))}}function I(e,t,n,o,r){void 0===r&&(r=window);var a=r.Object.getOwnPropertyDescriptor(e,t);return r.Object.defineProperty(e,t,o?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),a&&a.set&&a.set.call(this,e)}}),function(){return I(e,t,a||{},!0)}}function O(e,t,n){try{if(!(t in e))return function(){};var o=e[t],r=n(o);return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=r,function(){e[t]=o}}catch(e){return function(){}}}function x(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function N(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function T(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var n=!1;return"string"==typeof t?n=e.classList.contains(t):e.classList.forEach((function(e){t.test(e)&&(n=!0)})),n||T(e.parentNode,t)}return e.nodeType,e.TEXT_NODE,T(e.parentNode,t)}function _(e){return"__sn"in e&&-2===e.__sn.id}function L(e){return Boolean(e.changedTouches)}function D(e){return"__ln"in e}var R=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&&D(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&D(e.nextSibling)){n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++},e.prototype.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)},e}(),F=function(e,t){return e+"@"+t};function A(e){return"__sn"in e}function z(e,t){e.delete(t),t.childNodes.forEach((function(t){return z(e,t)}))}function P(e,t){var n=t.parentNode;if(!n)return!1;var o=E.getId(n);return!!e.some((function(e){return e.id===o}))||P(e,n)}function j(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||j(e,n))}function H(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var n=e.localName;if(!n)break;n=n.toLowerCase();var o=e.parentElement,r=[];if(o.children&&o.children.length>0)for(var a=0;a<o.children.length;a++){var i=o.children[a];i.localName&&i.localName.toLowerCase&&i.localName.toLowerCase()===n&&r.push(i)}r.length>1&&(n+=":eq("+r.indexOf(e)+")"),t=n+(t?">"+t:""),e=o}return t}function V(e,t){var n={numOfKeysLimit:50};Object.assign(n,t);var o=[],r=[];return JSON.stringify(e,(function(e,t){if(o.length>0){var a=o.indexOf(this);~a?o.splice(a+1):o.push(this),~a?r.splice(a,1/0,e):r.push(e),~o.indexOf(t)&&(t=o[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,o.indexOf(t)).join(".")+"]")}else o.push(t);if(null==t)return t;if(function(e){return"object"==typeof e&&Object.keys(e).length>n.numOfKeysLimit||"function"==typeof e}(t))return function(e){var t=e.toString();n.stringLengthLimit&&t.length>n.stringLengthLimit&&(t=t.slice(0,n.stringLengthLimit)+"...");return t}(t);if(t instanceof Event){var i={};for(var u in t){var s=t[u];Array.isArray(s)?i[u]=H(s.length?s[0]:null):i[u]=s}return i}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t}))}var W=new(function(){function e(){var e=this;this.frozen=!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.frozen||e.emit()},this.emit=function(){for(var t,o,r,a,i=[],u=new R,s=function(t){for(var n=t,o=-2;-2===o;)o=(n=n&&n.nextSibling)&&E.getId(n);return-1===o&&T(t.nextSibling,e.blockClass)&&(o=null),o},l=function(t){if(t.parentNode){var n=E.getId(t.parentNode),o=s(t);if(-1===n||-1===o)return u.addNode(t);var r=w(t,{doc:document,map:E.map,blockClass:e.blockClass,blockSelector:e.blockSelector,skipChild:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,slimDOMOptions:e.slimDOMOptions,recordCanvas:e.recordCanvas});r&&i.push({parentId:n,nextId:o,node:r})}};e.mapRemoves.length;)E.removeNodeFromMap(e.mapRemoves.shift());try{for(var c=n(e.movedSet),d=c.next();!d.done;d=c.next()){var p=d.value;P(e.removes,p)&&!e.movedSet.has(p.parentNode)||l(p)}}catch(e){t={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(t)throw t.error}}try{for(var f=n(e.addedSet),h=f.next();!h.done;h=f.next()){p=h.value;j(e.droppedSet,p)||P(e.removes,p)?j(e.movedSet,p)?l(p):e.droppedSet.add(p):l(p)}}catch(e){r={error:e}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(r)throw r.error}}for(var m=null;u.length;){var v=null;if(m){var y=E.getId(m.value.parentNode),g=s(m.value);-1!==y&&-1!==g&&(v=m)}if(!v)for(var b=u.length-1;b>=0;b--){var C=u.get(b);y=E.getId(C.value.parentNode),g=s(C.value);if(-1!==y&&-1!==g){v=C;break}}if(!v)break;m=v.previous,u.removeNode(v.value),l(v.value)}var S={texts:e.texts.map((function(e){return{id:E.getId(e.node),value:e.value}})).filter((function(e){return E.has(e.id)})),attributes:e.attributes.map((function(e){return{id:E.getId(e.node),attributes:e.attributes}})).filter((function(e){return E.has(e.id)})),removes:e.removes,adds:i};(S.texts.length||S.attributes.length||S.removes.length||S.adds.length)&&(e.texts=[],e.attributes=[],e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.movedMap={},e.emissionCallback(S))},this.processMutation=function(t){if(!_(t.target))switch(t.type){case"characterData":var n=t.target.textContent;T(t.target,e.blockClass)||n===t.oldValue||e.texts.push({value:n,node:t.target});break;case"attributes":n=t.target.getAttribute(t.attributeName);if(T(t.target,e.blockClass)||n===t.oldValue)return;var o=e.attributes.find((function(e){return e.node===t.target}));o||(o={node:t.target,attributes:{}},e.attributes.push(o)),o.attributes[t.attributeName]=b(document,t.attributeName,n);break;case"childList":t.addedNodes.forEach((function(n){return e.genAdds(n,t.target)})),t.removedNodes.forEach((function(n){var o=E.getId(n),r=E.getId(t.target);T(n,e.blockClass)||T(t.target,e.blockClass)||_(n)||(e.addedSet.has(n)?(z(e.addedSet,n),e.droppedSet.add(n)):e.addedSet.has(t.target)&&-1===o||function e(t){var n=E.getId(t);return!E.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode))}(t.target)||(e.movedSet.has(n)&&e.movedMap[F(o,r)]?z(e.movedSet,n):e.removes.push({parentId:r,id:o})),e.mapRemoves.push(n))}))}},this.genAdds=function(t,n){if(!T(t,e.blockClass)){if(A(t)){if(_(t))return;e.movedSet.add(t);var o=null;n&&A(n)&&(o=n.__sn.id),o&&(e.movedMap[F(t.__sn.id,o)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);t.childNodes.forEach((function(t){return e.genAdds(t)}))}}}return e.prototype.init=function(e,t,n,o,r,a,i){this.blockClass=t,this.blockSelector=n,this.inlineStylesheet=o,this.maskInputOptions=r,this.recordCanvas=a,this.slimDOMOptions=i,this.emissionCallback=e},e.prototype.freeze=function(){this.frozen=!0},e.prototype.unfreeze=function(){this.frozen=!1},e.prototype.isFrozen=function(){return this.frozen},e}());function U(e,t,n){if(!1===n.mouseInteraction)return function(){};var o=!0===n.mouseInteraction||void 0===n.mouseInteraction?{}:n.mouseInteraction,r=[];return Object.keys(d).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]})).forEach((function(n){var o=n.toLowerCase(),a=function(n){return function(o){if(!T(o.target,t)){var r=E.getId(o.target),a=L(o)?o.changedTouches[0]:o,i=a.clientX,u=a.clientY;e({type:d[n],id:r,x:i,y:u})}}}(n);r.push(k(o,a))})),function(){r.forEach((function(e){return e()}))}}var q,B=["INPUT","TEXTAREA","SELECT"],X=new WeakMap;function Y(e,o){void 0===o&&(o={}),function(e,t){var n=e.mutationCb,o=e.mousemoveCb,a=e.mouseInteractionCb,i=e.scrollCb,u=e.viewportResizeCb,s=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb,d=e.canvasMutationCb,p=e.fontCb,f=e.logCb;e.mutationCb=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];t.mutation&&t.mutation.apply(t,r(e)),n.apply(void 0,r(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,r(e)),o.apply(void 0,r(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,r(e)),a.apply(void 0,r(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,r(e)),i.apply(void 0,r(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,r(e)),u.apply(void 0,r(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,r(e)),s.apply(void 0,r(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,r(e)),l.apply(void 0,r(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,r(e)),c.apply(void 0,r(e))},e.canvasMutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.canvasMutation&&t.canvasMutation.apply(t,r(e)),d.apply(void 0,r(e))},e.fontCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.font&&t.font.apply(t,r(e)),p.apply(void 0,r(e))},e.logCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.log&&t.log.apply(t,r(e)),f.apply(void 0,r(e))}}(e,o);var a,i,u=function(e,t,n,o,r,a,i){W.init(e,t,n,o,r,a,i);var u=new MutationObserver(W.processMutations.bind(W));return u.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),u}(e.mutationCb,e.blockClass,e.blockSelector,e.inlineStylesheet,e.maskInputOptions,e.recordCanvas,e.slimDOMOptions),s=function(e,t){if(!1===t.mousemove)return function(){};var n,o="number"==typeof t.mousemove?t.mousemove:50,r=[],a=M((function(t){var o=Date.now()-n;e(r.map((function(e){return e.timeOffset-=o,e})),t?c.TouchMove:c.MouseMove),r=[],n=null}),500),i=M((function(e){var t=e.target,o=L(e)?e.changedTouches[0]:e,i=o.clientX,u=o.clientY;n||(n=Date.now()),r.push({x:i,y:u,id:E.getId(t),timeOffset:Date.now()-n}),a(L(e))}),o,{trailing:!1}),u=[k("mousemove",i),k("touchmove",i)];return function(){u.forEach((function(e){return e()}))}}(e.mousemoveCb,e.sampling),l=U(e.mouseInteractionCb,e.blockClass,e.sampling),d=(a=e.scrollCb,i=e.blockClass,k("scroll",M((function(e){if(e.target&&!T(e.target,i)){var t=E.getId(e.target);if(e.target===document){var n=document.scrollingElement||document.documentElement;a({id:t,x:n.scrollLeft,y:n.scrollTop})}else a({id:t,x:e.target.scrollLeft,y:e.target.scrollTop})}}),e.sampling.scroll||100))),f=function(e){return k("resize",M((function(){var t=x(),n=N();e({width:Number(n),height:Number(t)})}),200),window)}(e.viewportResizeCb),h=function(e,n,o,a,i,u){function s(e){var t=e.target;if(t&&t.tagName&&!(B.indexOf(t.tagName)<0)&&!T(t,n)){var r=t.type;if("password"!==r&&!t.classList.contains(o)){var u=t.value,s=!1;"radio"===r||"checkbox"===r?s=t.checked:(a[t.tagName.toLowerCase()]||a[r])&&(u=i?i(u):"*".repeat(u.length)),l(t,{text:u,isChecked:s});var c=t.name;"radio"===r&&c&&s&&document.querySelectorAll('input[type="radio"][name="'+c+'"]').forEach((function(e){e!==t&&l(e,{text:e.value,isChecked:!s})}))}}}function l(n,o){var r=X.get(n);if(!r||r.text!==o.text||r.isChecked!==o.isChecked){X.set(n,o);var a=E.getId(n);e(t(t({},o),{id:a}))}}var c=("last"===u.input?["change"]:["input","change"]).map((function(e){return k(e,s)})),d=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),p=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"]];return d&&d.set&&c.push.apply(c,r(p.map((function(e){return I(e[0],e[1],{set:function(){s({target:this})}})})))),function(){c.forEach((function(e){return e()}))}}(e.inputCb,e.blockClass,e.ignoreClass,e.maskInputOptions,e.maskInputFn,e.sampling),m=function(e,t){var n=function(n){return function(o){var r=o.target;r&&!T(r,t)&&e({type:"play"===n?p.Play:p.Pause,id:E.getId(r)})}},o=[k("play",n("play")),k("pause",n("pause"))];return function(){o.forEach((function(e){return e()}))}}(e.mediaInteractionCb,e.blockClass),v=function(e){var t=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(n,o){var r=E.getId(this.ownerNode);return-1!==r&&e({id:r,adds:[{rule:n,index:o}]}),t.apply(this,arguments)};var n=CSSStyleSheet.prototype.deleteRule;return CSSStyleSheet.prototype.deleteRule=function(t){var o=E.getId(this.ownerNode);return-1!==o&&e({id:o,removes:[{index:t}]}),n.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=t,CSSStyleSheet.prototype.deleteRule=n}}(e.styleSheetRuleCb),y=e.recordCanvas?function(e,t){var o,a,i=Object.getOwnPropertyNames(CanvasRenderingContext2D.prototype),u=[],s=function(n){try{if("function"!=typeof CanvasRenderingContext2D.prototype[n])return"continue";var o=O(CanvasRenderingContext2D.prototype,n,(function(o){return function(){for(var a=this,i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];return T(this.canvas,t)||setTimeout((function(){var t=r(i);"drawImage"===n&&t[0]&&t[0]instanceof HTMLCanvasElement&&(t[0]=t[0].toDataURL()),e({id:E.getId(a.canvas),property:n,args:t})}),0),o.apply(this,i)}}));u.push(o)}catch(t){var a=I(CanvasRenderingContext2D.prototype,n,{set:function(t){e({id:E.getId(this.canvas),property:n,args:[t],setter:!0})}});u.push(a)}};try{for(var l=n(i),c=l.next();!c.done;c=l.next()){s(c.value)}}catch(e){o={error:e}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(o)throw o.error}}return function(){u.forEach((function(e){return e()}))}}(e.canvasMutationCb,e.blockClass):function(){},g=e.collectFonts?function(e){var t=[],n=new WeakMap,o=FontFace;window.FontFace=function(e,t,r){var a=new o(e,t,r);return n.set(a,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),a};var r=O(document.fonts,"add",(function(t){return function(o){return setTimeout((function(){var t=n.get(o);t&&(e(t),n.delete(o))}),0),t.apply(this,[o])}}));return t.push((function(){window.FonFace=o})),t.push(r),function(){t.forEach((function(e){return e()}))}}(e.fontCb):function(){},b=e.logOptions?function(e,t){var o,a,i=this,u=t.logger;if(!u)return function(){};var s=0,l=[];if(t.level.includes("error")&&window){var c=window.onerror;window.onerror=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];c&&c.apply(i,n);var r=[];n[n.length-1]instanceof Error&&(r=m(n[n.length-1].stack,0));var a=[V(n[0],t.stringifyOptions)];e({level:"error",trace:r,payload:a})},l.push((function(){window.onerror=c}))}try{for(var d=n(t.level),p=d.next();!p.done;p=d.next()){var f=p.value;l.push(h(u,f))}}catch(e){o={error:e}}finally{try{p&&!p.done&&(a=d.return)&&a.call(d)}finally{if(o)throw o.error}}return function(){l.forEach((function(e){return e()}))};function h(n,o){var a=this;return n[o]?O(n,o,(function(n){return function(){for(var i=[],u=0;u<arguments.length;u++)i[u]=arguments[u];n.apply(a,i);try{var l=m((new Error).stack),c=i.map((function(e){return V(e,t.stringifyOptions)}));++s<t.lengthThreshold?e({level:o,trace:l,payload:c}):s===t.lengthThreshold&&e({level:"warn",trace:[],payload:[V("The number of log records reached the threshold.")]})}catch(e){n.apply(void 0,r(["rrweb logger error:",e],i))}}})):function(){}}function m(e,t){void 0===t&&(t=1);var n=[];return e&&(n=e.split("at").splice(1+t).map((function(e){return e.trim()}))),n}}(e.logCb,e.logOptions):function(){};return function(){u.disconnect(),s(),l(),d(),f(),h(),m(),v(),y(),g(),b()}}function K(e){return t(t({},e),{timestamp:Date.now()})}function $(e){void 0===e&&(e={});var n=e.emit,r=e.checkoutEveryNms,a=e.checkoutEveryNth,i=e.blockClass,u=void 0===i?"rr-block":i,s=e.blockSelector,d=void 0===s?null:s,p=e.ignoreClass,f=void 0===p?"rr-ignore":p,h=e.inlineStylesheet,m=void 0===h||h,v=e.maskAllInputs,y=e.maskInputOptions,g=e.slimDOMOptions,b=e.maskInputFn,C=e.hooks,S=e.packFn,M=e.sampling,I=void 0===M?{}:M,O=e.mousemoveWait,T=e.recordCanvas,_=void 0!==T&&T,L=e.collectFonts,D=void 0!==L&&L,R=e.recordLog,F=void 0!==R&&R;if(!n)throw new Error("emit function is required");void 0!==O&&void 0===I.mousemove&&(I.mousemove=O);var A,z,P=!0===v?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:void 0!==y?y:{},j=!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===g,headMetaDescKeywords:"all"===g}:g||{},H={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:console},V=F?!0===F?H:Object.assign({},H,F):{};void 0===A&&(A=window),"NodeList"in A&&!A.NodeList.prototype.forEach&&(A.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in A&&!A.DOMTokenList.prototype.forEach&&(A.DOMTokenList.prototype.forEach=Array.prototype.forEach);var U=0;function B(e){var t,n,r,a;void 0===e&&(e=!1),q(K({type:l.Meta,data:{href:window.location.href,width:N(),height:x()}}),e);var i=W.isFrozen();W.freeze();var s=o(function(e,t){var n=t||{},o=n.blockClass,r=void 0===o?"rr-block":o,a=n.inlineStylesheet,i=void 0===a||a,u=n.recordCanvas,s=void 0!==u&&u,l=n.blockSelector,c=void 0===l?null:l,d=n.maskAllInputs,p=void 0!==d&&d,f=n.slimDOM,h=void 0!==f&&f,m={};return[w(e,{doc:e,map:m,blockClass:r,blockSelector:c,skipChild:!1,inlineStylesheet:i,maskInputOptions:!0===p?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===p?{}:p,slimDOMOptions:!0===h||"all"===h?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===h,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===h?{}:h,recordCanvas:s}),m]}(document,{blockClass:u,blockSelector:d,inlineStylesheet:m,maskAllInputs:P,slimDOM:j,recordCanvas:_}),2),c=s[0],p=s[1];if(!c)return console.warn("Failed to snapshot the document");E.map=p,q(K({type:l.FullSnapshot,data:{node:c,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}}})),i||(W.emit(),W.unfreeze())}q=function(e,t){if(!W.isFrozen()||e.type===l.FullSnapshot||e.type===l.IncrementalSnapshot&&e.data.source===c.Mutation||(W.emit(),W.unfreeze()),n(S?S(e):e,t),e.type===l.FullSnapshot)z=e,U=0;else if(e.type===l.IncrementalSnapshot){U++;var o=a&&U>=a,i=r&&e.timestamp-z.timestamp>r;(o||i)&&B(!0)}};try{var X=[];X.push(k("DOMContentLoaded",(function(){q(K({type:l.DomContentLoaded,data:{}}))})));var $=function(){B(),X.push(Y({mutationCb:function(e){return q(K({type:l.IncrementalSnapshot,data:t({source:c.Mutation},e)}))},mousemoveCb:function(e,t){return q(K({type:l.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return q(K({type:l.IncrementalSnapshot,data:t({source:c.MouseInteraction},e)}))},scrollCb:function(e){return q(K({type:l.IncrementalSnapshot,data:t({source:c.Scroll},e)}))},viewportResizeCb:function(e){return q(K({type:l.IncrementalSnapshot,data:t({source:c.ViewportResize},e)}))},inputCb:function(e){return q(K({type:l.IncrementalSnapshot,data:t({source:c.Input},e)}))},mediaInteractionCb:function(e){return q(K({type:l.IncrementalSnapshot,data:t({source:c.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return q(K({type:l.IncrementalSnapshot,data:t({source:c.StyleSheetRule},e)}))},canvasMutationCb:function(e){return q(K({type:l.IncrementalSnapshot,data:t({source:c.CanvasMutation},e)}))},fontCb:function(e){return q(K({type:l.IncrementalSnapshot,data:t({source:c.Font},e)}))},logCb:function(e){return q(K({type:l.IncrementalSnapshot,data:t({source:c.Log},e)}))},blockClass:u,blockSelector:d,ignoreClass:f,maskInputOptions:P,maskInputFn:b,inlineStylesheet:m,sampling:I,recordCanvas:_,collectFonts:D,slimDOMOptions:j,logOptions:V},C))};return"interactive"===document.readyState||"complete"===document.readyState?$():X.push(k("load",(function(){q(K({type:l.Load,data:{}})),$()}),window)),function(){X.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}return $.addCustomEvent=function(e,t){if(!q)throw new Error("please add custom event after start recording");q(K({type:l.Custom,data:{tag:e,payload:t}}))},$.freezePage=function(){W.freeze()},$}();
//# sourceMappingURL=rrweb-record.min.js.map

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

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

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

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

@@ -17,4 +17,7 @@ var NodeType;

}
function getValidTagName(tagName) {
var processedTagName = tagName.toLowerCase().trim();
function getValidTagName(element) {
if (element instanceof HTMLFormElement) {
return 'form';
}
var processedTagName = element.tagName.toLowerCase().trim();
if (tagNameRegex.test(processedTagName)) {

@@ -172,3 +175,3 @@ return 'div';

var needBlock = _isBlockedElement(n, blockClass, blockSelector);
var tagName = getValidTagName(n.tagName);
var tagName = getValidTagName(n);
var attributes_1 = {};

@@ -175,0 +178,0 @@ for (var _i = 0, _b = Array.from(n.attributes); _i < _b.length; _i++) {

import { __assign } from '../../node_modules/tslib/tslib.es6.js';
import { deflate as pako_deflate_1 } from '../../node_modules/pako/dist/pako_deflate.js';
import { strFromU8, zlibSync, strToU8 } from '../../node_modules/fflate/esm/browser.js';
import { MARK } from './base.js';

@@ -7,5 +7,5 @@

var _e = __assign(__assign({}, event), { v: MARK });
return pako_deflate_1(JSON.stringify(_e), { to: 'string' });
return strFromU8(zlibSync(strToU8(JSON.stringify(_e))), true);
};
export { pack };

@@ -0,3 +1,3 @@

import { strFromU8, unzlibSync, strToU8 } from '../../node_modules/fflate/esm/browser.js';
import { MARK } from './base.js';
import { inflate as pako_inflate_1 } from '../../node_modules/pako/dist/pako_inflate.js';

@@ -17,3 +17,3 @@ var unpack = function (raw) {

try {
var e = JSON.parse(pako_inflate_1(raw, { to: 'string' }));
var e = JSON.parse(strFromU8(unzlibSync(strToU8(raw, true))));
if (e.v === MARK) {

@@ -20,0 +20,0 @@ return e;

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

if (options === void 0) { options = {}; }
var emit = options.emit, checkoutEveryNms = options.checkoutEveryNms, checkoutEveryNth = options.checkoutEveryNth, _a = options.blockClass, blockClass = _a === void 0 ? 'rr-block' : _a, _b = options.blockSelector, blockSelector = _b === void 0 ? null : _b, _c = options.ignoreClass, ignoreClass = _c === void 0 ? 'rr-ignore' : _c, _d = options.inlineStylesheet, inlineStylesheet = _d === void 0 ? true : _d, maskAllInputs = options.maskAllInputs, _maskInputOptions = options.maskInputOptions, _slimDOMOptions = options.slimDOMOptions, maskInputFn = options.maskInputFn, hooks = options.hooks, packFn = options.packFn, _e = options.sampling, sampling = _e === void 0 ? {} : _e, mousemoveWait = options.mousemoveWait, _f = options.recordCanvas, recordCanvas = _f === void 0 ? false : _f, _g = options.collectFonts, collectFonts = _g === void 0 ? false : _g;
var emit = options.emit, checkoutEveryNms = options.checkoutEveryNms, checkoutEveryNth = options.checkoutEveryNth, _a = options.blockClass, blockClass = _a === void 0 ? 'rr-block' : _a, _b = options.blockSelector, blockSelector = _b === void 0 ? null : _b, _c = options.ignoreClass, ignoreClass = _c === void 0 ? 'rr-ignore' : _c, _d = options.inlineStylesheet, inlineStylesheet = _d === void 0 ? true : _d, maskAllInputs = options.maskAllInputs, _maskInputOptions = options.maskInputOptions, _slimDOMOptions = options.slimDOMOptions, maskInputFn = options.maskInputFn, hooks = options.hooks, packFn = options.packFn, _e = options.sampling, sampling = _e === void 0 ? {} : _e, mousemoveWait = options.mousemoveWait, _f = options.recordCanvas, recordCanvas = _f === void 0 ? false : _f, _g = options.collectFonts, collectFonts = _g === void 0 ? false : _g, _h = options.recordLog, recordLog = _h === void 0 ? false : _h;
if (!emit) {

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

: {};
var defaultLogOptions = {
level: [
'assert',
'clear',
'count',
'countReset',
'debug',
'dir',
'dirxml',
'error',
'group',
'groupCollapsed',
'groupEnd',
'info',
'log',
'table',
'time',
'timeEnd',
'timeLog',
'trace',
'warn',
],
lengthThreshold: 1000,
logger: console,
};
var logOptions = recordLog
? recordLog === true
? defaultLogOptions
: Object.assign({}, defaultLogOptions, recordLog)
: {};
polyfill();

@@ -205,2 +235,8 @@ var lastFullSnapshotEvent;

},
logCb: function (p) {
return wrappedEmit(wrapEvent({
type: EventType.IncrementalSnapshot,
data: __assign({ source: IncrementalSource.Log }, p),
}));
},
blockClass: blockClass,

@@ -216,2 +252,3 @@ blockSelector: blockSelector,

slimDOMOptions: slimDOMOptions,
logOptions: logOptions,
}, hooks));

@@ -218,0 +255,0 @@ };

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

import MutationBuffer from './mutation.js';
import { stringify } from './stringify.js';

@@ -366,4 +367,102 @@ var mutationBuffer = new MutationBuffer();

}
function initLogObserver(cb, logOptions) {
var e_2, _a;
var _this = this;
var logger = logOptions.logger;
if (!logger)
return function () { };
var logCount = 0;
var cancelHandlers = [];
if (logOptions.level.includes('error')) {
if (window) {
var originalOnError_1 = window.onerror;
window.onerror = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
originalOnError_1 && originalOnError_1.apply(_this, args);
var stack = [];
if (args[args.length - 1] instanceof Error)
stack = parseStack(args[args.length - 1].stack, 0);
var payload = [stringify(args[0], logOptions.stringifyOptions)];
cb({
level: 'error',
trace: stack,
payload: payload,
});
};
cancelHandlers.push(function () {
window.onerror = originalOnError_1;
});
}
}
try {
for (var _b = __values(logOptions.level), _c = _b.next(); !_c.done; _c = _b.next()) {
var levelType = _c.value;
cancelHandlers.push(replace(logger, levelType));
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_2) throw e_2.error; }
}
return function () {
cancelHandlers.forEach(function (h) { return h(); });
};
function replace(logger, level) {
var _this = this;
if (!logger[level])
return function () { };
return patch(logger, level, function (original) {
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
original.apply(_this, args);
try {
var stack = parseStack(new Error().stack);
var payload = args.map(function (s) {
return stringify(s, logOptions.stringifyOptions);
});
logCount++;
if (logCount < logOptions.lengthThreshold)
cb({
level: level,
trace: stack,
payload: payload,
});
else if (logCount === logOptions.lengthThreshold)
cb({
level: 'warn',
trace: [],
payload: [
stringify('The number of log records reached the threshold.'),
],
});
}
catch (error) {
original.apply(void 0, __spread(['rrweb logger error:', error], args));
}
};
});
}
function parseStack(stack, omitDepth) {
if (omitDepth === void 0) { omitDepth = 1; }
var stacks = [];
if (stack) {
stacks = stack
.split('at')
.splice(1 + omitDepth)
.map(function (s) { return s.trim(); });
}
return stacks;
}
}
function mergeHooks(o, hooks) {
var mutationCb = o.mutationCb, mousemoveCb = o.mousemoveCb, mouseInteractionCb = o.mouseInteractionCb, scrollCb = o.scrollCb, viewportResizeCb = o.viewportResizeCb, inputCb = o.inputCb, mediaInteractionCb = o.mediaInteractionCb, styleSheetRuleCb = o.styleSheetRuleCb, canvasMutationCb = o.canvasMutationCb, fontCb = o.fontCb;
var mutationCb = o.mutationCb, mousemoveCb = o.mousemoveCb, mouseInteractionCb = o.mouseInteractionCb, scrollCb = o.scrollCb, viewportResizeCb = o.viewportResizeCb, inputCb = o.inputCb, mediaInteractionCb = o.mediaInteractionCb, styleSheetRuleCb = o.styleSheetRuleCb, canvasMutationCb = o.canvasMutationCb, fontCb = o.fontCb, logCb = o.logCb;
o.mutationCb = function () {

@@ -469,2 +568,12 @@ var p = [];

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

@@ -486,2 +595,5 @@ function initObservers(o, hooks) {

var fontObserver = o.collectFonts ? initFontObserver(o.fontCb) : function () { };
var logObserver = o.logOptions
? initLogObserver(o.logCb, o.logOptions)
: function () { };
return function () {

@@ -498,2 +610,3 @@ mutationObserver.disconnect();

fontObserver();
logObserver();
};

@@ -500,0 +613,0 @@ }

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

};
var defaultLogConfig = {
level: [
'assert',
'clear',
'count',
'countReset',
'debug',
'dir',
'dirxml',
'error',
'group',
'groupCollapsed',
'groupEnd',
'info',
'log',
'table',
'time',
'timeEnd',
'timeLog',
'trace',
'warn',
],
replayLogger: undefined,
};
var Replayer = (function () {

@@ -48,4 +72,7 @@ function Replayer(events, config) {

mouseTail: defaultMouseTailConfig,
logConfig: defaultLogConfig,
};
this.config = Object.assign({}, defaultConfig, config);
if (!this.config.logConfig.replayLogger)
this.config.logConfig.replayLogger = this.getConsoleLogger();
this.handleResize = this.handleResize.bind(this);

@@ -156,2 +183,3 @@ this.getCastFn = this.getCastFn.bind(this);

_this.rebuildFullSnapshot(firstFullsnapshot);
_this.iframe.contentWindow.scrollTo(firstFullsnapshot.data.initialOffset);
}, 1);

@@ -411,3 +439,3 @@ }

finish_1();
}, Math.max(0, -event.data.positions[0].timeOffset));
}, Math.max(0, -event.data.positions[0].timeOffset + 50));
}

@@ -711,7 +739,11 @@ else {

var rule = _a.rule, index = _a.index;
var _index = index === undefined
? undefined
: Math.min(index, styleSheet_1.rules.length);
try {
styleSheet_1.insertRule(rule, _index);
var _index = index === undefined
? undefined
: Math.min(index, styleSheet_1.rules.length);
try {
styleSheet_1.insertRule(rule, _index);
}
catch (e) {
}
}

@@ -778,2 +810,15 @@ catch (e) {

}
case IncrementalSource.Log: {
try {
var logData_1 = e.data;
var replayLogger = this.config.logConfig.replayLogger;
if (typeof replayLogger[logData_1.level] === 'function')
replayLogger[logData_1.level](logData_1);
}
catch (error) {
if (this.config.showWarning) {
console.warn(error);
}
}
}
}

@@ -995,2 +1040,46 @@ };

};
Replayer.prototype.formatMessage = function (data) {
if (data.trace.length === 0)
return '';
var stackPrefix = '\n\tat ';
var result = stackPrefix;
result += data.trace.join(stackPrefix);
return result;
};
Replayer.prototype.getConsoleLogger = function () {
var e_8, _a;
var _this = this;
var rrwebOriginal = '__rrweb_original__';
var replayLogger = {};
var _loop_1 = function (level) {
if (level === 'trace')
replayLogger[level] = function (data) {
var logger = console.log[rrwebOriginal]
? console.log[rrwebOriginal]
: console.log;
logger.apply(void 0, __spread(data.payload.map(function (s) { return JSON.parse(s); }), [_this.formatMessage(data)]));
};
else
replayLogger[level] = function (data) {
var logger = console[level][rrwebOriginal]
? console[level][rrwebOriginal]
: console[level];
logger.apply(void 0, __spread(data.payload.map(function (s) { return JSON.parse(s); }), [_this.formatMessage(data)]));
};
};
try {
for (var _b = __values(this.config.logConfig.level), _c = _b.next(); !_c.done; _c = _b.next()) {
var level = _c.value;
_loop_1(level);
}
}
catch (e_8_1) { e_8 = { error: e_8_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_8) throw e_8.error; }
}
return replayLogger;
};
Replayer.prototype.legacy_resolveMissingNode = function (map, parent, target, targetMutation) {

@@ -1092,3 +1181,3 @@ var previousId = targetMutation.previousId, nextId = targetMutation.nextId;

Replayer.prototype.storeState = function (parent) {
var e_8, _a;
var e_9, _a;
if (parent) {

@@ -1109,3 +1198,3 @@ if (parent.nodeType === parent.ELEMENT_NODE) {

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

@@ -1115,3 +1204,3 @@ try {

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

@@ -1122,3 +1211,3 @@ }

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

@@ -1141,3 +1230,3 @@ var parentElement = parent;

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

@@ -1147,3 +1236,3 @@ try {

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

@@ -1150,0 +1239,0 @@ }

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

var _c;
console.warn('play');
var timer = ctx.timer, events = ctx.events, baselineTime = ctx.baselineTime, lastPlayedEvent = ctx.lastPlayedEvent;

@@ -100,0 +101,0 @@ timer.clear();

@@ -26,3 +26,4 @@ import { __spread } from '../../node_modules/tslib/tslib.es6.js';

var self = this;
function check(time) {
function check() {
var time = performance.now();
self.timeOffset += (time - lastTimestamp) * self.speed;

@@ -29,0 +30,0 @@ lastTimestamp = time;

@@ -23,2 +23,3 @@ var EventType;

IncrementalSource[IncrementalSource["Font"] = 10] = "Font";
IncrementalSource[IncrementalSource["Log"] = 11] = "Log";
})(IncrementalSource || (IncrementalSource = {}));

@@ -25,0 +26,0 @@ var MouseInteractions;

{
"name": "rrweb",
"version": "0.9.11",
"version": "0.9.12",
"description": "record and replay the web",

@@ -63,6 +63,6 @@ "scripts": {

"@xstate/fsm": "^1.4.0",
"fflate": "^0.4.4",
"mitt": "^1.1.3",
"pako": "^1.0.11",
"rrweb-snapshot": "^1.0.1"
}
}

@@ -45,2 +45,4 @@ import { Timer } from './timer';

private applyInput;
private formatMessage;
private getConsoleLogger;
private legacy_resolveMissingNode;

@@ -47,0 +49,0 @@ private moveAndHover;

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

/// <reference types="node" />
import { serializedNodeWithId, idNodeMap, INode, MaskInputOptions, SlimDOMOptions } from 'rrweb-snapshot';

@@ -42,2 +43,6 @@ import { PackFn, UnpackFn } from './packer/base';

};
export declare type logEvent = {
type: EventType.IncrementalSnapshot;
data: incrementalData;
};
export declare type customEvent<T = unknown> = {

@@ -62,3 +67,4 @@ type: EventType.Custom;

CanvasMutation = 9,
Font = 10
Font = 10,
Log = 11
}

@@ -97,4 +103,7 @@ export declare type mutationData = {

} & fontParam;
export declare type incrementalData = mutationData | mousemoveData | mouseInteractionData | scrollData | viewportResizeData | inputData | mediaInteractionData | styleSheetRuleData | canvasMutationData | fontData;
export declare type event = domContentLoadedEvent | loadedEvent | fullSnapshotEvent | incrementalSnapshotEvent | metaEvent | customEvent;
export declare type logData = {
source: IncrementalSource.Log;
} & LogParam;
export declare type incrementalData = mutationData | mousemoveData | mouseInteractionData | scrollData | viewportResizeData | inputData | mediaInteractionData | styleSheetRuleData | canvasMutationData | fontData | logData;
export declare type event = domContentLoadedEvent | loadedEvent | fullSnapshotEvent | incrementalSnapshotEvent | metaEvent | logEvent | customEvent;
export declare type eventWithTime = event & {

@@ -129,2 +138,3 @@ timestamp: number;

mousemoveWait?: number;
recordLog?: boolean | LogRecordOptions;
};

@@ -148,2 +158,4 @@ export declare type observerParam = {

fontCb: fontCallback;
logCb: logCallback;
logOptions: LogRecordOptions;
sampling: SamplingStrategy;

@@ -165,2 +177,3 @@ recordCanvas: boolean;

font?: fontCallback;
log?: logCallback;
};

@@ -270,3 +283,32 @@ export declare type mutationRecord = {

};
export declare type LogLevel = 'assert' | 'clear' | 'count' | 'countReset' | 'debug' | 'dir' | 'dirxml' | 'error' | 'group' | 'groupCollapsed' | 'groupEnd' | 'info' | 'log' | 'table' | 'time' | 'timeEnd' | 'timeLog' | 'trace' | 'warn';
export declare type Logger = {
assert?: (value: any, message?: string, ...optionalParams: any[]) => void;
clear?: () => void;
count?: (label?: string) => void;
countReset?: (label?: string) => void;
debug?: (message?: any, ...optionalParams: any[]) => void;
dir?: (obj: any, options?: NodeJS.InspectOptions) => void;
dirxml?: (...data: any[]) => void;
error?: (message?: any, ...optionalParams: any[]) => void;
group?: (...label: any[]) => void;
groupCollapsed?: (label?: any[]) => void;
groupEnd?: () => void;
info?: (message?: any, ...optionalParams: any[]) => void;
log?: (message?: any, ...optionalParams: any[]) => void;
table?: (tabularData: any, properties?: ReadonlyArray<string>) => void;
time?: (label?: string) => void;
timeEnd?: (label?: string) => void;
timeLog?: (label?: string, ...data: any[]) => void;
trace?: (message?: any, ...optionalParams: any[]) => void;
warn?: (message?: any, ...optionalParams: any[]) => void;
};
export declare type ReplayLogger = Partial<Record<LogLevel, (data: logData) => void>>;
export declare type LogParam = {
level: LogLevel;
trace: Array<string>;
payload: Array<string>;
};
export declare type fontCallback = (p: fontParam) => void;
export declare type logCallback = (p: LogParam) => void;
export declare type viewportResizeDimention = {

@@ -326,3 +368,8 @@ width: number;

unpackFn?: UnpackFn;
logConfig: LogReplayConfig;
};
export declare type LogReplayConfig = {
level?: Array<LogLevel> | undefined;
replayLogger: ReplayLogger | undefined;
};
export declare type playerMetaData = {

@@ -372,2 +419,12 @@ startTime: number;

};
export declare type StringifyOptions = {
stringLengthLimit?: number;
numOfKeysLimit: number;
};
export declare type LogRecordOptions = {
level?: Array<LogLevel> | undefined;
lengthThreshold?: number;
stringifyOptions?: StringifyOptions;
logger?: Logger;
};
export {};

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

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

Sorry, the diff of this file is not supported yet

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

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

Sorry, the diff of this file is not supported yet

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

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

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

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

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

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc