PageSourceSearch

https://www.tonyawardschallenge.com/_next/static/chunks/7249-9c284879f872d42f.js

js tonyawardschallenge.com collected 2026-10-08 06:07:25 UTC 215,398 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="86483b13-85aa-4131-b3f4-6068e5967eb2",e._sentryDebugIdIdentifier="sentry-dbid-86483b13-85aa-4131-b3f4-6068e5967eb2")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7249],{45135:function(e,t){"use strict";t.parse=function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");var i={},n=e.length;if(n<2)return i;var s=t&&t.decode||c,o=0,a=0,d=0;do{if(-1===(a=e.indexOf("=",o)))break;if(-1===(d=e.indexOf(";",o)))d=n;else if(a>d){o=e.lastIndexOf(";",a-1)+1;continue}var h=l(e,o,a),p=u(e,a,h),f=e.slice(h,p);if(!r.call(i,f)){var m=l(e,a+1,d),g=u(e,d,m);34===e.charCodeAt(m)&&34===e.charCodeAt(g-1)&&(m++,g--);var y=e.slice(m,g);i[f]=function(e,t){try{return t(e)}catch(t){return e}}(y,s)}o=d+1}while(o<n);return i},t.serialize=function(e,t,r){var l=r&&r.encode||encodeURIComponent;if("function"!=typeof l)throw TypeError("option encode is invalid");if(!n.test(e))throw TypeError("argument name is invalid");var u=l(t);if(!s.test(u))throw TypeError("argument val is invalid");var c=e+"="+u;if(!r)return c;if(null!=r.maxAge){var d=Math.floor(r.maxAge);if(!isFinite(d))throw TypeError("option maxAge is invalid");c+="; Max-Age="+d}if(r.domain){if(!o.test(r.domain))throw TypeError("option domain is invalid");c+="; Domain="+r.domain}if(r.path){if(!a.test(r.path))throw TypeError("option path is invalid");c+="; Path="+r.path}if(r.expires){var h=r.expires;if("[object Date]"!==i.call(h)||isNaN(h.valueOf()))throw TypeError("option expires is invali
1d");c+="; Expires="+h.toUTCString()}if(r.httpOnly&&(c+="; HttpOnly"),r.secure&&(c+="; Secure"),r.partitioned&&(c+="; Partitioned"),r.priority)switch("string"==typeof r.priority?r.priority.toLowerCase():r.priority){case"low":c+="; Priority=Low";break;case"medium":c+="; Priority=Medium";break;case"high":c+="; Priority=High";break;default:throw TypeError("option priority is invalid")}if(r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:case"strict":c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"none":c+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return c};var i=Object.prototype.toString,r=Object.prototype.hasOwnProperty,n=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,s=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,o=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,a=/^[\u0020-\u003A\u003D-\u007E]*$/;function l(e,t,i){do{var r=e.charCodeAt(t);if(32!==r&&9!==r)return t}while(++t<i);return i}function u(e,t,i){for(;t>i;){var r=e.charCodeAt(--t);if(32!==r&&9!==r)return t+1}return i}
1function c(e){return -1!==e.indexOf("%")?decodeURIComponent(e):e}},35705:function(e,t,i){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},n=this&&this.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)0>t.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(i[r[n]]=e[r[n]]);return i};Object.defineProperty(t,"__esModule",{value:!0}),t.hasCookie=t.deleteCookie=t.setCookie=t.getCookie=t.getCookies=void 0;var s=i(45135),o=function(){return"undefined"!=typeof window},a=function(e){return!!e&&"getAll"in e&&"set"in e&&"function"==typeof e.getAll&&"function"==typeof e.set},l=function(e){return!!(null==e?void 0:e.req)&&"cookies"in e.req&&a(null==e?void 0:e.req.cookies)||!!(null==e?void 0:e.res)&&"cookies"in e.res&&a(null==e?void 0:e.res.cookies)||!!(null==e?void 0:e.cookies)&&a(e.cookies())},u=function(e){var t={};return e.getAll().forEach(function(e){var i=e.name,r=e.value;t[i]=r}),t},c=function(e){try{if("string"==typeof e)return e;return JSON.stringify(e)}catch(t){return e}};t.getCookies=function(e){if(l(e)){if(null==e?void 0:e.req)return u(e.req.cookies);if(null==e?void 0:e.cookies)return u(e.cookies())}if(e&&(t=e.req),!o())return t&&t.cookies?t.cookies:t&&t.headers.cookie?(0,s.parse)(t.headers.cookie):{};for(var t,i={},r=document.cookie?document.cookie.split("; "):[],n=0,a=r.length;n<a;n++){var c=r[n].split("="),d=c.slice(1).join("=");i[c[0]]=d}return i},t.getCookie=function(e,i){var r=(0,t.getCookies)(i)[e];if(void 0!==r)return r?r.replace(/(%[0-9A-Z]{2}
1)+/g,decodeURIComponent):r},t.setCookie=function(e,t,i){if(l(i)){var a,u,d,h=i.req,p=i.res,f=i.cookies,m=n(i,["req","res","cookies"]),g=r({name:e,value:c(t)},m);h&&h.cookies.set(g),p&&p.cookies.set(g),f&&f().set(g);return}if(i){var h=i.req,p=i.res,y=n(i,["req","res"]);u=h,d=p,a=y}var v=(0,s.serialize)(e,c(t),r({path:"/"},a));if(o())document.cookie=v;else if(d&&u){var b=d.getHeader("Set-Cookie");if(Array.isArray(b)||(b=b?[String(b)]:[]),d.setHeader("Set-Cookie",b.concat(v)),u&&u.cookies){var S=u.cookies;""===t?delete S[e]:S[e]=c(t)}if(u&&u.headers&&u.headers.cookie){var S=(0,s.parse)(u.headers.cookie);""===t?delete S[e]:S[e]=c(t),u.headers.cookie=Object.entries(S).reduce(function(e,t){return e.concat("".concat(t[0],"=").concat(t[1],";"))},"")}}},t.deleteCookie=function(e,i){return(0,t.setCookie)(e,"",r(r({},i),{maxAge:-1}))},t.hasCookie=function(e,i){return!!e&&(0,t.getCookies)(i).hasOwnProperty(e)}},86879:function(e){e.exports={style:{fontFamily:"'__Open_Sans_3e27f5', '__Open_Sans_Fallback_3e27f5'",fontStyle:"normal"},className:"__className_3e27f5",variable:"__variable_3e27f5"}},92422:function(e){e.exports={style:{fontFamily:"'__Playfair_Display_8e50ea', '__Playfair_Display_Fallback_8e50ea'"},className:"__className_8e50ea",variable:"__variable_8e50ea"}},16980:function(e){e.exports={style:{fontFamily:"'__Roboto_bb52f2', '__Roboto_Fallback_bb52f2'"},className:"__className_bb52f2",variable:"__variable_bb52f2"}},79747:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SessionReplay=t.runStatsigSessionReplay=t.StatsigSessionReplayPlugin=void 0;let r=i(26189),n=i(46762),s=i(37914);class o{constructor(e){this.options=e,this.__plugin="session-replay"}bind(e){a(e,this.options)}}function a(e,t){new l(e,t)}t.StatsigSessionReplayPlugin=o,t.runStatsigSessionReplay=a;class l extends n.SessionReplayBase{constructor(e,t){var i;super(e,t),this._client.$on("values_updated",()=>{var e;this._wasStopped||this._attemptToStartRecording(null===(e=this._options)||void 0===e?void 0:e.forceRecording)}),this._attemptToStartRecording(null===(i=this._options)||void 0===i?void 0:i.forceRecording)}_shutdown(e){super._shutdownImpl(e)}_attemptToStartRecording(e=!1){var t,i;if(this._totalLogs>=s.MAX_LOGS)return;let n=this._client.getContext().values;if((null==n?void 0:n.recording_blocked)===!0||!e&&(null==n?void 0:n.can_record_session)!==!0||(null==n?void 0:n.passes_session_recording_targeting)===!1){this._shutdown();return}this._replayer.isRecording()||(this._wasStopped=!1,r.StatsigMetadataProvider.add({isRecordingSession:"true"}),this._replayer.record((e,t)=>this._onRecordingEvent(e,t),null!==(i=null===(t=this._options)||void 0===t?void 0:t.rrwebConfig)&&void 0!==i?i:{},()=>{this._shutdown()}))}}t.SessionReplay=l},46762:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SessionReplayBase=t.forceStartRecording=t.startRecording=t.stopRecording=void 0;let r=i(26189),n=i(36634),s=i(37914),o=i(30778);function a(e){var t,i;let n=null==e?(0,r._getStatsigGlobal)().firstSRInstance:null===(i=null===(t=(0,r._getStatsigGlobal)())||void 0===t?void 0:t.srInstances)||void 0===i?void 0:i[e];return n instanceof l?n:null}t.stopRecording=function(e){var t;null===(t=a(e))||void 0===t||t.stopRecording()},t.startRecording=function(e){var t;null===(t=a(e))||void 0===t||t.startRecording()},t.forceStartRecording=function(e){var t;null===(t=a(e))||void 0===t||t.forceStartRecording()};class l{constructor(e,t){this._sessionData={startTime:-1,endTime:0,clickCount:0},this._events=[],this._wasStopped=!1,this._currentEventIndex=0,this._totalLogs=0,this._client=e,this._options=t;let{sdkKey:i,errorBoundary:s}=this._client.getContext();if(this._errorBoundary=s,this._errorBoundary.wrap(this),this._replayer=new n.SessionReplayClient,this._client.$on("pre_shutdown",()=>this._shutdown()),this._client.on("session_expired",()=>{this._shutdown("session_expired")}),!(0,r._isServerEnv)()){let e=(0,r._getStatsigGlobal)();e.srInstances=Object.assign(Object.assign({},e.srInstances),{[i]:this}),e.firstSRInstance||(e.firstSRInstance=this)}this._currentSessionID=this._getSessionIdFromClient(),this._subscribeToVisibilityChanged()}forceStartRecording(){this._wasStopped=!1,this._attemptToStartRecording(!0)}stopRecording(){this._wasStopped=!0,this._shutdown()}startRecording(){var e;this._wasStopped=!1,this._attemptToStartRecording(null===(e=this._options)||void 0===e?void 0:e.forceRecording)}isRecording(){return this._replayer.isRecording()}_logRecording(e){0!==this._events.length&&(e=(0,r._isUnloading)()?"is_leaving_page":e,this._logRecordingWithSessionID(this._currentSessionID,e))}_onVisibilityChanged(e){"background"===e&&(this._logRecording(),this._client.flush().catch(e=>{this._errorBoundary.logError("SR::visibility",e)}))}_subscribeToVisibilityChanged(){let{sdkKey:e}=this._client.getContext();(0,r._subscribeToVisiblityChanged)(t=>{var i,n;let s=null===(n=null===(i=(0,r._getStatsigGlobal)())||void 0===i?void 0:i.srInstances)||void 0===n?void 0:n[e];s instanceof l&&s._onVisibilityChanged(t)})}_logRecordingWithSessionID(e,t){let i=this._sessionData;if(0===this._events.length)return;let n=JSON.stringify(this._events),o=(0,s._slicePayload)(n),a=o.length>1?(0,r.getUUID)():null;for(let l=0;l<o.length;l++){let u=o[l],c=(0,s._makeLoggableRrwebEvent)(u,n,e,i);null!=a&&(0,s._appendSlicedMetadata)(c.metadata,a,l,o.length,u.length),t&&(c.metadata[t]="true"),this._totalLogs++,this._client.logEvent(c),null!=a&&this._client.flush().catch(e=>{r.Log.error(e)})}this._events=[],this._totalLogs>s.MAX_LOGS&&this._shutdown()}_bumpSessionIdleTimerAndLogRecording(){this._getSessionIdFromClient(),this._logRecording()}_getSessionIdFromClient(){return this._client.getContext().session.data.sessionID}_shutdownImpl(e){if(this._replayer.isRecording()&&(this._replayer.stop(),r.StatsigMetadataProvider.add({isRecordingSession:"false"})),0===this._events.length){"session_expired"===e&&(this._currentEventIndex=0,this._sessionData=this._makeEmptySessionData());return}this._logRecording(e),"session_expired"===e&&(this._currentEventIndex=0,this._sessionData=this._makeEmptySessionData())}_makeEmptySessionData(){return{startTime:-1,endTime:0,clickCount:0}}_onRecordingEvent(e,t){if(this._currentSessionID!==this._getSessionIdFromClient()){this._shutdown("session_expired");return}if(this._totalLogs>=s.MAX_LOGS){this._shutdown();return}e.eventIndex=this._currentEventIndex++,this._sessionData.clickCount+=t.clickCount,this._sessionData.startTime=-1===this._sessionData.startTime?t.startTime:Math.min(this._sessionData.startTime,t.startTime),this._sessionData.endTime=Math.max(this._sessionData.endTime,t.endTime);let i=(0,o._fastApproxSizeOf)(e,s.MAX_INDIVIDUAL_EVENT_BYTES);if(i>s.MAX_INDIVIDUAL_EVENT_BYTES){r.Log.warn(`SessionReplay event is too large (~${i} bytes) and will not be logged`,e);return}let n=(0,o._fastApproxSizeOf)(this._events,s.REPLAY_ENQUEUE_TRIGGER_BYTES);this._events.push(e),n+i<s.REPLAY_ENQUEUE_TRIGGER_BYTES||((0,r._isCurrentlyVisible)()?this._bumpSessionIdleTimerAndLogRecording():this._logRecording())}}t.SessionReplayBase=l},36634:function(e,t,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.SessionReplayClient=void 0;let r=i(49790),n=i(26189);class s{constructor(){this._startTimestamp=null,this._endTimestamp=null}record(e,t,i,s=!1){if(null!=(0,n._getDocumentSafe)()){var o,a,l;this._startTimestamp=null,this._endTimestamp=null,this._stopCallback=i,this._stopFn||(this._stopFn=(o=(t,i)=>{var r,n,o;s?this._startTimestamp=i?t.timestamp:null!==(r=this._startTimestamp)&&void 0!==r?r:t.timestamp:null!==(n=this._startTimestamp)&&void 0!==n||(this._startTimestamp=t.timestamp),this._endTimestamp=t.timestamp;let a=0;3===t.type&&2===t.data.source&&(2===t.data.type||4===t.data.type)&&a++,e(Object.assign(Object.assign({},t),{eventIndex:0}),{startTime:this._startTimestamp,endTime:this._endTimestamp,clickCount:a},null!=i&&i),this._endTimestamp-this._startTimestamp>144e5&&(null===(o=this._stopFn)||void 0===o||o.call(this),this._stopCallback&&this._stopCallback())},a=t,l=s,("function"==typeof r?r:r.record)(l?Object.assign(Object.assign({},a),{emit:o,checkoutEveryNms:3e4}):Object.assign(Object.assign({},a),{emit:o}))))}}stop(){this._stopFn&&(this._stopFn(),this._stopFn=void 0)}isRecording(){return null!=this._stopFn}}t.SessionReplayClient=s},37914:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._appendSlicedMetadata=t._slicePayload=t._makeLoggableRrwebEvent=t.MAX_LOGS=t.MAX_INDIVIDUAL_EVENT_BYTES=t.REPLAY_ENQUEUE_TRIGGER_BYTES=void 0;let r=i(26189);t.REPLAY_ENQUEUE_TRIGGER_BYTES=10240,t.MAX_INDIVIDUAL_EVENT_BYTES=10485760,t.MAX_LOGS=1e4,t._makeLoggableRrwebEvent=function(e,t,i,n){return{eventName:"statsig::session_recording",value:i,metadata:{session_start_ts:String(n.startTime),session_end_ts:String(n.endTime),clicks_captured_cumulative:String(n.clickCount),rrweb_events:e,rrweb_payload_size:String(t.length),session_replay_sdk_version:r.SDK_VERSION}}},t._slicePayload=function(e){let t=[];for(let i=0;i<e.length;i+=1048576)t.push(e.slice(i,i+1048576));return t},t._appendSlicedMetadata=function(e,t,i,r,n){e.sliced_id=t,e.slice_index=String(i),e.slice_count=String(r),e.slice_byte_size=String(n)}},30778:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._fastApproxSizeOf=void 0,t._fastApproxSizeOf=(e,i)=>{let r=0,n=Object.keys(e);for(let s=0;s<n.length;s++){let o=n[s],a=e[o];if(r+=o.length,"object"==typeof a&&null!==a?r+=(0,t._fastApproxSizeOf)(a,i)+2:r+=String(a).length+1,r>=i)break}return r}},46631:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TriggeredSessionReplay=t.runStatsigTriggeredSessionReplay=t.StatsigTriggeredSessionReplayPlugin=void 0;let r=i(26189),n=i(46762),s=i(37914);class o{constructor(e){this.options=e,this.__plugin="triggered-session-replay"}bind(e){a(e,this.options)}}function a(e,t){new l(e,t)}t.StatsigTriggeredSessionReplayPlugin=o,t.runStatsigTriggeredSessionReplay=a;class l extends n.SessionReplayBase{constructor(e,t){var i;super(e,t),this._runningEventData=[],this._isActiveRecording=!1,this._subscribeToClientEvents(t),(null==t?void 0:t.autoStartRecording)?this._attemptToStartRecording(null===(i=this._options)||void 0===i?void 0:i.forceRecording):(null==t?void 0:t.keepRollingWindow)&&this._attemptToStartRollingWindow()}_subscribeToClientEvents(e){this._subscribeToValuesUpdated(e),this._subscribeToLogEventCalled(),this._subscribeToGateEvaluation(),this._subscribeToExperimentEvaluation()}_subscribeToValuesUpdated(e){this._client.$on("values_updated",()=>{var t;!this._wasStopped&&((null==e?void 0:e.autoStartRecording)?this._attemptToStartRecording(null===(t=this._options)||void 0===t?void 0:t.forceRecording):(null==e?void 0:e.keepRollingWindow)&&this._attemptToStartRollingWindow())})}_subscribeToLogEventCalled(){this._client.$on("log_event_called",e=>{var t;if(this._wasStopped)return;let i=this._client.getContext().values;if(!1===(null==i?void 0:i.passes_session_recording_targeting)||(null==i?void 0:i.session_recording_event_triggers)==null)return;let r=i.session_recording_event_triggers[e.event.eventName];if(null==r||!1===r.passes_sampling)return;let n=r.values;if(null==n||n.includes(String(null!==(t=e.event.value)&&void 0!==t?t:""))){this._attemptToStartRecording(!0);return}})}_subscribeToGateEvaluation(){this._client.$on("gate_evaluation",e=>{this._tryStartExposureRecording(e.gate.name,String(e.gate.value))})}_subscribeToExperimentEvaluation(){this._client.$on("experiment_evaluation",e=>{var t;this._tryStartExposureRecording(e.experiment.name,null!==(t=e.experiment.groupName)&&void 0!==t?t:"")})}_tryStartExposureRecording(e,t){var i;if(this._wasStopped)return;let n=this._client.getContext().values;if(!1===(null==n?void 0:n.passes_session_recording_targeting)||(null==n?void 0:n.session_recording_exposure_triggers)==null)return;let s=null!==(i=n.session_recording_exposure_triggers[e])&&void 0!==i?i:n.session_recording_exposure_triggers[(0,r._DJB2)(e)];if(null==s||!1===s.passes_sampling)return;let o=s.values;if(null==o||o.includes(t)){this._attemptToStartRecording(!0);return}}forceStartRecording(){super.forceStartRecording()}stopRecording(){this._isActiveRecording=!1,this._runningEventData=[],super.stopRecording()}_handleStartActiveRecording(){if(this._isActiveRecording=!0,0===this._runningEventData.length)return;let e=this._runningEventData.map(e=>e.events).flat();for(let t=0;t<e.length;t++)e[t].event.eventIndex=t,this._sessionData.clickCount+=e[t].data.clickCount,this._sessionData.startTime=-1===this._sessionData.startTime?e[t].data.startTime:Math.min(this._sessionData.startTime,e[t].data.startTime),this._sessionData.endTime=Math.max(this._sessionData.endTime,e[t].data.endTime);this._events=e.map(e=>e.event),this._currentEventIndex=e.length,(0,r._isCurrentlyVisible)()?this._bumpSessionIdleTimerAndLogRecording():this._logRecording(),this._replayer.stop()}_shutdown(e){this._isActiveRecording=!1,this._runningEventData=[],super._shutdownImpl(e)}_onRecordingEvent(e,t,i){if(!this._isActiveRecording){if(this._currentSessionID!==this._getSessionIdFromClient()){this._shutdown("session_expired");return}i&&4===e.type||0===this._runningEventData.length?(this._runningEventData.length>1&&this._runningEventData.shift(),this._runningEventData.push({events:[{event:e,data:t}]})):this._runningEventData[this._runningEventData.length-1].events.push({event:e,data:t});return}super._onRecordingEvent(e,t)}_attemptToStartRollingWindow(){var e,t;let i=this._client.getContext().values;if((null==i?void 0:i.passes_session_recording_targeting)===!1){this._shutdown();return}this._replayer.isRecording()||this._replayer.record((e,t,i)=>this._onRecordingEvent(e,t,i),null!==(t=null===(e=this._options)||void 0===e?void 0:e.rrwebConfig)&&void 0!==t?t:{},()=>{this._shutdown()},!0)}_attemptToStartRecording(e=!1){var t,i;if(this._totalLogs>=s.MAX_LOGS)return;let n=this._client.getContext().values;if((null==n?void 0:n.recording_blocked)===!0||!e&&(null==n?void 0:n.can_record_session)!==!0||(null==n?void 0:n.passes_session_recording_targeting)===!1){this._shutdown();return}this._handleStartActiveRecording(),this._wasStopped=!1,r.StatsigMetadataProvider.add({isRecordingSession:"true"}),this._replayer.isRecording()||this._replayer.record((e,t,i)=>this._onRecordingEvent(e,t,i),null!==(i=null===(t=this._options)||void 0===t?void 0:t.rrwebConfig)&&void 0!==i?i:{},()=>{this._shutdown()})}}t.TriggeredSessionReplay=l},47355:function(e,t,i){"use strict";t.cb=void 0;let r=i(26189),n=i(79747);Object.defineProperty(t,"cb",{enumerable:!0,get:function(){return n.StatsigSessionReplayPlugin}});let s=i(46762),o=i(36634),a=i(46631);Object.assign((0,r._getStatsigGlobal)(),{SessionReplayClient:o.SessionReplayClient,SessionReplay:n.SessionReplay,runStatsigSessionReplay:n.runStatsigSessionReplay,runStatsigTriggeredSessionReplay:a.runStatsigTriggeredSessionReplay,StatsigSessionReplayPlugin:n.StatsigSessionReplayPlugin,StatsigTriggeredSessionReplayPlugin:a.StatsigTriggeredSessionReplayPlugin,startRecording:s.startRecording,stopRecording:s.stopRecording,forceStartRecording:s.forceStartRecording})},95031:function(e,t,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.AutoCapture=t.runStatsigAutoCapture=t.StatsigAutoCapturePlugin=void 0;let r=i(26189),n=i(3815),s=i(15010),o=i(39751),a=i(41007),l=i(38939),u=i(29940),c={submit:n.AutoCaptureEventName.FORM_SUBMIT,click:n.AutoCaptureEventName.CLICK};class d{constructor(e){this._options=e,this.__plugin="auto-capture"}bind(e){h(e,this._options)}}function h(e,t){return new p(e,t)}t.StatsigAutoCapturePlugin=d,t.runStatsigAutoCapture=h;class p{constructor(e,t){var i,n,a;this._client=e,this._disabledEvents={},this._previousLoggedPageViewUrl=null,this._hasLoggedPageViewEnd=!1;let{sdkKey:l,errorBoundary:u,values:c}=e.getContext();this._disabledEvents=null!==(n=null===(i=null==c?void 0:c.auto_capture_settings)||void 0===i?void 0:i.disabled_events)&&void 0!==n?n:{},this._errorBoundary=u,this._errorBoundary.wrap(this),this._client.$on("values_updated",()=>{var e,t;let i=this._client.getContext().values;this._disabledEvents=null!==(t=null===(e=null==i?void 0:i.auto_capture_settings)||void 0===e?void 0:e.disabled_events)&&void 0!==t?t:this._disabledEvents}),this._engagementManager=new s.EngagementManager,this._rageClickManager=new o.default,this._eventFilterFunc=null==t?void 0:t.eventFilterFunc;let d=(0,r._getDocumentSafe)();if(!(0,r._isServerEnv)()){let e=null!==(a=(__STATSIG__=(0,r._getStatsigGlobal)()).acInstances)&&void 0!==a?a:{};e[l]=this,__STATSIG__.acInstances=e}if((null==d?void 0:d.readyState)==="loading"){d.addEventListener("DOMContentLoaded",()=>this._initialize());return}this._initialize()}_addEventHandlers(){let e=(0,r._getWindowSafe)(),t=(0,r._getDocumentSafe)();if(!e||!t)return;let i=(e,t=!0)=>{var i;let n=e||(null===(i=(0,r._getWindowSafe)())||void 0===i?void 0:i.event);this._autoLogEvent(n),t&&this._engagementManager.bumpInactiveTimer(),"click"===n.type&&n instanceof MouseEvent&&this._rageClickManager.isRageClick(n.clientX,n.clientY,Date.now())&&this._logRageClick(n)};(0,a._registerEventHandler)(t,"click",e=>i(e)),(0,a._registerEventHandler)(t,"submit",e=>i(e)),(0,a._registerEventHandler)(e,"error",e=>i(e,!1)),(0,a._registerEventHandler)(e,"pagehide",()=>this._tryLogPageViewEnd()),(0,a._registerEventHandler)(e,"beforeunload",()=>this._tryLogPageViewEnd())}_addPageViewTracking(){let e=(0,r._getWindowSafe)(),t=(0,r._getDocumentSafe)();e&&t&&((0,a._registerEventHandler)(e,"popstate",()=>this._tryLogPageView()),window.history.pushState=new Proxy(window.history.pushState,{apply:(e,t,[i,r,n])=>{e.apply(t,[i,r,n]),this._tryLogPageView()}}),this._tryLogPageView())}_autoLogEvent(e){var t;let i=null===(t=e.type)||void 0===t?void 0:t.toLowerCase();if("error"===i&&e instanceof ErrorEvent){this._logError(e);return}let r=(0,a._getTargetNode)(e);if(!r||!(0,a._shouldLogEvent)(e,r))return;let n=c[i];if(!n)return;let{value:s,metadata:o}=(0,l._gatherEventData)(r),d=(0,u._gatherAllMetadata)((0,a._getSafeUrl)());this._enqueueAutoCapture(n,s,Object.assign(Object.assign({},d),o))}_initialize(){this._engagementManager.startInactivityTracking(()=>this._tryLogPageViewEnd(!0)),this._addEventHandlers(),this._addPageViewTracking(),this._logSessionStart(),this._logPerformance()}_logError(e){let t=(null==e?void 0:e.error)||{},i=t;if("object"==typeof t)try{i=JSON.stringify(t)}catch(e){i="function"==typeof(null==t?void 0:t.toString)?t.toString():"Unknown Error"}this._enqueueAutoCapture(n.AutoCaptureEventName.ERROR,e.message,{message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno,error_str:i})}_logSessionStart(){let e=this._getSessionFromClient();try{if(!this._isNewSession(e))return;this._enqueueAutoCapture(n.AutoCaptureEventName.SESSION_START,(0,a._getSanitizedPageUrl)(),{sessionID:e.data.sessionID},{flushImmediately:!0})}catch(e){this._errorBoundary.logError("AC::logSession",e)}}_tryLogPageView(){let e=(0,a._getSafeUrl)(),t=this._previousLoggedPageViewUrl;if(t&&e.href===t.href)return;this._engagementManager.setLastPageViewTime(Date.now()),this._previousLoggedPageViewUrl=e,this._hasLoggedPageViewEnd=!1;let i=(0,u._gatherAllMetadata)(e);this._enqueueAutoCapture(n.AutoCaptureEventName.PAGE_VIEW,(0,a._getSanitizedPageUrl)(),i,{flushImmediately:!0,addNewSessionMetadata:!0}),this._engagementManager.bumpInactiveTimer()}_tryLogPageViewEnd(e=!1){if(this._hasLoggedPageViewEnd)return;this._hasLoggedPageViewEnd=!0;let t=this._engagementManager.getScrollMetrics(),i=this._engagementManager.getPageViewLength();this._enqueueAutoCapture(n.AutoCaptureEventName.PAGE_VIEW_END,(0,a._getSanitizedPageUrl)(),Object.assign(Object.assign({},t),{pageViewLength:i,dueToInactivity:e}),{flushImmediately:!0})}
1_logRageClick(e){let{value:t,metadata:i}=(0,l._gatherEventData)(e.target);this._enqueueAutoCapture(n.AutoCaptureEventName.RAGE_CLICK,t,Object.assign(Object.assign({x:e.clientX,y:e.clientY,timestamp:Date.now()},(0,u._gatherAllMetadata)((0,a._getSafeUrl)())),i))}_logPerformance(){let e=(0,r._getWindowSafe)();e&&e.performance&&void 0!==(null==e?void 0:e.performance)&&"function"==typeof e.performance.getEntriesByType&&"function"==typeof e.performance.getEntriesByName&&setTimeout(()=>{let t={},i=e.performance.getEntriesByType("navigation");if(i&&i.length>0&&i[0]instanceof PerformanceNavigationTiming){let e=i[0];t.load_time_ms=e.duration,t.dom_interactive_time_ms=e.domInteractive-e.startTime,t.redirect_count=e.redirectCount,t.transfer_bytes=e.transferSize}let r=e.performance.getEntriesByName("first-contentful-paint");r&&r.length>0&&r[0]instanceof PerformancePaintTiming&&(t.first_contentful_paint_time_ms=r[0].startTime),this._enqueueAutoCapture(n.AutoCaptureEventName.PERFORMANCE,(0,a._getSanitizedPageUrl)(),Object.assign(Object.assign({},t),(0,u._getNetworkInfo)()))},1)}_enqueueAutoCapture(e,t,i,n){var s,o,a;let l=e.slice(14);if(this._disabledEvents[e]||this._disabledEvents[l])return;let u=this._getSessionFromClient();try{let l=Object.assign({sessionID:u.data.sessionID,page_url:null!==(a=null===(o=null===(s=(0,r._getWindowSafe)())||void 0===s?void 0:s.location)||void 0===o?void 0:o.href)&&void 0!==a?a:""},i);(null==n?void 0:n.addNewSessionMetadata)&&(l.isNewSession=String(this._isNewSession(u)));let c={eventName:e,value:t,metadata:l};if(this._eventFilterFunc&&!this._eventFilterFunc(c))return;this._client.logEvent(c),(null==n?void 0:n.flushImmediately)&&this._client.flush().catch(e=>{r.Log.error(e)})}catch(e){this._errorBoundary.logError("AC::enqueue",e)}}_isNewSession(e){return 1e3>Math.abs(e.data.startTime-Date.now())}_getSessionFromClient(){return this._client.getContext().session}}t.AutoCapture=p},3815:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoCaptureEventName=void 0,t.AutoCaptureEventName={PAGE_VIEW:"auto_capture::page_view",PAGE_VIEW_END:"auto_capture::page_view_end",ERROR:"auto_capture::error",SESSION_START:"auto_capture::session_start",PERFORMANCE:"auto_capture::performance",FORM_SUBMIT:"auto_capture::form_submit",CLICK:"auto_capture::click",RAGE_CLICK:"auto_capture::rage_click"}},15010:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EngagementManager=void 0;let r=i(26189);class n{constructor(){this._lastScrollY=0,this._maxScrollY=0,this._lastScrollPercentage=0,this._maxScrollPercentage=0,this._lastPageViewTime=Date.now(),this._inactiveTimer=null,this._onInactivityCallback=null,this._initializeScrollTracking()}_initializeScrollTracking(){let e=(0,r._getWindowSafe)();e&&(e.addEventListener("scroll",()=>this._handleScroll()),e.addEventListener("scrollend",()=>this._handleScroll()),e.addEventListener("resize",()=>this._handleScroll()))}_handleScroll(){let e=(0,r._getWindowSafe)(),t=(0,r._getDocumentSafe)();if(!e||!t)return;let i=t.body.scrollHeight,n=e.scrollY||t.documentElement.scrollTop||0,s=e.innerHeight;this._lastScrollY=n,this._maxScrollY=Math.max(this._maxScrollY,n);let o=Math.min(100,Math.round((n+s)/i*100));this._lastScrollPercentage=o,this._maxScrollPercentage=Math.max(this._maxScrollPercentage,o),this.bumpInactiveTimer()}getScrollMetrics(){return{lastScrollY:this._lastScrollY,maxScrollY:this._maxScrollY,lastScrollPercentage:this._lastScrollPercentage,maxScrollPercentage:this._maxScrollPercentage,scrollDepth:this._maxScrollPercentage}}getPageViewLength(){return Date.now()-this._lastPageViewTime}setLastPageViewTime(e){this._lastPageViewTime=e}startInactivityTracking(e){this._onInactivityCallback=e}bumpInactiveTimer(){let e=(0,r._getWindowSafe)();e&&(this._inactiveTimer&&clearTimeout(this._inactiveTimer),this._inactiveTimer=e.setTimeout(()=>{this._onInactivityCallback&&this._onInactivityCallback()},6e5))}}t.EngagementManager=n},39751:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i{constructor(){this._clicks=[]}isRageClick(e,t,i){var r;return this._clicks=this._clicks.filter(e=>i-e.timestamp<1e3),this._clicks.length>0&&!(Math.abs(e-(r=this._clicks[this._clicks.length-1]).x)+Math.abs(t-r.y)<=30)&&(this._clicks=[]),this._clicks.push({x:e,y:t,timestamp:i}),this._clicks.length>=3}}t.default=i},41007:function(e,t,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t._getAnchorNodeInHierarchy=t._getSafeTimezoneOffset=t._getSafeTimezone=t._getSafeNetworkInformation=t._registerEventHandler=t._getSanitizedPageUrl=t._getSafeUrl=t._shouldLogEvent=t._getTargetNode=t._stripEmptyValues=void 0;let r=i(26189);function n(e){if(!e)return null;let t=e;for(;t&&!["body","document"].includes(t.tagName.toLowerCase());){if("a"===t.tagName.toLowerCase())return t;t=t.parentElement}return null}t._stripEmptyValues=function(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>null!=t&&""!==t&&void 0!==t))},t._getTargetNode=function(e){if(!e)return null;let t=e.target||e.srcElement;return t&&t instanceof Element?(3===t.nodeType&&(t=t.parentNode||null),t):null},t._shouldLogEvent=function(e,t){if(!e||!t||1!==t.nodeType)return!1;let i=t.tagName.toLowerCase(),r=e.type.toLowerCase();switch(i){case"html":return!1;case"form":return"submit"===r;case"input":case"select":case"textarea":return["change"].includes(r);default:if("click"===r&&("button"===i||n(t)))return!0;return!1}},t._getSafeUrl=function(){var e,t,i;let n;let s=null!==(i=null===(t=null===(e=(0,r._getWindowSafe)())||void 0===e?void 0:e.location)||void 0===t?void 0:t.href)&&void 0!==i?i:"";try{n=new URL(s)}catch(e){n=new URL("error:")}return n},t._getSanitizedPageUrl=function(){return(0,r._getCurrentPageUrlSafe)()||""},t._registerEventHandler=function(e,t,i){e&&e.addEventListener&&e.addEventListener(t,i,!0)},t._getSafeNetworkInformation=function(){let e=(0,r._getWindowSafe)();return e&&e.navigator&&e.navigator.connection||null},t._getSafeTimezone=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return null}},t._getSafeTimezoneOffset=function(){try{return new Date().getTimezoneOffset()}catch(e){return null}},t._getAnchorNodeInHierarchy=n},38939:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getMetadataFromElement=t._gatherEventData=void 0;let r=i(26189),n=i(41007);function s(e,t){return e?e.length>t?e.substring(0,t)+"...":e:null}function o(e){let t={},i=Array.from(e.classList);return t.classList=i.length>0?i.slice(0,100):null,t.class=(s(e.getAttribute("class"),1e3)||"").replace(/\s+/g," ").trim(),t.id=s(e.getAttribute("id"),1e3),t.ariaLabel=s(e.getAttribute("aria-label"),1e3),t.selector=function(e){if(!e)return"";if(!e.parentNode){let t=e.tagName.toLowerCase();if(e.id)return`#${e.id}`;let i=t;if(e.className&&"string"==typeof e.className){let t=e.className.trim().split(/\s+/);t.length>0&&""!==t[0]&&(i+="."+t.join("."))}return i}let t=[],i=e,r=0;for(;i&&i.nodeType===Node.ELEMENT_NODE&&r<50;){let e=function(e){let t=e.tagName.toLowerCase();if(e.id)return`#${e.id}`;let i=t;if(e.className&&"string"==typeof e.className){let t=e.className.trim().split(/\s+/);t.length>0&&""!==t[0]&&(i+="."+t.join("."))}let r=e.parentElement;if(r&&r.children.length>1){let t=1,r=1,n=e.previousElementSibling;for(;n;)t++,n.tagName===e.tagName&&r++,n=n.previousElementSibling;i+=`:nth-child(${t})`,(r>1||function(e){let t=e.nextElementSibling;for(;t;){if(t.tagName===e.tagName)return!0;t=t.nextElementSibling}return!1}(e))&&(i+=`:nth-of-type(${r})`)}return i}(i);if(t.unshift(e),i.id||(i=i.parentElement)&&"body"===i.tagName.toLowerCase())break;r++}return t.join(" > ")}(e),t}t._gatherEventData=function(e){let t=e.tagName.toLowerCase(),i={},s=(0,r._getCurrentPageUrlSafe)()||"";i.tagName=t,Object.assign(i,o(e)),"form"===t&&Object.assign(i,function(e){var t;let i={};return i.action=e.getAttribute("action"),i.method=null!==(t=e.getAttribute("method"))&&void 0!==t?t:"GET",i.formName=e.getAttribute("name"),i.formId=e.getAttribute("id"),i}(e)),["input","select","textarea"].includes(t)&&"password"!==e.getAttribute("type")&&Object.assign(i,function(e){let t={};return t.content=e.value,t.inputName=e.getAttribute("name"),t}(e));let a=(0,n._getAnchorNodeInHierarchy)(e);return a&&Object.assign(i,function(e){let t={};return t.href=e.getAttribute("href"),t}(a)),("button"===t||a)&&Object.assign(i,function(e){let t={};return t.content=(e.textContent||"").trim(),Object.assign(t,function(e){let t={};if(!e)return t;let i=null==e?void 0:e.dataset;if(!i)return t;for(let e in i)t[`data-${e}`]=i[e]||"";return t}(e)),t}(a||e)),{value:s,metadata:i}},t._getMetadataFromElement=o},49134:function(e,t,i){"use strict";t.Hq=void 0;let r=i(26189),n=i(95031);Object.defineProperty(t,"Hq",{enumerable:!0,get:function(){return n.StatsigAutoCapturePlugin}}),i(3815),Object.assign((0,r._getStatsigGlobal)(),{AutoCapture:n.AutoCapture,runStatsigAutoCapture:n.runStatsigAutoCapture,StatsigAutoCapturePlugin:n.StatsigAutoCapturePlugin})},29940:function(e,t,i){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t._getNetworkInfo=t._gatherAllMetadata=t._gatherCommonMetadata=void 0;let r=i(26189),n=i(41007);function s(e){var t,i,s,a,l,u,c,d;let h=(0,r._getDocumentSafe)(),p=(0,r._getWindowSafe)();return(0,n._stripEmptyValues)(Object.assign({title:null==h?void 0:h.title,current_url:null===(t=null==p?void 0:p.location)||void 0===t?void 0:t.href,user_agent:(null===(i=null==p?void 0:p.navigator)||void 0===i?void 0:i.userAgent)&&(null===(a=null===(s=null==p?void 0:p.navigator)||void 0===s?void 0:s.userAgent)||void 0===a?void 0:a.length)>200?p.navigator.userAgent.substring(0,200):null===(l=null==p?void 0:p.navigator)||void 0===l?void 0:l.userAgent,locale:null===(u=null==p?void 0:p.navigator)||void 0===u?void 0:u.language,hostname:e.hostname,pathname:e.pathname,screen_width:null===(c=null==p?void 0:p.screen)||void 0===c?void 0:c.width,screen_height:null===(d=null==p?void 0:p.screen)||void 0===d?void 0:d.height,viewport_width:null==p?void 0:p.innerWidth,viewport_height:null==p?void 0:p.innerHeight,timestamp:Date.now(),timezone:(0,n._getSafeTimezone)(),timezone_offset:(0,n._getSafeTimezoneOffset)()},o()))}function o(){let e=(0,n._getSafeNetworkInformation)(),t={};return(null==e?void 0:e.effectiveType)!==void 0&&(t.effective_connection_type=e.effectiveType),(null==e?void 0:e.rtt)!==void 0&&(t.rtt_ms=e.rtt),(null==e?void 0:e.downlink)!==void 0&&(t.downlink_mbps=e.downlink,t.downlink_kbps=1e3*e.downlink),(null==e?void 0:e.saveData)!==void 0&&(t.save_data=e.saveData),t}t._gatherCommonMetadata=s,t._gatherAllMetadata=function(e){let t=(0,r._getDocumentSafe)(),i=(0,r._getWindowSafe)();if(!t||!i)return{};let o=function(e){let t=(null==e?void 0:e.referrer)||"";if(!t)return{referrer:null,referrer_domain:null,referrer_path:null,searchEngine:"",searchQuery:""};try{let e=new URL(t),i=e.hostname,r=["google","bing","yahoo","duckduckgo","baidu"].find(e=>i.includes(e+"."))||"",n=e.searchParams.get("yahoo"===r?"p":"q")||"";return{referrer:t,referrer_domain:e.hostname,referrer_path:e.pathname,searchEngine:r,searchQuery:n}}catch(e){return{referrer:null,referrer_domain:null,referrer_path:null,searchEngine:"",searchQuery:""}}}(t),a=s(e),l=function(e){let t=e.searchParams,i={};return["utm_source","utm_medium","utm_campaign","utm_term","utm_content","msclkid","dclid","fbclid","gad_source","gclid","gclsrc","wbraid","utm_id","irclid","igshid","_kx","li_fat_id","mc_cid","mc_eid","epik","qclid","rdt_cid","sccid","ttc","ttclid","ttc_id","twclid"].forEach(e=>{let r=t.get(e);r&&(i[e]=r)}),i}(e),u={};return e.searchParams.forEach((e,t)=>{u[t]=e}),Object.assign(Object.assign({},a),(0,n._stripEmptyValues)(Object.assign(Object.assign(Object.assign({},o),l),u)))},t._getNetworkInfo=o},70772:function(e,t,i){"use strict";i.d(t,{S:function(){return m}});var r=i(50803),n=i(83058),s=i(2906),o=i(24559),a=class extends o.l{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,i){let s=t.queryKey,o=t.queryHash??(0,r.Rm)(s,t),a=this.get(o);return a||(a=new n.A({client:e,queryKey:s,queryHash:o,options:e.defaultQueryOptions(t),state:i,defaultOptions:e.getQueryDefaults(s)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){s.V.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,r._x)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,r._x)(e,t)):t}notify(e){s.V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){s.V.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){s.V.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},l=i(64855),u=class extends o.l{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#i=new Map,this.#r=0}#t;#i;#r;build(e,t,i){let r=new l.m({mutationCache:this,mutationId:++this.#r,options:e.defaultMutationOptions(t),state:i});return this.add(r),r}add(e){this.#t.add(e);let t=c(e);if("string"==typeof t){let i=this.#i.get(t);i?i.push(e):this.#i.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){let t=c(e);if("string"==typeof t){let i=this.#i.get(t);if(i){if(i.length>1){let t=i.indexOf(e);-1!==t&&i.splice(t,1)}else i[0]===e&&this.#i.delete(t)}}}this.notify({type:"removed",mutation:e})}canRun(e){let t=c(e);if("string"!=typeof t)return!0;
1{let i=this.#i.get(t),r=i?.find(e=>"pending"===e.state.status);return!r||r===e}}runNext(e){let t=c(e);if("string"!=typeof t)return Promise.resolve();{let i=this.#i.get(t)?.find(t=>t!==e&&t.state.isPaused);return i?.continue()??Promise.resolve()}}clear(){s.V.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#i.clear()})}getAll(){return Array.from(this.#t)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,r.X7)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,r.X7)(e,t))}notify(e){s.V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return s.V.batch(()=>Promise.all(e.map(e=>e.continue().catch(r.ZT))))}};function c(e){return e.options.scope?.id}var d=i(87047),h=i(33906);function p(e){return{onFetch:(t,i)=>{let n=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],a=t.state.data?.pageParams||[],l={pages:[],pageParams:[]},u=0,c=async()=>{let i=!1,c=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?i=!0:t.signal.addEventListener("abort",()=>{i=!0}),t.signal)})},d=(0,r.cG)(t.options,t.fetchOptions),h=async(e,n,s)=>{if(i)return Promise.reject();if(null==n&&e.pages.length)return Promise.resolve(e);let o={client:t.client,queryKey:t.queryKey,pageParam:n,direction:s?"backward":"forward",meta:t.options.meta};c(o);let a=await d(o),{maxPages:l}=t.options,u=s?r.Ht:r.VX;return{pages:u(e.pages,a,l),pageParams:u(e.pageParams,n,l)}};if(s&&o.length){let e="backward"===s,t={pages:o,pageParams:a},i=(e?function(e,{pages:t,pageParams:i}){return t.length>0?e.getPreviousPageParam?.(t[0],t,i[0],i):void 0}:f)(n,t);l=await h(t,i,e)}else{let t=e??o.length;do{let e=0===u?a[0]??n.initialPageParam:f(n,l);if(u>0&&null==e)break;l=await h(l,e),u++}while(u<t)}return l};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},i):t.fetchFn=c}}}function f(e,{pages:t,pageParams:i}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,i[r],i):void 0}var m=class{#n;#s;#o;#a;#l;#u;#c;#d;constructor(e={}){this.#n=e.queryCache||new a,this.#s=e.mutationCache||new u,this.#o=e.defaultOptions||{},this.#a=new Map,this.#l=new Map,this.#u=0}mount(){this.#u++,1===this.#u&&(this.#c=d.j.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#n.onFocus())}),this.#d=h.N.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#n.onOnline())}))}unmount(){this.#u--,0===this.#u&&(this.#c?.(),this.#c=void 0,this.#d?.(),this.#d=void 0)}isFetching(e){return this.#n.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#s.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#n.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),i=this.#n.build(this,t),n=i.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime((0,r.KC)(t.staleTime,i))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#n.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,i){let n=this.defaultQueryOptions({queryKey:e}),s=this.#n.get(n.queryHash),o=s?.state.data,a=(0,r.SE)(t,o);if(void 0!==a)return this.#n.build(this,n).setData(a,{...i,manual:!0})}setQueriesData(e,t,i){return s.V.batch(()=>this.#n.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,i)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#n.get(t.queryHash)?.state}removeQueries(e){let t=this.#n;s.V.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let i=this.#n;return s.V.batch(()=>(i.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let i={revert:!0,...t};return Promise.all(s.V.batch(()=>this.#n.findAll(e).map(e=>e.cancel(i)))).then(r.ZT).catch(r.ZT)}invalidateQueries(e,t={}){return s.V.batch(()=>(this.#n.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let i={...t,cancelRefetch:t.cancelRefetch??!0};
1return Promise.all(s.V.batch(()=>this.#n.findAll(e).filter(e=>!e.isDisabled()).map(e=>{let t=e.fetch(void 0,i);return i.throwOnError||(t=t.catch(r.ZT)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(r.ZT)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let i=this.#n.build(this,t);return i.isStaleByTime((0,r.KC)(t.staleTime,i))?i.fetch(t):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(r.ZT).catch(r.ZT)}fetchInfiniteQuery(e){return e.behavior=p(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(r.ZT).catch(r.ZT)}ensureInfiniteQueryData(e){return e.behavior=p(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return h.N.isOnline()?this.#s.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#n}getMutationCache(){return this.#s}getDefaultOptions(){return this.#o}setDefaultOptions(e){this.#o=e}setQueryDefaults(e,t){this.#a.set((0,r.Ym)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#a.values()],i={};return t.forEach(t=>{(0,r.to)(e,t.queryKey)&&Object.assign(i,t.defaultOptions)}),i}setMutationDefaults(e,t){this.#l.set((0,r.Ym)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#l.values()],i={};return t.forEach(t=>{(0,r.to)(e,t.mutationKey)&&Object.assign(i,t.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#o.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,r.Rm)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===r.CN&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#o.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#n.clear(),this.#s.clear()}}},89426:function(e,t,i){"use strict";i.d(t,{t:function(){return r}});var r=function(){return null}},67702:function(e,t,i){"use strict";i.d(t,{Analytics:function(){return u}});var r=i(7653),n=i(68571),s=()=>{window.va||(window.va=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];(window.vaq=window.vaq||[]).push(t)})};function o(){return"undefined"!=typeof window}function a(){return"production"}function l(){return"development"===((o()?window.vam:a())||"production")}function u(e){return(0,r.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),(0,r.useEffect)(()=>{var t;!function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{debug:!0};if(!o())return;(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"auto";if("auto"===e){window.vam=a();return}window.vam=e})(t.mode),s(),t.beforeSend&&(null==(e=window.va)||e.call(window,"beforeSend",t.beforeSend));let i=t.scriptSrc?t.scriptSrc:l()?"https://va.vercel-scripts.com/v1/script.debug.js":t.basePath?"".concat(t.basePath,"/insights/script.js"):"/_vercel/insights/script.js";if(document.head.querySelector('script[src*="'.concat(i,'"]')))return;let r=document.createElement("script");r.src=i,r.defer=!0,r.dataset.sdkn="@vercel/analytics"+(t.framework?"/".concat(t.framework):""),r.dataset.sdkv="1.5.0",t.disableAutoTrack&&(r.dataset.disableAutoTrack="1"),t.endpoint?r.dataset.endpoint=t.endpoint:t.basePath&&(r.dataset.endpoint="".concat(t.basePath,"/insights")),t.dsn&&(r.dataset.dsn=t.dsn),r.onerror=()=>{let e=l()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log("[Vercel Web Analytics] Failed to load script from ".concat(i,". ").concat(e))},l()&&!1===t.debug&&(r.dataset.debug="false"),document.head.appendChild(r)}({framework:e.framework||"react",basePath:null!==(t=e.basePath)&&void 0!==t?t:function(){if(void 0!==n&&void 0!==n.env)return n.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...void 0!==e.route&&{disableAutoTrack:!0},...e})},[]),(0,r.useEffect)(()=>{e.route&&e.path&&function(e){var t;let{route:i,path:r}=e;null==(t=window.va)||t.call(window,"pageview",{route:i,path:r})}({route:e.route,path:e.path})},[e.route,e.path]),null}},53481:function(e,t,i){"use strict";i.d(t,{SpeedInsights:function(){return h}});var r=i(7653),n=i(81695),s=i(68571),o=()=>{window.si||(window.si=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];(window.siq=window.siq||[]).push(t)})};function a(){return false}function l(e){return new RegExp("/".concat(e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"(?=[/?#]|$)"))}function u(e){(0,r.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]);let t=(0,r.useRef)(null);return(0,r.useEffect)(()=>
1{if(t.current)e.route&&t.current(e.route);else{var i,r;let n=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!("undefined"!=typeof window)||null===t.route)return null;o();let i=t.scriptSrc?t.scriptSrc:t.dsn?"https://va.vercel-scripts.com/v1/speed-insights/script.js":t.basePath?"".concat(t.basePath,"/speed-insights/script.js"):"/_vercel/speed-insights/script.js";if(document.head.querySelector('script[src*="'.concat(i,'"]')))return null;t.beforeSend&&(null==(e=window.si)||e.call(window,"beforeSend",t.beforeSend));let r=document.createElement("script");return r.src=i,r.defer=!0,r.dataset.sdkn="@vercel/speed-insights"+(t.framework?"/".concat(t.framework):""),r.dataset.sdkv="1.2.0",t.sampleRate&&(r.dataset.sampleRate=t.sampleRate.toString()),t.route&&(r.dataset.route=t.route),t.endpoint?r.dataset.endpoint=t.endpoint:t.basePath&&(r.dataset.endpoint="".concat(t.basePath,"/speed-insights/vitals")),t.dsn&&(r.dataset.dsn=t.dsn),r.onerror=()=>{console.log("[Vercel Speed Insights] Failed to load script from ".concat(i,". Please check if any content blockers are enabled and try again."))},document.head.appendChild(r),{setRoute:e=>{r.dataset.route=null!=e?e:void 0}}}({framework:null!==(i=e.framework)&&void 0!==i?i:"react",basePath:null!==(r=e.basePath)&&void 0!==r?r:function(){if(void 0!==s&&void 0!==s.env)return s.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...e});n&&(t.current=n.setRoute)}},[e.route]),null}var c=()=>{let e=(0,n.useParams)(),t=(0,n.useSearchParams)()||new URLSearchParams,i=(0,n.usePathname)();return e?function(e,t){if(!e||!t)return e;let i=e;try{let e=Object.entries(t);for(let[t,r]of e)if(!Array.isArray(r)){let e=l(r);e.test(i)&&(i=i.replace(e,"/[".concat(t,"]")))}for(let[t,r]of e)if(Array.isArray(r)){let e=l(r.join("/"));e.test(i)&&(i=i.replace(e,"/[...".concat(t,"]")))}return i}catch(t){return e}}(i,Object.keys(e).length?e:Object.fromEntries(t.entries())):null};function d(e){let t=c();return r.createElement(u,{route:t,...e,framework:"next",basePath:function(){if(void 0!==s&&void 0!==s.env)return s.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH}()})}function h(e){return r.createElement(r.Suspense,{fallback:null},r.createElement(d,{...e}))}},49790:function(e,t,i){"use strict";let r,n,s,o,a,l;i.r(t),i.d(t,{EventType:function(){return ez},IncrementalSource:function(){return e$},MouseInteractions:function(){return eY},PLUGIN_NAME:function(){return iM},Replayer:function(){return rA},ReplayerEvents:function(){return eK},addCustomEvent:function(){return tR},canvasMutation:function(){return iP},freezePage:function(){return tI},getRecordConsolePlugin:function(){return iN},getReplayConsolePlugin:function(){return iO},mirror:function(){return ey},pack:function(){return im},record:function(){return tD},unpack:function(){return ig},utils:function(){return M}});var u,c,d,h,p,f,m,g,y,v,b,S,_,w,E,T,C,M={};i.r(M),i.d(M,{StyleSheetMirror:function(){return eW},_mirror:function(){return ey},closestElementOfNode:function(){return eC},getBaseDimension:function(){return eP},getNestedRule:function(){return ej},getPositionsAndIndex:function(){return eV},getRootShadowHost:function(){return eq},getShadowHost:function(){return eB},getWindowHeight:function(){return eE},getWindowScroll:function(){return ew},getWindowWidth:function(){return eT},hasShadowRoot:function(){return eF},hookSetter:function(){return eb},inDom:function(){return eH},isAncestorRemoved:function(){return eR},isBlocked:function(){return eM},isIgnored:function(){return eD},isSerialized:function(){return eN},isSerializedIframe:function(){return eA},isSerializedStylesheet:function(){return eL},iterateResolveTree:function(){return ek},legacy_isTouchEvent:function(){return eI},nowTimestamp:function(){return e_},on:function(){return em},patch:function(){return eS},polyfill:function(){return eO},queueToResolveTrees:function(){return ex},shadowHostInDom:function(){return eG},throttle:function(){return ev},uniqueTextMutations:function(){return eU}});var N={};function D(e){return e.nodeType===e.ELEMENT_NODE}function R(e){let t=null==e?void 0:e.host;return(null==t?void 0:t.shadowRoot)===e}function I(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function O(e){try{var t;let i=e.rules||e.cssRules;return i?((t=Array.from(i,x).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}}function x(e){let t;if("styleSheet"in e)try{t=O(e.styleSheet)||function(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let i=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?i.push("layer"):e.layerName&&i.push(`layer(${e.layerName})`),e.supportsText&&i.push(`supports(${e.supportsText})`),e.media.length&&i.push(e.media.mediaText),i.join(" ")+";"}(e)}catch(e){}else if("selectorText"in e&&e.selectorText.includes(":"))return e.cssText.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2");return t||e.cssText}i.r(N),i.d(N,{default:function(){return rp}}),(u=_||(_={}))[u.Document=0]="Document",u[u.DocumentType=1]="DocumentType",u[u.Element=2]="Element",u[u.Text=3]="Text",u[u.CDATA=4]="CDATA",u[u.Comment=5]="Comment";
1class k{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){var t;if(!e)return -1;let i=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=i?i:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let i=t.id;this.idNodeMap.set(i,e),this.nodeMetaMap.set(e,t)}replace(e,t){let i=this.getNode(e);if(i){let e=this.nodeMetaMap.get(i);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function A({element:e,maskInputOptions:t,tagName:i,type:r,value:n,maskInputFn:s}){let o=n||"",a=r&&L(r);return(t[i.toLowerCase()]||a&&t[a])&&(o=s?s(o,e):"*".repeat(o.length)),o}function L(e){return e.toLowerCase()}let P="__rrweb_original__";function F(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?L(t):null}function j(e,t){var i;let r;try{r=new URL(e,null!=t?t:window.location.href)}catch(e){return null}let n=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(i=null==n?void 0:n[1])&&void 0!==i?i:null}let V=1,U=RegExp("[^a-z0-9-_:]");function W(){return V++}let B=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,q=/^(?:[a-z+]+:)?\/\//i,G=/^www\..*/i,H=/^(data:)([^,]*),(.*)/i;function z(e,t){return(e||"").replace(B,(e,i,r,n,s,o)=>{let a=r||s||o,l=i||n||"";if(!a)return e;if(q.test(a)||G.test(a)||H.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${(t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]+a}${l})`;let u=t.split("/"),c=a.split("/");for(let e of(u.pop(),c))"."!==e&&(".."===e?u.pop():u.push(e));return`url(${l}${u.join("/")}${l})`})}let $=/^[^ \t\n\r\u000c]+/,Y=/^[, \t\n\r\u000c]+/,Q=new WeakMap;function X(e,t){return t&&""!==t.trim()?K(e,t):t}function K(e,t){let i=Q.get(e);if(i||(i=e.createElement("a"),Q.set(e,i)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return i.setAttribute("href",t),i.href}function J(e,t,i,r){return r?"src"!==i&&("href"!==i||"use"===t&&"#"===r[0])&&("xlink:href"!==i||"#"===r[0])&&("background"!==i||"table"!==t&&"td"!==t&&"th"!==t)?"srcset"===i?function(e,t){if(""===t.trim())return t;let i=0;function r(e){let r;let n=e.exec(t.substring(i));return n?(r=n[0],i+=r.length,r):""}let n=[];for(;r(Y),!(i>=t.length);){let s=r($);if(","===s.slice(-1))s=X(e,s.substring(0,s.length-1)),n.push(s);else{let r="";s=X(e,s);let o=!1;for(;;){let e=t.charAt(i);if(""===e){n.push((s+r).trim());break}if(o)")"===e&&(o=!1);else{if(","===e){i+=1,n.push((s+r).trim());break}"("===e&&(o=!0)}r+=e,i+=1}}}return n.join(", ")}(e,r):"style"===i?z(r,K(e)):"object"===t&&"data"===i?X(e,r):r:X(e,r):r}function Z(e,t,i){return("video"===e||"audio"===e)&&"autoplay"===t}function ee(e,t,i){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!i&&ee(e.parentNode,t,i);for(let i=e.classList.length;i--;){let r=e.classList[i];if(t.test(r))return!0}return!!i&&ee(e.parentNode,t,i)}function et(e,t,i,r){try{let n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===n)return!1;if("string"==typeof t){if(r){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(ee(n,t,r))return!0;if(i){if(r){if(n.closest(i))return!0}else if(n.matches(i))return!0}}catch(e){}return!1}function ei(e){return null==e?"":e.toLowerCase()}function er(e,t){let i;let{doc:s,mirror:o,blockClass:a,blockSelector:l,maskTextClass:u,maskTextSelector:c,skipChild:d=!1,inlineStylesheet:h=!0,maskInputOptions:p={},maskTextFn:f,maskInputFn:m,slimDOMOptions:g,dataURLOptions:y={},inlineImages:v=!1,recordCanvas:b=!1,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:E=5e3,onStylesheetLoad:T,stylesheetLoadTimeout:C=5e3,keepIframeSrcFn:M=()=>!1,newlyAddedElement:N=!1}=t,{needsMask:x}=t,{preserveWhiteSpace:k=!0}=t;!x&&e.childNodes&&(x=et(e,u,c,void 0===x));let V=function(e,t){let{doc:i,mirror:s,blockClass:o,blockSelector:a,needsMask:l,inlineStylesheet:u,maskInputOptions:c={},maskTextFn:d,maskInputFn:h,dataURLOptions:p={},inlineImages:f,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:y=!1}=t,v=function(e,t){if(!t.hasNode(e))return;let i=t.getId(e);return 1===i?void 0:i}(i,s);switch(e.nodeType){case e.DOCUMENT_NODE:if("CSS1Compat"!==e.compatMode)return{type:_.Document,childNodes:[],compatMode:e.compatMode};return{type:_.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:_.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return function(e,t){let i;let{doc:s,blockClass:o,blockSelector:a,inlineStylesheet:l,maskInputOptions:u={},maskInputFn:c,dataURLOptions:d={},inlineImages:h,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:m=!1,rootId:g}=t,y=function(e,t,i){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){let r=e.classList[i];if(t.test(r))return!0}if(i)return e.matches(i)}catch(e){}return!1}(e,o,a),v=function(e){if(e instanceof HTMLFormElement)return"form";let t=L(e.tagName);return U.test(t)?"div":t}(e),b={},S=e.attributes.length;for(let t=0;t<S;t++){let i=e.attributes[t];Z(v,i.name,i.value)||(b[i.name]=J(s,v,L(i.name),i.value))}if("link"===v&&l){let t=Array.from(s.styleSheets).find(t=>t.href===e.href),i=null;t&&(i=O(t)),i&&(delete b.rel,delete b.href,b._cssText=z(i,t.href))}if("style"===v&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let t=O(e.sheet);t&&(b._cssText=z(t,K(s)))}if("input"===v||"textarea"===v||"select"===v){let t=e.value,i=e.checked;"radio"!==b.type&&"checkbox"!==b.type&&"submit"!==b.type&&"button"!==b.type&&t?b.value=A({element:e,type:F(e),tagName:v,value:t,maskInputOptions:u,maskInputFn:c}):i&&(b.checked=i)}if("option"===v&&(e.selected&&!u.select?b.selected=!0:delete b.selected),"canvas"===v&&p){
1if("2d"===e.__context)!function(e){let t=e.getContext("2d");if(!t)return!0;for(let i=0;i<e.width;i+=50)for(let r=0;r<e.height;r+=50){let n=t.getImageData;if(new Uint32Array((P in n?n[P]:n).call(t,i,r,Math.min(50,e.width-i),Math.min(50,e.height-r)).data.buffer).some(e=>0!==e))return!1}return!0}(e)&&(b.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){let t=e.toDataURL(d.type,d.quality),i=document.createElement("canvas");i.width=e.width,i.height=e.height,t!==i.toDataURL(d.type,d.quality)&&(b.rr_dataURL=t)}}if("img"===v&&h){r||(n=(r=s.createElement("canvas")).getContext("2d"));let t=e.crossOrigin;e.crossOrigin="anonymous";let i=()=>{e.removeEventListener("load",i);try{r.width=e.naturalWidth,r.height=e.naturalHeight,n.drawImage(e,0,0),b.rr_dataURL=r.toDataURL(d.type,d.quality)}catch(t){console.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}t?b.crossOrigin=t:e.removeAttribute("crossorigin")};e.complete&&0!==e.naturalWidth?i():e.addEventListener("load",i)}if("audio"===v||"video"===v){let t=b;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}if(!m&&(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop)),y){let{width:t,height:i}=e.getBoundingClientRect();b={class:b.class,rr_width:`${t}px`,rr_height:`${i}px`}}"iframe"!==v||f(b.src)||(e.contentDocument||(b.rr_src=b.src),delete b.src);try{customElements.get(v)&&(i=!0)}catch(e){}return{type:_.Element,tagName:v,attributes:b,childNodes:[],isSVG:!!("svg"===e.tagName||e.ownerSVGElement)||void 0,needBlock:y,rootId:g,isCustom:i}}(e,{doc:i,blockClass:o,blockSelector:a,inlineStylesheet:u,maskInputOptions:c,maskInputFn:h,dataURLOptions:p,inlineImages:f,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:y,rootId:v});case e.TEXT_NODE:return function(e,t){var i;let{needsMask:r,maskTextFn:n,rootId:s}=t,o=e.parentNode&&e.parentNode.tagName,a=e.textContent,l="STYLE"===o||void 0,u="SCRIPT"===o||void 0;if(l&&a){try{e.nextSibling||e.previousSibling||(null===(i=e.parentNode.sheet)||void 0===i?void 0:i.cssRules)&&(a=O(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}a=z(a,K(t.doc))}return u&&(a="SCRIPT_PLACEHOLDER"),!l&&!u&&a&&r&&(a=n?n(a,e.parentElement):a.replace(/[\S]/g,"*")),{type:_.Text,textContent:a||"",isStyle:l,rootId:s}}(e,{doc:i,needsMask:l,maskTextFn:d,rootId:v});case e.CDATA_SECTION_NODE:return{type:_.CDATA,textContent:"",rootId:v};case e.COMMENT_NODE:return{type:_.Comment,textContent:e.textContent||"",rootId:v};default:return!1}}(e,{doc:s,mirror:o,blockClass:a,blockSelector:l,needsMask:x,inlineStylesheet:h,maskInputOptions:p,maskTextFn:f,maskInputFn:m,dataURLOptions:y,inlineImages:v,recordCanvas:b,keepIframeSrcFn:M,newlyAddedElement:N});if(!V)return console.warn(e,"not serialized"),null;i=o.hasNode(e)?o.getId(e):!function(e,t){if(t.comment&&e.type===_.Comment)return!0;if(e.type===_.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===j(e.attributes.href))||t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ei(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ei(e.attributes.name)||"icon"===ei(e.attributes.rel)||"apple-touch-icon"===ei(e.attributes.rel)||"shortcut icon"===ei(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ei(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(ei(e.attributes.property).match(/^(og|twitter|fb):/)||ei(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ei(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===ei(e.attributes.name)||"googlebot"===ei(e.attributes.name)||"bingbot"===ei(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;else if(t.headMetaAuthorship&&("author"===ei(e.attributes.name)||"generator"===ei(e.attributes.name)||"framework"===ei(e.attributes.name)||"publisher"===ei(e.attributes.name)||"progid"===ei(e.attributes.name)||ei(e.attributes.property).match(/^article:/)||ei(e.attributes.property).match(/^product:/)))return!0;else if(t.headMetaVerification&&("google-site-verification"===ei(e.attributes.name)||"yandex-verification"===ei(e.attributes.name)||"csrf-token"===ei(e.attributes.name)||"p:domain_verify"===ei(e.attributes.name)||"verify-v1"===ei(e.attributes.name)||"verification"===ei(e.attributes.name)||"shopify-checkout-api-token"===ei(e.attributes.name)))return!0}}return!1}(V,g)&&(k||V.type!==_.Text||V.isStyle||V.textContent.replace(/^\s+|\s+$/gm,"").length)?W():-2;let B=Object.assign(V,{id:i});if(o.add(e,B),-2===i)return null;S&&S(e);let q=!d;if(B.type===_.Element){q=q&&!B.needBlock,delete B.needBlock;let t=e.shadowRoot;t&&I(t)&&(B.isShadowHost=!0)}if((B.type===_.Document||B.type===_.Element)&&q){g.headWhitespace&&B.type===_.Element&&"head"===B.tagName&&(k=!1);let t={doc:s,mirror:o,blockClass:a,blockSelector:l,needsMask:x,maskTextClass:u,maskTextSelector:c,skipChild:d,inlineStylesheet:h,maskInputOptions:p,maskTextFn:f,maskInputFn:m,slimDOMOptions:g,dataURLOptions:y,inlineImages:v,recordCanvas:b,preserveWhiteSpace:k,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:C,keepIframeSrcFn:M};if(B.type===_.Element&&"textarea"===B.tagName&&void 0!==B.attributes.value);else for(let i of Array.from(e.childNodes)){let e=er(i,t);e&&B.childNodes.push(e)}if(D(e)&&e.shadowRoot)for(let i of Array.from(e.shadowRoot.childNodes)){let r=er(i,t);r&&(I(e.shadowRoot)&&(r.isShadow=!0),B.childNodes.push(r))}}return e.parentNode&&R(e.parentNode)&&I(e.parentNode)&&(B.isShadow=!0),B.type===_.Element&&"iframe"===B.tagName&&function(e,t,i){let r;let n=e.contentWindow;if(!n)return;let s=!1;try{r=n.document.readyState}catch(e){return}if("complete"!==r){let r=setTimeout(()=>{s||(t(),s=!0)},i);e.addEventListener("load",()=>{clearTimeout(r),s=!0,t()});return}let o="about:blank";if(n.location.href!==o||e.src===o||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{let t=e.contentDocument;if(t&&w){let i=er(t,{doc:t,mirror:o,blockClass:a,blockSelector:l,needsMask:x,maskTextClass:u,maskTextSelector:c,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskTextFn:f,maskInputFn:m,slimDOMOptions:g,dataURLOptions:y,inlineImages:v,recordCanvas:b,preserveWhiteSpace:k,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:C,keepIframeSrcFn:M});i&&w(e,i)}},E),B.type===_.Element&&"link"===B.tagName&&"string"==typeof B.attributes.rel&&("stylesheet"===B.attributes.rel||"preload"===B.attributes.rel&&"string"==typeof B.attributes.href&&"css"===j(B.attributes.href))&&function(e,t,i){let r,n=!1;try{r=e.sheet}catch(e){return}if(r)return;let s=setTimeout(()=>{n||(t(),n=!0)},i);e.addEventListener("load",()=>{clearTimeout(s),n=!0,t()})}(e,()=>{if(T){let t=er(e,{doc:s,mirror:o,blockClass:a,blockSelector:l,needsMask:x,maskTextClass:u,maskTextSelector:c,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskTextFn:f,maskInputFn:m,slimDOMOptions:g,dataURLOptions:y,inlineImages:v,recordCanvas:b,preserveWhiteSpace:k,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:E,onStylesheetLoad:T,stylesheetLoadTimeout:C,keepIframeSrcFn:M});t&&T(e,t)}},C),B}let en=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function es(e){return e?e.replace(/^\s+|\s+$/g,""):""}let eo={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
1:"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"};function ea(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}let el=/(max|min)-device-(width|height)/,eu=RegExp(el.source,"g"),ec=/([^\\]):hover/,ed=RegExp(ec.source,"g");function eh(e,t){let i=null==t?void 0:t.stylesWithHoverClass.get(e);if(i)return i;let r=function(e,t={}){let i=1,r=1;function n(e){let t=e.match(/\n/g);t&&(i+=t.length);let n=e.lastIndexOf("\n");r=-1===n?r+e.length:e.length-n}function s(){let e={line:i,column:r};return t=>(t.position=new o(e),h(),t)}class o{constructor(e){this.start=e,this.end={line:i,column:r},this.source=t.source}}o.prototype.content=e;let a=[];function l(n){let s=Error(`${t.source||""}:${i}:${r}: ${n}`);if(s.reason=n,s.filename=t.source,s.line=i,s.column=r,s.source=e,t.silent)a.push(s);else throw s}function u(){return d(/^{\s*/)}function c(){return d(/^}/)}function d(t){let i=t.exec(e);if(!i)return;let r=i[0];return n(r),e=e.slice(r.length),i}function h(){d(/^\s*/)}function p(e=[]){let t;for(;t=f();)t&&e.push(t),t=f();return e}function f(){let t=s();if("/"!==e.charAt(0)||"*"!==e.charAt(1))return;let i=2;for(;""!==e.charAt(i)&&("*"!==e.charAt(i)||"/"!==e.charAt(i+1));)++i;if(i+=2,""===e.charAt(i-1))return l("End of comment missing");let o=e.slice(2,i-2);return r+=2,n(o),e=e.slice(i),r+=2,t({type:"comment",comment:o})}function m(){for(h();"}"==e[0];)l("extra closing bracket"),e=e.slice(1),h();let t=d(/^(((?<!\\)"(?:\\"|[^"])*"|(?<!\\)'(?:\\'|[^'])*'|[^{])+)/);if(t)return(function(e){let t=[],i="",r=0,n=0,s=null;for(let o of e){let e=i.endsWith("\\");s?s!==o||e||(s=null):"("===o?r++:")"===o?r--:"["===o?n++:"]"===o?n--:"'\"".includes(o)&&(s=o),","===o&&0===r&&0===n?(t.push(i),i=""):i+=o}return i&&t.push(i),t})(t[0].trim().replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,e=>e.replace(/,/g,"‌"))).map(e=>e.replace(/\u200C/g,",").trim())}function g(){let e=s(),t=d(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!t)return;let i=es(t[0]);if(!d(/^:\s*/))return l("property missing ':'");let r=d(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),n=e({type:"declaration",property:i.replace(en,""),value:r?es(r[0]).replace(en,""):""});return d(/^[;\s]*/),n}function y(){let e;let t=[];if(!u())return l("missing '{'");for(p(t);e=g();)!1!==e&&(t.push(e),p(t)),e=g();return c()?t:l("missing '}'")}let v=_("import"),b=_("charset"),S=_("namespace");function _(e){let t=RegExp("^@"+e+"\\s*((?:(?<!\\\\)\"(?:\\\\\"|[^\"])*\"|(?<!\\\\)'(?:\\\\'|[^'])*'|[^;])+);");return()=>{let i=s(),r=d(t);if(!r)return;let n={type:e};return n[e]=r[1].trim(),i(n)}}return function e(t,i){let r=t&&"string"==typeof t.type,n=r?t:i;for(let i of Object.keys(t)){let r=t[i];Array.isArray(r)?r.forEach(t=>{e(t,n)}):r&&"object"==typeof r&&e(r,n)}return r&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:i||null}),t}(function(){let i=function t(){let i;let r=[];for(h(),p(r);e.length&&"}"!==e.charAt(0)&&(i=function(){if("@"===e[0])return function(){let e;
1let t=s(),i=d(/^@([-\w]+)?keyframes\s*/);if(!i)return;let r=i[1];if(!(i=d(/^([-\w]+)\s*/)))return l("@keyframes missing name");let n=i[1];if(!u())return l("@keyframes missing '{'");let o=p();for(;e=function(){let e;let t=[],i=s();for(;e=d(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),d(/^,\s*/);if(t.length)return i({type:"keyframe",values:t,declarations:y()})}();)o.push(e),o=o.concat(p());return c()?t({type:"keyframes",name:n,vendor:r,keyframes:o}):l("@keyframes missing '}'")}()||function(){let e=s(),i=d(/^@media *([^{]+)/);if(!i)return;let r=es(i[1]);if(!u())return l("@media missing '{'");let n=p().concat(t());return c()?e({type:"media",media:r,rules:n}):l("@media missing '}'")}()||function(){let e=s(),t=d(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:es(t[1]),media:es(t[2])})}()||function(){let e=s(),i=d(/^@supports *([^{]+)/);if(!i)return;let r=es(i[1]);if(!u())return l("@supports missing '{'");let n=p().concat(t());return c()?e({type:"supports",supports:r,rules:n}):l("@supports missing '}'")}()||v()||b()||S()||function(){let e=s(),i=d(/^@([-\w]+)?document *([^{]+)/);if(!i)return;let r=es(i[1]),n=es(i[2]);if(!u())return l("@document missing '{'");let o=p().concat(t());return c()?e({type:"document",document:n,vendor:r,rules:o}):l("@document missing '}'")}()||function(){let e;let t=s();if(!d(/^@page */))return;let i=m()||[];if(!u())return l("@page missing '{'");let r=p();for(;e=g();)r.push(e),r=r.concat(p());return c()?t({type:"page",selectors:i,declarations:r}):l("@page missing '}'")}()||function(){let e=s();if(!d(/^@host\s*/))return;if(!u())return l("@host missing '{'");let i=p().concat(t());return c()?e({type:"host",rules:i}):l("@host missing '}'")}()||function(){let e;let t=s();if(!d(/^@font-face\s*/))return;if(!u())return l("@font-face missing '{'");let i=p();for(;e=g();)i.push(e),i=i.concat(p());return c()?t({type:"font-face",declarations:i}):l("@font-face missing '}'")}()}()||function(){let e=s(),t=m();return t?(p(),e({type:"rule",selectors:t,declarations:y()})):l("selector missing")}());)i&&(r.push(i),p(r));return r}();return{type:"stylesheet",stylesheet:{source:t.source,rules:i,parsingErrors:a}}}())}(e,{silent:!0});if(!r.stylesheet)return e;let n=[],s=[];!function e(t){"selectors"in t&&t.selectors&&t.selectors.forEach(e=>{ec.test(e)&&n.push(e)}),"media"in t&&t.media&&el.test(t.media)&&s.push(t.media),"rules"in t&&t.rules&&t.rules.forEac
1h(e)}(r.stylesheet);let o=e;if(n.length>0){let e=RegExp(n.filter((e,t)=>n.indexOf(e)===t).sort((e,t)=>t.length-e.length).map(e=>ea(e)).join("|"),"g");o=o.replace(e,e=>{let t=e.replace(ed,"$1.\\:hover");return`${e}, ${t}`})}if(s.length>0){let e=RegExp(s.filter((e,t)=>s.indexOf(e)===t).sort((e,t)=>t.length-e.length).map(e=>ea(e)).join("|"),"g");o=o.replace(e,e=>e.replace(eu,"$1-$2"))}return null==t||t.stylesWithHoverClass.set(e,o),o}function ep(){return{stylesWithHoverClass:new Map}}function ef(e,t){let{doc:i,mirror:r,skipChild:n=!1,hackCss:s=!0,afterAppend:o,cache:a}=t;if(r.has(e.id)){var l;let t=r.getNode(e.id);if((l=r.getMeta(t))&&e&&l.type===e.type&&(l.type===_.Document?l.compatMode===e.compatMode:l.type===_.DocumentType?l.name===e.name&&l.publicId===e.publicId&&l.systemId===e.systemId:l.type===_.Comment||l.type===_.Text||l.type===_.CDATA?l.textContent===e.textContent:l.type===_.Element&&l.tagName===e.tagName&&JSON.stringify(l.attributes)===JSON.stringify(e.attributes)&&l.isSVG===e.isSVG&&l.needBlock===e.needBlock))return r.getNode(e.id)}let u=function(e,t){var i;let{doc:r,hackCss:n,cache:s}=t;switch(e.type){case _.Document:return r.implementation.createDocument(null,"",null);case _.DocumentType:return r.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case _.Element:{let t,o;let a=("link"===(o=eo[e.tagName]?eo[e.tagName]:e.tagName)&&e.attributes._cssText&&(o="style"),o);e.isSVG?t=r.createElementNS("http://www.w3.org/2000/svg",a):(e.isCustom&&(null===(i=r.defaultView)||void 0===i?void 0:i.customElements)&&!r.defaultView.customElements.get(e.tagName)&&r.defaultView.customElements.define(e.tagName,class extends r.defaultView.HTMLElement{}),t=r.createElement(a));let l={};for(let i in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,i))continue;let o=e.attributes[i];if("option"===a&&"selected"===i&&!1===o||null===o)continue;if(!0===o&&(o=""),i.startsWith("rr_")){l[i]=o;continue}let u="textarea"===a&&"value"===i,c="style"===a&&"_cssText"===i;if(c&&n&&"string"==typeof o&&(o=eh(o,s)),(u||c)&&"string"==typeof o){t.appendChild(r.createTextNode(o)),e.childNodes=[];continue}try{if(e.isSVG&&"xlink:href"===i)t.setAttributeNS("http://www.w3.org/1999/xlink",i,o.toString());else if("onload"===i||"onclick"===i||"onmouse"===i.substring(0,7))t.setAttribute("_"+i,o.toString());else if("meta"===a&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===i){t.setAttribute("csp-content",o.toString());continue}else"link"===a&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===a&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")||("img"===a&&e.attributes.srcset&&e.attributes.rr_dataURL?t.setAttribute("rrweb-original-srcset",e.attributes.srcset):t.setAttribute(i,o.toString()))}catch(e){}}for(let i in l){let r=l[i];if("canvas"===a&&"rr_dataURL"===i){let e=document.createElement("img");e.onload=()=>{let i=t.getContext("2d");i&&i.drawImage(e,0,0,e.width,e.height)},e.src=r.toString(),t.RRNodeType&&(t.rr_dataURL=r.toString())}else if("img"===a&&"rr_dataURL"===i){let i=t;i.currentSrc.startsWith("data:")||(i.setAttribute("rrweb-original-src",e.attributes.src),i.src=r.toString())}if("rr_width"===i)t.style.width=r.toString();else if("rr_height"===i)t.style.height=r.toString();else if("rr_mediaCurrentTime"===i&&"number"==typeof r)t.currentTime=r;else if("rr_mediaState"===i)switch(r){case"played":t.play().catch(e=>console.warn("media playback error",e));break;case"paused":t.pause()}else"rr_mediaPlaybackRate"===i&&"number"==typeof r?t.playbackRate=r:"rr_mediaMuted"===i&&"boolean"==typeof r?t.muted=r:"rr_mediaLoop"===i&&"boolean"==typeof r?t.loop=r:"rr_mediaVolume"===i&&"number"==typeof r&&(t.volume=r)}if(e.isShadowHost){if(t.shadowRoot)for(;t.shadowRoot.firstChild;)t.shadowRoot.removeChild(t.shadowRoot.firstChild);else t.attachShadow({mode:"open"})}return t}case _.Text:return r.createTextNode(e.isStyle&&n?eh(e.textContent,s):e.textContent);case _.CDATA:return r.createCDATASection(e.textContent);case _.Comment:return r.createComment(e.textContent);default:return null}}(e,{doc:i,hackCss:s,cache:a});if(!u)return null;if(e.rootId&&r.getNode(e.rootId)!==i&&r.replace(e.rootId,i),e.type===_.Document&&(i.close(),i.open(),"BackCompat"===e.compatMode&&e.childNodes&&e.childNodes[0].type!==_.DocumentType&&(e.childNodes[0].type===_.Element&&"xmlns"in e.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===e.childNodes[0].attributes.xmlns?i.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):i.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),u=i),r.add(u,e),(e.type===_.Document||e.type===_.Element)&&!n)for(let t of e.childNodes){let n=ef(t,{doc:i,mirror:r,skipChild:!1,hackCss:s,afterAppend:o,cache:a});if(!n){console.warn("Failed to rebuild",t);continue}if(t.isShadow&&D(u)&&u.shadowRoot)u.shadowRoot.appendChild(n);else if(e.type===_.Document&&t.type==_.Element){let e=null;
1n.childNodes.forEach(t=>{"BODY"===t.nodeName&&(e=t)}),e?(n.removeChild(e),u.appendChild(n),n.appendChild(e)):u.appendChild(n)}else u.appendChild(n);o&&o(n,t.id)}return u}function em(e,t,i=document){let r={capture:!0,passive:!0};return i.addEventListener(e,t,r),()=>i.removeEventListener(e,t,r)}let eg="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",ey={map:{},getId:()=>(console.error(eg),-1),getNode:()=>(console.error(eg),null),removeNodeFromMap(){console.error(eg)},has:()=>(console.error(eg),!1),reset(){console.error(eg)}};function ev(e,t,i={}){let r=null,n=0;return function(...s){let o=Date.now();n||!1!==i.leading||(n=o);let a=t-(o-n),l=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),n=o,e.apply(l,s)):r||!1===i.trailing||(r=setTimeout(()=>{n=!1===i.leading?0:Date.now(),r=null,e.apply(l,s)},a))}}function eb(e,t,i,r,n=window){let s=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,r?i:{set(e){setTimeout(()=>{i.set.call(this,e)},0),s&&s.set&&s.set.call(this,e)}}),()=>eb(e,t,s||{},!0)}function eS(e,t,i){try{if(!(t in e))return()=>{};let r=e[t],n=i(r);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=n,()=>{e[t]=r}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ey=new Proxy(ey,{get:(e,t,i)=>("map"===t&&console.error(eg),Reflect.get(e,t,i))}));let e_=Date.now;function ew(e){var t,i,r,n,s,o;let a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null==a?void 0:a.documentElement.scrollLeft)||(null===(i=null===(t=null==a?void 0:a.body)||void 0===t?void 0:t.parentElement)||void 0===i?void 0:i.scrollLeft)||(null===(r=null==a?void 0:a.body)||void 0===r?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==a?void 0:a.documentElement.scrollTop)||(null===(s=null===(n=null==a?void 0:a.body)||void 0===n?void 0:n.parentElement)||void 0===s?void 0:s.scrollTop)||(null===(o=null==a?void 0:a.body)||void 0===o?void 0:o.scrollTop)||0}}function eE(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function eT(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function eC(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function eM(e,t,i,r){if(!e)return!1;let n=eC(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t)||r&&null!==n.closest("."+t))return!0}else if(ee(n,t,r))return!0}catch(e){}return!!(i&&(n.matches(i)||r&&null!==n.closest(i)))}function eN(e,t){return -1!==t.getId(e)}function eD(e,t){return -2===t.getId(e)}function eR(e,t){if(R(e))return!1;let i=t.getId(e);return!t.has(i)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||eR(e.parentNode,t))}function eI(e){return!!e.changedTouches}function eO(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw TypeError("1 argument is required");do if(this===t)return!0;while(t=t&&t.parentNode);return!1})}function ex(e){let t={},i=(e,i)=>{let r={value:e,parent:i,children:[]};return t[e.node.id]=r,r},r=[];for(let n of e){let{nextId:e,parentId:s}=n;if(e&&e in t){let s=t[e];if(s.parent){let e=s.parent.children.indexOf(s);s.parent.children.splice(e,0,i(n,s.parent))}else{let e=r.indexOf(s);r.splice(e,0,i(n,null))}continue}if(s in t){let e=t[s];e.children.push(i(n,e));continue}r.push(i(n,null))}return r}function ek(e,t){t(e.value);for(let i=e.children.length-1;i>=0;i--)ek(e.children[i],t)}
1function eA(e,t){return!!("IFRAME"===e.nodeName&&t.getMeta(e))}function eL(e,t){return!!("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function eP(e,t){var i,r;let n=null===(r=null===(i=e.ownerDocument)||void 0===i?void 0:i.defaultView)||void 0===r?void 0:r.frameElement;if(!n||n===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};let s=n.getBoundingClientRect(),o=eP(n,t),a=s.height/n.clientHeight;return{x:s.x*o.relativeScale+o.x,y:s.y*o.relativeScale+o.y,relativeScale:a,absoluteScale:o.absoluteScale*a}}function eF(e){return!!(null==e?void 0:e.shadowRoot)}function ej(e,t){let i=e[t[0]];return 1===t.length?i:ej(i.cssRules[t[1]].cssRules,t.slice(2))}function eV(e){let t=[...e],i=t.pop();return{positions:t,index:i}}function eU(e){let t=new Set,i=[];for(let r=e.length;r--;){let n=e[r];t.has(n.id)||(i.push(n),t.add(n.id))}return i}/[1-9][0-9]{12}/.test(Date.now().toString())||(e_=()=>new Date().getTime());class eW{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){let i;return this.has(e)?this.getId(e):(i=void 0===t?this.id++:t,this.styleIDMap.set(e,i),this.idStyleMap.set(i,e),i)}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function eB(e){var t,i;let r=null;return(null===(i=null===(t=e.getRootNode)||void 0===t?void 0:t.call(e))||void 0===i?void 0:i.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(r=e.getRootNode().host),r}function eq(e){let t,i=e;for(;t=eB(i);)i=t;return i}function eG(e){let t=e.ownerDocument;if(!t)return!1;let i=eq(e);return t.contains(i)}function eH(e){let t=e.ownerDocument;return!!t&&(t.contains(e)||eG(e))}var ez=((c=ez||{})[c.DomContentLoaded=0]="DomContentLoaded",c[c.Load=1]="Load",c[c.FullSnapshot=2]="FullSnapshot",c[c.IncrementalSnapshot=3]="IncrementalSnapshot",c[c.Meta=4]="Meta",c[c.Custom=5]="Custom",c[c.Plugin=6]="Plugin",c),e$=((d=e$||{})[d.Mutation=0]="Mutation",d[d.MouseMove=1]="MouseMove",d[d.MouseInteraction=2]="MouseInteraction",d[d.Scroll=3]="Scroll",d[d.ViewportResize=4]="ViewportResize",d[d.Input=5]="Input",d[d.TouchMove=6]="TouchMove",d[d.MediaInteraction=7]="MediaInteraction",d[d.StyleSheetRule=8]="StyleSheetRule",d[d.CanvasMutation=9]="CanvasMutation",d[d.Font=10]="Font",d[d.Log=11]="Log",d[d.Drag=12]="Drag",d[d.StyleDeclaration=13]="StyleDeclaration",d[d.Selection=14]="Selection",d[d.AdoptedStyleSheet=15]="AdoptedStyleSheet",d[d.CustomElement=16]="CustomElement",d),eY=((h=eY||{})[h.MouseUp=0]="MouseUp",h[h.MouseDown=1]="MouseDown",h[h.Click=2]="Click",h[h.ContextMenu=3]="ContextMenu",h[h.DblClick=4]="DblClick",h[h.Focus=5]="Focus",h[h.Blur=6]="Blur",h[h.TouchStart=7]="TouchStart",h[h.TouchMove_Departed=8]="TouchMove_Departed",h[h.TouchEnd=9]="TouchEnd",h[h.TouchCancel=10]="TouchCancel",h),eQ=((p=eQ||{})[p.Mouse=0]="Mouse",p[p.Pen=1]="Pen",p[p.Touch=2]="Touch",p),eX=((f=eX||{})[f["2D"]=0]="2D",f[f.WebGL=1]="WebGL",f[f.WebGL2=2]="WebGL2",f),eK=((m=eK||{}).Start="start",m.Pause="pause",m.Resume="resume",m.Resize="resize",m.Finish="finish",m.FullsnapshotRebuilded="fullsnapshot-rebuilded",m.LoadStylesheetStart="load-stylesheet-start",m.LoadStylesheetEnd="load-stylesheet-end",m.SkipStart="skip-start",m.SkipEnd="skip-end",m.MouseInteraction="mouse-interaction",m.EventCast="event-cast",m.CustomEvent="custom-event",m.Flush="flush",m.StateChange="state-change",m.PlayBack="play-back",m.Destroy="destroy",m);class eJ{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error("Position outside of list range");let t=this.head;for(let i=0;i<e;i++)t=(null==t?void 0:t.next)||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&"__ln"in e.previousSibling){let i=e.previousSibling.__ln.next;t.next=i,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,i&&(i.previous=t)}else if(e.nextSibling&&"__ln"in e.nextSibling&&e.nextSibling.__ln.previous){let i=e.nextSibling.__ln.previous;t.previous=i,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,i&&
1(i.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}let eZ=(e,t)=>`${e}@${t}`;class e0{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,i=new eJ,r=e=>{let t=e,i=-2;for(;-2===i;)i=(t=t&&t.nextSibling)&&this.mirror.getId(t);return i},n=n=>{if(!n.parentNode||!eH(n)||"TEXTAREA"===n.parentNode.tagName)return;let s=R(n.parentNode)?this.mirror.getId(eB(n)):this.mirror.getId(n.parentNode),o=r(n);if(-1===s||-1===o)return i.addNode(n);let a=er(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{eA(e,this.mirror)&&this.iframeManager.addIframe(e),eL(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),eF(n)&&this.shadowDomManager.addShadowRoot(n.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});a&&(e.push({parentId:s,nextId:o,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)(!e2(this.removes,e,this.mirror)||this.movedSet.has(e.parentNode))&&n(e);for(let e of this.addedSet)e3(this.droppedSet,e)||e2(this.removes,e,this.mirror)?e3(this.movedSet,e)?n(e):this.droppedSet.add(e):n(e);let s=null;for(;i.length;){let e=null;if(s){let t=this.mirror.getId(s.value.parentNode),i=r(s.value);-1!==t&&-1!==i&&(e=s)}if(!e){let t=i.tail;for(;t;){let i=t;if(t=t.previous,i){let t=this.mirror.getId(i.value.parentNode);if(-1===r(i.value))continue;if(-1!==t){e=i;break}{let t=i.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=i;break}}}}}}if(!e){for(;i.head;)i.removeNode(i.head.value);break}s=e.previous,i.removeNode(e.value),n(e.value)}let o={texts:this.texts.map(e=>{let t=e.node;return t.parentNode&&"TEXTAREA"===t.parentNode.tagName&&this.genTextAreaValueMutation(t.parentNode),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if("string"==typeof t.style){let i=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);i.length<t.style.length&&(i+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(o.texts.length||o.attributes.length||o.removes.length||o.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(o))},this.genTextAreaValueMutation=e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(e.childNodes,e=>e.textContent||"").join("")},this.processMutation=e=>{if(!eD(e.target,this.mirror))switch(e.type){case"characterData":{let t=e.target.textContent;eM(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:et(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,eC(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,i=e.attributeName,r=e.target.getAttribute(i);if("value"===i){let e=F(t);r=A({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:r,maskInputFn:this.maskInputFn})}if(eM(e.target,this.blockClass,this.blockSelector,!1)||r===e.oldValue)return;let n=this.attributeMap.get(e.target);
1if("IFRAME"===t.tagName&&"src"===i&&!this.keepIframeSrcFn(r)){if(t.contentDocument)return;i="rr_src"}if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),"type"===i&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!Z(t.tagName,i)&&(n.attributes[i]=J(this.doc,L(t.tagName),L(i),r),"style"===i)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}let i=this.unattachedDoc.createElement("span");for(let r of(e.oldValue&&i.setAttribute("style",e.oldValue),Array.from(t.style))){let e=t.style.getPropertyValue(r),s=t.style.getPropertyPriority(r);e!==i.style.getPropertyValue(r)||s!==i.style.getPropertyPriority(r)?""===s?n.styleDiff[r]=e:n.styleDiff[r]=[e,s]:n._unchangedStyles[r]=[e,s]}for(let e of Array.from(i.style))""===t.style.getPropertyValue(e)&&(n.styleDiff[e]=!1)}break}case"childList":if(eM(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let i=this.mirror.getId(t),r=R(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);!(eM(e.target,this.blockClass,this.blockSelector,!1)||eD(t,this.mirror))&&eN(t,this.mirror)&&(this.addedSet.has(t)?(e1(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===i||eR(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[eZ(i,r)]?e1(this.movedSet,t):this.removes.push({parentId:r,id:i,isShadow:!!(R(e.target)&&I(e.target))||void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(eD(e,this.mirror))return;this.movedSet.add(e);let i=null;t&&this.mirror.hasNode(t)&&(i=this.mirror.getId(t)),i&&-1!==i&&(this.movedMap[eZ(this.mirror.getId(e),i)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);!eM(e,this.blockClass,this.blockSelector,!1)&&(e.childNodes.forEach(e=>this.genAdds(e)),eF(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function e1(e,t){e.delete(t),t.childNodes.forEach(t=>e1(e,t))}function e2(e,t,i){return 0!==e.length&&function e(t,i,r){let{parentNode:n}=i;if(!n)return!1;let s=r.getId(n);return!!t.some(e=>e.id===s)||e(t,n,r)}(e,t,i)}function e3(e,t){return 0!==e.size&&function e(t,i){let{parentNode:r}=i;return!!r&&(!!t.has(r)||e(t,r))}(e,t)}let e5=e=>s?(...t)=>{try{return e(...t)}catch(e){if(s&&!0===s(e))return;throw e}}:e,e6=[];function e8(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function e4(e,t){var i,r;let n=new e0;e6.push(n),n.init(e);let s=window.MutationObserver||window.__rrMutationObserver,o=null===(r=null===(i=null==window?void 0:window.Zone)||void 0===i?void 0:i.__symbol__)||void 0===r?void 0:r.call(i,"MutationObserver");o&&window[o]&&(s=window[o]);let a=new s(e5(n.processMutations.bind(n)));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function e7({scrollCb:e,doc:t,mirror:i,blockClass:r,blockSelector:n,sampling:s}){return em("scroll",e5(ev(e5(s=>{let o=e8(s);if(!o||eM(o,r,n,!0))return;let a=i.getId(o);if(o===t&&t.defaultView){let i=ew(t.defaultView);e({id:a,x:i.left,y:i.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}),s.scroll||100)),t)}let e9=["INPUT","TEXTAREA","SELECT"],te=new WeakMap;function tt(e){var t;return t=[],ts("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||ts("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||ts("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||ts("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule?t.unshift(Array.from(e.parentRule.cssRules).indexOf(e)):e.parentStyleSheet&&t.unshift(Array.from(e.parentStyleSheet.cssRules).indexOf(e)),t}function ti(e,t,i){let r,n;return e?(e.ownerNode?r=t.getId(e.ownerNode):n=i.getId(e),{styleId:n,id:r}):{}}function tr({mirror:e,stylesheetManager:t},i){var r,n,s;let o=null;o="#document"===i.nodeName?e.getId(i):e.getId(i.host);let a="#document"===i.nodeName?null===(r=i.defaultView)||void 0===r?void 0:r.Document:null===(s=null===(n=i.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===s?void 0:s.ShadowRoot,l=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==o&&-1!==o&&a&&l?(Object.defineProperty(i,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null===(e=l.get)||void 0===e?void 0:e.call(this)},set(e){var i;let r=null===(i=l.set)||void 0===i?void 0:i.call(this,e);if(null!==o&&-1!==o)try{t.adoptStyleSheets(e,o)}catch(e){}return r}}),e5(()=>{Object.defineProperty(i,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function tn(e,t={}){let i;let r=e.doc.defaultView;if(!r)return()=>{};
1!function(e,t){let{mutationCb:i,mousemoveCb:r,mouseInteractionCb:n,scrollCb:s,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:d,fontCb:h,selectionCb:p,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),i(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),r(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),n(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),s(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),o(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),u(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),c(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),d(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),h(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),p(...e)}
1,e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(i=e4(e,e.doc));let n=function({mousemoveCb:e,sampling:t,doc:i,mirror:r}){let n;if(!1===t.mousemove)return()=>{};let s="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,a=[],l=ev(e5(t=>{let i=Date.now()-n;e(a.map(e=>(e.timeOffset-=i,e)),t),a=[],n=null}),o),u=e5(ev(e5(e=>{let t=e8(e),{clientX:i,clientY:s}=eI(e)?e.changedTouches[0]:e;n||(n=e_()),a.push({x:i,y:s,id:r.getId(t),timeOffset:e_()-n}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?e$.Drag:e instanceof MouseEvent?e$.MouseMove:e$.TouchMove)}),s,{trailing:!1})),c=[em("mousemove",u,i),em("touchmove",u,i),em("drag",u,i)];return e5(()=>{c.forEach(e=>e())})}(e),s=function({mouseInteractionCb:e,doc:t,mirror:i,blockClass:r,blockSelector:n,sampling:s}){if(!1===s.mouseInteraction)return()=>{};let o=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,a=[],l=null,u=t=>s=>{let o=e8(s);if(eM(o,r,n,!0))return;let a=null,u=t;if("pointerType"in s){switch(s.pointerType){case"mouse":a=eQ.Mouse;break;case"touch":a=eQ.Touch;break;case"pen":a=eQ.Pen}a===eQ.Touch?eY[t]===eY.MouseDown?u="TouchStart":eY[t]===eY.MouseUp&&(u="TouchEnd"):eQ.Pen}else eI(s)&&(a=eQ.Touch);null!==a?(l=a,(u.startsWith("Touch")&&a===eQ.Touch||u.startsWith("Mouse")&&a===eQ.Mouse)&&(a=null)):eY[t]===eY.Click&&(a=l,l=null);let c=eI(s)?s.changedTouches[0]:s;if(!c)return;let d=i.getId(o),{clientX:h,clientY:p}=c;e5(e)(Object.assign({type:eY[u],id:d,x:h,y:p},null!==a&&{pointerType:a}))};return Object.keys(eY).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]).forEach(e=>{let i=L(e),r=u(e);if(window.PointerEvent)switch(eY[e]){case eY.MouseDown:case eY.MouseUp:i=i.replace("mouse","pointer");break;case eY.TouchStart:case eY.TouchEnd:return}a.push(em(i,r,t))}),e5(()=>{a.forEach(e=>e())})}(e),o=e7(e),a=function({viewportResizeCb:e},{win:t}){let i=-1,r=-1;return em("resize",e5(ev(e5(()=>{let t=eE(),n=eT();(i!==t||r!==n)&&(e({width:Number(n),height:Number(t)}),i=t,r=n)}),200)),t)}(e,{win:r}),l=function({inputCb:e,doc:t,mirror:i,blockClass:r,blockSelector:n,ignoreClass:s,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function d(e){let i=e8(e),u=e.isTrusted,d=i&&i.tagName;if(i&&"OPTION"===d&&(i=i.parentElement),!i||!d||0>e9.indexOf(d)||eM(i,r,n,!0)||i.classList.contains(s)||o&&i.matches(o))return;let p=i.value,f=!1,m=F(i)||"";"radio"===m||"checkbox"===m?f=i.checked:(a[d.toLowerCase()]||a[m])&&(p=A({element:i,maskInputOptions:a,tagName:d,type:m,value:p,maskInputFn:l})),h(i,c?{text:p,isChecked:f,userTriggered:u}:{text:p,isChecked:f});let g=i.name;"radio"===m&&g&&f&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{if(e!==i){let t=e.value;h(e,c?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}})}function h(t,r){let n=te.get(t);if(!n||n.text!==r.text||n.isChecked!==r.isChecked){te.set(t,r);let n=i.getId(t);e5(e)(Object.assign(Object.assign({},r),{id:n}))}}let p=("last"===u.input?["change"]:["input","change"]).map(e=>em(e,e5(d),t)),f=t.defaultView;if(!f)return()=>{p.forEach(e=>e())};let m=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),g=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&p.push(...g.map(e=>eb(e[0],e[1],{set(){e5(d)({target:this,isTrusted:!1})}},!1,f))),e5(()=>{p.forEach(e=>e())})}(e),u=function({mediaInteractionCb:e,blockClass:t,blockSelector:i,mirror:r,sampling:n,doc:s}){let o=e5(s=>ev(e5(n=>{let o=e8(n);if(!o||eM(o,t,i,!0))return;let{currentTime:a,volume:l,muted:u,playbackRate:c,loop:d}=o;e({type:s,id:r.getId(o),currentTime:a,volume:l,muted:u,playbackRate:c,loop:d})}),n.media||500)),a=[em("play",o(0),s),em("pause",o(1),s),em("seeked",o(2),s),em("volumechange",o(3),s),em("ratechange",o(4),s)];return e5(()=>
1{a.forEach(e=>e())})}(e),c=()=>{},d=()=>{},h=()=>{},p=()=>{};e.recordDOM&&(c=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:i},{win:r}){let n,s;if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:e5((r,n,s)=>{let[o,a]=s,{id:l,styleId:u}=ti(n,t,i.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,adds:[{rule:o,index:a}]}),r.apply(n,s)})});let a=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:e5((r,n,s)=>{let[o]=s,{id:a,styleId:l}=ti(n,t,i.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:o}]}),r.apply(n,s)})}),r.CSSStyleSheet.prototype.replace&&(n=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(n,{apply:e5((r,n,s)=>{let[o]=s,{id:a,styleId:l}=ti(n,t,i.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:o}),r.apply(n,s)})})),r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:e5((r,n,s)=>{let[o]=s,{id:a,styleId:l}=ti(n,t,i.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),r.apply(n,s)})}));let l={};to("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(to("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),to("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),to("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(l).forEach(([r,n])=>{u[r]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(u[r].insertRule,{apply:e5((r,n,s)=>{let[o,a]=s,{id:l,styleId:u}=ti(n.parentStyleSheet,t,i.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,adds:[{rule:o,index:[...tt(n),a||0]}]}),r.apply(n,s)})}),n.prototype.deleteRule=new Proxy(u[r].deleteRule,{apply:e5((r,n,s)=>{let[o]=s,{id:a,styleId:l}=ti(n.parentStyleSheet,t,i.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...tt(n),o]}]}),r.apply(n,s)})})}),e5(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=a,n&&(r.CSSStyleSheet.prototype.replace=n),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=u[e].insertRule,t.prototype.deleteRule=u[e].deleteRule})})}(e,{win:r}),d=tr(e,e.doc),h=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:i,stylesheetManager:r},{win:n}){let s=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:e5((n,o,a)=>{var l;let[u,c,d]=a;if(i.has(u))return s.apply(o,[u,c,d]);let{id:h,styleId:p}=ti(null===(l=o.parentRule)||void 0===l?void 0:l.parentStyleSheet,t,r.styleMirror);return(h&&-1!==h||p&&-1!==p)&&e({id:h,styleId:p,set:{property:u,value:c,priority:d},index:tt(o.parentRule)}),n.apply(o,a)})});let o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:e5((n,s,a)=>{var l;let[u]=a;if(i.has(u))return o.apply(s,[u]);let{id:c,styleId:d}=ti(null===(l=s.parentRule)||void 0===l?void 0:l.parentStyleSheet,t,r.styleMirror);return(c&&-1!==c||d&&-1!==d)&&e({id:c,styleId:d,remove:{property:u},index:tt(s.parentRule)}),n.apply(s,a)})}),e5(()=>{n.CSSStyleDeclaration.prototype.setProperty=s,n.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:r}),e.collectFonts&&(p=function({fontCb:e,doc:t}){let i=t.defaultView;if(!i)return()=>{};let r=[],n=new WeakMap,s=i.FontFace;i.FontFace=function(e,t,i){let r=new s(e,t,i);return n.set(r,{family:e,buffer:"string"!=typeof t,descriptors:i,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let o=eS(t.fonts,"add",function(t){return function(i){return setTimeout(e5(()=>{let t=n.get(i);t&&(e(t),n.delete(i))}),0),t.apply(this,[i])}});return r.push(()=>{i.FontFace=s}),r.push(o),e5(()=>{r.forEach(e=>e())})}(e)));let f=function(e){let{doc:t,mirror:i,blockClass:r,blockSelector:n,selectionCb:s}=e,o=!0,a=e5(()=>{let e=t.getSelection();if(!e||o&&(null==e?void 0:e.isCollapsed))return;o=e.isCollapsed||!1;let a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){let{startContainer:s,startOffset:o,endContainer:l,endOffset:u}=e.getRangeAt(t);eM(s,r,n,!0)||eM(l,r,n,!0)||a.push({start:i.getId(s),startOffset:o,end:i.getId(l),endOffset:u})}s({ranges:a})});return a(),em("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){let i=e.defaultView;return i&&i.customElements?eS(i.customElements,"define",function(e){return function(i,r,n){try{t({define:{name:i}})}catch(e){console.warn(`Custom element callback failed for ${i}`)}return e.apply(this,[i,r,n])}}):()=>{}}(e),g=[];for(let t of e.plugins)g.push(t.observer(t.callback,r,t.options));return e5(()=>
1{e6.forEach(e=>e.reset()),null==i||i.disconnect(),n(),s(),o(),a(),l(),u(),c(),d(),h(),p(),f(),m(),g.forEach(e=>e())})}function ts(e){return void 0!==window[e]}function to(e){return!!(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class ta{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,i,r){let n=i||this.getIdToRemoteIdMap(e),s=r||this.getRemoteIdToIdMap(e),o=n.get(t);return o||(o=this.generateIdFn(),n.set(t,o),s.set(o,t)),o}getIds(e,t){let i=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,i,r))}getRemoteId(e,t,i){let r=i||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:r.get(t)||-1}getRemoteIds(e,t){let i=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,i))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class tl{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new ta(W),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ta(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(i=this.loadListener)||void 0===i||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){if("rrweb"!==e.data.type||e.origin!==e.data.origin||!e.source)return;let t=this.crossOriginIframeMap.get(e.source);if(!t)return;let i=this.transformCrossOriginEvent(t,e.data.event);i&&this.wrappedEmit(i,e.data.isCheckout)}transformCrossOriginEvent(e,t){var i;switch(t.type){case ez.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:ez.IncrementalSnapshot,data:{source:e$.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ez.Meta:case ez.Load:case ez.DomContentLoaded:break;case ez.Plugin:return t;case ez.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case ez.IncrementalSnapshot:switch(t.data.source){case e$.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);let i=this.crossOriginIframeRootIdMap.get(e);i&&this.patchRootIdOnNode(t.node,i)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case e$.Drag:case e$.TouchMove:case e$.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case e$.ViewportResize:return!1;case e$.MediaInteraction:case e$.MouseInteraction:case e$.Scroll:case e$.CanvasMutation:case e$.Input:return this.replaceIds(t.data,e,["id"]),t;case e$.StyleSheetRule:case e$.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case e$.Font:return t;
1case e$.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case e$.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(i=t.data.styles)||void 0===i||i.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,i,r){for(let n of r)(Array.isArray(t[n])||"number"==typeof t[n])&&(Array.isArray(t[n])?t[n]=e.getIds(i,t[n]):t[n]=e.getId(i,t[n]));return t}replaceIds(e,t,i){return this.replace(this.crossOriginIframeMirror,e,t,i)}replaceStyleIds(e,t,i){return this.replace(this.crossOriginIframeStyleMirror,e,t,i)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===_.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class tu{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!I(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let i=e4(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(e7(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(tr({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let i=this;this.restoreHandlers.push(eS(e.prototype,"attachShadow",function(e){return function(r){let n=e.call(this,r);return this.shadowRoot&&eH(this)&&i.addShadowRoot(this.shadowRoot,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}function tc(e,t,i,r){return new(i||(i=Promise))(function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((r=r.apply(e,t||[])).next())})}for(var td="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",th="undefined"==typeof Uint8Array?[]:new Uint8Array(256),tp=0;tp<td.length;tp++)th[td.charCodeAt(tp)]=tp;var tf=function(e){var t,i=new Uint8Array(e),r=i.length,n="";for(t=0;t<r;t+=3)n+=td[i[t]>>2]+td[(3&i[t])<<4|i[t+1]>>4]+td[(15&i[t+1])<<2|i[t+2]>>6]+td[63&i[t+2]];return r%3==2?n=n.substring(0,n.length-1)+"=":r%3==1&&(n=n.substring(0,n.length-2)+"=="),n},tm=function(e){var t,i,r,n,s,o=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var u=new ArrayBuffer(o),c=new Uint8Array(u);for(t=0;t<a;t+=4)i=th[e.charCodeAt(t)],r=th[e.charCodeAt(t+1)],n=th[e.charCodeAt(t+2)],s=th[e.charCodeAt(t+3)],c[l++]=i<<2|r>>4,c[l++]=(15&r)<<4|n>>2,c[l++]=(3&n)<<6|63&s;return u};let tg=new Map,ty=(e,t,i)=>{let r;if(!e||!(tb(e,t)||"object"==typeof e))return;let n=e.constructor.name,s=((r=tg.get(i))||(r=new Map,tg.set(i,r)),r.has(n)||r.set(n,[]),r.get(n)),o=s.indexOf(e);return -1===o&&(o=s.length,s.push(e)),o},tv=(e,t,i)=>e.map(e=>(function e(t,i,r){if(t instanceof Array)return t.map(t=>e(t,i,r));if(null===t);else if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};else if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:tf(t)};else if(t instanceof DataView)return{rr_type:t.constructor.name,args:[e(t.buffer,i,r),t.byteOffset,t.byteLength]};else if(t instanceof HTMLImageElement){let e=t.constructor.name,{src:i}=t;return{rr_type:e,src:i}}else if(t instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:t.toDataURL()};else if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[e(t.data,i,r),t.width,t.height]};else if(tb(t,i)||"object"==typeof t)return{rr_type:t.constructor.name,index:ty(t,i,r)};return t})(e,t,i)),tb=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]).find(i=>e instanceof t[i]);function tS(e,t,i,r){let n=[];try{let s=eS(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(n,...s){if(!eM(this,t,i,!0)){let e="experimental-webgl"===n?"webgl":n;if("__context"in this||(this.__context=e),r&&["webgl","webgl2"].includes(e)){if(s[0]&&"object"==typeof s[0]){let e=s[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else s.splice(0,1,{preserveDrawingBuffer:!0})}}return e.apply(this,[n,...s])}});n.push(s)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>
1{n.forEach(e=>e())}}function t_(e,t,i,r,n,s,o){let a=[];for(let s of Object.getOwnPropertyNames(e))if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(s))try{if("function"!=typeof e[s])continue;let l=eS(e,s,function(e){return function(...a){let l=e.apply(this,a);if(ty(l,o,this),"tagName"in this.canvas&&!eM(this.canvas,r,n,!0)){let e=tv(a,o,this),r={type:t,property:s,args:e};i(this.canvas,r)}return l}});a.push(l)}catch(n){let r=eb(e,s,{set(e){i(this.canvas,{type:t,property:s,args:[e],setter:!0})}});a.push(r)}return a}var tw=(g=function(){!function(){function e(e,t,i,r){return new(i||(i=Promise))(function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(o,a)}l((r=r.apply(e,t||[])).next())})}for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="undefined"==typeof Uint8Array?[]:new Uint8Array(256),r=0;r<t.length;r++)i[t.charCodeAt(r)]=r;var n=function(e){var i,r=new Uint8Array(e),n=r.length,s="";for(i=0;i<n;i+=3)s+=t[r[i]>>2]+t[(3&r[i])<<4|r[i+1]>>4]+t[(15&r[i+1])<<2|r[i+2]>>6]+t[63&r[i+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s};let s=new Map,o=new Map,a=self;a.onmessage=function(t){return e(this,void 0,void 0,function*(){if(!("OffscreenCanvas"in globalThis))return a.postMessage({id:t.data.id});{let{id:i,bitmap:r,width:l,height:u,dataURLOptions:c}=t.data,d=function(t,i,r){return e(this,void 0,void 0,function*(){let e=`${t}-${i}`;if(!("OffscreenCanvas"in globalThis))return"";{if(o.has(e))return o.get(e);let s=new OffscreenCanvas(t,i);s.getContext("2d");let a=yield s.convertToBlob(r),l=n((yield a.arrayBuffer()));return o.set(e,l),l}})}(l,u,c),h=new OffscreenCanvas(l,u);h.getContext("2d").drawImage(r,0,0),r.close();let p=yield h.convertToBlob(c),f=p.type,m=n((yield p.arrayBuffer()));if(!s.has(i)&&(yield d)===m)return s.set(i,m),a.postMessage({id:i});if(s.get(i)===m)return a.postMessage({id:i});a.postMessage({id:i,type:f,base64:m,width:l,height:u}),s.set(i,m)}})}}()},function(e){var t;return new Worker(y=y||(t=new Blob(function(e,t){var i=e.toString().split("\n");i.pop(),i.shift();for(var r=i[0].search(/\S/),n=/(['"])__worker_loader_strict__(['"])/g,s=0,o=i.length;s<o;++s)i[s]=i[s].substring(r).replace(n,"$1use strict$2")+"\n";return i}(g,null),{type:"application/javascript"}),URL.createObjectURL(t)),e)});class tE{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};let{sampling:t="all",win:i,blockClass:r,blockSelector:n,recordCanvas:s,dataURLOptions:o}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,s&&"all"===t&&this.initCanvasMutationObserver(i,r,n),s&&"number"==typeof t&&this.initCanvasFPSObserver(t,i,r,n,{dataURLOptions:o})}initCanvasFPSObserver(e,t,i,r,n){let s;let o=tS(t,i,r,!0),a=new Map,l=new tw;l.onmessage=e=>{let{id:t}=e.data;if(a.set(t,!1),!("base64"in e.data))return;let{base64:i,type:r,width:n,height:s}=e.data;this.mutationCb({id:t,type:eX["2D"],commands:[{property:"clearRect",args:[0,0,n,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:i}],type:r}]},0,0]}]})};let u=1e3/e,c=0,d=()=>{let e=[];return t.document.querySelectorAll("canvas").forEach(t=>{eM(t,i,r,!0)||e.push(t)}),e},h=e=>{if(c&&e-c<u){s=requestAnimationFrame(h);return}c=e,d().forEach(e=>tc(this,void 0,void 0,function*(){var t;let i=this.mirror.getId(e);if(a.get(i)||0===e.width||0===e.height)return;if(a.set(i,!0),["webgl","webgl2"].includes(e.__context)){let i=e.getContext(e.__context);(null===(t=null==i?void 0:i.getContextAttributes())||void 0===t?void 0:t.preserveDrawingBuffer)===!1&&i.clear(i.COLOR_BUFFER_BIT)}let r=yield createImageBitmap(e);l.postMessage({id:i,bitmap:r,width:e.width,height:e.height,dataURLOptions:n.dataURLOptions},[r])})),s=requestAnimationFrame(h)};s=requestAnimationFrame(h),this.resetObservers=()=>{o(),cancelAnimationFrame(s)}}initCanvasMutationObserver(e,t,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let r=tS(e,t,i,!1),n=function(e,t,i,r){let n=[];for(let s of Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype))try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[s])continue;let o=eS(t.CanvasRenderingContext2D.prototype,s,function(n){return function(...o){return eM(this.canvas,i,r,!0)||setTimeout(()=>
1{let i=tv(o,t,this);e(this.canvas,{type:eX["2D"],property:s,args:i})},0),n.apply(this,o)}});n.push(o)}catch(r){let i=eb(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:eX["2D"],property:s,args:[t],setter:!0})}});n.push(i)}return()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,i),s=function(e,t,i,r,n){let s=[];return s.push(...t_(t.WebGLRenderingContext.prototype,eX.WebGL,e,i,r,n,t)),void 0!==t.WebGL2RenderingContext&&s.push(...t_(t.WebGL2RenderingContext.prototype,eX.WebGL2,e,i,r,n,t)),()=>{s.forEach(e=>e())}}(this.processMutation.bind(this),e,t,i,this.mirror);this.resetObservers=()=>{r(),n(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let i=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let i=this.pendingCanvasMutations.get(e);if(!i||-1===t)return;let r=i.map(e=>(function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)0>t.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(i[r[n]]=e[r[n]]);return i})(e,["type"])),{type:n}=i[0];this.mutationCb({id:t,type:n,commands:r}),this.pendingCanvasMutations.delete(e)}}class tT{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new eW,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;let i={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:x(e),index:t}))})),i.styleIds.push(e)}r.length>0&&(i.styles=r),this.adoptedStyleSheetCb(i)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class tC{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){requestAnimationFrame(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(e,t){let i=this.nodeMap.get(e);return i&&Array.from(i).some(e=>e!==t)}add(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}let tM=!1;try{if(2!==Array.from([1],e=>2*e)[0]){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null===(w=e.contentWindow)||void 0===w?void 0:w.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}let tN=new k;function tD(e={}){let t;let{emit:i,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:u="rr-block",blockSelector:c=null,ignoreClass:d="rr-ignore",ignoreSelector:h=null,maskTextClass:p="rr-mask",maskTextSelector:f=null,inlineStylesheet:m=!0,maskAllInputs:g,maskInputOptions:y,slimDOMOptions:v,maskInputFn:b,maskTextFn:S,hooks:_,packFn:w,sampling:E={},dataURLOptions:T={},mousemoveWait:C,recordDOM:M=!0,recordCanvas:N=!1,recordCrossOriginIframes:D=!1,recordAfter:R="DOMContentLoaded"===e.recordAfter?e.recordAfter:"load",userTriggeredOnInput:I=!1,collectFonts:O=!1,inlineImages:x=!1,plugins:A,keepIframeSrcFn:L=()=>!1,ignoreCSSAttributes:P=new Set([]),errorHandler:F}=e;s=F;let j=!D||window.parent===window,V=!1;if(!j)try{window.parent.document&&(V=!1)}catch(e){V=!0}if(j&&!i)throw Error("emit function is required");void 0!==C&&void 0===E.mousemove&&(E.mousemove=C),tN.reset();let U=!0===g?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==y?y:{password:!0},W=!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===v,headMetaDescKeywords:"all"===v}:v||{};eO();let B=0,q=e=>{for(let t of A||[])t.eventProcessor&&(e=t.eventProcessor(e));return w&&!V&&(e=w(e)),e};o=(e,s)=>{var o;if(e.timestamp=e_(),(null===(o=e6[0])||void 0===o?void 0:o.isFrozen())&&e.type!==ez.FullSnapshot&&!(e.type===ez.IncrementalSnapshot&&e.data.source===e$.Mutation)&&e6.forEac
1h(e=>e.unfreeze()),j)null==i||i(q(e),s);else if(V){let t={type:"rrweb",event:q(e),origin:window.location.origin,isCheckout:s};window.parent.postMessage(t,"*")}if(e.type===ez.FullSnapshot)t=e,B=0;else if(e.type===ez.IncrementalSnapshot){if(e.data.source===e$.Mutation&&e.data.isAttachIframe)return;B++;let i=n&&B>=n,s=r&&e.timestamp-t.timestamp>r;(i||s)&&a(!0)}};let G=e=>{o({type:ez.IncrementalSnapshot,data:Object.assign({source:e$.Mutation},e)})},H=e=>o({type:ez.IncrementalSnapshot,data:Object.assign({source:e$.Scroll},e)}),z=e=>o({type:ez.IncrementalSnapshot,data:Object.assign({source:e$.CanvasMutation},e)}),$=new tT({mutationCb:G,adoptedStyleSheetCb:e=>o({type:ez.IncrementalSnapshot,data:Object.assign({source:e$.AdoptedStyleSheet},e)})}),Y=new tl({mirror:tN,mutationCb:G,stylesheetManager:$,recordCrossOriginIframes:D,wrappedEmit:o});for(let e of A||[])e.getMirror&&e.getMirror({nodeMirror:tN,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});let Q=new tC;l=new tE({recordCanvas:N,mutationCb:z,win:window,blockClass:u,blockSelector:c,mirror:tN,sampling:E.canvas,dataURLOptions:T});let X=new tu({mutationCb:G,scrollCb:H,bypassOptions:{blockClass:u,blockSelector:c,maskTextClass:p,maskTextSelector:f,inlineStylesheet:m,maskInputOptions:U,dataURLOptions:T,maskTextFn:S,maskInputFn:b,recordCanvas:N,inlineImages:x,sampling:E,slimDOMOptions:W,iframeManager:Y,stylesheetManager:$,canvasManager:l,keepIframeSrcFn:L,processedNodeManager:Q},mirror:tN});a=(e=!1)=>{if(!M)return;o({type:ez.Meta,data:{href:window.location.href,width:eT(),height:eE()}},e),$.reset(),X.init(),e6.forEach(e=>e.lock());let t=function(e,t){let{mirror:i=new k,blockClass:r="rr-block",blockSelector:n=null,maskTextClass:s="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:d,maskInputFn:h,slimDOM:p=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:_=()=>!1}=t||{};return er(e,{doc:e,mirror:i,blockClass:r,blockSelector:n,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===c?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===c?{password:!0}:c,maskTextFn:d,maskInputFn:h,slimDOMOptions:!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===p,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===p?{}:p,dataURLOptions:f,inlineImages:l,recordCanvas:u,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:_,newlyAddedElement:!1})}(document,{mirror:tN,blockClass:u,blockSelector:c,maskTextClass:p,maskTextSelector:f,inlineStylesheet:m,maskAllInputs:U,maskTextFn:S,slimDOM:W,dataURLOptions:T,recordCanvas:N,inlineImages:x,onSerialize:e=>{eA(e,tN)&&Y.addIframe(e),eL(e,tN)&&$.trackLinkElement(e),eF(e)&&X.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Y.attachIframe(e,t),X.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{$.attachLinkElement(e,t)},keepIframeSrcFn:L});if(!t)return console.warn("Failed to snapshot the document");o({type:ez.FullSnapshot,data:{node:t,initialOffset:ew(window)}},e),e6.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&$.adoptStyleSheets(document.adoptedStyleSheets,tN.getId(document))};try{let e=[],t=e=>{var t;return e5(tn)({mutationCb:G,mousemoveCb:(e,t)=>o({type:ez.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>o({type:ez.IncrementalSnapshot,data:Object.assign({source:e$.MouseInteraction},e)}),scrollCb:H,viewportResizeCb:e=>o({type:ez.IncrementalSnapshot,data:Object.assign({source:e$.ViewportResize},e)}),inputCb:e=>o({type:ez.IncrementalSnapshot,data:Object.assign({source:e$.Input},e)}),mediaInteractionCb:e=>o({type:ez.IncrementalSnapshot,data:Object.assign({source:e$.MediaInteraction},e)}),styleSheetRuleCb:e=>o({type:ez.IncrementalSnapshot,data:Object.assign({source:e$.StyleSheetRule},e)}),styleDeclarationCb:e=>o({type:ez.IncrementalSnapshot,data:Object.assign({source:e$.StyleDeclaration},e)}),canvasMutationCb:z,fontCb:e=>o({type:ez.IncrementalSnapshot,data:Object.assign({source:e$.Font},e)}),selectionCb:e=>{o({type:ez.IncrementalSnapshot,data:Object.assign({source:e$.Selection},e)})},customElementCb:e=>{o({type:ez.IncrementalSnapshot,data:Object.assign({source:e$.CustomElement},e)})},blockClass:u,ignoreClass:d,ignoreSelector:h,maskTextClass:p,maskTextSelector:f,maskInputOptions:U,inlineStylesheet:m,sampling:E,recordDOM:M,recordCanvas:N,inlineImages:x,userTr
1iggeredOnInput:I,collectFonts:O,doc:e,maskInputFn:b,maskTextFn:S,keepIframeSrcFn:L,blockSelector:c,slimDOMOptions:W,dataURLOptions:T,mirror:tN,iframeManager:Y,stylesheetManager:$,shadowDomManager:X,processedNodeManager:Q,canvasManager:l,ignoreCSSAttributes:P,plugins:(null===(t=null==A?void 0:A.filter(e=>e.observer))||void 0===t?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>o({type:ez.Plugin,data:{plugin:e.name,payload:t}})})))||[]},_)};Y.addLoadListener(i=>{try{e.push(t(i.contentDocument))}catch(e){console.warn(e)}});let i=()=>{a(),e.push(t(document)),tM=!0};return"interactive"===document.readyState||"complete"===document.readyState?i():(e.push(em("DOMContentLoaded",()=>{o({type:ez.DomContentLoaded,data:{}}),"DOMContentLoaded"===R&&i()})),e.push(em("load",()=>{o({type:ez.Load,data:{}}),"load"===R&&i()},window))),()=>{e.forEach(e=>e()),Q.destroy(),tM=!1,s=void 0}}catch(e){console.warn(e)}}tD.addCustomEvent=(e,t)=>{if(!tM)throw Error("please add custom event after start recording");o({type:ez.Custom,data:{tag:e,payload:t}})},tD.freezePage=()=>{e6.forEach(e=>e.freeze())},tD.takeFullSnapshot=e=>{if(!tM)throw Error("please take full snapshot after start recording");a(e)},tD.mirror=tN;let{addCustomEvent:tR}=tD,{freezePage:tI}=tD;var tO=Uint8Array,tx=Uint16Array,tk=Uint32Array,tA=new tO([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),tL=new tO([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),tP=new tO([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),tF=function(e,t){for(var i=new tx(31),r=0;r<31;++r)i[r]=t+=1<<e[r-1];for(var n=new tk(i[30]),r=1;r<30;++r)for(var s=i[r];s<i[r+1];++s)n[s]=s-i[r]<<5|r;return[i,n]},tj=tF(tA,2),tV=tj[0],tU=tj[1];tV[28]=258,tU[258]=28;for(var tW=tF(tL,0),tB=tW[0],tq=tW[1],tG=new tx(32768),tH=0;tH<32768;++tH){var tz=(43690&tH)>>>1|(21845&tH)<<1;tz=(61680&(tz=(52428&tz)>>>2|(13107&tz)<<2))>>>4|(3855&tz)<<4,tG[tH]=((65280&tz)>>>8|(255&tz)<<8)>>>1}for(var t$=function(e,t,i){for(var r,n=e.length,s=0,o=new tx(t);s<n;++s)++o[e[s]-1];var a=new tx(t);for(s=0;s<t;++s)a[s]=a[s-1]+o[s-1]<<1;if(i){r=new tx(1<<t);var l=15-t;for(s=0;s<n;++s)if(e[s])for(var u=s<<4|e[s],c=t-e[s],d=a[e[s]-1]++<<c,h=d|(1<<c)-1;d<=h;++d)r[tG[d]>>>l]=u}else for(s=0,r=new tx(n);s<n;++s)r[s]=tG[a[e[s]-1]++]>>>15-e[s];return r},tY=new tO(288),tH=0;tH<144;++tH)tY[tH]=8;for(var tH=144;tH<256;++tH)tY[tH]=9;for(var tH=256;tH<280;++tH)tY[tH]=7;for(var tH=280;tH<288;++tH)tY[tH]=8;for(var tQ=new tO(32),tH=0;tH<32;++tH)tQ[tH]=5;var tX=t$(tY,9,0),tK=t$(tY,9,1),tJ=t$(tQ,5,0),tZ=t$(tQ,5,1),t0=function(e){for(var t=e[0],i=1;i<e.length;++i)e[i]>t&&(t=e[i]);return t},t1=function(e,t,i){var r=t/8>>0;return(e[r]|e[r+1]<<8)>>>(7&t)&i},t2=function(e,t){var i=t/8>>0;return(e[i]|e[i+1]<<8|e[i+2]<<16)>>>(7&t)},t3=function(e){return(e/8>>0)+(7&e&&1)},t5=function(e,t,i){(null==t||t<0)&&(t=0),(null==i||i>e.length)&&(i=e.length);var r=new(e instanceof tx?tx:e instanceof tk?tk:tO)(i-t);return r.set(e.subarray(t,i)),r},t6=function(e,t,i){var r=e.length,n=!t||i,s=!i||i.i;i||(i={}),t||(t=new tO(3*r));var o=function(e){var i=t.length;if(e>i){var r=new tO(Math.max(2*i,e));r.set(t),t=r}},a=i.f||0,l=i.p||0,u=i.b||0,c=i.l,d=i.d,h=i.m,p=i.n,f=8*r;do{if(!c){i.f=a=t1(e,l,1);var m=t1(e,l+1,3);if(l+=3,m){if(1==m)c=tK,d=tZ,h=9,p=5;else if(2==m){var g=t1(e,l,31)+257,y=t1(e,l+10,15)+4,v=g+t1(e,l+5,31)+1;l+=14;for(var b=new tO(v),S=new tO(19),_=0;_<y;++_)S[tP[_]]=t1(e,l+3*_,7);l+=3*y;var w=t0(S),E=(1<<w)-1;if(!s&&l+v*(w+7)>f)break;for(var T=t$(S,w,1),_=0;_<v;){var C=T[t1(e,l,E)];l+=15&C;var M=C>>>4;if(M<16)b[_++]=M;else{var N=0,D=0;for(16==M?(D=3+t1(e,l,3),l+=2,N=b[_-1]):17==M?(D=3+t1(e,l,7),l+=3):18==M&&(D=11+t1(e,l,127),l+=7);D--;)b[_++]=N}}var R=b.subarray(0,g),I=b.subarray(g);h=t0(R),p=t0(I),c=t$(R,h,1),d=t$(I,p,1)}else throw"invalid block type"}else{var M=t3(l)+4,O=e[M-4]|e[M-3]<<8,x=M+O;if(x>r){if(s)throw"unexpected EOF";break}n&&o(u+O),t.set(e.subarray(M,x),u),i.b=u+=O,i.p=l=8*x;continue}if(l>f)throw"unexpected EOF"}n&&o(u+131072);for(var k=(1<<h)-1,A=(1<<p)-1,L=h+p+18;s||l+L<f;){var N=c[t2(e,l)&k],P=N>>>4;if((l+=15&N)>f)throw"unexpected EOF";if(!N)throw"invalid length/literal";if(P<256)t[u++]=P;else if(256==P){c=null;break}else{var F=P-254;if(P>264){var _=P-257,j=tA[_];F=t1(e,l,(1<<j)-1)+tV[_],l+=j}var V=d[t2(e,l)&A],U=V>>>4;if(!V)throw"invalid distance";l+=15&V;var I=tB[U];if(U>3){var j=tL[U];I+=t2(e,l)&(1<<j)-1,l+=j}if(l>f)throw"unexpected EOF";n&&o(u+131072);for(var W=u+F;u<W;u+=4)t[u]=t[u-I],t[u+1]=t[u+1-I],t[u+2]=t[u+2-I],t[u+3]=t[u+3-I];u=W}}i.l=c,i.p=l,i.b=u,c&&(a=1,i.m=h,i.d=d,i.n=p)}while(!a);return u==t.length?t:t5(t,0,u)},t8=function(e,t,i){i<<=7&t;var r=t/8>>0;e[r]|=i,e[r+1]|=i>>>8},t4=function(e,t,i){i<<=7&t;var r=t/8>>0;e[r]|=i,e[r+1]|=i>>>8,e[r+2]|=i>>>16},t7=function(e,t){for(var i=[],r=0;r<e.length;++r)e[r]&&i.push({s:r,f:e[r]});var n=i.length,s=i.slice();if(!n)return[new tO(0),0];if(1==n){var o=new tO(i[0].s+1);return o[i[0].s]=1,[o,1]}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var a=i[0],l=i[1],u=0,c=1,d=2;for(i[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=n-1;)a=i[i[u].f<i[d].f?u++:d++],l=i[u!=c&&i[u].f<i[d].f?u++:d++],i[c++]={s:-1,f:a.f+l.f,l:a,r:l};for(var h=s[0].s,r=1;r<n;++r)s[r].s>h&&(h=s[r].s);var p=new tx(h+1),f=t9(i[c-1],p,0);if(f>t){var r=0,m=0,g=f-t,y=1<<g;for(s.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});r<n;++r){var v=s[r].s;if(p[v]>t)m+=y-(1<<f-p[v]),p[v]=t;else break}for(m>>>=g;m>0;){var b=s[r].s;p[b]<t?m-=1<<t-p[b]++-1:++r}for(;r>=0&&m;--r){var S=s[r].s;p[S]==t&&(--p[S],++m)}f=t}return[new tO(p),f]},t9=function(e,t,i){return -1==e.s?Math.max(t9(e.l,t,i+1),t9(e.r,t,i+1)):t[e.s]=i},ie=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new tx(++t),r=0,n=e[0],s=1,o=function(e){i[r++]=e},a=1;a<=t;++a)if(e[a]==n&&a!=t)++s;else{if(!n&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(n),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(n);s=1,n=e[a]}return[i.subarray(0,r),t]},it=function(e,t){for(var i=0,r=0;r<t.length;++r)i+=e[r]*t[r];return i},ii=function(e,t,i){var r=i.length,n=t3(t+2);e[n]=255&r,e[n+1]=r>>>8,e[n+2]=255^e[n],e[n+3]=255^e[n+1];for(var s=0;s<r;++s)e[n+s+4]=i[s];return(n+4+r)*8},ir=function(e,t,i,r,n,s,o,a,l,u,c){t8(t,c++,i),++n[256];for(var d,h,p,f,m=t7(n,15),g=m[0],y=m[1],v=t7(s,15),b=v[0],S=v[1],_=ie(g),w=_[0],E=_[1],T=ie(b),C=T[0],M=T[1],N=new tx(19),D=0;D<w.length;++D)N[31&w[D]]++;for(var D=0;D<C.length;++D)N[31&C[D]]++;for(var R=t7(N,7),I=R[0],O=R[1],x=19;x>4&&!I[tP[x-1]];--x);var k=u+5<<3,A=it(n,tY)+it(s,tQ)+o,L=it(n,g)+it(s,b)+o+14+3*x+it(N,I)+(2*N[16]+3*N[17]+7*N[18]);if(k<=A&&k<=L)return ii(t,c,e.subarray(l,l+u));if(t8(t,c,1+(L<A)),c+=2,L<A){d=t$(g,y,0),h=g,p=t$(b,S,0),f=b;var P=t$(I,O,0);t8(t,c,E-257),t8(t,c+5,M-1),t8(t,c+10,x-4),c+=14;for(var D=0;D<x;++D)t8(t,c+3*D,I[tP[D]]);c+=3*x;for(var F=[w,C],j=0;j<2;++j)for(var V=F[j],D=0;D<V.length;++D){var U=31&V[D];t8(t,c,P[U]),c+=I[U],U>15&&(t8(t,c,V[D]>>>5&127),c+=V[D]>>>12)}}else d=tX,h=tY,p=tJ,f=tQ;for(var D=0;D<a;++D)if(r[D]>255){var U=r[D]>>>18&31;t4(t,c,d[U+257]),c+=h[U+257],U>7&&(t8(t,c,r[D]>>>23&31),c+=tA[U]);var W=31&r[D];t4(t,c,p[W]),c+=f[W],W>3&&(t4(t,c,r[D]>>>5&8191),c+=tL[W])}else t4(t,c,d[r[D]]),c+=h[r[D]];return t4(t,c,d[256]),c+h[256]},is=new tk([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),io=new tO(0),ia=function(e,t,i,r,n,s){var o=e.length,a=new tO(r+o+5*(1+Math.floor(o/7e3))+n),l=a.subarray(r,a.length-n),u=0;if(!t||o<8)for(var c=0;c<=o;c+=65535){var d=c+65535;
1d<o?u=ii(l,u,e.subarray(c,d)):(l[c]=s,u=ii(l,u,e.subarray(c,o)))}else{for(var h=is[t-1],p=h>>>13,f=8191&h,m=(1<<i)-1,g=new tx(32768),y=new tx(m+1),v=Math.ceil(i/3),b=2*v,S=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<b)&m},_=new tk(25e3),w=new tx(288),E=new tx(32),T=0,C=0,c=0,M=0,N=0,D=0;c<o;++c){var R=S(c),I=32767&c,O=y[R];if(g[I]=O,y[R]=I,N<=c){var x=o-c;if((T>7e3||M>24576)&&x>423){u=ir(e,l,0,_,w,E,C,M,D,c-D,u),M=T=C=0,D=c;for(var k=0;k<286;++k)w[k]=0;for(var k=0;k<30;++k)E[k]=0}var A=2,L=0,P=f,F=I-O&32767;if(x>2&&R==S(c-F))for(var j=Math.min(p,x)-1,V=Math.min(32767,c),U=Math.min(258,x);F<=V&&--P&&I!=O;){if(e[c+A]==e[c+A-F]){for(var W=0;W<U&&e[c+W]==e[c+W-F];++W);if(W>A){if(A=W,L=F,W>j)break;for(var B=Math.min(F,W-2),q=0,k=0;k<B;++k){var G=c-F+k+32768&32767,H=g[G],z=G-H+32768&32767;z>q&&(q=z,O=G)}}}O=g[I=O],F+=I-O+32768&32767}if(L){_[M++]=268435456|tU[A]<<18|tq[L];var $=31&tU[A],Y=31&tq[L];C+=tA[$]+tL[Y],++w[257+$],++E[Y],N=c+A,++T}else _[M++]=e[c],++w[e[c]]}}u=ir(e,l,s,_,w,E,C,M,D,c-D,u),s||(u=ii(l,u,io))}return t5(a,0,r+t3(u)+n)},il=function(){var e=1,t=0;return{p:function(i){for(var r=e,n=t,s=i.length,o=0;o!=s;){for(var a=Math.min(o+5552,s);o<a;++o)r+=i[o],n+=r;r%=65521,n%=65521}e=r,t=n},d:function(){return(e>>>8<<16|(255&t)<<8|t>>>8)+((255&e)<<23)*2}}},iu=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8},ic=function(e,t){var i=t.level,r=0==i?0:i<6?1:9==i?3:2;e[0]=120,e[1]=r<<6|(r?32-2*r:1)},id=function(e){if((15&e[0])!=8||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"};function ih(e,t){var i=e.length;if(!t&&"undefined"!=typeof TextEncoder)return new TextEncoder().encode(e);for(var r=new tO(e.length+(e.length>>>1)),n=0,s=function(e){r[n++]=e},o=0;o<i;++o){if(n+5>r.length){var a=new tO(n+8+(i-o<<1));a.set(r),r=a}var l=e.charCodeAt(o);l<128||t?s(l):(l<2048?s(192|l>>>6):(l>55295&&l<57344?(s(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++o))>>>18),s(128|l>>>12&63)):s(224|l>>>12),s(128|l>>>6&63)),s(128|63&l))}return t5(r,0,n)}function ip(e,t){var i="";if(!t&&"undefined"!=typeof TextDecoder)return new TextDecoder().decode(e);for(var r=0;r<e.length;){var n=e[r++];n<128||t?i+=String.fromCharCode(n):n<224?i+=String.fromCharCode((31&n)<<6|63&e[r++]):n<240?i+=String.fromCharCode((15&n)<<12|(63&e[r++])<<6|63&e[r++]):i+=String.fromCharCode(55296|(n=((15&n)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536)>>10,56320|1023&n)}return i}let im=e=>{var t,i,r,n,s;return ip((t=ih(JSON.stringify(Object.assign(Object.assign({},e),{v:"v1"}))),void 0===i&&(i={}),(r=il()).p(t),ic(s=ia(t,null==(n=i).level?6:n.level,null==n.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+n.mem,2,4,!0),i),iu(s,s.length-4,r.d()),s),!0)},ig=e=>{if("string"!=typeof e)return e;try{let t=JSON.parse(e);if(t.timestamp)return t}catch(e){}try{var t;let i=JSON.parse(ip((t=ih(e,!0),t6((id(t),t.subarray(2,-4)),void 0))));if("v1"===i.v)return i;throw Error(`These events were packed with packer ${i.v} which is incompatible with current packer v1.`)}catch(e){throw console.error(e),Error("Unknown data format.")}};class iy{constructor(e){this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){let e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}}let iv=/(^|@)\S+:\d+/,ib=/^\s*at .*(\S+:\d+|\(native\))/m,iS=/^(eval@)?(\[native code])?$/,i_={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(ib)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];let t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw Error(`Cannot parse given url: ${e}`);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(ib)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),i=t.match(/ (\((.+):(\d+):(\d+)\)$)/),r
1=(t=i?t.replace(i[0],""):t).split(/\s+/).slice(1),n=this.extractLocation(i?i[1]:r.pop());return new iy({functionName:r.join(" ")||void 0,fileName:["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0],lineNumber:n[1],columnNumber:n[2]})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(iS)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new iy({functionName:e});{let t=/((.*".+"[^@]*)?[^@]*)(?:@)/,i=e.match(t),r=i&&i[1]?i[1]:void 0,n=this.extractLocation(e.replace(t,""));return new iy({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){let t=/Line (\d+).*script (?:in )?(\S+)/i,i=e.message.split("\n"),r=[];for(let e=2,n=i.length;e<n;e+=2){let n=t.exec(i[e]);n&&r.push(new iy({fileName:n[2],lineNumber:parseFloat(n[1])}))}return r},parseOpera10:function(e){let t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,i=e.stacktrace.split("\n"),r=[];for(let e=0,n=i.length;e<n;e+=2){let n=t.exec(i[e]);n&&r.push(new iy({functionName:n[3]||void 0,fileName:n[2],lineNumber:parseFloat(n[1])}))}return r},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(iv)&&!e.match(/^Error created at/)},this).map(function(e){let t=e.split("@"),i=this.extractLocation(t.pop());return new iy({functionName:(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,fileName:i[0],lineNumber:i[1],columnNumber:i[2]})},this)}};function iw(e){return"[object Object]"===Object.prototype.toString.call(e)}function iE(e,t){let i={numOfKeysLimit:50,depthOfLimit:4};Object.assign(i,t);let r=[],n=[];return JSON.stringify(e,function(e,t){var s;if(r.length>0){let i=r.indexOf(this);~i?r.splice(i+1):r.push(this),~i?n.splice(i,1/0,e):n.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(t)).join(".")+"]")}else r.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(iw(s=t)&&Object.keys(s).length>i.numOfKeysLimit||"function"==typeof s||iw(s)&&function e(t,i){if(0===i)return!0;for(let r of Object.keys(t))if(iw(t[r])&&e(t[r],i-1))return!0;return!1}(s,i.depthOfLimit)){let e;return e=t.toString(),i.stringLengthLimit&&e.length>i.stringLengthLimit&&(e=`${e.slice(0,i.stringLengthLimit)}...`),e}if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){let e={};for(let i in t){let r=t[i];Array.isArray(r)?e[i]=function(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let i=e.localName;if(!i)break;i=i.toLowerCase();let r=e.parentElement,n=[];if(r.children&&r.children.length>0)for(let e=0;e<r.children.length;e++){let t=r.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===i&&n.push(t)}n.length>1&&(i+=`:eq(${n.indexOf(e)})`),t=i+(t?">"+t:""),e=r}return t}(r.length?r[0]:null):e[i]=r}return e}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})}let iT={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function iC(e,t,i){let r;let n=i?Object.assign({},iT,i):iT,s=n.logger;if(!s)return()=>{};r="string"==typeof s?t[s]:s;let o=0,a=!1,l=[];
1if(n.level.includes("error")){let i=t=>{let i=t.message,r=t.error;e({level:"error",trace:i_.parse(r).map(e=>e.toString()),payload:[iE(i,n.stringifyOptions)]})};t.addEventListener("error",i),l.push(()=>{t.removeEventListener("error",i)});let r=t=>{let i,r;t.reason instanceof Error?(i=t.reason,r=[iE(`Uncaught (in promise) ${i.name}: ${i.message}`,n.stringifyOptions)]):(i=Error(),r=[iE("Uncaught (in promise)",n.stringifyOptions),iE(t.reason,n.stringifyOptions)]),e({level:"error",trace:i_.parse(i).map(e=>e.toString()),payload:r})};t.addEventListener("unhandledrejection",r),l.push(()=>{t.removeEventListener("unhandledrejection",r)})}for(let t of n.level)l.push(function(t,i){return t[i]?eS(t,i,t=>(...r)=>{if(t.apply(this,r),!a){a=!0;try{let t=i_.parse(Error()).map(e=>e.toString()).splice(1),s=r.map(e=>iE(e,n.stringifyOptions));++o<n.lengthThreshold?e({level:i,trace:t,payload:s}):o===n.lengthThreshold&&e({level:"warn",trace:[],payload:[iE("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...r)}finally{a=!1}
1}}):()=>{}}(r,t));return()=>{l.forEach(e=>e())}}let iM="rrweb/console@1",iN=e=>({name:iM,observer:iC,options:e}),iD="__rrweb_original__",iR={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],replayLogger:void 0};class iI{constructor(e){this.config=Object.assign(iR,e)}getConsoleLogger(){let e={};for(let t of this.config.level)"trace"===t?e[t]=e=>{(console.log[iD]?console.log[iD]:console.log)(...e.payload.map(e=>JSON.parse(e)),this.formatMessage(e))}:e[t]=e=>{(console[t][iD]?console[t][iD]:console[t])(...e.payload.map(e=>JSON.parse(e)),this.formatMessage(e))};return e}formatMessage(e){if(0===e.trace.length)return"";let t="\n	at ";return t+e.trace.join(t)}}let iO=e=>{let t=(null==e?void 0:e.replayLogger)||new iI(e).getConsoleLogger();return{handler(e,i,r){let n=null;if(e.type===ez.IncrementalSnapshot&&e.data.source===e$.Log?n=e.data:e.type===ez.Plugin&&e.data.plugin===iM&&(n=e.data.payload),n)try{"function"==typeof t[n.level]&&t[n.level](n)}catch(e){r.replayer.config.showWarning&&console.warn(e)}}}},ix=new Map;function ik(e,t){let i=ix.get(e);return i||(i=new Map,ix.set(e,i)),i.has(t)||i.set(t,[]),i.get(t)}function iA(e,t,i){return r=>tc(this,void 0,void 0,function*(){if(r&&"object"==typeof r&&"rr_type"in r){if(i&&(i.isUnchanged=!1),"ImageBitmap"===r.rr_type&&"args"in r){let n=yield iA(e,t,i)(r.args);return yield createImageBitmap.apply(null,n)}if("index"in r){if(i||null===t)return r;let{rr_type:e,index:n}=r;return ik(t,e)[n]}if("args"in r){let{rr_type:n,args:s}=r;return new window[n](...yield Promise.all(s.map(iA(e,t,i))))}if("base64"in r)return tm(r.base64);else if("src"in r){let t=e.get(r.src);if(t)return t;{let t=new Image;return t.src=r.src,e.set(r.src,t),t}}else if("data"in r&&"Blob"===r.rr_type)return new Blob((yield Promise.all(r.data.map(iA(e,t,i)))),{type:r.type})}else if(Array.isArray(r))return yield Promise.all(r.map(iA(e,t,i)));return r})}let iL=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function iP({event:e,mutation:t,target:i,imageMap:r,canvasEventMap:n,errorHandler:s}){return tc(this,void 0,void 0,function*(){try{let o=n.get(e)||t,a="commands"in o?o.commands:[o];if([eX.WebGL,eX.WebGL2].includes(t.type)){for(let e=0;e<a.length;e++){let n=a[e];yield function({mutation:e,target:t,type:i,imageMap:r,errorHandler:n}){return tc(this,void 0,void 0,function*(){try{let n=function(e,t){try{if(t===eX.WebGL)return e.getContext("webgl")||e.getContext("experimental-webgl");return e.getContext("webgl2")}catch(e){return null}}(t,i);if(!n)return;if(e.setter){n[e.property]=e.args[0];return}let s=n[e.property],o=yield Promise.all(e.args.map(iA(r,n))),a=s.apply(n,o);!function(e,t){if(!(null==t?void 0:t.constructor))return;let{name:i}=t.constructor;if(!iL.includes(i))return;let r=ik(e,i);r.includes(t)||r.push(t)}(n,a)}catch(t){n(e,t)}})}({mutation:n,type:t.type,target:i,imageMap:r,errorHandler:s})}return}yield function({event:e,mutations:t,target:i,imageMap:r,errorHandler:n}){return tc(this,void 0,void 0,function*(){let s=i.getContext("2d");if(!s){n(t[0],Error("Canvas context is null"));return}let o=t.map(e=>tc(this,void 0,void 0,function*(){return Promise.all(e.args.map(iA(r,s)))}));(yield Promise.all(o)).forEach((i,o)=>{let a=t[o];try{if(a.setter){s[a.property]=a.args[0];return}let t=s[a.property];"drawImage"===a.property&&"string"==typeof a.args[0]?(r.get(e),t.apply(s,a.args)):t.apply(s,i)}catch(e){n(a,e)}})})}({event:e,mutations:a,target:i,imageMap:r,errorHandler:s})}catch(e){s(t,e)}})}(v=E||(E={}))[v.Document=0]="Document",v[v.DocumentType=1]="DocumentType",v[v.Element=2]="Element",v[v.Text=3]="Text",v[v.CDATA=4]="CDATA",v[v.Comment=5]="Comment";class iF{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){var t;if(!e)return -1;let i=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=i?i:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);
1this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let i=t.id;this.idNodeMap.set(i,e),this.nodeMetaMap.set(e,t)}replace(e,t){let i=this.getNode(e);if(i){let e=this.nodeMetaMap.get(i);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function ij(e){let t=[];for(let i in e){let r=e[i];if("string"!=typeof r)continue;let n=iq(i);t.push(`${n}: ${r};`)}return t.join(" ")}let iV=/-([a-z])/g,iU=/^--[a-zA-Z0-9-]+$/,iW=e=>iU.test(e)?e:e.replace(iV,(e,t)=>t?t.toUpperCase():""),iB=/\B([A-Z])/g,iq=e=>e.replace(iB,"-$1").toLowerCase();class iG{constructor(...e){this.parentElement=null,this.parentNode=null,this.firstChild=null,this.lastChild=null,this.previousSibling=null,this.nextSibling=null,this.ELEMENT_NODE=T.ELEMENT_NODE,this.TEXT_NODE=T.TEXT_NODE}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof iG)||e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function iH(e){return class t extends e{constructor(...e){super(e),this.nodeType=T.DOCUMENT_NODE,this.nodeName="#document",this.compatMode="CSS1Compat",this.RRNodeType=E.Document,this.textContent=null,this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===E.Element&&"HTML"===e.tagName)||null}get body(){var e;return(null===(e=this.documentElement)||void 0===e?void 0:e.childNodes.find(e=>e.RRNodeType===E.Element&&"BODY"===e.tagName))||null}get head(){var e;return(null===(e=this.documentElement)||void 0===e?void 0:e.childNodes.find(e=>e.RRNodeType===E.Element&&"HEAD"===e.tagName))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){let t=e.RRNodeType;if((t===E.Element||t===E.DocumentType)&&this.childNodes.some(e=>e.RRNodeType===t))throw Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===E.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let i=iZ(this,e);return i.parentElement=null,i}insertBefore(e,t){let i=e.RRNodeType;if((i===E.Element||i===E.DocumentType)&&this.childNodes.some(e=>e.RRNodeType===i))throw Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${i===E.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let r=i0(this,e,t);return r.parentElement=null,r}removeChild(e){return i1(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'===e?t="-//W3C//DTD XHTML 1.0 Transitional//EN":'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'===e&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){let e=this.createDocumentType("html",t,"");this.open(),this.appendChild(e)}}createDocument(e,i,r){return new t}createDocumentType(e,t,i){let r=new(iz(iG))(e,t,i);return r.ownerDocument=this,r}createElement(e){let t=new(i$(iG))(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){let t=new(iQ(iG))(e);return t.ownerDocument=this,t}createComment(e){let t=new(iX(iG))(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new(iK(iG))(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}}function iz(e){return class extends e{constructor(e,t,i){super(),this.nodeType=T.DOCUMENT_TYPE_NODE,this.RRNodeType=E.DocumentType,this.name=e,this.publicId=t,this.systemId=i,this.nodeName=e,this.textContent=null}toString(){return"RRDocumentType"}}}function i$(e){return class extends e{constructor(e){super(),this.nodeType=T.ELEMENT_NODE,this.RRNodeType=E.Element,this.attributes={},this.shadowRoot=null,this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";
1return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new iJ(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){let e=this.attributes.style?function(e){let t={},i=/:(.+)/;return e.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach(function(e){if(e){let r=e.split(i);r.length>1&&(t[iW(r[0].trim())]=r[1].trim())}}),t}(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(i,r,n)=>{if(t.test(i))return;let s=iW(i);r?e[s]=r:delete e[s],"important"===n&&(e[s]+=" !important"),this.attributes.style=ij(e)},e.removeProperty=i=>{if(t.test(i))return"";let r=iW(i),n=e[r]||"";return delete e[r],this.attributes.style=ij(e),n},e}getAttribute(e){return this.attributes[e]||null}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,i){this.setAttribute(t,i)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return iZ(this,e)}insertBefore(e,t){return i0(this,e,t)}removeChild(e){return i1(this,e)}attachShadow(e){let t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(let t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}}function iY(e){return class extends e{attachShadow(e){throw Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}}function iQ(e){return class extends e{constructor(e){super(),this.nodeType=T.TEXT_NODE,this.nodeName="#text",this.RRNodeType=E.Text,this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}}function iX(e){return class extends e{constructor(e){super(),this.nodeType=T.COMMENT_NODE,this.nodeName="#comment",this.RRNodeType=E.Comment,this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}}function iK(e){return class extends e{constructor(e){super(),this.nodeName="#cdata-section",this.nodeType=T.CDATA_SECTION_NODE,this.RRNodeType=E.CDATA,this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}}class iJ{constructor(e,t){if(this.classes=[],this.add=(...e)=>{for(let t of e){let e=String(t);this.classes.indexOf(e)>=0||this.classes.push(e)}this.onChange&&this.onChange(this.classes.join(" "))},this.remove=(...e)=>{this.classes=this.classes.filter(t=>-1===e.indexOf(t)),this.onChange&&this.onChange(this.classes.join(" "))},e){let t=e.trim().split(/\s+/);this.classes.push(...t)}this.onChange=t}}function iZ(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function i0(e,t,i){if(!i)return iZ(e,t);if(i.parentNode!==e)throw Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===i||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=i.previousSibling,i.previousSibling=t,t.nextSibling=i,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function i1(e,t){if(t.parentNode!==e)throw Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}(b=T||(T={}))[b.PLACEHOLDER=0]="PLACEHOLDER",b[b.ELEMENT_NODE=1]="ELEMENT_NODE",b[b.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",b[b.TEXT_NODE=3]="TEXT_NODE",b[b.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",b[b.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",b[b.ENTITY_NODE=6]="ENTITY_NODE",b[b.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",b[b.COMMENT_NODE=8]="COMMENT_NODE",b[b.DOCUMENT_NODE=9]="DOCUMENT_NODE",b[b.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",b[b.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE";let i2={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},i3={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
1:"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"},i5=null;function i6(e,t,i,r=t.mirror||t.ownerDocument.mirror){i8(e=function(e,t,i,r){var n;if(i.afterAppend&&!i5&&(i5=new WeakSet,setTimeout(()=>{i5=null},0)),!i7(e,t)){let s=i4(t,i.mirror,r);null===(n=e.parentNode)||void 0===n||n.replaceChild(s,e),e=s}switch(t.RRNodeType){case E.Document:if(!i9(e,t,i.mirror,r)){let n=r.getMeta(t);n&&(i.mirror.removeNodeFromMap(e),e.close(),e.open(),i.mirror.add(e,n),null==i5||i5.add(e))}break;case E.Element:{let n=e;switch(t.tagName){case"IFRAME":{let n=e.contentDocument;if(!n)break;i6(n,t.contentDocument,i,r)}}t.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),i8(n.shadowRoot,t.shadowRoot,i,r)),function(e,t,i){let r=e.attributes,n=t.attributes;for(let r in n){let s=n[r],o=i.getMeta(t);if((null==o?void 0:o.isSVG)&&i2[r])e.setAttributeNS(i2[r],r,s);else if("CANVAS"===t.tagName&&"rr_dataURL"===r){let t=document.createElement("img");t.src=s,t.onload=()=>{let i=e.getContext("2d");i&&i.drawImage(t,0,0,t.width,t.height)}}else{if("IFRAME"===t.tagName&&"srcdoc"===r)continue;e.setAttribute(r,s)}}for(let{name:t}of Array.from(r))t in n||e.removeAttribute(t);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}(n,t,r)}}return e}(e,t,i,r),t,i,r),function(e,t,i){var r;switch(t.RRNodeType){case E.Document:{let e=t.scrollData;e&&i.applyScroll(e,!0);break}case E.Element:switch(t.scrollData&&i.applyScroll(t.scrollData,!0),t.inputData&&i.applyInput(t.inputData),t.tagName){case"AUDIO":case"VIDEO":void 0!==t.paused&&(t.paused?e.pause():e.play()),void 0!==t.muted&&(e.muted=t.muted),void 0!==t.volume&&(e.volume=t.volume),void 0!==t.currentTime&&(e.currentTime=t.currentTime),void 0!==t.playbackRate&&(e.playbackRate=t.playbackRate),void 0!==t.loop&&(e.loop=t.loop);break;case"CANVAS":if(null!==t.rr_dataURL){let i=document.createElement("img");i.onload=()=>{let t=e.getContext("2d");t&&t.drawImage(i,0,0,i.width,i.height)},i.src=t.rr_dataURL}t.canvasMutations.forEach(t=>i.applyCanvas(t.event,t.mutation,e));break;case"STYLE":{let r=e.sheet;
1r&&t.rules.forEach(e=>i.applyStyleSheetMutation(e,r))}}break;case E.Text:case E.Comment:case E.CDATA:e.textContent!==t.data&&(e.textContent=t.data)}(null==i5?void 0:i5.has(e))&&(i5.delete(e),null===(r=i.afterAppend)||void 0===r||r.call(i,e,i.mirror.getId(e)))}(e,t,i)}function i8(e,t,i,r){let n,s;let o=Array.from(e.childNodes),a=t.childNodes;if(0===o.length&&0===a.length)return;let l=0,u=o.length-1,c=0,d=a.length-1,h=o[l],p=o[u],f=a[c],m=a[d];for(;l<=u&&c<=d;)if(void 0===h)h=o[++l];else if(void 0===p)p=o[--u];else if(i9(h,f,i.mirror,r))h=o[++l],f=a[++c];else if(i9(p,m,i.mirror,r))p=o[--u],m=a[--d];else if(i9(h,m,i.mirror,r)){try{e.insertBefore(h,p.nextSibling)}catch(e){console.warn(e)}h=o[++l],m=a[--d]}else if(i9(p,f,i.mirror,r)){try{e.insertBefore(p,h)}catch(e){console.warn(e)}p=o[--u],f=a[++c]}else{if(!n){n={};for(let e=l;e<=u;e++){let t=o[e];t&&i.mirror.hasNode(t)&&(n[i.mirror.getId(t)]=e)}}let t=o[s=n[r.getId(f)]];if(void 0!==s&&t&&i9(t,f,i.mirror,r)){try{e.insertBefore(t,h)}catch(e){console.warn(e)}o[s]=void 0}else{let t=i4(f,i.mirror,r);"#document"===e.nodeName&&h&&(t.nodeType===t.DOCUMENT_TYPE_NODE&&h.nodeType===h.DOCUMENT_TYPE_NODE||t.nodeType===t.ELEMENT_NODE&&h.nodeType===h.ELEMENT_NODE)&&(e.removeChild(h),i.mirror.removeNodeFromMap(h),h=o[++l]);try{e.insertBefore(t,h||null)}catch(e){console.warn(e)}}f=a[++c]}if(l>u){let t=a[d+1],n=null;for(t&&(n=i.mirror.getNode(r.getId(t)));c<=d;++c){let t=i4(a[c],i.mirror,r);try{e.insertBefore(t,n)}catch(e){console.warn(e)}}}else if(c>d)for(;l<=u;l++){let t=o[l];if(t&&t.parentNode===e)try{e.removeChild(t),i.mirror.removeNodeFromMap(t)}catch(e){console.warn(e)}}let g=e.firstChild,y=t.firstChild;for(;null!==g&&null!==y;)i6(g,y,i,r),g=g.nextSibling,y=y.nextSibling}function i4(e,t,i){let r=i.getId(e),n=i.getMeta(e),s=null;if(r>-1&&(s=t.getNode(r)),null!==s&&i7(s,e))return s;switch(e.RRNodeType){case E.Document:s=new Document;break;case E.DocumentType:s=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case E.Element:{let t=e.tagName.toLowerCase();t=i3[t]||t,s=n&&"isSVG"in n&&(null==n?void 0:n.isSVG)?document.createElementNS(i2.svg,t):document.createElement(e.tagName);break}case E.Text:s=document.createTextNode(e.data);break;case E.Comment:s=document.createComment(e.data);break;case E.CDATA:s=document.createCDATASection(e.data)}n&&t.add(s,Object.assign({},n));try{null==i5||i5.add(s)}catch(e){}return s}function i7(e,t){return e.nodeType===t.nodeType&&(e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName)}function i9(e,t,i,r){let n=i.getId(e),s=r.getId(t);return -1!==n&&n===s&&i7(e,t)}class re extends iH(iG){get unserializedId(){return this._unserializedId--}constructor(e){super(),this.UNSERIALIZED_STARTING_ID=-2,this._unserializedId=this.UNSERIALIZED_STARTING_ID,this.mirror=new rd,this.scrollData=null,e&&(this.mirror=e)}createDocument(e,t,i){return new re}createDocumentType(e,t,i){let r=new rt(e,t,i);return r.ownerDocument=this,r}createElement(e){let t;let i=e.toUpperCase();switch(i){case"AUDIO":case"VIDEO":t=new rr(i);break;case"IFRAME":t=new ro(i,this.mirror);break;case"CANVAS":t=new rn(i);break;case"STYLE":t=new rs(i);break;default:t=new ri(i)}return t.ownerDocument=this,t}createComment(e){let t=new rl(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new ru(e);return t.ownerDocument=this,t}createTextNode(e){let t=new ra(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}let rt=iz(iG);class ri extends i$(iG){constructor(){super(...arguments),this.inputData=null,this.scrollData=null}}class rr extends iY(ri){}class rn extends ri{constructor(){super(...arguments),this.rr_dataURL=null,this.canvasMutations=[]}getContext(){return null}}class rs extends ri{constructor(){super(...arguments),this.rules=[]}}class ro extends ri{constructor(e,t){super(e),this.contentDocument=new re,this.contentDocument.mirror=t}}let ra=iQ(iG),rl=iX(iG),ru=iK(iG);function rc(e,t,i,r){let n;switch(e.nodeType){case T.DOCUMENT_NODE:r&&"IFRAME"===r.nodeName?n=r.contentDocument:(n=t).compatMode=e.compatMode;break;case T.DOCUMENT_TYPE_NODE:n=t.createDocumentType(e.name,e.publicId,e.systemId);break;case T.ELEMENT_NODE:{let i=e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase(),r=n=t.createElement(i);for(let{name:t,value:i}of Array.from(e.attributes))r.attributes[t]=i;e.scrollLeft&&(r.scrollLeft=e.scrollLeft),e.scrollTop&&(r.scrollTop=e.scrollTop);break}case T.TEXT_NODE:n=t.createTextNode(e.textContent||"");break;case T.CDATA_SECTION_NODE:n=t.createCDATASection(e.data);break;case T.COMMENT_NODE:n=t.createComment(e.textContent||"");break;case T.DOCUMENT_FRAGMENT_NODE:n=r.attachShadow({mode:"open"});break;default:return null}let s=i.getMeta(e);return t instanceof re&&(s||(s=rh(n,t.unserializedId),i.add(e,s)),t.mirror.add(n,Object.assign({},s))),n}class rd{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){var t;if(!e)return -1;let i=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=i?i:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);
1this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let i=t.id;this.idNodeMap.set(i,e),this.nodeMetaMap.set(e,t)}replace(e,t){let i=this.getNode(e);if(i){let e=this.nodeMetaMap.get(i);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function rh(e,t){switch(e.RRNodeType){case E.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case E.DocumentType:return{id:t,type:e.RRNodeType,name:e.name,publicId:e.publicId,systemId:e.systemId};case E.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case E.Text:case E.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case E.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}function rp(e){return{all:e=e||new Map,on:function(t,i){var r=e.get(t);r?r.push(i):e.set(t,[i])},off:function(t,i){var r=e.get(t);r&&(i?r.splice(r.indexOf(i)>>>0,1):e.set(t,[]))},emit:function(t,i){var r=e.get(t);r&&r.slice().map(function(e){e(i)}),(r=e.get("*"))&&r.slice().map(function(e){e(t,i)})}}}class rf{constructor(e=[],t){this.timeOffset=0,this.raf=null,this.actions=e,this.speed=t.speed}addAction(e){let t=!0===this.raf;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{let t=this.findActionIndex(e);this.actions.splice(t,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){let e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){let e=this.actions[0];if(this.timeOffset>=e.delay)this.actions.shift(),e.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(!0!==this.raf&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return null!==this.raf}findActionIndex(e){let t=0,i=this.actions.length-1;for(;t<=i;){let r=Math.floor((t+i)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r+1;i=r-1}}return t}}function rm(e,t){if(e.type===ez.IncrementalSnapshot&&e.data.source===e$.MouseMove&&e.data.positions&&e.data.positions.length){let i=e.data.positions[0].timeOffset,r=e.timestamp+i;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}function rg(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var r,n,s=i.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)o.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o}(S=C||(C={}))[S.NotStarted=0]="NotStarted",S[S.Running=1]="Running",S[S.Stopped=2]="Stopped";var ry={type:"xstate.init"};function rv(e){return void 0===e?[]:[].concat(e)}function rb(e){return{type:"xstate.assign",assignment:e}}function rS(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 r_(e){return function(t){return e===t}}function rw(e){return"string"==typeof e?{type:e}:e}function rE(e,t){return{value:e,context:t,actions:[],changed:!1,matches:r_(e)}}function rT(e,t,i){var r=t,n=!1;return[e.filter(function(e){if("xstate.assign"===e.type){n=!0;var t=Object.assign({},r);return"function"==typeof e.assignment?t=e.assignment(r,i):Object.keys(e.assignment).forEach(function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](r,i):e.assignment[n]}),r=t,!1}return!0}),r,n]}function rC(e,t){void 0===t&&(t={});var i=rg(rT(rv(e.states[e.initial].entry).map(function(e){return rS(e,t.actions)}),e.context,ry),2),r=i[0],n=i[1],s={config:e,_options:t,initialState:{value:e.initial,actions:r,context:n,matches:r_(e.initial)},transition:function(t,i){var r,n,o="string"==typeof t?{value:t,context:e.context}:t,a=o.value,l=o.context,u=rw(i),c=e.states[a];if(c.on){var d=rv(c.on[u.type]);try{for(var h=function(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],r=0;if(i)return i.call(e);
1if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),p=h.next();!p.done;p=h.next()){var f=p.value;if(void 0===f)return rE(a,l);var m="string"==typeof f?{target:f}:f,g=m.target,y=m.actions,v=void 0===y?[]:y,b=m.cond,S=void 0===b?function(){return!0}:b,_=void 0===g,w=null!=g?g:a,E=e.states[w];if(S(l,u)){var T=rg(rT((_?rv(v):[].concat(c.exit,v,E.entry).filter(function(e){return e})).map(function(e){return rS(e,s._options.actions)}),l,u),3),C=T[0],M=T[1],N=T[2],D=null!=g?g:a;return{value:D,context:M,actions:C,changed:g!==a||C.length>0||N,matches:r_(D)}}}}catch(e){r={error:e}}finally{try{p&&!p.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}}return rE(a,l)}};return s}var rM=function(e,t){return e.actions.forEach(function(i){var r=i.exec;return r&&r(e.context,t)})};function rN(e){var t=e.initialState,i=C.NotStarted,r=new Set,n={_machine:e,send:function(n){i===C.Running&&(rM(t=e.transition(t,n),rw(n)),r.forEach(function(e){return e(t)}))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(r){if(r){var s="object"==typeof r?r:{context:e.config.context,value:r};t={value:s.value,actions:[],context:s.context,matches:r_(s.value)}}return i=C.Running,rM(t,ry),n},stop:function(){return i=C.Stopped,r.clear(),n},get state(){return t},get status(){return i}};return n}let rD=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"];class rR{constructor(e){this.mediaMap=new Map,this.metadataCallbackMap=new Map,this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(eK.Start,this.start.bind(this)),this.emitter.on(eK.SkipStart,this.start.bind(this)),this.emitter.on(eK.Pause,this.pause.bind(this)),this.emitter.on(eK.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,i)=>{this.syncTargetWithState(i),e.pause&&i.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:i}){if(i.isPlaying){let r=(e-i.lastInteractionTimeOffset)/1e3*i.playbackRate,n="duration"in t&&t.duration;if(Number.isNaN(n)){this.waitForMetadata(t);return}let s=i.currentTimeAtLastInteraction+r;t.loop&&!1!==n&&(s%=n),t.currentTime=s}else t.pause(),t.currentTime=i.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;let t=()=>{this.metadataCallbackMap.delete(e);let t=this.mediaMap.get(e);t&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:i}){var r,n,s,o,a;let l=this.mediaMap.get(e),{type:u,playbackRate:c,currentTime:d,muted:h,volume:p,loop:f}=i;return{isPlaying:0===u||1!==u&&((null==l?void 0:l.isPlaying)||null!==e.getAttribute("autoplay")),currentTimeAtLastInteraction:null!==(r=null!=d?d:null==l?void 0:l.currentTimeAtLastInteraction)&&void 0!==r?r:0,lastInteractionTimeOffset:t,playbackRate:null!==(n=null!=c?c:null==l?void 0:l.playbackRate)&&void 0!==n?n:1,volume:null!==(s=null!=p?p:null==l?void 0:l.volume)&&void 0!==s?s:1,muted:null!==(o=null!=h?h:null==l?void 0:l.muted)&&void 0!==o?o:null===e.getAttribute("muted"),loop:null!==(a=null!=f?f:null==l?void 0:l.loop)&&void 0!==a?a:null===e.getAttribute("loop")}}syncTargetWithState(e){let t=this.mediaMap.get(e);if(!t)return;let{muted:i,loop:r,volume:n,isPlaying:s}=t,o=this.service.state.matches("paused"),a=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==n&&(e.volume=n),e.muted=i,e.loop=r,e.playbackRate!==a&&(e.playbackRate=a),s&&!o?e.play():e.pause()}catch(e){this.warn(`Failed to replay media interactions: ${e.message||e}`)}}addMediaElements(e,t,i){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;let r=i.getMeta(e);if(!r||!("attributes"in r))return;let n=this.service.state.matches("paused"),s=r.attributes,o=!1;(o=s.rr_mediaState?"played"===s.rr_mediaState:null!==e.getAttribute("autoplay"))&&n&&e.pause();let a=1;
1"number"==typeof s.rr_mediaPlaybackRate&&(a=s.rr_mediaPlaybackRate);let l=!1;l="boolean"==typeof s.rr_mediaMuted?s.rr_mediaMuted:null!==e.getAttribute("muted");let u=!1;u="boolean"==typeof s.rr_mediaLoop?s.rr_mediaLoop:null!==e.getAttribute("loop");let c=1;"number"==typeof s.rr_mediaVolume&&(c=s.rr_mediaVolume);let d=0;"number"==typeof s.rr_mediaCurrentTime&&(d=s.rr_mediaCurrentTime),this.mediaMap.set(e,{isPlaying:o,currentTimeAtLastInteraction:d,lastInteractionTimeOffset:t,playbackRate:a,volume:c,muted:l,loop:u}),this.syncTargetWithState(e)}mediaMutation({target:e,timeOffset:t,mutation:i}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:i})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}let rI=rp||N,rO="[replayer]",rx={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function rk(e){return e.type==ez.IncrementalSnapshot&&(e.data.source==e$.TouchMove||e.data.source==e$.MouseInteraction&&e.data.type==eY.TouchStart)}class rA{get timer(){return this.service.state.context.timer}constructor(e,t){if(this.usingVirtualDom=!1,this.virtualDom=new re,this.mouseTail=null,this.tailPositions=[],this.emitter=rI(),this.legacy_missingNodeRetryMap={},this.cache=ep(),this.imageMap=new Map,this.canvasEventMap=new Map,this.mirror=new k,this.styleMirror=new eW,this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,this.lastMouseDownEvent=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[],this.handleResize=e=>{for(let t of(this.iframe.style.display="inherit",[this.mouseTail,this.iframe]))t&&(t.setAttribute("width",String(e.width)),t.setAttribute("height",String(e.height)))},this.applyEventsSynchronously=e=>{for(let t of e){switch(t.type){case ez.DomContentLoaded:case ez.Load:case ez.Custom:continue;case ez.FullSnapshot:case ez.Meta:case ez.Plugin:case ez.IncrementalSnapshot:}this.getCastFn(t,!0)()}},this.getCastFn=(e,t=!1)=>{let i;switch(e.type){case ez.DomContentLoaded:case ez.Load:break;case ez.Custom:i=()=>{this.emitter.emit(eK.CustomEvent,e)};break;case ez.Meta:i=()=>this.emitter.emit(eK.Resize,{width:e.data.width,height:e.data.height});break;case ez.FullSnapshot:i=()=>{var i;if(this.firstFullSnapshot){if(this.firstFullSnapshot===e){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(e,t),null===(i=this.iframe.contentWindow)||void 0===i||i.scrollTo(e.data.initialOffset)};break;case ez.IncrementalSnapshot:i=()=>{if(this.applyIncremental(e,t),!t&&(e===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let t of this.service.state.context.events)if(!(t.timestamp<=e.timestamp)&&this.isUserInteraction(t)){t.delay-e.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=t);break}if(this.nextUserInteractionEvent){let t={speed:Math.min(Math.round((this.nextUserInteractionEvent.delay-e.delay)/5e3),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:t}),this.emitter.emit(eK.SkipStart,t)}}}}return()=>{for(let r of(i&&i(),this.config.plugins||[]))r.handler&&r.handler(e,t,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:e}});let r=this.service.state.context.events.length-1;if(!this.config.liveMode&&e===this.service.state.context.events[r]){let t=50;e.type===ez.IncrementalSnapshot&&e.data.source===e$.MouseMove&&e.data.positions.length&&(t+=Math.max(0,-e.data.positions[0].timeOffset)),setTimeout(()=>{r<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(eK.Finish))},t)}this.emitter.emit(eK.EventCast,e)}},!(null==t?void 0:t.liveMode)&&e.length<2)throw Error("Replayer need at least 2 events.");let i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:1e4,showWarning:!0,showDebug:!1,blockClass:"rr
1-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:rx,useVirtualDom:!0,logger:console};for(let e of(this.config=Object.assign({},i,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(eK.Resize,this.handleResize),this.setupDom(),this.config.plugins||[]))e.getMirror&&e.getMirror({nodeMirror:this.mirror});this.emitter.on(eK.Flush,()=>{if(this.usingVirtualDom){let e={mirror:this.mirror,applyCanvas:(e,t,i)=>{iP({event:e,mutation:t,target:i,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(e,t)=>{e.source===e$.StyleSheetRule?this.applyStyleSheetRule(e,t):e.source===e$.StyleDeclaration&&this.applyStyleDeclaration(e,t)},afterAppend:(e,t)=>{for(let i of this.config.plugins||[])i.onBuild&&i.onBuild(e,{id:t,replayer:this})}};if(this.iframe.contentDocument)try{i6(this.iframe.contentDocument,this.virtualDom,e,this.virtualDom.mirror)}catch(e){console.warn(e)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let t in this.legacy_missingNodeRetryMap)try{let i=this.legacy_missingNodeRetryMap[t],r=i4(i.node,this.mirror,this.virtualDom.mirror);i6(r,i.node,e,this.virtualDom.mirror),i.node=r}catch(e){this.warn(e)}this.constructedStyleMutations.forEach(e=>{this.applyStyleSheetMutation(e)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(e=>{this.applyAdoptedStyleSheet(e)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){let[e,t]=this.lastMouseDownEvent;e.dispatchEvent(t)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(eK.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});let r=new rf([],{speed:this.config.speed});this.service=function(e,{getCastFn:t,applyEventsSynchronously:i,emitter:r}){return rN(rC({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:rb({lastPlayedEvent:(e,t)=>"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}),recordTimeOffset:rb((e,t)=>{let i=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(i=t.payload.timeOffset),Object.assign(Object.assign({},e),{timeOffset:i,baselineTime:e.events[0].timestamp+i})}),play(e){var n;let{timer:s,events:o,baselineTime:a,lastPlayedEvent:l}=e;for(let e of(s.clear(),o))rm(e,a);let u=function(e,t){for(let i=e.length-1;i>=0;i--){let r=e[i];if(r.type===ez.Meta&&r.timestamp<=t)return e.slice(i)}return e}(o,a),c=null==l?void 0:l.timestamp;(null==l?void 0:l.type)===ez.IncrementalSnapshot&&l.data.source===e$.MouseMove&&(c=l.timestamp+(null===(n=l.data.positions[0])||void 0===n?void 0:n.timeOffset)),a<(c||0)&&r.emit(eK.PlayBack);let d=[];for(let e of u)if(!c||!(c<a)||!(e.timestamp<=c)&&e!==l){if(e.timestamp<a)d.push(e);else{let i=t(e,!1);s.addAction({doAction:()=>{i()},delay:e.delay})}}i(d),r.emit(eK.Flush),s.start()},pause(e){e.timer.clear()},resetLastPlayedEvent:rb(e=>Object.assign(Object.assign({},e),{lastPlayedEvent:null})),startLive:rb({baselineTime:(e,t)=>
1(e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime)?t.payload.baselineTime:Date.now()}),addEvent:rb((e,i)=>{let{baselineTime:r,timer:n,events:s}=e;if("ADD_EVENT"===i.type){let{event:e}=i.payload;rm(e,r);let o=s.length-1;if(!s[o]||s[o].timestamp<=e.timestamp)s.push(e);else{let t=-1,i=0;for(;i<=o;){let t=Math.floor((i+o)/2);s[t].timestamp<=e.timestamp?i=t+1:o=t-1}-1===t&&(t=i),s.splice(t,0,e)}let a=e.timestamp<r,l=t(e,a);a?l():n.isActive()&&n.addAction({doAction:()=>{l()},delay:e.delay})}return Object.assign(Object.assign({},e),{events:s})})}}))}({events:e.map(e=>t&&t.unpackFn?t.unpackFn(e):e).sort((e,t)=>e.timestamp-t.timestamp),timer:r,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(e=>{this.emitter.emit(eK.StateChange,{player:e})}),this.speedService=rN(rC({id:"speed",context:{normalSpeed:-1,timer:r},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:(e,t)=>{"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:rb({normalSpeed:e=>e.timer.speed}),restoreSpeed:e=>{e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe(e=>{this.emitter.emit(eK.StateChange,{speed:e})}),this.mediaManager=new rR({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});let n=this.service.state.context.events.find(e=>e.type===ez.Meta),s=this.service.state.context.events.find(e=>e.type===ez.FullSnapshot);if(n){let{width:e,height:t}=n.data;setTimeout(()=>{this.emitter.emit(eK.Resize,{width:e,height:t})},0)}s&&setTimeout(()=>{var e;this.firstFullSnapshot||(this.firstFullSnapshot=s,this.rebuildFullSnapshot(s),null===(e=this.iframe.contentWindow)||void 0===e||e.scrollTo(s.data.initialOffset))},1),this.service.state.context.events.find(rk)&&this.mouse.classList.add("touch-device")}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),void 0!==e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),void 0!==e.mouseTail&&(!1===e.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){let 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}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){let{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,i;this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}}),null===(i=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.getElementsByTagName("html")[0])||void 0===i||i.classList.remove("rrweb-paused"),this.emitter.emit(eK.Start)}pause(e){var t,i;void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),null===(i=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.getElementsByTagName("html")[0])||void 0===i||i.classList.add("rrweb-paused"),this.emitter.emit(eK.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(eK.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(eK.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){let t=this.config.unpackFn?this.config.unpackFn(e):e;rk(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=ep()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");let e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(function(e=window,t=document){var i;if("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)return;let r=e.HTMLElement||e.Element,n={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||a,scrollIntoView:r.prototype.scrollIntoView},s=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,o=(i=e.navigator.userAgent,RegExp("MSIE |Trident/|Edge/").test(i))?1:0;function a(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;
1if("object"==typeof e&&"smooth"===e.behavior)return!1;throw TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(e,t){return"Y"===t?e.clientHeight+o<e.scrollHeight:"X"===t?e.clientWidth+o<e.scrollWidth:void 0}function c(t,i){let r=e.getComputedStyle(t,null)["overflow"+i];return"auto"===r||"scroll"===r}function d(i,r,o){let l,u,c,d;let h=s();i===t.body?(l=e,u=e.scrollX||e.pageXOffset,c=e.scrollY||e.pageYOffset,d=n.scroll):(l=i,u=i.scrollLeft,c=i.scrollTop,d=a),function t(i){let r,n,o;let a=(s()-i.startTime)/468;r=.5*(1-Math.cos(Math.PI*(a=a>1?1:a))),n=i.startX+(i.x-i.startX)*r,o=i.startY+(i.y-i.startY)*r,i.method.call(i.scrollable,n,o),(n!==i.x||o!==i.y)&&e.requestAnimationFrame(t.bind(e,i))}({scrollable:l,method:d,startTime:h,startX:u,startY:c,x:r,y:o})}e.scroll=e.scrollTo=function(){if(void 0!==arguments[0]){if(!0===l(arguments[0])){n.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);return}d.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)}},e.scrollBy=function(){if(void 0!==arguments[0]){if(l(arguments[0])){n.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);return}d.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])return;if(!0===l(arguments[0])){if("number"==typeof arguments[0]&&void 0===arguments[1])throw SyntaxError("Value could not be converted");n.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);return}let e=arguments[0].left,t=arguments[0].top;d.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)},r.prototype.scrollBy=function(){if(void 0!==arguments[0]){if(!0===l(arguments[0])){n.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);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(!0===l(arguments[0])){n.scrollIntoView.call(this,void 0===arguments[0]||arguments[0]);return}let i=function(e){for(;e!==t.body&&!1===function(e){let t=u(e,"Y")&&c(e,"Y"),i=u(e,"X")&&c(e,"X");return t||i}(e);)e=e.parentNode||e.host;return e}(this),r=i.getBoundingClientRect(),s=this.getBoundingClientRect();i!==t.body?(d.call(this,i,i.scrollLeft+s.left-r.left,i.scrollTop+s.top-r.top),"fixed"!==e.getComputedStyle(i).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:s.left,top:s.top,behavior:"smooth"})}}(this.iframe.contentWindow,this.iframe.contentDocument),eO(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};let i=[],r=(t,r)=>{if(this.collectIframeAndAttachDocument(i,t),this.mediaManager.isSupportedMediaElement(t)){let{events:i}=this.service.state.context;this.mediaManager.addMediaElements(t,e.timestamp-i[0].timestamp,this.mirror)}for(let e of this.config.plugins||[])e.onBuild&&e.onBuild(t,{id:r,replayer:this})};for(let{mutationInQueue:t,builtNode:n}of(this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),!function(e,t){let{doc:i,onVisit:r,hackCss:n=!0,afterAppend:s,cache:o,mirror:a=new k}=t;ef(e,{doc:i,mirror:a,skipChild:!1,hackCss:n,afterAppend:s,cache:o}),function(e,t){for(let i of e.getIds())e.has(i)&&t(e.getNode(i))}(a,e=>{r&&r(e),function(e,t){let i=t.getMeta(e);if((null==i?void 0:i.type)===_.Element)for(let t in i.attributes){if
1(!(Object.prototype.hasOwnProperty.call(i.attributes,t)&&t.startsWith("rr_")))continue;let r=i.attributes[t];"rr_scrollLeft"===t&&(e.scrollLeft=r),"rr_scrollTop"===t&&(e.scrollTop=r)}}(e,a)})}(e.data.node,{doc:this.iframe.contentDocument,afterAppend:r,cache:this.cache,mirror:this.mirror}),r(this.iframe.contentDocument,e.data.node.id),i))this.attachDocumentToIframe(t,n),this.newDocumentQueue=this.newDocumentQueue.filter(e=>e!==t);let{documentElement:n,head:s}=this.iframe.contentDocument;this.insertStyleRules(n,s),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(eK.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var i;let r=rD(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&r.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){let i=this.virtualDom.createElement("style");this.virtualDom.mirror.add(i,rh(i,this.virtualDom.unserializedId)),e.insertBefore(i,t),i.rules.push({source:e$.StyleSheetRule,adds:r.map((e,t)=>({rule:e,index:t}))})}else{let n=document.createElement("style");e.insertBefore(n,t);for(let e=0;e<r.length;e++)null===(i=n.sheet)||void 0===i||i.insertRule(r[e],e)}}attachDocumentToIframe(e,t){let i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,r=[],n=(e,n)=>{this.collectIframeAndAttachDocument(r,e);let s=i.getMeta(e);if((null==s?void 0:s.type)===_.Element&&(null==s?void 0:s.tagName.toUpperCase())==="HTML"){let{documentElement:e,head:i}=t.contentDocument;this.insertStyleRules(e,i)}if(!this.usingVirtualDom)for(let t of this.config.plugins||[])t.onBuild&&t.onBuild(e,{id:n,replayer:this})};for(let{mutationInQueue:s,builtNode:o}of(ef(e.node,{doc:t.contentDocument,mirror:i,hackCss:!0,skipChild:!1,afterAppend:n,cache:this.cache}),n(t.contentDocument,e.node.id),r))this.attachDocumentToIframe(s,o),this.newDocumentQueue=this.newDocumentQueue.filter(e=>e!==s)}collectIframeAndAttachDocument(e,t){if(eA(t,this.mirror)){let i=this.newDocumentQueue.find(e=>e.parentId===this.mirror.getId(t));i&&e.push({mutationInQueue:i,builtNode:t})}}waitForStylesheetLoad(){var e;let t=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(t){let e;let i=new Set,r=this.service.state,n=()=>{r=this.service.state};this.emitter.on(eK.Start,n),this.emitter.on(eK.Pause,n);let s=()=>{this.emitter.off(eK.Start,n),this.emitter.off(eK.Pause,n)};t.querySelectorAll('link[rel="stylesheet"]').forEach(t=>{t.sheet||(i.add(t),t.addEventListener("load",()=>{i.delete(t),0===i.size&&-1!==e&&(r.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(eK.LoadStylesheetEnd),e&&clearTimeout(e),s())}))}),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(eK.LoadStylesheetStart),e=setTimeout(()=>{r.matches("playing")&&this.play(this.getCurrentTime()),e=-1,s()},this.config.loadTimeout))}}preloadAllImages(){return tc(this,void 0,void 0,function*(){this.service.state;let e=()=>{this.service.state};this.emitter.on(eK.Start,e),this.emitter.on(eK.Pause,e);let t=[];for(let e of this.service.state.context.events)e.type===ez.IncrementalSnapshot&&e.data.source===e$.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(e.data,e)),("commands"in e.data?e.data.commands:[e.data]).forEach(t=>{this.preloadImages(t,e)}));return Promise.all(t)})}preloadImages(e,t){if("drawImage"===e.property&&"string"==typeof e.args[0]&&!this.imageMap.has(t)){let t=document.createElement("canvas"),i=t.getContext("2d"),r=null==i?void 0:i.createImageData(t.width,t.height);null==r||r.data,JSON.parse(e.args[0]),null==i||i.putImageData(r,0,0)}}deserializeAndPreloadCanvasEvents(e,t){return tc(this,void 0,void 0,function*(){if(!this.canvasEventMap.has(t)){let i={isUnchanged:!0};if("commands"in e){let r=yield Promise.all(e.commands.map(e=>tc(this,void 0,void 0,function*(){let t=yield Promise.all(e.args.map(iA(this.imageMap,null,i)));return Object.assign(Object.assign({},e),{args:t})})));!1===i.isUnchanged&&this.canvasEventMap.set(t,Object.assign(Object.assign({},e),{commands:r}))}else{let r=yield Promise.all(e.args.map(iA(this.imageMap,null,i)));!1===i.isUnchanged&&this.canvasEventMap.set(t,Object.assign(Object.assign({},e),{args:r}))}}})}applyIncremental(e,t){var i,r,n;let{data:s}=e;switch(s.source){case e$.Mutation:try{this.applyMutation(s,t)}catch(e){this.warn(`Exception in mutation ${e.message||e}`,s)}break;case e$.Drag:case e$.TouchMove:case e$.MouseMove:if(t){let e=s.positions[s.positions.length-1];this.mousePos={x:e.x,y:e.y,id:e.id,debugData:s}}else s.positions.forEach(i=>
1{let r={doAction:()=>{this.moveAndHover(i.x,i.y,i.id,t,s)},delay:i.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(r)}),this.timer.addAction({doAction(){},delay:e.delay-(null===(i=s.positions[0])||void 0===i?void 0:i.timeOffset)});break;case e$.MouseInteraction:{if(-1===s.id)break;let e=new Event(L(eY[s.type])),i=this.mirror.getNode(s.id);if(!i)return this.debugNodeNotFound(s,s.id);this.emitter.emit(eK.MouseInteraction,{type:s.type,target:i});let{triggerFocus:r}=this.config;switch(s.type){case eY.Blur:"blur"in i&&i.blur();break;case eY.Focus:r&&i.focus&&i.focus({preventScroll:!0});break;case eY.Click:case eY.TouchStart:case eY.TouchEnd:case eY.MouseDown:case eY.MouseUp:t?(s.type===eY.TouchStart?this.touchActive=!0:s.type===eY.TouchEnd&&(this.touchActive=!1),s.type===eY.MouseDown?this.lastMouseDownEvent=[i,e]:s.type===eY.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:s.x||0,y:s.y||0,id:s.id,debugData:s}):(s.type===eY.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(s.x||0,s.y||0,s.id,t,s),s.type===eY.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):s.type===eY.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):s.type===eY.TouchEnd?this.mouse.classList.remove("touch-active"):i.dispatchEvent(e));break;case eY.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:i.dispatchEvent(e)}break}case e$.Scroll:if(-1===s.id)break;if(this.usingVirtualDom){let e=this.virtualDom.mirror.getNode(s.id);if(!e)return this.debugNodeNotFound(s,s.id);e.scrollData=s;break}this.applyScroll(s,t);break;case e$.ViewportResize:this.emitter.emit(eK.Resize,{width:s.width,height:s.height});break;case e$.Input:if(-1===s.id)break;if(this.usingVirtualDom){let e=this.virtualDom.mirror.getNode(s.id);if(!e)return this.debugNodeNotFound(s,s.id);e.inputData=s;break}this.applyInput(s);break;case e$.MediaInteraction:{let t=this.usingVirtualDom?this.virtualDom.mirror.getNode(s.id):this.mirror.getNode(s.id);if(!t)return this.debugNodeNotFound(s,s.id);let{events:i}=this.service.state.context;this.mediaManager.mediaMutation({target:t,timeOffset:e.timestamp-i[0].timestamp,mutation:s});break}case e$.StyleSheetRule:case e$.StyleDeclaration:this.usingVirtualDom?s.styleId?this.constructedStyleMutations.push(s):s.id&&(null===(r=this.virtualDom.mirror.getNode(s.id))||void 0===r||r.rules.push(s)):this.applyStyleSheetMutation(s);break;case e$.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let t=this.virtualDom.mirror.getNode(s.id);if(!t)return this.debugNodeNotFound(s,s.id);t.canvasMutations.push({event:e,mutation:s})}else{let t=this.mirror.getNode(s.id);if(!t)return this.debugNodeNotFound(s,s.id);iP({event:e,mutation:s,target:t,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case e$.Font:try{let e=new FontFace(s.family,s.buffer?new Uint8Array(JSON.parse(s.fontSource)):s.fontSource,s.descriptors);null===(n=this.iframe.contentDocument)||void 0===n||n.fonts.add(e)}catch(e){this.warn(e)}break;case e$.Selection:if(t){this.lastSelectionData=s;break}this.applySelection(s);break;case e$.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(s):this.applyAdoptedStyleSheet(s)}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,!function(e,t=new iF,i=new re){!function e(r,n){let s=rc(r,i,t,n);if(null!==s){if((null==n?void 0:n.nodeName)!=="IFRAME"&&r.nodeType!==T.DOCUMENT_FRAGMENT_NODE&&(null==n||n.appendChild(s),s.parentNode=n,s.parentElement=n),"IFRAME"===r.nodeName){let t=r.contentDocument;t&&e(t,s)}else(r.nodeType===T.DOCUMENT_NODE||r.nodeType===T.ELEMENT_NODE||r.nodeType===T.DOCUMENT_FRAGMENT_NODE)&&(r.nodeType===T.ELEMENT_NODE&&r.shadowRoot&&e(r.shadowRoot,s),r.childNodes.forEach(t=>e(t,s)))}}(e,null)}(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(let e in this.legacy_missingNodeRetryMap)try{let t=this.legacy_missingNodeRetryMap[e],i=rc(t.node,this.virtualDom,this.mirror);
1i&&(t.node=i)}catch(e){this.warn(e)}let i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(t=>!!i.getNode(t.id)||(this.warnNodeNotFound(e,t.id),!1)),e.removes.forEach(t=>{var r;let n=i.getNode(t.id);if(!n)return;let s=i.getNode(t.parentId);if(!s)return this.warnNodeNotFound(e,t.parentId);if(t.isShadow&&eF(s)&&(s=s.shadowRoot),i.removeNodeFromMap(n),s)try{s.removeChild(n),this.usingVirtualDom&&"#text"===n.nodeName&&"STYLE"===s.nodeName&&(null===(r=s.rules)||void 0===r?void 0:r.length)>0&&(s.rules=[])}catch(t){if(t instanceof DOMException)this.warn("parent could not remove child in mutation",s,n,e);else throw t}});let r=Object.assign({},this.legacy_missingNodeRetryMap),n=[],s=e=>{let t=null;return e.nextId&&(t=i.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t},o=e=>{var t,o;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let a=i.getNode(e.parentId);if(!a)return e.node.type===_.Document?this.newDocumentQueue.push(e):n.push(e);e.node.isShadow&&(eF(a)||a.attachShadow({mode:"open"}),a=a.shadowRoot);let l=null,u=null;if(e.previousId&&(l=i.getNode(e.previousId)),e.nextId&&(u=i.getNode(e.nextId)),s(e))return n.push(e);if(e.node.rootId&&!i.getNode(e.node.rootId))return;let c=e.node.rootId?i.getNode(e.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(eA(a,i)){this.attachDocumentToIframe(e,a);return}let d=(e,t)=>{if(!this.usingVirtualDom)for(let i of this.config.plugins||[])i.onBuild&&i.onBuild(e,{id:t,replayer:this})},h=ef(e.node,{doc:c,mirror:i,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:d});if(-1===e.previousId||-1===e.nextId){r[e.node.id]={node:h,mutation:e};return}let p=i.getMeta(a);if(p&&p.type===_.Element&&"textarea"===p.tagName&&e.node.type===_.Text)for(let e of Array.isArray(a.childNodes)?a.childNodes:Array.from(a.childNodes))e.nodeType===a.TEXT_NODE&&a.removeChild(e);else if((null==p?void 0:p.type)===_.Document){let i=a;e.node.type===_.DocumentType&&(null===(t=i.childNodes[0])||void 0===t?void 0:t.nodeType)===Node.DOCUMENT_TYPE_NODE&&i.removeChild(i.childNodes[0]),"HTML"===h.nodeName&&i.documentElement&&i.removeChild(i.documentElement)}if(l&&l.nextSibling&&l.nextSibling.parentNode?a.insertBefore(h,l.nextSibling):u&&u.parentNode?a.contains(u)?a.insertBefore(h,u):a.insertBefore(h,null):a.appendChild(h),d(h,e.node.id),this.usingVirtualDom&&"#text"===h.nodeName&&"STYLE"===a.nodeName&&(null===(o=a.rules)||void 0===o?void 0:o.length)>0&&(a.rules=[]),eA(h,this.mirror)){let e=this.mirror.getId(h),t=this.newDocumentQueue.find(t=>t.parentId===e);t&&(this.attachDocumentToIframe(t,h),this.newDocumentQueue=this.newDocumentQueue.filter(e=>e!==t))}(e.previousId||e.nextId)&&this.legacy_resolveMissingNode(r,a,h,e)};e.adds.forEach(e=>{o(e)});let a=Date.now();for(;n.length;){let e=ex(n);if(n.length=0,Date.now()-a>500){this.warn("Timeout in the loop, please check the resolve tree data:",e);break}for(let t of e)i.getNode(t.value.parentId)?ek(t,e=>{o(e)}):this.debug("Drop resolve tree since there is no parent for the root node.",t)}Object.keys(r).length&&Object.assign(this.legacy_missingNodeRetryMap,r),eU(e.texts).forEach(t=>{var r;let n=i.getNode(t.id);if(!n){if(e.removes.find(e=>e.id===t.id))return;return this.warnNodeNotFound(e,t.id)}if(n.textContent=t.value,this.usingVirtualDom){let e=n.parentNode;(null===(r=null==e?void 0:e.rules)||void 0===r?void 0:r.length)>0&&(e.rules=[])}}),e.attributes.forEach(t=>{var r;let n=i.getNode(t.id);if(!n){if(e.removes.find(e=>e.id===t.id))return;return this.warnNodeNotFound(e,t.id)}for(let e in t.attributes)if("string"==typeof e){let s=t.attributes[e];if(null===s)n.removeAttribute(e);else if("string"==typeof s)try{if("_cssText"===e&&("LINK"===n.nodeName||"STYLE"===n.nodeName))try{let e=i.getMeta(n);Object.assign(e.attributes,t.attributes);let r=ef(e,{doc:n.ownerDocument,mirror:i,skipChild:!0,hackCss:!0,cache:this.cache}),s=n.nextSibling,o=n.parentNode;if(r&&o){o.removeChild(n),o.insertBefore(r,s),i.replace(t.id,r);break}}catch(e){}
1if("value"===e&&"TEXTAREA"===n.nodeName){n.childNodes.forEach(e=>n.removeChild(e));let e=null===(r=n.ownerDocument)||void 0===r?void 0:r.createTextNode(s);e&&n.appendChild(e)}else n.setAttribute(e,s)}catch(e){this.warn("An error occurred may due to the checkout feature.",e)}else if("style"===e)for(let e in s)if(!1===s[e])n.style.removeProperty(e);else if(s[e]instanceof Array){let t=s[e];n.style.setProperty(e,t[0],t[1])}else{let t=s[e];n.style.setProperty(e,t)}}})}applyScroll(e,t){var i,r;let n=this.mirror.getNode(e.id);if(!n)return this.debugNodeNotFound(e,e.id);let s=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)null===(i=this.iframe.contentWindow)||void 0===i||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((null==s?void 0:s.type)===_.Document)null===(r=n.defaultView)||void 0===r||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(e){}}applyInput(e){let t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}}applySelection(e){try{let t=new Set,i=e.ranges.map(({start:e,startOffset:i,end:r,endOffset:n})=>{let s=this.mirror.getNode(e),o=this.mirror.getNode(r);if(!s||!o)return;let a=new Range;a.setStart(s,i),a.setEnd(o,n);let l=s.ownerDocument,u=null==l?void 0:l.getSelection();return u&&t.add(u),{range:a,selection:u}});t.forEach(e=>
1e.removeAllRanges()),i.forEach(e=>{var t;return e&&(null===(t=e.selection)||void 0===t?void 0:t.addRange(e.range))})}catch(e){}}applyStyleSheetMutation(e){var t;let i=null;e.styleId?i=this.styleMirror.getStyle(e.styleId):e.id&&(i=(null===(t=this.mirror.getNode(e.id))||void 0===t?void 0:t.sheet)||null),i&&(e.source===e$.StyleSheetRule?this.applyStyleSheetRule(e,i):e.source===e$.StyleDeclaration&&this.applyStyleDeclaration(e,i))}applyStyleSheetRule(e,t){var i,r,n,s;if(null===(i=e.adds)||void 0===i||i.forEach(({rule:e,index:i})=>{try{if(Array.isArray(i)){let{positions:r,index:n}=eV(i);ej(t.cssRules,r).insertRule(e,n)}else{let r=void 0===i?void 0:Math.min(i,t.cssRules.length);null==t||t.insertRule(e,r)}}catch(e){}}),null===(r=e.removes)||void 0===r||r.forEach(({index:e})=>{try{if(Array.isArray(e)){let{positions:i,index:r}=eV(e);ej(t.cssRules,i).deleteRule(r||0)}else null==t||t.deleteRule(e)}catch(e){}}),e.replace)try{null===(n=t.replace)||void 0===n||n.call(t,e.replace)}catch(e){}if(e.replaceSync)try{null===(s=t.replaceSync)||void 0===s||s.call(t,e.replaceSync)}catch(e){}}applyStyleDeclaration(e,t){e.set&&ej(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&ej(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;let i=this.mirror.getNode(e.id);if(!i)return;null===(t=e.styles)||void 0===t||t.forEach(e=>{var t;let r=null,n=null;if(eF(i)?n=(null===(t=i.ownerDocument)||void 0===t?void 0:t.defaultView)||null:"#document"===i.nodeName&&(n=i.defaultView),n)try{r=new n.CSSStyleSheet,this.styleMirror.add(r,e.styleId),this.applyStyleSheetRule({source:e$.StyleSheetRule,adds:e.rules},r)}catch(e){}});let r=0,n=(e,t)=>{let i=t.map(e=>this.styleMirror.getStyle(e)).filter(e=>null!==e);eF(e)?e.shadowRoot.adoptedStyleSheets=i:"#document"===e.nodeName&&(e.adoptedStyleSheets=i),i.length!==t.length&&r<10&&(setTimeout(()=>n(e,t),0+100*r),r++)};n(i,e.styleIds)}legacy_resolveMissingNode(e,t,i,r){let{previousId:n,nextId:s}=r,o=n&&e[n],a=s&&e[s];if(o){let{node:r,mutation:n}=o;t.insertBefore(r,i),delete e[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(e,t,r,n)}if(a){let{node:r,mutation:n}=a;t.insertBefore(r,i.nextSibling),delete e[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(e,t,r,n)}}moveAndHover(e,t,i,r,n){let s=this.mirror.getNode(i);if(!s)return this.debugNodeNotFound(n,i);let o=eP(s,this.iframe),a=e*o.absoluteScale+o.x,l=t*o.absoluteScale+o.y;this.mouse.style.left=`${a}px`,this.mouse.style.top=`${l}px`,r||this.drawMouseTail({x:a,y:l}),this.hoverElements(s)}drawMouseTail(e){if(!this.mouseTail)return;let{lineCap:t,lineWidth:i,strokeStyle:r,duration:n}=!0===this.config.mouseTail?rx:Object.assign({},rx,this.config.mouseTail),s=()=>{if(!this.mouseTail)return;let e=this.mouseTail.getContext("2d");e&&this.tailPositions.length&&(e.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),e.beginPath(),e.lineWidth=i,e.lineCap=t,e.strokeStyle=r,e.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(t=>e.lineTo(t.x,t.y)),e.stroke())};this.tailPositions.push(e),s(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(t=>t!==e),s()},n/this.speedService.state.context.timer.speed)}hoverElements(e){var t;null===(t=this.lastHoveredRootNode||this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach(e=>{e.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let i=e;for(;i;)i.classList&&i.classList.add(":hover"),i=i.parentElement}isUserInteraction(e){return e.type===ez.IncrementalSnapshot&&e.data.source>e$.Mutation&&e.data.source<=e$.Input}backToNormal(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(eK.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}
1debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(rO,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(rO,...e)}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.