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.8.5 to 0.9.0

2

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

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

and limitations under the License.
***************************************************************************** */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"}(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"}(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 b(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 v(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,b),new w(4,5,16,8,b),new w(4,6,32,32,b),new w(4,4,16,16,v),new w(8,16,32,32,v),new w(8,16,128,128,v),new w(8,32,128,256,v),new w(32,128,258,1024,v),new w(32,258,258,4096,v)],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 b=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!==b&&4!==b||(r.status=666),1===b||3===b)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===b&&(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 b(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 v(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 A(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 B(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 C(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&&C(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!C(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){B(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 b(l,i,257,286,15),p=new b(_,s,0,30,15),g=new b(new Array(0),o,0,19,7)}(),j=!0),t.l_desc=new v(t.dyn_ltree,c),t.d_desc=new v(t.dyn_dtree,p),t.bl_desc=new v(t.bl_tree,g),t.bi_buf=0,t.bi_valid=0,A(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)),A(t),n&&B(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"})},t}({});
***************************************************************************** */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"}(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 b(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 v(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,b),new w(4,5,16,8,b),new w(4,6,32,32,b),new w(4,4,16,16,v),new w(8,16,32,32,v),new w(8,16,128,128,v),new w(8,32,128,256,v),new w(32,128,258,1024,v),new w(32,258,258,4096,v)],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 b=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!==b&&4!==b||(r.status=666),1===b||3===b)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===b&&(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 b(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 v(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 A(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 B(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 C(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&&C(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!C(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){B(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 b(l,i,257,286,15),p=new b(_,s,0,30,15),g=new b(new Array(0),o,0,19,7)}(),j=!0),t.l_desc=new v(t.dyn_ltree,c),t.d_desc=new v(t.dyn_dtree,p),t.bl_desc=new v(t.bl_tree,g),t.bi_buf=0,t.bi_valid=0,A(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)),A(t),n&&B(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"})},t}({});
//# sourceMappingURL=rrweb-record-pack.min.js.map

@@ -448,2 +448,3 @@ var rrwebRecord = (function () {

ReplayerEvents["Flush"] = "flush";
ReplayerEvents["StateChange"] = "state-change";
})(ReplayerEvents || (ReplayerEvents = {}));

@@ -450,0 +451,0 @@

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

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

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

and limitations under the License.
***************************************************************************** */var t,n=function(){return(n=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function i(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}!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 o=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function a(e,t){void 0===t&&(t={});var n=1,i=1;function r(e){var t=e.match(/\n/g);t&&(n+=t.length);var r=e.lastIndexOf("\n");i=-1===r?i+e.length:e.length-r}function a(){var e={line:n,column:i};return function(t){return t.position=new l(e),m(),t}}var l=function(e){this.start=e,this.end={line:n,column:i},this.source=t.source};l.prototype.content=e;var c=[];function u(r){var o=new Error(t.source+":"+n+":"+i+": "+r);if(o.reason=r,o.filename=t.source,o.line=n,o.column=i,o.source=e,!t.silent)throw o;c.push(o)}function f(){return p(/^{\s*/)}function d(){return p(/^}/)}function h(){var t,n=[];for(m(),v(n);e.length&&"}"!==e.charAt(0)&&(t=N()||I());)!1!==t&&(n.push(t),v(n));return n}function p(t){var n=t.exec(e);if(n){var i=n[0];return r(i),e=e.slice(i.length),n}}function m(){p(/^\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=a();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 o=e.slice(2,n-2);return i+=2,r(o),e=e.slice(n),i+=2,t({type:"comment",comment:o})}}function g(){var e=p(/^([^{]+)/);if(e)return s(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=a(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=s(t[0]);if(!p(/^:\s*/))return u("property missing ':'");var i=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:n.replace(o,""),value:i?s(i[0]).replace(o,""):""});return p(/^[;\s]*/),r}}function w(){var e,t=[];if(!f())return u("missing '{'");for(v(t);e=b();)!1!==e&&(t.push(e),v(t)),e=b();return d()?t:u("missing '}'")}function k(){for(var e,t=[],n=a();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:w()})}var x,_=M("import"),S=M("charset"),E=M("namespace");function M(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=a(),i=p(t);if(i){var r={type:e};return r[e]=i[1].trim(),n(r)}}}function N(){if("@"===e[0])return function(){var e=a(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=p(/^([-\w]+)\s*/)))return u("@keyframes missing name");var i,r=t[1];if(!f())return u("@keyframes missing '{'");for(var o=v();i=k();)o.push(i),o=o.concat(v());return d()?e({type:"keyframes",name:r,vendor:n,keyframes:o}):u("@keyframes missing '}'")}}()||function(){var e=a(),t=p(/^@media *([^{]+)/);if(t){var n=s(t[1]);if(!f())return u("@media missing '{'");var i=v().concat(h());return d()?e({type:"media",media:n,rules:i}):u("@media missing '}'")}}()||function(){var e=a(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:s(t[1]),media:s(t[2])})}()||function(){var e=a(),t=p(/^@supports *([^{]+)/);if(t){var n=s(t[1]);if(!f())return u("@supports missing '{'");var i=v().concat(h());return d()?e({type:"supports",supports:n,rules:i}):u("@supports missing '}'")}}()||_()||S()||E()||function(){var e=a(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var n=s(t[1]),i=s(t[2]);if(!f())return u("@document missing '{'");var r=v().concat(h());return d()?e({type:"document",document:i,vendor:n,rules:r}):u("@document missing '}'")}}()||function(){var e=a();if(p(/^@page */)){var t=g()||[];if(!f())return u("@page missing '{'");for(var n,i=v();n=b();)i.push(n),i=i.concat(v());return d()?e({type:"page",selectors:t,declarations:i}):u("@page missing '}'")}}()||function(){var e=a();if(p(/^@host\s*/)){if(!f())return u("@host missing '{'");var t=v().concat(h());return d()?e({type:"host",rules:t}):u("@host missing '}'")}}()||function(){var e=a();if(p(/^@font-face\s*/)){if(!f())return u("@font-face missing '{'");for(var t,n=v();t=b();)n.push(t),n=n.concat(v());return d()?e({type:"font-face",declarations:n}):u("@font-face missing '}'")}}()}function I(){var e=a(),t=g();return t?(v(),e({type:"rule",selectors:t,declarations:w()})):u("selector missing")}return function e(t,n){for(var i=t&&"string"==typeof t.type,r=i?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,r)})):l&&"object"==typeof l&&e(l,r)}i&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((x=h(),{type:"stylesheet",stylesheet:{source:t.source,rules:x,parsingErrors:c}}))}function s(e){return e?e.replace(/^\s+|\s+$/g,""):""}var l={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 c=/([^\\]):hover/g;function u(e){var t=a(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach((function(t){"selectors"in t&&(t.selectors||[]).forEach((function(t){if(c.test(t)){var n=t.replace(c,"$1.\\:hover");e=e.replace(t,t+", "+n)}}))})),e):e}function f(e,n,i){switch(e.type){case t.Document:return n.implementation.createDocument(null,"",null);case t.DocumentType:return n.implementation.createDocumentType(e.name,e.publicId,e.systemId);case t.Element:var r,o=function(e){var t=l[e.tagName]?l[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);r=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",o):n.createElement(o);var a=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var a=e.attributes[t];if(a="boolean"==typeof a?"":a,t.startsWith("rr_")){if("canvas"===o&&"rr_dataURL"===t){var s=document.createElement("img");s.src=a,s.onload=function(){var e=r.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(r.style.width=a),"rr_height"===t&&(r.style.height=a),"rr_mediaState"===t)switch(a){case"played":r.play();case"paused":r.pause()}}else{var l="textarea"===o&&"value"===t,c="style"===o&&"_cssText"===t;if(c&&i&&(a=u(a)),l||c){for(var f=n.createTextNode(a),d=0,h=Array.from(r.childNodes);d<h.length;d++){var p=h[d];p.nodeType===r.TEXT_NODE&&r.removeChild(p)}return r.appendChild(f),"continue"}if("iframe"===o&&"src"===t)return"continue";try{e.isSVG&&"xlink:href"===t?r.setAttributeNS("http://www.w3.org/1999/xlink",t,a):"onload"==t||"onclick"==t||"onmouse"==t.substring(0,7)?r.setAttribute("_"+t,a):r.setAttribute(t,a)}catch(e){}}};for(var s in e.attributes)a(s);return r;case t.Text:return n.createTextNode(e.isStyle&&i?u(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function d(e,n,i,r,o){void 0===r&&(r=!1),void 0===o&&(o=!0);var a=f(e,n,o);if(!a)return null;if(e.type===t.Document&&(n.close(),n.open(),a=n),a.__sn=e,i[e.id]=a,(e.type===t.Document||e.type===t.Element)&&!r)for(var s=0,l=e.childNodes;s<l.length;s++){var c=l[s],u=d(c,n,i,!1,o);u?a.appendChild(u):console.warn("Failed to rebuild",c)}return a}function h(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 p=Object.freeze({__proto__:null,default:h});function m(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function v(e,t){return e(t={exports:{}},t.exports),t.exports}var y,g,b,w,k,x=v((function(e,t){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,i=e.HTMLElement||e.Element,r={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:i.prototype.scroll||s,scrollIntoView:i.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])?p.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):r.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])?r.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):p.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;p.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");r.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)}},i.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}):r.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))},i.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=d(this),i=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(p.call(this,n,n.scrollLeft+o.left-i.left,n.scrollTop+o.top-i.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else r.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 i=e.getComputedStyle(t,null)["overflow"+n];return"auto"===i||"scroll"===i}function f(e){var t=c(e,"Y")&&u(e,"Y"),n=c(e,"X")&&u(e,"X");return t||n}function d(e){for(;e!==t.body&&!1===f(e);)e=e.parentNode||e.host;return e}function h(t){var n,i,r,a,s=(o()-t.startTime)/468;a=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*a)),i=t.startX+(t.x-t.startX)*n,r=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,i,r),i===t.x&&r===t.y||e.requestAnimationFrame(h.bind(e,t))}function p(n,i,a){var l,c,u,f,d=o();n===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,f=r.scroll):(l=n,c=n.scrollLeft,u=n.scrollTop,f=s),h({scrollable:l,method:f,startTime:d,startX:c,startY:u,x:i,y:a})}}}})).polyfill;!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom"}(y||(y={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule"}(g||(g={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(b||(b={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(w||(w={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush"}(k||(k={}));var _,S=function(){function e(e,t){void 0===t&&(t=[]),this.timeOffset=0,this.actions=t,this.config=e}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){var t;(t=this.actions).push.apply(t,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e}(e))},e.prototype.start=function(){this.actions.sort((function(e,t){return e.delay-t.delay})),this.timeOffset=0;var e=performance.now(),t=this.actions,n=this.config,i=this;this.raf=requestAnimationFrame((function r(o){for(i.timeOffset+=(o-e)*n.speed,e=o;t.length;){var a=t[0];if(!(i.timeOffset>=a.delay))break;t.shift(),a.doAction()}(t.length>0||i.config.liveMode)&&(i.raf=requestAnimationFrame(r))}))},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},e.prototype.findActionIndex=function(e){for(var t=0,n=this.actions.length-1;t<=n;){var i=Math.floor((t+n)/2);if(this.actions[i].delay<e.delay)t=i+1;else{if(!(this.actions[i].delay>e.delay))return i;n=i-1}}return t},e}();function E(e,t){if(e.type===y.IncrementalSnapshot&&e.data.source===g.MouseMove){var n=e.data.positions[0].timeOffset,i=e.timestamp+n;return e.delay=i-t,i-t}return e.delay=e.timestamp-t,e.timestamp-t}
***************************************************************************** */var t,n=function(){return(n=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function i(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}!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 o=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function a(e,t){void 0===t&&(t={});var n=1,i=1;function r(e){var t=e.match(/\n/g);t&&(n+=t.length);var r=e.lastIndexOf("\n");i=-1===r?i+e.length:e.length-r}function a(){var e={line:n,column:i};return function(t){return t.position=new l(e),m(),t}}var l=function(e){this.start=e,this.end={line:n,column:i},this.source=t.source};l.prototype.content=e;var c=[];function u(r){var o=new Error(t.source+":"+n+":"+i+": "+r);if(o.reason=r,o.filename=t.source,o.line=n,o.column=i,o.source=e,!t.silent)throw o;c.push(o)}function f(){return p(/^{\s*/)}function d(){return p(/^}/)}function h(){var t,n=[];for(m(),v(n);e.length&&"}"!==e.charAt(0)&&(t=M()||T());)!1!==t&&(n.push(t),v(n));return n}function p(t){var n=t.exec(e);if(n){var i=n[0];return r(i),e=e.slice(i.length),n}}function m(){p(/^\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=a();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 o=e.slice(2,n-2);return i+=2,r(o),e=e.slice(n),i+=2,t({type:"comment",comment:o})}}function g(){var e=p(/^([^{]+)/);if(e)return s(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=a(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=s(t[0]);if(!p(/^:\s*/))return u("property missing ':'");var i=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:n.replace(o,""),value:i?s(i[0]).replace(o,""):""});return p(/^[;\s]*/),r}}function w(){var e,t=[];if(!f())return u("missing '{'");for(v(t);e=b();)!1!==e&&(t.push(e),v(t)),e=b();return d()?t:u("missing '}'")}function x(){for(var e,t=[],n=a();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:w()})}var k,_=N("import"),S=N("charset"),E=N("namespace");function N(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=a(),i=p(t);if(i){var r={type:e};return r[e]=i[1].trim(),n(r)}}}function M(){if("@"===e[0])return function(){var e=a(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=p(/^([-\w]+)\s*/)))return u("@keyframes missing name");var i,r=t[1];if(!f())return u("@keyframes missing '{'");for(var o=v();i=x();)o.push(i),o=o.concat(v());return d()?e({type:"keyframes",name:r,vendor:n,keyframes:o}):u("@keyframes missing '}'")}}()||function(){var e=a(),t=p(/^@media *([^{]+)/);if(t){var n=s(t[1]);if(!f())return u("@media missing '{'");var i=v().concat(h());return d()?e({type:"media",media:n,rules:i}):u("@media missing '}'")}}()||function(){var e=a(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:s(t[1]),media:s(t[2])})}()||function(){var e=a(),t=p(/^@supports *([^{]+)/);if(t){var n=s(t[1]);if(!f())return u("@supports missing '{'");var i=v().concat(h());return d()?e({type:"supports",supports:n,rules:i}):u("@supports missing '}'")}}()||_()||S()||E()||function(){var e=a(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var n=s(t[1]),i=s(t[2]);if(!f())return u("@document missing '{'");var r=v().concat(h());return d()?e({type:"document",document:i,vendor:n,rules:r}):u("@document missing '}'")}}()||function(){var e=a();if(p(/^@page */)){var t=g()||[];if(!f())return u("@page missing '{'");for(var n,i=v();n=b();)i.push(n),i=i.concat(v());return d()?e({type:"page",selectors:t,declarations:i}):u("@page missing '}'")}}()||function(){var e=a();if(p(/^@host\s*/)){if(!f())return u("@host missing '{'");var t=v().concat(h());return d()?e({type:"host",rules:t}):u("@host missing '}'")}}()||function(){var e=a();if(p(/^@font-face\s*/)){if(!f())return u("@font-face missing '{'");for(var t,n=v();t=b();)n.push(t),n=n.concat(v());return d()?e({type:"font-face",declarations:n}):u("@font-face missing '}'")}}()}function T(){var e=a(),t=g();return t?(v(),e({type:"rule",selectors:t,declarations:w()})):u("selector missing")}return function e(t,n){for(var i=t&&"string"==typeof t.type,r=i?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,r)})):l&&"object"==typeof l&&e(l,r)}i&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((k=h(),{type:"stylesheet",stylesheet:{source:t.source,rules:k,parsingErrors:c}}))}function s(e){return e?e.replace(/^\s+|\s+$/g,""):""}var l={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 c=/([^\\]):hover/g;function u(e){var t=a(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach((function(t){"selectors"in t&&(t.selectors||[]).forEach((function(t){if(c.test(t)){var n=t.replace(c,"$1.\\:hover");e=e.replace(t,t+", "+n)}}))})),e):e}function f(e,n,i){switch(e.type){case t.Document:return n.implementation.createDocument(null,"",null);case t.DocumentType:return n.implementation.createDocumentType(e.name,e.publicId,e.systemId);case t.Element:var r,o=function(e){var t=l[e.tagName]?l[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);r=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",o):n.createElement(o);var a=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var a=e.attributes[t];if(a="boolean"==typeof a?"":a,t.startsWith("rr_")){if("canvas"===o&&"rr_dataURL"===t){var s=document.createElement("img");s.src=a,s.onload=function(){var e=r.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(r.style.width=a),"rr_height"===t&&(r.style.height=a),"rr_mediaState"===t)switch(a){case"played":r.play();case"paused":r.pause()}}else{var l="textarea"===o&&"value"===t,c="style"===o&&"_cssText"===t;if(c&&i&&(a=u(a)),l||c){for(var f=n.createTextNode(a),d=0,h=Array.from(r.childNodes);d<h.length;d++){var p=h[d];p.nodeType===r.TEXT_NODE&&r.removeChild(p)}return r.appendChild(f),"continue"}if("iframe"===o&&"src"===t)return"continue";try{e.isSVG&&"xlink:href"===t?r.setAttributeNS("http://www.w3.org/1999/xlink",t,a):"onload"==t||"onclick"==t||"onmouse"==t.substring(0,7)?r.setAttribute("_"+t,a):r.setAttribute(t,a)}catch(e){}}};for(var s in e.attributes)a(s);return r;case t.Text:return n.createTextNode(e.isStyle&&i?u(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function d(e,n,i,r,o){void 0===r&&(r=!1),void 0===o&&(o=!0);var a=f(e,n,o);if(!a)return null;if(e.type===t.Document&&(n.close(),n.open(),a=n),a.__sn=e,i[e.id]=a,(e.type===t.Document||e.type===t.Element)&&!r)for(var s=0,l=e.childNodes;s<l.length;s++){var c=l[s],u=d(c,n,i,!1,o);u?a.appendChild(u):console.warn("Failed to rebuild",c)}return a}function h(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 p=Object.freeze({__proto__:null,default:h});function m(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function v(e,t){return e(t={exports:{}},t.exports),t.exports}var y,g,b,w,x,k=v((function(e,t){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,i=e.HTMLElement||e.Element,r={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:i.prototype.scroll||s,scrollIntoView:i.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])?p.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):r.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])?r.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):p.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;p.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");r.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)}},i.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}):r.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))},i.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=d(this),i=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(p.call(this,n,n.scrollLeft+o.left-i.left,n.scrollTop+o.top-i.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else r.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 i=e.getComputedStyle(t,null)["overflow"+n];return"auto"===i||"scroll"===i}function f(e){var t=c(e,"Y")&&u(e,"Y"),n=c(e,"X")&&u(e,"X");return t||n}function d(e){for(;e!==t.body&&!1===f(e);)e=e.parentNode||e.host;return e}function h(t){var n,i,r,a,s=(o()-t.startTime)/468;a=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*a)),i=t.startX+(t.x-t.startX)*n,r=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,i,r),i===t.x&&r===t.y||e.requestAnimationFrame(h.bind(e,t))}function p(n,i,a){var l,c,u,f,d=o();n===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,f=r.scroll):(l=n,c=n.scrollLeft,u=n.scrollTop,f=s),h({scrollable:l,method:f,startTime:d,startX:c,startY:u,x:i,y:a})}}}})).polyfill;!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom"}(y||(y={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule"}(g||(g={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(b||(b={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(w||(w={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change"}(x||(x={}));var _,S=function(){function e(e,t){void 0===e&&(e=[]),this.timeOffset=0,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,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e}(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 i(r){for(n.timeOffset+=(r-e)*n.speed,e=r;t.length;){var o=t[0];if(!(n.timeOffset>=o.delay))break;t.shift(),o.doAction()}(t.length>0||n.liveMode)&&(n.raf=requestAnimationFrame(i))}))},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},e.prototype.setSpeed=function(e){this.speed=e},e.prototype.toggleLiveMode=function(e){this.liveMode=e},e.prototype.findActionIndex=function(e){for(var t=0,n=this.actions.length-1;t<=n;){var i=Math.floor((t+n)/2);if(this.actions[i].delay<e.delay)t=i+1;else{if(!(this.actions[i].delay>e.delay))return i;n=i-1}}return t},e}();function E(e,t){if(e.type===y.IncrementalSnapshot&&e.data.source===g.MouseMove){var n=e.data.positions[0].timeOffset,i=e.timestamp+n;return e.delay=i-t,i-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"}(_||(_={}));var M={type:"xstate.init"};function N(e){return void 0===e?[]:[].concat(e)}function I(e){return{type:"xstate.assign",assignment:e}}function T(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 C(e){return"string"==typeof e?{type:e}:e}function O(e,t){return{value:e,context:t,actions:[],changed:!1,matches:A(e)}}var R=function(e,t){return e.actions.forEach((function(n){var i=n.exec;return i&&i(e.context,t)}))};var F={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return F.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete F.map[t],e.childNodes&&e.childNodes.forEach((function(e){return F.removeNodeFromMap(e)}))},has:function(e){return F.map.hasOwnProperty(e)}};var D=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),i=this.indexes.get(e.id),r=function(e){t.removeIdSet.add(e);var n=F.getNode(e);null==n||n.childNodes.forEach((function(e){return r(e.__sn.id)}))},o=function(n){t.removeIdSet.add(n.id),Object.values(n.children).forEach((function(e){return o(e)}));var i=t.indexes.get(n.id);if(i){var r=i.parent;r&&(delete i.parent,delete r.children[i.id],t.indexes.delete(e.id))}};i?n?(delete i.parent,delete n.children[i.id],this.indexes.delete(e.id),o(i)):(delete this.tree[i.id],this.indexes.delete(i.id),o(i)):(this.removeNodeMutations.push(e),r(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,r,o=this,a=this.tree,s=this.removeNodeMutations,l=this.textMutations,c=this.attributeMutations,u={source:g.Mutation,removes:s,texts:l,attributes:c,adds:[]},f=function(e,t){t&&o.removeIdSet.add(e.id),u.texts=u.texts.concat(t?[]:e.texts).filter((function(e){return!o.removeIdSet.has(e.id)})),u.attributes=u.attributes.concat(t?[]:e.attributes).filter((function(e){return!o.removeIdSet.has(e.id)})),o.removeIdSet.has(e.id)||o.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return f(e,!0)})):(u.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return f(e,!1)})))};Object.values(a).forEach((function(e){return f(e,!1)}));try{for(var d=i(this.scrollMap.keys()),h=d.next();!h.done;h=d.next()){var p=h.value;this.removeIdSet.has(p)&&this.scrollMap.delete(p)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var m=i(this.inputMap.keys()),v=m.next();!v.done;v=m.next()){p=v.value;this.removeIdSet.has(p)&&this.inputMap.delete(p)}}catch(e){n={error:e}}finally{try{v&&!v.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}var y=new Map(this.scrollMap),b=new Map(this.inputMap);return this.reset(),{mutationData:u,scrollMap:y,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 L(e,t){var r=t.getCastFn,o=t.emitter;return function(e){var t=e.initialState,n=_.NotStarted,i=new Set,r={_machine:e,send:function(r){n===_.Running&&(t=e.transition(t,r),R(t,C(r)),i.forEach((function(e){return e(t)})))},subscribe:function(e){return i.add(e),e(t),{unsubscribe:function(){return i.delete(e)}}},start:function(){return n=_.Running,R(t,M),r},stop:function(){return n=_.Stopped,i.clear(),r},get state(){return t},get status(){return n}};return r}(function(e,t){void 0===t&&(t={});var n={config:e,_options:t,initialState:{value:e.initial,actions:N(e.states[e.initial].entry).map((function(e){return T(e,t.actions)})),context:e.context,matches:A(e.initial)},transition:function(t,i){var r,o,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,l=a.context,c=C(i),u=e.states[s];if(u.on){var f=N(u.on[c.type]),d=function(t){if(void 0===t)return{value:O(s,l)};var i="string"==typeof t?{target:t}:t,r=i.target,o=void 0===r?s:r,a=i.actions,f=void 0===a?[]:a,d=i.cond,h=l;if((void 0===d?function(){return!0}:d)(l,c)){var p=e.states[o],m=!1,v=[].concat(u.exit,f,p.entry).filter((function(e){return e})).map((function(e){return T(e,n._options.actions)})).filter((function(e){if("xstate.assign"===e.type){m=!0;var t=Object.assign({},h);return"function"==typeof e.assignment?t=e.assignment(h,c):Object.keys(e.assignment).forEach((function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](h,c):e.assignment[n]})),h=t,!1}return!0}));return{value:{value:o,context:h,actions:v,changed:o!==s||v.length>0||m,matches:A(o)}}}};try{for(var h=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}}}}(f),p=h.next();!p.done;p=h.next()){var m=d(p.value);if("object"==typeof m)return m.value}}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}}return O(s,l)}};return n}({id:"player",context:e,initial:"inited",states:{inited:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},TO_LIVE:{target:"live",actions:["startLive"]}}},playing:{on:{PAUSE:{target:"paused",actions:["pause"]},END:"ended",FAST_FORWARD:"skipping",CAST_EVENT:{target:"playing",actions:"castEvent"}}},paused:{on:{RESUME:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"}}},skipping:{on:{BACK_TO_NORMAL:"playing"}},ended:{on:{REPLAY:"playing"}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]}}}}},{actions:{castEvent:I({lastPlayedEvent:function(t,n){return"CAST_EVENT"===n.type?n.payload.event:e.lastPlayedEvent}}),recordTimeOffset:I((function(e,t){var i=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(i=t.payload.timeOffset),n(n({},e),{timeOffset:i,baselineTime:e.events[0].timestamp+i})})),play:function(e){var t,n,a=e.timer,s=e.events,l=e.baselineTime,c=e.lastPlayedEvent;a.clear();var u=function(e,t){for(var n=e.length-1;n>=0;n--){var i=e[n];if(i.type===y.Meta&&i.timestamp<=t)return e.slice(n)}return e}(s,l),f=new Array,d=function(e){if(c&&c.timestamp>l&&(e.timestamp<=c.timestamp||e===c))return"continue";var t=e.timestamp<l;if(t&&!function(e){switch(e.type){case y.DomContentLoaded:case y.Load:case y.Custom:return!1;case y.FullSnapshot:case y.Meta:return!0}switch(e.data.source){case g.MouseMove:case g.MouseInteraction:case g.TouchMove:case g.MediaInteraction:return!1;case g.ViewportResize:case g.StyleSheetRule:case g.Scroll:case g.Input:return!0}return!0}(e))return"continue";var n=r(e,t);t?n():f.push({doAction:function(){n(),o.emit(k.EventCast,e)},delay:E(e,l)})};try{for(var h=i(u),p=h.next();!p.done;p=h.next()){d(p.value)}}catch(e){t={error:e}}finally{try{p&&!p.done&&(n=h.return)&&n.call(h)}finally{if(t)throw t.error}}o.emit(k.Flush),a.addActions(f),a.start()},pause:function(e){e.timer.clear()},startLive:I({baselineTime:function(e,t){return e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:I((function(e,t){var i=e.baselineTime,a=e.timer,s=e.events;if("ADD_EVENT"===t.type){var l=t.payload.event;s.push(l);var c=l.timestamp<i,u=r(l,c);c?u():a.addAction({doAction:function(){u(),o.emit(k.EventCast,l)},delay:E(l,i)})}return n(n({},e),{events:s})}))}}))}var B=h||p,z={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0},Z=function(){function e(e,n){var o=this;if(this.emitter=B(),this.noramlSpeed=-1,this.legacy_missingNodeRetryMap={},!(null==n?void 0:n.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");this.config=Object.assign({},z,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on(k.Resize,this.handleResize),x(),"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),this.setupDom(),this.treeIndex=new D,this.fragmentParentMap=new Map,this.emitter.on(k.Flush,(function(){var e,n,a,s,l,c,u=o.treeIndex.flush(),f=u.scrollMap,d=u.inputMap;try{for(var h=i(f.values()),p=h.next();!p.done;p=h.next()){var m=p.value;o.applyScroll(m)}}catch(t){e={error:t}}finally{try{p&&!p.done&&(n=h.return)&&n.call(h)}finally{if(e)throw e.error}}try{for(var v=i(d.values()),y=v.next();!y.done;y=v.next()){m=y.value;o.applyInput(m)}}catch(e){a={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}try{for(var g=i(o.fragmentParentMap.entries()),b=g.next();!b.done;b=g.next()){var w=r(b.value,2),k=w[0],x=w[1];F.map[x.__sn.id]=x,x.__sn.type===t.Element&&"textarea"===x.__sn.tagName&&k.textContent&&(x.value=k.textContent),x.appendChild(k)}}catch(e){l={error:e}}finally{try{b&&!b.done&&(c=g.return)&&c.call(g)}finally{if(l)throw l.error}}o.fragmentParentMap.clear()})),this.service=L({events:e.map((function(e){return n&&n.unpackFn?n.unpackFn(e):e})),timer:new S(this.config),speed:(null==n?void 0:n.speed)||z.speed,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){e.changed}));var a=this.service.state.context.events,s=a.find((function(e){return e.type===y.Meta})),l=a.find((function(e){return e.type===y.FullSnapshot}));if(s){var c=s.data,u=c.width,f=c.height;this.emitter.emit(k.Resize,{width:u,height:f})}l&&this.rebuildFullSnapshot(l)}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){this.emitter.on(e,t)},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(n){t.config[n]=e[n]})),this.config.skipInactive||(this.noramlSpeed=-1)},e.prototype.getMetaData=function(){var e=this.service.state.context.events,t=e[0],n=e[e.length-1];return{startTime:t.timestamp,endTime:n.timestamp,totalTime:n.timestamp-t.timestamp}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},e.prototype.play=function(e){void 0===e&&(e=0),"ended"===this.service.state.value&&this.service.send({type:"REPLAY"}),"paused"===this.service.state.value?this.service.send({type:"RESUME",payload:{timeOffset:e}}):this.service.send({type:"PLAY",payload:{timeOffset:e}}),this.emitter.emit(k.Start)},e.prototype.pause=function(){this.service.send({type:"PAUSE"}),this.emitter.emit(k.Pause)},e.prototype.resume=function(e){void 0===e&&(e=0),this.service.send({type:"RESUME",payload:{timeOffset:e}}),this.emitter.emit(k.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),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.disableInteract(),this.wrapper.appendChild(this.iframe)},e.prototype.handleResize=function(e){this.iframe.setAttribute("width",String(e.width)),this.iframe.setAttribute("height",String(e.height))},e.prototype.getCastFn=function(e,t){var n=this;void 0===t&&(t=!1);var r,o=this.service.state.context.events;switch(e.type){case y.DomContentLoaded:case y.Load:break;case y.Custom:r=function(){n.emitter.emit(k.CustomEvent,e)};break;case y.Meta:r=function(){return n.emitter.emit(k.Resize,{width:e.data.width,height:e.data.height})};break;case y.FullSnapshot:r=function(){n.rebuildFullSnapshot(e),n.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case y.IncrementalSnapshot:r=function(){var r,a;if(n.applyIncremental(e,t),e===n.nextUserInteractionEvent&&(n.nextUserInteractionEvent=null,n.restoreSpeed()),n.config.skipInactive&&!n.nextUserInteractionEvent){try{for(var s=i(o),l=s.next();!l.done;l=s.next()){var c=l.value;if(!(c.timestamp<=e.timestamp)&&n.isUserInteraction(c)){c.delay-e.delay>1e4*n.config.speed&&(n.nextUserInteractionEvent=c);break}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(r)throw r.error}}if(n.nextUserInteractionEvent){n.noramlSpeed=n.config.speed;var u=n.nextUserInteractionEvent.delay-e.delay,f={speed:Math.min(Math.round(u/5e3),360)};n.setConfig(f),n.emitter.emit(k.SkipStart,f)}}}}return function(){r&&r(),n.service.send({type:"CAST_EVENT",payload:{event:e}}),e===o[o.length-1]&&(n.restoreSpeed(),n.service.send("END"),n.emitter.emit(k.Finish))}},e.prototype.rebuildFullSnapshot=function(e){if(!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={},F.map=function(e,t,n){void 0===n&&(n=!0);var i={};return[d(e,t,i,!1,n),i]}(e.data.node,this.iframe.contentDocument)[1];var t=document.createElement("style"),n=this.iframe.contentDocument,i=n.documentElement,r=n.head;i.insertBefore(t,r);for(var o,a=(o=this.config.blockClass,["iframe, ."+o+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules),s=0;s<a.length;s++)t.sheet.insertRule(a[s],s);this.emitter.emit(k.FullsnapshotRebuilded,e),this.waitForStylesheetLoad()},e.prototype.waitForStylesheetLoad=function(){var e,t=this,n=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(n){var i,r=new Set,o=this.service.state;n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(r.add(e),e.addEventListener("load",(function(){r.delete(e),0===r.size&&-1!==i&&(o.matches("playing")&&t.resume(t.getCurrentTime()),t.emitter.emit(k.LoadStylesheetEnd),i&&window.clearTimeout(i))})))})),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(k.LoadStylesheetStart),i=window.setTimeout((function(){o.matches("playing")&&t.resume(t.getCurrentTime()),i=-1}),this.config.loadTimeout))}},e.prototype.applyIncremental=function(e,t){var n=this,i=this.service.state.context.baselineTime,r=e.data;switch(r.source){case g.Mutation:t&&(r.adds.forEach((function(e){return n.treeIndex.add(e)})),r.texts.forEach((function(e){return n.treeIndex.text(e)})),r.attributes.forEach((function(e){return n.treeIndex.attribute(e)})),r.removes.forEach((function(e){return n.treeIndex.remove(e)}))),this.applyMutation(r,t);break;case g.MouseMove:if(t){var o=r.positions[r.positions.length-1];this.moveAndHover(r,o.x,o.y,o.id)}else r.positions.forEach((function(t){var o={doAction:function(){n.moveAndHover(r,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-i};n.timer.addAction(o)}));break;case g.MouseInteraction:if(-1===r.id)break;var a=new Event(b[r.type].toLowerCase());if(!(c=F.getNode(r.id)))return this.debugNodeNotFound(r,r.id);this.emitter.emit(k.MouseInteraction,{type:r.type,target:c});var s=this.config.triggerFocus;switch(r.type){case b.Blur:"blur"in c&&c.blur();break;case b.Focus:s&&c.focus&&c.focus({preventScroll:!0});break;case b.Click:case b.TouchStart:case b.TouchEnd:t||(this.moveAndHover(r,r.x,r.y,r.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:c.dispatchEvent(a)}break;case g.Scroll:if(-1===r.id)break;if(t){this.treeIndex.scroll(r);break}this.applyScroll(r);break;case g.ViewportResize:this.emitter.emit(k.Resize,{width:r.width,height:r.height});break;case g.Input:if(-1===r.id)break;if(t){this.treeIndex.input(r);break}this.applyInput(r);break;case g.MediaInteraction:if(!(c=F.getNode(r.id)))return this.debugNodeNotFound(r,r.id);var l=c;r.type===w.Pause&&l.pause(),r.type===w.Play&&(l.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?l.play():l.addEventListener("canplay",(function(){l.play()})));break;case g.StyleSheetRule:var c;if(!(c=F.getNode(r.id)))return this.debugNodeNotFound(r,r.id);var u=c.sheet;r.adds&&r.adds.forEach((function(e){var t=e.rule,n=e.index,i=void 0===n?void 0:Math.min(n,u.rules.length);try{u.insertRule(t,i)}catch(e){}})),r.removes&&r.removes.forEach((function(e){var t=e.index;u.deleteRule(t)}))}},e.prototype.applyMutation=function(e,t){var i=this;e.removes.forEach((function(t){var n=F.getNode(t.id);if(!n)return i.warnNodeNotFound(e,t.id);var r=F.getNode(t.parentId);if(!r)return i.warnNodeNotFound(e,t.parentId);if(F.removeNodeFromMap(n),r){var o=i.fragmentParentMap.get(r);o&&o.contains(n)?o.removeChild(n):r.removeChild(n)}}));var r=n({},this.legacy_missingNodeRetryMap),o=[],a=function(e){if(!i.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var n=F.getNode(e.parentId);if(!n)return o.push(e);var a=i.iframe.contentDocument.contains(n);if(t&&a){var s=document.createDocumentFragment();for(F.map[e.parentId]=s,i.fragmentParentMap.set(s,n);n.firstChild;)s.appendChild(n.firstChild);n=s}var l=null,c=null;if(e.previousId&&(l=F.getNode(e.previousId)),e.nextId&&(c=F.getNode(e.nextId)),null!==e.nextId&&-1!==e.nextId&&!c)return o.push(e);var u=d(e.node,i.iframe.contentDocument,F.map,!0);-1!==e.previousId&&-1!==e.nextId?(l&&l.nextSibling&&l.nextSibling.parentNode?n.insertBefore(u,l.nextSibling):c&&c.parentNode?n.contains(c)?n.insertBefore(u,c):n.insertBefore(u,null):n.appendChild(u),(e.previousId||e.nextId)&&i.legacy_resolveMissingNode(r,n,u,e)):r[e.node.id]={node:u,mutation:e}};for(e.adds.forEach((function(e){a(e)}));o.length;){if(o.every((function(e){return!Boolean(F.getNode(e.parentId))})))return o.forEach((function(t){return i.warnNodeNotFound(e,t.node.id)}));var s=o.shift();a(s)}Object.keys(r).length&&Object.assign(this.legacy_missingNodeRetryMap,r),e.texts.forEach((function(t){var n=F.getNode(t.id);if(!n)return i.warnNodeNotFound(e,t.id);i.fragmentParentMap.has(n)&&(n=i.fragmentParentMap.get(n)),n.textContent=t.value})),e.attributes.forEach((function(t){var n=F.getNode(t.id);if(!n)return i.warnNodeNotFound(e,t.id);for(var r in i.fragmentParentMap.has(n)&&(n=i.fragmentParentMap.get(n)),t.attributes)if("string"==typeof r){var o=t.attributes[r];null!==o?n.setAttribute(r,o):n.removeAttribute(r)}}))},e.prototype.applyScroll=function(e){var t=F.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=F.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,i){var r=i.previousId,o=i.nextId,a=r&&e[r],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 f=s;c=f.node,u=f.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,i){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px";var r=F.getNode(i);if(!r)return this.debugNodeNotFound(e,i);this.hoverElements(r)},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===y.IncrementalSnapshot&&(e.data.source>g.Mutation&&e.data.source<=g.Input)},e.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var e={speed:this.noramlSpeed};this.setConfig(e),this.emitter.emit(k.SkipEnd,e),this.noramlSpeed=-1}},e.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn("[replayer]","Node with id '"+t+"' not found in",e)},e.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log("[replayer]","Node with id '"+t+"' not found in",e)},e}(),P=v((function(e,t){e.exports=function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){if(!s&&m)return m();if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return r(t[a][1][e]||e)}),c,c.exports,e,t,n,i)}return n[a].exports}for(var o=m,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,n,i,r){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+i),r);else for(var o=0;o<i;o++)e[r+o]=t[n+o]},flattenChunks:function(e){var t,n,i,r,o,a;for(i=0,t=0,n=e.length;t<n;t++)i+=e[t].length;for(a=new Uint8Array(i),r=0,t=0,n=e.length;t<n;t++)o=e[t],a.set(o,r),r+=o.length;return a}},a={arraySet:function(e,t,n,i,r){for(var o=0;o<i;o++)e[r+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,o)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,a))},n.setTyped(i)},{}],2:[function(e,t,n){var i=e("./common"),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var a=new i.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&o||!e.subarray&&r))return String.fromCharCode.apply(null,i.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,n.string2buf=function(e){var t,n,r,o,a,s=e.length,l=0;for(o=0;o<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new i.Buf8(l),a=0,o=0;a<l;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new i.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,i,r,o,s=t||e.length,c=new Array(2*s);for(i=0,n=0;n<s;)if((r=e[n++])<128)c[i++]=r;else if((o=a[r])>4)c[i++]=65533,n+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&n<s;)r=r<<6|63&e[n++],o--;o>1?c[i++]=65533:r<65536?c[i++]=r:(r-=65536,c[i++]=55296|r>>10&1023,c[i++]=56320|1023&r)}return l(c,i)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":1}],3:[function(e,t,n){t.exports=function(e,t,n,i){for(var r=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(r=r+t[i++]|0)|0}while(--a);r%=65521,o%=65521}return r|o<<16|0}},{}],4:[function(e,t,n){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,n){var i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,r){var o=i,a=r+n;e^=-1;for(var s=r;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}},{}],6:[function(e,t,n){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],7:[function(e,t,n){t.exports=function(e,t){var n,i,r,o,a,s,l,c,u,f,d,h,p,m,v,y,g,b,w,k,x,_,S,E,M;n=e.state,i=e.next_in,E=e.input,r=i+(e.avail_in-5),o=e.next_out,M=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),l=n.dmax,c=n.wsize,u=n.whave,f=n.wnext,d=n.window,h=n.hold,p=n.bits,m=n.lencode,v=n.distcode,y=(1<<n.lenbits)-1,g=(1<<n.distbits)-1;e:do{p<15&&(h+=E[i++]<<p,p+=8,h+=E[i++]<<p,p+=8),b=m[h&y];t:for(;;){if(h>>>=w=b>>>24,p-=w,0==(w=b>>>16&255))M[o++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=m[(65535&b)+(h&(1<<w)-1)];continue t}if(32&w){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}k=65535&b,(w&=15)&&(p<w&&(h+=E[i++]<<p,p+=8),k+=h&(1<<w)-1,h>>>=w,p-=w),p<15&&(h+=E[i++]<<p,p+=8,h+=E[i++]<<p,p+=8),b=v[h&g];n:for(;;){if(h>>>=w=b>>>24,p-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=v[(65535&b)+(h&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(x=65535&b,p<(w&=15)&&(h+=E[i++]<<p,(p+=8)<w&&(h+=E[i++]<<p,p+=8)),(x+=h&(1<<w)-1)>l){e.msg="invalid distance too far back",n.mode=30;break e}if(h>>>=w,p-=w,x>(w=o-a)){if((w=x-w)>u&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(_=0,S=d,0===f){if(_+=c-w,w<k){k-=w;do{M[o++]=d[_++]}while(--w);_=o-x,S=M}}else if(f<w){if(_+=c+f-w,(w-=f)<k){k-=w;do{M[o++]=d[_++]}while(--w);if(_=0,f<k){k-=w=f;do{M[o++]=d[_++]}while(--w);_=o-x,S=M}}}else if(_+=f-w,w<k){k-=w;do{M[o++]=d[_++]}while(--w);_=o-x,S=M}for(;k>2;)M[o++]=S[_++],M[o++]=S[_++],M[o++]=S[_++],k-=3;k&&(M[o++]=S[_++],k>1&&(M[o++]=S[_++]))}else{_=o-x;do{M[o++]=M[_++],M[o++]=M[_++],M[o++]=M[_++],k-=3}while(k>2);k&&(M[o++]=M[_++],k>1&&(M[o++]=M[_++]))}break}}break}}while(i<r&&o<s);i-=k=p>>3,h&=(1<<(p-=k<<3))-1,e.next_in=i,e.next_out=o,e.avail_in=i<r?r-i+5:5-(i-r),e.avail_out=o<s?s-o+257:257-(o-s),n.hold=h,n.bits=p}},{}],8:[function(e,t,n){var i=e("../utils/common"),r=e("./adler32"),o=e("./crc32"),a=e("./inffast"),s=e("./inftrees");function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function u(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new i.Buf32(852),t.distcode=t.distdyn=new i.Buf32(592),t.sane=1,t.back=-1,0):-2}function f(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,u(e)):-2}function d(e,t){var n,i;return e&&e.state?(i=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,f(e))):-2}function h(e,t){var n,i;return e?(i=new c,e.state=i,i.window=null,0!==(n=d(e,t))&&(e.state=null),n):-2}var p,m,v=!0;function y(e){if(v){var t;for(p=new i.Buf32(512),m=new i.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,p,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,m,0,e.work,{bits:5}),v=!1}e.lencode=p,e.lenbits=9,e.distcode=m,e.distbits=5}function g(e,t,n,r){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new i.Buf8(a.wsize)),r>=a.wsize?(i.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>r&&(o=r),i.arraySet(a.window,t,n-r,o,a.wnext),(r-=o)?(i.arraySet(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}n.inflateReset=f,n.inflateReset2=d,n.inflateResetKeep=u,n.inflateInit=function(e){return h(e,15)},n.inflateInit2=h,n.inflate=function(e,t){var n,c,u,f,d,h,p,m,v,b,w,k,x,_,S,E,M,N,I,T,A,C,O,R,F=0,D=new i.Buf8(4),L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(n=e.state).mode&&(n.mode=13),d=e.next_out,u=e.output,p=e.avail_out,f=e.next_in,c=e.input,h=e.avail_in,m=n.hold,v=n.bits,b=h,w=p,C=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;v<16;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(2&n.wrap&&35615===m){n.check=0,D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0),m=0,v=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&m)){e.msg="unknown compression method",n.mode=30;break}if(v-=4,A=8+(15&(m>>>=4)),0===n.wbits)n.wbits=A;else if(A>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<A,e.adler=n.check=1,n.mode=512&m?10:12,m=0,v=0;break;case 2:for(;v<16;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(n.flags=m,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=m>>8&1),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0)),m=0,v=0,n.mode=3;case 3:for(;v<32;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}n.head&&(n.head.time=m),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,D[2]=m>>>16&255,D[3]=m>>>24&255,n.check=o(n.check,D,4,0)),m=0,v=0,n.mode=4;case 4:for(;v<16;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}n.head&&(n.head.xflags=255&m,n.head.os=m>>8),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0)),m=0,v=0,n.mode=5;case 5:if(1024&n.flags){for(;v<16;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}n.length=m,n.head&&(n.head.extra_len=m),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0)),m=0,v=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((k=n.length)>h&&(k=h),k&&(n.head&&(A=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,c,f,k,A)),512&n.flags&&(n.check=o(n.check,c,k,f)),h-=k,f+=k,n.length-=k),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===h)break e;k=0;do{A=c[f+k++],n.head&&A&&n.length<65536&&(n.head.name+=String.fromCharCode(A))}while(A&&k<h);if(512&n.flags&&(n.check=o(n.check,c,k,f)),h-=k,f+=k,A)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===h)break e;k=0;do{A=c[f+k++],n.head&&A&&n.length<65536&&(n.head.comment+=String.fromCharCode(A))}while(A&&k<h);if(512&n.flags&&(n.check=o(n.check,c,k,f)),h-=k,f+=k,A)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;v<16;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(m!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}m=0,v=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;v<32;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}e.adler=n.check=l(m),m=0,v=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=d,e.avail_out=p,e.next_in=f,e.avail_in=h,n.hold=m,n.bits=v,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){m>>>=7&v,v-=7&v,n.mode=27;break}for(;v<3;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}switch(n.last=1&m,v-=1,3&(m>>>=1)){case 0:n.mode=14;break;case 1:if(y(n),n.mode=20,6===t){m>>>=2,v-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}m>>>=2,v-=2;break;case 14:for(m>>>=7&v,v-=7&v;v<32;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if((65535&m)!=(m>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&m,m=0,v=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(k=n.length){if(k>h&&(k=h),k>p&&(k=p),0===k)break e;i.arraySet(u,c,f,k,d),h-=k,f+=k,p-=k,d+=k,n.length-=k;break}n.mode=12;break;case 17:for(;v<14;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(n.nlen=257+(31&m),m>>>=5,v-=5,n.ndist=1+(31&m),m>>>=5,v-=5,n.ncode=4+(15&m),m>>>=4,v-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;v<3;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}n.lens[L[n.have++]]=7&m,m>>>=3,v-=3}for(;n.have<19;)n.lens[L[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,O={bits:n.lenbits},C=s(0,n.lens,0,19,n.lencode,0,n.work,O),n.lenbits=O.bits,C){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;E=(F=n.lencode[m&(1<<n.lenbits)-1])>>>16&255,M=65535&F,!((S=F>>>24)<=v);){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(M<16)m>>>=S,v-=S,n.lens[n.have++]=M;else{if(16===M){for(R=S+2;v<R;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(m>>>=S,v-=S,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}A=n.lens[n.have-1],k=3+(3&m),m>>>=2,v-=2}else if(17===M){for(R=S+3;v<R;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}v-=S,A=0,k=3+(7&(m>>>=S)),m>>>=3,v-=3}else{for(R=S+7;v<R;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}v-=S,A=0,k=11+(127&(m>>>=S)),m>>>=7,v-=7}if(n.have+k>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;k--;)n.lens[n.have++]=A}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,O={bits:n.lenbits},C=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,O),n.lenbits=O.bits,C){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,O={bits:n.distbits},C=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,O),n.distbits=O.bits,C){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(h>=6&&p>=258){e.next_out=d,e.avail_out=p,e.next_in=f,e.avail_in=h,n.hold=m,n.bits=v,a(e,w),d=e.next_out,u=e.output,p=e.avail_out,f=e.next_in,c=e.input,h=e.avail_in,m=n.hold,v=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;E=(F=n.lencode[m&(1<<n.lenbits)-1])>>>16&255,M=65535&F,!((S=F>>>24)<=v);){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(E&&0==(240&E)){for(N=S,I=E,T=M;E=(F=n.lencode[T+((m&(1<<N+I)-1)>>N)])>>>16&255,M=65535&F,!(N+(S=F>>>24)<=v);){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}m>>>=N,v-=N,n.back+=N}if(m>>>=S,v-=S,n.back+=S,n.length=M,0===E){n.mode=26;break}if(32&E){n.back=-1,n.mode=12;break}if(64&E){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&E,n.mode=22;case 22:if(n.extra){for(R=n.extra;v<R;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}n.length+=m&(1<<n.extra)-1,m>>>=n.extra,v-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;E=(F=n.distcode[m&(1<<n.distbits)-1])>>>16&255,M=65535&F,!((S=F>>>24)<=v);){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(0==(240&E)){for(N=S,I=E,T=M;E=(F=n.distcode[T+((m&(1<<N+I)-1)>>N)])>>>16&255,M=65535&F,!(N+(S=F>>>24)<=v);){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}m>>>=N,v-=N,n.back+=N}if(m>>>=S,v-=S,n.back+=S,64&E){e.msg="invalid distance code",n.mode=30;break}n.offset=M,n.extra=15&E,n.mode=24;case 24:if(n.extra){for(R=n.extra;v<R;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}n.offset+=m&(1<<n.extra)-1,m>>>=n.extra,v-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===p)break e;if(k=w-p,n.offset>k){if((k=n.offset-k)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}k>n.wnext?(k-=n.wnext,x=n.wsize-k):x=n.wnext-k,k>n.length&&(k=n.length),_=n.window}else _=u,x=d-n.offset,k=n.length;k>p&&(k=p),p-=k,n.length-=k;do{u[d++]=_[x++]}while(--k);0===n.length&&(n.mode=21);break;case 26:if(0===p)break e;u[d++]=n.length,p--,n.mode=21;break;case 27:if(n.wrap){for(;v<32;){if(0===h)break e;h--,m|=c[f++]<<v,v+=8}if(w-=p,e.total_out+=w,n.total+=w,w&&(e.adler=n.check=n.flags?o(n.check,u,w,d-w):r(n.check,u,w,d-w)),w=p,(n.flags?m:l(m))!==n.check){e.msg="incorrect data check",n.mode=30;break}m=0,v=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;v<32;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(m!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}m=0,v=0}n.mode=29;case 29:C=1;break e;case 30:C=-3;break e;case 31:return-4;case 32:default:return-2}return e.next_out=d,e.avail_out=p,e.next_in=f,e.avail_in=h,n.hold=m,n.bits=v,(n.wsize||w!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&g(e,e.output,e.next_out,w-e.avail_out),b-=e.avail_in,w-=e.avail_out,e.total_in+=b,e.total_out+=w,n.total+=w,n.wrap&&w&&(e.adler=n.check=n.flags?o(n.check,u,w,e.next_out-w):r(n.check,u,w,e.next_out-w)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0===b&&0===w||4===t)&&0===C&&(C=-5),C},n.inflateEnd=function(e){if(!e||!e.state)return-2;var t=e.state;return t.window&&(t.window=null),e.state=null,0},n.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?-2:(n.head=t,t.done=!1,0):-2},n.inflateSetDictionary=function(e,t){var n,i=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?-2:11===n.mode&&r(1,t,i,0)!==n.check?-3:g(e,t,i,i)?(n.mode=31,-4):(n.havedict=1,0):-2},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,n){var i=e("../utils/common"),r=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,l,c,u,f,d){var h,p,m,v,y,g,b,w,k,x=d.bits,_=0,S=0,E=0,M=0,N=0,I=0,T=0,A=0,C=0,O=0,R=null,F=0,D=new i.Buf16(16),L=new i.Buf16(16),B=null,z=0;for(_=0;_<=15;_++)D[_]=0;for(S=0;S<l;S++)D[t[n+S]]++;for(N=x,M=15;M>=1&&0===D[M];M--);if(N>M&&(N=M),0===M)return c[u++]=20971520,c[u++]=20971520,d.bits=1,0;for(E=1;E<M&&0===D[E];E++);for(N<E&&(N=E),A=1,_=1;_<=15;_++)if(A<<=1,(A-=D[_])<0)return-1;if(A>0&&(0===e||1!==M))return-1;for(L[1]=0,_=1;_<15;_++)L[_+1]=L[_]+D[_];for(S=0;S<l;S++)0!==t[n+S]&&(f[L[t[n+S]]++]=S);if(0===e?(R=B=f,g=19):1===e?(R=r,F-=257,B=o,z-=257,g=256):(R=a,B=s,g=-1),O=0,S=0,_=E,y=u,I=N,T=0,m=-1,v=(C=1<<N)-1,1===e&&C>852||2===e&&C>592)return 1;for(;;){b=_-T,f[S]<g?(w=0,k=f[S]):f[S]>g?(w=B[z+f[S]],k=R[F+f[S]]):(w=96,k=0),h=1<<_-T,E=p=1<<I;do{c[y+(O>>T)+(p-=h)]=b<<24|w<<16|k|0}while(0!==p);for(h=1<<_-1;O&h;)h>>=1;if(0!==h?(O&=h-1,O+=h):O=0,S++,0==--D[_]){if(_===M)break;_=t[n+f[S]]}if(_>N&&(O&v)!==m){for(0===T&&(T=N),y+=E,A=1<<(I=_-T);I+T<M&&!((A-=D[I+T])<=0);)I++,A<<=1;if(C+=1<<I,1===e&&C>852||2===e&&C>592)return 1;c[m=O&v]=N<<24|I<<16|y-u|0}}return 0!==O&&(c[y+O]=_-T<<24|64<<16|0),d.bits=N,0}},{"../utils/common":1}],10:[function(e,t,n){t.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"}},{}],11:[function(e,t,n){t.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/inflate.js":[function(e,t,n){var i=e("./zlib/inflate"),r=e("./utils/common"),o=e("./utils/strings"),a=e("./zlib/constants"),s=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),u=Object.prototype.toString;function f(e){if(!(this instanceof f))return new f(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=i.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(s[n]);if(this.header=new c,i.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=i.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(s[n])}function d(e,t){var n=new f(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}f.prototype.push=function(e,t){var n,s,l,c,f,d=this.strm,h=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?d.input=o.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new r.Buf8(h),d.next_out=0,d.avail_out=h),(n=i.inflate(d,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&p&&(n=i.inflateSetDictionary(this.strm,p)),n===a.Z_BUF_ERROR&&!0===m&&(n=a.Z_OK,m=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&n!==a.Z_STREAM_END&&(0!==d.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(d.output,d.next_out),c=d.next_out-l,f=o.buf2string(d.output,l),d.next_out=c,d.avail_out=h-c,c&&r.arraySet(d.output,d.output,l,c,0),this.onData(f)):this.onData(r.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(m=!0)}while((d.avail_in>0||0===d.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(n=i.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),d.avail_out=0,!0)},f.prototype.onData=function(e){this.chunks.push(e)},f.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=f,n.inflate=d,n.inflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},n.ungzip=d},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")})).inflate;return e.Replayer=Z,e.unpack=function(e){if("string"!=typeof e)return e;try{if((t=JSON.parse(e)).timestamp)return t}catch(e){}try{var t;if("v1"===(t=JSON.parse(P(e,{to:"string"}))).v)return t;throw new Error("These events were packed with packer "+t.v+" which is incompatible with current packer v1.")}catch(e){throw console.error(e),new Error("Unknown data format.")}},e}({});
***************************************************************************** */!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(_||(_={}));var N={type:"xstate.init"};function M(e){return void 0===e?[]:[].concat(e)}function T(e){return{type:"xstate.assign",assignment:e}}function I(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 C(e){return"string"==typeof e?{type:e}:e}function O(e,t){return{value:e,context:t,actions:[],changed:!1,matches:A(e)}}function R(e,t){void 0===t&&(t={});var n={config:e,_options:t,initialState:{value:e.initial,actions:M(e.states[e.initial].entry).map((function(e){return I(e,t.actions)})),context:e.context,matches:A(e.initial)},transition:function(t,i){var r,o,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,l=a.context,c=C(i),u=e.states[s];if(u.on){var f=M(u.on[c.type]),d=function(t){if(void 0===t)return{value:O(s,l)};var i="string"==typeof t?{target:t}:t,r=i.target,o=void 0===r?s:r,a=i.actions,f=void 0===a?[]:a,d=i.cond,h=l;if((void 0===d?function(){return!0}:d)(l,c)){var p=e.states[o],m=!1,v=[].concat(u.exit,f,p.entry).filter((function(e){return e})).map((function(e){return I(e,n._options.actions)})).filter((function(e){if("xstate.assign"===e.type){m=!0;var t=Object.assign({},h);return"function"==typeof e.assignment?t=e.assignment(h,c):Object.keys(e.assignment).forEach((function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](h,c):e.assignment[n]})),h=t,!1}return!0}));return{value:{value:o,context:h,actions:v,changed:o!==s||v.length>0||m,matches:A(o)}}}};try{for(var h=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}}}}(f),p=h.next();!p.done;p=h.next()){var m=d(p.value);if("object"==typeof m)return m.value}}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}}return O(s,l)}};return n}var F=function(e,t){return e.actions.forEach((function(n){var i=n.exec;return i&&i(e.context,t)}))};function D(e){var t=e.initialState,n=_.NotStarted,i=new Set,r={_machine:e,send:function(r){n===_.Running&&(t=e.transition(t,r),F(t,C(r)),i.forEach((function(e){return e(t)})))},subscribe:function(e){return i.add(e),e(t),{unsubscribe:function(){return i.delete(e)}}},start:function(){return n=_.Running,F(t,N),r},stop:function(){return n=_.Stopped,i.clear(),r},get state(){return t},get status(){return n}};return r}var L={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return L.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete L.map[t],e.childNodes&&e.childNodes.forEach((function(e){return L.removeNodeFromMap(e)}))},has:function(e){return L.map.hasOwnProperty(e)}};var B=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),i=this.indexes.get(e.id),r=function(e){t.removeIdSet.add(e);var n=L.getNode(e);null==n||n.childNodes.forEach((function(e){return r(e.__sn.id)}))},o=function(n){t.removeIdSet.add(n.id),Object.values(n.children).forEach((function(e){return o(e)}));var i=t.indexes.get(n.id);if(i){var r=i.parent;r&&(delete i.parent,delete r.children[i.id],t.indexes.delete(e.id))}};i?n?(delete i.parent,delete n.children[i.id],this.indexes.delete(e.id),o(i)):(delete this.tree[i.id],this.indexes.delete(i.id),o(i)):(this.removeNodeMutations.push(e),r(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,r,o=this,a=this.tree,s=this.removeNodeMutations,l=this.textMutations,c=this.attributeMutations,u={source:g.Mutation,removes:s,texts:l,attributes:c,adds:[]},f=function(e,t){t&&o.removeIdSet.add(e.id),u.texts=u.texts.concat(t?[]:e.texts).filter((function(e){return!o.removeIdSet.has(e.id)})),u.attributes=u.attributes.concat(t?[]:e.attributes).filter((function(e){return!o.removeIdSet.has(e.id)})),o.removeIdSet.has(e.id)||o.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return f(e,!0)})):(u.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return f(e,!1)})))};Object.values(a).forEach((function(e){return f(e,!1)}));try{for(var d=i(this.scrollMap.keys()),h=d.next();!h.done;h=d.next()){var p=h.value;this.removeIdSet.has(p)&&this.scrollMap.delete(p)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var m=i(this.inputMap.keys()),v=m.next();!v.done;v=m.next()){p=v.value;this.removeIdSet.has(p)&&this.inputMap.delete(p)}}catch(e){n={error:e}}finally{try{v&&!v.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}var y=new Map(this.scrollMap),b=new Map(this.inputMap);return this.reset(),{mutationData:u,scrollMap:y,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 z(e,t){var r=t.getCastFn,o=t.emitter;return D(R({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"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]}}}}},{actions:{castEvent:T({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:T((function(e,t){var i=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(i=t.payload.timeOffset),n(n({},e),{timeOffset:i,baselineTime:e.events[0].timestamp+i})})),play:function(e){var t,n,a,s,l=e.timer,c=e.events,u=e.baselineTime,f=e.lastPlayedEvent;l.clear();try{for(var d=i(c),h=d.next();!h.done;h=d.next()){E(h.value,u)}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}var p=function(e,t){for(var n=e.length-1;n>=0;n--){var i=e[n];if(i.type===y.Meta&&i.timestamp<=t)return e.slice(n)}return e}(c,u),m=new Array,v=function(e){if(f&&f.timestamp<u&&(e.timestamp<=f.timestamp||e===f))return"continue";var t=e.timestamp<u;if(t&&!function(e){switch(e.type){case y.DomContentLoaded:case y.Load:case y.Custom:return!1;case y.FullSnapshot:case y.Meta:return!0}switch(e.data.source){case g.MouseMove:case g.MouseInteraction:case g.TouchMove:case g.MediaInteraction:return!1;case g.ViewportResize:case g.StyleSheetRule:case g.Scroll:case g.Input:return!0}return!0}(e))return"continue";var n=r(e,t);t?n():m.push({doAction:function(){n(),o.emit(x.EventCast,e)},delay:e.delay})};try{for(var b=i(p),w=b.next();!w.done;w=b.next()){v(w.value)}}catch(e){a={error:e}}finally{try{w&&!w.done&&(s=b.return)&&s.call(b)}finally{if(a)throw a.error}}o.emit(x.Flush),l.addActions(m),l.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:T((function(e){return n(n({},e),{lastPlayedEvent:null})})),startLive:T({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:T((function(e,t){var i=e.baselineTime,a=e.timer,s=e.events;if("ADD_EVENT"===t.type){var l=t.payload.event;E(l,i),s.push(l);var c=l.timestamp<i,u=r(l,c);c?u():a.addAction({doAction:function(){u(),o.emit(x.EventCast,l)},delay:l.delay})}return n(n({},e),{events:s})}))}}))}var P=h||p,Z={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0},U=function(){function e(e,n){var o=this;if(this.emitter=P(),this.legacy_missingNodeRetryMap={},!(null==n?void 0:n.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");this.config=Object.assign({},Z,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on(x.Resize,this.handleResize),k(),"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),this.setupDom(),this.treeIndex=new B,this.fragmentParentMap=new Map,this.emitter.on(x.Flush,(function(){var e,n,a,s,l,c,u=o.treeIndex.flush(),f=u.scrollMap,d=u.inputMap;try{for(var h=i(f.values()),p=h.next();!p.done;p=h.next()){var m=p.value;o.applyScroll(m)}}catch(t){e={error:t}}finally{try{p&&!p.done&&(n=h.return)&&n.call(h)}finally{if(e)throw e.error}}try{for(var v=i(d.values()),y=v.next();!y.done;y=v.next()){m=y.value;o.applyInput(m)}}catch(e){a={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}try{for(var g=i(o.fragmentParentMap.entries()),b=g.next();!b.done;b=g.next()){var w=r(b.value,2),x=w[0],k=w[1];L.map[k.__sn.id]=k,k.__sn.type===t.Element&&"textarea"===k.__sn.tagName&&x.textContent&&(k.value=x.textContent),k.appendChild(x)}}catch(e){l={error:e}}finally{try{b&&!b.done&&(c=g.return)&&c.call(g)}finally{if(l)throw l.error}}o.fragmentParentMap.clear()}));var a=new S([],(null==n?void 0:n.speed)||Z.speed);this.service=z({events:e.map((function(e){return n&&n.unpackFn?n.unpackFn(e):e})),timer:a,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){o.emitter.emit(x.StateChange,{player:e})})),this.speedService=D(R({id:"speed",context:{normalSpeed:-1,timer:a},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:T({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(x.StateChange,{speed:e})}));var s=this.service.state.context.events.find((function(e){return e.type===y.Meta})),l=this.service.state.context.events.find((function(e){return e.type===y.FullSnapshot}));if(s){var c=s.data,u=c.width,f=c.height;setTimeout((function(){o.emitter.emit(x.Resize,{width:u,height:f})}),0)}l&&this.rebuildFullSnapshot(l)}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){this.emitter.on(e,t)},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(n){t.config[n]=e[n]})),this.config.skipInactive||this.backToNormal()},e.prototype.getMetaData=function(){var e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},e.prototype.play=function(e){void 0===e&&(e=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}}),this.emitter.emit(x.Start)},e.prototype.pause=function(e){void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),this.emitter.emit(x.Pause)},e.prototype.resume=function(e){void 0===e&&(e=0),console.warn("The 'resume' will be departed in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(x.Resume)},e.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},e.prototype.addEvent=function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))},e.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},e.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.disableInteract(),this.wrapper.appendChild(this.iframe)},e.prototype.handleResize=function(e){this.iframe.setAttribute("width",String(e.width)),this.iframe.setAttribute("height",String(e.height))},e.prototype.getCastFn=function(e,t){var n,r=this;switch(void 0===t&&(t=!1),e.type){case y.DomContentLoaded:case y.Load:break;case y.Custom:n=function(){r.emitter.emit(x.CustomEvent,e)};break;case y.Meta:n=function(){return r.emitter.emit(x.Resize,{width:e.data.width,height:e.data.height})};break;case y.FullSnapshot:n=function(){r.rebuildFullSnapshot(e),r.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case y.IncrementalSnapshot:n=function(){var n,o;if(r.applyIncremental(e,t),!t&&(e===r.nextUserInteractionEvent&&(r.nextUserInteractionEvent=null,r.backToNormal()),r.config.skipInactive&&!r.nextUserInteractionEvent)){try{for(var a=i(r.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(!(l.timestamp<=e.timestamp)&&r.isUserInteraction(l)){l.delay-e.delay>1e4*r.speedService.state.context.timer.speed&&(r.nextUserInteractionEvent=l);break}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}if(r.nextUserInteractionEvent){var c=r.nextUserInteractionEvent.delay-e.delay,u={speed:Math.min(Math.round(c/5e3),360)};r.speedService.send({type:"FAST_FORWARD",payload:u}),r.emitter.emit(x.SkipStart,u)}}}}return function(){n&&n(),r.service.send({type:"CAST_EVENT",payload:{event:e}}),e===r.service.state.context.events[r.service.state.context.events.length-1]&&(r.backToNormal(),r.service.send("END"),r.emitter.emit(x.Finish))}},e.prototype.rebuildFullSnapshot=function(e){if(!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={},L.map=function(e,t,n){void 0===n&&(n=!0);var i={};return[d(e,t,i,!1,n),i]}(e.data.node,this.iframe.contentDocument)[1];var t=document.createElement("style"),n=this.iframe.contentDocument,i=n.documentElement,r=n.head;i.insertBefore(t,r);for(var o,a=(o=this.config.blockClass,["iframe, ."+o+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules),s=0;s<a.length;s++)t.sheet.insertRule(a[s],s);this.emitter.emit(x.FullsnapshotRebuilded,e),this.waitForStylesheetLoad()},e.prototype.waitForStylesheetLoad=function(){var e,t=this,n=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(n){var i,r=new Set,o=this.service.state,a=this.service.subscribe((function(e){o=e})).unsubscribe;n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(r.add(e),e.addEventListener("load",(function(){r.delete(e),0===r.size&&-1!==i&&(o.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(x.LoadStylesheetEnd),i&&window.clearTimeout(i),a())})))})),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(x.LoadStylesheetStart),i=window.setTimeout((function(){o.matches("playing")&&t.play(t.getCurrentTime()),i=-1,a()}),this.config.loadTimeout))}},e.prototype.applyIncremental=function(e,t){var n=this,i=e.data;switch(i.source){case g.Mutation:t&&(i.adds.forEach((function(e){return n.treeIndex.add(e)})),i.texts.forEach((function(e){return n.treeIndex.text(e)})),i.attributes.forEach((function(e){return n.treeIndex.attribute(e)})),i.removes.forEach((function(e){return n.treeIndex.remove(e)}))),this.applyMutation(i,t);break;case g.MouseMove:if(t){var r=i.positions[i.positions.length-1];this.moveAndHover(i,r.x,r.y,r.id)}else i.positions.forEach((function(t){var r={doAction:function(){n.moveAndHover(i,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-n.service.state.context.baselineTime};n.timer.addAction(r)}));break;case g.MouseInteraction:if(-1===i.id)break;var o=new Event(b[i.type].toLowerCase());if(!(l=L.getNode(i.id)))return this.debugNodeNotFound(i,i.id);this.emitter.emit(x.MouseInteraction,{type:i.type,target:l});var a=this.config.triggerFocus;switch(i.type){case b.Blur:"blur"in l&&l.blur();break;case b.Focus:a&&l.focus&&l.focus({preventScroll:!0});break;case b.Click:case b.TouchStart:case b.TouchEnd:t||(this.moveAndHover(i,i.x,i.y,i.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:l.dispatchEvent(o)}break;case g.Scroll:if(-1===i.id)break;if(t){this.treeIndex.scroll(i);break}this.applyScroll(i);break;case g.ViewportResize:this.emitter.emit(x.Resize,{width:i.width,height:i.height});break;case g.Input:if(-1===i.id)break;if(t){this.treeIndex.input(i);break}this.applyInput(i);break;case g.MediaInteraction:if(!(l=L.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var s=l;i.type===w.Pause&&s.pause(),i.type===w.Play&&(s.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?s.play():s.addEventListener("canplay",(function(){s.play()})));break;case g.StyleSheetRule:var l;if(!(l=L.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var c=l.sheet;i.adds&&i.adds.forEach((function(e){var t=e.rule,n=e.index,i=void 0===n?void 0:Math.min(n,c.rules.length);try{c.insertRule(t,i)}catch(e){}})),i.removes&&i.removes.forEach((function(e){var t=e.index;c.deleteRule(t)}))}},e.prototype.applyMutation=function(e,t){var i=this;e.removes.forEach((function(t){var n=L.getNode(t.id);if(!n)return i.warnNodeNotFound(e,t.id);var r=L.getNode(t.parentId);if(!r)return i.warnNodeNotFound(e,t.parentId);if(L.removeNodeFromMap(n),r){var o=i.fragmentParentMap.get(r);o&&o.contains(n)?o.removeChild(n):r.removeChild(n)}}));var r=n({},this.legacy_missingNodeRetryMap),o=[],a=function(e){if(!i.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var n=L.getNode(e.parentId);if(!n)return o.push(e);var a=i.iframe.contentDocument.contains(n);if(t&&a){var s=document.createDocumentFragment();for(L.map[e.parentId]=s,i.fragmentParentMap.set(s,n);n.firstChild;)s.appendChild(n.firstChild);n=s}var l=null,c=null;if(e.previousId&&(l=L.getNode(e.previousId)),e.nextId&&(c=L.getNode(e.nextId)),null!==e.nextId&&-1!==e.nextId&&!c)return o.push(e);var u=d(e.node,i.iframe.contentDocument,L.map,!0);-1!==e.previousId&&-1!==e.nextId?(l&&l.nextSibling&&l.nextSibling.parentNode?n.insertBefore(u,l.nextSibling):c&&c.parentNode?n.contains(c)?n.insertBefore(u,c):n.insertBefore(u,null):n.appendChild(u),(e.previousId||e.nextId)&&i.legacy_resolveMissingNode(r,n,u,e)):r[e.node.id]={node:u,mutation:e}};for(e.adds.forEach((function(e){a(e)}));o.length;){if(o.every((function(e){return!Boolean(L.getNode(e.parentId))})))return o.forEach((function(t){return i.warnNodeNotFound(e,t.node.id)}));var s=o.shift();a(s)}Object.keys(r).length&&Object.assign(this.legacy_missingNodeRetryMap,r),e.texts.forEach((function(t){var n=L.getNode(t.id);if(!n)return i.warnNodeNotFound(e,t.id);i.fragmentParentMap.has(n)&&(n=i.fragmentParentMap.get(n)),n.textContent=t.value})),e.attributes.forEach((function(t){var n=L.getNode(t.id);if(!n)return i.warnNodeNotFound(e,t.id);for(var r in i.fragmentParentMap.has(n)&&(n=i.fragmentParentMap.get(n)),t.attributes)if("string"==typeof r){var o=t.attributes[r];null!==o?n.setAttribute(r,o):n.removeAttribute(r)}}))},e.prototype.applyScroll=function(e){var t=L.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);if(t===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:e.y,left:e.x,behavior:"smooth"});else try{t.scrollTop=e.y,t.scrollLeft=e.x}catch(e){}},e.prototype.applyInput=function(e){var t=L.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}},e.prototype.legacy_resolveMissingNode=function(e,t,n,i){var r=i.previousId,o=i.nextId,a=r&&e[r],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 f=s;c=f.node,u=f.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,i){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px";var r=L.getNode(i);if(!r)return this.debugNodeNotFound(e,i);this.hoverElements(r)},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===y.IncrementalSnapshot&&(e.data.source>g.Mutation&&e.data.source<=g.Input)},e.prototype.backToNormal=function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(x.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},e.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn("[replayer]","Node with id '"+t+"' not found in",e)},e.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log("[replayer]","Node with id '"+t+"' not found in",e)},e}(),j=v((function(e,t){e.exports=function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){if(!s&&m)return m();if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return r(t[a][1][e]||e)}),c,c.exports,e,t,n,i)}return n[a].exports}for(var o=m,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,n,i,r){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+i),r);else for(var o=0;o<i;o++)e[r+o]=t[n+o]},flattenChunks:function(e){var t,n,i,r,o,a;for(i=0,t=0,n=e.length;t<n;t++)i+=e[t].length;for(a=new Uint8Array(i),r=0,t=0,n=e.length;t<n;t++)o=e[t],a.set(o,r),r+=o.length;return a}},a={arraySet:function(e,t,n,i,r){for(var o=0;o<i;o++)e[r+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,o)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,a))},n.setTyped(i)},{}],2:[function(e,t,n){var i=e("./common"),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var a=new i.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&o||!e.subarray&&r))return String.fromCharCode.apply(null,i.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,n.string2buf=function(e){var t,n,r,o,a,s=e.length,l=0;for(o=0;o<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new i.Buf8(l),a=0,o=0;a<l;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new i.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,i,r,o,s=t||e.length,c=new Array(2*s);for(i=0,n=0;n<s;)if((r=e[n++])<128)c[i++]=r;else if((o=a[r])>4)c[i++]=65533,n+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&n<s;)r=r<<6|63&e[n++],o--;o>1?c[i++]=65533:r<65536?c[i++]=r:(r-=65536,c[i++]=55296|r>>10&1023,c[i++]=56320|1023&r)}return l(c,i)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":1}],3:[function(e,t,n){t.exports=function(e,t,n,i){for(var r=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(r=r+t[i++]|0)|0}while(--a);r%=65521,o%=65521}return r|o<<16|0}},{}],4:[function(e,t,n){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,n){var i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,r){var o=i,a=r+n;e^=-1;for(var s=r;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}},{}],6:[function(e,t,n){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],7:[function(e,t,n){t.exports=function(e,t){var n,i,r,o,a,s,l,c,u,f,d,h,p,m,v,y,g,b,w,x,k,_,S,E,N;n=e.state,i=e.next_in,E=e.input,r=i+(e.avail_in-5),o=e.next_out,N=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),l=n.dmax,c=n.wsize,u=n.whave,f=n.wnext,d=n.window,h=n.hold,p=n.bits,m=n.lencode,v=n.distcode,y=(1<<n.lenbits)-1,g=(1<<n.distbits)-1;e:do{p<15&&(h+=E[i++]<<p,p+=8,h+=E[i++]<<p,p+=8),b=m[h&y];t:for(;;){if(h>>>=w=b>>>24,p-=w,0==(w=b>>>16&255))N[o++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=m[(65535&b)+(h&(1<<w)-1)];continue t}if(32&w){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}x=65535&b,(w&=15)&&(p<w&&(h+=E[i++]<<p,p+=8),x+=h&(1<<w)-1,h>>>=w,p-=w),p<15&&(h+=E[i++]<<p,p+=8,h+=E[i++]<<p,p+=8),b=v[h&g];n:for(;;){if(h>>>=w=b>>>24,p-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=v[(65535&b)+(h&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(k=65535&b,p<(w&=15)&&(h+=E[i++]<<p,(p+=8)<w&&(h+=E[i++]<<p,p+=8)),(k+=h&(1<<w)-1)>l){e.msg="invalid distance too far back",n.mode=30;break e}if(h>>>=w,p-=w,k>(w=o-a)){if((w=k-w)>u&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(_=0,S=d,0===f){if(_+=c-w,w<x){x-=w;do{N[o++]=d[_++]}while(--w);_=o-k,S=N}}else if(f<w){if(_+=c+f-w,(w-=f)<x){x-=w;do{N[o++]=d[_++]}while(--w);if(_=0,f<x){x-=w=f;do{N[o++]=d[_++]}while(--w);_=o-k,S=N}}}else if(_+=f-w,w<x){x-=w;do{N[o++]=d[_++]}while(--w);_=o-k,S=N}for(;x>2;)N[o++]=S[_++],N[o++]=S[_++],N[o++]=S[_++],x-=3;x&&(N[o++]=S[_++],x>1&&(N[o++]=S[_++]))}else{_=o-k;do{N[o++]=N[_++],N[o++]=N[_++],N[o++]=N[_++],x-=3}while(x>2);x&&(N[o++]=N[_++],x>1&&(N[o++]=N[_++]))}break}}break}}while(i<r&&o<s);i-=x=p>>3,h&=(1<<(p-=x<<3))-1,e.next_in=i,e.next_out=o,e.avail_in=i<r?r-i+5:5-(i-r),e.avail_out=o<s?s-o+257:257-(o-s),n.hold=h,n.bits=p}},{}],8:[function(e,t,n){var i=e("../utils/common"),r=e("./adler32"),o=e("./crc32"),a=e("./inffast"),s=e("./inftrees");function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function u(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new i.Buf32(852),t.distcode=t.distdyn=new i.Buf32(592),t.sane=1,t.back=-1,0):-2}function f(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,u(e)):-2}function d(e,t){var n,i;return e&&e.state?(i=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,f(e))):-2}function h(e,t){var n,i;return e?(i=new c,e.state=i,i.window=null,0!==(n=d(e,t))&&(e.state=null),n):-2}var p,m,v=!0;function y(e){if(v){var t;for(p=new i.Buf32(512),m=new i.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,p,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,m,0,e.work,{bits:5}),v=!1}e.lencode=p,e.lenbits=9,e.distcode=m,e.distbits=5}function g(e,t,n,r){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new i.Buf8(a.wsize)),r>=a.wsize?(i.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>r&&(o=r),i.arraySet(a.window,t,n-r,o,a.wnext),(r-=o)?(i.arraySet(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}n.inflateReset=f,n.inflateReset2=d,n.inflateResetKeep=u,n.inflateInit=function(e){return h(e,15)},n.inflateInit2=h,n.inflate=function(e,t){var n,c,u,f,d,h,p,m,v,b,w,x,k,_,S,E,N,M,T,I,A,C,O,R,F=0,D=new i.Buf8(4),L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(n=e.state).mode&&(n.mode=13),d=e.next_out,u=e.output,p=e.avail_out,f=e.next_in,c=e.input,h=e.avail_in,m=n.hold,v=n.bits,b=h,w=p,C=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;v<16;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(2&n.wrap&&35615===m){n.check=0,D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0),m=0,v=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&m)){e.msg="unknown compression method",n.mode=30;break}if(v-=4,A=8+(15&(m>>>=4)),0===n.wbits)n.wbits=A;else if(A>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<A,e.adler=n.check=1,n.mode=512&m?10:12,m=0,v=0;break;case 2:for(;v<16;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(n.flags=m,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=m>>8&1),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0)),m=0,v=0,n.mode=3;case 3:for(;v<32;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}n.head&&(n.head.time=m),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,D[2]=m>>>16&255,D[3]=m>>>24&255,n.check=o(n.check,D,4,0)),m=0,v=0,n.mode=4;case 4:for(;v<16;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}n.head&&(n.head.xflags=255&m,n.head.os=m>>8),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0)),m=0,v=0,n.mode=5;case 5:if(1024&n.flags){for(;v<16;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}n.length=m,n.head&&(n.head.extra_len=m),512&n.flags&&(D[0]=255&m,D[1]=m>>>8&255,n.check=o(n.check,D,2,0)),m=0,v=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((x=n.length)>h&&(x=h),x&&(n.head&&(A=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,c,f,x,A)),512&n.flags&&(n.check=o(n.check,c,x,f)),h-=x,f+=x,n.length-=x),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===h)break e;x=0;do{A=c[f+x++],n.head&&A&&n.length<65536&&(n.head.name+=String.fromCharCode(A))}while(A&&x<h);if(512&n.flags&&(n.check=o(n.check,c,x,f)),h-=x,f+=x,A)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===h)break e;x=0;do{A=c[f+x++],n.head&&A&&n.length<65536&&(n.head.comment+=String.fromCharCode(A))}while(A&&x<h);if(512&n.flags&&(n.check=o(n.check,c,x,f)),h-=x,f+=x,A)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;v<16;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(m!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}m=0,v=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;v<32;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}e.adler=n.check=l(m),m=0,v=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=d,e.avail_out=p,e.next_in=f,e.avail_in=h,n.hold=m,n.bits=v,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){m>>>=7&v,v-=7&v,n.mode=27;break}for(;v<3;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}switch(n.last=1&m,v-=1,3&(m>>>=1)){case 0:n.mode=14;break;case 1:if(y(n),n.mode=20,6===t){m>>>=2,v-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}m>>>=2,v-=2;break;case 14:for(m>>>=7&v,v-=7&v;v<32;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if((65535&m)!=(m>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&m,m=0,v=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(x=n.length){if(x>h&&(x=h),x>p&&(x=p),0===x)break e;i.arraySet(u,c,f,x,d),h-=x,f+=x,p-=x,d+=x,n.length-=x;break}n.mode=12;break;case 17:for(;v<14;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(n.nlen=257+(31&m),m>>>=5,v-=5,n.ndist=1+(31&m),m>>>=5,v-=5,n.ncode=4+(15&m),m>>>=4,v-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;v<3;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}n.lens[L[n.have++]]=7&m,m>>>=3,v-=3}for(;n.have<19;)n.lens[L[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,O={bits:n.lenbits},C=s(0,n.lens,0,19,n.lencode,0,n.work,O),n.lenbits=O.bits,C){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;E=(F=n.lencode[m&(1<<n.lenbits)-1])>>>16&255,N=65535&F,!((S=F>>>24)<=v);){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(N<16)m>>>=S,v-=S,n.lens[n.have++]=N;else{if(16===N){for(R=S+2;v<R;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(m>>>=S,v-=S,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}A=n.lens[n.have-1],x=3+(3&m),m>>>=2,v-=2}else if(17===N){for(R=S+3;v<R;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}v-=S,A=0,x=3+(7&(m>>>=S)),m>>>=3,v-=3}else{for(R=S+7;v<R;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}v-=S,A=0,x=11+(127&(m>>>=S)),m>>>=7,v-=7}if(n.have+x>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;x--;)n.lens[n.have++]=A}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,O={bits:n.lenbits},C=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,O),n.lenbits=O.bits,C){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,O={bits:n.distbits},C=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,O),n.distbits=O.bits,C){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(h>=6&&p>=258){e.next_out=d,e.avail_out=p,e.next_in=f,e.avail_in=h,n.hold=m,n.bits=v,a(e,w),d=e.next_out,u=e.output,p=e.avail_out,f=e.next_in,c=e.input,h=e.avail_in,m=n.hold,v=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;E=(F=n.lencode[m&(1<<n.lenbits)-1])>>>16&255,N=65535&F,!((S=F>>>24)<=v);){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(E&&0==(240&E)){for(M=S,T=E,I=N;E=(F=n.lencode[I+((m&(1<<M+T)-1)>>M)])>>>16&255,N=65535&F,!(M+(S=F>>>24)<=v);){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}m>>>=M,v-=M,n.back+=M}if(m>>>=S,v-=S,n.back+=S,n.length=N,0===E){n.mode=26;break}if(32&E){n.back=-1,n.mode=12;break}if(64&E){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&E,n.mode=22;case 22:if(n.extra){for(R=n.extra;v<R;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}n.length+=m&(1<<n.extra)-1,m>>>=n.extra,v-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;E=(F=n.distcode[m&(1<<n.distbits)-1])>>>16&255,N=65535&F,!((S=F>>>24)<=v);){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(0==(240&E)){for(M=S,T=E,I=N;E=(F=n.distcode[I+((m&(1<<M+T)-1)>>M)])>>>16&255,N=65535&F,!(M+(S=F>>>24)<=v);){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}m>>>=M,v-=M,n.back+=M}if(m>>>=S,v-=S,n.back+=S,64&E){e.msg="invalid distance code",n.mode=30;break}n.offset=N,n.extra=15&E,n.mode=24;case 24:if(n.extra){for(R=n.extra;v<R;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}n.offset+=m&(1<<n.extra)-1,m>>>=n.extra,v-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===p)break e;if(x=w-p,n.offset>x){if((x=n.offset-x)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}x>n.wnext?(x-=n.wnext,k=n.wsize-x):k=n.wnext-x,x>n.length&&(x=n.length),_=n.window}else _=u,k=d-n.offset,x=n.length;x>p&&(x=p),p-=x,n.length-=x;do{u[d++]=_[k++]}while(--x);0===n.length&&(n.mode=21);break;case 26:if(0===p)break e;u[d++]=n.length,p--,n.mode=21;break;case 27:if(n.wrap){for(;v<32;){if(0===h)break e;h--,m|=c[f++]<<v,v+=8}if(w-=p,e.total_out+=w,n.total+=w,w&&(e.adler=n.check=n.flags?o(n.check,u,w,d-w):r(n.check,u,w,d-w)),w=p,(n.flags?m:l(m))!==n.check){e.msg="incorrect data check",n.mode=30;break}m=0,v=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;v<32;){if(0===h)break e;h--,m+=c[f++]<<v,v+=8}if(m!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}m=0,v=0}n.mode=29;case 29:C=1;break e;case 30:C=-3;break e;case 31:return-4;case 32:default:return-2}return e.next_out=d,e.avail_out=p,e.next_in=f,e.avail_in=h,n.hold=m,n.bits=v,(n.wsize||w!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&g(e,e.output,e.next_out,w-e.avail_out),b-=e.avail_in,w-=e.avail_out,e.total_in+=b,e.total_out+=w,n.total+=w,n.wrap&&w&&(e.adler=n.check=n.flags?o(n.check,u,w,e.next_out-w):r(n.check,u,w,e.next_out-w)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0===b&&0===w||4===t)&&0===C&&(C=-5),C},n.inflateEnd=function(e){if(!e||!e.state)return-2;var t=e.state;return t.window&&(t.window=null),e.state=null,0},n.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?-2:(n.head=t,t.done=!1,0):-2},n.inflateSetDictionary=function(e,t){var n,i=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?-2:11===n.mode&&r(1,t,i,0)!==n.check?-3:g(e,t,i,i)?(n.mode=31,-4):(n.havedict=1,0):-2},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,n){var i=e("../utils/common"),r=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,l,c,u,f,d){var h,p,m,v,y,g,b,w,x,k=d.bits,_=0,S=0,E=0,N=0,M=0,T=0,I=0,A=0,C=0,O=0,R=null,F=0,D=new i.Buf16(16),L=new i.Buf16(16),B=null,z=0;for(_=0;_<=15;_++)D[_]=0;for(S=0;S<l;S++)D[t[n+S]]++;for(M=k,N=15;N>=1&&0===D[N];N--);if(M>N&&(M=N),0===N)return c[u++]=20971520,c[u++]=20971520,d.bits=1,0;for(E=1;E<N&&0===D[E];E++);for(M<E&&(M=E),A=1,_=1;_<=15;_++)if(A<<=1,(A-=D[_])<0)return-1;if(A>0&&(0===e||1!==N))return-1;for(L[1]=0,_=1;_<15;_++)L[_+1]=L[_]+D[_];for(S=0;S<l;S++)0!==t[n+S]&&(f[L[t[n+S]]++]=S);if(0===e?(R=B=f,g=19):1===e?(R=r,F-=257,B=o,z-=257,g=256):(R=a,B=s,g=-1),O=0,S=0,_=E,y=u,T=M,I=0,m=-1,v=(C=1<<M)-1,1===e&&C>852||2===e&&C>592)return 1;for(;;){b=_-I,f[S]<g?(w=0,x=f[S]):f[S]>g?(w=B[z+f[S]],x=R[F+f[S]]):(w=96,x=0),h=1<<_-I,E=p=1<<T;do{c[y+(O>>I)+(p-=h)]=b<<24|w<<16|x|0}while(0!==p);for(h=1<<_-1;O&h;)h>>=1;if(0!==h?(O&=h-1,O+=h):O=0,S++,0==--D[_]){if(_===N)break;_=t[n+f[S]]}if(_>M&&(O&v)!==m){for(0===I&&(I=M),y+=E,A=1<<(T=_-I);T+I<N&&!((A-=D[T+I])<=0);)T++,A<<=1;if(C+=1<<T,1===e&&C>852||2===e&&C>592)return 1;c[m=O&v]=M<<24|T<<16|y-u|0}}return 0!==O&&(c[y+O]=_-I<<24|64<<16|0),d.bits=M,0}},{"../utils/common":1}],10:[function(e,t,n){t.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"}},{}],11:[function(e,t,n){t.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/inflate.js":[function(e,t,n){var i=e("./zlib/inflate"),r=e("./utils/common"),o=e("./utils/strings"),a=e("./zlib/constants"),s=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),u=Object.prototype.toString;function f(e){if(!(this instanceof f))return new f(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=i.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(s[n]);if(this.header=new c,i.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=i.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(s[n])}function d(e,t){var n=new f(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}f.prototype.push=function(e,t){var n,s,l,c,f,d=this.strm,h=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?d.input=o.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new r.Buf8(h),d.next_out=0,d.avail_out=h),(n=i.inflate(d,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&p&&(n=i.inflateSetDictionary(this.strm,p)),n===a.Z_BUF_ERROR&&!0===m&&(n=a.Z_OK,m=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&n!==a.Z_STREAM_END&&(0!==d.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(d.output,d.next_out),c=d.next_out-l,f=o.buf2string(d.output,l),d.next_out=c,d.avail_out=h-c,c&&r.arraySet(d.output,d.output,l,c,0),this.onData(f)):this.onData(r.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(m=!0)}while((d.avail_in>0||0===d.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(n=i.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),d.avail_out=0,!0)},f.prototype.onData=function(e){this.chunks.push(e)},f.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=f,n.inflate=d,n.inflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},n.ungzip=d},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")})).inflate;return e.Replayer=U,e.unpack=function(e){if("string"!=typeof e)return e;try{if((t=JSON.parse(e)).timestamp)return t}catch(e){}try{var t;if("v1"===(t=JSON.parse(j(e,{to:"string"}))).v)return t;throw new Error("These events were packed with packer "+t.v+" which is incompatible with current packer v1.")}catch(e){throw console.error(e),new Error("Unknown data format.")}},e}({});
//# sourceMappingURL=rrweb-replay-unpack.min.js.map

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

and limitations under the License.
***************************************************************************** */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&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function 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(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 o=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function a(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 a(){var e={line:n,column:r};return function(t){return t.position=new c(e),m(),t}}var c=function(e){this.start=e,this.end={line:n,column:r},this.source=t.source};c.prototype.content=e;var l=[];function u(i){var o=new Error(t.source+":"+n+":"+r+": "+i);if(o.reason=i,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o;l.push(o)}function f(){return h(/^{\s*/)}function d(){return h(/^}/)}function p(){var t,n=[];for(m(),v(n);e.length&&"}"!==e.charAt(0)&&(t=T()||C());)!1!==t&&(n.push(t),v(n));return n}function h(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function m(){h(/^\s*/)}function v(e){var t;for(void 0===e&&(e=[]);t=y();)!1!==t&&e.push(t),t=y();return e}function y(){var t=a();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 o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:"comment",comment:o})}}function g(){var e=h(/^([^{]+)/);if(e)return s(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=a(),t=h(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=s(t[0]);if(!h(/^:\s*/))return u("property missing ':'");var r=h(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:n.replace(o,""),value:r?s(r[0]).replace(o,""):""});return h(/^[;\s]*/),i}}function x(){var e,t=[];if(!f())return u("missing '{'");for(v(t);e=b();)!1!==e&&(t.push(e),v(t)),e=b();return d()?t:u("missing '}'")}function E(){for(var e,t=[],n=a();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:x()})}var S,w=N("import"),M=N("charset"),I=N("namespace");function N(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=a(),r=h(t);if(r){var i={type:e};return i[e]=r[1].trim(),n(i)}}}function T(){if("@"===e[0])return function(){var e=a(),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(!f())return u("@keyframes missing '{'");for(var o=v();r=E();)o.push(r),o=o.concat(v());return d()?e({type:"keyframes",name:i,vendor:n,keyframes:o}):u("@keyframes missing '}'")}}()||function(){var e=a(),t=h(/^@media *([^{]+)/);if(t){var n=s(t[1]);if(!f())return u("@media missing '{'");var r=v().concat(p());return d()?e({type:"media",media:n,rules:r}):u("@media missing '}'")}}()||function(){var e=a(),t=h(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:s(t[1]),media:s(t[2])})}()||function(){var e=a(),t=h(/^@supports *([^{]+)/);if(t){var n=s(t[1]);if(!f())return u("@supports missing '{'");var r=v().concat(p());return d()?e({type:"supports",supports:n,rules:r}):u("@supports missing '}'")}}()||w()||M()||I()||function(){var e=a(),t=h(/^@([-\w]+)?document *([^{]+)/);if(t){var n=s(t[1]),r=s(t[2]);if(!f())return u("@document missing '{'");var i=v().concat(p());return d()?e({type:"document",document:r,vendor:n,rules:i}):u("@document missing '}'")}}()||function(){var e=a();if(h(/^@page */)){var t=g()||[];if(!f())return u("@page missing '{'");for(var n,r=v();n=b();)r.push(n),r=r.concat(v());return d()?e({type:"page",selectors:t,declarations:r}):u("@page missing '}'")}}()||function(){var e=a();if(h(/^@host\s*/)){if(!f())return u("@host missing '{'");var t=v().concat(p());return d()?e({type:"host",rules:t}):u("@host missing '}'")}}()||function(){var e=a();if(h(/^@font-face\s*/)){if(!f())return u("@font-face missing '{'");for(var t,n=v();t=b();)n.push(t),n=n.concat(v());return d()?e({type:"font-face",declarations:n}):u("@font-face missing '}'")}}()}function C(){var e=a(),t=g();return t?(v(),e({type:"rule",selectors:t,declarations:x()})):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],c=t[s];Array.isArray(c)?c.forEach((function(t){e(t,i)})):c&&"object"==typeof c&&e(c,i)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((S=p(),{type:"stylesheet",stylesheet:{source:t.source,rules:S,parsingErrors:l}}))}function s(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 l=/([^\\]):hover/g;function u(e){var t=a(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach((function(t){"selectors"in t&&(t.selectors||[]).forEach((function(t){if(l.test(t)){var n=t.replace(l,"$1.\\:hover");e=e.replace(t,t+", "+n)}}))})),e):e}function f(e,n,r){switch(e.type){case t.Document:return n.implementation.createDocument(null,"",null);case t.DocumentType:return n.implementation.createDocumentType(e.name,e.publicId,e.systemId);case t.Element:var i,o=function(e){var t=c[e.tagName]?c[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);i=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",o):n.createElement(o);var a=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var a=e.attributes[t];if(a="boolean"==typeof a?"":a,t.startsWith("rr_")){if("canvas"===o&&"rr_dataURL"===t){var s=document.createElement("img");s.src=a,s.onload=function(){var e=i.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(i.style.width=a),"rr_height"===t&&(i.style.height=a),"rr_mediaState"===t)switch(a){case"played":i.play();case"paused":i.pause()}}else{var c="textarea"===o&&"value"===t,l="style"===o&&"_cssText"===t;if(l&&r&&(a=u(a)),c||l){for(var f=n.createTextNode(a),d=0,p=Array.from(i.childNodes);d<p.length;d++){var h=p[d];h.nodeType===i.TEXT_NODE&&i.removeChild(h)}return i.appendChild(f),"continue"}if("iframe"===o&&"src"===t)return"continue";try{e.isSVG&&"xlink:href"===t?i.setAttributeNS("http://www.w3.org/1999/xlink",t,a):"onload"==t||"onclick"==t||"onmouse"==t.substring(0,7)?i.setAttribute("_"+t,a):i.setAttribute(t,a)}catch(e){}}};for(var s in e.attributes)a(s);return i;case t.Text:return n.createTextNode(e.isStyle&&r?u(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function d(e,n,r,i,o){void 0===i&&(i=!1),void 0===o&&(o=!0);var a=f(e,n,o);if(!a)return null;if(e.type===t.Document&&(n.close(),n.open(),a=n),a.__sn=e,r[e.id]=a,(e.type===t.Document||e.type===t.Element)&&!i)for(var s=0,c=e.childNodes;s<c.length;s++){var l=c[s],u=d(l,n,r,!1,o);u?a.appendChild(u):console.warn("Failed to rebuild",l)}return a}function p(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 h=Object.freeze({__proto__:null,default:p});var m,v,y,g,b,x=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,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!==c(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]&&(c(arguments[0])?i.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):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!==c(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!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var n=d(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 c(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function l(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 f(e){var t=l(e,"Y")&&u(e,"Y"),n=l(e,"X")&&u(e,"X");return t||n}function d(e){for(;e!==t.body&&!1===f(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 c,l,u,f,d=o();n===t.body?(c=e,l=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,f=i.scroll):(c=n,l=n.scrollLeft,u=n.scrollTop,f=s),p({scrollable:c,method:f,startTime:d,startX:l,startY:u,x:r,y:a})}}}})).polyfill;!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"}(m||(m={})),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"}(v||(v={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(y||(y={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(g||(g={})),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"}(b||(b={}));var E,S=function(){function e(e,t){void 0===t&&(t=[]),this.timeOffset=0,this.actions=t,this.config=e}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){var t;(t=this.actions).push.apply(t,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}(e))},e.prototype.start=function(){this.actions.sort((function(e,t){return e.delay-t.delay})),this.timeOffset=0;var e=performance.now(),t=this.actions,n=this.config,r=this;this.raf=requestAnimationFrame((function i(o){for(r.timeOffset+=(o-e)*n.speed,e=o;t.length;){var a=t[0];if(!(r.timeOffset>=a.delay))break;t.shift(),a.doAction()}(t.length>0||r.config.liveMode)&&(r.raf=requestAnimationFrame(i))}))},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},e.prototype.findActionIndex=function(e){for(var t=0,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r;n=r-1}}return t},e}();function w(e,t){if(e.type===m.IncrementalSnapshot&&e.data.source===v.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.timestamp-t}
***************************************************************************** */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&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function 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(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 o=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function a(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 a(){var e={line:n,column:r};return function(t){return t.position=new c(e),m(),t}}var c=function(e){this.start=e,this.end={line:n,column:r},this.source=t.source};c.prototype.content=e;var l=[];function u(i){var o=new Error(t.source+":"+n+":"+r+": "+i);if(o.reason=i,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o;l.push(o)}function d(){return h(/^{\s*/)}function f(){return h(/^}/)}function p(){var t,n=[];for(m(),v(n);e.length&&"}"!==e.charAt(0)&&(t=I()||C());)!1!==t&&(n.push(t),v(n));return n}function h(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function m(){h(/^\s*/)}function v(e){var t;for(void 0===e&&(e=[]);t=y();)!1!==t&&e.push(t),t=y();return e}function y(){var t=a();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 o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:"comment",comment:o})}}function g(){var e=h(/^([^{]+)/);if(e)return s(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=a(),t=h(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=s(t[0]);if(!h(/^:\s*/))return u("property missing ':'");var r=h(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:n.replace(o,""),value:r?s(r[0]).replace(o,""):""});return h(/^[;\s]*/),i}}function x(){var e,t=[];if(!d())return u("missing '{'");for(v(t);e=b();)!1!==e&&(t.push(e),v(t)),e=b();return f()?t:u("missing '}'")}function S(){for(var e,t=[],n=a();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:x()})}var E,w=N("import"),M=N("charset"),T=N("namespace");function N(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=a(),r=h(t);if(r){var i={type:e};return i[e]=r[1].trim(),n(i)}}}function I(){if("@"===e[0])return function(){var e=a(),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 o=v();r=S();)o.push(r),o=o.concat(v());return f()?e({type:"keyframes",name:i,vendor:n,keyframes:o}):u("@keyframes missing '}'")}}()||function(){var e=a(),t=h(/^@media *([^{]+)/);if(t){var n=s(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=a(),t=h(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:s(t[1]),media:s(t[2])})}()||function(){var e=a(),t=h(/^@supports *([^{]+)/);if(t){var n=s(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 '}'")}}()||w()||M()||T()||function(){var e=a(),t=h(/^@([-\w]+)?document *([^{]+)/);if(t){var n=s(t[1]),r=s(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=a();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=a();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=a();if(h(/^@font-face\s*/)){if(!d())return u("@font-face missing '{'");for(var t,n=v();t=b();)n.push(t),n=n.concat(v());return f()?e({type:"font-face",declarations:n}):u("@font-face missing '}'")}}()}function C(){var e=a(),t=g();return t?(v(),e({type:"rule",selectors:t,declarations:x()})):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],c=t[s];Array.isArray(c)?c.forEach((function(t){e(t,i)})):c&&"object"==typeof c&&e(c,i)}r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:n||null});return t}((E=p(),{type:"stylesheet",stylesheet:{source:t.source,rules:E,parsingErrors:l}}))}function s(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 l=/([^\\]):hover/g;function u(e){var t=a(e,{silent:!0});return t.stylesheet?(t.stylesheet.rules.forEach((function(t){"selectors"in t&&(t.selectors||[]).forEach((function(t){if(l.test(t)){var n=t.replace(l,"$1.\\:hover");e=e.replace(t,t+", "+n)}}))})),e):e}function d(e,n,r){switch(e.type){case t.Document:return n.implementation.createDocument(null,"",null);case t.DocumentType:return n.implementation.createDocumentType(e.name,e.publicId,e.systemId);case t.Element:var i,o=function(e){var t=c[e.tagName]?c[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);i=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",o):n.createElement(o);var a=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var a=e.attributes[t];if(a="boolean"==typeof a?"":a,t.startsWith("rr_")){if("canvas"===o&&"rr_dataURL"===t){var s=document.createElement("img");s.src=a,s.onload=function(){var e=i.getContext("2d");e&&e.drawImage(s,0,0,s.width,s.height)}}if("rr_width"===t&&(i.style.width=a),"rr_height"===t&&(i.style.height=a),"rr_mediaState"===t)switch(a){case"played":i.play();case"paused":i.pause()}}else{var c="textarea"===o&&"value"===t,l="style"===o&&"_cssText"===t;if(l&&r&&(a=u(a)),c||l){for(var d=n.createTextNode(a),f=0,p=Array.from(i.childNodes);f<p.length;f++){var h=p[f];h.nodeType===i.TEXT_NODE&&i.removeChild(h)}return i.appendChild(d),"continue"}if("iframe"===o&&"src"===t)return"continue";try{e.isSVG&&"xlink:href"===t?i.setAttributeNS("http://www.w3.org/1999/xlink",t,a):"onload"==t||"onclick"==t||"onmouse"==t.substring(0,7)?i.setAttribute("_"+t,a):i.setAttribute(t,a)}catch(e){}}};for(var s in e.attributes)a(s);return i;case t.Text:return n.createTextNode(e.isStyle&&r?u(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function f(e,n,r,i,o){void 0===i&&(i=!1),void 0===o&&(o=!0);var a=d(e,n,o);if(!a)return null;if(e.type===t.Document&&(n.close(),n.open(),a=n),a.__sn=e,r[e.id]=a,(e.type===t.Document||e.type===t.Element)&&!i)for(var s=0,c=e.childNodes;s<c.length;s++){var l=c[s],u=f(l,n,r,!1,o);u?a.appendChild(u):console.warn("Failed to rebuild",l)}return a}function p(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 h=Object.freeze({__proto__:null,default:p});var m,v,y,g,b,x=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,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!==c(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]&&(c(arguments[0])?i.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):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!==c(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!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==c(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 c(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function l(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=l(e,"Y")&&u(e,"Y"),n=l(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 c,l,u,d,f=o();n===t.body?(c=e,l=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(c=n,l=n.scrollLeft,u=n.scrollTop,d=s),p({scrollable:c,method:d,startTime:f,startX:l,startY:u,x:r,y:a})}}}})).polyfill;!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"}(m||(m={})),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"}(v||(v={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd"}(y||(y={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause"}(g||(g={})),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"}(b||(b={}));var S,E=function(){function e(e,t){void 0===e&&(e=[]),this.timeOffset=0,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,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}(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.actions.length=0},e.prototype.setSpeed=function(e){this.speed=e},e.prototype.toggleLiveMode=function(e){this.liveMode=e},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 w(e,t){if(e.type===m.IncrementalSnapshot&&e.data.source===v.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 M={type:"xstate.init"};function I(e){return void 0===e?[]:[].concat(e)}function N(e){return{type:"xstate.assign",assignment:e}}function T(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function C(e){return function(t){return e===t}}function A(e){return"string"==typeof e?{type:e}:e}function k(e,t){return{value:e,context:t,actions:[],changed:!1,matches:C(e)}}var _=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};var F={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return F.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete F.map[t],e.childNodes&&e.childNodes.forEach((function(e){return F.removeNodeFromMap(e)}))},has:function(e){return F.map.hasOwnProperty(e)}};var O=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=F.getNode(e);null==n||n.childNodes.forEach((function(e){return i(e.__sn.id)}))},o=function(n){t.removeIdSet.add(n.id),Object.values(n.children).forEach((function(e){return o(e)}));var r=t.indexes.get(n.id);if(r){var i=r.parent;i&&(delete r.parent,delete i.children[r.id],t.indexes.delete(e.id))}};r?n?(delete r.parent,delete n.children[r.id],this.indexes.delete(e.id),o(r)):(delete this.tree[r.id],this.indexes.delete(r.id),o(r)):(this.removeNodeMutations.push(e),i(e.id))},e.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},e.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},e.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},e.prototype.input=function(e){this.inputMap.set(e.id,e)},e.prototype.flush=function(){var e,t,n,i,o=this,a=this.tree,s=this.removeNodeMutations,c=this.textMutations,l=this.attributeMutations,u={source:v.Mutation,removes:s,texts:c,attributes:l,adds:[]},f=function(e,t){t&&o.removeIdSet.add(e.id),u.texts=u.texts.concat(t?[]:e.texts).filter((function(e){return!o.removeIdSet.has(e.id)})),u.attributes=u.attributes.concat(t?[]:e.attributes).filter((function(e){return!o.removeIdSet.has(e.id)})),o.removeIdSet.has(e.id)||o.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return f(e,!0)})):(u.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return f(e,!1)})))};Object.values(a).forEach((function(e){return f(e,!1)}));try{for(var d=r(this.scrollMap.keys()),p=d.next();!p.done;p=d.next()){var h=p.value;this.removeIdSet.has(h)&&this.scrollMap.delete(h)}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var m=r(this.inputMap.keys()),y=m.next();!y.done;y=m.next()){h=y.value;this.removeIdSet.has(h)&&this.inputMap.delete(h)}}catch(e){n={error:e}}finally{try{y&&!y.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}var g=new Map(this.scrollMap),b=new Map(this.inputMap);return this.reset(),{mutationData:u,scrollMap:g,inputMap:b}},e.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},e}();function D(e,t){var i=t.getCastFn,o=t.emitter;return function(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),_(t,A(i)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(){return n=E.Running,_(t,M),i},stop:function(){return n=E.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}(function(e,t){void 0===t&&(t={});var n={config:e,_options:t,initialState:{value:e.initial,actions:I(e.states[e.initial].entry).map((function(e){return T(e,t.actions)})),context:e.context,matches:C(e.initial)},transition:function(t,r){var i,o,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,c=a.context,l=A(r),u=e.states[s];if(u.on){var f=I(u.on[l.type]),d=function(t){if(void 0===t)return{value:k(s,c)};var r="string"==typeof t?{target:t}:t,i=r.target,o=void 0===i?s:i,a=r.actions,f=void 0===a?[]:a,d=r.cond,p=c;if((void 0===d?function(){return!0}:d)(c,l)){var h=e.states[o],m=!1,v=[].concat(u.exit,f,h.entry).filter((function(e){return e})).map((function(e){return T(e,n._options.actions)})).filter((function(e){if("xstate.assign"===e.type){m=!0;var t=Object.assign({},p);return"function"==typeof e.assignment?t=e.assignment(p,l):Object.keys(e.assignment).forEach((function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](p,l):e.assignment[n]})),p=t,!1}return!0}));return{value:{value:o,context:p,actions:v,changed:o!==s||v.length>0||m,matches:C(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}}}}(f),h=p.next();!h.done;h=p.next()){var m=d(h.value);if("object"==typeof m)return m.value}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}}return k(s,c)}};return n}({id:"player",context:e,initial:"inited",states:{inited:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},TO_LIVE:{target:"live",actions:["startLive"]}}},playing:{on:{PAUSE:{target:"paused",actions:["pause"]},END:"ended",FAST_FORWARD:"skipping",CAST_EVENT:{target:"playing",actions:"castEvent"}}},paused:{on:{RESUME:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"}}},skipping:{on:{BACK_TO_NORMAL:"playing"}},ended:{on:{REPLAY:"playing"}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]}}}}},{actions:{castEvent:N({lastPlayedEvent:function(t,n){return"CAST_EVENT"===n.type?n.payload.event:e.lastPlayedEvent}}),recordTimeOffset:N((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=e.timer,s=e.events,c=e.baselineTime,l=e.lastPlayedEvent;a.clear();var u=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===m.Meta&&r.timestamp<=t)return e.slice(n)}return e}(s,c),f=new Array,d=function(e){if(l&&l.timestamp>c&&(e.timestamp<=l.timestamp||e===l))return"continue";var t=e.timestamp<c;if(t&&!function(e){switch(e.type){case m.DomContentLoaded:case m.Load:case m.Custom:return!1;case m.FullSnapshot:case m.Meta:return!0}switch(e.data.source){case v.MouseMove:case v.MouseInteraction:case v.TouchMove:case v.MediaInteraction:return!1;case v.ViewportResize:case v.StyleSheetRule:case v.Scroll:case v.Input:return!0}return!0}(e))return"continue";var n=i(e,t);t?n():f.push({doAction:function(){n(),o.emit(b.EventCast,e)},delay:w(e,c)})};try{for(var p=r(u),h=p.next();!h.done;h=p.next()){d(h.value)}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}o.emit(b.Flush),a.addActions(f),a.start()},pause:function(e){e.timer.clear()},startLive:N({baselineTime:function(e,t){return e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:N((function(e,t){var r=e.baselineTime,a=e.timer,s=e.events;if("ADD_EVENT"===t.type){var c=t.payload.event;s.push(c);var l=c.timestamp<r,u=i(c,l);l?u():a.addAction({doAction:function(){u(),o.emit(b.EventCast,c)},delay:w(c,r)})}return n(n({},e),{events:s})}))}}))}var R=p||h,L={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0},P=function(){function e(e,n){var o=this;if(this.emitter=R(),this.noramlSpeed=-1,this.legacy_missingNodeRetryMap={},!(null==n?void 0:n.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");this.config=Object.assign({},L,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on(b.Resize,this.handleResize),x(),"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),this.setupDom(),this.treeIndex=new O,this.fragmentParentMap=new Map,this.emitter.on(b.Flush,(function(){var e,n,a,s,c,l,u=o.treeIndex.flush(),f=u.scrollMap,d=u.inputMap;try{for(var p=r(f.values()),h=p.next();!h.done;h=p.next()){var m=h.value;o.applyScroll(m)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(e)throw e.error}}try{for(var v=r(d.values()),y=v.next();!y.done;y=v.next()){m=y.value;o.applyInput(m)}}catch(e){a={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}try{for(var g=r(o.fragmentParentMap.entries()),b=g.next();!b.done;b=g.next()){var x=i(b.value,2),E=x[0],S=x[1];F.map[S.__sn.id]=S,S.__sn.type===t.Element&&"textarea"===S.__sn.tagName&&E.textContent&&(S.value=E.textContent),S.appendChild(E)}}catch(e){c={error:e}}finally{try{b&&!b.done&&(l=g.return)&&l.call(g)}finally{if(c)throw c.error}}o.fragmentParentMap.clear()})),this.service=D({events:e.map((function(e){return n&&n.unpackFn?n.unpackFn(e):e})),timer:new S(this.config),speed:(null==n?void 0:n.speed)||L.speed,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){e.changed}));var a=this.service.state.context.events,s=a.find((function(e){return e.type===m.Meta})),c=a.find((function(e){return e.type===m.FullSnapshot}));if(s){var l=s.data,u=l.width,f=l.height;this.emitter.emit(b.Resize,{width:u,height:f})}c&&this.rebuildFullSnapshot(c)}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){this.emitter.on(e,t)},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(n){t.config[n]=e[n]})),this.config.skipInactive||(this.noramlSpeed=-1)},e.prototype.getMetaData=function(){var e=this.service.state.context.events,t=e[0],n=e[e.length-1];return{startTime:t.timestamp,endTime:n.timestamp,totalTime:n.timestamp-t.timestamp}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},e.prototype.play=function(e){void 0===e&&(e=0),"ended"===this.service.state.value&&this.service.send({type:"REPLAY"}),"paused"===this.service.state.value?this.service.send({type:"RESUME",payload:{timeOffset:e}}):this.service.send({type:"PLAY",payload:{timeOffset:e}}),this.emitter.emit(b.Start)},e.prototype.pause=function(){this.service.send({type:"PAUSE"}),this.emitter.emit(b.Pause)},e.prototype.resume=function(e){void 0===e&&(e=0),this.service.send({type:"RESUME",payload:{timeOffset:e}}),this.emitter.emit(b.Resume)},e.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},e.prototype.addEvent=function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))},e.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},e.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.disableInteract(),this.wrapper.appendChild(this.iframe)},e.prototype.handleResize=function(e){this.iframe.setAttribute("width",String(e.width)),this.iframe.setAttribute("height",String(e.height))},e.prototype.getCastFn=function(e,t){var n=this;void 0===t&&(t=!1);var i,o=this.service.state.context.events;switch(e.type){case m.DomContentLoaded:case m.Load:break;case m.Custom:i=function(){n.emitter.emit(b.CustomEvent,e)};break;case m.Meta:i=function(){return n.emitter.emit(b.Resize,{width:e.data.width,height:e.data.height})};break;case m.FullSnapshot:i=function(){n.rebuildFullSnapshot(e),n.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case m.IncrementalSnapshot:i=function(){var i,a;if(n.applyIncremental(e,t),e===n.nextUserInteractionEvent&&(n.nextUserInteractionEvent=null,n.restoreSpeed()),n.config.skipInactive&&!n.nextUserInteractionEvent){try{for(var s=r(o),c=s.next();!c.done;c=s.next()){var l=c.value;if(!(l.timestamp<=e.timestamp)&&n.isUserInteraction(l)){l.delay-e.delay>1e4*n.config.speed&&(n.nextUserInteractionEvent=l);break}}}catch(e){i={error:e}}finally{try{c&&!c.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}if(n.nextUserInteractionEvent){n.noramlSpeed=n.config.speed;var u=n.nextUserInteractionEvent.delay-e.delay,f={speed:Math.min(Math.round(u/5e3),360)};n.setConfig(f),n.emitter.emit(b.SkipStart,f)}}}}return function(){i&&i(),n.service.send({type:"CAST_EVENT",payload:{event:e}}),e===o[o.length-1]&&(n.restoreSpeed(),n.service.send("END"),n.emitter.emit(b.Finish))}},e.prototype.rebuildFullSnapshot=function(e){if(!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={},F.map=function(e,t,n){void 0===n&&(n=!0);var r={};return[d(e,t,r,!1,n),r]}(e.data.node,this.iframe.contentDocument)[1];var t=document.createElement("style"),n=this.iframe.contentDocument,r=n.documentElement,i=n.head;r.insertBefore(t,i);for(var o,a=(o=this.config.blockClass,["iframe, ."+o+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules),s=0;s<a.length;s++)t.sheet.insertRule(a[s],s);this.emitter.emit(b.FullsnapshotRebuilded,e),this.waitForStylesheetLoad()},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;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.resume(t.getCurrentTime()),t.emitter.emit(b.LoadStylesheetEnd),r&&window.clearTimeout(r))})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(b.LoadStylesheetStart),r=window.setTimeout((function(){o.matches("playing")&&t.resume(t.getCurrentTime()),r=-1}),this.config.loadTimeout))}},e.prototype.applyIncremental=function(e,t){var n=this,r=this.service.state.context.baselineTime,i=e.data;switch(i.source){case v.Mutation:t&&(i.adds.forEach((function(e){return n.treeIndex.add(e)})),i.texts.forEach((function(e){return n.treeIndex.text(e)})),i.attributes.forEach((function(e){return n.treeIndex.attribute(e)})),i.removes.forEach((function(e){return n.treeIndex.remove(e)}))),this.applyMutation(i,t);break;case v.MouseMove:if(t){var o=i.positions[i.positions.length-1];this.moveAndHover(i,o.x,o.y,o.id)}else i.positions.forEach((function(t){var o={doAction:function(){n.moveAndHover(i,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-r};n.timer.addAction(o)}));break;case v.MouseInteraction:if(-1===i.id)break;var a=new Event(y[i.type].toLowerCase());if(!(l=F.getNode(i.id)))return this.debugNodeNotFound(i,i.id);this.emitter.emit(b.MouseInteraction,{type:i.type,target:l});var s=this.config.triggerFocus;switch(i.type){case y.Blur:"blur"in l&&l.blur();break;case y.Focus:s&&l.focus&&l.focus({preventScroll:!0});break;case y.Click:case y.TouchStart:case y.TouchEnd:t||(this.moveAndHover(i,i.x,i.y,i.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:l.dispatchEvent(a)}break;case v.Scroll:if(-1===i.id)break;if(t){this.treeIndex.scroll(i);break}this.applyScroll(i);break;case v.ViewportResize:this.emitter.emit(b.Resize,{width:i.width,height:i.height});break;case v.Input:if(-1===i.id)break;if(t){this.treeIndex.input(i);break}this.applyInput(i);break;case v.MediaInteraction:if(!(l=F.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var c=l;i.type===g.Pause&&c.pause(),i.type===g.Play&&(c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?c.play():c.addEventListener("canplay",(function(){c.play()})));break;case v.StyleSheetRule:var l;if(!(l=F.getNode(i.id)))return this.debugNodeNotFound(i,i.id);var u=l.sheet;i.adds&&i.adds.forEach((function(e){var t=e.rule,n=e.index,r=void 0===n?void 0:Math.min(n,u.rules.length);try{u.insertRule(t,r)}catch(e){}})),i.removes&&i.removes.forEach((function(e){var t=e.index;u.deleteRule(t)}))}},e.prototype.applyMutation=function(e,t){var r=this;e.removes.forEach((function(t){var n=F.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);var i=F.getNode(t.parentId);if(!i)return r.warnNodeNotFound(e,t.parentId);if(F.removeNodeFromMap(n),i){var o=r.fragmentParentMap.get(i);o&&o.contains(n)?o.removeChild(n):i.removeChild(n)}}));var i=n({},this.legacy_missingNodeRetryMap),o=[],a=function(e){if(!r.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var n=F.getNode(e.parentId);if(!n)return o.push(e);var a=r.iframe.contentDocument.contains(n);if(t&&a){var s=document.createDocumentFragment();for(F.map[e.parentId]=s,r.fragmentParentMap.set(s,n);n.firstChild;)s.appendChild(n.firstChild);n=s}var c=null,l=null;if(e.previousId&&(c=F.getNode(e.previousId)),e.nextId&&(l=F.getNode(e.nextId)),null!==e.nextId&&-1!==e.nextId&&!l)return o.push(e);var u=d(e.node,r.iframe.contentDocument,F.map,!0);-1!==e.previousId&&-1!==e.nextId?(c&&c.nextSibling&&c.nextSibling.parentNode?n.insertBefore(u,c.nextSibling):l&&l.parentNode?n.contains(l)?n.insertBefore(u,l):n.insertBefore(u,null):n.appendChild(u),(e.previousId||e.nextId)&&r.legacy_resolveMissingNode(i,n,u,e)):i[e.node.id]={node:u,mutation:e}};for(e.adds.forEach((function(e){a(e)}));o.length;){if(o.every((function(e){return!Boolean(F.getNode(e.parentId))})))return o.forEach((function(t){return r.warnNodeNotFound(e,t.node.id)}));var s=o.shift();a(s)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),e.texts.forEach((function(t){var n=F.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);r.fragmentParentMap.has(n)&&(n=r.fragmentParentMap.get(n)),n.textContent=t.value})),e.attributes.forEach((function(t){var n=F.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);for(var i in r.fragmentParentMap.has(n)&&(n=r.fragmentParentMap.get(n)),t.attributes)if("string"==typeof i){var o=t.attributes[i];null!==o?n.setAttribute(i,o):n.removeAttribute(i)}}))},e.prototype.applyScroll=function(e){var t=F.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=F.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}},e.prototype.legacy_resolveMissingNode=function(e,t,n,r){var i=r.previousId,o=r.nextId,a=i&&e[i],s=o&&e[o];if(a){var c=a,l=c.node,u=c.mutation;t.insertBefore(l,n),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,l,u)}if(s){var f=s;l=f.node,u=f.mutation;t.insertBefore(l,n.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,l,u)}},e.prototype.moveAndHover=function(e,t,n,r){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px";var i=F.getNode(r);if(!i)return this.debugNodeNotFound(e,r);this.hoverElements(i)},e.prototype.hoverElements=function(e){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")}));for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement},e.prototype.isUserInteraction=function(e){return e.type===m.IncrementalSnapshot&&(e.data.source>v.Mutation&&e.data.source<=v.Input)},e.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var e={speed:this.noramlSpeed};this.setConfig(e),this.emitter.emit(b.SkipEnd,e),this.noramlSpeed=-1}},e.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn("[replayer]","Node with id '"+t+"' not found in",e)},e.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log("[replayer]","Node with id '"+t+"' not found in",e)},e}();return e.Replayer=P,e}({});
***************************************************************************** */!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(S||(S={}));var M={type:"xstate.init"};function T(e){return void 0===e?[]:[].concat(e)}function N(e){return{type:"xstate.assign",assignment:e}}function I(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function C(e){return function(t){return e===t}}function A(e){return"string"==typeof e?{type:e}:e}function k(e,t){return{value:e,context:t,actions:[],changed:!1,matches:C(e)}}function _(e,t){void 0===t&&(t={});var n={config:e,_options:t,initialState:{value:e.initial,actions:T(e.states[e.initial].entry).map((function(e){return I(e,t.actions)})),context:e.context,matches:C(e.initial)},transition:function(t,r){var i,o,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,c=a.context,l=A(r),u=e.states[s];if(u.on){var d=T(u.on[l.type]),f=function(t){if(void 0===t)return{value:k(s,c)};var r="string"==typeof t?{target:t}:t,i=r.target,o=void 0===i?s:i,a=r.actions,d=void 0===a?[]:a,f=r.cond,p=c;if((void 0===f?function(){return!0}:f)(c,l)){var h=e.states[o],m=!1,v=[].concat(u.exit,d,h.entry).filter((function(e){return e})).map((function(e){return I(e,n._options.actions)})).filter((function(e){if("xstate.assign"===e.type){m=!0;var t=Object.assign({},p);return"function"==typeof e.assignment?t=e.assignment(p,l):Object.keys(e.assignment).forEach((function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](p,l):e.assignment[n]})),p=t,!1}return!0}));return{value:{value:o,context:p,actions:v,changed:o!==s||v.length>0||m,matches:C(o)}}}};try{for(var p=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}(d),h=p.next();!h.done;h=p.next()){var m=f(h.value);if("object"==typeof m)return m.value}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}}return k(s,c)}};return n}var F=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function D(e){var t=e.initialState,n=S.NotStarted,r=new Set,i={_machine:e,send:function(i){n===S.Running&&(t=e.transition(t,i),F(t,A(i)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(){return n=S.Running,F(t,M),i},stop:function(){return n=S.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}var O={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return O.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete O.map[t],e.childNodes&&e.childNodes.forEach((function(e){return O.removeNodeFromMap(e)}))},has:function(e){return O.map.hasOwnProperty(e)}};var L=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=O.getNode(e);null==n||n.childNodes.forEach((function(e){return i(e.__sn.id)}))},o=function(n){t.removeIdSet.add(n.id),Object.values(n.children).forEach((function(e){return o(e)}));var r=t.indexes.get(n.id);if(r){var i=r.parent;i&&(delete r.parent,delete i.children[r.id],t.indexes.delete(e.id))}};r?n?(delete r.parent,delete n.children[r.id],this.indexes.delete(e.id),o(r)):(delete this.tree[r.id],this.indexes.delete(r.id),o(r)):(this.removeNodeMutations.push(e),i(e.id))},e.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},e.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},e.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},e.prototype.input=function(e){this.inputMap.set(e.id,e)},e.prototype.flush=function(){var e,t,n,i,o=this,a=this.tree,s=this.removeNodeMutations,c=this.textMutations,l=this.attributeMutations,u={source:v.Mutation,removes:s,texts:c,attributes:l,adds:[]},d=function(e,t){t&&o.removeIdSet.add(e.id),u.texts=u.texts.concat(t?[]:e.texts).filter((function(e){return!o.removeIdSet.has(e.id)})),u.attributes=u.attributes.concat(t?[]:e.attributes).filter((function(e){return!o.removeIdSet.has(e.id)})),o.removeIdSet.has(e.id)||o.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return d(e,!0)})):(u.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return d(e,!1)})))};Object.values(a).forEach((function(e){return d(e,!1)}));try{for(var f=r(this.scrollMap.keys()),p=f.next();!p.done;p=f.next()){var h=p.value;this.removeIdSet.has(h)&&this.scrollMap.delete(h)}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}try{for(var m=r(this.inputMap.keys()),y=m.next();!y.done;y=m.next()){h=y.value;this.removeIdSet.has(h)&&this.inputMap.delete(h)}}catch(e){n={error:e}}finally{try{y&&!y.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}var g=new Map(this.scrollMap),b=new Map(this.inputMap);return this.reset(),{mutationData:u,scrollMap:g,inputMap:b}},e.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},e}();function R(e,t){var i=t.getCastFn,o=t.emitter;return 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"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]}}}}},{actions:{castEvent:N({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:N((function(e,t){var r=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(r=t.payload.timeOffset),n(n({},e),{timeOffset:r,baselineTime:e.events[0].timestamp+r})})),play:function(e){var t,n,a,s,c=e.timer,l=e.events,u=e.baselineTime,d=e.lastPlayedEvent;c.clear();try{for(var f=r(l),p=f.next();!p.done;p=f.next()){w(p.value,u)}}catch(e){t={error:e}}finally{try{p&&!p.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}var h=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===m.Meta&&r.timestamp<=t)return e.slice(n)}return e}(l,u),y=new Array,g=function(e){if(d&&d.timestamp<u&&(e.timestamp<=d.timestamp||e===d))return"continue";var t=e.timestamp<u;if(t&&!function(e){switch(e.type){case m.DomContentLoaded:case m.Load:case m.Custom:return!1;case m.FullSnapshot:case m.Meta:return!0}switch(e.data.source){case v.MouseMove:case v.MouseInteraction:case v.TouchMove:case v.MediaInteraction:return!1;case v.ViewportResize:case v.StyleSheetRule:case v.Scroll:case v.Input:return!0}return!0}(e))return"continue";var n=i(e,t);t?n():y.push({doAction:function(){n(),o.emit(b.EventCast,e)},delay:e.delay})};try{for(var x=r(h),S=x.next();!S.done;S=x.next()){g(S.value)}}catch(e){a={error:e}}finally{try{S&&!S.done&&(s=x.return)&&s.call(x)}finally{if(a)throw a.error}}o.emit(b.Flush),c.addActions(y),c.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:N((function(e){return n(n({},e),{lastPlayedEvent:null})})),startLive:N({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:N((function(e,t){var r=e.baselineTime,a=e.timer,s=e.events;if("ADD_EVENT"===t.type){var c=t.payload.event;w(c,r),s.push(c);var l=c.timestamp<r,u=i(c,l);l?u():a.addAction({doAction:function(){u(),o.emit(b.EventCast,c)},delay:c.delay})}return n(n({},e),{events:s})}))}}))}var P=p||h,j={speed:1,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0},B=function(){function e(e,n){var o=this;if(this.emitter=P(),this.legacy_missingNodeRetryMap={},!(null==n?void 0:n.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");this.config=Object.assign({},j,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.emitter.on(b.Resize,this.handleResize),x(),"NodeList"in window&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),this.setupDom(),this.treeIndex=new L,this.fragmentParentMap=new Map,this.emitter.on(b.Flush,(function(){var e,n,a,s,c,l,u=o.treeIndex.flush(),d=u.scrollMap,f=u.inputMap;try{for(var p=r(d.values()),h=p.next();!h.done;h=p.next()){var m=h.value;o.applyScroll(m)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(e)throw e.error}}try{for(var v=r(f.values()),y=v.next();!y.done;y=v.next()){m=y.value;o.applyInput(m)}}catch(e){a={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}try{for(var g=r(o.fragmentParentMap.entries()),b=g.next();!b.done;b=g.next()){var x=i(b.value,2),S=x[0],E=x[1];O.map[E.__sn.id]=E,E.__sn.type===t.Element&&"textarea"===E.__sn.tagName&&S.textContent&&(E.value=S.textContent),E.appendChild(S)}}catch(e){c={error:e}}finally{try{b&&!b.done&&(l=g.return)&&l.call(g)}finally{if(c)throw c.error}}o.fragmentParentMap.clear()}));var a=new E([],(null==n?void 0:n.speed)||j.speed);this.service=R({events:e.map((function(e){return n&&n.unpackFn?n.unpackFn(e):e})),timer:a,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){o.emitter.emit(b.StateChange,{player:e})})),this.speedService=D(_({id:"speed",context:{normalSpeed:-1,timer:a},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:N({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(e){o.emitter.emit(b.StateChange,{speed:e})}));var s=this.service.state.context.events.find((function(e){return e.type===m.Meta})),c=this.service.state.context.events.find((function(e){return e.type===m.FullSnapshot}));if(s){var l=s.data,u=l.width,d=l.height;setTimeout((function(){o.emitter.emit(b.Resize,{width:u,height:d})}),0)}c&&this.rebuildFullSnapshot(c)}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){this.emitter.on(e,t)},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(n){t.config[n]=e[n]})),this.config.skipInactive||this.backToNormal()},e.prototype.getMetaData=function(){var e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},e.prototype.play=function(e){void 0===e&&(e=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}}),this.emitter.emit(b.Start)},e.prototype.pause=function(e){void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),this.emitter.emit(b.Pause)},e.prototype.resume=function(e){void 0===e&&(e=0),console.warn("The 'resume' will be departed in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(b.Resume)},e.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},e.prototype.addEvent=function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))},e.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},e.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.disableInteract(),this.wrapper.appendChild(this.iframe)},e.prototype.handleResize=function(e){this.iframe.setAttribute("width",String(e.width)),this.iframe.setAttribute("height",String(e.height))},e.prototype.getCastFn=function(e,t){var n,i=this;switch(void 0===t&&(t=!1),e.type){case m.DomContentLoaded:case m.Load:break;case m.Custom:n=function(){i.emitter.emit(b.CustomEvent,e)};break;case m.Meta:n=function(){return i.emitter.emit(b.Resize,{width:e.data.width,height:e.data.height})};break;case m.FullSnapshot:n=function(){i.rebuildFullSnapshot(e),i.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case m.IncrementalSnapshot:n=function(){var n,o;if(i.applyIncremental(e,t),!t&&(e===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.backToNormal()),i.config.skipInactive&&!i.nextUserInteractionEvent)){try{for(var a=r(i.service.state.context.events),s=a.next();!s.done;s=a.next()){var c=s.value;if(!(c.timestamp<=e.timestamp)&&i.isUserInteraction(c)){c.delay-e.delay>1e4*i.speedService.state.context.timer.speed&&(i.nextUserInteractionEvent=c);break}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}if(i.nextUserInteractionEvent){var l=i.nextUserInteractionEvent.delay-e.delay,u={speed:Math.min(Math.round(l/5e3),360)};i.speedService.send({type:"FAST_FORWARD",payload:u}),i.emitter.emit(b.SkipStart,u)}}}}return function(){n&&n(),i.service.send({type:"CAST_EVENT",payload:{event:e}}),e===i.service.state.context.events[i.service.state.context.events.length-1]&&(i.backToNormal(),i.service.send("END"),i.emitter.emit(b.Finish))}},e.prototype.rebuildFullSnapshot=function(e){if(!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={},O.map=function(e,t,n){void 0===n&&(n=!0);var r={};return[f(e,t,r,!1,n),r]}(e.data.node,this.iframe.contentDocument)[1];var t=document.createElement("style"),n=this.iframe.contentDocument,r=n.documentElement,i=n.head;r.insertBefore(t,i);for(var o,a=(o=this.config.blockClass,["iframe, ."+o+" { background: #ccc }","noscript { display: none !important; }"]).concat(this.config.insertStyleRules),s=0;s<a.length;s++)t.sheet.insertRule(a[s],s);this.emitter.emit(b.FullsnapshotRebuilded,e),this.waitForStylesheetLoad()},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=this.service.subscribe((function(e){o=e})).unsubscribe;n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(i.add(e),e.addEventListener("load",(function(){i.delete(e),0===i.size&&-1!==r&&(o.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(b.LoadStylesheetEnd),r&&window.clearTimeout(r),a())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(b.LoadStylesheetStart),r=window.setTimeout((function(){o.matches("playing")&&t.play(t.getCurrentTime()),r=-1,a()}),this.config.loadTimeout))}},e.prototype.applyIncremental=function(e,t){var n=this,r=e.data;switch(r.source){case v.Mutation:t&&(r.adds.forEach((function(e){return n.treeIndex.add(e)})),r.texts.forEach((function(e){return n.treeIndex.text(e)})),r.attributes.forEach((function(e){return n.treeIndex.attribute(e)})),r.removes.forEach((function(e){return n.treeIndex.remove(e)}))),this.applyMutation(r,t);break;case v.MouseMove:if(t){var i=r.positions[r.positions.length-1];this.moveAndHover(r,i.x,i.y,i.id)}else r.positions.forEach((function(t){var i={doAction:function(){n.moveAndHover(r,t.x,t.y,t.id)},delay:t.timeOffset+e.timestamp-n.service.state.context.baselineTime};n.timer.addAction(i)}));break;case v.MouseInteraction:if(-1===r.id)break;var o=new Event(y[r.type].toLowerCase());if(!(c=O.getNode(r.id)))return this.debugNodeNotFound(r,r.id);this.emitter.emit(b.MouseInteraction,{type:r.type,target:c});var a=this.config.triggerFocus;switch(r.type){case y.Blur:"blur"in c&&c.blur();break;case y.Focus:a&&c.focus&&c.focus({preventScroll:!0});break;case y.Click:case y.TouchStart:case y.TouchEnd:t||(this.moveAndHover(r,r.x,r.y,r.id),this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:c.dispatchEvent(o)}break;case v.Scroll:if(-1===r.id)break;if(t){this.treeIndex.scroll(r);break}this.applyScroll(r);break;case v.ViewportResize:this.emitter.emit(b.Resize,{width:r.width,height:r.height});break;case v.Input:if(-1===r.id)break;if(t){this.treeIndex.input(r);break}this.applyInput(r);break;case v.MediaInteraction:if(!(c=O.getNode(r.id)))return this.debugNodeNotFound(r,r.id);var s=c;r.type===g.Pause&&s.pause(),r.type===g.Play&&(s.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?s.play():s.addEventListener("canplay",(function(){s.play()})));break;case v.StyleSheetRule:var c;if(!(c=O.getNode(r.id)))return this.debugNodeNotFound(r,r.id);var l=c.sheet;r.adds&&r.adds.forEach((function(e){var t=e.rule,n=e.index,r=void 0===n?void 0:Math.min(n,l.rules.length);try{l.insertRule(t,r)}catch(e){}})),r.removes&&r.removes.forEach((function(e){var t=e.index;l.deleteRule(t)}))}},e.prototype.applyMutation=function(e,t){var r=this;e.removes.forEach((function(t){var n=O.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);var i=O.getNode(t.parentId);if(!i)return r.warnNodeNotFound(e,t.parentId);if(O.removeNodeFromMap(n),i){var o=r.fragmentParentMap.get(i);o&&o.contains(n)?o.removeChild(n):i.removeChild(n)}}));var i=n({},this.legacy_missingNodeRetryMap),o=[],a=function(e){if(!r.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var n=O.getNode(e.parentId);if(!n)return o.push(e);var a=r.iframe.contentDocument.contains(n);if(t&&a){var s=document.createDocumentFragment();for(O.map[e.parentId]=s,r.fragmentParentMap.set(s,n);n.firstChild;)s.appendChild(n.firstChild);n=s}var c=null,l=null;if(e.previousId&&(c=O.getNode(e.previousId)),e.nextId&&(l=O.getNode(e.nextId)),null!==e.nextId&&-1!==e.nextId&&!l)return o.push(e);var u=f(e.node,r.iframe.contentDocument,O.map,!0);-1!==e.previousId&&-1!==e.nextId?(c&&c.nextSibling&&c.nextSibling.parentNode?n.insertBefore(u,c.nextSibling):l&&l.parentNode?n.contains(l)?n.insertBefore(u,l):n.insertBefore(u,null):n.appendChild(u),(e.previousId||e.nextId)&&r.legacy_resolveMissingNode(i,n,u,e)):i[e.node.id]={node:u,mutation:e}};for(e.adds.forEach((function(e){a(e)}));o.length;){if(o.every((function(e){return!Boolean(O.getNode(e.parentId))})))return o.forEach((function(t){return r.warnNodeNotFound(e,t.node.id)}));var s=o.shift();a(s)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),e.texts.forEach((function(t){var n=O.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);r.fragmentParentMap.has(n)&&(n=r.fragmentParentMap.get(n)),n.textContent=t.value})),e.attributes.forEach((function(t){var n=O.getNode(t.id);if(!n)return r.warnNodeNotFound(e,t.id);for(var i in r.fragmentParentMap.has(n)&&(n=r.fragmentParentMap.get(n)),t.attributes)if("string"==typeof i){var o=t.attributes[i];null!==o?n.setAttribute(i,o):n.removeAttribute(i)}}))},e.prototype.applyScroll=function(e){var t=O.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=O.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}},e.prototype.legacy_resolveMissingNode=function(e,t,n,r){var i=r.previousId,o=r.nextId,a=i&&e[i],s=o&&e[o];if(a){var c=a,l=c.node,u=c.mutation;t.insertBefore(l,n),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,l,u)}if(s){var d=s;l=d.node,u=d.mutation;t.insertBefore(l,n.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,l,u)}},e.prototype.moveAndHover=function(e,t,n,r){this.mouse.style.left=t+"px",this.mouse.style.top=n+"px";var i=O.getNode(r);if(!i)return this.debugNodeNotFound(e,r);this.hoverElements(i)},e.prototype.hoverElements=function(e){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")}));for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement},e.prototype.isUserInteraction=function(e){return e.type===m.IncrementalSnapshot&&(e.data.source>v.Mutation&&e.data.source<=v.Input)},e.prototype.backToNormal=function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(b.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},e.prototype.warnNodeNotFound=function(e,t){this.config.showWarning&&console.warn("[replayer]","Node with id '"+t+"' not found in",e)},e.prototype.debugNodeNotFound=function(e,t){this.config.showDebug&&console.log("[replayer]","Node with id '"+t+"' not found in",e)},e}();return e.Replayer=B,e}({});
//# sourceMappingURL=rrweb-replay.min.js.map

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

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

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

import { Timer } from './timer.js';
import { createPlayerService } from './machine.js';
import { createPlayerService, createSpeedService } from './machine.js';
import getInjectStyleRules from './styles/inject-style.js';

@@ -33,3 +33,2 @@

this.emitter = mitt();
this.noramlSpeed = -1;
this.legacy_missingNodeRetryMap = {};

@@ -98,2 +97,3 @@ if (!(config === null || config === void 0 ? void 0 : config.liveMode) && events.length < 2) {

});
var timer = new Timer([], (config === null || config === void 0 ? void 0 : config.speed) || defaultConfig.speed);
this.service = createPlayerService({

@@ -106,4 +106,3 @@ events: events.map(function (e) {

}),
timer: new Timer(this.config),
speed: (config === null || config === void 0 ? void 0 : config.speed) || defaultConfig.speed,
timer: timer,
timeOffset: 0,

@@ -118,15 +117,26 @@ baselineTime: 0,

this.service.subscribe(function (state) {
if (!state.changed) {
return;
}
_this.emitter.emit(ReplayerEvents.StateChange, {
player: state,
});
});
var contextEvents = this.service.state.context.events;
var firstMeta = contextEvents.find(function (e) { return e.type === EventType.Meta; });
var firstFullsnapshot = contextEvents.find(function (e) { return e.type === EventType.FullSnapshot; });
this.speedService = createSpeedService({
normalSpeed: -1,
timer: timer,
});
this.speedService.start();
this.speedService.subscribe(function (state) {
_this.emitter.emit(ReplayerEvents.StateChange, {
speed: state,
});
});
var firstMeta = this.service.state.context.events.find(function (e) { return e.type === EventType.Meta; });
var firstFullsnapshot = this.service.state.context.events.find(function (e) { return e.type === EventType.FullSnapshot; });
if (firstMeta) {
var _a = firstMeta.data, width = _a.width, height = _a.height;
this.emitter.emit(ReplayerEvents.Resize, {
width: width,
height: height,
});
var _a = firstMeta.data, width_1 = _a.width, height_1 = _a.height;
setTimeout(function () {
_this.emitter.emit(ReplayerEvents.Resize, {
width: width_1,
height: height_1,
});
}, 0);
}

@@ -153,9 +163,8 @@ if (firstFullsnapshot) {

if (!this.config.skipInactive) {
this.noramlSpeed = -1;
this.backToNormal();
}
};
Replayer.prototype.getMetaData = function () {
var events = this.service.state.context.events;
var firstEvent = events[0];
var lastEvent = events[events.length - 1];
var firstEvent = this.service.state.context.events[0];
var lastEvent = this.service.state.context.events[this.service.state.context.events.length - 1];
return {

@@ -176,9 +185,7 @@ startTime: firstEvent.timestamp,

if (timeOffset === void 0) { timeOffset = 0; }
if (this.service.state.value === 'ended') {
this.service.send({ type: 'REPLAY' });
if (this.service.state.matches('paused')) {
this.service.send({ type: 'PLAY', payload: { timeOffset: timeOffset } });
}
if (this.service.state.value === 'paused') {
this.service.send({ type: 'RESUME', payload: { timeOffset: timeOffset } });
}
else {
this.service.send({ type: 'PAUSE' });
this.service.send({ type: 'PLAY', payload: { timeOffset: timeOffset } });

@@ -188,4 +195,10 @@ }

};
Replayer.prototype.pause = function () {
this.service.send({ type: 'PAUSE' });
Replayer.prototype.pause = function (timeOffset) {
if (timeOffset === undefined && this.service.state.matches('playing')) {
this.service.send({ type: 'PAUSE' });
}
if (typeof timeOffset === 'number') {
this.play(timeOffset);
this.service.send({ type: 'PAUSE' });
}
this.emitter.emit(ReplayerEvents.Pause);

@@ -195,3 +208,4 @@ };

if (timeOffset === void 0) { timeOffset = 0; }
this.service.send({ type: 'RESUME', payload: { timeOffset: timeOffset } });
console.warn("The 'resume' will be departed in 1.0. Please use 'play' method which has the same interface.");
this.play(timeOffset);
this.emitter.emit(ReplayerEvents.Resume);

@@ -238,3 +252,2 @@ };

if (isSync === void 0) { isSync = false; }
var events = this.service.state.context.events;
var castFn;

@@ -268,10 +281,13 @@ switch (event.type) {

_this.applyIncremental(event, isSync);
if (isSync) {
return;
}
if (event === _this.nextUserInteractionEvent) {
_this.nextUserInteractionEvent = null;
_this.restoreSpeed();
_this.backToNormal();
}
if (_this.config.skipInactive && !_this.nextUserInteractionEvent) {
try {
for (var events_1 = __values(events), events_1_1 = events_1.next(); !events_1_1.done; events_1_1 = events_1.next()) {
var _event = events_1_1.value;
for (var _b = __values(_this.service.state.context.events), _c = _b.next(); !_c.done; _c = _b.next()) {
var _event = _c.value;
if (_event.timestamp <= event.timestamp) {

@@ -282,3 +298,4 @@ continue;

if (_event.delay - event.delay >
SKIP_TIME_THRESHOLD * _this.config.speed) {
SKIP_TIME_THRESHOLD *
_this.speedService.state.context.timer.speed) {
_this.nextUserInteractionEvent = _event;

@@ -293,3 +310,3 @@ }

try {
if (events_1_1 && !events_1_1.done && (_a = events_1.return)) _a.call(events_1);
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}

@@ -299,3 +316,2 @@ finally { if (e_4) throw e_4.error; }

if (_this.nextUserInteractionEvent) {
_this.noramlSpeed = _this.config.speed;
var skipTime = _this.nextUserInteractionEvent.delay - event.delay;

@@ -305,3 +321,3 @@ var payload = {

};
_this.setConfig(payload);
_this.speedService.send({ type: 'FAST_FORWARD', payload: payload });
_this.emitter.emit(ReplayerEvents.SkipStart, payload);

@@ -318,4 +334,5 @@ }

_this.service.send({ type: 'CAST_EVENT', payload: { event: event } });
if (event === events[events.length - 1]) {
_this.restoreSpeed();
if (event ===
_this.service.state.context.events[_this.service.state.context.events.length - 1]) {
_this.backToNormal();
_this.service.send('END');

@@ -354,2 +371,5 @@ _this.emitter.emit(ReplayerEvents.Finish);

var beforeLoadState_1 = this.service.state;
var unsubscribe_1 = this.service.subscribe(function (state) {
beforeLoadState_1 = state;
}).unsubscribe;
head

@@ -364,3 +384,3 @@ .querySelectorAll('link[rel="stylesheet"]')

if (beforeLoadState_1.matches('playing')) {
_this.resume(_this.getCurrentTime());
_this.play(_this.getCurrentTime());
}

@@ -371,2 +391,3 @@ _this.emitter.emit(ReplayerEvents.LoadStylesheetEnd);

}
unsubscribe_1();
}

@@ -381,5 +402,6 @@ });

if (beforeLoadState_1.matches('playing')) {
_this.resume(_this.getCurrentTime());
_this.play(_this.getCurrentTime());
}
timer_1 = -1;
unsubscribe_1();
}, this.config.loadTimeout);

@@ -391,3 +413,2 @@ }

var _this = this;
var baselineTime = this.service.state.context.baselineTime;
var d = e.data;

@@ -416,3 +437,5 @@ switch (d.source) {

},
delay: p.timeOffset + e.timestamp - baselineTime,
delay: p.timeOffset +
e.timestamp -
_this.service.state.context.baselineTime,
};

@@ -749,10 +772,11 @@ _this.timer.addAction(action);

};
Replayer.prototype.restoreSpeed = function () {
if (this.noramlSpeed === -1) {
Replayer.prototype.backToNormal = function () {
this.nextUserInteractionEvent = null;
if (this.speedService.state.matches('normal')) {
return;
}
var payload = { speed: this.noramlSpeed };
this.setConfig(payload);
this.emitter.emit(ReplayerEvents.SkipEnd, payload);
this.noramlSpeed = -1;
this.speedService.send({ type: 'BACK_TO_NORMAL' });
this.emitter.emit(ReplayerEvents.SkipEnd, {
speed: this.speedService.state.context.normalSpeed,
});
};

@@ -759,0 +783,0 @@ Replayer.prototype.warnNodeNotFound = function (d, id) {

import { __assign, __values } from '../../node_modules/tslib/tslib.es6.js';
import { ReplayerEvents, EventType } from '../types.js';
import { needCastInSyncMode } from '../utils.js';
import { getDelay } from './timer.js';
import { addDelay } from './timer.js';
import { interpret as f, createMachine as c, assign as r } from '../../node_modules/@xstate/fsm/es/index.js';

@@ -23,16 +23,4 @@

context: context,
initial: 'inited',
initial: 'paused',
states: {
inited: {
on: {
PLAY: {
target: 'playing',
actions: ['recordTimeOffset', 'play'],
},
TO_LIVE: {
target: 'live',
actions: ['startLive'],
},
},
},
playing: {

@@ -44,4 +32,2 @@ on: {

},
END: 'ended',
FAST_FORWARD: 'skipping',
CAST_EVENT: {

@@ -51,2 +37,6 @@ target: 'playing',

},
END: {
target: 'paused',
actions: ['resetLastPlayedEvent', 'pause'],
},
},

@@ -56,3 +46,3 @@ },

on: {
RESUME: {
PLAY: {
target: 'playing',

@@ -67,12 +57,2 @@ actions: ['recordTimeOffset', 'play'],

},
skipping: {
on: {
BACK_TO_NORMAL: 'playing',
},
},
ended: {
on: {
REPLAY: 'playing',
},
},
live: {

@@ -94,3 +74,3 @@ on: {

}
return context.lastPlayedEvent;
return ctx.lastPlayedEvent;
},

@@ -106,5 +86,18 @@ }),

play: function (ctx) {
var e_1, _a;
var e_1, _a, e_2, _b;
var timer = ctx.timer, events = ctx.events, baselineTime = ctx.baselineTime, lastPlayedEvent = ctx.lastPlayedEvent;
timer.clear();
try {
for (var events_1 = __values(events), events_1_1 = events_1.next(); !events_1_1.done; events_1_1 = events_1.next()) {
var event = events_1_1.value;
addDelay(event, baselineTime);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (events_1_1 && !events_1_1.done && (_a = events_1.return)) _a.call(events_1);
}
finally { if (e_1) throw e_1.error; }
}
var neededEvents = discardPriorSnapshots(events, baselineTime);

@@ -114,3 +107,3 @@ var actions = new Array();

if (lastPlayedEvent &&
lastPlayedEvent.timestamp > baselineTime &&
lastPlayedEvent.timestamp < baselineTime &&
(event.timestamp <= lastPlayedEvent.timestamp ||

@@ -134,3 +127,3 @@ event === lastPlayedEvent)) {

},
delay: getDelay(event, baselineTime),
delay: event.delay,
});

@@ -145,8 +138,8 @@ }

}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (neededEvents_1_1 && !neededEvents_1_1.done && (_a = neededEvents_1.return)) _a.call(neededEvents_1);
if (neededEvents_1_1 && !neededEvents_1_1.done && (_b = neededEvents_1.return)) _b.call(neededEvents_1);
}
finally { if (e_1) throw e_1.error; }
finally { if (e_2) throw e_2.error; }
}

@@ -160,4 +153,8 @@ emitter.emit(ReplayerEvents.Flush);

},
resetLastPlayedEvent: r(function (ctx) {
return __assign(__assign({}, ctx), { lastPlayedEvent: null });
}),
startLive: r({
baselineTime: function (ctx, event) {
ctx.timer.toggleLiveMode(true);
ctx.timer.start();

@@ -174,2 +171,3 @@ if (event.type === 'TO_LIVE' && event.payload.baselineTime) {

var event_1 = machineEvent.payload.event;
addDelay(event_1, baselineTime);
events.push(event_1);

@@ -187,3 +185,3 @@ var isSync = event_1.timestamp < baselineTime;

},
delay: getDelay(event_1, baselineTime),
delay: event_1.delay,
});

@@ -198,3 +196,51 @@ }

}
function createSpeedService(context) {
var speedMachine = c({
id: 'speed',
context: context,
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 (ctx, event) {
if ('payload' in event) {
ctx.timer.setSpeed(event.payload.speed);
}
},
recordSpeed: r({
normalSpeed: function (ctx) { return ctx.timer.speed; },
}),
restoreSpeed: function (ctx) {
ctx.timer.setSpeed(ctx.normalSpeed);
},
},
});
return f(speedMachine);
}
export { createPlayerService, discardPriorSnapshots };
export { createPlayerService, createSpeedService, discardPriorSnapshots };

@@ -5,7 +5,7 @@ import { __spread } from '../../node_modules/tslib/tslib.es6.js';

var Timer = (function () {
function Timer(config, actions) {
function Timer(actions, speed) {
if (actions === void 0) { actions = []; }
this.timeOffset = 0;
this.actions = actions;
this.config = config;
this.speed = speed;
}

@@ -24,6 +24,6 @@ Timer.prototype.addAction = function (action) {

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

@@ -40,3 +40,3 @@ while (actions.length) {

}
if (actions.length > 0 || self.config.liveMode) {
if (actions.length > 0 || self.liveMode) {
self.raf = requestAnimationFrame(check);

@@ -53,2 +53,8 @@ }

};
Timer.prototype.setSpeed = function (speed) {
this.speed = speed;
};
Timer.prototype.toggleLiveMode = function (mode) {
this.liveMode = mode;
};
Timer.prototype.findActionIndex = function (action) {

@@ -73,3 +79,3 @@ var start = 0;

}());
function getDelay(event, baselineTime) {
function addDelay(event, baselineTime) {
if (event.type === EventType.IncrementalSnapshot &&

@@ -83,5 +89,5 @@ event.data.source === IncrementalSource.MouseMove) {

event.delay = event.timestamp - baselineTime;
return event.timestamp - baselineTime;
return event.delay;
}
export { Timer, getDelay };
export { Timer, addDelay };

@@ -56,4 +56,5 @@ var EventType;

ReplayerEvents["Flush"] = "flush";
ReplayerEvents["StateChange"] = "state-change";
})(ReplayerEvents || (ReplayerEvents = {}));
export { EventType, IncrementalSource, MediaInteractions, MouseInteractions, ReplayerEvents };

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

ReplayerEvents["Flush"] = "flush";
ReplayerEvents["StateChange"] = "state-change";
})(ReplayerEvents || (ReplayerEvents = {}));

@@ -449,0 +450,0 @@

{
"name": "rrweb",
"version": "0.8.5",
"version": "0.9.0",
"description": "record and replay the web",

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

import { Timer } from './timer';
import { createPlayerService, createSpeedService } from './machine';
import { eventWithTime, playerConfig, playerMetaData, Handler } from '../types';

@@ -7,10 +8,10 @@ import './styles/style.css';

iframe: HTMLIFrameElement;
service: ReturnType<typeof createPlayerService>;
speedService: ReturnType<typeof createSpeedService>;
get timer(): Timer;
private config;
config: playerConfig;
private mouse;
private emitter;
private nextUserInteractionEvent;
private noramlSpeed;
private legacy_missingNodeRetryMap;
private service;
private treeIndex;

@@ -25,3 +26,3 @@ private fragmentParentMap;

play(timeOffset?: number): void;
pause(): void;
pause(timeOffset?: number): void;
resume(timeOffset?: number): void;

@@ -45,5 +46,5 @@ startLive(baselineTime?: number): void;

private isUserInteraction;
private restoreSpeed;
private backToNormal;
private warnNodeNotFound;
private debugNodeNotFound;
}

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

import { StateMachine } from '@xstate/fsm';
import { playerConfig, eventWithTime, Emitter } from '../types';

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

timer: Timer;
speed: playerConfig['speed'];
timeOffset: number;

@@ -25,15 +25,2 @@ baselineTime: number;

} | {
type: 'RESUME';
payload: {
timeOffset: number;
};
} | {
type: 'END';
} | {
type: 'REPLAY';
} | {
type: 'FAST_FORWARD';
} | {
type: 'BACK_TO_NORMAL';
} | {
type: 'TO_LIVE';

@@ -48,7 +35,6 @@ payload: {

};
} | {
type: 'END';
};
export declare type PlayerState = {
value: 'inited';
context: PlayerContext;
} | {
value: 'playing';

@@ -60,8 +46,2 @@ context: PlayerContext;

} | {
value: 'ended';
context: PlayerContext;
} | {
value: 'skipping';
context: PlayerContext;
} | {
value: 'live';

@@ -75,3 +55,30 @@ context: PlayerContext;

};
export declare function createPlayerService(context: PlayerContext, { getCastFn, emitter }: PlayerAssets): import("@xstate/fsm").StateMachine.Service<PlayerContext, PlayerEvent, PlayerState>;
export declare function createPlayerService(context: PlayerContext, { getCastFn, emitter }: PlayerAssets): StateMachine.Service<PlayerContext, PlayerEvent, PlayerState>;
export declare type SpeedContext = {
normalSpeed: playerConfig['speed'];
timer: Timer;
};
export declare type SpeedEvent = {
type: 'FAST_FORWARD';
payload: {
speed: playerConfig['speed'];
};
} | {
type: 'BACK_TO_NORMAL';
} | {
type: 'SET_SPEED';
payload: {
speed: playerConfig['speed'];
};
};
export declare type SpeedState = {
value: 'normal';
context: SpeedContext;
} | {
value: 'skipping';
context: SpeedContext;
};
export declare function createSpeedService(context: SpeedContext): StateMachine.Service<SpeedContext, SpeedEvent, SpeedState>;
export declare type PlayerMachineState = StateMachine.State<PlayerContext, PlayerEvent, PlayerState>;
export declare type SpeedMachineState = StateMachine.State<SpeedContext, SpeedEvent, SpeedState>;
export {};

@@ -1,8 +0,9 @@

import { playerConfig, actionWithDelay, eventWithTime } from '../types';
import { actionWithDelay, eventWithTime } from '../types';
export declare class Timer {
timeOffset: number;
speed: number;
private actions;
private config;
private raf;
constructor(config: playerConfig, actions?: actionWithDelay[]);
private liveMode;
constructor(actions: actionWithDelay[] | undefined, speed: number);
addAction(action: actionWithDelay): void;

@@ -12,4 +13,6 @@ addActions(actions: actionWithDelay[]): void;

clear(): void;
setSpeed(speed: number): void;
toggleLiveMode(mode: boolean): void;
private findActionIndex;
}
export declare function getDelay(event: eventWithTime, baselineTime: number): number;
export declare function addDelay(event: eventWithTime, baselineTime: number): number;

@@ -311,4 +311,5 @@ import { serializedNodeWithId, idNodeMap, INode, MaskInputOptions } from 'rrweb-snapshot';

CustomEvent = "custom-event",
Flush = "flush"
Flush = "flush",
StateChange = "state-change"
}
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 not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is 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